From fd8f8162e186981ca2acf9d3b1caef523c748691 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 19 Feb 2022 23:21:28 +0900 Subject: [PATCH 01/10] =?UTF-8?q?SchemaType=E3=81=AE=E5=9E=8B=E8=A8=88?= =?UTF-8?q?=E7=AE=97=E9=87=8F=E3=82=92=E5=89=8A=E6=B8=9B=20(#8332)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * schema typeの型計算量を削減 * reduce some type error * wip * fix * clean up * more shrink --- packages/backend/src/misc/schema.ts | 47 ++++++------------- .../backend/src/models/repositories/app.ts | 2 +- .../endpoints/admin/announcements/create.ts | 2 +- .../server/api/endpoints/i/gallery/likes.ts | 28 ++++++----- .../src/server/api/endpoints/i/page-likes.ts | 29 +++++++----- .../src/server/api/endpoints/my/apps.ts | 41 +--------------- .../src/server/api/endpoints/sw/register.ts | 8 ++-- .../backend/src/server/api/stream/types.ts | 1 + .../src/services/create-system-user.ts | 4 +- 9 files changed, 57 insertions(+), 105 deletions(-) diff --git a/packages/backend/src/misc/schema.ts b/packages/backend/src/misc/schema.ts index fbe5a1e421..5909969bbf 100644 --- a/packages/backend/src/misc/schema.ts +++ b/packages/backend/src/misc/schema.ts @@ -63,14 +63,7 @@ export const refs = { Emoji: packedEmojiSchema, }; -// Packed = SchemaTypeDef; とすると展開されてマウスホバー時に型表示が使い物にならなくなる -// ObjTypeを指定すると(なぜか)展開されずにPacked<'Hoge'>と表示される -type PackedDef; allOf?: ReadonlyArray }> = - r['allOf'] extends ReadonlyArray ? UnionToIntersection> : - r['oneOf'] extends ReadonlyArray ? UnionSchemaType : - r['properties'] extends Obj ? ObjType : - never; -export type Packed = PackedDef; +export type Packed = SchemaType; type TypeStringef = 'null' | 'boolean' | 'integer' | 'number' | 'string' | 'array' | 'object' | 'any'; type StringDefToType = @@ -107,31 +100,20 @@ export interface Schema extends OfSchema { readonly minLength?: number; } -type OptionalPropertyNames = { - [K in keyof T]: T[K]['optional'] extends true ? K : never -}[keyof T]; - -type NonOptionalPropertyNames = { - [K in keyof T]: T[K]['optional'] extends false ? K : never -}[keyof T]; - -type DefaultPropertyNames = { - [K in keyof T]: T[K]['default'] extends null ? K : - T[K]['default'] extends string ? K : - T[K]['default'] extends number ? K : - T[K]['default'] extends boolean ? K : - T[K]['default'] extends Record ? K : - never -}[keyof T]; +type RequiredPropertyNames = { + [K in keyof s]: + // K is not optional + s[K]['optional'] extends false ? K : + // K has default value + s[K]['default'] extends null | string | number | boolean | Record ? K : never +}[keyof s]; export interface Obj { [key: string]: Schema; } -export type ObjType> = +export type ObjType = { -readonly [P in keyof s]?: SchemaType } & - { -readonly [P in RequiredProps[number]]: SchemaType } & - { -readonly [P in OptionalPropertyNames]?: SchemaType } & - { -readonly [P in NonOptionalPropertyNames]: SchemaType } & - { -readonly [P in DefaultPropertyNames]: SchemaType }; + { -readonly [P in RequiredProps]: SchemaType } & + { -readonly [P in RequiredPropertyNames]: SchemaType }; type NullOrUndefined

= p['nullable'] extends true @@ -142,11 +124,12 @@ type NullOrUndefined

= ? (T | undefined) : T; -// 共用体型を交差型にする型 https://stackoverflow.com/questions/54938141/typescript-convert-union-to-intersection +// https://stackoverflow.com/questions/54938141/typescript-convert-union-to-intersection +// Get intersection from union type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; // https://github.com/misskey-dev/misskey/pull/8144#discussion_r785287552 -// 単純にSchemaTypeDefで判定するだけではダメ +// To get union, we use `Foo extends any ? Hoge : never` type UnionSchemaType = X extends any ? SchemaType : never; type ArrayUnion = T extends any ? Array : never; @@ -163,7 +146,7 @@ export type SchemaTypeDef

= p['type'] extends 'boolean' ? boolean : p['type'] extends 'object' ? ( p['ref'] extends keyof typeof refs ? Packed : - p['properties'] extends NonNullable ? ObjType> : + p['properties'] extends NonNullable ? ObjType[number]> : p['anyOf'] extends ReadonlyArray ? UnionSchemaType & Partial>> : p['allOf'] extends ReadonlyArray ? UnionToIntersection> : any diff --git a/packages/backend/src/models/repositories/app.ts b/packages/backend/src/models/repositories/app.ts index 6bac4d9598..5576c67236 100644 --- a/packages/backend/src/models/repositories/app.ts +++ b/packages/backend/src/models/repositories/app.ts @@ -32,7 +32,7 @@ export class AppRepository extends Repository { ...(me ? { isAuthorized: await AccessTokens.count({ appId: app.id, - userId: me, + userId: me.id, }).then(count => count > 0), } : {}), }; diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts index 8d2bda9781..295d99513d 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts @@ -65,5 +65,5 @@ export default define(meta, paramDef, async (ps) => { imageUrl: ps.imageUrl, }).then(x => Announcements.findOneOrFail(x.identifiers[0])); - return announcement; + return Object.assign({}, announcement, { createdAt: announcement.createdAt.toISOString(), updatedAt: null }); }); diff --git a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts index dc862a6b05..7578ed3216 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts @@ -10,20 +10,24 @@ export const meta = { kind: 'read:gallery-likes', res: { - type: 'object', + type: 'array', optional: false, nullable: false, - properties: { - id: { - type: 'string', - optional: false, nullable: false, - format: 'id', + items: { + type: 'object', + optional: false, nullable: false, + properties: { + id: { + type: 'string', + optional: false, nullable: false, + format: 'id', + }, + post: { + type: 'object', + optional: false, nullable: false, + ref: 'GalleryPost', + }, }, - page: { - type: 'object', - optional: false, nullable: false, - ref: 'GalleryPost', - }, - }, + } }, } as const; diff --git a/packages/backend/src/server/api/endpoints/i/page-likes.ts b/packages/backend/src/server/api/endpoints/i/page-likes.ts index e66bc616c2..60ac3ccde1 100644 --- a/packages/backend/src/server/api/endpoints/i/page-likes.ts +++ b/packages/backend/src/server/api/endpoints/i/page-likes.ts @@ -10,20 +10,23 @@ export const meta = { kind: 'read:page-likes', res: { - type: 'object', + type: 'array', optional: false, nullable: false, - properties: { - id: { - type: 'string', - optional: false, nullable: false, - format: 'id', + items: { + type: 'object', + properties: { + id: { + type: 'string', + optional: false, nullable: false, + format: 'id', + }, + page: { + type: 'object', + optional: false, nullable: false, + ref: 'Page', + }, }, - page: { - type: 'object', - optional: false, nullable: false, - ref: 'Page', - }, - }, + } }, } as const; @@ -47,5 +50,5 @@ export default define(meta, paramDef, async (ps, user) => { .take(ps.limit) .getMany(); - return await PageLikes.packMany(likes, user); + return PageLikes.packMany(likes, user); }); diff --git a/packages/backend/src/server/api/endpoints/my/apps.ts b/packages/backend/src/server/api/endpoints/my/apps.ts index 60e5014110..8dee11fb93 100644 --- a/packages/backend/src/server/api/endpoints/my/apps.ts +++ b/packages/backend/src/server/api/endpoints/my/apps.ts @@ -12,46 +12,7 @@ export const meta = { items: { type: 'object', optional: false, nullable: false, - properties: { - id: { - type: 'string', - optional: false, nullable: false, - }, - name: { - type: 'string', - optional: false, nullable: false, - }, - callbackUrl: { - type: 'string', - optional: false, nullable: false, - }, - permission: { - type: 'array', - optional: false, nullable: false, - items: { - type: 'string', - optional: false, nullable: false, - }, - }, - secret: { - type: 'string', - optional: true, nullable: false, - }, - isAuthorized: { - type: 'object', - optional: true, nullable: false, - properties: { - appId: { - type: 'string', - optional: false, nullable: false, - }, - userId: { - type: 'string', - optional: false, nullable: false, - }, - }, - }, - }, + ref: 'App', }, }, } as const; diff --git a/packages/backend/src/server/api/endpoints/sw/register.ts b/packages/backend/src/server/api/endpoints/sw/register.ts index 9091c9481a..459b0dd969 100644 --- a/packages/backend/src/server/api/endpoints/sw/register.ts +++ b/packages/backend/src/server/api/endpoints/sw/register.ts @@ -14,12 +14,12 @@ export const meta = { properties: { state: { type: 'string', - optional: false, nullable: false, + optional: true, nullable: false, enum: ['already-subscribed', 'subscribed'], }, key: { type: 'string', - optional: false, nullable: false, + optional: false, nullable: true, }, }, }, @@ -49,7 +49,7 @@ export default define(meta, paramDef, async (ps, user) => { if (exist != null) { return { - state: 'already-subscribed', + state: 'already-subscribed' as const, key: instance.swPublicKey, }; } @@ -64,7 +64,7 @@ export default define(meta, paramDef, async (ps, user) => { }); return { - state: 'subscribed', + state: 'subscribed' as const, key: instance.swPublicKey, }; }); diff --git a/packages/backend/src/server/api/stream/types.ts b/packages/backend/src/server/api/stream/types.ts index e2f1c6fc9c..921856b38d 100644 --- a/packages/backend/src/server/api/stream/types.ts +++ b/packages/backend/src/server/api/stream/types.ts @@ -84,6 +84,7 @@ export interface MainStreamTypes { }; driveFileCreated: Packed<'DriveFile'>; readAntenna: Antenna; + receiveFollowRequest: Packed<'User'>; } export interface DriveStreamTypes { diff --git a/packages/backend/src/services/create-system-user.ts b/packages/backend/src/services/create-system-user.ts index 82130dd593..2e9ec178fd 100644 --- a/packages/backend/src/services/create-system-user.ts +++ b/packages/backend/src/services/create-system-user.ts @@ -4,7 +4,7 @@ import generateNativeUserToken from '../server/api/common/generate-native-user-t import { genRsaKeyPair } from '@/misc/gen-key-pair'; import { User } from '@/models/entities/user'; import { UserProfile } from '@/models/entities/user-profile'; -import { getConnection } from 'typeorm'; +import { getConnection, ObjectLiteral } from 'typeorm'; import { genId } from '@/misc/gen-id'; import { UserKeypair } from '@/models/entities/user-keypair'; import { UsedUsername } from '@/models/entities/used-username'; @@ -21,7 +21,7 @@ export async function createSystemUser(username: string) { const keyPair = await genRsaKeyPair(4096); - let account!: User; + let account!: User | ObjectLiteral; // Start transaction await getConnection().transaction(async transactionalEntityManager => { From 0cab102f3a09d9bee2ee7e6754c25ebd9e0d0b29 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 20 Feb 2022 01:12:30 +0900 Subject: [PATCH 02/10] wip --- packages/backend/src/server/api/call.ts | 4 ++-- .../backend/src/server/api/endpoints/drive/files/create.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/call.ts b/packages/backend/src/server/api/call.ts index ea457d9556..e767b15417 100644 --- a/packages/backend/src/server/api/call.ts +++ b/packages/backend/src/server/api/call.ts @@ -78,8 +78,8 @@ export default async (endpoint: string, user: User | null | undefined, token: Ac } // Cast non JSON input - if (ep.meta.requireFile) { - for (const k of Object.keys(ep.params)) { + if (ep.meta.requireFile && ep.params.properties) { + for (const k of Object.keys(ep.params.properties)) { const param = ep.params.properties![k]; if (['boolean', 'number', 'integer'].includes(param.type ?? '') && typeof data[k] === 'string') { try { diff --git a/packages/backend/src/server/api/endpoints/drive/files/create.ts b/packages/backend/src/server/api/endpoints/drive/files/create.ts index f5791f6ec7..aafb650dd7 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts @@ -35,7 +35,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { folderId: { type: 'string', format: 'misskey:id', nullable: true, default: null }, From 78ad95d3adabe54ce094c4266b77da078f2cb7d1 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 20 Feb 2022 01:32:35 +0900 Subject: [PATCH 03/10] :v: --- packages/backend/src/server/api/define.ts | 15 ++++++++++++--- .../api/endpoints/admin/abuse-user-reports.ts | 2 +- .../server/api/endpoints/admin/accounts/create.ts | 2 +- .../server/api/endpoints/admin/accounts/delete.ts | 2 +- .../src/server/api/endpoints/admin/ad/create.ts | 2 +- .../src/server/api/endpoints/admin/ad/delete.ts | 2 +- .../src/server/api/endpoints/admin/ad/list.ts | 2 +- .../src/server/api/endpoints/admin/ad/update.ts | 2 +- .../api/endpoints/admin/announcements/create.ts | 2 +- .../api/endpoints/admin/announcements/delete.ts | 2 +- .../api/endpoints/admin/announcements/list.ts | 2 +- .../api/endpoints/admin/announcements/update.ts | 2 +- .../endpoints/admin/delete-all-files-of-a-user.ts | 2 +- .../endpoints/admin/drive/clean-remote-files.ts | 2 +- .../server/api/endpoints/admin/drive/cleanup.ts | 2 +- .../src/server/api/endpoints/admin/drive/files.ts | 2 +- .../server/api/endpoints/admin/drive/show-file.ts | 2 +- .../api/endpoints/admin/emoji/add-aliases-bulk.ts | 2 +- .../src/server/api/endpoints/admin/emoji/add.ts | 2 +- .../src/server/api/endpoints/admin/emoji/copy.ts | 2 +- .../api/endpoints/admin/emoji/delete-bulk.ts | 2 +- .../server/api/endpoints/admin/emoji/delete.ts | 2 +- .../api/endpoints/admin/emoji/import-zip.ts | 2 +- .../api/endpoints/admin/emoji/list-remote.ts | 2 +- .../src/server/api/endpoints/admin/emoji/list.ts | 2 +- .../endpoints/admin/emoji/remove-aliases-bulk.ts | 2 +- .../api/endpoints/admin/emoji/set-aliases-bulk.ts | 2 +- .../endpoints/admin/emoji/set-category-bulk.ts | 2 +- .../server/api/endpoints/admin/emoji/update.ts | 2 +- .../admin/federation/delete-all-files.ts | 2 +- .../refresh-remote-instance-metadata.ts | 2 +- .../admin/federation/remove-all-following.ts | 2 +- .../endpoints/admin/federation/update-instance.ts | 2 +- .../server/api/endpoints/admin/get-index-stats.ts | 2 +- .../server/api/endpoints/admin/get-table-stats.ts | 2 +- .../src/server/api/endpoints/admin/invite.ts | 2 +- .../server/api/endpoints/admin/moderators/add.ts | 2 +- .../api/endpoints/admin/moderators/remove.ts | 2 +- .../server/api/endpoints/admin/promo/create.ts | 2 +- .../src/server/api/endpoints/admin/queue/clear.ts | 2 +- .../api/endpoints/admin/queue/deliver-delayed.ts | 2 +- .../api/endpoints/admin/queue/inbox-delayed.ts | 2 +- .../src/server/api/endpoints/admin/queue/stats.ts | 2 +- .../src/server/api/endpoints/admin/relays/add.ts | 2 +- .../src/server/api/endpoints/admin/relays/list.ts | 2 +- .../server/api/endpoints/admin/relays/remove.ts | 2 +- .../server/api/endpoints/admin/reset-password.ts | 2 +- .../endpoints/admin/resolve-abuse-user-report.ts | 2 +- .../src/server/api/endpoints/admin/send-email.ts | 2 +- .../src/server/api/endpoints/admin/server-info.ts | 2 +- .../api/endpoints/admin/show-moderation-logs.ts | 2 +- .../src/server/api/endpoints/admin/show-user.ts | 2 +- .../src/server/api/endpoints/admin/show-users.ts | 2 +- .../server/api/endpoints/admin/silence-user.ts | 2 +- .../server/api/endpoints/admin/suspend-user.ts | 2 +- .../server/api/endpoints/admin/unsilence-user.ts | 2 +- .../server/api/endpoints/admin/unsuspend-user.ts | 2 +- .../src/server/api/endpoints/admin/update-meta.ts | 2 +- .../src/server/api/endpoints/admin/vacuum.ts | 2 +- .../src/server/api/endpoints/announcements.ts | 2 +- .../src/server/api/endpoints/antennas/create.ts | 2 +- .../src/server/api/endpoints/antennas/delete.ts | 2 +- .../src/server/api/endpoints/antennas/list.ts | 2 +- .../src/server/api/endpoints/antennas/notes.ts | 2 +- .../src/server/api/endpoints/antennas/show.ts | 2 +- .../src/server/api/endpoints/antennas/update.ts | 2 +- .../backend/src/server/api/endpoints/ap/get.ts | 2 +- .../backend/src/server/api/endpoints/ap/show.ts | 2 +- .../src/server/api/endpoints/app/create.ts | 2 +- .../backend/src/server/api/endpoints/app/show.ts | 2 +- .../src/server/api/endpoints/auth/accept.ts | 2 +- .../server/api/endpoints/auth/session/generate.ts | 2 +- .../src/server/api/endpoints/auth/session/show.ts | 2 +- .../server/api/endpoints/auth/session/userkey.ts | 2 +- .../src/server/api/endpoints/blocking/create.ts | 2 +- .../src/server/api/endpoints/blocking/delete.ts | 2 +- .../src/server/api/endpoints/blocking/list.ts | 2 +- .../src/server/api/endpoints/channels/create.ts | 2 +- .../src/server/api/endpoints/channels/featured.ts | 2 +- .../src/server/api/endpoints/channels/follow.ts | 2 +- .../src/server/api/endpoints/channels/followed.ts | 2 +- .../src/server/api/endpoints/channels/owned.ts | 2 +- .../src/server/api/endpoints/channels/show.ts | 2 +- .../src/server/api/endpoints/channels/timeline.ts | 2 +- .../src/server/api/endpoints/channels/unfollow.ts | 2 +- .../src/server/api/endpoints/channels/update.ts | 2 +- .../server/api/endpoints/charts/active-users.ts | 2 +- .../src/server/api/endpoints/charts/ap-request.ts | 2 +- .../src/server/api/endpoints/charts/drive.ts | 2 +- .../src/server/api/endpoints/charts/federation.ts | 2 +- .../src/server/api/endpoints/charts/hashtag.ts | 2 +- .../src/server/api/endpoints/charts/instance.ts | 2 +- .../src/server/api/endpoints/charts/notes.ts | 2 +- .../src/server/api/endpoints/charts/user/drive.ts | 2 +- .../server/api/endpoints/charts/user/following.ts | 2 +- .../src/server/api/endpoints/charts/user/notes.ts | 2 +- .../server/api/endpoints/charts/user/reactions.ts | 2 +- .../src/server/api/endpoints/charts/users.ts | 2 +- .../src/server/api/endpoints/clips/add-note.ts | 2 +- .../src/server/api/endpoints/clips/create.ts | 2 +- .../src/server/api/endpoints/clips/delete.ts | 2 +- .../src/server/api/endpoints/clips/list.ts | 2 +- .../src/server/api/endpoints/clips/notes.ts | 2 +- .../src/server/api/endpoints/clips/show.ts | 2 +- .../src/server/api/endpoints/clips/update.ts | 2 +- .../backend/src/server/api/endpoints/drive.ts | 2 +- .../src/server/api/endpoints/drive/files.ts | 2 +- .../api/endpoints/drive/files/attached-notes.ts | 2 +- .../api/endpoints/drive/files/check-existence.ts | 2 +- .../server/api/endpoints/drive/files/create.ts | 1 + .../server/api/endpoints/drive/files/delete.ts | 2 +- .../api/endpoints/drive/files/find-by-hash.ts | 2 +- .../src/server/api/endpoints/drive/files/find.ts | 2 +- .../src/server/api/endpoints/drive/files/show.ts | 2 +- .../server/api/endpoints/drive/files/update.ts | 2 +- .../api/endpoints/drive/files/upload-from-url.ts | 2 +- .../src/server/api/endpoints/drive/folders.ts | 2 +- .../server/api/endpoints/drive/folders/create.ts | 2 +- .../server/api/endpoints/drive/folders/delete.ts | 2 +- .../server/api/endpoints/drive/folders/find.ts | 2 +- .../server/api/endpoints/drive/folders/show.ts | 2 +- .../server/api/endpoints/drive/folders/update.ts | 2 +- .../src/server/api/endpoints/drive/stream.ts | 2 +- .../api/endpoints/email-address/available.ts | 2 +- .../backend/src/server/api/endpoints/endpoint.ts | 2 +- .../backend/src/server/api/endpoints/endpoints.ts | 2 +- .../server/api/endpoints/export-custom-emojis.ts | 2 +- .../server/api/endpoints/federation/followers.ts | 2 +- .../server/api/endpoints/federation/following.ts | 2 +- .../server/api/endpoints/federation/instances.ts | 2 +- .../api/endpoints/federation/show-instance.ts | 2 +- .../endpoints/federation/update-remote-user.ts | 2 +- .../src/server/api/endpoints/federation/users.ts | 2 +- .../src/server/api/endpoints/following/create.ts | 2 +- .../src/server/api/endpoints/following/delete.ts | 2 +- .../server/api/endpoints/following/invalidate.ts | 2 +- .../api/endpoints/following/requests/accept.ts | 2 +- .../api/endpoints/following/requests/cancel.ts | 2 +- .../api/endpoints/following/requests/list.ts | 2 +- .../api/endpoints/following/requests/reject.ts | 2 +- .../src/server/api/endpoints/gallery/featured.ts | 2 +- .../src/server/api/endpoints/gallery/popular.ts | 2 +- .../src/server/api/endpoints/gallery/posts.ts | 2 +- .../server/api/endpoints/gallery/posts/create.ts | 2 +- .../server/api/endpoints/gallery/posts/delete.ts | 2 +- .../server/api/endpoints/gallery/posts/like.ts | 2 +- .../server/api/endpoints/gallery/posts/show.ts | 2 +- .../server/api/endpoints/gallery/posts/unlike.ts | 2 +- .../server/api/endpoints/gallery/posts/update.ts | 2 +- .../api/endpoints/get-online-users-count.ts | 2 +- .../src/server/api/endpoints/hashtags/list.ts | 2 +- .../src/server/api/endpoints/hashtags/search.ts | 2 +- .../src/server/api/endpoints/hashtags/show.ts | 2 +- .../src/server/api/endpoints/hashtags/trend.ts | 2 +- .../src/server/api/endpoints/hashtags/users.ts | 2 +- packages/backend/src/server/api/endpoints/i.ts | 2 +- .../src/server/api/endpoints/i/2fa/done.ts | 2 +- .../src/server/api/endpoints/i/2fa/key-done.ts | 2 +- .../server/api/endpoints/i/2fa/password-less.ts | 2 +- .../server/api/endpoints/i/2fa/register-key.ts | 2 +- .../src/server/api/endpoints/i/2fa/register.ts | 2 +- .../src/server/api/endpoints/i/2fa/remove-key.ts | 2 +- .../src/server/api/endpoints/i/2fa/unregister.ts | 2 +- .../backend/src/server/api/endpoints/i/apps.ts | 2 +- .../src/server/api/endpoints/i/authorized-apps.ts | 2 +- .../src/server/api/endpoints/i/change-password.ts | 2 +- .../src/server/api/endpoints/i/delete-account.ts | 2 +- .../src/server/api/endpoints/i/export-blocking.ts | 2 +- .../server/api/endpoints/i/export-following.ts | 2 +- .../src/server/api/endpoints/i/export-mute.ts | 2 +- .../src/server/api/endpoints/i/export-notes.ts | 2 +- .../server/api/endpoints/i/export-user-lists.ts | 2 +- .../src/server/api/endpoints/i/favorites.ts | 2 +- .../src/server/api/endpoints/i/gallery/likes.ts | 2 +- .../src/server/api/endpoints/i/gallery/posts.ts | 2 +- .../api/endpoints/i/get-word-muted-notes-count.ts | 2 +- .../src/server/api/endpoints/i/import-blocking.ts | 2 +- .../server/api/endpoints/i/import-following.ts | 2 +- .../src/server/api/endpoints/i/import-muting.ts | 2 +- .../server/api/endpoints/i/import-user-lists.ts | 2 +- .../src/server/api/endpoints/i/notifications.ts | 2 +- .../src/server/api/endpoints/i/page-likes.ts | 2 +- .../backend/src/server/api/endpoints/i/pages.ts | 2 +- .../backend/src/server/api/endpoints/i/pin.ts | 2 +- .../endpoints/i/read-all-messaging-messages.ts | 2 +- .../api/endpoints/i/read-all-unread-notes.ts | 2 +- .../server/api/endpoints/i/read-announcement.ts | 2 +- .../server/api/endpoints/i/regenerate-token.ts | 2 +- .../server/api/endpoints/i/registry/get-all.ts | 2 +- .../server/api/endpoints/i/registry/get-detail.ts | 2 +- .../src/server/api/endpoints/i/registry/get.ts | 2 +- .../api/endpoints/i/registry/keys-with-type.ts | 2 +- .../src/server/api/endpoints/i/registry/keys.ts | 2 +- .../src/server/api/endpoints/i/registry/remove.ts | 2 +- .../src/server/api/endpoints/i/registry/scopes.ts | 2 +- .../src/server/api/endpoints/i/registry/set.ts | 2 +- .../src/server/api/endpoints/i/revoke-token.ts | 2 +- .../src/server/api/endpoints/i/signin-history.ts | 2 +- .../backend/src/server/api/endpoints/i/unpin.ts | 2 +- .../src/server/api/endpoints/i/update-email.ts | 2 +- .../backend/src/server/api/endpoints/i/update.ts | 2 +- .../server/api/endpoints/i/user-group-invites.ts | 2 +- .../src/server/api/endpoints/messaging/history.ts | 2 +- .../server/api/endpoints/messaging/messages.ts | 2 +- .../api/endpoints/messaging/messages/create.ts | 2 +- .../api/endpoints/messaging/messages/delete.ts | 2 +- .../api/endpoints/messaging/messages/read.ts | 2 +- packages/backend/src/server/api/endpoints/meta.ts | 2 +- .../src/server/api/endpoints/miauth/gen-token.ts | 2 +- .../src/server/api/endpoints/mute/create.ts | 2 +- .../src/server/api/endpoints/mute/delete.ts | 2 +- .../backend/src/server/api/endpoints/mute/list.ts | 2 +- .../backend/src/server/api/endpoints/my/apps.ts | 2 +- .../backend/src/server/api/endpoints/notes.ts | 2 +- .../src/server/api/endpoints/notes/children.ts | 2 +- .../src/server/api/endpoints/notes/clips.ts | 2 +- .../server/api/endpoints/notes/conversation.ts | 2 +- .../src/server/api/endpoints/notes/create.ts | 2 +- .../src/server/api/endpoints/notes/delete.ts | 2 +- .../api/endpoints/notes/favorites/create.ts | 2 +- .../api/endpoints/notes/favorites/delete.ts | 2 +- .../src/server/api/endpoints/notes/featured.ts | 2 +- .../server/api/endpoints/notes/global-timeline.ts | 2 +- .../server/api/endpoints/notes/hybrid-timeline.ts | 2 +- .../server/api/endpoints/notes/local-timeline.ts | 2 +- .../src/server/api/endpoints/notes/mentions.ts | 2 +- .../api/endpoints/notes/polls/recommendation.ts | 2 +- .../src/server/api/endpoints/notes/polls/vote.ts | 2 +- .../src/server/api/endpoints/notes/reactions.ts | 2 +- .../api/endpoints/notes/reactions/create.ts | 2 +- .../api/endpoints/notes/reactions/delete.ts | 2 +- .../src/server/api/endpoints/notes/renotes.ts | 2 +- .../src/server/api/endpoints/notes/replies.ts | 2 +- .../server/api/endpoints/notes/search-by-tag.ts | 2 +- .../src/server/api/endpoints/notes/search.ts | 2 +- .../src/server/api/endpoints/notes/show.ts | 2 +- .../src/server/api/endpoints/notes/state.ts | 2 +- .../api/endpoints/notes/thread-muting/create.ts | 2 +- .../api/endpoints/notes/thread-muting/delete.ts | 2 +- .../src/server/api/endpoints/notes/timeline.ts | 2 +- .../src/server/api/endpoints/notes/translate.ts | 2 +- .../src/server/api/endpoints/notes/unrenote.ts | 2 +- .../api/endpoints/notes/user-list-timeline.ts | 2 +- .../server/api/endpoints/notes/watching/create.ts | 2 +- .../server/api/endpoints/notes/watching/delete.ts | 2 +- .../server/api/endpoints/notifications/create.ts | 2 +- .../endpoints/notifications/mark-all-as-read.ts | 2 +- .../server/api/endpoints/notifications/read.ts | 2 +- .../backend/src/server/api/endpoints/page-push.ts | 2 +- .../src/server/api/endpoints/pages/create.ts | 2 +- .../src/server/api/endpoints/pages/delete.ts | 2 +- .../src/server/api/endpoints/pages/featured.ts | 2 +- .../src/server/api/endpoints/pages/like.ts | 2 +- .../src/server/api/endpoints/pages/show.ts | 2 +- .../src/server/api/endpoints/pages/unlike.ts | 2 +- .../src/server/api/endpoints/pages/update.ts | 2 +- packages/backend/src/server/api/endpoints/ping.ts | 2 +- .../src/server/api/endpoints/pinned-users.ts | 2 +- .../src/server/api/endpoints/promo/read.ts | 2 +- .../api/endpoints/request-reset-password.ts | 2 +- .../backend/src/server/api/endpoints/reset-db.ts | 2 +- .../src/server/api/endpoints/reset-password.ts | 2 +- .../src/server/api/endpoints/server-info.ts | 2 +- .../backend/src/server/api/endpoints/stats.ts | 2 +- .../src/server/api/endpoints/sw/register.ts | 2 +- .../src/server/api/endpoints/sw/unregister.ts | 2 +- packages/backend/src/server/api/endpoints/test.ts | 2 +- .../server/api/endpoints/username/available.ts | 2 +- .../backend/src/server/api/endpoints/users.ts | 2 +- .../src/server/api/endpoints/users/clips.ts | 2 +- .../src/server/api/endpoints/users/followers.ts | 2 +- .../src/server/api/endpoints/users/following.ts | 2 +- .../server/api/endpoints/users/gallery/posts.ts | 2 +- .../users/get-frequently-replied-users.ts | 2 +- .../server/api/endpoints/users/groups/create.ts | 2 +- .../server/api/endpoints/users/groups/delete.ts | 2 +- .../endpoints/users/groups/invitations/accept.ts | 2 +- .../endpoints/users/groups/invitations/reject.ts | 2 +- .../server/api/endpoints/users/groups/invite.ts | 2 +- .../server/api/endpoints/users/groups/joined.ts | 2 +- .../server/api/endpoints/users/groups/leave.ts | 2 +- .../server/api/endpoints/users/groups/owned.ts | 2 +- .../src/server/api/endpoints/users/groups/pull.ts | 2 +- .../src/server/api/endpoints/users/groups/show.ts | 2 +- .../server/api/endpoints/users/groups/transfer.ts | 2 +- .../server/api/endpoints/users/groups/update.ts | 2 +- .../server/api/endpoints/users/lists/create.ts | 2 +- .../server/api/endpoints/users/lists/delete.ts | 2 +- .../src/server/api/endpoints/users/lists/list.ts | 2 +- .../src/server/api/endpoints/users/lists/pull.ts | 2 +- .../src/server/api/endpoints/users/lists/push.ts | 2 +- .../src/server/api/endpoints/users/lists/show.ts | 2 +- .../server/api/endpoints/users/lists/update.ts | 2 +- .../src/server/api/endpoints/users/notes.ts | 2 +- .../src/server/api/endpoints/users/pages.ts | 2 +- .../src/server/api/endpoints/users/reactions.ts | 2 +- .../server/api/endpoints/users/recommendation.ts | 2 +- .../src/server/api/endpoints/users/relation.ts | 2 +- .../server/api/endpoints/users/report-abuse.ts | 2 +- .../users/search-by-username-and-host.ts | 2 +- .../src/server/api/endpoints/users/search.ts | 2 +- .../src/server/api/endpoints/users/show.ts | 2 +- .../src/server/api/endpoints/users/stats.ts | 2 +- 303 files changed, 314 insertions(+), 304 deletions(-) diff --git a/packages/backend/src/server/api/define.ts b/packages/backend/src/server/api/define.ts index 061ade17bf..e2a34f47a5 100644 --- a/packages/backend/src/server/api/define.ts +++ b/packages/backend/src/server/api/define.ts @@ -1,10 +1,13 @@ import * as fs from 'fs'; -import * as Ajv from 'ajv'; +import Ajv from 'ajv'; import { ILocalUser } from '@/models/entities/user'; import { IEndpointMeta } from './endpoints'; import { ApiError } from './error'; import { Schema, SchemaType } from '@/misc/schema'; import { AccessToken } from '@/models/entities/access-token'; +import { ValidateFunction } from 'ajv'; +import { JTDDataType } from 'ajv/dist/types/jtd-schema'; +import { apiLogger } from './logger'; type SimpleUserInfo = { id: ILocalUser['id']; @@ -36,7 +39,13 @@ ajv.addFormat('misskey:id', /^[a-z0-9]+$/); export default function (meta: T, paramDef: Ps, cb: executor) : (params: any, user: T['requireCredential'] extends true ? SimpleUserInfo : SimpleUserInfo | null, token: AccessToken | null, file?: any) => Promise { - const validate = ajv.compile(paramDef); + let validate: ValidateFunction>; + + try { + validate = ajv.compile(paramDef); + } catch (error) { + apiLogger.error('FAILED TO COMPILE SCHEMA ' + JSON.stringify({ param: paramDef, error })); + } return (params: any, user: T['requireCredential'] extends true ? SimpleUserInfo : SimpleUserInfo | null, token: AccessToken | null, file?: any) => { function cleanup() { @@ -65,6 +74,6 @@ export default function (meta: T, pa return Promise.reject(err); } - return cb(params, user, token, file, cleanup); + return cb(params as SchemaType, user, token, file, cleanup); }; } diff --git a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts index 97b7bc7dba..6ab9c87e3c 100644 --- a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts +++ b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts @@ -70,7 +70,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts index 50b2eb0427..421726d60f 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { username: Users.localUsernameSchema, diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts index 99d61b2f32..cf48a906f0 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts @@ -11,7 +11,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/ad/create.ts b/packages/backend/src/server/api/endpoints/admin/ad/create.ts index 9883efefe7..c1efaf6314 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/create.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { url: { type: 'string', minLength: 1 }, diff --git a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts index dfd873f016..1b9607b5aa 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, 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 83fdedef77..5b72f72937 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/list.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/ad/update.ts b/packages/backend/src/server/api/endpoints/admin/ad/update.ts index bf4bce5150..93902e79c1 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/update.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts index 295d99513d..884dd5e280 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { title: { type: 'string', minLength: 1 }, diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts index f0141ca595..c09307193f 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts index 993f9877d2..af48925ec1 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts @@ -52,7 +52,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts index f905616b3e..fb4d5e95ba 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts index 41e2c23488..dde84ae45e 100644 --- a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts index 9b127eb5d3..c42b5caac2 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts @@ -8,7 +8,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts index 1c63af6a17..a7ce154cf2 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/drive/files.ts b/packages/backend/src/server/api/endpoints/admin/drive/files.ts index 56a8c1c642..0b5544ce28 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts index bb1ed1072a..efd4a8e4aa 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts @@ -149,7 +149,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts index 9aeb04d247..4ddea09b1c 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { ids: { type: 'array', items: { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts index 718ecae4b1..2ca3aade99 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, 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 fc20ff0a84..f2dc11f664 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { emojiId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts index 792e72ff97..d35ef660e4 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts @@ -11,7 +11,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { ids: { type: 'array', items: { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts index 15d44b3a0e..2dabd60a0f 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts index 5ee6dd4c8d..98d8d4fef9 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts @@ -8,7 +8,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts index 865715968a..e519f64ff0 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -50,7 +50,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { query: { type: 'string', nullable: true, default: null }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts index 0e23132d99..8e26da3d64 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts @@ -50,7 +50,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { query: { type: 'string', nullable: true, default: null }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts index e6ccbf684d..e619053e58 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { ids: { type: 'array', items: { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts index 30a1c28af6..dff90193e7 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { ids: { type: 'array', items: { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts index 9679e4a369..462e7a742c 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { ids: { type: 'array', items: { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts index da5a5f005e..870d568311 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts index e98de40ff8..71c1c41cf6 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts index d6e3a15c61..df73453f78 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts index 7c2d6dc391..0ae58de534 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts index 04cad3b9f7..9a3c35d055 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts index 9379379aef..17ce1bfce9 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts @@ -8,7 +8,7 @@ export const meta = { tags: ['admin'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts index 28856cd41c..e980ca96ef 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/invite.ts b/packages/backend/src/server/api/endpoints/admin/invite.ts index a21777937c..45392f85c7 100644 --- a/packages/backend/src/server/api/endpoints/admin/invite.ts +++ b/packages/backend/src/server/api/endpoints/admin/invite.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts index 6b7e549c35..3bf66f3c86 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts @@ -8,7 +8,7 @@ export const meta = { requireAdmin: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts index 585d6fbfa7..e2e96de3c1 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts @@ -8,7 +8,7 @@ export const meta = { requireAdmin: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/promo/create.ts b/packages/backend/src/server/api/endpoints/admin/promo/create.ts index 16f522729b..4f714c579c 100644 --- a/packages/backend/src/server/api/endpoints/admin/promo/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/promo/create.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts index 27bb9cc858..fd1dba8e50 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts index 38eac5a135..080a7da04f 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts index 9669cfd3b8..c452b620ec 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts index 3f7e6be5fb..6b883aebee 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/relays/add.ts b/packages/backend/src/server/api/endpoints/admin/relays/add.ts index ecf77b87df..e8eb249f93 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/add.ts @@ -45,7 +45,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { inbox: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/relays/list.ts b/packages/backend/src/server/api/endpoints/admin/relays/list.ts index 6cdaa418a7..da2c32ce4f 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/list.ts @@ -39,7 +39,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts index d452c2e6a5..26a16284db 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts @@ -8,7 +8,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { inbox: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/reset-password.ts b/packages/backend/src/server/api/endpoints/admin/reset-password.ts index 87424782c5..5036d76d1f 100644 --- a/packages/backend/src/server/api/endpoints/admin/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/admin/reset-password.ts @@ -23,7 +23,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts index 4139f77614..ec8b56083c 100644 --- a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts +++ b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts @@ -12,7 +12,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { reportId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/send-email.ts b/packages/backend/src/server/api/endpoints/admin/send-email.ts index 2ebe7e0bc9..819ff8fd03 100644 --- a/packages/backend/src/server/api/endpoints/admin/send-email.ts +++ b/packages/backend/src/server/api/endpoints/admin/send-email.ts @@ -8,7 +8,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { to: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/server-info.ts b/packages/backend/src/server/api/endpoints/admin/server-info.ts index 44e069d603..ece9bff53e 100644 --- a/packages/backend/src/server/api/endpoints/admin/server-info.ts +++ b/packages/backend/src/server/api/endpoints/admin/server-info.ts @@ -87,7 +87,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], 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 c08acaeca9..1688a1fc53 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 @@ -48,7 +48,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/show-user.ts b/packages/backend/src/server/api/endpoints/admin/show-user.ts index b883aff494..46b6609869 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts @@ -13,7 +13,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts index c373021d0e..bc4b319e17 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/silence-user.ts b/packages/backend/src/server/api/endpoints/admin/silence-user.ts index df547184ad..54ef60f7fe 100644 --- a/packages/backend/src/server/api/endpoints/admin/silence-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/silence-user.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts index 31867a4055..c2f3d72438 100644 --- a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts @@ -13,7 +13,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts index 42c7e776a8..ddda5f48ab 100644 --- a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts index 011f485277..25a8f1a00a 100644 --- a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, 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 b845eb4d5b..ecede8a049 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -11,7 +11,7 @@ export const meta = { requireAdmin: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { disableRegistration: { type: 'boolean', nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/admin/vacuum.ts b/packages/backend/src/server/api/endpoints/admin/vacuum.ts index 07a4517bd4..8ce352bffd 100644 --- a/packages/backend/src/server/api/endpoints/admin/vacuum.ts +++ b/packages/backend/src/server/api/endpoints/admin/vacuum.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { full: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/announcements.ts b/packages/backend/src/server/api/endpoints/announcements.ts index bea3a287fc..78a924fe5e 100644 --- a/packages/backend/src/server/api/endpoints/announcements.ts +++ b/packages/backend/src/server/api/endpoints/announcements.ts @@ -51,7 +51,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index 16ba065b9d..272ebddd4b 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 100 }, diff --git a/packages/backend/src/server/api/endpoints/antennas/delete.ts b/packages/backend/src/server/api/endpoints/antennas/delete.ts index c140084778..247d4af16c 100644 --- a/packages/backend/src/server/api/endpoints/antennas/delete.ts +++ b/packages/backend/src/server/api/endpoints/antennas/delete.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { antennaId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/antennas/list.ts b/packages/backend/src/server/api/endpoints/antennas/list.ts index 6910c07291..59d75d80f5 100644 --- a/packages/backend/src/server/api/endpoints/antennas/list.ts +++ b/packages/backend/src/server/api/endpoints/antennas/list.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts index 283c01c2c7..74f0d8d88f 100644 --- a/packages/backend/src/server/api/endpoints/antennas/notes.ts +++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts @@ -33,7 +33,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { antennaId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/antennas/show.ts b/packages/backend/src/server/api/endpoints/antennas/show.ts index d8c08f2777..8428844c15 100644 --- a/packages/backend/src/server/api/endpoints/antennas/show.ts +++ b/packages/backend/src/server/api/endpoints/antennas/show.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { antennaId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts index 9f8564c2c0..0b8e864b4d 100644 --- a/packages/backend/src/server/api/endpoints/antennas/update.ts +++ b/packages/backend/src/server/api/endpoints/antennas/update.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { antennaId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/ap/get.ts b/packages/backend/src/server/api/endpoints/ap/get.ts index c62ca6088b..a60ff00ecd 100644 --- a/packages/backend/src/server/api/endpoints/ap/get.ts +++ b/packages/backend/src/server/api/endpoints/ap/get.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { uri: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts index e0b53403bb..8f71e84a15 100644 --- a/packages/backend/src/server/api/endpoints/ap/show.ts +++ b/packages/backend/src/server/api/endpoints/ap/show.ts @@ -68,7 +68,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { uri: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/app/create.ts b/packages/backend/src/server/api/endpoints/app/create.ts index 0f9610d2a9..6e8d2b2abd 100644 --- a/packages/backend/src/server/api/endpoints/app/create.ts +++ b/packages/backend/src/server/api/endpoints/app/create.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/app/show.ts b/packages/backend/src/server/api/endpoints/app/show.ts index 0ca7fcc2a8..6d75294e84 100644 --- a/packages/backend/src/server/api/endpoints/app/show.ts +++ b/packages/backend/src/server/api/endpoints/app/show.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { appId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/auth/accept.ts b/packages/backend/src/server/api/endpoints/auth/accept.ts index 4429119b1f..775c26818b 100644 --- a/packages/backend/src/server/api/endpoints/auth/accept.ts +++ b/packages/backend/src/server/api/endpoints/auth/accept.ts @@ -21,7 +21,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { token: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/auth/session/generate.ts b/packages/backend/src/server/api/endpoints/auth/session/generate.ts index 8d5c14e2f7..ba0356431f 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/generate.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/generate.ts @@ -35,7 +35,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { appSecret: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/auth/session/show.ts b/packages/backend/src/server/api/endpoints/auth/session/show.ts index dfc1c06ee6..701cc9237d 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/show.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/show.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { token: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts index 397d1e687b..fa04610ce0 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts @@ -45,7 +45,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { appSecret: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/blocking/create.ts b/packages/backend/src/server/api/endpoints/blocking/create.ts index 8fd8f33338..cf09ca00ba 100644 --- a/packages/backend/src/server/api/endpoints/blocking/create.ts +++ b/packages/backend/src/server/api/endpoints/blocking/create.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/blocking/delete.ts b/packages/backend/src/server/api/endpoints/blocking/delete.ts index ad00fd1e0b..6e9fead113 100644 --- a/packages/backend/src/server/api/endpoints/blocking/delete.ts +++ b/packages/backend/src/server/api/endpoints/blocking/delete.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/blocking/list.ts b/packages/backend/src/server/api/endpoints/blocking/list.ts index a315ccde9e..bbae0fe661 100644 --- a/packages/backend/src/server/api/endpoints/blocking/list.ts +++ b/packages/backend/src/server/api/endpoints/blocking/list.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, diff --git a/packages/backend/src/server/api/endpoints/channels/create.ts b/packages/backend/src/server/api/endpoints/channels/create.ts index dc7afadfa2..0491f7638f 100644 --- a/packages/backend/src/server/api/endpoints/channels/create.ts +++ b/packages/backend/src/server/api/endpoints/channels/create.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 128 }, diff --git a/packages/backend/src/server/api/endpoints/channels/featured.ts b/packages/backend/src/server/api/endpoints/channels/featured.ts index 4d07e720a9..c1e4ba2dec 100644 --- a/packages/backend/src/server/api/endpoints/channels/featured.ts +++ b/packages/backend/src/server/api/endpoints/channels/featured.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/channels/follow.ts b/packages/backend/src/server/api/endpoints/channels/follow.ts index 01156d1c2c..c831db4b8c 100644 --- a/packages/backend/src/server/api/endpoints/channels/follow.ts +++ b/packages/backend/src/server/api/endpoints/channels/follow.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { channelId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/followed.ts b/packages/backend/src/server/api/endpoints/channels/followed.ts index 0e75f06f47..79b12514ff 100644 --- a/packages/backend/src/server/api/endpoints/channels/followed.ts +++ b/packages/backend/src/server/api/endpoints/channels/followed.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { sinceId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/owned.ts b/packages/backend/src/server/api/endpoints/channels/owned.ts index f8acae836b..c4c250fab1 100644 --- a/packages/backend/src/server/api/endpoints/channels/owned.ts +++ b/packages/backend/src/server/api/endpoints/channels/owned.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { sinceId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/show.ts b/packages/backend/src/server/api/endpoints/channels/show.ts index fb2c7b5adf..48d9fe29c1 100644 --- a/packages/backend/src/server/api/endpoints/channels/show.ts +++ b/packages/backend/src/server/api/endpoints/channels/show.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { channelId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index a870ecccbb..6f35fd966c 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { channelId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/unfollow.ts b/packages/backend/src/server/api/endpoints/channels/unfollow.ts index 42a0eb0a5a..e6524bf555 100644 --- a/packages/backend/src/server/api/endpoints/channels/unfollow.ts +++ b/packages/backend/src/server/api/endpoints/channels/unfollow.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { channelId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/update.ts b/packages/backend/src/server/api/endpoints/channels/update.ts index 5a593c62e0..3ee36d97ec 100644 --- a/packages/backend/src/server/api/endpoints/channels/update.ts +++ b/packages/backend/src/server/api/endpoints/channels/update.ts @@ -36,7 +36,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { channelId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/charts/active-users.ts b/packages/backend/src/server/api/endpoints/charts/active-users.ts index a99269da0c..dcb155b937 100644 --- a/packages/backend/src/server/api/endpoints/charts/active-users.ts +++ b/packages/backend/src/server/api/endpoints/charts/active-users.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(activeUsersChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/ap-request.ts b/packages/backend/src/server/api/endpoints/charts/ap-request.ts index 403a933807..cb8046236a 100644 --- a/packages/backend/src/server/api/endpoints/charts/ap-request.ts +++ b/packages/backend/src/server/api/endpoints/charts/ap-request.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(apRequestChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/drive.ts b/packages/backend/src/server/api/endpoints/charts/drive.ts index 2c815367f6..35ec62e671 100644 --- a/packages/backend/src/server/api/endpoints/charts/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/drive.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(driveChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/federation.ts b/packages/backend/src/server/api/endpoints/charts/federation.ts index c48613ffac..07492cf6c2 100644 --- a/packages/backend/src/server/api/endpoints/charts/federation.ts +++ b/packages/backend/src/server/api/endpoints/charts/federation.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(federationChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/hashtag.ts b/packages/backend/src/server/api/endpoints/charts/hashtag.ts index 3cb0784ba4..537bb45bf1 100644 --- a/packages/backend/src/server/api/endpoints/charts/hashtag.ts +++ b/packages/backend/src/server/api/endpoints/charts/hashtag.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(hashtagChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/instance.ts b/packages/backend/src/server/api/endpoints/charts/instance.ts index 2da3cd3c3a..cd5c044ad9 100644 --- a/packages/backend/src/server/api/endpoints/charts/instance.ts +++ b/packages/backend/src/server/api/endpoints/charts/instance.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(instanceChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/notes.ts b/packages/backend/src/server/api/endpoints/charts/notes.ts index c48bc67e1c..b30f0894c2 100644 --- a/packages/backend/src/server/api/endpoints/charts/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/notes.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(notesChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/user/drive.ts b/packages/backend/src/server/api/endpoints/charts/user/drive.ts index 62f7afa435..cc1aac5fea 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/drive.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(perUserDriveChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/user/following.ts b/packages/backend/src/server/api/endpoints/charts/user/following.ts index d6d2d5e3ee..1b68bdca1c 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/following.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/following.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(perUserFollowingChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/user/notes.ts b/packages/backend/src/server/api/endpoints/charts/user/notes.ts index becde8b1df..55e6368187 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/notes.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(perUserNotesChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts index 8f4d9a812a..f72424d2cf 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(perUserReactionsChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/users.ts b/packages/backend/src/server/api/endpoints/charts/users.ts index 855fc6cd07..2dfdfefd78 100644 --- a/packages/backend/src/server/api/endpoints/charts/users.ts +++ b/packages/backend/src/server/api/endpoints/charts/users.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(usersChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/clips/add-note.ts b/packages/backend/src/server/api/endpoints/clips/add-note.ts index e7dc25fe40..7700382bd3 100644 --- a/packages/backend/src/server/api/endpoints/clips/add-note.ts +++ b/packages/backend/src/server/api/endpoints/clips/add-note.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clipId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts index b6ebf866b8..86164e69af 100644 --- a/packages/backend/src/server/api/endpoints/clips/create.ts +++ b/packages/backend/src/server/api/endpoints/clips/create.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 100 }, diff --git a/packages/backend/src/server/api/endpoints/clips/delete.ts b/packages/backend/src/server/api/endpoints/clips/delete.ts index a263e10521..7f712450ae 100644 --- a/packages/backend/src/server/api/endpoints/clips/delete.ts +++ b/packages/backend/src/server/api/endpoints/clips/delete.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clipId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/clips/list.ts b/packages/backend/src/server/api/endpoints/clips/list.ts index 959b60e6f9..b8ee72af7c 100644 --- a/packages/backend/src/server/api/endpoints/clips/list.ts +++ b/packages/backend/src/server/api/endpoints/clips/list.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/clips/notes.ts b/packages/backend/src/server/api/endpoints/clips/notes.ts index dd76e396bf..698b9d428d 100644 --- a/packages/backend/src/server/api/endpoints/clips/notes.ts +++ b/packages/backend/src/server/api/endpoints/clips/notes.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clipId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/clips/show.ts b/packages/backend/src/server/api/endpoints/clips/show.ts index 7fe827a967..e1add3a0a6 100644 --- a/packages/backend/src/server/api/endpoints/clips/show.ts +++ b/packages/backend/src/server/api/endpoints/clips/show.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clipId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/clips/update.ts b/packages/backend/src/server/api/endpoints/clips/update.ts index b864497349..97134ac79a 100644 --- a/packages/backend/src/server/api/endpoints/clips/update.ts +++ b/packages/backend/src/server/api/endpoints/clips/update.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clipId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive.ts b/packages/backend/src/server/api/endpoints/drive.ts index 5fc1f64cf0..5ff383f0f4 100644 --- a/packages/backend/src/server/api/endpoints/drive.ts +++ b/packages/backend/src/server/api/endpoints/drive.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/drive/files.ts b/packages/backend/src/server/api/endpoints/drive/files.ts index 8ca9daed4d..998d964bc3 100644 --- a/packages/backend/src/server/api/endpoints/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/drive/files.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts index 20238c1b96..440dc856fd 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts index 8b7af3e54a..853723016e 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts @@ -14,7 +14,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { md5: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/create.ts b/packages/backend/src/server/api/endpoints/drive/files/create.ts index aafb650dd7..89c6c99f36 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts @@ -48,6 +48,7 @@ export const paramDef = { } as const; // eslint-disable-next-line import/no-default-export +// @ts-ignore export default define(meta, paramDef, async (ps, user, _, file, cleanup) => { // Get 'name' parameter let name = ps.name || file.originalname; diff --git a/packages/backend/src/server/api/endpoints/drive/files/delete.ts b/packages/backend/src/server/api/endpoints/drive/files/delete.ts index 664637a68f..8ae7e7effe 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/delete.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts index 98de790c0d..feb738be0d 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { md5: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/find.ts b/packages/backend/src/server/api/endpoints/drive/files/find.ts index 8d30c29da6..5419ba9196 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/show.ts b/packages/backend/src/server/api/endpoints/drive/files/show.ts index 8edb8785bc..932e692c4c 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/update.ts b/packages/backend/src/server/api/endpoints/drive/files/update.ts index d77deea7db..3972e56084 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/update.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts index a4619ebf36..5c688e883a 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts @@ -18,7 +18,7 @@ export const meta = { kind: 'write:drive', } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { url: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders.ts b/packages/backend/src/server/api/endpoints/drive/folders.ts index a543ae27df..4d8bc32dd7 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/create.ts b/packages/backend/src/server/api/endpoints/drive/folders/create.ts index ab48d5599e..994c537f9f 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/create.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', default: "Untitled", maxLength: 200 }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts index 51c0340529..58b9919595 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { folderId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/find.ts b/packages/backend/src/server/api/endpoints/drive/folders/find.ts index 057f40b1cc..333502f706 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/find.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/show.ts b/packages/backend/src/server/api/endpoints/drive/folders/show.ts index d31d7a4276..4bbd2dcf11 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/show.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { folderId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/update.ts b/packages/backend/src/server/api/endpoints/drive/folders/update.ts index c70b5a0d54..a4393d99b0 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/update.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { folderId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/stream.ts b/packages/backend/src/server/api/endpoints/drive/stream.ts index 921ae4c221..9d5cb02c70 100644 --- a/packages/backend/src/server/api/endpoints/drive/stream.ts +++ b/packages/backend/src/server/api/endpoints/drive/stream.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/email-address/available.ts b/packages/backend/src/server/api/endpoints/email-address/available.ts index cb740ffae7..8fee4ce509 100644 --- a/packages/backend/src/server/api/endpoints/email-address/available.ts +++ b/packages/backend/src/server/api/endpoints/email-address/available.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { emailAddress: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/endpoint.ts b/packages/backend/src/server/api/endpoints/endpoint.ts index b8fe030e8c..7c528114f2 100644 --- a/packages/backend/src/server/api/endpoints/endpoint.ts +++ b/packages/backend/src/server/api/endpoints/endpoint.ts @@ -7,7 +7,7 @@ export const meta = { tags: ['meta'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { endpoint: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/endpoints.ts b/packages/backend/src/server/api/endpoints/endpoints.ts index b090e0dced..ef6efc6fb3 100644 --- a/packages/backend/src/server/api/endpoints/endpoints.ts +++ b/packages/backend/src/server/api/endpoints/endpoints.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts index f0ab63f74b..3bffbc82bd 100644 --- a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts +++ b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/federation/followers.ts b/packages/backend/src/server/api/endpoints/federation/followers.ts index 5960e482c0..b716552322 100644 --- a/packages/backend/src/server/api/endpoints/federation/followers.ts +++ b/packages/backend/src/server/api/endpoints/federation/followers.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/federation/following.ts b/packages/backend/src/server/api/endpoints/federation/following.ts index 4f139b0c45..373c432be5 100644 --- a/packages/backend/src/server/api/endpoints/federation/following.ts +++ b/packages/backend/src/server/api/endpoints/federation/following.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index 494b5120ab..fb25199c73 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string', nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/federation/show-instance.ts b/packages/backend/src/server/api/endpoints/federation/show-instance.ts index cead515d81..590f8a7e86 100644 --- a/packages/backend/src/server/api/endpoints/federation/show-instance.ts +++ b/packages/backend/src/server/api/endpoints/federation/show-instance.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts index ebdc54d0a6..59661ea7c0 100644 --- a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts +++ b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts @@ -8,7 +8,7 @@ export const meta = { requireCredential: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/federation/users.ts b/packages/backend/src/server/api/endpoints/federation/users.ts index 294894cd92..f35471f062 100644 --- a/packages/backend/src/server/api/endpoints/federation/users.ts +++ b/packages/backend/src/server/api/endpoints/federation/users.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/following/create.ts b/packages/backend/src/server/api/endpoints/following/create.ts index 1edb3517a0..a18c44a1d8 100644 --- a/packages/backend/src/server/api/endpoints/following/create.ts +++ b/packages/backend/src/server/api/endpoints/following/create.ts @@ -57,7 +57,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/following/delete.ts b/packages/backend/src/server/api/endpoints/following/delete.ts index 2eb8636816..ec32c2c888 100644 --- a/packages/backend/src/server/api/endpoints/following/delete.ts +++ b/packages/backend/src/server/api/endpoints/following/delete.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/following/invalidate.ts b/packages/backend/src/server/api/endpoints/following/invalidate.ts index 8a1da3d299..137d366fce 100644 --- a/packages/backend/src/server/api/endpoints/following/invalidate.ts +++ b/packages/backend/src/server/api/endpoints/following/invalidate.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/following/requests/accept.ts b/packages/backend/src/server/api/endpoints/following/requests/accept.ts index 7040efcc80..adbbb3404a 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/accept.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/accept.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts index 4204f8526a..5e949af9de 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts @@ -33,7 +33,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/following/requests/list.ts b/packages/backend/src/server/api/endpoints/following/requests/list.ts index 17d576d1c0..563223fcae 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/list.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/list.ts @@ -35,7 +35,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/following/requests/reject.ts b/packages/backend/src/server/api/endpoints/following/requests/reject.ts index 9e345aa15f..f1502eba13 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/reject.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/reject.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/gallery/featured.ts b/packages/backend/src/server/api/endpoints/gallery/featured.ts index 6b347f9dea..ad994c386a 100644 --- a/packages/backend/src/server/api/endpoints/gallery/featured.ts +++ b/packages/backend/src/server/api/endpoints/gallery/featured.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/gallery/popular.ts b/packages/backend/src/server/api/endpoints/gallery/popular.ts index 57ead79826..9e5019ddef 100644 --- a/packages/backend/src/server/api/endpoints/gallery/popular.ts +++ b/packages/backend/src/server/api/endpoints/gallery/popular.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/gallery/posts.ts b/packages/backend/src/server/api/endpoints/gallery/posts.ts index c36e80b83c..40c9efaf51 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts index d64937d0bc..c963dc86d1 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts @@ -29,7 +29,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { title: { type: 'string', minLength: 1 }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts index 82ffd62d60..7fafc9288a 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { postId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts index 73d5a0ea99..ca6c06cf9e 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { postId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts index 819d360b14..0f8f3a6068 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { postId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts index fc38174810..30ccaf167e 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { postId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts index 1a86b56bc6..2b2e26aa5d 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { postId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/get-online-users-count.ts b/packages/backend/src/server/api/endpoints/get-online-users-count.ts index 855b9fc342..374d819ce7 100644 --- a/packages/backend/src/server/api/endpoints/get-online-users-count.ts +++ b/packages/backend/src/server/api/endpoints/get-online-users-count.ts @@ -9,7 +9,7 @@ export const meta = { requireCredential: false, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/hashtags/list.ts b/packages/backend/src/server/api/endpoints/hashtags/list.ts index 68f2b2bf57..3bd5305bd4 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/list.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/list.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/hashtags/search.ts b/packages/backend/src/server/api/endpoints/hashtags/search.ts index 9aa08ed28e..2af6b6d77c 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/search.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/search.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/hashtags/show.ts b/packages/backend/src/server/api/endpoints/hashtags/show.ts index 79b9613086..0770882141 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/show.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/show.ts @@ -23,7 +23,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { tag: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/hashtags/trend.ts b/packages/backend/src/server/api/endpoints/hashtags/trend.ts index de3e453c3e..6da5b90b28 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/trend.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/trend.ts @@ -53,7 +53,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/hashtags/users.ts b/packages/backend/src/server/api/endpoints/hashtags/users.ts index 1760732c1a..ff06d925dd 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/users.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/users.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { tag: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i.ts b/packages/backend/src/server/api/endpoints/i.ts index 091276ea27..f9c58c2479 100644 --- a/packages/backend/src/server/api/endpoints/i.ts +++ b/packages/backend/src/server/api/endpoints/i.ts @@ -13,7 +13,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/2fa/done.ts b/packages/backend/src/server/api/endpoints/i/2fa/done.ts index 8d82ab3886..1646b7bd89 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/done.ts @@ -8,7 +8,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { token: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts index 5052afda97..52a0afcbfd 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts @@ -21,7 +21,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clientDataJSON: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts index 2830f8994a..d9d2ec66c1 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { value: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts index da3ff421a7..86fc4fdffb 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts @@ -14,7 +14,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register.ts b/packages/backend/src/server/api/endpoints/i/2fa/register.ts index 32acc838b7..e550698abb 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register.ts @@ -11,7 +11,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts index 3004ce36a1..0469912340 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts @@ -9,7 +9,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts index b8e89bac72..c1ca445825 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts @@ -8,7 +8,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/apps.ts b/packages/backend/src/server/api/endpoints/i/apps.ts index f45b6745b8..0fe3db2d9f 100644 --- a/packages/backend/src/server/api/endpoints/i/apps.ts +++ b/packages/backend/src/server/api/endpoints/i/apps.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { sort: { type: 'string', enum: ['+createdAt', '-createdAt', '+lastUsedAt', '-lastUsedAt'] }, diff --git a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts index e417f3e81a..e2f5ceb7e1 100644 --- a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts +++ b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/change-password.ts b/packages/backend/src/server/api/endpoints/i/change-password.ts index eac60ee183..e68d18b86d 100644 --- a/packages/backend/src/server/api/endpoints/i/change-password.ts +++ b/packages/backend/src/server/api/endpoints/i/change-password.ts @@ -8,7 +8,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { currentPassword: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/delete-account.ts b/packages/backend/src/server/api/endpoints/i/delete-account.ts index 6f689c0b4e..188d2257aa 100644 --- a/packages/backend/src/server/api/endpoints/i/delete-account.ts +++ b/packages/backend/src/server/api/endpoints/i/delete-account.ts @@ -11,7 +11,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/export-blocking.ts b/packages/backend/src/server/api/endpoints/i/export-blocking.ts index afa6f2fc8e..808b546bdb 100644 --- a/packages/backend/src/server/api/endpoints/i/export-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/export-blocking.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/export-following.ts b/packages/backend/src/server/api/endpoints/i/export-following.ts index 4dd8cda398..10f8ee9ab2 100644 --- a/packages/backend/src/server/api/endpoints/i/export-following.ts +++ b/packages/backend/src/server/api/endpoints/i/export-following.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { excludeMuting: { type: 'boolean', default: false }, diff --git a/packages/backend/src/server/api/endpoints/i/export-mute.ts b/packages/backend/src/server/api/endpoints/i/export-mute.ts index ca8a7b997c..ab39508534 100644 --- a/packages/backend/src/server/api/endpoints/i/export-mute.ts +++ b/packages/backend/src/server/api/endpoints/i/export-mute.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/export-notes.ts b/packages/backend/src/server/api/endpoints/i/export-notes.ts index fc155d9d0f..770444d68b 100644 --- a/packages/backend/src/server/api/endpoints/i/export-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/export-notes.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts index 22cbf973f8..c0d9d924bd 100644 --- a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts +++ b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/favorites.ts b/packages/backend/src/server/api/endpoints/i/favorites.ts index 45f5d99cce..d6c12582d0 100644 --- a/packages/backend/src/server/api/endpoints/i/favorites.ts +++ b/packages/backend/src/server/api/endpoints/i/favorites.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts index 7578ed3216..173a502622 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts index fbab8795ca..31e9636f84 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts index 2b31b89ff1..c760dd0e23 100644 --- a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts +++ b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/import-blocking.ts b/packages/backend/src/server/api/endpoints/i/import-blocking.ts index b90bfb1402..e9cf6e562e 100644 --- a/packages/backend/src/server/api/endpoints/i/import-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/import-blocking.ts @@ -40,7 +40,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/import-following.ts b/packages/backend/src/server/api/endpoints/i/import-following.ts index 75388502a5..d9c831daf8 100644 --- a/packages/backend/src/server/api/endpoints/i/import-following.ts +++ b/packages/backend/src/server/api/endpoints/i/import-following.ts @@ -39,7 +39,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/import-muting.ts b/packages/backend/src/server/api/endpoints/i/import-muting.ts index e1c3df33e1..ac61a6c852 100644 --- a/packages/backend/src/server/api/endpoints/i/import-muting.ts +++ b/packages/backend/src/server/api/endpoints/i/import-muting.ts @@ -40,7 +40,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts index eb1302a98c..68f2b377a9 100644 --- a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts +++ b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts @@ -39,7 +39,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index bb1d6a49b3..cecaa8ac44 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/page-likes.ts b/packages/backend/src/server/api/endpoints/i/page-likes.ts index 60ac3ccde1..d3b68acdc5 100644 --- a/packages/backend/src/server/api/endpoints/i/page-likes.ts +++ b/packages/backend/src/server/api/endpoints/i/page-likes.ts @@ -30,7 +30,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/pages.ts b/packages/backend/src/server/api/endpoints/i/pages.ts index dbc58021b9..09cff4a0fb 100644 --- a/packages/backend/src/server/api/endpoints/i/pages.ts +++ b/packages/backend/src/server/api/endpoints/i/pages.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/pin.ts b/packages/backend/src/server/api/endpoints/i/pin.ts index a09618ebe8..a4dd64564a 100644 --- a/packages/backend/src/server/api/endpoints/i/pin.ts +++ b/packages/backend/src/server/api/endpoints/i/pin.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts index b0185a3e37..e6eb8d7ef0 100644 --- a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts +++ b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts @@ -10,7 +10,7 @@ export const meta = { kind: 'write:account', } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts index 45638c2579..12038999ae 100644 --- a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts @@ -10,7 +10,7 @@ export const meta = { kind: 'write:account', } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/read-announcement.ts b/packages/backend/src/server/api/endpoints/i/read-announcement.ts index f3cedddb35..2d8c723e4e 100644 --- a/packages/backend/src/server/api/endpoints/i/read-announcement.ts +++ b/packages/backend/src/server/api/endpoints/i/read-announcement.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { announcementId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts index 71a3ea08af..1462b902c4 100644 --- a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts +++ b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts @@ -10,7 +10,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts index 0429cd283a..c371da87d8 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { scope: { type: 'array', default: [], items: { diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts index 194a922718..bd243946b0 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { key: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/registry/get.ts b/packages/backend/src/server/api/endpoints/i/registry/get.ts index 7d413e3528..2bc6975bb3 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { key: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts index 52e0d6fac5..78bb9dd348 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { scope: { type: 'array', default: [], items: { diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys.ts b/packages/backend/src/server/api/endpoints/i/registry/keys.ts index c494ed8f5c..5f627125d5 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { scope: { type: 'array', default: [], items: { diff --git a/packages/backend/src/server/api/endpoints/i/registry/remove.ts b/packages/backend/src/server/api/endpoints/i/registry/remove.ts index 5bc55bd297..6a005d10d4 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/remove.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/remove.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { key: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts index e04d123a1f..09de7125c9 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/registry/set.ts b/packages/backend/src/server/api/endpoints/i/registry/set.ts index c78f4383be..28d9555b1c 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/set.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/set.ts @@ -9,7 +9,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { key: { type: 'string', minLength: 1 }, diff --git a/packages/backend/src/server/api/endpoints/i/revoke-token.ts b/packages/backend/src/server/api/endpoints/i/revoke-token.ts index 14800346c1..b889e795be 100644 --- a/packages/backend/src/server/api/endpoints/i/revoke-token.ts +++ b/packages/backend/src/server/api/endpoints/i/revoke-token.ts @@ -8,7 +8,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { tokenId: { type: 'string', format: 'misskey:id' }, 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 468972c239..f7a98a2332 100644 --- a/packages/backend/src/server/api/endpoints/i/signin-history.ts +++ b/packages/backend/src/server/api/endpoints/i/signin-history.ts @@ -8,7 +8,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/unpin.ts b/packages/backend/src/server/api/endpoints/i/unpin.ts index 895bfd0c28..5ab1e95c59 100644 --- a/packages/backend/src/server/api/endpoints/i/unpin.ts +++ b/packages/backend/src/server/api/endpoints/i/unpin.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/update-email.ts b/packages/backend/src/server/api/endpoints/i/update-email.ts index 1450eabc2a..21a2081836 100644 --- a/packages/backend/src/server/api/endpoints/i/update-email.ts +++ b/packages/backend/src/server/api/endpoints/i/update-email.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 0a5188609b..d800f23f8e 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -67,7 +67,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { ...Users.nameSchema, nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts index 6c38240913..a026d8d669 100644 --- a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts +++ b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/messaging/history.ts b/packages/backend/src/server/api/endpoints/messaging/history.ts index 5c1c040cc3..cb27f37fbb 100644 --- a/packages/backend/src/server/api/endpoints/messaging/history.ts +++ b/packages/backend/src/server/api/endpoints/messaging/history.ts @@ -21,7 +21,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages.ts b/packages/backend/src/server/api/endpoints/messaging/messages.ts index ce477feac4..a21f8d8fc1 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts index 60b1e2cdce..c2f9e71b5c 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts @@ -64,7 +64,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts index 67ecd4a1e6..8f5d6da665 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { messageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts index 1d0ddaf98f..2a18d9c379 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { messageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index fdd1586ca5..5b5604f6a6 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -440,7 +440,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { detail: { type: 'boolean', default: true }, diff --git a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts index e61c78754f..56fc459d7e 100644 --- a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts +++ b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { session: { type: 'string', nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/mute/create.ts b/packages/backend/src/server/api/endpoints/mute/create.ts index 3ef97a1491..b8439cd3f6 100644 --- a/packages/backend/src/server/api/endpoints/mute/create.ts +++ b/packages/backend/src/server/api/endpoints/mute/create.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/mute/delete.ts b/packages/backend/src/server/api/endpoints/mute/delete.ts index 8a88e13039..ff66aa26cf 100644 --- a/packages/backend/src/server/api/endpoints/mute/delete.ts +++ b/packages/backend/src/server/api/endpoints/mute/delete.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/mute/list.ts b/packages/backend/src/server/api/endpoints/mute/list.ts index fd8443e2b7..a728affe05 100644 --- a/packages/backend/src/server/api/endpoints/mute/list.ts +++ b/packages/backend/src/server/api/endpoints/mute/list.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, diff --git a/packages/backend/src/server/api/endpoints/my/apps.ts b/packages/backend/src/server/api/endpoints/my/apps.ts index 8dee11fb93..5d08f34dac 100644 --- a/packages/backend/src/server/api/endpoints/my/apps.ts +++ b/packages/backend/src/server/api/endpoints/my/apps.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index 0106bac516..28c49b0e63 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { local: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/notes/children.ts b/packages/backend/src/server/api/endpoints/notes/children.ts index ea2c166b75..43471b8ed5 100644 --- a/packages/backend/src/server/api/endpoints/notes/children.ts +++ b/packages/backend/src/server/api/endpoints/notes/children.ts @@ -23,7 +23,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/clips.ts b/packages/backend/src/server/api/endpoints/notes/clips.ts index 2caa3a499f..2209894a96 100644 --- a/packages/backend/src/server/api/endpoints/notes/clips.ts +++ b/packages/backend/src/server/api/endpoints/notes/clips.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts index c199a3f831..c785496f2e 100644 --- a/packages/backend/src/server/api/endpoints/notes/conversation.ts +++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 7d81abc3a7..7ac318c501 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -95,7 +95,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { visibility: { type: 'string', enum: ['public', 'home', 'followers', 'specified'], default: "public" }, diff --git a/packages/backend/src/server/api/endpoints/notes/delete.ts b/packages/backend/src/server/api/endpoints/notes/delete.ts index 62a2a98469..6084c93240 100644 --- a/packages/backend/src/server/api/endpoints/notes/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/delete.ts @@ -33,7 +33,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts index 570e2354ba..eaf2b1ac0f 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts index b33a5f148b..1a64fc430e 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index 8a4297de62..11738cbe26 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts index 23ca8752c9..54cf51c135 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { withFiles: { type: 'boolean' }, 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 ba6f3b5927..f75cbeb008 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, 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 7c118317d6..9793919487 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { withFiles: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/notes/mentions.ts b/packages/backend/src/server/api/endpoints/notes/mentions.ts index 265882fa70..41f2ad5244 100644 --- a/packages/backend/src/server/api/endpoints/notes/mentions.ts +++ b/packages/backend/src/server/api/endpoints/notes/mentions.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { following: { type: 'boolean', default: false }, diff --git a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts index 4030694b58..0f2d4699de 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts index 739df8a03c..d889ba6f1f 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts @@ -58,7 +58,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts index fdcaed64e1..746344df3b 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts @@ -29,7 +29,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts index a898b3249a..9edbabc469 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts index 53cadac7c9..d5e2e138a8 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index aa5c2c0a45..a964a0c766 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/replies.ts b/packages/backend/src/server/api/endpoints/notes/replies.ts index b88e3d7168..78559abd5a 100644 --- a/packages/backend/src/server/api/endpoints/notes/replies.ts +++ b/packages/backend/src/server/api/endpoints/notes/replies.ts @@ -21,7 +21,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index bf18a20b97..ff55f862aa 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { tag: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index bcb9c2b8a1..7034645956 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -27,7 +27,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { query: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts index 8f75eeb5e8..a300f1aefa 100644 --- a/packages/backend/src/server/api/endpoints/notes/show.ts +++ b/packages/backend/src/server/api/endpoints/notes/show.ts @@ -23,7 +23,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/state.ts b/packages/backend/src/server/api/endpoints/notes/state.ts index cf5f08ea9a..2e7f1f75c3 100644 --- a/packages/backend/src/server/api/endpoints/notes/state.ts +++ b/packages/backend/src/server/api/endpoints/notes/state.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts index 4068a8a571..7b3c88785b 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts @@ -21,7 +21,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts index 09b64f7277..66d631640a 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index c06a98feaa..14d0d71704 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -27,7 +27,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts index d85c8b96f9..a1d8fae10b 100644 --- a/packages/backend/src/server/api/endpoints/notes/translate.ts +++ b/packages/backend/src/server/api/endpoints/notes/translate.ts @@ -27,7 +27,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/unrenote.ts b/packages/backend/src/server/api/endpoints/notes/unrenote.ts index c10d277de1..5b39239279 100644 --- a/packages/backend/src/server/api/endpoints/notes/unrenote.ts +++ b/packages/backend/src/server/api/endpoints/notes/unrenote.ts @@ -27,7 +27,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, 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 018e3e06a8..68a15f05fb 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 @@ -30,7 +30,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/watching/create.ts b/packages/backend/src/server/api/endpoints/notes/watching/create.ts index b19d370027..ed35638329 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/create.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts index f9ceb49278..1918b887ef 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notifications/create.ts b/packages/backend/src/server/api/endpoints/notifications/create.ts index b5bfb34f4b..590f1c540f 100644 --- a/packages/backend/src/server/api/endpoints/notifications/create.ts +++ b/packages/backend/src/server/api/endpoints/notifications/create.ts @@ -12,7 +12,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { body: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts index 12dc43de16..5ad6605e7f 100644 --- a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts @@ -10,7 +10,7 @@ export const meta = { kind: 'write:notifications', } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/notifications/read.ts b/packages/backend/src/server/api/endpoints/notifications/read.ts index 6e5b5616dd..93ac75f649 100644 --- a/packages/backend/src/server/api/endpoints/notifications/read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/read.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { notificationId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/page-push.ts b/packages/backend/src/server/api/endpoints/page-push.ts index 20334f33fc..690cd0884d 100644 --- a/packages/backend/src/server/api/endpoints/page-push.ts +++ b/packages/backend/src/server/api/endpoints/page-push.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/pages/create.ts b/packages/backend/src/server/api/endpoints/pages/create.ts index 6c00a2f779..c6d50e5cdf 100644 --- a/packages/backend/src/server/api/endpoints/pages/create.ts +++ b/packages/backend/src/server/api/endpoints/pages/create.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { title: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/pages/delete.ts b/packages/backend/src/server/api/endpoints/pages/delete.ts index c41373bb7c..2933e04174 100644 --- a/packages/backend/src/server/api/endpoints/pages/delete.ts +++ b/packages/backend/src/server/api/endpoints/pages/delete.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/pages/featured.ts b/packages/backend/src/server/api/endpoints/pages/featured.ts index 38aa4dfacc..dbd8737b08 100644 --- a/packages/backend/src/server/api/endpoints/pages/featured.ts +++ b/packages/backend/src/server/api/endpoints/pages/featured.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/pages/like.ts b/packages/backend/src/server/api/endpoints/pages/like.ts index d286fd2bfd..0eb110732f 100644 --- a/packages/backend/src/server/api/endpoints/pages/like.ts +++ b/packages/backend/src/server/api/endpoints/pages/like.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts index 95243e411f..e330460f23 100644 --- a/packages/backend/src/server/api/endpoints/pages/show.ts +++ b/packages/backend/src/server/api/endpoints/pages/show.ts @@ -23,7 +23,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/pages/unlike.ts b/packages/backend/src/server/api/endpoints/pages/unlike.ts index 582c924d91..f8efe8969a 100644 --- a/packages/backend/src/server/api/endpoints/pages/unlike.ts +++ b/packages/backend/src/server/api/endpoints/pages/unlike.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/pages/update.ts b/packages/backend/src/server/api/endpoints/pages/update.ts index 686271cf46..8c81ea7463 100644 --- a/packages/backend/src/server/api/endpoints/pages/update.ts +++ b/packages/backend/src/server/api/endpoints/pages/update.ts @@ -42,7 +42,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/ping.ts b/packages/backend/src/server/api/endpoints/ping.ts index 964401e19b..4f68965598 100644 --- a/packages/backend/src/server/api/endpoints/ping.ts +++ b/packages/backend/src/server/api/endpoints/ping.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/pinned-users.ts b/packages/backend/src/server/api/endpoints/pinned-users.ts index 83657f8bf9..61c67949cf 100644 --- a/packages/backend/src/server/api/endpoints/pinned-users.ts +++ b/packages/backend/src/server/api/endpoints/pinned-users.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/promo/read.ts b/packages/backend/src/server/api/endpoints/promo/read.ts index 99be33fb0c..b811159834 100644 --- a/packages/backend/src/server/api/endpoints/promo/read.ts +++ b/packages/backend/src/server/api/endpoints/promo/read.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/request-reset-password.ts b/packages/backend/src/server/api/endpoints/request-reset-password.ts index 193c3ee79d..af190583c0 100644 --- a/packages/backend/src/server/api/endpoints/request-reset-password.ts +++ b/packages/backend/src/server/api/endpoints/request-reset-password.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { username: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/reset-db.ts b/packages/backend/src/server/api/endpoints/reset-db.ts index 1c1cb3f136..5a72c306ba 100644 --- a/packages/backend/src/server/api/endpoints/reset-db.ts +++ b/packages/backend/src/server/api/endpoints/reset-db.ts @@ -10,7 +10,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/reset-password.ts b/packages/backend/src/server/api/endpoints/reset-password.ts index 04048b9ef1..880ff682fb 100644 --- a/packages/backend/src/server/api/endpoints/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/reset-password.ts @@ -12,7 +12,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { token: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/server-info.ts b/packages/backend/src/server/api/endpoints/server-info.ts index 4a5bc6a86c..97245575e8 100644 --- a/packages/backend/src/server/api/endpoints/server-info.ts +++ b/packages/backend/src/server/api/endpoints/server-info.ts @@ -8,7 +8,7 @@ export const meta = { tags: ['meta'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/stats.ts b/packages/backend/src/server/api/endpoints/stats.ts index 8abae921ac..7863d439ca 100644 --- a/packages/backend/src/server/api/endpoints/stats.ts +++ b/packages/backend/src/server/api/endpoints/stats.ts @@ -43,7 +43,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/sw/register.ts b/packages/backend/src/server/api/endpoints/sw/register.ts index 459b0dd969..9971bfb7d0 100644 --- a/packages/backend/src/server/api/endpoints/sw/register.ts +++ b/packages/backend/src/server/api/endpoints/sw/register.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { endpoint: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/sw/unregister.ts b/packages/backend/src/server/api/endpoints/sw/unregister.ts index ec994c37c2..fc5fb0ce92 100644 --- a/packages/backend/src/server/api/endpoints/sw/unregister.ts +++ b/packages/backend/src/server/api/endpoints/sw/unregister.ts @@ -7,7 +7,7 @@ export const meta = { requireCredential: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { endpoint: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/test.ts b/packages/backend/src/server/api/endpoints/test.ts index 820448e677..ee04009308 100644 --- a/packages/backend/src/server/api/endpoints/test.ts +++ b/packages/backend/src/server/api/endpoints/test.ts @@ -4,7 +4,7 @@ export const meta = { requireCredential: false, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { required: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/username/available.ts b/packages/backend/src/server/api/endpoints/username/available.ts index 6e38d4d310..4564784a9b 100644 --- a/packages/backend/src/server/api/endpoints/username/available.ts +++ b/packages/backend/src/server/api/endpoints/username/available.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { username: Users.localUsernameSchema, diff --git a/packages/backend/src/server/api/endpoints/users.ts b/packages/backend/src/server/api/endpoints/users.ts index 0c03ac05c3..2406fcd2fc 100644 --- a/packages/backend/src/server/api/endpoints/users.ts +++ b/packages/backend/src/server/api/endpoints/users.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/users/clips.ts b/packages/backend/src/server/api/endpoints/users/clips.ts index e224bdf603..7abb94e2cf 100644 --- a/packages/backend/src/server/api/endpoints/users/clips.ts +++ b/packages/backend/src/server/api/endpoints/users/clips.ts @@ -6,7 +6,7 @@ export const meta = { tags: ['users', 'clips'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts index 5607b4cc73..75f13a2929 100644 --- a/packages/backend/src/server/api/endpoints/users/followers.ts +++ b/packages/backend/src/server/api/endpoints/users/followers.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index 36943232d1..b1af55169c 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts index e874a54c77..7accc0b627 100644 --- a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts @@ -6,7 +6,7 @@ export const meta = { tags: ['users', 'gallery'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts index a08587cd16..5173982840 100644 --- a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts +++ b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts @@ -39,7 +39,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/create.ts b/packages/backend/src/server/api/endpoints/users/groups/create.ts index e7bc95791f..358d3828a0 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/create.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/create.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 100 }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/delete.ts b/packages/backend/src/server/api/endpoints/users/groups/delete.ts index cb30b4d813..ca8d864dcd 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/delete.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts index 7a6a620cb3..31d3461280 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { invitationId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts index b5c7f0908a..29b7612a8a 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { invitationId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/invite.ts b/packages/backend/src/server/api/endpoints/users/groups/invite.ts index ba78a28a38..31eef02b2f 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invite.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invite.ts @@ -40,7 +40,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/joined.ts b/packages/backend/src/server/api/endpoints/users/groups/joined.ts index 192a52a66b..465585376e 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/joined.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/joined.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/users/groups/leave.ts b/packages/backend/src/server/api/endpoints/users/groups/leave.ts index b7c7b328fd..56b5330c83 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/leave.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/leave.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/owned.ts b/packages/backend/src/server/api/endpoints/users/groups/owned.ts index 4592fc437f..a3724a0547 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/owned.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/owned.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/users/groups/pull.ts b/packages/backend/src/server/api/endpoints/users/groups/pull.ts index d50f61b159..dd93faa62e 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/pull.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/show.ts b/packages/backend/src/server/api/endpoints/users/groups/show.ts index 230254060d..799ec3202e 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/show.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/show.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts index 4b5206fa18..bb3b7f11c2 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/update.ts b/packages/backend/src/server/api/endpoints/users/groups/update.ts index 0714fb4bd4..6c8851889a 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/update.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/update.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/create.ts b/packages/backend/src/server/api/endpoints/users/lists/create.ts index 0a74424e0e..c0c37f96f1 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/create.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 100 }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/delete.ts b/packages/backend/src/server/api/endpoints/users/lists/delete.ts index 6795a227dc..0f7fdbc908 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/delete.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/list.ts b/packages/backend/src/server/api/endpoints/users/lists/list.ts index d439723403..5245c57849 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/list.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/list.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/users/lists/pull.ts b/packages/backend/src/server/api/endpoints/users/lists/pull.ts index 5eca5a999d..45b0b41564 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/pull.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/push.ts b/packages/backend/src/server/api/endpoints/users/lists/push.ts index 68a1f00774..252f7e6e19 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/push.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/push.ts @@ -38,7 +38,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/show.ts b/packages/backend/src/server/api/endpoints/users/lists/show.ts index 3e9aa836ba..91a2bf55a4 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/show.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/show.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/update.ts b/packages/backend/src/server/api/endpoints/users/lists/update.ts index ee1489fc6a..3e3f6ec9fe 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/update.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/update.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { 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 956d90b7ad..4c27fb8ee4 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/pages.ts b/packages/backend/src/server/api/endpoints/users/pages.ts index 873b5e80fa..f7b39b75fd 100644 --- a/packages/backend/src/server/api/endpoints/users/pages.ts +++ b/packages/backend/src/server/api/endpoints/users/pages.ts @@ -6,7 +6,7 @@ export const meta = { tags: ['users', 'pages'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/reactions.ts b/packages/backend/src/server/api/endpoints/users/reactions.ts index 8d968210bc..c9b5a95639 100644 --- a/packages/backend/src/server/api/endpoints/users/reactions.ts +++ b/packages/backend/src/server/api/endpoints/users/reactions.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/recommendation.ts b/packages/backend/src/server/api/endpoints/users/recommendation.ts index 4a2d8d7e4a..78c2f3e1a4 100644 --- a/packages/backend/src/server/api/endpoints/users/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/users/recommendation.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/users/relation.ts b/packages/backend/src/server/api/endpoints/users/relation.ts index fac1a4b92d..140126cab5 100644 --- a/packages/backend/src/server/api/endpoints/users/relation.ts +++ b/packages/backend/src/server/api/endpoints/users/relation.ts @@ -93,7 +93,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { diff --git a/packages/backend/src/server/api/endpoints/users/report-abuse.ts b/packages/backend/src/server/api/endpoints/users/report-abuse.ts index 1df5e1573f..717724a4cf 100644 --- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts +++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index 433779ae2d..15a93bc4f8 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { username: { type: 'string', nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts index 8c28e7c3a6..9d772f0968 100644 --- a/packages/backend/src/server/api/endpoints/users/search.ts +++ b/packages/backend/src/server/api/endpoints/users/search.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { query: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index 29c90963ad..cb42cc80a0 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/stats.ts b/packages/backend/src/server/api/endpoints/users/stats.ts index 29dd8fdf93..2f4ca10fc1 100644 --- a/packages/backend/src/server/api/endpoints/users/stats.ts +++ b/packages/backend/src/server/api/endpoints/users/stats.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, From beb451fd192c155763a76271415f8f875fee2cac Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 20 Feb 2022 01:57:15 +0900 Subject: [PATCH 04/10] use ajv/dist/core --- packages/backend/src/server/api/define.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/define.ts b/packages/backend/src/server/api/define.ts index e2a34f47a5..41978efe81 100644 --- a/packages/backend/src/server/api/define.ts +++ b/packages/backend/src/server/api/define.ts @@ -6,7 +6,7 @@ import { ApiError } from './error'; import { Schema, SchemaType } from '@/misc/schema'; import { AccessToken } from '@/models/entities/access-token'; import { ValidateFunction } from 'ajv'; -import { JTDDataType } from 'ajv/dist/types/jtd-schema'; +import { JTDDataType } from 'ajv/dist/core'; import { apiLogger } from './logger'; type SimpleUserInfo = { From 37cb93be101bf4805aad40e534a4fe2c336797f1 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 20 Feb 2022 12:51:20 +0900 Subject: [PATCH 05/10] revert try --- packages/backend/src/server/api/define.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/backend/src/server/api/define.ts b/packages/backend/src/server/api/define.ts index 41978efe81..6ed8cb3d06 100644 --- a/packages/backend/src/server/api/define.ts +++ b/packages/backend/src/server/api/define.ts @@ -39,13 +39,7 @@ ajv.addFormat('misskey:id', /^[a-z0-9]+$/); export default function (meta: T, paramDef: Ps, cb: executor) : (params: any, user: T['requireCredential'] extends true ? SimpleUserInfo : SimpleUserInfo | null, token: AccessToken | null, file?: any) => Promise { - let validate: ValidateFunction>; - - try { - validate = ajv.compile(paramDef); - } catch (error) { - apiLogger.error('FAILED TO COMPILE SCHEMA ' + JSON.stringify({ param: paramDef, error })); - } + const validate = ajv.compile(paramDef); return (params: any, user: T['requireCredential'] extends true ? SimpleUserInfo : SimpleUserInfo | null, token: AccessToken | null, file?: any) => { function cleanup() { From 5c0f9b14831e3423a593fe25a2f6c6d9acd4dac7 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 20 Feb 2022 13:08:52 +0900 Subject: [PATCH 06/10] clean up --- packages/backend/src/server/api/define.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/backend/src/server/api/define.ts b/packages/backend/src/server/api/define.ts index 6ed8cb3d06..83fc1e8d4f 100644 --- a/packages/backend/src/server/api/define.ts +++ b/packages/backend/src/server/api/define.ts @@ -5,9 +5,6 @@ import { IEndpointMeta } from './endpoints'; import { ApiError } from './error'; import { Schema, SchemaType } from '@/misc/schema'; import { AccessToken } from '@/models/entities/access-token'; -import { ValidateFunction } from 'ajv'; -import { JTDDataType } from 'ajv/dist/core'; -import { apiLogger } from './logger'; type SimpleUserInfo = { id: ILocalUser['id']; From fcfb5ef0a3c2a674890e88291bb9db89c95c3a9f Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 20 Feb 2022 13:15:40 +0900 Subject: [PATCH 07/10] Fix ajv (#8333) * wip * :v: * use ajv/dist/core * revert try * clean up --- packages/backend/src/server/api/call.ts | 4 ++-- packages/backend/src/server/api/define.ts | 4 ++-- .../src/server/api/endpoints/admin/abuse-user-reports.ts | 2 +- .../backend/src/server/api/endpoints/admin/accounts/create.ts | 2 +- .../backend/src/server/api/endpoints/admin/accounts/delete.ts | 2 +- packages/backend/src/server/api/endpoints/admin/ad/create.ts | 2 +- packages/backend/src/server/api/endpoints/admin/ad/delete.ts | 2 +- packages/backend/src/server/api/endpoints/admin/ad/list.ts | 2 +- packages/backend/src/server/api/endpoints/admin/ad/update.ts | 2 +- .../src/server/api/endpoints/admin/announcements/create.ts | 2 +- .../src/server/api/endpoints/admin/announcements/delete.ts | 2 +- .../src/server/api/endpoints/admin/announcements/list.ts | 2 +- .../src/server/api/endpoints/admin/announcements/update.ts | 2 +- .../server/api/endpoints/admin/delete-all-files-of-a-user.ts | 2 +- .../server/api/endpoints/admin/drive/clean-remote-files.ts | 2 +- .../backend/src/server/api/endpoints/admin/drive/cleanup.ts | 2 +- .../backend/src/server/api/endpoints/admin/drive/files.ts | 2 +- .../backend/src/server/api/endpoints/admin/drive/show-file.ts | 2 +- .../src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts | 2 +- packages/backend/src/server/api/endpoints/admin/emoji/add.ts | 2 +- packages/backend/src/server/api/endpoints/admin/emoji/copy.ts | 2 +- .../src/server/api/endpoints/admin/emoji/delete-bulk.ts | 2 +- .../backend/src/server/api/endpoints/admin/emoji/delete.ts | 2 +- .../src/server/api/endpoints/admin/emoji/import-zip.ts | 2 +- .../src/server/api/endpoints/admin/emoji/list-remote.ts | 2 +- packages/backend/src/server/api/endpoints/admin/emoji/list.ts | 2 +- .../server/api/endpoints/admin/emoji/remove-aliases-bulk.ts | 2 +- .../src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts | 2 +- .../src/server/api/endpoints/admin/emoji/set-category-bulk.ts | 2 +- .../backend/src/server/api/endpoints/admin/emoji/update.ts | 2 +- .../server/api/endpoints/admin/federation/delete-all-files.ts | 2 +- .../admin/federation/refresh-remote-instance-metadata.ts | 2 +- .../api/endpoints/admin/federation/remove-all-following.ts | 2 +- .../server/api/endpoints/admin/federation/update-instance.ts | 2 +- .../backend/src/server/api/endpoints/admin/get-index-stats.ts | 2 +- .../backend/src/server/api/endpoints/admin/get-table-stats.ts | 2 +- packages/backend/src/server/api/endpoints/admin/invite.ts | 2 +- .../backend/src/server/api/endpoints/admin/moderators/add.ts | 2 +- .../src/server/api/endpoints/admin/moderators/remove.ts | 2 +- .../backend/src/server/api/endpoints/admin/promo/create.ts | 2 +- .../backend/src/server/api/endpoints/admin/queue/clear.ts | 2 +- .../src/server/api/endpoints/admin/queue/deliver-delayed.ts | 2 +- .../src/server/api/endpoints/admin/queue/inbox-delayed.ts | 2 +- .../backend/src/server/api/endpoints/admin/queue/stats.ts | 2 +- packages/backend/src/server/api/endpoints/admin/relays/add.ts | 2 +- .../backend/src/server/api/endpoints/admin/relays/list.ts | 2 +- .../backend/src/server/api/endpoints/admin/relays/remove.ts | 2 +- .../backend/src/server/api/endpoints/admin/reset-password.ts | 2 +- .../server/api/endpoints/admin/resolve-abuse-user-report.ts | 2 +- packages/backend/src/server/api/endpoints/admin/send-email.ts | 2 +- .../backend/src/server/api/endpoints/admin/server-info.ts | 2 +- .../src/server/api/endpoints/admin/show-moderation-logs.ts | 2 +- packages/backend/src/server/api/endpoints/admin/show-user.ts | 2 +- packages/backend/src/server/api/endpoints/admin/show-users.ts | 2 +- .../backend/src/server/api/endpoints/admin/silence-user.ts | 2 +- .../backend/src/server/api/endpoints/admin/suspend-user.ts | 2 +- .../backend/src/server/api/endpoints/admin/unsilence-user.ts | 2 +- .../backend/src/server/api/endpoints/admin/unsuspend-user.ts | 2 +- .../backend/src/server/api/endpoints/admin/update-meta.ts | 2 +- packages/backend/src/server/api/endpoints/admin/vacuum.ts | 2 +- packages/backend/src/server/api/endpoints/announcements.ts | 2 +- packages/backend/src/server/api/endpoints/antennas/create.ts | 2 +- packages/backend/src/server/api/endpoints/antennas/delete.ts | 2 +- packages/backend/src/server/api/endpoints/antennas/list.ts | 2 +- packages/backend/src/server/api/endpoints/antennas/notes.ts | 2 +- packages/backend/src/server/api/endpoints/antennas/show.ts | 2 +- packages/backend/src/server/api/endpoints/antennas/update.ts | 2 +- packages/backend/src/server/api/endpoints/ap/get.ts | 2 +- packages/backend/src/server/api/endpoints/ap/show.ts | 2 +- packages/backend/src/server/api/endpoints/app/create.ts | 2 +- packages/backend/src/server/api/endpoints/app/show.ts | 2 +- packages/backend/src/server/api/endpoints/auth/accept.ts | 2 +- .../backend/src/server/api/endpoints/auth/session/generate.ts | 2 +- .../backend/src/server/api/endpoints/auth/session/show.ts | 2 +- .../backend/src/server/api/endpoints/auth/session/userkey.ts | 2 +- packages/backend/src/server/api/endpoints/blocking/create.ts | 2 +- packages/backend/src/server/api/endpoints/blocking/delete.ts | 2 +- packages/backend/src/server/api/endpoints/blocking/list.ts | 2 +- packages/backend/src/server/api/endpoints/channels/create.ts | 2 +- .../backend/src/server/api/endpoints/channels/featured.ts | 2 +- packages/backend/src/server/api/endpoints/channels/follow.ts | 2 +- .../backend/src/server/api/endpoints/channels/followed.ts | 2 +- packages/backend/src/server/api/endpoints/channels/owned.ts | 2 +- packages/backend/src/server/api/endpoints/channels/show.ts | 2 +- .../backend/src/server/api/endpoints/channels/timeline.ts | 2 +- .../backend/src/server/api/endpoints/channels/unfollow.ts | 2 +- packages/backend/src/server/api/endpoints/channels/update.ts | 2 +- .../backend/src/server/api/endpoints/charts/active-users.ts | 2 +- .../backend/src/server/api/endpoints/charts/ap-request.ts | 2 +- packages/backend/src/server/api/endpoints/charts/drive.ts | 2 +- .../backend/src/server/api/endpoints/charts/federation.ts | 2 +- packages/backend/src/server/api/endpoints/charts/hashtag.ts | 2 +- packages/backend/src/server/api/endpoints/charts/instance.ts | 2 +- packages/backend/src/server/api/endpoints/charts/notes.ts | 2 +- .../backend/src/server/api/endpoints/charts/user/drive.ts | 2 +- .../backend/src/server/api/endpoints/charts/user/following.ts | 2 +- .../backend/src/server/api/endpoints/charts/user/notes.ts | 2 +- .../backend/src/server/api/endpoints/charts/user/reactions.ts | 2 +- packages/backend/src/server/api/endpoints/charts/users.ts | 2 +- packages/backend/src/server/api/endpoints/clips/add-note.ts | 2 +- packages/backend/src/server/api/endpoints/clips/create.ts | 2 +- packages/backend/src/server/api/endpoints/clips/delete.ts | 2 +- packages/backend/src/server/api/endpoints/clips/list.ts | 2 +- packages/backend/src/server/api/endpoints/clips/notes.ts | 2 +- packages/backend/src/server/api/endpoints/clips/show.ts | 2 +- packages/backend/src/server/api/endpoints/clips/update.ts | 2 +- packages/backend/src/server/api/endpoints/drive.ts | 2 +- packages/backend/src/server/api/endpoints/drive/files.ts | 2 +- .../src/server/api/endpoints/drive/files/attached-notes.ts | 2 +- .../src/server/api/endpoints/drive/files/check-existence.ts | 2 +- .../backend/src/server/api/endpoints/drive/files/create.ts | 3 ++- .../backend/src/server/api/endpoints/drive/files/delete.ts | 2 +- .../src/server/api/endpoints/drive/files/find-by-hash.ts | 2 +- packages/backend/src/server/api/endpoints/drive/files/find.ts | 2 +- packages/backend/src/server/api/endpoints/drive/files/show.ts | 2 +- .../backend/src/server/api/endpoints/drive/files/update.ts | 2 +- .../src/server/api/endpoints/drive/files/upload-from-url.ts | 2 +- packages/backend/src/server/api/endpoints/drive/folders.ts | 2 +- .../backend/src/server/api/endpoints/drive/folders/create.ts | 2 +- .../backend/src/server/api/endpoints/drive/folders/delete.ts | 2 +- .../backend/src/server/api/endpoints/drive/folders/find.ts | 2 +- .../backend/src/server/api/endpoints/drive/folders/show.ts | 2 +- .../backend/src/server/api/endpoints/drive/folders/update.ts | 2 +- packages/backend/src/server/api/endpoints/drive/stream.ts | 2 +- .../src/server/api/endpoints/email-address/available.ts | 2 +- packages/backend/src/server/api/endpoints/endpoint.ts | 2 +- packages/backend/src/server/api/endpoints/endpoints.ts | 2 +- .../backend/src/server/api/endpoints/export-custom-emojis.ts | 2 +- .../backend/src/server/api/endpoints/federation/followers.ts | 2 +- .../backend/src/server/api/endpoints/federation/following.ts | 2 +- .../backend/src/server/api/endpoints/federation/instances.ts | 2 +- .../src/server/api/endpoints/federation/show-instance.ts | 2 +- .../src/server/api/endpoints/federation/update-remote-user.ts | 2 +- packages/backend/src/server/api/endpoints/federation/users.ts | 2 +- packages/backend/src/server/api/endpoints/following/create.ts | 2 +- packages/backend/src/server/api/endpoints/following/delete.ts | 2 +- .../backend/src/server/api/endpoints/following/invalidate.ts | 2 +- .../src/server/api/endpoints/following/requests/accept.ts | 2 +- .../src/server/api/endpoints/following/requests/cancel.ts | 2 +- .../src/server/api/endpoints/following/requests/list.ts | 2 +- .../src/server/api/endpoints/following/requests/reject.ts | 2 +- packages/backend/src/server/api/endpoints/gallery/featured.ts | 2 +- packages/backend/src/server/api/endpoints/gallery/popular.ts | 2 +- packages/backend/src/server/api/endpoints/gallery/posts.ts | 2 +- .../backend/src/server/api/endpoints/gallery/posts/create.ts | 2 +- .../backend/src/server/api/endpoints/gallery/posts/delete.ts | 2 +- .../backend/src/server/api/endpoints/gallery/posts/like.ts | 2 +- .../backend/src/server/api/endpoints/gallery/posts/show.ts | 2 +- .../backend/src/server/api/endpoints/gallery/posts/unlike.ts | 2 +- .../backend/src/server/api/endpoints/gallery/posts/update.ts | 2 +- .../src/server/api/endpoints/get-online-users-count.ts | 2 +- packages/backend/src/server/api/endpoints/hashtags/list.ts | 2 +- packages/backend/src/server/api/endpoints/hashtags/search.ts | 2 +- packages/backend/src/server/api/endpoints/hashtags/show.ts | 2 +- packages/backend/src/server/api/endpoints/hashtags/trend.ts | 2 +- packages/backend/src/server/api/endpoints/hashtags/users.ts | 2 +- packages/backend/src/server/api/endpoints/i.ts | 2 +- packages/backend/src/server/api/endpoints/i/2fa/done.ts | 2 +- packages/backend/src/server/api/endpoints/i/2fa/key-done.ts | 2 +- .../backend/src/server/api/endpoints/i/2fa/password-less.ts | 2 +- .../backend/src/server/api/endpoints/i/2fa/register-key.ts | 2 +- packages/backend/src/server/api/endpoints/i/2fa/register.ts | 2 +- packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts | 2 +- packages/backend/src/server/api/endpoints/i/2fa/unregister.ts | 2 +- packages/backend/src/server/api/endpoints/i/apps.ts | 2 +- .../backend/src/server/api/endpoints/i/authorized-apps.ts | 2 +- .../backend/src/server/api/endpoints/i/change-password.ts | 2 +- packages/backend/src/server/api/endpoints/i/delete-account.ts | 2 +- .../backend/src/server/api/endpoints/i/export-blocking.ts | 2 +- .../backend/src/server/api/endpoints/i/export-following.ts | 2 +- packages/backend/src/server/api/endpoints/i/export-mute.ts | 2 +- packages/backend/src/server/api/endpoints/i/export-notes.ts | 2 +- .../backend/src/server/api/endpoints/i/export-user-lists.ts | 2 +- packages/backend/src/server/api/endpoints/i/favorites.ts | 2 +- packages/backend/src/server/api/endpoints/i/gallery/likes.ts | 2 +- packages/backend/src/server/api/endpoints/i/gallery/posts.ts | 2 +- .../src/server/api/endpoints/i/get-word-muted-notes-count.ts | 2 +- .../backend/src/server/api/endpoints/i/import-blocking.ts | 2 +- .../backend/src/server/api/endpoints/i/import-following.ts | 2 +- packages/backend/src/server/api/endpoints/i/import-muting.ts | 2 +- .../backend/src/server/api/endpoints/i/import-user-lists.ts | 2 +- packages/backend/src/server/api/endpoints/i/notifications.ts | 2 +- packages/backend/src/server/api/endpoints/i/page-likes.ts | 2 +- packages/backend/src/server/api/endpoints/i/pages.ts | 2 +- packages/backend/src/server/api/endpoints/i/pin.ts | 2 +- .../src/server/api/endpoints/i/read-all-messaging-messages.ts | 2 +- .../src/server/api/endpoints/i/read-all-unread-notes.ts | 2 +- .../backend/src/server/api/endpoints/i/read-announcement.ts | 2 +- .../backend/src/server/api/endpoints/i/regenerate-token.ts | 2 +- .../backend/src/server/api/endpoints/i/registry/get-all.ts | 2 +- .../backend/src/server/api/endpoints/i/registry/get-detail.ts | 2 +- packages/backend/src/server/api/endpoints/i/registry/get.ts | 2 +- .../src/server/api/endpoints/i/registry/keys-with-type.ts | 2 +- packages/backend/src/server/api/endpoints/i/registry/keys.ts | 2 +- .../backend/src/server/api/endpoints/i/registry/remove.ts | 2 +- .../backend/src/server/api/endpoints/i/registry/scopes.ts | 2 +- packages/backend/src/server/api/endpoints/i/registry/set.ts | 2 +- packages/backend/src/server/api/endpoints/i/revoke-token.ts | 2 +- packages/backend/src/server/api/endpoints/i/signin-history.ts | 2 +- packages/backend/src/server/api/endpoints/i/unpin.ts | 2 +- packages/backend/src/server/api/endpoints/i/update-email.ts | 2 +- packages/backend/src/server/api/endpoints/i/update.ts | 2 +- .../backend/src/server/api/endpoints/i/user-group-invites.ts | 2 +- .../backend/src/server/api/endpoints/messaging/history.ts | 2 +- .../backend/src/server/api/endpoints/messaging/messages.ts | 2 +- .../src/server/api/endpoints/messaging/messages/create.ts | 2 +- .../src/server/api/endpoints/messaging/messages/delete.ts | 2 +- .../src/server/api/endpoints/messaging/messages/read.ts | 2 +- packages/backend/src/server/api/endpoints/meta.ts | 2 +- packages/backend/src/server/api/endpoints/miauth/gen-token.ts | 2 +- packages/backend/src/server/api/endpoints/mute/create.ts | 2 +- packages/backend/src/server/api/endpoints/mute/delete.ts | 2 +- packages/backend/src/server/api/endpoints/mute/list.ts | 2 +- packages/backend/src/server/api/endpoints/my/apps.ts | 2 +- packages/backend/src/server/api/endpoints/notes.ts | 2 +- packages/backend/src/server/api/endpoints/notes/children.ts | 2 +- packages/backend/src/server/api/endpoints/notes/clips.ts | 2 +- .../backend/src/server/api/endpoints/notes/conversation.ts | 2 +- packages/backend/src/server/api/endpoints/notes/create.ts | 2 +- packages/backend/src/server/api/endpoints/notes/delete.ts | 2 +- .../src/server/api/endpoints/notes/favorites/create.ts | 2 +- .../src/server/api/endpoints/notes/favorites/delete.ts | 2 +- packages/backend/src/server/api/endpoints/notes/featured.ts | 2 +- .../backend/src/server/api/endpoints/notes/global-timeline.ts | 2 +- .../backend/src/server/api/endpoints/notes/hybrid-timeline.ts | 2 +- .../backend/src/server/api/endpoints/notes/local-timeline.ts | 2 +- packages/backend/src/server/api/endpoints/notes/mentions.ts | 2 +- .../src/server/api/endpoints/notes/polls/recommendation.ts | 2 +- packages/backend/src/server/api/endpoints/notes/polls/vote.ts | 2 +- packages/backend/src/server/api/endpoints/notes/reactions.ts | 2 +- .../src/server/api/endpoints/notes/reactions/create.ts | 2 +- .../src/server/api/endpoints/notes/reactions/delete.ts | 2 +- packages/backend/src/server/api/endpoints/notes/renotes.ts | 2 +- packages/backend/src/server/api/endpoints/notes/replies.ts | 2 +- .../backend/src/server/api/endpoints/notes/search-by-tag.ts | 2 +- packages/backend/src/server/api/endpoints/notes/search.ts | 2 +- packages/backend/src/server/api/endpoints/notes/show.ts | 2 +- packages/backend/src/server/api/endpoints/notes/state.ts | 2 +- .../src/server/api/endpoints/notes/thread-muting/create.ts | 2 +- .../src/server/api/endpoints/notes/thread-muting/delete.ts | 2 +- packages/backend/src/server/api/endpoints/notes/timeline.ts | 2 +- packages/backend/src/server/api/endpoints/notes/translate.ts | 2 +- packages/backend/src/server/api/endpoints/notes/unrenote.ts | 2 +- .../src/server/api/endpoints/notes/user-list-timeline.ts | 2 +- .../backend/src/server/api/endpoints/notes/watching/create.ts | 2 +- .../backend/src/server/api/endpoints/notes/watching/delete.ts | 2 +- .../backend/src/server/api/endpoints/notifications/create.ts | 2 +- .../server/api/endpoints/notifications/mark-all-as-read.ts | 2 +- .../backend/src/server/api/endpoints/notifications/read.ts | 2 +- packages/backend/src/server/api/endpoints/page-push.ts | 2 +- packages/backend/src/server/api/endpoints/pages/create.ts | 2 +- packages/backend/src/server/api/endpoints/pages/delete.ts | 2 +- packages/backend/src/server/api/endpoints/pages/featured.ts | 2 +- packages/backend/src/server/api/endpoints/pages/like.ts | 2 +- packages/backend/src/server/api/endpoints/pages/show.ts | 2 +- packages/backend/src/server/api/endpoints/pages/unlike.ts | 2 +- packages/backend/src/server/api/endpoints/pages/update.ts | 2 +- packages/backend/src/server/api/endpoints/ping.ts | 2 +- packages/backend/src/server/api/endpoints/pinned-users.ts | 2 +- packages/backend/src/server/api/endpoints/promo/read.ts | 2 +- .../src/server/api/endpoints/request-reset-password.ts | 2 +- packages/backend/src/server/api/endpoints/reset-db.ts | 2 +- packages/backend/src/server/api/endpoints/reset-password.ts | 2 +- packages/backend/src/server/api/endpoints/server-info.ts | 2 +- packages/backend/src/server/api/endpoints/stats.ts | 2 +- packages/backend/src/server/api/endpoints/sw/register.ts | 2 +- packages/backend/src/server/api/endpoints/sw/unregister.ts | 2 +- packages/backend/src/server/api/endpoints/test.ts | 2 +- .../backend/src/server/api/endpoints/username/available.ts | 2 +- packages/backend/src/server/api/endpoints/users.ts | 2 +- packages/backend/src/server/api/endpoints/users/clips.ts | 2 +- packages/backend/src/server/api/endpoints/users/followers.ts | 2 +- packages/backend/src/server/api/endpoints/users/following.ts | 2 +- .../backend/src/server/api/endpoints/users/gallery/posts.ts | 2 +- .../api/endpoints/users/get-frequently-replied-users.ts | 2 +- .../backend/src/server/api/endpoints/users/groups/create.ts | 2 +- .../backend/src/server/api/endpoints/users/groups/delete.ts | 2 +- .../server/api/endpoints/users/groups/invitations/accept.ts | 2 +- .../server/api/endpoints/users/groups/invitations/reject.ts | 2 +- .../backend/src/server/api/endpoints/users/groups/invite.ts | 2 +- .../backend/src/server/api/endpoints/users/groups/joined.ts | 2 +- .../backend/src/server/api/endpoints/users/groups/leave.ts | 2 +- .../backend/src/server/api/endpoints/users/groups/owned.ts | 2 +- .../backend/src/server/api/endpoints/users/groups/pull.ts | 2 +- .../backend/src/server/api/endpoints/users/groups/show.ts | 2 +- .../backend/src/server/api/endpoints/users/groups/transfer.ts | 2 +- .../backend/src/server/api/endpoints/users/groups/update.ts | 2 +- .../backend/src/server/api/endpoints/users/lists/create.ts | 2 +- .../backend/src/server/api/endpoints/users/lists/delete.ts | 2 +- packages/backend/src/server/api/endpoints/users/lists/list.ts | 2 +- packages/backend/src/server/api/endpoints/users/lists/pull.ts | 2 +- packages/backend/src/server/api/endpoints/users/lists/push.ts | 2 +- packages/backend/src/server/api/endpoints/users/lists/show.ts | 2 +- .../backend/src/server/api/endpoints/users/lists/update.ts | 2 +- packages/backend/src/server/api/endpoints/users/notes.ts | 2 +- packages/backend/src/server/api/endpoints/users/pages.ts | 2 +- packages/backend/src/server/api/endpoints/users/reactions.ts | 2 +- .../backend/src/server/api/endpoints/users/recommendation.ts | 2 +- packages/backend/src/server/api/endpoints/users/relation.ts | 2 +- .../backend/src/server/api/endpoints/users/report-abuse.ts | 2 +- .../server/api/endpoints/users/search-by-username-and-host.ts | 2 +- packages/backend/src/server/api/endpoints/users/search.ts | 2 +- packages/backend/src/server/api/endpoints/users/show.ts | 2 +- packages/backend/src/server/api/endpoints/users/stats.ts | 2 +- 304 files changed, 307 insertions(+), 306 deletions(-) diff --git a/packages/backend/src/server/api/call.ts b/packages/backend/src/server/api/call.ts index ea457d9556..e767b15417 100644 --- a/packages/backend/src/server/api/call.ts +++ b/packages/backend/src/server/api/call.ts @@ -78,8 +78,8 @@ export default async (endpoint: string, user: User | null | undefined, token: Ac } // Cast non JSON input - if (ep.meta.requireFile) { - for (const k of Object.keys(ep.params)) { + if (ep.meta.requireFile && ep.params.properties) { + for (const k of Object.keys(ep.params.properties)) { const param = ep.params.properties![k]; if (['boolean', 'number', 'integer'].includes(param.type ?? '') && typeof data[k] === 'string') { try { diff --git a/packages/backend/src/server/api/define.ts b/packages/backend/src/server/api/define.ts index 061ade17bf..83fc1e8d4f 100644 --- a/packages/backend/src/server/api/define.ts +++ b/packages/backend/src/server/api/define.ts @@ -1,5 +1,5 @@ import * as fs from 'fs'; -import * as Ajv from 'ajv'; +import Ajv from 'ajv'; import { ILocalUser } from '@/models/entities/user'; import { IEndpointMeta } from './endpoints'; import { ApiError } from './error'; @@ -65,6 +65,6 @@ export default function (meta: T, pa return Promise.reject(err); } - return cb(params, user, token, file, cleanup); + return cb(params as SchemaType, user, token, file, cleanup); }; } diff --git a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts index 97b7bc7dba..6ab9c87e3c 100644 --- a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts +++ b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts @@ -70,7 +70,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts index 50b2eb0427..421726d60f 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { username: Users.localUsernameSchema, diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts index 99d61b2f32..cf48a906f0 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts @@ -11,7 +11,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/ad/create.ts b/packages/backend/src/server/api/endpoints/admin/ad/create.ts index 9883efefe7..c1efaf6314 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/create.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { url: { type: 'string', minLength: 1 }, diff --git a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts index dfd873f016..1b9607b5aa 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, 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 83fdedef77..5b72f72937 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/list.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/ad/update.ts b/packages/backend/src/server/api/endpoints/admin/ad/update.ts index bf4bce5150..93902e79c1 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/update.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts index 295d99513d..884dd5e280 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { title: { type: 'string', minLength: 1 }, diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts index f0141ca595..c09307193f 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts index 993f9877d2..af48925ec1 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts @@ -52,7 +52,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts index f905616b3e..fb4d5e95ba 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts index 41e2c23488..dde84ae45e 100644 --- a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts index 9b127eb5d3..c42b5caac2 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts @@ -8,7 +8,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts index 1c63af6a17..a7ce154cf2 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/drive/files.ts b/packages/backend/src/server/api/endpoints/admin/drive/files.ts index 56a8c1c642..0b5544ce28 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts index bb1ed1072a..efd4a8e4aa 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts @@ -149,7 +149,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts index 9aeb04d247..4ddea09b1c 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { ids: { type: 'array', items: { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts index 718ecae4b1..2ca3aade99 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, 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 fc20ff0a84..f2dc11f664 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { emojiId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts index 792e72ff97..d35ef660e4 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts @@ -11,7 +11,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { ids: { type: 'array', items: { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts index 15d44b3a0e..2dabd60a0f 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts index 5ee6dd4c8d..98d8d4fef9 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts @@ -8,7 +8,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts index 865715968a..e519f64ff0 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -50,7 +50,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { query: { type: 'string', nullable: true, default: null }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts index 0e23132d99..8e26da3d64 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts @@ -50,7 +50,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { query: { type: 'string', nullable: true, default: null }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts index e6ccbf684d..e619053e58 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { ids: { type: 'array', items: { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts index 30a1c28af6..dff90193e7 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { ids: { type: 'array', items: { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts index 9679e4a369..462e7a742c 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { ids: { type: 'array', items: { diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts index da5a5f005e..870d568311 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { id: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts index e98de40ff8..71c1c41cf6 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts index d6e3a15c61..df73453f78 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts index 7c2d6dc391..0ae58de534 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts index 04cad3b9f7..9a3c35d055 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts index 9379379aef..17ce1bfce9 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts @@ -8,7 +8,7 @@ export const meta = { tags: ['admin'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts index 28856cd41c..e980ca96ef 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/invite.ts b/packages/backend/src/server/api/endpoints/admin/invite.ts index a21777937c..45392f85c7 100644 --- a/packages/backend/src/server/api/endpoints/admin/invite.ts +++ b/packages/backend/src/server/api/endpoints/admin/invite.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts index 6b7e549c35..3bf66f3c86 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts @@ -8,7 +8,7 @@ export const meta = { requireAdmin: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts index 585d6fbfa7..e2e96de3c1 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts @@ -8,7 +8,7 @@ export const meta = { requireAdmin: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/promo/create.ts b/packages/backend/src/server/api/endpoints/admin/promo/create.ts index 16f522729b..4f714c579c 100644 --- a/packages/backend/src/server/api/endpoints/admin/promo/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/promo/create.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts index 27bb9cc858..fd1dba8e50 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts index 38eac5a135..080a7da04f 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts index 9669cfd3b8..c452b620ec 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts index 3f7e6be5fb..6b883aebee 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/relays/add.ts b/packages/backend/src/server/api/endpoints/admin/relays/add.ts index ecf77b87df..e8eb249f93 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/add.ts @@ -45,7 +45,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { inbox: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/relays/list.ts b/packages/backend/src/server/api/endpoints/admin/relays/list.ts index 6cdaa418a7..da2c32ce4f 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/list.ts @@ -39,7 +39,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts index d452c2e6a5..26a16284db 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts @@ -8,7 +8,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { inbox: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/reset-password.ts b/packages/backend/src/server/api/endpoints/admin/reset-password.ts index 87424782c5..5036d76d1f 100644 --- a/packages/backend/src/server/api/endpoints/admin/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/admin/reset-password.ts @@ -23,7 +23,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts index 4139f77614..ec8b56083c 100644 --- a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts +++ b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts @@ -12,7 +12,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { reportId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/send-email.ts b/packages/backend/src/server/api/endpoints/admin/send-email.ts index 2ebe7e0bc9..819ff8fd03 100644 --- a/packages/backend/src/server/api/endpoints/admin/send-email.ts +++ b/packages/backend/src/server/api/endpoints/admin/send-email.ts @@ -8,7 +8,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { to: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/admin/server-info.ts b/packages/backend/src/server/api/endpoints/admin/server-info.ts index 44e069d603..ece9bff53e 100644 --- a/packages/backend/src/server/api/endpoints/admin/server-info.ts +++ b/packages/backend/src/server/api/endpoints/admin/server-info.ts @@ -87,7 +87,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], 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 c08acaeca9..1688a1fc53 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 @@ -48,7 +48,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/show-user.ts b/packages/backend/src/server/api/endpoints/admin/show-user.ts index b883aff494..46b6609869 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts @@ -13,7 +13,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts index c373021d0e..bc4b319e17 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/admin/silence-user.ts b/packages/backend/src/server/api/endpoints/admin/silence-user.ts index df547184ad..54ef60f7fe 100644 --- a/packages/backend/src/server/api/endpoints/admin/silence-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/silence-user.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts index 31867a4055..c2f3d72438 100644 --- a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts @@ -13,7 +13,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts index 42c7e776a8..ddda5f48ab 100644 --- a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts index 011f485277..25a8f1a00a 100644 --- a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts @@ -10,7 +10,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, 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 b845eb4d5b..ecede8a049 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -11,7 +11,7 @@ export const meta = { requireAdmin: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { disableRegistration: { type: 'boolean', nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/admin/vacuum.ts b/packages/backend/src/server/api/endpoints/admin/vacuum.ts index 07a4517bd4..8ce352bffd 100644 --- a/packages/backend/src/server/api/endpoints/admin/vacuum.ts +++ b/packages/backend/src/server/api/endpoints/admin/vacuum.ts @@ -9,7 +9,7 @@ export const meta = { requireModerator: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { full: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/announcements.ts b/packages/backend/src/server/api/endpoints/announcements.ts index bea3a287fc..78a924fe5e 100644 --- a/packages/backend/src/server/api/endpoints/announcements.ts +++ b/packages/backend/src/server/api/endpoints/announcements.ts @@ -51,7 +51,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index 16ba065b9d..272ebddd4b 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 100 }, diff --git a/packages/backend/src/server/api/endpoints/antennas/delete.ts b/packages/backend/src/server/api/endpoints/antennas/delete.ts index c140084778..247d4af16c 100644 --- a/packages/backend/src/server/api/endpoints/antennas/delete.ts +++ b/packages/backend/src/server/api/endpoints/antennas/delete.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { antennaId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/antennas/list.ts b/packages/backend/src/server/api/endpoints/antennas/list.ts index 6910c07291..59d75d80f5 100644 --- a/packages/backend/src/server/api/endpoints/antennas/list.ts +++ b/packages/backend/src/server/api/endpoints/antennas/list.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts index 283c01c2c7..74f0d8d88f 100644 --- a/packages/backend/src/server/api/endpoints/antennas/notes.ts +++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts @@ -33,7 +33,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { antennaId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/antennas/show.ts b/packages/backend/src/server/api/endpoints/antennas/show.ts index d8c08f2777..8428844c15 100644 --- a/packages/backend/src/server/api/endpoints/antennas/show.ts +++ b/packages/backend/src/server/api/endpoints/antennas/show.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { antennaId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts index 9f8564c2c0..0b8e864b4d 100644 --- a/packages/backend/src/server/api/endpoints/antennas/update.ts +++ b/packages/backend/src/server/api/endpoints/antennas/update.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { antennaId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/ap/get.ts b/packages/backend/src/server/api/endpoints/ap/get.ts index c62ca6088b..a60ff00ecd 100644 --- a/packages/backend/src/server/api/endpoints/ap/get.ts +++ b/packages/backend/src/server/api/endpoints/ap/get.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { uri: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts index e0b53403bb..8f71e84a15 100644 --- a/packages/backend/src/server/api/endpoints/ap/show.ts +++ b/packages/backend/src/server/api/endpoints/ap/show.ts @@ -68,7 +68,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { uri: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/app/create.ts b/packages/backend/src/server/api/endpoints/app/create.ts index 0f9610d2a9..6e8d2b2abd 100644 --- a/packages/backend/src/server/api/endpoints/app/create.ts +++ b/packages/backend/src/server/api/endpoints/app/create.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/app/show.ts b/packages/backend/src/server/api/endpoints/app/show.ts index 0ca7fcc2a8..6d75294e84 100644 --- a/packages/backend/src/server/api/endpoints/app/show.ts +++ b/packages/backend/src/server/api/endpoints/app/show.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { appId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/auth/accept.ts b/packages/backend/src/server/api/endpoints/auth/accept.ts index 4429119b1f..775c26818b 100644 --- a/packages/backend/src/server/api/endpoints/auth/accept.ts +++ b/packages/backend/src/server/api/endpoints/auth/accept.ts @@ -21,7 +21,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { token: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/auth/session/generate.ts b/packages/backend/src/server/api/endpoints/auth/session/generate.ts index 8d5c14e2f7..ba0356431f 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/generate.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/generate.ts @@ -35,7 +35,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { appSecret: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/auth/session/show.ts b/packages/backend/src/server/api/endpoints/auth/session/show.ts index dfc1c06ee6..701cc9237d 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/show.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/show.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { token: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts index 397d1e687b..fa04610ce0 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts @@ -45,7 +45,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { appSecret: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/blocking/create.ts b/packages/backend/src/server/api/endpoints/blocking/create.ts index 8fd8f33338..cf09ca00ba 100644 --- a/packages/backend/src/server/api/endpoints/blocking/create.ts +++ b/packages/backend/src/server/api/endpoints/blocking/create.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/blocking/delete.ts b/packages/backend/src/server/api/endpoints/blocking/delete.ts index ad00fd1e0b..6e9fead113 100644 --- a/packages/backend/src/server/api/endpoints/blocking/delete.ts +++ b/packages/backend/src/server/api/endpoints/blocking/delete.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/blocking/list.ts b/packages/backend/src/server/api/endpoints/blocking/list.ts index a315ccde9e..bbae0fe661 100644 --- a/packages/backend/src/server/api/endpoints/blocking/list.ts +++ b/packages/backend/src/server/api/endpoints/blocking/list.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, diff --git a/packages/backend/src/server/api/endpoints/channels/create.ts b/packages/backend/src/server/api/endpoints/channels/create.ts index dc7afadfa2..0491f7638f 100644 --- a/packages/backend/src/server/api/endpoints/channels/create.ts +++ b/packages/backend/src/server/api/endpoints/channels/create.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 128 }, diff --git a/packages/backend/src/server/api/endpoints/channels/featured.ts b/packages/backend/src/server/api/endpoints/channels/featured.ts index 4d07e720a9..c1e4ba2dec 100644 --- a/packages/backend/src/server/api/endpoints/channels/featured.ts +++ b/packages/backend/src/server/api/endpoints/channels/featured.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/channels/follow.ts b/packages/backend/src/server/api/endpoints/channels/follow.ts index 01156d1c2c..c831db4b8c 100644 --- a/packages/backend/src/server/api/endpoints/channels/follow.ts +++ b/packages/backend/src/server/api/endpoints/channels/follow.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { channelId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/followed.ts b/packages/backend/src/server/api/endpoints/channels/followed.ts index 0e75f06f47..79b12514ff 100644 --- a/packages/backend/src/server/api/endpoints/channels/followed.ts +++ b/packages/backend/src/server/api/endpoints/channels/followed.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { sinceId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/owned.ts b/packages/backend/src/server/api/endpoints/channels/owned.ts index f8acae836b..c4c250fab1 100644 --- a/packages/backend/src/server/api/endpoints/channels/owned.ts +++ b/packages/backend/src/server/api/endpoints/channels/owned.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { sinceId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/show.ts b/packages/backend/src/server/api/endpoints/channels/show.ts index fb2c7b5adf..48d9fe29c1 100644 --- a/packages/backend/src/server/api/endpoints/channels/show.ts +++ b/packages/backend/src/server/api/endpoints/channels/show.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { channelId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index a870ecccbb..6f35fd966c 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { channelId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/unfollow.ts b/packages/backend/src/server/api/endpoints/channels/unfollow.ts index 42a0eb0a5a..e6524bf555 100644 --- a/packages/backend/src/server/api/endpoints/channels/unfollow.ts +++ b/packages/backend/src/server/api/endpoints/channels/unfollow.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { channelId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/channels/update.ts b/packages/backend/src/server/api/endpoints/channels/update.ts index 5a593c62e0..3ee36d97ec 100644 --- a/packages/backend/src/server/api/endpoints/channels/update.ts +++ b/packages/backend/src/server/api/endpoints/channels/update.ts @@ -36,7 +36,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { channelId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/charts/active-users.ts b/packages/backend/src/server/api/endpoints/charts/active-users.ts index a99269da0c..dcb155b937 100644 --- a/packages/backend/src/server/api/endpoints/charts/active-users.ts +++ b/packages/backend/src/server/api/endpoints/charts/active-users.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(activeUsersChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/ap-request.ts b/packages/backend/src/server/api/endpoints/charts/ap-request.ts index 403a933807..cb8046236a 100644 --- a/packages/backend/src/server/api/endpoints/charts/ap-request.ts +++ b/packages/backend/src/server/api/endpoints/charts/ap-request.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(apRequestChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/drive.ts b/packages/backend/src/server/api/endpoints/charts/drive.ts index 2c815367f6..35ec62e671 100644 --- a/packages/backend/src/server/api/endpoints/charts/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/drive.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(driveChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/federation.ts b/packages/backend/src/server/api/endpoints/charts/federation.ts index c48613ffac..07492cf6c2 100644 --- a/packages/backend/src/server/api/endpoints/charts/federation.ts +++ b/packages/backend/src/server/api/endpoints/charts/federation.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(federationChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/hashtag.ts b/packages/backend/src/server/api/endpoints/charts/hashtag.ts index 3cb0784ba4..537bb45bf1 100644 --- a/packages/backend/src/server/api/endpoints/charts/hashtag.ts +++ b/packages/backend/src/server/api/endpoints/charts/hashtag.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(hashtagChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/instance.ts b/packages/backend/src/server/api/endpoints/charts/instance.ts index 2da3cd3c3a..cd5c044ad9 100644 --- a/packages/backend/src/server/api/endpoints/charts/instance.ts +++ b/packages/backend/src/server/api/endpoints/charts/instance.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(instanceChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/notes.ts b/packages/backend/src/server/api/endpoints/charts/notes.ts index c48bc67e1c..b30f0894c2 100644 --- a/packages/backend/src/server/api/endpoints/charts/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/notes.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(notesChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/user/drive.ts b/packages/backend/src/server/api/endpoints/charts/user/drive.ts index 62f7afa435..cc1aac5fea 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/drive.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(perUserDriveChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/user/following.ts b/packages/backend/src/server/api/endpoints/charts/user/following.ts index d6d2d5e3ee..1b68bdca1c 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/following.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/following.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(perUserFollowingChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/user/notes.ts b/packages/backend/src/server/api/endpoints/charts/user/notes.ts index becde8b1df..55e6368187 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/notes.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(perUserNotesChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts index 8f4d9a812a..f72424d2cf 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(perUserReactionsChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/charts/users.ts b/packages/backend/src/server/api/endpoints/charts/users.ts index 855fc6cd07..2dfdfefd78 100644 --- a/packages/backend/src/server/api/endpoints/charts/users.ts +++ b/packages/backend/src/server/api/endpoints/charts/users.ts @@ -8,7 +8,7 @@ export const meta = { res: getJsonSchema(usersChart.schema), } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { span: { type: 'string', enum: ['day', 'hour'] }, diff --git a/packages/backend/src/server/api/endpoints/clips/add-note.ts b/packages/backend/src/server/api/endpoints/clips/add-note.ts index e7dc25fe40..7700382bd3 100644 --- a/packages/backend/src/server/api/endpoints/clips/add-note.ts +++ b/packages/backend/src/server/api/endpoints/clips/add-note.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clipId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts index b6ebf866b8..86164e69af 100644 --- a/packages/backend/src/server/api/endpoints/clips/create.ts +++ b/packages/backend/src/server/api/endpoints/clips/create.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 100 }, diff --git a/packages/backend/src/server/api/endpoints/clips/delete.ts b/packages/backend/src/server/api/endpoints/clips/delete.ts index a263e10521..7f712450ae 100644 --- a/packages/backend/src/server/api/endpoints/clips/delete.ts +++ b/packages/backend/src/server/api/endpoints/clips/delete.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clipId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/clips/list.ts b/packages/backend/src/server/api/endpoints/clips/list.ts index 959b60e6f9..b8ee72af7c 100644 --- a/packages/backend/src/server/api/endpoints/clips/list.ts +++ b/packages/backend/src/server/api/endpoints/clips/list.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/clips/notes.ts b/packages/backend/src/server/api/endpoints/clips/notes.ts index dd76e396bf..698b9d428d 100644 --- a/packages/backend/src/server/api/endpoints/clips/notes.ts +++ b/packages/backend/src/server/api/endpoints/clips/notes.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clipId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/clips/show.ts b/packages/backend/src/server/api/endpoints/clips/show.ts index 7fe827a967..e1add3a0a6 100644 --- a/packages/backend/src/server/api/endpoints/clips/show.ts +++ b/packages/backend/src/server/api/endpoints/clips/show.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clipId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/clips/update.ts b/packages/backend/src/server/api/endpoints/clips/update.ts index b864497349..97134ac79a 100644 --- a/packages/backend/src/server/api/endpoints/clips/update.ts +++ b/packages/backend/src/server/api/endpoints/clips/update.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clipId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive.ts b/packages/backend/src/server/api/endpoints/drive.ts index 5fc1f64cf0..5ff383f0f4 100644 --- a/packages/backend/src/server/api/endpoints/drive.ts +++ b/packages/backend/src/server/api/endpoints/drive.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/drive/files.ts b/packages/backend/src/server/api/endpoints/drive/files.ts index 8ca9daed4d..998d964bc3 100644 --- a/packages/backend/src/server/api/endpoints/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/drive/files.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts index 20238c1b96..440dc856fd 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts index 8b7af3e54a..853723016e 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts @@ -14,7 +14,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { md5: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/create.ts b/packages/backend/src/server/api/endpoints/drive/files/create.ts index f5791f6ec7..89c6c99f36 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts @@ -35,7 +35,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { folderId: { type: 'string', format: 'misskey:id', nullable: true, default: null }, @@ -48,6 +48,7 @@ const paramDef = { } as const; // eslint-disable-next-line import/no-default-export +// @ts-ignore export default define(meta, paramDef, async (ps, user, _, file, cleanup) => { // Get 'name' parameter let name = ps.name || file.originalname; diff --git a/packages/backend/src/server/api/endpoints/drive/files/delete.ts b/packages/backend/src/server/api/endpoints/drive/files/delete.ts index 664637a68f..8ae7e7effe 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/delete.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts index 98de790c0d..feb738be0d 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { md5: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/find.ts b/packages/backend/src/server/api/endpoints/drive/files/find.ts index 8d30c29da6..5419ba9196 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/show.ts b/packages/backend/src/server/api/endpoints/drive/files/show.ts index 8edb8785bc..932e692c4c 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/update.ts b/packages/backend/src/server/api/endpoints/drive/files/update.ts index d77deea7db..3972e56084 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/update.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts index a4619ebf36..5c688e883a 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts @@ -18,7 +18,7 @@ export const meta = { kind: 'write:drive', } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { url: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders.ts b/packages/backend/src/server/api/endpoints/drive/folders.ts index a543ae27df..4d8bc32dd7 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/create.ts b/packages/backend/src/server/api/endpoints/drive/folders/create.ts index ab48d5599e..994c537f9f 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/create.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', default: "Untitled", maxLength: 200 }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts index 51c0340529..58b9919595 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { folderId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/find.ts b/packages/backend/src/server/api/endpoints/drive/folders/find.ts index 057f40b1cc..333502f706 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/find.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/show.ts b/packages/backend/src/server/api/endpoints/drive/folders/show.ts index d31d7a4276..4bbd2dcf11 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/show.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { folderId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/update.ts b/packages/backend/src/server/api/endpoints/drive/folders/update.ts index c70b5a0d54..a4393d99b0 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/update.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { folderId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/drive/stream.ts b/packages/backend/src/server/api/endpoints/drive/stream.ts index 921ae4c221..9d5cb02c70 100644 --- a/packages/backend/src/server/api/endpoints/drive/stream.ts +++ b/packages/backend/src/server/api/endpoints/drive/stream.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/email-address/available.ts b/packages/backend/src/server/api/endpoints/email-address/available.ts index cb740ffae7..8fee4ce509 100644 --- a/packages/backend/src/server/api/endpoints/email-address/available.ts +++ b/packages/backend/src/server/api/endpoints/email-address/available.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { emailAddress: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/endpoint.ts b/packages/backend/src/server/api/endpoints/endpoint.ts index b8fe030e8c..7c528114f2 100644 --- a/packages/backend/src/server/api/endpoints/endpoint.ts +++ b/packages/backend/src/server/api/endpoints/endpoint.ts @@ -7,7 +7,7 @@ export const meta = { tags: ['meta'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { endpoint: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/endpoints.ts b/packages/backend/src/server/api/endpoints/endpoints.ts index b090e0dced..ef6efc6fb3 100644 --- a/packages/backend/src/server/api/endpoints/endpoints.ts +++ b/packages/backend/src/server/api/endpoints/endpoints.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts index f0ab63f74b..3bffbc82bd 100644 --- a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts +++ b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/federation/followers.ts b/packages/backend/src/server/api/endpoints/federation/followers.ts index 5960e482c0..b716552322 100644 --- a/packages/backend/src/server/api/endpoints/federation/followers.ts +++ b/packages/backend/src/server/api/endpoints/federation/followers.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/federation/following.ts b/packages/backend/src/server/api/endpoints/federation/following.ts index 4f139b0c45..373c432be5 100644 --- a/packages/backend/src/server/api/endpoints/federation/following.ts +++ b/packages/backend/src/server/api/endpoints/federation/following.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index 494b5120ab..fb25199c73 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string', nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/federation/show-instance.ts b/packages/backend/src/server/api/endpoints/federation/show-instance.ts index cead515d81..590f8a7e86 100644 --- a/packages/backend/src/server/api/endpoints/federation/show-instance.ts +++ b/packages/backend/src/server/api/endpoints/federation/show-instance.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts index ebdc54d0a6..59661ea7c0 100644 --- a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts +++ b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts @@ -8,7 +8,7 @@ export const meta = { requireCredential: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/federation/users.ts b/packages/backend/src/server/api/endpoints/federation/users.ts index 294894cd92..f35471f062 100644 --- a/packages/backend/src/server/api/endpoints/federation/users.ts +++ b/packages/backend/src/server/api/endpoints/federation/users.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { host: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/following/create.ts b/packages/backend/src/server/api/endpoints/following/create.ts index 1edb3517a0..a18c44a1d8 100644 --- a/packages/backend/src/server/api/endpoints/following/create.ts +++ b/packages/backend/src/server/api/endpoints/following/create.ts @@ -57,7 +57,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/following/delete.ts b/packages/backend/src/server/api/endpoints/following/delete.ts index 2eb8636816..ec32c2c888 100644 --- a/packages/backend/src/server/api/endpoints/following/delete.ts +++ b/packages/backend/src/server/api/endpoints/following/delete.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/following/invalidate.ts b/packages/backend/src/server/api/endpoints/following/invalidate.ts index 8a1da3d299..137d366fce 100644 --- a/packages/backend/src/server/api/endpoints/following/invalidate.ts +++ b/packages/backend/src/server/api/endpoints/following/invalidate.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/following/requests/accept.ts b/packages/backend/src/server/api/endpoints/following/requests/accept.ts index 7040efcc80..adbbb3404a 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/accept.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/accept.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts index 4204f8526a..5e949af9de 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts @@ -33,7 +33,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/following/requests/list.ts b/packages/backend/src/server/api/endpoints/following/requests/list.ts index 17d576d1c0..563223fcae 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/list.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/list.ts @@ -35,7 +35,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/following/requests/reject.ts b/packages/backend/src/server/api/endpoints/following/requests/reject.ts index 9e345aa15f..f1502eba13 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/reject.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/reject.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/gallery/featured.ts b/packages/backend/src/server/api/endpoints/gallery/featured.ts index 6b347f9dea..ad994c386a 100644 --- a/packages/backend/src/server/api/endpoints/gallery/featured.ts +++ b/packages/backend/src/server/api/endpoints/gallery/featured.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/gallery/popular.ts b/packages/backend/src/server/api/endpoints/gallery/popular.ts index 57ead79826..9e5019ddef 100644 --- a/packages/backend/src/server/api/endpoints/gallery/popular.ts +++ b/packages/backend/src/server/api/endpoints/gallery/popular.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/gallery/posts.ts b/packages/backend/src/server/api/endpoints/gallery/posts.ts index c36e80b83c..40c9efaf51 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts index d64937d0bc..c963dc86d1 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts @@ -29,7 +29,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { title: { type: 'string', minLength: 1 }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts index 82ffd62d60..7fafc9288a 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { postId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts index 73d5a0ea99..ca6c06cf9e 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { postId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts index 819d360b14..0f8f3a6068 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { postId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts index fc38174810..30ccaf167e 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { postId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts index 1a86b56bc6..2b2e26aa5d 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { postId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/get-online-users-count.ts b/packages/backend/src/server/api/endpoints/get-online-users-count.ts index 855b9fc342..374d819ce7 100644 --- a/packages/backend/src/server/api/endpoints/get-online-users-count.ts +++ b/packages/backend/src/server/api/endpoints/get-online-users-count.ts @@ -9,7 +9,7 @@ export const meta = { requireCredential: false, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/hashtags/list.ts b/packages/backend/src/server/api/endpoints/hashtags/list.ts index 68f2b2bf57..3bd5305bd4 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/list.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/list.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/hashtags/search.ts b/packages/backend/src/server/api/endpoints/hashtags/search.ts index 9aa08ed28e..2af6b6d77c 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/search.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/search.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/hashtags/show.ts b/packages/backend/src/server/api/endpoints/hashtags/show.ts index 79b9613086..0770882141 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/show.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/show.ts @@ -23,7 +23,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { tag: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/hashtags/trend.ts b/packages/backend/src/server/api/endpoints/hashtags/trend.ts index de3e453c3e..6da5b90b28 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/trend.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/trend.ts @@ -53,7 +53,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/hashtags/users.ts b/packages/backend/src/server/api/endpoints/hashtags/users.ts index 1760732c1a..ff06d925dd 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/users.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/users.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { tag: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i.ts b/packages/backend/src/server/api/endpoints/i.ts index 091276ea27..f9c58c2479 100644 --- a/packages/backend/src/server/api/endpoints/i.ts +++ b/packages/backend/src/server/api/endpoints/i.ts @@ -13,7 +13,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/2fa/done.ts b/packages/backend/src/server/api/endpoints/i/2fa/done.ts index 8d82ab3886..1646b7bd89 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/done.ts @@ -8,7 +8,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { token: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts index 5052afda97..52a0afcbfd 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts @@ -21,7 +21,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { clientDataJSON: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts index 2830f8994a..d9d2ec66c1 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { value: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts index da3ff421a7..86fc4fdffb 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts @@ -14,7 +14,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register.ts b/packages/backend/src/server/api/endpoints/i/2fa/register.ts index 32acc838b7..e550698abb 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register.ts @@ -11,7 +11,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts index 3004ce36a1..0469912340 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts @@ -9,7 +9,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts index b8e89bac72..c1ca445825 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts @@ -8,7 +8,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/apps.ts b/packages/backend/src/server/api/endpoints/i/apps.ts index f45b6745b8..0fe3db2d9f 100644 --- a/packages/backend/src/server/api/endpoints/i/apps.ts +++ b/packages/backend/src/server/api/endpoints/i/apps.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { sort: { type: 'string', enum: ['+createdAt', '-createdAt', '+lastUsedAt', '-lastUsedAt'] }, diff --git a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts index e417f3e81a..e2f5ceb7e1 100644 --- a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts +++ b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/change-password.ts b/packages/backend/src/server/api/endpoints/i/change-password.ts index eac60ee183..e68d18b86d 100644 --- a/packages/backend/src/server/api/endpoints/i/change-password.ts +++ b/packages/backend/src/server/api/endpoints/i/change-password.ts @@ -8,7 +8,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { currentPassword: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/delete-account.ts b/packages/backend/src/server/api/endpoints/i/delete-account.ts index 6f689c0b4e..188d2257aa 100644 --- a/packages/backend/src/server/api/endpoints/i/delete-account.ts +++ b/packages/backend/src/server/api/endpoints/i/delete-account.ts @@ -11,7 +11,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/export-blocking.ts b/packages/backend/src/server/api/endpoints/i/export-blocking.ts index afa6f2fc8e..808b546bdb 100644 --- a/packages/backend/src/server/api/endpoints/i/export-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/export-blocking.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/export-following.ts b/packages/backend/src/server/api/endpoints/i/export-following.ts index 4dd8cda398..10f8ee9ab2 100644 --- a/packages/backend/src/server/api/endpoints/i/export-following.ts +++ b/packages/backend/src/server/api/endpoints/i/export-following.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { excludeMuting: { type: 'boolean', default: false }, diff --git a/packages/backend/src/server/api/endpoints/i/export-mute.ts b/packages/backend/src/server/api/endpoints/i/export-mute.ts index ca8a7b997c..ab39508534 100644 --- a/packages/backend/src/server/api/endpoints/i/export-mute.ts +++ b/packages/backend/src/server/api/endpoints/i/export-mute.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/export-notes.ts b/packages/backend/src/server/api/endpoints/i/export-notes.ts index fc155d9d0f..770444d68b 100644 --- a/packages/backend/src/server/api/endpoints/i/export-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/export-notes.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts index 22cbf973f8..c0d9d924bd 100644 --- a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts +++ b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts @@ -11,7 +11,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/favorites.ts b/packages/backend/src/server/api/endpoints/i/favorites.ts index 45f5d99cce..d6c12582d0 100644 --- a/packages/backend/src/server/api/endpoints/i/favorites.ts +++ b/packages/backend/src/server/api/endpoints/i/favorites.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts index 7578ed3216..173a502622 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts index fbab8795ca..31e9636f84 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts index 2b31b89ff1..c760dd0e23 100644 --- a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts +++ b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/import-blocking.ts b/packages/backend/src/server/api/endpoints/i/import-blocking.ts index b90bfb1402..e9cf6e562e 100644 --- a/packages/backend/src/server/api/endpoints/i/import-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/import-blocking.ts @@ -40,7 +40,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/import-following.ts b/packages/backend/src/server/api/endpoints/i/import-following.ts index 75388502a5..d9c831daf8 100644 --- a/packages/backend/src/server/api/endpoints/i/import-following.ts +++ b/packages/backend/src/server/api/endpoints/i/import-following.ts @@ -39,7 +39,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/import-muting.ts b/packages/backend/src/server/api/endpoints/i/import-muting.ts index e1c3df33e1..ac61a6c852 100644 --- a/packages/backend/src/server/api/endpoints/i/import-muting.ts +++ b/packages/backend/src/server/api/endpoints/i/import-muting.ts @@ -40,7 +40,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts index eb1302a98c..68f2b377a9 100644 --- a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts +++ b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts @@ -39,7 +39,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { fileId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index bb1d6a49b3..cecaa8ac44 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/page-likes.ts b/packages/backend/src/server/api/endpoints/i/page-likes.ts index 60ac3ccde1..d3b68acdc5 100644 --- a/packages/backend/src/server/api/endpoints/i/page-likes.ts +++ b/packages/backend/src/server/api/endpoints/i/page-likes.ts @@ -30,7 +30,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/pages.ts b/packages/backend/src/server/api/endpoints/i/pages.ts index dbc58021b9..09cff4a0fb 100644 --- a/packages/backend/src/server/api/endpoints/i/pages.ts +++ b/packages/backend/src/server/api/endpoints/i/pages.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/pin.ts b/packages/backend/src/server/api/endpoints/i/pin.ts index a09618ebe8..a4dd64564a 100644 --- a/packages/backend/src/server/api/endpoints/i/pin.ts +++ b/packages/backend/src/server/api/endpoints/i/pin.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts index b0185a3e37..e6eb8d7ef0 100644 --- a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts +++ b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts @@ -10,7 +10,7 @@ export const meta = { kind: 'write:account', } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts index 45638c2579..12038999ae 100644 --- a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts @@ -10,7 +10,7 @@ export const meta = { kind: 'write:account', } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/read-announcement.ts b/packages/backend/src/server/api/endpoints/i/read-announcement.ts index f3cedddb35..2d8c723e4e 100644 --- a/packages/backend/src/server/api/endpoints/i/read-announcement.ts +++ b/packages/backend/src/server/api/endpoints/i/read-announcement.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { announcementId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts index 71a3ea08af..1462b902c4 100644 --- a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts +++ b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts @@ -10,7 +10,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts index 0429cd283a..c371da87d8 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { scope: { type: 'array', default: [], items: { diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts index 194a922718..bd243946b0 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { key: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/registry/get.ts b/packages/backend/src/server/api/endpoints/i/registry/get.ts index 7d413e3528..2bc6975bb3 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { key: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts index 52e0d6fac5..78bb9dd348 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { scope: { type: 'array', default: [], items: { diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys.ts b/packages/backend/src/server/api/endpoints/i/registry/keys.ts index c494ed8f5c..5f627125d5 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { scope: { type: 'array', default: [], items: { diff --git a/packages/backend/src/server/api/endpoints/i/registry/remove.ts b/packages/backend/src/server/api/endpoints/i/registry/remove.ts index 5bc55bd297..6a005d10d4 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/remove.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/remove.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { key: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts index e04d123a1f..09de7125c9 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts @@ -7,7 +7,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/i/registry/set.ts b/packages/backend/src/server/api/endpoints/i/registry/set.ts index c78f4383be..28d9555b1c 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/set.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/set.ts @@ -9,7 +9,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { key: { type: 'string', minLength: 1 }, diff --git a/packages/backend/src/server/api/endpoints/i/revoke-token.ts b/packages/backend/src/server/api/endpoints/i/revoke-token.ts index 14800346c1..b889e795be 100644 --- a/packages/backend/src/server/api/endpoints/i/revoke-token.ts +++ b/packages/backend/src/server/api/endpoints/i/revoke-token.ts @@ -8,7 +8,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { tokenId: { type: 'string', format: 'misskey:id' }, 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 468972c239..f7a98a2332 100644 --- a/packages/backend/src/server/api/endpoints/i/signin-history.ts +++ b/packages/backend/src/server/api/endpoints/i/signin-history.ts @@ -8,7 +8,7 @@ export const meta = { secure: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/i/unpin.ts b/packages/backend/src/server/api/endpoints/i/unpin.ts index 895bfd0c28..5ab1e95c59 100644 --- a/packages/backend/src/server/api/endpoints/i/unpin.ts +++ b/packages/backend/src/server/api/endpoints/i/unpin.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/i/update-email.ts b/packages/backend/src/server/api/endpoints/i/update-email.ts index 1450eabc2a..21a2081836 100644 --- a/packages/backend/src/server/api/endpoints/i/update-email.ts +++ b/packages/backend/src/server/api/endpoints/i/update-email.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { password: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 0a5188609b..d800f23f8e 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -67,7 +67,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { ...Users.nameSchema, nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts index 6c38240913..a026d8d669 100644 --- a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts +++ b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/messaging/history.ts b/packages/backend/src/server/api/endpoints/messaging/history.ts index 5c1c040cc3..cb27f37fbb 100644 --- a/packages/backend/src/server/api/endpoints/messaging/history.ts +++ b/packages/backend/src/server/api/endpoints/messaging/history.ts @@ -21,7 +21,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages.ts b/packages/backend/src/server/api/endpoints/messaging/messages.ts index ce477feac4..a21f8d8fc1 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts index 60b1e2cdce..c2f9e71b5c 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts @@ -64,7 +64,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts index 67ecd4a1e6..8f5d6da665 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { messageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts index 1d0ddaf98f..2a18d9c379 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { messageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index fdd1586ca5..5b5604f6a6 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -440,7 +440,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { detail: { type: 'boolean', default: true }, diff --git a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts index e61c78754f..56fc459d7e 100644 --- a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts +++ b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { session: { type: 'string', nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/mute/create.ts b/packages/backend/src/server/api/endpoints/mute/create.ts index 3ef97a1491..b8439cd3f6 100644 --- a/packages/backend/src/server/api/endpoints/mute/create.ts +++ b/packages/backend/src/server/api/endpoints/mute/create.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/mute/delete.ts b/packages/backend/src/server/api/endpoints/mute/delete.ts index 8a88e13039..ff66aa26cf 100644 --- a/packages/backend/src/server/api/endpoints/mute/delete.ts +++ b/packages/backend/src/server/api/endpoints/mute/delete.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/mute/list.ts b/packages/backend/src/server/api/endpoints/mute/list.ts index fd8443e2b7..a728affe05 100644 --- a/packages/backend/src/server/api/endpoints/mute/list.ts +++ b/packages/backend/src/server/api/endpoints/mute/list.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, diff --git a/packages/backend/src/server/api/endpoints/my/apps.ts b/packages/backend/src/server/api/endpoints/my/apps.ts index 8dee11fb93..5d08f34dac 100644 --- a/packages/backend/src/server/api/endpoints/my/apps.ts +++ b/packages/backend/src/server/api/endpoints/my/apps.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index 0106bac516..28c49b0e63 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { local: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/notes/children.ts b/packages/backend/src/server/api/endpoints/notes/children.ts index ea2c166b75..43471b8ed5 100644 --- a/packages/backend/src/server/api/endpoints/notes/children.ts +++ b/packages/backend/src/server/api/endpoints/notes/children.ts @@ -23,7 +23,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/clips.ts b/packages/backend/src/server/api/endpoints/notes/clips.ts index 2caa3a499f..2209894a96 100644 --- a/packages/backend/src/server/api/endpoints/notes/clips.ts +++ b/packages/backend/src/server/api/endpoints/notes/clips.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts index c199a3f831..c785496f2e 100644 --- a/packages/backend/src/server/api/endpoints/notes/conversation.ts +++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 7d81abc3a7..7ac318c501 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -95,7 +95,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { visibility: { type: 'string', enum: ['public', 'home', 'followers', 'specified'], default: "public" }, diff --git a/packages/backend/src/server/api/endpoints/notes/delete.ts b/packages/backend/src/server/api/endpoints/notes/delete.ts index 62a2a98469..6084c93240 100644 --- a/packages/backend/src/server/api/endpoints/notes/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/delete.ts @@ -33,7 +33,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts index 570e2354ba..eaf2b1ac0f 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts index b33a5f148b..1a64fc430e 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index 8a4297de62..11738cbe26 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts index 23ca8752c9..54cf51c135 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { withFiles: { type: 'boolean' }, 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 ba6f3b5927..f75cbeb008 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, 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 7c118317d6..9793919487 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { withFiles: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/notes/mentions.ts b/packages/backend/src/server/api/endpoints/notes/mentions.ts index 265882fa70..41f2ad5244 100644 --- a/packages/backend/src/server/api/endpoints/notes/mentions.ts +++ b/packages/backend/src/server/api/endpoints/notes/mentions.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { following: { type: 'boolean', default: false }, diff --git a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts index 4030694b58..0f2d4699de 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts index 739df8a03c..d889ba6f1f 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts @@ -58,7 +58,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts index fdcaed64e1..746344df3b 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts @@ -29,7 +29,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts index a898b3249a..9edbabc469 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts index 53cadac7c9..d5e2e138a8 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts @@ -32,7 +32,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index aa5c2c0a45..a964a0c766 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/replies.ts b/packages/backend/src/server/api/endpoints/notes/replies.ts index b88e3d7168..78559abd5a 100644 --- a/packages/backend/src/server/api/endpoints/notes/replies.ts +++ b/packages/backend/src/server/api/endpoints/notes/replies.ts @@ -21,7 +21,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index bf18a20b97..ff55f862aa 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { tag: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index bcb9c2b8a1..7034645956 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -27,7 +27,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { query: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts index 8f75eeb5e8..a300f1aefa 100644 --- a/packages/backend/src/server/api/endpoints/notes/show.ts +++ b/packages/backend/src/server/api/endpoints/notes/show.ts @@ -23,7 +23,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/state.ts b/packages/backend/src/server/api/endpoints/notes/state.ts index cf5f08ea9a..2e7f1f75c3 100644 --- a/packages/backend/src/server/api/endpoints/notes/state.ts +++ b/packages/backend/src/server/api/endpoints/notes/state.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts index 4068a8a571..7b3c88785b 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts @@ -21,7 +21,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts index 09b64f7277..66d631640a 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index c06a98feaa..14d0d71704 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -27,7 +27,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts index d85c8b96f9..a1d8fae10b 100644 --- a/packages/backend/src/server/api/endpoints/notes/translate.ts +++ b/packages/backend/src/server/api/endpoints/notes/translate.ts @@ -27,7 +27,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/unrenote.ts b/packages/backend/src/server/api/endpoints/notes/unrenote.ts index c10d277de1..5b39239279 100644 --- a/packages/backend/src/server/api/endpoints/notes/unrenote.ts +++ b/packages/backend/src/server/api/endpoints/notes/unrenote.ts @@ -27,7 +27,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, 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 018e3e06a8..68a15f05fb 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 @@ -30,7 +30,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/watching/create.ts b/packages/backend/src/server/api/endpoints/notes/watching/create.ts index b19d370027..ed35638329 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/create.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts index f9ceb49278..1918b887ef 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notifications/create.ts b/packages/backend/src/server/api/endpoints/notifications/create.ts index b5bfb34f4b..590f1c540f 100644 --- a/packages/backend/src/server/api/endpoints/notifications/create.ts +++ b/packages/backend/src/server/api/endpoints/notifications/create.ts @@ -12,7 +12,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { body: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts index 12dc43de16..5ad6605e7f 100644 --- a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts @@ -10,7 +10,7 @@ export const meta = { kind: 'write:notifications', } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/notifications/read.ts b/packages/backend/src/server/api/endpoints/notifications/read.ts index 6e5b5616dd..93ac75f649 100644 --- a/packages/backend/src/server/api/endpoints/notifications/read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/read.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { notificationId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/page-push.ts b/packages/backend/src/server/api/endpoints/page-push.ts index 20334f33fc..690cd0884d 100644 --- a/packages/backend/src/server/api/endpoints/page-push.ts +++ b/packages/backend/src/server/api/endpoints/page-push.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/pages/create.ts b/packages/backend/src/server/api/endpoints/pages/create.ts index 6c00a2f779..c6d50e5cdf 100644 --- a/packages/backend/src/server/api/endpoints/pages/create.ts +++ b/packages/backend/src/server/api/endpoints/pages/create.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { title: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/pages/delete.ts b/packages/backend/src/server/api/endpoints/pages/delete.ts index c41373bb7c..2933e04174 100644 --- a/packages/backend/src/server/api/endpoints/pages/delete.ts +++ b/packages/backend/src/server/api/endpoints/pages/delete.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/pages/featured.ts b/packages/backend/src/server/api/endpoints/pages/featured.ts index 38aa4dfacc..dbd8737b08 100644 --- a/packages/backend/src/server/api/endpoints/pages/featured.ts +++ b/packages/backend/src/server/api/endpoints/pages/featured.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/pages/like.ts b/packages/backend/src/server/api/endpoints/pages/like.ts index d286fd2bfd..0eb110732f 100644 --- a/packages/backend/src/server/api/endpoints/pages/like.ts +++ b/packages/backend/src/server/api/endpoints/pages/like.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts index 95243e411f..e330460f23 100644 --- a/packages/backend/src/server/api/endpoints/pages/show.ts +++ b/packages/backend/src/server/api/endpoints/pages/show.ts @@ -23,7 +23,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/pages/unlike.ts b/packages/backend/src/server/api/endpoints/pages/unlike.ts index 582c924d91..f8efe8969a 100644 --- a/packages/backend/src/server/api/endpoints/pages/unlike.ts +++ b/packages/backend/src/server/api/endpoints/pages/unlike.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/pages/update.ts b/packages/backend/src/server/api/endpoints/pages/update.ts index 686271cf46..8c81ea7463 100644 --- a/packages/backend/src/server/api/endpoints/pages/update.ts +++ b/packages/backend/src/server/api/endpoints/pages/update.ts @@ -42,7 +42,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { pageId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/ping.ts b/packages/backend/src/server/api/endpoints/ping.ts index 964401e19b..4f68965598 100644 --- a/packages/backend/src/server/api/endpoints/ping.ts +++ b/packages/backend/src/server/api/endpoints/ping.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/pinned-users.ts b/packages/backend/src/server/api/endpoints/pinned-users.ts index 83657f8bf9..61c67949cf 100644 --- a/packages/backend/src/server/api/endpoints/pinned-users.ts +++ b/packages/backend/src/server/api/endpoints/pinned-users.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/promo/read.ts b/packages/backend/src/server/api/endpoints/promo/read.ts index 99be33fb0c..b811159834 100644 --- a/packages/backend/src/server/api/endpoints/promo/read.ts +++ b/packages/backend/src/server/api/endpoints/promo/read.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/request-reset-password.ts b/packages/backend/src/server/api/endpoints/request-reset-password.ts index 193c3ee79d..af190583c0 100644 --- a/packages/backend/src/server/api/endpoints/request-reset-password.ts +++ b/packages/backend/src/server/api/endpoints/request-reset-password.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { username: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/reset-db.ts b/packages/backend/src/server/api/endpoints/reset-db.ts index 1c1cb3f136..5a72c306ba 100644 --- a/packages/backend/src/server/api/endpoints/reset-db.ts +++ b/packages/backend/src/server/api/endpoints/reset-db.ts @@ -10,7 +10,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/reset-password.ts b/packages/backend/src/server/api/endpoints/reset-password.ts index 04048b9ef1..880ff682fb 100644 --- a/packages/backend/src/server/api/endpoints/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/reset-password.ts @@ -12,7 +12,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { token: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/server-info.ts b/packages/backend/src/server/api/endpoints/server-info.ts index 4a5bc6a86c..97245575e8 100644 --- a/packages/backend/src/server/api/endpoints/server-info.ts +++ b/packages/backend/src/server/api/endpoints/server-info.ts @@ -8,7 +8,7 @@ export const meta = { tags: ['meta'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/stats.ts b/packages/backend/src/server/api/endpoints/stats.ts index 8abae921ac..7863d439ca 100644 --- a/packages/backend/src/server/api/endpoints/stats.ts +++ b/packages/backend/src/server/api/endpoints/stats.ts @@ -43,7 +43,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/sw/register.ts b/packages/backend/src/server/api/endpoints/sw/register.ts index 459b0dd969..9971bfb7d0 100644 --- a/packages/backend/src/server/api/endpoints/sw/register.ts +++ b/packages/backend/src/server/api/endpoints/sw/register.ts @@ -25,7 +25,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { endpoint: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/sw/unregister.ts b/packages/backend/src/server/api/endpoints/sw/unregister.ts index ec994c37c2..fc5fb0ce92 100644 --- a/packages/backend/src/server/api/endpoints/sw/unregister.ts +++ b/packages/backend/src/server/api/endpoints/sw/unregister.ts @@ -7,7 +7,7 @@ export const meta = { requireCredential: true, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { endpoint: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/test.ts b/packages/backend/src/server/api/endpoints/test.ts index 820448e677..ee04009308 100644 --- a/packages/backend/src/server/api/endpoints/test.ts +++ b/packages/backend/src/server/api/endpoints/test.ts @@ -4,7 +4,7 @@ export const meta = { requireCredential: false, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { required: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/username/available.ts b/packages/backend/src/server/api/endpoints/username/available.ts index 6e38d4d310..4564784a9b 100644 --- a/packages/backend/src/server/api/endpoints/username/available.ts +++ b/packages/backend/src/server/api/endpoints/username/available.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { username: Users.localUsernameSchema, diff --git a/packages/backend/src/server/api/endpoints/users.ts b/packages/backend/src/server/api/endpoints/users.ts index 0c03ac05c3..2406fcd2fc 100644 --- a/packages/backend/src/server/api/endpoints/users.ts +++ b/packages/backend/src/server/api/endpoints/users.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/users/clips.ts b/packages/backend/src/server/api/endpoints/users/clips.ts index e224bdf603..7abb94e2cf 100644 --- a/packages/backend/src/server/api/endpoints/users/clips.ts +++ b/packages/backend/src/server/api/endpoints/users/clips.ts @@ -6,7 +6,7 @@ export const meta = { tags: ['users', 'clips'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts index 5607b4cc73..75f13a2929 100644 --- a/packages/backend/src/server/api/endpoints/users/followers.ts +++ b/packages/backend/src/server/api/endpoints/users/followers.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index 36943232d1..b1af55169c 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts index e874a54c77..7accc0b627 100644 --- a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts @@ -6,7 +6,7 @@ export const meta = { tags: ['users', 'gallery'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts index a08587cd16..5173982840 100644 --- a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts +++ b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts @@ -39,7 +39,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/create.ts b/packages/backend/src/server/api/endpoints/users/groups/create.ts index e7bc95791f..358d3828a0 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/create.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/create.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 100 }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/delete.ts b/packages/backend/src/server/api/endpoints/users/groups/delete.ts index cb30b4d813..ca8d864dcd 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/delete.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts index 7a6a620cb3..31d3461280 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { invitationId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts index b5c7f0908a..29b7612a8a 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { invitationId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/invite.ts b/packages/backend/src/server/api/endpoints/users/groups/invite.ts index ba78a28a38..31eef02b2f 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invite.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invite.ts @@ -40,7 +40,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/joined.ts b/packages/backend/src/server/api/endpoints/users/groups/joined.ts index 192a52a66b..465585376e 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/joined.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/joined.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/users/groups/leave.ts b/packages/backend/src/server/api/endpoints/users/groups/leave.ts index b7c7b328fd..56b5330c83 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/leave.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/leave.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/owned.ts b/packages/backend/src/server/api/endpoints/users/groups/owned.ts index 4592fc437f..a3724a0547 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/owned.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/owned.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/users/groups/pull.ts b/packages/backend/src/server/api/endpoints/users/groups/pull.ts index d50f61b159..dd93faa62e 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/pull.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/show.ts b/packages/backend/src/server/api/endpoints/users/groups/show.ts index 230254060d..799ec3202e 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/show.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/show.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts index 4b5206fa18..bb3b7f11c2 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts @@ -37,7 +37,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/groups/update.ts b/packages/backend/src/server/api/endpoints/users/groups/update.ts index 0714fb4bd4..6c8851889a 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/update.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/update.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { groupId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/create.ts b/packages/backend/src/server/api/endpoints/users/lists/create.ts index 0a74424e0e..c0c37f96f1 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/create.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts @@ -17,7 +17,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 100 }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/delete.ts b/packages/backend/src/server/api/endpoints/users/lists/delete.ts index 6795a227dc..0f7fdbc908 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/delete.ts @@ -18,7 +18,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/list.ts b/packages/backend/src/server/api/endpoints/users/lists/list.ts index d439723403..5245c57849 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/list.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/list.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: {}, required: [], diff --git a/packages/backend/src/server/api/endpoints/users/lists/pull.ts b/packages/backend/src/server/api/endpoints/users/lists/pull.ts index 5eca5a999d..45b0b41564 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/pull.ts @@ -26,7 +26,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/push.ts b/packages/backend/src/server/api/endpoints/users/lists/push.ts index 68a1f00774..252f7e6e19 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/push.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/push.ts @@ -38,7 +38,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/show.ts b/packages/backend/src/server/api/endpoints/users/lists/show.ts index 3e9aa836ba..91a2bf55a4 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/show.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/show.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/lists/update.ts b/packages/backend/src/server/api/endpoints/users/lists/update.ts index ee1489fc6a..3e3f6ec9fe 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/update.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/update.ts @@ -24,7 +24,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { listId: { 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 956d90b7ad..4c27fb8ee4 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -31,7 +31,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/pages.ts b/packages/backend/src/server/api/endpoints/users/pages.ts index 873b5e80fa..f7b39b75fd 100644 --- a/packages/backend/src/server/api/endpoints/users/pages.ts +++ b/packages/backend/src/server/api/endpoints/users/pages.ts @@ -6,7 +6,7 @@ export const meta = { tags: ['users', 'pages'], } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/reactions.ts b/packages/backend/src/server/api/endpoints/users/reactions.ts index 8d968210bc..c9b5a95639 100644 --- a/packages/backend/src/server/api/endpoints/users/reactions.ts +++ b/packages/backend/src/server/api/endpoints/users/reactions.ts @@ -28,7 +28,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/recommendation.ts b/packages/backend/src/server/api/endpoints/users/recommendation.ts index 4a2d8d7e4a..78c2f3e1a4 100644 --- a/packages/backend/src/server/api/endpoints/users/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/users/recommendation.ts @@ -22,7 +22,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, diff --git a/packages/backend/src/server/api/endpoints/users/relation.ts b/packages/backend/src/server/api/endpoints/users/relation.ts index fac1a4b92d..140126cab5 100644 --- a/packages/backend/src/server/api/endpoints/users/relation.ts +++ b/packages/backend/src/server/api/endpoints/users/relation.ts @@ -93,7 +93,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { diff --git a/packages/backend/src/server/api/endpoints/users/report-abuse.ts b/packages/backend/src/server/api/endpoints/users/report-abuse.ts index 1df5e1573f..717724a4cf 100644 --- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts +++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts @@ -34,7 +34,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index 433779ae2d..15a93bc4f8 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -20,7 +20,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { username: { type: 'string', nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts index 8c28e7c3a6..9d772f0968 100644 --- a/packages/backend/src/server/api/endpoints/users/search.ts +++ b/packages/backend/src/server/api/endpoints/users/search.ts @@ -19,7 +19,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { query: { type: 'string' }, diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index 29c90963ad..cb42cc80a0 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -44,7 +44,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/users/stats.ts b/packages/backend/src/server/api/endpoints/users/stats.ts index 29dd8fdf93..2f4ca10fc1 100644 --- a/packages/backend/src/server/api/endpoints/users/stats.ts +++ b/packages/backend/src/server/api/endpoints/users/stats.ts @@ -16,7 +16,7 @@ export const meta = { }, } as const; -const paramDef = { +export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, From ec632e6694607c6b57b34ba2287f0ea469bd4075 Mon Sep 17 00:00:00 2001 From: xianon Date: Sun, 20 Feb 2022 16:07:29 +0900 Subject: [PATCH 08/10] =?UTF-8?q?=E3=82=BF=E3=83=83=E3=83=81=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E3=81=A7=E3=82=A6=E3=82=A3=E3=82=B8=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=AE=E7=B7=A8=E9=9B=86=E3=82=84=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E3=81=8C=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=99=E3=82=8B=20(#8328)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/components/widgets.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/client/src/components/widgets.vue b/packages/client/src/components/widgets.vue index ccde5fbe55..da9d935281 100644 --- a/packages/client/src/components/widgets.vue +++ b/packages/client/src/components/widgets.vue @@ -12,13 +12,14 @@ @@ -121,10 +122,6 @@ export default defineComponent({ position: relative; cursor: move; - > *:not(.remove):not(.config) { - pointer-events: none; - } - > .config, > .remove { position: absolute; From a1c7c1fb49f0b09aa382fa00c9883bfcd5dc5d57 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 20 Feb 2022 16:07:43 +0900 Subject: [PATCH 09/10] remove max note text length setting Resolve #8323 --- CHANGELOG.md | 3 +++ locales/ja-JP.yml | 1 - .../1645340161439-remove-max-note-text-length.js | 13 +++++++++++++ packages/backend/src/const.ts | 2 ++ packages/backend/src/models/entities/meta.ts | 6 ------ .../src/server/api/endpoints/admin/update-meta.ts | 5 ----- packages/backend/src/server/api/endpoints/meta.ts | 6 ------ .../src/server/api/endpoints/notes/create.ts | 14 ++------------ packages/backend/src/server/nodeinfo.ts | 3 ++- packages/client/src/pages/admin/settings.vue | 8 -------- 10 files changed, 22 insertions(+), 39 deletions(-) create mode 100644 packages/backend/migration/1645340161439-remove-max-note-text-length.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 677fb5698b..9629c970ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ You should also include the user name that made the change. ## 12.x.x (unreleased) +### Changes +- ノートの最大文字数を設定できる機能が廃止され、デフォルトで一律3000文字になりました + ### Improvements - diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index f4c9d19981..840e1beeee 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -422,7 +422,6 @@ next: "次" retype: "再入力" noteOf: "{user}のノート" inviteToGroup: "グループに招待" -maxNoteTextLength: "ノートの文字数制限" quoteAttached: "引用付き" quoteQuestion: "引用として添付しますか?" noMessagesYet: "まだチャットはありません" diff --git a/packages/backend/migration/1645340161439-remove-max-note-text-length.js b/packages/backend/migration/1645340161439-remove-max-note-text-length.js new file mode 100644 index 0000000000..63e7d25ee5 --- /dev/null +++ b/packages/backend/migration/1645340161439-remove-max-note-text-length.js @@ -0,0 +1,13 @@ +const { MigrationInterface, QueryRunner } = require("typeorm"); + +module.exports = class removeMaxNoteTextLength1645340161439 { + name = 'removeMaxNoteTextLength1645340161439' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "maxNoteTextLength"`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" ADD "maxNoteTextLength" integer NOT NULL DEFAULT '500'`); + } +} diff --git a/packages/backend/src/const.ts b/packages/backend/src/const.ts index b00bd81655..6d3b9559e8 100644 --- a/packages/backend/src/const.ts +++ b/packages/backend/src/const.ts @@ -1,3 +1,5 @@ +export const MAX_NOTE_TEXT_LENGTH = 3000; + export const USER_ONLINE_THRESHOLD = 1000 * 60 * 10; // 10min export const USER_ACTIVE_THRESHOLD = 1000 * 60 * 60 * 24 * 3; // 3days diff --git a/packages/backend/src/models/entities/meta.ts b/packages/backend/src/models/entities/meta.ts index 1426c79c51..3031642478 100644 --- a/packages/backend/src/models/entities/meta.ts +++ b/packages/backend/src/models/entities/meta.ts @@ -205,12 +205,6 @@ export class Meta { }) public remoteDriveCapacityMb: number; - @Column('integer', { - default: 500, - comment: 'Max allowed note text length in characters', - }) - public maxNoteTextLength: number; - @Column('varchar', { length: 128, nullable: 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 ecede8a049..509e120e79 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -36,7 +36,6 @@ export const paramDef = { logoImageUrl: { type: 'string', nullable: true }, name: { type: 'string', nullable: true }, description: { type: 'string', nullable: true }, - maxNoteTextLength: { type: 'integer', maximum: 8192 }, localDriveCapacityMb: { type: 'integer' }, remoteDriveCapacityMb: { type: 'integer' }, cacheRemoteFiles: { type: 'boolean' }, @@ -164,10 +163,6 @@ export default define(meta, paramDef, async (ps, me) => { set.description = ps.description; } - if (ps.maxNoteTextLength) { - set.maxNoteTextLength = ps.maxNoteTextLength; - } - if (ps.localDriveCapacityMb !== undefined) { set.localDriveCapacityMb = ps.localDriveCapacityMb; } diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index 5b5604f6a6..9ea75009e6 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -138,11 +138,6 @@ export const meta = { type: 'string', optional: false, nullable: true, }, - maxNoteTextLength: { - type: 'number', - optional: false, nullable: false, - default: 500, - }, emojis: { type: 'array', optional: false, nullable: false, @@ -506,7 +501,6 @@ export default define(meta, paramDef, async (ps, me) => { iconUrl: instance.iconUrl, backgroundImageUrl: instance.backgroundImageUrl, logoImageUrl: instance.logoImageUrl, - maxNoteTextLength: Math.min(instance.maxNoteTextLength, DB_MAX_NOTE_TEXT_LENGTH), emojis: await Emojis.packMany(emojis), ads: ads.map(ad => ({ id: ad.id, diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 7ac318c501..6bf696b9d1 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -1,24 +1,14 @@ import ms from 'ms'; -import { length } from 'stringz'; import create from '@/services/note/create'; import define from '../../define'; -import { fetchMeta } from '@/misc/fetch-meta'; import { ApiError } from '../../error'; import { User } from '@/models/entities/user'; import { Users, DriveFiles, Notes, Channels, Blockings } from '@/models/index'; import { DriveFile } from '@/models/entities/drive-file'; import { Note } from '@/models/entities/note'; -import { DB_MAX_NOTE_TEXT_LENGTH } from '@/misc/hard-limits'; import { noteVisibilities } from '../../../../types'; import { Channel } from '@/models/entities/channel'; - -let maxNoteTextLength = 500; - -setInterval(() => { - fetchMeta().then(m => { - maxNoteTextLength = m.maxNoteTextLength; - }); -}, 3000); +import { MAX_NOTE_TEXT_LENGTH } from '@/const'; export const meta = { tags: ['notes'], @@ -102,7 +92,7 @@ export const paramDef = { visibleUserIds: { type: 'array', uniqueItems: true, items: { type: 'string', format: 'misskey:id', } }, - text: { type: 'string', nullable: true, maxLength: 3000, default: null }, + text: { type: 'string', nullable: true, maxLength: MAX_NOTE_TEXT_LENGTH, default: null }, cw: { type: 'string', nullable: true, maxLength: 100 }, localOnly: { type: 'boolean', default: false }, noExtractMentions: { type: 'boolean', default: false }, diff --git a/packages/backend/src/server/nodeinfo.ts b/packages/backend/src/server/nodeinfo.ts index 4209fc7f14..25eca291db 100644 --- a/packages/backend/src/server/nodeinfo.ts +++ b/packages/backend/src/server/nodeinfo.ts @@ -3,6 +3,7 @@ import config from '@/config/index'; import { fetchMeta } from '@/misc/fetch-meta'; import { Users, Notes } from '@/models/index'; import { MoreThan } from 'typeorm'; +import { MAX_NOTE_TEXT_LENGTH } from '@/const'; const router = new Router(); @@ -69,7 +70,7 @@ const nodeinfo2 = async () => { emailRequiredForSignup: meta.emailRequiredForSignup, enableHcaptcha: meta.enableHcaptcha, enableRecaptcha: meta.enableRecaptcha, - maxNoteTextLength: meta.maxNoteTextLength, + maxNoteTextLength: MAX_NOTE_TEXT_LENGTH, enableTwitterIntegration: meta.enableTwitterIntegration, enableGithubIntegration: meta.enableGithubIntegration, enableDiscordIntegration: meta.enableDiscordIntegration, diff --git a/packages/client/src/pages/admin/settings.vue b/packages/client/src/pages/admin/settings.vue index 81204f6e2f..17f7842ab2 100644 --- a/packages/client/src/pages/admin/settings.vue +++ b/packages/client/src/pages/admin/settings.vue @@ -52,11 +52,6 @@ - - - - - @@ -186,7 +181,6 @@ export default defineComponent({ bannerUrl: null, backgroundImageUrl: null, themeColor: null, - maxNoteTextLength: 0, enableLocalTimeline: false, enableGlobalTimeline: false, pinnedUsers: '', @@ -216,7 +210,6 @@ export default defineComponent({ this.themeColor = meta.themeColor; this.maintainerName = meta.maintainerName; this.maintainerEmail = meta.maintainerEmail; - this.maxNoteTextLength = meta.maxNoteTextLength; this.enableLocalTimeline = !meta.disableLocalTimeline; this.enableGlobalTimeline = !meta.disableGlobalTimeline; this.pinnedUsers = meta.pinnedUsers.join('\n'); @@ -244,7 +237,6 @@ export default defineComponent({ themeColor: this.themeColor === '' ? null : this.themeColor, maintainerName: this.maintainerName, maintainerEmail: this.maintainerEmail, - maxNoteTextLength: this.maxNoteTextLength, disableLocalTimeline: !this.enableLocalTimeline, disableGlobalTimeline: !this.enableGlobalTimeline, pinnedUsers: this.pinnedUsers.split('\n'), From 6994136fb327d9c2a69fa24de80c53869aa88de2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 20 Feb 2022 16:08:09 +0900 Subject: [PATCH 10/10] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9629c970ea..b9c0ddf27d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ You should also include the user name that made the change. ### Bugfixes - Client: リアクションピッカーの高さが低くなったまま戻らないことがあるのを修正 @syuilo +- Client: タッチ操作だとウィジェットの編集がしにくいのを修正 @xianonn ## 12.107.0 (2022/02/12)