From 865458989f9ddacc38d1bb3743a41ea828dbf324 Mon Sep 17 00:00:00 2001 From: zyoshoka Date: Sat, 13 Jan 2024 13:23:31 +0900 Subject: [PATCH] =?UTF-8?q?fix(misskey-js):=20`build-misskey-js-with-types?= =?UTF-8?q?`=E6=99=82=E3=81=AF`api.json`=E3=81=AEGET=E3=82=92=E3=82=B9?= =?UTF-8?q?=E3=82=AD=E3=83=83=E3=83=97=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- packages/backend/generate_api_json.js | 11 +- .../src/server/api/openapi/gen-spec.ts | 9 +- .../misskey-js/src/autogen/apiClientJSDoc.ts | 2 +- 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 | 1719 +---------------- 8 files changed, 16 insertions(+), 1733 deletions(-) diff --git a/package.json b/package.json index 49de5a5efd..a982da97be 100644 --- a/package.json +++ b/package.json @@ -18,7 +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 && pnpm --filter misskey-js api", + "build-misskey-js-with-types": "pnpm --filter backend build && pnpm --filter backend generate-api-json --skip-get && ncp packages/backend/built/api-get-skipped.json packages/misskey-js/generator/api.json && pnpm --filter misskey-js update-autogen-code && pnpm --filter misskey-js build && pnpm --filter misskey-js api", "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", diff --git a/packages/backend/generate_api_json.js b/packages/backend/generate_api_json.js index 5819c60a5f..1e74b90788 100644 --- a/packages/backend/generate_api_json.js +++ b/packages/backend/generate_api_json.js @@ -1,8 +1,13 @@ import { loadConfig } from './built/config.js' import { genOpenapiSpec } from './built/server/api/openapi/gen-spec.js' -import { writeFileSync } from "node:fs"; +import { writeFileSync } from 'node:fs'; +import { argv } from 'node:process'; + +const skipGet = argv.includes('--skip-get'); const config = loadConfig(); -const spec = genOpenapiSpec(config); +const spec = genOpenapiSpec(config, skipGet); -writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8'); \ No newline at end of file +const path = `./built/api${skipGet ? '-get-skipped' : ''}.json`; + +writeFileSync(path, JSON.stringify(spec), 'utf-8'); diff --git a/packages/backend/src/server/api/openapi/gen-spec.ts b/packages/backend/src/server/api/openapi/gen-spec.ts index 3ed8a4e727..eb147f6f23 100644 --- a/packages/backend/src/server/api/openapi/gen-spec.ts +++ b/packages/backend/src/server/api/openapi/gen-spec.ts @@ -8,7 +8,7 @@ import endpoints, { IEndpoint } from '../endpoints.js'; import { errors as basicErrors } from './errors.js'; import { schemas, convertSchemaToOpenApiSchema } from './schemas.js'; -export function genOpenapiSpec(config: Config) { +export function genOpenapiSpec(config: Config, skipGet = false) { const spec = { openapi: '3.1.0', @@ -210,12 +210,7 @@ export function genOpenapiSpec(config: Config) { }; spec.paths['/' + endpoint.name] = { - ...(endpoint.meta.allowGet ? { - get: { - ...info, - operationId: 'get/' + endpoint.name, - }, - } : {}), + ...(!skipGet && endpoint.meta.allowGet ? { get: info } : {}), post: info, }; } diff --git a/packages/misskey-js/src/autogen/apiClientJSDoc.ts b/packages/misskey-js/src/autogen/apiClientJSDoc.ts index 4730f7b9d5..dd36b8358d 100644 --- a/packages/misskey-js/src/autogen/apiClientJSDoc.ts +++ b/packages/misskey-js/src/autogen/apiClientJSDoc.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.2 - * generatedAt: 2024-01-13T02:47:41.647Z + * generatedAt: 2024-01-13T04:19:51.712Z */ import type { SwitchCaseResponseType } from '../api.js'; diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index 4ce8830a5d..10244ffc3f 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.2 - * generatedAt: 2024-01-13T02:47:41.642Z + * generatedAt: 2024-01-13T04:19:51.705Z */ import type { diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index e7e09f3804..e9af21ba3f 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.2 - * generatedAt: 2024-01-13T02:47:41.639Z + * generatedAt: 2024-01-13T04:19:51.701Z */ import { operations } from './types.js'; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index e9b3a84e0d..74e2fab2f6 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.2 - * generatedAt: 2024-01-13T02:47:41.637Z + * generatedAt: 2024-01-13T04:19:51.699Z */ import { components } from './types.js'; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 98eea60c83..5b49e4de2d 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -3,7 +3,7 @@ /* * version: 2023.12.2 - * generatedAt: 2024-01-13T02:47:41.482Z + * generatedAt: 2024-01-13T04:19:51.566Z */ /** @@ -983,13 +983,6 @@ export type paths = { post: operations['channels/search']; }; '/charts/active-users': { - /** - * charts/active-users - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/active-users']; /** * charts/active-users * @description No description provided. @@ -999,13 +992,6 @@ export type paths = { post: operations['charts/active-users']; }; '/charts/ap-request': { - /** - * charts/ap-request - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/ap-request']; /** * charts/ap-request * @description No description provided. @@ -1015,13 +1001,6 @@ export type paths = { post: operations['charts/ap-request']; }; '/charts/drive': { - /** - * charts/drive - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/drive']; /** * charts/drive * @description No description provided. @@ -1031,13 +1010,6 @@ export type paths = { post: operations['charts/drive']; }; '/charts/federation': { - /** - * charts/federation - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/federation']; /** * charts/federation * @description No description provided. @@ -1047,13 +1019,6 @@ export type paths = { post: operations['charts/federation']; }; '/charts/instance': { - /** - * charts/instance - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/instance']; /** * charts/instance * @description No description provided. @@ -1063,13 +1028,6 @@ export type paths = { post: operations['charts/instance']; }; '/charts/notes': { - /** - * charts/notes - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/notes']; /** * charts/notes * @description No description provided. @@ -1079,13 +1037,6 @@ export type paths = { post: operations['charts/notes']; }; '/charts/user/drive': { - /** - * charts/user/drive - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/user/drive']; /** * charts/user/drive * @description No description provided. @@ -1095,13 +1046,6 @@ export type paths = { post: operations['charts/user/drive']; }; '/charts/user/following': { - /** - * charts/user/following - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/user/following']; /** * charts/user/following * @description No description provided. @@ -1111,13 +1055,6 @@ export type paths = { post: operations['charts/user/following']; }; '/charts/user/notes': { - /** - * charts/user/notes - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/user/notes']; /** * charts/user/notes * @description No description provided. @@ -1127,13 +1064,6 @@ export type paths = { post: operations['charts/user/notes']; }; '/charts/user/pv': { - /** - * charts/user/pv - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/user/pv']; /** * charts/user/pv * @description No description provided. @@ -1143,13 +1073,6 @@ export type paths = { post: operations['charts/user/pv']; }; '/charts/user/reactions': { - /** - * charts/user/reactions - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/user/reactions']; /** * charts/user/reactions * @description No description provided. @@ -1159,13 +1082,6 @@ export type paths = { post: operations['charts/user/reactions']; }; '/charts/users': { - /** - * charts/users - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/charts/users']; /** * charts/users * @description No description provided. @@ -1491,13 +1407,6 @@ export type paths = { post: operations['federation/following']; }; '/federation/instances': { - /** - * federation/instances - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/federation/instances']; /** * federation/instances * @description No description provided. @@ -1534,13 +1443,6 @@ export type paths = { post: operations['federation/users']; }; '/federation/stats': { - /** - * federation/stats - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/federation/stats']; /** * federation/stats * @description No description provided. @@ -1712,13 +1614,6 @@ export type paths = { post: operations['gallery/posts/update']; }; '/get-online-users-count': { - /** - * get-online-users-count - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/get-online-users-count']; /** * get-online-users-count * @description No description provided. @@ -1764,13 +1659,6 @@ export type paths = { post: operations['hashtags/show']; }; '/hashtags/trend': { - /** - * hashtags/trend - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/hashtags/trend']; /** * hashtags/trend * @description No description provided. @@ -2378,13 +2266,6 @@ export type paths = { post: operations['meta']; }; '/emojis': { - /** - * emojis - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/emojis']; /** * emojis * @description No description provided. @@ -2394,13 +2275,6 @@ export type paths = { post: operations['emojis']; }; '/emoji': { - /** - * emoji - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/emoji']; /** * emoji * @description No description provided. @@ -2555,13 +2429,6 @@ export type paths = { post: operations['notes/favorites/delete']; }; '/notes/featured': { - /** - * notes/featured - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/notes/featured']; /** * notes/featured * @description No description provided. @@ -2625,13 +2492,6 @@ export type paths = { post: operations['notes/polls/vote']; }; '/notes/reactions': { - /** - * notes/reactions - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/notes/reactions']; /** * notes/reactions * @description No description provided. @@ -3038,13 +2898,6 @@ export type paths = { post: operations['reset-password']; }; '/server-info': { - /** - * server-info - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/server-info']; /** * server-info * @description No description provided. @@ -3174,13 +3027,6 @@ export type paths = { post: operations['users/get-frequently-replied-users']; }; '/users/featured-notes': { - /** - * users/featured-notes - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/users/featured-notes']; /** * users/featured-notes * @description No description provided. @@ -3406,13 +3252,6 @@ export type paths = { post: operations['users/update-memo']; }; '/fetch-rss': { - /** - * fetch-rss - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/fetch-rss']; /** * fetch-rss * @description No description provided. @@ -3432,13 +3271,6 @@ export type paths = { post: operations['fetch-external-resources']; }; '/retention': { - /** - * retention - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/retention']; /** * retention * @description No description provided. @@ -3457,13 +3289,6 @@ export type paths = { post: operations['bubble-game/register']; }; '/bubble-game/ranking': { - /** - * bubble-game/ranking - * @description No description provided. - * - * **Credential required**: *No* - */ - get: operations['get/bubble-game/ranking']; /** * bubble-game/ranking * @description No description provided. @@ -10743,74 +10568,6 @@ export type operations = { }; }; }; - /** - * charts/active-users - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/active-users * @description No description provided. @@ -10879,68 +10636,6 @@ export type operations = { }; }; }; - /** - * charts/ap-request - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/ap-request * @description No description provided. @@ -11003,73 +10698,6 @@ export type operations = { }; }; }; - /** - * charts/drive - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/drive * @description No description provided. @@ -11137,73 +10765,6 @@ export type operations = { }; }; }; - /** - * charts/federation - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/federation * @description No description provided. @@ -11271,90 +10832,6 @@ export type operations = { }; }; }; - /** - * charts/instance - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/instance * @description No description provided. @@ -11439,79 +10916,6 @@ export type operations = { }; }; }; - /** - * charts/notes - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/notes * @description No description provided. @@ -11585,73 +10989,6 @@ export type operations = { }; }; }; - /** - * charts/user/drive - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/drive * @description No description provided. @@ -11719,79 +11056,6 @@ export type operations = { }; }; }; - /** - * charts/user/following - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/following * @description No description provided. @@ -11865,74 +11129,6 @@ export type operations = { }; }; }; - /** - * charts/user/notes - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/notes * @description No description provided. @@ -12001,71 +11197,6 @@ export type operations = { }; }; }; - /** - * charts/user/pv - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/pv * @description No description provided. @@ -12131,69 +11262,6 @@ export type operations = { }; }; }; - /** - * charts/user/reactions - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/user/reactions * @description No description provided. @@ -12257,71 +11325,6 @@ export type operations = { }; }; }; - /** - * charts/users - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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']; - }; - }; - }; - }; /** * charts/users * @description No description provided. @@ -14365,73 +13368,6 @@ export type operations = { }; }; }; - /** - * federation/instances - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/instances * @description No description provided. @@ -14667,65 +13603,6 @@ export type operations = { }; }; }; - /** - * federation/stats - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/federation/stats': { - requestBody: { - content: { - 'application/json': { - /** @default 10 */ - limit?: number; - }; - }; - }; - responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': { - topSubInstances: components['schemas']['FederationInstance'][]; - otherFollowersCount: number; - topPubInstances: components['schemas']['FederationInstance'][]; - otherFollowingCount: 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']; - }; - }; - }; - }; /** * federation/stats * @description No description provided. @@ -15807,54 +14684,6 @@ export type operations = { }; }; }; - /** - * get-online-users-count - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/get-online-users-count': { - responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': { - 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']; - }; - }; - }; - }; /** * get-online-users-count * @description No description provided. @@ -16131,56 +14960,6 @@ export type operations = { }; }; }; - /** - * hashtags/trend - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/trend * @description No description provided. @@ -19935,54 +18714,6 @@ export type operations = { }; }; }; - /** - * emojis - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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']; - }; - }; - }; - }; /** * emojis * @description No description provided. @@ -20031,59 +18762,6 @@ export type operations = { }; }; }; - /** - * emoji - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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']; - }; - }; - }; - }; /** * emoji * @description No description provided. @@ -21090,64 +19768,6 @@ export type operations = { }; }; }; - /** - * notes/featured - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/featured * @description No description provided. @@ -21582,67 +20202,6 @@ export type operations = { }; }; }; - /** - * notes/reactions - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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 * @description No description provided. @@ -24213,65 +22772,6 @@ export type operations = { }; }; }; - /** - * server-info - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/server-info': { - responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': { - machine: string; - cpu: { - model: string; - cores: number; - }; - mem: { - total: number; - }; - fs: { - total: number; - used: 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']; - }; - }; - }; - }; /** * server-info * @description No description provided. @@ -25124,64 +23624,6 @@ export type operations = { }; }; }; - /** - * users/featured-notes - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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/featured-notes * @description No description provided. @@ -26639,61 +25081,6 @@ export type operations = { }; }; }; - /** - * fetch-rss - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/fetch-rss': { - requestBody: { - content: { - 'application/json': { - url: string; - }; - }; - }; - responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': { - items: 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']; - }; - }; - }; - }; /** * fetch-rss * @description No description provided. @@ -26813,52 +25200,6 @@ export type operations = { }; }; }; - /** - * retention - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/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']; - }; - }; - }; - }; /** * retention * @description No description provided. @@ -26968,64 +25309,6 @@ export type operations = { }; }; }; - /** - * bubble-game/ranking - * @description No description provided. - * - * **Credential required**: *No* - */ - 'get/bubble-game/ranking': { - requestBody: { - content: { - 'application/json': { - gameMode: string; - }; - }; - }; - responses: { - /** @description OK (with results) */ - 200: { - content: { - 'application/json': { - /** Format: misskey:id */ - id: string; - score: number; - user: 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']; - }; - }; - }; - }; /** * bubble-game/ranking * @description No description provided.