Merge branch 'develop' of https://codeberg.org/calckey/calckey into upstream/develop

This commit is contained in:
freeplay 2023-06-24 10:22:06 -04:00
commit dd140db13f
131 changed files with 17204 additions and 13944 deletions

View File

@ -1,4 +0,0 @@
{
"eslint.packageManager": "pnpm",
"workspace.workspaceFolderCheckCwd": false
}

View File

@ -1,5 +1,8 @@
# All the changes to Calckey from stock Misskey # All the changes to Calckey from stock Misskey
> **Warning**
> This list is incomplete. Please check the [Releases](https://codeberg.org/calckey/calckey/releases) and [Changelog](https://codeberg.org/calckey/calckey/src/branch/develop/CHANGELOG.md) for a more complete list of changes. There have been [>4000 commits (laggy link)](https://codeberg.org/calckey/calckey/compare/700a7110f7e34f314b070987aa761c451ec34efc...develop) since we forked Misskey!
## Planned ## Planned
- Stucture - Stucture
@ -8,31 +11,25 @@
- Rewrite backend in Rust and [Rocket](https://rocket.rs/) - Rewrite backend in Rust and [Rocket](https://rocket.rs/)
- Use [Magic RegExP](https://regexp.dev/) for RegEx 🦄 - Use [Magic RegExP](https://regexp.dev/) for RegEx 🦄
- Function - Function
- User "choices" (recommended users) like Mastodon and Soapbox - User "choices" (recommended users) and featured hashtags like Mastodon and Soapbox
- Join Reason system like Mastodon/Pleroma - Join Reason system like Mastodon/Pleroma
- Option to publicize server blocks - Option to publicize server blocks
- Build flag to remove NSFW/AI stuff - More antenna options
- Filter notifications by user - Groups
- Exclude self from antenna
- Form - Form
- MFM button
- Personal notes for all accounts
- Fully revamp non-logged-in screen
- Lookup/details for post/file/server - Lookup/details for post/file/server
- [Rat mode?](https://stop.voring.me/notes/933fx97bmd) - [Rat mode?](https://stop.voring.me/notes/933fx97bmd)
## Work in progress ## Work in progress
- Weblate project
- Customizable max note length
- Link verification - Link verification
- Better Messaging UI - Better Messaging UI
- Better API Documentation - Better API Documentation
- Remote follow button - Remote follow button
- Admin custom CSS
- Add back time machine (jump to date)
- Improve accesibility - Improve accesibility
- Timeline filters - Timeline filters
- Events
- Fully revamp non-logged-in screen
## Implemented ## Implemented
@ -73,7 +70,6 @@
- Raw server info only for moderators - Raw server info only for moderators
- New spinner animation - New spinner animation
- Spinner instead of "Loading..." - Spinner instead of "Loading..."
- SearchX instead of Google
- Always signToActivityPubGet - Always signToActivityPubGet
- Spacing on group items - Spacing on group items
- Quotes have solid border - Quotes have solid border
@ -108,10 +104,6 @@
- More antenna options - More antenna options
- New dashboard - New dashboard
- Backfill follower counts - Backfill follower counts
- Improved emoji licensing
- This feature was ported from Misskey.
- https://github.com/misskey-dev/misskey/commit/8ae9d2eaa8b0842671558370f787902e94b7f5a3: enhance: カスタム絵文字にライセンス情報を付与できるように
- https://github.com/misskey-dev/misskey/commit/ed51209172441927d24339f0759a5badbee3c9b6: 絵文字のライセンスを表示できるように
- Compile time compression - Compile time compression
- Sonic search - Sonic search
- Popular color schemes, including Nord, Gruvbox, and Catppuccin - Popular color schemes, including Nord, Gruvbox, and Catppuccin
@ -133,7 +125,6 @@
## Implemented (remote) ## Implemented (remote)
- MissV: [fix Misskey Forkbomb](https://code.vtopia.live/Vtopia/MissV/commit/40b23c070bd4adbb3188c73546c6c625138fb3c1) - MissV: [fix Misskey Forkbomb](https://code.vtopia.live/Vtopia/MissV/commit/40b23c070bd4adbb3188c73546c6c625138fb3c1)
- [Make showing ads optional](https://github.com/misskey-dev/misskey/pull/8996) - [Make showing ads optional](https://github.com/misskey-dev/misskey/pull/8996)
- [Tapping avatar in mobile opens account modal](https://github.com/misskey-dev/misskey/pull/9056) - [Tapping avatar in mobile opens account modal](https://github.com/misskey-dev/misskey/pull/9056)

View File

@ -49,17 +49,26 @@
# 🥂 Links # 🥂 Links
- 💸 OpenCollective: <https://opencollective.com/Calckey> ### Want to get involved? Great!
- 💸 Liberapay: <https://liberapay.com/ThatOneCalculator>
- If you have the means to, [donations](https://opencollective.com/Calckey) are a great way to keep us going.
- If you know how to program in TypeScript, Vue, or Rust, read the [contributing](./CONTRIBUTING.md) document.
- If you know a non-English language, translating Calckey on [Weblate](https://hosted.weblate.org/engage/calckey/) help bring Calckey to more people. No technical experience needed!
- Want to write/report about us, have any professional inquiries, or just have questions to ask? Contact us [here!](https://calckey.org/contact/)
### All links
- 🌐 Homepage: <https://calckey.org>
- 💸 Donations:
- OpenCollective: <https://opencollective.com/Calckey>
- Liberapay: <https://liberapay.com/ThatOneCalculator>
- Donate publicly to get your name on the Patron list! - Donate publicly to get your name on the Patron list!
- 🚢 Flagship server: <https://calckey.social> - 🚢 Flagship server: <https://calckey.social>
- 📣 Official account: <https://i.calckey.cloud/@calckey>
- 💁 Matrix support room: <https://matrix.to/#/#calckey:matrix.fedibird.com> - 💁 Matrix support room: <https://matrix.to/#/#calckey:matrix.fedibird.com>
- 📜 Server list: <https://calckey.fediverse.observer/list> - 📣 Official account: <https://i.calckey.cloud/@calckey>
- 📖 JoinFediverse Wiki: <https://joinfediverse.wiki/What_is_Calckey%3F> - 📜 Server list: <https://calckey.org/join>
- 🐋 Docker Hub: <https://hub.docker.com/r/thatonecalculator/calckey>
- ✍️ Weblate: <https://hosted.weblate.org/engage/calckey/> - ✍️ Weblate: <https://hosted.weblate.org/engage/calckey/>
- 📦 Yunohost: <https://github.com/YunoHost-Apps/calckey_ynh> - ️️📬 Contact: <https://calckey.org/contact/>
# 🌠 Getting started # 🌠 Getting started

View File

@ -1,12 +1,12 @@
import { defineConfig } from 'cypress' import { defineConfig } from "cypress";
export default defineConfig({ export default defineConfig({
e2e: { e2e: {
// We've imported your old cypress plugins here. // We've imported your old cypress plugins here.
// You may want to clean this up later by importing these. // You may want to clean this up later by importing these.
setupNodeEvents(on, config) { setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config) return require("./cypress/plugins/index.js")(on, config);
}, },
baseUrl: 'http://localhost:61812', baseUrl: "http://localhost:61812",
}, },
}) });

View File

@ -1,4 +1,4 @@
describe('Before setup instance', () => { describe("Before setup instance", () => {
beforeEach(() => { beforeEach(() => {
cy.resetState(); cy.resetState();
}); });
@ -9,31 +9,31 @@ describe('Before setup instance', () => {
cy.wait(1000); cy.wait(1000);
}); });
it('successfully loads', () => { it("successfully loads", () => {
cy.visit('/'); cy.visit("/");
}); });
it('setup instance', () => { it("setup instance", () => {
cy.visit('/'); cy.visit("/");
cy.intercept('POST', '/api/admin/accounts/create').as('signup'); cy.intercept("POST", "/api/admin/accounts/create").as("signup");
cy.get('[data-cy-admin-username] input').type('admin'); cy.get("[data-cy-admin-username] input").type("admin");
cy.get('[data-cy-admin-password] input').type('admin1234'); cy.get("[data-cy-admin-password] input").type("admin1234");
cy.get('[data-cy-admin-ok]').click(); cy.get("[data-cy-admin-ok]").click();
// なぜか動かない // なぜか動かない
//cy.wait('@signup').should('have.property', 'response.statusCode'); //cy.wait('@signup').should('have.property', 'response.statusCode');
cy.wait('@signup'); cy.wait("@signup");
}); });
}); });
describe('After setup instance', () => { describe("After setup instance", () => {
beforeEach(() => { beforeEach(() => {
cy.resetState(); cy.resetState();
// インスタンス初期セットアップ // インスタンス初期セットアップ
cy.registerUser('admin', 'pass', true); cy.registerUser("admin", "pass", true);
}); });
afterEach(() => { afterEach(() => {
@ -42,34 +42,34 @@ describe('After setup instance', () => {
cy.wait(1000); cy.wait(1000);
}); });
it('successfully loads', () => { it("successfully loads", () => {
cy.visit('/'); cy.visit("/");
}); });
it('signup', () => { it("signup", () => {
cy.visit('/'); cy.visit("/");
cy.intercept('POST', '/api/signup').as('signup'); cy.intercept("POST", "/api/signup").as("signup");
cy.get('[data-cy-signup]').click(); cy.get("[data-cy-signup]").click();
cy.get('[data-cy-signup-username] input').type('alice'); cy.get("[data-cy-signup-username] input").type("alice");
cy.get('[data-cy-signup-password] input').type('alice1234'); cy.get("[data-cy-signup-password] input").type("alice1234");
cy.get('[data-cy-signup-password-retype] input').type('alice1234'); cy.get("[data-cy-signup-password-retype] input").type("alice1234");
cy.get('[data-cy-signup-submit]').click(); cy.get("[data-cy-signup-submit]").click();
cy.wait('@signup'); cy.wait("@signup");
}); });
}); });
describe('After user signup', () => { describe("After user signup", () => {
beforeEach(() => { beforeEach(() => {
cy.resetState(); cy.resetState();
// インスタンス初期セットアップ // インスタンス初期セットアップ
cy.registerUser('admin', 'pass', true); cy.registerUser("admin", "pass", true);
// ユーザー作成 // ユーザー作成
cy.registerUser('alice', 'alice1234'); cy.registerUser("alice", "alice1234");
}); });
afterEach(() => { afterEach(() => {
@ -78,51 +78,53 @@ describe('After user signup', () => {
cy.wait(1000); cy.wait(1000);
}); });
it('successfully loads', () => { it("successfully loads", () => {
cy.visit('/'); cy.visit("/");
}); });
it('signin', () => { it("signin", () => {
cy.visit('/'); cy.visit("/");
cy.intercept('POST', '/api/signin').as('signin'); cy.intercept("POST", "/api/signin").as("signin");
cy.get('[data-cy-signin]').click(); cy.get("[data-cy-signin]").click();
cy.get('[data-cy-signin-username] input').type('alice'); cy.get("[data-cy-signin-username] input").type("alice");
// Enterキーでサインインできるかの確認も兼ねる // Enterキーでサインインできるかの確認も兼ねる
cy.get('[data-cy-signin-password] input').type('alice1234{enter}'); cy.get("[data-cy-signin-password] input").type("alice1234{enter}");
cy.wait('@signin'); cy.wait("@signin");
}); });
it('suspend', function() { it("suspend", function () {
cy.request('POST', '/api/admin/suspend-user', { cy.request("POST", "/api/admin/suspend-user", {
i: this.admin.token, i: this.admin.token,
userId: this.alice.id, userId: this.alice.id,
}); });
cy.visit('/'); cy.visit("/");
cy.get('[data-cy-signin]').click(); cy.get("[data-cy-signin]").click();
cy.get('[data-cy-signin-username] input').type('alice'); cy.get("[data-cy-signin-username] input").type("alice");
cy.get('[data-cy-signin-password] input').type('alice1234{enter}'); cy.get("[data-cy-signin-password] input").type("alice1234{enter}");
// TODO: cypressにブラウザの言語指定できる機能が実装され次第英語のみテストするようにする // TODO: cypressにブラウザの言語指定できる機能が実装され次第英語のみテストするようにする
cy.contains(/アカウントが凍結されています|This account has been suspended due to/gi); cy.contains(
/アカウントが凍結されています|This account has been suspended due to/gi,
);
}); });
}); });
describe('After user singed in', () => { describe("After user singed in", () => {
beforeEach(() => { beforeEach(() => {
cy.resetState(); cy.resetState();
// インスタンス初期セットアップ // インスタンス初期セットアップ
cy.registerUser('admin', 'pass', true); cy.registerUser("admin", "pass", true);
// ユーザー作成 // ユーザー作成
cy.registerUser('alice', 'alice1234'); cy.registerUser("alice", "alice1234");
cy.login('alice', 'alice1234'); cy.login("alice", "alice1234");
}); });
afterEach(() => { afterEach(() => {
@ -131,16 +133,16 @@ describe('After user singed in', () => {
cy.wait(1000); cy.wait(1000);
}); });
it('successfully loads', () => { it("successfully loads", () => {
cy.get('[data-cy-open-post-form]').should('be.visible'); cy.get("[data-cy-open-post-form]").should("be.visible");
}); });
it('note', () => { it("note", () => {
cy.get('[data-cy-open-post-form]').click(); cy.get("[data-cy-open-post-form]").click();
cy.get('[data-cy-post-form-text]').type('Hello, Misskey!'); cy.get("[data-cy-post-form-text]").type("Hello, Misskey!");
cy.get('[data-cy-open-post-form-submit]').click(); cy.get("[data-cy-open-post-form-submit]").click();
cy.contains('Hello, Misskey!'); cy.contains("Hello, Misskey!");
}); });
}); });

View File

@ -1,14 +1,14 @@
describe('After user signed in', () => { describe("After user signed in", () => {
beforeEach(() => { beforeEach(() => {
cy.resetState(); cy.resetState();
cy.viewport('macbook-16'); cy.viewport("macbook-16");
// インスタンス初期セットアップ // インスタンス初期セットアップ
cy.registerUser('admin', 'pass', true); cy.registerUser("admin", "pass", true);
// ユーザー作成 // ユーザー作成
cy.registerUser('alice', 'alice1234'); cy.registerUser("alice", "alice1234");
cy.login('alice', 'alice1234'); cy.login("alice", "alice1234");
}); });
afterEach(() => { afterEach(() => {
@ -17,47 +17,47 @@ describe('After user signed in', () => {
cy.wait(1000); cy.wait(1000);
}); });
it('widget edit toggle is visible', () => { it("widget edit toggle is visible", () => {
cy.get('.mk-widget-edit').should('be.visible'); cy.get(".mk-widget-edit").should("be.visible");
}); });
it('widget select should be visible in edit mode', () => { it("widget select should be visible in edit mode", () => {
cy.get('.mk-widget-edit').click(); cy.get(".mk-widget-edit").click();
cy.get('.mk-widget-select').should('be.visible'); cy.get(".mk-widget-select").should("be.visible");
}); });
it('first widget should be removed', () => { it("first widget should be removed", () => {
cy.get('.mk-widget-edit').click(); cy.get(".mk-widget-edit").click();
cy.get('.customize-container:first-child .remove._button').click(); cy.get(".customize-container:first-child .remove._button").click();
cy.get('.customize-container').should('have.length', 2); cy.get(".customize-container").should("have.length", 2);
}); });
function buildWidgetTest(widgetName) { function buildWidgetTest(widgetName) {
it(`${widgetName} widget should get added`, () => { it(`${widgetName} widget should get added`, () => {
cy.get('.mk-widget-edit').click(); cy.get(".mk-widget-edit").click();
cy.get('.mk-widget-select select').select(widgetName, { force: true }); cy.get(".mk-widget-select select").select(widgetName, { force: true });
cy.get('.bg._modalBg.transparent').click({ multiple: true, force: true }); cy.get(".bg._modalBg.transparent").click({ multiple: true, force: true });
cy.get('.mk-widget-add').click({ force: true }); cy.get(".mk-widget-add").click({ force: true });
cy.get(`.mkw-${widgetName}`).should('exist'); cy.get(`.mkw-${widgetName}`).should("exist");
}); });
} }
buildWidgetTest('memo'); buildWidgetTest("memo");
buildWidgetTest('notifications'); buildWidgetTest("notifications");
buildWidgetTest('timeline'); buildWidgetTest("timeline");
buildWidgetTest('calendar'); buildWidgetTest("calendar");
buildWidgetTest('rss'); buildWidgetTest("rss");
buildWidgetTest('trends'); buildWidgetTest("trends");
buildWidgetTest('clock'); buildWidgetTest("clock");
buildWidgetTest('activity'); buildWidgetTest("activity");
buildWidgetTest('photos'); buildWidgetTest("photos");
buildWidgetTest('digitalClock'); buildWidgetTest("digitalClock");
buildWidgetTest('federation'); buildWidgetTest("federation");
buildWidgetTest('postForm'); buildWidgetTest("postForm");
buildWidgetTest('slideshow'); buildWidgetTest("slideshow");
buildWidgetTest('serverMetric'); buildWidgetTest("serverMetric");
buildWidgetTest('onlineUsers'); buildWidgetTest("onlineUsers");
buildWidgetTest('jobQueue'); buildWidgetTest("jobQueue");
buildWidgetTest('button'); buildWidgetTest("button");
buildWidgetTest('aiscript'); buildWidgetTest("aiscript");
}); });

View File

@ -18,4 +18,4 @@
module.exports = (on, config) => { module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits // `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config // `config` is the resolved Cypress config
} };

View File

@ -24,32 +24,34 @@
// -- This will overwrite an existing command -- // -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
Cypress.Commands.add('resetState', () => { Cypress.Commands.add("resetState", () => {
cy.window(win => { cy.window((win) => {
win.indexedDB.deleteDatabase('keyval-store'); win.indexedDB.deleteDatabase("keyval-store");
}); });
cy.request('POST', '/api/reset-db').as('reset'); cy.request("POST", "/api/reset-db").as("reset");
cy.get('@reset').its('status').should('equal', 204); cy.get("@reset").its("status").should("equal", 204);
cy.reload(true); cy.reload(true);
}); });
Cypress.Commands.add('registerUser', (username, password, isAdmin = false) => { Cypress.Commands.add("registerUser", (username, password, isAdmin = false) => {
const route = isAdmin ? '/api/admin/accounts/create' : '/api/signup'; const route = isAdmin ? "/api/admin/accounts/create" : "/api/signup";
cy.request('POST', route, { cy.request("POST", route, {
username: username, username: username,
password: password, password: password,
}).its('body').as(username); })
.its("body")
.as(username);
}); });
Cypress.Commands.add('login', (username, password) => { Cypress.Commands.add("login", (username, password) => {
cy.visit('/'); cy.visit("/");
cy.intercept('POST', '/api/signin').as('signin'); cy.intercept("POST", "/api/signin").as("signin");
cy.get('[data-cy-signin]').click(); cy.get("[data-cy-signin]").click();
cy.get('[data-cy-signin-username] input').type(username); cy.get("[data-cy-signin-username] input").type(username);
cy.get('[data-cy-signin-password] input').type(`${password}{enter}`); cy.get("[data-cy-signin-password] input").type(`${password}{enter}`);
cy.wait('@signin').as('signedIn'); cy.wait("@signin").as("signedIn");
}); });

View File

@ -14,19 +14,21 @@
// *********************************************************** // ***********************************************************
// Import commands.js using ES2015 syntax: // Import commands.js using ES2015 syntax:
import './commands' import "./commands";
// Alternatively you can use CommonJS syntax: // Alternatively you can use CommonJS syntax:
// require('./commands') // require('./commands')
Cypress.on('uncaught:exception', (err, runnable) => { Cypress.on("uncaught:exception", (err, runnable) => {
if ([ if (
[
// Chrome // Chrome
'ResizeObserver loop limit exceeded', "ResizeObserver loop limit exceeded",
// Firefox // Firefox
'ResizeObserver loop completed with undelivered notifications', "ResizeObserver loop completed with undelivered notifications",
].some(msg => err.message.includes(msg))) { ].some((msg) => err.message.includes(msg))
) {
return false; return false;
} }
}); });

5
docs/api-doc.md Normal file
View File

@ -0,0 +1,5 @@
# API Documentation
You can find interactive API documentation at any Calckey instance. https://calckey.social/api-doc
You can also find auto-generated documentation for calckey-js [here](../packages/calckey-js/markdown/calckey-js.md).

View File

@ -1,18 +1,28 @@
name: Bug Report name: 🐛 Bug Report
about: File a bug report about: File a bug report
title: "[Bug]: " title: "[Bug]: "
blank_issues_enabled: true
contact_links:
- name: 💁 Support Matrix
url: https://matrix.to/#/%23calckey:matrix.fedibird.com
about: Having trouble with deployment? Ask the support chat.
- name: 🔒 Resposible Disclosure
url: https://codeberg.org/calckey/calckey/src/branch/develop/SECURITY.md
about: Found a security vulnerability? Please disclose it responsibly.
body: body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Thanks for taking the time to fill out this bug report! 💖 Thanks for taking the time to fill out this bug report!
💁 Having trouble with deployment? [Ask the support chat.](https://matrix.to/#/%23calckey:matrix.fedibird.com)
🔒 Found a security vulnerability? [Please disclose it responsibly.](https://codeberg.org/calckey/calckey/src/branch/develop/SECURITY.md)
🤝 By submitting this issue, you agree to follow our [Contribution Guidelines.](https://codeberg.org/calckey/calckey/src/branch/develop/CONTRIBUTING.md)
- type: textarea - type: textarea
id: what-happened id: what-happened
attributes: attributes:
label: What happened? label: What happened?
description: Please give us a brief description of what happened. description: Please give us a brief description of what happened.
placeholder: Tell us what you see! placeholder: Tell us what you see!
value: "A bug happened!"
validations: validations:
required: true required: true
- type: textarea - type: textarea
@ -21,7 +31,6 @@ body:
label: What did you expect to happen? label: What did you expect to happen?
description: Please give us a brief description of what you expected to happen. description: Please give us a brief description of what you expected to happen.
placeholder: Tell us what you wish happened! placeholder: Tell us what you wish happened!
value: "Instead of x, y should happen instead!"
validations: validations:
required: true required: true
- type: input - type: input
@ -29,7 +38,7 @@ body:
attributes: attributes:
label: Version label: Version
description: What version of calckey is your instance running? You can find this by clicking your instance's logo at the bottom left and then clicking instance information. description: What version of calckey is your instance running? You can find this by clicking your instance's logo at the bottom left and then clicking instance information.
placeholder: Calckey Version 13.0.4 placeholder: v13.1.4.1
validations: validations:
required: true required: true
- type: input - type: input
@ -37,15 +46,26 @@ body:
attributes: attributes:
label: Instance label: Instance
description: What instance of calckey are you using? description: What instance of calckey are you using?
placeholder: stop.voring.me placeholder: calckey.social
validations: validations:
required: false required: false
- type: dropdown - type: dropdown
id: browsers id: issue-type
attributes: attributes:
label: What browser are you using? label: What type of issue is this?
description: If this happens on your device and has to do with the user interface, it's client-side. If this happens on either with the API or the backend, or you got a server-side error in the client, it's server-side.
multiple: false multiple: false
options: options:
- Client-side
- Server-side
- Other (Please Specify)
- type: dropdown
id: browsers
attributes:
label: What browser are you using? (Client-side issues only)
multiple: false
options:
- N/A
- Firefox - Firefox
- Chrome - Chrome
- Brave - Brave
@ -54,6 +74,50 @@ body:
- Safari - Safari
- Microsoft Edge - Microsoft Edge
- Other (Please Specify) - Other (Please Specify)
- type: dropdown
id: device
attributes:
label: What operating system are you using? (Client-side issues only)
multiple: false
options:
- N/A
- Windows
- MacOS
- Linux
- Android
- iOS
- Other (Please Specify)
- type: dropdown
id: deplotment-method
attributes:
label: How do you deploy Calckey on your server? (Server-side issues only)
multiple: false
options:
- N/A
- Manual
- Ubuntu Install Script
- Docker Compose
- Docker Prebuilt Image
- Helm Chart
- YunoHost
- AUR Package
- Other (Please Specify)
- type: dropdown
id: operating-system
attributes:
label: What operating system are you using? (Server-side issues only)
multiple: false
options:
- N/A
- Ubuntu >= 22.04
- Ubuntu < 22.04
- Debian
- Arch
- RHEL (CentOS/AlmaLinux/Rocky Linux)
- FreeBSD
- OpenBSD
- Android
- Other (Please Specify)
- type: textarea - type: textarea
id: logs id: logs
attributes: attributes:

View File

@ -1,18 +1,28 @@
name: Feature Request name: Feature Request
about: Request a Feature about: Request a Feature
title: "[Feature]: " title: "[Feature]: "
blank_issues_enabled: true
contact_links:
- name: 💁 Support Matrix
url: https://matrix.to/#/%23calckey:matrix.fedibird.com
about: Having trouble with deployment? Ask the support chat.
- name: 🔒 Resposible Disclosure
url: https://codeberg.org/calckey/calckey/src/branch/develop/SECURITY.md
about: Found a security vulnerability? Please disclose it responsibly.
body: body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Thanks for taking the time to fill out this feature request! 💖 Thanks for taking the time to fill out this feature request!
💁 Having trouble with deployment? [Ask the support chat.](https://matrix.to/#/%23calckey:matrix.fedibird.com)
🔒 Found a security vulnerability? [Please disclose it responsibly.](https://codeberg.org/calckey/calckey/src/branch/develop/SECURITY.md)
🤝 By submitting this issue, you agree to follow our [Contribution Guidelines.](https://codeberg.org/calckey/calckey/src/branch/develop/CONTRIBUTING.md)
- type: textarea - type: textarea
id: what-feature id: what-feature
attributes: attributes:
label: What feature would you like implemented? label: What feature would you like implemented?
description: Please give us a brief description of what you'd like. description: Please give us a brief description of what you'd like.
placeholder: Tell us what you want! placeholder: Tell us what you want!
value: "x feature would be great!"
validations: validations:
required: true required: true
- type: textarea - type: textarea
@ -21,7 +31,6 @@ body:
label: Why should we add this feature? label: Why should we add this feature?
description: Please give us a brief description of why your feature is important. description: Please give us a brief description of why your feature is important.
placeholder: Tell us why you want this feature! placeholder: Tell us why you want this feature!
value: "x feature is super useful because y!"
validations: validations:
required: true required: true
- type: input - type: input
@ -29,7 +38,7 @@ body:
attributes: attributes:
label: Version label: Version
description: What version of calckey is your instance running? You can find this by clicking your instance's logo at the bottom left and then clicking instance information. description: What version of calckey is your instance running? You can find this by clicking your instance's logo at the bottom left and then clicking instance information.
placeholder: Calckey Version 13.0.4 placeholder: Calckey Version 13.1.4.1
validations: validations:
required: true required: true
- type: input - type: input
@ -37,7 +46,7 @@ body:
attributes: attributes:
label: Instance label: Instance
description: What instance of calckey are you using? description: What instance of calckey are you using?
placeholder: stop.voring.me placeholder: calckey.social
validations: validations:
required: false required: false
- type: checkboxes - type: checkboxes

View File

@ -1668,9 +1668,9 @@ popout: Apareixa
volume: Volum volume: Volum
objectStorageUseSSLDesc: Desactiva això si no fas servir HTTPS per les connexions objectStorageUseSSLDesc: Desactiva això si no fas servir HTTPS per les connexions
API API
objectStorageUseProxy: Conectarse mitjançant un Proxy objectStorageUseProxy: Connectar-se mitjançant un Proxy
objectStorageUseProxyDesc: Desactiva això si no faràs servir un servidor Proxy per objectStorageUseProxyDesc: Desactiva això si no faràs servir un servidor Proxy per
conexions API conexions amb l'API
objectStorageSetPublicRead: Fixar com a "public-read" al pujar objectStorageSetPublicRead: Fixar com a "public-read" al pujar
serverLogs: Registres del servidor serverLogs: Registres del servidor
deleteAll: Esborrar tot deleteAll: Esborrar tot
@ -2131,3 +2131,4 @@ _dialog:
{max}" {max}"
charactersBelow: 'No hi ha caràcters suficients! Corrent: {current}/Limit: {min}' charactersBelow: 'No hi ha caràcters suficients! Corrent: {current}/Limit: {min}'
removeReaction: Elimina la teva reacció removeReaction: Elimina la teva reacció
reactionPickerSkinTone: To de pell d'emoji preferit

View File

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "14.0.0-dev51", "version": "14.0.0-dev52",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",
@ -9,8 +9,8 @@
"packageManager": "pnpm@8.6.3", "packageManager": "pnpm@8.6.3",
"private": true, "private": true,
"scripts": { "scripts": {
"rebuild": "pnpm run clean && pnpm -r run build && pnpm run gulp", "rebuild": "pnpm run clean && pnpm node ./scripts/build-greet.js && pnpm -r run build && pnpm run gulp",
"build": "pnpm -r run build && pnpm run gulp", "build": "pnpm node ./scripts/build-greet.js && pnpm -r run build && pnpm run gulp",
"start": "pnpm --filter backend run start", "start": "pnpm --filter backend run start",
"start:test": "pnpm --filter backend run start:test", "start:test": "pnpm --filter backend run start:test",
"init": "pnpm run migrate", "init": "pnpm run migrate",
@ -46,6 +46,7 @@
"devDependencies": { "devDependencies": {
"@types/gulp": "4.0.10", "@types/gulp": "4.0.10",
"@types/gulp-rename": "2.0.1", "@types/gulp-rename": "2.0.1",
"chalk": "4.1.2",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"cypress": "10.11.0", "cypress": "10.11.0",
"execa": "5.1.1", "execa": "5.1.1",

9
packages/README.md Normal file
View File

@ -0,0 +1,9 @@
# 📦 Packages
This directory contains all of the packages Calckey uses.
- `backend`: Main backend code written in TypeScript for NodeJS
- `backend/native-utils`: Backend code written in Rust, bound to NodeJS by [NAPI-RS](https://napi.rs/)
- `client`: Web interface written in Vue3 and TypeScript
- `sw`: Web [Service Worker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) written in TypeScript
- `calckey-js`: TypeScript SDK for both backend and client, also published on [NPM](https://www.npmjs.com/package/calckey-js) for public use

View File

@ -36,7 +36,7 @@
"artifacts": "napi artifacts", "artifacts": "napi artifacts",
"build": "pnpm run build:napi && pnpm run build:migration", "build": "pnpm run build:napi && pnpm run build:migration",
"build:napi": "napi build --features napi --platform --release ./built/", "build:napi": "napi build --features napi --platform --release ./built/",
"build:migration": "cargo build --locked --release --manifest-path ./migration/Cargo.toml && cp -v ./target/release/migration ./built/migration", "build:migration": "cargo build --locked --release --manifest-path ./migration/Cargo.toml && cp ./target/release/migration ./built/migration",
"build:debug": "napi build --platform ./built/ && cargo build --manifest-path ./migration/Cargo.toml", "build:debug": "napi build --platform ./built/ && cargo build --manifest-path ./migration/Cargo.toml",
"prepublishOnly": "napi prepublish -t npm", "prepublishOnly": "napi prepublish -t npm",
"test": "pnpm run cargo:test && pnpm run build:napi && ava", "test": "pnpm run cargo:test && pnpm run build:napi && ava",

View File

@ -527,9 +527,12 @@ export default define(meta, paramDef, async (ps, user) => {
if (ps.text !== note.text) { if (ps.text !== note.text) {
update.text = ps.text; update.text = ps.text;
} }
if (ps.cw !== note.cw) { if (ps.cw !== note.cw || (ps.cw && !note.cw)) {
update.cw = ps.cw; update.cw = ps.cw;
} }
if (!ps.cw && note.cw) {
update.cw = null;
}
if (ps.visibility !== note.visibility) { if (ps.visibility !== note.visibility) {
update.visibility = ps.visibility; update.visibility = ps.visibility;
} }

View File

@ -465,26 +465,48 @@ export default async (
if (!note.uri) { if (!note.uri) {
// Publish if the post is local // Publish if the post is local
publishNotesStream(note); publishNotesStream(note);
} else if ( } else if (boostedByRelay && data.renote?.uri) {
boostedByRelay && // Use Redis transaction for atomicity
data.renote?.uri && await redisClient.watch(`publishedNote:${data.renote.uri}`);
(await redisClient.exists(`publishedNote:${data.renote.uri}`)) === 0 const exists = await redisClient.exists(
) { `publishedNote:${data.renote.uri}`,
// Publish if the post was boosted by a relay and not yet published. );
publishNotesStream(data.renote); if (exists === 0) {
// Start the transaction
const transaction = redisClient.multi();
const key = `publishedNote:${data.renote.uri}`; const key = `publishedNote:${data.renote.uri}`;
await redisClient.set(key, 1, "EX", 30); transaction.set(key, 1, "EX", 30);
} else if ( // Execute the transaction
!boostedByRelay && transaction.exec((err, replies) => {
note.uri && // Publish after setting the key in Redis
(await redisClient.exists(`publishedNote:${note.uri}`)) === 0 if (!err && data.renote) {
) { publishNotesStream(data.renote);
// Publish if the post came directly from a remote server, or from a }
// relay that doesn't boost the post (e.g, YUKIMOCHI Activity-Relay), });
// and not yet published. } else {
// Abort the transaction
redisClient.unwatch();
}
} else if (!boostedByRelay && note.uri) {
// Use Redis transaction for atomicity
await redisClient.watch(`publishedNote:${note.uri}`);
const exists = await redisClient.exists(`publishedNote:${note.uri}`);
if (exists === 0) {
// Start the transaction
const transaction = redisClient.multi();
const key = `publishedNote:${note.uri}`; const key = `publishedNote:${note.uri}`;
transaction.set(key, 1, "EX", 30);
// Execute the transaction
transaction.exec((err, replies) => {
// Publish after setting the key in Redis
if (!err) {
publishNotesStream(note); publishNotesStream(note);
await redisClient.set(key, 1, "EX", 30); }
});
} else {
// Abort the transaction
redisClient.unwatch();
}
} }
} }
if (note.replyId != null) { if (note.replyId != null) {

View File

@ -0,0 +1,20 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript",
"dynamicImport": true,
"decorators": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"target": "es2022"
},
"minify": false,
"module": {
"type": "commonjs",
"strict": true
}
}

View File

@ -4,4 +4,6 @@ Fork of Misskey.js for Calckey
https://www.npmjs.com/package/calckey-js https://www.npmjs.com/package/calckey-js
To fully build, run `pnpm i && pnpm run render`.
![Parody of the Javascript logo with "CK" instead of "JS"](https://codeberg.org/repo-avatars/80771-4d86135f67b9a460cdd1be9e91648e5f) ![Parody of the Javascript logo with "CK" instead of "JS"](https://codeberg.org/repo-avatars/80771-4d86135f67b9a460cdd1be9e91648e5f)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [Acct](./calckey-js.acct.md)
## Acct type
**Signature:**
```typescript
export declare type Acct = {
username: string;
host: string | null;
};
```

View File

@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [api](./calckey-js.api.md) &gt; [APIClient](./calckey-js.api.apiclient.md) &gt; [(constructor)](./calckey-js.api.apiclient._constructor_.md)
## api.APIClient.(constructor)
Constructs a new instance of the `APIClient` class
**Signature:**
```typescript
constructor(opts: {
origin: APIClient["origin"];
credential?: APIClient["credential"];
fetch?: APIClient["fetch"] | null | undefined;
});
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| opts | { origin: [APIClient](./calckey-js.api.apiclient.md)<!-- -->\["origin"\]; credential?: [APIClient](./calckey-js.api.apiclient.md)<!-- -->\["credential"\]; fetch?: [APIClient](./calckey-js.api.apiclient.md)<!-- -->\["fetch"\] \| null \| undefined; } | |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [api](./calckey-js.api.md) &gt; [APIClient](./calckey-js.api.apiclient.md) &gt; [credential](./calckey-js.api.apiclient.credential.md)
## api.APIClient.credential property
**Signature:**
```typescript
credential: string | null | undefined;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [api](./calckey-js.api.md) &gt; [APIClient](./calckey-js.api.apiclient.md) &gt; [fetch](./calckey-js.api.apiclient.fetch.md)
## api.APIClient.fetch property
**Signature:**
```typescript
fetch: FetchLike;
```

View File

@ -0,0 +1,32 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [api](./calckey-js.api.md) &gt; [APIClient](./calckey-js.api.apiclient.md)
## api.APIClient class
**Signature:**
```typescript
export declare class APIClient
```
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(opts)](./calckey-js.api.apiclient._constructor_.md) | | Constructs a new instance of the <code>APIClient</code> class |
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [credential](./calckey-js.api.apiclient.credential.md) | | string \| null \| undefined | |
| [fetch](./calckey-js.api.apiclient.fetch.md) | | [FetchLike](./calckey-js.api.fetchlike.md) | |
| [origin](./calckey-js.api.apiclient.origin.md) | | string | |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [request(endpoint, params, credential)](./calckey-js.api.apiclient.request.md) | | |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [api](./calckey-js.api.md) &gt; [APIClient](./calckey-js.api.apiclient.md) &gt; [origin](./calckey-js.api.apiclient.origin.md)
## api.APIClient.origin property
**Signature:**
```typescript
origin: string;
```

View File

@ -0,0 +1,57 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [api](./calckey-js.api.md) &gt; [APIClient](./calckey-js.api.apiclient.md) &gt; [request](./calckey-js.api.apiclient.request.md)
## api.APIClient.request() method
**Signature:**
```typescript
request<E extends keyof Endpoints, P extends Endpoints[E]["req"]>(
endpoint: E,
params?: P,
credential?: string | null | undefined,
): Promise<
Endpoints[E]["res"] extends {
$switch: {
$cases: [any, any][];
$default: any;
};
}
? IsCaseMatched<E, P, 0> extends true
? GetCaseResult<E, P, 0>
: IsCaseMatched<E, P, 1> extends true
? GetCaseResult<E, P, 1>
: IsCaseMatched<E, P, 2> extends true
? GetCaseResult<E, P, 2>
: IsCaseMatched<E, P, 3> extends true
? GetCaseResult<E, P, 3>
: IsCaseMatched<E, P, 4> extends true
? GetCaseResult<E, P, 4>
: IsCaseMatched<E, P, 5> extends true
? GetCaseResult<E, P, 5>
: IsCaseMatched<E, P, 6> extends true
? GetCaseResult<E, P, 6>
: IsCaseMatched<E, P, 7> extends true
? GetCaseResult<E, P, 7>
: IsCaseMatched<E, P, 8> extends true
? GetCaseResult<E, P, 8>
: IsCaseMatched<E, P, 9> extends true
? GetCaseResult<E, P, 9>
: Endpoints[E]["res"]["$switch"]["$default"]
: Endpoints[E]["res"]
>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| endpoint | E | |
| params | P | _(Optional)_ |
| credential | string \| null \| undefined | _(Optional)_ |
**Returns:**
Promise&lt; [Endpoints](./calckey-js.endpoints.md)<!-- -->\[E\]\["res"\] extends { $switch: { $cases: \[any, any\]\[\]; $default: any; }; } ? IsCaseMatched&lt;E, P, 0&gt; extends true ? GetCaseResult&lt;E, P, 0&gt; : IsCaseMatched&lt;E, P, 1&gt; extends true ? GetCaseResult&lt;E, P, 1&gt; : IsCaseMatched&lt;E, P, 2&gt; extends true ? GetCaseResult&lt;E, P, 2&gt; : IsCaseMatched&lt;E, P, 3&gt; extends true ? GetCaseResult&lt;E, P, 3&gt; : IsCaseMatched&lt;E, P, 4&gt; extends true ? GetCaseResult&lt;E, P, 4&gt; : IsCaseMatched&lt;E, P, 5&gt; extends true ? GetCaseResult&lt;E, P, 5&gt; : IsCaseMatched&lt;E, P, 6&gt; extends true ? GetCaseResult&lt;E, P, 6&gt; : IsCaseMatched&lt;E, P, 7&gt; extends true ? GetCaseResult&lt;E, P, 7&gt; : IsCaseMatched&lt;E, P, 8&gt; extends true ? GetCaseResult&lt;E, P, 8&gt; : IsCaseMatched&lt;E, P, 9&gt; extends true ? GetCaseResult&lt;E, P, 9&gt; : [Endpoints](./calckey-js.endpoints.md)<!-- -->\[E\]\["res"\]\["$switch"\]\["$default"\] : [Endpoints](./calckey-js.endpoints.md)<!-- -->\[E\]\["res"\] &gt;

View File

@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [api](./calckey-js.api.md) &gt; [APIError](./calckey-js.api.apierror.md)
## api.APIError type
**Signature:**
```typescript
export declare type APIError = {
id: string;
code: string;
message: string;
kind: "client" | "server";
info: Record<string, any>;
};
```

View File

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [api](./calckey-js.api.md) &gt; [FetchLike](./calckey-js.api.fetchlike.md)
## api.FetchLike type
**Signature:**
```typescript
export declare type FetchLike = (
input: string,
init?: {
method?: string;
body?: string;
credentials?: RequestCredentials;
cache?: RequestCache;
},
) => Promise<{
status: number;
json(): Promise<any>;
}>;
```

View File

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [api](./calckey-js.api.md) &gt; [isAPIError](./calckey-js.api.isapierror.md)
## api.isAPIError() function
**Signature:**
```typescript
export declare function isAPIError(reason: any): reason is APIError;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| reason | any | |
**Returns:**
reason is [APIError](./calckey-js.api.apierror.md)

View File

@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [api](./calckey-js.api.md)
## api namespace
## Classes
| Class | Description |
| --- | --- |
| [APIClient](./calckey-js.api.apiclient.md) | |
## Functions
| Function | Description |
| --- | --- |
| [isAPIError(reason)](./calckey-js.api.isapierror.md) | |
## Type Aliases
| Type Alias | Description |
| --- | --- |
| [APIError](./calckey-js.api.apierror.md) | |
| [FetchLike](./calckey-js.api.fetchlike.md) | |

View File

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ChannelConnection](./calckey-js.channelconnection.md) &gt; [(constructor)](./calckey-js.channelconnection._constructor_.md)
## ChannelConnection.(constructor)
Constructs a new instance of the `Connection` class
**Signature:**
```typescript
constructor(stream: Stream, channel: string, name?: string);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| stream | [Stream](./calckey-js.stream.md) | |
| channel | string | |
| name | string | _(Optional)_ |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ChannelConnection](./calckey-js.channelconnection.md) &gt; [channel](./calckey-js.channelconnection.channel.md)
## ChannelConnection.channel property
**Signature:**
```typescript
channel: string;
```

View File

@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ChannelConnection](./calckey-js.channelconnection.md) &gt; [dispose](./calckey-js.channelconnection.dispose.md)
## ChannelConnection.dispose() method
**Signature:**
```typescript
abstract dispose(): void;
```
**Returns:**
void

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ChannelConnection](./calckey-js.channelconnection.md) &gt; [id](./calckey-js.channelconnection.id.md)
## ChannelConnection.id property
**Signature:**
```typescript
abstract id: string;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ChannelConnection](./calckey-js.channelconnection.md) &gt; [inCount](./calckey-js.channelconnection.incount.md)
## ChannelConnection.inCount property
**Signature:**
```typescript
inCount: number;
```

View File

@ -0,0 +1,39 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ChannelConnection](./calckey-js.channelconnection.md)
## ChannelConnection class
**Signature:**
```typescript
export declare abstract class Connection<
Channel extends AnyOf<Channels> = any,
> extends EventEmitter<Channel["events"]>
```
**Extends:** EventEmitter&lt;Channel\["events"\]&gt;
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(stream, channel, name)](./calckey-js.channelconnection._constructor_.md) | | Constructs a new instance of the <code>Connection</code> class |
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [channel](./calckey-js.channelconnection.channel.md) | | string | |
| [id](./calckey-js.channelconnection.id.md) | <code>abstract</code> | string | |
| [inCount](./calckey-js.channelconnection.incount.md) | | number | |
| [name?](./calckey-js.channelconnection.name.md) | | string | _(Optional)_ |
| [outCount](./calckey-js.channelconnection.outcount.md) | | number | |
| [stream](./calckey-js.channelconnection.stream.md) | <code>protected</code> | [Stream](./calckey-js.stream.md) | |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [dispose()](./calckey-js.channelconnection.dispose.md) | <code>abstract</code> | |
| [send(type, body)](./calckey-js.channelconnection.send.md) | | |

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ChannelConnection](./calckey-js.channelconnection.md) &gt; [name](./calckey-js.channelconnection.name.md)
## ChannelConnection.name property
**Signature:**
```typescript
name?: string;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ChannelConnection](./calckey-js.channelconnection.md) &gt; [outCount](./calckey-js.channelconnection.outcount.md)
## ChannelConnection.outCount property
**Signature:**
```typescript
outCount: number;
```

View File

@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ChannelConnection](./calckey-js.channelconnection.md) &gt; [send](./calckey-js.channelconnection.send.md)
## ChannelConnection.send() method
**Signature:**
```typescript
send<T extends keyof Channel["receives"]>(
type: T,
body: Channel["receives"][T],
): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| type | T | |
| body | Channel\["receives"\]\[T\] | |
**Returns:**
void

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ChannelConnection](./calckey-js.channelconnection.md) &gt; [stream](./calckey-js.channelconnection.stream.md)
## ChannelConnection.stream property
**Signature:**
```typescript
protected stream: Stream;
```

View File

@ -0,0 +1,143 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [Channels](./calckey-js.channels.md)
## Channels type
**Signature:**
```typescript
export declare type Channels = {
main: {
params: null;
events: {
notification: (payload: Notification) => void;
mention: (payload: Note) => void;
reply: (payload: Note) => void;
renote: (payload: Note) => void;
follow: (payload: User) => void;
followed: (payload: User) => void;
unfollow: (payload: User) => void;
meUpdated: (payload: MeDetailed) => void;
pageEvent: (payload: PageEvent) => void;
urlUploadFinished: (payload: {
marker: string;
file: DriveFile;
}) => void;
readAllNotifications: () => void;
unreadNotification: (payload: Notification) => void;
unreadMention: (payload: Note["id"]) => void;
readAllUnreadMentions: () => void;
unreadSpecifiedNote: (payload: Note["id"]) => void;
readAllUnreadSpecifiedNotes: () => void;
readAllMessagingMessages: () => void;
messagingMessage: (payload: MessagingMessage) => void;
unreadMessagingMessage: (payload: MessagingMessage) => void;
readAllAntennas: () => void;
unreadAntenna: (payload: Antenna) => void;
readAllAnnouncements: () => void;
readAllChannels: () => void;
unreadChannel: (payload: Note["id"]) => void;
myTokenRegenerated: () => void;
reversiNoInvites: () => void;
reversiInvited: (payload: FIXME) => void;
signin: (payload: FIXME) => void;
registryUpdated: (payload: {
scope?: string[];
key: string;
value: any | null;
}) => void;
driveFileCreated: (payload: DriveFile) => void;
readAntenna: (payload: Antenna) => void;
};
receives: null;
};
homeTimeline: {
params: null;
events: {
note: (payload: Note) => void;
};
receives: null;
};
localTimeline: {
params: null;
events: {
note: (payload: Note) => void;
};
receives: null;
};
hybridTimeline: {
params: null;
events: {
note: (payload: Note) => void;
};
receives: null;
};
recommendedTimeline: {
params: null;
events: {
note: (payload: Note) => void;
};
receives: null;
};
globalTimeline: {
params: null;
events: {
note: (payload: Note) => void;
};
receives: null;
};
antenna: {
params: {
antennaId: Antenna["id"];
};
events: {
note: (payload: Note) => void;
};
receives: null;
};
messaging: {
params: {
otherparty?: User["id"] | null;
group?: UserGroup["id"] | null;
};
events: {
message: (payload: MessagingMessage) => void;
deleted: (payload: MessagingMessage["id"]) => void;
read: (payload: MessagingMessage["id"][]) => void;
typers: (payload: User[]) => void;
};
receives: {
read: {
id: MessagingMessage["id"];
};
};
};
serverStats: {
params: null;
events: {
stats: (payload: FIXME) => void;
};
receives: {
requestLog: {
id: string | number;
length: number;
};
};
};
queueStats: {
params: null;
events: {
stats: (payload: FIXME) => void;
};
receives: {
requestLog: {
id: string | number;
length: number;
};
};
};
};
```
**References:** [Note](./calckey-js.entities.note.md)<!-- -->, [User](./calckey-js.entities.user.md)<!-- -->, [MeDetailed](./calckey-js.entities.medetailed.md)<!-- -->, [PageEvent](./calckey-js.entities.pageevent.md)<!-- -->, [DriveFile](./calckey-js.entities.drivefile.md)<!-- -->, [MessagingMessage](./calckey-js.entities.messagingmessage.md)<!-- -->, [Antenna](./calckey-js.entities.antenna.md)<!-- -->, [UserGroup](./calckey-js.entities.usergroup.md)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Ad](./calckey-js.entities.ad.md)
## entities.Ad type
**Signature:**
```typescript
export declare type Ad = TODO;
```

View File

@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Announcement](./calckey-js.entities.announcement.md)
## entities.Announcement type
**Signature:**
```typescript
export declare type Announcement = {
id: ID;
createdAt: DateString;
updatedAt: DateString | null;
text: string;
title: string;
imageUrl: string | null;
isRead?: boolean;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)

View File

@ -0,0 +1,29 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Antenna](./calckey-js.entities.antenna.md)
## entities.Antenna type
**Signature:**
```typescript
export declare type Antenna = {
id: ID;
createdAt: DateString;
name: string;
keywords: string[][];
excludeKeywords: string[][];
src: "home" | "all" | "users" | "list" | "group" | "instances";
userListId: ID | null;
userGroupId: ID | null;
users: string[];
instances: string[];
caseSensitive: boolean;
notify: boolean;
withReplies: boolean;
withFile: boolean;
hasUnreadNote: boolean;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [App](./calckey-js.entities.app.md)
## entities.App type
**Signature:**
```typescript
export declare type App = TODO;
```

View File

@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [AuthSession](./calckey-js.entities.authsession.md)
## entities.AuthSession type
**Signature:**
```typescript
export declare type AuthSession = {
id: ID;
app: App;
token: string;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [App](./calckey-js.entities.app.md)

View File

@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Blocking](./calckey-js.entities.blocking.md)
## entities.Blocking type
**Signature:**
```typescript
export declare type Blocking = {
id: ID;
createdAt: DateString;
blockeeId: User["id"];
blockee: UserDetailed;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)<!-- -->, [User](./calckey-js.entities.user.md)<!-- -->, [UserDetailed](./calckey-js.entities.userdetailed.md)

View File

@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Channel](./calckey-js.entities.channel.md)
## entities.Channel type
**Signature:**
```typescript
export declare type Channel = {
id: ID;
};
```
**References:** [ID](./calckey-js.entities.id.md)

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Clip](./calckey-js.entities.clip.md)
## entities.Clip type
**Signature:**
```typescript
export declare type Clip = TODO;
```

View File

@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [CustomEmoji](./calckey-js.entities.customemoji.md)
## entities.CustomEmoji type
**Signature:**
```typescript
export declare type CustomEmoji = {
id: string;
name: string;
url: string;
category: string;
aliases: string[];
};
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [DateString](./calckey-js.entities.datestring.md)
## entities.DateString type
**Signature:**
```typescript
export declare type DateString = string;
```

View File

@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [DetailedInstanceMetadata](./calckey-js.entities.detailedinstancemetadata.md)
## entities.DetailedInstanceMetadata type
**Signature:**
```typescript
export declare type DetailedInstanceMetadata = LiteInstanceMetadata & {
features: Record<string, any>;
};
```
**References:** [LiteInstanceMetadata](./calckey-js.entities.liteinstancemetadata.md)

View File

@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [DriveFile](./calckey-js.entities.drivefile.md)
## entities.DriveFile type
**Signature:**
```typescript
export declare type DriveFile = {
id: ID;
createdAt: DateString;
isSensitive: boolean;
name: string;
thumbnailUrl: string;
url: string;
type: string;
size: number;
md5: string;
blurhash: string;
comment: string | null;
properties: Record<string, any>;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [DriveFolder](./calckey-js.entities.drivefolder.md)
## entities.DriveFolder type
**Signature:**
```typescript
export declare type DriveFolder = TODO;
```

View File

@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Following](./calckey-js.entities.following.md)
## entities.Following type
**Signature:**
```typescript
export declare type Following = {
id: ID;
createdAt: DateString;
followerId: User["id"];
followeeId: User["id"];
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)<!-- -->, [User](./calckey-js.entities.user.md)

View File

@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [FollowingFolloweePopulated](./calckey-js.entities.followingfolloweepopulated.md)
## entities.FollowingFolloweePopulated type
**Signature:**
```typescript
export declare type FollowingFolloweePopulated = Following & {
followee: UserDetailed;
};
```
**References:** [Following](./calckey-js.entities.following.md)<!-- -->, [UserDetailed](./calckey-js.entities.userdetailed.md)

View File

@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [FollowingFollowerPopulated](./calckey-js.entities.followingfollowerpopulated.md)
## entities.FollowingFollowerPopulated type
**Signature:**
```typescript
export declare type FollowingFollowerPopulated = Following & {
follower: UserDetailed;
};
```
**References:** [Following](./calckey-js.entities.following.md)<!-- -->, [UserDetailed](./calckey-js.entities.userdetailed.md)

View File

@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [FollowRequest](./calckey-js.entities.followrequest.md)
## entities.FollowRequest type
**Signature:**
```typescript
export declare type FollowRequest = {
id: ID;
follower: User;
followee: User;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [User](./calckey-js.entities.user.md)

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [GalleryPost](./calckey-js.entities.gallerypost.md)
## entities.GalleryPost type
**Signature:**
```typescript
export declare type GalleryPost = TODO;
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [ID](./calckey-js.entities.id.md)
## entities.ID type
**Signature:**
```typescript
export declare type ID = string;
```

View File

@ -0,0 +1,40 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Instance](./calckey-js.entities.instance.md)
## entities.Instance type
**Signature:**
```typescript
export declare type Instance = {
id: ID;
caughtAt: DateString;
host: string;
usersCount: number;
notesCount: number;
followingCount: number;
followersCount: number;
driveUsage: number;
driveFiles: number;
latestRequestSentAt: DateString | null;
latestStatus: number | null;
latestRequestReceivedAt: DateString | null;
lastCommunicatedAt: DateString;
isNotResponding: boolean;
isSuspended: boolean;
softwareName: string | null;
softwareVersion: string | null;
openRegistrations: boolean | null;
name: string | null;
description: string | null;
maintainerName: string | null;
maintainerEmail: string | null;
iconUrl: string | null;
faviconUrl: string | null;
themeColor: string | null;
infoUpdatedAt: DateString | null;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)

View File

@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [InstanceMetadata](./calckey-js.entities.instancemetadata.md)
## entities.InstanceMetadata type
**Signature:**
```typescript
export declare type InstanceMetadata =
| LiteInstanceMetadata
| DetailedInstanceMetadata;
```
**References:** [LiteInstanceMetadata](./calckey-js.entities.liteinstancemetadata.md)<!-- -->, [DetailedInstanceMetadata](./calckey-js.entities.detailedinstancemetadata.md)

View File

@ -0,0 +1,46 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [LiteInstanceMetadata](./calckey-js.entities.liteinstancemetadata.md)
## entities.LiteInstanceMetadata type
**Signature:**
```typescript
export declare type LiteInstanceMetadata = {
maintainerName: string | null;
maintainerEmail: string | null;
version: string;
name: string | null;
uri: string;
description: string | null;
tosUrl: string | null;
disableRegistration: boolean;
disableLocalTimeline: boolean;
disableRecommendedTimeline: boolean;
disableGlobalTimeline: boolean;
driveCapacityPerLocalUserMb: number;
driveCapacityPerRemoteUserMb: number;
enableHcaptcha: boolean;
hcaptchaSiteKey: string | null;
enableRecaptcha: boolean;
recaptchaSiteKey: string | null;
swPublickey: string | null;
maxNoteTextLength: number;
enableEmail: boolean;
enableTwitterIntegration: boolean;
enableGithubIntegration: boolean;
enableDiscordIntegration: boolean;
enableServiceWorker: boolean;
emojis: CustomEmoji[];
ads: {
id: ID;
ratio: number;
place: string;
url: string;
imageUrl: string;
}[];
};
```
**References:** [CustomEmoji](./calckey-js.entities.customemoji.md)<!-- -->, [ID](./calckey-js.entities.id.md)

View File

@ -0,0 +1,51 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md)
## entities namespace
## Type Aliases
| Type Alias | Description |
| --- | --- |
| [Ad](./calckey-js.entities.ad.md) | |
| [Announcement](./calckey-js.entities.announcement.md) | |
| [Antenna](./calckey-js.entities.antenna.md) | |
| [App](./calckey-js.entities.app.md) | |
| [AuthSession](./calckey-js.entities.authsession.md) | |
| [Blocking](./calckey-js.entities.blocking.md) | |
| [Channel](./calckey-js.entities.channel.md) | |
| [Clip](./calckey-js.entities.clip.md) | |
| [CustomEmoji](./calckey-js.entities.customemoji.md) | |
| [DateString](./calckey-js.entities.datestring.md) | |
| [DetailedInstanceMetadata](./calckey-js.entities.detailedinstancemetadata.md) | |
| [DriveFile](./calckey-js.entities.drivefile.md) | |
| [DriveFolder](./calckey-js.entities.drivefolder.md) | |
| [Following](./calckey-js.entities.following.md) | |
| [FollowingFolloweePopulated](./calckey-js.entities.followingfolloweepopulated.md) | |
| [FollowingFollowerPopulated](./calckey-js.entities.followingfollowerpopulated.md) | |
| [FollowRequest](./calckey-js.entities.followrequest.md) | |
| [GalleryPost](./calckey-js.entities.gallerypost.md) | |
| [ID](./calckey-js.entities.id.md) | |
| [Instance](./calckey-js.entities.instance.md) | |
| [InstanceMetadata](./calckey-js.entities.instancemetadata.md) | |
| [LiteInstanceMetadata](./calckey-js.entities.liteinstancemetadata.md) | |
| [MeDetailed](./calckey-js.entities.medetailed.md) | |
| [MessagingMessage](./calckey-js.entities.messagingmessage.md) | |
| [Note](./calckey-js.entities.note.md) | |
| [NoteFavorite](./calckey-js.entities.notefavorite.md) | |
| [NoteReaction](./calckey-js.entities.notereaction.md) | |
| [Notification](./calckey-js.entities.notification.md) | |
| [OriginType](./calckey-js.entities.origintype.md) | |
| [Page](./calckey-js.entities.page.md) | |
| [PageEvent](./calckey-js.entities.pageevent.md) | |
| [ServerInfo](./calckey-js.entities.serverinfo.md) | |
| [Signin](./calckey-js.entities.signin.md) | |
| [Stats](./calckey-js.entities.stats.md) | |
| [User](./calckey-js.entities.user.md) | |
| [UserDetailed](./calckey-js.entities.userdetailed.md) | |
| [UserGroup](./calckey-js.entities.usergroup.md) | |
| [UserList](./calckey-js.entities.userlist.md) | |
| [UserLite](./calckey-js.entities.userlite.md) | |
| [UserSorting](./calckey-js.entities.usersorting.md) | |

View File

@ -0,0 +1,40 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [MeDetailed](./calckey-js.entities.medetailed.md)
## entities.MeDetailed type
**Signature:**
```typescript
export declare type MeDetailed = UserDetailed & {
avatarId: DriveFile["id"];
bannerId: DriveFile["id"];
autoAcceptFollowed: boolean;
alwaysMarkNsfw: boolean;
carefulBot: boolean;
emailNotificationTypes: string[];
hasPendingReceivedFollowRequest: boolean;
hasUnreadAnnouncement: boolean;
hasUnreadAntenna: boolean;
hasUnreadChannel: boolean;
hasUnreadMentions: boolean;
hasUnreadMessagingMessage: boolean;
hasUnreadNotification: boolean;
hasUnreadSpecifiedNotes: boolean;
hideOnlineStatus: boolean;
injectFeaturedNote: boolean;
integrations: Record<string, any>;
isDeleted: boolean;
isExplorable: boolean;
mutedWords: string[][];
mutingNotificationTypes: string[];
noCrawle: boolean;
preventAiLearning: boolean;
receiveAnnouncementEmail: boolean;
usePasswordLessLogin: boolean;
[other: string]: any;
};
```
**References:** [UserDetailed](./calckey-js.entities.userdetailed.md)<!-- -->, [DriveFile](./calckey-js.entities.drivefile.md)

View File

@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [MessagingMessage](./calckey-js.entities.messagingmessage.md)
## entities.MessagingMessage type
**Signature:**
```typescript
export declare type MessagingMessage = {
id: ID;
createdAt: DateString;
file: DriveFile | null;
fileId: DriveFile["id"] | null;
isRead: boolean;
reads: User["id"][];
text: string | null;
user: User;
userId: User["id"];
recipient?: User | null;
recipientId: User["id"] | null;
group?: UserGroup | null;
groupId: UserGroup["id"] | null;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)<!-- -->, [DriveFile](./calckey-js.entities.drivefile.md)<!-- -->, [User](./calckey-js.entities.user.md)<!-- -->, [UserGroup](./calckey-js.entities.usergroup.md)

View File

@ -0,0 +1,51 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Note](./calckey-js.entities.note.md)
## entities.Note type
**Signature:**
```typescript
export declare type Note = {
id: ID;
createdAt: DateString;
text: string | null;
cw: string | null;
user: User;
userId: User["id"];
reply?: Note;
replyId: Note["id"];
renote?: Note;
renoteId: Note["id"];
files: DriveFile[];
fileIds: DriveFile["id"][];
visibility: "public" | "home" | "followers" | "specified";
visibleUserIds?: User["id"][];
localOnly?: boolean;
channel?: Channel["id"];
myReaction?: string;
reactions: Record<string, number>;
renoteCount: number;
repliesCount: number;
poll?: {
expiresAt: DateString | null;
multiple: boolean;
choices: {
isVoted: boolean;
text: string;
votes: number;
}[];
};
emojis: {
name: string;
url: string;
}[];
uri?: string;
url?: string;
updatedAt?: DateString;
isHidden?: boolean;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)<!-- -->, [User](./calckey-js.entities.user.md)<!-- -->, [Note](./calckey-js.entities.note.md)<!-- -->, [DriveFile](./calckey-js.entities.drivefile.md)<!-- -->, [Channel](./calckey-js.entities.channel.md)

View File

@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [NoteFavorite](./calckey-js.entities.notefavorite.md)
## entities.NoteFavorite type
**Signature:**
```typescript
export declare type NoteFavorite = {
id: ID;
createdAt: DateString;
noteId: Note["id"];
note: Note;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)<!-- -->, [Note](./calckey-js.entities.note.md)

View File

@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [NoteReaction](./calckey-js.entities.notereaction.md)
## entities.NoteReaction type
**Signature:**
```typescript
export declare type NoteReaction = {
id: ID;
createdAt: DateString;
user: UserLite;
type: string;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)<!-- -->, [UserLite](./calckey-js.entities.userlite.md)

View File

@ -0,0 +1,82 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Notification](./calckey-js.entities.notification.md)
## entities.Notification type
**Signature:**
```typescript
export declare type Notification = {
id: ID;
createdAt: DateString;
isRead: boolean;
} & (
| {
type: "reaction";
reaction: string;
user: User;
userId: User["id"];
note: Note;
}
| {
type: "reply";
user: User;
userId: User["id"];
note: Note;
}
| {
type: "renote";
user: User;
userId: User["id"];
note: Note;
}
| {
type: "quote";
user: User;
userId: User["id"];
note: Note;
}
| {
type: "mention";
user: User;
userId: User["id"];
note: Note;
}
| {
type: "pollVote";
user: User;
userId: User["id"];
note: Note;
}
| {
type: "follow";
user: User;
userId: User["id"];
}
| {
type: "followRequestAccepted";
user: User;
userId: User["id"];
}
| {
type: "receiveFollowRequest";
user: User;
userId: User["id"];
}
| {
type: "groupInvited";
invitation: UserGroup;
user: User;
userId: User["id"];
}
| {
type: "app";
header?: string | null;
body: string;
icon?: string | null;
}
);
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)<!-- -->, [User](./calckey-js.entities.user.md)<!-- -->, [Note](./calckey-js.entities.note.md)<!-- -->, [UserGroup](./calckey-js.entities.usergroup.md)

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [OriginType](./calckey-js.entities.origintype.md)
## entities.OriginType type
**Signature:**
```typescript
export declare type OriginType = "combined" | "local" | "remote";
```

View File

@ -0,0 +1,33 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Page](./calckey-js.entities.page.md)
## entities.Page type
**Signature:**
```typescript
export declare type Page = {
id: ID;
createdAt: DateString;
updatedAt: DateString;
userId: User["id"];
user: User;
content: Record<string, any>[];
variables: Record<string, any>[];
title: string;
name: string;
summary: string | null;
hideTitleWhenPinned: boolean;
alignCenter: boolean;
font: string;
script: string;
eyeCatchingImageId: DriveFile["id"] | null;
eyeCatchingImage: DriveFile | null;
attachedFiles: any;
likedCount: number;
isLiked?: boolean;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)<!-- -->, [User](./calckey-js.entities.user.md)<!-- -->, [DriveFile](./calckey-js.entities.drivefile.md)

View File

@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [PageEvent](./calckey-js.entities.pageevent.md)
## entities.PageEvent type
**Signature:**
```typescript
export declare type PageEvent = {
pageId: Page["id"];
event: string;
var: any;
userId: User["id"];
user: User;
};
```
**References:** [Page](./calckey-js.entities.page.md)<!-- -->, [User](./calckey-js.entities.user.md)

View File

@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [ServerInfo](./calckey-js.entities.serverinfo.md)
## entities.ServerInfo type
**Signature:**
```typescript
export declare type ServerInfo = {
machine: string;
cpu: {
model: string;
cores: number;
};
mem: {
total: number;
};
fs: {
total: number;
used: number;
};
};
```

View File

@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Signin](./calckey-js.entities.signin.md)
## entities.Signin type
**Signature:**
```typescript
export declare type Signin = {
id: ID;
createdAt: DateString;
ip: string;
headers: Record<string, any>;
success: boolean;
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)

View File

@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [Stats](./calckey-js.entities.stats.md)
## entities.Stats type
**Signature:**
```typescript
export declare type Stats = {
notesCount: number;
originalNotesCount: number;
usersCount: number;
originalUsersCount: number;
instances: number;
driveUsageLocal: number;
driveUsageRemote: number;
};
```

View File

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [User](./calckey-js.entities.user.md)
## entities.User type
**Signature:**
```typescript
export declare type User = UserLite | UserDetailed;
```
**References:** [UserLite](./calckey-js.entities.userlite.md)<!-- -->, [UserDetailed](./calckey-js.entities.userdetailed.md)

View File

@ -0,0 +1,56 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [UserDetailed](./calckey-js.entities.userdetailed.md)
## entities.UserDetailed type
**Signature:**
```typescript
export declare type UserDetailed = UserLite & {
bannerBlurhash: string | null;
bannerColor: string | null;
bannerUrl: string | null;
birthday: string | null;
createdAt: DateString;
description: string | null;
ffVisibility: "public" | "followers" | "private";
fields: {
name: string;
value: string;
}[];
followersCount: number;
followingCount: number;
hasPendingFollowRequestFromYou: boolean;
hasPendingFollowRequestToYou: boolean;
isAdmin: boolean;
isBlocked: boolean;
isBlocking: boolean;
isBot: boolean;
isCat: boolean;
isFollowed: boolean;
isFollowing: boolean;
isLocked: boolean;
isModerator: boolean;
isMuted: boolean;
isRenoteMuted: boolean;
isSilenced: boolean;
isSuspended: boolean;
lang: string | null;
lastFetchedAt?: DateString;
location: string | null;
notesCount: number;
pinnedNoteIds: ID[];
pinnedNotes: Note[];
pinnedPage: Page | null;
pinnedPageId: string | null;
publicReactions: boolean;
securityKeys: boolean;
twoFactorEnabled: boolean;
updatedAt: DateString | null;
uri: string | null;
url: string | null;
};
```
**References:** [UserLite](./calckey-js.entities.userlite.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)<!-- -->, [ID](./calckey-js.entities.id.md)<!-- -->, [Note](./calckey-js.entities.note.md)<!-- -->, [Page](./calckey-js.entities.page.md)

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [UserGroup](./calckey-js.entities.usergroup.md)
## entities.UserGroup type
**Signature:**
```typescript
export declare type UserGroup = TODO;
```

View File

@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [UserList](./calckey-js.entities.userlist.md)
## entities.UserList type
**Signature:**
```typescript
export declare type UserList = {
id: ID;
createdAt: DateString;
name: string;
userIds: User["id"][];
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [DateString](./calckey-js.entities.datestring.md)<!-- -->, [User](./calckey-js.entities.user.md)

View File

@ -0,0 +1,35 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [UserLite](./calckey-js.entities.userlite.md)
## entities.UserLite type
**Signature:**
```typescript
export declare type UserLite = {
id: ID;
username: string;
host: string | null;
name: string;
onlineStatus: "online" | "active" | "offline" | "unknown";
avatarUrl: string;
avatarBlurhash: string;
alsoKnownAs: string[];
movedToUri: any;
emojis: {
name: string;
url: string;
}[];
instance?: {
name: Instance["name"];
softwareName: Instance["softwareName"];
softwareVersion: Instance["softwareVersion"];
iconUrl: Instance["iconUrl"];
faviconUrl: Instance["faviconUrl"];
themeColor: Instance["themeColor"];
};
};
```
**References:** [ID](./calckey-js.entities.id.md)<!-- -->, [Instance](./calckey-js.entities.instance.md)

View File

@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [entities](./calckey-js.entities.md) &gt; [UserSorting](./calckey-js.entities.usersorting.md)
## entities.UserSorting type
**Signature:**
```typescript
export declare type UserSorting =
| "+follower"
| "-follower"
| "+createdAt"
| "-createdAt"
| "+updatedAt"
| "-updatedAt";
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [ffVisibility](./calckey-js.ffvisibility.md)
## ffVisibility variable
**Signature:**
```typescript
ffVisibility: readonly ["public", "followers", "private"]
```

View File

@ -0,0 +1,43 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md)
## calckey-js package
## Classes
| Class | Description |
| --- | --- |
| [Stream](./calckey-js.stream.md) | |
## Abstract Classes
| Abstract Class | Description |
| --- | --- |
| [ChannelConnection](./calckey-js.channelconnection.md) | |
## Namespaces
| Namespace | Description |
| --- | --- |
| [api](./calckey-js.api.md) | |
| [entities](./calckey-js.entities.md) | |
## Variables
| Variable | Description |
| --- | --- |
| [ffVisibility](./calckey-js.ffvisibility.md) | |
| [mutedNoteReasons](./calckey-js.mutednotereasons.md) | |
| [noteVisibilities](./calckey-js.notevisibilities.md) | |
| [notificationTypes](./calckey-js.notificationtypes.md) | |
| [permissions](./calckey-js.permissions.md) | |
## Type Aliases
| Type Alias | Description |
| --- | --- |
| [Acct](./calckey-js.acct.md) | |
| [Channels](./calckey-js.channels.md) | |
| [Endpoints](./calckey-js.endpoints.md) | |

View File

@ -0,0 +1,16 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [mutedNoteReasons](./calckey-js.mutednotereasons.md)
## mutedNoteReasons variable
**Signature:**
```typescript
mutedNoteReasons: readonly [
"word",
"manual",
"spam",
"other",
]
```

View File

@ -0,0 +1,16 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [noteVisibilities](./calckey-js.notevisibilities.md)
## noteVisibilities variable
**Signature:**
```typescript
noteVisibilities: readonly [
"public",
"home",
"followers",
"specified",
]
```

View File

@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [notificationTypes](./calckey-js.notificationtypes.md)
## notificationTypes variable
**Signature:**
```typescript
notificationTypes: readonly [
"follow",
"mention",
"reply",
"renote",
"quote",
"reaction",
"pollVote",
"pollEnded",
"receiveFollowRequest",
"followRequestAccepted",
"groupInvited",
"app",
]
```

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [permissions](./calckey-js.permissions.md)
## permissions variable
**Signature:**
```typescript
permissions: string[]
```

View File

@ -0,0 +1,30 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [Stream](./calckey-js.stream.md) &gt; [(constructor)](./calckey-js.stream._constructor_.md)
## Stream.(constructor)
Constructs a new instance of the `Stream` class
**Signature:**
```typescript
constructor(
origin: string,
user: {
token: string;
} | null,
options?: {
WebSocket?: any;
},
);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| origin | string | |
| user | { token: string; } \| null | |
| options | { WebSocket?: any; } | _(Optional)_ |

View File

@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [Stream](./calckey-js.stream.md) &gt; [close](./calckey-js.stream.close.md)
## Stream.close() method
**Signature:**
```typescript
close(): void;
```
**Returns:**
void

View File

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [Stream](./calckey-js.stream.md) &gt; [disconnectToChannel](./calckey-js.stream.disconnecttochannel.md)
## Stream.disconnectToChannel() method
**Signature:**
```typescript
disconnectToChannel(connection: NonSharedConnection): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| connection | NonSharedConnection | |
**Returns:**
void

View File

@ -0,0 +1,36 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [Stream](./calckey-js.stream.md)
## Stream class
**Signature:**
```typescript
export default class Stream extends EventEmitter<StreamEvents>
```
**Extends:** EventEmitter&lt;StreamEvents&gt;
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(origin, user, options)](./calckey-js.stream._constructor_.md) | | Constructs a new instance of the <code>Stream</code> class |
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [state](./calckey-js.stream.state.md) | | "initializing" \| "reconnecting" \| "connected" | |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [close()](./calckey-js.stream.close.md) | | |
| [disconnectToChannel(connection)](./calckey-js.stream.disconnecttochannel.md) | | |
| [removeSharedConnection(connection)](./calckey-js.stream.removesharedconnection.md) | | |
| [removeSharedConnectionPool(pool)](./calckey-js.stream.removesharedconnectionpool.md) | | |
| [send(typeOrPayload, payload)](./calckey-js.stream.send.md) | | |
| [useChannel(channel, params, name)](./calckey-js.stream.usechannel.md) | | |

View File

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [Stream](./calckey-js.stream.md) &gt; [removeSharedConnection](./calckey-js.stream.removesharedconnection.md)
## Stream.removeSharedConnection() method
**Signature:**
```typescript
removeSharedConnection(connection: SharedConnection): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| connection | SharedConnection | |
**Returns:**
void

View File

@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [Stream](./calckey-js.stream.md) &gt; [removeSharedConnectionPool](./calckey-js.stream.removesharedconnectionpool.md)
## Stream.removeSharedConnectionPool() method
**Signature:**
```typescript
removeSharedConnectionPool(pool: Pool): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| pool | Pool | |
**Returns:**
void

View File

@ -0,0 +1,23 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [Stream](./calckey-js.stream.md) &gt; [send](./calckey-js.stream.send.md)
## Stream.send() method
**Signature:**
```typescript
send(typeOrPayload: any, payload?: any): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| typeOrPayload | any | |
| payload | any | _(Optional)_ |
**Returns:**
void

View File

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [calckey-js](./calckey-js.md) &gt; [Stream](./calckey-js.stream.md) &gt; [state](./calckey-js.stream.state.md)
## Stream.state property
**Signature:**
```typescript
state: "initializing" | "reconnecting" | "connected";
```

Some files were not shown because too many files have changed in this diff Show More