From 0cab102f3a09d9bee2ee7e6754c25ebd9e0d0b29 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 20 Feb 2022 01:12:30 +0900 Subject: [PATCH 1/5] 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 ea457d955..e767b1541 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 f5791f6ec..aafb650dd 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 2/5] :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 061ade17b..e2a34f47a 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 97b7bc7db..6ab9c87e3 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 50b2eb042..421726d60 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 99d61b2f3..cf48a906f 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 9883efefe..c1efaf631 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 dfd873f01..1b9607b5a 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 83fdedef7..5b72f7293 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 bf4bce515..93902e79c 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 295d99513..884dd5e28 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 f0141ca59..c09307193 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 993f9877d..af48925ec 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 f905616b3..fb4d5e95b 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 41e2c2348..dde84ae45 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 9b127eb5d..c42b5caac 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 1c63af6a1..a7ce154cf 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 56a8c1c64..0b5544ce2 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 bb1ed1072..efd4a8e4a 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 9aeb04d24..4ddea09b1 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 718ecae4b..2ca3aade9 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 fc20ff0a8..f2dc11f66 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 792e72ff9..d35ef660e 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 15d44b3a0..2dabd60a0 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 5ee6dd4c8..98d8d4fef 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 865715968..e519f64ff 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 0e23132d9..8e26da3d6 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 e6ccbf684..e619053e5 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 30a1c28af..dff90193e 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 9679e4a36..462e7a742 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 da5a5f005..870d56831 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 e98de40ff..71c1c41cf 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 d6e3a15c6..df73453f7 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 7c2d6dc39..0ae58de53 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 04cad3b9f..9a3c35d05 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 9379379ae..17ce1bfce 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 28856cd41..e980ca96e 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 a21777937..45392f85c 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 6b7e549c3..3bf66f3c8 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 585d6fbfa..e2e96de3c 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 16f522729..4f714c579 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 27bb9cc85..fd1dba8e5 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 38eac5a13..080a7da04 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 9669cfd3b..c452b620e 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 3f7e6be5f..6b883aebe 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 ecf77b87d..e8eb249f9 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 6cdaa418a..da2c32ce4 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 d452c2e6a..26a16284d 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 87424782c..5036d76d1 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 4139f7761..ec8b56083 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 2ebe7e0bc..819ff8fd0 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 44e069d60..ece9bff53 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 c08acaeca..1688a1fc5 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 b883aff49..46b660986 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 c373021d0..bc4b319e1 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 df547184a..54ef60f7f 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 31867a405..c2f3d7243 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 42c7e776a..ddda5f48a 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 011f48527..25a8f1a00 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 b845eb4d5..ecede8a04 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 07a4517bd..8ce352bff 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 bea3a287f..78a924fe5 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 16ba065b9..272ebddd4 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 c14008477..247d4af16 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 6910c0729..59d75d80f 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 283c01c2c..74f0d8d88 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 d8c08f277..8428844c1 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 9f8564c2c..0b8e864b4 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 c62ca6088..a60ff00ec 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 e0b53403b..8f71e84a1 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 0f9610d2a..6e8d2b2ab 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 0ca7fcc2a..6d75294e8 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 4429119b1..775c26818 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 8d5c14e2f..ba0356431 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 dfc1c06ee..701cc9237 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 397d1e687..fa04610ce 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 8fd8f3333..cf09ca00b 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 ad00fd1e0..6e9fead11 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 a315ccde9..bbae0fe66 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 dc7afadfa..0491f7638 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 4d07e720a..c1e4ba2de 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 01156d1c2..c831db4b8 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 0e75f06f4..79b12514f 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 f8acae836..c4c250fab 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 fb2c7b5ad..48d9fe29c 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 a870ecccb..6f35fd966 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 42a0eb0a5..e6524bf55 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 5a593c62e..3ee36d97e 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 a99269da0..dcb155b93 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 403a93380..cb8046236 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 2c815367f..35ec62e67 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 c48613ffa..07492cf6c 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 3cb0784ba..537bb45bf 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 2da3cd3c3..cd5c044ad 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 c48bc67e1..b30f0894c 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 62f7afa43..cc1aac5fe 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 d6d2d5e3e..1b68bdca1 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 becde8b1d..55e636818 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 8f4d9a812..f72424d2c 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 855fc6cd0..2dfdfefd7 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 e7dc25fe4..7700382bd 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 b6ebf866b..86164e69a 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 a263e1052..7f712450a 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 959b60e6f..b8ee72af7 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 dd76e396b..698b9d428 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 7fe827a96..e1add3a0a 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 b86449734..97134ac79 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 5fc1f64cf..5ff383f0f 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 8ca9daed4..998d964bc 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 20238c1b9..440dc856f 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 8b7af3e54..853723016 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 aafb650dd..89c6c99f3 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 664637a68..8ae7e7eff 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 98de790c0..feb738be0 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 8d30c29da..5419ba919 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 8edb8785b..932e692c4 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 d77deea7d..3972e5608 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 a4619ebf3..5c688e883 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 a543ae27d..4d8bc32dd 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 ab48d5599..994c537f9 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 51c034052..58b991959 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 057f40b1c..333502f70 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 d31d7a427..4bbd2dcf1 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 c70b5a0d5..a4393d99b 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 921ae4c22..9d5cb02c7 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 cb740ffae..8fee4ce50 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 b8fe030e8..7c528114f 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 b090e0dce..ef6efc6fb 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 f0ab63f74..3bffbc82b 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 5960e482c..b71655232 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 4f139b0c4..373c432be 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 494b5120a..fb25199c7 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 cead515d8..590f8a7e8 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 ebdc54d0a..59661ea7c 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 294894cd9..f35471f06 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 1edb3517a..a18c44a1d 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 2eb863681..ec32c2c88 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 8a1da3d29..137d366fc 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 7040efcc8..adbbb3404 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 4204f8526..5e949af9d 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 17d576d1c..563223fca 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 9e345aa15..f1502eba1 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 6b347f9de..ad994c386 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 57ead7982..9e5019dde 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 c36e80b83..40c9efaf5 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 d64937d0b..c963dc86d 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 82ffd62d6..7fafc9288 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 73d5a0ea9..ca6c06cf9 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 819d360b1..0f8f3a606 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 fc3817481..30ccaf167 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 1a86b56bc..2b2e26aa5 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 855b9fc34..374d819ce 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 68f2b2bf5..3bd5305bd 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 9aa08ed28..2af6b6d77 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 79b961308..077088214 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 de3e453c3..6da5b90b2 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 1760732c1..ff06d925d 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 091276ea2..f9c58c247 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 8d82ab388..1646b7bd8 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 5052afda9..52a0afcbf 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 2830f8994..d9d2ec66c 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 da3ff421a..86fc4fdff 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 32acc838b..e550698ab 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 3004ce36a..046991234 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 b8e89bac7..c1ca44582 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 f45b6745b..0fe3db2d9 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 e417f3e81..e2f5ceb7e 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 eac60ee18..e68d18b86 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 6f689c0b4..188d2257a 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 afa6f2fc8..808b546bd 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 4dd8cda39..10f8ee9ab 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 ca8a7b997..ab3950853 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 fc155d9d0..770444d68 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 22cbf973f..c0d9d924b 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 45f5d99cc..d6c12582d 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 7578ed321..173a50262 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 fbab8795c..31e9636f8 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 2b31b89ff..c760dd0e2 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 b90bfb140..e9cf6e562 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 75388502a..d9c831daf 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 e1c3df33e..ac61a6c85 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 eb1302a98..68f2b377a 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 bb1d6a49b..cecaa8ac4 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 60ac3ccde..d3b68acdc 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 dbc58021b..09cff4a0f 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 a09618ebe..a4dd64564 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 b0185a3e3..e6eb8d7ef 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 45638c257..12038999a 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 f3cedddb3..2d8c723e4 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 71a3ea08a..1462b902c 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 0429cd283..c371da87d 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 194a92271..bd243946b 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 7d413e352..2bc6975bb 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 52e0d6fac..78bb9dd34 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 c494ed8f5..5f627125d 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 5bc55bd29..6a005d10d 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 e04d123a1..09de7125c 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 c78f4383b..28d9555b1 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 14800346c..b889e795b 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 468972c23..f7a98a233 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 895bfd0c2..5ab1e95c5 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 1450eabc2..21a208183 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 0a5188609..d800f23f8 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 6c3824091..a026d8d66 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 5c1c040cc..cb27f37fb 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 ce477feac..a21f8d8fc 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 60b1e2cdc..c2f9e71b5 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 67ecd4a1e..8f5d6da66 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 1d0ddaf98..2a18d9c37 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 fdd1586ca..5b5604f6a 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 e61c78754..56fc459d7 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 3ef97a149..b8439cd3f 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 8a88e1303..ff66aa26c 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 fd8443e2b..a728affe0 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 8dee11fb9..5d08f34da 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 0106bac51..28c49b0e6 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 ea2c166b7..43471b8ed 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 2caa3a499..2209894a9 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 c199a3f83..c785496f2 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 7d81abc3a..7ac318c50 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 62a2a9846..6084c9324 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 570e2354b..eaf2b1ac0 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 b33a5f148..1a64fc430 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 8a4297de6..11738cbe2 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 23ca8752c..54cf51c13 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 ba6f3b592..f75cbeb00 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 7c118317d..979391948 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 265882fa7..41f2ad524 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 4030694b5..0f2d4699d 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 739df8a03..d889ba6f1 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 fdcaed64e..746344df3 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 a898b3249..9edbabc46 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 53cadac7c..d5e2e138a 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 aa5c2c0a4..a964a0c76 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 b88e3d716..78559abd5 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 bf18a20b9..ff55f862a 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 bcb9c2b8a..703464595 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 8f75eeb5e..a300f1aef 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 cf5f08ea9..2e7f1f75c 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 4068a8a57..7b3c88785 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 09b64f727..66d631640 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 c06a98fea..14d0d7170 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 d85c8b96f..a1d8fae10 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 c10d277de..5b3923927 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 018e3e06a..68a15f05f 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 b19d37002..ed3563832 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 f9ceb4927..1918b887e 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 b5bfb34f4..590f1c540 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 12dc43de1..5ad6605e7 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 6e5b5616d..93ac75f64 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 20334f33f..690cd0884 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 6c00a2f77..c6d50e5cd 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 c41373bb7..2933e0417 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 38aa4dfac..dbd8737b0 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 d286fd2bf..0eb110732 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 95243e411..e330460f2 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 582c924d9..f8efe8969 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 686271cf4..8c81ea746 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 964401e19..4f6896559 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 83657f8bf..61c67949c 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 99be33fb0..b81115983 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 193c3ee79..af190583c 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 1c1cb3f13..5a72c306b 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 04048b9ef..880ff682f 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 4a5bc6a86..97245575e 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 8abae921a..7863d439c 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 459b0dd96..9971bfb7d 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 ec994c37c..fc5fb0ce9 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 820448e67..ee0400930 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 6e38d4d31..4564784a9 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 0c03ac05c..2406fcd2f 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 e224bdf60..7abb94e2c 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 5607b4cc7..75f13a292 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 36943232d..b1af55169 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 e874a54c7..7accc0b62 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 a08587cd1..517398284 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 e7bc95791..358d3828a 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 cb30b4d81..ca8d864dc 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 7a6a620cb..31d346128 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 b5c7f0908..29b7612a8 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 ba78a28a3..31eef02b2 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 192a52a66..465585376 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 b7c7b328f..56b5330c8 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 4592fc437..a3724a054 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 d50f61b15..dd93faa62 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 230254060..799ec3202 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 4b5206fa1..bb3b7f11c 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 0714fb4bd..6c8851889 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 0a74424e0..c0c37f96f 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 6795a227d..0f7fdbc90 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 d43972340..5245c5784 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 5eca5a999..45b0b4156 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 68a1f0077..252f7e6e1 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 3e9aa836b..91a2bf55a 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 ee1489fc6..3e3f6ec9f 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 956d90b7a..4c27fb8ee 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 873b5e80f..f7b39b75f 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 8d968210b..c9b5a9563 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 4a2d8d7e4..78c2f3e1a 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 fac1a4b92..140126cab 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 1df5e1573..717724a4c 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 433779ae2..15a93bc4f 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 8c28e7c3a..9d772f096 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 29c90963a..cb42cc80a 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 29dd8fdf9..2f4ca10fc 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 3/5] 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 e2a34f47a..41978efe8 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 4/5] 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 41978efe8..6ed8cb3d0 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 5/5] 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 6ed8cb3d0..83fc1e8d4 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'];