From 0a73973a7c6e6e95a5206bfc5388ff7f7a9ba8ed Mon Sep 17 00:00:00 2001 From: Nafu Satsuki Date: Sat, 18 Nov 2023 20:39:48 +0900 Subject: メールアドレスの認証にverifymail.ioを使えるようにする。 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/EmailService.ts | 92 ++++++++++++++++++++-- packages/backend/src/models/Meta.ts | 11 +++ .../src/server/api/endpoints/admin/update-meta.ts | 14 ++++ 3 files changed, 109 insertions(+), 8 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/core/EmailService.ts b/packages/backend/src/core/EmailService.ts index c9da3f77c0..8f28197ebc 100644 --- a/packages/backend/src/core/EmailService.ts +++ b/packages/backend/src/core/EmailService.ts @@ -13,6 +13,9 @@ import type Logger from '@/logger.js'; import type { UserProfilesRepository } from '@/models/_.js'; import { LoggerService } from '@/core/LoggerService.js'; import { bindThis } from '@/decorators.js'; +import {URLSearchParams} from "node:url"; +import { HttpRequestService } from '@/core/HttpRequestService.js'; +import {SubOutputFormat} from "deep-email-validator/dist/output/output.js"; @Injectable() export class EmailService { @@ -27,6 +30,7 @@ export class EmailService { private metaService: MetaService, private loggerService: LoggerService, + private httpRequestService: HttpRequestService, ) { this.logger = this.loggerService.getLogger('email'); } @@ -160,14 +164,25 @@ export class EmailService { email: emailAddress, }); - const validated = meta.enableActiveEmailValidation ? await validateEmail({ - email: emailAddress, - validateRegex: true, - validateMx: true, - validateTypo: false, // TLDを見ているみたいだけどclubとか弾かれるので - validateDisposable: true, // 捨てアドかどうかチェック - validateSMTP: false, // 日本だと25ポートが殆どのプロバイダーで塞がれていてタイムアウトになるので - }) : { valid: true, reason: null }; + const verifymailApi = meta.enableVerifymailApi && meta.verifymailAuthKey != null; + let validated; + + if (meta.enableActiveEmailValidation) { + if (verifymailApi) { + validated = await this.verifyMail(emailAddress, meta.verifymailAuthKey); + } else { + validated = meta.enableActiveEmailValidation ? await validateEmail({ + email: emailAddress, + validateRegex: true, + validateMx: true, + validateTypo: false, // TLDを見ているみたいだけどclubとか弾かれるので + validateDisposable: true, // 捨てアドかどうかチェック + validateSMTP: false, // 日本だと25ポートが殆どのプロバイダーで塞がれていてタイムアウトになるので + }) : { valid: true, reason: null }; + } + } else { + validated = { valid: true, reason: null }; + } const available = exist === 0 && validated.valid; @@ -182,4 +197,65 @@ export class EmailService { null, }; } + + private async verifyMail(emailAddress: string, verifymailAuthKey: string): Promise<{ + valid: boolean; + reason: 'used' | 'format' | 'disposable' | 'mx' | 'smtp' | null; + }> { + const endpoint = 'https://verifymail.io/api/' + emailAddress + '?key=' + verifymailAuthKey; + const res = await this.httpRequestService.send(endpoint, { + method: 'GET', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + Accept: 'application/json, */*', + }, + }); + + const json = (await res.json()) as { + block: boolean; + catch_all: boolean; + deliverable_email: boolean; + disposable: boolean; + domain: string; + email_address: string; + email_provider: string; + mx: boolean; + mx_fallback: boolean; + mx_host: string[]; + mx_ip: string[]; + mx_priority: { [key: string]: number }; + privacy: boolean; + related_domains: string[]; + }; + + if (json.email_address === undefined) { + return { + valid: false, + reason: 'format', + }; + } + if (json.deliverable_email !== undefined && !json.deliverable_email) { + return { + valid: false, + reason: 'smtp', + }; + } + if (json.disposable) { + return { + valid: false, + reason: 'disposable', + }; + } + if (json.mx !== undefined && !json.mx) { + return { + valid: false, + reason: 'mx', + }; + } + + return { + valid: true, + reason: null, + }; + } } diff --git a/packages/backend/src/models/Meta.ts b/packages/backend/src/models/Meta.ts index 14a72add1d..83e8962f5d 100644 --- a/packages/backend/src/models/Meta.ts +++ b/packages/backend/src/models/Meta.ts @@ -446,6 +446,17 @@ export class MiMeta { }) public enableActiveEmailValidation: boolean; + @Column('boolean', { + default: false, + }) + public enableVerifymailApi: boolean; + + @Column('varchar', { + length: 1024, + nullable: true, + }) + public verifymailAuthKey: string | null; + @Column('boolean', { default: true, }) diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index da3e5dd9ac..d6f9b2cd94 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -113,6 +113,8 @@ export const paramDef = { objectStorageS3ForcePathStyle: { type: 'boolean' }, enableIpLogging: { type: 'boolean' }, enableActiveEmailValidation: { type: 'boolean' }, + enableVerifymailApi: { type: 'boolean' }, + verifymailAuthKey: { type: 'string', nullable: true }, enableChartsForRemoteUser: { type: 'boolean' }, enableChartsForFederatedInstances: { type: 'boolean' }, enableServerMachineStats: { type: 'boolean' }, @@ -454,6 +456,18 @@ export default class extends Endpoint { // eslint- set.enableActiveEmailValidation = ps.enableActiveEmailValidation; } + if (ps.enableVerifymailApi !== undefined) { + set.enableVerifymailApi = ps.enableVerifymailApi; + } + + if (ps.verifymailAuthKey !== undefined) { + if (ps.verifymailAuthKey === '') { + set.verifymailAuthKey = null; + } else { + set.verifymailAuthKey = ps.verifymailAuthKey; + } + } + if (ps.enableChartsForRemoteUser !== undefined) { set.enableChartsForRemoteUser = ps.enableChartsForRemoteUser; } -- cgit v1.2.3-freya From 30dc6e691d09073a904a40beb94370b6ad3c5c5c Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 18 Nov 2023 21:04:00 +0900 Subject: lint fix --- packages/backend/src/core/EmailService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/core/EmailService.ts b/packages/backend/src/core/EmailService.ts index 8f28197ebc..f31cec2b3a 100644 --- a/packages/backend/src/core/EmailService.ts +++ b/packages/backend/src/core/EmailService.ts @@ -3,9 +3,11 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +import { URLSearchParams } from 'node:url'; import * as nodemailer from 'nodemailer'; import { Inject, Injectable } from '@nestjs/common'; import { validate as validateEmail } from 'deep-email-validator'; +import { SubOutputFormat } from 'deep-email-validator/dist/output/output.js'; import { MetaService } from '@/core/MetaService.js'; import { DI } from '@/di-symbols.js'; import type { Config } from '@/config.js'; @@ -13,9 +15,7 @@ import type Logger from '@/logger.js'; import type { UserProfilesRepository } from '@/models/_.js'; import { LoggerService } from '@/core/LoggerService.js'; import { bindThis } from '@/decorators.js'; -import {URLSearchParams} from "node:url"; import { HttpRequestService } from '@/core/HttpRequestService.js'; -import {SubOutputFormat} from "deep-email-validator/dist/output/output.js"; @Injectable() export class EmailService { @@ -167,7 +167,7 @@ export class EmailService { const verifymailApi = meta.enableVerifymailApi && meta.verifymailAuthKey != null; let validated; - if (meta.enableActiveEmailValidation) { + if (meta.enableActiveEmailValidation && meta.verifymailAuthKey) { if (verifymailApi) { validated = await this.verifyMail(emailAddress, meta.verifymailAuthKey); } else { -- cgit v1.2.3-freya From 2b6f789a5bc741d9092d29ea17d03be794ef5d51 Mon Sep 17 00:00:00 2001 From: Nafu Satsuki Date: Sat, 18 Nov 2023 05:20:11 +0900 Subject: feat(moderation): モデレーターがユーザーのアイコンもしくはバナー画像を未設定状態にできる機能を追加 (MisskeyIO#222) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> --- locales/en-US.yml | 4 ++ locales/index.d.ts | 4 ++ locales/ja-JP.yml | 4 ++ packages/backend/src/server/api/EndpointsModule.ts | 8 ++++ packages/backend/src/server/api/endpoints.ts | 4 ++ .../api/endpoints/admin/delete-user-avatar.ts | 48 ++++++++++++++++++++++ .../api/endpoints/admin/delete-user-banner.ts | 48 ++++++++++++++++++++++ packages/frontend/src/pages/admin-user.vue | 42 +++++++++++++++++++ packages/misskey-js/etc/misskey-js.api.md | 12 ++++++ packages/misskey-js/src/api.types.ts | 2 + 10 files changed, 176 insertions(+) create mode 100644 packages/backend/src/server/api/endpoints/admin/delete-user-avatar.ts create mode 100644 packages/backend/src/server/api/endpoints/admin/delete-user-banner.ts (limited to 'packages/backend/src') diff --git a/locales/en-US.yml b/locales/en-US.yml index 09fd726c9f..2aba028e45 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -564,6 +564,10 @@ output: "Output" script: "Script" disablePagesScript: "Disable AiScript on Pages" updateRemoteUser: "Update remote user information" +deleteUserAvatar: "Delete user icon" +deleteUserAvatarConfirm: "Are you sure that you want to delete this user's icon?" +deleteUserBanner: "Delete user banner" +deleteUserBannerConfirm: "Are you sure that you want to delete this user's banner?" deleteAllFiles: "Delete all files" deleteAllFilesConfirm: "Are you sure that you want to delete all files?" removeAllFollowing: "Unfollow all followed users" diff --git a/locales/index.d.ts b/locales/index.d.ts index 6baed91c42..6fd6d3641a 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -567,6 +567,10 @@ export interface Locale { "script": string; "disablePagesScript": string; "updateRemoteUser": string; + "deleteUserAvatar": string; + "deleteUserAvatarConfirm": string; + "deleteUserBanner": string; + "deleteUserBannerConfirm": string; "deleteAllFiles": string; "deleteAllFilesConfirm": string; "removeAllFollowing": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index e59a550df5..9685e9c5a5 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -564,6 +564,10 @@ output: "出力" script: "スクリプト" disablePagesScript: "Pagesのスクリプトを無効にする" updateRemoteUser: "リモートユーザー情報の更新" +deleteUserAvatar: "アイコンを削除" +deleteUserAvatarConfirm: "アイコンを削除しますか?" +deleteUserBanner: "バナーを削除" +deleteUserBannerConfirm: "バナーを削除しますか?" deleteAllFiles: "すべてのファイルを削除" deleteAllFilesConfirm: "すべてのファイルを削除しますか?" removeAllFollowing: "フォローを全解除" diff --git a/packages/backend/src/server/api/EndpointsModule.ts b/packages/backend/src/server/api/EndpointsModule.ts index 6d813ae04e..3797b46d04 100644 --- a/packages/backend/src/server/api/EndpointsModule.ts +++ b/packages/backend/src/server/api/EndpointsModule.ts @@ -24,6 +24,8 @@ import * as ep___admin_avatarDecorations_delete from './endpoints/admin/avatar-d import * as ep___admin_avatarDecorations_list from './endpoints/admin/avatar-decorations/list.js'; import * as ep___admin_avatarDecorations_update from './endpoints/admin/avatar-decorations/update.js'; import * as ep___admin_deleteAllFilesOfAUser from './endpoints/admin/delete-all-files-of-a-user.js'; +import * as ep___admin_deleteUserAvatar from './endpoints/admin/delete-user-avatar.js'; +import * as ep___admin_deleteUserBanner from './endpoints/admin/delete-user-banner.js'; import * as ep___admin_drive_cleanRemoteFiles from './endpoints/admin/drive/clean-remote-files.js'; import * as ep___admin_drive_cleanup from './endpoints/admin/drive/cleanup.js'; import * as ep___admin_drive_files from './endpoints/admin/drive/files.js'; @@ -383,6 +385,8 @@ const $admin_avatarDecorations_delete: Provider = { provide: 'ep:admin/avatar-de const $admin_avatarDecorations_list: Provider = { provide: 'ep:admin/avatar-decorations/list', useClass: ep___admin_avatarDecorations_list.default }; const $admin_avatarDecorations_update: Provider = { provide: 'ep:admin/avatar-decorations/update', useClass: ep___admin_avatarDecorations_update.default }; const $admin_deleteAllFilesOfAUser: Provider = { provide: 'ep:admin/delete-all-files-of-a-user', useClass: ep___admin_deleteAllFilesOfAUser.default }; +const $admin_deleteUserAvatar: Provider = { provide: 'ep:admin/delete-user-avatar', useClass: ep___admin_deleteUserAvatar.default }; +const $admin_deleteUserBanner: Provider = { provide: 'ep:admin/delete-user-banner', useClass: ep___admin_deleteUserBanner.default }; const $admin_drive_cleanRemoteFiles: Provider = { provide: 'ep:admin/drive/clean-remote-files', useClass: ep___admin_drive_cleanRemoteFiles.default }; const $admin_drive_cleanup: Provider = { provide: 'ep:admin/drive/cleanup', useClass: ep___admin_drive_cleanup.default }; const $admin_drive_files: Provider = { provide: 'ep:admin/drive/files', useClass: ep___admin_drive_files.default }; @@ -746,6 +750,8 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention $admin_avatarDecorations_list, $admin_avatarDecorations_update, $admin_deleteAllFilesOfAUser, + $admin_deleteUserAvatar, + $admin_deleteUserBanner, $admin_drive_cleanRemoteFiles, $admin_drive_cleanup, $admin_drive_files, @@ -1103,6 +1109,8 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention $admin_avatarDecorations_list, $admin_avatarDecorations_update, $admin_deleteAllFilesOfAUser, + $admin_deleteUserAvatar, + $admin_deleteUserBanner, $admin_drive_cleanRemoteFiles, $admin_drive_cleanup, $admin_drive_files, diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts index ef4bd3e2b5..4162ace337 100644 --- a/packages/backend/src/server/api/endpoints.ts +++ b/packages/backend/src/server/api/endpoints.ts @@ -24,6 +24,8 @@ import * as ep___admin_avatarDecorations_delete from './endpoints/admin/avatar-d import * as ep___admin_avatarDecorations_list from './endpoints/admin/avatar-decorations/list.js'; import * as ep___admin_avatarDecorations_update from './endpoints/admin/avatar-decorations/update.js'; import * as ep___admin_deleteAllFilesOfAUser from './endpoints/admin/delete-all-files-of-a-user.js'; +import * as ep___admin_deleteUserAvatar from './endpoints/admin/delete-user-avatar.js'; +import * as ep___admin_deleteUserBanner from './endpoints/admin/delete-user-banner.js'; import * as ep___admin_drive_cleanRemoteFiles from './endpoints/admin/drive/clean-remote-files.js'; import * as ep___admin_drive_cleanup from './endpoints/admin/drive/cleanup.js'; import * as ep___admin_drive_files from './endpoints/admin/drive/files.js'; @@ -381,6 +383,8 @@ const eps = [ ['admin/avatar-decorations/list', ep___admin_avatarDecorations_list], ['admin/avatar-decorations/update', ep___admin_avatarDecorations_update], ['admin/delete-all-files-of-a-user', ep___admin_deleteAllFilesOfAUser], + ['admin/delete-user-avatar', ep___admin_deleteUserAvatar], + ['admin/delete-user-banner', ep___admin_deleteUserBanner], ['admin/drive/clean-remote-files', ep___admin_drive_cleanRemoteFiles], ['admin/drive/cleanup', ep___admin_drive_cleanup], ['admin/drive/files', ep___admin_drive_files], diff --git a/packages/backend/src/server/api/endpoints/admin/delete-user-avatar.ts b/packages/backend/src/server/api/endpoints/admin/delete-user-avatar.ts new file mode 100644 index 0000000000..d3c78d7fb6 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/admin/delete-user-avatar.ts @@ -0,0 +1,48 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { Inject, Injectable } from '@nestjs/common'; +import type { UsersRepository } from '@/models/_.js'; +import { Endpoint } from '@/server/api/endpoint-base.js'; +import { DI } from '@/di-symbols.js'; + +export const meta = { + tags: ['admin'], + + requireCredential: true, + requireModerator: true, +} as const; + +export const paramDef = { + type: 'object', + properties: { + userId: { type: 'string', format: 'misskey:id' }, + }, + required: ['userId'], +} as const; + +// eslint-disable-next-line import/no-default-export +@Injectable() +export default class extends Endpoint { + constructor( + @Inject(DI.usersRepository) + private usersRepository: UsersRepository, + ) { + super(meta, paramDef, async (ps, me) => { + const user = await this.usersRepository.findOneBy({ id: ps.userId }); + + if (user == null) { + throw new Error('user not found'); + } + + await this.usersRepository.update(user.id, { + avatar: null, + avatarId: null, + avatarUrl: null, + avatarBlurhash: null, + }); + }); + } +} diff --git a/packages/backend/src/server/api/endpoints/admin/delete-user-banner.ts b/packages/backend/src/server/api/endpoints/admin/delete-user-banner.ts new file mode 100644 index 0000000000..e076cdcfc1 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/admin/delete-user-banner.ts @@ -0,0 +1,48 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { Inject, Injectable } from '@nestjs/common'; +import type { UsersRepository } from '@/models/_.js'; +import { Endpoint } from '@/server/api/endpoint-base.js'; +import { DI } from '@/di-symbols.js'; + +export const meta = { + tags: ['admin'], + + requireCredential: true, + requireModerator: true, +} as const; + +export const paramDef = { + type: 'object', + properties: { + userId: { type: 'string', format: 'misskey:id' }, + }, + required: ['userId'], +} as const; + +// eslint-disable-next-line import/no-default-export +@Injectable() +export default class extends Endpoint { + constructor( + @Inject(DI.usersRepository) + private usersRepository: UsersRepository, + ) { + super(meta, paramDef, async (ps, me) => { + const user = await this.usersRepository.findOneBy({ id: ps.userId }); + + if (user == null) { + throw new Error('user not found'); + } + + await this.usersRepository.update(user.id, { + banner: null, + bannerId: null, + bannerUrl: null, + bannerBlurhash: null, + }); + }); + } +} diff --git a/packages/frontend/src/pages/admin-user.vue b/packages/frontend/src/pages/admin-user.vue index 5d671acf31..9f4975e888 100644 --- a/packages/frontend/src/pages/admin-user.vue +++ b/packages/frontend/src/pages/admin-user.vue @@ -122,6 +122,10 @@ SPDX-License-Identifier: AGPL-3.0-only +
+ {{ i18n.ts.deleteUserAvatar }} + {{ i18n.ts.deleteUserBanner }} +
{{ i18n.ts.deleteAccount }} @@ -320,6 +324,44 @@ async function toggleSuspend(v) { } } +async function deleteUserAvatar() { + const confirm = await os.confirm({ + type: 'warning', + text: i18n.ts.deleteUserAvatarConfirm, + }); + if (confirm.canceled) return; + const process = async () => { + await os.api('admin/delete-user-avatar', { userId: user.id }); + os.success(); + }; + await process().catch(err => { + os.alert({ + type: 'error', + text: err.toString(), + }); + }); + refreshUser(); +} + +async function deleteUserBanner() { + const confirm = await os.confirm({ + type: 'warning', + text: i18n.ts.deleteUserBannerConfirm, + }); + if (confirm.canceled) return; + const process = async () => { + await os.api('admin/delete-user-banner', { userId: user.id }); + os.success(); + }; + await process().catch(err => { + os.alert({ + type: 'error', + text: err.toString(), + }); + }); + refreshUser(); +} + async function deleteAllFiles() { const confirm = await os.confirm({ type: 'warning', diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 87922ba791..f4bcaa8066 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -345,6 +345,18 @@ export type Endpoints = { }; res: null; }; + 'admin/delete-user-avatar': { + req: { + userId: User['id']; + }; + res: null; + }; + 'admin/delete-user-banner': { + req: { + userId: User['id']; + }; + res: null; + }; 'admin/delete-logs': { req: NoParams; res: null; diff --git a/packages/misskey-js/src/api.types.ts b/packages/misskey-js/src/api.types.ts index 54b175fcf1..e3f28c644e 100644 --- a/packages/misskey-js/src/api.types.ts +++ b/packages/misskey-js/src/api.types.ts @@ -15,6 +15,8 @@ export type Endpoints = { // admin 'admin/abuse-user-reports': { req: TODO; res: TODO; }; 'admin/delete-all-files-of-a-user': { req: { userId: User['id']; }; res: null; }; + 'admin/delete-user-avatar': { req: { userId: User['id']; }; res: null; }; + 'admin/delete-user-banner': { req: { userId: User['id']; }; res: null; }; 'admin/delete-logs': { req: NoParams; res: null; }; 'admin/get-index-stats': { req: TODO; res: TODO; }; 'admin/get-table-stats': { req: TODO; res: TODO; }; -- cgit v1.2.3-freya From b65fd349812fe3c89b5face6ec5c12823459d7df Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 19 Nov 2023 10:18:57 +0900 Subject: tweak of 2b6f789a5b --- locales/en-US.yml | 8 +-- locales/index.d.ts | 10 ++-- locales/ja-JP.yml | 10 ++-- packages/backend/src/server/api/EndpointsModule.ts | 16 +++--- packages/backend/src/server/api/endpoints.ts | 8 +-- .../api/endpoints/admin/delete-user-avatar.ts | 48 ----------------- .../api/endpoints/admin/delete-user-banner.ts | 48 ----------------- .../api/endpoints/admin/unset-user-avatar.ts | 60 ++++++++++++++++++++++ .../api/endpoints/admin/unset-user-banner.ts | 60 ++++++++++++++++++++++ packages/backend/src/types.ts | 14 +++++ packages/frontend/src/pages/admin-user.vue | 16 +++--- packages/misskey-js/etc/misskey-js.api.md | 4 +- packages/misskey-js/src/api.types.ts | 4 +- packages/misskey-js/src/consts.ts | 14 +++++ packages/misskey-js/src/entities.ts | 6 +++ 15 files changed, 194 insertions(+), 132 deletions(-) delete mode 100644 packages/backend/src/server/api/endpoints/admin/delete-user-avatar.ts delete mode 100644 packages/backend/src/server/api/endpoints/admin/delete-user-banner.ts create mode 100644 packages/backend/src/server/api/endpoints/admin/unset-user-avatar.ts create mode 100644 packages/backend/src/server/api/endpoints/admin/unset-user-banner.ts (limited to 'packages/backend/src') diff --git a/locales/en-US.yml b/locales/en-US.yml index 2aba028e45..b14592b20a 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -564,10 +564,10 @@ output: "Output" script: "Script" disablePagesScript: "Disable AiScript on Pages" updateRemoteUser: "Update remote user information" -deleteUserAvatar: "Delete user icon" -deleteUserAvatarConfirm: "Are you sure that you want to delete this user's icon?" -deleteUserBanner: "Delete user banner" -deleteUserBannerConfirm: "Are you sure that you want to delete this user's banner?" +unsetUserAvatar: "Delete user icon" +unsetUserAvatarConfirm: "Are you sure that you want to delete this user's icon?" +unsetUserBanner: "Delete user banner" +unsetUserBannerConfirm: "Are you sure that you want to delete this user's banner?" deleteAllFiles: "Delete all files" deleteAllFilesConfirm: "Are you sure that you want to delete all files?" removeAllFollowing: "Unfollow all followed users" diff --git a/locales/index.d.ts b/locales/index.d.ts index 6fd6d3641a..39fbb57799 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -567,10 +567,10 @@ export interface Locale { "script": string; "disablePagesScript": string; "updateRemoteUser": string; - "deleteUserAvatar": string; - "deleteUserAvatarConfirm": string; - "deleteUserBanner": string; - "deleteUserBannerConfirm": string; + "unsetUserAvatar": string; + "unsetUserAvatarConfirm": string; + "unsetUserBanner": string; + "unsetUserBannerConfirm": string; "deleteAllFiles": string; "deleteAllFilesConfirm": string; "removeAllFollowing": string; @@ -2417,6 +2417,8 @@ export interface Locale { "createAvatarDecoration": string; "updateAvatarDecoration": string; "deleteAvatarDecoration": string; + "unsetUserAvatar": string; + "unsetUserBanner": string; }; "_fileViewer": { "title": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 9685e9c5a5..3757715c0f 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -564,10 +564,10 @@ output: "出力" script: "スクリプト" disablePagesScript: "Pagesのスクリプトを無効にする" updateRemoteUser: "リモートユーザー情報の更新" -deleteUserAvatar: "アイコンを削除" -deleteUserAvatarConfirm: "アイコンを削除しますか?" -deleteUserBanner: "バナーを削除" -deleteUserBannerConfirm: "バナーを削除しますか?" +unsetUserAvatar: "アイコンを解除" +unsetUserAvatarConfirm: "アイコンを解除しますか?" +unsetUserBanner: "バナーを解除" +unsetUserBannerConfirm: "バナーを解除しますか?" deleteAllFiles: "すべてのファイルを削除" deleteAllFilesConfirm: "すべてのファイルを削除しますか?" removeAllFollowing: "フォローを全解除" @@ -2318,6 +2318,8 @@ _moderationLogTypes: createAvatarDecoration: "アイコンデコレーションを作成" updateAvatarDecoration: "アイコンデコレーションを更新" deleteAvatarDecoration: "アイコンデコレーションを削除" + unsetUserAvatar: "ユーザーのアイコンを解除" + unsetUserBanner: "ユーザーのバナーを解除" _fileViewer: title: "ファイルの詳細" diff --git a/packages/backend/src/server/api/EndpointsModule.ts b/packages/backend/src/server/api/EndpointsModule.ts index 3797b46d04..86a64d7121 100644 --- a/packages/backend/src/server/api/EndpointsModule.ts +++ b/packages/backend/src/server/api/EndpointsModule.ts @@ -24,8 +24,8 @@ import * as ep___admin_avatarDecorations_delete from './endpoints/admin/avatar-d import * as ep___admin_avatarDecorations_list from './endpoints/admin/avatar-decorations/list.js'; import * as ep___admin_avatarDecorations_update from './endpoints/admin/avatar-decorations/update.js'; import * as ep___admin_deleteAllFilesOfAUser from './endpoints/admin/delete-all-files-of-a-user.js'; -import * as ep___admin_deleteUserAvatar from './endpoints/admin/delete-user-avatar.js'; -import * as ep___admin_deleteUserBanner from './endpoints/admin/delete-user-banner.js'; +import * as ep___admin_unsetUserAvatar from './endpoints/admin/unset-user-avatar.js'; +import * as ep___admin_unsetUserBanner from './endpoints/admin/unset-user-banner.js'; import * as ep___admin_drive_cleanRemoteFiles from './endpoints/admin/drive/clean-remote-files.js'; import * as ep___admin_drive_cleanup from './endpoints/admin/drive/cleanup.js'; import * as ep___admin_drive_files from './endpoints/admin/drive/files.js'; @@ -385,8 +385,8 @@ const $admin_avatarDecorations_delete: Provider = { provide: 'ep:admin/avatar-de const $admin_avatarDecorations_list: Provider = { provide: 'ep:admin/avatar-decorations/list', useClass: ep___admin_avatarDecorations_list.default }; const $admin_avatarDecorations_update: Provider = { provide: 'ep:admin/avatar-decorations/update', useClass: ep___admin_avatarDecorations_update.default }; const $admin_deleteAllFilesOfAUser: Provider = { provide: 'ep:admin/delete-all-files-of-a-user', useClass: ep___admin_deleteAllFilesOfAUser.default }; -const $admin_deleteUserAvatar: Provider = { provide: 'ep:admin/delete-user-avatar', useClass: ep___admin_deleteUserAvatar.default }; -const $admin_deleteUserBanner: Provider = { provide: 'ep:admin/delete-user-banner', useClass: ep___admin_deleteUserBanner.default }; +const $admin_unsetUserAvatar: Provider = { provide: 'ep:admin/unset-user-avatar', useClass: ep___admin_unsetUserAvatar.default }; +const $admin_unsetUserBanner: Provider = { provide: 'ep:admin/unset-user-banner', useClass: ep___admin_unsetUserBanner.default }; const $admin_drive_cleanRemoteFiles: Provider = { provide: 'ep:admin/drive/clean-remote-files', useClass: ep___admin_drive_cleanRemoteFiles.default }; const $admin_drive_cleanup: Provider = { provide: 'ep:admin/drive/cleanup', useClass: ep___admin_drive_cleanup.default }; const $admin_drive_files: Provider = { provide: 'ep:admin/drive/files', useClass: ep___admin_drive_files.default }; @@ -750,8 +750,8 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention $admin_avatarDecorations_list, $admin_avatarDecorations_update, $admin_deleteAllFilesOfAUser, - $admin_deleteUserAvatar, - $admin_deleteUserBanner, + $admin_unsetUserAvatar, + $admin_unsetUserBanner, $admin_drive_cleanRemoteFiles, $admin_drive_cleanup, $admin_drive_files, @@ -1109,8 +1109,8 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention $admin_avatarDecorations_list, $admin_avatarDecorations_update, $admin_deleteAllFilesOfAUser, - $admin_deleteUserAvatar, - $admin_deleteUserBanner, + $admin_unsetUserAvatar, + $admin_unsetUserBanner, $admin_drive_cleanRemoteFiles, $admin_drive_cleanup, $admin_drive_files, diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts index 4162ace337..e458d720ab 100644 --- a/packages/backend/src/server/api/endpoints.ts +++ b/packages/backend/src/server/api/endpoints.ts @@ -24,8 +24,8 @@ import * as ep___admin_avatarDecorations_delete from './endpoints/admin/avatar-d import * as ep___admin_avatarDecorations_list from './endpoints/admin/avatar-decorations/list.js'; import * as ep___admin_avatarDecorations_update from './endpoints/admin/avatar-decorations/update.js'; import * as ep___admin_deleteAllFilesOfAUser from './endpoints/admin/delete-all-files-of-a-user.js'; -import * as ep___admin_deleteUserAvatar from './endpoints/admin/delete-user-avatar.js'; -import * as ep___admin_deleteUserBanner from './endpoints/admin/delete-user-banner.js'; +import * as ep___admin_unsetUserAvatar from './endpoints/admin/unset-user-avatar.js'; +import * as ep___admin_unsetUserBanner from './endpoints/admin/unset-user-banner.js'; import * as ep___admin_drive_cleanRemoteFiles from './endpoints/admin/drive/clean-remote-files.js'; import * as ep___admin_drive_cleanup from './endpoints/admin/drive/cleanup.js'; import * as ep___admin_drive_files from './endpoints/admin/drive/files.js'; @@ -383,8 +383,8 @@ const eps = [ ['admin/avatar-decorations/list', ep___admin_avatarDecorations_list], ['admin/avatar-decorations/update', ep___admin_avatarDecorations_update], ['admin/delete-all-files-of-a-user', ep___admin_deleteAllFilesOfAUser], - ['admin/delete-user-avatar', ep___admin_deleteUserAvatar], - ['admin/delete-user-banner', ep___admin_deleteUserBanner], + ['admin/unset-user-avatar', ep___admin_unsetUserAvatar], + ['admin/unset-user-banner', ep___admin_unsetUserBanner], ['admin/drive/clean-remote-files', ep___admin_drive_cleanRemoteFiles], ['admin/drive/cleanup', ep___admin_drive_cleanup], ['admin/drive/files', ep___admin_drive_files], diff --git a/packages/backend/src/server/api/endpoints/admin/delete-user-avatar.ts b/packages/backend/src/server/api/endpoints/admin/delete-user-avatar.ts deleted file mode 100644 index d3c78d7fb6..0000000000 --- a/packages/backend/src/server/api/endpoints/admin/delete-user-avatar.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * SPDX-FileCopyrightText: syuilo and other misskey contributors - * SPDX-License-Identifier: AGPL-3.0-only - */ - -import { Inject, Injectable } from '@nestjs/common'; -import type { UsersRepository } from '@/models/_.js'; -import { Endpoint } from '@/server/api/endpoint-base.js'; -import { DI } from '@/di-symbols.js'; - -export const meta = { - tags: ['admin'], - - requireCredential: true, - requireModerator: true, -} as const; - -export const paramDef = { - type: 'object', - properties: { - userId: { type: 'string', format: 'misskey:id' }, - }, - required: ['userId'], -} as const; - -// eslint-disable-next-line import/no-default-export -@Injectable() -export default class extends Endpoint { - constructor( - @Inject(DI.usersRepository) - private usersRepository: UsersRepository, - ) { - super(meta, paramDef, async (ps, me) => { - const user = await this.usersRepository.findOneBy({ id: ps.userId }); - - if (user == null) { - throw new Error('user not found'); - } - - await this.usersRepository.update(user.id, { - avatar: null, - avatarId: null, - avatarUrl: null, - avatarBlurhash: null, - }); - }); - } -} diff --git a/packages/backend/src/server/api/endpoints/admin/delete-user-banner.ts b/packages/backend/src/server/api/endpoints/admin/delete-user-banner.ts deleted file mode 100644 index e076cdcfc1..0000000000 --- a/packages/backend/src/server/api/endpoints/admin/delete-user-banner.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * SPDX-FileCopyrightText: syuilo and other misskey contributors - * SPDX-License-Identifier: AGPL-3.0-only - */ - -import { Inject, Injectable } from '@nestjs/common'; -import type { UsersRepository } from '@/models/_.js'; -import { Endpoint } from '@/server/api/endpoint-base.js'; -import { DI } from '@/di-symbols.js'; - -export const meta = { - tags: ['admin'], - - requireCredential: true, - requireModerator: true, -} as const; - -export const paramDef = { - type: 'object', - properties: { - userId: { type: 'string', format: 'misskey:id' }, - }, - required: ['userId'], -} as const; - -// eslint-disable-next-line import/no-default-export -@Injectable() -export default class extends Endpoint { - constructor( - @Inject(DI.usersRepository) - private usersRepository: UsersRepository, - ) { - super(meta, paramDef, async (ps, me) => { - const user = await this.usersRepository.findOneBy({ id: ps.userId }); - - if (user == null) { - throw new Error('user not found'); - } - - await this.usersRepository.update(user.id, { - banner: null, - bannerId: null, - bannerUrl: null, - bannerBlurhash: null, - }); - }); - } -} diff --git a/packages/backend/src/server/api/endpoints/admin/unset-user-avatar.ts b/packages/backend/src/server/api/endpoints/admin/unset-user-avatar.ts new file mode 100644 index 0000000000..ac10f1b6fd --- /dev/null +++ b/packages/backend/src/server/api/endpoints/admin/unset-user-avatar.ts @@ -0,0 +1,60 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { Inject, Injectable } from '@nestjs/common'; +import type { UsersRepository } from '@/models/_.js'; +import { Endpoint } from '@/server/api/endpoint-base.js'; +import { DI } from '@/di-symbols.js'; +import { ModerationLogService } from '@/core/ModerationLogService.js'; + +export const meta = { + tags: ['admin'], + + requireCredential: true, + requireModerator: true, +} as const; + +export const paramDef = { + type: 'object', + properties: { + userId: { type: 'string', format: 'misskey:id' }, + }, + required: ['userId'], +} as const; + +// eslint-disable-next-line import/no-default-export +@Injectable() +export default class extends Endpoint { + constructor( + @Inject(DI.usersRepository) + private usersRepository: UsersRepository, + + private moderationLogService: ModerationLogService, + ) { + super(meta, paramDef, async (ps, me) => { + const user = await this.usersRepository.findOneBy({ id: ps.userId }); + + if (user == null) { + throw new Error('user not found'); + } + + if (user.avatarId == null) return; + + await this.usersRepository.update(user.id, { + avatar: null, + avatarId: null, + avatarUrl: null, + avatarBlurhash: null, + }); + + this.moderationLogService.log(me, 'unsetUserAvatar', { + userId: user.id, + userUsername: user.username, + userHost: user.host, + fileId: user.avatarId, + }); + }); + } +} diff --git a/packages/backend/src/server/api/endpoints/admin/unset-user-banner.ts b/packages/backend/src/server/api/endpoints/admin/unset-user-banner.ts new file mode 100644 index 0000000000..66acd367df --- /dev/null +++ b/packages/backend/src/server/api/endpoints/admin/unset-user-banner.ts @@ -0,0 +1,60 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { Inject, Injectable } from '@nestjs/common'; +import type { UsersRepository } from '@/models/_.js'; +import { Endpoint } from '@/server/api/endpoint-base.js'; +import { DI } from '@/di-symbols.js'; +import { ModerationLogService } from '@/core/ModerationLogService.js'; + +export const meta = { + tags: ['admin'], + + requireCredential: true, + requireModerator: true, +} as const; + +export const paramDef = { + type: 'object', + properties: { + userId: { type: 'string', format: 'misskey:id' }, + }, + required: ['userId'], +} as const; + +// eslint-disable-next-line import/no-default-export +@Injectable() +export default class extends Endpoint { + constructor( + @Inject(DI.usersRepository) + private usersRepository: UsersRepository, + + private moderationLogService: ModerationLogService, + ) { + super(meta, paramDef, async (ps, me) => { + const user = await this.usersRepository.findOneBy({ id: ps.userId }); + + if (user == null) { + throw new Error('user not found'); + } + + if (user.bannerId == null) return; + + await this.usersRepository.update(user.id, { + banner: null, + bannerId: null, + bannerUrl: null, + bannerBlurhash: null, + }); + + this.moderationLogService.log(me, 'unsetUserBanner', { + userId: user.id, + userUsername: user.username, + userHost: user.host, + fileId: user.bannerId, + }); + }); + } +} diff --git a/packages/backend/src/types.ts b/packages/backend/src/types.ts index e6dfeb6f8c..1fb3d6a6ce 100644 --- a/packages/backend/src/types.ts +++ b/packages/backend/src/types.ts @@ -63,6 +63,8 @@ export const moderationLogTypes = [ 'createAvatarDecoration', 'updateAvatarDecoration', 'deleteAvatarDecoration', + 'unsetUserAvatar', + 'unsetUserBanner', ] as const; export type ModerationLogPayloads = { @@ -237,6 +239,18 @@ export type ModerationLogPayloads = { avatarDecorationId: string; avatarDecoration: any; }; + unsetUserAvatar: { + userId: string; + userUsername: string; + userHost: string | null; + fileId: string; + }; + unsetUserBanner: { + userId: string; + userUsername: string; + userHost: string | null; + fileId: string; + }; }; export type Serialized = { diff --git a/packages/frontend/src/pages/admin-user.vue b/packages/frontend/src/pages/admin-user.vue index 9f4975e888..87ebedc296 100644 --- a/packages/frontend/src/pages/admin-user.vue +++ b/packages/frontend/src/pages/admin-user.vue @@ -123,8 +123,8 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ i18n.ts.deleteUserAvatar }} - {{ i18n.ts.deleteUserBanner }} + {{ i18n.ts.unsetUserAvatar }} + {{ i18n.ts.unsetUserBanner }}
{{ i18n.ts.deleteAccount }} @@ -324,14 +324,14 @@ async function toggleSuspend(v) { } } -async function deleteUserAvatar() { +async function unsetUserAvatar() { const confirm = await os.confirm({ type: 'warning', - text: i18n.ts.deleteUserAvatarConfirm, + text: i18n.ts.unsetUserAvatarConfirm, }); if (confirm.canceled) return; const process = async () => { - await os.api('admin/delete-user-avatar', { userId: user.id }); + await os.api('admin/unset-user-avatar', { userId: user.id }); os.success(); }; await process().catch(err => { @@ -343,14 +343,14 @@ async function deleteUserAvatar() { refreshUser(); } -async function deleteUserBanner() { +async function unsetUserBanner() { const confirm = await os.confirm({ type: 'warning', - text: i18n.ts.deleteUserBannerConfirm, + text: i18n.ts.unsetUserBannerConfirm, }); if (confirm.canceled) return; const process = async () => { - await os.api('admin/delete-user-banner', { userId: user.id }); + await os.api('admin/unset-user-banner', { userId: user.id }); os.success(); }; await process().catch(err => { diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index f4bcaa8066..85907de665 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -345,13 +345,13 @@ export type Endpoints = { }; res: null; }; - 'admin/delete-user-avatar': { + 'admin/unset-user-avatar': { req: { userId: User['id']; }; res: null; }; - 'admin/delete-user-banner': { + 'admin/unset-user-banner': { req: { userId: User['id']; }; diff --git a/packages/misskey-js/src/api.types.ts b/packages/misskey-js/src/api.types.ts index e3f28c644e..1a75b7cf57 100644 --- a/packages/misskey-js/src/api.types.ts +++ b/packages/misskey-js/src/api.types.ts @@ -15,8 +15,8 @@ export type Endpoints = { // admin 'admin/abuse-user-reports': { req: TODO; res: TODO; }; 'admin/delete-all-files-of-a-user': { req: { userId: User['id']; }; res: null; }; - 'admin/delete-user-avatar': { req: { userId: User['id']; }; res: null; }; - 'admin/delete-user-banner': { req: { userId: User['id']; }; res: null; }; + 'admin/unset-user-avatar': { req: { userId: User['id']; }; res: null; }; + 'admin/unset-user-banner': { req: { userId: User['id']; }; res: null; }; 'admin/delete-logs': { req: NoParams; res: null; }; 'admin/get-index-stats': { req: TODO; res: TODO; }; 'admin/get-table-stats': { req: TODO; res: TODO; }; diff --git a/packages/misskey-js/src/consts.ts b/packages/misskey-js/src/consts.ts index 48a36a31d6..a8f0b96d5d 100644 --- a/packages/misskey-js/src/consts.ts +++ b/packages/misskey-js/src/consts.ts @@ -81,6 +81,8 @@ export const moderationLogTypes = [ 'createAvatarDecoration', 'updateAvatarDecoration', 'deleteAvatarDecoration', + 'unsetUserAvatar', + 'unsetUserBanner', ] as const; export type ModerationLogPayloads = { @@ -255,4 +257,16 @@ export type ModerationLogPayloads = { avatarDecorationId: string; avatarDecoration: any; }; + unsetUserAvatar: { + userId: string; + userUsername: string; + userHost: string | null; + fileId: string; + }; + unsetUserBanner: { + userId: string; + userUsername: string; + userHost: string | null; + fileId: string; + }; }; diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts index a0d0b7528d..a51315b13b 100644 --- a/packages/misskey-js/src/entities.ts +++ b/packages/misskey-js/src/entities.ts @@ -727,4 +727,10 @@ export type ModerationLog = { } | { type: 'resolveAbuseReport'; info: ModerationLogPayloads['resolveAbuseReport']; +} | { + type: 'unsetUserAvatar'; + info: ModerationLogPayloads['unsetUserAvatar']; +} | { + type: 'unsetUserBanner'; + info: ModerationLogPayloads['unsetUserBanner']; }); -- cgit v1.2.3-freya From ed0cc443ea8122d01488f427bcced457d3d65d4f Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 21 Nov 2023 09:55:49 +0900 Subject: fix(backend): ロールタイムラインが保存されない問題を修正 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- packages/backend/src/core/RoleService.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index e2c226aec0..aff2ed283e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ - ### Server -- +- Fix: ロールタイムラインが保存されない問題を修正 ## 2023.11.1 diff --git a/packages/backend/src/core/RoleService.ts b/packages/backend/src/core/RoleService.ts index d6a414694a..432887b3b7 100644 --- a/packages/backend/src/core/RoleService.ts +++ b/packages/backend/src/core/RoleService.ts @@ -87,6 +87,9 @@ export class RoleService implements OnApplicationShutdown { @Inject(DI.redis) private redisClient: Redis.Redis, + @Inject(DI.redisForTimelines) + private redisForTimelines: Redis.Redis, + @Inject(DI.redisForSub) private redisForSub: Redis.Redis, @@ -476,7 +479,7 @@ export class RoleService implements OnApplicationShutdown { public async addNoteToRoleTimeline(note: Packed<'Note'>): Promise { const roles = await this.getUserRoles(note.userId); - const redisPipeline = this.redisClient.pipeline(); + const redisPipeline = this.redisForTimelines.pipeline(); for (const role of roles) { this.funoutTimelineService.push(`roleTimeline:${role.id}`, note.id, 1000, redisPipeline); -- cgit v1.2.3-freya From 8bd9077f77eaebaa4dff403e072ba49e4cab1326 Mon Sep 17 00:00:00 2001 From: おさむのひと <46447427+samunohito@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:13:56 +0900 Subject: json-schema配下の最新化 (#12312) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * user.ts、page.ts、drive-folder.tsを各EntityServiceの戻り値をもとに最新化 * 再確認 * fix error * note以外の残りのファイルを対応 * fix CHANGELOG.md * fix CHANGELOG.md * fix user.ts * fix user.ts * コメント対応 * fix note.ts --------- Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> --- CHANGELOG.md | 1 + .../src/core/entities/NotificationEntityService.ts | 14 +- .../backend/src/models/json-schema/announcement.ts | 8 +- packages/backend/src/models/json-schema/channel.ts | 57 ++-- packages/backend/src/models/json-schema/clip.ts | 8 +- .../backend/src/models/json-schema/drive-file.ts | 2 +- .../backend/src/models/json-schema/drive-folder.ts | 12 +- .../src/models/json-schema/federation-instance.ts | 9 +- packages/backend/src/models/json-schema/flash.ts | 18 +- .../backend/src/models/json-schema/following.ts | 10 +- .../backend/src/models/json-schema/gallery-post.ts | 24 +- packages/backend/src/models/json-schema/note.ts | 28 +- .../backend/src/models/json-schema/notification.ts | 26 +- packages/backend/src/models/json-schema/page.ts | 66 ++++- packages/backend/src/models/json-schema/user.ts | 311 ++++++++++++++++++--- 15 files changed, 451 insertions(+), 143 deletions(-) (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index cc38356284..2efa1b230d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - Feat: 管理者がコントロールパネルからメールアドレスの照会を行えるようになりました - Enhance: ローカリゼーションの更新 - Enhance: 依存関係の更新 +- Enhance: json-schema(OpenAPIの戻り値として使用されるスキーマ定義)を出来る限り最新化 #12311 ### Client - Enhance: MFMでルビを振れるように diff --git a/packages/backend/src/core/entities/NotificationEntityService.ts b/packages/backend/src/core/entities/NotificationEntityService.ts index f74594ff0c..e723ea5a55 100644 --- a/packages/backend/src/core/entities/NotificationEntityService.ts +++ b/packages/backend/src/core/entities/NotificationEntityService.ts @@ -198,12 +198,14 @@ export class NotificationEntityService implements OnModuleInit { }); } else if (notification.type === 'renote:grouped') { const users = await Promise.all(notification.userIds.map(userId => { - const user = hint?.packedUsers != null - ? hint.packedUsers.get(userId) - : this.userEntityService.pack(userId!, { id: meId }, { - detail: false, - }); - return user; + const packedUser = hint?.packedUsers != null ? hint.packedUsers.get(userId) : null; + if (packedUser) { + return packedUser; + } + + return this.userEntityService.pack(userId, { id: meId }, { + detail: false, + }); })); return await awaitAll({ id: notification.id, diff --git a/packages/backend/src/models/json-schema/announcement.ts b/packages/backend/src/models/json-schema/announcement.ts index c7e24c7f29..78a98872b2 100644 --- a/packages/backend/src/models/json-schema/announcement.ts +++ b/packages/backend/src/models/json-schema/announcement.ts @@ -42,11 +42,15 @@ export const packedAnnouncementSchema = { type: 'string', optional: false, nullable: false, }, - forYou: { + needConfirmationToRead: { type: 'boolean', optional: false, nullable: false, }, - needConfirmationToRead: { + silence: { + type: 'boolean', + optional: false, nullable: false, + }, + forYou: { type: 'boolean', optional: false, nullable: false, }, diff --git a/packages/backend/src/models/json-schema/channel.ts b/packages/backend/src/models/json-schema/channel.ts index 8f9770cdc5..5b0fa0f15d 100644 --- a/packages/backend/src/models/json-schema/channel.ts +++ b/packages/backend/src/models/json-schema/channel.ts @@ -19,7 +19,7 @@ export const packedChannelSchema = { }, lastNotedAt: { type: 'string', - optional: false, nullable: true, + nullable: true, optional: false, format: 'date-time', }, name: { @@ -27,26 +27,51 @@ export const packedChannelSchema = { optional: false, nullable: false, }, description: { + type: 'string', + optional: false, nullable: true, + }, + userId: { type: 'string', nullable: true, optional: false, + format: 'id', }, bannerUrl: { type: 'string', format: 'url', nullable: true, optional: false, }, + pinnedNoteIds: { + type: 'array', + nullable: false, optional: false, + items: { + type: 'string', + format: 'id', + }, + }, + color: { + type: 'string', + optional: false, nullable: false, + }, isArchived: { type: 'boolean', optional: false, nullable: false, }, - notesCount: { + usersCount: { type: 'number', nullable: false, optional: false, }, - usersCount: { + notesCount: { type: 'number', nullable: false, optional: false, }, + isSensitive: { + type: 'boolean', + optional: false, nullable: false, + }, + allowRenoteToExternal: { + type: 'boolean', + optional: false, nullable: false, + }, isFollowing: { type: 'boolean', optional: true, nullable: false, @@ -55,30 +80,14 @@ export const packedChannelSchema = { type: 'boolean', optional: true, nullable: false, }, - userId: { - type: 'string', - nullable: true, optional: false, - format: 'id', - }, - pinnedNoteIds: { + pinnedNotes: { type: 'array', - nullable: false, optional: false, + optional: true, nullable: false, items: { - type: 'string', - format: 'id', + type: 'object', + optional: false, nullable: false, + ref: 'Note', }, }, - color: { - type: 'string', - optional: false, nullable: false, - }, - isSensitive: { - type: 'boolean', - optional: false, nullable: false, - }, - allowRenoteToExternal: { - type: 'boolean', - optional: false, nullable: false, - }, }, } as const; diff --git a/packages/backend/src/models/json-schema/clip.ts b/packages/backend/src/models/json-schema/clip.ts index 64f7a2ad9c..1ab96c2b3b 100644 --- a/packages/backend/src/models/json-schema/clip.ts +++ b/packages/backend/src/models/json-schema/clip.ts @@ -44,13 +44,13 @@ export const packedClipSchema = { type: 'boolean', optional: false, nullable: false, }, - isFavorited: { - type: 'boolean', - optional: true, nullable: false, - }, favoritedCount: { type: 'number', optional: false, nullable: false, }, + isFavorited: { + type: 'boolean', + optional: true, nullable: false, + }, }, } as const; diff --git a/packages/backend/src/models/json-schema/drive-file.ts b/packages/backend/src/models/json-schema/drive-file.ts index 87f1340812..79f242a711 100644 --- a/packages/backend/src/models/json-schema/drive-file.ts +++ b/packages/backend/src/models/json-schema/drive-file.ts @@ -74,7 +74,7 @@ export const packedDriveFileSchema = { }, url: { type: 'string', - optional: false, nullable: true, + optional: false, nullable: false, format: 'url', }, thumbnailUrl: { diff --git a/packages/backend/src/models/json-schema/drive-folder.ts b/packages/backend/src/models/json-schema/drive-folder.ts index 51107d423f..aaad301303 100644 --- a/packages/backend/src/models/json-schema/drive-folder.ts +++ b/packages/backend/src/models/json-schema/drive-folder.ts @@ -21,6 +21,12 @@ export const packedDriveFolderSchema = { type: 'string', optional: false, nullable: false, }, + parentId: { + type: 'string', + optional: false, nullable: true, + format: 'id', + example: 'xxxxxxxxxx', + }, foldersCount: { type: 'number', optional: true, nullable: false, @@ -29,12 +35,6 @@ export const packedDriveFolderSchema = { type: 'number', optional: true, nullable: false, }, - parentId: { - type: 'string', - optional: false, nullable: true, - format: 'id', - example: 'xxxxxxxxxx', - }, parent: { type: 'object', optional: true, nullable: true, diff --git a/packages/backend/src/models/json-schema/federation-instance.ts b/packages/backend/src/models/json-schema/federation-instance.ts index 442e1076f2..3417314272 100644 --- a/packages/backend/src/models/json-schema/federation-instance.ts +++ b/packages/backend/src/models/json-schema/federation-instance.ts @@ -79,6 +79,10 @@ export const packedFederationInstanceSchema = { type: 'string', optional: false, nullable: true, }, + isSilenced: { + type: 'boolean', + optional: false, nullable: false, + }, iconUrl: { type: 'string', optional: false, nullable: true, @@ -93,11 +97,6 @@ export const packedFederationInstanceSchema = { type: 'string', optional: false, nullable: true, }, - isSilenced: { - type: "boolean", - optional: false, - nullable: false, - }, infoUpdatedAt: { type: 'string', optional: false, nullable: true, diff --git a/packages/backend/src/models/json-schema/flash.ts b/packages/backend/src/models/json-schema/flash.ts index 9453ba1dce..f08fa7a279 100644 --- a/packages/backend/src/models/json-schema/flash.ts +++ b/packages/backend/src/models/json-schema/flash.ts @@ -22,26 +22,26 @@ export const packedFlashSchema = { optional: false, nullable: false, format: 'date-time', }, - title: { + userId: { type: 'string', optional: false, nullable: false, + format: 'id', }, - summary: { - type: 'string', + user: { + type: 'object', + ref: 'UserLite', optional: false, nullable: false, }, - script: { + title: { type: 'string', optional: false, nullable: false, }, - userId: { + summary: { type: 'string', optional: false, nullable: false, - format: 'id', }, - user: { - type: 'object', - ref: 'UserLite', + script: { + type: 'string', optional: false, nullable: false, }, likedCount: { diff --git a/packages/backend/src/models/json-schema/following.ts b/packages/backend/src/models/json-schema/following.ts index 3a24ebb619..e92cff20a1 100644 --- a/packages/backend/src/models/json-schema/following.ts +++ b/packages/backend/src/models/json-schema/following.ts @@ -22,16 +22,16 @@ export const packedFollowingSchema = { optional: false, nullable: false, format: 'id', }, - followee: { - type: 'object', - optional: true, nullable: false, - ref: 'UserDetailed', - }, followerId: { type: 'string', optional: false, nullable: false, format: 'id', }, + followee: { + type: 'object', + optional: true, nullable: false, + ref: 'UserDetailed', + }, follower: { type: 'object', optional: true, nullable: false, diff --git a/packages/backend/src/models/json-schema/gallery-post.ts b/packages/backend/src/models/json-schema/gallery-post.ts index cf260c0bf5..df7038950c 100644 --- a/packages/backend/src/models/json-schema/gallery-post.ts +++ b/packages/backend/src/models/json-schema/gallery-post.ts @@ -22,14 +22,6 @@ export const packedGalleryPostSchema = { optional: false, nullable: false, format: 'date-time', }, - title: { - type: 'string', - optional: false, nullable: false, - }, - description: { - type: 'string', - optional: false, nullable: true, - }, userId: { type: 'string', optional: false, nullable: false, @@ -40,6 +32,14 @@ export const packedGalleryPostSchema = { ref: 'UserLite', optional: false, nullable: false, }, + title: { + type: 'string', + optional: false, nullable: false, + }, + description: { + type: 'string', + optional: false, nullable: true, + }, fileIds: { type: 'array', optional: true, nullable: false, @@ -70,5 +70,13 @@ export const packedGalleryPostSchema = { type: 'boolean', optional: false, nullable: false, }, + likedCount: { + type: 'number', + optional: false, nullable: false, + }, + isLiked: { + type: 'boolean', + optional: true, nullable: false, + }, }, } as const; diff --git a/packages/backend/src/models/json-schema/note.ts b/packages/backend/src/models/json-schema/note.ts index 38c0054b55..9d5d558f51 100644 --- a/packages/backend/src/models/json-schema/note.ts +++ b/packages/backend/src/models/json-schema/note.ts @@ -127,22 +127,18 @@ export const packedNoteSchema = { channel: { type: 'object', optional: true, nullable: true, - items: { - type: 'object', - optional: false, nullable: false, - properties: { - id: { - type: 'string', - optional: false, nullable: false, - }, - name: { - type: 'string', - optional: false, nullable: true, - }, - isSensitive: { - type: 'boolean', - optional: true, nullable: false, - }, + properties: { + id: { + type: 'string', + optional: false, nullable: false, + }, + name: { + type: 'string', + optional: false, nullable: true, + }, + isSensitive: { + type: 'boolean', + optional: true, nullable: false, }, }, }, diff --git a/packages/backend/src/models/json-schema/notification.ts b/packages/backend/src/models/json-schema/notification.ts index 27db3bb62c..c6d6e84317 100644 --- a/packages/backend/src/models/json-schema/notification.ts +++ b/packages/backend/src/models/json-schema/notification.ts @@ -42,13 +42,9 @@ export const packedNotificationSchema = { type: 'string', optional: true, nullable: true, }, - choice: { - type: 'number', - optional: true, nullable: true, - }, - invitation: { - type: 'object', - optional: true, nullable: true, + achievement: { + type: 'string', + optional: true, nullable: false, }, body: { type: 'string', @@ -81,14 +77,14 @@ export const packedNotificationSchema = { required: ['user', 'reaction'], }, }, - }, - users: { - type: 'array', - optional: true, nullable: true, - items: { - type: 'object', - ref: 'UserLite', - optional: false, nullable: false, + users: { + type: 'array', + optional: true, nullable: true, + items: { + type: 'object', + ref: 'UserLite', + optional: false, nullable: false, + }, }, }, } as const; diff --git a/packages/backend/src/models/json-schema/page.ts b/packages/backend/src/models/json-schema/page.ts index 3f20a4b802..9baacd6884 100644 --- a/packages/backend/src/models/json-schema/page.ts +++ b/packages/backend/src/models/json-schema/page.ts @@ -22,6 +22,32 @@ export const packedPageSchema = { optional: false, nullable: false, format: 'date-time', }, + userId: { + type: 'string', + optional: false, nullable: false, + format: 'id', + }, + user: { + type: 'object', + ref: 'UserLite', + optional: false, nullable: false, + }, + content: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + optional: false, nullable: false, + }, + }, + variables: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + optional: false, nullable: false, + }, + }, title: { type: 'string', optional: false, nullable: false, @@ -34,23 +60,47 @@ export const packedPageSchema = { type: 'string', optional: false, nullable: true, }, - content: { - type: 'array', + hideTitleWhenPinned: { + type: 'boolean', optional: false, nullable: false, }, - variables: { - type: 'array', + alignCenter: { + type: 'boolean', optional: false, nullable: false, }, - userId: { + font: { type: 'string', optional: false, nullable: false, - format: 'id', }, - user: { + script: { + type: 'string', + optional: false, nullable: false, + }, + eyeCatchingImageId: { + type: 'string', + optional: false, nullable: true, + }, + eyeCatchingImage: { type: 'object', - ref: 'UserLite', + optional: false, nullable: true, + ref: 'DriveFile', + }, + attachedFiles: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + optional: false, nullable: false, + ref: 'DriveFile', + }, + }, + likedCount: { + type: 'number', optional: false, nullable: false, }, + isLiked: { + type: 'boolean', + optional: true, nullable: false, + }, }, } as const; diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index 37bdcbe281..b0e18db01a 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -49,11 +49,6 @@ export const packedUserLiteSchema = { nullable: false, optional: false, format: 'id', }, - url: { - type: 'string', - format: 'url', - nullable: false, optional: false, - }, angle: { type: 'number', nullable: false, optional: true, @@ -62,33 +57,83 @@ export const packedUserLiteSchema = { type: 'boolean', nullable: false, optional: true, }, + url: { + type: 'string', + format: 'url', + nullable: false, optional: false, + }, }, }, }, - isAdmin: { + isBot: { type: 'boolean', nullable: false, optional: true, - default: false, }, - isModerator: { + isCat: { type: 'boolean', nullable: false, optional: true, - default: false, }, - isBot: { - type: 'boolean', + instance: { + type: 'object', nullable: false, optional: true, + properties: { + name: { + type: 'string', + nullable: true, optional: false, + }, + softwareName: { + type: 'string', + nullable: true, optional: false, + }, + softwareVersion: { + type: 'string', + nullable: true, optional: false, + }, + iconUrl: { + type: 'string', + nullable: true, optional: false, + }, + faviconUrl: { + type: 'string', + nullable: true, optional: false, + }, + themeColor: { + type: 'string', + nullable: true, optional: false, + }, + }, }, - isCat: { - type: 'boolean', - nullable: false, optional: true, + emojis: { + type: 'object', + nullable: false, optional: false, }, onlineStatus: { type: 'string', - format: 'url', - nullable: true, optional: false, + nullable: false, optional: false, enum: ['unknown', 'online', 'active', 'offline'], }, + badgeRoles: { + type: 'array', + nullable: false, optional: true, + items: { + type: 'object', + nullable: false, optional: false, + properties: { + name: { + type: 'string', + nullable: false, optional: false, + }, + iconUrl: { + type: 'string', + nullable: true, optional: false, + }, + displayOrder: { + type: 'number', + nullable: false, optional: false, + }, + }, + }, + }, }, } as const; @@ -105,21 +150,18 @@ export const packedUserDetailedNotMeOnlySchema = { format: 'uri', nullable: true, optional: false, }, - movedToUri: { + movedTo: { type: 'string', format: 'uri', - nullable: true, - optional: false, + nullable: true, optional: false, }, alsoKnownAs: { type: 'array', - nullable: true, - optional: false, + nullable: true, optional: false, items: { type: 'string', format: 'id', - nullable: false, - optional: false, + nullable: false, optional: false, }, }, createdAt: { @@ -249,6 +291,11 @@ export const packedUserDetailedNotMeOnlySchema = { type: 'boolean', nullable: false, optional: false, }, + ffVisibility: { + type: 'string', + nullable: false, optional: false, + enum: ['public', 'followers', 'private'], + }, twoFactorEnabled: { type: 'boolean', nullable: false, optional: false, @@ -264,6 +311,57 @@ export const packedUserDetailedNotMeOnlySchema = { nullable: false, optional: false, default: false, }, + roles: { + type: 'array', + nullable: false, optional: false, + items: { + type: 'object', + nullable: false, optional: false, + properties: { + id: { + type: 'string', + nullable: false, optional: false, + format: 'id', + }, + name: { + type: 'string', + nullable: false, optional: false, + }, + color: { + type: 'string', + nullable: true, optional: false, + }, + iconUrl: { + type: 'string', + nullable: true, optional: false, + }, + description: { + type: 'string', + nullable: false, optional: false, + }, + isModerator: { + type: 'boolean', + nullable: false, optional: false, + }, + isAdministrator: { + type: 'boolean', + nullable: false, optional: false, + }, + displayOrder: { + type: 'number', + nullable: false, optional: false, + }, + }, + }, + }, + memo: { + type: 'string', + nullable: true, optional: false, + }, + moderationNote: { + type: 'string', + nullable: false, optional: true, + }, //#region relations isFollowing: { type: 'boolean', @@ -297,10 +395,6 @@ export const packedUserDetailedNotMeOnlySchema = { type: 'boolean', nullable: false, optional: true, }, - memo: { - type: 'string', - nullable: false, optional: true, - }, notify: { type: 'string', nullable: false, optional: true, @@ -326,29 +420,37 @@ export const packedMeDetailedOnlySchema = { nullable: true, optional: false, format: 'id', }, - injectFeaturedNote: { + isModerator: { type: 'boolean', nullable: true, optional: false, }, - receiveAnnouncementEmail: { + isAdmin: { type: 'boolean', nullable: true, optional: false, }, + injectFeaturedNote: { + type: 'boolean', + nullable: false, optional: false, + }, + receiveAnnouncementEmail: { + type: 'boolean', + nullable: false, optional: false, + }, alwaysMarkNsfw: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, }, autoSensitive: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, }, carefulBot: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, }, autoAcceptFollowed: { type: 'boolean', - nullable: true, optional: false, + nullable: false, optional: false, }, noCrawle: { type: 'boolean', @@ -387,10 +489,23 @@ export const packedMeDetailedOnlySchema = { type: 'boolean', nullable: false, optional: false, }, + unreadAnnouncements: { + type: 'array', + nullable: false, optional: false, + items: { + type: 'object', + nullable: false, optional: false, + ref: 'Announcement', + }, + }, hasUnreadAntenna: { type: 'boolean', nullable: false, optional: false, }, + hasUnreadChannel: { + type: 'boolean', + nullable: false, optional: false, + }, hasUnreadNotification: { type: 'boolean', nullable: false, optional: false, @@ -429,12 +544,132 @@ export const packedMeDetailedOnlySchema = { }, emailNotificationTypes: { type: 'array', - nullable: true, optional: false, + nullable: false, optional: false, items: { type: 'string', nullable: false, optional: false, }, }, + achievements: { + type: 'array', + nullable: false, optional: false, + items: { + type: 'object', + nullable: false, optional: false, + properties: { + name: { + type: 'string', + nullable: false, optional: false, + }, + unlockedAt: { + type: 'number', + nullable: false, optional: false, + }, + }, + }, + }, + loggedInDays: { + type: 'number', + nullable: false, optional: false, + }, + policies: { + type: 'object', + nullable: false, optional: false, + properties: { + gtlAvailable: { + type: 'boolean', + nullable: false, optional: false, + }, + ltlAvailable: { + type: 'boolean', + nullable: false, optional: false, + }, + canPublicNote: { + type: 'boolean', + nullable: false, optional: false, + }, + canInvite: { + type: 'boolean', + nullable: false, optional: false, + }, + inviteLimit: { + type: 'number', + nullable: false, optional: false, + }, + inviteLimitCycle: { + type: 'number', + nullable: false, optional: false, + }, + inviteExpirationTime: { + type: 'number', + nullable: false, optional: false, + }, + canManageCustomEmojis: { + type: 'boolean', + nullable: false, optional: false, + }, + canManageAvatarDecorations: { + type: 'boolean', + nullable: false, optional: false, + }, + canSearchNotes: { + type: 'boolean', + nullable: false, optional: false, + }, + canUseTranslator: { + type: 'boolean', + nullable: false, optional: false, + }, + canHideAds: { + type: 'boolean', + nullable: false, optional: false, + }, + driveCapacityMb: { + type: 'number', + nullable: false, optional: false, + }, + alwaysMarkNsfw: { + type: 'boolean', + nullable: false, optional: false, + }, + pinLimit: { + type: 'number', + nullable: false, optional: false, + }, + antennaLimit: { + type: 'number', + nullable: false, optional: false, + }, + wordMuteLimit: { + type: 'number', + nullable: false, optional: false, + }, + webhookLimit: { + type: 'number', + nullable: false, optional: false, + }, + clipLimit: { + type: 'number', + nullable: false, optional: false, + }, + noteEachClipsLimit: { + type: 'number', + nullable: false, optional: false, + }, + userListLimit: { + type: 'number', + nullable: false, optional: false, + }, + userEachUserListsLimit: { + type: 'number', + nullable: false, optional: false, + }, + rateLimitFactor: { + type: 'number', + nullable: false, optional: false, + }, + }, + }, //#region secrets email: { type: 'string', @@ -511,5 +746,13 @@ export const packedUserSchema = { type: 'object', ref: 'UserDetailed', }, + { + type: 'object', + ref: 'UserDetailedNotMe', + }, + { + type: 'object', + ref: 'MeDetailed', + }, ], } as const; -- cgit v1.2.3-freya From b5be0e5780453653ca37ea809c36757057a21758 Mon Sep 17 00:00:00 2001 From: おさむのひと <46447427+samunohito@users.noreply.github.com> Date: Tue, 21 Nov 2023 15:12:05 +0900 Subject: note.tsのchannelを正しい形にしたことにより表出化した型チェックエラーを修正 (#12395) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> --- packages/backend/src/models/json-schema/note.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/models/json-schema/note.ts b/packages/backend/src/models/json-schema/note.ts index 9d5d558f51..392fa7e1cb 100644 --- a/packages/backend/src/models/json-schema/note.ts +++ b/packages/backend/src/models/json-schema/note.ts @@ -134,11 +134,19 @@ export const packedNoteSchema = { }, name: { type: 'string', - optional: false, nullable: true, + optional: false, nullable: false, + }, + color: { + type: 'string', + optional: false, nullable: false, }, isSensitive: { type: 'boolean', - optional: true, nullable: false, + optional: false, nullable: false, + }, + allowRenoteToExternal: { + type: 'boolean', + optional: false, nullable: false, }, }, }, -- cgit v1.2.3-freya From b3d1cc9525b44e37b983c3a97af4e2aea80ea735 Mon Sep 17 00:00:00 2001 From: おさむのひと <46447427+samunohito@users.noreply.github.com> Date: Tue, 21 Nov 2023 15:32:34 +0900 Subject: サーバ起動時にアンテナが非アクティブだった場合、アクティブ化しても再起動するまで反映されない (#12391) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * サーバ起動時にアンテナが非アクティブだった場合、アクティブ化しても再起動するまで反映されない * Fix CHANGELOG.md * lastUsedAtの更新に不備が出るので修正 --------- Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> --- CHANGELOG.md | 1 + packages/backend/src/core/AntennaService.ts | 20 +++++++++++++++----- .../src/server/api/endpoints/antennas/notes.ts | 16 ++++++++++++---- 3 files changed, 28 insertions(+), 9 deletions(-) (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index 2efa1b230d..900d042eaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - fix: 「設定のバックアップ」で一部の項目がバックアップに含まれていなかった問題を修正 ### Server +- Fix: 時間経過により無効化されたアンテナを再有効化したとき、サーバ再起動までその状況が反映されないのを修正 #12303 - Fix: ロールタイムラインが保存されない問題を修正 ## 2023.11.1 diff --git a/packages/backend/src/core/AntennaService.ts b/packages/backend/src/core/AntennaService.ts index 65be275548..2815d24734 100644 --- a/packages/backend/src/core/AntennaService.ts +++ b/packages/backend/src/core/AntennaService.ts @@ -60,11 +60,21 @@ export class AntennaService implements OnApplicationShutdown { lastUsedAt: new Date(body.lastUsedAt), }); break; - case 'antennaUpdated': - this.antennas[this.antennas.findIndex(a => a.id === body.id)] = { - ...body, - lastUsedAt: new Date(body.lastUsedAt), - }; + case 'antennaUpdated': { + const idx = this.antennas.findIndex(a => a.id === body.id); + if (idx >= 0) { + this.antennas[idx] = { + ...body, + lastUsedAt: new Date(body.lastUsedAt), + }; + } else { + // サーバ起動時にactiveじゃなかった場合、リストに持っていないので追加する必要あり + this.antennas.push({ + ...body, + lastUsedAt: new Date(body.lastUsedAt), + }); + } + } break; case 'antennaDeleted': this.antennas = this.antennas.filter(a => a.id !== body.id); diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts index 9b5911800c..29e56b1085 100644 --- a/packages/backend/src/server/api/endpoints/antennas/notes.ts +++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts @@ -13,6 +13,7 @@ import { DI } from '@/di-symbols.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { IdService } from '@/core/IdService.js'; import { FunoutTimelineService } from '@/core/FunoutTimelineService.js'; +import { GlobalEventService } from '@/core/GlobalEventService.js'; import { ApiError } from '../../error.js'; export const meta = { @@ -71,6 +72,7 @@ export default class extends Endpoint { // eslint- private queryService: QueryService, private noteReadService: NoteReadService, private funoutTimelineService: FunoutTimelineService, + private globalEventService: GlobalEventService, ) { super(meta, paramDef, async (ps, me) => { const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null); @@ -85,10 +87,16 @@ export default class extends Endpoint { // eslint- throw new ApiError(meta.errors.noSuchAntenna); } - this.antennasRepository.update(antenna.id, { - isActive: true, - lastUsedAt: new Date(), - }); + // falseだった場合はアンテナの配信先が増えたことを通知したい + const needPublishEvent = !antenna.isActive; + + antenna.isActive = true; + antenna.lastUsedAt = new Date(); + this.antennasRepository.update(antenna.id, antenna); + + if (needPublishEvent) { + this.globalEventService.publishInternalEvent('antennaUpdated', antenna); + } let noteIds = await this.funoutTimelineService.get(`antennaTimeline:${antenna.id}`, untilId, sinceId); noteIds = noteIds.slice(0, ps.limit); -- cgit v1.2.3-freya From 481bca4cf2e8f13a46654770291b7ee31a1c361e Mon Sep 17 00:00:00 2001 From: nenohi Date: Tue, 21 Nov 2023 19:50:06 +0900 Subject: 広告掲載ページにてfilterをわかりやすく (#12385) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/server/api/endpoints/admin/ad/list.ts | 6 ++- packages/frontend/src/pages/admin/ads.vue | 50 ++++++++++++++-------- 2 files changed, 35 insertions(+), 21 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/server/api/endpoints/admin/ad/list.ts b/packages/backend/src/server/api/endpoints/admin/ad/list.ts index 29eff89523..1366fbf76a 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/list.ts @@ -22,7 +22,7 @@ export const paramDef = { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, - publishing: { type: 'boolean', default: false }, + publishing: { type: 'boolean', default: null, nullable: true}, }, required: [], } as const; @@ -37,8 +37,10 @@ export default class extends Endpoint { // eslint- ) { super(meta, paramDef, async (ps, me) => { const query = this.queryService.makePaginationQuery(this.adsRepository.createQueryBuilder('ad'), ps.sinceId, ps.untilId); - if (ps.publishing) { + if (ps.publishing === true) { query.andWhere('ad.expiresAt > :now', { now: new Date() }).andWhere('ad.startsAt <= :now', { now: new Date() }); + } else if (ps.publishing === false) { + query.andWhere('ad.expiresAt <= :now', { now: new Date() }).orWhere('ad.startsAt > :now', { now: new Date() }); } const ads = await query.limit(ps.limit).getMany(); diff --git a/packages/frontend/src/pages/admin/ads.vue b/packages/frontend/src/pages/admin/ads.vue index 6e07585fdc..1ce99d4ba5 100644 --- a/packages/frontend/src/pages/admin/ads.vue +++ b/packages/frontend/src/pages/admin/ads.vue @@ -9,12 +9,15 @@ SPDX-License-Identifier: AGPL-3.0-only - - {{ i18n.ts.publishing }} - + + + + + +
- + @@ -82,14 +85,14 @@ SPDX-License-Identifier: AGPL-3.0-only + + diff --git a/packages/frontend/src/widgets/index.ts b/packages/frontend/src/widgets/index.ts index 405c49ab06..36925e1bd8 100644 --- a/packages/frontend/src/widgets/index.ts +++ b/packages/frontend/src/widgets/index.ts @@ -33,6 +33,7 @@ export default function(app: App) { app.component('WidgetAichan', defineAsyncComponent(() => import('./WidgetAichan.vue'))); app.component('WidgetUserList', defineAsyncComponent(() => import('./WidgetUserList.vue'))); app.component('WidgetClicker', defineAsyncComponent(() => import('./WidgetClicker.vue'))); + app.component('WidgetBirthdayFollowings', defineAsyncComponent(() => import('./WidgetBirthdayFollowings.vue'))); } export const widgets = [ @@ -63,4 +64,5 @@ export const widgets = [ 'aichan', 'userList', 'clicker', + 'birthdayFollowings', ]; -- cgit v1.2.3-freya From ca424df80e3072ee5f3971f0c3e97e7d3f34b57c Mon Sep 17 00:00:00 2001 From: yupix Date: Thu, 30 Nov 2023 15:56:25 +0900 Subject: fix: invite系の戻り値が間違っている close #12517 (#12518) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/server/api/endpoints/admin/invite/create.ts | 8 +------- packages/backend/src/server/api/endpoints/admin/invite/list.ts | 1 + packages/backend/src/server/api/endpoints/invite/create.ts | 8 +------- packages/backend/src/server/api/endpoints/invite/list.ts | 2 +- 4 files changed, 4 insertions(+), 15 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/server/api/endpoints/admin/invite/create.ts b/packages/backend/src/server/api/endpoints/admin/invite/create.ts index 4a22fd4824..c6ee45735e 100644 --- a/packages/backend/src/server/api/endpoints/admin/invite/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/invite/create.ts @@ -33,13 +33,7 @@ export const meta = { items: { type: 'object', optional: false, nullable: false, - properties: { - code: { - type: 'string', - optional: false, nullable: false, - example: 'GR6S02ERUA5VR', - }, - }, + ref: 'InviteCode', }, }, } as const; diff --git a/packages/backend/src/server/api/endpoints/admin/invite/list.ts b/packages/backend/src/server/api/endpoints/admin/invite/list.ts index f25d3fcb33..ff57940d48 100644 --- a/packages/backend/src/server/api/endpoints/admin/invite/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/invite/list.ts @@ -21,6 +21,7 @@ export const meta = { items: { type: 'object', optional: false, nullable: false, + ref: 'InviteCode', }, }, } as const; diff --git a/packages/backend/src/server/api/endpoints/invite/create.ts b/packages/backend/src/server/api/endpoints/invite/create.ts index 94836283fa..d82fa50e4f 100644 --- a/packages/backend/src/server/api/endpoints/invite/create.ts +++ b/packages/backend/src/server/api/endpoints/invite/create.ts @@ -31,13 +31,7 @@ export const meta = { res: { type: 'object', optional: false, nullable: false, - properties: { - code: { - type: 'string', - optional: false, nullable: false, - example: 'GR6S02ERUA5VR', - }, - }, + ref: 'InviteCode', }, } as const; diff --git a/packages/backend/src/server/api/endpoints/invite/list.ts b/packages/backend/src/server/api/endpoints/invite/list.ts index 06139b6806..2107516ce4 100644 --- a/packages/backend/src/server/api/endpoints/invite/list.ts +++ b/packages/backend/src/server/api/endpoints/invite/list.ts @@ -9,7 +9,6 @@ import type { RegistrationTicketsRepository } from '@/models/_.js'; import { InviteCodeEntityService } from '@/core/entities/InviteCodeEntityService.js'; import { QueryService } from '@/core/QueryService.js'; import { DI } from '@/di-symbols.js'; -import { ApiError } from '../../error.js'; export const meta = { tags: ['meta'], @@ -23,6 +22,7 @@ export const meta = { items: { type: 'object', optional: false, nullable: false, + ref: 'InviteCode', }, }, } as const; -- cgit v1.2.3-freya From da0ecb650e55c46c4878d9f0200109b4bd7cc4c8 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Sat, 2 Dec 2023 12:04:30 +0900 Subject: chore: フォローしたときにHTLをパージしなくする (#12522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/UserFollowingService.ts | 4 ---- 1 file changed, 4 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/core/UserFollowingService.ts b/packages/backend/src/core/UserFollowingService.ts index 3062999c08..d600ffb9d9 100644 --- a/packages/backend/src/core/UserFollowingService.ts +++ b/packages/backend/src/core/UserFollowingService.ts @@ -304,8 +304,6 @@ export class UserFollowingService implements OnModuleInit { }); } }); - - this.fanoutTimelineService.purge(`homeTimeline:${follower.id}`); } // Publish followed event @@ -373,8 +371,6 @@ export class UserFollowingService implements OnModuleInit { }); } }); - - this.fanoutTimelineService.purge(`homeTimeline:${follower.id}`); } if (this.userEntityService.isLocalUser(follower) && this.userEntityService.isRemoteUser(followee)) { -- cgit v1.2.3-freya From b6b838416d40c96a58dfcf271287ccea0400f9a1 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Sat, 2 Dec 2023 12:05:53 +0900 Subject: chore: remove unimplemented excludeNsfw (#12520) --- packages/backend/src/server/api/endpoints/notes/local-timeline.ts | 1 - packages/backend/src/server/api/endpoints/users/notes.ts | 1 - .../frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts | 2 -- packages/frontend/src/pages/user/index.files.vue | 1 - 4 files changed, 5 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index 7d8dec7b8f..8867070055 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -48,7 +48,6 @@ export const paramDef = { withFiles: { type: 'boolean', default: false }, withRenotes: { type: 'boolean', default: true }, withReplies: { type: 'boolean', default: false }, - excludeNsfw: { type: 'boolean', default: false }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index a775b58f03..76033ddb06 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -53,7 +53,6 @@ export const paramDef = { sinceDate: { type: 'integer' }, untilDate: { type: 'integer' }, withFiles: { type: 'boolean', default: false }, - excludeNsfw: { type: 'boolean', default: false }, }, required: ['userId'], } as const; diff --git a/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts b/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts index a7b8cbb037..759f270393 100644 --- a/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts +++ b/packages/frontend/lib/rollup-plugin-unwind-css-module-class-name.test.ts @@ -89,7 +89,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ api("users/notes", { userId: props.user.id, fileType: image, - excludeNsfw: defaultStore.state.nsfw !== "ignore", limit: 10 }).then((notes) => { for (const note of notes) { @@ -198,7 +197,6 @@ const _sfc_main = defineComponent({ api("users/notes", { userId: props.user.id, fileType: image, - excludeNsfw: defaultStore.state.nsfw !== "ignore", limit: 10 }).then(notes => { for (const note of notes) { diff --git a/packages/frontend/src/pages/user/index.files.vue b/packages/frontend/src/pages/user/index.files.vue index f9328b8d6b..72f95ec1a5 100644 --- a/packages/frontend/src/pages/user/index.files.vue +++ b/packages/frontend/src/pages/user/index.files.vue @@ -64,7 +64,6 @@ onMounted(() => { os.api('users/notes', { userId: props.user.id, withFiles: true, - excludeNsfw: defaultStore.state.nsfw !== 'ignore', limit: 15, }).then(notes => { for (const note of notes) { -- cgit v1.2.3-freya From 8968bfd309e505f7e33796d9d2084783bcfae377 Mon Sep 17 00:00:00 2001 From: Camilla Ett Date: Sat, 2 Dec 2023 17:07:57 +0900 Subject: fix(backend): カスタム絵文字のインポート時の動作を修正 (#12360) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: syuilo --- .../src/server/api/endpoints/admin/emoji/copy.ts | 42 +++++++++++----------- .../frontend/src/pages/custom-emojis-manager.vue | 4 +-- 2 files changed, 23 insertions(+), 23 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts index a65e4e7624..5b41dfb514 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts @@ -6,11 +6,10 @@ import { Inject, Injectable } from '@nestjs/common'; import { Endpoint } from '@/server/api/endpoint-base.js'; import type { EmojisRepository } from '@/models/_.js'; -import { IdService } from '@/core/IdService.js'; import type { MiDriveFile } from '@/models/DriveFile.js'; import { DI } from '@/di-symbols.js'; import { DriveService } from '@/core/DriveService.js'; -import { GlobalEventService } from '@/core/GlobalEventService.js'; +import { CustomEmojiService } from '@/core/CustomEmojiService.js'; import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js'; import { ApiError } from '../../../error.js'; @@ -26,6 +25,11 @@ export const meta = { code: 'NO_SUCH_EMOJI', id: 'e2785b66-dca3-4087-9cac-b93c541cc425', }, + duplicateName: { + message: 'Duplicate name.', + code: 'DUPLICATE_NAME', + id: 'f7a3462c-4e6e-4069-8421-b9bd4f4c3975', + }, }, res: { @@ -56,15 +60,12 @@ export default class extends Endpoint { // eslint- constructor( @Inject(DI.emojisRepository) private emojisRepository: EmojisRepository, - private emojiEntityService: EmojiEntityService, - private idService: IdService, - private globalEventService: GlobalEventService, + private customEmojiService: CustomEmojiService, private driveService: DriveService, ) { super(meta, paramDef, async (ps, me) => { const emoji = await this.emojisRepository.findOneBy({ id: ps.emojiId }); - if (emoji == null) { throw new ApiError(meta.errors.noSuchEmoji); } @@ -75,28 +76,27 @@ export default class extends Endpoint { // eslint- // Create file driveFile = await this.driveService.uploadFromUrl({ url: emoji.originalUrl, user: null, force: true }); } catch (e) { + // TODO: need to return Drive Error throw new ApiError(); } - const copied = await this.emojisRepository.insert({ - id: this.idService.gen(), - updatedAt: new Date(), + // Duplication Check + const isDuplicate = await this.customEmojiService.checkDuplicate(emoji.name); + if (isDuplicate) throw new ApiError(meta.errors.duplicateName); + + const addedEmoji = await this.customEmojiService.add({ + driveFile, name: emoji.name, + category: emoji.category, + aliases: emoji.aliases, host: null, - aliases: [], - originalUrl: driveFile.url, - publicUrl: driveFile.webpublicUrl ?? driveFile.url, - type: driveFile.webpublicType ?? driveFile.type, license: emoji.license, - }).then(x => this.emojisRepository.findOneByOrFail(x.identifiers[0])); - - this.globalEventService.publishBroadcastStream('emojiAdded', { - emoji: await this.emojiEntityService.packDetailed(copied.id), - }); + isSensitive: emoji.isSensitive, + localOnly: emoji.localOnly, + roleIdsThatCanBeUsedThisEmojiAsReaction: emoji.roleIdsThatCanBeUsedThisEmojiAsReaction, + }, me); - return { - id: copied.id, - }; + return this.emojiEntityService.packDetailed(addedEmoji); }); } } diff --git a/packages/frontend/src/pages/custom-emojis-manager.vue b/packages/frontend/src/pages/custom-emojis-manager.vue index 7450cf97c9..316dbaa3aa 100644 --- a/packages/frontend/src/pages/custom-emojis-manager.vue +++ b/packages/frontend/src/pages/custom-emojis-manager.vue @@ -155,7 +155,7 @@ const edit = (emoji) => { }, 'closed'); }; -const im = (emoji) => { +const importEmoji = (emoji) => { os.apiWithDialog('admin/emoji/copy', { emojiId: emoji.id, }); @@ -168,7 +168,7 @@ const remoteMenu = (emoji, ev: MouseEvent) => { }, { text: i18n.ts.import, icon: 'ti ti-plus', - action: () => { im(emoji); }, + action: () => { importEmoji(emoji); }, }], ev.currentTarget ?? ev.target); }; -- cgit v1.2.3-freya From a631b976c99a4b3977079a4bafc8a7b7de0bf269 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Sat, 2 Dec 2023 18:25:07 +0900 Subject: Refine fanout timeline (#12507) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(endpoints/hybrid-timeline): don't pack inside getFromDb * chore(endpoints/hybrid-timeline): Redisから取得する部分のうちSTLに依存しなそうなところを別のServiceに切り出し * chore(endpoints/local-timeline): FanoutTimelineEndpointServiceで再実装 * chore(endpoints/channels/timeline): FanoutTimelineEndpointServiceで再実装 * chore(endpoints/timeline): FanoutTimelineEndpointServiceで再実装 * chore(endpoints/user-list-timeline): FanoutTimelineEndpointServiceで再実装 * chore(endpoints/users/notes): FanoutTimelineEndpointServiceで再実装 * chore: add useDbFallback to FanoutTimelineEndpointService.timeline and always true for channel / user note list * style: fix lint error * chore: split logic to multiple functions * chore: implement redis fallback * chore: 成功率を上げる * fix: db fallback not working * feat: allowPartial * chore(frontend): set allowPartial * chore(backend): remove fallbackIfEmpty HTL will never be purged so it's no longer required * fix: missing allowPartial in channel timeline * fix: type of timelineConfig in hybrid-timeline --------- Co-authored-by: syuilo --- packages/backend/src/core/CoreModule.ts | 6 + .../src/core/FanoutTimelineEndpointService.ts | 123 +++++++++++ .../src/server/api/endpoints/channels/timeline.ts | 116 +++++------ .../server/api/endpoints/notes/hybrid-timeline.ts | 110 ++++------ .../server/api/endpoints/notes/local-timeline.ts | 103 ++++------ .../src/server/api/endpoints/notes/timeline.ts | 91 ++++----- .../api/endpoints/notes/user-list-timeline.ts | 78 +++---- .../src/server/api/endpoints/users/notes.ts | 226 +++++++++++---------- packages/frontend/src/components/MkPagination.vue | 1 + 9 files changed, 449 insertions(+), 405 deletions(-) create mode 100644 packages/backend/src/core/FanoutTimelineEndpointService.ts (limited to 'packages/backend/src') diff --git a/packages/backend/src/core/CoreModule.ts b/packages/backend/src/core/CoreModule.ts index bf6f0ef879..bc6d24b951 100644 --- a/packages/backend/src/core/CoreModule.ts +++ b/packages/backend/src/core/CoreModule.ts @@ -4,6 +4,7 @@ */ import { Module } from '@nestjs/common'; +import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; import { AccountMoveService } from './AccountMoveService.js'; import { AccountUpdateService } from './AccountUpdateService.js'; import { AiService } from './AiService.js'; @@ -195,6 +196,7 @@ const $SearchService: Provider = { provide: 'SearchService', useExisting: Search const $ClipService: Provider = { provide: 'ClipService', useExisting: ClipService }; const $FeaturedService: Provider = { provide: 'FeaturedService', useExisting: FeaturedService }; const $FanoutTimelineService: Provider = { provide: 'FanoutTimelineService', useExisting: FanoutTimelineService }; +const $FanoutTimelineEndpointService: Provider = { provide: 'FanoutTimelineEndpointService', useExisting: FanoutTimelineEndpointService }; const $ChannelFollowingService: Provider = { provide: 'ChannelFollowingService', useExisting: ChannelFollowingService }; const $RegistryApiService: Provider = { provide: 'RegistryApiService', useExisting: RegistryApiService }; @@ -331,6 +333,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting ClipService, FeaturedService, FanoutTimelineService, + FanoutTimelineEndpointService, ChannelFollowingService, RegistryApiService, ChartLoggerService, @@ -460,6 +463,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting $ClipService, $FeaturedService, $FanoutTimelineService, + $FanoutTimelineEndpointService, $ChannelFollowingService, $RegistryApiService, $ChartLoggerService, @@ -590,6 +594,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting ClipService, FeaturedService, FanoutTimelineService, + FanoutTimelineEndpointService, ChannelFollowingService, RegistryApiService, FederationChart, @@ -718,6 +723,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting $ClipService, $FeaturedService, $FanoutTimelineService, + $FanoutTimelineEndpointService, $ChannelFollowingService, $RegistryApiService, $FederationChart, diff --git a/packages/backend/src/core/FanoutTimelineEndpointService.ts b/packages/backend/src/core/FanoutTimelineEndpointService.ts new file mode 100644 index 0000000000..157fcbe877 --- /dev/null +++ b/packages/backend/src/core/FanoutTimelineEndpointService.ts @@ -0,0 +1,123 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { Inject, Injectable } from '@nestjs/common'; +import { DI } from '@/di-symbols.js'; +import { bindThis } from '@/decorators.js'; +import type { MiUser } from '@/models/User.js'; +import type { MiNote } from '@/models/Note.js'; +import { Packed } from '@/misc/json-schema.js'; +import type { NotesRepository } from '@/models/_.js'; +import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; +import { FanoutTimelineService } from '@/core/FanoutTimelineService.js'; + +@Injectable() +export class FanoutTimelineEndpointService { + constructor( + @Inject(DI.notesRepository) + private notesRepository: NotesRepository, + + private noteEntityService: NoteEntityService, + private fanoutTimelineService: FanoutTimelineService, + ) { + } + + @bindThis + async timeline(ps: { + untilId: string | null, + sinceId: string | null, + limit: number, + allowPartial: boolean, + me?: { id: MiUser['id'] } | undefined | null, + useDbFallback: boolean, + redisTimelines: string[], + noteFilter: (note: MiNote) => boolean, + dbFallback: (untilId: string | null, sinceId: string | null, limit: number) => Promise, + }): Promise[]> { + return await this.noteEntityService.packMany(await this.getMiNotes(ps), ps.me); + } + + @bindThis + private async getMiNotes(ps: { + untilId: string | null, + sinceId: string | null, + limit: number, + allowPartial: boolean, + me?: { id: MiUser['id'] } | undefined | null, + useDbFallback: boolean, + redisTimelines: string[], + noteFilter: (note: MiNote) => boolean, + dbFallback: (untilId: string | null, sinceId: string | null, limit: number) => Promise, + }): Promise { + let noteIds: string[]; + let shouldFallbackToDb = false; + + // 呼び出し元と以下の処理をシンプルにするためにdbFallbackを置き換える + if (!ps.useDbFallback) ps.dbFallback = () => Promise.resolve([]); + + const redisResult = await this.fanoutTimelineService.getMulti(ps.redisTimelines, ps.untilId, ps.sinceId); + + const redisResultIds = Array.from(new Set(redisResult.flat(1))); + + redisResultIds.sort((a, b) => a > b ? -1 : 1); + noteIds = redisResultIds.slice(0, ps.limit); + + shouldFallbackToDb = shouldFallbackToDb || (noteIds.length === 0); + + if (!shouldFallbackToDb) { + const redisTimeline: MiNote[] = []; + let readFromRedis = 0; + let lastSuccessfulRate = 1; // rateをキャッシュする? + let trialCount = 1; + + while ((redisResultIds.length - readFromRedis) !== 0) { + const remainingToRead = ps.limit - redisTimeline.length; + + // DBからの取り直しを減らす初回と同じ割合以上で成功すると仮定するが、クエリの長さを考えて三倍まで + const countToGet = remainingToRead * Math.ceil(Math.min(1.1 / lastSuccessfulRate, 3)); + noteIds = redisResultIds.slice(readFromRedis, readFromRedis + countToGet); + + readFromRedis += noteIds.length; + + const gotFromDb = await this.getAndFilterFromDb(noteIds, ps.noteFilter); + redisTimeline.push(...gotFromDb); + lastSuccessfulRate = gotFromDb.length / noteIds.length; + + console.log(`fanoutTimelineTrial#${trialCount++}: req: ${ps.limit}, tried: ${noteIds.length}, got: ${gotFromDb.length}, rate: ${lastSuccessfulRate}, total: ${redisTimeline.length}, fromRedis: ${redisResultIds.length}`); + + if (ps.allowPartial ? redisTimeline.length !== 0 : redisTimeline.length >= ps.limit) { + // 十分Redisからとれた + return redisTimeline.slice(0, ps.limit); + } + } + + // まだ足りない分はDBにフォールバック + const remainingToRead = ps.limit - redisTimeline.length; + const gotFromDb = await ps.dbFallback(noteIds[noteIds.length - 1], ps.sinceId, remainingToRead); + redisTimeline.push(...gotFromDb); + console.log(`fanoutTimelineTrial#db: req: ${ps.limit}, tried: ${remainingToRead}, got: ${gotFromDb.length}, since: ${noteIds[noteIds.length - 1]}, until: ${ps.untilId}, total: ${redisTimeline.length}`); + return redisTimeline; + } + + return await ps.dbFallback(ps.untilId, ps.sinceId, ps.limit); + } + + private async getAndFilterFromDb(noteIds: string[], noteFilter: (note: MiNote) => boolean): Promise { + const query = this.notesRepository.createQueryBuilder('note') + .where('note.id IN (:...noteIds)', { noteIds: noteIds }) + .innerJoinAndSelect('note.user', 'user') + .leftJoinAndSelect('note.reply', 'reply') + .leftJoinAndSelect('note.renote', 'renote') + .leftJoinAndSelect('reply.user', 'replyUser') + .leftJoinAndSelect('renote.user', 'renoteUser') + .leftJoinAndSelect('note.channel', 'channel'); + + const notes = (await query.getMany()).filter(noteFilter); + + notes.sort((a, b) => a.id > b.id ? -1 : 1); + + return notes; + } +} diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index f9207199d6..9ef494d6d8 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -12,10 +12,11 @@ import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import ActiveUsersChart from '@/core/chart/charts/active-users.js'; import { DI } from '@/di-symbols.js'; import { IdService } from '@/core/IdService.js'; -import { FanoutTimelineService } from '@/core/FanoutTimelineService.js'; import { isUserRelated } from '@/misc/is-user-related.js'; import { CacheService } from '@/core/CacheService.js'; import { MetaService } from '@/core/MetaService.js'; +import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; +import { MiLocalUser } from '@/models/User.js'; import { ApiError } from '../../error.js'; export const meta = { @@ -51,6 +52,7 @@ export const paramDef = { untilId: { type: 'string', format: 'misskey:id' }, sinceDate: { type: 'integer' }, untilDate: { type: 'integer' }, + allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default }, required: ['channelId'], } as const; @@ -58,9 +60,6 @@ export const paramDef = { @Injectable() export default class extends Endpoint { // eslint-disable-line import/no-default-export constructor( - @Inject(DI.redisForTimelines) - private redisForTimelines: Redis.Redis, - @Inject(DI.notesRepository) private notesRepository: NotesRepository, @@ -70,7 +69,7 @@ export default class extends Endpoint { // eslint- private idService: IdService, private noteEntityService: NoteEntityService, private queryService: QueryService, - private fanoutTimelineService: FanoutTimelineService, + private fanoutTimelineEndpointService: FanoutTimelineEndpointService, private cacheService: CacheService, private activeUsersChart: ActiveUsersChart, private metaService: MetaService, @@ -78,7 +77,6 @@ export default class extends Endpoint { // eslint- super(meta, paramDef, async (ps, me) => { const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null); const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : null); - const isRangeSpecified = untilId != null && sinceId != null; const serverSettings = await this.metaService.fetch(); @@ -92,64 +90,58 @@ export default class extends Endpoint { // eslint- if (me) this.activeUsersChart.read(me); - if (serverSettings.enableFanoutTimeline && (isRangeSpecified || sinceId == null)) { - const [ - userIdsWhoMeMuting, - ] = me ? await Promise.all([ - this.cacheService.userMutingsCache.fetch(me.id), - ]) : [new Set()]; - - let noteIds = await this.fanoutTimelineService.get(`channelTimeline:${channel.id}`, untilId, sinceId); - noteIds = noteIds.slice(0, ps.limit); - - if (noteIds.length > 0) { - const query = this.notesRepository.createQueryBuilder('note') - .where('note.id IN (:...noteIds)', { noteIds: noteIds }) - .innerJoinAndSelect('note.user', 'user') - .leftJoinAndSelect('note.reply', 'reply') - .leftJoinAndSelect('note.renote', 'renote') - .leftJoinAndSelect('reply.user', 'replyUser') - .leftJoinAndSelect('renote.user', 'renoteUser') - .leftJoinAndSelect('note.channel', 'channel'); - - let timeline = await query.getMany(); - - timeline = timeline.filter(note => { - if (me && isUserRelated(note, userIdsWhoMeMuting)) return false; - - return true; - }); - - // TODO: フィルタで件数が減った場合の埋め合わせ処理 - - timeline.sort((a, b) => a.id > b.id ? -1 : 1); - - if (timeline.length > 0) { - return await this.noteEntityService.packMany(timeline, me); - } - } - } - - //#region fallback to database - const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) - .andWhere('note.channelId = :channelId', { channelId: channel.id }) - .innerJoinAndSelect('note.user', 'user') - .leftJoinAndSelect('note.reply', 'reply') - .leftJoinAndSelect('note.renote', 'renote') - .leftJoinAndSelect('reply.user', 'replyUser') - .leftJoinAndSelect('renote.user', 'renoteUser') - .leftJoinAndSelect('note.channel', 'channel'); - - if (me) { - this.queryService.generateMutedUserQuery(query, me); - this.queryService.generateBlockedUserQuery(query, me); + if (!serverSettings.enableFanoutTimeline) { + return await this.noteEntityService.packMany(await this.getFromDb({ untilId, sinceId, limit: ps.limit, channelId: channel.id }, me), me); } - //#endregion - - const timeline = await query.limit(ps.limit).getMany(); - return await this.noteEntityService.packMany(timeline, me); - //#endregion + const [ + userIdsWhoMeMuting, + ] = me ? await Promise.all([ + this.cacheService.userMutingsCache.fetch(me.id), + ]) : [new Set()]; + + return await this.fanoutTimelineEndpointService.timeline({ + untilId, + sinceId, + limit: ps.limit, + allowPartial: ps.allowPartial, + me, + useDbFallback: true, + redisTimelines: [`channelTimeline:${channel.id}`], + noteFilter: note => { + if (me && isUserRelated(note, userIdsWhoMeMuting)) return false; + + return true; + }, + dbFallback: async (untilId, sinceId, limit) => { + return await this.getFromDb({ untilId, sinceId, limit, channelId: channel.id }, me); + }, + }); }); } + + private async getFromDb(ps: { + untilId: string | null, + sinceId: string | null, + limit: number, + channelId: string + }, me: MiLocalUser | null) { + //#region fallback to database + const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) + .andWhere('note.channelId = :channelId', { channelId: ps.channelId }) + .innerJoinAndSelect('note.user', 'user') + .leftJoinAndSelect('note.reply', 'reply') + .leftJoinAndSelect('note.renote', 'renote') + .leftJoinAndSelect('reply.user', 'replyUser') + .leftJoinAndSelect('renote.user', 'renoteUser') + .leftJoinAndSelect('note.channel', 'channel'); + + if (me) { + this.queryService.generateMutedUserQuery(query, me); + this.queryService.generateBlockedUserQuery(query, me); + } + //#endregion + + return await query.limit(ps.limit).getMany(); + } } diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index 372199844d..820692626c 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -5,7 +5,7 @@ import { Brackets } from 'typeorm'; import { Inject, Injectable } from '@nestjs/common'; -import type { NotesRepository, FollowingsRepository, MiNote, ChannelFollowingsRepository } from '@/models/_.js'; +import type { NotesRepository, ChannelFollowingsRepository } from '@/models/_.js'; import { Endpoint } from '@/server/api/endpoint-base.js'; import ActiveUsersChart from '@/core/chart/charts/active-users.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; @@ -19,6 +19,7 @@ import { QueryService } from '@/core/QueryService.js'; import { UserFollowingService } from '@/core/UserFollowingService.js'; import { MetaService } from '@/core/MetaService.js'; import { MiLocalUser } from '@/models/User.js'; +import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; import { ApiError } from '../../error.js'; export const meta = { @@ -53,6 +54,7 @@ export const paramDef = { untilId: { type: 'string', format: 'misskey:id' }, sinceDate: { type: 'integer' }, untilDate: { type: 'integer' }, + allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default includeMyRenotes: { type: 'boolean', default: true }, includeRenotedMyNotes: { type: 'boolean', default: true }, includeLocalRenotes: { type: 'boolean', default: true }, @@ -77,10 +79,10 @@ export default class extends Endpoint { // eslint- private activeUsersChart: ActiveUsersChart, private idService: IdService, private cacheService: CacheService, - private fanoutTimelineService: FanoutTimelineService, private queryService: QueryService, private userFollowingService: UserFollowingService, private metaService: MetaService, + private fanoutTimelineEndpointService: FanoutTimelineEndpointService, ) { super(meta, paramDef, async (ps, me) => { const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null); @@ -94,7 +96,7 @@ export default class extends Endpoint { // eslint- const serverSettings = await this.metaService.fetch(); if (!serverSettings.enableFanoutTimeline) { - return await this.getFromDb({ + const timeline = await this.getFromDb({ untilId, sinceId, limit: ps.limit, @@ -104,6 +106,12 @@ export default class extends Endpoint { // eslint- withFiles: ps.withFiles, withReplies: ps.withReplies, }, me); + + process.nextTick(() => { + this.activeUsersChart.read(me); + }); + + return await this.noteEntityService.packMany(timeline, me); } const [ @@ -116,51 +124,34 @@ export default class extends Endpoint { // eslint- this.cacheService.userBlockedCache.fetch(me.id), ]); - let noteIds: string[]; - let shouldFallbackToDb = false; + let timelineConfig: string[]; if (ps.withFiles) { - const [htlNoteIds, ltlNoteIds] = await this.fanoutTimelineService.getMulti([ + timelineConfig = [ `homeTimelineWithFiles:${me.id}`, 'localTimelineWithFiles', - ], untilId, sinceId); - noteIds = Array.from(new Set([...htlNoteIds, ...ltlNoteIds])); + ]; } else if (ps.withReplies) { - const [htlNoteIds, ltlNoteIds, ltlReplyNoteIds] = await this.fanoutTimelineService.getMulti([ + timelineConfig = [ `homeTimeline:${me.id}`, 'localTimeline', 'localTimelineWithReplies', - ], untilId, sinceId); - noteIds = Array.from(new Set([...htlNoteIds, ...ltlNoteIds, ...ltlReplyNoteIds])); + ]; } else { - const [htlNoteIds, ltlNoteIds] = await this.fanoutTimelineService.getMulti([ + timelineConfig = [ `homeTimeline:${me.id}`, 'localTimeline', - ], untilId, sinceId); - noteIds = Array.from(new Set([...htlNoteIds, ...ltlNoteIds])); - shouldFallbackToDb = htlNoteIds.length === 0; + ]; } - noteIds.sort((a, b) => a > b ? -1 : 1); - noteIds = noteIds.slice(0, ps.limit); - - shouldFallbackToDb = shouldFallbackToDb || (noteIds.length === 0); - - let redisTimeline: MiNote[] = []; - - if (!shouldFallbackToDb) { - const query = this.notesRepository.createQueryBuilder('note') - .where('note.id IN (:...noteIds)', { noteIds: noteIds }) - .innerJoinAndSelect('note.user', 'user') - .leftJoinAndSelect('note.reply', 'reply') - .leftJoinAndSelect('note.renote', 'renote') - .leftJoinAndSelect('reply.user', 'replyUser') - .leftJoinAndSelect('renote.user', 'renoteUser') - .leftJoinAndSelect('note.channel', 'channel'); - - redisTimeline = await query.getMany(); - - redisTimeline = redisTimeline.filter(note => { + const redisTimeline = await this.fanoutTimelineEndpointService.timeline({ + untilId, + sinceId, + limit: ps.limit, + allowPartial: ps.allowPartial, + redisTimelines: timelineConfig, + useDbFallback: serverSettings.enableFanoutTimelineDbFallback, + noteFilter: (note) => { if (note.userId === me.id) { return true; } @@ -174,33 +165,24 @@ export default class extends Endpoint { // eslint- } return true; - }); - - redisTimeline.sort((a, b) => a.id > b.id ? -1 : 1); - } + }, + dbFallback: async (untilId, sinceId, limit) => await this.getFromDb({ + untilId, + sinceId, + limit, + includeMyRenotes: ps.includeMyRenotes, + includeRenotedMyNotes: ps.includeRenotedMyNotes, + includeLocalRenotes: ps.includeLocalRenotes, + withFiles: ps.withFiles, + withReplies: ps.withReplies, + }, me), + }); - if (redisTimeline.length > 0) { - process.nextTick(() => { - this.activeUsersChart.read(me); - }); + process.nextTick(() => { + this.activeUsersChart.read(me); + }); - return await this.noteEntityService.packMany(redisTimeline, me); - } else { - if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db - return await this.getFromDb({ - untilId, - sinceId, - limit: ps.limit, - includeMyRenotes: ps.includeMyRenotes, - includeRenotedMyNotes: ps.includeRenotedMyNotes, - includeLocalRenotes: ps.includeLocalRenotes, - withFiles: ps.withFiles, - withReplies: ps.withReplies, - }, me); - } else { - return []; - } - } + return redisTimeline; }); } @@ -301,12 +283,6 @@ export default class extends Endpoint { // eslint- } //#endregion - const timeline = await query.limit(ps.limit).getMany(); - - process.nextTick(() => { - this.activeUsersChart.read(me); - }); - - return await this.noteEntityService.packMany(timeline, me); + return await query.limit(ps.limit).getMany(); } } diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index 8867070055..97b05016ec 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -14,10 +14,10 @@ import { RoleService } from '@/core/RoleService.js'; import { IdService } from '@/core/IdService.js'; import { CacheService } from '@/core/CacheService.js'; import { isUserRelated } from '@/misc/is-user-related.js'; -import { FanoutTimelineService } from '@/core/FanoutTimelineService.js'; import { QueryService } from '@/core/QueryService.js'; import { MetaService } from '@/core/MetaService.js'; import { MiLocalUser } from '@/models/User.js'; +import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; import { ApiError } from '../../error.js'; export const meta = { @@ -51,6 +51,7 @@ export const paramDef = { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, + allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default sinceDate: { type: 'integer' }, untilDate: { type: 'integer' }, }, @@ -68,7 +69,7 @@ export default class extends Endpoint { // eslint- private activeUsersChart: ActiveUsersChart, private idService: IdService, private cacheService: CacheService, - private fanoutTimelineService: FanoutTimelineService, + private fanoutTimelineEndpointService: FanoutTimelineEndpointService, private queryService: QueryService, private metaService: MetaService, ) { @@ -84,13 +85,21 @@ export default class extends Endpoint { // eslint- const serverSettings = await this.metaService.fetch(); if (!serverSettings.enableFanoutTimeline) { - return await this.getFromDb({ + const timeline = await this.getFromDb({ untilId, sinceId, limit: ps.limit, withFiles: ps.withFiles, withReplies: ps.withReplies, }, me); + + process.nextTick(() => { + if (me) { + this.activeUsersChart.read(me); + } + }); + + return await this.noteEntityService.packMany(timeline, me); } const [ @@ -103,36 +112,15 @@ export default class extends Endpoint { // eslint- this.cacheService.userBlockedCache.fetch(me.id), ]) : [new Set(), new Set(), new Set()]; - let noteIds: string[]; - - if (ps.withFiles) { - noteIds = await this.fanoutTimelineService.get('localTimelineWithFiles', untilId, sinceId); - } else { - const [nonReplyNoteIds, replyNoteIds] = await this.fanoutTimelineService.getMulti([ - 'localTimeline', - 'localTimelineWithReplies', - ], untilId, sinceId); - noteIds = Array.from(new Set([...nonReplyNoteIds, ...replyNoteIds])); - noteIds.sort((a, b) => a > b ? -1 : 1); - } - - noteIds = noteIds.slice(0, ps.limit); - - let redisTimeline: MiNote[] = []; - - if (noteIds.length > 0) { - const query = this.notesRepository.createQueryBuilder('note') - .where('note.id IN (:...noteIds)', { noteIds: noteIds }) - .innerJoinAndSelect('note.user', 'user') - .leftJoinAndSelect('note.reply', 'reply') - .leftJoinAndSelect('note.renote', 'renote') - .leftJoinAndSelect('reply.user', 'replyUser') - .leftJoinAndSelect('renote.user', 'renoteUser') - .leftJoinAndSelect('note.channel', 'channel'); - - redisTimeline = await query.getMany(); - - redisTimeline = redisTimeline.filter(note => { + const timeline = await this.fanoutTimelineEndpointService.timeline({ + untilId, + sinceId, + limit: ps.limit, + allowPartial: ps.allowPartial, + me, + useDbFallback: serverSettings.enableFanoutTimelineDbFallback, + redisTimelines: ps.withFiles ? ['localTimelineWithFiles'] : ['localTimeline', 'localTimelineWithReplies'], + noteFilter: note => { if (me && (note.userId === me.id)) { return true; } @@ -147,32 +135,23 @@ export default class extends Endpoint { // eslint- } return true; - }); - - redisTimeline.sort((a, b) => a.id > b.id ? -1 : 1); - } - - if (redisTimeline.length > 0) { - process.nextTick(() => { - if (me) { - this.activeUsersChart.read(me); - } - }); + }, + dbFallback: async (untilId, sinceId, limit) => await this.getFromDb({ + untilId, + sinceId, + limit, + withFiles: ps.withFiles, + withReplies: ps.withReplies, + }, me), + }); - return await this.noteEntityService.packMany(redisTimeline, me); - } else { - if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db - return await this.getFromDb({ - untilId, - sinceId, - limit: ps.limit, - withFiles: ps.withFiles, - withReplies: ps.withReplies, - }, me); - } else { - return []; + process.nextTick(() => { + if (me) { + this.activeUsersChart.read(me); } - } + }); + + return timeline; }); } @@ -213,14 +192,6 @@ export default class extends Endpoint { // eslint- })); } - const timeline = await query.limit(ps.limit).getMany(); - - process.nextTick(() => { - if (me) { - this.activeUsersChart.read(me); - } - }); - - return await this.noteEntityService.packMany(timeline, me); + return await query.limit(ps.limit).getMany(); } } diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index 470abe0b14..74d0a6e0c0 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -5,7 +5,7 @@ import { Brackets } from 'typeorm'; import { Inject, Injectable } from '@nestjs/common'; -import type { MiNote, NotesRepository, ChannelFollowingsRepository } from '@/models/_.js'; +import type { NotesRepository, ChannelFollowingsRepository } from '@/models/_.js'; import { Endpoint } from '@/server/api/endpoint-base.js'; import { QueryService } from '@/core/QueryService.js'; import ActiveUsersChart from '@/core/chart/charts/active-users.js'; @@ -14,10 +14,10 @@ import { DI } from '@/di-symbols.js'; import { IdService } from '@/core/IdService.js'; import { CacheService } from '@/core/CacheService.js'; import { isUserRelated } from '@/misc/is-user-related.js'; -import { FanoutTimelineService } from '@/core/FanoutTimelineService.js'; import { UserFollowingService } from '@/core/UserFollowingService.js'; import { MiLocalUser } from '@/models/User.js'; import { MetaService } from '@/core/MetaService.js'; +import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; export const meta = { tags: ['notes'], @@ -43,6 +43,7 @@ export const paramDef = { untilId: { type: 'string', format: 'misskey:id' }, sinceDate: { type: 'integer' }, untilDate: { type: 'integer' }, + allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default includeMyRenotes: { type: 'boolean', default: true }, includeRenotedMyNotes: { type: 'boolean', default: true }, includeLocalRenotes: { type: 'boolean', default: true }, @@ -65,7 +66,7 @@ export default class extends Endpoint { // eslint- private activeUsersChart: ActiveUsersChart, private idService: IdService, private cacheService: CacheService, - private fanoutTimelineService: FanoutTimelineService, + private fanoutTimelineEndpointService: FanoutTimelineEndpointService, private userFollowingService: UserFollowingService, private queryService: QueryService, private metaService: MetaService, @@ -77,7 +78,7 @@ export default class extends Endpoint { // eslint- const serverSettings = await this.metaService.fetch(); if (!serverSettings.enableFanoutTimeline) { - return await this.getFromDb({ + const timeline = await this.getFromDb({ untilId, sinceId, limit: ps.limit, @@ -87,6 +88,12 @@ export default class extends Endpoint { // eslint- withFiles: ps.withFiles, withRenotes: ps.withRenotes, }, me); + + process.nextTick(() => { + this.activeUsersChart.read(me); + }); + + return await this.noteEntityService.packMany(timeline, me); } const [ @@ -101,24 +108,15 @@ export default class extends Endpoint { // eslint- this.cacheService.userBlockedCache.fetch(me.id), ]); - let noteIds = await this.fanoutTimelineService.get(ps.withFiles ? `homeTimelineWithFiles:${me.id}` : `homeTimeline:${me.id}`, untilId, sinceId); - noteIds = noteIds.slice(0, ps.limit); - - let redisTimeline: MiNote[] = []; - - if (noteIds.length > 0) { - const query = this.notesRepository.createQueryBuilder('note') - .where('note.id IN (:...noteIds)', { noteIds: noteIds }) - .innerJoinAndSelect('note.user', 'user') - .leftJoinAndSelect('note.reply', 'reply') - .leftJoinAndSelect('note.renote', 'renote') - .leftJoinAndSelect('reply.user', 'replyUser') - .leftJoinAndSelect('renote.user', 'renoteUser') - .leftJoinAndSelect('note.channel', 'channel'); - - redisTimeline = await query.getMany(); - - redisTimeline = redisTimeline.filter(note => { + const timeline = this.fanoutTimelineEndpointService.timeline({ + untilId, + sinceId, + limit: ps.limit, + allowPartial: ps.allowPartial, + me, + useDbFallback: serverSettings.enableFanoutTimelineDbFallback, + redisTimelines: ps.withFiles ? [`homeTimelineWithFiles:${me.id}`] : [`homeTimeline:${me.id}`], + noteFilter: note => { if (note.userId === me.id) { return true; } @@ -135,33 +133,24 @@ export default class extends Endpoint { // eslint- } return true; - }); - - redisTimeline.sort((a, b) => a.id > b.id ? -1 : 1); - } + }, + dbFallback: async (untilId, sinceId, limit) => await this.getFromDb({ + untilId, + sinceId, + limit, + includeMyRenotes: ps.includeMyRenotes, + includeRenotedMyNotes: ps.includeRenotedMyNotes, + includeLocalRenotes: ps.includeLocalRenotes, + withFiles: ps.withFiles, + withRenotes: ps.withRenotes, + }, me), + }); - if (redisTimeline.length > 0) { - process.nextTick(() => { - this.activeUsersChart.read(me); - }); + process.nextTick(() => { + this.activeUsersChart.read(me); + }); - return await this.noteEntityService.packMany(redisTimeline, me); - } else { - if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db - return await this.getFromDb({ - untilId, - sinceId, - limit: ps.limit, - includeMyRenotes: ps.includeMyRenotes, - includeRenotedMyNotes: ps.includeRenotedMyNotes, - includeLocalRenotes: ps.includeLocalRenotes, - withFiles: ps.withFiles, - withRenotes: ps.withRenotes, - }, me); - } else { - return []; - } - } + return timeline; }); } @@ -269,12 +258,6 @@ export default class extends Endpoint { // eslint- } //#endregion - const timeline = await query.limit(ps.limit).getMany(); - - process.nextTick(() => { - this.activeUsersChart.read(me); - }); - - return await this.noteEntityService.packMany(timeline, me); + return await query.limit(ps.limit).getMany(); } } diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index 1ac1d37f48..f39cac5c3e 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -17,6 +17,7 @@ import { FanoutTimelineService } from '@/core/FanoutTimelineService.js'; import { QueryService } from '@/core/QueryService.js'; import { MiLocalUser } from '@/models/User.js'; import { MetaService } from '@/core/MetaService.js'; +import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; import { ApiError } from '../../error.js'; export const meta = { @@ -52,6 +53,7 @@ export const paramDef = { untilId: { type: 'string', format: 'misskey:id' }, sinceDate: { type: 'integer' }, untilDate: { type: 'integer' }, + allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default includeMyRenotes: { type: 'boolean', default: true }, includeRenotedMyNotes: { type: 'boolean', default: true }, includeLocalRenotes: { type: 'boolean', default: true }, @@ -82,6 +84,7 @@ export default class extends Endpoint { // eslint- private cacheService: CacheService, private idService: IdService, private fanoutTimelineService: FanoutTimelineService, + private fanoutTimelineEndpointService: FanoutTimelineEndpointService, private queryService: QueryService, private metaService: MetaService, ) { @@ -101,7 +104,7 @@ export default class extends Endpoint { // eslint- const serverSettings = await this.metaService.fetch(); if (!serverSettings.enableFanoutTimeline) { - return await this.getFromDb(list, { + const timeline = await this.getFromDb(list, { untilId, sinceId, limit: ps.limit, @@ -111,6 +114,10 @@ export default class extends Endpoint { // eslint- withFiles: ps.withFiles, withRenotes: ps.withRenotes, }, me); + + this.activeUsersChart.read(me); + + await this.noteEntityService.packMany(timeline, me); } const [ @@ -123,24 +130,15 @@ export default class extends Endpoint { // eslint- this.cacheService.userBlockedCache.fetch(me.id), ]); - let noteIds = await this.fanoutTimelineService.get(ps.withFiles ? `userListTimelineWithFiles:${list.id}` : `userListTimeline:${list.id}`, untilId, sinceId); - noteIds = noteIds.slice(0, ps.limit); - - let redisTimeline: MiNote[] = []; - - if (noteIds.length > 0) { - const query = this.notesRepository.createQueryBuilder('note') - .where('note.id IN (:...noteIds)', { noteIds: noteIds }) - .innerJoinAndSelect('note.user', 'user') - .leftJoinAndSelect('note.reply', 'reply') - .leftJoinAndSelect('note.renote', 'renote') - .leftJoinAndSelect('reply.user', 'replyUser') - .leftJoinAndSelect('renote.user', 'renoteUser') - .leftJoinAndSelect('note.channel', 'channel'); - - redisTimeline = await query.getMany(); - - redisTimeline = redisTimeline.filter(note => { + const timeline = await this.fanoutTimelineEndpointService.timeline({ + untilId, + sinceId, + limit: ps.limit, + allowPartial: ps.allowPartial, + me, + useDbFallback: serverSettings.enableFanoutTimelineDbFallback, + redisTimelines: ps.withFiles ? [`userListTimelineWithFiles:${list.id}`] : [`userListTimeline:${list.id}`], + noteFilter: note => { if (note.userId === me.id) { return true; } @@ -154,30 +152,22 @@ export default class extends Endpoint { // eslint- } return true; - }); + }, + dbFallback: async (untilId, sinceId, limit) => await this.getFromDb(list, { + untilId, + sinceId, + limit, + includeMyRenotes: ps.includeMyRenotes, + includeRenotedMyNotes: ps.includeRenotedMyNotes, + includeLocalRenotes: ps.includeLocalRenotes, + withFiles: ps.withFiles, + withRenotes: ps.withRenotes, + }, me), + }); - redisTimeline.sort((a, b) => a.id > b.id ? -1 : 1); - } + this.activeUsersChart.read(me); - if (redisTimeline.length > 0) { - this.activeUsersChart.read(me); - return await this.noteEntityService.packMany(redisTimeline, me); - } else { - if (serverSettings.enableFanoutTimelineDbFallback) { // fallback to db - return await this.getFromDb(list, { - untilId, - sinceId, - limit: ps.limit, - includeMyRenotes: ps.includeMyRenotes, - includeRenotedMyNotes: ps.includeRenotedMyNotes, - includeLocalRenotes: ps.includeLocalRenotes, - withFiles: ps.withFiles, - withRenotes: ps.withRenotes, - }, me); - } else { - return []; - } - } + return timeline; }); } @@ -271,10 +261,6 @@ export default class extends Endpoint { // eslint- } //#endregion - const timeline = await query.limit(ps.limit).getMany(); - - this.activeUsersChart.read(me); - - return await this.noteEntityService.packMany(timeline, me); + return await query.limit(ps.limit).getMany(); } } diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index 76033ddb06..56983f7bc4 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -5,8 +5,7 @@ import { Brackets } from 'typeorm'; import { Inject, Injectable } from '@nestjs/common'; -import * as Redis from 'ioredis'; -import type { MiNote, NotesRepository } from '@/models/_.js'; +import type { NotesRepository } from '@/models/_.js'; import { Endpoint } from '@/server/api/endpoint-base.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { DI } from '@/di-symbols.js'; @@ -14,9 +13,9 @@ import { CacheService } from '@/core/CacheService.js'; import { IdService } from '@/core/IdService.js'; import { isUserRelated } from '@/misc/is-user-related.js'; import { QueryService } from '@/core/QueryService.js'; -import { FanoutTimelineService } from '@/core/FanoutTimelineService.js'; import { MetaService } from '@/core/MetaService.js'; -import { ApiError } from '../../error.js'; +import { MiLocalUser } from '@/models/User.js'; +import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; export const meta = { tags: ['users', 'notes'], @@ -52,6 +51,7 @@ export const paramDef = { untilId: { type: 'string', format: 'misskey:id' }, sinceDate: { type: 'integer' }, untilDate: { type: 'integer' }, + allowPartial: { type: 'boolean', default: false }, // true is recommended but for compatibility false by default withFiles: { type: 'boolean', default: false }, }, required: ['userId'], @@ -60,9 +60,6 @@ export const paramDef = { @Injectable() export default class extends Endpoint { // eslint-disable-line import/no-default-export constructor( - @Inject(DI.redisForTimelines) - private redisForTimelines: Redis.Redis, - @Inject(DI.notesRepository) private notesRepository: NotesRepository, @@ -70,121 +67,130 @@ export default class extends Endpoint { // eslint- private queryService: QueryService, private cacheService: CacheService, private idService: IdService, - private fanoutTimelineService: FanoutTimelineService, + private fanoutTimelineEndpointService: FanoutTimelineEndpointService, private metaService: MetaService, ) { super(meta, paramDef, async (ps, me) => { const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null); const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : null); - const isRangeSpecified = untilId != null && sinceId != null; const isSelf = me && (me.id === ps.userId); const serverSettings = await this.metaService.fetch(); - if (serverSettings.enableFanoutTimeline && (isRangeSpecified || sinceId == null)) { - const [ - userIdsWhoMeMuting, - ] = me ? await Promise.all([ - this.cacheService.userMutingsCache.fetch(me.id), - ]) : [new Set()]; - - const [noteIdsRes, repliesNoteIdsRes, channelNoteIdsRes] = await Promise.all([ - this.fanoutTimelineService.get(ps.withFiles ? `userTimelineWithFiles:${ps.userId}` : `userTimeline:${ps.userId}`, untilId, sinceId), - ps.withReplies ? this.fanoutTimelineService.get(`userTimelineWithReplies:${ps.userId}`, untilId, sinceId) : Promise.resolve([]), - ps.withChannelNotes ? this.fanoutTimelineService.get(`userTimelineWithChannel:${ps.userId}`, untilId, sinceId) : Promise.resolve([]), - ]); - - let noteIds = Array.from(new Set([ - ...noteIdsRes, - ...repliesNoteIdsRes, - ...channelNoteIdsRes, - ])); - noteIds.sort((a, b) => a > b ? -1 : 1); - noteIds = noteIds.slice(0, ps.limit); - - if (noteIds.length > 0) { - const isFollowing = me && Object.hasOwn(await this.cacheService.userFollowingsCache.fetch(me.id), ps.userId); - - const query = this.notesRepository.createQueryBuilder('note') - .where('note.id IN (:...noteIds)', { noteIds: noteIds }) - .innerJoinAndSelect('note.user', 'user') - .leftJoinAndSelect('note.reply', 'reply') - .leftJoinAndSelect('note.renote', 'renote') - .leftJoinAndSelect('reply.user', 'replyUser') - .leftJoinAndSelect('renote.user', 'renoteUser') - .leftJoinAndSelect('note.channel', 'channel'); - - let timeline = await query.getMany(); - - timeline = timeline.filter(note => { - if (me && isUserRelated(note, userIdsWhoMeMuting, true)) return false; - - if (note.renoteId) { - if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) { - if (ps.withRenotes === false) return false; - } - } - - if (note.channel?.isSensitive && !isSelf) return false; - if (note.visibility === 'specified' && (!me || (me.id !== note.userId && !note.visibleUserIds.some(v => v === me.id)))) return false; - if (note.visibility === 'followers' && !isFollowing && !isSelf) return false; - - return true; - }); - - // TODO: フィルタで件数が減った場合の埋め合わせ処理 - - timeline.sort((a, b) => a.id > b.id ? -1 : 1); - - if (timeline.length > 0) { - return await this.noteEntityService.packMany(timeline, me); - } - } - } - - //#region fallback to database - const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) - .andWhere('note.userId = :userId', { userId: ps.userId }) - .innerJoinAndSelect('note.user', 'user') - .leftJoinAndSelect('note.reply', 'reply') - .leftJoinAndSelect('note.renote', 'renote') - .leftJoinAndSelect('note.channel', 'channel') - .leftJoinAndSelect('reply.user', 'replyUser') - .leftJoinAndSelect('renote.user', 'renoteUser'); - - if (ps.withChannelNotes) { - if (!isSelf) query.andWhere(new Brackets(qb => { - qb.orWhere('note.channelId IS NULL'); - qb.orWhere('channel.isSensitive = false'); - })); - } else { - query.andWhere('note.channelId IS NULL'); + if (!serverSettings.enableFanoutTimeline) { + const timeline = await this.getFromDb({ + untilId, + sinceId, + limit: ps.limit, + userId: ps.userId, + withChannelNotes: ps.withChannelNotes, + withFiles: ps.withFiles, + withRenotes: ps.withRenotes, + }, me); + + return await this.noteEntityService.packMany(timeline, me); } - this.queryService.generateVisibilityQuery(query, me); - if (me) { - this.queryService.generateMutedUserQuery(query, me, { id: ps.userId }); - this.queryService.generateBlockedUserQuery(query, me); - } - - if (ps.withFiles) { - query.andWhere('note.fileIds != \'{}\''); - } - - if (ps.withRenotes === false) { - query.andWhere(new Brackets(qb => { - qb.orWhere('note.userId != :userId', { userId: ps.userId }); - qb.orWhere('note.renoteId IS NULL'); - qb.orWhere('note.text IS NOT NULL'); - qb.orWhere('note.fileIds != \'{}\''); - qb.orWhere('0 < (SELECT COUNT(*) FROM poll WHERE poll."noteId" = note.id)'); - })); - } - - const timeline = await query.limit(ps.limit).getMany(); + const [ + userIdsWhoMeMuting, + ] = me ? await Promise.all([ + this.cacheService.userMutingsCache.fetch(me.id), + ]) : [new Set()]; + + const redisTimelines = [ps.withFiles ? `userTimelineWithFiles:${ps.userId}` : `userTimeline:${ps.userId}`]; + + if (ps.withReplies) redisTimelines.push(`userTimelineWithReplies:${ps.userId}`); + if (ps.withChannelNotes) redisTimelines.push(`userTimelineWithChannel:${ps.userId}`); + + const isFollowing = me && Object.hasOwn(await this.cacheService.userFollowingsCache.fetch(me.id), ps.userId); + + const timeline = await this.fanoutTimelineEndpointService.timeline({ + untilId, + sinceId, + limit: ps.limit, + allowPartial: ps.allowPartial, + me, + redisTimelines, + useDbFallback: true, + noteFilter: note => { + if (me && isUserRelated(note, userIdsWhoMeMuting, true)) return false; + + if (note.renoteId) { + if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) { + if (ps.withRenotes === false) return false; + } + } - return await this.noteEntityService.packMany(timeline, me); - //#endregion + if (note.channel?.isSensitive && !isSelf) return false; + if (note.visibility === 'specified' && (!me || (me.id !== note.userId && !note.visibleUserIds.some(v => v === me.id)))) return false; + if (note.visibility === 'followers' && !isFollowing && !isSelf) return false; + + return true; + }, + dbFallback: async (untilId, sinceId, limit) => await this.getFromDb({ + untilId, + sinceId, + limit, + userId: ps.userId, + withChannelNotes: ps.withChannelNotes, + withFiles: ps.withFiles, + withRenotes: ps.withRenotes, + }, me), + }); + + return timeline; }); } + + private async getFromDb(ps: { + untilId: string | null, + sinceId: string | null, + limit: number, + userId: string, + withChannelNotes: boolean, + withFiles: boolean, + withRenotes: boolean, + }, me: MiLocalUser | null) { + const isSelf = me && (me.id === ps.userId); + + const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) + .andWhere('note.userId = :userId', { userId: ps.userId }) + .innerJoinAndSelect('note.user', 'user') + .leftJoinAndSelect('note.reply', 'reply') + .leftJoinAndSelect('note.renote', 'renote') + .leftJoinAndSelect('note.channel', 'channel') + .leftJoinAndSelect('reply.user', 'replyUser') + .leftJoinAndSelect('renote.user', 'renoteUser'); + + if (ps.withChannelNotes) { + if (!isSelf) query.andWhere(new Brackets(qb => { + qb.orWhere('note.channelId IS NULL'); + qb.orWhere('channel.isSensitive = false'); + })); + } else { + query.andWhere('note.channelId IS NULL'); + } + + this.queryService.generateVisibilityQuery(query, me); + if (me) { + this.queryService.generateMutedUserQuery(query, me, { id: ps.userId }); + this.queryService.generateBlockedUserQuery(query, me); + } + + if (ps.withFiles) { + query.andWhere('note.fileIds != \'{}\''); + } + + if (ps.withRenotes === false) { + query.andWhere(new Brackets(qb => { + qb.orWhere('note.userId != :userId', { userId: ps.userId }); + qb.orWhere('note.renoteId IS NULL'); + qb.orWhere('note.text IS NOT NULL'); + qb.orWhere('note.fileIds != \'{}\''); + qb.orWhere('0 < (SELECT COUNT(*) FROM poll WHERE poll."noteId" = note.id)'); + })); + } + + return await query.limit(ps.limit).getMany(); + } } diff --git a/packages/frontend/src/components/MkPagination.vue b/packages/frontend/src/components/MkPagination.vue index 2c59e6d4e8..57348cde53 100644 --- a/packages/frontend/src/components/MkPagination.vue +++ b/packages/frontend/src/components/MkPagination.vue @@ -206,6 +206,7 @@ async function init(): Promise { await os.api(props.pagination.endpoint, { ...params, limit: props.pagination.limit ?? 10, + allowPartial: true, }).then(res => { for (let i = 0; i < res.length; i++) { const item = res[i]; -- cgit v1.2.3-freya From 238e8ce93967c19d48e7b07c55d1faef4e64cb56 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 2 Dec 2023 19:32:30 +0900 Subject: fix: Filter featured collection (#12541) --- packages/backend/src/core/NotePiningService.ts | 4 ++-- packages/backend/src/server/ActivityPubServerService.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/core/NotePiningService.ts b/packages/backend/src/core/NotePiningService.ts index 52abb4c2a1..74e53c5c46 100644 --- a/packages/backend/src/core/NotePiningService.ts +++ b/packages/backend/src/core/NotePiningService.ts @@ -77,7 +77,7 @@ export class NotePiningService { } as MiUserNotePining); // Deliver to remote followers - if (this.userEntityService.isLocalUser(user)) { + if (this.userEntityService.isLocalUser(user) && !note.localOnly && ['public', 'home'].includes(note.visibility)) { this.deliverPinnedChange(user.id, note.id, true); } } @@ -105,7 +105,7 @@ export class NotePiningService { }); // Deliver to remote followers - if (this.userEntityService.isLocalUser(user)) { + if (this.userEntityService.isLocalUser(user) && !note.localOnly && ['public', 'home'].includes(note.visibility)) { this.deliverPinnedChange(user.id, noteId, false); } } diff --git a/packages/backend/src/server/ActivityPubServerService.ts b/packages/backend/src/server/ActivityPubServerService.ts index 2c9e2cf24f..78d2daa403 100644 --- a/packages/backend/src/server/ActivityPubServerService.ts +++ b/packages/backend/src/server/ActivityPubServerService.ts @@ -370,8 +370,9 @@ export class ActivityPubServerService { order: { id: 'DESC' }, }); - const pinnedNotes = await Promise.all(pinings.map(pining => - this.notesRepository.findOneByOrFail({ id: pining.noteId }))); + const pinnedNotes = (await Promise.all(pinings.map(pining => + this.notesRepository.findOneByOrFail({ id: pining.noteId })))) + .filter(note => !note.localOnly && ['public', 'home'].includes(note.visibility)); const renderedNotes = await Promise.all(pinnedNotes.map(note => this.apRendererService.renderNote(note))); -- cgit v1.2.3-freya From 92029ac325c8cf74d2227beffb763ec3e6c01aea Mon Sep 17 00:00:00 2001 From: おさむのひと <46447427+samunohito@users.noreply.github.com> Date: Sat, 2 Dec 2023 20:11:31 +0900 Subject: fix: #12544 (#12545) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * meを渡し忘れている * fix CHANGELOG.md * Revert "fix CHANGELOG.md" This reverts commit aaee4e9b8a6abf510f393bc02282f6ac016d2124. --- packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/backend/src') diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index 820692626c..deb9e014c4 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -149,6 +149,7 @@ export default class extends Endpoint { // eslint- sinceId, limit: ps.limit, allowPartial: ps.allowPartial, + me, redisTimelines: timelineConfig, useDbFallback: serverSettings.enableFanoutTimelineDbFallback, noteFilter: (note) => { -- cgit v1.2.3-freya From 336416261a0a9f46467f90e93854d81ca01292d9 Mon Sep 17 00:00:00 2001 From: おさむのひと <46447427+samunohito@users.noreply.github.com> Date: Sat, 2 Dec 2023 21:00:05 +0900 Subject: バックエンドが生成するapi.jsonからmisskey-jsの型を作成する (#12434) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ひとまず生成できるところまで * ファイル構成整理 * 生成コマンド整理 * misskey-jsへの組み込み * fix generator.ts * wip * fix generator.ts * fix package.json * 生成ロジックの調整 * 型レベルでのswitch-case機構をmisskey-jsからfrontendに持ち込めるようにした * 型チェック用のtsconfig.jsonを作成 * 他のエンドポイントを呼ぶ関数にも適用 * 未使用エンティティなどを削除 * misskey-js側で手動定義されていた型を自動生成された型に移行(ただしapi.jsonがvalidでなくなってしまったので後で修正する) * messagingは廃止されている(テストのビルドエラー解消) * validなapi.jsonを出力できるように修正 * 修正漏れ対応 * Ajvに怒られて起動できなかったところを修正 * fix ci(途中) * パラメータenumをやめる * add command * add api.json * 都度自動生成をやめる * 一気通貫スクリプト修正 * fix ci * 生成ロジック修正 * フロントの型チェックは結局やらなかったので戻しておく * fix pnpm-lock.yaml * add README.md --------- Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com> Co-authored-by: syuilo --- package.json | 4 +- .../backend/src/server/api/endpoints/admin/meta.ts | 76 + .../server/api/endpoints/federation/instances.ts | 29 +- packages/backend/src/server/api/endpoints/meta.ts | 27 + packages/frontend/src/components/MkEmojiPicker.vue | 8 +- .../frontend/src/components/MkFeaturedPhotos.vue | 2 +- .../frontend/src/components/MkInstanceCardMini.vue | 6 +- packages/frontend/src/components/MkInviteCode.vue | 2 +- .../frontend/src/components/MkVisitorDashboard.vue | 7 +- packages/frontend/src/custom-emojis.ts | 6 +- packages/frontend/src/filters/user.ts | 1 - packages/frontend/src/instance.ts | 2 +- packages/frontend/src/pages/_error_.vue | 2 +- packages/frontend/src/pages/about.emojis.vue | 2 +- packages/frontend/src/pages/auth.form.vue | 2 +- packages/frontend/src/pages/auth.vue | 2 +- packages/frontend/src/pages/instance-info.vue | 15 +- packages/frontend/src/pages/invite.vue | 2 +- packages/frontend/src/pages/welcome.entrance.a.vue | 12 +- packages/frontend/src/scripts/api.ts | 19 +- .../src/ui/_common_/statusbar-federation.vue | 2 +- packages/misskey-js/etc/misskey-js.api.md | 4585 ++-- packages/misskey-js/generator/.eslintrc.cjs | 9 + packages/misskey-js/generator/.gitignore | 1 + packages/misskey-js/generator/README.md | 19 + packages/misskey-js/generator/package.json | 24 + packages/misskey-js/generator/src/generator.ts | 284 + packages/misskey-js/generator/tsconfig.json | 20 + packages/misskey-js/package.json | 6 +- packages/misskey-js/src/api.ts | 62 +- packages/misskey-js/src/api.types.ts | 707 +- packages/misskey-js/src/autogen/endpoint.ts | 802 + packages/misskey-js/src/autogen/entities.ts | 478 + packages/misskey-js/src/autogen/models.ts | 39 + packages/misskey-js/src/autogen/types.ts | 22560 +++++++++++++++++++ packages/misskey-js/src/entities.ts | 610 +- packages/misskey-js/src/streaming.types.ts | 25 +- packages/misskey-js/test-d/api.ts | 10 +- packages/misskey-js/test-d/streaming.ts | 14 - packages/misskey-js/tsconfig.json | 2 +- pnpm-lock.yaml | 619 +- pnpm-workspace.yaml | 1 + 42 files changed, 27097 insertions(+), 4008 deletions(-) create mode 100644 packages/misskey-js/generator/.eslintrc.cjs create mode 100644 packages/misskey-js/generator/.gitignore create mode 100644 packages/misskey-js/generator/README.md create mode 100644 packages/misskey-js/generator/package.json create mode 100644 packages/misskey-js/generator/src/generator.ts create mode 100644 packages/misskey-js/generator/tsconfig.json create mode 100644 packages/misskey-js/src/autogen/endpoint.ts create mode 100644 packages/misskey-js/src/autogen/entities.ts create mode 100644 packages/misskey-js/src/autogen/models.ts create mode 100644 packages/misskey-js/src/autogen/types.ts (limited to 'packages/backend/src') diff --git a/package.json b/package.json index fc328a650b..9fa094e049 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "build-assets": "node ./scripts/build-assets.mjs", "build": "pnpm build-pre && pnpm -r build && pnpm build-assets", "build-storybook": "pnpm --filter frontend build-storybook", + "build-misskey-js-with-types": "pnpm --filter backend build && pnpm --filter backend generate-api-json && ncp packages/backend/built/api.json packages/misskey-js/generator/api.json && pnpm --filter misskey-js update-autogen-code && pnpm --filter misskey-js build", "start": "pnpm check:connect && cd packages/backend && node ./built/boot/entry.js", "start:test": "cd packages/backend && cross-env NODE_ENV=test node ./built/boot/entry.js", "init": "pnpm migrate", @@ -57,7 +58,8 @@ "cross-env": "7.0.3", "cypress": "13.6.0", "eslint": "8.54.0", - "start-server-and-test": "2.0.3" + "start-server-and-test": "2.0.3", + "ncp": "2.0.0" }, "optionalDependencies": { "@tensorflow/tfjs-core": "4.4.0" diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index 1dddb166ae..8774bcbb67 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -327,6 +327,82 @@ export const meta = { type: 'number', optional: false, nullable: false, }, + backgroundImageUrl: { + type: 'string', + optional: false, nullable: true, + }, + deeplAuthKey: { + type: 'string', + optional: false, nullable: true, + }, + deeplIsPro: { + type: 'boolean', + optional: false, nullable: false, + }, + defaultDarkTheme: { + type: 'string', + optional: false, nullable: true, + }, + defaultLightTheme: { + type: 'string', + optional: false, nullable: true, + }, + description: { + type: 'string', + optional: false, nullable: true, + }, + disableRegistration: { + type: 'boolean', + optional: false, nullable: false, + }, + impressumUrl: { + type: 'string', + optional: false, nullable: true, + }, + maintainerEmail: { + type: 'string', + optional: false, nullable: true, + }, + maintainerName: { + type: 'string', + optional: false, nullable: true, + }, + name: { + type: 'string', + optional: false, nullable: true, + }, + objectStorageS3ForcePathStyle: { + type: 'boolean', + optional: false, nullable: false, + }, + privacyPolicyUrl: { + type: 'string', + optional: false, nullable: true, + }, + repositoryUrl: { + type: 'string', + optional: false, nullable: false, + }, + summalyProxy: { + type: 'string', + optional: false, nullable: true, + }, + themeColor: { + type: 'string', + optional: false, nullable: true, + }, + tosUrl: { + type: 'string', + optional: false, nullable: true, + }, + uri: { + type: 'string', + optional: false, nullable: false, + }, + version: { + type: 'string', + optional: false, nullable: false, + }, }, }, } as const; diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index c8beefa9c7..e5a90715f5 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -36,13 +36,32 @@ export const paramDef = { blocked: { type: 'boolean', nullable: true }, notResponding: { type: 'boolean', nullable: true }, suspended: { type: 'boolean', nullable: true }, - silenced: { type: "boolean", nullable: true }, + silenced: { type: 'boolean', nullable: true }, federating: { type: 'boolean', nullable: true }, subscribing: { type: 'boolean', nullable: true }, publishing: { type: 'boolean', nullable: true }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, offset: { type: 'integer', default: 0 }, - sort: { type: 'string' }, + sort: { + type: 'string', + nullable: true, + enum: [ + '+pubSub', + '-pubSub', + '+notes', + '-notes', + '+users', + '-users', + '+following', + '-following', + '+followers', + '-followers', + '+firstRetrievedAt', + '-firstRetrievedAt', + '+latestRequestReceivedAt', + '-latestRequestReceivedAt', + ], + }, }, required: [], } as const; @@ -103,18 +122,18 @@ export default class extends Endpoint { // eslint- } } - if (typeof ps.silenced === "boolean") { + if (typeof ps.silenced === 'boolean') { const meta = await this.metaService.fetch(true); if (ps.silenced) { if (meta.silencedHosts.length === 0) { return []; } - query.andWhere("instance.host IN (:...silences)", { + query.andWhere('instance.host IN (:...silences)', { silences: meta.silencedHosts, }); } else if (meta.silencedHosts.length > 0) { - query.andWhere("instance.host NOT IN (:...silences)", { + query.andWhere('instance.host NOT IN (:...silences)', { silences: meta.silencedHosts, }); } diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index 2727e4f093..9dd4553152 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -250,6 +250,33 @@ export const meta = { }, }, }, + backgroundImageUrl: { + type: 'string', + optional: false, nullable: true, + }, + impressumUrl: { + type: 'string', + optional: false, nullable: true, + }, + logoImageUrl: { + type: 'string', + optional: false, nullable: true, + }, + privacyPolicyUrl: { + type: 'string', + optional: false, nullable: true, + }, + serverRules: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'string', + }, + }, + themeColor: { + type: 'string', + optional: false, nullable: true, + }, }, }, } as const; diff --git a/packages/frontend/src/components/MkEmojiPicker.vue b/packages/frontend/src/components/MkEmojiPicker.vue index 603f676d5d..ecff2b5ace 100644 --- a/packages/frontend/src/components/MkEmojiPicker.vue +++ b/packages/frontend/src/components/MkEmojiPicker.vue @@ -149,7 +149,7 @@ const size = computed(() => props.asReactionPicker ? reactionPickerSize.value : const width = computed(() => props.asReactionPicker ? reactionPickerWidth.value : 3); const height = computed(() => props.asReactionPicker ? reactionPickerHeight.value : 2); const q = ref(''); -const searchResultCustom = ref([]); +const searchResultCustom = ref([]); const searchResultUnicode = ref([]); const tab = ref<'index' | 'custom' | 'unicode' | 'tags'>('index'); @@ -196,7 +196,7 @@ watch(q, () => { const searchCustom = () => { const max = 100; const emojis = customEmojis.value; - const matches = new Set(); + const matches = new Set(); const exactMatch = emojis.find(emoji => emoji.name === newQ); if (exactMatch) matches.add(exactMatch); @@ -326,7 +326,7 @@ watch(q, () => { searchResultUnicode.value = Array.from(searchUnicode()); }); -function filterAvailable(emoji: Misskey.entities.CustomEmoji): boolean { +function filterAvailable(emoji: Misskey.entities.EmojiSimple): boolean { return (emoji.roleIdsThatCanBeUsedThisEmojiAsReaction == null || emoji.roleIdsThatCanBeUsedThisEmojiAsReaction.length === 0) || ($i && $i.roles.some(r => emoji.roleIdsThatCanBeUsedThisEmojiAsReaction.includes(r.id))); } @@ -343,7 +343,7 @@ function reset() { q.value = ''; } -function getKey(emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef): string { +function getKey(emoji: string | Misskey.entities.EmojiSimple | UnicodeEmojiDef): string { return typeof emoji === 'string' ? emoji : 'char' in emoji ? emoji.char : `:${emoji.name}:`; } diff --git a/packages/frontend/src/components/MkFeaturedPhotos.vue b/packages/frontend/src/components/MkFeaturedPhotos.vue index cef1943d5c..6d1bad7433 100644 --- a/packages/frontend/src/components/MkFeaturedPhotos.vue +++ b/packages/frontend/src/components/MkFeaturedPhotos.vue @@ -12,7 +12,7 @@ import { ref } from 'vue'; import * as Misskey from 'misskey-js'; import * as os from '@/os.js'; -const meta = ref(); +const meta = ref(); os.api('meta', { detail: true }).then(gotMeta => { meta.value = gotMeta; diff --git a/packages/frontend/src/components/MkInstanceCardMini.vue b/packages/frontend/src/components/MkInstanceCardMini.vue index e384b7a0bc..9710f779d5 100644 --- a/packages/frontend/src/components/MkInstanceCardMini.vue +++ b/packages/frontend/src/components/MkInstanceCardMini.vue @@ -21,15 +21,15 @@ import * as os from '@/os.js'; import { getProxiedImageUrlNullable } from '@/scripts/media-proxy.js'; const props = defineProps<{ - instance: Misskey.entities.Instance; + instance: Misskey.entities.FederationInstance; }>(); let chartValues = $ref(null); os.apiGet('charts/instance', { host: props.instance.host, limit: 16 + 1, span: 'day' }).then(res => { // 今日のぶんの値はまだ途中の値であり、それも含めると大抵の場合前日よりも下降しているようなグラフになってしまうため今日は弾く - res.requests.received.splice(0, 1); - chartValues = res.requests.received; + res['requests.received'].splice(0, 1); + chartValues = res['requests.received']; }); function getInstanceIcon(instance): string { diff --git a/packages/frontend/src/components/MkInviteCode.vue b/packages/frontend/src/components/MkInviteCode.vue index ff3794ad18..84d797484d 100644 --- a/packages/frontend/src/components/MkInviteCode.vue +++ b/packages/frontend/src/components/MkInviteCode.vue @@ -67,7 +67,7 @@ import { i18n } from '@/i18n.js'; import * as os from '@/os.js'; const props = defineProps<{ - invite: Misskey.entities.Invite; + invite: Misskey.entities.InviteCode; moderator?: boolean; }>(); diff --git a/packages/frontend/src/components/MkVisitorDashboard.vue b/packages/frontend/src/components/MkVisitorDashboard.vue index 40493a5d06..3eb5c19660 100644 --- a/packages/frontend/src/components/MkVisitorDashboard.vue +++ b/packages/frontend/src/components/MkVisitorDashboard.vue @@ -67,15 +67,14 @@ import number from '@/filters/number.js'; import MkNumber from '@/components/MkNumber.vue'; import XActiveUsersChart from '@/components/MkVisitorDashboard.ActiveUsersChart.vue'; -let meta = $ref(); -let stats = $ref(null); +let meta = $ref(null); +let stats = $ref(null); os.api('meta', { detail: true }).then(_meta => { meta = _meta; }); -os.api('stats', { -}).then((res) => { +os.api('stats', {}).then((res) => { stats = res; }); diff --git a/packages/frontend/src/custom-emojis.ts b/packages/frontend/src/custom-emojis.ts index 8ecd1bd2eb..6a48159f13 100644 --- a/packages/frontend/src/custom-emojis.ts +++ b/packages/frontend/src/custom-emojis.ts @@ -10,7 +10,7 @@ import { useStream } from '@/stream.js'; import { get, set } from '@/scripts/idb-proxy.js'; const storageCache = await get('emojis'); -export const customEmojis = shallowRef(Array.isArray(storageCache) ? storageCache : []); +export const customEmojis = shallowRef(Array.isArray(storageCache) ? storageCache : []); export const customEmojiCategories = computed<[ ...string[], null ]>(() => { const categories = new Set(); for (const emoji of customEmojis.value) { @@ -21,7 +21,7 @@ export const customEmojiCategories = computed<[ ...string[], null ]>(() => { return markRaw([...Array.from(categories), null]); }); -export const customEmojisMap = new Map(); +export const customEmojisMap = new Map(); watch(customEmojis, emojis => { customEmojisMap.clear(); for (const emoji of emojis) { @@ -38,7 +38,7 @@ stream.on('emojiAdded', emojiData => { }); stream.on('emojiUpdated', emojiData => { - customEmojis.value = customEmojis.value.map(item => emojiData.emojis.find(search => search.name === item.name) as Misskey.entities.CustomEmoji ?? item); + customEmojis.value = customEmojis.value.map(item => emojiData.emojis.find(search => search.name === item.name) as Misskey.entities.EmojiSimple ?? item); set('emojis', customEmojis.value); }); diff --git a/packages/frontend/src/filters/user.ts b/packages/frontend/src/filters/user.ts index a7a13bec6e..8d20603725 100644 --- a/packages/frontend/src/filters/user.ts +++ b/packages/frontend/src/filters/user.ts @@ -3,7 +3,6 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js'; import { url } from '@/config.js'; diff --git a/packages/frontend/src/instance.ts b/packages/frontend/src/instance.ts index cbfd95951c..b09264dabb 100644 --- a/packages/frontend/src/instance.ts +++ b/packages/frontend/src/instance.ts @@ -15,7 +15,7 @@ const cached = miLocalStorage.getItem('instance'); // TODO: instanceをリアクティブにするかは再考の余地あり -export const instance: Misskey.entities.InstanceMetadata = reactive(cached ? JSON.parse(cached) : { +export const instance: Misskey.entities.MetaResponse = reactive(cached ? JSON.parse(cached) : { // TODO: set default values }); diff --git a/packages/frontend/src/pages/_error_.vue b/packages/frontend/src/pages/_error_.vue index 7a3e2f444b..4821687ac3 100644 --- a/packages/frontend/src/pages/_error_.vue +++ b/packages/frontend/src/pages/_error_.vue @@ -44,7 +44,7 @@ const props = withDefaults(defineProps<{ let loaded = $ref(false); let serverIsDead = $ref(false); -let meta = $ref(null); +let meta = $ref(null); os.api('meta', { detail: false, diff --git a/packages/frontend/src/pages/about.emojis.vue b/packages/frontend/src/pages/about.emojis.vue index c9bb6f897e..4ae460f763 100644 --- a/packages/frontend/src/pages/about.emojis.vue +++ b/packages/frontend/src/pages/about.emojis.vue @@ -48,7 +48,7 @@ import { $i } from '@/account.js'; const customEmojiTags = getCustomEmojiTags(); let q = $ref(''); -let searchEmojis = $ref(null); +let searchEmojis = $ref(null); let selectedTags = $ref(new Set()); function search() { diff --git a/packages/frontend/src/pages/auth.form.vue b/packages/frontend/src/pages/auth.form.vue index 3f6f58df55..9d39a1e603 100644 --- a/packages/frontend/src/pages/auth.form.vue +++ b/packages/frontend/src/pages/auth.form.vue @@ -27,7 +27,7 @@ import * as os from '@/os.js'; import { i18n } from '@/i18n.js'; const props = defineProps<{ - session: Misskey.entities.AuthSession; + session: Misskey.entities.AuthSessionShowResponse; }>(); const emit = defineEmits<{ diff --git a/packages/frontend/src/pages/auth.vue b/packages/frontend/src/pages/auth.vue index 124323a483..bcd54a6ed5 100644 --- a/packages/frontend/src/pages/auth.vue +++ b/packages/frontend/src/pages/auth.vue @@ -56,7 +56,7 @@ const props = defineProps<{ }>(); let state = $ref<'waiting' | 'accepted' | 'fetch-session-error' | 'denied' | null>(null); -let session = $ref(null); +let session = $ref(null); function accepted() { state = 'accepted'; diff --git a/packages/frontend/src/pages/instance-info.vue b/packages/frontend/src/pages/instance-info.vue index 1ed25c9a47..8706228fd1 100644 --- a/packages/frontend/src/pages/instance-info.vue +++ b/packages/frontend/src/pages/instance-info.vue @@ -144,8 +144,8 @@ const props = defineProps<{ let tab = $ref('overview'); let chartSrc = $ref('instance-requests'); -let meta = $ref(null); -let instance = $ref(null); +let meta = $ref(null); +let instance = $ref(null); let suspended = $ref(false); let isBlocked = $ref(false); let isSilenced = $ref(false); @@ -169,10 +169,10 @@ async function fetch(): Promise { instance = await os.api('federation/show-instance', { host: props.host, }); - suspended = instance.isSuspended; - isBlocked = instance.isBlocked; - isSilenced = instance.isSilenced; - faviconUrl = getProxiedImageUrlNullable(instance.faviconUrl, 'preview') ?? getProxiedImageUrlNullable(instance.iconUrl, 'preview'); + suspended = instance?.isSuspended ?? false; + isBlocked = instance?.isBlocked ?? false; + isSilenced = instance?.isSilenced ?? false; + faviconUrl = getProxiedImageUrlNullable(instance?.faviconUrl, 'preview') ?? getProxiedImageUrlNullable(instance?.iconUrl, 'preview'); } async function toggleBlock(): Promise { @@ -188,8 +188,9 @@ async function toggleSilenced(): Promise { if (!meta) throw new Error('No meta?'); if (!instance) throw new Error('No instance?'); const { host } = instance; + const silencedHosts = meta.silencedHosts ?? []; await os.api('admin/update-meta', { - silencedHosts: isSilenced ? meta.silencedHosts.concat([host]) : meta.silencedHosts.filter(x => x !== host), + silencedHosts: isSilenced ? silencedHosts.concat([host]) : silencedHosts.filter(x => x !== host), }); } diff --git a/packages/frontend/src/pages/invite.vue b/packages/frontend/src/pages/invite.vue index b44b580e86..25ce38e0ef 100644 --- a/packages/frontend/src/pages/invite.vue +++ b/packages/frontend/src/pages/invite.vue @@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only diff --git a/packages/frontend/src/pages/welcome.entrance.a.vue b/packages/frontend/src/pages/welcome.entrance.a.vue index e1f2a0cbda..89d0eb9a83 100644 --- a/packages/frontend/src/pages/welcome.entrance.a.vue +++ b/packages/frontend/src/pages/welcome.entrance.a.vue @@ -48,11 +48,15 @@ import MkNumber from '@/components/MkNumber.vue'; import MkVisitorDashboard from '@/components/MkVisitorDashboard.vue'; import { getProxiedImageUrl } from '@/scripts/media-proxy.js'; -let meta = $ref(); -let instances = $ref(); +let meta = $ref(); +let instances = $ref(); -function getInstanceIcon(instance): string { - return getProxiedImageUrl(instance.iconUrl, 'preview'); +function getInstanceIcon(instance: Misskey.entities.FederationInstance): string { + if (!instance.iconUrl) { + return ''; + } + + return getProxiedImageUrl(instance.iconUrl, 'preview'); } os.api('meta', { detail: true }).then(_meta => { diff --git a/packages/frontend/src/scripts/api.ts b/packages/frontend/src/scripts/api.ts index 080977e5e4..0f54f779a6 100644 --- a/packages/frontend/src/scripts/api.ts +++ b/packages/frontend/src/scripts/api.ts @@ -10,7 +10,12 @@ import { $i } from '@/account.js'; export const pendingApiRequestsCount = ref(0); // Implements Misskey.api.ApiClient.request -export function api(endpoint: E, data: P = {} as any, token?: string | null | undefined, signal?: AbortSignal): Promise { +export function api( + endpoint: E, + data: P = {} as any, + token?: string | null | undefined, + signal?: AbortSignal, +): Promise> { if (endpoint.includes('://')) throw new Error('invalid endpoint'); pendingApiRequestsCount.value++; @@ -51,7 +56,12 @@ export function api(hostUrl: string, endpoint: E, data: P = {} as any, token?: string | null | undefined, signal?: AbortSignal): Promise { +export function apiExternal( + hostUrl: string, + endpoint: E, data: P = {} as any, + token?: string | null | undefined, + signal?: AbortSignal, +): Promise> { if (!/^https?:\/\//.test(hostUrl)) throw new Error('invalid host name'); if (endpoint.includes('://')) throw new Error('invalid endpoint'); pendingApiRequestsCount.value++; @@ -95,7 +105,10 @@ export function apiExternal(endpoint: E, data: P = {} as any): Promise { +export function apiGet( + endpoint: E, + data: P = {} as any, +): Promise> { pendingApiRequestsCount.value++; const onFinally = () => { diff --git a/packages/frontend/src/ui/_common_/statusbar-federation.vue b/packages/frontend/src/ui/_common_/statusbar-federation.vue index ff980e0d88..a4ea916d23 100644 --- a/packages/frontend/src/ui/_common_/statusbar-federation.vue +++ b/packages/frontend/src/ui/_common_/statusbar-federation.vue @@ -47,7 +47,7 @@ const props = defineProps<{ refreshIntervalSec?: number; }>(); -const instances = ref([]); +const instances = ref([]); const fetching = ref(true); let key = $ref(0); diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index dc93c4be3b..4e6e2adc02 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -21,57 +21,326 @@ declare namespace acct { } export { acct } -// Warning: (ae-forgotten-export) The symbol "TODO_2" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "operations" needs to be exported by the entry point index.d.ts // // @public (undocumented) -type Ad = TODO_2; +type AdminAbuseUserReportsRequest = operations['admin/abuse-user-reports']['requestBody']['content']['application/json']; // @public (undocumented) -type AdminInstanceMetadata = DetailedInstanceMetadata & { - blockedHosts: string[]; - silencedHosts: string[]; - app192IconUrl: string | null; - app512IconUrl: string | null; - manifestJsonOverride: string; -}; +type AdminAbuseUserReportsResponse = operations['admin/abuse-user-reports']['responses']['200']['content']['application/json']; // @public (undocumented) -type Announcement = { - id: ID; - createdAt: DateString; - updatedAt: DateString | null; - text: string; - title: string; - imageUrl: string | null; - display: 'normal' | 'banner' | 'dialog'; - icon: 'info' | 'warning' | 'error' | 'success'; - needConfirmationToRead: boolean; - forYou: boolean; - isRead?: boolean; -}; +type AdminAccountsCreateRequest = operations['admin/accounts/create']['requestBody']['content']['application/json']; // @public (undocumented) -type Antenna = { - id: ID; - createdAt: DateString; - name: string; - keywords: string[][]; - excludeKeywords: string[][]; - src: 'home' | 'all' | 'users' | 'list' | 'group'; - userListId: ID | null; - userGroupId: ID | null; - users: string[]; - caseSensitive: boolean; - localOnly: boolean; - notify: boolean; - withReplies: boolean; - withFile: boolean; - hasUnreadNote: boolean; -}; +type AdminAccountsCreateResponse = operations['admin/accounts/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminAccountsDeleteRequest = operations['admin/accounts/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAccountsFindByEmailRequest = operations['admin/accounts/find-by-email']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAdCreateRequest = operations['admin/ad/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAdDeleteRequest = operations['admin/ad/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAdListRequest = operations['admin/ad/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAdUpdateRequest = operations['admin/ad/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAnnouncementsCreateRequest = operations['admin/announcements/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAnnouncementsCreateResponse = operations['admin/announcements/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminAnnouncementsDeleteRequest = operations['admin/announcements/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAnnouncementsListRequest = operations['admin/announcements/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAnnouncementsListResponse = operations['admin/announcements/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminAnnouncementsUpdateRequest = operations['admin/announcements/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAvatarDecorationsCreateRequest = operations['admin/avatar-decorations/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAvatarDecorationsDeleteRequest = operations['admin/avatar-decorations/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAvatarDecorationsListRequest = operations['admin/avatar-decorations/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminAvatarDecorationsListResponse = operations['admin/avatar-decorations/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminAvatarDecorationsUpdateRequest = operations['admin/avatar-decorations/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminDeleteAllFilesOfAUserRequest = operations['admin/delete-all-files-of-a-user']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminDriveFilesRequest = operations['admin/drive/files']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminDriveFilesResponse = operations['admin/drive/files']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminDriveShowFileRequest = operations['admin/drive/show-file']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminDriveShowFileResponse = operations['admin/drive/show-file']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiAddAliasesBulkRequest = operations['admin/emoji/add-aliases-bulk']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiAddRequest = operations['admin/emoji/add']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiCopyRequest = operations['admin/emoji/copy']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiCopyResponse = operations['admin/emoji/copy']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiDeleteBulkRequest = operations['admin/emoji/delete-bulk']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiDeleteRequest = operations['admin/emoji/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiListRemoteRequest = operations['admin/emoji/list-remote']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiListRemoteResponse = operations['admin/emoji/list-remote']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiListRequest = operations['admin/emoji/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiListResponse = operations['admin/emoji/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiRemoveAliasesBulkRequest = operations['admin/emoji/remove-aliases-bulk']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiSetAliasesBulkRequest = operations['admin/emoji/set-aliases-bulk']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiSetCategoryBulkRequest = operations['admin/emoji/set-category-bulk']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiSetLicenseBulkRequest = operations['admin/emoji/set-license-bulk']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminEmojiUpdateRequest = operations['admin/emoji/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminFederationDeleteAllFilesRequest = operations['admin/federation/delete-all-files']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminFederationRefreshRemoteInstanceMetadataRequest = operations['admin/federation/refresh-remote-instance-metadata']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminFederationRemoveAllFollowingRequest = operations['admin/federation/remove-all-following']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminFederationUpdateInstanceRequest = operations['admin/federation/update-instance']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminGetTableStatsResponse = operations['admin/get-table-stats']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminGetUserIpsRequest = operations['admin/get-user-ips']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminInviteCreateRequest = operations['admin/invite/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminInviteCreateResponse = operations['admin/invite/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminInviteListRequest = operations['admin/invite/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminInviteListResponse = operations['admin/invite/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminMetaResponse = operations['admin/meta']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminPromoCreateRequest = operations['admin/promo/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminQueueDeliverDelayedResponse = operations['admin/queue/deliver-delayed']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminQueueInboxDelayedResponse = operations['admin/queue/inbox-delayed']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminQueuePromoteRequest = operations['admin/queue/promote']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminQueueStatsResponse = operations['admin/queue/stats']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminRelaysAddRequest = operations['admin/relays/add']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminRelaysAddResponse = operations['admin/relays/add']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminRelaysListResponse = operations['admin/relays/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminRelaysRemoveRequest = operations['admin/relays/remove']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminResetPasswordRequest = operations['admin/reset-password']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminResetPasswordResponse = operations['admin/reset-password']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminResolveAbuseUserReportRequest = operations['admin/resolve-abuse-user-report']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminRolesAssignRequest = operations['admin/roles/assign']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminRolesUpdateDefaultPoliciesRequest = operations['admin/roles/update-default-policies']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminRolesUpdateRequest = operations['admin/roles/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminRolesUsersRequest = operations['admin/roles/users']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminSendEmailRequest = operations['admin/send-email']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminServerInfoResponse = operations['admin/server-info']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminShowModerationLogsRequest = operations['admin/show-moderation-logs']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminShowModerationLogsResponse = operations['admin/show-moderation-logs']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminShowUserRequest = operations['admin/show-user']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminShowUserResponse = operations['admin/show-user']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminShowUsersRequest = operations['admin/show-users']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminShowUsersResponse = operations['admin/show-users']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AdminSuspendUserRequest = operations['admin/suspend-user']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminUnsetUserAvatarRequest = operations['admin/unset-user-avatar']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminUnsetUserBannerRequest = operations['admin/unset-user-banner']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminUnsuspendUserRequest = operations['admin/unsuspend-user']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminUpdateMetaRequest = operations['admin/update-meta']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json']; + +// Warning: (ae-forgotten-export) The symbol "components" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +type Announcement = components['schemas']['Announcement']; + +// @public (undocumented) +type AnnouncementsRequest = operations['announcements']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AnnouncementsResponse = operations['announcements']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type Antenna = components['schemas']['Antenna']; + +// @public (undocumented) +type AntennasCreateRequest = operations['antennas/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AntennasCreateResponse = operations['antennas/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AntennasDeleteRequest = operations['antennas/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AntennasListResponse = operations['antennas/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AntennasNotesRequest = operations['antennas/notes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AntennasNotesResponse = operations['antennas/notes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AntennasShowRequest = operations['antennas/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AntennasShowResponse = operations['antennas/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AntennasUpdateRequest = operations['antennas/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AntennasUpdateResponse = operations['antennas/update']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ApGetRequest = operations['ap/get']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ApGetResponse = operations['ap/get']['responses']['200']['content']['application/json']; declare namespace api { export { isAPIError, + SwitchCaseResponseType, APIError, FetchLike, APIClient @@ -92,16 +361,8 @@ class APIClient { fetch: FetchLike; // (undocumented) origin: string; - // Warning: (ae-forgotten-export) The symbol "IsCaseMatched" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "GetCaseResult" needs to be exported by the entry point index.d.ts - // // (undocumented) - request(endpoint: E, params?: P, credential?: string | null | undefined): Promise extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res']>; + request(endpoint: E, params?: P, credential?: string | null): Promise>; } // @public (undocumented) @@ -114,41 +375,67 @@ type APIError = { }; // @public (undocumented) -type App = TODO_2; +type App = components['schemas']['App']; // @public (undocumented) -type AuthSession = { - id: ID; - app: App; - token: string; -}; +type AppCreateRequest = operations['app/create']['requestBody']['content']['application/json']; // @public (undocumented) -type Blocking = { - id: ID; - createdAt: DateString; - blockeeId: User['id']; - blockee: UserDetailed; -}; +type AppCreateResponse = operations['app/create']['responses']['200']['content']['application/json']; // @public (undocumented) -type Channel = { - id: ID; - lastNotedAt: Date | null; - userId: User['id'] | null; - user: User | null; - name: string; - description: string | null; - bannerId: DriveFile['id'] | null; - banner: DriveFile | null; - pinnedNoteIds: string[]; - color: string; - isArchived: boolean; - notesCount: number; - usersCount: number; - isSensitive: boolean; - allowRenoteToExternal: boolean; -}; +type AppShowRequest = operations['app/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AppShowResponse = operations['app/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ApShowRequest = operations['ap/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ApShowResponse = operations['ap/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AuthSessionGenerateRequest = operations['auth/session/generate']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AuthSessionGenerateResponse = operations['auth/session/generate']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AuthSessionShowRequest = operations['auth/session/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AuthSessionShowResponse = operations['auth/session/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type AuthSessionUserkeyRequest = operations['auth/session/userkey']['requestBody']['content']['application/json']; + +// @public (undocumented) +type AuthSessionUserkeyResponse = operations['auth/session/userkey']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type Blocking = components['schemas']['Blocking']; + +// @public (undocumented) +type BlockingCreateRequest = operations['blocking/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type BlockingCreateResponse = operations['blocking/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type BlockingDeleteRequest = operations['blocking/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type BlockingDeleteResponse = operations['blocking/delete']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type BlockingListRequest = operations['blocking/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type BlockingListResponse = operations['blocking/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type Channel = components['schemas']['Channel']; // Warning: (ae-forgotten-export) The symbol "AnyOf" needs to be exported by the entry point index.d.ts // @@ -197,9 +484,6 @@ export type Channels = { 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; @@ -245,27 +529,10 @@ export type Channels = { }; receives: null; }; - messaging: { - params: { - otherparty?: User['id'] | null; - group?: UserGroup['id'] | null; - }; + serverStats: { + params: 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; + stats: (payload: FIXME) => void; }; receives: { requestLog: { @@ -289,2292 +556,1226 @@ export type Channels = { }; // @public (undocumented) -type Clip = TODO_2; +type ChannelsCreateRequest = operations['channels/create']['requestBody']['content']['application/json']; // @public (undocumented) -type CustomEmoji = { - id: string; - name: string; - url: string; - category: string; - aliases: string[]; -}; +type ChannelsCreateResponse = operations['channels/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChannelsFavoriteRequest = operations['channels/favorite']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChannelsFeaturedResponse = operations['channels/featured']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChannelsFollowedRequest = operations['channels/followed']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChannelsFollowedResponse = operations['channels/followed']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChannelsFollowRequest = operations['channels/follow']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChannelsMyFavoritesResponse = operations['channels/my-favorites']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChannelsOwnedRequest = operations['channels/owned']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChannelsOwnedResponse = operations['channels/owned']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChannelsSearchRequest = operations['channels/search']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChannelsSearchResponse = operations['channels/search']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChannelsShowRequest = operations['channels/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChannelsShowResponse = operations['channels/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChannelsTimelineRequest = operations['channels/timeline']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChannelsTimelineResponse = operations['channels/timeline']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChannelsUnfavoriteRequest = operations['channels/unfavorite']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChannelsUnfollowRequest = operations['channels/unfollow']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChannelsUpdateRequest = operations['channels/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChannelsUpdateResponse = operations['channels/update']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsActiveUsersRequest = operations['charts/active-users']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsActiveUsersResponse = operations['charts/active-users']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsApRequestRequest = operations['charts/ap-request']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsApRequestResponse = operations['charts/ap-request']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsDriveRequest = operations['charts/drive']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsDriveResponse = operations['charts/drive']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsFederationRequest = operations['charts/federation']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsFederationResponse = operations['charts/federation']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsInstanceRequest = operations['charts/instance']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsInstanceResponse = operations['charts/instance']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsNotesRequest = operations['charts/notes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsNotesResponse = operations['charts/notes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsUserDriveRequest = operations['charts/user/drive']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsUserDriveResponse = operations['charts/user/drive']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsUserFollowingRequest = operations['charts/user/following']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsUserFollowingResponse = operations['charts/user/following']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsUserNotesRequest = operations['charts/user/notes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsUserNotesResponse = operations['charts/user/notes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsUserPvRequest = operations['charts/user/pv']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsUserPvResponse = operations['charts/user/pv']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsUserReactionsRequest = operations['charts/user/reactions']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsUserReactionsResponse = operations['charts/user/reactions']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ChartsUsersRequest = operations['charts/users']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ChartsUsersResponse = operations['charts/users']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type Clip = components['schemas']['Clip']; + +// @public (undocumented) +type ClipsAddNoteRequest = operations['clips/add-note']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ClipsCreateRequest = operations['clips/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ClipsCreateResponse = operations['clips/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ClipsDeleteRequest = operations['clips/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ClipsFavoriteRequest = operations['clips/favorite']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ClipsListResponse = operations['clips/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ClipsMyFavoritesResponse = operations['clips/my-favorites']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ClipsNotesRequest = operations['clips/notes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ClipsNotesResponse = operations['clips/notes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ClipsRemoveNoteRequest = operations['clips/remove-note']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ClipsShowRequest = operations['clips/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ClipsShowResponse = operations['clips/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type ClipsUnfavoriteRequest = operations['clips/unfavorite']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ClipsUpdateRequest = operations['clips/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ClipsUpdateResponse = operations['clips/update']['responses']['200']['content']['application/json']; // @public (undocumented) type DateString = string; // @public (undocumented) -type DetailedInstanceMetadata = LiteInstanceMetadata & { - pinnedPages: string[]; - pinnedClipId: string | null; - cacheRemoteFiles: boolean; - cacheRemoteSensitiveFiles: boolean; - requireSetup: boolean; - proxyAccountName: string | null; - features: Record; -}; +type DriveFile = components['schemas']['DriveFile']; // @public (undocumented) -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; -}; +type DriveFilesAttachedNotesRequest = operations['drive/files/attached-notes']['requestBody']['content']['application/json']; // @public (undocumented) -type DriveFolder = TODO_2; +type DriveFilesAttachedNotesResponse = operations['drive/files/attached-notes']['responses']['200']['content']['application/json']; // @public (undocumented) -export type Endpoints = { - 'admin/abuse-user-reports': { - req: TODO; - res: TODO; - }; - 'admin/delete-all-files-of-a-user': { - req: { - userId: User['id']; - }; - res: null; - }; - 'admin/unset-user-avatar': { - req: { - userId: User['id']; - }; - res: null; - }; - 'admin/unset-user-banner': { - req: { - userId: User['id']; - }; - res: null; - }; - 'admin/delete-logs': { - req: NoParams; - res: null; - }; - 'admin/get-index-stats': { - req: TODO; - res: TODO; - }; - 'admin/get-table-stats': { - req: TODO; - res: TODO; - }; - 'admin/invite': { - req: TODO; - res: TODO; - }; - 'admin/logs': { - req: TODO; - res: TODO; - }; - 'admin/meta': { - req: NoParams; - res: AdminInstanceMetadata; - }; - 'admin/reset-password': { - req: TODO; - res: TODO; - }; - 'admin/resolve-abuse-user-report': { - req: TODO; - res: TODO; - }; - 'admin/resync-chart': { - req: TODO; - res: TODO; - }; - 'admin/send-email': { - req: TODO; - res: TODO; - }; - 'admin/server-info': { - req: TODO; - res: TODO; - }; - 'admin/show-moderation-logs': { - req: TODO; - res: TODO; - }; - 'admin/show-user': { - req: TODO; - res: TODO; - }; - 'admin/show-users': { - req: TODO; - res: TODO; - }; - 'admin/silence-user': { - req: TODO; - res: TODO; - }; - 'admin/suspend-user': { - req: TODO; - res: TODO; - }; - 'admin/unsilence-user': { - req: TODO; - res: TODO; - }; - 'admin/unsuspend-user': { - req: TODO; - res: TODO; - }; - 'admin/update-meta': { - req: TODO; - res: TODO; - }; - 'admin/vacuum': { - req: TODO; - res: TODO; - }; - 'admin/accounts/create': { - req: TODO; - res: TODO; - }; - 'admin/ad/create': { - req: TODO; - res: TODO; - }; - 'admin/ad/delete': { - req: { - id: Ad['id']; +type DriveFilesCheckExistenceRequest = operations['drive/files/check-existence']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFilesCheckExistenceResponse = operations['drive/files/check-existence']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFilesCreateRequest = operations['drive/files/create']['requestBody']['content']['multipart/form-data']; + +// @public (undocumented) +type DriveFilesCreateResponse = operations['drive/files/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFilesDeleteRequest = operations['drive/files/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFilesFindByHashRequest = operations['drive/files/find-by-hash']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFilesFindByHashResponse = operations['drive/files/find-by-hash']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFilesFindRequest = operations['drive/files/find']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFilesFindResponse = operations['drive/files/find']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFilesRequest = operations['drive/files']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFilesResponse = operations['drive/files']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFilesShowRequest = operations['drive/files/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFilesShowResponse = operations['drive/files/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFilesUpdateRequest = operations['drive/files/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFilesUpdateResponse = operations['drive/files/update']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFilesUploadFromUrlRequest = operations['drive/files/upload-from-url']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFolder = components['schemas']['DriveFolder']; + +// @public (undocumented) +type DriveFoldersCreateRequest = operations['drive/folders/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFoldersCreateResponse = operations['drive/folders/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFoldersDeleteRequest = operations['drive/folders/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFoldersFindRequest = operations['drive/folders/find']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFoldersFindResponse = operations['drive/folders/find']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFoldersRequest = operations['drive/folders']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFoldersResponse = operations['drive/folders']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFoldersShowRequest = operations['drive/folders/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFoldersShowResponse = operations['drive/folders/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveFoldersUpdateRequest = operations['drive/folders/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveFoldersUpdateResponse = operations['drive/folders/update']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveResponse = operations['drive']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type DriveStreamRequest = operations['drive/stream']['requestBody']['content']['application/json']; + +// @public (undocumented) +type DriveStreamResponse = operations['drive/stream']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type EmailAddressAvailableRequest = operations['email-address/available']['requestBody']['content']['application/json']; + +// @public (undocumented) +type EmailAddressAvailableResponse = operations['email-address/available']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type EmojiDetailed = components['schemas']['EmojiDetailed']; + +// @public (undocumented) +type EmojiRequest = operations['emoji']['requestBody']['content']['application/json']; + +// @public (undocumented) +type EmojiResponse = operations['emoji']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type EmojiSimple = components['schemas']['EmojiSimple']; + +// @public (undocumented) +type EmojisResponse = operations['emojis']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type EmptyRequest = Record | undefined; + +// @public (undocumented) +type EmptyResponse = Record | undefined; + +// @public (undocumented) +type EndpointRequest = operations['endpoint']['requestBody']['content']['application/json']; + +// Warning: (ae-forgotten-export) The symbol "Overwrite" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "Endpoints_2" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type Endpoints = Overwrite; - }; - 'ap/show': { - req: { - uri: string; - }; - res: { - type: 'Note'; - object: Note; - } | { - type: 'User'; - object: UserDetailed; - }; - }; - 'app/create': { - req: TODO; - res: App; - }; - 'app/show': { - req: { - appId: App['id']; - }; - res: App; - }; - 'auth/accept': { - req: { - token: string; - }; - res: null; - }; - 'auth/session/generate': { - req: { - appSecret: string; - }; - res: { - token: string; - url: string; - }; - }; - 'auth/session/show': { - req: { - token: string; - }; - res: AuthSession; - }; - 'auth/session/userkey': { - req: { - appSecret: string; - token: string; - }; - res: { - accessToken: string; - user: User; - }; - }; - 'blocking/create': { - req: { - userId: User['id']; - }; - res: UserDetailed; - }; - 'blocking/delete': { - req: { - userId: User['id']; - }; - res: UserDetailed; - }; - 'blocking/list': { - req: { - limit?: number; - sinceId?: Blocking['id']; - untilId?: Blocking['id']; - }; - res: Blocking[]; - }; - 'channels/create': { - req: TODO; - res: TODO; - }; - 'channels/featured': { - req: TODO; - res: TODO; - }; - 'channels/follow': { - req: TODO; - res: TODO; - }; - 'channels/followed': { - req: TODO; - res: TODO; - }; - 'channels/owned': { - req: TODO; - res: TODO; - }; - 'channels/pin-note': { - req: TODO; - res: TODO; - }; - 'channels/show': { - req: TODO; - res: TODO; - }; - 'channels/timeline': { - req: TODO; - res: TODO; - }; - 'channels/unfollow': { - req: TODO; - res: TODO; - }; - 'channels/update': { - req: TODO; - res: TODO; - }; - 'charts/active-users': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - users: number[]; - }; - remote: { - users: number[]; - }; - }; - }; - 'charts/drive': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - remote: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; - }; - 'charts/federation': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - instance: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - 'charts/hashtag': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: TODO; - }; - 'charts/instance': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - host: string; - }; - res: { - drive: { - decFiles: number[]; - decUsage: number[]; - incFiles: number[]; - incUsage: number[]; - totalFiles: number[]; - totalUsage: number[]; - }; - followers: { - dec: number[]; - inc: number[]; - total: number[]; - }; - following: { - dec: number[]; - inc: number[]; - total: number[]; - }; - notes: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - requests: { - failed: number[]; - received: number[]; - succeeded: number[]; - }; - users: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - 'charts/network': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: TODO; - }; - 'charts/notes': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; - }; - 'charts/user/drive': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; - 'charts/user/following': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: TODO; - }; - 'charts/user/notes': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; - 'charts/user/reactions': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - userId: User['id']; - }; - res: TODO; - }; - 'charts/users': { - req: { - span: 'day' | 'hour'; - limit?: number; - offset?: number | null; - }; - res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; - }; - 'clips/add-note': { - req: TODO; - res: TODO; - }; - 'clips/create': { - req: TODO; - res: TODO; - }; - 'clips/delete': { - req: { - clipId: Clip['id']; - }; - res: null; - }; - 'clips/list': { - req: TODO; - res: TODO; - }; - 'clips/notes': { - req: TODO; - res: TODO; - }; - 'clips/show': { - req: TODO; - res: TODO; - }; - 'clips/update': { - req: TODO; - res: TODO; - }; - 'drive': { - req: NoParams; - res: { - capacity: number; - usage: number; - }; - }; - 'drive/files': { - req: { - folderId?: DriveFolder['id'] | null; - type?: DriveFile['type'] | null; - limit?: number; - sinceId?: DriveFile['id']; - untilId?: DriveFile['id']; - }; - res: DriveFile[]; - }; - 'drive/files/attached-notes': { - req: TODO; - res: TODO; - }; - 'drive/files/check-existence': { - req: TODO; - res: TODO; - }; - 'drive/files/create': { - req: { - folderId?: string; - name?: string; - comment?: string; - isSentisive?: boolean; - force?: boolean; - }; - res: DriveFile; - }; - 'drive/files/delete': { - req: { - fileId: DriveFile['id']; - }; - res: null; - }; - 'drive/files/find-by-hash': { - req: TODO; - res: TODO; - }; - 'drive/files/find': { - req: { - name: string; - folderId?: DriveFolder['id'] | null; - }; - res: DriveFile[]; - }; - 'drive/files/show': { - req: { - fileId?: DriveFile['id']; - url?: string; - }; - res: DriveFile; - }; - 'drive/files/update': { - req: { - fileId: DriveFile['id']; - folderId?: DriveFolder['id'] | null; - name?: string; - isSensitive?: boolean; - comment?: string | null; - }; - res: DriveFile; - }; - 'drive/files/upload-from-url': { - req: { - url: string; - folderId?: DriveFolder['id'] | null; - isSensitive?: boolean; - comment?: string | null; - marker?: string | null; - force?: boolean; - }; - res: null; - }; - 'drive/folders': { - req: { - folderId?: DriveFolder['id'] | null; - limit?: number; - sinceId?: DriveFile['id']; - untilId?: DriveFile['id']; - }; - res: DriveFolder[]; - }; - 'drive/folders/create': { - req: { - name?: string; - parentId?: DriveFolder['id'] | null; - }; - res: DriveFolder; - }; - 'drive/folders/delete': { - req: { - folderId: DriveFolder['id']; - }; - res: null; - }; - 'drive/folders/find': { - req: { - name: string; - parentId?: DriveFolder['id'] | null; - }; - res: DriveFolder[]; - }; - 'drive/folders/show': { - req: { - folderId: DriveFolder['id']; - }; - res: DriveFolder; - }; - 'drive/folders/update': { - req: { - folderId: DriveFolder['id']; - name?: string; - parentId?: DriveFolder['id'] | null; - }; - res: DriveFolder; - }; - 'drive/stream': { - req: { - type?: DriveFile['type'] | null; - limit?: number; - sinceId?: DriveFile['id']; - untilId?: DriveFile['id']; - }; - res: DriveFile[]; - }; - 'endpoint': { - req: { - endpoint: string; - }; - res: { - params: { - name: string; - type: string; - }[]; - }; - }; - 'endpoints': { - req: NoParams; - res: string[]; - }; - 'federation/dns': { - req: { - host: string; - }; - res: { - a: string[]; - aaaa: string[]; - cname: string[]; - txt: string[]; - }; - }; - 'federation/followers': { - req: { - host: string; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFolloweePopulated[]; - }; - 'federation/following': { - req: { - host: string; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFolloweePopulated[]; - }; - 'federation/instances': { - req: { - host?: string | null; - blocked?: boolean | null; - notResponding?: boolean | null; - suspended?: boolean | null; - federating?: boolean | null; - subscribing?: boolean | null; - publishing?: boolean | null; - limit?: number; - offset?: number; - sort?: '+pubSub' | '-pubSub' | '+notes' | '-notes' | '+users' | '-users' | '+following' | '-following' | '+followers' | '-followers' | '+caughtAt' | '-caughtAt' | '+lastCommunicatedAt' | '-lastCommunicatedAt' | '+driveUsage' | '-driveUsage' | '+driveFiles' | '-driveFiles'; - }; - res: Instance[]; - }; - 'federation/show-instance': { - req: { - host: string; - }; - res: Instance; - }; - 'federation/update-remote-user': { - req: { - userId: User['id']; - }; - res: null; - }; - 'federation/users': { - req: { - host: string; - limit?: number; - sinceId?: User['id']; - untilId?: User['id']; - }; - res: UserDetailed[]; - }; - 'following/create': { - req: { - userId: User['id']; - withReplies?: boolean; - }; - res: User; - }; - 'following/delete': { - req: { - userId: User['id']; - }; - res: User; - }; - 'following/requests/accept': { - req: { - userId: User['id']; - }; - res: null; - }; - 'following/requests/cancel': { - req: { - userId: User['id']; - }; - res: User; - }; - 'following/requests/list': { - req: NoParams; - res: FollowRequest[]; - }; - 'following/requests/reject': { - req: { - userId: User['id']; - }; - res: null; - }; - 'gallery/featured': { - req: null; - res: GalleryPost[]; - }; - 'gallery/popular': { - req: null; - res: GalleryPost[]; - }; - 'gallery/posts': { - req: { - limit?: number; - sinceId?: GalleryPost['id']; - untilId?: GalleryPost['id']; - }; - res: GalleryPost[]; - }; - 'gallery/posts/create': { - req: { - title: GalleryPost['title']; - description?: GalleryPost['description']; - fileIds: GalleryPost['fileIds']; - isSensitive?: GalleryPost['isSensitive']; - }; - res: GalleryPost; - }; - 'gallery/posts/delete': { - req: { - postId: GalleryPost['id']; - }; - res: null; - }; - 'gallery/posts/like': { - req: { - postId: GalleryPost['id']; - }; - res: null; - }; - 'gallery/posts/show': { - req: { - postId: GalleryPost['id']; - }; - res: GalleryPost; - }; - 'gallery/posts/unlike': { - req: { - postId: GalleryPost['id']; - }; - res: null; - }; - 'gallery/posts/update': { - req: { - postId: GalleryPost['id']; - title: GalleryPost['title']; - description?: GalleryPost['description']; - fileIds: GalleryPost['fileIds']; - isSensitive?: GalleryPost['isSensitive']; - }; - res: GalleryPost; - }; - 'games/reversi/games': { - req: TODO; - res: TODO; - }; - 'games/reversi/games/show': { - req: TODO; - res: TODO; - }; - 'games/reversi/games/surrender': { - req: TODO; - res: TODO; - }; - 'games/reversi/invitations': { - req: TODO; - res: TODO; - }; - 'games/reversi/match': { - req: TODO; - res: TODO; - }; - 'games/reversi/match/cancel': { - req: TODO; - res: TODO; - }; - 'get-online-users-count': { - req: NoParams; - res: { - count: number; - }; - }; - 'hashtags/list': { - req: TODO; - res: TODO; - }; - 'hashtags/search': { - req: TODO; - res: TODO; - }; - 'hashtags/show': { - req: TODO; - res: TODO; - }; - 'hashtags/trend': { - req: TODO; - res: TODO; - }; - 'hashtags/users': { - req: TODO; - res: TODO; - }; - 'i': { - req: NoParams; - res: User; - }; - 'i/apps': { - req: TODO; - res: TODO; - }; - 'i/authorized-apps': { - req: TODO; - res: TODO; - }; - 'i/change-password': { - req: TODO; - res: TODO; - }; - 'i/delete-account': { - req: { - password: string; - }; - res: null; - }; - 'i/export-blocking': { - req: TODO; - res: TODO; - }; - 'i/export-following': { - req: TODO; - res: TODO; - }; - 'i/export-mute': { - req: TODO; - res: TODO; - }; - 'i/export-notes': { - req: TODO; - res: TODO; - }; - 'i/export-user-lists': { - req: TODO; - res: TODO; - }; - 'i/favorites': { - req: { - limit?: number; - sinceId?: NoteFavorite['id']; - untilId?: NoteFavorite['id']; - }; - res: NoteFavorite[]; - }; - 'i/gallery/likes': { - req: TODO; - res: TODO; - }; - 'i/gallery/posts': { - req: TODO; - res: TODO; - }; - 'i/import-following': { - req: TODO; - res: TODO; - }; - 'i/import-user-lists': { - req: TODO; - res: TODO; - }; - 'i/move': { - req: TODO; - res: TODO; - }; - 'i/notifications': { - req: { - limit?: number; - sinceId?: Notification_2['id']; - untilId?: Notification_2['id']; - following?: boolean; - markAsRead?: boolean; - includeTypes?: Notification_2['type'][]; - excludeTypes?: Notification_2['type'][]; - }; - res: Notification_2[]; - }; - 'i/page-likes': { - req: TODO; - res: TODO; - }; - 'i/pages': { - req: TODO; - res: TODO; - }; - 'i/pin': { - req: { - noteId: Note['id']; - }; - res: MeDetailed; - }; - 'i/read-all-messaging-messages': { - req: TODO; - res: TODO; - }; - 'i/read-all-unread-notes': { - req: TODO; - res: TODO; - }; - 'i/read-announcement': { - req: TODO; - res: TODO; - }; - 'i/regenerate-token': { - req: { - password: string; - }; - res: null; - }; - 'i/registry/get-all': { - req: { - scope?: string[]; - }; - res: Record; - }; - 'i/registry/get-detail': { - req: { - key: string; - scope?: string[]; - }; - res: { - updatedAt: DateString; - value: any; - }; - }; - 'i/registry/get': { - req: { - key: string; - scope?: string[]; - }; - res: any; - }; - 'i/registry/keys-with-type': { - req: { - scope?: string[]; - }; - res: Record; - }; - 'i/registry/keys': { - req: { - scope?: string[]; - }; - res: string[]; - }; - 'i/registry/remove': { - req: { - key: string; - scope?: string[]; - }; - res: null; - }; - 'i/registry/set': { - req: { - key: string; - value: any; - scope?: string[]; - }; - res: null; - }; - 'i/revoke-token': { - req: TODO; - res: TODO; - }; - 'i/signin-history': { - req: { - limit?: number; - sinceId?: Signin['id']; - untilId?: Signin['id']; - }; - res: Signin[]; - }; - 'i/unpin': { - req: { - noteId: Note['id']; - }; - res: MeDetailed; - }; - 'i/update-email': { - req: { - password: string; - email?: string | null; - }; - res: MeDetailed; - }; - 'i/update': { - req: { - name?: string | null; - description?: string | null; - lang?: string | null; - location?: string | null; - birthday?: string | null; - avatarId?: DriveFile['id'] | null; - bannerId?: DriveFile['id'] | null; - fields?: { - name: string; - value: string; - }[]; - isLocked?: boolean; - isExplorable?: boolean; - hideOnlineStatus?: boolean; - carefulBot?: boolean; - autoAcceptFollowed?: boolean; - noCrawle?: boolean; - isBot?: boolean; - isCat?: boolean; - injectFeaturedNote?: boolean; - receiveAnnouncementEmail?: boolean; - alwaysMarkNsfw?: boolean; - mutedWords?: (string[] | string)[]; - hardMutedWords?: (string[] | string)[]; - notificationRecieveConfig?: any; - emailNotificationTypes?: string[]; - alsoKnownAs?: string[]; - }; - res: MeDetailed; - }; - 'i/user-group-invites': { - req: TODO; - res: TODO; - }; - 'i/2fa/done': { - req: TODO; - res: TODO; - }; - 'i/2fa/key-done': { - req: TODO; - res: TODO; - }; - 'i/2fa/password-less': { - req: TODO; - res: TODO; - }; - 'i/2fa/register-key': { - req: TODO; - res: TODO; - }; - 'i/2fa/register': { - req: TODO; - res: TODO; - }; - 'i/2fa/remove-key': { - req: TODO; - res: TODO; - }; - 'i/2fa/unregister': { - req: TODO; - res: TODO; - }; - 'invite/create': { - req: NoParams; - res: Invite; - }; - 'invite/delete': { - req: { - inviteId: Invite['id']; - }; - res: null; - }; - 'invite/list': { - req: { - limit?: number; - sinceId?: Invite['id']; - untilId?: Invite['id']; - }; - res: Invite[]; - }; - 'invite/limit': { - req: NoParams; - res: InviteLimit; - }; - 'messaging/history': { - req: { - limit?: number; - group?: boolean; - }; - res: MessagingMessage[]; - }; - 'messaging/messages': { - req: { - userId?: User['id']; - groupId?: UserGroup['id']; - limit?: number; - sinceId?: MessagingMessage['id']; - untilId?: MessagingMessage['id']; - markAsRead?: boolean; - }; - res: MessagingMessage[]; - }; - 'messaging/messages/create': { - req: { - userId?: User['id']; - groupId?: UserGroup['id']; - text?: string; - fileId?: DriveFile['id']; - }; - res: MessagingMessage; - }; - 'messaging/messages/delete': { - req: { - messageId: MessagingMessage['id']; - }; - res: null; - }; - 'messaging/messages/read': { - req: { - messageId: MessagingMessage['id']; - }; - res: null; - }; - 'meta': { - req: { - detail?: boolean; - }; - res: { - $switch: { - $cases: [ - [ - { - detail: true; - }, - DetailedInstanceMetadata - ], - [ - { - detail: false; - }, - LiteInstanceMetadata - ], - [ - { - detail: boolean; - }, - LiteInstanceMetadata | DetailedInstanceMetadata - ] - ]; - $default: LiteInstanceMetadata; - }; - }; - }; - 'miauth/gen-token': { - req: TODO; - res: TODO; - }; - 'mute/create': { - req: TODO; - res: TODO; - }; - 'mute/delete': { - req: { - userId: User['id']; - }; - res: null; - }; - 'mute/list': { - req: TODO; - res: TODO; - }; - 'my/apps': { - req: TODO; - res: TODO; - }; - 'notes': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'notes/children': { - req: { - noteId: Note['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'notes/clips': { - req: TODO; - res: TODO; - }; - 'notes/conversation': { - req: TODO; - res: TODO; - }; - 'notes/create': { - req: { - visibility?: 'public' | 'home' | 'followers' | 'specified'; - visibleUserIds?: User['id'][]; - text?: null | string; - cw?: null | string; - viaMobile?: boolean; - localOnly?: boolean; - fileIds?: DriveFile['id'][]; - replyId?: null | Note['id']; - renoteId?: null | Note['id']; - channelId?: null | Channel['id']; - poll?: null | { - choices: string[]; - multiple?: boolean; - expiresAt?: null | number; - expiredAfter?: null | number; - }; - }; - res: { - createdNote: Note; - }; - }; - 'notes/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/favorites/create': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/favorites/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/featured': { - req: TODO; - res: Note[]; - }; - 'notes/global-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/hybrid-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/local-timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/mentions': { - req: { - following?: boolean; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - }; - res: Note[]; - }; - 'notes/polls/recommendation': { - req: TODO; - res: TODO; - }; - 'notes/polls/vote': { - req: { - noteId: Note['id']; - choice: number; - }; - res: null; - }; - 'notes/reactions': { - req: { - noteId: Note['id']; - type?: string | null; - limit?: number; - }; - res: NoteReaction[]; - }; - 'notes/reactions/create': { - req: { - noteId: Note['id']; - reaction: string; - }; - res: null; - }; - 'notes/reactions/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/renotes': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - noteId: Note['id']; - }; - res: Note[]; - }; - 'notes/replies': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - noteId: Note['id']; - }; - res: Note[]; - }; - 'notes/search-by-tag': { - req: TODO; - res: TODO; - }; - 'notes/search': { - req: TODO; - res: TODO; - }; - 'notes/show': { - req: { - noteId: Note['id']; - }; - res: Note; - }; - 'notes/state': { - req: TODO; - res: TODO; - }; - 'notes/timeline': { - req: { - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/unrenote': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notes/user-list-timeline': { - req: { - listId: UserList['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'notes/watching/create': { - req: TODO; - res: TODO; - }; - 'notes/watching/delete': { - req: { - noteId: Note['id']; - }; - res: null; - }; - 'notifications/create': { - req: { - body: string; - header?: string | null; - icon?: string | null; - }; - res: null; - }; - 'notifications/test-notification': { - req: NoParams; - res: null; - }; - 'notifications/mark-all-as-read': { - req: NoParams; - res: null; - }; - 'page-push': { - req: { - pageId: Page['id']; - event: string; - var?: any; - }; - res: null; - }; - 'pages/create': { - req: TODO; - res: Page; - }; - 'pages/delete': { - req: { - pageId: Page['id']; - }; - res: null; - }; - 'pages/featured': { - req: NoParams; - res: Page[]; - }; - 'pages/like': { - req: { - pageId: Page['id']; - }; - res: null; - }; - 'pages/show': { - req: { - pageId?: Page['id']; - name?: string; - username?: string; - }; - res: Page; - }; - 'pages/unlike': { - req: { - pageId: Page['id']; - }; - res: null; - }; - 'pages/update': { - req: TODO; - res: null; - }; - 'ping': { - req: NoParams; - res: { - pong: number; - }; - }; - 'pinned-users': { - req: TODO; - res: TODO; - }; - 'promo/read': { - req: TODO; - res: TODO; - }; - 'request-reset-password': { - req: { - username: string; - email: string; - }; - res: null; - }; - 'reset-password': { - req: { - token: string; - password: string; - }; - res: null; - }; - 'room/show': { - req: TODO; - res: TODO; - }; - 'room/update': { - req: TODO; - res: TODO; - }; - 'signup': { - req: { - username: string; - password: string; - host?: string; - invitationCode?: string; - emailAddress?: string; - 'hcaptcha-response'?: string; - 'g-recaptcha-response'?: string; - 'turnstile-response'?: string; - }; - res: MeSignup | null; - }; - 'stats': { - req: NoParams; - res: Stats; - }; - 'server-info': { - req: NoParams; - res: ServerInfo; - }; - 'sw/register': { - req: TODO; - res: TODO; - }; - 'username/available': { - req: { - username: string; - }; - res: { - available: boolean; - }; - }; - 'users': { - req: { - limit?: number; - offset?: number; - sort?: UserSorting; - origin?: OriginType; - }; - res: User[]; - }; - 'users/clips': { - req: TODO; - res: TODO; - }; - 'users/followers': { - req: { - userId?: User['id']; - username?: User['username']; - host?: User['host'] | null; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFollowerPopulated[]; - }; - 'users/following': { - req: { - userId?: User['id']; - username?: User['username']; - host?: User['host'] | null; - limit?: number; - sinceId?: Following['id']; - untilId?: Following['id']; - }; - res: FollowingFolloweePopulated[]; - }; - 'users/gallery/posts': { - req: TODO; - res: TODO; - }; - 'users/get-frequently-replied-users': { - req: TODO; - res: TODO; - }; - 'users/groups/create': { - req: TODO; - res: TODO; - }; - 'users/groups/delete': { - req: { - groupId: UserGroup['id']; - }; - res: null; - }; - 'users/groups/invitations/accept': { - req: TODO; - res: TODO; - }; - 'users/groups/invitations/reject': { - req: TODO; - res: TODO; - }; - 'users/groups/invite': { - req: TODO; - res: TODO; - }; - 'users/groups/joined': { - req: TODO; - res: TODO; - }; - 'users/groups/owned': { - req: TODO; - res: TODO; - }; - 'users/groups/pull': { - req: TODO; - res: TODO; - }; - 'users/groups/show': { - req: TODO; - res: TODO; - }; - 'users/groups/transfer': { - req: TODO; - res: TODO; - }; - 'users/groups/update': { - req: TODO; - res: TODO; - }; - 'users/lists/create': { - req: { - name: string; - }; - res: UserList; - }; - 'users/lists/delete': { - req: { - listId: UserList['id']; - }; - res: null; - }; - 'users/lists/list': { - req: NoParams; - res: UserList[]; - }; - 'users/lists/pull': { - req: { - listId: UserList['id']; - userId: User['id']; - }; - res: null; - }; - 'users/lists/push': { - req: { - listId: UserList['id']; - userId: User['id']; - }; - res: null; - }; - 'users/lists/show': { - req: { - listId: UserList['id']; - }; - res: UserList; - }; - 'users/lists/update': { - req: { - listId: UserList['id']; - name: string; - }; - res: UserList; - }; - 'users/notes': { - req: { - userId: User['id']; - limit?: number; - sinceId?: Note['id']; - untilId?: Note['id']; - sinceDate?: number; - untilDate?: number; - }; - res: Note[]; - }; - 'users/pages': { - req: TODO; - res: TODO; - }; - 'users/flashs': { - req: TODO; - res: TODO; - }; - 'users/recommendation': { - req: TODO; - res: TODO; - }; - 'users/relation': { - req: TODO; - res: TODO; - }; - 'users/report-abuse': { - req: TODO; - res: TODO; - }; - 'users/search-by-username-and-host': { - req: TODO; - res: TODO; - }; - 'users/search': { - req: TODO; - res: TODO; - }; - 'users/show': { - req: ShowUserReq | { - userIds: User['id'][]; - }; - res: { - $switch: { - $cases: [ - [ - { - userIds: User['id'][]; - }, - UserDetailed[] - ] - ]; - $default: UserDetailed; - }; - }; - }; - 'fetch-rss': { - req: { - url: string; - }; - res: TODO; - }; - 'fetch-external-resources': { - req: { - url: string; - hash: string; - }; - res: { - type: string; - data: string; - }; +}>; + +// @public (undocumented) +type EndpointsResponse = operations['endpoints']['responses']['200']['content']['application/json']; + +declare namespace entities { + export { + ID, + DateString, + PageEvent, + ModerationLog, + EmptyRequest, + EmptyResponse, + AdminMetaResponse, + AdminAbuseUserReportsRequest, + AdminAbuseUserReportsResponse, + AdminAccountsCreateRequest, + AdminAccountsCreateResponse, + AdminAccountsDeleteRequest, + AdminAccountsFindByEmailRequest, + AdminAdCreateRequest, + AdminAdDeleteRequest, + AdminAdListRequest, + AdminAdUpdateRequest, + AdminAnnouncementsCreateRequest, + AdminAnnouncementsCreateResponse, + AdminAnnouncementsDeleteRequest, + AdminAnnouncementsListRequest, + AdminAnnouncementsListResponse, + AdminAnnouncementsUpdateRequest, + AdminAvatarDecorationsCreateRequest, + AdminAvatarDecorationsDeleteRequest, + AdminAvatarDecorationsListRequest, + AdminAvatarDecorationsListResponse, + AdminAvatarDecorationsUpdateRequest, + AdminDeleteAllFilesOfAUserRequest, + AdminUnsetUserAvatarRequest, + AdminUnsetUserBannerRequest, + AdminDriveFilesRequest, + AdminDriveFilesResponse, + AdminDriveShowFileRequest, + AdminDriveShowFileResponse, + AdminEmojiAddAliasesBulkRequest, + AdminEmojiAddRequest, + AdminEmojiCopyRequest, + AdminEmojiCopyResponse, + AdminEmojiDeleteBulkRequest, + AdminEmojiDeleteRequest, + AdminEmojiListRemoteRequest, + AdminEmojiListRemoteResponse, + AdminEmojiListRequest, + AdminEmojiListResponse, + AdminEmojiRemoveAliasesBulkRequest, + AdminEmojiSetAliasesBulkRequest, + AdminEmojiSetCategoryBulkRequest, + AdminEmojiSetLicenseBulkRequest, + AdminEmojiUpdateRequest, + AdminFederationDeleteAllFilesRequest, + AdminFederationRefreshRemoteInstanceMetadataRequest, + AdminFederationRemoveAllFollowingRequest, + AdminFederationUpdateInstanceRequest, + AdminGetTableStatsResponse, + AdminGetUserIpsRequest, + AdminInviteCreateRequest, + AdminInviteCreateResponse, + AdminInviteListRequest, + AdminInviteListResponse, + AdminPromoCreateRequest, + AdminQueueDeliverDelayedResponse, + AdminQueueInboxDelayedResponse, + AdminQueuePromoteRequest, + AdminQueueStatsResponse, + AdminRelaysAddRequest, + AdminRelaysAddResponse, + AdminRelaysListResponse, + AdminRelaysRemoveRequest, + AdminResetPasswordRequest, + AdminResetPasswordResponse, + AdminResolveAbuseUserReportRequest, + AdminSendEmailRequest, + AdminServerInfoResponse, + AdminShowModerationLogsRequest, + AdminShowModerationLogsResponse, + AdminShowUserRequest, + AdminShowUserResponse, + AdminShowUsersRequest, + AdminShowUsersResponse, + AdminSuspendUserRequest, + AdminUnsuspendUserRequest, + AdminUpdateMetaRequest, + AdminDeleteAccountRequest, + AdminDeleteAccountResponse, + AdminUpdateUserNoteRequest, + AdminRolesCreateRequest, + AdminRolesDeleteRequest, + AdminRolesShowRequest, + AdminRolesUpdateRequest, + AdminRolesAssignRequest, + AdminRolesUnassignRequest, + AdminRolesUpdateDefaultPoliciesRequest, + AdminRolesUsersRequest, + AnnouncementsRequest, + AnnouncementsResponse, + AntennasCreateRequest, + AntennasCreateResponse, + AntennasDeleteRequest, + AntennasListResponse, + AntennasNotesRequest, + AntennasNotesResponse, + AntennasShowRequest, + AntennasShowResponse, + AntennasUpdateRequest, + AntennasUpdateResponse, + ApGetRequest, + ApGetResponse, + ApShowRequest, + ApShowResponse, + AppCreateRequest, + AppCreateResponse, + AppShowRequest, + AppShowResponse, + AuthSessionGenerateRequest, + AuthSessionGenerateResponse, + AuthSessionShowRequest, + AuthSessionShowResponse, + AuthSessionUserkeyRequest, + AuthSessionUserkeyResponse, + BlockingCreateRequest, + BlockingCreateResponse, + BlockingDeleteRequest, + BlockingDeleteResponse, + BlockingListRequest, + BlockingListResponse, + ChannelsCreateRequest, + ChannelsCreateResponse, + ChannelsFeaturedResponse, + ChannelsFollowRequest, + ChannelsFollowedRequest, + ChannelsFollowedResponse, + ChannelsOwnedRequest, + ChannelsOwnedResponse, + ChannelsShowRequest, + ChannelsShowResponse, + ChannelsTimelineRequest, + ChannelsTimelineResponse, + ChannelsUnfollowRequest, + ChannelsUpdateRequest, + ChannelsUpdateResponse, + ChannelsFavoriteRequest, + ChannelsUnfavoriteRequest, + ChannelsMyFavoritesResponse, + ChannelsSearchRequest, + ChannelsSearchResponse, + ChartsActiveUsersRequest, + ChartsActiveUsersResponse, + ChartsApRequestRequest, + ChartsApRequestResponse, + ChartsDriveRequest, + ChartsDriveResponse, + ChartsFederationRequest, + ChartsFederationResponse, + ChartsInstanceRequest, + ChartsInstanceResponse, + ChartsNotesRequest, + ChartsNotesResponse, + ChartsUserDriveRequest, + ChartsUserDriveResponse, + ChartsUserFollowingRequest, + ChartsUserFollowingResponse, + ChartsUserNotesRequest, + ChartsUserNotesResponse, + ChartsUserPvRequest, + ChartsUserPvResponse, + ChartsUserReactionsRequest, + ChartsUserReactionsResponse, + ChartsUsersRequest, + ChartsUsersResponse, + ClipsAddNoteRequest, + ClipsRemoveNoteRequest, + ClipsCreateRequest, + ClipsCreateResponse, + ClipsDeleteRequest, + ClipsListResponse, + ClipsNotesRequest, + ClipsNotesResponse, + ClipsShowRequest, + ClipsShowResponse, + ClipsUpdateRequest, + ClipsUpdateResponse, + ClipsFavoriteRequest, + ClipsUnfavoriteRequest, + ClipsMyFavoritesResponse, + DriveResponse, + DriveFilesRequest, + DriveFilesResponse, + DriveFilesAttachedNotesRequest, + DriveFilesAttachedNotesResponse, + DriveFilesCheckExistenceRequest, + DriveFilesCheckExistenceResponse, + DriveFilesCreateRequest, + DriveFilesCreateResponse, + DriveFilesDeleteRequest, + DriveFilesFindByHashRequest, + DriveFilesFindByHashResponse, + DriveFilesFindRequest, + DriveFilesFindResponse, + DriveFilesShowRequest, + DriveFilesShowResponse, + DriveFilesUpdateRequest, + DriveFilesUpdateResponse, + DriveFilesUploadFromUrlRequest, + DriveFoldersRequest, + DriveFoldersResponse, + DriveFoldersCreateRequest, + DriveFoldersCreateResponse, + DriveFoldersDeleteRequest, + DriveFoldersFindRequest, + DriveFoldersFindResponse, + DriveFoldersShowRequest, + DriveFoldersShowResponse, + DriveFoldersUpdateRequest, + DriveFoldersUpdateResponse, + DriveStreamRequest, + DriveStreamResponse, + EmailAddressAvailableRequest, + EmailAddressAvailableResponse, + EndpointRequest, + EndpointsResponse, + FederationFollowersRequest, + FederationFollowersResponse, + FederationFollowingRequest, + FederationFollowingResponse, + FederationInstancesRequest, + FederationInstancesResponse, + FederationShowInstanceRequest, + FederationShowInstanceResponse, + FederationUpdateRemoteUserRequest, + FederationUsersRequest, + FederationUsersResponse, + FederationStatsRequest, + FollowingCreateRequest, + FollowingCreateResponse, + FollowingDeleteRequest, + FollowingDeleteResponse, + FollowingUpdateRequest, + FollowingUpdateResponse, + FollowingUpdateAllRequest, + FollowingInvalidateRequest, + FollowingInvalidateResponse, + FollowingRequestsAcceptRequest, + FollowingRequestsCancelRequest, + FollowingRequestsCancelResponse, + FollowingRequestsListRequest, + FollowingRequestsListResponse, + FollowingRequestsRejectRequest, + GalleryFeaturedRequest, + GalleryFeaturedResponse, + GalleryPopularResponse, + GalleryPostsRequest, + GalleryPostsResponse, + GalleryPostsCreateRequest, + GalleryPostsCreateResponse, + GalleryPostsDeleteRequest, + GalleryPostsLikeRequest, + GalleryPostsShowRequest, + GalleryPostsShowResponse, + GalleryPostsUnlikeRequest, + GalleryPostsUpdateRequest, + GalleryPostsUpdateResponse, + GetAvatarDecorationsResponse, + HashtagsListRequest, + HashtagsListResponse, + HashtagsSearchRequest, + HashtagsSearchResponse, + HashtagsShowRequest, + HashtagsShowResponse, + HashtagsTrendResponse, + HashtagsUsersRequest, + HashtagsUsersResponse, + IResponse, + IClaimAchievementRequest, + IFavoritesRequest, + IFavoritesResponse, + IGalleryLikesRequest, + IGalleryLikesResponse, + IGalleryPostsRequest, + IGalleryPostsResponse, + INotificationsRequest, + INotificationsResponse, + INotificationsGroupedRequest, + INotificationsGroupedResponse, + IPageLikesRequest, + IPageLikesResponse, + IPagesRequest, + IPagesResponse, + IPinRequest, + IPinResponse, + IReadAnnouncementRequest, + IRegistryGetAllRequest, + IRegistryGetDetailRequest, + IRegistryGetRequest, + IRegistryKeysWithTypeRequest, + IRegistryKeysRequest, + IRegistryRemoveRequest, + IRegistrySetRequest, + IUnpinRequest, + IUnpinResponse, + IUpdateRequest, + IUpdateResponse, + IWebhooksCreateRequest, + IWebhooksShowRequest, + IWebhooksUpdateRequest, + IWebhooksDeleteRequest, + InviteCreateResponse, + InviteDeleteRequest, + InviteListRequest, + InviteListResponse, + InviteLimitResponse, + MetaRequest, + MetaResponse, + EmojisResponse, + EmojiRequest, + EmojiResponse, + MuteCreateRequest, + MuteDeleteRequest, + MuteListRequest, + MuteListResponse, + RenoteMuteCreateRequest, + RenoteMuteDeleteRequest, + RenoteMuteListRequest, + RenoteMuteListResponse, + MyAppsRequest, + MyAppsResponse, + NotesRequest, + NotesResponse, + NotesChildrenRequest, + NotesChildrenResponse, + NotesClipsRequest, + NotesClipsResponse, + NotesConversationRequest, + NotesConversationResponse, + NotesCreateRequest, + NotesCreateResponse, + NotesDeleteRequest, + NotesFavoritesCreateRequest, + NotesFavoritesDeleteRequest, + NotesFeaturedRequest, + NotesFeaturedResponse, + NotesGlobalTimelineRequest, + NotesGlobalTimelineResponse, + NotesHybridTimelineRequest, + NotesHybridTimelineResponse, + NotesLocalTimelineRequest, + NotesLocalTimelineResponse, + NotesMentionsRequest, + NotesMentionsResponse, + NotesPollsRecommendationRequest, + NotesPollsRecommendationResponse, + NotesPollsVoteRequest, + NotesReactionsRequest, + NotesReactionsResponse, + NotesReactionsCreateRequest, + NotesReactionsDeleteRequest, + NotesRenotesRequest, + NotesRenotesResponse, + NotesRepliesRequest, + NotesRepliesResponse, + NotesSearchByTagRequest, + NotesSearchByTagResponse, + NotesSearchRequest, + NotesSearchResponse, + NotesShowRequest, + NotesShowResponse, + NotesStateRequest, + NotesStateResponse, + NotesThreadMutingCreateRequest, + NotesThreadMutingDeleteRequest, + NotesTimelineRequest, + NotesTimelineResponse, + NotesTranslateRequest, + NotesTranslateResponse, + NotesUnrenoteRequest, + NotesUserListTimelineRequest, + NotesUserListTimelineResponse, + NotificationsCreateRequest, + PagesCreateRequest, + PagesCreateResponse, + PagesDeleteRequest, + PagesFeaturedResponse, + PagesLikeRequest, + PagesShowRequest, + PagesShowResponse, + PagesUnlikeRequest, + PagesUpdateRequest, + FlashCreateRequest, + FlashDeleteRequest, + FlashFeaturedResponse, + FlashLikeRequest, + FlashShowRequest, + FlashShowResponse, + FlashUnlikeRequest, + FlashUpdateRequest, + FlashMyRequest, + FlashMyResponse, + FlashMyLikesRequest, + FlashMyLikesResponse, + PingResponse, + PinnedUsersResponse, + PromoReadRequest, + RolesShowRequest, + RolesUsersRequest, + RolesNotesRequest, + RolesNotesResponse, + RequestResetPasswordRequest, + ResetPasswordRequest, + StatsResponse, + SwShowRegistrationRequest, + SwShowRegistrationResponse, + SwUpdateRegistrationRequest, + SwUpdateRegistrationResponse, + SwRegisterRequest, + SwRegisterResponse, + SwUnregisterRequest, + TestRequest, + UsernameAvailableRequest, + UsernameAvailableResponse, + UsersRequest, + UsersResponse, + UsersClipsRequest, + UsersClipsResponse, + UsersFollowersRequest, + UsersFollowersResponse, + UsersFollowingRequest, + UsersFollowingResponse, + UsersGalleryPostsRequest, + UsersGalleryPostsResponse, + UsersGetFrequentlyRepliedUsersRequest, + UsersGetFrequentlyRepliedUsersResponse, + UsersFeaturedNotesRequest, + UsersFeaturedNotesResponse, + UsersListsCreateRequest, + UsersListsCreateResponse, + UsersListsDeleteRequest, + UsersListsListRequest, + UsersListsListResponse, + UsersListsPullRequest, + UsersListsPushRequest, + UsersListsShowRequest, + UsersListsShowResponse, + UsersListsFavoriteRequest, + UsersListsUnfavoriteRequest, + UsersListsUpdateRequest, + UsersListsUpdateResponse, + UsersListsCreateFromPublicRequest, + UsersListsCreateFromPublicResponse, + UsersListsUpdateMembershipRequest, + UsersListsGetMembershipsRequest, + UsersNotesRequest, + UsersNotesResponse, + UsersPagesRequest, + UsersPagesResponse, + UsersFlashsRequest, + UsersFlashsResponse, + UsersReactionsRequest, + UsersReactionsResponse, + UsersRecommendationRequest, + UsersRecommendationResponse, + UsersRelationRequest, + UsersRelationResponse, + UsersReportAbuseRequest, + UsersSearchByUsernameAndHostRequest, + UsersSearchByUsernameAndHostResponse, + UsersSearchRequest, + UsersSearchResponse, + UsersShowRequest, + UsersShowResponse, + UsersAchievementsRequest, + UsersUpdateMemoRequest, + FetchRssRequest, + FetchExternalResourcesRequest, + RetentionResponse, + Error_2 as Error, + UserLite, + UserDetailedNotMeOnly, + MeDetailedOnly, + UserDetailedNotMe, + MeDetailed, + UserDetailed, + User, + UserList, + Announcement, + App, + Note, + NoteReaction, + NoteFavorite, + Notification_2 as Notification, + DriveFile, + DriveFolder, + Following, + Muting, + RenoteMuting, + Blocking, + Hashtag, + InviteCode, + Page, + Channel, + QueueCount, + Antenna, + Clip, + FederationInstance, + GalleryPost, + EmojiSimple, + EmojiDetailed, + Flash + } +} +export { entities } + +// @public (undocumented) +type Error_2 = components['schemas']['Error']; + +// @public (undocumented) +type FederationFollowersRequest = operations['federation/followers']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FederationFollowersResponse = operations['federation/followers']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FederationFollowingRequest = operations['federation/following']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FederationFollowingResponse = operations['federation/following']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FederationInstance = components['schemas']['FederationInstance']; + +// @public (undocumented) +type FederationInstancesRequest = operations['federation/instances']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FederationInstancesResponse = operations['federation/instances']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FederationShowInstanceRequest = operations['federation/show-instance']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FederationShowInstanceResponse = operations['federation/show-instance']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FederationStatsRequest = operations['federation/stats']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FederationUpdateRemoteUserRequest = operations['federation/update-remote-user']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FederationUsersRequest = operations['federation/users']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FederationUsersResponse = operations['federation/users']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FetchExternalResourcesRequest = operations['fetch-external-resources']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FetchLike = (input: string, init?: { + method?: string; + body?: string; + credentials?: RequestCredentials; + cache?: RequestCache; + headers: { + [key in string]: string; }; -}; +}) => Promise<{ + status: number; + json(): Promise; +}>; + +// @public (undocumented) +type FetchRssRequest = operations['fetch-rss']['requestBody']['content']['application/json']; + +// @public (undocumented) +export const ffVisibility: readonly ["public", "followers", "private"]; + +// @public (undocumented) +type Flash = components['schemas']['Flash']; + +// @public (undocumented) +type FlashCreateRequest = operations['flash/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FlashDeleteRequest = operations['flash/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FlashFeaturedResponse = operations['flash/featured']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FlashLikeRequest = operations['flash/like']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FlashMyLikesRequest = operations['flash/my-likes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FlashMyLikesResponse = operations['flash/my-likes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FlashMyRequest = operations['flash/my']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FlashMyResponse = operations['flash/my']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FlashShowRequest = operations['flash/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FlashShowResponse = operations['flash/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FlashUnlikeRequest = operations['flash/unlike']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FlashUpdateRequest = operations['flash/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type Following = components['schemas']['Following']; + +// @public (undocumented) +type FollowingCreateRequest = operations['following/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FollowingCreateResponse = operations['following/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FollowingDeleteRequest = operations['following/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FollowingDeleteResponse = operations['following/delete']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FollowingInvalidateRequest = operations['following/invalidate']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FollowingInvalidateResponse = operations['following/invalidate']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FollowingRequestsAcceptRequest = operations['following/requests/accept']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FollowingRequestsCancelRequest = operations['following/requests/cancel']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FollowingRequestsCancelResponse = operations['following/requests/cancel']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FollowingRequestsListRequest = operations['following/requests/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FollowingRequestsListResponse = operations['following/requests/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type FollowingRequestsRejectRequest = operations['following/requests/reject']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FollowingUpdateAllRequest = operations['following/update-all']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FollowingUpdateRequest = operations['following/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type FollowingUpdateResponse = operations['following/update']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type GalleryFeaturedRequest = operations['gallery/featured']['requestBody']['content']['application/json']; + +// @public (undocumented) +type GalleryFeaturedResponse = operations['gallery/featured']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type GalleryPopularResponse = operations['gallery/popular']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type GalleryPost = components['schemas']['GalleryPost']; + +// @public (undocumented) +type GalleryPostsCreateRequest = operations['gallery/posts/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type GalleryPostsCreateResponse = operations['gallery/posts/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type GalleryPostsDeleteRequest = operations['gallery/posts/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type GalleryPostsLikeRequest = operations['gallery/posts/like']['requestBody']['content']['application/json']; + +// @public (undocumented) +type GalleryPostsRequest = operations['gallery/posts']['requestBody']['content']['application/json']; + +// @public (undocumented) +type GalleryPostsResponse = operations['gallery/posts']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type GalleryPostsShowRequest = operations['gallery/posts/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type GalleryPostsShowResponse = operations['gallery/posts/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type GalleryPostsUnlikeRequest = operations['gallery/posts/unlike']['requestBody']['content']['application/json']; + +// @public (undocumented) +type GalleryPostsUpdateRequest = operations['gallery/posts/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type GalleryPostsUpdateResponse = operations['gallery/posts/update']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type GetAvatarDecorationsResponse = operations['get-avatar-decorations']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type Hashtag = components['schemas']['Hashtag']; + +// @public (undocumented) +type HashtagsListRequest = operations['hashtags/list']['requestBody']['content']['application/json']; -declare namespace entities { - export { - ID, - DateString, - User, - UserLite, - UserDetailed, - UserGroup, - UserList, - MeDetailed, - MeDetailedWithSecret, - MeSignup, - DriveFile, - DriveFolder, - GalleryPost, - Note, - NoteReaction, - Notification_2 as Notification, - MessagingMessage, - CustomEmoji, - LiteInstanceMetadata, - DetailedInstanceMetadata, - InstanceMetadata, - AdminInstanceMetadata, - ServerInfo, - Stats, - Page, - PageEvent, - Announcement, - Antenna, - App, - AuthSession, - Ad, - Clip, - NoteFavorite, - FollowRequest, - Channel, - Following, - FollowingFolloweePopulated, - FollowingFollowerPopulated, - Blocking, - Instance, - Signin, - Invite, - InviteLimit, - UserSorting, - OriginType, - ModerationLog - } -} -export { entities } +// @public (undocumented) +type HashtagsListResponse = operations['hashtags/list']['responses']['200']['content']['application/json']; // @public (undocumented) -type FetchLike = (input: string, init?: { - method?: string; - body?: string; - credentials?: RequestCredentials; - cache?: RequestCache; - headers: { - [key in string]: string; - }; -}) => Promise<{ - status: number; - json(): Promise; -}>; +type HashtagsSearchRequest = operations['hashtags/search']['requestBody']['content']['application/json']; // @public (undocumented) -export const ffVisibility: readonly ["public", "followers", "private"]; +type HashtagsSearchResponse = operations['hashtags/search']['responses']['200']['content']['application/json']; // @public (undocumented) -type Following = { - id: ID; - createdAt: DateString; - followerId: User['id']; - followeeId: User['id']; -}; +type HashtagsShowRequest = operations['hashtags/show']['requestBody']['content']['application/json']; // @public (undocumented) -type FollowingFolloweePopulated = Following & { - followee: UserDetailed; -}; +type HashtagsShowResponse = operations['hashtags/show']['responses']['200']['content']['application/json']; // @public (undocumented) -type FollowingFollowerPopulated = Following & { - follower: UserDetailed; -}; +type HashtagsTrendResponse = operations['hashtags/trend']['responses']['200']['content']['application/json']; // @public (undocumented) -type FollowRequest = { - id: ID; - follower: User; - followee: User; -}; +type HashtagsUsersRequest = operations['hashtags/users']['requestBody']['content']['application/json']; // @public (undocumented) -type GalleryPost = { - id: ID; - createdAt: DateString; - updatedAt: DateString; - userId: User['id']; - user: User; - title: string; - description: string | null; - fileIds: DriveFile['id'][]; - files: DriveFile[]; - isSensitive: boolean; - likedCount: number; - isLiked?: boolean; -}; +type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type IClaimAchievementRequest = operations['i/claim-achievement']['requestBody']['content']['application/json']; // @public (undocumented) type ID = string; // @public (undocumented) -type Instance = { - id: ID; - firstRetrievedAt: 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; - isSilenced: boolean; - isBlocked: 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; -}; +type IFavoritesRequest = operations['i/favorites']['requestBody']['content']['application/json']; // @public (undocumented) -type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata; +type IFavoritesResponse = operations['i/favorites']['responses']['200']['content']['application/json']; // @public (undocumented) -type Invite = { - id: ID; - code: string; - expiresAt: DateString | null; - createdAt: DateString; - createdBy: UserLite | null; - usedBy: UserLite | null; - usedAt: DateString | null; - used: boolean; -}; +type IGalleryLikesRequest = operations['i/gallery/likes']['requestBody']['content']['application/json']; // @public (undocumented) -type InviteLimit = { - remaining: number; -}; +type IGalleryLikesResponse = operations['i/gallery/likes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type IGalleryPostsRequest = operations['i/gallery/posts']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IGalleryPostsResponse = operations['i/gallery/posts']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type INotificationsGroupedRequest = operations['i/notifications-grouped']['requestBody']['content']['application/json']; + +// @public (undocumented) +type INotificationsGroupedResponse = operations['i/notifications-grouped']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type INotificationsRequest = operations['i/notifications']['requestBody']['content']['application/json']; + +// @public (undocumented) +type INotificationsResponse = operations['i/notifications']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type InviteCode = components['schemas']['InviteCode']; + +// @public (undocumented) +type InviteCreateResponse = operations['invite/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type InviteDeleteRequest = operations['invite/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type InviteLimitResponse = operations['invite/limit']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type InviteListRequest = operations['invite/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type InviteListResponse = operations['invite/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type IPageLikesRequest = operations['i/page-likes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IPageLikesResponse = operations['i/page-likes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type IPagesRequest = operations['i/pages']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IPagesResponse = operations['i/pages']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type IPinRequest = operations['i/pin']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IPinResponse = operations['i/pin']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type IReadAnnouncementRequest = operations['i/read-announcement']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IRegistryGetAllRequest = operations['i/registry/get-all']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IRegistryGetDetailRequest = operations['i/registry/get-detail']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IRegistryGetRequest = operations['i/registry/get']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IRegistryRemoveRequest = operations['i/registry/remove']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IResponse = operations['i']['responses']['200']['content']['application/json']; // @public (undocumented) function isAPIError(reason: any): reason is APIError; // @public (undocumented) -type LiteInstanceMetadata = { - maintainerName: string | null; - maintainerEmail: string | null; - version: string; - name: string | null; - shortName: string | null; - uri: string; - description: string | null; - langs: string[]; - tosUrl: string | null; - repositoryUrl: string; - feedbackUrl: string; - impressumUrl: string | null; - privacyPolicyUrl: string | null; - disableRegistration: boolean; - disableLocalTimeline: boolean; - disableGlobalTimeline: boolean; - driveCapacityPerLocalUserMb: number; - driveCapacityPerRemoteUserMb: number; - emailRequiredForSignup: boolean; - enableHcaptcha: boolean; - hcaptchaSiteKey: string | null; - enableRecaptcha: boolean; - recaptchaSiteKey: string | null; - enableTurnstile: boolean; - turnstileSiteKey: string | null; - swPublickey: string | null; - themeColor: string | null; - mascotImageUrl: string | null; - bannerUrl: string | null; - serverErrorImageUrl: string | null; - infoImageUrl: string | null; - notFoundImageUrl: string | null; - iconUrl: string | null; - backgroundImageUrl: string | null; - logoImageUrl: string | null; - maxNoteTextLength: number; - enableEmail: boolean; - enableTwitterIntegration: boolean; - enableGithubIntegration: boolean; - enableDiscordIntegration: boolean; - enableServiceWorker: boolean; - emojis: CustomEmoji[]; - defaultDarkTheme: string | null; - defaultLightTheme: string | null; - ads: { - id: ID; - ratio: number; - place: string; - url: string; - imageUrl: string; - }[]; - notesPerOneAd: number; - translatorAvailable: boolean; - serverRules: string[]; -}; +type IUnpinRequest = operations['i/unpin']['requestBody']['content']['application/json']; // @public (undocumented) -type MeDetailed = UserDetailed & { - avatarId: DriveFile['id']; - bannerId: DriveFile['id']; - autoAcceptFollowed: boolean; - alwaysMarkNsfw: boolean; - carefulBot: boolean; - emailNotificationTypes: string[]; - hasPendingReceivedFollowRequest: boolean; - hasUnreadAnnouncement: boolean; - hasUnreadAntenna: boolean; - hasUnreadMentions: boolean; - hasUnreadMessagingMessage: boolean; - hasUnreadNotification: boolean; - hasUnreadSpecifiedNotes: boolean; - unreadNotificationsCount: number; - hideOnlineStatus: boolean; - injectFeaturedNote: boolean; - integrations: Record; - isDeleted: boolean; - isExplorable: boolean; - mutedWords: (string[] | string)[]; - hardMutedWords: (string[] | string)[]; - notificationRecieveConfig: { - [notificationType in typeof notificationTypes_2[number]]?: { - type: 'all'; - } | { - type: 'never'; - } | { - type: 'following'; - } | { - type: 'follower'; - } | { - type: 'mutualFollow'; - } | { - type: 'list'; - userListId: string; - }; - }; - noCrawle: boolean; - receiveAnnouncementEmail: boolean; - usePasswordLessLogin: boolean; - unreadAnnouncements: Announcement[]; - twoFactorBackupCodesStock: 'full' | 'partial' | 'none'; - [other: string]: any; -}; +type IUnpinResponse = operations['i/unpin']['responses']['200']['content']['application/json']; // @public (undocumented) -type MeDetailedWithSecret = MeDetailed & { - email: string; - emailVerified: boolean; - securityKeysList: { - id: string; - name: string; - lastUsed: string; - }[]; -}; +type IUpdateRequest = operations['i/update']['requestBody']['content']['application/json']; // @public (undocumented) -type MeSignup = MeDetailedWithSecret & { - token: string; -}; +type IUpdateResponse = operations['i/update']['responses']['200']['content']['application/json']; // @public (undocumented) -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; -}; +type IWebhooksCreateRequest = operations['i/webhooks/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IWebhooksDeleteRequest = operations['i/webhooks/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IWebhooksShowRequest = operations['i/webhooks/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IWebhooksUpdateRequest = operations['i/webhooks/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type MeDetailed = components['schemas']['MeDetailed']; + +// @public (undocumented) +type MeDetailedOnly = components['schemas']['MeDetailedOnly']; + +// @public (undocumented) +type MetaRequest = operations['meta']['requestBody']['content']['application/json']; + +// @public (undocumented) +type MetaResponse = operations['meta']['responses']['200']['content']['application/json']; // @public (undocumented) type ModerationLog = { @@ -2696,170 +1897,208 @@ type ModerationLog = { }); // @public (undocumented) -export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile", "resolveAbuseReport", "createInvitation", "createAd", "updateAd", "deleteAd", "createAvatarDecoration", "updateAvatarDecoration", "deleteAvatarDecoration", "unsetUserAvatar", "unsetUserBanner"]; +export const moderationLogTypes: readonly ["updateServerSettings", "suspend", "unsuspend", "updateUserNote", "addCustomEmoji", "updateCustomEmoji", "deleteCustomEmoji", "assignRole", "unassignRole", "createRole", "updateRole", "deleteRole", "clearQueue", "promoteQueue", "deleteDriveFile", "deleteNote", "createGlobalAnnouncement", "createUserAnnouncement", "updateGlobalAnnouncement", "updateUserAnnouncement", "deleteGlobalAnnouncement", "deleteUserAnnouncement", "resetPassword", "suspendRemoteInstance", "unsuspendRemoteInstance", "markSensitiveDriveFile", "unmarkSensitiveDriveFile", "resolveAbuseReport", "createInvitation", "createAd", "updateAd", "deleteAd", "createAvatarDecoration", "updateAvatarDecoration", "deleteAvatarDecoration", "unsetUserAvatar", "unsetUserBanner"]; + +// @public (undocumented) +type MuteCreateRequest = operations['mute/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type MuteDeleteRequest = operations['mute/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"]; + +// @public (undocumented) +type MuteListRequest = operations['mute/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type MuteListResponse = operations['mute/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type Muting = components['schemas']['Muting']; + +// @public (undocumented) +type MyAppsRequest = operations['my/apps']['requestBody']['content']['application/json']; + +// @public (undocumented) +type MyAppsResponse = operations['my/apps']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type Note = components['schemas']['Note']; + +// @public (undocumented) +type NoteFavorite = components['schemas']['NoteFavorite']; + +// @public (undocumented) +type NoteReaction = components['schemas']['NoteReaction']; + +// @public (undocumented) +type NotesChildrenRequest = operations['notes/children']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesChildrenResponse = operations['notes/children']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesClipsRequest = operations['notes/clips']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesClipsResponse = operations['notes/clips']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesConversationRequest = operations['notes/conversation']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesConversationResponse = operations['notes/conversation']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesCreateRequest = operations['notes/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesCreateResponse = operations['notes/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesDeleteRequest = operations['notes/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesFavoritesCreateRequest = operations['notes/favorites/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesFavoritesDeleteRequest = operations['notes/favorites/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesFeaturedRequest = operations['notes/featured']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesFeaturedResponse = operations['notes/featured']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesGlobalTimelineRequest = operations['notes/global-timeline']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesGlobalTimelineResponse = operations['notes/global-timeline']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesHybridTimelineRequest = operations['notes/hybrid-timeline']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesHybridTimelineResponse = operations['notes/hybrid-timeline']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesLocalTimelineRequest = operations['notes/local-timeline']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesLocalTimelineResponse = operations['notes/local-timeline']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesMentionsRequest = operations['notes/mentions']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesMentionsResponse = operations['notes/mentions']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesPollsRecommendationRequest = operations['notes/polls/recommendation']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesPollsRecommendationResponse = operations['notes/polls/recommendation']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesPollsVoteRequest = operations['notes/polls/vote']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesReactionsCreateRequest = operations['notes/reactions/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesReactionsDeleteRequest = operations['notes/reactions/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesReactionsRequest = operations['notes/reactions']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesReactionsResponse = operations['notes/reactions']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesRenotesRequest = operations['notes/renotes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesRenotesResponse = operations['notes/renotes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesRepliesRequest = operations['notes/replies']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesRepliesResponse = operations['notes/replies']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesRequest = operations['notes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesResponse = operations['notes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesSearchByTagRequest = operations['notes/search-by-tag']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesSearchByTagResponse = operations['notes/search-by-tag']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesSearchRequest = operations['notes/search']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesSearchResponse = operations['notes/search']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesShowRequest = operations['notes/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesShowResponse = operations['notes/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesStateRequest = operations['notes/state']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesStateResponse = operations['notes/state']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type NotesThreadMutingCreateRequest = operations['notes/thread-muting/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesThreadMutingDeleteRequest = operations['notes/thread-muting/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesTimelineRequest = operations['notes/timeline']['requestBody']['content']['application/json']; // @public (undocumented) -export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"]; +type NotesTimelineResponse = operations['notes/timeline']['responses']['200']['content']['application/json']; // @public (undocumented) -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'][]; - channel?: Channel; - channelId?: Channel['id']; - localOnly?: boolean; - myReaction?: string; - reactions: Record; - renoteCount: number; - repliesCount: number; - clippedCount?: number; - poll?: { - expiresAt: DateString | null; - multiple: boolean; - choices: { - isVoted: boolean; - text: string; - votes: number; - }[]; - }; - emojis: { - name: string; - url: string; - }[]; - uri?: string; - url?: string; - isHidden?: boolean; -}; +type NotesTranslateRequest = operations['notes/translate']['requestBody']['content']['application/json']; // @public (undocumented) -type NoteFavorite = { - id: ID; - createdAt: DateString; - noteId: Note['id']; - note: Note; -}; +type NotesTranslateResponse = operations['notes/translate']['responses']['200']['content']['application/json']; // @public (undocumented) -type NoteReaction = { - id: ID; - createdAt: DateString; - user: UserLite; - type: string; -}; +type NotesUnrenoteRequest = operations['notes/unrenote']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesUserListTimelineRequest = operations['notes/user-list-timeline']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesUserListTimelineResponse = operations['notes/user-list-timeline']['responses']['200']['content']['application/json']; // @public (undocumented) export const noteVisibilities: readonly ["public", "home", "followers", "specified"]; // @public (undocumented) -type Notification_2 = { - 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: 'note'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'pollEnded'; - 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: 'achievementEarned'; - achievement: string; -} | { - type: 'app'; - header?: string | null; - body: string; - icon?: string | null; -} | { - type: 'test'; -}); +type Notification_2 = components['schemas']['Notification']; // @public (undocumented) -export const notificationTypes: readonly ["note", "follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app", "achievementEarned"]; +type NotificationsCreateRequest = operations['notifications/create']['requestBody']['content']['application/json']; // @public (undocumented) -type OriginType = 'combined' | 'local' | 'remote'; +export const notificationTypes: readonly ["note", "follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app", "achievementEarned"]; // @public (undocumented) -type Page = { - id: ID; - createdAt: DateString; - updatedAt: DateString; - userId: User['id']; - user: User; - content: Record[]; - variables: Record[]; - 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; -}; +type Page = components['schemas']['Page']; // @public (undocumented) type PageEvent = { @@ -2870,6 +2109,33 @@ type PageEvent = { user: User; }; +// @public (undocumented) +type PagesCreateRequest = operations['pages/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type PagesCreateResponse = operations['pages/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type PagesDeleteRequest = operations['pages/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type PagesFeaturedResponse = operations['pages/featured']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type PagesLikeRequest = operations['pages/like']['requestBody']['content']['application/json']; + +// @public (undocumented) +type PagesShowRequest = operations['pages/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type PagesShowResponse = operations['pages/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type PagesUnlikeRequest = operations['pages/unlike']['requestBody']['content']['application/json']; + +// @public (undocumented) +type PagesUpdateRequest = operations['pages/update']['requestBody']['content']['application/json']; + // @public (undocumented) function parse(acct: string): Acct; @@ -2877,40 +2143,55 @@ function parse(acct: string): Acct; export const permissions: string[]; // @public (undocumented) -type ServerInfo = { - machine: string; - cpu: { - model: string; - cores: number; - }; - mem: { - total: number; - }; - fs: { - total: number; - used: number; - }; -}; +type PingResponse = operations['ping']['responses']['200']['content']['application/json']; // @public (undocumented) -type Signin = { - id: ID; - createdAt: DateString; - ip: string; - headers: Record; - success: boolean; -}; +type PinnedUsersResponse = operations['pinned-users']['responses']['200']['content']['application/json']; // @public (undocumented) -type Stats = { - notesCount: number; - originalNotesCount: number; - usersCount: number; - originalUsersCount: number; - instances: number; - driveUsageLocal: number; - driveUsageRemote: number; -}; +type PromoReadRequest = operations['promo/read']['requestBody']['content']['application/json']; + +// @public (undocumented) +type QueueCount = components['schemas']['QueueCount']; + +// @public (undocumented) +type RenoteMuteCreateRequest = operations['renote-mute/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type RenoteMuteDeleteRequest = operations['renote-mute/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type RenoteMuteListRequest = operations['renote-mute/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type RenoteMuteListResponse = operations['renote-mute/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type RenoteMuting = components['schemas']['RenoteMuting']; + +// @public (undocumented) +type RequestResetPasswordRequest = operations['request-reset-password']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ResetPasswordRequest = operations['reset-password']['requestBody']['content']['application/json']; + +// @public (undocumented) +type RetentionResponse = operations['retention']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type RolesNotesResponse = operations['roles/notes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json']; + +// @public (undocumented) +type StatsResponse = operations['stats']['responses']['200']['content']['application/json']; // Warning: (ae-forgotten-export) The symbol "StreamEvents" needs to be exported by the entry point index.d.ts // @@ -2951,114 +2232,224 @@ export class Stream extends EventEmitter { useChannel(channel: C, params?: Channels[C]['params'], name?: string): ChannelConnection; } +// Warning: (ae-forgotten-export) The symbol "SwitchCase" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "IsCaseMatched" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "GetCaseResult" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +type SwitchCaseResponseType = Endpoints[E]['res'] extends SwitchCase ? IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : IsCaseMatched extends true ? GetCaseResult : Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res']; + +// @public (undocumented) +type SwRegisterRequest = operations['sw/register']['requestBody']['content']['application/json']; + +// @public (undocumented) +type SwRegisterResponse = operations['sw/register']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type SwShowRegistrationRequest = operations['sw/show-registration']['requestBody']['content']['application/json']; + +// @public (undocumented) +type SwShowRegistrationResponse = operations['sw/show-registration']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type SwUnregisterRequest = operations['sw/unregister']['requestBody']['content']['application/json']; + +// @public (undocumented) +type SwUpdateRegistrationRequest = operations['sw/update-registration']['requestBody']['content']['application/json']; + +// @public (undocumented) +type SwUpdateRegistrationResponse = operations['sw/update-registration']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type TestRequest = operations['test']['requestBody']['content']['application/json']; + // @public (undocumented) function toString_2(acct: Acct): string; // @public (undocumented) -type User = UserLite | UserDetailed; +type User = components['schemas']['User']; // @public (undocumented) -type UserDetailed = UserLite & { - alsoKnownAs: string[]; - 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; - }[]; - verifiedLinks: 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; - isSilenced: boolean; - isSuspended: boolean; - lang: string | null; - lastFetchedAt?: DateString; - location: string | null; - movedTo: string; - 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; - notify: 'normal' | 'none'; -}; +type UserDetailed = components['schemas']['UserDetailed']; // @public (undocumented) -type UserGroup = TODO_2; +type UserDetailedNotMe = components['schemas']['UserDetailedNotMe']; // @public (undocumented) -type UserList = { - id: ID; - createdAt: DateString; - name: string; - userIds: User['id'][]; -}; +type UserDetailedNotMeOnly = components['schemas']['UserDetailedNotMeOnly']; // @public (undocumented) -type UserLite = { - id: ID; - username: string; - host: string | null; - name: string | null; - onlineStatus: 'online' | 'active' | 'offline' | 'unknown'; - avatarUrl: string; - avatarBlurhash: string; - avatarDecorations: { - id: ID; - url: string; - angle?: number; - flipH?: boolean; - }[]; - emojis: { - name: string; - url: string; - }[]; - instance?: { - name: Instance['name']; - softwareName: Instance['softwareName']; - softwareVersion: Instance['softwareVersion']; - iconUrl: Instance['iconUrl']; - faviconUrl: Instance['faviconUrl']; - themeColor: Instance['themeColor']; - }; - isCat?: boolean; - isBot?: boolean; -}; +type UserList = components['schemas']['UserList']; + +// @public (undocumented) +type UserLite = components['schemas']['UserLite']; + +// @public (undocumented) +type UsernameAvailableRequest = operations['username/available']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsernameAvailableResponse = operations['username/available']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersAchievementsRequest = operations['users/achievements']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersClipsRequest = operations['users/clips']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersClipsResponse = operations['users/clips']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersFeaturedNotesRequest = operations['users/featured-notes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersFeaturedNotesResponse = operations['users/featured-notes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersFlashsRequest = operations['users/flashs']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersFlashsResponse = operations['users/flashs']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersFollowersRequest = operations['users/followers']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersFollowersResponse = operations['users/followers']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersFollowingRequest = operations['users/following']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersFollowingResponse = operations['users/following']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersGalleryPostsRequest = operations['users/gallery/posts']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersGalleryPostsResponse = operations['users/gallery/posts']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersGetFrequentlyRepliedUsersRequest = operations['users/get-frequently-replied-users']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersGetFrequentlyRepliedUsersResponse = operations['users/get-frequently-replied-users']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersListsCreateFromPublicRequest = operations['users/lists/create-from-public']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsCreateFromPublicResponse = operations['users/lists/create-from-public']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersListsCreateRequest = operations['users/lists/create']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsCreateResponse = operations['users/lists/create']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersListsDeleteRequest = operations['users/lists/delete']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsFavoriteRequest = operations['users/lists/favorite']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsGetMembershipsRequest = operations['users/lists/get-memberships']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsListRequest = operations['users/lists/list']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsListResponse = operations['users/lists/list']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersListsPullRequest = operations['users/lists/pull']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsPushRequest = operations['users/lists/push']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsShowRequest = operations['users/lists/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsShowResponse = operations['users/lists/show']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersListsUnfavoriteRequest = operations['users/lists/unfavorite']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsUpdateMembershipRequest = operations['users/lists/update-membership']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsUpdateRequest = operations['users/lists/update']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersListsUpdateResponse = operations['users/lists/update']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersNotesRequest = operations['users/notes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersNotesResponse = operations['users/notes']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersPagesRequest = operations['users/pages']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersPagesResponse = operations['users/pages']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersReactionsRequest = operations['users/reactions']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersReactionsResponse = operations['users/reactions']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersRecommendationRequest = operations['users/recommendation']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersRecommendationResponse = operations['users/recommendation']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersRelationRequest = operations['users/relation']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersRelationResponse = operations['users/relation']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersReportAbuseRequest = operations['users/report-abuse']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersRequest = operations['users']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersResponse = operations['users']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersSearchByUsernameAndHostRequest = operations['users/search-by-username-and-host']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersSearchByUsernameAndHostResponse = operations['users/search-by-username-and-host']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersSearchRequest = operations['users/search']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersSearchResponse = operations['users/search']['responses']['200']['content']['application/json']; + +// @public (undocumented) +type UsersShowRequest = operations['users/show']['requestBody']['content']['application/json']; + +// @public (undocumented) +type UsersShowResponse = operations['users/show']['responses']['200']['content']['application/json']; // @public (undocumented) -type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt'; +type UsersUpdateMemoRequest = operations['users/update-memo']['requestBody']['content']['application/json']; // Warnings were encountered during analysis: // -// src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts -// src/api.types.ts:20:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts -// src/api.types.ts:635:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts -// src/entities.ts:117:2 - (ae-forgotten-export) The symbol "notificationTypes_2" needs to be exported by the entry point index.d.ts -// src/entities.ts:628:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts -// src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts +// src/entities.ts:24:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts +// src/streaming.types.ts:31:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/packages/misskey-js/generator/.eslintrc.cjs b/packages/misskey-js/generator/.eslintrc.cjs new file mode 100644 index 0000000000..6a8b31da9c --- /dev/null +++ b/packages/misskey-js/generator/.eslintrc.cjs @@ -0,0 +1,9 @@ +module.exports = { + parserOptions: { + tsconfigRootDir: __dirname, + project: ['./tsconfig.json'], + }, + extends: [ + '../../shared/.eslintrc.js', + ], +}; diff --git a/packages/misskey-js/generator/.gitignore b/packages/misskey-js/generator/.gitignore new file mode 100644 index 0000000000..1a11577de7 --- /dev/null +++ b/packages/misskey-js/generator/.gitignore @@ -0,0 +1 @@ +api.json diff --git a/packages/misskey-js/generator/README.md b/packages/misskey-js/generator/README.md new file mode 100644 index 0000000000..767ccfa185 --- /dev/null +++ b/packages/misskey-js/generator/README.md @@ -0,0 +1,19 @@ +## misskey-js向け型生成モジュール + +バックエンドが吐き出すOpenAPI準拠のapi.jsonからmisskey-jsで使用される型エイリアスを生成するためのモジュールです。 +このモジュールはmisskey-jsそのものにバンドルされることは想定しておらず、生成物をmisskey-jsのsrc配下にコピーして使用することを想定しています。 + +## 使い方 + +まず、Misskeyのバックエンドからapi.jsonを取得する必要があります。任意のMisskeyインスタンスの/api-docからダウンロードしても良いですし、 +backendモジュール配下で`pnpm generate-api-json`を実行しても良いでしょう。 + +api.jsonを入手したら、このファイルがあるディレクトリに置いてください。 + +その後、以下コマンドを実行します。 + +```shell +pnpm generate +``` + +上記を実行することで、`./built`ディレクトリ配下にtsファイルが生成されます。 diff --git a/packages/misskey-js/generator/package.json b/packages/misskey-js/generator/package.json new file mode 100644 index 0000000000..e12520f043 --- /dev/null +++ b/packages/misskey-js/generator/package.json @@ -0,0 +1,24 @@ +{ + "name": "misskey-js-type-generator", + "version": "0.0.0", + "description": "Misskey TypeGenerator", + "type": "module", + "scripts": { + "generate": "tsx src/generator.ts && eslint ./built/**/* --ext .ts --fix" + }, + "devDependencies": { + "@apidevtools/swagger-parser": "10.1.0", + "@types/node": "20.9.1", + "@typescript-eslint/eslint-plugin": "6.11.0", + "@typescript-eslint/parser": "6.11.0", + "eslint": "8.53.0", + "typescript": "5.3.2", + "tsx": "4.4.0", + "ts-case-convert": "2.0.2", + "openapi-types": "12.1.3", + "openapi-typescript": "6.7.1" + }, + "files": [ + "built" + ] +} diff --git a/packages/misskey-js/generator/src/generator.ts b/packages/misskey-js/generator/src/generator.ts new file mode 100644 index 0000000000..7ed3ae120c --- /dev/null +++ b/packages/misskey-js/generator/src/generator.ts @@ -0,0 +1,284 @@ +import { mkdir, writeFile } from 'fs/promises'; +import { OpenAPIV3 } from 'openapi-types'; +import { toPascal } from 'ts-case-convert'; +import SwaggerParser from '@apidevtools/swagger-parser'; +import openapiTS from 'openapi-typescript'; + +function generateVersionHeaderComment(openApiDocs: OpenAPIV3.Document): string { + const contents = { + version: openApiDocs.info.version, + generatedAt: new Date().toISOString(), + }; + + const lines: string[] = []; + lines.push('/*'); + for (const [key, value] of Object.entries(contents)) { + lines.push(` * ${key}: ${value}`); + } + lines.push(' */'); + + return lines.join('\n'); +} + +async function generateBaseTypes( + openApiDocs: OpenAPIV3.Document, + openApiJsonPath: string, + typeFileName: string, +) { + const disabledLints = [ + '@typescript-eslint/naming-convention', + '@typescript-eslint/no-explicit-any', + ]; + + const lines: string[] = []; + for (const lint of disabledLints) { + lines.push(`/* eslint ${lint}: 0 */`); + } + lines.push(''); + + lines.push(generateVersionHeaderComment(openApiDocs)); + lines.push(''); + + const generatedTypes = await openapiTS(openApiJsonPath, { exportType: true }); + lines.push(generatedTypes); + lines.push(''); + + await writeFile(typeFileName, lines.join('\n')); +} + +async function generateSchemaEntities( + openApiDocs: OpenAPIV3.Document, + typeFileName: string, + outputPath: string, +) { + if (!openApiDocs.components?.schemas) { + return; + } + + const schemas = openApiDocs.components.schemas; + const schemaNames = Object.keys(schemas); + const typeAliasLines: string[] = []; + + typeAliasLines.push(generateVersionHeaderComment(openApiDocs)); + typeAliasLines.push(''); + typeAliasLines.push(`import { components } from '${toImportPath(typeFileName)}';`); + typeAliasLines.push( + ...schemaNames.map(it => `export type ${it} = components['schemas']['${it}'];`), + ); + typeAliasLines.push(''); + + await writeFile(outputPath, typeAliasLines.join('\n')); +} + +async function generateEndpoints( + openApiDocs: OpenAPIV3.Document, + typeFileName: string, + entitiesOutputPath: string, + endpointOutputPath: string, +) { + const endpoints: Endpoint[] = []; + + // misskey-jsはPOST固定で送っているので、こちらも決め打ちする。別メソッドに対応することがあればこちらも直す必要あり + const paths = openApiDocs.paths; + const postPathItems = Object.keys(paths) + .map(it => paths[it]?.post) + .filter(filterUndefined); + + for (const operation of postPathItems) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const operationId = operation.operationId!; + const endpoint = new Endpoint(operationId); + endpoints.push(endpoint); + + if (isRequestBodyObject(operation.requestBody)) { + const reqContent = operation.requestBody.content; + const supportMediaTypes = Object.keys(reqContent); + if (supportMediaTypes.length > 0) { + // いまのところ複数のメディアタイプをとるエンドポイントは無いので決め打ちする + endpoint.request = new OperationTypeAlias( + operationId, + supportMediaTypes[0], + OperationsAliasType.REQUEST, + ); + } + } + + if (isResponseObject(operation.responses['200']) && operation.responses['200'].content) { + const resContent = operation.responses['200'].content; + const supportMediaTypes = Object.keys(resContent); + if (supportMediaTypes.length > 0) { + // いまのところ複数のメディアタイプを返すエンドポイントは無いので決め打ちする + endpoint.response = new OperationTypeAlias( + operationId, + supportMediaTypes[0], + OperationsAliasType.RESPONSE, + ); + } + } + } + + const entitiesOutputLine: string[] = []; + + entitiesOutputLine.push(generateVersionHeaderComment(openApiDocs)); + entitiesOutputLine.push(''); + + entitiesOutputLine.push(`import { operations } from '${toImportPath(typeFileName)}';`); + entitiesOutputLine.push(''); + + entitiesOutputLine.push(new EmptyTypeAlias(OperationsAliasType.REQUEST).toLine()); + entitiesOutputLine.push(new EmptyTypeAlias(OperationsAliasType.RESPONSE).toLine()); + entitiesOutputLine.push(''); + + const entities = endpoints + .flatMap(it => [it.request, it.response].filter(i => i)) + .filter(filterUndefined); + entitiesOutputLine.push(...entities.map(it => it.toLine())); + entitiesOutputLine.push(''); + + await writeFile(entitiesOutputPath, entitiesOutputLine.join('\n')); + + const endpointOutputLine: string[] = []; + + endpointOutputLine.push(generateVersionHeaderComment(openApiDocs)); + endpointOutputLine.push(''); + + endpointOutputLine.push('import type {'); + endpointOutputLine.push( + ...[emptyRequest, emptyResponse, ...entities].map(it => '\t' + it.generateName() + ','), + ); + endpointOutputLine.push(`} from '${toImportPath(entitiesOutputPath)}';`); + endpointOutputLine.push(''); + + endpointOutputLine.push('export type Endpoints = {'); + endpointOutputLine.push( + ...endpoints.map(it => '\t' + it.toLine()), + ); + endpointOutputLine.push('}'); + endpointOutputLine.push(''); + + await writeFile(endpointOutputPath, endpointOutputLine.join('\n')); +} + +function isRequestBodyObject(value: unknown): value is OpenAPIV3.RequestBodyObject { + if (!value) { + return false; + } + + const { content } = value as Record; + return content !== undefined; +} + +function isResponseObject(value: unknown): value is OpenAPIV3.ResponseObject { + if (!value) { + return false; + } + + const { description } = value as Record; + return description !== undefined; +} + +function filterUndefined(item: T): item is Exclude { + return item !== undefined; +} + +function toImportPath(fileName: string, fromPath = '/built/autogen', toPath = ''): string { + return fileName.replace(fromPath, toPath).replace('.ts', '.js'); +} + +enum OperationsAliasType { + REQUEST = 'Request', + RESPONSE = 'Response' +} + +interface IOperationTypeAlias { + readonly type: OperationsAliasType + + generateName(): string + + toLine(): string +} + +class OperationTypeAlias implements IOperationTypeAlias { + public readonly operationId: string; + public readonly mediaType: string; + public readonly type: OperationsAliasType; + + constructor( + operationId: string, + mediaType: string, + type: OperationsAliasType, + ) { + this.operationId = operationId; + this.mediaType = mediaType; + this.type = type; + } + + generateName(): string { + const nameBase = this.operationId.replace(/\//g, '-'); + return toPascal(nameBase + this.type); + } + + toLine(): string { + const name = this.generateName(); + return (this.type === OperationsAliasType.REQUEST) + ? `export type ${name} = operations['${this.operationId}']['requestBody']['content']['${this.mediaType}'];` + : `export type ${name} = operations['${this.operationId}']['responses']['200']['content']['${this.mediaType}'];`; + } +} + +class EmptyTypeAlias implements IOperationTypeAlias { + readonly type: OperationsAliasType; + + constructor(type: OperationsAliasType) { + this.type = type; + } + + generateName(): string { + return 'Empty' + this.type; + } + + toLine(): string { + const name = this.generateName(); + return `export type ${name} = Record | undefined;`; + } +} + +const emptyRequest = new EmptyTypeAlias(OperationsAliasType.REQUEST); +const emptyResponse = new EmptyTypeAlias(OperationsAliasType.RESPONSE); + +class Endpoint { + public readonly operationId: string; + public request?: IOperationTypeAlias; + public response?: IOperationTypeAlias; + + constructor(operationId: string) { + this.operationId = operationId; + } + + toLine(): string { + const reqName = this.request?.generateName() ?? emptyRequest.generateName(); + const resName = this.response?.generateName() ?? emptyResponse.generateName(); + + return `'${this.operationId}': { req: ${reqName}; res: ${resName} };`; + } +} + +async function main() { + const generatePath = './built/autogen'; + await mkdir(generatePath, { recursive: true }); + + const openApiJsonPath = './api.json'; + const openApiDocs = await SwaggerParser.validate(openApiJsonPath) as OpenAPIV3.Document; + + const typeFileName = './built/autogen/types.ts'; + await generateBaseTypes(openApiDocs, openApiJsonPath, typeFileName); + + const modelFileName = `${generatePath}/models.ts`; + await generateSchemaEntities(openApiDocs, typeFileName, modelFileName); + + const entitiesFileName = `${generatePath}/entities.ts`; + const endpointFileName = `${generatePath}/endpoint.ts`; + await generateEndpoints(openApiDocs, typeFileName, entitiesFileName, endpointFileName); +} + +main(); diff --git a/packages/misskey-js/generator/tsconfig.json b/packages/misskey-js/generator/tsconfig.json new file mode 100644 index 0000000000..c814df612e --- /dev/null +++ b/packages/misskey-js/generator/tsconfig.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "nodenext", + "strict": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "esModuleInterop": true, + "lib": [ + "esnext", + ] + }, + "include": [ + "src/**/*.ts", + "built/**/*.ts" + ], + "exclude": [] +} diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json index 865d25146a..1d21923132 100644 --- a/packages/misskey-js/package.json +++ b/packages/misskey-js/package.json @@ -13,7 +13,8 @@ "typecheck": "tsc --noEmit", "lint": "pnpm typecheck && pnpm eslint", "jest": "jest --coverage --detectOpenHandles", - "test": "pnpm jest && pnpm tsd" + "test": "pnpm jest && pnpm tsd", + "update-autogen-code": "pnpm --filter misskey-js-type-generator generate && ncp generator/built/autogen src/autogen" }, "repository": { "type": "git", @@ -32,7 +33,8 @@ "jest-websocket-mock": "2.5.0", "mock-socket": "9.3.1", "tsd": "0.29.0", - "typescript": "5.3.2" + "typescript": "5.3.2", + "ncp": "2.0.0" }, "files": [ "built" diff --git a/packages/misskey-js/src/api.ts b/packages/misskey-js/src/api.ts index 9415e692e3..c2fa4f1790 100644 --- a/packages/misskey-js/src/api.ts +++ b/packages/misskey-js/src/api.ts @@ -1,4 +1,9 @@ -import type { Endpoints } from './api.types.js'; +import { SwitchCaseResponseType } from './api.types'; +import type { Endpoints } from './api.types'; + +export { + SwitchCaseResponseType, +} from './api.types'; const MK_API_ERROR = Symbol(); @@ -15,25 +20,15 @@ export function isAPIError(reason: any): reason is APIError { } export type FetchLike = (input: string, init?: { - method?: string; - body?: string; - credentials?: RequestCredentials; - cache?: RequestCache; - headers: {[key in string]: string} - }) => Promise<{ - status: number; - json(): Promise; - }>; - -type IsNeverType = [T] extends [never] ? true : false; - -type StrictExtract = Cond extends Union ? Union : never; - -type IsCaseMatched = - IsNeverType> extends false ? true : false; - -type GetCaseResult = - StrictExtract[1]; + method?: string; + body?: string; + credentials?: RequestCredentials; + cache?: RequestCache; + headers: { [key in string]: string } +}) => Promise<{ + status: number; + json(): Promise; +}>; export class APIClient { public origin: string; @@ -53,22 +48,11 @@ export class APIClient { } public request( - endpoint: E, params: P = {} as P, credential?: string | null | undefined, - ): Promise extends true ? GetCaseResult : - IsCaseMatched extends true ? GetCaseResult : - IsCaseMatched extends true ? GetCaseResult : - IsCaseMatched extends true ? GetCaseResult : - IsCaseMatched extends true ? GetCaseResult : - IsCaseMatched extends true ? GetCaseResult : - IsCaseMatched extends true ? GetCaseResult : - IsCaseMatched extends true ? GetCaseResult : - IsCaseMatched extends true ? GetCaseResult : - IsCaseMatched extends true ? GetCaseResult : - Endpoints[E]['res']['$switch']['$default'] - : Endpoints[E]['res']> { - const promise = new Promise((resolve, reject) => { + endpoint: E, + params: P = {} as P, + credential?: string | null, + ): Promise> { + return new Promise((resolve, reject) => { this.fetch(`${this.origin}/api/${endpoint}`, { method: 'POST', body: JSON.stringify({ @@ -83,10 +67,8 @@ export class APIClient { }).then(async (res) => { const body = res.status === 204 ? null : await res.json(); - if (res.status === 200) { + if (res.status === 200 || res.status === 204) { resolve(body); - } else if (res.status === 204) { - resolve(null); } else { reject({ [MK_API_ERROR]: true, @@ -95,7 +77,5 @@ export class APIClient { } }).catch(reject); }); - - return promise as any; } } diff --git a/packages/misskey-js/src/api.types.ts b/packages/misskey-js/src/api.types.ts index ba333231e5..d97646b7cc 100644 --- a/packages/misskey-js/src/api.types.ts +++ b/packages/misskey-js/src/api.types.ts @@ -1,651 +1,60 @@ -import type { - Ad, Announcement, Antenna, App, AuthSession, Blocking, Channel, Clip, DateString, DetailedInstanceMetadata, DriveFile, DriveFolder, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, FollowRequest, GalleryPost, Instance, - LiteInstanceMetadata, - MeDetailed, - Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, MeSignup, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage, Invite, InviteLimit, AdminInstanceMetadata, -} from './entities.js'; - -type TODO = Record | null; - -type NoParams = Record; - -type ShowUserReq = { username: string; host?: string; } | { userId: User['id']; }; - -export type Endpoints = { - // admin - 'admin/abuse-user-reports': { req: TODO; res: TODO; }; - 'admin/delete-all-files-of-a-user': { req: { userId: User['id']; }; res: null; }; - 'admin/unset-user-avatar': { req: { userId: User['id']; }; res: null; }; - 'admin/unset-user-banner': { req: { userId: User['id']; }; res: null; }; - 'admin/delete-logs': { req: NoParams; res: null; }; - 'admin/get-index-stats': { req: TODO; res: TODO; }; - 'admin/get-table-stats': { req: TODO; res: TODO; }; - 'admin/invite': { req: TODO; res: TODO; }; - 'admin/logs': { req: TODO; res: TODO; }; - 'admin/meta': { req: NoParams; res: AdminInstanceMetadata; }; - 'admin/reset-password': { req: TODO; res: TODO; }; - 'admin/resolve-abuse-user-report': { req: TODO; res: TODO; }; - 'admin/resync-chart': { req: TODO; res: TODO; }; - 'admin/send-email': { req: TODO; res: TODO; }; - 'admin/server-info': { req: TODO; res: TODO; }; - 'admin/show-moderation-logs': { req: TODO; res: TODO; }; - 'admin/show-user': { req: TODO; res: TODO; }; - 'admin/show-users': { req: TODO; res: TODO; }; - 'admin/silence-user': { req: TODO; res: TODO; }; - 'admin/suspend-user': { req: TODO; res: TODO; }; - 'admin/unsilence-user': { req: TODO; res: TODO; }; - 'admin/unsuspend-user': { req: TODO; res: TODO; }; - 'admin/update-meta': { req: TODO; res: TODO; }; - 'admin/vacuum': { req: TODO; res: TODO; }; - 'admin/accounts/create': { req: TODO; res: TODO; }; - 'admin/ad/create': { req: TODO; res: TODO; }; - 'admin/ad/delete': { req: { id: Ad['id']; }; res: null; }; - 'admin/ad/list': { req: TODO; res: TODO; }; - 'admin/ad/update': { req: TODO; res: TODO; }; - 'admin/announcements/create': { req: TODO; res: TODO; }; - 'admin/announcements/delete': { req: { id: Announcement['id'] }; res: null; }; - 'admin/announcements/list': { req: TODO; res: TODO; }; - 'admin/announcements/update': { req: TODO; res: TODO; }; - 'admin/drive/clean-remote-files': { req: TODO; res: TODO; }; - 'admin/drive/cleanup': { req: TODO; res: TODO; }; - 'admin/drive/files': { req: TODO; res: TODO; }; - 'admin/drive/show-file': { req: TODO; res: TODO; }; - 'admin/emoji/add': { req: TODO; res: TODO; }; - 'admin/emoji/copy': { req: TODO; res: TODO; }; - 'admin/emoji/list-remote': { req: TODO; res: TODO; }; - 'admin/emoji/list': { req: TODO; res: TODO; }; - 'admin/emoji/remove': { req: TODO; res: TODO; }; - 'admin/emoji/update': { req: TODO; res: TODO; }; - 'admin/federation/delete-all-files': { req: { host: string; }; res: null; }; - 'admin/federation/refresh-remote-instance-metadata': { req: TODO; res: TODO; }; - 'admin/federation/remove-all-following': { req: TODO; res: TODO; }; - 'admin/federation/update-instance': { req: TODO; res: TODO; }; - 'admin/invite/create': { req: TODO; res: TODO; }; - 'admin/invite/list': { req: TODO; res: TODO; }; - 'admin/moderators/add': { req: TODO; res: TODO; }; - 'admin/moderators/remove': { req: TODO; res: TODO; }; - 'admin/promo/create': { req: TODO; res: TODO; }; - 'admin/queue/clear': { req: TODO; res: TODO; }; - 'admin/queue/deliver-delayed': { req: TODO; res: TODO; }; - 'admin/queue/inbox-delayed': { req: TODO; res: TODO; }; - 'admin/queue/jobs': { req: TODO; res: TODO; }; - 'admin/queue/stats': { req: TODO; res: TODO; }; - 'admin/relays/add': { req: TODO; res: TODO; }; - 'admin/relays/list': { req: TODO; res: TODO; }; - 'admin/relays/remove': { req: TODO; res: TODO; }; - - // announcements - 'announcements': { req: { limit?: number; withUnreads?: boolean; sinceId?: Announcement['id']; untilId?: Announcement['id']; }; res: Announcement[]; }; - - // antennas - 'antennas/create': { req: TODO; res: Antenna; }; - 'antennas/delete': { req: { antennaId: Antenna['id']; }; res: null; }; - 'antennas/list': { req: NoParams; res: Antenna[]; }; - 'antennas/notes': { req: { antennaId: Antenna['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; }; - 'antennas/show': { req: { antennaId: Antenna['id']; }; res: Antenna; }; - 'antennas/update': { req: TODO; res: Antenna; }; - - // ap - 'ap/get': { req: { uri: string; }; res: Record; }; - 'ap/show': { req: { uri: string; }; res: { - type: 'Note'; - object: Note; - } | { - type: 'User'; - object: UserDetailed; - }; }; - - // app - 'app/create': { req: TODO; res: App; }; - 'app/show': { req: { appId: App['id']; }; res: App; }; - - // auth - 'auth/accept': { req: { token: string; }; res: null; }; - 'auth/session/generate': { req: { appSecret: string; }; res: { token: string; url: string; }; }; - 'auth/session/show': { req: { token: string; }; res: AuthSession; }; - 'auth/session/userkey': { req: { appSecret: string; token: string; }; res: { accessToken: string; user: User }; }; - - // blocking - 'blocking/create': { req: { userId: User['id'] }; res: UserDetailed; }; - 'blocking/delete': { req: { userId: User['id'] }; res: UserDetailed; }; - 'blocking/list': { req: { limit?: number; sinceId?: Blocking['id']; untilId?: Blocking['id']; }; res: Blocking[]; }; - - // channels - 'channels/create': { req: TODO; res: TODO; }; - 'channels/featured': { req: TODO; res: TODO; }; - 'channels/follow': { req: TODO; res: TODO; }; - 'channels/followed': { req: TODO; res: TODO; }; - 'channels/owned': { req: TODO; res: TODO; }; - 'channels/pin-note': { req: TODO; res: TODO; }; - 'channels/show': { req: TODO; res: TODO; }; - 'channels/timeline': { req: TODO; res: TODO; }; - 'channels/unfollow': { req: TODO; res: TODO; }; - 'channels/update': { req: TODO; res: TODO; }; - - // charts - 'charts/active-users': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: { - local: { - users: number[]; - }; - remote: { - users: number[]; - }; - }; }; - 'charts/drive': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: { - local: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - remote: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; - }; }; - 'charts/federation': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: { - instance: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; }; - 'charts/hashtag': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: TODO; }; - 'charts/instance': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; host: string; }; res: { - drive: { - decFiles: number[]; - decUsage: number[]; - incFiles: number[]; - incUsage: number[]; - totalFiles: number[]; - totalUsage: number[]; - }; - followers: { - dec: number[]; - inc: number[]; - total: number[]; - }; - following: { - dec: number[]; - inc: number[]; - total: number[]; - }; - notes: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - requests: { - failed: number[]; - received: number[]; - succeeded: number[]; - }; - users: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; }; - 'charts/network': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: TODO; }; - 'charts/notes': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; - }; }; - 'charts/user/drive': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: { - decCount: number[]; - decSize: number[]; - incCount: number[]; - incSize: number[]; - totalCount: number[]; - totalSize: number[]; - }; }; - 'charts/user/following': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: TODO; }; - 'charts/user/notes': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: { - dec: number[]; - inc: number[]; - total: number[]; - diffs: { - normal: number[]; - renote: number[]; - reply: number[]; - }; - }; }; - 'charts/user/reactions': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; userId: User['id']; }; res: TODO; }; - 'charts/users': { req: { span: 'day' | 'hour'; limit?: number; offset?: number | null; }; res: { - local: { - dec: number[]; - inc: number[]; - total: number[]; - }; - remote: { - dec: number[]; - inc: number[]; - total: number[]; - }; - }; }; - - // clips - 'clips/add-note': { req: TODO; res: TODO; }; - 'clips/create': { req: TODO; res: TODO; }; - 'clips/delete': { req: { clipId: Clip['id']; }; res: null; }; - 'clips/list': { req: TODO; res: TODO; }; - 'clips/notes': { req: TODO; res: TODO; }; - 'clips/show': { req: TODO; res: TODO; }; - 'clips/update': { req: TODO; res: TODO; }; - - // drive - 'drive': { req: NoParams; res: { capacity: number; usage: number; }; }; - 'drive/files': { req: { folderId?: DriveFolder['id'] | null; type?: DriveFile['type'] | null; limit?: number; sinceId?: DriveFile['id']; untilId?: DriveFile['id']; }; res: DriveFile[]; }; - 'drive/files/attached-notes': { req: TODO; res: TODO; }; - 'drive/files/check-existence': { req: TODO; res: TODO; }; - 'drive/files/create': { - req: { - folderId?: string, - name?: string, - comment?: string, - isSentisive?: boolean, - force?: boolean, - }; - res: DriveFile; - }; - 'drive/files/delete': { req: { fileId: DriveFile['id']; }; res: null; }; - 'drive/files/find-by-hash': { req: TODO; res: TODO; }; - 'drive/files/find': { req: { name: string; folderId?: DriveFolder['id'] | null; }; res: DriveFile[]; }; - 'drive/files/show': { req: { fileId?: DriveFile['id']; url?: string; }; res: DriveFile; }; - 'drive/files/update': { req: { fileId: DriveFile['id']; folderId?: DriveFolder['id'] | null; name?: string; isSensitive?: boolean; comment?: string | null; }; res: DriveFile; }; - 'drive/files/upload-from-url': { req: { url: string; folderId?: DriveFolder['id'] | null; isSensitive?: boolean; comment?: string | null; marker?: string | null; force?: boolean; }; res: null; }; - 'drive/folders': { req: { folderId?: DriveFolder['id'] | null; limit?: number; sinceId?: DriveFile['id']; untilId?: DriveFile['id']; }; res: DriveFolder[]; }; - 'drive/folders/create': { req: { name?: string; parentId?: DriveFolder['id'] | null; }; res: DriveFolder; }; - 'drive/folders/delete': { req: { folderId: DriveFolder['id']; }; res: null; }; - 'drive/folders/find': { req: { name: string; parentId?: DriveFolder['id'] | null; }; res: DriveFolder[]; }; - 'drive/folders/show': { req: { folderId: DriveFolder['id']; }; res: DriveFolder; }; - 'drive/folders/update': { req: { folderId: DriveFolder['id']; name?: string; parentId?: DriveFolder['id'] | null; }; res: DriveFolder; }; - 'drive/stream': { req: { type?: DriveFile['type'] | null; limit?: number; sinceId?: DriveFile['id']; untilId?: DriveFile['id']; }; res: DriveFile[]; }; - - // endpoint - 'endpoint': { req: { endpoint: string; }; res: { params: { name: string; type: string; }[]; }; }; - - // endpoints - 'endpoints': { req: NoParams; res: string[]; }; - - // federation - 'federation/dns': { req: { host: string; }; res: { - a: string[]; - aaaa: string[]; - cname: string[]; - txt: string[]; - }; }; - 'federation/followers': { req: { host: string; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFolloweePopulated[]; }; - 'federation/following': { req: { host: string; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFolloweePopulated[]; }; - 'federation/instances': { req: { - host?: string | null; - blocked?: boolean | null; - notResponding?: boolean | null; - suspended?: boolean | null; - federating?: boolean | null; - subscribing?: boolean | null; - publishing?: boolean | null; - limit?: number; - offset?: number; - sort?: '+pubSub' | '-pubSub' | '+notes' | '-notes' | '+users' | '-users' | '+following' | '-following' | '+followers' | '-followers' | '+caughtAt' | '-caughtAt' | '+lastCommunicatedAt' | '-lastCommunicatedAt' | '+driveUsage' | '-driveUsage' | '+driveFiles' | '-driveFiles'; - }; res: Instance[]; }; - 'federation/show-instance': { req: { host: string; }; res: Instance; }; - 'federation/update-remote-user': { req: { userId: User['id']; }; res: null; }; - 'federation/users': { req: { host: string; limit?: number; sinceId?: User['id']; untilId?: User['id']; }; res: UserDetailed[]; }; - - // following - 'following/create': { req: { - userId: User['id'], - withReplies?: boolean, - }; res: User; }; - 'following/delete': { req: { userId: User['id'] }; res: User; }; - 'following/requests/accept': { req: { userId: User['id'] }; res: null; }; - 'following/requests/cancel': { req: { userId: User['id'] }; res: User; }; - 'following/requests/list': { req: NoParams; res: FollowRequest[]; }; - 'following/requests/reject': { req: { userId: User['id'] }; res: null; }; - - // gallery - 'gallery/featured': { req: null; res: GalleryPost[]; }; - 'gallery/popular': { req: null; res: GalleryPost[]; }; - 'gallery/posts': { req: { limit?: number; sinceId?: GalleryPost['id']; untilId?: GalleryPost['id']; }; res: GalleryPost[]; }; - 'gallery/posts/create': { req: { title: GalleryPost['title']; description?: GalleryPost['description']; fileIds: GalleryPost['fileIds']; isSensitive?: GalleryPost['isSensitive'] }; res: GalleryPost; }; - 'gallery/posts/delete': { req: { postId: GalleryPost['id'] }; res: null; }; - 'gallery/posts/like': { req: { postId: GalleryPost['id'] }; res: null; }; - 'gallery/posts/show': { req: { postId: GalleryPost['id'] }; res: GalleryPost; }; - 'gallery/posts/unlike': { req: { postId: GalleryPost['id'] }; res: null; }; - 'gallery/posts/update': { req: { postId: GalleryPost['id']; title: GalleryPost['title']; description?: GalleryPost['description']; fileIds: GalleryPost['fileIds']; isSensitive?: GalleryPost['isSensitive'] }; res: GalleryPost; }; - - // games - 'games/reversi/games': { req: TODO; res: TODO; }; - 'games/reversi/games/show': { req: TODO; res: TODO; }; - 'games/reversi/games/surrender': { req: TODO; res: TODO; }; - 'games/reversi/invitations': { req: TODO; res: TODO; }; - 'games/reversi/match': { req: TODO; res: TODO; }; - 'games/reversi/match/cancel': { req: TODO; res: TODO; }; - - // get-online-users-count - 'get-online-users-count': { req: NoParams; res: { count: number; }; }; - - // hashtags - 'hashtags/list': { req: TODO; res: TODO; }; - 'hashtags/search': { req: TODO; res: TODO; }; - 'hashtags/show': { req: TODO; res: TODO; }; - 'hashtags/trend': { req: TODO; res: TODO; }; - 'hashtags/users': { req: TODO; res: TODO; }; - - // i - 'i': { req: NoParams; res: User; }; - 'i/apps': { req: TODO; res: TODO; }; - 'i/authorized-apps': { req: TODO; res: TODO; }; - 'i/change-password': { req: TODO; res: TODO; }; - 'i/delete-account': { req: { password: string; }; res: null; }; - 'i/export-blocking': { req: TODO; res: TODO; }; - 'i/export-following': { req: TODO; res: TODO; }; - 'i/export-mute': { req: TODO; res: TODO; }; - 'i/export-notes': { req: TODO; res: TODO; }; - 'i/export-user-lists': { req: TODO; res: TODO; }; - 'i/favorites': { req: { limit?: number; sinceId?: NoteFavorite['id']; untilId?: NoteFavorite['id']; }; res: NoteFavorite[]; }; - 'i/gallery/likes': { req: TODO; res: TODO; }; - 'i/gallery/posts': { req: TODO; res: TODO; }; - 'i/import-following': { req: TODO; res: TODO; }; - 'i/import-user-lists': { req: TODO; res: TODO; }; - 'i/move': { req: TODO; res: TODO; }; - 'i/notifications': { req: { - limit?: number; - sinceId?: Notification['id']; - untilId?: Notification['id']; - following?: boolean; - markAsRead?: boolean; - includeTypes?: Notification['type'][]; - excludeTypes?: Notification['type'][]; - }; res: Notification[]; }; - 'i/page-likes': { req: TODO; res: TODO; }; - 'i/pages': { req: TODO; res: TODO; }; - 'i/pin': { req: { noteId: Note['id']; }; res: MeDetailed; }; - 'i/read-all-messaging-messages': { req: TODO; res: TODO; }; - 'i/read-all-unread-notes': { req: TODO; res: TODO; }; - 'i/read-announcement': { req: TODO; res: TODO; }; - 'i/regenerate-token': { req: { password: string; }; res: null; }; - 'i/registry/get-all': { req: { scope?: string[]; }; res: Record; }; - 'i/registry/get-detail': { req: { key: string; scope?: string[]; }; res: { updatedAt: DateString; value: any; }; }; - 'i/registry/get': { req: { key: string; scope?: string[]; }; res: any; }; - 'i/registry/keys-with-type': { req: { scope?: string[]; }; res: Record; }; - 'i/registry/keys': { req: { scope?: string[]; }; res: string[]; }; - 'i/registry/remove': { req: { key: string; scope?: string[]; }; res: null; }; - 'i/registry/set': { req: { key: string; value: any; scope?: string[]; }; res: null; }; - 'i/revoke-token': { req: TODO; res: TODO; }; - 'i/signin-history': { req: { limit?: number; sinceId?: Signin['id']; untilId?: Signin['id']; }; res: Signin[]; }; - 'i/unpin': { req: { noteId: Note['id']; }; res: MeDetailed; }; - 'i/update-email': { req: { - password: string; - email?: string | null; - }; res: MeDetailed; }; - 'i/update': { req: { - name?: string | null; - description?: string | null; - lang?: string | null; - location?: string | null; - birthday?: string | null; - avatarId?: DriveFile['id'] | null; - bannerId?: DriveFile['id'] | null; - fields?: { - name: string; - value: string; - }[]; - isLocked?: boolean; - isExplorable?: boolean; - hideOnlineStatus?: boolean; - carefulBot?: boolean; - autoAcceptFollowed?: boolean; - noCrawle?: boolean; - isBot?: boolean; - isCat?: boolean; - injectFeaturedNote?: boolean; - receiveAnnouncementEmail?: boolean; - alwaysMarkNsfw?: boolean; - mutedWords?: (string[] | string)[]; - hardMutedWords?: (string[] | string)[]; - notificationRecieveConfig?: any; - emailNotificationTypes?: string[]; - alsoKnownAs?: string[]; - }; res: MeDetailed; }; - 'i/user-group-invites': { req: TODO; res: TODO; }; - 'i/2fa/done': { req: TODO; res: TODO; }; - 'i/2fa/key-done': { req: TODO; res: TODO; }; - 'i/2fa/password-less': { req: TODO; res: TODO; }; - 'i/2fa/register-key': { req: TODO; res: TODO; }; - 'i/2fa/register': { req: TODO; res: TODO; }; - 'i/2fa/remove-key': { req: TODO; res: TODO; }; - 'i/2fa/unregister': { req: TODO; res: TODO; }; - - // invite - 'invite/create': { req: NoParams; res: Invite; }; - 'invite/delete': { req: { inviteId: Invite['id']; }; res: null; }; - 'invite/list': { req: { limit?: number; sinceId?: Invite['id']; untilId?: Invite['id'] }; res: Invite[]; }; - 'invite/limit': { req: NoParams; res: InviteLimit; }; - - // messaging - 'messaging/history': { req: { limit?: number; group?: boolean; }; res: MessagingMessage[]; }; - 'messaging/messages': { req: { userId?: User['id']; groupId?: UserGroup['id']; limit?: number; sinceId?: MessagingMessage['id']; untilId?: MessagingMessage['id']; markAsRead?: boolean; }; res: MessagingMessage[]; }; - 'messaging/messages/create': { req: { userId?: User['id']; groupId?: UserGroup['id']; text?: string; fileId?: DriveFile['id']; }; res: MessagingMessage; }; - 'messaging/messages/delete': { req: { messageId: MessagingMessage['id']; }; res: null; }; - 'messaging/messages/read': { req: { messageId: MessagingMessage['id']; }; res: null; }; - - // meta - 'meta': { req: { detail?: boolean; }; res: { - $switch: { - $cases: [[ - { detail: true; }, - DetailedInstanceMetadata, - ], [ - { detail: false; }, - LiteInstanceMetadata, - ], [ - { detail: boolean; }, - LiteInstanceMetadata | DetailedInstanceMetadata, - ]]; - $default: LiteInstanceMetadata; - }; - }; }; - - // miauth - 'miauth/gen-token': { req: TODO; res: TODO; }; - - // mute - 'mute/create': { req: TODO; res: TODO; }; - 'mute/delete': { req: { userId: User['id'] }; res: null; }; - 'mute/list': { req: TODO; res: TODO; }; - - // my - 'my/apps': { req: TODO; res: TODO; }; - - // notes - 'notes': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; }; - 'notes/children': { req: { noteId: Note['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; }; - 'notes/clips': { req: TODO; res: TODO; }; - 'notes/conversation': { req: TODO; res: TODO; }; - 'notes/create': { req: { - visibility?: 'public' | 'home' | 'followers' | 'specified', - visibleUserIds?: User['id'][]; - text?: null | string; - cw?: null | string; - viaMobile?: boolean; - localOnly?: boolean; - fileIds?: DriveFile['id'][]; - replyId?: null | Note['id']; - renoteId?: null | Note['id']; - channelId?: null | Channel['id']; - poll?: null | { - choices: string[]; - multiple?: boolean; - expiresAt?: null | number; - expiredAfter?: null | number; - }; - }; res: { createdNote: Note }; }; - 'notes/delete': { req: { noteId: Note['id']; }; res: null; }; - 'notes/favorites/create': { req: { noteId: Note['id']; }; res: null; }; - 'notes/favorites/delete': { req: { noteId: Note['id']; }; res: null; }; - 'notes/featured': { req: TODO; res: Note[]; }; - 'notes/global-timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; - 'notes/hybrid-timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; - 'notes/local-timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; - 'notes/mentions': { req: { following?: boolean; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; }; - 'notes/polls/recommendation': { req: TODO; res: TODO; }; - 'notes/polls/vote': { req: { noteId: Note['id']; choice: number; }; res: null; }; - 'notes/reactions': { req: { noteId: Note['id']; type?: string | null; limit?: number; }; res: NoteReaction[]; }; - 'notes/reactions/create': { req: { noteId: Note['id']; reaction: string; }; res: null; }; - 'notes/reactions/delete': { req: { noteId: Note['id']; }; res: null; }; - 'notes/renotes': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; noteId: Note['id']; }; res: Note[]; }; - 'notes/replies': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; noteId: Note['id']; }; res: Note[]; }; - 'notes/search-by-tag': { req: TODO; res: TODO; }; - 'notes/search': { req: TODO; res: TODO; }; - 'notes/show': { req: { noteId: Note['id']; }; res: Note; }; - 'notes/state': { req: TODO; res: TODO; }; - 'notes/timeline': { req: { limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; - 'notes/unrenote': { req: { noteId: Note['id']; }; res: null; }; - 'notes/user-list-timeline': { req: { listId: UserList['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; - 'notes/watching/create': { req: TODO; res: TODO; }; - 'notes/watching/delete': { req: { noteId: Note['id']; }; res: null; }; - - // notifications - 'notifications/create': { req: { body: string; header?: string | null; icon?: string | null; }; res: null; }; - 'notifications/test-notification': { req: NoParams; res: null; }; - 'notifications/mark-all-as-read': { req: NoParams; res: null; }; - - // page-push - 'page-push': { req: { pageId: Page['id']; event: string; var?: any; }; res: null; }; - - // pages - 'pages/create': { req: TODO; res: Page; }; - 'pages/delete': { req: { pageId: Page['id']; }; res: null; }; - 'pages/featured': { req: NoParams; res: Page[]; }; - 'pages/like': { req: { pageId: Page['id']; }; res: null; }; - 'pages/show': { req: { pageId?: Page['id']; name?: string; username?: string; }; res: Page; }; - 'pages/unlike': { req: { pageId: Page['id']; }; res: null; }; - 'pages/update': { req: TODO; res: null; }; - - // ping - 'ping': { req: NoParams; res: { pong: number; }; }; - - // pinned-users - 'pinned-users': { req: TODO; res: TODO; }; - - // promo - 'promo/read': { req: TODO; res: TODO; }; - - // request-reset-password - 'request-reset-password': { req: { username: string; email: string; }; res: null; }; - - // reset-password - 'reset-password': { req: { token: string; password: string; }; res: null; }; - - // room - 'room/show': { req: TODO; res: TODO; }; - 'room/update': { req: TODO; res: TODO; }; - - // signup - 'signup': { - req: { - username: string; - password: string; - host?: string; - invitationCode?: string; - emailAddress?: string; - 'hcaptcha-response'?: string; - 'g-recaptcha-response'?: string; - 'turnstile-response'?: string; - }; - res: MeSignup | null; - }; - - // stats - 'stats': { req: NoParams; res: Stats; }; - - // server-info - 'server-info': { req: NoParams; res: ServerInfo; }; - - // sw - 'sw/register': { req: TODO; res: TODO; }; - - // username - 'username/available': { req: { username: string; }; res: { available: boolean; }; }; - - // users - 'users': { req: { limit?: number; offset?: number; sort?: UserSorting; origin?: OriginType; }; res: User[]; }; - 'users/clips': { req: TODO; res: TODO; }; - 'users/followers': { req: { userId?: User['id']; username?: User['username']; host?: User['host'] | null; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFollowerPopulated[]; }; - 'users/following': { req: { userId?: User['id']; username?: User['username']; host?: User['host'] | null; limit?: number; sinceId?: Following['id']; untilId?: Following['id']; }; res: FollowingFolloweePopulated[]; }; - 'users/gallery/posts': { req: TODO; res: TODO; }; - 'users/get-frequently-replied-users': { req: TODO; res: TODO; }; - 'users/groups/create': { req: TODO; res: TODO; }; - 'users/groups/delete': { req: { groupId: UserGroup['id'] }; res: null; }; - 'users/groups/invitations/accept': { req: TODO; res: TODO; }; - 'users/groups/invitations/reject': { req: TODO; res: TODO; }; - 'users/groups/invite': { req: TODO; res: TODO; }; - 'users/groups/joined': { req: TODO; res: TODO; }; - 'users/groups/owned': { req: TODO; res: TODO; }; - 'users/groups/pull': { req: TODO; res: TODO; }; - 'users/groups/show': { req: TODO; res: TODO; }; - 'users/groups/transfer': { req: TODO; res: TODO; }; - 'users/groups/update': { req: TODO; res: TODO; }; - 'users/lists/create': { req: { name: string; }; res: UserList; }; - 'users/lists/delete': { req: { listId: UserList['id']; }; res: null; }; - 'users/lists/list': { req: NoParams; res: UserList[]; }; - 'users/lists/pull': { req: { listId: UserList['id']; userId: User['id']; }; res: null; }; - 'users/lists/push': { req: { listId: UserList['id']; userId: User['id']; }; res: null; }; - 'users/lists/show': { req: { listId: UserList['id']; }; res: UserList; }; - 'users/lists/update': { req: { listId: UserList['id']; name: string; }; res: UserList; }; - 'users/notes': { req: { userId: User['id']; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; sinceDate?: number; untilDate?: number; }; res: Note[]; }; - 'users/pages': { req: TODO; res: TODO; }; - 'users/flashs': { req: TODO; res: TODO; }; - 'users/recommendation': { req: TODO; res: TODO; }; - 'users/relation': { req: TODO; res: TODO; }; - 'users/report-abuse': { req: TODO; res: TODO; }; - 'users/search-by-username-and-host': { req: TODO; res: TODO; }; - 'users/search': { req: TODO; res: TODO; }; - 'users/show': { req: ShowUserReq | { userIds: User['id'][]; }; res: { - $switch: { - $cases: [[ - { userIds: User['id'][]; }, - UserDetailed[], - ]]; - $default: UserDetailed; - }; - }; }; - - // fetching external data - 'fetch-rss': { req: { url: string; }; res: TODO; }; - 'fetch-external-resources': { - req: { url: string; hash: string; }; - res: { type: string; data: string; }; +import { Endpoints as Gen } from './autogen/endpoint'; +import { UserDetailed } from './autogen/models'; +import { UsersShowRequest } from './autogen/entities'; + +type Overwrite = Omit< + T, + keyof U +> & U; + +type SwitchCase = { + $switch: { + $cases: [any, any][], + $default: any; }; }; + +type IsNeverType = [T] extends [never] ? true : false; +type StrictExtract = Cond extends Union ? Union : never; + +type IsCaseMatched = + Endpoints[E]['res'] extends SwitchCase + ? IsNeverType> extends false ? true : false + : false + +type GetCaseResult = + Endpoints[E]['res'] extends SwitchCase + ? StrictExtract[1] + : never + +export type SwitchCaseResponseType = Endpoints[E]['res'] extends SwitchCase + ? IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + IsCaseMatched extends true ? GetCaseResult : + Endpoints[E]['res']['$switch']['$default'] : Endpoints[E]['res']; + +export type Endpoints = Overwrite< + Gen, + { + 'users/show': { + req: UsersShowRequest; + res: { + $switch: { + $cases: [[ + { + userIds?: string[]; + }, UserDetailed[], + ]]; + $default: UserDetailed; + }; + }; + } + } +> diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts new file mode 100644 index 0000000000..64739a65d0 --- /dev/null +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -0,0 +1,802 @@ +/* + * version: 2023.11.1 + * generatedAt: 2023-11-27T02:24:45.113Z + */ + +import type { + EmptyRequest, + EmptyResponse, + AdminMetaResponse, + AdminAbuseUserReportsRequest, + AdminAbuseUserReportsResponse, + AdminAccountsCreateRequest, + AdminAccountsCreateResponse, + AdminAccountsDeleteRequest, + AdminAccountsFindByEmailRequest, + AdminAdCreateRequest, + AdminAdDeleteRequest, + AdminAdListRequest, + AdminAdUpdateRequest, + AdminAnnouncementsCreateRequest, + AdminAnnouncementsCreateResponse, + AdminAnnouncementsDeleteRequest, + AdminAnnouncementsListRequest, + AdminAnnouncementsListResponse, + AdminAnnouncementsUpdateRequest, + AdminAvatarDecorationsCreateRequest, + AdminAvatarDecorationsDeleteRequest, + AdminAvatarDecorationsListRequest, + AdminAvatarDecorationsListResponse, + AdminAvatarDecorationsUpdateRequest, + AdminDeleteAllFilesOfAUserRequest, + AdminUnsetUserAvatarRequest, + AdminUnsetUserBannerRequest, + AdminDriveFilesRequest, + AdminDriveFilesResponse, + AdminDriveShowFileRequest, + AdminDriveShowFileResponse, + AdminEmojiAddAliasesBulkRequest, + AdminEmojiAddRequest, + AdminEmojiCopyRequest, + AdminEmojiCopyResponse, + AdminEmojiDeleteBulkRequest, + AdminEmojiDeleteRequest, + AdminEmojiListRemoteRequest, + AdminEmojiListRemoteResponse, + AdminEmojiListRequest, + AdminEmojiListResponse, + AdminEmojiRemoveAliasesBulkRequest, + AdminEmojiSetAliasesBulkRequest, + AdminEmojiSetCategoryBulkRequest, + AdminEmojiSetLicenseBulkRequest, + AdminEmojiUpdateRequest, + AdminFederationDeleteAllFilesRequest, + AdminFederationRefreshRemoteInstanceMetadataRequest, + AdminFederationRemoveAllFollowingRequest, + AdminFederationUpdateInstanceRequest, + AdminGetTableStatsResponse, + AdminGetUserIpsRequest, + AdminInviteCreateRequest, + AdminInviteCreateResponse, + AdminInviteListRequest, + AdminInviteListResponse, + AdminPromoCreateRequest, + AdminQueueDeliverDelayedResponse, + AdminQueueInboxDelayedResponse, + AdminQueuePromoteRequest, + AdminQueueStatsResponse, + AdminRelaysAddRequest, + AdminRelaysAddResponse, + AdminRelaysListResponse, + AdminRelaysRemoveRequest, + AdminResetPasswordRequest, + AdminResetPasswordResponse, + AdminResolveAbuseUserReportRequest, + AdminSendEmailRequest, + AdminServerInfoResponse, + AdminShowModerationLogsRequest, + AdminShowModerationLogsResponse, + AdminShowUserRequest, + AdminShowUserResponse, + AdminShowUsersRequest, + AdminShowUsersResponse, + AdminSuspendUserRequest, + AdminUnsuspendUserRequest, + AdminUpdateMetaRequest, + AdminDeleteAccountRequest, + AdminDeleteAccountResponse, + AdminUpdateUserNoteRequest, + AdminRolesCreateRequest, + AdminRolesDeleteRequest, + AdminRolesShowRequest, + AdminRolesUpdateRequest, + AdminRolesAssignRequest, + AdminRolesUnassignRequest, + AdminRolesUpdateDefaultPoliciesRequest, + AdminRolesUsersRequest, + AnnouncementsRequest, + AnnouncementsResponse, + AntennasCreateRequest, + AntennasCreateResponse, + AntennasDeleteRequest, + AntennasListResponse, + AntennasNotesRequest, + AntennasNotesResponse, + AntennasShowRequest, + AntennasShowResponse, + AntennasUpdateRequest, + AntennasUpdateResponse, + ApGetRequest, + ApGetResponse, + ApShowRequest, + ApShowResponse, + AppCreateRequest, + AppCreateResponse, + AppShowRequest, + AppShowResponse, + AuthSessionGenerateRequest, + AuthSessionGenerateResponse, + AuthSessionShowRequest, + AuthSessionShowResponse, + AuthSessionUserkeyRequest, + AuthSessionUserkeyResponse, + BlockingCreateRequest, + BlockingCreateResponse, + BlockingDeleteRequest, + BlockingDeleteResponse, + BlockingListRequest, + BlockingListResponse, + ChannelsCreateRequest, + ChannelsCreateResponse, + ChannelsFeaturedResponse, + ChannelsFollowRequest, + ChannelsFollowedRequest, + ChannelsFollowedResponse, + ChannelsOwnedRequest, + ChannelsOwnedResponse, + ChannelsShowRequest, + ChannelsShowResponse, + ChannelsTimelineRequest, + ChannelsTimelineResponse, + ChannelsUnfollowRequest, + ChannelsUpdateRequest, + ChannelsUpdateResponse, + ChannelsFavoriteRequest, + ChannelsUnfavoriteRequest, + ChannelsMyFavoritesResponse, + ChannelsSearchRequest, + ChannelsSearchResponse, + ChartsActiveUsersRequest, + ChartsActiveUsersResponse, + ChartsApRequestRequest, + ChartsApRequestResponse, + ChartsDriveRequest, + ChartsDriveResponse, + ChartsFederationRequest, + ChartsFederationResponse, + ChartsInstanceRequest, + ChartsInstanceResponse, + ChartsNotesRequest, + ChartsNotesResponse, + ChartsUserDriveRequest, + ChartsUserDriveResponse, + ChartsUserFollowingRequest, + ChartsUserFollowingResponse, + ChartsUserNotesRequest, + ChartsUserNotesResponse, + ChartsUserPvRequest, + ChartsUserPvResponse, + ChartsUserReactionsRequest, + ChartsUserReactionsResponse, + ChartsUsersRequest, + ChartsUsersResponse, + ClipsAddNoteRequest, + ClipsRemoveNoteRequest, + ClipsCreateRequest, + ClipsCreateResponse, + ClipsDeleteRequest, + ClipsListResponse, + ClipsNotesRequest, + ClipsNotesResponse, + ClipsShowRequest, + ClipsShowResponse, + ClipsUpdateRequest, + ClipsUpdateResponse, + ClipsFavoriteRequest, + ClipsUnfavoriteRequest, + ClipsMyFavoritesResponse, + DriveResponse, + DriveFilesRequest, + DriveFilesResponse, + DriveFilesAttachedNotesRequest, + DriveFilesAttachedNotesResponse, + DriveFilesCheckExistenceRequest, + DriveFilesCheckExistenceResponse, + DriveFilesCreateRequest, + DriveFilesCreateResponse, + DriveFilesDeleteRequest, + DriveFilesFindByHashRequest, + DriveFilesFindByHashResponse, + DriveFilesFindRequest, + DriveFilesFindResponse, + DriveFilesShowRequest, + DriveFilesShowResponse, + DriveFilesUpdateRequest, + DriveFilesUpdateResponse, + DriveFilesUploadFromUrlRequest, + DriveFoldersRequest, + DriveFoldersResponse, + DriveFoldersCreateRequest, + DriveFoldersCreateResponse, + DriveFoldersDeleteRequest, + DriveFoldersFindRequest, + DriveFoldersFindResponse, + DriveFoldersShowRequest, + DriveFoldersShowResponse, + DriveFoldersUpdateRequest, + DriveFoldersUpdateResponse, + DriveStreamRequest, + DriveStreamResponse, + EmailAddressAvailableRequest, + EmailAddressAvailableResponse, + EndpointRequest, + EndpointsResponse, + FederationFollowersRequest, + FederationFollowersResponse, + FederationFollowingRequest, + FederationFollowingResponse, + FederationInstancesRequest, + FederationInstancesResponse, + FederationShowInstanceRequest, + FederationShowInstanceResponse, + FederationUpdateRemoteUserRequest, + FederationUsersRequest, + FederationUsersResponse, + FederationStatsRequest, + FollowingCreateRequest, + FollowingCreateResponse, + FollowingDeleteRequest, + FollowingDeleteResponse, + FollowingUpdateRequest, + FollowingUpdateResponse, + FollowingUpdateAllRequest, + FollowingInvalidateRequest, + FollowingInvalidateResponse, + FollowingRequestsAcceptRequest, + FollowingRequestsCancelRequest, + FollowingRequestsCancelResponse, + FollowingRequestsListRequest, + FollowingRequestsListResponse, + FollowingRequestsRejectRequest, + GalleryFeaturedRequest, + GalleryFeaturedResponse, + GalleryPopularResponse, + GalleryPostsRequest, + GalleryPostsResponse, + GalleryPostsCreateRequest, + GalleryPostsCreateResponse, + GalleryPostsDeleteRequest, + GalleryPostsLikeRequest, + GalleryPostsShowRequest, + GalleryPostsShowResponse, + GalleryPostsUnlikeRequest, + GalleryPostsUpdateRequest, + GalleryPostsUpdateResponse, + GetAvatarDecorationsResponse, + HashtagsListRequest, + HashtagsListResponse, + HashtagsSearchRequest, + HashtagsSearchResponse, + HashtagsShowRequest, + HashtagsShowResponse, + HashtagsTrendResponse, + HashtagsUsersRequest, + HashtagsUsersResponse, + IResponse, + IClaimAchievementRequest, + IFavoritesRequest, + IFavoritesResponse, + IGalleryLikesRequest, + IGalleryLikesResponse, + IGalleryPostsRequest, + IGalleryPostsResponse, + INotificationsRequest, + INotificationsResponse, + INotificationsGroupedRequest, + INotificationsGroupedResponse, + IPageLikesRequest, + IPageLikesResponse, + IPagesRequest, + IPagesResponse, + IPinRequest, + IPinResponse, + IReadAnnouncementRequest, + IRegistryGetAllRequest, + IRegistryGetDetailRequest, + IRegistryGetRequest, + IRegistryKeysWithTypeRequest, + IRegistryKeysRequest, + IRegistryRemoveRequest, + IRegistrySetRequest, + IUnpinRequest, + IUnpinResponse, + IUpdateRequest, + IUpdateResponse, + IWebhooksCreateRequest, + IWebhooksShowRequest, + IWebhooksUpdateRequest, + IWebhooksDeleteRequest, + InviteCreateResponse, + InviteDeleteRequest, + InviteListRequest, + InviteListResponse, + InviteLimitResponse, + MetaRequest, + MetaResponse, + EmojisResponse, + EmojiRequest, + EmojiResponse, + MuteCreateRequest, + MuteDeleteRequest, + MuteListRequest, + MuteListResponse, + RenoteMuteCreateRequest, + RenoteMuteDeleteRequest, + RenoteMuteListRequest, + RenoteMuteListResponse, + MyAppsRequest, + MyAppsResponse, + NotesRequest, + NotesResponse, + NotesChildrenRequest, + NotesChildrenResponse, + NotesClipsRequest, + NotesClipsResponse, + NotesConversationRequest, + NotesConversationResponse, + NotesCreateRequest, + NotesCreateResponse, + NotesDeleteRequest, + NotesFavoritesCreateRequest, + NotesFavoritesDeleteRequest, + NotesFeaturedRequest, + NotesFeaturedResponse, + NotesGlobalTimelineRequest, + NotesGlobalTimelineResponse, + NotesHybridTimelineRequest, + NotesHybridTimelineResponse, + NotesLocalTimelineRequest, + NotesLocalTimelineResponse, + NotesMentionsRequest, + NotesMentionsResponse, + NotesPollsRecommendationRequest, + NotesPollsRecommendationResponse, + NotesPollsVoteRequest, + NotesReactionsRequest, + NotesReactionsResponse, + NotesReactionsCreateRequest, + NotesReactionsDeleteRequest, + NotesRenotesRequest, + NotesRenotesResponse, + NotesRepliesRequest, + NotesRepliesResponse, + NotesSearchByTagRequest, + NotesSearchByTagResponse, + NotesSearchRequest, + NotesSearchResponse, + NotesShowRequest, + NotesShowResponse, + NotesStateRequest, + NotesStateResponse, + NotesThreadMutingCreateRequest, + NotesThreadMutingDeleteRequest, + NotesTimelineRequest, + NotesTimelineResponse, + NotesTranslateRequest, + NotesTranslateResponse, + NotesUnrenoteRequest, + NotesUserListTimelineRequest, + NotesUserListTimelineResponse, + NotificationsCreateRequest, + PagesCreateRequest, + PagesCreateResponse, + PagesDeleteRequest, + PagesFeaturedResponse, + PagesLikeRequest, + PagesShowRequest, + PagesShowResponse, + PagesUnlikeRequest, + PagesUpdateRequest, + FlashCreateRequest, + FlashDeleteRequest, + FlashFeaturedResponse, + FlashLikeRequest, + FlashShowRequest, + FlashShowResponse, + FlashUnlikeRequest, + FlashUpdateRequest, + FlashMyRequest, + FlashMyResponse, + FlashMyLikesRequest, + FlashMyLikesResponse, + PingResponse, + PinnedUsersResponse, + PromoReadRequest, + RolesShowRequest, + RolesUsersRequest, + RolesNotesRequest, + RolesNotesResponse, + RequestResetPasswordRequest, + ResetPasswordRequest, + StatsResponse, + SwShowRegistrationRequest, + SwShowRegistrationResponse, + SwUpdateRegistrationRequest, + SwUpdateRegistrationResponse, + SwRegisterRequest, + SwRegisterResponse, + SwUnregisterRequest, + TestRequest, + UsernameAvailableRequest, + UsernameAvailableResponse, + UsersRequest, + UsersResponse, + UsersClipsRequest, + UsersClipsResponse, + UsersFollowersRequest, + UsersFollowersResponse, + UsersFollowingRequest, + UsersFollowingResponse, + UsersGalleryPostsRequest, + UsersGalleryPostsResponse, + UsersGetFrequentlyRepliedUsersRequest, + UsersGetFrequentlyRepliedUsersResponse, + UsersFeaturedNotesRequest, + UsersFeaturedNotesResponse, + UsersListsCreateRequest, + UsersListsCreateResponse, + UsersListsDeleteRequest, + UsersListsListRequest, + UsersListsListResponse, + UsersListsPullRequest, + UsersListsPushRequest, + UsersListsShowRequest, + UsersListsShowResponse, + UsersListsFavoriteRequest, + UsersListsUnfavoriteRequest, + UsersListsUpdateRequest, + UsersListsUpdateResponse, + UsersListsCreateFromPublicRequest, + UsersListsCreateFromPublicResponse, + UsersListsUpdateMembershipRequest, + UsersListsGetMembershipsRequest, + UsersNotesRequest, + UsersNotesResponse, + UsersPagesRequest, + UsersPagesResponse, + UsersFlashsRequest, + UsersFlashsResponse, + UsersReactionsRequest, + UsersReactionsResponse, + UsersRecommendationRequest, + UsersRecommendationResponse, + UsersRelationRequest, + UsersRelationResponse, + UsersReportAbuseRequest, + UsersSearchByUsernameAndHostRequest, + UsersSearchByUsernameAndHostResponse, + UsersSearchRequest, + UsersSearchResponse, + UsersShowRequest, + UsersShowResponse, + UsersAchievementsRequest, + UsersUpdateMemoRequest, + FetchRssRequest, + FetchExternalResourcesRequest, + RetentionResponse, +} from './entities.js'; + +export type Endpoints = { + 'admin/meta': { req: EmptyRequest; res: AdminMetaResponse }; + 'admin/abuse-user-reports': { req: AdminAbuseUserReportsRequest; res: AdminAbuseUserReportsResponse }; + 'admin/accounts/create': { req: AdminAccountsCreateRequest; res: AdminAccountsCreateResponse }; + 'admin/accounts/delete': { req: AdminAccountsDeleteRequest; res: EmptyResponse }; + 'admin/accounts/find-by-email': { req: AdminAccountsFindByEmailRequest; res: EmptyResponse }; + 'admin/ad/create': { req: AdminAdCreateRequest; res: EmptyResponse }; + 'admin/ad/delete': { req: AdminAdDeleteRequest; res: EmptyResponse }; + 'admin/ad/list': { req: AdminAdListRequest; res: EmptyResponse }; + 'admin/ad/update': { req: AdminAdUpdateRequest; res: EmptyResponse }; + 'admin/announcements/create': { req: AdminAnnouncementsCreateRequest; res: AdminAnnouncementsCreateResponse }; + 'admin/announcements/delete': { req: AdminAnnouncementsDeleteRequest; res: EmptyResponse }; + 'admin/announcements/list': { req: AdminAnnouncementsListRequest; res: AdminAnnouncementsListResponse }; + 'admin/announcements/update': { req: AdminAnnouncementsUpdateRequest; res: EmptyResponse }; + 'admin/avatar-decorations/create': { req: AdminAvatarDecorationsCreateRequest; res: EmptyResponse }; + 'admin/avatar-decorations/delete': { req: AdminAvatarDecorationsDeleteRequest; res: EmptyResponse }; + 'admin/avatar-decorations/list': { req: AdminAvatarDecorationsListRequest; res: AdminAvatarDecorationsListResponse }; + 'admin/avatar-decorations/update': { req: AdminAvatarDecorationsUpdateRequest; res: EmptyResponse }; + 'admin/delete-all-files-of-a-user': { req: AdminDeleteAllFilesOfAUserRequest; res: EmptyResponse }; + 'admin/unset-user-avatar': { req: AdminUnsetUserAvatarRequest; res: EmptyResponse }; + 'admin/unset-user-banner': { req: AdminUnsetUserBannerRequest; res: EmptyResponse }; + 'admin/drive/clean-remote-files': { req: EmptyRequest; res: EmptyResponse }; + 'admin/drive/cleanup': { req: EmptyRequest; res: EmptyResponse }; + 'admin/drive/files': { req: AdminDriveFilesRequest; res: AdminDriveFilesResponse }; + 'admin/drive/show-file': { req: AdminDriveShowFileRequest; res: AdminDriveShowFileResponse }; + 'admin/emoji/add-aliases-bulk': { req: AdminEmojiAddAliasesBulkRequest; res: EmptyResponse }; + 'admin/emoji/add': { req: AdminEmojiAddRequest; res: EmptyResponse }; + 'admin/emoji/copy': { req: AdminEmojiCopyRequest; res: AdminEmojiCopyResponse }; + 'admin/emoji/delete-bulk': { req: AdminEmojiDeleteBulkRequest; res: EmptyResponse }; + 'admin/emoji/delete': { req: AdminEmojiDeleteRequest; res: EmptyResponse }; + 'admin/emoji/list-remote': { req: AdminEmojiListRemoteRequest; res: AdminEmojiListRemoteResponse }; + 'admin/emoji/list': { req: AdminEmojiListRequest; res: AdminEmojiListResponse }; + 'admin/emoji/remove-aliases-bulk': { req: AdminEmojiRemoveAliasesBulkRequest; res: EmptyResponse }; + 'admin/emoji/set-aliases-bulk': { req: AdminEmojiSetAliasesBulkRequest; res: EmptyResponse }; + 'admin/emoji/set-category-bulk': { req: AdminEmojiSetCategoryBulkRequest; res: EmptyResponse }; + 'admin/emoji/set-license-bulk': { req: AdminEmojiSetLicenseBulkRequest; res: EmptyResponse }; + 'admin/emoji/update': { req: AdminEmojiUpdateRequest; res: EmptyResponse }; + 'admin/federation/delete-all-files': { req: AdminFederationDeleteAllFilesRequest; res: EmptyResponse }; + 'admin/federation/refresh-remote-instance-metadata': { req: AdminFederationRefreshRemoteInstanceMetadataRequest; res: EmptyResponse }; + 'admin/federation/remove-all-following': { req: AdminFederationRemoveAllFollowingRequest; res: EmptyResponse }; + 'admin/federation/update-instance': { req: AdminFederationUpdateInstanceRequest; res: EmptyResponse }; + 'admin/get-index-stats': { req: EmptyRequest; res: EmptyResponse }; + 'admin/get-table-stats': { req: EmptyRequest; res: AdminGetTableStatsResponse }; + 'admin/get-user-ips': { req: AdminGetUserIpsRequest; res: EmptyResponse }; + 'admin/invite/create': { req: AdminInviteCreateRequest; res: AdminInviteCreateResponse }; + 'admin/invite/list': { req: AdminInviteListRequest; res: AdminInviteListResponse }; + 'admin/promo/create': { req: AdminPromoCreateRequest; res: EmptyResponse }; + 'admin/queue/clear': { req: EmptyRequest; res: EmptyResponse }; + 'admin/queue/deliver-delayed': { req: EmptyRequest; res: AdminQueueDeliverDelayedResponse }; + 'admin/queue/inbox-delayed': { req: EmptyRequest; res: AdminQueueInboxDelayedResponse }; + 'admin/queue/promote': { req: AdminQueuePromoteRequest; res: EmptyResponse }; + 'admin/queue/stats': { req: EmptyRequest; res: AdminQueueStatsResponse }; + 'admin/relays/add': { req: AdminRelaysAddRequest; res: AdminRelaysAddResponse }; + 'admin/relays/list': { req: EmptyRequest; res: AdminRelaysListResponse }; + 'admin/relays/remove': { req: AdminRelaysRemoveRequest; res: EmptyResponse }; + 'admin/reset-password': { req: AdminResetPasswordRequest; res: AdminResetPasswordResponse }; + 'admin/resolve-abuse-user-report': { req: AdminResolveAbuseUserReportRequest; res: EmptyResponse }; + 'admin/send-email': { req: AdminSendEmailRequest; res: EmptyResponse }; + 'admin/server-info': { req: EmptyRequest; res: AdminServerInfoResponse }; + 'admin/show-moderation-logs': { req: AdminShowModerationLogsRequest; res: AdminShowModerationLogsResponse }; + 'admin/show-user': { req: AdminShowUserRequest; res: AdminShowUserResponse }; + 'admin/show-users': { req: AdminShowUsersRequest; res: AdminShowUsersResponse }; + 'admin/suspend-user': { req: AdminSuspendUserRequest; res: EmptyResponse }; + 'admin/unsuspend-user': { req: AdminUnsuspendUserRequest; res: EmptyResponse }; + 'admin/update-meta': { req: AdminUpdateMetaRequest; res: EmptyResponse }; + 'admin/delete-account': { req: AdminDeleteAccountRequest; res: AdminDeleteAccountResponse }; + 'admin/update-user-note': { req: AdminUpdateUserNoteRequest; res: EmptyResponse }; + 'admin/roles/create': { req: AdminRolesCreateRequest; res: EmptyResponse }; + 'admin/roles/delete': { req: AdminRolesDeleteRequest; res: EmptyResponse }; + 'admin/roles/list': { req: EmptyRequest; res: EmptyResponse }; + 'admin/roles/show': { req: AdminRolesShowRequest; res: EmptyResponse }; + 'admin/roles/update': { req: AdminRolesUpdateRequest; res: EmptyResponse }; + 'admin/roles/assign': { req: AdminRolesAssignRequest; res: EmptyResponse }; + 'admin/roles/unassign': { req: AdminRolesUnassignRequest; res: EmptyResponse }; + 'admin/roles/update-default-policies': { req: AdminRolesUpdateDefaultPoliciesRequest; res: EmptyResponse }; + 'admin/roles/users': { req: AdminRolesUsersRequest; res: EmptyResponse }; + 'announcements': { req: AnnouncementsRequest; res: AnnouncementsResponse }; + 'antennas/create': { req: AntennasCreateRequest; res: AntennasCreateResponse }; + 'antennas/delete': { req: AntennasDeleteRequest; res: EmptyResponse }; + 'antennas/list': { req: EmptyRequest; res: AntennasListResponse }; + 'antennas/notes': { req: AntennasNotesRequest; res: AntennasNotesResponse }; + 'antennas/show': { req: AntennasShowRequest; res: AntennasShowResponse }; + 'antennas/update': { req: AntennasUpdateRequest; res: AntennasUpdateResponse }; + 'ap/get': { req: ApGetRequest; res: ApGetResponse }; + 'ap/show': { req: ApShowRequest; res: ApShowResponse }; + 'app/create': { req: AppCreateRequest; res: AppCreateResponse }; + 'app/show': { req: AppShowRequest; res: AppShowResponse }; + 'auth/session/generate': { req: AuthSessionGenerateRequest; res: AuthSessionGenerateResponse }; + 'auth/session/show': { req: AuthSessionShowRequest; res: AuthSessionShowResponse }; + 'auth/session/userkey': { req: AuthSessionUserkeyRequest; res: AuthSessionUserkeyResponse }; + 'blocking/create': { req: BlockingCreateRequest; res: BlockingCreateResponse }; + 'blocking/delete': { req: BlockingDeleteRequest; res: BlockingDeleteResponse }; + 'blocking/list': { req: BlockingListRequest; res: BlockingListResponse }; + 'channels/create': { req: ChannelsCreateRequest; res: ChannelsCreateResponse }; + 'channels/featured': { req: EmptyRequest; res: ChannelsFeaturedResponse }; + 'channels/follow': { req: ChannelsFollowRequest; res: EmptyResponse }; + 'channels/followed': { req: ChannelsFollowedRequest; res: ChannelsFollowedResponse }; + 'channels/owned': { req: ChannelsOwnedRequest; res: ChannelsOwnedResponse }; + 'channels/show': { req: ChannelsShowRequest; res: ChannelsShowResponse }; + 'channels/timeline': { req: ChannelsTimelineRequest; res: ChannelsTimelineResponse }; + 'channels/unfollow': { req: ChannelsUnfollowRequest; res: EmptyResponse }; + 'channels/update': { req: ChannelsUpdateRequest; res: ChannelsUpdateResponse }; + 'channels/favorite': { req: ChannelsFavoriteRequest; res: EmptyResponse }; + 'channels/unfavorite': { req: ChannelsUnfavoriteRequest; res: EmptyResponse }; + 'channels/my-favorites': { req: EmptyRequest; res: ChannelsMyFavoritesResponse }; + 'channels/search': { req: ChannelsSearchRequest; res: ChannelsSearchResponse }; + 'charts/active-users': { req: ChartsActiveUsersRequest; res: ChartsActiveUsersResponse }; + 'charts/ap-request': { req: ChartsApRequestRequest; res: ChartsApRequestResponse }; + 'charts/drive': { req: ChartsDriveRequest; res: ChartsDriveResponse }; + 'charts/federation': { req: ChartsFederationRequest; res: ChartsFederationResponse }; + 'charts/instance': { req: ChartsInstanceRequest; res: ChartsInstanceResponse }; + 'charts/notes': { req: ChartsNotesRequest; res: ChartsNotesResponse }; + 'charts/user/drive': { req: ChartsUserDriveRequest; res: ChartsUserDriveResponse }; + 'charts/user/following': { req: ChartsUserFollowingRequest; res: ChartsUserFollowingResponse }; + 'charts/user/notes': { req: ChartsUserNotesRequest; res: ChartsUserNotesResponse }; + 'charts/user/pv': { req: ChartsUserPvRequest; res: ChartsUserPvResponse }; + 'charts/user/reactions': { req: ChartsUserReactionsRequest; res: ChartsUserReactionsResponse }; + 'charts/users': { req: ChartsUsersRequest; res: ChartsUsersResponse }; + 'clips/add-note': { req: ClipsAddNoteRequest; res: EmptyResponse }; + 'clips/remove-note': { req: ClipsRemoveNoteRequest; res: EmptyResponse }; + 'clips/create': { req: ClipsCreateRequest; res: ClipsCreateResponse }; + 'clips/delete': { req: ClipsDeleteRequest; res: EmptyResponse }; + 'clips/list': { req: EmptyRequest; res: ClipsListResponse }; + 'clips/notes': { req: ClipsNotesRequest; res: ClipsNotesResponse }; + 'clips/show': { req: ClipsShowRequest; res: ClipsShowResponse }; + 'clips/update': { req: ClipsUpdateRequest; res: ClipsUpdateResponse }; + 'clips/favorite': { req: ClipsFavoriteRequest; res: EmptyResponse }; + 'clips/unfavorite': { req: ClipsUnfavoriteRequest; res: EmptyResponse }; + 'clips/my-favorites': { req: EmptyRequest; res: ClipsMyFavoritesResponse }; + 'drive': { req: EmptyRequest; res: DriveResponse }; + 'drive/files': { req: DriveFilesRequest; res: DriveFilesResponse }; + 'drive/files/attached-notes': { req: DriveFilesAttachedNotesRequest; res: DriveFilesAttachedNotesResponse }; + 'drive/files/check-existence': { req: DriveFilesCheckExistenceRequest; res: DriveFilesCheckExistenceResponse }; + 'drive/files/create': { req: DriveFilesCreateRequest; res: DriveFilesCreateResponse }; + 'drive/files/delete': { req: DriveFilesDeleteRequest; res: EmptyResponse }; + 'drive/files/find-by-hash': { req: DriveFilesFindByHashRequest; res: DriveFilesFindByHashResponse }; + 'drive/files/find': { req: DriveFilesFindRequest; res: DriveFilesFindResponse }; + 'drive/files/show': { req: DriveFilesShowRequest; res: DriveFilesShowResponse }; + 'drive/files/update': { req: DriveFilesUpdateRequest; res: DriveFilesUpdateResponse }; + 'drive/files/upload-from-url': { req: DriveFilesUploadFromUrlRequest; res: EmptyResponse }; + 'drive/folders': { req: DriveFoldersRequest; res: DriveFoldersResponse }; + 'drive/folders/create': { req: DriveFoldersCreateRequest; res: DriveFoldersCreateResponse }; + 'drive/folders/delete': { req: DriveFoldersDeleteRequest; res: EmptyResponse }; + 'drive/folders/find': { req: DriveFoldersFindRequest; res: DriveFoldersFindResponse }; + 'drive/folders/show': { req: DriveFoldersShowRequest; res: DriveFoldersShowResponse }; + 'drive/folders/update': { req: DriveFoldersUpdateRequest; res: DriveFoldersUpdateResponse }; + 'drive/stream': { req: DriveStreamRequest; res: DriveStreamResponse }; + 'email-address/available': { req: EmailAddressAvailableRequest; res: EmailAddressAvailableResponse }; + 'endpoint': { req: EndpointRequest; res: EmptyResponse }; + 'endpoints': { req: EmptyRequest; res: EndpointsResponse }; + 'federation/followers': { req: FederationFollowersRequest; res: FederationFollowersResponse }; + 'federation/following': { req: FederationFollowingRequest; res: FederationFollowingResponse }; + 'federation/instances': { req: FederationInstancesRequest; res: FederationInstancesResponse }; + 'federation/show-instance': { req: FederationShowInstanceRequest; res: FederationShowInstanceResponse }; + 'federation/update-remote-user': { req: FederationUpdateRemoteUserRequest; res: EmptyResponse }; + 'federation/users': { req: FederationUsersRequest; res: FederationUsersResponse }; + 'federation/stats': { req: FederationStatsRequest; res: EmptyResponse }; + 'following/create': { req: FollowingCreateRequest; res: FollowingCreateResponse }; + 'following/delete': { req: FollowingDeleteRequest; res: FollowingDeleteResponse }; + 'following/update': { req: FollowingUpdateRequest; res: FollowingUpdateResponse }; + 'following/update-all': { req: FollowingUpdateAllRequest; res: EmptyResponse }; + 'following/invalidate': { req: FollowingInvalidateRequest; res: FollowingInvalidateResponse }; + 'following/requests/accept': { req: FollowingRequestsAcceptRequest; res: EmptyResponse }; + 'following/requests/cancel': { req: FollowingRequestsCancelRequest; res: FollowingRequestsCancelResponse }; + 'following/requests/list': { req: FollowingRequestsListRequest; res: FollowingRequestsListResponse }; + 'following/requests/reject': { req: FollowingRequestsRejectRequest; res: EmptyResponse }; + 'gallery/featured': { req: GalleryFeaturedRequest; res: GalleryFeaturedResponse }; + 'gallery/popular': { req: EmptyRequest; res: GalleryPopularResponse }; + 'gallery/posts': { req: GalleryPostsRequest; res: GalleryPostsResponse }; + 'gallery/posts/create': { req: GalleryPostsCreateRequest; res: GalleryPostsCreateResponse }; + 'gallery/posts/delete': { req: GalleryPostsDeleteRequest; res: EmptyResponse }; + 'gallery/posts/like': { req: GalleryPostsLikeRequest; res: EmptyResponse }; + 'gallery/posts/show': { req: GalleryPostsShowRequest; res: GalleryPostsShowResponse }; + 'gallery/posts/unlike': { req: GalleryPostsUnlikeRequest; res: EmptyResponse }; + 'gallery/posts/update': { req: GalleryPostsUpdateRequest; res: GalleryPostsUpdateResponse }; + 'get-online-users-count': { req: EmptyRequest; res: EmptyResponse }; + 'get-avatar-decorations': { req: EmptyRequest; res: GetAvatarDecorationsResponse }; + 'hashtags/list': { req: HashtagsListRequest; res: HashtagsListResponse }; + 'hashtags/search': { req: HashtagsSearchRequest; res: HashtagsSearchResponse }; + 'hashtags/show': { req: HashtagsShowRequest; res: HashtagsShowResponse }; + 'hashtags/trend': { req: EmptyRequest; res: HashtagsTrendResponse }; + 'hashtags/users': { req: HashtagsUsersRequest; res: HashtagsUsersResponse }; + 'i': { req: EmptyRequest; res: IResponse }; + 'i/claim-achievement': { req: IClaimAchievementRequest; res: EmptyResponse }; + 'i/favorites': { req: IFavoritesRequest; res: IFavoritesResponse }; + 'i/gallery/likes': { req: IGalleryLikesRequest; res: IGalleryLikesResponse }; + 'i/gallery/posts': { req: IGalleryPostsRequest; res: IGalleryPostsResponse }; + 'i/notifications': { req: INotificationsRequest; res: INotificationsResponse }; + 'i/notifications-grouped': { req: INotificationsGroupedRequest; res: INotificationsGroupedResponse }; + 'i/page-likes': { req: IPageLikesRequest; res: IPageLikesResponse }; + 'i/pages': { req: IPagesRequest; res: IPagesResponse }; + 'i/pin': { req: IPinRequest; res: IPinResponse }; + 'i/read-all-unread-notes': { req: EmptyRequest; res: EmptyResponse }; + 'i/read-announcement': { req: IReadAnnouncementRequest; res: EmptyResponse }; + 'i/registry/get-all': { req: IRegistryGetAllRequest; res: EmptyResponse }; + 'i/registry/get-detail': { req: IRegistryGetDetailRequest; res: EmptyResponse }; + 'i/registry/get': { req: IRegistryGetRequest; res: EmptyResponse }; + 'i/registry/keys-with-type': { req: IRegistryKeysWithTypeRequest; res: EmptyResponse }; + 'i/registry/keys': { req: IRegistryKeysRequest; res: EmptyResponse }; + 'i/registry/remove': { req: IRegistryRemoveRequest; res: EmptyResponse }; + 'i/registry/set': { req: IRegistrySetRequest; res: EmptyResponse }; + 'i/unpin': { req: IUnpinRequest; res: IUnpinResponse }; + 'i/update': { req: IUpdateRequest; res: IUpdateResponse }; + 'i/webhooks/create': { req: IWebhooksCreateRequest; res: EmptyResponse }; + 'i/webhooks/list': { req: EmptyRequest; res: EmptyResponse }; + 'i/webhooks/show': { req: IWebhooksShowRequest; res: EmptyResponse }; + 'i/webhooks/update': { req: IWebhooksUpdateRequest; res: EmptyResponse }; + 'i/webhooks/delete': { req: IWebhooksDeleteRequest; res: EmptyResponse }; + 'invite/create': { req: EmptyRequest; res: InviteCreateResponse }; + 'invite/delete': { req: InviteDeleteRequest; res: EmptyResponse }; + 'invite/list': { req: InviteListRequest; res: InviteListResponse }; + 'invite/limit': { req: EmptyRequest; res: InviteLimitResponse }; + 'meta': { req: MetaRequest; res: MetaResponse }; + 'emojis': { req: EmptyRequest; res: EmojisResponse }; + 'emoji': { req: EmojiRequest; res: EmojiResponse }; + 'mute/create': { req: MuteCreateRequest; res: EmptyResponse }; + 'mute/delete': { req: MuteDeleteRequest; res: EmptyResponse }; + 'mute/list': { req: MuteListRequest; res: MuteListResponse }; + 'renote-mute/create': { req: RenoteMuteCreateRequest; res: EmptyResponse }; + 'renote-mute/delete': { req: RenoteMuteDeleteRequest; res: EmptyResponse }; + 'renote-mute/list': { req: RenoteMuteListRequest; res: RenoteMuteListResponse }; + 'my/apps': { req: MyAppsRequest; res: MyAppsResponse }; + 'notes': { req: NotesRequest; res: NotesResponse }; + 'notes/children': { req: NotesChildrenRequest; res: NotesChildrenResponse }; + 'notes/clips': { req: NotesClipsRequest; res: NotesClipsResponse }; + 'notes/conversation': { req: NotesConversationRequest; res: NotesConversationResponse }; + 'notes/create': { req: NotesCreateRequest; res: NotesCreateResponse }; + 'notes/delete': { req: NotesDeleteRequest; res: EmptyResponse }; + 'notes/favorites/create': { req: NotesFavoritesCreateRequest; res: EmptyResponse }; + 'notes/favorites/delete': { req: NotesFavoritesDeleteRequest; res: EmptyResponse }; + 'notes/featured': { req: NotesFeaturedRequest; res: NotesFeaturedResponse }; + 'notes/global-timeline': { req: NotesGlobalTimelineRequest; res: NotesGlobalTimelineResponse }; + 'notes/hybrid-timeline': { req: NotesHybridTimelineRequest; res: NotesHybridTimelineResponse }; + 'notes/local-timeline': { req: NotesLocalTimelineRequest; res: NotesLocalTimelineResponse }; + 'notes/mentions': { req: NotesMentionsRequest; res: NotesMentionsResponse }; + 'notes/polls/recommendation': { req: NotesPollsRecommendationRequest; res: NotesPollsRecommendationResponse }; + 'notes/polls/vote': { req: NotesPollsVoteRequest; res: EmptyResponse }; + 'notes/reactions': { req: NotesReactionsRequest; res: NotesReactionsResponse }; + 'notes/reactions/create': { req: NotesReactionsCreateRequest; res: EmptyResponse }; + 'notes/reactions/delete': { req: NotesReactionsDeleteRequest; res: EmptyResponse }; + 'notes/renotes': { req: NotesRenotesRequest; res: NotesRenotesResponse }; + 'notes/replies': { req: NotesRepliesRequest; res: NotesRepliesResponse }; + 'notes/search-by-tag': { req: NotesSearchByTagRequest; res: NotesSearchByTagResponse }; + 'notes/search': { req: NotesSearchRequest; res: NotesSearchResponse }; + 'notes/show': { req: NotesShowRequest; res: NotesShowResponse }; + 'notes/state': { req: NotesStateRequest; res: NotesStateResponse }; + 'notes/thread-muting/create': { req: NotesThreadMutingCreateRequest; res: EmptyResponse }; + 'notes/thread-muting/delete': { req: NotesThreadMutingDeleteRequest; res: EmptyResponse }; + 'notes/timeline': { req: NotesTimelineRequest; res: NotesTimelineResponse }; + 'notes/translate': { req: NotesTranslateRequest; res: NotesTranslateResponse }; + 'notes/unrenote': { req: NotesUnrenoteRequest; res: EmptyResponse }; + 'notes/user-list-timeline': { req: NotesUserListTimelineRequest; res: NotesUserListTimelineResponse }; + 'notifications/create': { req: NotificationsCreateRequest; res: EmptyResponse }; + 'notifications/mark-all-as-read': { req: EmptyRequest; res: EmptyResponse }; + 'notifications/test-notification': { req: EmptyRequest; res: EmptyResponse }; + 'pages/create': { req: PagesCreateRequest; res: PagesCreateResponse }; + 'pages/delete': { req: PagesDeleteRequest; res: EmptyResponse }; + 'pages/featured': { req: EmptyRequest; res: PagesFeaturedResponse }; + 'pages/like': { req: PagesLikeRequest; res: EmptyResponse }; + 'pages/show': { req: PagesShowRequest; res: PagesShowResponse }; + 'pages/unlike': { req: PagesUnlikeRequest; res: EmptyResponse }; + 'pages/update': { req: PagesUpdateRequest; res: EmptyResponse }; + 'flash/create': { req: FlashCreateRequest; res: EmptyResponse }; + 'flash/delete': { req: FlashDeleteRequest; res: EmptyResponse }; + 'flash/featured': { req: EmptyRequest; res: FlashFeaturedResponse }; + 'flash/like': { req: FlashLikeRequest; res: EmptyResponse }; + 'flash/show': { req: FlashShowRequest; res: FlashShowResponse }; + 'flash/unlike': { req: FlashUnlikeRequest; res: EmptyResponse }; + 'flash/update': { req: FlashUpdateRequest; res: EmptyResponse }; + 'flash/my': { req: FlashMyRequest; res: FlashMyResponse }; + 'flash/my-likes': { req: FlashMyLikesRequest; res: FlashMyLikesResponse }; + 'ping': { req: EmptyRequest; res: PingResponse }; + 'pinned-users': { req: EmptyRequest; res: PinnedUsersResponse }; + 'promo/read': { req: PromoReadRequest; res: EmptyResponse }; + 'roles/list': { req: EmptyRequest; res: EmptyResponse }; + 'roles/show': { req: RolesShowRequest; res: EmptyResponse }; + 'roles/users': { req: RolesUsersRequest; res: EmptyResponse }; + 'roles/notes': { req: RolesNotesRequest; res: RolesNotesResponse }; + 'request-reset-password': { req: RequestResetPasswordRequest; res: EmptyResponse }; + 'reset-db': { req: EmptyRequest; res: EmptyResponse }; + 'reset-password': { req: ResetPasswordRequest; res: EmptyResponse }; + 'server-info': { req: EmptyRequest; res: EmptyResponse }; + 'stats': { req: EmptyRequest; res: StatsResponse }; + 'sw/show-registration': { req: SwShowRegistrationRequest; res: SwShowRegistrationResponse }; + 'sw/update-registration': { req: SwUpdateRegistrationRequest; res: SwUpdateRegistrationResponse }; + 'sw/register': { req: SwRegisterRequest; res: SwRegisterResponse }; + 'sw/unregister': { req: SwUnregisterRequest; res: EmptyResponse }; + 'test': { req: TestRequest; res: EmptyResponse }; + 'username/available': { req: UsernameAvailableRequest; res: UsernameAvailableResponse }; + 'users': { req: UsersRequest; res: UsersResponse }; + 'users/clips': { req: UsersClipsRequest; res: UsersClipsResponse }; + 'users/followers': { req: UsersFollowersRequest; res: UsersFollowersResponse }; + 'users/following': { req: UsersFollowingRequest; res: UsersFollowingResponse }; + 'users/gallery/posts': { req: UsersGalleryPostsRequest; res: UsersGalleryPostsResponse }; + 'users/get-frequently-replied-users': { req: UsersGetFrequentlyRepliedUsersRequest; res: UsersGetFrequentlyRepliedUsersResponse }; + 'users/featured-notes': { req: UsersFeaturedNotesRequest; res: UsersFeaturedNotesResponse }; + 'users/lists/create': { req: UsersListsCreateRequest; res: UsersListsCreateResponse }; + 'users/lists/delete': { req: UsersListsDeleteRequest; res: EmptyResponse }; + 'users/lists/list': { req: UsersListsListRequest; res: UsersListsListResponse }; + 'users/lists/pull': { req: UsersListsPullRequest; res: EmptyResponse }; + 'users/lists/push': { req: UsersListsPushRequest; res: EmptyResponse }; + 'users/lists/show': { req: UsersListsShowRequest; res: UsersListsShowResponse }; + 'users/lists/favorite': { req: UsersListsFavoriteRequest; res: EmptyResponse }; + 'users/lists/unfavorite': { req: UsersListsUnfavoriteRequest; res: EmptyResponse }; + 'users/lists/update': { req: UsersListsUpdateRequest; res: UsersListsUpdateResponse }; + 'users/lists/create-from-public': { req: UsersListsCreateFromPublicRequest; res: UsersListsCreateFromPublicResponse }; + 'users/lists/update-membership': { req: UsersListsUpdateMembershipRequest; res: EmptyResponse }; + 'users/lists/get-memberships': { req: UsersListsGetMembershipsRequest; res: EmptyResponse }; + 'users/notes': { req: UsersNotesRequest; res: UsersNotesResponse }; + 'users/pages': { req: UsersPagesRequest; res: UsersPagesResponse }; + 'users/flashs': { req: UsersFlashsRequest; res: UsersFlashsResponse }; + 'users/reactions': { req: UsersReactionsRequest; res: UsersReactionsResponse }; + 'users/recommendation': { req: UsersRecommendationRequest; res: UsersRecommendationResponse }; + 'users/relation': { req: UsersRelationRequest; res: UsersRelationResponse }; + 'users/report-abuse': { req: UsersReportAbuseRequest; res: EmptyResponse }; + 'users/search-by-username-and-host': { req: UsersSearchByUsernameAndHostRequest; res: UsersSearchByUsernameAndHostResponse }; + 'users/search': { req: UsersSearchRequest; res: UsersSearchResponse }; + 'users/show': { req: UsersShowRequest; res: UsersShowResponse }; + 'users/achievements': { req: UsersAchievementsRequest; res: EmptyResponse }; + 'users/update-memo': { req: UsersUpdateMemoRequest; res: EmptyResponse }; + 'fetch-rss': { req: FetchRssRequest; res: EmptyResponse }; + 'fetch-external-resources': { req: FetchExternalResourcesRequest; res: EmptyResponse }; + 'retention': { req: EmptyRequest; res: RetentionResponse }; +} diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts new file mode 100644 index 0000000000..133a30b4ca --- /dev/null +++ b/packages/misskey-js/src/autogen/entities.ts @@ -0,0 +1,478 @@ +/* + * version: 2023.11.1 + * generatedAt: 2023-11-27T02:24:45.111Z + */ + +import { operations } from './types.js'; + +export type EmptyRequest = Record | undefined; +export type EmptyResponse = Record | undefined; + +export type AdminMetaResponse = operations['admin/meta']['responses']['200']['content']['application/json']; +export type AdminAbuseUserReportsRequest = operations['admin/abuse-user-reports']['requestBody']['content']['application/json']; +export type AdminAbuseUserReportsResponse = operations['admin/abuse-user-reports']['responses']['200']['content']['application/json']; +export type AdminAccountsCreateRequest = operations['admin/accounts/create']['requestBody']['content']['application/json']; +export type AdminAccountsCreateResponse = operations['admin/accounts/create']['responses']['200']['content']['application/json']; +export type AdminAccountsDeleteRequest = operations['admin/accounts/delete']['requestBody']['content']['application/json']; +export type AdminAccountsFindByEmailRequest = operations['admin/accounts/find-by-email']['requestBody']['content']['application/json']; +export type AdminAdCreateRequest = operations['admin/ad/create']['requestBody']['content']['application/json']; +export type AdminAdDeleteRequest = operations['admin/ad/delete']['requestBody']['content']['application/json']; +export type AdminAdListRequest = operations['admin/ad/list']['requestBody']['content']['application/json']; +export type AdminAdUpdateRequest = operations['admin/ad/update']['requestBody']['content']['application/json']; +export type AdminAnnouncementsCreateRequest = operations['admin/announcements/create']['requestBody']['content']['application/json']; +export type AdminAnnouncementsCreateResponse = operations['admin/announcements/create']['responses']['200']['content']['application/json']; +export type AdminAnnouncementsDeleteRequest = operations['admin/announcements/delete']['requestBody']['content']['application/json']; +export type AdminAnnouncementsListRequest = operations['admin/announcements/list']['requestBody']['content']['application/json']; +export type AdminAnnouncementsListResponse = operations['admin/announcements/list']['responses']['200']['content']['application/json']; +export type AdminAnnouncementsUpdateRequest = operations['admin/announcements/update']['requestBody']['content']['application/json']; +export type AdminAvatarDecorationsCreateRequest = operations['admin/avatar-decorations/create']['requestBody']['content']['application/json']; +export type AdminAvatarDecorationsDeleteRequest = operations['admin/avatar-decorations/delete']['requestBody']['content']['application/json']; +export type AdminAvatarDecorationsListRequest = operations['admin/avatar-decorations/list']['requestBody']['content']['application/json']; +export type AdminAvatarDecorationsListResponse = operations['admin/avatar-decorations/list']['responses']['200']['content']['application/json']; +export type AdminAvatarDecorationsUpdateRequest = operations['admin/avatar-decorations/update']['requestBody']['content']['application/json']; +export type AdminDeleteAllFilesOfAUserRequest = operations['admin/delete-all-files-of-a-user']['requestBody']['content']['application/json']; +export type AdminUnsetUserAvatarRequest = operations['admin/unset-user-avatar']['requestBody']['content']['application/json']; +export type AdminUnsetUserBannerRequest = operations['admin/unset-user-banner']['requestBody']['content']['application/json']; +export type AdminDriveFilesRequest = operations['admin/drive/files']['requestBody']['content']['application/json']; +export type AdminDriveFilesResponse = operations['admin/drive/files']['responses']['200']['content']['application/json']; +export type AdminDriveShowFileRequest = operations['admin/drive/show-file']['requestBody']['content']['application/json']; +export type AdminDriveShowFileResponse = operations['admin/drive/show-file']['responses']['200']['content']['application/json']; +export type AdminEmojiAddAliasesBulkRequest = operations['admin/emoji/add-aliases-bulk']['requestBody']['content']['application/json']; +export type AdminEmojiAddRequest = operations['admin/emoji/add']['requestBody']['content']['application/json']; +export type AdminEmojiCopyRequest = operations['admin/emoji/copy']['requestBody']['content']['application/json']; +export type AdminEmojiCopyResponse = operations['admin/emoji/copy']['responses']['200']['content']['application/json']; +export type AdminEmojiDeleteBulkRequest = operations['admin/emoji/delete-bulk']['requestBody']['content']['application/json']; +export type AdminEmojiDeleteRequest = operations['admin/emoji/delete']['requestBody']['content']['application/json']; +export type AdminEmojiListRemoteRequest = operations['admin/emoji/list-remote']['requestBody']['content']['application/json']; +export type AdminEmojiListRemoteResponse = operations['admin/emoji/list-remote']['responses']['200']['content']['application/json']; +export type AdminEmojiListRequest = operations['admin/emoji/list']['requestBody']['content']['application/json']; +export type AdminEmojiListResponse = operations['admin/emoji/list']['responses']['200']['content']['application/json']; +export type AdminEmojiRemoveAliasesBulkRequest = operations['admin/emoji/remove-aliases-bulk']['requestBody']['content']['application/json']; +export type AdminEmojiSetAliasesBulkRequest = operations['admin/emoji/set-aliases-bulk']['requestBody']['content']['application/json']; +export type AdminEmojiSetCategoryBulkRequest = operations['admin/emoji/set-category-bulk']['requestBody']['content']['application/json']; +export type AdminEmojiSetLicenseBulkRequest = operations['admin/emoji/set-license-bulk']['requestBody']['content']['application/json']; +export type AdminEmojiUpdateRequest = operations['admin/emoji/update']['requestBody']['content']['application/json']; +export type AdminFederationDeleteAllFilesRequest = operations['admin/federation/delete-all-files']['requestBody']['content']['application/json']; +export type AdminFederationRefreshRemoteInstanceMetadataRequest = operations['admin/federation/refresh-remote-instance-metadata']['requestBody']['content']['application/json']; +export type AdminFederationRemoveAllFollowingRequest = operations['admin/federation/remove-all-following']['requestBody']['content']['application/json']; +export type AdminFederationUpdateInstanceRequest = operations['admin/federation/update-instance']['requestBody']['content']['application/json']; +export type AdminGetTableStatsResponse = operations['admin/get-table-stats']['responses']['200']['content']['application/json']; +export type AdminGetUserIpsRequest = operations['admin/get-user-ips']['requestBody']['content']['application/json']; +export type AdminInviteCreateRequest = operations['admin/invite/create']['requestBody']['content']['application/json']; +export type AdminInviteCreateResponse = operations['admin/invite/create']['responses']['200']['content']['application/json']; +export type AdminInviteListRequest = operations['admin/invite/list']['requestBody']['content']['application/json']; +export type AdminInviteListResponse = operations['admin/invite/list']['responses']['200']['content']['application/json']; +export type AdminPromoCreateRequest = operations['admin/promo/create']['requestBody']['content']['application/json']; +export type AdminQueueDeliverDelayedResponse = operations['admin/queue/deliver-delayed']['responses']['200']['content']['application/json']; +export type AdminQueueInboxDelayedResponse = operations['admin/queue/inbox-delayed']['responses']['200']['content']['application/json']; +export type AdminQueuePromoteRequest = operations['admin/queue/promote']['requestBody']['content']['application/json']; +export type AdminQueueStatsResponse = operations['admin/queue/stats']['responses']['200']['content']['application/json']; +export type AdminRelaysAddRequest = operations['admin/relays/add']['requestBody']['content']['application/json']; +export type AdminRelaysAddResponse = operations['admin/relays/add']['responses']['200']['content']['application/json']; +export type AdminRelaysListResponse = operations['admin/relays/list']['responses']['200']['content']['application/json']; +export type AdminRelaysRemoveRequest = operations['admin/relays/remove']['requestBody']['content']['application/json']; +export type AdminResetPasswordRequest = operations['admin/reset-password']['requestBody']['content']['application/json']; +export type AdminResetPasswordResponse = operations['admin/reset-password']['responses']['200']['content']['application/json']; +export type AdminResolveAbuseUserReportRequest = operations['admin/resolve-abuse-user-report']['requestBody']['content']['application/json']; +export type AdminSendEmailRequest = operations['admin/send-email']['requestBody']['content']['application/json']; +export type AdminServerInfoResponse = operations['admin/server-info']['responses']['200']['content']['application/json']; +export type AdminShowModerationLogsRequest = operations['admin/show-moderation-logs']['requestBody']['content']['application/json']; +export type AdminShowModerationLogsResponse = operations['admin/show-moderation-logs']['responses']['200']['content']['application/json']; +export type AdminShowUserRequest = operations['admin/show-user']['requestBody']['content']['application/json']; +export type AdminShowUserResponse = operations['admin/show-user']['responses']['200']['content']['application/json']; +export type AdminShowUsersRequest = operations['admin/show-users']['requestBody']['content']['application/json']; +export type AdminShowUsersResponse = operations['admin/show-users']['responses']['200']['content']['application/json']; +export type AdminSuspendUserRequest = operations['admin/suspend-user']['requestBody']['content']['application/json']; +export type AdminUnsuspendUserRequest = operations['admin/unsuspend-user']['requestBody']['content']['application/json']; +export type AdminUpdateMetaRequest = operations['admin/update-meta']['requestBody']['content']['application/json']; +export type AdminDeleteAccountRequest = operations['admin/delete-account']['requestBody']['content']['application/json']; +export type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json']; +export type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json']; +export type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json']; +export type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json']; +export type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json']; +export type AdminRolesUpdateRequest = operations['admin/roles/update']['requestBody']['content']['application/json']; +export type AdminRolesAssignRequest = operations['admin/roles/assign']['requestBody']['content']['application/json']; +export type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json']; +export type AdminRolesUpdateDefaultPoliciesRequest = operations['admin/roles/update-default-policies']['requestBody']['content']['application/json']; +export type AdminRolesUsersRequest = operations['admin/roles/users']['requestBody']['content']['application/json']; +export type AnnouncementsRequest = operations['announcements']['requestBody']['content']['application/json']; +export type AnnouncementsResponse = operations['announcements']['responses']['200']['content']['application/json']; +export type AntennasCreateRequest = operations['antennas/create']['requestBody']['content']['application/json']; +export type AntennasCreateResponse = operations['antennas/create']['responses']['200']['content']['application/json']; +export type AntennasDeleteRequest = operations['antennas/delete']['requestBody']['content']['application/json']; +export type AntennasListResponse = operations['antennas/list']['responses']['200']['content']['application/json']; +export type AntennasNotesRequest = operations['antennas/notes']['requestBody']['content']['application/json']; +export type AntennasNotesResponse = operations['antennas/notes']['responses']['200']['content']['application/json']; +export type AntennasShowRequest = operations['antennas/show']['requestBody']['content']['application/json']; +export type AntennasShowResponse = operations['antennas/show']['responses']['200']['content']['application/json']; +export type AntennasUpdateRequest = operations['antennas/update']['requestBody']['content']['application/json']; +export type AntennasUpdateResponse = operations['antennas/update']['responses']['200']['content']['application/json']; +export type ApGetRequest = operations['ap/get']['requestBody']['content']['application/json']; +export type ApGetResponse = operations['ap/get']['responses']['200']['content']['application/json']; +export type ApShowRequest = operations['ap/show']['requestBody']['content']['application/json']; +export type ApShowResponse = operations['ap/show']['responses']['200']['content']['application/json']; +export type AppCreateRequest = operations['app/create']['requestBody']['content']['application/json']; +export type AppCreateResponse = operations['app/create']['responses']['200']['content']['application/json']; +export type AppShowRequest = operations['app/show']['requestBody']['content']['application/json']; +export type AppShowResponse = operations['app/show']['responses']['200']['content']['application/json']; +export type AuthSessionGenerateRequest = operations['auth/session/generate']['requestBody']['content']['application/json']; +export type AuthSessionGenerateResponse = operations['auth/session/generate']['responses']['200']['content']['application/json']; +export type AuthSessionShowRequest = operations['auth/session/show']['requestBody']['content']['application/json']; +export type AuthSessionShowResponse = operations['auth/session/show']['responses']['200']['content']['application/json']; +export type AuthSessionUserkeyRequest = operations['auth/session/userkey']['requestBody']['content']['application/json']; +export type AuthSessionUserkeyResponse = operations['auth/session/userkey']['responses']['200']['content']['application/json']; +export type BlockingCreateRequest = operations['blocking/create']['requestBody']['content']['application/json']; +export type BlockingCreateResponse = operations['blocking/create']['responses']['200']['content']['application/json']; +export type BlockingDeleteRequest = operations['blocking/delete']['requestBody']['content']['application/json']; +export type BlockingDeleteResponse = operations['blocking/delete']['responses']['200']['content']['application/json']; +export type BlockingListRequest = operations['blocking/list']['requestBody']['content']['application/json']; +export type BlockingListResponse = operations['blocking/list']['responses']['200']['content']['application/json']; +export type ChannelsCreateRequest = operations['channels/create']['requestBody']['content']['application/json']; +export type ChannelsCreateResponse = operations['channels/create']['responses']['200']['content']['application/json']; +export type ChannelsFeaturedResponse = operations['channels/featured']['responses']['200']['content']['application/json']; +export type ChannelsFollowRequest = operations['channels/follow']['requestBody']['content']['application/json']; +export type ChannelsFollowedRequest = operations['channels/followed']['requestBody']['content']['application/json']; +export type ChannelsFollowedResponse = operations['channels/followed']['responses']['200']['content']['application/json']; +export type ChannelsOwnedRequest = operations['channels/owned']['requestBody']['content']['application/json']; +export type ChannelsOwnedResponse = operations['channels/owned']['responses']['200']['content']['application/json']; +export type ChannelsShowRequest = operations['channels/show']['requestBody']['content']['application/json']; +export type ChannelsShowResponse = operations['channels/show']['responses']['200']['content']['application/json']; +export type ChannelsTimelineRequest = operations['channels/timeline']['requestBody']['content']['application/json']; +export type ChannelsTimelineResponse = operations['channels/timeline']['responses']['200']['content']['application/json']; +export type ChannelsUnfollowRequest = operations['channels/unfollow']['requestBody']['content']['application/json']; +export type ChannelsUpdateRequest = operations['channels/update']['requestBody']['content']['application/json']; +export type ChannelsUpdateResponse = operations['channels/update']['responses']['200']['content']['application/json']; +export type ChannelsFavoriteRequest = operations['channels/favorite']['requestBody']['content']['application/json']; +export type ChannelsUnfavoriteRequest = operations['channels/unfavorite']['requestBody']['content']['application/json']; +export type ChannelsMyFavoritesResponse = operations['channels/my-favorites']['responses']['200']['content']['application/json']; +export type ChannelsSearchRequest = operations['channels/search']['requestBody']['content']['application/json']; +export type ChannelsSearchResponse = operations['channels/search']['responses']['200']['content']['application/json']; +export type ChartsActiveUsersRequest = operations['charts/active-users']['requestBody']['content']['application/json']; +export type ChartsActiveUsersResponse = operations['charts/active-users']['responses']['200']['content']['application/json']; +export type ChartsApRequestRequest = operations['charts/ap-request']['requestBody']['content']['application/json']; +export type ChartsApRequestResponse = operations['charts/ap-request']['responses']['200']['content']['application/json']; +export type ChartsDriveRequest = operations['charts/drive']['requestBody']['content']['application/json']; +export type ChartsDriveResponse = operations['charts/drive']['responses']['200']['content']['application/json']; +export type ChartsFederationRequest = operations['charts/federation']['requestBody']['content']['application/json']; +export type ChartsFederationResponse = operations['charts/federation']['responses']['200']['content']['application/json']; +export type ChartsInstanceRequest = operations['charts/instance']['requestBody']['content']['application/json']; +export type ChartsInstanceResponse = operations['charts/instance']['responses']['200']['content']['application/json']; +export type ChartsNotesRequest = operations['charts/notes']['requestBody']['content']['application/json']; +export type ChartsNotesResponse = operations['charts/notes']['responses']['200']['content']['application/json']; +export type ChartsUserDriveRequest = operations['charts/user/drive']['requestBody']['content']['application/json']; +export type ChartsUserDriveResponse = operations['charts/user/drive']['responses']['200']['content']['application/json']; +export type ChartsUserFollowingRequest = operations['charts/user/following']['requestBody']['content']['application/json']; +export type ChartsUserFollowingResponse = operations['charts/user/following']['responses']['200']['content']['application/json']; +export type ChartsUserNotesRequest = operations['charts/user/notes']['requestBody']['content']['application/json']; +export type ChartsUserNotesResponse = operations['charts/user/notes']['responses']['200']['content']['application/json']; +export type ChartsUserPvRequest = operations['charts/user/pv']['requestBody']['content']['application/json']; +export type ChartsUserPvResponse = operations['charts/user/pv']['responses']['200']['content']['application/json']; +export type ChartsUserReactionsRequest = operations['charts/user/reactions']['requestBody']['content']['application/json']; +export type ChartsUserReactionsResponse = operations['charts/user/reactions']['responses']['200']['content']['application/json']; +export type ChartsUsersRequest = operations['charts/users']['requestBody']['content']['application/json']; +export type ChartsUsersResponse = operations['charts/users']['responses']['200']['content']['application/json']; +export type ClipsAddNoteRequest = operations['clips/add-note']['requestBody']['content']['application/json']; +export type ClipsRemoveNoteRequest = operations['clips/remove-note']['requestBody']['content']['application/json']; +export type ClipsCreateRequest = operations['clips/create']['requestBody']['content']['application/json']; +export type ClipsCreateResponse = operations['clips/create']['responses']['200']['content']['application/json']; +export type ClipsDeleteRequest = operations['clips/delete']['requestBody']['content']['application/json']; +export type ClipsListResponse = operations['clips/list']['responses']['200']['content']['application/json']; +export type ClipsNotesRequest = operations['clips/notes']['requestBody']['content']['application/json']; +export type ClipsNotesResponse = operations['clips/notes']['responses']['200']['content']['application/json']; +export type ClipsShowRequest = operations['clips/show']['requestBody']['content']['application/json']; +export type ClipsShowResponse = operations['clips/show']['responses']['200']['content']['application/json']; +export type ClipsUpdateRequest = operations['clips/update']['requestBody']['content']['application/json']; +export type ClipsUpdateResponse = operations['clips/update']['responses']['200']['content']['application/json']; +export type ClipsFavoriteRequest = operations['clips/favorite']['requestBody']['content']['application/json']; +export type ClipsUnfavoriteRequest = operations['clips/unfavorite']['requestBody']['content']['application/json']; +export type ClipsMyFavoritesResponse = operations['clips/my-favorites']['responses']['200']['content']['application/json']; +export type DriveResponse = operations['drive']['responses']['200']['content']['application/json']; +export type DriveFilesRequest = operations['drive/files']['requestBody']['content']['application/json']; +export type DriveFilesResponse = operations['drive/files']['responses']['200']['content']['application/json']; +export type DriveFilesAttachedNotesRequest = operations['drive/files/attached-notes']['requestBody']['content']['application/json']; +export type DriveFilesAttachedNotesResponse = operations['drive/files/attached-notes']['responses']['200']['content']['application/json']; +export type DriveFilesCheckExistenceRequest = operations['drive/files/check-existence']['requestBody']['content']['application/json']; +export type DriveFilesCheckExistenceResponse = operations['drive/files/check-existence']['responses']['200']['content']['application/json']; +export type DriveFilesCreateRequest = operations['drive/files/create']['requestBody']['content']['multipart/form-data']; +export type DriveFilesCreateResponse = operations['drive/files/create']['responses']['200']['content']['application/json']; +export type DriveFilesDeleteRequest = operations['drive/files/delete']['requestBody']['content']['application/json']; +export type DriveFilesFindByHashRequest = operations['drive/files/find-by-hash']['requestBody']['content']['application/json']; +export type DriveFilesFindByHashResponse = operations['drive/files/find-by-hash']['responses']['200']['content']['application/json']; +export type DriveFilesFindRequest = operations['drive/files/find']['requestBody']['content']['application/json']; +export type DriveFilesFindResponse = operations['drive/files/find']['responses']['200']['content']['application/json']; +export type DriveFilesShowRequest = operations['drive/files/show']['requestBody']['content']['application/json']; +export type DriveFilesShowResponse = operations['drive/files/show']['responses']['200']['content']['application/json']; +export type DriveFilesUpdateRequest = operations['drive/files/update']['requestBody']['content']['application/json']; +export type DriveFilesUpdateResponse = operations['drive/files/update']['responses']['200']['content']['application/json']; +export type DriveFilesUploadFromUrlRequest = operations['drive/files/upload-from-url']['requestBody']['content']['application/json']; +export type DriveFoldersRequest = operations['drive/folders']['requestBody']['content']['application/json']; +export type DriveFoldersResponse = operations['drive/folders']['responses']['200']['content']['application/json']; +export type DriveFoldersCreateRequest = operations['drive/folders/create']['requestBody']['content']['application/json']; +export type DriveFoldersCreateResponse = operations['drive/folders/create']['responses']['200']['content']['application/json']; +export type DriveFoldersDeleteRequest = operations['drive/folders/delete']['requestBody']['content']['application/json']; +export type DriveFoldersFindRequest = operations['drive/folders/find']['requestBody']['content']['application/json']; +export type DriveFoldersFindResponse = operations['drive/folders/find']['responses']['200']['content']['application/json']; +export type DriveFoldersShowRequest = operations['drive/folders/show']['requestBody']['content']['application/json']; +export type DriveFoldersShowResponse = operations['drive/folders/show']['responses']['200']['content']['application/json']; +export type DriveFoldersUpdateRequest = operations['drive/folders/update']['requestBody']['content']['application/json']; +export type DriveFoldersUpdateResponse = operations['drive/folders/update']['responses']['200']['content']['application/json']; +export type DriveStreamRequest = operations['drive/stream']['requestBody']['content']['application/json']; +export type DriveStreamResponse = operations['drive/stream']['responses']['200']['content']['application/json']; +export type EmailAddressAvailableRequest = operations['email-address/available']['requestBody']['content']['application/json']; +export type EmailAddressAvailableResponse = operations['email-address/available']['responses']['200']['content']['application/json']; +export type EndpointRequest = operations['endpoint']['requestBody']['content']['application/json']; +export type EndpointsResponse = operations['endpoints']['responses']['200']['content']['application/json']; +export type FederationFollowersRequest = operations['federation/followers']['requestBody']['content']['application/json']; +export type FederationFollowersResponse = operations['federation/followers']['responses']['200']['content']['application/json']; +export type FederationFollowingRequest = operations['federation/following']['requestBody']['content']['application/json']; +export type FederationFollowingResponse = operations['federation/following']['responses']['200']['content']['application/json']; +export type FederationInstancesRequest = operations['federation/instances']['requestBody']['content']['application/json']; +export type FederationInstancesResponse = operations['federation/instances']['responses']['200']['content']['application/json']; +export type FederationShowInstanceRequest = operations['federation/show-instance']['requestBody']['content']['application/json']; +export type FederationShowInstanceResponse = operations['federation/show-instance']['responses']['200']['content']['application/json']; +export type FederationUpdateRemoteUserRequest = operations['federation/update-remote-user']['requestBody']['content']['application/json']; +export type FederationUsersRequest = operations['federation/users']['requestBody']['content']['application/json']; +export type FederationUsersResponse = operations['federation/users']['responses']['200']['content']['application/json']; +export type FederationStatsRequest = operations['federation/stats']['requestBody']['content']['application/json']; +export type FollowingCreateRequest = operations['following/create']['requestBody']['content']['application/json']; +export type FollowingCreateResponse = operations['following/create']['responses']['200']['content']['application/json']; +export type FollowingDeleteRequest = operations['following/delete']['requestBody']['content']['application/json']; +export type FollowingDeleteResponse = operations['following/delete']['responses']['200']['content']['application/json']; +export type FollowingUpdateRequest = operations['following/update']['requestBody']['content']['application/json']; +export type FollowingUpdateResponse = operations['following/update']['responses']['200']['content']['application/json']; +export type FollowingUpdateAllRequest = operations['following/update-all']['requestBody']['content']['application/json']; +export type FollowingInvalidateRequest = operations['following/invalidate']['requestBody']['content']['application/json']; +export type FollowingInvalidateResponse = operations['following/invalidate']['responses']['200']['content']['application/json']; +export type FollowingRequestsAcceptRequest = operations['following/requests/accept']['requestBody']['content']['application/json']; +export type FollowingRequestsCancelRequest = operations['following/requests/cancel']['requestBody']['content']['application/json']; +export type FollowingRequestsCancelResponse = operations['following/requests/cancel']['responses']['200']['content']['application/json']; +export type FollowingRequestsListRequest = operations['following/requests/list']['requestBody']['content']['application/json']; +export type FollowingRequestsListResponse = operations['following/requests/list']['responses']['200']['content']['application/json']; +export type FollowingRequestsRejectRequest = operations['following/requests/reject']['requestBody']['content']['application/json']; +export type GalleryFeaturedRequest = operations['gallery/featured']['requestBody']['content']['application/json']; +export type GalleryFeaturedResponse = operations['gallery/featured']['responses']['200']['content']['application/json']; +export type GalleryPopularResponse = operations['gallery/popular']['responses']['200']['content']['application/json']; +export type GalleryPostsRequest = operations['gallery/posts']['requestBody']['content']['application/json']; +export type GalleryPostsResponse = operations['gallery/posts']['responses']['200']['content']['application/json']; +export type GalleryPostsCreateRequest = operations['gallery/posts/create']['requestBody']['content']['application/json']; +export type GalleryPostsCreateResponse = operations['gallery/posts/create']['responses']['200']['content']['application/json']; +export type GalleryPostsDeleteRequest = operations['gallery/posts/delete']['requestBody']['content']['application/json']; +export type GalleryPostsLikeRequest = operations['gallery/posts/like']['requestBody']['content']['application/json']; +export type GalleryPostsShowRequest = operations['gallery/posts/show']['requestBody']['content']['application/json']; +export type GalleryPostsShowResponse = operations['gallery/posts/show']['responses']['200']['content']['application/json']; +export type GalleryPostsUnlikeRequest = operations['gallery/posts/unlike']['requestBody']['content']['application/json']; +export type GalleryPostsUpdateRequest = operations['gallery/posts/update']['requestBody']['content']['application/json']; +export type GalleryPostsUpdateResponse = operations['gallery/posts/update']['responses']['200']['content']['application/json']; +export type GetAvatarDecorationsResponse = operations['get-avatar-decorations']['responses']['200']['content']['application/json']; +export type HashtagsListRequest = operations['hashtags/list']['requestBody']['content']['application/json']; +export type HashtagsListResponse = operations['hashtags/list']['responses']['200']['content']['application/json']; +export type HashtagsSearchRequest = operations['hashtags/search']['requestBody']['content']['application/json']; +export type HashtagsSearchResponse = operations['hashtags/search']['responses']['200']['content']['application/json']; +export type HashtagsShowRequest = operations['hashtags/show']['requestBody']['content']['application/json']; +export type HashtagsShowResponse = operations['hashtags/show']['responses']['200']['content']['application/json']; +export type HashtagsTrendResponse = operations['hashtags/trend']['responses']['200']['content']['application/json']; +export type HashtagsUsersRequest = operations['hashtags/users']['requestBody']['content']['application/json']; +export type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json']; +export type IResponse = operations['i']['responses']['200']['content']['application/json']; +export type IClaimAchievementRequest = operations['i/claim-achievement']['requestBody']['content']['application/json']; +export type IFavoritesRequest = operations['i/favorites']['requestBody']['content']['application/json']; +export type IFavoritesResponse = operations['i/favorites']['responses']['200']['content']['application/json']; +export type IGalleryLikesRequest = operations['i/gallery/likes']['requestBody']['content']['application/json']; +export type IGalleryLikesResponse = operations['i/gallery/likes']['responses']['200']['content']['application/json']; +export type IGalleryPostsRequest = operations['i/gallery/posts']['requestBody']['content']['application/json']; +export type IGalleryPostsResponse = operations['i/gallery/posts']['responses']['200']['content']['application/json']; +export type INotificationsRequest = operations['i/notifications']['requestBody']['content']['application/json']; +export type INotificationsResponse = operations['i/notifications']['responses']['200']['content']['application/json']; +export type INotificationsGroupedRequest = operations['i/notifications-grouped']['requestBody']['content']['application/json']; +export type INotificationsGroupedResponse = operations['i/notifications-grouped']['responses']['200']['content']['application/json']; +export type IPageLikesRequest = operations['i/page-likes']['requestBody']['content']['application/json']; +export type IPageLikesResponse = operations['i/page-likes']['responses']['200']['content']['application/json']; +export type IPagesRequest = operations['i/pages']['requestBody']['content']['application/json']; +export type IPagesResponse = operations['i/pages']['responses']['200']['content']['application/json']; +export type IPinRequest = operations['i/pin']['requestBody']['content']['application/json']; +export type IPinResponse = operations['i/pin']['responses']['200']['content']['application/json']; +export type IReadAnnouncementRequest = operations['i/read-announcement']['requestBody']['content']['application/json']; +export type IRegistryGetAllRequest = operations['i/registry/get-all']['requestBody']['content']['application/json']; +export type IRegistryGetDetailRequest = operations['i/registry/get-detail']['requestBody']['content']['application/json']; +export type IRegistryGetRequest = operations['i/registry/get']['requestBody']['content']['application/json']; +export type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type']['requestBody']['content']['application/json']; +export type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json']; +export type IRegistryRemoveRequest = operations['i/registry/remove']['requestBody']['content']['application/json']; +export type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content']['application/json']; +export type IUnpinRequest = operations['i/unpin']['requestBody']['content']['application/json']; +export type IUnpinResponse = operations['i/unpin']['responses']['200']['content']['application/json']; +export type IUpdateRequest = operations['i/update']['requestBody']['content']['application/json']; +export type IUpdateResponse = operations['i/update']['responses']['200']['content']['application/json']; +export type IWebhooksCreateRequest = operations['i/webhooks/create']['requestBody']['content']['application/json']; +export type IWebhooksShowRequest = operations['i/webhooks/show']['requestBody']['content']['application/json']; +export type IWebhooksUpdateRequest = operations['i/webhooks/update']['requestBody']['content']['application/json']; +export type IWebhooksDeleteRequest = operations['i/webhooks/delete']['requestBody']['content']['application/json']; +export type InviteCreateResponse = operations['invite/create']['responses']['200']['content']['application/json']; +export type InviteDeleteRequest = operations['invite/delete']['requestBody']['content']['application/json']; +export type InviteListRequest = operations['invite/list']['requestBody']['content']['application/json']; +export type InviteListResponse = operations['invite/list']['responses']['200']['content']['application/json']; +export type InviteLimitResponse = operations['invite/limit']['responses']['200']['content']['application/json']; +export type MetaRequest = operations['meta']['requestBody']['content']['application/json']; +export type MetaResponse = operations['meta']['responses']['200']['content']['application/json']; +export type EmojisResponse = operations['emojis']['responses']['200']['content']['application/json']; +export type EmojiRequest = operations['emoji']['requestBody']['content']['application/json']; +export type EmojiResponse = operations['emoji']['responses']['200']['content']['application/json']; +export type MuteCreateRequest = operations['mute/create']['requestBody']['content']['application/json']; +export type MuteDeleteRequest = operations['mute/delete']['requestBody']['content']['application/json']; +export type MuteListRequest = operations['mute/list']['requestBody']['content']['application/json']; +export type MuteListResponse = operations['mute/list']['responses']['200']['content']['application/json']; +export type RenoteMuteCreateRequest = operations['renote-mute/create']['requestBody']['content']['application/json']; +export type RenoteMuteDeleteRequest = operations['renote-mute/delete']['requestBody']['content']['application/json']; +export type RenoteMuteListRequest = operations['renote-mute/list']['requestBody']['content']['application/json']; +export type RenoteMuteListResponse = operations['renote-mute/list']['responses']['200']['content']['application/json']; +export type MyAppsRequest = operations['my/apps']['requestBody']['content']['application/json']; +export type MyAppsResponse = operations['my/apps']['responses']['200']['content']['application/json']; +export type NotesRequest = operations['notes']['requestBody']['content']['application/json']; +export type NotesResponse = operations['notes']['responses']['200']['content']['application/json']; +export type NotesChildrenRequest = operations['notes/children']['requestBody']['content']['application/json']; +export type NotesChildrenResponse = operations['notes/children']['responses']['200']['content']['application/json']; +export type NotesClipsRequest = operations['notes/clips']['requestBody']['content']['application/json']; +export type NotesClipsResponse = operations['notes/clips']['responses']['200']['content']['application/json']; +export type NotesConversationRequest = operations['notes/conversation']['requestBody']['content']['application/json']; +export type NotesConversationResponse = operations['notes/conversation']['responses']['200']['content']['application/json']; +export type NotesCreateRequest = operations['notes/create']['requestBody']['content']['application/json']; +export type NotesCreateResponse = operations['notes/create']['responses']['200']['content']['application/json']; +export type NotesDeleteRequest = operations['notes/delete']['requestBody']['content']['application/json']; +export type NotesFavoritesCreateRequest = operations['notes/favorites/create']['requestBody']['content']['application/json']; +export type NotesFavoritesDeleteRequest = operations['notes/favorites/delete']['requestBody']['content']['application/json']; +export type NotesFeaturedRequest = operations['notes/featured']['requestBody']['content']['application/json']; +export type NotesFeaturedResponse = operations['notes/featured']['responses']['200']['content']['application/json']; +export type NotesGlobalTimelineRequest = operations['notes/global-timeline']['requestBody']['content']['application/json']; +export type NotesGlobalTimelineResponse = operations['notes/global-timeline']['responses']['200']['content']['application/json']; +export type NotesHybridTimelineRequest = operations['notes/hybrid-timeline']['requestBody']['content']['application/json']; +export type NotesHybridTimelineResponse = operations['notes/hybrid-timeline']['responses']['200']['content']['application/json']; +export type NotesLocalTimelineRequest = operations['notes/local-timeline']['requestBody']['content']['application/json']; +export type NotesLocalTimelineResponse = operations['notes/local-timeline']['responses']['200']['content']['application/json']; +export type NotesMentionsRequest = operations['notes/mentions']['requestBody']['content']['application/json']; +export type NotesMentionsResponse = operations['notes/mentions']['responses']['200']['content']['application/json']; +export type NotesPollsRecommendationRequest = operations['notes/polls/recommendation']['requestBody']['content']['application/json']; +export type NotesPollsRecommendationResponse = operations['notes/polls/recommendation']['responses']['200']['content']['application/json']; +export type NotesPollsVoteRequest = operations['notes/polls/vote']['requestBody']['content']['application/json']; +export type NotesReactionsRequest = operations['notes/reactions']['requestBody']['content']['application/json']; +export type NotesReactionsResponse = operations['notes/reactions']['responses']['200']['content']['application/json']; +export type NotesReactionsCreateRequest = operations['notes/reactions/create']['requestBody']['content']['application/json']; +export type NotesReactionsDeleteRequest = operations['notes/reactions/delete']['requestBody']['content']['application/json']; +export type NotesRenotesRequest = operations['notes/renotes']['requestBody']['content']['application/json']; +export type NotesRenotesResponse = operations['notes/renotes']['responses']['200']['content']['application/json']; +export type NotesRepliesRequest = operations['notes/replies']['requestBody']['content']['application/json']; +export type NotesRepliesResponse = operations['notes/replies']['responses']['200']['content']['application/json']; +export type NotesSearchByTagRequest = operations['notes/search-by-tag']['requestBody']['content']['application/json']; +export type NotesSearchByTagResponse = operations['notes/search-by-tag']['responses']['200']['content']['application/json']; +export type NotesSearchRequest = operations['notes/search']['requestBody']['content']['application/json']; +export type NotesSearchResponse = operations['notes/search']['responses']['200']['content']['application/json']; +export type NotesShowRequest = operations['notes/show']['requestBody']['content']['application/json']; +export type NotesShowResponse = operations['notes/show']['responses']['200']['content']['application/json']; +export type NotesStateRequest = operations['notes/state']['requestBody']['content']['application/json']; +export type NotesStateResponse = operations['notes/state']['responses']['200']['content']['application/json']; +export type NotesThreadMutingCreateRequest = operations['notes/thread-muting/create']['requestBody']['content']['application/json']; +export type NotesThreadMutingDeleteRequest = operations['notes/thread-muting/delete']['requestBody']['content']['application/json']; +export type NotesTimelineRequest = operations['notes/timeline']['requestBody']['content']['application/json']; +export type NotesTimelineResponse = operations['notes/timeline']['responses']['200']['content']['application/json']; +export type NotesTranslateRequest = operations['notes/translate']['requestBody']['content']['application/json']; +export type NotesTranslateResponse = operations['notes/translate']['responses']['200']['content']['application/json']; +export type NotesUnrenoteRequest = operations['notes/unrenote']['requestBody']['content']['application/json']; +export type NotesUserListTimelineRequest = operations['notes/user-list-timeline']['requestBody']['content']['application/json']; +export type NotesUserListTimelineResponse = operations['notes/user-list-timeline']['responses']['200']['content']['application/json']; +export type NotificationsCreateRequest = operations['notifications/create']['requestBody']['content']['application/json']; +export type PagesCreateRequest = operations['pages/create']['requestBody']['content']['application/json']; +export type PagesCreateResponse = operations['pages/create']['responses']['200']['content']['application/json']; +export type PagesDeleteRequest = operations['pages/delete']['requestBody']['content']['application/json']; +export type PagesFeaturedResponse = operations['pages/featured']['responses']['200']['content']['application/json']; +export type PagesLikeRequest = operations['pages/like']['requestBody']['content']['application/json']; +export type PagesShowRequest = operations['pages/show']['requestBody']['content']['application/json']; +export type PagesShowResponse = operations['pages/show']['responses']['200']['content']['application/json']; +export type PagesUnlikeRequest = operations['pages/unlike']['requestBody']['content']['application/json']; +export type PagesUpdateRequest = operations['pages/update']['requestBody']['content']['application/json']; +export type FlashCreateRequest = operations['flash/create']['requestBody']['content']['application/json']; +export type FlashDeleteRequest = operations['flash/delete']['requestBody']['content']['application/json']; +export type FlashFeaturedResponse = operations['flash/featured']['responses']['200']['content']['application/json']; +export type FlashLikeRequest = operations['flash/like']['requestBody']['content']['application/json']; +export type FlashShowRequest = operations['flash/show']['requestBody']['content']['application/json']; +export type FlashShowResponse = operations['flash/show']['responses']['200']['content']['application/json']; +export type FlashUnlikeRequest = operations['flash/unlike']['requestBody']['content']['application/json']; +export type FlashUpdateRequest = operations['flash/update']['requestBody']['content']['application/json']; +export type FlashMyRequest = operations['flash/my']['requestBody']['content']['application/json']; +export type FlashMyResponse = operations['flash/my']['responses']['200']['content']['application/json']; +export type FlashMyLikesRequest = operations['flash/my-likes']['requestBody']['content']['application/json']; +export type FlashMyLikesResponse = operations['flash/my-likes']['responses']['200']['content']['application/json']; +export type PingResponse = operations['ping']['responses']['200']['content']['application/json']; +export type PinnedUsersResponse = operations['pinned-users']['responses']['200']['content']['application/json']; +export type PromoReadRequest = operations['promo/read']['requestBody']['content']['application/json']; +export type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json']; +export type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json']; +export type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json']; +export type RolesNotesResponse = operations['roles/notes']['responses']['200']['content']['application/json']; +export type RequestResetPasswordRequest = operations['request-reset-password']['requestBody']['content']['application/json']; +export type ResetPasswordRequest = operations['reset-password']['requestBody']['content']['application/json']; +export type StatsResponse = operations['stats']['responses']['200']['content']['application/json']; +export type SwShowRegistrationRequest = operations['sw/show-registration']['requestBody']['content']['application/json']; +export type SwShowRegistrationResponse = operations['sw/show-registration']['responses']['200']['content']['application/json']; +export type SwUpdateRegistrationRequest = operations['sw/update-registration']['requestBody']['content']['application/json']; +export type SwUpdateRegistrationResponse = operations['sw/update-registration']['responses']['200']['content']['application/json']; +export type SwRegisterRequest = operations['sw/register']['requestBody']['content']['application/json']; +export type SwRegisterResponse = operations['sw/register']['responses']['200']['content']['application/json']; +export type SwUnregisterRequest = operations['sw/unregister']['requestBody']['content']['application/json']; +export type TestRequest = operations['test']['requestBody']['content']['application/json']; +export type UsernameAvailableRequest = operations['username/available']['requestBody']['content']['application/json']; +export type UsernameAvailableResponse = operations['username/available']['responses']['200']['content']['application/json']; +export type UsersRequest = operations['users']['requestBody']['content']['application/json']; +export type UsersResponse = operations['users']['responses']['200']['content']['application/json']; +export type UsersClipsRequest = operations['users/clips']['requestBody']['content']['application/json']; +export type UsersClipsResponse = operations['users/clips']['responses']['200']['content']['application/json']; +export type UsersFollowersRequest = operations['users/followers']['requestBody']['content']['application/json']; +export type UsersFollowersResponse = operations['users/followers']['responses']['200']['content']['application/json']; +export type UsersFollowingRequest = operations['users/following']['requestBody']['content']['application/json']; +export type UsersFollowingResponse = operations['users/following']['responses']['200']['content']['application/json']; +export type UsersGalleryPostsRequest = operations['users/gallery/posts']['requestBody']['content']['application/json']; +export type UsersGalleryPostsResponse = operations['users/gallery/posts']['responses']['200']['content']['application/json']; +export type UsersGetFrequentlyRepliedUsersRequest = operations['users/get-frequently-replied-users']['requestBody']['content']['application/json']; +export type UsersGetFrequentlyRepliedUsersResponse = operations['users/get-frequently-replied-users']['responses']['200']['content']['application/json']; +export type UsersFeaturedNotesRequest = operations['users/featured-notes']['requestBody']['content']['application/json']; +export type UsersFeaturedNotesResponse = operations['users/featured-notes']['responses']['200']['content']['application/json']; +export type UsersListsCreateRequest = operations['users/lists/create']['requestBody']['content']['application/json']; +export type UsersListsCreateResponse = operations['users/lists/create']['responses']['200']['content']['application/json']; +export type UsersListsDeleteRequest = operations['users/lists/delete']['requestBody']['content']['application/json']; +export type UsersListsListRequest = operations['users/lists/list']['requestBody']['content']['application/json']; +export type UsersListsListResponse = operations['users/lists/list']['responses']['200']['content']['application/json']; +export type UsersListsPullRequest = operations['users/lists/pull']['requestBody']['content']['application/json']; +export type UsersListsPushRequest = operations['users/lists/push']['requestBody']['content']['application/json']; +export type UsersListsShowRequest = operations['users/lists/show']['requestBody']['content']['application/json']; +export type UsersListsShowResponse = operations['users/lists/show']['responses']['200']['content']['application/json']; +export type UsersListsFavoriteRequest = operations['users/lists/favorite']['requestBody']['content']['application/json']; +export type UsersListsUnfavoriteRequest = operations['users/lists/unfavorite']['requestBody']['content']['application/json']; +export type UsersListsUpdateRequest = operations['users/lists/update']['requestBody']['content']['application/json']; +export type UsersListsUpdateResponse = operations['users/lists/update']['responses']['200']['content']['application/json']; +export type UsersListsCreateFromPublicRequest = operations['users/lists/create-from-public']['requestBody']['content']['application/json']; +export type UsersListsCreateFromPublicResponse = operations['users/lists/create-from-public']['responses']['200']['content']['application/json']; +export type UsersListsUpdateMembershipRequest = operations['users/lists/update-membership']['requestBody']['content']['application/json']; +export type UsersListsGetMembershipsRequest = operations['users/lists/get-memberships']['requestBody']['content']['application/json']; +export type UsersNotesRequest = operations['users/notes']['requestBody']['content']['application/json']; +export type UsersNotesResponse = operations['users/notes']['responses']['200']['content']['application/json']; +export type UsersPagesRequest = operations['users/pages']['requestBody']['content']['application/json']; +export type UsersPagesResponse = operations['users/pages']['responses']['200']['content']['application/json']; +export type UsersFlashsRequest = operations['users/flashs']['requestBody']['content']['application/json']; +export type UsersFlashsResponse = operations['users/flashs']['responses']['200']['content']['application/json']; +export type UsersReactionsRequest = operations['users/reactions']['requestBody']['content']['application/json']; +export type UsersReactionsResponse = operations['users/reactions']['responses']['200']['content']['application/json']; +export type UsersRecommendationRequest = operations['users/recommendation']['requestBody']['content']['application/json']; +export type UsersRecommendationResponse = operations['users/recommendation']['responses']['200']['content']['application/json']; +export type UsersRelationRequest = operations['users/relation']['requestBody']['content']['application/json']; +export type UsersRelationResponse = operations['users/relation']['responses']['200']['content']['application/json']; +export type UsersReportAbuseRequest = operations['users/report-abuse']['requestBody']['content']['application/json']; +export type UsersSearchByUsernameAndHostRequest = operations['users/search-by-username-and-host']['requestBody']['content']['application/json']; +export type UsersSearchByUsernameAndHostResponse = operations['users/search-by-username-and-host']['responses']['200']['content']['application/json']; +export type UsersSearchRequest = operations['users/search']['requestBody']['content']['application/json']; +export type UsersSearchResponse = operations['users/search']['responses']['200']['content']['application/json']; +export type UsersShowRequest = operations['users/show']['requestBody']['content']['application/json']; +export type UsersShowResponse = operations['users/show']['responses']['200']['content']['application/json']; +export type UsersAchievementsRequest = operations['users/achievements']['requestBody']['content']['application/json']; +export type UsersUpdateMemoRequest = operations['users/update-memo']['requestBody']['content']['application/json']; +export type FetchRssRequest = operations['fetch-rss']['requestBody']['content']['application/json']; +export type FetchExternalResourcesRequest = operations['fetch-external-resources']['requestBody']['content']['application/json']; +export type RetentionResponse = operations['retention']['responses']['200']['content']['application/json']; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts new file mode 100644 index 0000000000..bc7ab1f3b9 --- /dev/null +++ b/packages/misskey-js/src/autogen/models.ts @@ -0,0 +1,39 @@ +/* + * version: 2023.11.1 + * generatedAt: 2023-11-27T02:24:45.109Z + */ + +import { components } from './types.js'; +export type Error = components['schemas']['Error']; +export type UserLite = components['schemas']['UserLite']; +export type UserDetailedNotMeOnly = components['schemas']['UserDetailedNotMeOnly']; +export type MeDetailedOnly = components['schemas']['MeDetailedOnly']; +export type UserDetailedNotMe = components['schemas']['UserDetailedNotMe']; +export type MeDetailed = components['schemas']['MeDetailed']; +export type UserDetailed = components['schemas']['UserDetailed']; +export type User = components['schemas']['User']; +export type UserList = components['schemas']['UserList']; +export type Announcement = components['schemas']['Announcement']; +export type App = components['schemas']['App']; +export type Note = components['schemas']['Note']; +export type NoteReaction = components['schemas']['NoteReaction']; +export type NoteFavorite = components['schemas']['NoteFavorite']; +export type Notification = components['schemas']['Notification']; +export type DriveFile = components['schemas']['DriveFile']; +export type DriveFolder = components['schemas']['DriveFolder']; +export type Following = components['schemas']['Following']; +export type Muting = components['schemas']['Muting']; +export type RenoteMuting = components['schemas']['RenoteMuting']; +export type Blocking = components['schemas']['Blocking']; +export type Hashtag = components['schemas']['Hashtag']; +export type InviteCode = components['schemas']['InviteCode']; +export type Page = components['schemas']['Page']; +export type Channel = components['schemas']['Channel']; +export type QueueCount = components['schemas']['QueueCount']; +export type Antenna = components['schemas']['Antenna']; +export type Clip = components['schemas']['Clip']; +export type FederationInstance = components['schemas']['FederationInstance']; +export type GalleryPost = components['schemas']['GalleryPost']; +export type EmojiSimple = components['schemas']['EmojiSimple']; +export type EmojiDetailed = components['schemas']['EmojiDetailed']; +export type Flash = components['schemas']['Flash']; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts new file mode 100644 index 0000000000..c7f5c6c82d --- /dev/null +++ b/packages/misskey-js/src/autogen/types.ts @@ -0,0 +1,22560 @@ +/* eslint @typescript-eslint/naming-convention: 0 */ +/* eslint @typescript-eslint/no-explicit-any: 0 */ + +/* + * version: 2023.11.1 + * generatedAt: 2023-11-27T02:24:44.994Z + */ + +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +/** OneOf type helpers */ +type Without = { [P in Exclude]?: never }; +type XOR = (T | U) extends object ? (Without & U) | (Without & T) : T | U; +type OneOf = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR, ...Rest]> : never; + +export type paths = { + '/admin/meta': { + /** + * admin/meta + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/meta']; + }; + '/admin/abuse-user-reports': { + /** + * admin/abuse-user-reports + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/abuse-user-reports']; + }; + '/admin/accounts/create': { + /** + * admin/accounts/create + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['admin/accounts/create']; + }; + '/admin/accounts/delete': { + /** + * admin/accounts/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/accounts/delete']; + }; + '/admin/accounts/find-by-email': { + /** + * admin/accounts/find-by-email + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/accounts/find-by-email']; + }; + '/admin/ad/create': { + /** + * admin/ad/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/ad/create']; + }; + '/admin/ad/delete': { + /** + * admin/ad/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/ad/delete']; + }; + '/admin/ad/list': { + /** + * admin/ad/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/ad/list']; + }; + '/admin/ad/update': { + /** + * admin/ad/update + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/ad/update']; + }; + '/admin/announcements/create': { + /** + * admin/announcements/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/announcements/create']; + }; + '/admin/announcements/delete': { + /** + * admin/announcements/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/announcements/delete']; + }; + '/admin/announcements/list': { + /** + * admin/announcements/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/announcements/list']; + }; + '/admin/announcements/update': { + /** + * admin/announcements/update + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/announcements/update']; + }; + '/admin/avatar-decorations/create': { + /** + * admin/avatar-decorations/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/avatar-decorations/create']; + }; + '/admin/avatar-decorations/delete': { + /** + * admin/avatar-decorations/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/avatar-decorations/delete']; + }; + '/admin/avatar-decorations/list': { + /** + * admin/avatar-decorations/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/avatar-decorations/list']; + }; + '/admin/avatar-decorations/update': { + /** + * admin/avatar-decorations/update + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/avatar-decorations/update']; + }; + '/admin/delete-all-files-of-a-user': { + /** + * admin/delete-all-files-of-a-user + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/delete-all-files-of-a-user']; + }; + '/admin/unset-user-avatar': { + /** + * admin/unset-user-avatar + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/unset-user-avatar']; + }; + '/admin/unset-user-banner': { + /** + * admin/unset-user-banner + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/unset-user-banner']; + }; + '/admin/drive/clean-remote-files': { + /** + * admin/drive/clean-remote-files + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/drive/clean-remote-files']; + }; + '/admin/drive/cleanup': { + /** + * admin/drive/cleanup + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/drive/cleanup']; + }; + '/admin/drive/files': { + /** + * admin/drive/files + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/drive/files']; + }; + '/admin/drive/show-file': { + /** + * admin/drive/show-file + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/drive/show-file']; + }; + '/admin/emoji/add-aliases-bulk': { + /** + * admin/emoji/add-aliases-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/add-aliases-bulk']; + }; + '/admin/emoji/add': { + /** + * admin/emoji/add + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/add']; + }; + '/admin/emoji/copy': { + /** + * admin/emoji/copy + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/copy']; + }; + '/admin/emoji/delete-bulk': { + /** + * admin/emoji/delete-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/delete-bulk']; + }; + '/admin/emoji/delete': { + /** + * admin/emoji/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/delete']; + }; + '/admin/emoji/list-remote': { + /** + * admin/emoji/list-remote + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/list-remote']; + }; + '/admin/emoji/list': { + /** + * admin/emoji/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/list']; + }; + '/admin/emoji/remove-aliases-bulk': { + /** + * admin/emoji/remove-aliases-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/remove-aliases-bulk']; + }; + '/admin/emoji/set-aliases-bulk': { + /** + * admin/emoji/set-aliases-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/set-aliases-bulk']; + }; + '/admin/emoji/set-category-bulk': { + /** + * admin/emoji/set-category-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/set-category-bulk']; + }; + '/admin/emoji/set-license-bulk': { + /** + * admin/emoji/set-license-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/set-license-bulk']; + }; + '/admin/emoji/update': { + /** + * admin/emoji/update + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/update']; + }; + '/admin/federation/delete-all-files': { + /** + * admin/federation/delete-all-files + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/federation/delete-all-files']; + }; + '/admin/federation/refresh-remote-instance-metadata': { + /** + * admin/federation/refresh-remote-instance-metadata + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/federation/refresh-remote-instance-metadata']; + }; + '/admin/federation/remove-all-following': { + /** + * admin/federation/remove-all-following + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/federation/remove-all-following']; + }; + '/admin/federation/update-instance': { + /** + * admin/federation/update-instance + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/federation/update-instance']; + }; + '/admin/get-index-stats': { + /** + * admin/get-index-stats + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/get-index-stats']; + }; + '/admin/get-table-stats': { + /** + * admin/get-table-stats + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/get-table-stats']; + }; + '/admin/get-user-ips': { + /** + * admin/get-user-ips + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/get-user-ips']; + }; + '/admin/invite/create': { + /** + * admin/invite/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/invite/create']; + }; + '/admin/invite/list': { + /** + * admin/invite/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/invite/list']; + }; + '/admin/promo/create': { + /** + * admin/promo/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/promo/create']; + }; + '/admin/queue/clear': { + /** + * admin/queue/clear + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/queue/clear']; + }; + '/admin/queue/deliver-delayed': { + /** + * admin/queue/deliver-delayed + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/queue/deliver-delayed']; + }; + '/admin/queue/inbox-delayed': { + /** + * admin/queue/inbox-delayed + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/queue/inbox-delayed']; + }; + '/admin/queue/promote': { + /** + * admin/queue/promote + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/queue/promote']; + }; + '/admin/queue/stats': { + /** + * admin/queue/stats + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/queue/stats']; + }; + '/admin/relays/add': { + /** + * admin/relays/add + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/relays/add']; + }; + '/admin/relays/list': { + /** + * admin/relays/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/relays/list']; + }; + '/admin/relays/remove': { + /** + * admin/relays/remove + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/relays/remove']; + }; + '/admin/reset-password': { + /** + * admin/reset-password + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/reset-password']; + }; + '/admin/resolve-abuse-user-report': { + /** + * admin/resolve-abuse-user-report + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/resolve-abuse-user-report']; + }; + '/admin/send-email': { + /** + * admin/send-email + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/send-email']; + }; + '/admin/server-info': { + /** + * admin/server-info + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/server-info']; + }; + '/admin/show-moderation-logs': { + /** + * admin/show-moderation-logs + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/show-moderation-logs']; + }; + '/admin/show-user': { + /** + * admin/show-user + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/show-user']; + }; + '/admin/show-users': { + /** + * admin/show-users + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/show-users']; + }; + '/admin/suspend-user': { + /** + * admin/suspend-user + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/suspend-user']; + }; + '/admin/unsuspend-user': { + /** + * admin/unsuspend-user + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/unsuspend-user']; + }; + '/admin/update-meta': { + /** + * admin/update-meta + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/update-meta']; + }; + '/admin/delete-account': { + /** + * admin/delete-account + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/delete-account']; + }; + '/admin/update-user-note': { + /** + * admin/update-user-note + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/update-user-note']; + }; + '/admin/roles/create': { + /** + * admin/roles/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/roles/create']; + }; + '/admin/roles/delete': { + /** + * admin/roles/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/roles/delete']; + }; + '/admin/roles/list': { + /** + * admin/roles/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/roles/list']; + }; + '/admin/roles/show': { + /** + * admin/roles/show + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/roles/show']; + }; + '/admin/roles/update': { + /** + * admin/roles/update + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/roles/update']; + }; + '/admin/roles/assign': { + /** + * admin/roles/assign + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/roles/assign']; + }; + '/admin/roles/unassign': { + /** + * admin/roles/unassign + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/roles/unassign']; + }; + '/admin/roles/update-default-policies': { + /** + * admin/roles/update-default-policies + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['admin/roles/update-default-policies']; + }; + '/admin/roles/users': { + /** + * admin/roles/users + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['admin/roles/users']; + }; + '/announcements': { + /** + * announcements + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['announcements']; + }; + '/antennas/create': { + /** + * antennas/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['antennas/create']; + }; + '/antennas/delete': { + /** + * antennas/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['antennas/delete']; + }; + '/antennas/list': { + /** + * antennas/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + post: operations['antennas/list']; + }; + '/antennas/notes': { + /** + * antennas/notes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + post: operations['antennas/notes']; + }; + '/antennas/show': { + /** + * antennas/show + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + post: operations['antennas/show']; + }; + '/antennas/update': { + /** + * antennas/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['antennas/update']; + }; + '/ap/get': { + /** + * ap/get + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['ap/get']; + }; + '/ap/show': { + /** + * ap/show + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['ap/show']; + }; + '/app/create': { + /** + * app/create + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['app/create']; + }; + '/app/show': { + /** + * app/show + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['app/show']; + }; + '/auth/session/generate': { + /** + * auth/session/generate + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['auth/session/generate']; + }; + '/auth/session/show': { + /** + * auth/session/show + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['auth/session/show']; + }; + '/auth/session/userkey': { + /** + * auth/session/userkey + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['auth/session/userkey']; + }; + '/blocking/create': { + /** + * blocking/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:blocks* + */ + post: operations['blocking/create']; + }; + '/blocking/delete': { + /** + * blocking/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:blocks* + */ + post: operations['blocking/delete']; + }; + '/blocking/list': { + /** + * blocking/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:blocks* + */ + post: operations['blocking/list']; + }; + '/channels/create': { + /** + * channels/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + post: operations['channels/create']; + }; + '/channels/featured': { + /** + * channels/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['channels/featured']; + }; + '/channels/follow': { + /** + * channels/follow + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + post: operations['channels/follow']; + }; + '/channels/followed': { + /** + * channels/followed + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:channels* + */ + post: operations['channels/followed']; + }; + '/channels/owned': { + /** + * channels/owned + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:channels* + */ + post: operations['channels/owned']; + }; + '/channels/show': { + /** + * channels/show + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['channels/show']; + }; + '/channels/timeline': { + /** + * channels/timeline + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['channels/timeline']; + }; + '/channels/unfollow': { + /** + * channels/unfollow + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + post: operations['channels/unfollow']; + }; + '/channels/update': { + /** + * channels/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + post: operations['channels/update']; + }; + '/channels/favorite': { + /** + * channels/favorite + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + post: operations['channels/favorite']; + }; + '/channels/unfavorite': { + /** + * channels/unfavorite + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + post: operations['channels/unfavorite']; + }; + '/channels/my-favorites': { + /** + * channels/my-favorites + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:channels* + */ + post: operations['channels/my-favorites']; + }; + '/channels/search': { + /** + * channels/search + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['channels/search']; + }; + '/charts/active-users': { + /** + * charts/active-users + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/active-users']; + /** + * charts/active-users + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/active-users']; + }; + '/charts/ap-request': { + /** + * charts/ap-request + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/ap-request']; + /** + * charts/ap-request + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/ap-request']; + }; + '/charts/drive': { + /** + * charts/drive + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/drive']; + /** + * charts/drive + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/drive']; + }; + '/charts/federation': { + /** + * charts/federation + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/federation']; + /** + * charts/federation + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/federation']; + }; + '/charts/instance': { + /** + * charts/instance + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/instance']; + /** + * charts/instance + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/instance']; + }; + '/charts/notes': { + /** + * charts/notes + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/notes']; + /** + * charts/notes + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/notes']; + }; + '/charts/user/drive': { + /** + * charts/user/drive + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/user/drive']; + /** + * charts/user/drive + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/user/drive']; + }; + '/charts/user/following': { + /** + * charts/user/following + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/user/following']; + /** + * charts/user/following + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/user/following']; + }; + '/charts/user/notes': { + /** + * charts/user/notes + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/user/notes']; + /** + * charts/user/notes + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/user/notes']; + }; + '/charts/user/pv': { + /** + * charts/user/pv + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/user/pv']; + /** + * charts/user/pv + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/user/pv']; + }; + '/charts/user/reactions': { + /** + * charts/user/reactions + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/user/reactions']; + /** + * charts/user/reactions + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/user/reactions']; + }; + '/charts/users': { + /** + * charts/users + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['charts/users']; + /** + * charts/users + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['charts/users']; + }; + '/clips/add-note': { + /** + * clips/add-note + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['clips/add-note']; + }; + '/clips/remove-note': { + /** + * clips/remove-note + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['clips/remove-note']; + }; + '/clips/create': { + /** + * clips/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['clips/create']; + }; + '/clips/delete': { + /** + * clips/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['clips/delete']; + }; + '/clips/list': { + /** + * clips/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + post: operations['clips/list']; + }; + '/clips/notes': { + /** + * clips/notes + * @description No description provided. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + post: operations['clips/notes']; + }; + '/clips/show': { + /** + * clips/show + * @description No description provided. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + post: operations['clips/show']; + }; + '/clips/update': { + /** + * clips/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['clips/update']; + }; + '/clips/favorite': { + /** + * clips/favorite + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:clip-favorite* + */ + post: operations['clips/favorite']; + }; + '/clips/unfavorite': { + /** + * clips/unfavorite + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:clip-favorite* + */ + post: operations['clips/unfavorite']; + }; + '/clips/my-favorites': { + /** + * clips/my-favorites + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:clip-favorite* + */ + post: operations['clips/my-favorites']; + }; + '/drive': { + /** + * drive + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive']; + }; + '/drive/files': { + /** + * drive/files + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive/files']; + }; + '/drive/files/attached-notes': { + /** + * drive/files/attached-notes + * @description Find the notes to which the given file is attached. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive/files/attached-notes']; + }; + '/drive/files/check-existence': { + /** + * drive/files/check-existence + * @description Check if a given file exists. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive/files/check-existence']; + }; + '/drive/files/create': { + /** + * drive/files/create + * @description Upload a new drive file. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + post: operations['drive/files/create']; + }; + '/drive/files/delete': { + /** + * drive/files/delete + * @description Delete an existing drive file. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + post: operations['drive/files/delete']; + }; + '/drive/files/find-by-hash': { + /** + * drive/files/find-by-hash + * @description Search for a drive file by a hash of the contents. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive/files/find-by-hash']; + }; + '/drive/files/find': { + /** + * drive/files/find + * @description Search for a drive file by the given parameters. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive/files/find']; + }; + '/drive/files/show': { + /** + * drive/files/show + * @description Show the properties of a drive file. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive/files/show']; + }; + '/drive/files/update': { + /** + * drive/files/update + * @description Update the properties of a drive file. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + post: operations['drive/files/update']; + }; + '/drive/files/upload-from-url': { + /** + * drive/files/upload-from-url + * @description Request the server to download a new drive file from the specified URL. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + post: operations['drive/files/upload-from-url']; + }; + '/drive/folders': { + /** + * drive/folders + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive/folders']; + }; + '/drive/folders/create': { + /** + * drive/folders/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + post: operations['drive/folders/create']; + }; + '/drive/folders/delete': { + /** + * drive/folders/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + post: operations['drive/folders/delete']; + }; + '/drive/folders/find': { + /** + * drive/folders/find + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive/folders/find']; + }; + '/drive/folders/show': { + /** + * drive/folders/show + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive/folders/show']; + }; + '/drive/folders/update': { + /** + * drive/folders/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + post: operations['drive/folders/update']; + }; + '/drive/stream': { + /** + * drive/stream + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + post: operations['drive/stream']; + }; + '/email-address/available': { + /** + * email-address/available + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['email-address/available']; + }; + '/endpoint': { + /** + * endpoint + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['endpoint']; + }; + '/endpoints': { + /** + * endpoints + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['endpoints']; + }; + '/federation/followers': { + /** + * federation/followers + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['federation/followers']; + }; + '/federation/following': { + /** + * federation/following + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['federation/following']; + }; + '/federation/instances': { + /** + * federation/instances + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['federation/instances']; + /** + * federation/instances + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['federation/instances']; + }; + '/federation/show-instance': { + /** + * federation/show-instance + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['federation/show-instance']; + }; + '/federation/update-remote-user': { + /** + * federation/update-remote-user + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['federation/update-remote-user']; + }; + '/federation/users': { + /** + * federation/users + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['federation/users']; + }; + '/federation/stats': { + /** + * federation/stats + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['federation/stats']; + /** + * federation/stats + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['federation/stats']; + }; + '/following/create': { + /** + * following/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + post: operations['following/create']; + }; + '/following/delete': { + /** + * following/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + post: operations['following/delete']; + }; + '/following/update': { + /** + * following/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + post: operations['following/update']; + }; + '/following/update-all': { + /** + * following/update-all + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + post: operations['following/update-all']; + }; + '/following/invalidate': { + /** + * following/invalidate + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + post: operations['following/invalidate']; + }; + '/following/requests/accept': { + /** + * following/requests/accept + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + post: operations['following/requests/accept']; + }; + '/following/requests/cancel': { + /** + * following/requests/cancel + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + post: operations['following/requests/cancel']; + }; + '/following/requests/list': { + /** + * following/requests/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:following* + */ + post: operations['following/requests/list']; + }; + '/following/requests/reject': { + /** + * following/requests/reject + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + post: operations['following/requests/reject']; + }; + '/gallery/featured': { + /** + * gallery/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['gallery/featured']; + }; + '/gallery/popular': { + /** + * gallery/popular + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['gallery/popular']; + }; + '/gallery/posts': { + /** + * gallery/posts + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['gallery/posts']; + }; + '/gallery/posts/create': { + /** + * gallery/posts/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery* + */ + post: operations['gallery/posts/create']; + }; + '/gallery/posts/delete': { + /** + * gallery/posts/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery* + */ + post: operations['gallery/posts/delete']; + }; + '/gallery/posts/like': { + /** + * gallery/posts/like + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery-likes* + */ + post: operations['gallery/posts/like']; + }; + '/gallery/posts/show': { + /** + * gallery/posts/show + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['gallery/posts/show']; + }; + '/gallery/posts/unlike': { + /** + * gallery/posts/unlike + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery-likes* + */ + post: operations['gallery/posts/unlike']; + }; + '/gallery/posts/update': { + /** + * gallery/posts/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery* + */ + post: operations['gallery/posts/update']; + }; + '/get-online-users-count': { + /** + * get-online-users-count + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['get-online-users-count']; + /** + * get-online-users-count + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['get-online-users-count']; + }; + '/get-avatar-decorations': { + /** + * get-avatar-decorations + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['get-avatar-decorations']; + }; + '/hashtags/list': { + /** + * hashtags/list + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['hashtags/list']; + }; + '/hashtags/search': { + /** + * hashtags/search + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['hashtags/search']; + }; + '/hashtags/show': { + /** + * hashtags/show + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['hashtags/show']; + }; + '/hashtags/trend': { + /** + * hashtags/trend + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['hashtags/trend']; + /** + * hashtags/trend + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['hashtags/trend']; + }; + '/hashtags/users': { + /** + * hashtags/users + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['hashtags/users']; + }; + '/i': { + /** + * i + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['i']; + }; + '/i/claim-achievement': { + /** + * i/claim-achievement + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['i/claim-achievement']; + }; + '/i/favorites': { + /** + * i/favorites + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:favorites* + */ + post: operations['i/favorites']; + }; + '/i/gallery/likes': { + /** + * i/gallery/likes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:gallery-likes* + */ + post: operations['i/gallery/likes']; + }; + '/i/gallery/posts': { + /** + * i/gallery/posts + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:gallery* + */ + post: operations['i/gallery/posts']; + }; + '/i/notifications': { + /** + * i/notifications + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:notifications* + */ + post: operations['i/notifications']; + }; + '/i/notifications-grouped': { + /** + * i/notifications-grouped + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:notifications* + */ + post: operations['i/notifications-grouped']; + }; + '/i/page-likes': { + /** + * i/page-likes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:page-likes* + */ + post: operations['i/page-likes']; + }; + '/i/pages': { + /** + * i/pages + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:pages* + */ + post: operations['i/pages']; + }; + '/i/pin': { + /** + * i/pin + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['i/pin']; + }; + '/i/read-all-unread-notes': { + /** + * i/read-all-unread-notes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['i/read-all-unread-notes']; + }; + '/i/read-announcement': { + /** + * i/read-announcement + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['i/read-announcement']; + }; + '/i/registry/get-all': { + /** + * i/registry/get-all + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['i/registry/get-all']; + }; + '/i/registry/get-detail': { + /** + * i/registry/get-detail + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['i/registry/get-detail']; + }; + '/i/registry/get': { + /** + * i/registry/get + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['i/registry/get']; + }; + '/i/registry/keys-with-type': { + /** + * i/registry/keys-with-type + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['i/registry/keys-with-type']; + }; + '/i/registry/keys': { + /** + * i/registry/keys + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['i/registry/keys']; + }; + '/i/registry/remove': { + /** + * i/registry/remove + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['i/registry/remove']; + }; + '/i/registry/set': { + /** + * i/registry/set + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['i/registry/set']; + }; + '/i/unpin': { + /** + * i/unpin + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['i/unpin']; + }; + '/i/update': { + /** + * i/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['i/update']; + }; + '/i/webhooks/create': { + /** + * i/webhooks/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['i/webhooks/create']; + }; + '/i/webhooks/list': { + /** + * i/webhooks/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + post: operations['i/webhooks/list']; + }; + '/i/webhooks/show': { + /** + * i/webhooks/show + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + post: operations['i/webhooks/show']; + }; + '/i/webhooks/update': { + /** + * i/webhooks/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['i/webhooks/update']; + }; + '/i/webhooks/delete': { + /** + * i/webhooks/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['i/webhooks/delete']; + }; + '/invite/create': { + /** + * invite/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['invite/create']; + }; + '/invite/delete': { + /** + * invite/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['invite/delete']; + }; + '/invite/list': { + /** + * invite/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['invite/list']; + }; + '/invite/limit': { + /** + * invite/limit + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['invite/limit']; + }; + '/meta': { + /** + * meta + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['meta']; + }; + '/emojis': { + /** + * emojis + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['emojis']; + /** + * emojis + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['emojis']; + }; + '/emoji': { + /** + * emoji + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['emoji']; + /** + * emoji + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['emoji']; + }; + '/mute/create': { + /** + * mute/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + post: operations['mute/create']; + }; + '/mute/delete': { + /** + * mute/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + post: operations['mute/delete']; + }; + '/mute/list': { + /** + * mute/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:mutes* + */ + post: operations['mute/list']; + }; + '/renote-mute/create': { + /** + * renote-mute/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + post: operations['renote-mute/create']; + }; + '/renote-mute/delete': { + /** + * renote-mute/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + post: operations['renote-mute/delete']; + }; + '/renote-mute/list': { + /** + * renote-mute/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:mutes* + */ + post: operations['renote-mute/list']; + }; + '/my/apps': { + /** + * my/apps + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['my/apps']; + }; + '/notes': { + /** + * notes + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes']; + }; + '/notes/children': { + /** + * notes/children + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/children']; + }; + '/notes/clips': { + /** + * notes/clips + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/clips']; + }; + '/notes/conversation': { + /** + * notes/conversation + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/conversation']; + }; + '/notes/create': { + /** + * notes/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notes* + */ + post: operations['notes/create']; + }; + '/notes/delete': { + /** + * notes/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notes* + */ + post: operations['notes/delete']; + }; + '/notes/favorites/create': { + /** + * notes/favorites/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:favorites* + */ + post: operations['notes/favorites/create']; + }; + '/notes/favorites/delete': { + /** + * notes/favorites/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:favorites* + */ + post: operations['notes/favorites/delete']; + }; + '/notes/featured': { + /** + * notes/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['notes/featured']; + /** + * notes/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/featured']; + }; + '/notes/global-timeline': { + /** + * notes/global-timeline + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/global-timeline']; + }; + '/notes/hybrid-timeline': { + /** + * notes/hybrid-timeline + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['notes/hybrid-timeline']; + }; + '/notes/local-timeline': { + /** + * notes/local-timeline + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/local-timeline']; + }; + '/notes/mentions': { + /** + * notes/mentions + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['notes/mentions']; + }; + '/notes/polls/recommendation': { + /** + * notes/polls/recommendation + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['notes/polls/recommendation']; + }; + '/notes/polls/vote': { + /** + * notes/polls/vote + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:votes* + */ + post: operations['notes/polls/vote']; + }; + '/notes/reactions': { + /** + * notes/reactions + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['notes/reactions']; + /** + * notes/reactions + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/reactions']; + }; + '/notes/reactions/create': { + /** + * notes/reactions/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:reactions* + */ + post: operations['notes/reactions/create']; + }; + '/notes/reactions/delete': { + /** + * notes/reactions/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:reactions* + */ + post: operations['notes/reactions/delete']; + }; + '/notes/renotes': { + /** + * notes/renotes + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/renotes']; + }; + '/notes/replies': { + /** + * notes/replies + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/replies']; + }; + '/notes/search-by-tag': { + /** + * notes/search-by-tag + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/search-by-tag']; + }; + '/notes/search': { + /** + * notes/search + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/search']; + }; + '/notes/show': { + /** + * notes/show + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/show']; + }; + '/notes/state': { + /** + * notes/state + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['notes/state']; + }; + '/notes/thread-muting/create': { + /** + * notes/thread-muting/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['notes/thread-muting/create']; + }; + '/notes/thread-muting/delete': { + /** + * notes/thread-muting/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['notes/thread-muting/delete']; + }; + '/notes/timeline': { + /** + * notes/timeline + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['notes/timeline']; + }; + '/notes/translate': { + /** + * notes/translate + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['notes/translate']; + }; + '/notes/unrenote': { + /** + * notes/unrenote + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notes* + */ + post: operations['notes/unrenote']; + }; + '/notes/user-list-timeline': { + /** + * notes/user-list-timeline + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['notes/user-list-timeline']; + }; + '/notifications/create': { + /** + * notifications/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notifications* + */ + post: operations['notifications/create']; + }; + '/notifications/mark-all-as-read': { + /** + * notifications/mark-all-as-read + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notifications* + */ + post: operations['notifications/mark-all-as-read']; + }; + '/notifications/test-notification': { + /** + * notifications/test-notification + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notifications* + */ + post: operations['notifications/test-notification']; + }; + '/pages/create': { + /** + * pages/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:pages* + */ + post: operations['pages/create']; + }; + '/pages/delete': { + /** + * pages/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:pages* + */ + post: operations['pages/delete']; + }; + '/pages/featured': { + /** + * pages/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['pages/featured']; + }; + '/pages/like': { + /** + * pages/like + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:page-likes* + */ + post: operations['pages/like']; + }; + '/pages/show': { + /** + * pages/show + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['pages/show']; + }; + '/pages/unlike': { + /** + * pages/unlike + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:page-likes* + */ + post: operations['pages/unlike']; + }; + '/pages/update': { + /** + * pages/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:pages* + */ + post: operations['pages/update']; + }; + '/flash/create': { + /** + * flash/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash* + */ + post: operations['flash/create']; + }; + '/flash/delete': { + /** + * flash/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash* + */ + post: operations['flash/delete']; + }; + '/flash/featured': { + /** + * flash/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['flash/featured']; + }; + '/flash/like': { + /** + * flash/like + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash-likes* + */ + post: operations['flash/like']; + }; + '/flash/show': { + /** + * flash/show + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['flash/show']; + }; + '/flash/unlike': { + /** + * flash/unlike + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash-likes* + */ + post: operations['flash/unlike']; + }; + '/flash/update': { + /** + * flash/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash* + */ + post: operations['flash/update']; + }; + '/flash/my': { + /** + * flash/my + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:flash* + */ + post: operations['flash/my']; + }; + '/flash/my-likes': { + /** + * flash/my-likes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:flash-likes* + */ + post: operations['flash/my-likes']; + }; + '/ping': { + /** + * ping + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['ping']; + }; + '/pinned-users': { + /** + * pinned-users + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['pinned-users']; + }; + '/promo/read': { + /** + * promo/read + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['promo/read']; + }; + '/roles/list': { + /** + * roles/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['roles/list']; + }; + '/roles/show': { + /** + * roles/show + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['roles/show']; + }; + '/roles/users': { + /** + * roles/users + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['roles/users']; + }; + '/roles/notes': { + /** + * roles/notes + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['roles/notes']; + }; + '/request-reset-password': { + /** + * request-reset-password + * @description Request a users password to be reset. + * + * **Credential required**: *No* + */ + post: operations['request-reset-password']; + }; + '/reset-db': { + /** + * reset-db + * @description Only available when running with NODE_ENV=testing. Reset the database and flush Redis. + * + * **Credential required**: *No* + */ + post: operations['reset-db']; + }; + '/reset-password': { + /** + * reset-password + * @description Complete the password reset that was previously requested. + * + * **Credential required**: *No* + */ + post: operations['reset-password']; + }; + '/server-info': { + /** + * server-info + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['server-info']; + /** + * server-info + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['server-info']; + }; + '/stats': { + /** + * stats + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['stats']; + }; + '/sw/show-registration': { + /** + * sw/show-registration + * @description Check push notification registration exists. + * + * **Credential required**: *Yes* + */ + post: operations['sw/show-registration']; + }; + '/sw/update-registration': { + /** + * sw/update-registration + * @description Update push notification registration. + * + * **Credential required**: *Yes* + */ + post: operations['sw/update-registration']; + }; + '/sw/register': { + /** + * sw/register + * @description Register to receive push notifications. + * + * **Credential required**: *Yes* + */ + post: operations['sw/register']; + }; + '/sw/unregister': { + /** + * sw/unregister + * @description Unregister from receiving push notifications. + * + * **Credential required**: *No* + */ + post: operations['sw/unregister']; + }; + '/test': { + /** + * test + * @description Endpoint for testing input validation. + * + * **Credential required**: *No* + */ + post: operations['test']; + }; + '/username/available': { + /** + * username/available + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['username/available']; + }; + '/users': { + /** + * users + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['users']; + }; + '/users/clips': { + /** + * users/clips + * @description Show all clips this user owns. + * + * **Credential required**: *No* + */ + post: operations['users/clips']; + }; + '/users/followers': { + /** + * users/followers + * @description Show everyone that follows this user. + * + * **Credential required**: *No* + */ + post: operations['users/followers']; + }; + '/users/following': { + /** + * users/following + * @description Show everyone that this user is following. + * + * **Credential required**: *No* + */ + post: operations['users/following']; + }; + '/users/gallery/posts': { + /** + * users/gallery/posts + * @description Show all gallery posts by the given user. + * + * **Credential required**: *No* + */ + post: operations['users/gallery/posts']; + }; + '/users/get-frequently-replied-users': { + /** + * users/get-frequently-replied-users + * @description Get a list of other users that the specified user frequently replies to. + * + * **Credential required**: *No* + */ + post: operations['users/get-frequently-replied-users']; + }; + '/users/featured-notes': { + /** + * users/featured-notes + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['users/featured-notes']; + /** + * users/featured-notes + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['users/featured-notes']; + }; + '/users/lists/create': { + /** + * users/lists/create + * @description Create a new list of users. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['users/lists/create']; + }; + '/users/lists/delete': { + /** + * users/lists/delete + * @description Delete an existing list of users. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['users/lists/delete']; + }; + '/users/lists/list': { + /** + * users/lists/list + * @description Show all lists that the authenticated user has created. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + post: operations['users/lists/list']; + }; + '/users/lists/pull': { + /** + * users/lists/pull + * @description Remove a user from a list. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['users/lists/pull']; + }; + '/users/lists/push': { + /** + * users/lists/push + * @description Add a user to an existing list. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['users/lists/push']; + }; + '/users/lists/show': { + /** + * users/lists/show + * @description Show the properties of a list. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + post: operations['users/lists/show']; + }; + '/users/lists/favorite': { + /** + * users/lists/favorite + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['users/lists/favorite']; + }; + '/users/lists/unfavorite': { + /** + * users/lists/unfavorite + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['users/lists/unfavorite']; + }; + '/users/lists/update': { + /** + * users/lists/update + * @description Update the properties of a list. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['users/lists/update']; + }; + '/users/lists/create-from-public': { + /** + * users/lists/create-from-public + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['users/lists/create-from-public']; + }; + '/users/lists/update-membership': { + /** + * users/lists/update-membership + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['users/lists/update-membership']; + }; + '/users/lists/get-memberships': { + /** + * users/lists/get-memberships + * @description No description provided. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + post: operations['users/lists/get-memberships']; + }; + '/users/notes': { + /** + * users/notes + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['users/notes']; + }; + '/users/pages': { + /** + * users/pages + * @description Show all pages this user created. + * + * **Credential required**: *No* + */ + post: operations['users/pages']; + }; + '/users/flashs': { + /** + * users/flashs + * @description Show all flashs this user created. + * + * **Credential required**: *No* + */ + post: operations['users/flashs']; + }; + '/users/reactions': { + /** + * users/reactions + * @description Show all reactions this user made. + * + * **Credential required**: *No* + */ + post: operations['users/reactions']; + }; + '/users/recommendation': { + /** + * users/recommendation + * @description Show users that the authenticated user might be interested to follow. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + post: operations['users/recommendation']; + }; + '/users/relation': { + /** + * users/relation + * @description Show the different kinds of relations between the authenticated user and the specified user(s). + * + * **Credential required**: *Yes* + */ + post: operations['users/relation']; + }; + '/users/report-abuse': { + /** + * users/report-abuse + * @description File a report. + * + * **Credential required**: *Yes* + */ + post: operations['users/report-abuse']; + }; + '/users/search-by-username-and-host': { + /** + * users/search-by-username-and-host + * @description Search for a user by username and/or host. + * + * **Credential required**: *No* + */ + post: operations['users/search-by-username-and-host']; + }; + '/users/search': { + /** + * users/search + * @description Search for users. + * + * **Credential required**: *No* + */ + post: operations['users/search']; + }; + '/users/show': { + /** + * users/show + * @description Show the properties of a user. + * + * **Credential required**: *No* + */ + post: operations['users/show']; + }; + '/users/achievements': { + /** + * users/achievements + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['users/achievements']; + }; + '/users/update-memo': { + /** + * users/update-memo + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + post: operations['users/update-memo']; + }; + '/fetch-rss': { + /** + * fetch-rss + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['fetch-rss']; + /** + * fetch-rss + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['fetch-rss']; + }; + '/fetch-external-resources': { + /** + * fetch-external-resources + * @description No description provided. + * + * **Credential required**: *Yes* + */ + post: operations['fetch-external-resources']; + }; + '/retention': { + /** + * retention + * @description No description provided. + * + * **Credential required**: *No* + */ + get: operations['retention']; + /** + * retention + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['retention']; + }; +}; + +export type webhooks = Record; + +export type components = { + schemas: { + Error: { + /** @description An error object. */ + error: { + /** @description An error code. Unique within the endpoint. */ + code: string; + /** @description An error message. */ + message: string; + /** + * Format: uuid + * @description An error ID. This ID is static. + */ + id: string; + }; + }; + UserLite: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** @example 藍 */ + name: string | null; + /** @example ai */ + username: string; + /** + * @description The local host is represented with `null`. + * @example misskey.example.com + */ + host: string | null; + /** Format: url */ + avatarUrl: string | null; + avatarBlurhash: string | null; + avatarDecorations: { + /** Format: id */ + id: string; + angle?: number; + flipH?: boolean; + /** Format: url */ + url: string; + }[]; + isBot?: boolean; + isCat?: boolean; + instance?: { + name: string | null; + softwareName: string | null; + softwareVersion: string | null; + iconUrl: string | null; + faviconUrl: string | null; + themeColor: string | null; + }; + emojis: Record; + /** @enum {string} */ + onlineStatus: 'unknown' | 'online' | 'active' | 'offline'; + badgeRoles?: ({ + name: string; + iconUrl: string | null; + displayOrder: number; + })[]; + }; + UserDetailedNotMeOnly: { + /** Format: url */ + url: string | null; + /** Format: uri */ + uri: string | null; + /** Format: uri */ + movedTo: string | null; + alsoKnownAs: string[] | null; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string | null; + /** Format: date-time */ + lastFetchedAt: string | null; + /** Format: url */ + bannerUrl: string | null; + bannerBlurhash: string | null; + isLocked: boolean; + isSilenced: boolean; + /** @example false */ + isSuspended: boolean; + /** @example Hi masters, I am Ai! */ + description: string | null; + location: string | null; + /** @example 2018-03-12 */ + birthday: string | null; + /** @example ja-JP */ + lang: string | null; + fields: { + name: string; + value: string; + }[]; + verifiedLinks: string[]; + followersCount: number; + followingCount: number; + notesCount: number; + pinnedNoteIds: string[]; + pinnedNotes: components['schemas']['Note'][]; + pinnedPageId: string | null; + pinnedPage: components['schemas']['Page'] | null; + publicReactions: boolean; + /** @enum {string} */ + ffVisibility: 'public' | 'followers' | 'private'; + /** @default false */ + twoFactorEnabled: boolean; + /** @default false */ + usePasswordLessLogin: boolean; + /** @default false */ + securityKeys: boolean; + roles: ({ + /** Format: id */ + id: string; + name: string; + color: string | null; + iconUrl: string | null; + description: string; + isModerator: boolean; + isAdministrator: boolean; + displayOrder: number; + })[]; + memo: string | null; + moderationNote?: string; + isFollowing?: boolean; + isFollowed?: boolean; + hasPendingFollowRequestFromYou?: boolean; + hasPendingFollowRequestToYou?: boolean; + isBlocking?: boolean; + isBlocked?: boolean; + isMuted?: boolean; + isRenoteMuted?: boolean; + notify?: string; + withReplies?: boolean; + }; + MeDetailedOnly: { + /** Format: id */ + avatarId: string | null; + /** Format: id */ + bannerId: string | null; + isModerator: boolean | null; + isAdmin: boolean | null; + injectFeaturedNote: boolean; + receiveAnnouncementEmail: boolean; + alwaysMarkNsfw: boolean; + autoSensitive: boolean; + carefulBot: boolean; + autoAcceptFollowed: boolean; + noCrawle: boolean; + preventAiLearning: boolean; + isExplorable: boolean; + isDeleted: boolean; + /** @enum {string} */ + twoFactorBackupCodesStock: 'full' | 'partial' | 'none'; + hideOnlineStatus: boolean; + hasUnreadSpecifiedNotes: boolean; + hasUnreadMentions: boolean; + hasUnreadAnnouncement: boolean; + unreadAnnouncements: components['schemas']['Announcement'][]; + hasUnreadAntenna: boolean; + hasUnreadChannel: boolean; + hasUnreadNotification: boolean; + hasPendingReceivedFollowRequest: boolean; + unreadNotificationsCount: number; + mutedWords: string[][]; + hardMutedWords: string[][]; + mutedInstances: string[] | null; + notificationRecieveConfig: Record; + emailNotificationTypes: string[]; + achievements: { + name: string; + unlockedAt: number; + }[]; + loggedInDays: number; + policies: { + gtlAvailable: boolean; + ltlAvailable: boolean; + canPublicNote: boolean; + canInvite: boolean; + inviteLimit: number; + inviteLimitCycle: number; + inviteExpirationTime: number; + canManageCustomEmojis: boolean; + canManageAvatarDecorations: boolean; + canSearchNotes: boolean; + canUseTranslator: boolean; + canHideAds: boolean; + driveCapacityMb: number; + alwaysMarkNsfw: boolean; + pinLimit: number; + antennaLimit: number; + wordMuteLimit: number; + webhookLimit: number; + clipLimit: number; + noteEachClipsLimit: number; + userListLimit: number; + userEachUserListsLimit: number; + rateLimitFactor: number; + }; + email?: string | null; + emailVerified?: boolean | null; + securityKeysList?: Record[]; + }; + UserDetailedNotMe: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly']; + MeDetailed: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly'] & components['schemas']['MeDetailedOnly']; + UserDetailed: components['schemas']['UserDetailedNotMe'] | components['schemas']['MeDetailed']; + User: components['schemas']['UserLite'] | components['schemas']['UserDetailed'] | components['schemas']['UserDetailedNotMe'] | components['schemas']['MeDetailed']; + UserList: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + name: string; + userIds?: string[]; + isPublic: boolean; + }; + Announcement: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string | null; + text: string; + title: string; + imageUrl: string | null; + icon: string; + display: string; + needConfirmationToRead: boolean; + silence: boolean; + forYou: boolean; + isRead?: boolean; + }; + App: { + id: string; + name: string; + callbackUrl: string | null; + permission: string[]; + secret?: string; + isAuthorized?: boolean; + }; + Note: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + deletedAt?: string | null; + text: string | null; + cw?: string | null; + /** Format: id */ + userId: string; + user: components['schemas']['UserLite']; + /** + * Format: id + * @example xxxxxxxxxx + */ + replyId?: string | null; + /** + * Format: id + * @example xxxxxxxxxx + */ + renoteId?: string | null; + reply?: components['schemas']['Note'] | null; + renote?: components['schemas']['Note'] | null; + isHidden?: boolean; + visibility: string; + mentions?: string[]; + visibleUserIds?: string[]; + fileIds?: string[]; + files?: components['schemas']['DriveFile'][]; + tags?: string[]; + poll?: Record | null; + /** + * Format: id + * @example xxxxxxxxxx + */ + channelId?: string | null; + channel?: { + id: string; + name: string; + color: string; + isSensitive: boolean; + allowRenoteToExternal: boolean; + } | null; + localOnly?: boolean; + reactionAcceptance: string | null; + reactions: Record; + renoteCount: number; + repliesCount: number; + uri?: string; + url?: string; + reactionAndUserPairCache?: string[]; + myReaction?: Record | null; + }; + NoteReaction: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + user: components['schemas']['UserLite']; + type: string; + }; + NoteFavorite: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + note: components['schemas']['Note']; + /** Format: id */ + noteId: string; + }; + Notification: { + /** Format: id */ + id: string; + /** Format: date-time */ + createdAt: string; + /** @enum {string} */ + type: 'note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'reaction:grouped' | 'renote:grouped'; + user?: components['schemas']['UserLite'] | null; + /** Format: id */ + userId?: string | null; + note?: components['schemas']['Note'] | null; + reaction?: string | null; + achievement?: string; + body?: string | null; + header?: string | null; + icon?: string | null; + reactions?: { + user: components['schemas']['UserLite']; + reaction: string; + }[] | null; + users?: components['schemas']['UserLite'][] | null; + }; + DriveFile: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** @example lenna.jpg */ + name: string; + /** @example image/jpeg */ + type: string; + /** + * Format: md5 + * @example 15eca7fba0480996e2245f5185bf39f2 + */ + md5: string; + /** @example 51469 */ + size: number; + isSensitive: boolean; + blurhash: string | null; + properties: { + /** @example 1280 */ + width?: number; + /** @example 720 */ + height?: number; + /** @example 8 */ + orientation?: number; + /** @example rgb(40,65,87) */ + avgColor?: string; + }; + /** Format: url */ + url: string; + /** Format: url */ + thumbnailUrl: string | null; + comment: string | null; + /** + * Format: id + * @example xxxxxxxxxx + */ + folderId: string | null; + folder?: components['schemas']['DriveFolder'] | null; + /** + * Format: id + * @example xxxxxxxxxx + */ + userId: string | null; + user?: components['schemas']['UserLite'] | null; + }; + DriveFolder: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + name: string; + /** + * Format: id + * @example xxxxxxxxxx + */ + parentId: string | null; + foldersCount?: number; + filesCount?: number; + parent?: components['schemas']['DriveFolder'] | null; + }; + Following: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: id */ + followeeId: string; + /** Format: id */ + followerId: string; + followee?: components['schemas']['UserDetailed']; + follower?: components['schemas']['UserDetailed']; + }; + Muting: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + expiresAt: string | null; + /** Format: id */ + muteeId: string; + mutee: components['schemas']['UserDetailed']; + }; + RenoteMuting: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: id */ + muteeId: string; + mutee: components['schemas']['UserDetailed']; + }; + Blocking: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: id */ + blockeeId: string; + blockee: components['schemas']['UserDetailed']; + }; + Hashtag: { + /** @example misskey */ + tag: string; + mentionedUsersCount: number; + mentionedLocalUsersCount: number; + mentionedRemoteUsersCount: number; + attachedUsersCount: number; + attachedLocalUsersCount: number; + attachedRemoteUsersCount: number; + }; + InviteCode: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** @example GR6S02ERUA5VR */ + code: string; + /** Format: date-time */ + expiresAt: string | null; + /** Format: date-time */ + createdAt: string; + createdBy: components['schemas']['UserLite'] | null; + usedBy: components['schemas']['UserLite'] | null; + /** Format: date-time */ + usedAt: string | null; + used: boolean; + }; + Page: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + /** Format: id */ + userId: string; + user: components['schemas']['UserLite']; + content: Record[]; + variables: Record[]; + title: string; + name: string; + summary: string | null; + hideTitleWhenPinned: boolean; + alignCenter: boolean; + font: string; + script: string; + eyeCatchingImageId: string | null; + eyeCatchingImage: components['schemas']['DriveFile'] | null; + attachedFiles: components['schemas']['DriveFile'][]; + likedCount: number; + isLiked?: boolean; + }; + Channel: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + lastNotedAt: string | null; + name: string; + description: string | null; + /** Format: id */ + userId: string | null; + /** Format: url */ + bannerUrl: string | null; + pinnedNoteIds: string[]; + color: string; + isArchived: boolean; + usersCount: number; + notesCount: number; + isSensitive: boolean; + allowRenoteToExternal: boolean; + isFollowing?: boolean; + isFavorited?: boolean; + pinnedNotes?: components['schemas']['Note'][]; + }; + QueueCount: { + waiting: number; + active: number; + completed: number; + failed: number; + delayed: number; + }; + Antenna: { + /** Format: id */ + id: string; + /** Format: date-time */ + createdAt: string; + name: string; + keywords: string[][]; + excludeKeywords: string[][]; + /** @enum {string} */ + src: 'home' | 'all' | 'users' | 'list' | 'users_blacklist'; + /** Format: id */ + userListId: string | null; + users: string[]; + /** @default false */ + caseSensitive: boolean; + /** @default false */ + localOnly: boolean; + notify: boolean; + /** @default false */ + withReplies: boolean; + withFile: boolean; + isActive: boolean; + /** @default false */ + hasUnreadNote: boolean; + }; + Clip: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + lastClippedAt: string | null; + /** Format: id */ + userId: string; + user: components['schemas']['UserLite']; + name: string; + description: string | null; + isPublic: boolean; + favoritedCount: number; + isFavorited?: boolean; + }; + FederationInstance: { + /** Format: id */ + id: string; + /** Format: date-time */ + firstRetrievedAt: string; + /** @example misskey.example.com */ + host: string; + usersCount: number; + notesCount: number; + followingCount: number; + followersCount: number; + isNotResponding: boolean; + isSuspended: boolean; + isBlocked: boolean; + /** @example misskey */ + softwareName: string | null; + softwareVersion: string | null; + /** @example true */ + openRegistrations: boolean | null; + name: string | null; + description: string | null; + maintainerName: string | null; + maintainerEmail: string | null; + isSilenced: boolean; + /** Format: url */ + iconUrl: string | null; + /** Format: url */ + faviconUrl: string | null; + themeColor: string | null; + /** Format: date-time */ + infoUpdatedAt: string | null; + /** Format: date-time */ + latestRequestReceivedAt: string | null; + }; + GalleryPost: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + /** Format: id */ + userId: string; + user: components['schemas']['UserLite']; + title: string; + description: string | null; + fileIds?: string[]; + files?: components['schemas']['DriveFile'][]; + tags?: string[]; + isSensitive: boolean; + likedCount: number; + isLiked?: boolean; + }; + EmojiSimple: { + aliases: string[]; + name: string; + category: string | null; + url: string; + isSensitive?: boolean; + roleIdsThatCanBeUsedThisEmojiAsReaction?: string[]; + }; + EmojiDetailed: { + /** Format: id */ + id: string; + aliases: string[]; + name: string; + category: string | null; + /** @description The local host is represented with `null`. */ + host: string | null; + url: string; + license: string | null; + isSensitive: boolean; + localOnly: boolean; + roleIdsThatCanBeUsedThisEmojiAsReaction: string[]; + }; + Flash: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + /** Format: id */ + userId: string; + user: components['schemas']['UserLite']; + title: string; + summary: string; + script: string; + likedCount: number | null; + isLiked?: boolean; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +}; + +export type $defs = Record; + +export type external = Record; + +export type operations = { + + /** + * admin/meta + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/meta': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + cacheRemoteFiles: boolean; + cacheRemoteSensitiveFiles: boolean; + emailRequiredForSignup: boolean; + enableHcaptcha: boolean; + hcaptchaSiteKey: string | null; + enableRecaptcha: boolean; + recaptchaSiteKey: string | null; + enableTurnstile: boolean; + turnstileSiteKey: string | null; + swPublickey: string | null; + /** @default /assets/ai.png */ + mascotImageUrl: string | null; + bannerUrl: string | null; + serverErrorImageUrl: string | null; + infoImageUrl: string | null; + notFoundImageUrl: string | null; + iconUrl: string | null; + app192IconUrl: string | null; + app512IconUrl: string | null; + enableEmail: boolean; + enableServiceWorker: boolean; + translatorAvailable: boolean; + silencedHosts?: string[]; + pinnedUsers: string[]; + hiddenTags: string[]; + blockedHosts: string[]; + sensitiveWords: string[]; + preservedUsernames: string[]; + hcaptchaSecretKey: string | null; + recaptchaSecretKey: string | null; + turnstileSecretKey: string | null; + sensitiveMediaDetection: string; + sensitiveMediaDetectionSensitivity: string; + setSensitiveFlagAutomatically: boolean; + enableSensitiveMediaDetectionForVideos: boolean; + /** Format: id */ + proxyAccountId: string | null; + email: string | null; + smtpSecure: boolean; + smtpHost: string | null; + smtpPort: number | null; + smtpUser: string | null; + smtpPass: string | null; + swPrivateKey: string | null; + useObjectStorage: boolean; + objectStorageBaseUrl: string | null; + objectStorageBucket: string | null; + objectStoragePrefix: string | null; + objectStorageEndpoint: string | null; + objectStorageRegion: string | null; + objectStoragePort: number | null; + objectStorageAccessKey: string | null; + objectStorageSecretKey: string | null; + objectStorageUseSSL: boolean; + objectStorageUseProxy: boolean; + objectStorageSetPublicRead: boolean; + enableIpLogging: boolean; + enableActiveEmailValidation: boolean; + enableVerifymailApi: boolean; + verifymailAuthKey: string | null; + enableChartsForRemoteUser: boolean; + enableChartsForFederatedInstances: boolean; + enableServerMachineStats: boolean; + enableIdenticonGeneration: boolean; + manifestJsonOverride: string; + policies: Record; + enableFanoutTimeline: boolean; + enableFanoutTimelineDbFallback: boolean; + perLocalUserUserTimelineCacheMax: number; + perRemoteUserUserTimelineCacheMax: number; + perUserHomeTimelineCacheMax: number; + perUserListTimelineCacheMax: number; + notesPerOneAd: number; + backgroundImageUrl: string | null; + deeplAuthKey: string | null; + deeplIsPro: boolean; + defaultDarkTheme: string | null; + defaultLightTheme: string | null; + description: string | null; + disableRegistration: boolean; + impressumUrl: string | null; + maintainerEmail: string | null; + maintainerName: string | null; + name: string | null; + objectStorageS3ForcePathStyle: boolean; + privacyPolicyUrl: string | null; + repositoryUrl: string; + summalyProxy: string | null; + themeColor: string | null; + tosUrl: string | null; + uri: string; + version: string; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/abuse-user-reports + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/abuse-user-reports': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default null */ + state?: string | null; + /** + * @default combined + * @enum {string} + */ + reporterOrigin?: 'combined' | 'local' | 'remote'; + /** + * @default combined + * @enum {string} + */ + targetUserOrigin?: 'combined' | 'local' | 'remote'; + /** @default false */ + forwarded?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': ({ + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + comment: string; + /** @example false */ + resolved: boolean; + /** Format: id */ + reporterId: string; + /** Format: id */ + targetUserId: string; + /** Format: id */ + assigneeId: string | null; + reporter: components['schemas']['User']; + targetUser: components['schemas']['User']; + assignee?: components['schemas']['User'] | null; + })[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/accounts/create + * @description No description provided. + * + * **Credential required**: *No* + */ + 'admin/accounts/create': { + requestBody: { + content: { + 'application/json': { + username: string; + password: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['User']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/accounts/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/accounts/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/accounts/find-by-email + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/accounts/find-by-email': { + requestBody: { + content: { + 'application/json': { + email: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/ad/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/ad/create': { + requestBody: { + content: { + 'application/json': { + url: string; + memo: string; + place: string; + priority: string; + ratio: number; + expiresAt: number; + startsAt: number; + imageUrl: string; + dayOfWeek: number; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/ad/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/ad/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + id: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/ad/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/ad/list': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default null */ + publishing?: boolean | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/ad/update + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/ad/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + id: string; + memo: string; + url: string; + imageUrl: string; + place: string; + priority: string; + ratio: number; + expiresAt: number; + startsAt: number; + dayOfWeek: number; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/announcements/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/announcements/create': { + requestBody: { + content: { + 'application/json': { + title: string; + text: string; + imageUrl: string | null; + /** + * @default info + * @enum {string} + */ + icon?: 'info' | 'warning' | 'error' | 'success'; + /** + * @default normal + * @enum {string} + */ + display?: 'normal' | 'banner' | 'dialog'; + /** @default false */ + forExistingUsers?: boolean; + /** @default false */ + silence?: boolean; + /** @default false */ + needConfirmationToRead?: boolean; + /** + * Format: misskey:id + * @default null + */ + userId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string | null; + title: string; + text: string; + imageUrl: string | null; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/announcements/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/announcements/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + id: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/announcements/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/announcements/list': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** Format: misskey:id */ + userId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': ({ + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string | null; + text: string; + title: string; + imageUrl: string | null; + reads: number; + })[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/announcements/update + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/announcements/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + id: string; + title?: string; + text?: string; + imageUrl?: string | null; + /** @enum {string} */ + icon?: 'info' | 'warning' | 'error' | 'success'; + /** @enum {string} */ + display?: 'normal' | 'banner' | 'dialog'; + forExistingUsers?: boolean; + silence?: boolean; + needConfirmationToRead?: boolean; + isActive?: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/avatar-decorations/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/avatar-decorations/create': { + requestBody: { + content: { + 'application/json': { + name: string; + description: string; + url: string; + roleIdsThatCanBeUsedThisDecoration?: string[]; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/avatar-decorations/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/avatar-decorations/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + id: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/avatar-decorations/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/avatar-decorations/list': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** Format: misskey:id */ + userId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': ({ + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string | null; + name: string; + description: string; + url: string; + roleIdsThatCanBeUsedThisDecoration: string[]; + })[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/avatar-decorations/update + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/avatar-decorations/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + id: string; + name?: string; + description?: string; + url?: string; + roleIdsThatCanBeUsedThisDecoration?: string[]; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/delete-all-files-of-a-user + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/delete-all-files-of-a-user': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/unset-user-avatar + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/unset-user-avatar': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/unset-user-banner + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/unset-user-banner': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/drive/clean-remote-files + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/drive/clean-remote-files': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/drive/cleanup + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/drive/cleanup': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/drive/files + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/drive/files': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** Format: misskey:id */ + userId?: string | null; + type?: string | null; + /** + * @default local + * @enum {string} + */ + origin?: 'combined' | 'local' | 'remote'; + /** + * @description The local host is represented with `null`. + * @default null + */ + hostname?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFile'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/drive/show-file + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/drive/show-file': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + fileId?: string; + url?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** Format: date-time */ + createdAt: string; + /** + * Format: id + * @example xxxxxxxxxx + */ + userId: string | null; + /** @description The local host is represented with `null`. */ + userHost: string | null; + /** + * Format: md5 + * @example 15eca7fba0480996e2245f5185bf39f2 + */ + md5: string; + /** @example lenna.jpg */ + name: string; + /** @example image/jpeg */ + type: string; + /** @example 51469 */ + size: number; + comment: string | null; + blurhash: string | null; + properties: Record; + /** @example true */ + storedInternal: boolean | null; + /** Format: url */ + url: string | null; + /** Format: url */ + thumbnailUrl: string | null; + /** Format: url */ + webpublicUrl: string | null; + accessKey: string | null; + thumbnailAccessKey: string | null; + webpublicAccessKey: string | null; + uri: string | null; + src: string | null; + /** + * Format: id + * @example xxxxxxxxxx + */ + folderId: string | null; + isSensitive: boolean; + isLink: boolean; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/add-aliases-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/add-aliases-bulk': { + requestBody: { + content: { + 'application/json': { + ids: string[]; + aliases: string[]; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/add + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/add': { + requestBody: { + content: { + 'application/json': { + name: string; + /** Format: misskey:id */ + fileId: string; + /** @description Use `null` to reset the category. */ + category?: string | null; + aliases?: string[]; + license?: string | null; + isSensitive?: boolean; + localOnly?: boolean; + roleIdsThatCanBeUsedThisEmojiAsReaction?: string[]; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/copy + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/copy': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + emojiId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** Format: id */ + id: string; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/delete-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/delete-bulk': { + requestBody: { + content: { + 'application/json': { + ids: string[]; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + id: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/list-remote + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/list-remote': { + requestBody: { + content: { + 'application/json': { + /** @default null */ + query?: string | null; + /** + * @description Use `null` to represent the local host. + * @default null + */ + host?: string | null; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': ({ + /** Format: id */ + id: string; + aliases: string[]; + name: string; + category: string | null; + /** @description The local host is represented with `null`. */ + host: string | null; + url: string; + })[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/list': { + requestBody: { + content: { + 'application/json': { + /** @default null */ + query?: string | null; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': ({ + /** Format: id */ + id: string; + aliases: string[]; + name: string; + category: string | null; + /** @description The local host is represented with `null`. The field exists for compatibility with other API endpoints that return files. */ + host: string | null; + url: string; + })[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/remove-aliases-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/remove-aliases-bulk': { + requestBody: { + content: { + 'application/json': { + ids: string[]; + aliases: string[]; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/set-aliases-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/set-aliases-bulk': { + requestBody: { + content: { + 'application/json': { + ids: string[]; + aliases: string[]; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/set-category-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/set-category-bulk': { + requestBody: { + content: { + 'application/json': { + ids: string[]; + /** @description Use `null` to reset the category. */ + category?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/set-license-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/set-license-bulk': { + requestBody: { + content: { + 'application/json': { + ids: string[]; + /** @description Use `null` to reset the license. */ + license?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/update + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + id: string; + name: string; + /** Format: misskey:id */ + fileId?: string; + /** @description Use `null` to reset the category. */ + category?: string | null; + aliases: string[]; + license?: string | null; + isSensitive?: boolean; + localOnly?: boolean; + roleIdsThatCanBeUsedThisEmojiAsReaction?: string[]; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/federation/delete-all-files + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/federation/delete-all-files': { + requestBody: { + content: { + 'application/json': { + host: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/federation/refresh-remote-instance-metadata + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/federation/refresh-remote-instance-metadata': { + requestBody: { + content: { + 'application/json': { + host: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/federation/remove-all-following + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/federation/remove-all-following': { + requestBody: { + content: { + 'application/json': { + host: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/federation/update-instance + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/federation/update-instance': { + requestBody: { + content: { + 'application/json': { + host: string; + isSuspended: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/get-index-stats + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/get-index-stats': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/get-table-stats + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/get-table-stats': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': Record; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/get-user-ips + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/get-user-ips': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/invite/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/invite/create': { + requestBody: { + content: { + 'application/json': { + /** @default 1 */ + count?: number; + expiresAt?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** @example GR6S02ERUA5VR */ + code: string; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/invite/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/invite/list': { + requestBody: { + content: { + 'application/json': { + /** @default 30 */ + limit?: number; + /** @default 0 */ + offset?: number; + /** + * @default all + * @enum {string} + */ + type?: 'unused' | 'used' | 'expired' | 'all'; + /** @enum {string} */ + sort?: '+createdAt' | '-createdAt' | '+usedAt' | '-usedAt'; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': Record[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/promo/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/promo/create': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + expiresAt: number; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/queue/clear + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/queue/clear': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/queue/deliver-delayed + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/queue/deliver-delayed': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': ((string | number)[])[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/queue/inbox-delayed + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/queue/inbox-delayed': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': ((string | number)[])[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/queue/promote + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/queue/promote': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + type: 'deliver' | 'inbox'; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/queue/stats + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/queue/stats': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + deliver: components['schemas']['QueueCount']; + inbox: components['schemas']['QueueCount']; + db: components['schemas']['QueueCount']; + objectStorage: components['schemas']['QueueCount']; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/relays/add + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/relays/add': { + requestBody: { + content: { + 'application/json': { + inbox: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** Format: id */ + id: string; + /** Format: url */ + inbox: string; + /** + * @default requesting + * @enum {string} + */ + status: 'requesting' | 'accepted' | 'rejected'; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/relays/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/relays/list': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': ({ + /** Format: id */ + id: string; + /** Format: url */ + inbox: string; + /** + * @default requesting + * @enum {string} + */ + status: 'requesting' | 'accepted' | 'rejected'; + })[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/relays/remove + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/relays/remove': { + requestBody: { + content: { + 'application/json': { + inbox: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/reset-password + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/reset-password': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + password: string; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/resolve-abuse-user-report + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/resolve-abuse-user-report': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + reportId: string; + /** @default false */ + forward?: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/send-email + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/send-email': { + requestBody: { + content: { + 'application/json': { + to: string; + subject: string; + text: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/server-info + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/server-info': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + machine: string; + /** @example linux */ + os: string; + node: string; + psql: string; + cpu: { + model: string; + cores: number; + }; + mem: { + /** Format: bytes */ + total: number; + }; + fs: { + /** Format: bytes */ + total: number; + /** Format: bytes */ + used: number; + }; + net: { + /** @example eth0 */ + interface: string; + }; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/show-moderation-logs + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/show-moderation-logs': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + type?: string | null; + /** Format: misskey:id */ + userId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** Format: id */ + id: string; + /** Format: date-time */ + createdAt: string; + type: string; + info: Record; + /** Format: id */ + userId: string; + user: components['schemas']['UserDetailed']; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/show-user + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/show-user': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': Record; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/show-users + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/show-users': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** @default 0 */ + offset?: number; + /** @enum {string} */ + sort?: '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt' | '+lastActiveDate' | '-lastActiveDate'; + /** + * @default all + * @enum {string} + */ + state?: 'all' | 'alive' | 'available' | 'admin' | 'moderator' | 'adminOrModerator' | 'suspended'; + /** + * @default combined + * @enum {string} + */ + origin?: 'combined' | 'local' | 'remote'; + /** @default null */ + username?: string | null; + /** + * @description The local host is represented with `null`. + * @default null + */ + hostname?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserDetailed'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/suspend-user + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/suspend-user': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/unsuspend-user + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/unsuspend-user': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/update-meta + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/update-meta': { + requestBody: { + content: { + 'application/json': { + disableRegistration?: boolean | null; + pinnedUsers?: string[] | null; + hiddenTags?: string[] | null; + blockedHosts?: string[] | null; + sensitiveWords?: string[] | null; + themeColor?: string | null; + mascotImageUrl?: string | null; + bannerUrl?: string | null; + serverErrorImageUrl?: string | null; + infoImageUrl?: string | null; + notFoundImageUrl?: string | null; + iconUrl?: string | null; + app192IconUrl?: string | null; + app512IconUrl?: string | null; + backgroundImageUrl?: string | null; + logoImageUrl?: string | null; + name?: string | null; + shortName?: string | null; + description?: string | null; + defaultLightTheme?: string | null; + defaultDarkTheme?: string | null; + cacheRemoteFiles?: boolean; + cacheRemoteSensitiveFiles?: boolean; + emailRequiredForSignup?: boolean; + enableHcaptcha?: boolean; + hcaptchaSiteKey?: string | null; + hcaptchaSecretKey?: string | null; + enableRecaptcha?: boolean; + recaptchaSiteKey?: string | null; + recaptchaSecretKey?: string | null; + enableTurnstile?: boolean; + turnstileSiteKey?: string | null; + turnstileSecretKey?: string | null; + /** @enum {string} */ + sensitiveMediaDetection?: 'none' | 'all' | 'local' | 'remote'; + /** @enum {string} */ + sensitiveMediaDetectionSensitivity?: 'medium' | 'low' | 'high' | 'veryLow' | 'veryHigh'; + setSensitiveFlagAutomatically?: boolean; + enableSensitiveMediaDetectionForVideos?: boolean; + /** Format: misskey:id */ + proxyAccountId?: string | null; + maintainerName?: string | null; + maintainerEmail?: string | null; + langs?: string[]; + summalyProxy?: string | null; + deeplAuthKey?: string | null; + deeplIsPro?: boolean; + enableEmail?: boolean; + email?: string | null; + smtpSecure?: boolean; + smtpHost?: string | null; + smtpPort?: number | null; + smtpUser?: string | null; + smtpPass?: string | null; + enableServiceWorker?: boolean; + swPublicKey?: string | null; + swPrivateKey?: string | null; + tosUrl?: string | null; + repositoryUrl?: string; + feedbackUrl?: string; + impressumUrl?: string | null; + privacyPolicyUrl?: string | null; + useObjectStorage?: boolean; + objectStorageBaseUrl?: string | null; + objectStorageBucket?: string | null; + objectStoragePrefix?: string | null; + objectStorageEndpoint?: string | null; + objectStorageRegion?: string | null; + objectStoragePort?: number | null; + objectStorageAccessKey?: string | null; + objectStorageSecretKey?: string | null; + objectStorageUseSSL?: boolean; + objectStorageUseProxy?: boolean; + objectStorageSetPublicRead?: boolean; + objectStorageS3ForcePathStyle?: boolean; + enableIpLogging?: boolean; + enableActiveEmailValidation?: boolean; + enableVerifymailApi?: boolean; + verifymailAuthKey?: string | null; + enableChartsForRemoteUser?: boolean; + enableChartsForFederatedInstances?: boolean; + enableServerMachineStats?: boolean; + enableIdenticonGeneration?: boolean; + serverRules?: string[]; + preservedUsernames?: string[]; + manifestJsonOverride?: string; + enableFanoutTimeline?: boolean; + enableFanoutTimelineDbFallback?: boolean; + perLocalUserUserTimelineCacheMax?: number; + perRemoteUserUserTimelineCacheMax?: number; + perUserHomeTimelineCacheMax?: number; + perUserListTimelineCacheMax?: number; + notesPerOneAd?: number; + silencedHosts?: string[] | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/delete-account + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/delete-account': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': unknown; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/update-user-note + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/update-user-note': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + text: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/roles/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/roles/create': { + requestBody: { + content: { + 'application/json': { + name: string; + description: string; + color: string | null; + iconUrl: string | null; + /** @enum {string} */ + target: 'manual' | 'conditional'; + condFormula: Record; + isPublic: boolean; + isModerator: boolean; + isAdministrator: boolean; + /** @default false */ + isExplorable?: boolean; + asBadge: boolean; + canEditMembersByModerator: boolean; + displayOrder: number; + policies: Record; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/roles/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/roles/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roleId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/roles/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/roles/list': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/roles/show + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/roles/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roleId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/roles/update + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/roles/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roleId: string; + name: string; + description: string; + color: string | null; + iconUrl: string | null; + /** @enum {string} */ + target: 'manual' | 'conditional'; + condFormula: Record; + isPublic: boolean; + isModerator: boolean; + isAdministrator: boolean; + isExplorable?: boolean; + asBadge: boolean; + canEditMembersByModerator: boolean; + displayOrder: number; + policies: Record; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/roles/assign + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/roles/assign': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roleId: string; + /** Format: misskey:id */ + userId: string; + expiresAt?: number | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/roles/unassign + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/roles/unassign': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roleId: string; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/roles/update-default-policies + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/roles/update-default-policies': { + requestBody: { + content: { + 'application/json': { + policies: Record; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/roles/users + * @description No description provided. + * + * **Credential required**: *No* + */ + 'admin/roles/users': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roleId: string; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * announcements + * @description No description provided. + * + * **Credential required**: *No* + */ + announcements: { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default true */ + isActive?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Announcement'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * antennas/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'antennas/create': { + requestBody: { + content: { + 'application/json': { + name: string; + /** @enum {string} */ + src: 'home' | 'all' | 'users' | 'list' | 'users_blacklist'; + /** Format: misskey:id */ + userListId?: string | null; + keywords: string[][]; + excludeKeywords: string[][]; + users: string[]; + caseSensitive: boolean; + localOnly?: boolean; + withReplies: boolean; + withFile: boolean; + notify: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Antenna']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * antennas/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'antennas/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + antennaId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * antennas/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + 'antennas/list': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Antenna'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * antennas/notes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + 'antennas/notes': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + antennaId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + sinceDate?: number; + untilDate?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * antennas/show + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + 'antennas/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + antennaId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Antenna']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * antennas/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'antennas/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + antennaId: string; + name: string; + /** @enum {string} */ + src: 'home' | 'all' | 'users' | 'list' | 'users_blacklist'; + /** Format: misskey:id */ + userListId?: string | null; + keywords: string[][]; + excludeKeywords: string[][]; + users: string[]; + caseSensitive: boolean; + localOnly?: boolean; + withReplies: boolean; + withFile: boolean; + notify: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Antenna']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * ap/get + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'ap/get': { + requestBody: { + content: { + 'application/json': { + uri: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': Record; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * ap/show + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'ap/show': { + requestBody: { + content: { + 'application/json': { + uri: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': OneOf<[{ + /** @enum {string} */ + type: 'User'; + object: components['schemas']['UserDetailedNotMe']; + }, { + /** @enum {string} */ + type: 'Note'; + object: components['schemas']['Note']; + }]>; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * app/create + * @description No description provided. + * + * **Credential required**: *No* + */ + 'app/create': { + requestBody: { + content: { + 'application/json': { + name: string; + description: string; + permission: string[]; + callbackUrl?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['App']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * app/show + * @description No description provided. + * + * **Credential required**: *No* + */ + 'app/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + appId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['App']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * auth/session/generate + * @description No description provided. + * + * **Credential required**: *No* + */ + 'auth/session/generate': { + requestBody: { + content: { + 'application/json': { + appSecret: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + token: string; + /** Format: url */ + url: string; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * auth/session/show + * @description No description provided. + * + * **Credential required**: *No* + */ + 'auth/session/show': { + requestBody: { + content: { + 'application/json': { + token: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** Format: id */ + id: string; + app: components['schemas']['App']; + token: string; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * auth/session/userkey + * @description No description provided. + * + * **Credential required**: *No* + */ + 'auth/session/userkey': { + requestBody: { + content: { + 'application/json': { + appSecret: string; + token: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + accessToken: string; + user: components['schemas']['UserDetailedNotMe']; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * blocking/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:blocks* + */ + 'blocking/create': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserDetailedNotMe']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * blocking/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:blocks* + */ + 'blocking/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserDetailedNotMe']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * blocking/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:blocks* + */ + 'blocking/list': { + requestBody: { + content: { + 'application/json': { + /** @default 30 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Blocking'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + 'channels/create': { + requestBody: { + content: { + 'application/json': { + name: string; + description?: string | null; + /** Format: misskey:id */ + bannerId?: string | null; + color?: string; + isSensitive?: boolean | null; + allowRenoteToExternal?: boolean | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Channel']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + 'channels/featured': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Channel'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/follow + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + 'channels/follow': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + channelId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/followed + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:channels* + */ + 'channels/followed': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 5 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Channel'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/owned + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:channels* + */ + 'channels/owned': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 5 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Channel'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/show + * @description No description provided. + * + * **Credential required**: *No* + */ + 'channels/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + channelId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Channel']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/timeline + * @description No description provided. + * + * **Credential required**: *No* + */ + 'channels/timeline': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + channelId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + sinceDate?: number; + untilDate?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/unfollow + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + 'channels/unfollow': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + channelId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + 'channels/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + channelId: string; + name?: string; + description?: string | null; + /** Format: misskey:id */ + bannerId?: string | null; + isArchived?: boolean | null; + pinnedNoteIds?: string[]; + color?: string; + isSensitive?: boolean | null; + allowRenoteToExternal?: boolean | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Channel']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/favorite + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + 'channels/favorite': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + channelId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/unfavorite + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + 'channels/unfavorite': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + channelId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/my-favorites + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:channels* + */ + 'channels/my-favorites': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Channel'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * channels/search + * @description No description provided. + * + * **Credential required**: *No* + */ + 'channels/search': { + requestBody: { + content: { + 'application/json': { + query: string; + /** + * @default nameAndDescription + * @enum {string} + */ + type?: 'nameAndDescription' | 'nameOnly'; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 5 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Channel'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/active-users + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/active-users': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + readWrite: number[]; + read: number[]; + write: number[]; + registeredWithinWeek: number[]; + registeredWithinMonth: number[]; + registeredWithinYear: number[]; + registeredOutsideWeek: number[]; + registeredOutsideMonth: number[]; + registeredOutsideYear: number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/ap-request + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/ap-request': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + deliverFailed: number[]; + deliverSucceeded: number[]; + inboxReceived: number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/drive + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/drive': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + 'local.incCount': number[]; + 'local.incSize': number[]; + 'local.decCount': number[]; + 'local.decSize': number[]; + 'remote.incCount': number[]; + 'remote.incSize': number[]; + 'remote.decCount': number[]; + 'remote.decSize': number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/federation + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/federation': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + deliveredInstances: number[]; + inboxInstances: number[]; + stalled: number[]; + sub: number[]; + pub: number[]; + pubsub: number[]; + subActive: number[]; + pubActive: number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/instance + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/instance': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + host: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + 'requests.failed': number[]; + 'requests.succeeded': number[]; + 'requests.received': number[]; + 'notes.total': number[]; + 'notes.inc': number[]; + 'notes.dec': number[]; + 'notes.diffs.normal': number[]; + 'notes.diffs.reply': number[]; + 'notes.diffs.renote': number[]; + 'notes.diffs.withFile': number[]; + 'users.total': number[]; + 'users.inc': number[]; + 'users.dec': number[]; + 'following.total': number[]; + 'following.inc': number[]; + 'following.dec': number[]; + 'followers.total': number[]; + 'followers.inc': number[]; + 'followers.dec': number[]; + 'drive.totalFiles': number[]; + 'drive.incFiles': number[]; + 'drive.decFiles': number[]; + 'drive.incUsage': number[]; + 'drive.decUsage': number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/notes + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/notes': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + 'local.total': number[]; + 'local.inc': number[]; + 'local.dec': number[]; + 'local.diffs.normal': number[]; + 'local.diffs.reply': number[]; + 'local.diffs.renote': number[]; + 'local.diffs.withFile': number[]; + 'remote.total': number[]; + 'remote.inc': number[]; + 'remote.dec': number[]; + 'remote.diffs.normal': number[]; + 'remote.diffs.reply': number[]; + 'remote.diffs.renote': number[]; + 'remote.diffs.withFile': number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/user/drive + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/user/drive': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + totalCount: number[]; + totalSize: number[]; + incCount: number[]; + incSize: number[]; + decCount: number[]; + decSize: number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/user/following + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/user/following': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + 'local.followings.total': number[]; + 'local.followings.inc': number[]; + 'local.followings.dec': number[]; + 'local.followers.total': number[]; + 'local.followers.inc': number[]; + 'local.followers.dec': number[]; + 'remote.followings.total': number[]; + 'remote.followings.inc': number[]; + 'remote.followings.dec': number[]; + 'remote.followers.total': number[]; + 'remote.followers.inc': number[]; + 'remote.followers.dec': number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/user/notes + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/user/notes': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + total: number[]; + inc: number[]; + dec: number[]; + 'diffs.normal': number[]; + 'diffs.reply': number[]; + 'diffs.renote': number[]; + 'diffs.withFile': number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/user/pv + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/user/pv': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + 'upv.user': number[]; + 'pv.user': number[]; + 'upv.visitor': number[]; + 'pv.visitor': number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/user/reactions + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/user/reactions': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + 'local.count': number[]; + 'remote.count': number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * charts/users + * @description No description provided. + * + * **Credential required**: *No* + */ + 'charts/users': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + span: 'day' | 'hour'; + /** @default 30 */ + limit?: number; + /** @default null */ + offset?: number | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + 'local.total': number[]; + 'local.inc': number[]; + 'local.dec': number[]; + 'remote.total': number[]; + 'remote.inc': number[]; + 'remote.dec': number[]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/add-note + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'clips/add-note': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + clipId: string; + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/remove-note + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'clips/remove-note': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + clipId: string; + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'clips/create': { + requestBody: { + content: { + 'application/json': { + name: string; + /** @default false */ + isPublic?: boolean; + description?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Clip']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'clips/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + clipId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + 'clips/list': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Clip'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/notes + * @description No description provided. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + 'clips/notes': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + clipId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/show + * @description No description provided. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + 'clips/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + clipId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Clip']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'clips/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + clipId: string; + name: string; + isPublic?: boolean; + description?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Clip']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/favorite + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:clip-favorite* + */ + 'clips/favorite': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + clipId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/unfavorite + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:clip-favorite* + */ + 'clips/unfavorite': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + clipId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * clips/my-favorites + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:clip-favorite* + */ + 'clips/my-favorites': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Clip'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + drive: { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + capacity: number; + usage: number; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/files + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + 'drive/files': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** + * Format: misskey:id + * @default null + */ + folderId?: string | null; + type?: string | null; + /** @enum {string|null} */ + sort?: '+createdAt' | '-createdAt' | '+name' | '-name' | '+size' | '-size' | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFile'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/files/attached-notes + * @description Find the notes to which the given file is attached. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + 'drive/files/attached-notes': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + fileId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/files/check-existence + * @description Check if a given file exists. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + 'drive/files/check-existence': { + requestBody: { + content: { + 'application/json': { + md5: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': boolean; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/files/create + * @description Upload a new drive file. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + 'drive/files/create': { + requestBody: { + content: { + 'multipart/form-data': { + /** + * Format: misskey:id + * @default null + */ + folderId?: string | null; + /** @default null */ + name?: string | null; + /** @default null */ + comment?: string | null; + /** @default false */ + isSensitive?: boolean; + /** @default false */ + force?: boolean; + /** + * Format: binary + * @description The file contents. + */ + file: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFile']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/files/delete + * @description Delete an existing drive file. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + 'drive/files/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + fileId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/files/find-by-hash + * @description Search for a drive file by a hash of the contents. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + 'drive/files/find-by-hash': { + requestBody: { + content: { + 'application/json': { + md5: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFile'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/files/find + * @description Search for a drive file by the given parameters. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + 'drive/files/find': { + requestBody: { + content: { + 'application/json': { + name: string; + /** + * Format: misskey:id + * @default null + */ + folderId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFile'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/files/show + * @description Show the properties of a drive file. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + 'drive/files/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + fileId?: string; + url?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFile']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/files/update + * @description Update the properties of a drive file. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + 'drive/files/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + fileId: string; + /** Format: misskey:id */ + folderId?: string | null; + name?: string; + isSensitive?: boolean; + comment?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFile']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/files/upload-from-url + * @description Request the server to download a new drive file from the specified URL. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + 'drive/files/upload-from-url': { + requestBody: { + content: { + 'application/json': { + url: string; + /** + * Format: misskey:id + * @default null + */ + folderId?: string | null; + /** @default false */ + isSensitive?: boolean; + /** @default null */ + comment?: string | null; + /** @default null */ + marker?: string | null; + /** @default false */ + force?: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/folders + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + 'drive/folders': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** + * Format: misskey:id + * @default null + */ + folderId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFolder'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/folders/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + 'drive/folders/create': { + requestBody: { + content: { + 'application/json': { + /** @default Untitled */ + name?: string; + /** Format: misskey:id */ + parentId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFolder']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/folders/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + 'drive/folders/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + folderId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/folders/find + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + 'drive/folders/find': { + requestBody: { + content: { + 'application/json': { + name: string; + /** + * Format: misskey:id + * @default null + */ + parentId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFolder'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/folders/show + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + 'drive/folders/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + folderId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFolder']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/folders/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + 'drive/folders/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + folderId: string; + name?: string; + /** Format: misskey:id */ + parentId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFolder']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * drive/stream + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + 'drive/stream': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + type?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['DriveFile'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * email-address/available + * @description No description provided. + * + * **Credential required**: *No* + */ + 'email-address/available': { + requestBody: { + content: { + 'application/json': { + emailAddress: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + available: boolean; + reason: string | null; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * endpoint + * @description No description provided. + * + * **Credential required**: *No* + */ + endpoint: { + requestBody: { + content: { + 'application/json': { + endpoint: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * endpoints + * @description No description provided. + * + * **Credential required**: *No* + */ + endpoints: { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': string[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * federation/followers + * @description No description provided. + * + * **Credential required**: *No* + */ + 'federation/followers': { + requestBody: { + content: { + 'application/json': { + host: string; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Following'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * federation/following + * @description No description provided. + * + * **Credential required**: *No* + */ + 'federation/following': { + requestBody: { + content: { + 'application/json': { + host: string; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Following'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * federation/instances + * @description No description provided. + * + * **Credential required**: *No* + */ + 'federation/instances': { + requestBody: { + content: { + 'application/json': { + /** @description Omit or use `null` to not filter by host. */ + host?: string | null; + blocked?: boolean | null; + notResponding?: boolean | null; + suspended?: boolean | null; + silenced?: boolean | null; + federating?: boolean | null; + subscribing?: boolean | null; + publishing?: boolean | null; + /** @default 30 */ + limit?: number; + /** @default 0 */ + offset?: number; + /** @enum {string|null} */ + sort?: '+pubSub' | '-pubSub' | '+notes' | '-notes' | '+users' | '-users' | '+following' | '-following' | '+followers' | '-followers' | '+firstRetrievedAt' | '-firstRetrievedAt' | '+latestRequestReceivedAt' | '-latestRequestReceivedAt' | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['FederationInstance'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * federation/show-instance + * @description No description provided. + * + * **Credential required**: *No* + */ + 'federation/show-instance': { + requestBody: { + content: { + 'application/json': { + host: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['FederationInstance'] | null; + }; + }; + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * federation/update-remote-user + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'federation/update-remote-user': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * federation/users + * @description No description provided. + * + * **Credential required**: *No* + */ + 'federation/users': { + requestBody: { + content: { + 'application/json': { + host: string; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserDetailedNotMe'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * federation/stats + * @description No description provided. + * + * **Credential required**: *No* + */ + 'federation/stats': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * following/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + 'following/create': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + withReplies?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserLite']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * following/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + 'following/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserLite']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * following/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + 'following/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + /** @enum {string} */ + notify?: 'normal' | 'none'; + withReplies?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserLite']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * following/update-all + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + 'following/update-all': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + notify?: 'normal' | 'none'; + withReplies?: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * following/invalidate + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + 'following/invalidate': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserLite']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * following/requests/accept + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + 'following/requests/accept': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * following/requests/cancel + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + 'following/requests/cancel': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserLite']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * following/requests/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:following* + */ + 'following/requests/list': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** Format: id */ + id: string; + follower: components['schemas']['UserLite']; + followee: components['schemas']['UserLite']; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * following/requests/reject + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + 'following/requests/reject': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * gallery/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + 'gallery/featured': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['GalleryPost'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * gallery/popular + * @description No description provided. + * + * **Credential required**: *No* + */ + 'gallery/popular': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['GalleryPost'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * gallery/posts + * @description No description provided. + * + * **Credential required**: *No* + */ + 'gallery/posts': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['GalleryPost'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * gallery/posts/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery* + */ + 'gallery/posts/create': { + requestBody: { + content: { + 'application/json': { + title: string; + description?: string | null; + fileIds: string[]; + /** @default false */ + isSensitive?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['GalleryPost']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * gallery/posts/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery* + */ + 'gallery/posts/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + postId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * gallery/posts/like + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery-likes* + */ + 'gallery/posts/like': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + postId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * gallery/posts/show + * @description No description provided. + * + * **Credential required**: *No* + */ + 'gallery/posts/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + postId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['GalleryPost']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * gallery/posts/unlike + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery-likes* + */ + 'gallery/posts/unlike': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + postId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * gallery/posts/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery* + */ + 'gallery/posts/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + postId: string; + title: string; + description?: string | null; + fileIds: string[]; + /** @default false */ + isSensitive?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['GalleryPost']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * get-online-users-count + * @description No description provided. + * + * **Credential required**: *No* + */ + 'get-online-users-count': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * get-avatar-decorations + * @description No description provided. + * + * **Credential required**: *No* + */ + 'get-avatar-decorations': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + name: string; + description: string; + url: string; + roleIdsThatCanBeUsedThisDecoration: string[]; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * hashtags/list + * @description No description provided. + * + * **Credential required**: *No* + */ + 'hashtags/list': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** @default false */ + attachedToUserOnly?: boolean; + /** @default false */ + attachedToLocalUserOnly?: boolean; + /** @default false */ + attachedToRemoteUserOnly?: boolean; + /** @enum {string} */ + sort: '+mentionedUsers' | '-mentionedUsers' | '+mentionedLocalUsers' | '-mentionedLocalUsers' | '+mentionedRemoteUsers' | '-mentionedRemoteUsers' | '+attachedUsers' | '-attachedUsers' | '+attachedLocalUsers' | '-attachedLocalUsers' | '+attachedRemoteUsers' | '-attachedRemoteUsers'; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Hashtag'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * hashtags/search + * @description No description provided. + * + * **Credential required**: *No* + */ + 'hashtags/search': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + query: string; + /** @default 0 */ + offset?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': string[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * hashtags/show + * @description No description provided. + * + * **Credential required**: *No* + */ + 'hashtags/show': { + requestBody: { + content: { + 'application/json': { + tag: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Hashtag']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * hashtags/trend + * @description No description provided. + * + * **Credential required**: *No* + */ + 'hashtags/trend': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + tag: string; + chart: number[]; + usersCount: number; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * hashtags/users + * @description No description provided. + * + * **Credential required**: *No* + */ + 'hashtags/users': { + requestBody: { + content: { + 'application/json': { + tag: string; + /** @default 10 */ + limit?: number; + /** @enum {string} */ + sort: '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt'; + /** + * @default all + * @enum {string} + */ + state?: 'all' | 'alive'; + /** + * @default local + * @enum {string} + */ + origin?: 'combined' | 'local' | 'remote'; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserDetailed'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i + * @description No description provided. + * + * **Credential required**: *Yes* + */ + i: { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['MeDetailed']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/claim-achievement + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'i/claim-achievement': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + name: 'notes1' | 'notes10' | 'notes100' | 'notes500' | 'notes1000' | 'notes5000' | 'notes10000' | 'notes20000' | 'notes30000' | 'notes40000' | 'notes50000' | 'notes60000' | 'notes70000' | 'notes80000' | 'notes90000' | 'notes100000' | 'login3' | 'login7' | 'login15' | 'login30' | 'login60' | 'login100' | 'login200' | 'login300' | 'login400' | 'login500' | 'login600' | 'login700' | 'login800' | 'login900' | 'login1000' | 'passedSinceAccountCreated1' | 'passedSinceAccountCreated2' | 'passedSinceAccountCreated3' | 'loggedInOnBirthday' | 'loggedInOnNewYearsDay' | 'noteClipped1' | 'noteFavorited1' | 'myNoteFavorited1' | 'profileFilled' | 'markedAsCat' | 'following1' | 'following10' | 'following50' | 'following100' | 'following300' | 'followers1' | 'followers10' | 'followers50' | 'followers100' | 'followers300' | 'followers500' | 'followers1000' | 'collectAchievements30' | 'viewAchievements3min' | 'iLoveMisskey' | 'foundTreasure' | 'client30min' | 'client60min' | 'noteDeletedWithin1min' | 'postedAtLateNight' | 'postedAt0min0sec' | 'selfQuote' | 'htl20npm' | 'viewInstanceChart' | 'outputHelloWorldOnScratchpad' | 'open3windows' | 'driveFolderCircularReference' | 'reactWithoutRead' | 'clickedClickHere' | 'justPlainLucky' | 'setNameToSyuilo' | 'cookieClicked' | 'brainDiver' | 'smashTestNotificationButton' | 'tutorialCompleted'; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/favorites + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:favorites* + */ + 'i/favorites': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['NoteFavorite'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/gallery/likes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:gallery-likes* + */ + 'i/gallery/likes': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** Format: id */ + id: string; + post: components['schemas']['GalleryPost']; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/gallery/posts + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:gallery* + */ + 'i/gallery/posts': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['GalleryPost'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/notifications + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:notifications* + */ + 'i/notifications': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default true */ + markAsRead?: boolean; + includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; + excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Notification'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/notifications-grouped + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:notifications* + */ + 'i/notifications-grouped': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default true */ + markAsRead?: boolean; + includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; + excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Notification'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/page-likes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:page-likes* + */ + 'i/page-likes': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** Format: id */ + id: string; + page: components['schemas']['Page']; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/pages + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:pages* + */ + 'i/pages': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Page'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/pin + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'i/pin': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['MeDetailed']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/read-all-unread-notes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'i/read-all-unread-notes': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/read-announcement + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'i/read-announcement': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + announcementId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/registry/get-all + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'i/registry/get-all': { + requestBody: { + content: { + 'application/json': { + /** @default [] */ + scope: string[]; + domain?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/registry/get-detail + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'i/registry/get-detail': { + requestBody: { + content: { + 'application/json': { + key: string; + /** @default [] */ + scope: string[]; + domain?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/registry/get + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'i/registry/get': { + requestBody: { + content: { + 'application/json': { + key: string; + /** @default [] */ + scope: string[]; + domain?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/registry/keys-with-type + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'i/registry/keys-with-type': { + requestBody: { + content: { + 'application/json': { + /** @default [] */ + scope: string[]; + domain?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/registry/keys + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'i/registry/keys': { + requestBody: { + content: { + 'application/json': { + /** @default [] */ + scope: string[]; + domain?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/registry/remove + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'i/registry/remove': { + requestBody: { + content: { + 'application/json': { + key: string; + /** @default [] */ + scope: string[]; + domain?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/registry/set + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'i/registry/set': { + requestBody: { + content: { + 'application/json': { + key: string; + value: unknown; + /** @default [] */ + scope: string[]; + domain?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/unpin + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'i/unpin': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['MeDetailed']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'i/update': { + requestBody: { + content: { + 'application/json': { + name?: string | null; + description?: string | null; + location?: string | null; + birthday?: string | null; + /** @enum {string|null} */ + lang?: null | 'ach' | 'ady' | 'af' | 'af-NA' | 'af-ZA' | 'ak' | 'ar' | 'ar-AR' | 'ar-MA' | 'ar-SA' | 'ay-BO' | 'az' | 'az-AZ' | 'be-BY' | 'bg' | 'bg-BG' | 'bn' | 'bn-IN' | 'bn-BD' | 'br' | 'bs-BA' | 'ca' | 'ca-ES' | 'cak' | 'ck-US' | 'cs' | 'cs-CZ' | 'cy' | 'cy-GB' | 'da' | 'da-DK' | 'de' | 'de-AT' | 'de-DE' | 'de-CH' | 'dsb' | 'el' | 'el-GR' | 'en' | 'en-GB' | 'en-AU' | 'en-CA' | 'en-IE' | 'en-IN' | 'en-PI' | 'en-SG' | 'en-UD' | 'en-US' | 'en-ZA' | 'en@pirate' | 'eo' | 'eo-EO' | 'es' | 'es-AR' | 'es-419' | 'es-CL' | 'es-CO' | 'es-EC' | 'es-ES' | 'es-LA' | 'es-NI' | 'es-MX' | 'es-US' | 'es-VE' | 'et' | 'et-EE' | 'eu' | 'eu-ES' | 'fa' | 'fa-IR' | 'fb-LT' | 'ff' | 'fi' | 'fi-FI' | 'fo' | 'fo-FO' | 'fr' | 'fr-CA' | 'fr-FR' | 'fr-BE' | 'fr-CH' | 'fy-NL' | 'ga' | 'ga-IE' | 'gd' | 'gl' | 'gl-ES' | 'gn-PY' | 'gu-IN' | 'gv' | 'gx-GR' | 'he' | 'he-IL' | 'hi' | 'hi-IN' | 'hr' | 'hr-HR' | 'hsb' | 'ht' | 'hu' | 'hu-HU' | 'hy' | 'hy-AM' | 'id' | 'id-ID' | 'is' | 'is-IS' | 'it' | 'it-IT' | 'ja' | 'ja-JP' | 'jv-ID' | 'ka-GE' | 'kk-KZ' | 'km' | 'kl' | 'km-KH' | 'kab' | 'kn' | 'kn-IN' | 'ko' | 'ko-KR' | 'ku-TR' | 'kw' | 'la' | 'la-VA' | 'lb' | 'li-NL' | 'lt' | 'lt-LT' | 'lv' | 'lv-LV' | 'mai' | 'mg-MG' | 'mk' | 'mk-MK' | 'ml' | 'ml-IN' | 'mn-MN' | 'mr' | 'mr-IN' | 'ms' | 'ms-MY' | 'mt' | 'mt-MT' | 'my' | 'no' | 'nb' | 'nb-NO' | 'ne' | 'ne-NP' | 'nl' | 'nl-BE' | 'nl-NL' | 'nn-NO' | 'oc' | 'or-IN' | 'pa' | 'pa-IN' | 'pl' | 'pl-PL' | 'ps-AF' | 'pt' | 'pt-BR' | 'pt-PT' | 'qu-PE' | 'rm-CH' | 'ro' | 'ro-RO' | 'ru' | 'ru-RU' | 'sa-IN' | 'se-NO' | 'sh' | 'si-LK' | 'sk' | 'sk-SK' | 'sl' | 'sl-SI' | 'so-SO' | 'sq' | 'sq-AL' | 'sr' | 'sr-RS' | 'su' | 'sv' | 'sv-SE' | 'sw' | 'sw-KE' | 'ta' | 'ta-IN' | 'te' | 'te-IN' | 'tg' | 'tg-TJ' | 'th' | 'th-TH' | 'fil' | 'tlh' | 'tr' | 'tr-TR' | 'tt-RU' | 'uk' | 'uk-UA' | 'ur' | 'ur-PK' | 'uz' | 'uz-UZ' | 'vi' | 'vi-VN' | 'xh-ZA' | 'yi' | 'yi-DE' | 'zh' | 'zh-Hans' | 'zh-Hant' | 'zh-CN' | 'zh-HK' | 'zh-SG' | 'zh-TW' | 'zu-ZA'; + /** Format: misskey:id */ + avatarId?: string | null; + avatarDecorations?: ({ + /** Format: misskey:id */ + id: string; + angle?: number | null; + flipH?: boolean | null; + })[]; + /** Format: misskey:id */ + bannerId?: string | null; + fields?: { + name: string; + value: string; + }[]; + isLocked?: boolean; + isExplorable?: boolean; + hideOnlineStatus?: boolean; + publicReactions?: boolean; + carefulBot?: boolean; + autoAcceptFollowed?: boolean; + noCrawle?: boolean; + preventAiLearning?: boolean; + isBot?: boolean; + isCat?: boolean; + injectFeaturedNote?: boolean; + receiveAnnouncementEmail?: boolean; + alwaysMarkNsfw?: boolean; + autoSensitive?: boolean; + /** @enum {string} */ + ffVisibility?: 'public' | 'followers' | 'private'; + /** Format: misskey:id */ + pinnedPageId?: string | null; + mutedWords?: (string[] | string)[]; + hardMutedWords?: (string[] | string)[]; + mutedInstances?: string[]; + notificationRecieveConfig?: Record; + emailNotificationTypes?: string[]; + alsoKnownAs?: string[]; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['MeDetailed']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/webhooks/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'i/webhooks/create': { + requestBody: { + content: { + 'application/json': { + name: string; + url: string; + /** @default */ + secret?: string; + on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction')[]; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/webhooks/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + 'i/webhooks/list': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/webhooks/show + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + 'i/webhooks/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + webhookId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/webhooks/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'i/webhooks/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + webhookId: string; + name: string; + url: string; + /** @default */ + secret?: string; + on: ('mention' | 'unfollow' | 'follow' | 'followed' | 'note' | 'reply' | 'renote' | 'reaction')[]; + active: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/webhooks/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'i/webhooks/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + webhookId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * invite/create + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'invite/create': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** @example GR6S02ERUA5VR */ + code: string; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * invite/delete + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'invite/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + inviteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * invite/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'invite/list': { + requestBody: { + content: { + 'application/json': { + /** @default 30 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['InviteCode'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * invite/limit + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'invite/limit': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + remaining: number | null; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * meta + * @description No description provided. + * + * **Credential required**: *No* + */ + meta: { + requestBody: { + content: { + 'application/json': { + /** @default true */ + detail?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + maintainerName: string | null; + maintainerEmail: string | null; + version: string; + name: string; + shortName: string | null; + /** + * Format: url + * @example https://misskey.example.com + */ + uri: string; + description: string | null; + langs: string[]; + tosUrl: string | null; + /** @default https://github.com/misskey-dev/misskey */ + repositoryUrl: string; + /** @default https://github.com/misskey-dev/misskey/issues/new */ + feedbackUrl: string; + defaultDarkTheme: string | null; + defaultLightTheme: string | null; + disableRegistration: boolean; + cacheRemoteFiles: boolean; + cacheRemoteSensitiveFiles: boolean; + emailRequiredForSignup: boolean; + enableHcaptcha: boolean; + hcaptchaSiteKey: string | null; + enableRecaptcha: boolean; + recaptchaSiteKey: string | null; + enableTurnstile: boolean; + turnstileSiteKey: string | null; + swPublickey: string | null; + /** @default /assets/ai.png */ + mascotImageUrl: string; + bannerUrl: string; + serverErrorImageUrl: string | null; + infoImageUrl: string | null; + notFoundImageUrl: string | null; + iconUrl: string | null; + maxNoteTextLength: number; + ads: { + place: string; + /** Format: url */ + url: string; + /** Format: url */ + imageUrl: string; + }[]; + /** @default 0 */ + notesPerOneAd: number; + /** @example false */ + requireSetup: boolean; + enableEmail: boolean; + enableServiceWorker: boolean; + translatorAvailable: boolean; + proxyAccountName: string | null; + mediaProxy: string; + features?: { + registration: boolean; + localTimeline: boolean; + globalTimeline: boolean; + hcaptcha: boolean; + recaptcha: boolean; + objectStorage: boolean; + serviceWorker: boolean; + /** @default true */ + miauth?: boolean; + }; + backgroundImageUrl: string | null; + impressumUrl: string | null; + logoImageUrl: string | null; + privacyPolicyUrl: string | null; + serverRules: string[]; + themeColor: string | null; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * emojis + * @description No description provided. + * + * **Credential required**: *No* + */ + emojis: { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + emojis: components['schemas']['EmojiSimple'][]; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * emoji + * @description No description provided. + * + * **Credential required**: *No* + */ + emoji: { + requestBody: { + content: { + 'application/json': { + name: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['EmojiDetailed']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * mute/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + 'mute/create': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + /** @description A Unix Epoch timestamp that must lie in the future. `null` means an indefinite mute. */ + expiresAt?: number | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * mute/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + 'mute/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * mute/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:mutes* + */ + 'mute/list': { + requestBody: { + content: { + 'application/json': { + /** @default 30 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Muting'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * renote-mute/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + 'renote-mute/create': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * renote-mute/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + 'renote-mute/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * renote-mute/list + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:mutes* + */ + 'renote-mute/list': { + requestBody: { + content: { + 'application/json': { + /** @default 30 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['RenoteMuting'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * my/apps + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'my/apps': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** @default 0 */ + offset?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['App'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes + * @description No description provided. + * + * **Credential required**: *No* + */ + notes: { + requestBody: { + content: { + 'application/json': { + /** @default false */ + local?: boolean; + reply?: boolean; + renote?: boolean; + withFiles?: boolean; + poll?: boolean; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/children + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/children': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/clips + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/clips': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Clip'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/conversation + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/conversation': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + /** @default 10 */ + limit?: number; + /** @default 0 */ + offset?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notes* + */ + 'notes/create': { + requestBody: { + content: { + 'application/json': { + /** + * @default public + * @enum {string} + */ + visibility?: 'public' | 'home' | 'followers' | 'specified'; + visibleUserIds?: string[]; + cw?: string | null; + /** @default false */ + localOnly?: boolean; + /** + * @default null + * @enum {string|null} + */ + reactionAcceptance?: null | 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote'; + /** @default false */ + noExtractMentions?: boolean; + /** @default false */ + noExtractHashtags?: boolean; + /** @default false */ + noExtractEmojis?: boolean; + /** Format: misskey:id */ + replyId?: string | null; + /** Format: misskey:id */ + renoteId?: string | null; + /** Format: misskey:id */ + channelId?: string | null; + text?: string | null; + fileIds?: string[]; + mediaIds?: string[]; + poll?: ({ + choices: string[]; + multiple?: boolean; + expiresAt?: number | null; + expiredAfter?: number | null; + }) | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + createdNote: components['schemas']['Note']; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notes* + */ + 'notes/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/favorites/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:favorites* + */ + 'notes/favorites/create': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/favorites/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:favorites* + */ + 'notes/favorites/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/featured': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + untilId?: string; + /** Format: misskey:id */ + channelId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/global-timeline + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/global-timeline': { + requestBody: { + content: { + 'application/json': { + /** @default false */ + withFiles?: boolean; + /** @default true */ + withRenotes?: boolean; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + sinceDate?: number; + untilDate?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/hybrid-timeline + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'notes/hybrid-timeline': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + sinceDate?: number; + untilDate?: number; + /** @default true */ + includeMyRenotes?: boolean; + /** @default true */ + includeRenotedMyNotes?: boolean; + /** @default true */ + includeLocalRenotes?: boolean; + /** @default false */ + withFiles?: boolean; + /** @default true */ + withRenotes?: boolean; + /** @default false */ + withReplies?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/local-timeline + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/local-timeline': { + requestBody: { + content: { + 'application/json': { + /** @default false */ + withFiles?: boolean; + /** @default true */ + withRenotes?: boolean; + /** @default false */ + withReplies?: boolean; + /** @default false */ + excludeNsfw?: boolean; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + sinceDate?: number; + untilDate?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/mentions + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'notes/mentions': { + requestBody: { + content: { + 'application/json': { + /** @default false */ + following?: boolean; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + visibility?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/polls/recommendation + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'notes/polls/recommendation': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** @default 0 */ + offset?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/polls/vote + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:votes* + */ + 'notes/polls/vote': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + choice: number; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/reactions + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/reactions': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + type?: string | null; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['NoteReaction'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/reactions/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:reactions* + */ + 'notes/reactions/create': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + reaction: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/reactions/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:reactions* + */ + 'notes/reactions/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/renotes + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/renotes': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/replies + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/replies': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/search-by-tag + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/search-by-tag': { + requestBody: { + content: { + 'application/json': { + /** @default null */ + reply?: boolean | null; + /** @default null */ + renote?: boolean | null; + /** + * @description Only show notes that have attached files. + * @default false + */ + withFiles?: boolean; + /** @default null */ + poll?: boolean | null; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + tag?: string; + /** @description The outer arrays are chained with OR, the inner arrays are chained with AND. */ + query?: string[][]; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/search + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/search': { + requestBody: { + content: { + 'application/json': { + query: string; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + /** @default 0 */ + offset?: number; + /** @description The local host is represented with `.`. */ + host?: string; + /** + * Format: misskey:id + * @default null + */ + userId?: string | null; + /** + * Format: misskey:id + * @default null + */ + channelId?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/show + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/state + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'notes/state': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + isFavorited: boolean; + isMutedThread: boolean; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/thread-muting/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'notes/thread-muting/create': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/thread-muting/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'notes/thread-muting/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/timeline + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'notes/timeline': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + sinceDate?: number; + untilDate?: number; + /** @default true */ + includeMyRenotes?: boolean; + /** @default true */ + includeRenotedMyNotes?: boolean; + /** @default true */ + includeLocalRenotes?: boolean; + /** @default false */ + withFiles?: boolean; + /** @default true */ + withRenotes?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/translate + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'notes/translate': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + targetLang: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': Record; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/unrenote + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notes* + */ + 'notes/unrenote': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notes/user-list-timeline + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'notes/user-list-timeline': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + listId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + sinceDate?: number; + untilDate?: number; + /** @default true */ + includeMyRenotes?: boolean; + /** @default true */ + includeRenotedMyNotes?: boolean; + /** @default true */ + includeLocalRenotes?: boolean; + /** @default true */ + withRenotes?: boolean; + /** + * @description Only show notes that have attached files. + * @default false + */ + withFiles?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notifications/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notifications* + */ + 'notifications/create': { + requestBody: { + content: { + 'application/json': { + body: string; + header?: string | null; + icon?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notifications/mark-all-as-read + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notifications* + */ + 'notifications/mark-all-as-read': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * notifications/test-notification + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notifications* + */ + 'notifications/test-notification': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * pages/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:pages* + */ + 'pages/create': { + requestBody: { + content: { + 'application/json': { + title: string; + name: string; + summary?: string | null; + content: { + [key: string]: unknown; + }[]; + variables: { + [key: string]: unknown; + }[]; + script: string; + /** Format: misskey:id */ + eyeCatchingImageId?: string | null; + /** + * @default sans-serif + * @enum {string} + */ + font?: 'serif' | 'sans-serif'; + /** @default false */ + alignCenter?: boolean; + /** @default false */ + hideTitleWhenPinned?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Page']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * pages/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:pages* + */ + 'pages/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + pageId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * pages/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + 'pages/featured': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Page'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * pages/like + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:page-likes* + */ + 'pages/like': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + pageId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * pages/show + * @description No description provided. + * + * **Credential required**: *No* + */ + 'pages/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + pageId?: string; + name?: string; + username?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Page']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * pages/unlike + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:page-likes* + */ + 'pages/unlike': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + pageId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * pages/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:pages* + */ + 'pages/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + pageId: string; + title: string; + name: string; + summary?: string | null; + content: { + [key: string]: unknown; + }[]; + variables: { + [key: string]: unknown; + }[]; + script: string; + /** Format: misskey:id */ + eyeCatchingImageId?: string | null; + /** @enum {string} */ + font?: 'serif' | 'sans-serif'; + alignCenter?: boolean; + hideTitleWhenPinned?: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * flash/create + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash* + */ + 'flash/create': { + requestBody: { + content: { + 'application/json': { + title: string; + summary: string; + script: string; + permissions: string[]; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * flash/delete + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash* + */ + 'flash/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + flashId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * flash/featured + * @description No description provided. + * + * **Credential required**: *No* + */ + 'flash/featured': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Flash'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * flash/like + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash-likes* + */ + 'flash/like': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + flashId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * flash/show + * @description No description provided. + * + * **Credential required**: *No* + */ + 'flash/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + flashId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Flash']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * flash/unlike + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash-likes* + */ + 'flash/unlike': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + flashId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * flash/update + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash* + */ + 'flash/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + flashId: string; + title: string; + summary: string; + script: string; + permissions: string[]; + /** @enum {string} */ + visibility?: 'public' | 'private'; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * flash/my + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:flash* + */ + 'flash/my': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Flash'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * flash/my-likes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:flash-likes* + */ + 'flash/my-likes': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** Format: id */ + id: string; + flash: components['schemas']['Flash']; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * ping + * @description No description provided. + * + * **Credential required**: *No* + */ + ping: { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + pong: number; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * pinned-users + * @description No description provided. + * + * **Credential required**: *No* + */ + 'pinned-users': { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserDetailed'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * promo/read + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'promo/read': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * roles/list + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'roles/list': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * roles/show + * @description No description provided. + * + * **Credential required**: *No* + */ + 'roles/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roleId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * roles/users + * @description No description provided. + * + * **Credential required**: *No* + */ + 'roles/users': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roleId: string; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * roles/notes + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'roles/notes': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + roleId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + sinceDate?: number; + untilDate?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * request-reset-password + * @description Request a users password to be reset. + * + * **Credential required**: *No* + */ + 'request-reset-password': { + requestBody: { + content: { + 'application/json': { + username: string; + email: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * reset-db + * @description Only available when running with NODE_ENV=testing. Reset the database and flush Redis. + * + * **Credential required**: *No* + */ + 'reset-db': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * reset-password + * @description Complete the password reset that was previously requested. + * + * **Credential required**: *No* + */ + 'reset-password': { + requestBody: { + content: { + 'application/json': { + token: string; + password: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * server-info + * @description No description provided. + * + * **Credential required**: *No* + */ + 'server-info': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * stats + * @description No description provided. + * + * **Credential required**: *No* + */ + stats: { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + notesCount: number; + originalNotesCount: number; + usersCount: number; + originalUsersCount: number; + instances: number; + driveUsageLocal: number; + driveUsageRemote: number; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * sw/show-registration + * @description Check push notification registration exists. + * + * **Credential required**: *Yes* + */ + 'sw/show-registration': { + requestBody: { + content: { + 'application/json': { + endpoint: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + userId: string; + endpoint: string; + sendReadMessage: boolean; + } | null; + }; + }; + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * sw/update-registration + * @description Update push notification registration. + * + * **Credential required**: *Yes* + */ + 'sw/update-registration': { + requestBody: { + content: { + 'application/json': { + endpoint: string; + sendReadMessage?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + userId: string; + endpoint: string; + sendReadMessage: boolean; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * sw/register + * @description Register to receive push notifications. + * + * **Credential required**: *Yes* + */ + 'sw/register': { + requestBody: { + content: { + 'application/json': { + endpoint: string; + auth: string; + publickey: string; + /** @default false */ + sendReadMessage?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** @enum {string} */ + state?: 'already-subscribed' | 'subscribed'; + key: string | null; + userId: string; + endpoint: string; + sendReadMessage: boolean; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * sw/unregister + * @description Unregister from receiving push notifications. + * + * **Credential required**: *No* + */ + 'sw/unregister': { + requestBody: { + content: { + 'application/json': { + endpoint: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * test + * @description Endpoint for testing input validation. + * + * **Credential required**: *No* + */ + test: { + requestBody: { + content: { + 'application/json': { + required: boolean; + string?: string; + /** @default hello */ + default?: string; + /** @default hello */ + nullableDefault?: string | null; + /** Format: misskey:id */ + id?: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * username/available + * @description No description provided. + * + * **Credential required**: *No* + */ + 'username/available': { + requestBody: { + content: { + 'application/json': { + username: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + available: boolean; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users + * @description No description provided. + * + * **Credential required**: *No* + */ + users: { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** @default 0 */ + offset?: number; + /** @enum {string} */ + sort?: '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt'; + /** + * @default all + * @enum {string} + */ + state?: 'all' | 'alive'; + /** + * @default local + * @enum {string} + */ + origin?: 'combined' | 'local' | 'remote'; + /** + * @description The local host is represented with `null`. + * @default null + */ + hostname?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserDetailed'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/clips + * @description Show all clips this user owns. + * + * **Credential required**: *No* + */ + 'users/clips': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Clip'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/followers + * @description Show everyone that follows this user. + * + * **Credential required**: *No* + */ + 'users/followers': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + userId?: string; + username?: string; + /** @description The local host is represented with `null`. */ + host?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Following'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/following + * @description Show everyone that this user is following. + * + * **Credential required**: *No* + */ + 'users/following': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + userId?: string; + username?: string; + /** @description The local host is represented with `null`. */ + host?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Following'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/gallery/posts + * @description Show all gallery posts by the given user. + * + * **Credential required**: *No* + */ + 'users/gallery/posts': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['GalleryPost'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/get-frequently-replied-users + * @description Get a list of other users that the specified user frequently replies to. + * + * **Credential required**: *No* + */ + 'users/get-frequently-replied-users': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + /** @default 10 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + user: components['schemas']['UserDetailed']; + weight: number; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/featured-notes + * @description No description provided. + * + * **Credential required**: *No* + */ + 'users/featured-notes': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + untilId?: string; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/create + * @description Create a new list of users. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'users/lists/create': { + requestBody: { + content: { + 'application/json': { + name: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserList']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/delete + * @description Delete an existing list of users. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'users/lists/delete': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + listId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/list + * @description Show all lists that the authenticated user has created. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + 'users/lists/list': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserList'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/pull + * @description Remove a user from a list. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'users/lists/pull': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + listId: string; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/push + * @description Add a user to an existing list. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'users/lists/push': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + listId: string; + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/show + * @description Show the properties of a list. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + 'users/lists/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + listId: string; + /** @default false */ + forPublic?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserList']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/favorite + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'users/lists/favorite': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + listId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/unfavorite + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'users/lists/unfavorite': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + listId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/update + * @description Update the properties of a list. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'users/lists/update': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + listId: string; + name?: string; + isPublic?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserList']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/create-from-public + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'users/lists/create-from-public': { + requestBody: { + content: { + 'application/json': { + name: string; + /** Format: misskey:id */ + listId: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserList']; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/update-membership + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'users/lists/update-membership': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + listId: string; + /** Format: misskey:id */ + userId: string; + withReplies?: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/lists/get-memberships + * @description No description provided. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + 'users/lists/get-memberships': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + listId: string; + /** @default false */ + forPublic?: boolean; + /** @default 30 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/notes + * @description No description provided. + * + * **Credential required**: *No* + */ + 'users/notes': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + /** @default false */ + withReplies?: boolean; + /** @default true */ + withRenotes?: boolean; + /** @default false */ + withChannelNotes?: boolean; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + sinceDate?: number; + untilDate?: number; + /** @default false */ + withFiles?: boolean; + /** @default false */ + excludeNsfw?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/pages + * @description Show all pages this user created. + * + * **Credential required**: *No* + */ + 'users/pages': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Page'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/flashs + * @description Show all flashs this user created. + * + * **Credential required**: *No* + */ + 'users/flashs': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Flash'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/reactions + * @description Show all reactions this user made. + * + * **Credential required**: *No* + */ + 'users/reactions': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + sinceDate?: number; + untilDate?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['NoteReaction'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/recommendation + * @description Show users that the authenticated user might be interested to follow. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + 'users/recommendation': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** @default 0 */ + offset?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserDetailed'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/relation + * @description Show the different kinds of relations between the authenticated user and the specified user(s). + * + * **Credential required**: *Yes* + */ + 'users/relation': { + requestBody: { + content: { + 'application/json': { + userId: string | string[]; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': OneOf<[{ + /** Format: id */ + id: string; + isFollowing: boolean; + hasPendingFollowRequestFromYou: boolean; + hasPendingFollowRequestToYou: boolean; + isFollowed: boolean; + isBlocking: boolean; + isBlocked: boolean; + isMuted: boolean; + isRenoteMuted: boolean; + }, { + /** Format: id */ + id: string; + isFollowing: boolean; + hasPendingFollowRequestFromYou: boolean; + hasPendingFollowRequestToYou: boolean; + isFollowed: boolean; + isBlocking: boolean; + isBlocked: boolean; + isMuted: boolean; + isRenoteMuted: boolean; + }[]]>; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/report-abuse + * @description File a report. + * + * **Credential required**: *Yes* + */ + 'users/report-abuse': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + comment: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/search-by-username-and-host + * @description Search for a user by username and/or host. + * + * **Credential required**: *No* + */ + 'users/search-by-username-and-host': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** @default true */ + detail?: boolean; + username?: string | null; + host?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['User'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/search + * @description Search for users. + * + * **Credential required**: *No* + */ + 'users/search': { + requestBody: { + content: { + 'application/json': { + query: string; + /** @default 0 */ + offset?: number; + /** @default 10 */ + limit?: number; + /** + * @default combined + * @enum {string} + */ + origin?: 'local' | 'remote' | 'combined'; + /** @default true */ + detail?: boolean; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['User'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/show + * @description Show the properties of a user. + * + * **Credential required**: *No* + */ + 'users/show': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId?: string; + userIds?: string[]; + username?: string; + /** @description The local host is represented with `null`. */ + host?: string | null; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['UserDetailed'] | components['schemas']['UserDetailed'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/achievements + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'users/achievements': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * users/update-memo + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'users/update-memo': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + userId: string; + /** @description A personal memo for the target user. If null or empty, delete the memo. */ + memo: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * fetch-rss + * @description No description provided. + * + * **Credential required**: *No* + */ + 'fetch-rss': { + requestBody: { + content: { + 'application/json': { + url: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * fetch-external-resources + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'fetch-external-resources': { + requestBody: { + content: { + 'application/json': { + url: string; + hash: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * retention + * @description No description provided. + * + * **Credential required**: *No* + */ + retention: { + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': unknown; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; +}; + diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts index 2ddcf93f5d..b1d6b5c10f 100644 --- a/packages/misskey-js/src/entities.ts +++ b/packages/misskey-js/src/entities.ts @@ -1,455 +1,11 @@ import { ModerationLogPayloads, notificationTypes } from './consts.js'; +import { Page, User, UserDetailed } from './autogen/models'; +export * from './autogen/entities'; +export * from './autogen/models'; export type ID = string; export type DateString = string; -type TODO = Record; - -// NOTE: 極力この型を使うのは避け、UserLite か UserDetailed か明示するように -export type User = UserLite | UserDetailed; - -export type UserLite = { - id: ID; - username: string; - host: string | null; - name: string | null; - onlineStatus: 'online' | 'active' | 'offline' | 'unknown'; - avatarUrl: string; - avatarBlurhash: string; - avatarDecorations: { - id: ID; - url: string; - angle?: number; - flipH?: boolean; - }[]; - emojis: { - name: string; - url: string; - }[]; - instance?: { - name: Instance['name']; - softwareName: Instance['softwareName']; - softwareVersion: Instance['softwareVersion']; - iconUrl: Instance['iconUrl']; - faviconUrl: Instance['faviconUrl']; - themeColor: Instance['themeColor']; - }; - isCat?: boolean; - isBot?: boolean; -}; - -export type UserDetailed = UserLite & { - alsoKnownAs: string[]; - 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}[]; - verifiedLinks: 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; - isSilenced: boolean; - isSuspended: boolean; - lang: string | null; - lastFetchedAt?: DateString; - location: string | null; - movedTo: string; - 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; - notify: 'normal' | 'none'; -}; - -export type UserGroup = TODO; - -export type UserList = { - id: ID; - createdAt: DateString; - name: string; - userIds: User['id'][]; -}; - -export type MeDetailed = UserDetailed & { - avatarId: DriveFile['id']; - bannerId: DriveFile['id']; - autoAcceptFollowed: boolean; - alwaysMarkNsfw: boolean; - carefulBot: boolean; - emailNotificationTypes: string[]; - hasPendingReceivedFollowRequest: boolean; - hasUnreadAnnouncement: boolean; - hasUnreadAntenna: boolean; - hasUnreadMentions: boolean; - hasUnreadMessagingMessage: boolean; - hasUnreadNotification: boolean; - hasUnreadSpecifiedNotes: boolean; - unreadNotificationsCount: number; - hideOnlineStatus: boolean; - injectFeaturedNote: boolean; - integrations: Record; - isDeleted: boolean; - isExplorable: boolean; - mutedWords: (string[] | string)[]; - hardMutedWords: (string[] | string)[]; - notificationRecieveConfig: { - [notificationType in typeof notificationTypes[number]]?: { - type: 'all'; - } | { - type: 'never'; - } | { - type: 'following'; - } | { - type: 'follower'; - } | { - type: 'mutualFollow'; - } | { - type: 'list'; - userListId: string; - }; - }; - noCrawle: boolean; - receiveAnnouncementEmail: boolean; - usePasswordLessLogin: boolean; - unreadAnnouncements: Announcement[]; - twoFactorBackupCodesStock: 'full' | 'partial' | 'none'; - [other: string]: any; -}; - -export type MeDetailedWithSecret = MeDetailed & { - email: string; - emailVerified: boolean; - securityKeysList: { - id: string; - name: string; - lastUsed: string; - }[]; -}; - -export type MeSignup = MeDetailedWithSecret & { - token: string; -}; - -export 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; -}; - -export type DriveFolder = TODO; - -export type GalleryPost = { - id: ID; - createdAt: DateString; - updatedAt: DateString; - userId: User['id']; - user: User; - title: string; - description: string | null; - fileIds: DriveFile['id'][]; - files: DriveFile[]; - isSensitive: boolean; - likedCount: number; - isLiked?: boolean; -}; - -export 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'][]; - channel?: Channel; - channelId?: Channel['id']; - localOnly?: boolean; - myReaction?: string; - reactions: Record; - renoteCount: number; - repliesCount: number; - clippedCount?: number; - poll?: { - expiresAt: DateString | null; - multiple: boolean; - choices: { - isVoted: boolean; - text: string; - votes: number; - }[]; - }; - emojis: { - name: string; - url: string; - }[]; - uri?: string; - url?: string; - isHidden?: boolean; -}; - -export type NoteReaction = { - id: ID; - createdAt: DateString; - user: UserLite; - type: string; -}; - -export 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: 'note'; - user: User; - userId: User['id']; - note: Note; -} | { - type: 'pollEnded'; - 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: 'achievementEarned'; - achievement: string; -} | { - type: 'app'; - header?: string | null; - body: string; - icon?: string | null; -} | { - type: 'test'; -}); - -export 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; -}; - -export type CustomEmoji = { - id: string; - name: string; - url: string; - category: string; - aliases: string[]; -}; - -export type LiteInstanceMetadata = { - maintainerName: string | null; - maintainerEmail: string | null; - version: string; - name: string | null; - shortName: string | null; - uri: string; - description: string | null; - langs: string[]; - tosUrl: string | null; - repositoryUrl: string; - feedbackUrl: string; - impressumUrl: string | null; - privacyPolicyUrl: string | null; - disableRegistration: boolean; - disableLocalTimeline: boolean; - disableGlobalTimeline: boolean; - driveCapacityPerLocalUserMb: number; - driveCapacityPerRemoteUserMb: number; - emailRequiredForSignup: boolean; - enableHcaptcha: boolean; - hcaptchaSiteKey: string | null; - enableRecaptcha: boolean; - recaptchaSiteKey: string | null; - enableTurnstile: boolean; - turnstileSiteKey: string | null; - swPublickey: string | null; - themeColor: string | null; - mascotImageUrl: string | null; - bannerUrl: string | null; - serverErrorImageUrl: string | null; - infoImageUrl: string | null; - notFoundImageUrl: string | null; - iconUrl: string | null; - backgroundImageUrl: string | null; - logoImageUrl: string | null; - maxNoteTextLength: number; - enableEmail: boolean; - enableTwitterIntegration: boolean; - enableGithubIntegration: boolean; - enableDiscordIntegration: boolean; - enableServiceWorker: boolean; - emojis: CustomEmoji[]; - defaultDarkTheme: string | null; - defaultLightTheme: string | null; - ads: { - id: ID; - ratio: number; - place: string; - url: string; - imageUrl: string; - }[]; - notesPerOneAd: number; - translatorAvailable: boolean; - serverRules: string[]; -}; - -export type DetailedInstanceMetadata = LiteInstanceMetadata & { - pinnedPages: string[]; - pinnedClipId: string | null; - cacheRemoteFiles: boolean; - cacheRemoteSensitiveFiles: boolean; - requireSetup: boolean; - proxyAccountName: string | null; - features: Record; -}; - -export type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata; - -export type AdminInstanceMetadata = DetailedInstanceMetadata & { - // TODO: There are more fields. - blockedHosts: string[]; - silencedHosts: string[]; - app192IconUrl: string | null; - app512IconUrl: string | null; - manifestJsonOverride: string; -}; - -export type ServerInfo = { - machine: string; - cpu: { - model: string; - cores: number; - }; - mem: { - total: number; - }; - fs: { - total: number; - used: number; - }; -}; - -export type Stats = { - notesCount: number; - originalNotesCount: number; - usersCount: number; - originalUsersCount: number; - instances: number; - driveUsageLocal: number; - driveUsageRemote: number; -}; - -export type Page = { - id: ID; - createdAt: DateString; - updatedAt: DateString; - userId: User['id']; - user: User; - content: Record[]; - variables: Record[]; - 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; -}; - export type PageEvent = { pageId: Page['id']; event: string; @@ -458,166 +14,6 @@ export type PageEvent = { user: User; }; -export type Announcement = { - id: ID; - createdAt: DateString; - updatedAt: DateString | null; - text: string; - title: string; - imageUrl: string | null; - display: 'normal' | 'banner' | 'dialog'; - icon: 'info' | 'warning' | 'error' | 'success'; - needConfirmationToRead: boolean; - forYou: boolean; - isRead?: boolean; -}; - -export type Antenna = { - id: ID; - createdAt: DateString; - name: string; - keywords: string[][]; // TODO - excludeKeywords: string[][]; // TODO - src: 'home' | 'all' | 'users' | 'list' | 'group'; - userListId: ID | null; // TODO - userGroupId: ID | null; // TODO - users: string[]; // TODO - caseSensitive: boolean; - localOnly: boolean; - notify: boolean; - withReplies: boolean; - withFile: boolean; - hasUnreadNote: boolean; -}; - -export type App = TODO; - -export type AuthSession = { - id: ID; - app: App; - token: string; -}; - -export type Ad = TODO; - -export type Clip = TODO; - -export type NoteFavorite = { - id: ID; - createdAt: DateString; - noteId: Note['id']; - note: Note; -}; - -export type FollowRequest = { - id: ID; - follower: User; - followee: User; -}; - -export type Channel = { - id: ID; - lastNotedAt: Date | null; - userId: User['id'] | null; - user: User | null; - name: string; - description: string | null; - bannerId: DriveFile['id'] | null; - banner: DriveFile | null; - pinnedNoteIds: string[]; - color: string; - isArchived: boolean; - notesCount: number; - usersCount: number; - isSensitive: boolean; - allowRenoteToExternal: boolean; -}; - -export type Following = { - id: ID; - createdAt: DateString; - followerId: User['id']; - followeeId: User['id']; -}; - -export type FollowingFolloweePopulated = Following & { - followee: UserDetailed; -}; - -export type FollowingFollowerPopulated = Following & { - follower: UserDetailed; -}; - -export type Blocking = { - id: ID; - createdAt: DateString; - blockeeId: User['id']; - blockee: UserDetailed; -}; - -export type Instance = { - id: ID; - firstRetrievedAt: 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; - isSilenced: boolean; - isBlocked: 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; -}; - -export type Signin = { - id: ID; - createdAt: DateString; - ip: string; - headers: Record; - success: boolean; -}; - -export type Invite = { - id: ID; - code: string; - expiresAt: DateString | null; - createdAt: DateString; - createdBy: UserLite | null; - usedBy: UserLite | null; - usedAt: DateString | null; - used: boolean; -} - -export type InviteLimit = { - remaining: number; -} - -export type UserSorting = - | '+follower' - | '-follower' - | '+createdAt' - | '-createdAt' - | '+updatedAt' - | '-updatedAt'; -export type OriginType = 'combined' | 'local' | 'remote'; - export type ModerationLog = { id: ID; createdAt: DateString; diff --git a/packages/misskey-js/src/streaming.types.ts b/packages/misskey-js/src/streaming.types.ts index 96ac7787e1..7981c280f6 100644 --- a/packages/misskey-js/src/streaming.types.ts +++ b/packages/misskey-js/src/streaming.types.ts @@ -1,4 +1,5 @@ -import type { Antenna, CustomEmoji, DriveFile, MeDetailed, MessagingMessage, Note, Notification, PageEvent, User, UserGroup } from './entities.js'; +import { Antenna, DriveFile, EmojiDetailed, MeDetailed, Note, User, Notification } from './autogen/models.js'; +import { PageEvent } from './entities.js'; type FIXME = any; @@ -22,9 +23,6 @@ export type Channels = { 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; @@ -70,23 +68,6 @@ export type Channels = { }; 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: { @@ -145,6 +126,6 @@ export type NoteUpdatedEvent = { export type BroadcastEvents = { noteUpdated: (payload: NoteUpdatedEvent) => void; emojiAdded: (payload: { - emoji: CustomEmoji; + emoji: EmojiDetailed; }) => void; }; diff --git a/packages/misskey-js/test-d/api.ts b/packages/misskey-js/test-d/api.ts index ce793f6fd1..1c2a142e8b 100644 --- a/packages/misskey-js/test-d/api.ts +++ b/packages/misskey-js/test-d/api.ts @@ -8,7 +8,7 @@ describe('API', () => { credential: 'TOKEN' }); const res = await cli.request('meta', { detail: true }); - expectType(res); + expectType(res); }); test('conditional respose type (meta)', async () => { @@ -18,16 +18,16 @@ describe('API', () => { }); const res = await cli.request('meta', { detail: true }); - expectType(res); + expectType(res); const res2 = await cli.request('meta', { detail: false }); - expectType(res2); + expectType(res2); const res3 = await cli.request('meta', { }); - expectType(res3); + expectType(res3); const res4 = await cli.request('meta', { detail: true as boolean }); - expectType(res4); + expectType(res4); }); test('conditional respose type (users/show)', async () => { diff --git a/packages/misskey-js/test-d/streaming.ts b/packages/misskey-js/test-d/streaming.ts index 853f376e6c..6b186bd45a 100644 --- a/packages/misskey-js/test-d/streaming.ts +++ b/packages/misskey-js/test-d/streaming.ts @@ -9,18 +9,4 @@ describe('Streaming', () => { expectType(notification); }); }); - - test('params type', async () => { - const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' }); - // TODO: 「stream.useChannel の第二引数として受け入れる型が - // { - // otherparty?: User['id'] | null; - // group?: UserGroup['id'] | null; - // } - // になっている」というテストを行いたいけどtsdでの書き方がわからない - const messagingChannel = stream.useChannel('messaging', { otherparty: 'aaa' }); - messagingChannel.on('message', message => { - expectType(message); - }); - }); }); diff --git a/packages/misskey-js/tsconfig.json b/packages/misskey-js/tsconfig.json index e2b755075b..f56b65e868 100644 --- a/packages/misskey-js/tsconfig.json +++ b/packages/misskey-js/tsconfig.json @@ -1,5 +1,5 @@ { - "$schema": "http://json.schemastore.org/tsconfig", + "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { "target": "ES2022", "module": "nodenext", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 68d70ba4c1..8831c43036 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,6 +50,9 @@ importers: eslint: specifier: 8.54.0 version: 8.54.0 + ncp: + specifier: 2.0.0 + version: 2.0.0 start-server-and-test: specifier: 2.0.3 version: 2.0.3 @@ -358,7 +361,7 @@ importers: version: 2.1.0 summaly: specifier: github:misskey-dev/summaly - version: github.com/misskey-dev/summaly/d2d8db49943ccb201c1b1b283e9d0a630519fac7 + version: github.com/misskey-dev/summaly/d2a3e07205c3c9769bc5a7b42031c8884b5a25c8 systeminformation: specifier: 5.21.18 version: 5.21.18 @@ -877,10 +880,10 @@ importers: version: 7.5.3 '@storybook/vue3': specifier: 7.5.3 - version: 7.5.3(@vue/compiler-core@3.3.8)(vue@3.3.9) + version: 7.5.3(@vue/compiler-core@3.3.9)(vue@3.3.9) '@storybook/vue3-vite': specifier: 7.5.3 - version: 7.5.3(@vue/compiler-core@3.3.8)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2)(vite@5.0.2)(vue@3.3.9) + version: 7.5.3(@vue/compiler-core@3.3.9)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2)(vite@5.0.2)(vue@3.3.9) '@testing-library/vue': specifier: 8.0.1 version: 8.0.1(@vue/compiler-sfc@3.3.9)(vue@3.3.9) @@ -988,7 +991,7 @@ importers: version: github.com/misskey-dev/storybook-addon-misskey-theme/cf583db098365b2ccc81a82f63ca9c93bc32b640(@storybook/blocks@7.5.3)(@storybook/components@7.5.3)(@storybook/core-events@7.5.3)(@storybook/manager-api@7.5.3)(@storybook/preview-api@7.5.3)(@storybook/theming@7.5.3)(@storybook/types@7.5.3)(react-dom@18.2.0)(react@18.2.0) summaly: specifier: github:misskey-dev/summaly - version: github.com/misskey-dev/summaly/d2d8db49943ccb201c1b1b283e9d0a630519fac7 + version: github.com/misskey-dev/summaly/d2a3e07205c3c9769bc5a7b42031c8884b5a25c8 vite-plugin-turbosnap: specifier: 1.0.3 version: 1.0.3 @@ -1053,6 +1056,9 @@ importers: mock-socket: specifier: 9.3.1 version: 9.3.1 + ncp: + specifier: 2.0.0 + version: 2.0.0 tsd: specifier: 0.29.0 version: 0.29.0 @@ -1060,6 +1066,39 @@ importers: specifier: 5.3.2 version: 5.3.2 + packages/misskey-js/generator: + devDependencies: + '@apidevtools/swagger-parser': + specifier: 10.1.0 + version: 10.1.0(openapi-types@12.1.3) + '@types/node': + specifier: 20.9.1 + version: 20.9.1 + '@typescript-eslint/eslint-plugin': + specifier: 6.11.0 + version: 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.3.2) + '@typescript-eslint/parser': + specifier: 6.11.0 + version: 6.11.0(eslint@8.53.0)(typescript@5.3.2) + eslint: + specifier: 8.53.0 + version: 8.53.0 + openapi-types: + specifier: 12.1.3 + version: 12.1.3 + openapi-typescript: + specifier: 6.7.1 + version: 6.7.1 + ts-case-convert: + specifier: 2.0.2 + version: 2.0.2 + tsx: + specifier: 4.4.0 + version: 4.4.0 + typescript: + specifier: 5.3.2 + version: 5.3.2 + packages/sw: dependencies: esbuild: @@ -1107,6 +1146,38 @@ packages: '@jridgewell/trace-mapping': 0.3.18 dev: true + /@apidevtools/json-schema-ref-parser@9.0.6: + resolution: {integrity: sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==} + dependencies: + '@jsdevtools/ono': 7.1.3 + call-me-maybe: 1.0.2 + js-yaml: 3.14.1 + dev: true + + /@apidevtools/openapi-schemas@2.1.0: + resolution: {integrity: sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==} + engines: {node: '>=10'} + dev: true + + /@apidevtools/swagger-methods@3.0.2: + resolution: {integrity: sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==} + dev: true + + /@apidevtools/swagger-parser@10.1.0(openapi-types@12.1.3): + resolution: {integrity: sha512-9Kt7EuS/7WbMAUv2gSziqjvxwDbFSg3Xeyfuj5laUODX8o/k/CpsAKiQ8W7/R88eXFTMbJYg6+7uAmOWNKmwnw==} + peerDependencies: + openapi-types: '>=7' + dependencies: + '@apidevtools/json-schema-ref-parser': 9.0.6 + '@apidevtools/openapi-schemas': 2.1.0 + '@apidevtools/swagger-methods': 3.0.2 + '@jsdevtools/ono': 7.1.3 + ajv: 8.12.0 + ajv-draft-04: 1.0.0(ajv@8.12.0) + call-me-maybe: 1.0.2 + openapi-types: 12.1.3 + dev: true + /@aw-web-design/x-default-browser@1.4.126: resolution: {integrity: sha512-Xk1sIhyNC/esHGGVjL/niHLowM0csl/kFO5uawBy4IrWwy0o1G8LGt3jP6nmWGz+USxeeqbihAmp/oVZju6wug==} hasBin: true @@ -3328,6 +3399,15 @@ packages: dev: true optional: true + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm64@0.19.8: resolution: {integrity: sha512-B8JbS61bEunhfx8kasogFENgQfr/dIp+ggYXwTqdbMAgGDhRa3AaPpQMuQU0rNxDLECj6FhDzk1cF9WHMVwrtA==} engines: {node: '>=12'} @@ -3345,6 +3425,15 @@ packages: dev: true optional: true + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.19.8: resolution: {integrity: sha512-31E2lxlGM1KEfivQl8Yf5aYU/mflz9g06H6S15ITUFQueMFtFjESRMoDSkvMo8thYvLBax+VKTPlpnx+sPicOA==} engines: {node: '>=12'} @@ -3362,6 +3451,15 @@ packages: dev: true optional: true + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.19.8: resolution: {integrity: sha512-rdqqYfRIn4jWOp+lzQttYMa2Xar3OK9Yt2fhOhzFXqg0rVWEfSclJvZq5fZslnz6ypHvVf3CT7qyf0A5pM682A==} engines: {node: '>=12'} @@ -3379,6 +3477,15 @@ packages: dev: true optional: true + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.19.8: resolution: {integrity: sha512-RQw9DemMbIq35Bprbboyf8SmOr4UXsRVxJ97LgB55VKKeJOOdvsIPy0nFyF2l8U+h4PtBx/1kRf0BelOYCiQcw==} engines: {node: '>=12'} @@ -3396,6 +3503,15 @@ packages: dev: true optional: true + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.19.8: resolution: {integrity: sha512-3sur80OT9YdeZwIVgERAysAbwncom7b4bCI2XKLjMfPymTud7e/oY4y+ci1XVp5TfQp/bppn7xLw1n/oSQY3/Q==} engines: {node: '>=12'} @@ -3413,6 +3529,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.19.8: resolution: {integrity: sha512-WAnPJSDattvS/XtPCTj1tPoTxERjcTpH6HsMr6ujTT+X6rylVe8ggxk8pVxzf5U1wh5sPODpawNicF5ta/9Tmw==} engines: {node: '>=12'} @@ -3430,6 +3555,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.19.8: resolution: {integrity: sha512-ICvZyOplIjmmhjd6mxi+zxSdpPTKFfyPPQMQTK/w+8eNK6WV01AjIztJALDtwNNfFhfZLux0tZLC+U9nSyA5Zg==} engines: {node: '>=12'} @@ -3447,6 +3581,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.19.8: resolution: {integrity: sha512-z1zMZivxDLHWnyGOctT9JP70h0beY54xDDDJt4VpTX+iwA77IFsE1vCXWmprajJGa+ZYSqkSbRQ4eyLCpCmiCQ==} engines: {node: '>=12'} @@ -3464,6 +3607,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.19.8: resolution: {integrity: sha512-H4vmI5PYqSvosPaTJuEppU9oz1dq2A7Mr2vyg5TF9Ga+3+MGgBdGzcyBP7qK9MrwFQZlvNyJrvz6GuCaj3OukQ==} engines: {node: '>=12'} @@ -3481,6 +3633,15 @@ packages: dev: true optional: true + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.19.8: resolution: {integrity: sha512-1a8suQiFJmZz1khm/rDglOc8lavtzEMRo0v6WhPgxkrjcU0LkHj+TwBrALwoz/OtMExvsqbbMI0ChyelKabSvQ==} engines: {node: '>=12'} @@ -3498,6 +3659,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64@0.19.8: resolution: {integrity: sha512-fHZWS2JJxnXt1uYJsDv9+b60WCc2RlvVAy1F76qOLtXRO+H4mjt3Tr6MJ5l7Q78X8KgCFudnTuiQRBhULUyBKQ==} engines: {node: '>=12'} @@ -3515,6 +3685,15 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-mips64el@0.19.8: resolution: {integrity: sha512-Wy/z0EL5qZYLX66dVnEg9riiwls5IYnziwuju2oUiuxVc+/edvqXa04qNtbrs0Ukatg5HEzqT94Zs7J207dN5Q==} engines: {node: '>=12'} @@ -3532,6 +3711,15 @@ packages: dev: true optional: true + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.19.8: resolution: {integrity: sha512-ETaW6245wK23YIEufhMQ3HSeHO7NgsLx8gygBVldRHKhOlD1oNeNy/P67mIh1zPn2Hr2HLieQrt6tWrVwuqrxg==} engines: {node: '>=12'} @@ -3549,6 +3737,15 @@ packages: dev: true optional: true + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.19.8: resolution: {integrity: sha512-T2DRQk55SgoleTP+DtPlMrxi/5r9AeFgkhkZ/B0ap99zmxtxdOixOMI570VjdRCs9pE4Wdkz7JYrsPvsl7eESg==} engines: {node: '>=12'} @@ -3566,6 +3763,15 @@ packages: dev: true optional: true + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.19.8: resolution: {integrity: sha512-NPxbdmmo3Bk7mbNeHmcCd7R7fptJaczPYBaELk6NcXxy7HLNyWwCyDJ/Xx+/YcNH7Im5dHdx9gZ5xIwyliQCbg==} engines: {node: '>=12'} @@ -3583,6 +3789,15 @@ packages: dev: true optional: true + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.19.8: resolution: {integrity: sha512-lytMAVOM3b1gPypL2TRmZ5rnXl7+6IIk8uB3eLsV1JwcizuolblXRrc5ShPrO9ls/b+RTp+E6gbsuLWHWi2zGg==} engines: {node: '>=12'} @@ -3600,6 +3815,15 @@ packages: dev: true optional: true + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.19.8: resolution: {integrity: sha512-hvWVo2VsXz/8NVt1UhLzxwAfo5sioj92uo0bCfLibB0xlOmimU/DeAEsQILlBQvkhrGjamP0/el5HU76HAitGw==} engines: {node: '>=12'} @@ -3617,6 +3841,15 @@ packages: dev: true optional: true + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.19.8: resolution: {integrity: sha512-/7Y7u77rdvmGTxR83PgaSvSBJCC2L3Kb1M/+dmSIvRvQPXXCuC97QAwMugBNG0yGcbEGfFBH7ojPzAOxfGNkwQ==} engines: {node: '>=12'} @@ -3634,6 +3867,15 @@ packages: dev: true optional: true + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.19.8: resolution: {integrity: sha512-9Lc4s7Oi98GqFA4HzA/W2JHIYfnXbUYgekUP/Sm4BG9sfLjyv6GKKHKKVs83SMicBF2JwAX6A1PuOLMqpD001w==} engines: {node: '>=12'} @@ -3651,6 +3893,15 @@ packages: dev: true optional: true + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.19.8: resolution: {integrity: sha512-rq6WzBGjSzihI9deW3fC2Gqiak68+b7qo5/3kmB6Gvbh/NYPA0sJhrnp7wgV4bNwjqM+R2AApXGxMO7ZoGhIJg==} engines: {node: '>=12'} @@ -3668,6 +3919,15 @@ packages: dev: true optional: true + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.19.8: resolution: {integrity: sha512-AIAbverbg5jMvJznYiGhrd3sumfwWs8572mIJL5NQjJa06P8KfCPWZQ0NwZbPQnbQi9OWSZhFVSUWjjIrn4hSw==} engines: {node: '>=12'} @@ -3685,6 +3945,15 @@ packages: dev: true optional: true + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.19.8: resolution: {integrity: sha512-bfZ0cQ1uZs2PqpulNL5j/3w+GDhP36k1K5c38QdQg+Swy51jFZWWeIkteNsufkQxp986wnqRRsb/bHbY1WQ7TA==} engines: {node: '>=12'} @@ -3693,6 +3962,16 @@ packages: requiresBuild: true optional: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.53.0): + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.53.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.54.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3725,6 +4004,11 @@ packages: - supports-color dev: true + /@eslint/js@8.53.0: + resolution: {integrity: sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + /@eslint/js@8.54.0: resolution: {integrity: sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3761,6 +4045,11 @@ packages: text-decoding: 1.0.0 dev: false + /@fastify/busboy@2.1.0: + resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==} + engines: {node: '>=14'} + dev: true + /@fastify/cookie@9.2.0: resolution: {integrity: sha512-fkg1yjjQRHPFAxSHeLC8CqYuNzvR6Lwlj/KjrzQcGjNBK+K82nW+UfCjfN71g1GkoVoc1GTOgIWkFJpcMfMkHQ==} dependencies: @@ -4305,6 +4594,10 @@ packages: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 + /@jsdevtools/ono@7.1.3: + resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} + dev: true + /@juggle/resize-observer@3.4.0: resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==} dev: true @@ -6924,7 +7217,7 @@ packages: file-system-cache: 2.3.0 dev: true - /@storybook/vue3-vite@7.5.3(@vue/compiler-core@3.3.8)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2)(vite@5.0.2)(vue@3.3.9): + /@storybook/vue3-vite@7.5.3(@vue/compiler-core@3.3.9)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.2)(vite@5.0.2)(vue@3.3.9): resolution: {integrity: sha512-gkNwDDn2AKthAtaoPrHb0+2gi33UluxpfSq/M5COoMEVFphj6y/jyDa+OEYlceXgnD8g2xvX4/yv2TbTNDzmcQ==} engines: {node: ^14.18 || >=16} peerDependencies: @@ -6934,7 +7227,7 @@ packages: dependencies: '@storybook/builder-vite': 7.5.3(typescript@5.3.2)(vite@5.0.2) '@storybook/core-server': 7.5.3 - '@storybook/vue3': 7.5.3(@vue/compiler-core@3.3.8)(vue@3.3.9) + '@storybook/vue3': 7.5.3(@vue/compiler-core@3.3.9)(vue@3.3.9) '@vitejs/plugin-vue': 4.5.0(vite@5.0.2)(vue@3.3.9) magic-string: 0.30.5 react: 18.2.0 @@ -6953,7 +7246,7 @@ packages: - vue dev: true - /@storybook/vue3@7.5.3(@vue/compiler-core@3.3.8)(vue@3.3.9): + /@storybook/vue3@7.5.3(@vue/compiler-core@3.3.9)(vue@3.3.9): resolution: {integrity: sha512-JaxtOl3UD9YhPrOqHuKtpqHMnFril3sBUxx/no2yM/mZYmNpAVd/C6PFM839WCay1mAywPuUoebJvmwWxWijkw==} engines: {node: '>=16.0.0'} peerDependencies: @@ -6965,7 +7258,7 @@ packages: '@storybook/global': 5.0.0 '@storybook/preview-api': 7.5.3 '@storybook/types': 7.5.3 - '@vue/compiler-core': 3.3.8 + '@vue/compiler-core': 3.3.9 lodash: 4.17.21 ts-dedent: 2.2.0 type-fest: 2.19.0 @@ -6982,7 +7275,7 @@ packages: hasBin: true peerDependencies: '@swc/core': ^1.2.66 - chokidar: 3.5.3 + chokidar: ^3.5.1 peerDependenciesMeta: chokidar: optional: true @@ -7832,6 +8125,12 @@ packages: dependencies: undici-types: 5.26.5 + /@types/node@20.9.1: + resolution: {integrity: sha512-HhmzZh5LSJNS5O8jQKpJ/3ZcrrlG6L70hpGqMIAoM9YVD0YBRNWYsfwcXq8VnSjlNpCpgLzMXdiPo+dxcvSmiA==} + dependencies: + undici-types: 5.26.5 + dev: true + /@types/nodemailer@6.4.14: resolution: {integrity: sha512-fUWthHO9k9DSdPCSPRqcu6TWhYyxTBg382vlNIttSe9M7XfsT06y0f24KHXtbnijPGGRIcVvdKHTNikOI6qiHA==} dependencies: @@ -8091,6 +8390,35 @@ packages: dev: true optional: true + /@typescript-eslint/eslint-plugin@6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.3.2): + resolution: {integrity: sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.6.2 + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.3.2) + '@typescript-eslint/scope-manager': 6.11.0 + '@typescript-eslint/type-utils': 6.11.0(eslint@8.53.0)(typescript@5.3.2) + '@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@5.3.2) + '@typescript-eslint/visitor-keys': 6.11.0 + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.53.0 + graphemer: 1.4.0 + ignore: 5.2.4 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.1(typescript@5.3.2) + typescript: 5.3.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/eslint-plugin@6.12.0(@typescript-eslint/parser@6.12.0)(eslint@8.54.0)(typescript@5.3.2): resolution: {integrity: sha512-XOpZ3IyJUIV1b15M7HVOpgQxPPF7lGXgsfcEIu3yDxFPaf/xZKt7s9QO/pbk7vpWQyVulpJbu4E5LwpZiQo4kA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -8120,6 +8448,27 @@ packages: - supports-color dev: true + /@typescript-eslint/parser@6.11.0(eslint@8.53.0)(typescript@5.3.2): + resolution: {integrity: sha512-+whEdjk+d5do5nxfxx73oanLL9ghKO3EwM9kBCkUtWMRwWuPaFv9ScuqlYfQ6pAD6ZiJhky7TZ2ZYhrMsfMxVQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.11.0 + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/typescript-estree': 6.11.0(typescript@5.3.2) + '@typescript-eslint/visitor-keys': 6.11.0 + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.53.0 + typescript: 5.3.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/parser@6.12.0(eslint@8.54.0)(typescript@5.3.2): resolution: {integrity: sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -8141,6 +8490,14 @@ packages: - supports-color dev: true + /@typescript-eslint/scope-manager@6.11.0: + resolution: {integrity: sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/visitor-keys': 6.11.0 + dev: true + /@typescript-eslint/scope-manager@6.12.0: resolution: {integrity: sha512-5gUvjg+XdSj8pcetdL9eXJzQNTl3RD7LgUiYTl8Aabdi8hFkaGSYnaS6BLc0BGNaDH+tVzVwmKtWvu0jLgWVbw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -8149,6 +8506,26 @@ packages: '@typescript-eslint/visitor-keys': 6.12.0 dev: true + /@typescript-eslint/type-utils@6.11.0(eslint@8.53.0)(typescript@5.3.2): + resolution: {integrity: sha512-nA4IOXwZtqBjIoYrJcYxLRO+F9ri+leVGoJcMW1uqr4r1Hq7vW5cyWrA43lFbpRvQ9XgNrnfLpIkO3i1emDBIA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 6.11.0(typescript@5.3.2) + '@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@5.3.2) + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.53.0 + ts-api-utils: 1.0.1(typescript@5.3.2) + typescript: 5.3.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/type-utils@6.12.0(eslint@8.54.0)(typescript@5.3.2): resolution: {integrity: sha512-WWmRXxhm1X8Wlquj+MhsAG4dU/Blvf1xDgGaYCzfvStP2NwPQh6KBvCDbiOEvaE0filhranjIlK/2fSTVwtBng==} engines: {node: ^16.0.0 || >=18.0.0} @@ -8169,11 +8546,37 @@ packages: - supports-color dev: true + /@typescript-eslint/types@6.11.0: + resolution: {integrity: sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + /@typescript-eslint/types@6.12.0: resolution: {integrity: sha512-MA16p/+WxM5JG/F3RTpRIcuOghWO30//VEOvzubM8zuOOBYXsP+IfjoCXXiIfy2Ta8FRh9+IO9QLlaFQUU+10Q==} engines: {node: ^16.0.0 || >=18.0.0} dev: true + /@typescript-eslint/typescript-estree@6.11.0(typescript@5.3.2): + resolution: {integrity: sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/visitor-keys': 6.11.0 + debug: 4.3.4(supports-color@8.1.1) + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.1(typescript@5.3.2) + typescript: 5.3.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/typescript-estree@6.12.0(typescript@5.3.2): resolution: {integrity: sha512-vw9E2P9+3UUWzhgjyyVczLWxZ3GuQNT7QpnIY3o5OMeLO/c8oHljGc8ZpryBMIyympiAAaKgw9e5Hl9dCWFOYw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -8195,6 +8598,25 @@ packages: - supports-color dev: true + /@typescript-eslint/utils@6.11.0(eslint@8.53.0)(typescript@5.3.2): + resolution: {integrity: sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.6 + '@typescript-eslint/scope-manager': 6.11.0 + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/typescript-estree': 6.11.0(typescript@5.3.2) + eslint: 8.53.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/utils@6.12.0(eslint@8.54.0)(typescript@5.3.2): resolution: {integrity: sha512-LywPm8h3tGEbgfyjYnu3dauZ0U7R60m+miXgKcZS8c7QALO9uWJdvNoP+duKTk2XMWc7/Q3d/QiCuLN9X6SWyQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -8214,6 +8636,14 @@ packages: - typescript dev: true + /@typescript-eslint/visitor-keys@6.11.0: + resolution: {integrity: sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.11.0 + eslint-visitor-keys: 3.4.3 + dev: true + /@typescript-eslint/visitor-keys@6.12.0: resolution: {integrity: sha512-rg3BizTZHF1k3ipn8gfrzDXXSFKyOEB5zxYXInQ6z0hUvmQlhaZQzK+YmHmNViMA9HzW5Q9+bPPt90bU6GQwyw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -8392,6 +8822,7 @@ packages: '@vue/shared': 3.3.8 estree-walker: 2.0.2 source-map-js: 1.0.2 + dev: false /@vue/compiler-core@3.3.9: resolution: {integrity: sha512-+/Lf68Vr/nFBA6ol4xOtJrW+BQWv3QWKfRwGSm70jtXwfhZNF4R/eRgyVJYoxFRhdCTk/F6g99BP0ffPgZihfQ==} @@ -8506,6 +8937,7 @@ packages: /@vue/shared@3.3.8: resolution: {integrity: sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==} + dev: false /@vue/shared@3.3.9: resolution: {integrity: sha512-ZE0VTIR0LmYgeyhurPTpy4KzKsuDyQbMSdM49eKkMnT5X4VfFBLysMzjIZhLEFQYjjOVVfbvUDHckwjDFiO2eA==} @@ -8678,6 +9110,17 @@ packages: clean-stack: 2.2.0 indent-string: 4.0.0 + /ajv-draft-04@1.0.0(ajv@8.12.0): + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} + peerDependencies: + ajv: ^8.5.0 + peerDependenciesMeta: + ajv: + optional: true + dependencies: + ajv: 8.12.0 + dev: true + /ajv-formats@2.1.1(ajv@8.12.0): resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: @@ -8704,7 +9147,6 @@ packages: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 uri-js: 4.4.1 - dev: false /ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} @@ -9538,6 +9980,10 @@ packages: function-bind: 1.1.1 get-intrinsic: 1.2.0 + /call-me-maybe@1.0.2: + resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + dev: true + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -9773,7 +10219,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -11060,6 +11506,36 @@ packages: '@esbuild/win32-x64': 0.18.17 dev: true + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + /esbuild@0.19.8: resolution: {integrity: sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==} engines: {node: '>=12'} @@ -11253,6 +11729,53 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /eslint@8.53.0: + resolution: {integrity: sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) + '@eslint-community/regexpp': 4.6.2 + '@eslint/eslintrc': 2.1.3 + '@eslint/js': 8.53.0 + '@humanwhocodes/config-array': 0.11.13 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4(supports-color@8.1.1) + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.4.2 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.19.0 + graphemer: 1.4.0 + ignore: 5.2.4 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.3 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true + /eslint@8.54.0: resolution: {integrity: sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -12020,13 +12543,6 @@ packages: /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - optional: true - /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -12164,6 +12680,12 @@ packages: get-intrinsic: 1.2.1 dev: true + /get-tsconfig@4.7.2: + resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + /getos@3.2.1: resolution: {integrity: sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==} dependencies: @@ -13557,7 +14079,7 @@ packages: micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /jest-leak-detector@29.7.0: @@ -14004,7 +14526,6 @@ packages: /json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - dev: false /json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} @@ -14950,6 +15471,11 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true + /ncp@2.0.0: + resolution: {integrity: sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==} + hasBin: true + dev: true + /ndarray-ops@1.2.2: resolution: {integrity: sha512-BppWAFRjMYF7N/r6Ie51q6D4fs0iiGmeXIACKY66fLpnwIui3Wc3CXiD/30mgLbDjPpSLrsqcp3Z62+IcHZsDw==} dependencies: @@ -15422,7 +15948,18 @@ packages: /openapi-types@12.1.3: resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==} - dev: false + + /openapi-typescript@6.7.1: + resolution: {integrity: sha512-Q3Ltt0KUm2smcPrsaR8qKmSwQ1KM4yGDJVoQdpYa0yvKPeN8huDx5utMT7DvwvJastHHzUxajjivK3WN2+fobg==} + hasBin: true + dependencies: + ansi-colors: 4.1.3 + fast-glob: 3.3.2 + js-yaml: 4.1.0 + supports-color: 9.4.0 + undici: 5.28.1 + yargs-parser: 21.1.1 + dev: true /opentype.js@0.4.11: resolution: {integrity: sha512-GthxucX/6aftfLdeU5Ho7o7zmQcC8uVtqdcelVq12X++ndxwBZG8Xb5rFEKT7nEcWDD2P1x+TNuJ70jtj1Mbpw==} @@ -17217,7 +17754,6 @@ packages: /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - dev: false /require-main-filename@2.0.0: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} @@ -17246,6 +17782,10 @@ packages: engines: {node: '>=8'} dev: true + /resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + /resolve.exports@2.0.0: resolution: {integrity: sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==} engines: {node: '>=10'} @@ -17345,7 +17885,7 @@ packages: engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /rollup@4.6.0: @@ -17365,7 +17905,7 @@ packages: '@rollup/rollup-win32-arm64-msvc': 4.6.0 '@rollup/rollup-win32-ia32-msvc': 4.6.0 '@rollup/rollup-win32-x64-msvc': 4.6.0 - fsevents: 2.3.2 + fsevents: 2.3.3 /rrweb-cssom@0.6.0: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} @@ -18293,6 +18833,11 @@ packages: dependencies: has-flag: 4.0.0 + /supports-color@9.4.0: + resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} + engines: {node: '>=12'} + dev: true + /supports-hyperlinks@2.3.0: resolution: {integrity: sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==} engines: {node: '>=8'} @@ -18638,6 +19183,10 @@ packages: typescript: 5.3.2 dev: true + /ts-case-convert@2.0.2: + resolution: {integrity: sha512-vdKfx1VAdpvEBOBv5OpVu5ZFqRg9HdTI4sYt6qqMeICBeNyXvitrarCnFWNDAki51IKwCyx+ZssY46Q9jH5otA==} + dev: true + /ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -18707,6 +19256,17 @@ packages: /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + /tsx@4.4.0: + resolution: {integrity: sha512-4fwcEjRUxW20ciSaMB8zkpGwCPxuRGnadDuj/pBk5S9uT29zvWz15PK36GrKJo45mSJomDxVejZ73c6lr3811Q==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + esbuild: 0.18.20 + get-tsconfig: 4.7.2 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: @@ -18957,6 +19517,13 @@ packages: busboy: 1.6.0 dev: false + /undici@5.28.1: + resolution: {integrity: sha512-xcIIvj1LOQH9zAL54iWFkuDEaIVEjLrru7qRpa3GrEEHk6OBhb/LycuUY2m7VCcTuDeLziXCxobQVyKExyGeIA==} + engines: {node: '>=14.0'} + dependencies: + '@fastify/busboy': 2.1.0 + dev: true + /unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} engines: {node: '>=4'} @@ -19999,8 +20566,8 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true - github.com/misskey-dev/summaly/d2d8db49943ccb201c1b1b283e9d0a630519fac7: - resolution: {tarball: https://codeload.github.com/misskey-dev/summaly/tar.gz/d2d8db49943ccb201c1b1b283e9d0a630519fac7} + github.com/misskey-dev/summaly/d2a3e07205c3c9769bc5a7b42031c8884b5a25c8: + resolution: {tarball: https://codeload.github.com/misskey-dev/summaly/tar.gz/d2a3e07205c3c9769bc5a7b42031c8884b5a25c8} name: summaly version: 4.0.2 dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index ead1764a56..3b2ecec7fd 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,3 +3,4 @@ packages: - 'packages/frontend' - 'packages/sw' - 'packages/misskey-js' + - 'packages/misskey-js/generator' -- cgit v1.2.3-freya From 4de4a2e14369acb79f070795e482a60700d97b12 Mon Sep 17 00:00:00 2001 From: shiosyakeyakini Date: Sun, 3 Dec 2023 10:18:28 +0900 Subject: fix: withChannelNotesとwithFilesを同時に指定したときの考慮 (#12550) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: sorairo --- packages/backend/src/server/api/endpoints/users/notes.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages/backend/src') diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index 56983f7bc4..4a358b39cb 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -113,6 +113,9 @@ export default class extends Endpoint { // eslint- redisTimelines, useDbFallback: true, noteFilter: note => { + if (ps.withFiles && note.fileIds.length === 0) { + return false; + } if (me && isUserRelated(note, userIdsWhoMeMuting, true)) return false; if (note.renoteId) { -- cgit v1.2.3-freya From c68d87538a8486e5c236a142e42221c70b157861 Mon Sep 17 00:00:00 2001 From: おさむのひと <46447427+samunohito@users.noreply.github.com> Date: Sun, 3 Dec 2023 10:19:37 +0900 Subject: リストタイムラインでミュートが貫通してしまう問題に対処 (#12534) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ユーザリストTL系の各種動作を修正・統一 * fix * fix CHANGELOG.md * テスト追加 --- CHANGELOG.md | 1 + packages/backend/src/misc/is-instance-muted.ts | 9 +- .../api/endpoints/notes/user-list-timeline.ts | 4 + .../backend/src/server/api/stream/Connection.ts | 2 + packages/backend/src/server/api/stream/channel.ts | 4 + .../src/server/api/stream/channels/user-list.ts | 8 +- packages/backend/test/e2e/streaming.ts | 108 ++++++++++++++++++++- 7 files changed, 130 insertions(+), 6 deletions(-) (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d96a02325..07b7cc6b9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ - Fix: 招待コードが使い回せる問題を修正 - Fix: 特定の条件下でチャンネルやユーザーのノート一覧に最新のノートが表示されなくなる問題を修正 - Fix: 何もノートしていないユーザーのフィードにアクセスするとエラーになる問題を修正 +- Fix: リストタイムラインにてミュートが機能しないケースがある問題と、チャンネル投稿がストリーミングで流れてきてしまう問題を修正 #10443 ## 2023.11.1 diff --git a/packages/backend/src/misc/is-instance-muted.ts b/packages/backend/src/misc/is-instance-muted.ts index b231058a95..35fe11849d 100644 --- a/packages/backend/src/misc/is-instance-muted.ts +++ b/packages/backend/src/misc/is-instance-muted.ts @@ -3,12 +3,13 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +import { MiNote } from '@/models/Note.js'; import type { Packed } from './json-schema.js'; -export function isInstanceMuted(note: Packed<'Note'>, mutedInstances: Set): boolean { - if (mutedInstances.has(note.user.host ?? '')) return true; - if (mutedInstances.has(note.reply?.user.host ?? '')) return true; - if (mutedInstances.has(note.renote?.user.host ?? '')) return true; +export function isInstanceMuted(note: Packed<'Note'> | MiNote, mutedInstances: Set): boolean { + if (mutedInstances.has(note.user?.host ?? '')) return true; + if (mutedInstances.has(note.reply?.user?.host ?? '')) return true; + if (mutedInstances.has(note.renote?.user?.host ?? '')) return true; return false; } diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index f39cac5c3e..f8f64738fe 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -18,6 +18,7 @@ import { QueryService } from '@/core/QueryService.js'; import { MiLocalUser } from '@/models/User.js'; import { MetaService } from '@/core/MetaService.js'; import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; +import { isInstanceMuted } from '@/misc/is-instance-muted.js'; import { ApiError } from '../../error.js'; export const meta = { @@ -124,10 +125,12 @@ export default class extends Endpoint { // eslint- userIdsWhoMeMuting, userIdsWhoMeMutingRenotes, userIdsWhoBlockingMe, + userMutedInstances, ] = await Promise.all([ this.cacheService.userMutingsCache.fetch(me.id), this.cacheService.renoteMutingsCache.fetch(me.id), this.cacheService.userBlockedCache.fetch(me.id), + this.cacheService.userProfileCache.fetch(me.id).then(p => new Set(p.mutedInstances)), ]); const timeline = await this.fanoutTimelineEndpointService.timeline({ @@ -150,6 +153,7 @@ export default class extends Endpoint { // eslint- if (ps.withRenotes === false) return false; } } + if (isInstanceMuted(note, userMutedInstances)) return false; return true; }, diff --git a/packages/backend/src/server/api/stream/Connection.ts b/packages/backend/src/server/api/stream/Connection.ts index 2d8fec30b1..4180ccc56a 100644 --- a/packages/backend/src/server/api/stream/Connection.ts +++ b/packages/backend/src/server/api/stream/Connection.ts @@ -36,6 +36,7 @@ export default class Connection { public userIdsWhoMeMuting: Set = new Set(); public userIdsWhoBlockingMe: Set = new Set(); public userIdsWhoMeMutingRenotes: Set = new Set(); + public userMutedInstances: Set = new Set(); private fetchIntervalId: NodeJS.Timeout | null = null; constructor( @@ -69,6 +70,7 @@ export default class Connection { this.userIdsWhoMeMuting = userIdsWhoMeMuting; this.userIdsWhoBlockingMe = userIdsWhoBlockingMe; this.userIdsWhoMeMutingRenotes = userIdsWhoMeMutingRenotes; + this.userMutedInstances = new Set(userProfile.mutedInstances); } @bindThis diff --git a/packages/backend/src/server/api/stream/channel.ts b/packages/backend/src/server/api/stream/channel.ts index 3aa0d69c0b..46b0709773 100644 --- a/packages/backend/src/server/api/stream/channel.ts +++ b/packages/backend/src/server/api/stream/channel.ts @@ -41,6 +41,10 @@ export default abstract class Channel { return this.connection.userIdsWhoBlockingMe; } + protected get userMutedInstances() { + return this.connection.userMutedInstances; + } + protected get followingChannels() { return this.connection.followingChannels; } diff --git a/packages/backend/src/server/api/stream/channels/user-list.ts b/packages/backend/src/server/api/stream/channels/user-list.ts index 4b6628df6f..fe293e2b4d 100644 --- a/packages/backend/src/server/api/stream/channels/user-list.ts +++ b/packages/backend/src/server/api/stream/channels/user-list.ts @@ -5,12 +5,12 @@ import { Inject, Injectable } from '@nestjs/common'; import type { MiUserListMembership, UserListMembershipsRepository, UserListsRepository } from '@/models/_.js'; -import type { MiUser } from '@/models/User.js'; import { isUserRelated } from '@/misc/is-user-related.js'; import type { Packed } from '@/misc/json-schema.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { DI } from '@/di-symbols.js'; import { bindThis } from '@/decorators.js'; +import { isInstanceMuted } from '@/misc/is-instance-muted.js'; import Channel from '../channel.js'; class UserListChannel extends Channel { @@ -80,6 +80,9 @@ class UserListChannel extends Channel { private async onNote(note: Packed<'Note'>) { const isMe = this.user!.id === note.userId; + // チャンネル投稿は無視する + if (note.channelId) return; + if (this.withFiles && (note.fileIds == null || note.fileIds.length === 0)) return; if (!Object.hasOwn(this.membershipsMap, note.userId)) return; @@ -115,6 +118,9 @@ class UserListChannel extends Channel { } } + // 流れてきたNoteがミュートしているインスタンスに関わるものだったら無視する + if (isInstanceMuted(note, this.userMutedInstances)) return; + this.connection.cacheNote(note); this.send('note', note); diff --git a/packages/backend/test/e2e/streaming.ts b/packages/backend/test/e2e/streaming.ts index f9f385e2b2..c4824f50ce 100644 --- a/packages/backend/test/e2e/streaming.ts +++ b/packages/backend/test/e2e/streaming.ts @@ -7,7 +7,7 @@ process.env.NODE_ENV = 'test'; import * as assert from 'assert'; import { MiFollowing } from '@/models/Following.js'; -import { connectStream, signup, api, post, startServer, initTestDb, waitFire } from '../utils.js'; +import { signup, api, post, startServer, initTestDb, waitFire } from '../utils.js'; import type { INestApplicationContext } from '@nestjs/common'; import type * as misskey from 'misskey-js'; @@ -34,12 +34,16 @@ describe('Streaming', () => { let ayano: misskey.entities.MeSignup; let kyoko: misskey.entities.MeSignup; let chitose: misskey.entities.MeSignup; + let kanako: misskey.entities.MeSignup; // Remote users let akari: misskey.entities.MeSignup; let chinatsu: misskey.entities.MeSignup; + let takumi: misskey.entities.MeSignup; let kyokoNote: any; + let kanakoNote: any; + let takumiNote: any; let list: any; beforeAll(async () => { @@ -50,11 +54,15 @@ describe('Streaming', () => { ayano = await signup({ username: 'ayano' }); kyoko = await signup({ username: 'kyoko' }); chitose = await signup({ username: 'chitose' }); + kanako = await signup({ username: 'kanako' }); akari = await signup({ username: 'akari', host: 'example.com' }); chinatsu = await signup({ username: 'chinatsu', host: 'example.com' }); + takumi = await signup({ username: 'takumi', host: 'example.com' }); kyokoNote = await post(kyoko, { text: 'foo' }); + kanakoNote = await post(kanako, { text: 'hoge' }); + takumiNote = await post(takumi, { text: 'piyo' }); // Follow: ayano => kyoko await api('following/create', { userId: kyoko.id }, ayano); @@ -62,6 +70,9 @@ describe('Streaming', () => { // Follow: ayano => akari await follow(ayano, akari); + // Mute: chitose => kanako + await api('mute/create', { userId: kanako.id }, chitose); + // List: chitose => ayano, kyoko list = await api('users/lists/create', { name: 'my list', @@ -76,6 +87,11 @@ describe('Streaming', () => { listId: list.id, userId: kyoko.id, }, chitose); + + await api('users/lists/push', { + listId: list.id, + userId: takumi.id, + }, chitose); }, 1000 * 60 * 2); afterAll(async () => { @@ -452,6 +468,96 @@ describe('Streaming', () => { assert.strictEqual(fired, false); }); + + // #10443 + test('チャンネル投稿は流れない', async () => { + // リスインしている kyoko が 任意のチャンネルに投降した時の動きを見たい + const fired = await waitFire( + chitose, 'userList', + () => api('notes/create', { text: 'foo', channelId: 'dummy' }, kyoko), + msg => msg.type === 'note' && msg.body.userId === kyoko.id, + { listId: list.id }, + ); + + assert.strictEqual(fired, false); + }); + + // #10443 + test('ミュートしているユーザへのリプライがリストTLに流れない', async () => { + // chitose が kanako をミュートしている状態で、リスインしている kyoko が kanako にリプライした時の動きを見たい + const fired = await waitFire( + chitose, 'userList', + () => api('notes/create', { text: 'foo', replyId: kanakoNote.id }, kyoko), + msg => msg.type === 'note' && msg.body.userId === kyoko.id, + { listId: list.id }, + ); + + assert.strictEqual(fired, false); + }); + + // #10443 + test('ミュートしているユーザの投稿をリノートしたときリストTLに流れない', async () => { + // chitose が kanako をミュートしている状態で、リスインしている kyoko が kanako のノートをリノートした時の動きを見たい + const fired = await waitFire( + chitose, 'userList', + () => api('notes/create', { renoteId: kanakoNote.id }, kyoko), + msg => msg.type === 'note' && msg.body.userId === kyoko.id, + { listId: list.id }, + ); + + assert.strictEqual(fired, false); + }); + + // #10443 + test('ミュートしているサーバのノートがリストTLに流れない', async () => { + await api('/i/update', { + mutedInstances: ['example.com'], + }, chitose); + + // chitose が example.com をミュートしている状態で、リスインしている takumi が ノートした時の動きを見たい + const fired = await waitFire( + chitose, 'userList', + () => api('notes/create', { text: 'foo' }, takumi), + msg => msg.type === 'note' && msg.body.userId === kyoko.id, + { listId: list.id }, + ); + + assert.strictEqual(fired, false); + }); + + // #10443 + test('ミュートしているサーバのノートに対するリプライがリストTLに流れない', async () => { + await api('/i/update', { + mutedInstances: ['example.com'], + }, chitose); + + // chitose が example.com をミュートしている状態で、リスインしている kyoko が takumi のノートにリプライした時の動きを見たい + const fired = await waitFire( + chitose, 'userList', + () => api('notes/create', { text: 'foo', replyId: takumiNote.id }, kyoko), + msg => msg.type === 'note' && msg.body.userId === kyoko.id, + { listId: list.id }, + ); + + assert.strictEqual(fired, false); + }); + + // #10443 + test('ミュートしているサーバのノートに対するリノートがリストTLに流れない', async () => { + await api('/i/update', { + mutedInstances: ['example.com'], + }, chitose); + + // chitose が example.com をミュートしている状態で、リスインしている kyoko が takumi のノートをリノートした時の動きを見たい + const fired = await waitFire( + chitose, 'userList', + () => api('notes/create', { renoteId: takumiNote.id }, kyoko), + msg => msg.type === 'note' && msg.body.userId === kyoko.id, + { listId: list.id }, + ); + + assert.strictEqual(fired, false); + }); }); // XXX: QueryFailedError: duplicate key value violates unique constraint "IDX_347fec870eafea7b26c8a73bac" -- cgit v1.2.3-freya From 2eb86e061935b68dc92626cb1ce7d8c1129d8d9d Mon Sep 17 00:00:00 2001 From: Nanaka Hiira <114819113+7ka-Hiira@users.noreply.github.com> Date: Sun, 3 Dec 2023 10:28:35 +0900 Subject: fix(backend): /emojiにおける拡張子の削除方法を修正 (#12543) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Acid Chicken (硫酸鶏) --- packages/backend/src/server/ServerService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/server/ServerService.ts b/packages/backend/src/server/ServerService.ts index 17c2a93525..bb41ab0e42 100644 --- a/packages/backend/src/server/ServerService.ts +++ b/packages/backend/src/server/ServerService.ts @@ -119,8 +119,8 @@ export class ServerService implements OnApplicationShutdown { return; } - const name = path.split('@')[0].replace('.webp', ''); - const host = path.split('@')[1]?.replace('.webp', ''); + const name = path.split('@')[0].replace(/\.webp$/i, ''); + const host = path.split('@')[1]?.replace(/\.webp$/i, ''); const emoji = await this.emojisRepository.findOneBy({ // `@.` is the spec of ReactionService.decodeReaction -- cgit v1.2.3-freya From e17d741f4b14e3d675f2818fab3ec30c72a39586 Mon Sep 17 00:00:00 2001 From: おさむのひと <46447427+samunohito@users.noreply.github.com> Date: Sun, 3 Dec 2023 12:45:18 +0900 Subject: enhance(misskey-js) misskey-jsのストリーミングAPI定義をバックエンドに追従 (#12552) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * (enhance) misskey-jsのストリーミングAPI定義をバックエンドに追従 * fix ci * fix ci --- packages/backend/src/misc/json-schema.ts | 2 + packages/backend/src/models/json-schema/signin.ts | 26 +++ .../src/server/api/endpoints/i/signin-history.ts | 11 +- packages/misskey-js/etc/misskey-js.api.md | 180 +++++++++++++++++++-- packages/misskey-js/src/autogen/endpoint.ts | 4 +- packages/misskey-js/src/autogen/entities.ts | 4 +- packages/misskey-js/src/autogen/models.ts | 5 +- packages/misskey-js/src/autogen/types.ts | 42 +++-- packages/misskey-js/src/entities.ts | 56 ++++++- packages/misskey-js/src/streaming.types.ts | 140 +++++++++++++--- 10 files changed, 414 insertions(+), 56 deletions(-) create mode 100644 packages/backend/src/models/json-schema/signin.ts (limited to 'packages/backend/src') diff --git a/packages/backend/src/misc/json-schema.ts b/packages/backend/src/misc/json-schema.ts index 80c1041c62..7e7fc447c3 100644 --- a/packages/backend/src/misc/json-schema.ts +++ b/packages/backend/src/misc/json-schema.ts @@ -36,6 +36,7 @@ import { packedGalleryPostSchema } from '@/models/json-schema/gallery-post.js'; import { packedEmojiDetailedSchema, packedEmojiSimpleSchema } from '@/models/json-schema/emoji.js'; import { packedFlashSchema } from '@/models/json-schema/flash.js'; import { packedAnnouncementSchema } from '@/models/json-schema/announcement.js'; +import { packedSigninSchema } from '@/models/json-schema/signin.js'; export const refs = { UserLite: packedUserLiteSchema, @@ -71,6 +72,7 @@ export const refs = { EmojiSimple: packedEmojiSimpleSchema, EmojiDetailed: packedEmojiDetailedSchema, Flash: packedFlashSchema, + Signin: packedSigninSchema, }; export type Packed = SchemaType; diff --git a/packages/backend/src/models/json-schema/signin.ts b/packages/backend/src/models/json-schema/signin.ts new file mode 100644 index 0000000000..d27d2490c5 --- /dev/null +++ b/packages/backend/src/models/json-schema/signin.ts @@ -0,0 +1,26 @@ +export const packedSigninSchema = { + type: 'object', + properties: { + id: { + type: 'string', + optional: false, nullable: false, + }, + createdAt: { + type: 'string', + optional: false, nullable: false, + format: 'date-time', + }, + ip: { + type: 'string', + optional: false, nullable: false, + }, + headers: { + type: 'object', + optional: false, nullable: false, + }, + success: { + type: 'boolean', + optional: false, nullable: false, + }, + }, +} as const; diff --git a/packages/backend/src/server/api/endpoints/i/signin-history.ts b/packages/backend/src/server/api/endpoints/i/signin-history.ts index 139bede7bc..f82e3f9b28 100644 --- a/packages/backend/src/server/api/endpoints/i/signin-history.ts +++ b/packages/backend/src/server/api/endpoints/i/signin-history.ts @@ -12,8 +12,17 @@ import { DI } from '@/di-symbols.js'; export const meta = { requireCredential: true, - secure: true, + + res: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + optional: false, nullable: false, + ref: 'Signin', + }, + }, } as const; export const paramDef = { diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 4e6e2adc02..e2e3349c08 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -292,6 +292,11 @@ type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestB // @public (undocumented) type Announcement = components['schemas']['Announcement']; +// @public (undocumented) +type AnnouncementCreated = { + announcement: Announcement; +}; + // @public (undocumented) type AnnouncementsRequest = operations['announcements']['requestBody']['content']['application/json']; @@ -488,9 +493,7 @@ export type Channels = { unreadAntenna: (payload: Antenna) => void; readAllAnnouncements: () => void; myTokenRegenerated: () => void; - reversiNoInvites: () => void; - reversiInvited: (payload: FIXME) => void; - signin: (payload: FIXME) => void; + signin: (payload: Signin) => void; registryUpdated: (payload: { scope?: string[]; key: string; @@ -498,41 +501,116 @@ export type Channels = { }) => void; driveFileCreated: (payload: DriveFile) => void; readAntenna: (payload: Antenna) => void; + receiveFollowRequest: (payload: User) => void; + announcementCreated: (payload: AnnouncementCreated) => void; }; receives: null; }; homeTimeline: { - params: null; + params: { + withRenotes?: boolean; + withFiles?: boolean; + }; events: { note: (payload: Note) => void; }; receives: null; }; localTimeline: { - params: null; + params: { + withRenotes?: boolean; + withReplies?: boolean; + withFiles?: boolean; + }; events: { note: (payload: Note) => void; }; receives: null; }; hybridTimeline: { - params: null; + params: { + withRenotes?: boolean; + withReplies?: boolean; + withFiles?: boolean; + }; events: { note: (payload: Note) => void; }; receives: null; }; globalTimeline: { - params: null; + params: { + withRenotes?: boolean; + withFiles?: boolean; + }; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + userList: { + params: { + listId: string; + withFiles?: boolean; + }; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + hashtag: { + params: { + q?: string; + }; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + roleTimeline: { + params: { + roleId: string; + }; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + antenna: { + params: { + antennaId: string; + }; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + channel: { + params: { + channelId: string; + }; events: { note: (payload: Note) => void; }; receives: null; }; + drive: { + params: null; + events: { + fileCreated: (payload: DriveFile) => void; + fileDeleted: (payload: DriveFile['id']) => void; + fileUpdated: (payload: DriveFile) => void; + folderCreated: (payload: DriveFolder) => void; + folderDeleted: (payload: DriveFolder['id']) => void; + folderUpdated: (payload: DriveFile) => void; + }; + receives: null; + }; serverStats: { params: null; events: { - stats: (payload: FIXME) => void; + stats: (payload: ServerStats) => void; + statsLog: (payload: ServerStatsLog) => void; }; receives: { requestLog: { @@ -544,7 +622,8 @@ export type Channels = { queueStats: { params: null; events: { - stats: (payload: FIXME) => void; + stats: (payload: QueueStats) => void; + statsLog: (payload: QueueStatsLog) => void; }; receives: { requestLog: { @@ -553,6 +632,18 @@ export type Channels = { }; }; }; + admin: { + params: null; + events: { + newAbuseUserReport: { + id: string; + targetUserId: string; + reporterId: string; + comment: string; + }; + }; + receives: null; + }; }; // @public (undocumented) @@ -846,6 +937,16 @@ type EmailAddressAvailableRequest = operations['email-address/available']['reque // @public (undocumented) type EmailAddressAvailableResponse = operations['email-address/available']['responses']['200']['content']['application/json']; +// @public (undocumented) +type EmojiAdded = { + emoji: EmojiDetailed; +}; + +// @public (undocumented) +type EmojiDeleted = { + emojis: EmojiDetailed[]; +}; + // @public (undocumented) type EmojiDetailed = components['schemas']['EmojiDetailed']; @@ -861,6 +962,11 @@ type EmojiSimple = components['schemas']['EmojiSimple']; // @public (undocumented) type EmojisResponse = operations['emojis']['responses']['200']['content']['application/json']; +// @public (undocumented) +type EmojiUpdated = { + emojis: EmojiDetailed[]; +}; + // @public (undocumented) type EmptyRequest = Record | undefined; @@ -902,6 +1008,14 @@ declare namespace entities { DateString, PageEvent, ModerationLog, + ServerStats, + ServerStatsLog, + QueueStats, + QueueStatsLog, + EmojiAdded, + EmojiUpdated, + EmojiDeleted, + AnnouncementCreated, EmptyRequest, EmptyResponse, AdminMetaResponse, @@ -1404,7 +1518,8 @@ declare namespace entities { GalleryPost, EmojiSimple, EmojiDetailed, - Flash + Flash, + Signin } } export { entities } @@ -2154,6 +2269,25 @@ type PromoReadRequest = operations['promo/read']['requestBody']['content']['appl // @public (undocumented) type QueueCount = components['schemas']['QueueCount']; +// @public (undocumented) +type QueueStats = { + deliver: { + activeSincePrevTick: number; + active: number; + waiting: number; + delayed: number; + }; + inbox: { + activeSincePrevTick: number; + active: number; + waiting: number; + delayed: number; + }; +}; + +// @public (undocumented) +type QueueStatsLog = string[]; + // @public (undocumented) type RenoteMuteCreateRequest = operations['renote-mute/create']['requestBody']['content']['application/json']; @@ -2190,6 +2324,29 @@ type RolesShowRequest = operations['roles/show']['requestBody']['content']['appl // @public (undocumented) type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json']; +// @public (undocumented) +type ServerStats = { + cpu: number; + mem: { + used: number; + active: number; + }; + net: { + rx: number; + tx: number; + }; + fs: { + r: number; + w: number; + }; +}; + +// @public (undocumented) +type ServerStatsLog = string[]; + +// @public (undocumented) +type Signin = components['schemas']['Signin']; + // @public (undocumented) type StatsResponse = operations['stats']['responses']['200']['content']['application/json']; @@ -2448,8 +2605,7 @@ type UsersUpdateMemoRequest = operations['users/update-memo']['requestBody']['co // Warnings were encountered during analysis: // -// src/entities.ts:24:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts -// src/streaming.types.ts:31:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts +// src/entities.ts:25:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index 64739a65d0..b46e69f691 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -1,6 +1,6 @@ /* - * version: 2023.11.1 - * generatedAt: 2023-11-27T02:24:45.113Z + * version: 2023.12.0-beta.1 + * generatedAt: 2023-12-03T02:04:45.058Z */ import type { diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index 133a30b4ca..a51ee037d0 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -1,6 +1,6 @@ /* - * version: 2023.11.1 - * generatedAt: 2023-11-27T02:24:45.111Z + * version: 2023.12.0-beta.1 + * generatedAt: 2023-12-03T02:04:45.053Z */ import { operations } from './types.js'; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index bc7ab1f3b9..c2b27b2c58 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -1,6 +1,6 @@ /* - * version: 2023.11.1 - * generatedAt: 2023-11-27T02:24:45.109Z + * version: 2023.12.0-beta.1 + * generatedAt: 2023-12-03T02:04:45.051Z */ import { components } from './types.js'; @@ -37,3 +37,4 @@ export type GalleryPost = components['schemas']['GalleryPost']; export type EmojiSimple = components['schemas']['EmojiSimple']; export type EmojiDetailed = components['schemas']['EmojiDetailed']; export type Flash = components['schemas']['Flash']; +export type Signin = components['schemas']['Signin']; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index c7f5c6c82d..44ed4dbaa8 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -2,8 +2,8 @@ /* eslint @typescript-eslint/no-explicit-any: 0 */ /* - * version: 2023.11.1 - * generatedAt: 2023-11-27T02:24:44.994Z + * version: 2023.12.0-beta.1 + * generatedAt: 2023-12-03T02:04:44.864Z */ /** @@ -3388,6 +3388,7 @@ export type components = { uri?: string; url?: string; reactionAndUserPairCache?: string[]; + clippedCount?: number; myReaction?: Record | null; }; NoteReaction: { @@ -3786,6 +3787,14 @@ export type components = { likedCount: number | null; isLiked?: boolean; }; + Signin: { + id: string; + /** Format: date-time */ + createdAt: string; + ip: string; + headers: Record; + success: boolean; + }; }; responses: never; parameters: never; @@ -6405,10 +6414,7 @@ export type operations = { /** @description OK (with results) */ 200: { content: { - 'application/json': { - /** @example GR6S02ERUA5VR */ - code: string; - }[]; + 'application/json': components['schemas']['InviteCode'][]; }; }; /** @description Client error */ @@ -6471,7 +6477,7 @@ export type operations = { /** @description OK (with results) */ 200: { content: { - 'application/json': Record[]; + 'application/json': components['schemas']['InviteCode'][]; }; }; /** @description Client error */ @@ -9600,6 +9606,8 @@ export type operations = { untilId?: string; sinceDate?: number; untilDate?: number; + /** @default false */ + allowPartial?: boolean; }; }; }; @@ -15893,10 +15901,7 @@ export type operations = { /** @description OK (with results) */ 200: { content: { - 'application/json': { - /** @example GR6S02ERUA5VR */ - code: string; - }; + 'application/json': components['schemas']['InviteCode']; }; }; /** @description Client error */ @@ -17349,6 +17354,8 @@ export type operations = { untilId?: string; sinceDate?: number; untilDate?: number; + /** @default false */ + allowPartial?: boolean; /** @default true */ includeMyRenotes?: boolean; /** @default true */ @@ -17419,14 +17426,14 @@ export type operations = { withRenotes?: boolean; /** @default false */ withReplies?: boolean; - /** @default false */ - excludeNsfw?: boolean; /** @default 10 */ limit?: number; /** Format: misskey:id */ sinceId?: string; /** Format: misskey:id */ untilId?: string; + /** @default false */ + allowPartial?: boolean; sinceDate?: number; untilDate?: number; }; @@ -18317,6 +18324,8 @@ export type operations = { untilId?: string; sinceDate?: number; untilDate?: number; + /** @default false */ + allowPartial?: boolean; /** @default true */ includeMyRenotes?: boolean; /** @default true */ @@ -18502,6 +18511,8 @@ export type operations = { untilId?: string; sinceDate?: number; untilDate?: number; + /** @default false */ + allowPartial?: boolean; /** @default true */ includeMyRenotes?: boolean; /** @default true */ @@ -20799,6 +20810,7 @@ export type operations = { username?: string; /** @description The local host is represented with `null`. */ host?: string | null; + birthday?: string | null; }; }; }; @@ -21704,9 +21716,9 @@ export type operations = { sinceDate?: number; untilDate?: number; /** @default false */ - withFiles?: boolean; + allowPartial?: boolean; /** @default false */ - excludeNsfw?: boolean; + withFiles?: boolean; }; }; }; diff --git a/packages/misskey-js/src/entities.ts b/packages/misskey-js/src/entities.ts index b1d6b5c10f..99f433cc02 100644 --- a/packages/misskey-js/src/entities.ts +++ b/packages/misskey-js/src/entities.ts @@ -1,5 +1,6 @@ -import { ModerationLogPayloads, notificationTypes } from './consts.js'; -import { Page, User, UserDetailed } from './autogen/models'; +import { ModerationLogPayloads } from './consts.js'; +import { Announcement, EmojiDetailed, Page, User, UserDetailed } from './autogen/models'; + export * from './autogen/entities'; export * from './autogen/models'; @@ -131,3 +132,54 @@ export type ModerationLog = { type: 'unsetUserBanner'; info: ModerationLogPayloads['unsetUserBanner']; }); + +export type ServerStats = { + cpu: number; + mem: { + used: number; + active: number; + }; + net: { + rx: number; + tx: number; + }; + fs: { + r: number; + w: number; + } +}; + +export type ServerStatsLog = string[]; + +export type QueueStats = { + deliver: { + activeSincePrevTick: number; + active: number; + waiting: number; + delayed: number; + }; + inbox: { + activeSincePrevTick: number; + active: number; + waiting: number; + delayed: number; + }; +}; + +export type QueueStatsLog = string[]; + +export type EmojiAdded = { + emoji: EmojiDetailed +}; + +export type EmojiUpdated = { + emojis: EmojiDetailed[] +}; + +export type EmojiDeleted = { + emojis: EmojiDetailed[] +}; + +export type AnnouncementCreated = { + announcement: Announcement; +}; diff --git a/packages/misskey-js/src/streaming.types.ts b/packages/misskey-js/src/streaming.types.ts index 7981c280f6..6f575ce585 100644 --- a/packages/misskey-js/src/streaming.types.ts +++ b/packages/misskey-js/src/streaming.types.ts @@ -1,7 +1,23 @@ -import { Antenna, DriveFile, EmojiDetailed, MeDetailed, Note, User, Notification } from './autogen/models.js'; -import { PageEvent } from './entities.js'; - -type FIXME = any; +import { + Antenna, + DriveFile, + DriveFolder, + MeDetailed, + Note, + Notification, + Signin, + User, +} from './autogen/models.js'; +import { + AnnouncementCreated, + EmojiAdded, EmojiDeleted, + EmojiUpdated, + PageEvent, + QueueStats, + QueueStatsLog, + ServerStats, + ServerStatsLog, +} from './entities.js'; export type Channels = { main: { @@ -27,9 +43,7 @@ export type Channels = { unreadAntenna: (payload: Antenna) => void; readAllAnnouncements: () => void; myTokenRegenerated: () => void; - reversiNoInvites: () => void; - reversiInvited: (payload: FIXME) => void; - signin: (payload: FIXME) => void; + signin: (payload: Signin) => void; registryUpdated: (payload: { scope?: string[]; key: string; @@ -37,41 +51,116 @@ export type Channels = { }) => void; driveFileCreated: (payload: DriveFile) => void; readAntenna: (payload: Antenna) => void; + receiveFollowRequest: (payload: User) => void; + announcementCreated: (payload: AnnouncementCreated) => void; }; receives: null; }; homeTimeline: { - params: null; + params: { + withRenotes?: boolean; + withFiles?: boolean; + }; events: { note: (payload: Note) => void; }; receives: null; }; localTimeline: { - params: null; + params: { + withRenotes?: boolean; + withReplies?: boolean; + withFiles?: boolean; + }; events: { note: (payload: Note) => void; }; receives: null; }; hybridTimeline: { - params: null; + params: { + withRenotes?: boolean; + withReplies?: boolean; + withFiles?: boolean; + }; events: { note: (payload: Note) => void; }; receives: null; }; globalTimeline: { - params: null; + params: { + withRenotes?: boolean; + withFiles?: boolean; + }; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + userList: { + params: { + listId: string; + withFiles?: boolean; + }; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + hashtag: { + params: { + q?: string; + }; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + roleTimeline: { + params: { + roleId: string; + }; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + antenna: { + params: { + antennaId: string; + }; + events: { + note: (payload: Note) => void; + }; + receives: null; + }; + channel: { + params: { + channelId: string; + }; events: { note: (payload: Note) => void; }; receives: null; }; + drive: { + params: null; + events: { + fileCreated: (payload: DriveFile) => void; + fileDeleted: (payload: DriveFile['id']) => void; + fileUpdated: (payload: DriveFile) => void; + folderCreated: (payload: DriveFolder) => void; + folderDeleted: (payload: DriveFolder['id']) => void; + folderUpdated: (payload: DriveFile) => void; + }; + receives: null; + }; serverStats: { params: null; events: { - stats: (payload: FIXME) => void; + stats: (payload: ServerStats) => void; + statsLog: (payload: ServerStatsLog) => void; }; receives: { requestLog: { @@ -83,7 +172,8 @@ export type Channels = { queueStats: { params: null; events: { - stats: (payload: FIXME) => void; + stats: (payload: QueueStats) => void; + statsLog: (payload: QueueStatsLog) => void; }; receives: { requestLog: { @@ -92,30 +182,39 @@ export type Channels = { }; }; }; + admin: { + params: null; + events: { + newAbuseUserReport: { + id: string; + targetUserId: string; + reporterId: string; + comment: string; + } + }; + receives: null; + } }; export type NoteUpdatedEvent = { - id: Note['id']; type: 'reacted'; body: { reaction: string; + emoji: string | null; userId: User['id']; }; } | { - id: Note['id']; type: 'unreacted'; body: { reaction: string; userId: User['id']; }; } | { - id: Note['id']; type: 'deleted'; body: { deletedAt: string; }; } | { - id: Note['id']; type: 'pollVoted'; body: { choice: number; @@ -125,7 +224,8 @@ export type NoteUpdatedEvent = { export type BroadcastEvents = { noteUpdated: (payload: NoteUpdatedEvent) => void; - emojiAdded: (payload: { - emoji: EmojiDetailed; - }) => void; + emojiAdded: (payload: EmojiAdded) => void; + emojiUpdated: (payload: EmojiUpdated) => void; + emojiDeleted: (payload: EmojiDeleted) => void; + announcementCreated: (payload: AnnouncementCreated) => void; }; -- cgit v1.2.3-freya From 34223f3da41f1d006e950573952ee062256a0ed5 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 3 Dec 2023 05:42:41 +0100 Subject: fix(backend): enhance nodeinfo by export instance admin via nodeAdmins key (#12503) https://codeberg.org/thefederationinfo/nodeinfo_extension --- packages/backend/src/server/NodeinfoServerService.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages/backend/src') diff --git a/packages/backend/src/server/NodeinfoServerService.ts b/packages/backend/src/server/NodeinfoServerService.ts index 79b0a57f2b..4d94fcdd54 100644 --- a/packages/backend/src/server/NodeinfoServerService.ts +++ b/packages/backend/src/server/NodeinfoServerService.ts @@ -96,6 +96,11 @@ export class NodeinfoServerService { metadata: { nodeName: meta.name, nodeDescription: meta.description, + nodeAdmins: [{ + name: meta.maintainerName, + email: meta.maintainerEmail, + }], + // deprecated maintainer: { name: meta.maintainerName, email: meta.maintainerEmail, -- cgit v1.2.3-freya From af15f8d09db6c1709950bf9d00ffb77613fbcf8a Mon Sep 17 00:00:00 2001 From: "Acid Chicken (硫酸鶏)" Date: Sun, 3 Dec 2023 14:38:42 +0900 Subject: fix(backend): reject malformed timestamp (#12554) --- packages/backend/src/core/IdService.ts | 23 +++++++++++++++++----- .../backend/src/core/activitypub/ApInboxService.ts | 8 +++++++- .../src/core/activitypub/models/ApNoteService.ts | 4 ++++ packages/backend/src/misc/id/aid.ts | 4 ++++ packages/backend/src/misc/id/aidx.ts | 4 ++++ packages/backend/src/misc/id/meid.ts | 4 ++++ packages/backend/src/misc/id/meidg.ts | 4 ++++ packages/backend/src/misc/id/object-id.ts | 4 ++++ 8 files changed, 49 insertions(+), 6 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/core/IdService.ts b/packages/backend/src/core/IdService.ts index c98b8ea6fc..43e72d2d7b 100644 --- a/packages/backend/src/core/IdService.ts +++ b/packages/backend/src/core/IdService.ts @@ -7,11 +7,11 @@ import { Inject, Injectable } from '@nestjs/common'; import { ulid } from 'ulid'; import { DI } from '@/di-symbols.js'; import type { Config } from '@/config.js'; -import { genAid, parseAid } from '@/misc/id/aid.js'; -import { genAidx, parseAidx } from '@/misc/id/aidx.js'; -import { genMeid, parseMeid } from '@/misc/id/meid.js'; -import { genMeidg, parseMeidg } from '@/misc/id/meidg.js'; -import { genObjectId, parseObjectId } from '@/misc/id/object-id.js'; +import { genAid, isSafeAidT, parseAid } from '@/misc/id/aid.js'; +import { genAidx, isSafeAidxT, parseAidx } from '@/misc/id/aidx.js'; +import { genMeid, isSafeMeidT, parseMeid } from '@/misc/id/meid.js'; +import { genMeidg, isSafeMeidgT, parseMeidg } from '@/misc/id/meidg.js'; +import { genObjectId, isSafeObjectIdT, parseObjectId } from '@/misc/id/object-id.js'; import { bindThis } from '@/decorators.js'; import { parseUlid } from '@/misc/id/ulid.js'; @@ -26,6 +26,19 @@ export class IdService { this.method = config.id.toLowerCase(); } + @bindThis + public isSafeT(t: number): boolean { + switch (this.method) { + case 'aid': return isSafeAidT(t); + case 'aidx': return isSafeAidxT(t); + case 'meid': return isSafeMeidT(t); + case 'meidg': return isSafeMeidgT(t); + case 'ulid': return t > 0; + case 'objectid': return isSafeObjectIdT(t); + default: throw new Error('unrecognized id generation method'); + } + } + /** * 時間を元にIDを生成します(省略時は現在日時) * @param time 日時 diff --git a/packages/backend/src/core/activitypub/ApInboxService.ts b/packages/backend/src/core/activitypub/ApInboxService.ts index 7aba140689..baaab67e48 100644 --- a/packages/backend/src/core/activitypub/ApInboxService.ts +++ b/packages/backend/src/core/activitypub/ApInboxService.ts @@ -306,9 +306,15 @@ export class ApInboxService { this.logger.info(`Creating the (Re)Note: ${uri}`); const activityAudience = await this.apAudienceService.parseAudience(actor, activity.to, activity.cc); + const createdAt = activity.published ? new Date(activity.published) : null; + + if (createdAt && createdAt < this.idService.parse(renote.id).date) { + this.logger.warn('skip: malformed createdAt'); + return; + } await this.noteCreateService.create(actor, { - createdAt: activity.published ? new Date(activity.published) : null, + createdAt, renote, visibility: activityAudience.visibility, visibleUsers: activityAudience.visibleUsers, diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index 1979cdda9c..05d5ca15db 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -92,6 +92,10 @@ export class ApNoteService { return new Error(`invalid Note: attributedTo has different host. expected: ${expectHost}, actual: ${actualHost}`); } + if (object.published && !this.idService.isSafeT(new Date(object.published).valueOf())) { + return new Error('invalid Note: published timestamp is malformed'); + } + return null; } diff --git a/packages/backend/src/misc/id/aid.ts b/packages/backend/src/misc/id/aid.ts index e7b59f262b..de03f6793f 100644 --- a/packages/backend/src/misc/id/aid.ts +++ b/packages/backend/src/misc/id/aid.ts @@ -34,3 +34,7 @@ export function parseAid(id: string): { date: Date; } { const time = parseInt(id.slice(0, 8), 36) + TIME2000; return { date: new Date(time) }; } + +export function isSafeAidT(t: number): boolean { + return t > TIME2000; +} diff --git a/packages/backend/src/misc/id/aidx.ts b/packages/backend/src/misc/id/aidx.ts index bed223225a..9f457f6f0a 100644 --- a/packages/backend/src/misc/id/aidx.ts +++ b/packages/backend/src/misc/id/aidx.ts @@ -41,3 +41,7 @@ export function parseAidx(id: string): { date: Date; } { const time = parseInt(id.slice(0, TIME_LENGTH), 36) + TIME2000; return { date: new Date(time) }; } + +export function isSafeAidxT(t: number): boolean { + return t > TIME2000; +} diff --git a/packages/backend/src/misc/id/meid.ts b/packages/backend/src/misc/id/meid.ts index 366738de05..7646282edb 100644 --- a/packages/backend/src/misc/id/meid.ts +++ b/packages/backend/src/misc/id/meid.ts @@ -38,3 +38,7 @@ export function parseMeid(id: string): { date: Date; } { date: new Date(parseInt(id.slice(0, 12), 16) - 0x800000000000), }; } + +export function isSafeMeidT(t: number): boolean { + return t > 0; +} diff --git a/packages/backend/src/misc/id/meidg.ts b/packages/backend/src/misc/id/meidg.ts index 426a46970b..f2a55443ef 100644 --- a/packages/backend/src/misc/id/meidg.ts +++ b/packages/backend/src/misc/id/meidg.ts @@ -38,3 +38,7 @@ export function parseMeidg(id: string): { date: Date; } { date: new Date(parseInt(id.slice(1, 12), 16)), }; } + +export function isSafeMeidgT(t: number): boolean { + return t > 0; +} diff --git a/packages/backend/src/misc/id/object-id.ts b/packages/backend/src/misc/id/object-id.ts index 49bd9591c0..f5c3619fdb 100644 --- a/packages/backend/src/misc/id/object-id.ts +++ b/packages/backend/src/misc/id/object-id.ts @@ -38,3 +38,7 @@ export function parseObjectId(id: string): { date: Date; } { date: new Date(parseInt(id.slice(0, 8), 16) * 1000), }; } + +export function isSafeObjectIdT(t: number): boolean { + return t > 0; +} -- cgit v1.2.3-freya From 55c8ec80edb275f1477ab8e39274d7c8599b7a8d Mon Sep 17 00:00:00 2001 From: おさむのひと <46447427+samunohito@users.noreply.github.com> Date: Sun, 3 Dec 2023 20:46:19 +0900 Subject: fix (backend): 「みつける」のなかにミュートしたユーザが現れてしまう問題を修正 (#12559) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix (backend): 「みつける」のなかにミュートしたユーザが現れてしまう問題を修正 * fix --- CHANGELOG.md | 1 + .../src/server/api/endpoints/notes/featured.ts | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index 694f330120..453bdeff59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ - Fix: 特定の条件下でチャンネルやユーザーのノート一覧に最新のノートが表示されなくなる問題を修正 - Fix: 何もノートしていないユーザーのフィードにアクセスするとエラーになる問題を修正 - Fix: リストタイムラインにてミュートが機能しないケースがある問題と、チャンネル投稿がストリーミングで流れてきてしまう問題を修正 #10443 +- Fix: 「みつける」のなかにミュートしたユーザが現れてしまう問題を修正 #12383 ## 2023.11.1 diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index bc6cbe242f..31b8d1ad2d 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -9,6 +9,8 @@ import { Endpoint } from '@/server/api/endpoint-base.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { DI } from '@/di-symbols.js'; import { FeaturedService } from '@/core/FeaturedService.js'; +import { isUserRelated } from '@/misc/is-user-related.js'; +import { CacheService } from '@/core/CacheService.js'; export const meta = { tags: ['notes'], @@ -47,6 +49,7 @@ export default class extends Endpoint { // eslint- @Inject(DI.notesRepository) private notesRepository: NotesRepository, + private cacheService: CacheService, private noteEntityService: NoteEntityService, private featuredService: FeaturedService, ) { @@ -74,6 +77,14 @@ export default class extends Endpoint { // eslint- return []; } + const [ + userIdsWhoMeMuting, + userIdsWhoBlockingMe, + ] = me ? await Promise.all([ + this.cacheService.userMutingsCache.fetch(me.id), + this.cacheService.userBlockedCache.fetch(me.id), + ]) : [new Set(), new Set()]; + const query = this.notesRepository.createQueryBuilder('note') .where('note.id IN (:...noteIds)', { noteIds: noteIds }) .innerJoinAndSelect('note.user', 'user') @@ -83,10 +94,14 @@ export default class extends Endpoint { // eslint- .leftJoinAndSelect('renote.user', 'renoteUser') .leftJoinAndSelect('note.channel', 'channel'); - const notes = await query.getMany(); - notes.sort((a, b) => a.id > b.id ? -1 : 1); + const notes = (await query.getMany()).filter(note => { + if (me && isUserRelated(note, userIdsWhoBlockingMe)) return false; + if (me && isUserRelated(note, userIdsWhoMeMuting)) return false; - // TODO: ミュート等考慮 + return true; + }); + + notes.sort((a, b) => a.id > b.id ? -1 : 1); return await this.noteEntityService.packMany(notes, me); }); -- cgit v1.2.3-freya From 18109fcef760dee8171364fd0382375c4047b8e7 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Mon, 4 Dec 2023 14:38:21 +0900 Subject: Filter User / Instance Mutes in FanoutTimelineEndpointService (#12565) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: unnecessary logging in FanoutTimelineEndpointService * chore: TimelineOptions * chore: add FanoutTimelineName type * chore: forbid specifying both withReplies and withFiles since it's not implemented correctly * chore: filter mutes, replies, renotes, files in FanoutTimelineEndpointService * revert unintended changes * use isReply in NoteCreateService * fix: excludePureRenotes is not implemented * fix: replies to me is excluded from local timeline * chore(frontend): forbid enabling both withReplies and withFiles * docs(changelog): インスタンスミュートが効かない問題の修正について言及 --- CHANGELOG.md | 3 + .../src/core/FanoutTimelineEndpointService.ts | 103 +++++++++++++++------ packages/backend/src/core/FanoutTimelineService.ts | 36 ++++++- packages/backend/src/core/NoteCreateService.ts | 7 +- packages/backend/src/misc/is-reply.ts | 10 ++ .../src/server/api/endpoints/channels/timeline.ts | 16 +--- .../server/api/endpoints/notes/hybrid-timeline.ts | 40 +++----- .../server/api/endpoints/notes/local-timeline.ts | 40 +++----- .../src/server/api/endpoints/notes/timeline.ts | 20 +--- .../api/endpoints/notes/user-list-timeline.ts | 36 +------ .../src/server/api/endpoints/users/notes.ts | 34 +++---- packages/frontend/src/components/MkMenu.vue | 2 +- packages/frontend/src/pages/timeline.vue | 4 +- packages/frontend/src/types/menu.ts | 2 +- packages/frontend/src/ui/deck/tl-column.vue | 2 + 15 files changed, 176 insertions(+), 179 deletions(-) create mode 100644 packages/backend/src/misc/is-reply.ts (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index 453bdeff59..51eb5400ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,9 @@ - Fix: 何もノートしていないユーザーのフィードにアクセスするとエラーになる問題を修正 - Fix: リストタイムラインにてミュートが機能しないケースがある問題と、チャンネル投稿がストリーミングで流れてきてしまう問題を修正 #10443 - Fix: 「みつける」のなかにミュートしたユーザが現れてしまう問題を修正 #12383 +- Fix: Social/Local/Home Timelineにてインスタンスミュートが効かない問題 +- Fix: ユーザのノート一覧にてインスタンスミュートが効かない問題 +- Fix: チャンネルのノート一覧にてインスタンスミュートが効かない問題 ## 2023.11.1 diff --git a/packages/backend/src/core/FanoutTimelineEndpointService.ts b/packages/backend/src/core/FanoutTimelineEndpointService.ts index 157fcbe877..6775f0051a 100644 --- a/packages/backend/src/core/FanoutTimelineEndpointService.ts +++ b/packages/backend/src/core/FanoutTimelineEndpointService.ts @@ -11,7 +11,29 @@ import type { MiNote } from '@/models/Note.js'; import { Packed } from '@/misc/json-schema.js'; import type { NotesRepository } from '@/models/_.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; -import { FanoutTimelineService } from '@/core/FanoutTimelineService.js'; +import { FanoutTimelineName, FanoutTimelineService } from '@/core/FanoutTimelineService.js'; +import { isUserRelated } from '@/misc/is-user-related.js'; +import { isPureRenote } from '@/misc/is-pure-renote.js'; +import { CacheService } from '@/core/CacheService.js'; +import { isReply } from '@/misc/is-reply.js'; +import { isInstanceMuted } from '@/misc/is-instance-muted.js'; + +type TimelineOptions = { + untilId: string | null, + sinceId: string | null, + limit: number, + allowPartial: boolean, + me?: { id: MiUser['id'] } | undefined | null, + useDbFallback: boolean, + redisTimelines: FanoutTimelineName[], + noteFilter?: (note: MiNote) => boolean, + alwaysIncludeMyNotes?: boolean; + ignoreAuthorFromMute?: boolean; + excludeNoFiles?: boolean; + excludeReplies?: boolean; + excludePureRenotes: boolean; + dbFallback: (untilId: string | null, sinceId: string | null, limit: number) => Promise, +}; @Injectable() export class FanoutTimelineEndpointService { @@ -20,37 +42,18 @@ export class FanoutTimelineEndpointService { private notesRepository: NotesRepository, private noteEntityService: NoteEntityService, + private cacheService: CacheService, private fanoutTimelineService: FanoutTimelineService, ) { } @bindThis - async timeline(ps: { - untilId: string | null, - sinceId: string | null, - limit: number, - allowPartial: boolean, - me?: { id: MiUser['id'] } | undefined | null, - useDbFallback: boolean, - redisTimelines: string[], - noteFilter: (note: MiNote) => boolean, - dbFallback: (untilId: string | null, sinceId: string | null, limit: number) => Promise, - }): Promise[]> { + async timeline(ps: TimelineOptions): Promise[]> { return await this.noteEntityService.packMany(await this.getMiNotes(ps), ps.me); } @bindThis - private async getMiNotes(ps: { - untilId: string | null, - sinceId: string | null, - limit: number, - allowPartial: boolean, - me?: { id: MiUser['id'] } | undefined | null, - useDbFallback: boolean, - redisTimelines: string[], - noteFilter: (note: MiNote) => boolean, - dbFallback: (untilId: string | null, sinceId: string | null, limit: number) => Promise, - }): Promise { + private async getMiNotes(ps: TimelineOptions): Promise { let noteIds: string[]; let shouldFallbackToDb = false; @@ -67,10 +70,57 @@ export class FanoutTimelineEndpointService { shouldFallbackToDb = shouldFallbackToDb || (noteIds.length === 0); if (!shouldFallbackToDb) { + let filter = ps.noteFilter ?? (_note => true); + + if (ps.alwaysIncludeMyNotes && ps.me) { + const me = ps.me; + const parentFilter = filter; + filter = (note) => note.userId === me.id || parentFilter(note); + } + + if (ps.excludeNoFiles) { + const parentFilter = filter; + filter = (note) => note.fileIds.length !== 0 && parentFilter(note); + } + + if (ps.excludeReplies) { + const parentFilter = filter; + filter = (note) => !isReply(note, ps.me?.id) && parentFilter(note); + } + + if (ps.excludePureRenotes) { + const parentFilter = filter; + filter = (note) => !isPureRenote(note) && parentFilter(note); + } + + if (ps.me) { + const me = ps.me; + const [ + userIdsWhoMeMuting, + userIdsWhoMeMutingRenotes, + userIdsWhoBlockingMe, + userMutedInstances, + ] = await Promise.all([ + this.cacheService.userMutingsCache.fetch(ps.me.id), + this.cacheService.renoteMutingsCache.fetch(ps.me.id), + this.cacheService.userBlockedCache.fetch(ps.me.id), + this.cacheService.userProfileCache.fetch(me.id).then(p => new Set(p.mutedInstances)), + ]); + + const parentFilter = filter; + filter = (note) => { + if (isUserRelated(note, userIdsWhoBlockingMe, ps.ignoreAuthorFromMute)) return false; + if (isUserRelated(note, userIdsWhoMeMuting, ps.ignoreAuthorFromMute)) return false; + if (isPureRenote(note) && isUserRelated(note, userIdsWhoMeMutingRenotes, ps.ignoreAuthorFromMute)) return false; + if (isInstanceMuted(note, userMutedInstances)) return false; + + return parentFilter(note); + }; + } + const redisTimeline: MiNote[] = []; let readFromRedis = 0; let lastSuccessfulRate = 1; // rateをキャッシュする? - let trialCount = 1; while ((redisResultIds.length - readFromRedis) !== 0) { const remainingToRead = ps.limit - redisTimeline.length; @@ -81,12 +131,10 @@ export class FanoutTimelineEndpointService { readFromRedis += noteIds.length; - const gotFromDb = await this.getAndFilterFromDb(noteIds, ps.noteFilter); + const gotFromDb = await this.getAndFilterFromDb(noteIds, filter); redisTimeline.push(...gotFromDb); lastSuccessfulRate = gotFromDb.length / noteIds.length; - console.log(`fanoutTimelineTrial#${trialCount++}: req: ${ps.limit}, tried: ${noteIds.length}, got: ${gotFromDb.length}, rate: ${lastSuccessfulRate}, total: ${redisTimeline.length}, fromRedis: ${redisResultIds.length}`); - if (ps.allowPartial ? redisTimeline.length !== 0 : redisTimeline.length >= ps.limit) { // 十分Redisからとれた return redisTimeline.slice(0, ps.limit); @@ -97,7 +145,6 @@ export class FanoutTimelineEndpointService { const remainingToRead = ps.limit - redisTimeline.length; const gotFromDb = await ps.dbFallback(noteIds[noteIds.length - 1], ps.sinceId, remainingToRead); redisTimeline.push(...gotFromDb); - console.log(`fanoutTimelineTrial#db: req: ${ps.limit}, tried: ${remainingToRead}, got: ${gotFromDb.length}, since: ${noteIds[noteIds.length - 1]}, until: ${ps.untilId}, total: ${redisTimeline.length}`); return redisTimeline; } diff --git a/packages/backend/src/core/FanoutTimelineService.ts b/packages/backend/src/core/FanoutTimelineService.ts index 6a1b0aa879..654a035a5f 100644 --- a/packages/backend/src/core/FanoutTimelineService.ts +++ b/packages/backend/src/core/FanoutTimelineService.ts @@ -9,6 +9,34 @@ import { DI } from '@/di-symbols.js'; import { bindThis } from '@/decorators.js'; import { IdService } from '@/core/IdService.js'; +export type FanoutTimelineName = + // home timeline + | `homeTimeline:${string}` + | `homeTimelineWithFiles:${string}` // only notes with files are included + // local timeline + | `localTimeline` // replies are not included + | `localTimelineWithFiles` // only non-reply notes with files are included + | `localTimelineWithReplies` // only replies are included + + // antenna + | `antennaTimeline:${string}` + + // user timeline + | `userTimeline:${string}` // replies are not included + | `userTimelineWithFiles:${string}` // only non-reply notes with files are included + | `userTimelineWithReplies:${string}` // only replies are included + | `userTimelineWithChannel:${string}` // only channel notes are included, replies are included + + // user list timelines + | `userListTimeline:${string}` + | `userListTimelineWithFiles:${string}` // only notes with files are included + + // channel timelines + | `channelTimeline:${string}` // replies are included + + // role timelines + | `roleTimeline:${string}` // any notes are included + @Injectable() export class FanoutTimelineService { constructor( @@ -20,7 +48,7 @@ export class FanoutTimelineService { } @bindThis - public push(tl: string, id: string, maxlen: number, pipeline: Redis.ChainableCommander) { + public push(tl: FanoutTimelineName, id: string, maxlen: number, pipeline: Redis.ChainableCommander) { // リモートから遅れて届いた(もしくは後から追加された)投稿日時が古い投稿が追加されるとページネーション時に問題を引き起こすため、 // 3分以内に投稿されたものでない場合、Redisにある最古のIDより新しい場合のみ追加する if (this.idService.parse(id).date.getTime() > Date.now() - 1000 * 60 * 3) { @@ -41,7 +69,7 @@ export class FanoutTimelineService { } @bindThis - public get(name: string, untilId?: string | null, sinceId?: string | null) { + public get(name: FanoutTimelineName, untilId?: string | null, sinceId?: string | null) { if (untilId && sinceId) { return this.redisForTimelines.lrange('list:' + name, 0, -1) .then(ids => ids.filter(id => id < untilId && id > sinceId).sort((a, b) => a > b ? -1 : 1)); @@ -58,7 +86,7 @@ export class FanoutTimelineService { } @bindThis - public getMulti(name: string[], untilId?: string | null, sinceId?: string | null): Promise { + public getMulti(name: FanoutTimelineName[], untilId?: string | null, sinceId?: string | null): Promise { const pipeline = this.redisForTimelines.pipeline(); for (const n of name) { pipeline.lrange('list:' + n, 0, -1); @@ -79,7 +107,7 @@ export class FanoutTimelineService { } @bindThis - public purge(name: string) { + public purge(name: FanoutTimelineName) { return this.redisForTimelines.del('list:' + name); } } diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index fd87edc28e..0110ebaf5e 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -57,6 +57,7 @@ import { FeaturedService } from '@/core/FeaturedService.js'; import { FanoutTimelineService } from '@/core/FanoutTimelineService.js'; import { UtilityService } from '@/core/UtilityService.js'; import { UserBlockingService } from '@/core/UserBlockingService.js'; +import { isReply } from '@/misc/is-reply.js'; type NotificationType = 'reply' | 'renote' | 'quote' | 'mention'; @@ -891,7 +892,7 @@ export class NoteCreateService implements OnApplicationShutdown { if (note.visibility === 'specified' && !note.visibleUserIds.some(v => v === following.followerId)) continue; // 「自分自身への返信 or そのフォロワーへの返信」のどちらでもない場合 - if (note.replyId && !(note.replyUserId === note.userId || note.replyUserId === following.followerId)) { + if (isReply(note, following.followerId)) { if (!following.withReplies) continue; } @@ -909,7 +910,7 @@ export class NoteCreateService implements OnApplicationShutdown { ) continue; // 「自分自身への返信 or そのリストの作成者への返信」のどちらでもない場合 - if (note.replyId && !(note.replyUserId === note.userId || note.replyUserId === userListMembership.userListUserId)) { + if (isReply(note, userListMembership.userListUserId)) { if (!userListMembership.withReplies) continue; } @@ -927,7 +928,7 @@ export class NoteCreateService implements OnApplicationShutdown { } // 自分自身以外への返信 - if (note.replyId && note.replyUserId !== note.userId) { + if (isReply(note)) { this.fanoutTimelineService.push(`userTimelineWithReplies:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r); if (note.visibility === 'public' && note.userHost == null) { diff --git a/packages/backend/src/misc/is-reply.ts b/packages/backend/src/misc/is-reply.ts new file mode 100644 index 0000000000..964c2aa153 --- /dev/null +++ b/packages/backend/src/misc/is-reply.ts @@ -0,0 +1,10 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { MiUser } from '@/models/User.js'; + +export function isReply(note: any, viewerId?: MiUser['id'] | undefined | null): boolean { + return note.replyId && note.replyUserId !== note.userId && note.replyUserId !== viewerId; +} diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index 9ef494d6d8..006228ceee 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -4,15 +4,13 @@ */ import { Inject, Injectable } from '@nestjs/common'; -import * as Redis from 'ioredis'; import { Endpoint } from '@/server/api/endpoint-base.js'; -import type { ChannelsRepository, MiNote, NotesRepository } from '@/models/_.js'; +import type { ChannelsRepository, NotesRepository } from '@/models/_.js'; import { QueryService } from '@/core/QueryService.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import ActiveUsersChart from '@/core/chart/charts/active-users.js'; import { DI } from '@/di-symbols.js'; import { IdService } from '@/core/IdService.js'; -import { isUserRelated } from '@/misc/is-user-related.js'; import { CacheService } from '@/core/CacheService.js'; import { MetaService } from '@/core/MetaService.js'; import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; @@ -94,12 +92,6 @@ export default class extends Endpoint { // eslint- return await this.noteEntityService.packMany(await this.getFromDb({ untilId, sinceId, limit: ps.limit, channelId: channel.id }, me), me); } - const [ - userIdsWhoMeMuting, - ] = me ? await Promise.all([ - this.cacheService.userMutingsCache.fetch(me.id), - ]) : [new Set()]; - return await this.fanoutTimelineEndpointService.timeline({ untilId, sinceId, @@ -108,11 +100,7 @@ export default class extends Endpoint { // eslint- me, useDbFallback: true, redisTimelines: [`channelTimeline:${channel.id}`], - noteFilter: note => { - if (me && isUserRelated(note, userIdsWhoMeMuting)) return false; - - return true; - }, + excludePureRenotes: false, dbFallback: async (untilId, sinceId, limit) => { return await this.getFromDb({ untilId, sinceId, limit, channelId: channel.id }, me); }, diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index deb9e014c4..effcbaf2ee 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -12,9 +12,8 @@ import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { DI } from '@/di-symbols.js'; import { RoleService } from '@/core/RoleService.js'; import { IdService } from '@/core/IdService.js'; -import { isUserRelated } from '@/misc/is-user-related.js'; import { CacheService } from '@/core/CacheService.js'; -import { FanoutTimelineService } from '@/core/FanoutTimelineService.js'; +import { FanoutTimelineName } from '@/core/FanoutTimelineService.js'; import { QueryService } from '@/core/QueryService.js'; import { UserFollowingService } from '@/core/UserFollowingService.js'; import { MetaService } from '@/core/MetaService.js'; @@ -43,6 +42,12 @@ export const meta = { code: 'STL_DISABLED', id: '620763f4-f621-4533-ab33-0577a1a3c342', }, + + bothWithRepliesAndWithFiles: { + message: 'Specifying both withReplies and withFiles is not supported', + code: 'BOTH_WITH_REPLIES_AND_WITH_FILES', + id: 'dfaa3eb7-8002-4cb7-bcc4-1095df46656f' + }, }, } as const; @@ -93,6 +98,8 @@ export default class extends Endpoint { // eslint- throw new ApiError(meta.errors.stlDisabled); } + if (ps.withReplies && ps.withFiles) throw new ApiError(meta.errors.bothWithRepliesAndWithFiles); + const serverSettings = await this.metaService.fetch(); if (!serverSettings.enableFanoutTimeline) { @@ -114,17 +121,7 @@ export default class extends Endpoint { // eslint- return await this.noteEntityService.packMany(timeline, me); } - const [ - userIdsWhoMeMuting, - userIdsWhoMeMutingRenotes, - userIdsWhoBlockingMe, - ] = await Promise.all([ - this.cacheService.userMutingsCache.fetch(me.id), - this.cacheService.renoteMutingsCache.fetch(me.id), - this.cacheService.userBlockedCache.fetch(me.id), - ]); - - let timelineConfig: string[]; + let timelineConfig: FanoutTimelineName[]; if (ps.withFiles) { timelineConfig = [ @@ -152,21 +149,8 @@ export default class extends Endpoint { // eslint- me, redisTimelines: timelineConfig, useDbFallback: serverSettings.enableFanoutTimelineDbFallback, - noteFilter: (note) => { - if (note.userId === me.id) { - return true; - } - if (isUserRelated(note, userIdsWhoBlockingMe)) return false; - if (isUserRelated(note, userIdsWhoMeMuting)) return false; - if (note.renoteId) { - if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) { - if (isUserRelated(note, userIdsWhoMeMutingRenotes)) return false; - if (ps.withRenotes === false) return false; - } - } - - return true; - }, + alwaysIncludeMyNotes: true, + excludePureRenotes: !ps.withRenotes, dbFallback: async (untilId, sinceId, limit) => await this.getFromDb({ untilId, sinceId, diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index 97b05016ec..e8ba39bbf0 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -5,7 +5,7 @@ import { Brackets } from 'typeorm'; import { Inject, Injectable } from '@nestjs/common'; -import type { MiNote, NotesRepository } from '@/models/_.js'; +import type { NotesRepository } from '@/models/_.js'; import { Endpoint } from '@/server/api/endpoint-base.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import ActiveUsersChart from '@/core/chart/charts/active-users.js'; @@ -13,7 +13,6 @@ import { DI } from '@/di-symbols.js'; import { RoleService } from '@/core/RoleService.js'; import { IdService } from '@/core/IdService.js'; import { CacheService } from '@/core/CacheService.js'; -import { isUserRelated } from '@/misc/is-user-related.js'; import { QueryService } from '@/core/QueryService.js'; import { MetaService } from '@/core/MetaService.js'; import { MiLocalUser } from '@/models/User.js'; @@ -39,6 +38,12 @@ export const meta = { code: 'LTL_DISABLED', id: '45a6eb02-7695-4393-b023-dd3be9aaaefd', }, + + bothWithRepliesAndWithFiles: { + message: 'Specifying both withReplies and withFiles is not supported', + code: 'BOTH_WITH_REPLIES_AND_WITH_FILES', + id: 'dd9c8400-1cb5-4eef-8a31-200c5f933793' + }, }, } as const; @@ -82,6 +87,8 @@ export default class extends Endpoint { // eslint- throw new ApiError(meta.errors.ltlDisabled); } + if (ps.withReplies && ps.withFiles) throw new ApiError(meta.errors.bothWithRepliesAndWithFiles); + const serverSettings = await this.metaService.fetch(); if (!serverSettings.enableFanoutTimeline) { @@ -102,16 +109,6 @@ export default class extends Endpoint { // eslint- return await this.noteEntityService.packMany(timeline, me); } - const [ - userIdsWhoMeMuting, - userIdsWhoMeMutingRenotes, - userIdsWhoBlockingMe, - ] = me ? await Promise.all([ - this.cacheService.userMutingsCache.fetch(me.id), - this.cacheService.renoteMutingsCache.fetch(me.id), - this.cacheService.userBlockedCache.fetch(me.id), - ]) : [new Set(), new Set(), new Set()]; - const timeline = await this.fanoutTimelineEndpointService.timeline({ untilId, sinceId, @@ -120,22 +117,9 @@ export default class extends Endpoint { // eslint- me, useDbFallback: serverSettings.enableFanoutTimelineDbFallback, redisTimelines: ps.withFiles ? ['localTimelineWithFiles'] : ['localTimeline', 'localTimelineWithReplies'], - noteFilter: note => { - if (me && (note.userId === me.id)) { - return true; - } - if (!ps.withReplies && note.replyId && note.replyUserId !== note.userId && (me == null || note.replyUserId !== me.id)) return false; - if (me && isUserRelated(note, userIdsWhoBlockingMe)) return false; - if (me && isUserRelated(note, userIdsWhoMeMuting)) return false; - if (note.renoteId) { - if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) { - if (me && isUserRelated(note, userIdsWhoMeMutingRenotes)) return false; - if (ps.withRenotes === false) return false; - } - } - - return true; - }, + alwaysIncludeMyNotes: true, + excludeReplies: !ps.withReplies, + excludePureRenotes: !ps.withRenotes, dbFallback: async (untilId, sinceId, limit) => await this.getFromDb({ untilId, sinceId, diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index 74d0a6e0c0..790bcbe151 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -13,7 +13,6 @@ import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { DI } from '@/di-symbols.js'; import { IdService } from '@/core/IdService.js'; import { CacheService } from '@/core/CacheService.js'; -import { isUserRelated } from '@/misc/is-user-related.js'; import { UserFollowingService } from '@/core/UserFollowingService.js'; import { MiLocalUser } from '@/models/User.js'; import { MetaService } from '@/core/MetaService.js'; @@ -98,14 +97,8 @@ export default class extends Endpoint { // eslint- const [ followings, - userIdsWhoMeMuting, - userIdsWhoMeMutingRenotes, - userIdsWhoBlockingMe, ] = await Promise.all([ this.cacheService.userFollowingsCache.fetch(me.id), - this.cacheService.userMutingsCache.fetch(me.id), - this.cacheService.renoteMutingsCache.fetch(me.id), - this.cacheService.userBlockedCache.fetch(me.id), ]); const timeline = this.fanoutTimelineEndpointService.timeline({ @@ -116,18 +109,9 @@ export default class extends Endpoint { // eslint- me, useDbFallback: serverSettings.enableFanoutTimelineDbFallback, redisTimelines: ps.withFiles ? [`homeTimelineWithFiles:${me.id}`] : [`homeTimeline:${me.id}`], + alwaysIncludeMyNotes: true, + excludePureRenotes: !ps.withRenotes, noteFilter: note => { - if (note.userId === me.id) { - return true; - } - if (isUserRelated(note, userIdsWhoBlockingMe)) return false; - if (isUserRelated(note, userIdsWhoMeMuting)) return false; - if (note.renoteId) { - if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) { - if (isUserRelated(note, userIdsWhoMeMutingRenotes)) return false; - if (ps.withRenotes === false) return false; - } - } if (note.reply && note.reply.visibility === 'followers') { if (!Object.hasOwn(followings, note.reply.userId)) return false; } diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index f8f64738fe..10d3a7a697 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -5,20 +5,17 @@ import { Inject, Injectable } from '@nestjs/common'; import { Brackets } from 'typeorm'; -import type { MiNote, MiUserList, NotesRepository, UserListMembershipsRepository, UserListsRepository } from '@/models/_.js'; +import type { MiUserList, NotesRepository, UserListMembershipsRepository, UserListsRepository } from '@/models/_.js'; import { Endpoint } from '@/server/api/endpoint-base.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import ActiveUsersChart from '@/core/chart/charts/active-users.js'; import { DI } from '@/di-symbols.js'; import { CacheService } from '@/core/CacheService.js'; import { IdService } from '@/core/IdService.js'; -import { isUserRelated } from '@/misc/is-user-related.js'; -import { FanoutTimelineService } from '@/core/FanoutTimelineService.js'; import { QueryService } from '@/core/QueryService.js'; import { MiLocalUser } from '@/models/User.js'; import { MetaService } from '@/core/MetaService.js'; import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; -import { isInstanceMuted } from '@/misc/is-instance-muted.js'; import { ApiError } from '../../error.js'; export const meta = { @@ -84,7 +81,6 @@ export default class extends Endpoint { // eslint- private activeUsersChart: ActiveUsersChart, private cacheService: CacheService, private idService: IdService, - private fanoutTimelineService: FanoutTimelineService, private fanoutTimelineEndpointService: FanoutTimelineEndpointService, private queryService: QueryService, private metaService: MetaService, @@ -121,18 +117,6 @@ export default class extends Endpoint { // eslint- await this.noteEntityService.packMany(timeline, me); } - const [ - userIdsWhoMeMuting, - userIdsWhoMeMutingRenotes, - userIdsWhoBlockingMe, - userMutedInstances, - ] = await Promise.all([ - this.cacheService.userMutingsCache.fetch(me.id), - this.cacheService.renoteMutingsCache.fetch(me.id), - this.cacheService.userBlockedCache.fetch(me.id), - this.cacheService.userProfileCache.fetch(me.id).then(p => new Set(p.mutedInstances)), - ]); - const timeline = await this.fanoutTimelineEndpointService.timeline({ untilId, sinceId, @@ -141,22 +125,8 @@ export default class extends Endpoint { // eslint- me, useDbFallback: serverSettings.enableFanoutTimelineDbFallback, redisTimelines: ps.withFiles ? [`userListTimelineWithFiles:${list.id}`] : [`userListTimeline:${list.id}`], - noteFilter: note => { - if (note.userId === me.id) { - return true; - } - if (isUserRelated(note, userIdsWhoBlockingMe)) return false; - if (isUserRelated(note, userIdsWhoMeMuting)) return false; - if (note.renoteId) { - if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) { - if (isUserRelated(note, userIdsWhoMeMutingRenotes)) return false; - if (ps.withRenotes === false) return false; - } - } - if (isInstanceMuted(note, userMutedInstances)) return false; - - return true; - }, + alwaysIncludeMyNotes: true, + excludePureRenotes: !ps.withRenotes, dbFallback: async (untilId, sinceId, limit) => await this.getFromDb(list, { untilId, sinceId, diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index 4a358b39cb..b32128a8aa 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -11,11 +11,12 @@ import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { DI } from '@/di-symbols.js'; import { CacheService } from '@/core/CacheService.js'; import { IdService } from '@/core/IdService.js'; -import { isUserRelated } from '@/misc/is-user-related.js'; import { QueryService } from '@/core/QueryService.js'; import { MetaService } from '@/core/MetaService.js'; import { MiLocalUser } from '@/models/User.js'; import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointService.js'; +import { FanoutTimelineName } from '@/core/FanoutTimelineService.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['users', 'notes'], @@ -36,6 +37,12 @@ export const meta = { code: 'NO_SUCH_USER', id: '27e494ba-2ac2-48e8-893b-10d4d8c2387b', }, + + bothWithRepliesAndWithFiles: { + message: 'Specifying both withReplies and withFiles is not supported', + code: 'BOTH_WITH_REPLIES_AND_WITH_FILES', + id: '91c8cb9f-36ed-46e7-9ca2-7df96ed6e222', + }, }, } as const; @@ -77,6 +84,8 @@ export default class extends Endpoint { // eslint- const serverSettings = await this.metaService.fetch(); + if (ps.withReplies && ps.withFiles) throw new ApiError(meta.errors.bothWithRepliesAndWithFiles); + if (!serverSettings.enableFanoutTimeline) { const timeline = await this.getFromDb({ untilId, @@ -91,13 +100,7 @@ export default class extends Endpoint { // eslint- return await this.noteEntityService.packMany(timeline, me); } - const [ - userIdsWhoMeMuting, - ] = me ? await Promise.all([ - this.cacheService.userMutingsCache.fetch(me.id), - ]) : [new Set()]; - - const redisTimelines = [ps.withFiles ? `userTimelineWithFiles:${ps.userId}` : `userTimeline:${ps.userId}`]; + const redisTimelines: FanoutTimelineName[] = [ps.withFiles ? `userTimelineWithFiles:${ps.userId}` : `userTimeline:${ps.userId}`]; if (ps.withReplies) redisTimelines.push(`userTimelineWithReplies:${ps.userId}`); if (ps.withChannelNotes) redisTimelines.push(`userTimelineWithChannel:${ps.userId}`); @@ -112,18 +115,11 @@ export default class extends Endpoint { // eslint- me, redisTimelines, useDbFallback: true, + ignoreAuthorFromMute: true, + excludeReplies: ps.withChannelNotes && !ps.withReplies, // userTimelineWithChannel may include replies + excludeNoFiles: ps.withChannelNotes && ps.withFiles, // userTimelineWithChannel may include notes without files + excludePureRenotes: !ps.withRenotes, noteFilter: note => { - if (ps.withFiles && note.fileIds.length === 0) { - return false; - } - if (me && isUserRelated(note, userIdsWhoMeMuting, true)) return false; - - if (note.renoteId) { - if (note.text == null && note.fileIds.length === 0 && !note.hasPoll) { - if (ps.withRenotes === false) return false; - } - } - if (note.channel?.isSensitive && !isSelf) return false; if (note.visibility === 'specified' && (!me || (me.id !== note.userId && !note.visibleUserIds.some(v => v === me.id)))) return false; if (note.visibility === 'followers' && !isFollowing && !isSelf) return false; diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue index 9457bf385f..4fafd35f72 100644 --- a/packages/frontend/src/components/MkMenu.vue +++ b/packages/frontend/src/components/MkMenu.vue @@ -202,7 +202,7 @@ function focusDown() { } function switchItem(item: MenuSwitch & { ref: any }) { - if (item.disabled) return; + if (typeof item.disabled === 'boolean' ? item.disabled : item.disabled.value) return; item.ref = !item.ref; } diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index cfe270aefb..b390d1931d 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -157,17 +157,17 @@ const headerActions = $computed(() => { os.popupMenu([{ type: 'switch', text: i18n.ts.showRenotes, - icon: 'ti ti-repeat', ref: $$(withRenotes), }, src === 'local' || src === 'social' ? { type: 'switch', text: i18n.ts.showRepliesToOthersInTimeline, ref: $$(withReplies), + disabled: $$(onlyFiles), } : undefined, { type: 'switch', text: i18n.ts.fileAttachedOnly, - icon: 'ti ti-photo', ref: $$(onlyFiles), + disabled: src === 'local' || src === 'social' ? $$(withReplies) : false, }], ev.currentTarget ?? ev.target); }, }, diff --git a/packages/frontend/src/types/menu.ts b/packages/frontend/src/types/menu.ts index 66061fcd70..fbe627176b 100644 --- a/packages/frontend/src/types/menu.ts +++ b/packages/frontend/src/types/menu.ts @@ -14,7 +14,7 @@ export type MenuLabel = { type: 'label', text: string }; export type MenuLink = { type: 'link', to: string, text: string, icon?: string, indicate?: boolean, avatar?: Misskey.entities.User }; export type MenuA = { type: 'a', href: string, target?: string, download?: string, text: string, icon?: string, indicate?: boolean }; export type MenuUser = { type: 'user', user: Misskey.entities.User, active?: boolean, indicate?: boolean, action: MenuAction }; -export type MenuSwitch = { type: 'switch', ref: Ref, text: string, disabled?: boolean }; +export type MenuSwitch = { type: 'switch', ref: Ref, text: string, disabled?: boolean | Ref }; export type MenuButton = { type?: 'button', text: string, icon?: string, indicate?: boolean, danger?: boolean, active?: boolean, avatar?: Misskey.entities.User; action: MenuAction }; export type MenuParent = { type: 'parent', text: string, icon?: string, children: MenuItem[] | (() => Promise | MenuItem[]) }; diff --git a/packages/frontend/src/ui/deck/tl-column.vue b/packages/frontend/src/ui/deck/tl-column.vue index 9f24ea31ed..41582bbfe3 100644 --- a/packages/frontend/src/ui/deck/tl-column.vue +++ b/packages/frontend/src/ui/deck/tl-column.vue @@ -120,10 +120,12 @@ const menu = [{ type: 'switch', text: i18n.ts.showRepliesToOthersInTimeline, ref: $$(withReplies), + disabled: $$(onlyFiles), } : undefined, { type: 'switch', text: i18n.ts.fileAttachedOnly, ref: $$(onlyFiles), + disabled: props.column.tl === 'local' || props.column.tl === 'social' ? $$(withReplies) : false, }]; -- cgit v1.2.3-freya From 33034b0e02860513d277e8f8a08f96a84592b3e3 Mon Sep 17 00:00:00 2001 From: yupix Date: Mon, 4 Dec 2023 16:53:31 +0900 Subject: feat: ユーザースキーマの改善 (#12568) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: notifyにenumを設定 * feat: securityKeysListの型を明確に * feat: notificationRecieveConfigにpropertiesを定義 * chore: misskey.jsのmodelを更新 * fix: as constをつけ忘れている --- packages/backend/src/models/json-schema/user.ts | 43 +++++++++++++++++ packages/misskey-js/src/autogen/endpoint.ts | 2 +- packages/misskey-js/src/autogen/entities.ts | 2 +- packages/misskey-js/src/autogen/models.ts | 2 +- packages/misskey-js/src/autogen/types.ts | 63 +++++++++++++++++++++++-- 5 files changed, 105 insertions(+), 7 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index a2ec203e96..2621e7e6c0 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -3,6 +3,18 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +const notificationRecieveConfig = { + type: 'object', + nullable: false, optional: true, + properties: { + type: { + type: 'string', + nullable: false, optional: false, + enum: ['all', 'following', 'follower', 'mutualFollow', 'list', 'never'], + }, + }, +} as const; + export const packedUserLiteSchema = { type: 'object', properties: { @@ -398,6 +410,7 @@ export const packedUserDetailedNotMeOnlySchema = { notify: { type: 'string', nullable: false, optional: true, + enum: ['normal', 'none'], }, withReplies: { type: 'boolean', @@ -553,6 +566,19 @@ export const packedMeDetailedOnlySchema = { notificationRecieveConfig: { type: 'object', nullable: false, optional: false, + properties: { + app: notificationRecieveConfig, + quote: notificationRecieveConfig, + reply: notificationRecieveConfig, + follow: notificationRecieveConfig, + renote: notificationRecieveConfig, + mention: notificationRecieveConfig, + reaction: notificationRecieveConfig, + pollEnded: notificationRecieveConfig, + achievementEarned: notificationRecieveConfig, + receiveFollowRequest: notificationRecieveConfig, + followRequestAccepted: notificationRecieveConfig, + }, }, emailNotificationTypes: { type: 'array', @@ -697,6 +723,23 @@ export const packedMeDetailedOnlySchema = { items: { type: 'object', nullable: false, optional: false, + properties: { + id: { + type: 'string', + nullable: false, optional: false, + format: 'id', + example: 'xxxxxxxxxx', + }, + name: { + type: 'string', + nullable: false, optional: false, + }, + lastUsed: { + type: 'string', + nullable: false, optional: false, + format: 'date-time', + }, + }, }, }, //#endregion diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index b46e69f691..cf571fc689 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-03T02:04:45.058Z + * generatedAt: 2023-12-04T07:13:58.541Z */ import type { diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index a51ee037d0..bbfa14913f 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-03T02:04:45.053Z + * generatedAt: 2023-12-04T07:13:58.538Z */ import { operations } from './types.js'; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index c2b27b2c58..566b6dfb97 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-03T02:04:45.051Z + * generatedAt: 2023-12-04T07:13:58.535Z */ import { components } from './types.js'; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 44ed4dbaa8..b734b36e49 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -3,7 +3,7 @@ /* * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-03T02:04:44.864Z + * generatedAt: 2023-12-04T07:13:58.362Z */ /** @@ -3218,7 +3218,8 @@ export type components = { isBlocked?: boolean; isMuted?: boolean; isRenoteMuted?: boolean; - notify?: string; + /** @enum {string} */ + notify?: 'normal' | 'none'; withReplies?: boolean; }; MeDetailedOnly: { @@ -3253,7 +3254,52 @@ export type components = { mutedWords: string[][]; hardMutedWords: string[][]; mutedInstances: string[] | null; - notificationRecieveConfig: Record; + notificationRecieveConfig: { + app?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + quote?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + reply?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + follow?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + renote?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + mention?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + reaction?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + pollEnded?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + achievementEarned?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + receiveFollowRequest?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + followRequestAccepted?: { + /** @enum {string} */ + type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'list' | 'never'; + }; + }; emailNotificationTypes: string[]; achievements: { name: string; @@ -3287,7 +3333,16 @@ export type components = { }; email?: string | null; emailVerified?: boolean | null; - securityKeysList?: Record[]; + securityKeysList?: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + name: string; + /** Format: date-time */ + lastUsed: string; + }[]; }; UserDetailedNotMe: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly']; MeDetailed: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly'] & components['schemas']['MeDetailedOnly']; -- cgit v1.2.3-freya From bb38e62ae696873990d0252c66200c361878e9f8 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Mon, 4 Dec 2023 17:56:48 +0900 Subject: chore: 自分へのリプライのみ走査するように (#12570) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/FanoutTimelineService.ts | 1 + packages/backend/src/core/NoteCreateService.ts | 3 +++ .../backend/src/server/api/endpoints/notes/local-timeline.ts | 9 ++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/core/FanoutTimelineService.ts b/packages/backend/src/core/FanoutTimelineService.ts index 654a035a5f..9b2678fbcd 100644 --- a/packages/backend/src/core/FanoutTimelineService.ts +++ b/packages/backend/src/core/FanoutTimelineService.ts @@ -17,6 +17,7 @@ export type FanoutTimelineName = | `localTimeline` // replies are not included | `localTimelineWithFiles` // only non-reply notes with files are included | `localTimelineWithReplies` // only replies are included + | `localTimelineWithReplyTo:${string}` // Only replies to specific local user are included. Parameter is reply user id. // antenna | `antennaTimeline:${string}` diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 0110ebaf5e..45dfbb87aa 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -933,6 +933,9 @@ export class NoteCreateService implements OnApplicationShutdown { if (note.visibility === 'public' && note.userHost == null) { this.fanoutTimelineService.push('localTimelineWithReplies', note.id, 300, r); + if (note.replyUserHost == null) { + this.fanoutTimelineService.push(`localTimelineWithReplyTo:${note.replyUserId}`, note.id, 300 / 10, r); + } } } else { this.fanoutTimelineService.push(`userTimeline:${user.id}`, note.id, note.userHost == null ? meta.perLocalUserUserTimelineCacheMax : meta.perRemoteUserUserTimelineCacheMax, r); diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index e8ba39bbf0..3fd4dc83fb 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -42,7 +42,7 @@ export const meta = { bothWithRepliesAndWithFiles: { message: 'Specifying both withReplies and withFiles is not supported', code: 'BOTH_WITH_REPLIES_AND_WITH_FILES', - id: 'dd9c8400-1cb5-4eef-8a31-200c5f933793' + id: 'dd9c8400-1cb5-4eef-8a31-200c5f933793', }, }, } as const; @@ -116,9 +116,12 @@ export default class extends Endpoint { // eslint- allowPartial: ps.allowPartial, me, useDbFallback: serverSettings.enableFanoutTimelineDbFallback, - redisTimelines: ps.withFiles ? ['localTimelineWithFiles'] : ['localTimeline', 'localTimelineWithReplies'], + redisTimelines: + ps.withFiles ? ['localTimelineWithFiles'] + : ps.withReplies ? ['localTimeline', 'localTimelineWithReplies'] + : me ? ['localTimeline', `localTimelineWithReplyTo:${me.id}`] + : ['localTimeline'], alwaysIncludeMyNotes: true, - excludeReplies: !ps.withReplies, excludePureRenotes: !ps.withRenotes, dbFallback: async (untilId, sinceId, limit) => await this.getFromDb({ untilId, -- cgit v1.2.3-freya From 8866c530c41fe4144a72b0c4190362b6249b2629 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Mon, 4 Dec 2023 20:33:11 +0900 Subject: fix(backend): エポックを固定することで年越し時にトレンドが壊れる問題を修正 (#12567) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + packages/backend/src/core/FeaturedService.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index 51eb5400ba..d025e5e1c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ - Fix: Social/Local/Home Timelineにてインスタンスミュートが効かない問題 - Fix: ユーザのノート一覧にてインスタンスミュートが効かない問題 - Fix: チャンネルのノート一覧にてインスタンスミュートが効かない問題 +- Fix: 「みつける」が年越し時に壊れる問題を修正 ## 2023.11.1 diff --git a/packages/backend/src/core/FeaturedService.ts b/packages/backend/src/core/FeaturedService.ts index 507fc464ff..d970ffa43b 100644 --- a/packages/backend/src/core/FeaturedService.ts +++ b/packages/backend/src/core/FeaturedService.ts @@ -14,6 +14,8 @@ export const GALLERY_POSTS_RANKING_WINDOW = 1000 * 60 * 60 * 24 * 3; // 3日ご const PER_USER_NOTES_RANKING_WINDOW = 1000 * 60 * 60 * 24 * 7; // 1週間ごと const HASHTAG_RANKING_WINDOW = 1000 * 60 * 60; // 1時間ごと +const featuredEpoc = new Date('2023-01-01T00:00:00Z').getTime(); + @Injectable() export class FeaturedService { constructor( @@ -24,7 +26,7 @@ export class FeaturedService { @bindThis private getCurrentWindow(windowRange: number): number { - const passed = new Date().getTime() - new Date(new Date().getFullYear(), 0, 1).getTime(); + const passed = new Date().getTime() - featuredEpoc; return Math.floor(passed / windowRange); } -- cgit v1.2.3-freya From e42c91dee77bbbe7bff848aac51ab7ec0cd3fe6e Mon Sep 17 00:00:00 2001 From: yupix Date: Wed, 6 Dec 2023 15:47:57 +0900 Subject: feat: Roleに関するSchemaを追加 (#12572) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Roleに関連するschemaを追加 * feat: 新しいRoleSchemaを使うように * chore: misskey.jsのデータを更新 * chore: misskey-js.api.mdを更新 --- packages/backend/src/misc/json-schema.ts | 3 + packages/backend/src/models/json-schema/role.ts | 157 ++++++++++++++++ packages/backend/src/models/json-schema/user.ts | 36 +--- .../src/server/api/endpoints/admin/roles/create.ts | 6 + .../src/server/api/endpoints/admin/roles/list.ts | 10 + .../src/server/api/endpoints/admin/roles/show.ts | 6 + .../backend/src/server/api/endpoints/roles/list.ts | 10 + .../backend/src/server/api/endpoints/roles/show.ts | 6 + packages/misskey-js/etc/misskey-js.api.md | 30 ++- packages/misskey-js/src/autogen/endpoint.ts | 17 +- packages/misskey-js/src/autogen/entities.ts | 7 +- packages/misskey-js/src/autogen/models.ts | 4 +- packages/misskey-js/src/autogen/types.ts | 208 ++++++++++++++++++--- 13 files changed, 429 insertions(+), 71 deletions(-) create mode 100644 packages/backend/src/models/json-schema/role.ts (limited to 'packages/backend/src') diff --git a/packages/backend/src/misc/json-schema.ts b/packages/backend/src/misc/json-schema.ts index 7e7fc447c3..49f35b9b74 100644 --- a/packages/backend/src/misc/json-schema.ts +++ b/packages/backend/src/misc/json-schema.ts @@ -37,6 +37,7 @@ import { packedEmojiDetailedSchema, packedEmojiSimpleSchema } from '@/models/jso import { packedFlashSchema } from '@/models/json-schema/flash.js'; import { packedAnnouncementSchema } from '@/models/json-schema/announcement.js'; import { packedSigninSchema } from '@/models/json-schema/signin.js'; +import { packedRoleLiteSchema, packedRoleSchema } from '@/models/json-schema/role.js'; export const refs = { UserLite: packedUserLiteSchema, @@ -73,6 +74,8 @@ export const refs = { EmojiDetailed: packedEmojiDetailedSchema, Flash: packedFlashSchema, Signin: packedSigninSchema, + RoleLite: packedRoleLiteSchema, + Role: packedRoleSchema, }; export type Packed = SchemaType; diff --git a/packages/backend/src/models/json-schema/role.ts b/packages/backend/src/models/json-schema/role.ts new file mode 100644 index 0000000000..dd2f32b14d --- /dev/null +++ b/packages/backend/src/models/json-schema/role.ts @@ -0,0 +1,157 @@ +const rolePolicyValue = { + type: 'object', + properties: { + value: { + oneOf: [ + { + type: 'integer', + optional: false, nullable: false, + }, + { + type: 'boolean', + optional: false, nullable: false, + }, + ], + }, + priority: { + type: 'integer', + optional: false, nullable: false, + }, + useDefault: { + type: 'boolean', + optional: false, nullable: false, + }, + }, +} as const; + +export const packedRoleLiteSchema = { + type: 'object', + properties: { + id: { + type: 'string', + optional: false, nullable: false, + format: 'id', + example: 'xxxxxxxxxx', + }, + name: { + type: 'string', + optional: false, nullable: false, + example: 'New Role', + }, + color: { + type: 'string', + optional: false, nullable: true, + example: '#000000', + }, + iconUrl: { + type: 'string', + optional: false, nullable: true, + }, + description: { + type: 'string', + optional: false, nullable: false, + }, + isModerator: { + type: 'boolean', + optional: false, nullable: false, + example: false, + }, + isAdministrator: { + type: 'boolean', + optional: false, nullable: false, + example: false, + }, + displayOrder: { + type: 'integer', + optional: false, nullable: false, + example: 0, + }, + }, +} as const; + +export const packedRoleSchema = { + type: 'object', + allOf: [ + { + type: 'object', + ref: 'RoleLite', + }, + { + type: 'object', + properties: { + createdAt: { + type: 'string', + optional: false, nullable: false, + format: 'date-time', + }, + updatedAt: { + type: 'string', + optional: false, nullable: false, + format: 'date-time', + }, + target: { + type: 'string', + optional: false, nullable: false, + enum: ['manual', 'conditional'], + }, + condFormula: { + type: 'object', + optional: false, nullable: false, + }, + isPublic: { + type: 'boolean', + optional: false, nullable: false, + example: false, + }, + isExplorable: { + type: 'boolean', + optional: false, nullable: false, + example: false, + }, + asBadge: { + type: 'boolean', + optional: false, nullable: false, + example: false, + }, + canEditMembersByModerator: { + type: 'boolean', + optional: false, nullable: false, + example: false, + }, + policies: { + type: 'object', + optional: false, nullable: false, + properties: { + pinLimit: rolePolicyValue, + canInvite: rolePolicyValue, + clipLimit: rolePolicyValue, + canHideAds: rolePolicyValue, + inviteLimit: rolePolicyValue, + antennaLimit: rolePolicyValue, + gtlAvailable: rolePolicyValue, + ltlAvailable: rolePolicyValue, + webhookLimit: rolePolicyValue, + canPublicNote: rolePolicyValue, + userListLimit: rolePolicyValue, + wordMuteLimit: rolePolicyValue, + alwaysMarkNsfw: rolePolicyValue, + canSearchNotes: rolePolicyValue, + driveCapacityMb: rolePolicyValue, + rateLimitFactor: rolePolicyValue, + inviteLimitCycle: rolePolicyValue, + noteEachClipsLimit: rolePolicyValue, + inviteExpirationTime: rolePolicyValue, + canManageCustomEmojis: rolePolicyValue, + userEachUserListsLimit: rolePolicyValue, + canManageAvatarDecorations: rolePolicyValue, + canUseTranslator: rolePolicyValue, + }, + }, + usersCount: { + type: 'integer', + optional: false, nullable: false, + }, + }, + }, + ], +} as const; diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index 2621e7e6c0..c6b2707b80 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -329,41 +329,7 @@ export const packedUserDetailedNotMeOnlySchema = { items: { type: 'object', nullable: false, optional: false, - properties: { - id: { - type: 'string', - nullable: false, optional: false, - format: 'id', - }, - name: { - type: 'string', - nullable: false, optional: false, - }, - color: { - type: 'string', - nullable: true, optional: false, - }, - iconUrl: { - type: 'string', - nullable: true, optional: false, - }, - description: { - type: 'string', - nullable: false, optional: false, - }, - isModerator: { - type: 'boolean', - nullable: false, optional: false, - }, - isAdministrator: { - type: 'boolean', - nullable: false, optional: false, - }, - displayOrder: { - type: 'number', - nullable: false, optional: false, - }, - }, + ref: 'RoleLite', }, }, memo: { diff --git a/packages/backend/src/server/api/endpoints/admin/roles/create.ts b/packages/backend/src/server/api/endpoints/admin/roles/create.ts index 8451b1955f..fb53815333 100644 --- a/packages/backend/src/server/api/endpoints/admin/roles/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/roles/create.ts @@ -13,6 +13,12 @@ export const meta = { requireCredential: true, requireAdmin: true, + + res: { + type: 'object', + optional: false, nullable: false, + ref: 'Role', + }, } as const; export const paramDef = { diff --git a/packages/backend/src/server/api/endpoints/admin/roles/list.ts b/packages/backend/src/server/api/endpoints/admin/roles/list.ts index 3ed4b324dc..71b8e44e77 100644 --- a/packages/backend/src/server/api/endpoints/admin/roles/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/roles/list.ts @@ -14,6 +14,16 @@ export const meta = { requireCredential: true, requireModerator: true, + + res: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + optional: false, nullable: false, + ref: 'Role', + }, + }, } as const; export const paramDef = { diff --git a/packages/backend/src/server/api/endpoints/admin/roles/show.ts b/packages/backend/src/server/api/endpoints/admin/roles/show.ts index 5f0accab6f..1ca952a3f8 100644 --- a/packages/backend/src/server/api/endpoints/admin/roles/show.ts +++ b/packages/backend/src/server/api/endpoints/admin/roles/show.ts @@ -23,6 +23,12 @@ export const meta = { id: '07dc7d34-c0d8-49b7-96c6-db3ce64ee0b3', }, }, + + res: { + type: 'object', + optional: false, nullable: false, + ref: 'Role', + }, } as const; export const paramDef = { diff --git a/packages/backend/src/server/api/endpoints/roles/list.ts b/packages/backend/src/server/api/endpoints/roles/list.ts index d1de73ad32..dc2be8e11d 100644 --- a/packages/backend/src/server/api/endpoints/roles/list.ts +++ b/packages/backend/src/server/api/endpoints/roles/list.ts @@ -13,6 +13,16 @@ export const meta = { tags: ['role'], requireCredential: true, + + res: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + optional: false, nullable: false, + ref: 'Role', + }, + }, } as const; export const paramDef = { diff --git a/packages/backend/src/server/api/endpoints/roles/show.ts b/packages/backend/src/server/api/endpoints/roles/show.ts index 2afa0e7b7f..6bfe52bb1a 100644 --- a/packages/backend/src/server/api/endpoints/roles/show.ts +++ b/packages/backend/src/server/api/endpoints/roles/show.ts @@ -22,6 +22,12 @@ export const meta = { id: 'de5502bf-009a-4639-86c1-fec349e46dcb', }, }, + + res: { + type: 'object', + optional: false, nullable: false, + ref: 'Role', + }, } as const; export const paramDef = { diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index e2e3349c08..6225f9e236 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -227,12 +227,21 @@ type AdminRolesAssignRequest = operations['admin/roles/assign']['requestBody'][' // @public (undocumented) type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json']; +// @public (undocumented) +type AdminRolesCreateResponse = operations['admin/roles/create']['responses']['200']['content']['application/json']; + // @public (undocumented) type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json']; +// @public (undocumented) +type AdminRolesListResponse = operations['admin/roles/list']['responses']['200']['content']['application/json']; + // @public (undocumented) type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json']; +// @public (undocumented) +type AdminRolesShowResponse = operations['admin/roles/show']['responses']['200']['content']['application/json']; + // @public (undocumented) type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json']; @@ -1099,8 +1108,11 @@ declare namespace entities { AdminDeleteAccountResponse, AdminUpdateUserNoteRequest, AdminRolesCreateRequest, + AdminRolesCreateResponse, AdminRolesDeleteRequest, + AdminRolesListResponse, AdminRolesShowRequest, + AdminRolesShowResponse, AdminRolesUpdateRequest, AdminRolesAssignRequest, AdminRolesUnassignRequest, @@ -1414,7 +1426,9 @@ declare namespace entities { PingResponse, PinnedUsersResponse, PromoReadRequest, + RolesListResponse, RolesShowRequest, + RolesShowResponse, RolesUsersRequest, RolesNotesRequest, RolesNotesResponse, @@ -1519,7 +1533,9 @@ declare namespace entities { EmojiSimple, EmojiDetailed, Flash, - Signin + Signin, + RoleLite, + Role } } export { entities } @@ -2312,6 +2328,15 @@ type ResetPasswordRequest = operations['reset-password']['requestBody']['content // @public (undocumented) type RetentionResponse = operations['retention']['responses']['200']['content']['application/json']; +// @public (undocumented) +type Role = components['schemas']['Role']; + +// @public (undocumented) +type RoleLite = components['schemas']['RoleLite']; + +// @public (undocumented) +type RolesListResponse = operations['roles/list']['responses']['200']['content']['application/json']; + // @public (undocumented) type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json']; @@ -2321,6 +2346,9 @@ type RolesNotesResponse = operations['roles/notes']['responses']['200']['content // @public (undocumented) type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json']; +// @public (undocumented) +type RolesShowResponse = operations['roles/show']['responses']['200']['content']['application/json']; + // @public (undocumented) type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json']; diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index cf571fc689..89faea6b40 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-04T07:13:58.541Z + * generatedAt: 2023-12-04T11:17:52.156Z */ import type { @@ -87,8 +87,11 @@ import type { AdminDeleteAccountResponse, AdminUpdateUserNoteRequest, AdminRolesCreateRequest, + AdminRolesCreateResponse, AdminRolesDeleteRequest, + AdminRolesListResponse, AdminRolesShowRequest, + AdminRolesShowResponse, AdminRolesUpdateRequest, AdminRolesAssignRequest, AdminRolesUnassignRequest, @@ -402,7 +405,9 @@ import type { PingResponse, PinnedUsersResponse, PromoReadRequest, + RolesListResponse, RolesShowRequest, + RolesShowResponse, RolesUsersRequest, RolesNotesRequest, RolesNotesResponse, @@ -543,10 +548,10 @@ export type Endpoints = { 'admin/update-meta': { req: AdminUpdateMetaRequest; res: EmptyResponse }; 'admin/delete-account': { req: AdminDeleteAccountRequest; res: AdminDeleteAccountResponse }; 'admin/update-user-note': { req: AdminUpdateUserNoteRequest; res: EmptyResponse }; - 'admin/roles/create': { req: AdminRolesCreateRequest; res: EmptyResponse }; + 'admin/roles/create': { req: AdminRolesCreateRequest; res: AdminRolesCreateResponse }; 'admin/roles/delete': { req: AdminRolesDeleteRequest; res: EmptyResponse }; - 'admin/roles/list': { req: EmptyRequest; res: EmptyResponse }; - 'admin/roles/show': { req: AdminRolesShowRequest; res: EmptyResponse }; + 'admin/roles/list': { req: EmptyRequest; res: AdminRolesListResponse }; + 'admin/roles/show': { req: AdminRolesShowRequest; res: AdminRolesShowResponse }; 'admin/roles/update': { req: AdminRolesUpdateRequest; res: EmptyResponse }; 'admin/roles/assign': { req: AdminRolesAssignRequest; res: EmptyResponse }; 'admin/roles/unassign': { req: AdminRolesUnassignRequest; res: EmptyResponse }; @@ -750,8 +755,8 @@ export type Endpoints = { 'ping': { req: EmptyRequest; res: PingResponse }; 'pinned-users': { req: EmptyRequest; res: PinnedUsersResponse }; 'promo/read': { req: PromoReadRequest; res: EmptyResponse }; - 'roles/list': { req: EmptyRequest; res: EmptyResponse }; - 'roles/show': { req: RolesShowRequest; res: EmptyResponse }; + 'roles/list': { req: EmptyRequest; res: RolesListResponse }; + 'roles/show': { req: RolesShowRequest; res: RolesShowResponse }; 'roles/users': { req: RolesUsersRequest; res: EmptyResponse }; 'roles/notes': { req: RolesNotesRequest; res: RolesNotesResponse }; 'request-reset-password': { req: RequestResetPasswordRequest; res: EmptyResponse }; diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index bbfa14913f..611f1b9504 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-04T07:13:58.538Z + * generatedAt: 2023-12-04T11:17:52.154Z */ import { operations } from './types.js'; @@ -89,8 +89,11 @@ export type AdminDeleteAccountRequest = operations['admin/delete-account']['requ export type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json']; export type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json']; export type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json']; +export type AdminRolesCreateResponse = operations['admin/roles/create']['responses']['200']['content']['application/json']; export type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json']; +export type AdminRolesListResponse = operations['admin/roles/list']['responses']['200']['content']['application/json']; export type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json']; +export type AdminRolesShowResponse = operations['admin/roles/show']['responses']['200']['content']['application/json']; export type AdminRolesUpdateRequest = operations['admin/roles/update']['requestBody']['content']['application/json']; export type AdminRolesAssignRequest = operations['admin/roles/assign']['requestBody']['content']['application/json']; export type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json']; @@ -404,7 +407,9 @@ export type FlashMyLikesResponse = operations['flash/my-likes']['responses']['20 export type PingResponse = operations['ping']['responses']['200']['content']['application/json']; export type PinnedUsersResponse = operations['pinned-users']['responses']['200']['content']['application/json']; export type PromoReadRequest = operations['promo/read']['requestBody']['content']['application/json']; +export type RolesListResponse = operations['roles/list']['responses']['200']['content']['application/json']; export type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json']; +export type RolesShowResponse = operations['roles/show']['responses']['200']['content']['application/json']; export type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json']; export type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json']; export type RolesNotesResponse = operations['roles/notes']['responses']['200']['content']['application/json']; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index 566b6dfb97..0607cd1370 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-04T07:13:58.535Z + * generatedAt: 2023-12-04T11:17:52.151Z */ import { components } from './types.js'; @@ -38,3 +38,5 @@ export type EmojiSimple = components['schemas']['EmojiSimple']; export type EmojiDetailed = components['schemas']['EmojiDetailed']; export type Flash = components['schemas']['Flash']; export type Signin = components['schemas']['Signin']; +export type RoleLite = components['schemas']['RoleLite']; +export type Role = components['schemas']['Role']; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index b734b36e49..e09f24d46f 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -3,7 +3,7 @@ /* * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-04T07:13:58.362Z + * generatedAt: 2023-12-04T11:17:51.997Z */ /** @@ -3197,17 +3197,7 @@ export type components = { usePasswordLessLogin: boolean; /** @default false */ securityKeys: boolean; - roles: ({ - /** Format: id */ - id: string; - name: string; - color: string | null; - iconUrl: string | null; - description: string; - isModerator: boolean; - isAdministrator: boolean; - displayOrder: number; - })[]; + roles: components['schemas']['RoleLite'][]; memo: string | null; moderationNote?: string; isFollowing?: boolean; @@ -3850,6 +3840,160 @@ export type components = { headers: Record; success: boolean; }; + RoleLite: { + /** + * Format: id + * @example xxxxxxxxxx + */ + id: string; + /** @example New Role */ + name: string; + /** @example #000000 */ + color: string | null; + iconUrl: string | null; + description: string; + /** @example false */ + isModerator: boolean; + /** @example false */ + isAdministrator: boolean; + /** @example 0 */ + displayOrder: number; + }; + Role: components['schemas']['RoleLite'] & ({ + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + /** @enum {string} */ + target: 'manual' | 'conditional'; + condFormula: Record; + /** @example false */ + isPublic: boolean; + /** @example false */ + isExplorable: boolean; + /** @example false */ + asBadge: boolean; + /** @example false */ + canEditMembersByModerator: boolean; + policies: { + pinLimit: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + canInvite: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + clipLimit: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + canHideAds: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + inviteLimit: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + antennaLimit: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + gtlAvailable: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + ltlAvailable: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + webhookLimit: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + canPublicNote: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + userListLimit: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + wordMuteLimit: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + alwaysMarkNsfw: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + canSearchNotes: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + driveCapacityMb: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + rateLimitFactor: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + inviteLimitCycle: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + noteEachClipsLimit: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + inviteExpirationTime: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + canManageCustomEmojis: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + userEachUserListsLimit: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + canManageAvatarDecorations: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + canUseTranslator: { + value: number | boolean; + priority: number; + useDefault: boolean; + }; + }; + usersCount: number; + }); }; responses: never; parameters: never; @@ -7847,9 +7991,11 @@ export type operations = { }; }; responses: { - /** @description OK (without any results) */ - 204: { - content: never; + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Role']; + }; }; /** @description Client error */ 400: { @@ -7943,9 +8089,11 @@ export type operations = { */ 'admin/roles/list': { responses: { - /** @description OK (without any results) */ - 204: { - content: never; + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Role'][]; + }; }; /** @description Client error */ 400: { @@ -7995,9 +8143,11 @@ export type operations = { }; }; responses: { - /** @description OK (without any results) */ - 204: { - content: never; + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Role']; + }; }; /** @description Client error */ 400: { @@ -19841,9 +19991,11 @@ export type operations = { */ 'roles/list': { responses: { - /** @description OK (without any results) */ - 204: { - content: never; + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Role'][]; + }; }; /** @description Client error */ 400: { @@ -19893,9 +20045,11 @@ export type operations = { }; }; responses: { - /** @description OK (without any results) */ - 204: { - content: never; + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Role']; + }; }; /** @description Client error */ 400: { -- cgit v1.2.3-freya From 1d3ef7b42fca601abcdf78f6325ed896f1ebd378 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Thu, 7 Dec 2023 17:07:06 +0900 Subject: fix(backend): pagination with sinceId broken (#12586) * fix(backend): pagination with sinceId broken * fix(backend): pagination with sinceId broken for dbFallback --- .../src/core/FanoutTimelineEndpointService.ts | 33 ++++++++++++++++------ 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'packages/backend/src') diff --git a/packages/backend/src/core/FanoutTimelineEndpointService.ts b/packages/backend/src/core/FanoutTimelineEndpointService.ts index 6775f0051a..a5bf297275 100644 --- a/packages/backend/src/core/FanoutTimelineEndpointService.ts +++ b/packages/backend/src/core/FanoutTimelineEndpointService.ts @@ -60,11 +60,15 @@ export class FanoutTimelineEndpointService { // 呼び出し元と以下の処理をシンプルにするためにdbFallbackを置き換える if (!ps.useDbFallback) ps.dbFallback = () => Promise.resolve([]); + const shouldPrepend = ps.sinceId && !ps.untilId; + const idCompare: (a: string, b: string) => number = shouldPrepend ? (a, b) => a < b ? -1 : 1 : (a, b) => a > b ? -1 : 1; + const redisResult = await this.fanoutTimelineService.getMulti(ps.redisTimelines, ps.untilId, ps.sinceId); + // TODO: いい感じにgetMulti内でソート済だからuniqするときにredisResultが全てソート済なのを利用して再ソートを避けたい const redisResultIds = Array.from(new Set(redisResult.flat(1))); - redisResultIds.sort((a, b) => a > b ? -1 : 1); + redisResultIds.sort(idCompare); noteIds = redisResultIds.slice(0, ps.limit); shouldFallbackToDb = shouldFallbackToDb || (noteIds.length === 0); @@ -126,32 +130,43 @@ export class FanoutTimelineEndpointService { const remainingToRead = ps.limit - redisTimeline.length; // DBからの取り直しを減らす初回と同じ割合以上で成功すると仮定するが、クエリの長さを考えて三倍まで - const countToGet = remainingToRead * Math.ceil(Math.min(1.1 / lastSuccessfulRate, 3)); + const countToGet = Math.ceil(remainingToRead * Math.min(1.1 / lastSuccessfulRate, 3)); noteIds = redisResultIds.slice(readFromRedis, readFromRedis + countToGet); readFromRedis += noteIds.length; - const gotFromDb = await this.getAndFilterFromDb(noteIds, filter); + const gotFromDb = await this.getAndFilterFromDb(noteIds, filter, idCompare); redisTimeline.push(...gotFromDb); lastSuccessfulRate = gotFromDb.length / noteIds.length; if (ps.allowPartial ? redisTimeline.length !== 0 : redisTimeline.length >= ps.limit) { // 十分Redisからとれた - return redisTimeline.slice(0, ps.limit); + const result = redisTimeline.slice(0, ps.limit); + if (shouldPrepend) result.reverse(); + return result; } } // まだ足りない分はDBにフォールバック const remainingToRead = ps.limit - redisTimeline.length; - const gotFromDb = await ps.dbFallback(noteIds[noteIds.length - 1], ps.sinceId, remainingToRead); - redisTimeline.push(...gotFromDb); - return redisTimeline; + let dbUntil: string | null; + let dbSince: string | null; + if (shouldPrepend) { + redisTimeline.reverse(); + dbUntil = ps.untilId; + dbSince = noteIds[noteIds.length - 1]; + } else { + dbUntil = noteIds[noteIds.length - 1]; + dbSince = ps.sinceId; + } + const gotFromDb = await ps.dbFallback(dbUntil, dbSince, remainingToRead); + return shouldPrepend ? [...gotFromDb, ...redisTimeline] : [...redisTimeline, ...gotFromDb]; } return await ps.dbFallback(ps.untilId, ps.sinceId, ps.limit); } - private async getAndFilterFromDb(noteIds: string[], noteFilter: (note: MiNote) => boolean): Promise { + private async getAndFilterFromDb(noteIds: string[], noteFilter: (note: MiNote) => boolean, idCompare: (a: string, b: string) => number): Promise { const query = this.notesRepository.createQueryBuilder('note') .where('note.id IN (:...noteIds)', { noteIds: noteIds }) .innerJoinAndSelect('note.user', 'user') @@ -163,7 +178,7 @@ export class FanoutTimelineEndpointService { const notes = (await query.getMany()).filter(noteFilter); - notes.sort((a, b) => a.id > b.id ? -1 : 1); + notes.sort((a, b) => idCompare(a.id, b.id)); return notes; } -- cgit v1.2.3-freya From bcf6b7f5ee73a889a84afd54795f2ae9777074a4 Mon Sep 17 00:00:00 2001 From: KanariKanaru <93921745+kanarikanaru@users.noreply.github.com> Date: Thu, 7 Dec 2023 17:09:31 +0900 Subject: enhance: meilisearchを有効にしてもミュートやブロックを考慮するように (#12575) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhance: meilisearchを有効にしてもミュートやブロックを考慮するように * Update CHANGELOG.md --- CHANGELOG.md | 1 + packages/backend/src/core/SearchService.ts | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index 0316ab3c1f..cba7a05ae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ ### Server - Enhance: MFM `$[ruby ]` が他ソフトウェアと連合されるように +- Enhance: Meilisearchを有効にした検索で、ユーザーのミュートやブロックを考慮するように - Fix: 時間経過により無効化されたアンテナを再有効化したとき、サーバ再起動までその状況が反映されないのを修正 #12303 - Fix: ロールタイムラインが保存されない問題を修正 - Fix: api.jsonの生成ロジックを改善 #12402 diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index b6d2bcabc8..a46d68fd84 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -12,6 +12,8 @@ import { MiNote } from '@/models/Note.js'; import { MiUser } from '@/models/_.js'; import type { NotesRepository } from '@/models/_.js'; import { sqlLikeEscape } from '@/misc/sql-like-escape.js'; +import { isUserRelated } from '@/misc/is-user-related.js'; +import { CacheService } from '@/core/CacheService.js'; import { QueryService } from '@/core/QueryService.js'; import { IdService } from '@/core/IdService.js'; import type { Index, MeiliSearch } from 'meilisearch'; @@ -74,6 +76,7 @@ export class SearchService { @Inject(DI.notesRepository) private notesRepository: NotesRepository, + private cacheService: CacheService, private queryService: QueryService, private idService: IdService, ) { @@ -187,8 +190,19 @@ export class SearchService { limit: pagination.limit, }); if (res.hits.length === 0) return []; - const notes = await this.notesRepository.findBy({ + const [ + userIdsWhoMeMuting, + userIdsWhoBlockingMe, + ] = me ? await Promise.all([ + this.cacheService.userMutingsCache.fetch(me.id), + this.cacheService.userBlockedCache.fetch(me.id), + ]) : [new Set(), new Set()]; + const notes = (await this.notesRepository.findBy({ id: In(res.hits.map(x => x.id)), + })).filter(note => { + if (me && isUserRelated(note, userIdsWhoBlockingMe)) return false; + if (me && isUserRelated(note, userIdsWhoMeMuting)) return false; + return true; }); return notes.sort((a, b) => a.id > b.id ? -1 : 1); } else { -- cgit v1.2.3-freya From e6d01e33e6b539dca784c5309158ae80836fac27 Mon Sep 17 00:00:00 2001 From: KanariKanaru <93921745+kanarikanaru@users.noreply.github.com> Date: Thu, 7 Dec 2023 18:15:38 +0900 Subject: fix(backend): ブロックした相手から自分のノートが見えないように(/users/featured-notes, /users/notes) (#12511) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: ブロックした相手から自分のノートが見えないように(ユーザー,チャンネル) * Update CHANGELOG.md * /users/featured-notesでもブロックを考慮するように * cacheServiceを使うように * /channels/timeline.tsで必要のないnoteFilterを持たないように * Update CHANGELOG.md * FanoutTimelineEndpointServiceへの対応 - ブロックされている場合は、/users/notesでノートが表示されない - ミュートしている場合は、ノートが表示される --- CHANGELOG.md | 1 + .../src/core/FanoutTimelineEndpointService.ts | 3 ++- .../server/api/endpoints/users/featured-notes.ts | 21 ++++++++++++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index cba7a05ae2..7352db8fab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ - Fix: ユーザのノート一覧にてインスタンスミュートが効かない問題 - Fix: チャンネルのノート一覧にてインスタンスミュートが効かない問題 - Fix: 「みつける」が年越し時に壊れる問題を修正 +- Fix: アカウントをブロックした際に、自身のユーザーのページでノートが相手に表示される問題を修正 ## 2023.11.1 diff --git a/packages/backend/src/core/FanoutTimelineEndpointService.ts b/packages/backend/src/core/FanoutTimelineEndpointService.ts index a5bf297275..11027960f1 100644 --- a/packages/backend/src/core/FanoutTimelineEndpointService.ts +++ b/packages/backend/src/core/FanoutTimelineEndpointService.ts @@ -28,6 +28,7 @@ type TimelineOptions = { redisTimelines: FanoutTimelineName[], noteFilter?: (note: MiNote) => boolean, alwaysIncludeMyNotes?: boolean; + ignoreAuthorFromBlock?: boolean; ignoreAuthorFromMute?: boolean; excludeNoFiles?: boolean; excludeReplies?: boolean; @@ -113,7 +114,7 @@ export class FanoutTimelineEndpointService { const parentFilter = filter; filter = (note) => { - if (isUserRelated(note, userIdsWhoBlockingMe, ps.ignoreAuthorFromMute)) return false; + if (isUserRelated(note, userIdsWhoBlockingMe, ps.ignoreAuthorFromBlock)) return false; if (isUserRelated(note, userIdsWhoMeMuting, ps.ignoreAuthorFromMute)) return false; if (isPureRenote(note) && isUserRelated(note, userIdsWhoMeMutingRenotes, ps.ignoreAuthorFromMute)) return false; if (isInstanceMuted(note, userMutedInstances)) return false; diff --git a/packages/backend/src/server/api/endpoints/users/featured-notes.ts b/packages/backend/src/server/api/endpoints/users/featured-notes.ts index dec0b7a122..f84148d727 100644 --- a/packages/backend/src/server/api/endpoints/users/featured-notes.ts +++ b/packages/backend/src/server/api/endpoints/users/featured-notes.ts @@ -9,6 +9,8 @@ import { Endpoint } from '@/server/api/endpoint-base.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { DI } from '@/di-symbols.js'; import { FeaturedService } from '@/core/FeaturedService.js'; +import { CacheService } from '@/core/CacheService.js'; +import { isUserRelated } from '@/misc/is-user-related.js'; export const meta = { tags: ['notes'], @@ -46,6 +48,7 @@ export default class extends Endpoint { // eslint- private noteEntityService: NoteEntityService, private featuredService: FeaturedService, + private cacheService: CacheService, ) { super(meta, paramDef, async (ps, me) => { let noteIds = await this.featuredService.getPerUserNotesRanking(ps.userId, 50); @@ -60,6 +63,14 @@ export default class extends Endpoint { // eslint- return []; } + const [ + userIdsWhoMeMuting, + userIdsWhoBlockingMe, + ] = me ? await Promise.all([ + this.cacheService.userMutingsCache.fetch(me.id), + this.cacheService.userBlockedCache.fetch(me.id), + ]) : [new Set(), new Set()]; + const query = this.notesRepository.createQueryBuilder('note') .where('note.id IN (:...noteIds)', { noteIds: noteIds }) .innerJoinAndSelect('note.user', 'user') @@ -69,10 +80,14 @@ export default class extends Endpoint { // eslint- .leftJoinAndSelect('renote.user', 'renoteUser') .leftJoinAndSelect('note.channel', 'channel'); - const notes = await query.getMany(); - notes.sort((a, b) => a.id > b.id ? -1 : 1); + const notes = (await query.getMany()).filter(note => { + if (me && isUserRelated(note, userIdsWhoBlockingMe, false)) return false; + if (me && isUserRelated(note, userIdsWhoMeMuting, true)) return false; - // TODO: ミュート等考慮 + return true; + }); + + notes.sort((a, b) => a.id > b.id ? -1 : 1); return await this.noteEntityService.packMany(notes, me); }); -- cgit v1.2.3-freya From e38af60fd029ed0ce982e3006e8680f3560bd885 Mon Sep 17 00:00:00 2001 From: ikasoba <57828948+ikasoba@users.noreply.github.com> Date: Fri, 8 Dec 2023 15:15:17 +0900 Subject: fix: `secure: true` なエンドポイントの型が misskey-js に含まれていない (#12603) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 作った * 修正 * 修正 --- .../backend/src/server/api/openapi/gen-spec.ts | 7 +- packages/misskey-js/etc/misskey-js.api.md | 118 +- packages/misskey-js/generator/src/generator.ts | 65 + packages/misskey-js/src/api.ts | 2 + packages/misskey-js/src/autogen/apiClientJSDoc.ts | 3973 ++++++++++++++++++++ packages/misskey-js/src/autogen/endpoint.ts | 68 +- packages/misskey-js/src/autogen/entities.ts | 33 +- packages/misskey-js/src/autogen/models.ts | 4 +- packages/misskey-js/src/autogen/types.ts | 2677 +++++++++++-- 9 files changed, 6728 insertions(+), 219 deletions(-) create mode 100644 packages/misskey-js/src/autogen/apiClientJSDoc.ts (limited to 'packages/backend/src') diff --git a/packages/backend/src/server/api/openapi/gen-spec.ts b/packages/backend/src/server/api/openapi/gen-spec.ts index 30bf6b8b3e..0e71510b48 100644 --- a/packages/backend/src/server/api/openapi/gen-spec.ts +++ b/packages/backend/src/server/api/openapi/gen-spec.ts @@ -43,7 +43,7 @@ export function genOpenapiSpec(config: Config) { // 書き換えたりするのでディープコピーしておく。そのまま編集するとメモリ上の値が汚れて次回以降の出力に影響する const copiedEndpoints = JSON.parse(JSON.stringify(endpoints)) as IEndpoint[]; - for (const endpoint of copiedEndpoints.filter(ep => !ep.meta.secure)) { + for (const endpoint of copiedEndpoints) { const errors = {} as any; if (endpoint.meta.errors) { @@ -59,6 +59,11 @@ export function genOpenapiSpec(config: Config) { const resSchema = endpoint.meta.res ? convertSchemaToOpenApiSchema(endpoint.meta.res) : {}; let desc = (endpoint.meta.description ? endpoint.meta.description : 'No description provided.') + '\n\n'; + + if (endpoint.meta.secure) { + desc += '**Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.\n'; + } + desc += `**Credential required**: *${endpoint.meta.requireCredential ? 'Yes' : 'No'}*`; if (endpoint.meta.kind) { const kind = endpoint.meta.kind; diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 6225f9e236..abb3cae4b1 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -125,6 +125,9 @@ type AdminEmojiDeleteBulkRequest = operations['admin/emoji/delete-bulk']['reques // @public (undocumented) type AdminEmojiDeleteRequest = operations['admin/emoji/delete']['requestBody']['content']['application/json']; +// @public (undocumented) +type AdminEmojiImportZipRequest = operations['admin/emoji/import-zip']['requestBody']['content']['application/json']; + // @public (undocumented) type AdminEmojiListRemoteRequest = operations['admin/emoji/list-remote']['requestBody']['content']['application/json']; @@ -375,8 +378,6 @@ class APIClient { fetch: FetchLike; // (undocumented) origin: string; - // (undocumented) - request(endpoint: E, params?: P, credential?: string | null): Promise>; } // @public (undocumented) @@ -409,6 +410,9 @@ type ApShowRequest = operations['ap/show']['requestBody']['content']['applicatio // @public (undocumented) type ApShowResponse = operations['ap/show']['responses']['200']['content']['application/json']; +// @public (undocumented) +type AuthAcceptRequest = operations['auth/accept']['requestBody']['content']['application/json']; + // @public (undocumented) type AuthSessionGenerateRequest = operations['auth/session/generate']['requestBody']['content']['application/json']; @@ -1062,6 +1066,7 @@ declare namespace entities { AdminEmojiCopyResponse, AdminEmojiDeleteBulkRequest, AdminEmojiDeleteRequest, + AdminEmojiImportZipRequest, AdminEmojiListRemoteRequest, AdminEmojiListRemoteResponse, AdminEmojiListRequest, @@ -1138,6 +1143,7 @@ declare namespace entities { AppCreateResponse, AppShowRequest, AppShowResponse, + AuthAcceptRequest, AuthSessionGenerateRequest, AuthSessionGenerateResponse, AuthSessionShowRequest, @@ -1297,13 +1303,31 @@ declare namespace entities { HashtagsUsersRequest, HashtagsUsersResponse, IResponse, + I2faDoneRequest, + I2faKeyDoneRequest, + I2faPasswordLessRequest, + I2faRegisterKeyRequest, + I2faRegisterRequest, + I2faUpdateKeyRequest, + I2faRemoveKeyRequest, + I2faUnregisterRequest, + IAppsRequest, + IAuthorizedAppsRequest, IClaimAchievementRequest, + IChangePasswordRequest, + IDeleteAccountRequest, + IExportFollowingRequest, IFavoritesRequest, IFavoritesResponse, IGalleryLikesRequest, IGalleryLikesResponse, IGalleryPostsRequest, IGalleryPostsResponse, + IImportBlockingRequest, + IImportFollowingRequest, + IImportMutingRequest, + IImportUserListsRequest, + IImportAntennasRequest, INotificationsRequest, INotificationsResponse, INotificationsGroupedRequest, @@ -1315,6 +1339,7 @@ declare namespace entities { IPinRequest, IPinResponse, IReadAnnouncementRequest, + IRegenerateTokenRequest, IRegistryGetAllRequest, IRegistryGetDetailRequest, IRegistryGetRequest, @@ -1322,10 +1347,15 @@ declare namespace entities { IRegistryKeysRequest, IRegistryRemoveRequest, IRegistrySetRequest, + IRevokeTokenRequest, + ISigninHistoryRequest, + ISigninHistoryResponse, IUnpinRequest, IUnpinResponse, + IUpdateEmailRequest, IUpdateRequest, IUpdateResponse, + IMoveRequest, IWebhooksCreateRequest, IWebhooksShowRequest, IWebhooksUpdateRequest, @@ -1340,6 +1370,8 @@ declare namespace entities { EmojisResponse, EmojiRequest, EmojiResponse, + MiauthGenTokenRequest, + MiauthGenTokenResponse, MuteCreateRequest, MuteDeleteRequest, MuteListRequest, @@ -1402,6 +1434,7 @@ declare namespace entities { NotesUserListTimelineRequest, NotesUserListTimelineResponse, NotificationsCreateRequest, + PagePushRequest, PagesCreateRequest, PagesCreateResponse, PagesDeleteRequest, @@ -1770,12 +1803,51 @@ type HashtagsUsersRequest = operations['hashtags/users']['requestBody']['content // @public (undocumented) type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json']; +// @public (undocumented) +type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json']; + +// @public (undocumented) +type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json']; + +// @public (undocumented) +type I2faPasswordLessRequest = operations['i/2fa/password-less']['requestBody']['content']['application/json']; + +// @public (undocumented) +type I2faRegisterKeyRequest = operations['i/2fa/register-key']['requestBody']['content']['application/json']; + +// @public (undocumented) +type I2faRegisterRequest = operations['i/2fa/register']['requestBody']['content']['application/json']; + +// @public (undocumented) +type I2faRemoveKeyRequest = operations['i/2fa/remove-key']['requestBody']['content']['application/json']; + +// @public (undocumented) +type I2faUnregisterRequest = operations['i/2fa/unregister']['requestBody']['content']['application/json']; + +// @public (undocumented) +type I2faUpdateKeyRequest = operations['i/2fa/update-key']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IAppsRequest = operations['i/apps']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IAuthorizedAppsRequest = operations['i/authorized-apps']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IChangePasswordRequest = operations['i/change-password']['requestBody']['content']['application/json']; + // @public (undocumented) type IClaimAchievementRequest = operations['i/claim-achievement']['requestBody']['content']['application/json']; // @public (undocumented) type ID = string; +// @public (undocumented) +type IDeleteAccountRequest = operations['i/delete-account']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IExportFollowingRequest = operations['i/export-following']['requestBody']['content']['application/json']; + // @public (undocumented) type IFavoritesRequest = operations['i/favorites']['requestBody']['content']['application/json']; @@ -1794,6 +1866,24 @@ type IGalleryPostsRequest = operations['i/gallery/posts']['requestBody']['conten // @public (undocumented) type IGalleryPostsResponse = operations['i/gallery/posts']['responses']['200']['content']['application/json']; +// @public (undocumented) +type IImportAntennasRequest = operations['i/import-antennas']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IImportBlockingRequest = operations['i/import-blocking']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IImportFollowingRequest = operations['i/import-following']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IImportMutingRequest = operations['i/import-muting']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IImportUserListsRequest = operations['i/import-user-lists']['requestBody']['content']['application/json']; + +// @public (undocumented) +type IMoveRequest = operations['i/move']['requestBody']['content']['application/json']; + // @public (undocumented) type INotificationsGroupedRequest = operations['i/notifications-grouped']['requestBody']['content']['application/json']; @@ -1845,6 +1935,9 @@ type IPinResponse = operations['i/pin']['responses']['200']['content']['applicat // @public (undocumented) type IReadAnnouncementRequest = operations['i/read-announcement']['requestBody']['content']['application/json']; +// @public (undocumented) +type IRegenerateTokenRequest = operations['i/regenerate-token']['requestBody']['content']['application/json']; + // @public (undocumented) type IRegistryGetAllRequest = operations['i/registry/get-all']['requestBody']['content']['application/json']; @@ -1869,15 +1962,27 @@ type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content' // @public (undocumented) type IResponse = operations['i']['responses']['200']['content']['application/json']; +// @public (undocumented) +type IRevokeTokenRequest = operations['i/revoke-token']['requestBody']['content']['application/json']; + // @public (undocumented) function isAPIError(reason: any): reason is APIError; +// @public (undocumented) +type ISigninHistoryRequest = operations['i/signin-history']['requestBody']['content']['application/json']; + +// @public (undocumented) +type ISigninHistoryResponse = operations['i/signin-history']['responses']['200']['content']['application/json']; + // @public (undocumented) type IUnpinRequest = operations['i/unpin']['requestBody']['content']['application/json']; // @public (undocumented) type IUnpinResponse = operations['i/unpin']['responses']['200']['content']['application/json']; +// @public (undocumented) +type IUpdateEmailRequest = operations['i/update-email']['requestBody']['content']['application/json']; + // @public (undocumented) type IUpdateRequest = operations['i/update']['requestBody']['content']['application/json']; @@ -1908,6 +2013,12 @@ type MetaRequest = operations['meta']['requestBody']['content']['application/jso // @public (undocumented) type MetaResponse = operations['meta']['responses']['200']['content']['application/json']; +// @public (undocumented) +type MiauthGenTokenRequest = operations['miauth/gen-token']['requestBody']['content']['application/json']; + +// @public (undocumented) +type MiauthGenTokenResponse = operations['miauth/gen-token']['responses']['200']['content']['application/json']; + // @public (undocumented) type ModerationLog = { id: ID; @@ -2240,6 +2351,9 @@ type PageEvent = { user: User; }; +// @public (undocumented) +type PagePushRequest = operations['page-push']['requestBody']['content']['application/json']; + // @public (undocumented) type PagesCreateRequest = operations['pages/create']['requestBody']['content']['application/json']; diff --git a/packages/misskey-js/generator/src/generator.ts b/packages/misskey-js/generator/src/generator.ts index 7ed3ae120c..f12ed94513 100644 --- a/packages/misskey-js/generator/src/generator.ts +++ b/packages/misskey-js/generator/src/generator.ts @@ -159,6 +159,68 @@ async function generateEndpoints( await writeFile(endpointOutputPath, endpointOutputLine.join('\n')); } +async function generateApiClientJSDoc( + openApiDocs: OpenAPIV3.Document, + apiClientFileName: string, + endpointsFileName: string, + warningsOutputPath: string, +) { + const endpoints: { operationId: string; description: string; }[] = []; + + // misskey-jsはPOST固定で送っているので、こちらも決め打ちする。別メソッドに対応することがあればこちらも直す必要あり + const paths = openApiDocs.paths; + const postPathItems = Object.keys(paths) + .map(it => paths[it]?.post) + .filter(filterUndefined); + + for (const operation of postPathItems) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const operationId = operation.operationId!; + + if (operation.description) { + endpoints.push({ + operationId: operationId, + description: operation.description, + }); + } + } + + const endpointOutputLine: string[] = []; + + endpointOutputLine.push(generateVersionHeaderComment(openApiDocs)); + endpointOutputLine.push(''); + + endpointOutputLine.push(`import type { SwitchCaseResponseType } from '${toImportPath(apiClientFileName)}';`); + endpointOutputLine.push(`import type { Endpoints } from '${toImportPath(endpointsFileName)}';`); + endpointOutputLine.push(''); + + endpointOutputLine.push(`declare module '${toImportPath(apiClientFileName)}' {`); + endpointOutputLine.push(' export interface APIClient {'); + for (let i = 0; i < endpoints.length; i++) { + const endpoint = endpoints[i]; + + endpointOutputLine.push( + ' /**', + ` * ${endpoint.description.split('\n').join('\n * ')}`, + ' */', + ` request(`, + ' endpoint: E,', + ' params: P,', + ' credential?: string | null,', + ' ): Promise>;', + ); + + if (i < endpoints.length - 1) { + endpointOutputLine.push('\n'); + } + } + endpointOutputLine.push(' }'); + endpointOutputLine.push('}'); + endpointOutputLine.push(''); + + await writeFile(warningsOutputPath, endpointOutputLine.join('\n')); +} + function isRequestBodyObject(value: unknown): value is OpenAPIV3.RequestBodyObject { if (!value) { return false; @@ -279,6 +341,9 @@ async function main() { const entitiesFileName = `${generatePath}/entities.ts`; const endpointFileName = `${generatePath}/endpoint.ts`; await generateEndpoints(openApiDocs, typeFileName, entitiesFileName, endpointFileName); + + const apiClientWarningFileName = `${generatePath}/apiClientJSDoc.ts`; + await generateApiClientJSDoc(openApiDocs, '../api.ts', endpointFileName, apiClientWarningFileName); } main(); diff --git a/packages/misskey-js/src/api.ts b/packages/misskey-js/src/api.ts index c2fa4f1790..0d10faaada 100644 --- a/packages/misskey-js/src/api.ts +++ b/packages/misskey-js/src/api.ts @@ -1,3 +1,5 @@ +import './autogen/apiClientJSDoc'; + import { SwitchCaseResponseType } from './api.types'; import type { Endpoints } from './api.types'; diff --git a/packages/misskey-js/src/autogen/apiClientJSDoc.ts b/packages/misskey-js/src/autogen/apiClientJSDoc.ts new file mode 100644 index 0000000000..7d58dcb5c8 --- /dev/null +++ b/packages/misskey-js/src/autogen/apiClientJSDoc.ts @@ -0,0 +1,3973 @@ +/* + * version: 2023.11.0-beta.3 + * generatedAt: 2023-12-08T04:57:48.424Z + */ + +import type { SwitchCaseResponseType } from '../api.js'; +import type { Endpoints } from './endpoint.js'; + +declare module '../api.js' { + export interface APIClient { + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:blocks* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:blocks* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:blocks* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:channels* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:channels* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:channels* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:channels* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:clip-favorite* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:clip-favorite* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:clip-favorite* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Find the notes to which the given file is attached. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Check if a given file exists. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Upload a new drive file. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Delete an existing drive file. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Search for a drive file by a hash of the contents. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Search for a drive file by the given parameters. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show the properties of a drive file. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Update the properties of a drive file. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Request the server to download a new drive file from the specified URL. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:drive* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:following* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:following* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery-likes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery-likes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:gallery* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:favorites* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:gallery-likes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:gallery* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:notifications* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:notifications* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:page-likes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:pages* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:mutes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:mutes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:mutes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:favorites* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:favorites* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:votes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:reactions* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:reactions* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notifications* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notifications* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:notifications* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:pages* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:pages* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:page-likes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:page-likes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:pages* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash-likes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash-likes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:flash* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:flash* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:flash-likes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Request a users password to be reset. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Only available when running with NODE_ENV=testing. Reset the database and flush Redis. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Complete the password reset that was previously requested. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Check push notification registration exists. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Update push notification registration. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Register to receive push notifications. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Unregister from receiving push notifications. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Endpoint for testing input validation. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show all clips this user owns. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show everyone that follows this user. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show everyone that this user is following. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show all gallery posts by the given user. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Get a list of other users that the specified user frequently replies to. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Create a new list of users. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Delete an existing list of users. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show all lists that the authenticated user has created. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Remove a user from a list. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Add a user to an existing list. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show the properties of a list. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Update the properties of a list. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show all pages this user created. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show all flashs this user created. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show all reactions this user made. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show users that the authenticated user might be interested to follow. + * + * **Credential required**: *Yes* / **Permission**: *read:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show the different kinds of relations between the authenticated user and the specified user(s). + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * File a report. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Search for a user by username and/or host. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Search for users. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * Show the properties of a user. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *Yes* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + } +} diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index 89faea6b40..5efe582434 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -1,6 +1,6 @@ /* - * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-04T11:17:52.156Z + * version: 2023.11.0-beta.3 + * generatedAt: 2023-12-08T04:57:48.415Z */ import type { @@ -41,6 +41,7 @@ import type { AdminEmojiCopyResponse, AdminEmojiDeleteBulkRequest, AdminEmojiDeleteRequest, + AdminEmojiImportZipRequest, AdminEmojiListRemoteRequest, AdminEmojiListRemoteResponse, AdminEmojiListRequest, @@ -117,6 +118,7 @@ import type { AppCreateResponse, AppShowRequest, AppShowResponse, + AuthAcceptRequest, AuthSessionGenerateRequest, AuthSessionGenerateResponse, AuthSessionShowRequest, @@ -276,13 +278,31 @@ import type { HashtagsUsersRequest, HashtagsUsersResponse, IResponse, + I2faDoneRequest, + I2faKeyDoneRequest, + I2faPasswordLessRequest, + I2faRegisterKeyRequest, + I2faRegisterRequest, + I2faUpdateKeyRequest, + I2faRemoveKeyRequest, + I2faUnregisterRequest, + IAppsRequest, + IAuthorizedAppsRequest, IClaimAchievementRequest, + IChangePasswordRequest, + IDeleteAccountRequest, + IExportFollowingRequest, IFavoritesRequest, IFavoritesResponse, IGalleryLikesRequest, IGalleryLikesResponse, IGalleryPostsRequest, IGalleryPostsResponse, + IImportBlockingRequest, + IImportFollowingRequest, + IImportMutingRequest, + IImportUserListsRequest, + IImportAntennasRequest, INotificationsRequest, INotificationsResponse, INotificationsGroupedRequest, @@ -294,6 +314,7 @@ import type { IPinRequest, IPinResponse, IReadAnnouncementRequest, + IRegenerateTokenRequest, IRegistryGetAllRequest, IRegistryGetDetailRequest, IRegistryGetRequest, @@ -301,10 +322,15 @@ import type { IRegistryKeysRequest, IRegistryRemoveRequest, IRegistrySetRequest, + IRevokeTokenRequest, + ISigninHistoryRequest, + ISigninHistoryResponse, IUnpinRequest, IUnpinResponse, + IUpdateEmailRequest, IUpdateRequest, IUpdateResponse, + IMoveRequest, IWebhooksCreateRequest, IWebhooksShowRequest, IWebhooksUpdateRequest, @@ -319,6 +345,8 @@ import type { EmojisResponse, EmojiRequest, EmojiResponse, + MiauthGenTokenRequest, + MiauthGenTokenResponse, MuteCreateRequest, MuteDeleteRequest, MuteListRequest, @@ -381,6 +409,7 @@ import type { NotesUserListTimelineRequest, NotesUserListTimelineResponse, NotificationsCreateRequest, + PagePushRequest, PagesCreateRequest, PagesCreateResponse, PagesDeleteRequest, @@ -511,6 +540,7 @@ export type Endpoints = { 'admin/emoji/copy': { req: AdminEmojiCopyRequest; res: AdminEmojiCopyResponse }; 'admin/emoji/delete-bulk': { req: AdminEmojiDeleteBulkRequest; res: EmptyResponse }; 'admin/emoji/delete': { req: AdminEmojiDeleteRequest; res: EmptyResponse }; + 'admin/emoji/import-zip': { req: AdminEmojiImportZipRequest; res: EmptyResponse }; 'admin/emoji/list-remote': { req: AdminEmojiListRemoteRequest; res: AdminEmojiListRemoteResponse }; 'admin/emoji/list': { req: AdminEmojiListRequest; res: AdminEmojiListResponse }; 'admin/emoji/remove-aliases-bulk': { req: AdminEmojiRemoveAliasesBulkRequest; res: EmptyResponse }; @@ -568,6 +598,7 @@ export type Endpoints = { 'ap/show': { req: ApShowRequest; res: ApShowResponse }; 'app/create': { req: AppCreateRequest; res: AppCreateResponse }; 'app/show': { req: AppShowRequest; res: AppShowResponse }; + 'auth/accept': { req: AuthAcceptRequest; res: EmptyResponse }; 'auth/session/generate': { req: AuthSessionGenerateRequest; res: AuthSessionGenerateResponse }; 'auth/session/show': { req: AuthSessionShowRequest; res: AuthSessionShowResponse }; 'auth/session/userkey': { req: AuthSessionUserkeyRequest; res: AuthSessionUserkeyResponse }; @@ -631,6 +662,7 @@ export type Endpoints = { 'email-address/available': { req: EmailAddressAvailableRequest; res: EmailAddressAvailableResponse }; 'endpoint': { req: EndpointRequest; res: EmptyResponse }; 'endpoints': { req: EmptyRequest; res: EndpointsResponse }; + 'export-custom-emojis': { req: EmptyRequest; res: EmptyResponse }; 'federation/followers': { req: FederationFollowersRequest; res: FederationFollowersResponse }; 'federation/following': { req: FederationFollowingRequest; res: FederationFollowingResponse }; 'federation/instances': { req: FederationInstancesRequest; res: FederationInstancesResponse }; @@ -664,10 +696,34 @@ export type Endpoints = { 'hashtags/trend': { req: EmptyRequest; res: HashtagsTrendResponse }; 'hashtags/users': { req: HashtagsUsersRequest; res: HashtagsUsersResponse }; 'i': { req: EmptyRequest; res: IResponse }; + 'i/2fa/done': { req: I2faDoneRequest; res: EmptyResponse }; + 'i/2fa/key-done': { req: I2faKeyDoneRequest; res: EmptyResponse }; + 'i/2fa/password-less': { req: I2faPasswordLessRequest; res: EmptyResponse }; + 'i/2fa/register-key': { req: I2faRegisterKeyRequest; res: EmptyResponse }; + 'i/2fa/register': { req: I2faRegisterRequest; res: EmptyResponse }; + 'i/2fa/update-key': { req: I2faUpdateKeyRequest; res: EmptyResponse }; + 'i/2fa/remove-key': { req: I2faRemoveKeyRequest; res: EmptyResponse }; + 'i/2fa/unregister': { req: I2faUnregisterRequest; res: EmptyResponse }; + 'i/apps': { req: IAppsRequest; res: EmptyResponse }; + 'i/authorized-apps': { req: IAuthorizedAppsRequest; res: EmptyResponse }; 'i/claim-achievement': { req: IClaimAchievementRequest; res: EmptyResponse }; + 'i/change-password': { req: IChangePasswordRequest; res: EmptyResponse }; + 'i/delete-account': { req: IDeleteAccountRequest; res: EmptyResponse }; + 'i/export-blocking': { req: EmptyRequest; res: EmptyResponse }; + 'i/export-following': { req: IExportFollowingRequest; res: EmptyResponse }; + 'i/export-mute': { req: EmptyRequest; res: EmptyResponse }; + 'i/export-notes': { req: EmptyRequest; res: EmptyResponse }; + 'i/export-favorites': { req: EmptyRequest; res: EmptyResponse }; + 'i/export-user-lists': { req: EmptyRequest; res: EmptyResponse }; + 'i/export-antennas': { req: EmptyRequest; res: EmptyResponse }; 'i/favorites': { req: IFavoritesRequest; res: IFavoritesResponse }; 'i/gallery/likes': { req: IGalleryLikesRequest; res: IGalleryLikesResponse }; 'i/gallery/posts': { req: IGalleryPostsRequest; res: IGalleryPostsResponse }; + 'i/import-blocking': { req: IImportBlockingRequest; res: EmptyResponse }; + 'i/import-following': { req: IImportFollowingRequest; res: EmptyResponse }; + 'i/import-muting': { req: IImportMutingRequest; res: EmptyResponse }; + 'i/import-user-lists': { req: IImportUserListsRequest; res: EmptyResponse }; + 'i/import-antennas': { req: IImportAntennasRequest; res: EmptyResponse }; 'i/notifications': { req: INotificationsRequest; res: INotificationsResponse }; 'i/notifications-grouped': { req: INotificationsGroupedRequest; res: INotificationsGroupedResponse }; 'i/page-likes': { req: IPageLikesRequest; res: IPageLikesResponse }; @@ -675,15 +731,21 @@ export type Endpoints = { 'i/pin': { req: IPinRequest; res: IPinResponse }; 'i/read-all-unread-notes': { req: EmptyRequest; res: EmptyResponse }; 'i/read-announcement': { req: IReadAnnouncementRequest; res: EmptyResponse }; + 'i/regenerate-token': { req: IRegenerateTokenRequest; res: EmptyResponse }; 'i/registry/get-all': { req: IRegistryGetAllRequest; res: EmptyResponse }; 'i/registry/get-detail': { req: IRegistryGetDetailRequest; res: EmptyResponse }; 'i/registry/get': { req: IRegistryGetRequest; res: EmptyResponse }; 'i/registry/keys-with-type': { req: IRegistryKeysWithTypeRequest; res: EmptyResponse }; 'i/registry/keys': { req: IRegistryKeysRequest; res: EmptyResponse }; 'i/registry/remove': { req: IRegistryRemoveRequest; res: EmptyResponse }; + 'i/registry/scopes-with-domain': { req: EmptyRequest; res: EmptyResponse }; 'i/registry/set': { req: IRegistrySetRequest; res: EmptyResponse }; + 'i/revoke-token': { req: IRevokeTokenRequest; res: EmptyResponse }; + 'i/signin-history': { req: ISigninHistoryRequest; res: ISigninHistoryResponse }; 'i/unpin': { req: IUnpinRequest; res: IUnpinResponse }; + 'i/update-email': { req: IUpdateEmailRequest; res: EmptyResponse }; 'i/update': { req: IUpdateRequest; res: IUpdateResponse }; + 'i/move': { req: IMoveRequest; res: EmptyResponse }; 'i/webhooks/create': { req: IWebhooksCreateRequest; res: EmptyResponse }; 'i/webhooks/list': { req: EmptyRequest; res: EmptyResponse }; 'i/webhooks/show': { req: IWebhooksShowRequest; res: EmptyResponse }; @@ -696,6 +758,7 @@ export type Endpoints = { 'meta': { req: MetaRequest; res: MetaResponse }; 'emojis': { req: EmptyRequest; res: EmojisResponse }; 'emoji': { req: EmojiRequest; res: EmojiResponse }; + 'miauth/gen-token': { req: MiauthGenTokenRequest; res: MiauthGenTokenResponse }; 'mute/create': { req: MuteCreateRequest; res: EmptyResponse }; 'mute/delete': { req: MuteDeleteRequest; res: EmptyResponse }; 'mute/list': { req: MuteListRequest; res: MuteListResponse }; @@ -736,6 +799,7 @@ export type Endpoints = { 'notifications/create': { req: NotificationsCreateRequest; res: EmptyResponse }; 'notifications/mark-all-as-read': { req: EmptyRequest; res: EmptyResponse }; 'notifications/test-notification': { req: EmptyRequest; res: EmptyResponse }; + 'page-push': { req: PagePushRequest; res: EmptyResponse }; 'pages/create': { req: PagesCreateRequest; res: PagesCreateResponse }; 'pages/delete': { req: PagesDeleteRequest; res: EmptyResponse }; 'pages/featured': { req: EmptyRequest; res: PagesFeaturedResponse }; diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index 611f1b9504..4de3c80a7f 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -1,6 +1,6 @@ /* - * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-04T11:17:52.154Z + * version: 2023.11.0-beta.3 + * generatedAt: 2023-12-08T04:57:48.409Z */ import { operations } from './types.js'; @@ -43,6 +43,7 @@ export type AdminEmojiCopyRequest = operations['admin/emoji/copy']['requestBody' export type AdminEmojiCopyResponse = operations['admin/emoji/copy']['responses']['200']['content']['application/json']; export type AdminEmojiDeleteBulkRequest = operations['admin/emoji/delete-bulk']['requestBody']['content']['application/json']; export type AdminEmojiDeleteRequest = operations['admin/emoji/delete']['requestBody']['content']['application/json']; +export type AdminEmojiImportZipRequest = operations['admin/emoji/import-zip']['requestBody']['content']['application/json']; export type AdminEmojiListRemoteRequest = operations['admin/emoji/list-remote']['requestBody']['content']['application/json']; export type AdminEmojiListRemoteResponse = operations['admin/emoji/list-remote']['responses']['200']['content']['application/json']; export type AdminEmojiListRequest = operations['admin/emoji/list']['requestBody']['content']['application/json']; @@ -119,6 +120,7 @@ export type AppCreateRequest = operations['app/create']['requestBody']['content' export type AppCreateResponse = operations['app/create']['responses']['200']['content']['application/json']; export type AppShowRequest = operations['app/show']['requestBody']['content']['application/json']; export type AppShowResponse = operations['app/show']['responses']['200']['content']['application/json']; +export type AuthAcceptRequest = operations['auth/accept']['requestBody']['content']['application/json']; export type AuthSessionGenerateRequest = operations['auth/session/generate']['requestBody']['content']['application/json']; export type AuthSessionGenerateResponse = operations['auth/session/generate']['responses']['200']['content']['application/json']; export type AuthSessionShowRequest = operations['auth/session/show']['requestBody']['content']['application/json']; @@ -278,13 +280,31 @@ export type HashtagsTrendResponse = operations['hashtags/trend']['responses']['2 export type HashtagsUsersRequest = operations['hashtags/users']['requestBody']['content']['application/json']; export type HashtagsUsersResponse = operations['hashtags/users']['responses']['200']['content']['application/json']; export type IResponse = operations['i']['responses']['200']['content']['application/json']; +export type I2faDoneRequest = operations['i/2fa/done']['requestBody']['content']['application/json']; +export type I2faKeyDoneRequest = operations['i/2fa/key-done']['requestBody']['content']['application/json']; +export type I2faPasswordLessRequest = operations['i/2fa/password-less']['requestBody']['content']['application/json']; +export type I2faRegisterKeyRequest = operations['i/2fa/register-key']['requestBody']['content']['application/json']; +export type I2faRegisterRequest = operations['i/2fa/register']['requestBody']['content']['application/json']; +export type I2faUpdateKeyRequest = operations['i/2fa/update-key']['requestBody']['content']['application/json']; +export type I2faRemoveKeyRequest = operations['i/2fa/remove-key']['requestBody']['content']['application/json']; +export type I2faUnregisterRequest = operations['i/2fa/unregister']['requestBody']['content']['application/json']; +export type IAppsRequest = operations['i/apps']['requestBody']['content']['application/json']; +export type IAuthorizedAppsRequest = operations['i/authorized-apps']['requestBody']['content']['application/json']; export type IClaimAchievementRequest = operations['i/claim-achievement']['requestBody']['content']['application/json']; +export type IChangePasswordRequest = operations['i/change-password']['requestBody']['content']['application/json']; +export type IDeleteAccountRequest = operations['i/delete-account']['requestBody']['content']['application/json']; +export type IExportFollowingRequest = operations['i/export-following']['requestBody']['content']['application/json']; export type IFavoritesRequest = operations['i/favorites']['requestBody']['content']['application/json']; export type IFavoritesResponse = operations['i/favorites']['responses']['200']['content']['application/json']; export type IGalleryLikesRequest = operations['i/gallery/likes']['requestBody']['content']['application/json']; export type IGalleryLikesResponse = operations['i/gallery/likes']['responses']['200']['content']['application/json']; export type IGalleryPostsRequest = operations['i/gallery/posts']['requestBody']['content']['application/json']; export type IGalleryPostsResponse = operations['i/gallery/posts']['responses']['200']['content']['application/json']; +export type IImportBlockingRequest = operations['i/import-blocking']['requestBody']['content']['application/json']; +export type IImportFollowingRequest = operations['i/import-following']['requestBody']['content']['application/json']; +export type IImportMutingRequest = operations['i/import-muting']['requestBody']['content']['application/json']; +export type IImportUserListsRequest = operations['i/import-user-lists']['requestBody']['content']['application/json']; +export type IImportAntennasRequest = operations['i/import-antennas']['requestBody']['content']['application/json']; export type INotificationsRequest = operations['i/notifications']['requestBody']['content']['application/json']; export type INotificationsResponse = operations['i/notifications']['responses']['200']['content']['application/json']; export type INotificationsGroupedRequest = operations['i/notifications-grouped']['requestBody']['content']['application/json']; @@ -296,6 +316,7 @@ export type IPagesResponse = operations['i/pages']['responses']['200']['content' export type IPinRequest = operations['i/pin']['requestBody']['content']['application/json']; export type IPinResponse = operations['i/pin']['responses']['200']['content']['application/json']; export type IReadAnnouncementRequest = operations['i/read-announcement']['requestBody']['content']['application/json']; +export type IRegenerateTokenRequest = operations['i/regenerate-token']['requestBody']['content']['application/json']; export type IRegistryGetAllRequest = operations['i/registry/get-all']['requestBody']['content']['application/json']; export type IRegistryGetDetailRequest = operations['i/registry/get-detail']['requestBody']['content']['application/json']; export type IRegistryGetRequest = operations['i/registry/get']['requestBody']['content']['application/json']; @@ -303,10 +324,15 @@ export type IRegistryKeysWithTypeRequest = operations['i/registry/keys-with-type export type IRegistryKeysRequest = operations['i/registry/keys']['requestBody']['content']['application/json']; export type IRegistryRemoveRequest = operations['i/registry/remove']['requestBody']['content']['application/json']; export type IRegistrySetRequest = operations['i/registry/set']['requestBody']['content']['application/json']; +export type IRevokeTokenRequest = operations['i/revoke-token']['requestBody']['content']['application/json']; +export type ISigninHistoryRequest = operations['i/signin-history']['requestBody']['content']['application/json']; +export type ISigninHistoryResponse = operations['i/signin-history']['responses']['200']['content']['application/json']; export type IUnpinRequest = operations['i/unpin']['requestBody']['content']['application/json']; export type IUnpinResponse = operations['i/unpin']['responses']['200']['content']['application/json']; +export type IUpdateEmailRequest = operations['i/update-email']['requestBody']['content']['application/json']; export type IUpdateRequest = operations['i/update']['requestBody']['content']['application/json']; export type IUpdateResponse = operations['i/update']['responses']['200']['content']['application/json']; +export type IMoveRequest = operations['i/move']['requestBody']['content']['application/json']; export type IWebhooksCreateRequest = operations['i/webhooks/create']['requestBody']['content']['application/json']; export type IWebhooksShowRequest = operations['i/webhooks/show']['requestBody']['content']['application/json']; export type IWebhooksUpdateRequest = operations['i/webhooks/update']['requestBody']['content']['application/json']; @@ -321,6 +347,8 @@ export type MetaResponse = operations['meta']['responses']['200']['content']['ap export type EmojisResponse = operations['emojis']['responses']['200']['content']['application/json']; export type EmojiRequest = operations['emoji']['requestBody']['content']['application/json']; export type EmojiResponse = operations['emoji']['responses']['200']['content']['application/json']; +export type MiauthGenTokenRequest = operations['miauth/gen-token']['requestBody']['content']['application/json']; +export type MiauthGenTokenResponse = operations['miauth/gen-token']['responses']['200']['content']['application/json']; export type MuteCreateRequest = operations['mute/create']['requestBody']['content']['application/json']; export type MuteDeleteRequest = operations['mute/delete']['requestBody']['content']['application/json']; export type MuteListRequest = operations['mute/list']['requestBody']['content']['application/json']; @@ -383,6 +411,7 @@ export type NotesUnrenoteRequest = operations['notes/unrenote']['requestBody'][' export type NotesUserListTimelineRequest = operations['notes/user-list-timeline']['requestBody']['content']['application/json']; export type NotesUserListTimelineResponse = operations['notes/user-list-timeline']['responses']['200']['content']['application/json']; export type NotificationsCreateRequest = operations['notifications/create']['requestBody']['content']['application/json']; +export type PagePushRequest = operations['page-push']['requestBody']['content']['application/json']; export type PagesCreateRequest = operations['pages/create']['requestBody']['content']['application/json']; export type PagesCreateResponse = operations['pages/create']['responses']['200']['content']['application/json']; export type PagesDeleteRequest = operations['pages/delete']['requestBody']['content']['application/json']; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index 0607cd1370..2c25e82d12 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -1,6 +1,6 @@ /* - * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-04T11:17:52.151Z + * version: 2023.11.0-beta.3 + * generatedAt: 2023-12-08T04:57:48.405Z */ import { components } from './types.js'; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index e09f24d46f..cecc2c872f 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -2,8 +2,8 @@ /* eslint @typescript-eslint/no-explicit-any: 0 */ /* - * version: 2023.12.0-beta.1 - * generatedAt: 2023-12-04T11:17:51.997Z + * version: 2023.11.0-beta.3 + * generatedAt: 2023-12-08T04:57:48.142Z */ /** @@ -278,6 +278,16 @@ export type paths = { */ post: operations['admin/emoji/delete']; }; + '/admin/emoji/import-zip': { + /** + * admin/emoji/import-zip + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['admin/emoji/import-zip']; + }; '/admin/emoji/list-remote': { /** * admin/emoji/list-remote @@ -791,6 +801,16 @@ export type paths = { */ post: operations['app/show']; }; + '/auth/accept': { + /** + * auth/accept + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['auth/accept']; + }; '/auth/session/generate': { /** * auth/session/generate @@ -1442,6 +1462,16 @@ export type paths = { */ post: operations['endpoints']; }; + '/export-custom-emojis': { + /** + * export-custom-emojis + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['export-custom-emojis']; + }; '/federation/followers': { /** * federation/followers @@ -1767,6 +1797,106 @@ export type paths = { */ post: operations['i']; }; + '/i/2fa/done': { + /** + * i/2fa/done + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/2fa/done']; + }; + '/i/2fa/key-done': { + /** + * i/2fa/key-done + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/2fa/key-done']; + }; + '/i/2fa/password-less': { + /** + * i/2fa/password-less + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/2fa/password-less']; + }; + '/i/2fa/register-key': { + /** + * i/2fa/register-key + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/2fa/register-key']; + }; + '/i/2fa/register': { + /** + * i/2fa/register + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/2fa/register']; + }; + '/i/2fa/update-key': { + /** + * i/2fa/update-key + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/2fa/update-key']; + }; + '/i/2fa/remove-key': { + /** + * i/2fa/remove-key + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/2fa/remove-key']; + }; + '/i/2fa/unregister': { + /** + * i/2fa/unregister + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/2fa/unregister']; + }; + '/i/apps': { + /** + * i/apps + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/apps']; + }; + '/i/authorized-apps': { + /** + * i/authorized-apps + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/authorized-apps']; + }; '/i/claim-achievement': { /** * i/claim-achievement @@ -1776,6 +1906,96 @@ export type paths = { */ post: operations['i/claim-achievement']; }; + '/i/change-password': { + /** + * i/change-password + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/change-password']; + }; + '/i/delete-account': { + /** + * i/delete-account + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/delete-account']; + }; + '/i/export-blocking': { + /** + * i/export-blocking + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/export-blocking']; + }; + '/i/export-following': { + /** + * i/export-following + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/export-following']; + }; + '/i/export-mute': { + /** + * i/export-mute + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/export-mute']; + }; + '/i/export-notes': { + /** + * i/export-notes + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/export-notes']; + }; + '/i/export-favorites': { + /** + * i/export-favorites + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/export-favorites']; + }; + '/i/export-user-lists': { + /** + * i/export-user-lists + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/export-user-lists']; + }; + '/i/export-antennas': { + /** + * i/export-antennas + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/export-antennas']; + }; '/i/favorites': { /** * i/favorites @@ -1803,6 +2023,56 @@ export type paths = { */ post: operations['i/gallery/posts']; }; + '/i/import-blocking': { + /** + * i/import-blocking + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/import-blocking']; + }; + '/i/import-following': { + /** + * i/import-following + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/import-following']; + }; + '/i/import-muting': { + /** + * i/import-muting + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/import-muting']; + }; + '/i/import-user-lists': { + /** + * i/import-user-lists + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/import-user-lists']; + }; + '/i/import-antennas': { + /** + * i/import-antennas + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/import-antennas']; + }; '/i/notifications': { /** * i/notifications @@ -1866,6 +2136,16 @@ export type paths = { */ post: operations['i/read-announcement']; }; + '/i/regenerate-token': { + /** + * i/regenerate-token + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/regenerate-token']; + }; '/i/registry/get-all': { /** * i/registry/get-all @@ -1920,6 +2200,16 @@ export type paths = { */ post: operations['i/registry/remove']; }; + '/i/registry/scopes-with-domain': { + /** + * i/registry/scopes-with-domain + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/registry/scopes-with-domain']; + }; '/i/registry/set': { /** * i/registry/set @@ -1929,6 +2219,26 @@ export type paths = { */ post: operations['i/registry/set']; }; + '/i/revoke-token': { + /** + * i/revoke-token + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/revoke-token']; + }; + '/i/signin-history': { + /** + * i/signin-history + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/signin-history']; + }; '/i/unpin': { /** * i/unpin @@ -1938,6 +2248,16 @@ export type paths = { */ post: operations['i/unpin']; }; + '/i/update-email': { + /** + * i/update-email + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/update-email']; + }; '/i/update': { /** * i/update @@ -1947,6 +2267,16 @@ export type paths = { */ post: operations['i/update']; }; + '/i/move': { + /** + * i/move + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['i/move']; + }; '/i/webhooks/create': { /** * i/webhooks/create @@ -2069,6 +2399,16 @@ export type paths = { */ post: operations['emoji']; }; + '/miauth/gen-token': { + /** + * miauth/gen-token + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['miauth/gen-token']; + }; '/mute/create': { /** * mute/create @@ -2443,6 +2783,16 @@ export type paths = { */ post: operations['notifications/test-notification']; }; + '/page-push': { + /** + * page-push + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + post: operations['page-push']; + }; '/pages/create': { /** * pages/create @@ -5832,46 +6182,25 @@ export type operations = { }; }; /** - * admin/emoji/list-remote + * admin/emoji/import-zip * @description No description provided. * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. * **Credential required**: *Yes* */ - 'admin/emoji/list-remote': { + 'admin/emoji/import-zip': { requestBody: { content: { 'application/json': { - /** @default null */ - query?: string | null; - /** - * @description Use `null` to represent the local host. - * @default null - */ - host?: string | null; - /** @default 10 */ - limit?: number; - /** Format: misskey:id */ - sinceId?: string; /** Format: misskey:id */ - untilId?: string; + fileId: string; }; }; }; responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': ({ - /** Format: id */ - id: string; - aliases: string[]; - name: string; - category: string | null; - /** @description The local host is represented with `null`. */ - host: string | null; - url: string; - })[]; - }; + /** @description OK (without any results) */ + 204: { + content: never; }; /** @description Client error */ 400: { @@ -5906,17 +6235,22 @@ export type operations = { }; }; /** - * admin/emoji/list + * admin/emoji/list-remote * @description No description provided. * * **Credential required**: *Yes* */ - 'admin/emoji/list': { + 'admin/emoji/list-remote': { requestBody: { content: { 'application/json': { /** @default null */ query?: string | null; + /** + * @description Use `null` to represent the local host. + * @default null + */ + host?: string | null; /** @default 10 */ limit?: number; /** Format: misskey:id */ @@ -5936,7 +6270,7 @@ export type operations = { aliases: string[]; name: string; category: string | null; - /** @description The local host is represented with `null`. The field exists for compatibility with other API endpoints that return files. */ + /** @description The local host is represented with `null`. */ host: string | null; url: string; })[]; @@ -5975,12 +6309,81 @@ export type operations = { }; }; /** - * admin/emoji/remove-aliases-bulk + * admin/emoji/list * @description No description provided. * * **Credential required**: *Yes* */ - 'admin/emoji/remove-aliases-bulk': { + 'admin/emoji/list': { + requestBody: { + content: { + 'application/json': { + /** @default null */ + query?: string | null; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': ({ + /** Format: id */ + id: string; + aliases: string[]; + name: string; + category: string | null; + /** @description The local host is represented with `null`. The field exists for compatibility with other API endpoints that return files. */ + host: string | null; + url: string; + })[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * admin/emoji/remove-aliases-bulk + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'admin/emoji/remove-aliases-bulk': { requestBody: { content: { 'application/json': { @@ -9108,6 +9511,58 @@ export type operations = { }; }; }; + /** + * auth/accept + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'auth/accept': { + requestBody: { + content: { + 'application/json': { + token: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; /** * auth/session/generate * @description No description provided. @@ -12804,6 +13259,57 @@ export type operations = { }; }; }; + /** + * export-custom-emojis + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'export-custom-emojis': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; /** * federation/followers * @description No description provided. @@ -14667,17 +15173,17 @@ export type operations = { }; }; /** - * i/claim-achievement + * i/2fa/done * @description No description provided. * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. * **Credential required**: *Yes* */ - 'i/claim-achievement': { + 'i/2fa/done': { requestBody: { content: { 'application/json': { - /** @enum {string} */ - name: 'notes1' | 'notes10' | 'notes100' | 'notes500' | 'notes1000' | 'notes5000' | 'notes10000' | 'notes20000' | 'notes30000' | 'notes40000' | 'notes50000' | 'notes60000' | 'notes70000' | 'notes80000' | 'notes90000' | 'notes100000' | 'login3' | 'login7' | 'login15' | 'login30' | 'login60' | 'login100' | 'login200' | 'login300' | 'login400' | 'login500' | 'login600' | 'login700' | 'login800' | 'login900' | 'login1000' | 'passedSinceAccountCreated1' | 'passedSinceAccountCreated2' | 'passedSinceAccountCreated3' | 'loggedInOnBirthday' | 'loggedInOnNewYearsDay' | 'noteClipped1' | 'noteFavorited1' | 'myNoteFavorited1' | 'profileFilled' | 'markedAsCat' | 'following1' | 'following10' | 'following50' | 'following100' | 'following300' | 'followers1' | 'followers10' | 'followers50' | 'followers100' | 'followers300' | 'followers500' | 'followers1000' | 'collectAchievements30' | 'viewAchievements3min' | 'iLoveMisskey' | 'foundTreasure' | 'client30min' | 'client60min' | 'noteDeletedWithin1min' | 'postedAtLateNight' | 'postedAt0min0sec' | 'selfQuote' | 'htl20npm' | 'viewInstanceChart' | 'outputHelloWorldOnScratchpad' | 'open3windows' | 'driveFolderCircularReference' | 'reactWithoutRead' | 'clickedClickHere' | 'justPlainLucky' | 'setNameToSyuilo' | 'cookieClicked' | 'brainDiver' | 'smashTestNotificationButton' | 'tutorialCompleted'; + token: string; }; }; }; @@ -14719,30 +15225,27 @@ export type operations = { }; }; /** - * i/favorites + * i/2fa/key-done * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *read:favorites* + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* */ - 'i/favorites': { + 'i/2fa/key-done': { requestBody: { content: { 'application/json': { - /** @default 10 */ - limit?: number; - /** Format: misskey:id */ - sinceId?: string; - /** Format: misskey:id */ - untilId?: string; + password: string; + token?: string | null; + name: string; + credential: Record; }; }; }; responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': components['schemas']['NoteFavorite'][]; - }; + /** @description OK (without any results) */ + 204: { + content: never; }; /** @description Client error */ 400: { @@ -14777,34 +15280,24 @@ export type operations = { }; }; /** - * i/gallery/likes + * i/2fa/password-less * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *read:gallery-likes* + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* */ - 'i/gallery/likes': { + 'i/2fa/password-less': { requestBody: { content: { 'application/json': { - /** @default 10 */ - limit?: number; - /** Format: misskey:id */ - sinceId?: string; - /** Format: misskey:id */ - untilId?: string; + value: boolean; }; }; }; responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': { - /** Format: id */ - id: string; - post: components['schemas']['GalleryPost']; - }[]; - }; + /** @description OK (without any results) */ + 204: { + content: never; }; /** @description Client error */ 400: { @@ -14839,30 +15332,25 @@ export type operations = { }; }; /** - * i/gallery/posts + * i/2fa/register-key * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *read:gallery* + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* */ - 'i/gallery/posts': { + 'i/2fa/register-key': { requestBody: { content: { 'application/json': { - /** @default 10 */ - limit?: number; - /** Format: misskey:id */ - sinceId?: string; - /** Format: misskey:id */ - untilId?: string; + password: string; + token?: string | null; }; }; }; responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': components['schemas']['GalleryPost'][]; - }; + /** @description OK (without any results) */ + 204: { + content: never; }; /** @description Client error */ 400: { @@ -14897,34 +15385,1428 @@ export type operations = { }; }; /** - * i/notifications + * i/2fa/register * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *read:notifications* + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* */ - 'i/notifications': { + 'i/2fa/register': { requestBody: { content: { 'application/json': { - /** @default 10 */ - limit?: number; - /** Format: misskey:id */ - sinceId?: string; - /** Format: misskey:id */ - untilId?: string; - /** @default true */ - markAsRead?: boolean; - includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; - excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; + password: string; + token?: string | null; }; }; }; responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': components['schemas']['Notification'][]; - }; + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/2fa/update-key + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/2fa/update-key': { + requestBody: { + content: { + 'application/json': { + name: string; + credentialId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/2fa/remove-key + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/2fa/remove-key': { + requestBody: { + content: { + 'application/json': { + password: string; + token?: string | null; + credentialId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/2fa/unregister + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/2fa/unregister': { + requestBody: { + content: { + 'application/json': { + password: string; + token?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/apps + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/apps': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + sort?: '+createdAt' | '-createdAt' | '+lastUsedAt' | '-lastUsedAt'; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/authorized-apps + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/authorized-apps': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** @default 0 */ + offset?: number; + /** + * @default desc + * @enum {string} + */ + sort?: 'desc' | 'asc'; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/claim-achievement + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'i/claim-achievement': { + requestBody: { + content: { + 'application/json': { + /** @enum {string} */ + name: 'notes1' | 'notes10' | 'notes100' | 'notes500' | 'notes1000' | 'notes5000' | 'notes10000' | 'notes20000' | 'notes30000' | 'notes40000' | 'notes50000' | 'notes60000' | 'notes70000' | 'notes80000' | 'notes90000' | 'notes100000' | 'login3' | 'login7' | 'login15' | 'login30' | 'login60' | 'login100' | 'login200' | 'login300' | 'login400' | 'login500' | 'login600' | 'login700' | 'login800' | 'login900' | 'login1000' | 'passedSinceAccountCreated1' | 'passedSinceAccountCreated2' | 'passedSinceAccountCreated3' | 'loggedInOnBirthday' | 'loggedInOnNewYearsDay' | 'noteClipped1' | 'noteFavorited1' | 'myNoteFavorited1' | 'profileFilled' | 'markedAsCat' | 'following1' | 'following10' | 'following50' | 'following100' | 'following300' | 'followers1' | 'followers10' | 'followers50' | 'followers100' | 'followers300' | 'followers500' | 'followers1000' | 'collectAchievements30' | 'viewAchievements3min' | 'iLoveMisskey' | 'foundTreasure' | 'client30min' | 'client60min' | 'noteDeletedWithin1min' | 'postedAtLateNight' | 'postedAt0min0sec' | 'selfQuote' | 'htl20npm' | 'viewInstanceChart' | 'outputHelloWorldOnScratchpad' | 'open3windows' | 'driveFolderCircularReference' | 'reactWithoutRead' | 'clickedClickHere' | 'justPlainLucky' | 'setNameToSyuilo' | 'cookieClicked' | 'brainDiver' | 'smashTestNotificationButton' | 'tutorialCompleted'; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/change-password + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/change-password': { + requestBody: { + content: { + 'application/json': { + currentPassword: string; + newPassword: string; + token?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/delete-account + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/delete-account': { + requestBody: { + content: { + 'application/json': { + password: string; + token?: string | null; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/export-blocking + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/export-blocking': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/export-following + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/export-following': { + requestBody: { + content: { + 'application/json': { + /** @default false */ + excludeMuting?: boolean; + /** @default false */ + excludeInactive?: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/export-mute + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/export-mute': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/export-notes + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/export-notes': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/export-favorites + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/export-favorites': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/export-user-lists + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/export-user-lists': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/export-antennas + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/export-antennas': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/favorites + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:favorites* + */ + 'i/favorites': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['NoteFavorite'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/gallery/likes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:gallery-likes* + */ + 'i/gallery/likes': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** Format: id */ + id: string; + post: components['schemas']['GalleryPost']; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/gallery/posts + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:gallery* + */ + 'i/gallery/posts': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['GalleryPost'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/import-blocking + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/import-blocking': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + fileId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/import-following + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/import-following': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + fileId: string; + withReplies?: boolean; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/import-muting + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/import-muting': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + fileId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/import-user-lists + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/import-user-lists': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + fileId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/import-antennas + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/import-antennas': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + fileId: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/notifications + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:notifications* + */ + 'i/notifications': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default true */ + markAsRead?: boolean; + includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; + excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Notification'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/notifications-grouped + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:notifications* + */ + 'i/notifications-grouped': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default true */ + markAsRead?: boolean; + includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; + excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Notification'][]; + }; }; /** @description Client error */ 400: { @@ -14965,12 +16847,74 @@ export type operations = { }; }; /** - * i/notifications-grouped + * i/page-likes + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *read:page-likes* + */ + 'i/page-likes': { + requestBody: { + content: { + 'application/json': { + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + /** Format: id */ + id: string; + page: components['schemas']['Page']; + }[]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/pages * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *read:notifications* + * **Credential required**: *Yes* / **Permission**: *read:pages* */ - 'i/notifications-grouped': { + 'i/pages': { requestBody: { content: { 'application/json': { @@ -14980,10 +16924,6 @@ export type operations = { sinceId?: string; /** Format: misskey:id */ untilId?: string; - /** @default true */ - markAsRead?: boolean; - includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; - excludeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'achievementEarned' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; }; }; }; @@ -14991,7 +16931,7 @@ export type operations = { /** @description OK (with results) */ 200: { content: { - 'application/json': components['schemas']['Notification'][]; + 'application/json': components['schemas']['Page'][]; }; }; /** @description Client error */ @@ -15018,12 +16958,6 @@ export type operations = { 'application/json': components['schemas']['Error']; }; }; - /** @description To many requests */ - 429: { - content: { - 'application/json': components['schemas']['Error']; - }; - }; /** @description Internal server error */ 500: { content: { @@ -15033,21 +16967,17 @@ export type operations = { }; }; /** - * i/page-likes + * i/pin * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *read:page-likes* + * **Credential required**: *Yes* / **Permission**: *write:account* */ - 'i/page-likes': { + 'i/pin': { requestBody: { content: { 'application/json': { - /** @default 10 */ - limit?: number; - /** Format: misskey:id */ - sinceId?: string; /** Format: misskey:id */ - untilId?: string; + noteId: string; }; }; }; @@ -15055,11 +16985,7 @@ export type operations = { /** @description OK (with results) */ 200: { content: { - 'application/json': { - /** Format: id */ - id: string; - page: components['schemas']['Page']; - }[]; + 'application/json': components['schemas']['MeDetailed']; }; }; /** @description Client error */ @@ -15095,31 +17021,121 @@ export type operations = { }; }; /** - * i/pages + * i/read-all-unread-notes * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *read:pages* + * **Credential required**: *Yes* / **Permission**: *write:account* */ - 'i/pages': { + 'i/read-all-unread-notes': { + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/read-announcement + * @description No description provided. + * + * **Credential required**: *Yes* / **Permission**: *write:account* + */ + 'i/read-announcement': { requestBody: { content: { 'application/json': { - /** @default 10 */ - limit?: number; - /** Format: misskey:id */ - sinceId?: string; /** Format: misskey:id */ - untilId?: string; + announcementId: string; }; }; }; responses: { - /** @description OK (with results) */ - 200: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { content: { - 'application/json': components['schemas']['Page'][]; + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/regenerate-token + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/regenerate-token': { + requestBody: { + content: { + 'application/json': { + password: string; }; }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; /** @description Client error */ 400: { content: { @@ -15153,27 +17169,80 @@ export type operations = { }; }; /** - * i/pin + * i/registry/get-all * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *write:account* + * **Credential required**: *Yes* */ - 'i/pin': { + 'i/registry/get-all': { requestBody: { content: { 'application/json': { - /** Format: misskey:id */ - noteId: string; + /** @default [] */ + scope: string[]; + domain?: string | null; }; }; }; responses: { - /** @description OK (with results) */ - 200: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { content: { - 'application/json': components['schemas']['MeDetailed']; + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; + /** + * i/registry/get-detail + * @description No description provided. + * + * **Credential required**: *Yes* + */ + 'i/registry/get-detail': { + requestBody: { + content: { + 'application/json': { + key: string; + /** @default [] */ + scope: string[]; + domain?: string | null; }; }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; /** @description Client error */ 400: { content: { @@ -15207,12 +17276,22 @@ export type operations = { }; }; /** - * i/read-all-unread-notes + * i/registry/get * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *write:account* + * **Credential required**: *Yes* */ - 'i/read-all-unread-notes': { + 'i/registry/get': { + requestBody: { + content: { + 'application/json': { + key: string; + /** @default [] */ + scope: string[]; + domain?: string | null; + }; + }; + }; responses: { /** @description OK (without any results) */ 204: { @@ -15251,17 +17330,18 @@ export type operations = { }; }; /** - * i/read-announcement + * i/registry/keys-with-type * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *write:account* + * **Credential required**: *Yes* */ - 'i/read-announcement': { + 'i/registry/keys-with-type': { requestBody: { content: { 'application/json': { - /** Format: misskey:id */ - announcementId: string; + /** @default [] */ + scope: string[]; + domain?: string | null; }; }; }; @@ -15303,12 +17383,12 @@ export type operations = { }; }; /** - * i/registry/get-all + * i/registry/keys * @description No description provided. * * **Credential required**: *Yes* */ - 'i/registry/get-all': { + 'i/registry/keys': { requestBody: { content: { 'application/json': { @@ -15356,12 +17436,12 @@ export type operations = { }; }; /** - * i/registry/get-detail + * i/registry/remove * @description No description provided. * * **Credential required**: *Yes* */ - 'i/registry/get-detail': { + 'i/registry/remove': { requestBody: { content: { 'application/json': { @@ -15410,22 +17490,13 @@ export type operations = { }; }; /** - * i/registry/get + * i/registry/scopes-with-domain * @description No description provided. * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. * **Credential required**: *Yes* */ - 'i/registry/get': { - requestBody: { - content: { - 'application/json': { - key: string; - /** @default [] */ - scope: string[]; - domain?: string | null; - }; - }; - }; + 'i/registry/scopes-with-domain': { responses: { /** @description OK (without any results) */ 204: { @@ -15464,15 +17535,17 @@ export type operations = { }; }; /** - * i/registry/keys-with-type + * i/registry/set * @description No description provided. * * **Credential required**: *Yes* */ - 'i/registry/keys-with-type': { + 'i/registry/set': { requestBody: { content: { 'application/json': { + key: string; + value: unknown; /** @default [] */ scope: string[]; domain?: string | null; @@ -15517,18 +17590,19 @@ export type operations = { }; }; /** - * i/registry/keys + * i/revoke-token * @description No description provided. * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. * **Credential required**: *Yes* */ - 'i/registry/keys': { + 'i/revoke-token': { requestBody: { content: { 'application/json': { - /** @default [] */ - scope: string[]; - domain?: string | null; + /** Format: misskey:id */ + tokenId?: string; + token?: string | null; }; }; }; @@ -15570,26 +17644,31 @@ export type operations = { }; }; /** - * i/registry/remove + * i/signin-history * @description No description provided. * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. * **Credential required**: *Yes* */ - 'i/registry/remove': { + 'i/signin-history': { requestBody: { content: { 'application/json': { - key: string; - /** @default [] */ - scope: string[]; - domain?: string | null; + /** @default 10 */ + limit?: number; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; }; }; }; responses: { - /** @description OK (without any results) */ - 204: { - content: never; + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Signin'][]; + }; }; /** @description Client error */ 400: { @@ -15624,27 +17703,26 @@ export type operations = { }; }; /** - * i/registry/set + * i/unpin * @description No description provided. * - * **Credential required**: *Yes* + * **Credential required**: *Yes* / **Permission**: *write:account* */ - 'i/registry/set': { + 'i/unpin': { requestBody: { content: { 'application/json': { - key: string; - value: unknown; - /** @default [] */ - scope: string[]; - domain?: string | null; + /** Format: misskey:id */ + noteId: string; }; }; }; responses: { - /** @description OK (without any results) */ - 204: { - content: never; + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['MeDetailed']; + }; }; /** @description Client error */ 400: { @@ -15679,26 +17757,26 @@ export type operations = { }; }; /** - * i/unpin + * i/update-email * @description No description provided. * - * **Credential required**: *Yes* / **Permission**: *write:account* + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* */ - 'i/unpin': { + 'i/update-email': { requestBody: { content: { 'application/json': { - /** Format: misskey:id */ - noteId: string; + password: string; + email?: string | null; + token?: string | null; }; }; }; responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': components['schemas']['MeDetailed']; - }; + /** @description OK (without any results) */ + 204: { + content: never; }; /** @description Client error */ 400: { @@ -15724,6 +17802,12 @@ export type operations = { 'application/json': components['schemas']['Error']; }; }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; /** @description Internal server error */ 500: { content: { @@ -15834,6 +17918,64 @@ export type operations = { }; }; }; + /** + * i/move + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'i/move': { + requestBody: { + content: { + 'application/json': { + moveToAccount: string; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description To many requests */ + 429: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; /** * i/webhooks/create * @description No description provided. @@ -16526,6 +18668,66 @@ export type operations = { }; }; }; + /** + * miauth/gen-token + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'miauth/gen-token': { + requestBody: { + content: { + 'application/json': { + session: string | null; + name?: string | null; + description?: string | null; + iconUrl?: string | null; + permission: string[]; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': { + token: string; + }; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; /** * mute/create * @description No description provided. @@ -18926,6 +21128,61 @@ export type operations = { }; }; }; + /** + * page-push + * @description No description provided. + * + * **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties. + * **Credential required**: *Yes* + */ + 'page-push': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + pageId: string; + event: string; + var?: unknown; + }; + }; + }; + responses: { + /** @description OK (without any results) */ + 204: { + content: never; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; /** * pages/create * @description No description provided. -- cgit v1.2.3-freya From 06ca63f9c2816146d9b5fcc38f8877c3ee0313c1 Mon Sep 17 00:00:00 2001 From: Camilla Ett Date: Wed, 13 Dec 2023 08:14:34 +0900 Subject: Fix(backend): inboxJobPerSecのデフォルト値を16から32に (#12631) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/docker_example.yml | 22 +++++++++++----------- .config/example.yml | 2 +- .devcontainer/devcontainer.yml | 22 +++++++++++----------- chart/files/default.yml | 22 +++++++++++----------- .../backend/src/queue/QueueProcessorService.ts | 2 +- 5 files changed, 35 insertions(+), 35 deletions(-) (limited to 'packages/backend/src') diff --git a/.config/docker_example.yml b/.config/docker_example.yml index d1534486d3..acd169bf43 100644 --- a/.config/docker_example.yml +++ b/.config/docker_example.yml @@ -56,17 +56,17 @@ dbReplications: false # You can configure any number of replicas here #dbSlaves: # - -# host: -# port: -# db: -# user: -# pass: +# host: +# port: +# db: +# user: +# pass: # - -# host: -# port: -# db: -# user: -# pass: +# host: +# port: +# db: +# user: +# pass: # ┌─────────────────────┐ #───┘ Redis configuration └───────────────────────────────────── @@ -151,7 +151,7 @@ id: 'aidx' # Job rate limiter # deliverJobPerSec: 128 -# inboxJobPerSec: 16 +# inboxJobPerSec: 32 # Job attempts # deliverJobMaxAttempts: 12 diff --git a/.config/example.yml b/.config/example.yml index 481c615587..df423c2c83 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -166,7 +166,7 @@ id: 'aidx' # Job rate limiter #deliverJobPerSec: 128 -#inboxJobPerSec: 16 +#inboxJobPerSec: 32 #relashionshipJobPerSec: 64 # Job attempts diff --git a/.devcontainer/devcontainer.yml b/.devcontainer/devcontainer.yml index 3d57d1245d..7ea0929469 100644 --- a/.devcontainer/devcontainer.yml +++ b/.devcontainer/devcontainer.yml @@ -56,17 +56,17 @@ dbReplications: false # You can configure any number of replicas here #dbSlaves: # - -# host: -# port: -# db: -# user: -# pass: +# host: +# port: +# db: +# user: +# pass: # - -# host: -# port: -# db: -# user: -# pass: +# host: +# port: +# db: +# user: +# pass: # ┌─────────────────────┐ #───┘ Redis configuration └───────────────────────────────────── @@ -147,7 +147,7 @@ id: 'aidx' # Job rate limiter # deliverJobPerSec: 128 -# inboxJobPerSec: 16 +# inboxJobPerSec: 32 # Job attempts # deliverJobMaxAttempts: 12 diff --git a/chart/files/default.yml b/chart/files/default.yml index 87b2f677eb..4cc291e80a 100644 --- a/chart/files/default.yml +++ b/chart/files/default.yml @@ -77,17 +77,17 @@ dbReplications: false # You can configure any number of replicas here #dbSlaves: # - -# host: -# port: -# db: -# user: -# pass: +# host: +# port: +# db: +# user: +# pass: # - -# host: -# port: -# db: -# user: -# pass: +# host: +# port: +# db: +# user: +# pass: # ┌─────────────────────┐ #───┘ Redis configuration └───────────────────────────────────── @@ -167,7 +167,7 @@ id: "aidx" # Job rate limiter # deliverJobPerSec: 128 -# inboxJobPerSec: 16 +# inboxJobPerSec: 32 # Job attempts # deliverJobMaxAttempts: 12 diff --git a/packages/backend/src/queue/QueueProcessorService.ts b/packages/backend/src/queue/QueueProcessorService.ts index 5201bfed8e..ee081ccaad 100644 --- a/packages/backend/src/queue/QueueProcessorService.ts +++ b/packages/backend/src/queue/QueueProcessorService.ts @@ -226,7 +226,7 @@ export class QueueProcessorService implements OnApplicationShutdown { autorun: false, concurrency: this.config.inboxJobConcurrency ?? 16, limiter: { - max: this.config.inboxJobPerSec ?? 16, + max: this.config.inboxJobPerSec ?? 32, duration: 1000, }, settings: { -- cgit v1.2.3-freya From 5472f4b934c8ca8c702152a4a927b4ac94cf3fdb Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 13 Dec 2023 16:56:19 +0900 Subject: enhance: アイコンデコレーションを複数設定できるように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + locales/index.d.ts | 5 ++ locales/ja-JP.yml | 5 ++ packages/backend/src/core/RoleService.ts | 3 ++ packages/backend/src/models/json-schema/role.ts | 1 + packages/backend/src/models/json-schema/user.ts | 4 ++ .../backend/src/server/api/endpoints/i/update.ts | 10 ++-- packages/frontend/src/account.ts | 2 +- .../frontend/src/components/MkDrive.folder.vue | 9 ++-- packages/frontend/src/components/MkWindow.vue | 2 +- packages/frontend/src/components/global/MkA.vue | 2 +- .../frontend/src/components/global/MkAvatar.vue | 53 ++++++++-------------- packages/frontend/src/const.ts | 1 + packages/frontend/src/pages/admin/roles.editor.vue | 22 ++++++++- packages/frontend/src/pages/admin/roles.vue | 7 +++ .../settings/profile.avatar-decoration-dialog.vue | 11 +++-- packages/frontend/src/pages/settings/profile.vue | 39 ++++++++++++---- 17 files changed, 115 insertions(+), 62 deletions(-) (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d1434cde4..e5ff09edec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Feat: メールアドレスの認証にverifymail.ioを使えるように (cherry-pick from https://github.com/TeamNijimiss/misskey/commit/971ba07a44550f68d2ba31c62066db2d43a0caed) - Feat: モデレーターがユーザーのアイコンもしくはバナー画像を未設定状態にできる機能を追加 (cherry-pick from https://github.com/TeamNijimiss/misskey/commit/e0eb5a752f6e5616d6312bb7c9790302f9dbff83) - Feat: TL上からノートが見えなくなるワードミュートであるハードミュートを追加 +- Enhance: アイコンデコレーションを複数設定できるように - Fix: MFM `$[unixtime ]` に不正な値を入力した際に発生する各種エラーを修正 ### Client diff --git a/locales/index.d.ts b/locales/index.d.ts index 846a6d503d..d32023f5ac 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -264,6 +264,7 @@ export interface Locale { "removeAreYouSure": string; "deleteAreYouSure": string; "resetAreYouSure": string; + "areYouSure": string; "saved": string; "messaging": string; "upload": string; @@ -1160,6 +1161,7 @@ export interface Locale { "avatarDecorations": string; "attach": string; "detach": string; + "detachAll": string; "angle": string; "flip": string; "showAvatarDecorations": string; @@ -1173,6 +1175,7 @@ export interface Locale { "doReaction": string; "code": string; "reloadRequiredToApplySettings": string; + "remainingN": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; @@ -1701,6 +1704,7 @@ export interface Locale { "canHideAds": string; "canSearchNotes": string; "canUseTranslator": string; + "avatarDecorationLimit": string; }; "_condition": { "isLocal": string; @@ -2181,6 +2185,7 @@ export interface Locale { "changeAvatar": string; "changeBanner": string; "verifiedLinkDescription": string; + "avatarDecorationMax": string; }; "_exportOrImport": { "allNotes": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 0d84440bc8..2ac57fd311 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -261,6 +261,7 @@ removed: "削除しました" removeAreYouSure: "「{x}」を削除しますか?" deleteAreYouSure: "「{x}」を削除しますか?" resetAreYouSure: "リセットしますか?" +areYouSure: "よろしいですか?" saved: "保存しました" messaging: "チャット" upload: "アップロード" @@ -1157,6 +1158,7 @@ tosAndPrivacyPolicy: "利用規約・プライバシーポリシー" avatarDecorations: "アイコンデコレーション" attach: "付ける" detach: "外す" +detachAll: "全て外す" angle: "角度" flip: "反転" showAvatarDecorations: "アイコンのデコレーションを表示" @@ -1170,6 +1172,7 @@ cwNotationRequired: "「内容を隠す」がオンの場合は注釈の記述 doReaction: "リアクションする" code: "コード" reloadRequiredToApplySettings: "設定の反映にはリロードが必要です。" +remainingN: "残り: {n}" _announcement: forExistingUsers: "既存ユーザーのみ" @@ -1610,6 +1613,7 @@ _role: canHideAds: "広告の非表示" canSearchNotes: "ノート検索の利用" canUseTranslator: "翻訳機能の利用" + avatarDecorationLimit: "アイコンデコレーションの最大取付個数" _condition: isLocal: "ローカルユーザー" isRemote: "リモートユーザー" @@ -2084,6 +2088,7 @@ _profile: changeAvatar: "アイコン画像を変更" changeBanner: "バナー画像を変更" verifiedLinkDescription: "内容にURLを設定すると、リンク先のWebサイトに自分のプロフィールへのリンクが含まれている場合に所有者確認済みアイコンを表示させることができます。" + avatarDecorationMax: "最大{max}つまでデコレーションを付けられます。" _exportOrImport: allNotes: "全てのノート" diff --git a/packages/backend/src/core/RoleService.ts b/packages/backend/src/core/RoleService.ts index 29e48aa8ca..4de719d6a0 100644 --- a/packages/backend/src/core/RoleService.ts +++ b/packages/backend/src/core/RoleService.ts @@ -47,6 +47,7 @@ export type RolePolicies = { userListLimit: number; userEachUserListsLimit: number; rateLimitFactor: number; + avatarDecorationLimit: number; }; export const DEFAULT_POLICIES: RolePolicies = { @@ -73,6 +74,7 @@ export const DEFAULT_POLICIES: RolePolicies = { userListLimit: 10, userEachUserListsLimit: 50, rateLimitFactor: 1, + avatarDecorationLimit: 1, }; @Injectable() @@ -326,6 +328,7 @@ export class RoleService implements OnApplicationShutdown { userListLimit: calc('userListLimit', vs => Math.max(...vs)), userEachUserListsLimit: calc('userEachUserListsLimit', vs => Math.max(...vs)), rateLimitFactor: calc('rateLimitFactor', vs => Math.max(...vs)), + avatarDecorationLimit: calc('avatarDecorationLimit', vs => Math.max(...vs)), }; } diff --git a/packages/backend/src/models/json-schema/role.ts b/packages/backend/src/models/json-schema/role.ts index dd2f32b14d..b0c6804bb8 100644 --- a/packages/backend/src/models/json-schema/role.ts +++ b/packages/backend/src/models/json-schema/role.ts @@ -145,6 +145,7 @@ export const packedRoleSchema = { userEachUserListsLimit: rolePolicyValue, canManageAvatarDecorations: rolePolicyValue, canUseTranslator: rolePolicyValue, + avatarDecorationLimit: rolePolicyValue, }, }, usersCount: { diff --git a/packages/backend/src/models/json-schema/user.ts b/packages/backend/src/models/json-schema/user.ts index c6b2707b80..c6b96b85f0 100644 --- a/packages/backend/src/models/json-schema/user.ts +++ b/packages/backend/src/models/json-schema/user.ts @@ -672,6 +672,10 @@ export const packedMeDetailedOnlySchema = { type: 'number', nullable: false, optional: false, }, + avatarDecorationLimit: { + type: 'number', + nullable: false, optional: false, + }, }, }, //#region secrets diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index b045c01189..399e6b88cb 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -125,7 +125,7 @@ export const meta = { const muteWords = { type: 'array', items: { oneOf: [ { type: 'array', items: { type: 'string' } }, - { type: 'string' } + { type: 'string' }, ] } } as const; export const paramDef = { @@ -137,7 +137,7 @@ export const paramDef = { birthday: { ...birthdaySchema, nullable: true }, lang: { type: 'string', enum: [null, ...Object.keys(langmap)] as string[], nullable: true }, avatarId: { type: 'string', format: 'misskey:id', nullable: true }, - avatarDecorations: { type: 'array', maxItems: 1, items: { + avatarDecorations: { type: 'array', maxItems: 16, items: { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, @@ -251,7 +251,7 @@ export default class extends Endpoint { // eslint- function validateMuteWordRegex(mutedWords: (string[] | string)[]) { for (const mutedWord of mutedWords) { - if (typeof mutedWord !== "string") continue; + if (typeof mutedWord !== 'string') continue; const regexp = mutedWord.match(/^\/(.+)\/(.*)$/); if (!regexp) throw new ApiError(meta.errors.invalidRegexp); @@ -329,12 +329,14 @@ export default class extends Endpoint { // eslint- if (ps.avatarDecorations) { const decorations = await this.avatarDecorationService.getAll(true); - const myRoles = await this.roleService.getUserRoles(user.id); + const [myRoles, myPolicies] = await Promise.all([this.roleService.getUserRoles(user.id), this.roleService.getUserPolicies(user.id)]); const allRoles = await this.roleService.getRoles(); const decorationIds = decorations .filter(d => d.roleIdsThatCanBeUsedThisDecoration.filter(roleId => allRoles.some(r => r.id === roleId)).length === 0 || myRoles.some(r => d.roleIdsThatCanBeUsedThisDecoration.includes(r.id))) .map(d => d.id); + if (ps.avatarDecorations.length > myPolicies.avatarDecorationLimit) throw new ApiError(meta.errors.restrictedByRole); + updates.avatarDecorations = ps.avatarDecorations.filter(d => decorationIds.includes(d.id)).map(d => ({ id: d.id, angle: d.angle ?? 0, diff --git a/packages/frontend/src/account.ts b/packages/frontend/src/account.ts index 0e4e4b50ff..a6af298024 100644 --- a/packages/frontend/src/account.ts +++ b/packages/frontend/src/account.ts @@ -284,7 +284,7 @@ export async function openAccountMenu(opts: { text: i18n.ts.profile, to: `/@${ $i.username }`, avatar: $i, - }, null, ...(opts.includeCurrentAccount ? [createItem($i)] : []), ...accountItemPromises, { + }, { type: 'divider' }, ...(opts.includeCurrentAccount ? [createItem($i)] : []), ...accountItemPromises, { type: 'parent' as const, icon: 'ti ti-plus', text: i18n.ts.addAccount, diff --git a/packages/frontend/src/components/MkDrive.folder.vue b/packages/frontend/src/components/MkDrive.folder.vue index 5322664664..b0c14d1f0b 100644 --- a/packages/frontend/src/components/MkDrive.folder.vue +++ b/packages/frontend/src/components/MkDrive.folder.vue @@ -39,6 +39,7 @@ import { i18n } from '@/i18n.js'; import { defaultStore } from '@/store.js'; import { claimAchievement } from '@/scripts/achievements.js'; import copyToClipboard from '@/scripts/copy-to-clipboard.js'; +import { MenuItem } from '@/types/menu.js'; const props = withDefaults(defineProps<{ folder: Misskey.entities.DriveFolder; @@ -250,7 +251,7 @@ function setAsUploadFolder() { } function onContextmenu(ev: MouseEvent) { - let menu; + let menu: MenuItem[]; menu = [{ text: i18n.ts.openInWindow, icon: 'ti ti-app-window', @@ -260,18 +261,18 @@ function onContextmenu(ev: MouseEvent) { }, { }, 'closed'); }, - }, null, { + }, { type: 'divider' }, { text: i18n.ts.rename, icon: 'ti ti-forms', action: rename, - }, null, { + }, { type: 'divider' }, { text: i18n.ts.delete, icon: 'ti ti-trash', danger: true, action: deleteFolder, }]; if (defaultStore.state.devMode) { - menu = menu.concat([null, { + menu = menu.concat([{ type: 'divider' }, { icon: 'ti ti-id', text: i18n.ts.copyFolderId, action: () => { diff --git a/packages/frontend/src/components/MkWindow.vue b/packages/frontend/src/components/MkWindow.vue index 1150a29e03..7c8ffcccf9 100644 --- a/packages/frontend/src/components/MkWindow.vue +++ b/packages/frontend/src/components/MkWindow.vue @@ -56,7 +56,7 @@ SPDX-License-Identifier: AGPL-3.0-only import { onBeforeUnmount, onMounted, provide, shallowRef, ref } from 'vue'; import contains from '@/scripts/contains.js'; import * as os from '@/os.js'; -import { MenuItem } from '@/types/menu'; +import { MenuItem } from '@/types/menu.js'; import { i18n } from '@/i18n.js'; import { defaultStore } from '@/store.js'; diff --git a/packages/frontend/src/components/global/MkA.vue b/packages/frontend/src/components/global/MkA.vue index 809dae421a..5552e96ee0 100644 --- a/packages/frontend/src/components/global/MkA.vue +++ b/packages/frontend/src/components/global/MkA.vue @@ -57,7 +57,7 @@ function onContextmenu(ev) { action: () => { router.push(props.to, 'forcePage'); }, - }, null, { + }, { type: 'divider' }, { icon: 'ti ti-external-link', text: i18n.ts.openInNewTab, action: () => { diff --git a/packages/frontend/src/components/global/MkAvatar.vue b/packages/frontend/src/components/global/MkAvatar.vue index c7e50e275a..6aa9a42037 100644 --- a/packages/frontend/src/components/global/MkAvatar.vue +++ b/packages/frontend/src/components/global/MkAvatar.vue @@ -23,16 +23,18 @@ SPDX-License-Identifier: AGPL-3.0-only
- + @@ -57,19 +59,14 @@ const props = withDefaults(defineProps<{ link?: boolean; preview?: boolean; indicator?: boolean; - decoration?: { - url: string; - angle?: number; - flipH?: boolean; - flipV?: boolean; - }; + decorations?: Misskey.entities.UserDetailed['avatarDecorations'][number][]; forceShowDecoration?: boolean; }>(), { target: null, link: false, preview: false, indicator: false, - decoration: undefined, + decorations: undefined, forceShowDecoration: false, }); @@ -92,27 +89,13 @@ function onClick(ev: MouseEvent): void { emit('click', ev); } -function getDecorationAngle() { - let angle; - if (props.decoration) { - angle = props.decoration.angle ?? 0; - } else if (props.user.avatarDecorations.length > 0) { - angle = props.user.avatarDecorations[0].angle ?? 0; - } else { - angle = 0; - } +function getDecorationAngle(decoration: Misskey.entities.UserDetailed['avatarDecorations'][number]) { + const angle = decoration.angle ?? 0; return angle === 0 ? undefined : `${angle * 360}deg`; } -function getDecorationScale() { - let scaleX; - if (props.decoration) { - scaleX = props.decoration.flipH ? -1 : 1; - } else if (props.user.avatarDecorations.length > 0) { - scaleX = props.user.avatarDecorations[0].flipH ? -1 : 1; - } else { - scaleX = 1; - } +function getDecorationScale(decoration: Misskey.entities.UserDetailed['avatarDecorations'][number]) { + const scaleX = decoration.flipH ? -1 : 1; return scaleX === 1 ? undefined : `${scaleX} 1`; } diff --git a/packages/frontend/src/const.ts b/packages/frontend/src/const.ts index 397f804822..f016b7aa02 100644 --- a/packages/frontend/src/const.ts +++ b/packages/frontend/src/const.ts @@ -81,6 +81,7 @@ export const ROLE_POLICIES = [ 'userListLimit', 'userEachUserListsLimit', 'rateLimitFactor', + 'avatarDecorationLimit', ] as const; // なんか動かない diff --git a/packages/frontend/src/pages/admin/roles.editor.vue b/packages/frontend/src/pages/admin/roles.editor.vue index a8e0e8bbd1..5ded8d6931 100644 --- a/packages/frontend/src/pages/admin/roles.editor.vue +++ b/packages/frontend/src/pages/admin/roles.editor.vue @@ -531,6 +531,26 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + +
+ + + + + + + + + +
+
@@ -549,7 +569,7 @@ import MkSwitch from '@/components/MkSwitch.vue'; import MkRange from '@/components/MkRange.vue'; import FormSlot from '@/components/form/slot.vue'; import { i18n } from '@/i18n.js'; -import { ROLE_POLICIES } from '@/const'; +import { ROLE_POLICIES } from '@/const.js'; import { instance } from '@/instance.js'; import { deepClone } from '@/scripts/clone.js'; diff --git a/packages/frontend/src/pages/admin/roles.vue b/packages/frontend/src/pages/admin/roles.vue index db4595b150..1bb91a0a5b 100644 --- a/packages/frontend/src/pages/admin/roles.vue +++ b/packages/frontend/src/pages/admin/roles.vue @@ -192,6 +192,13 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + + + {{ i18n.ts.save }} diff --git a/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue b/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue index 4d571bc9ba..c27a21217b 100644 --- a/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue +++ b/packages/frontend/src/pages/settings/profile.avatar-decoration-dialog.vue @@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ decoration.name }}
- +
@@ -54,6 +54,7 @@ const props = defineProps<{ decoration: { id: string; url: string; + name: string; } }>(); @@ -77,18 +78,18 @@ async function attach() { flipH: flipH.value, }; await os.apiWithDialog('i/update', { - avatarDecorations: [decoration], + avatarDecorations: [...$i.avatarDecorations, decoration], }); - $i.avatarDecorations = [decoration]; + $i.avatarDecorations = [...$i.avatarDecorations, decoration]; dialog.value.close(); } async function detach() { await os.apiWithDialog('i/update', { - avatarDecorations: [], + avatarDecorations: $i.avatarDecorations.filter(x => x.id !== props.decoration.id), }); - $i.avatarDecorations = []; + $i.avatarDecorations = $i.avatarDecorations.filter(x => x.id !== props.decoration.id); dialog.value.close(); } diff --git a/packages/frontend/src/pages/settings/profile.vue b/packages/frontend/src/pages/settings/profile.vue index ba75b539e1..a5d3835b93 100644 --- a/packages/frontend/src/pages/settings/profile.vue +++ b/packages/frontend/src/pages/settings/profile.vue @@ -87,16 +87,22 @@ SPDX-License-Identifier: AGPL-3.0-only -
-
-
{{ avatarDecoration.name }}
- - +
+ {{ i18n.t('_profile.avatarDecorationMax', { max: $i?.policies.avatarDecorationLimit }) }} ({{ i18n.t('remainingN', { n: $i?.policies.avatarDecorationLimit - $i.avatarDecorations.length }) }}) + + {{ i18n.ts.detachAll }} + +
+
+
{{ avatarDecoration.name }}
+ + +
@@ -273,6 +279,19 @@ function openDecoration(avatarDecoration) { }, {}, 'closed'); } +function detachAllDecorations() { + os.confirm({ + type: 'warning', + text: i18n.ts.areYouSure, + }).then(async ({ canceled }) => { + if (canceled) return; + await os.apiWithDialog('i/update', { + avatarDecorations: [], + }); + $i.avatarDecorations = []; + }); +} + const headerActions = computed(() => []); const headerTabs = computed(() => []); -- cgit v1.2.3-freya From 37820ad57216048964edd98232630e311e51ed0f Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 13 Dec 2023 18:31:32 +0900 Subject: fix(backend): モデレーションログがモデレーターは閲覧できないように修正 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #12622 --- CHANGELOG.md | 1 + packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/backend/src') diff --git a/CHANGELOG.md b/CHANGELOG.md index e5ff09edec..84a6ce35ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ - Fix: チャンネルのノート一覧にてインスタンスミュートが効かない問題 - Fix: 「みつける」が年越し時に壊れる問題を修正 - Fix: アカウントをブロックした際に、自身のユーザーのページでノートが相手に表示される問題を修正 +- Fix: モデレーションログがモデレーターは閲覧できないように修正 ## 2023.11.1 diff --git a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts index f87a5a3574..34c247343a 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts @@ -14,7 +14,7 @@ export const meta = { tags: ['admin'], requireCredential: true, - requireModerator: true, + requireAdmin: true, res: { type: 'array', -- cgit v1.2.3-freya From aedc1d0ee958f4ae31a56844643b6f54e4d6301c Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 14 Dec 2023 13:22:12 +0900 Subject: update deps --- package.json | 4 +- packages/backend/package.json | 12 +- packages/backend/src/server/web/views/base.pug | 2 +- packages/frontend/.storybook/preview-head.html | 2 +- packages/frontend/package.json | 18 +- packages/misskey-js/package.json | 4 +- packages/sw/package.json | 2 +- pnpm-lock.yaml | 526 ++++++++++--------------- 8 files changed, 239 insertions(+), 331 deletions(-) (limited to 'packages/backend/src') diff --git a/package.json b/package.json index 8e96a07cd3..b0a5e137b8 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "typescript": "5.3.3" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "6.13.2", - "@typescript-eslint/parser": "6.13.2", + "@typescript-eslint/eslint-plugin": "6.14.0", + "@typescript-eslint/parser": "6.14.0", "cross-env": "7.0.3", "cypress": "13.6.1", "eslint": "8.55.0", diff --git a/packages/backend/package.json b/packages/backend/package.json index 85bdfbebf4..c68966de44 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -89,7 +89,7 @@ "bcryptjs": "2.4.3", "blurhash": "2.0.5", "body-parser": "1.20.2", - "bullmq": "4.15.2", + "bullmq": "4.15.3", "cacheable-lookup": "7.0.0", "cbor": "9.0.1", "chalk": "5.3.0", @@ -100,7 +100,7 @@ "content-disposition": "0.5.4", "date-fns": "2.30.0", "deep-email-validator": "0.1.21", - "fastify": "4.24.3", + "fastify": "4.25.0", "fastify-raw-body": "4.3.0", "feed": "4.2.2", "file-type": "18.7.0", @@ -148,7 +148,7 @@ "ratelimiter": "3.4.1", "re2": "1.20.9", "redis-lock": "0.1.4", - "reflect-metadata": "0.1.14", + "reflect-metadata": "0.2.0", "rename": "1.0.4", "rss-parser": "3.13.0", "rxjs": "7.8.1", @@ -171,7 +171,7 @@ "ulid": "2.3.0", "vary": "1.1.2", "web-push": "3.6.6", - "ws": "8.14.2", + "ws": "8.15.1", "xev": "3.0.2" }, "devDependencies": { @@ -217,8 +217,8 @@ "@types/vary": "1.1.3", "@types/web-push": "3.6.3", "@types/ws": "8.5.10", - "@typescript-eslint/eslint-plugin": "6.13.2", - "@typescript-eslint/parser": "6.13.2", + "@typescript-eslint/eslint-plugin": "6.14.0", + "@typescript-eslint/parser": "6.14.0", "aws-sdk-client-mock": "3.0.0", "cross-env": "7.0.3", "eslint": "8.55.0", diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index 2cb3fd4738..d167afe1e8 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -36,7 +36,7 @@ html link(rel='prefetch' href=infoImageUrl) link(rel='prefetch' href=notFoundImageUrl) //- https://github.com/misskey-dev/misskey/issues/9842 - link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.37.0') + link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.44.0') link(rel='modulepreload' href=`/vite/${clientEntry.file}`) if !config.clientManifestExists diff --git a/packages/frontend/.storybook/preview-head.html b/packages/frontend/.storybook/preview-head.html index 36ff34b48a..30f3ebfb64 100644 --- a/packages/frontend/.storybook/preview-head.html +++ b/packages/frontend/.storybook/preview-head.html @@ -1,6 +1,6 @@ - +