From 21b6176d974ed8e3eb73723ad21a105c5d297323 Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 14 Jan 2022 02:39:25 +0900 Subject: [PATCH] Fix API Schema Error --- .../backend/src/models/repositories/queue.ts | 4 ---- packages/backend/src/server/api/endpoints.ts | 4 ++-- .../api/endpoints/admin/abuse-user-reports.ts | 6 +++--- .../api/endpoints/admin/accounts/create.ts | 2 +- .../server/api/endpoints/admin/drive/files.ts | 2 +- .../server/api/endpoints/admin/queue/stats.ts | 16 ++++++++++++---- .../api/endpoints/admin/show-moderation-logs.ts | 2 +- .../src/server/api/endpoints/admin/show-users.ts | 2 +- .../src/server/api/endpoints/antennas/create.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 +- .../src/server/api/endpoints/app/create.ts | 2 +- .../backend/src/server/api/endpoints/app/show.ts | 4 ++-- .../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 +- .../server/api/endpoints/channels/featured.ts | 2 +- .../server/api/endpoints/channels/followed.ts | 2 +- .../src/server/api/endpoints/channels/owned.ts | 2 +- .../src/server/api/endpoints/channels/show.ts | 2 +- .../server/api/endpoints/channels/timeline.ts | 2 +- .../src/server/api/endpoints/channels/update.ts | 2 +- .../src/server/api/endpoints/clips/create.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 +- .../src/server/api/endpoints/drive/files.ts | 2 +- .../api/endpoints/drive/files/attached-notes.ts | 2 +- .../server/api/endpoints/drive/files/create.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 +- .../src/server/api/endpoints/drive/folders.ts | 2 +- .../server/api/endpoints/drive/folders/create.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 +- .../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 +- .../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/cancel.ts | 2 +- .../api/endpoints/following/requests/list.ts | 4 ++-- .../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/show.ts | 2 +- .../server/api/endpoints/gallery/posts/update.ts | 2 +- .../src/server/api/endpoints/hashtags/list.ts | 2 +- .../src/server/api/endpoints/hashtags/show.ts | 2 +- .../src/server/api/endpoints/hashtags/users.ts | 2 +- packages/backend/src/server/api/endpoints/i.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 +- .../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 +- .../backend/src/server/api/endpoints/i/unpin.ts | 2 +- .../backend/src/server/api/endpoints/i/update.ts | 2 +- .../server/api/endpoints/i/user-group-invites.ts | 2 +- .../server/api/endpoints/messaging/history.ts | 2 +- .../server/api/endpoints/messaging/messages.ts | 2 +- .../api/endpoints/messaging/messages/create.ts | 2 +- .../src/server/api/endpoints/mute/list.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/featured.ts | 2 +- .../api/endpoints/notes/global-timeline.ts | 2 +- .../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/reactions.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/timeline.ts | 2 +- .../api/endpoints/notes/user-list-timeline.ts | 2 +- .../src/server/api/endpoints/pages/create.ts | 2 +- .../src/server/api/endpoints/pages/featured.ts | 2 +- .../src/server/api/endpoints/pages/show.ts | 2 +- .../src/server/api/endpoints/pinned-users.ts | 2 +- .../backend/src/server/api/endpoints/users.ts | 2 +- .../src/server/api/endpoints/users/followers.ts | 2 +- .../src/server/api/endpoints/users/following.ts | 2 +- .../users/get-frequently-replied-users.ts | 2 +- .../server/api/endpoints/users/groups/create.ts | 2 +- .../server/api/endpoints/users/groups/joined.ts | 2 +- .../server/api/endpoints/users/groups/owned.ts | 2 +- .../server/api/endpoints/users/groups/show.ts | 2 +- .../api/endpoints/users/groups/transfer.ts | 2 +- .../server/api/endpoints/users/groups/update.ts | 2 +- .../server/api/endpoints/users/lists/create.ts | 2 +- .../src/server/api/endpoints/users/lists/list.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/reactions.ts | 2 +- .../server/api/endpoints/users/recommendation.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 +- 122 files changed, 137 insertions(+), 133 deletions(-) diff --git a/packages/backend/src/models/repositories/queue.ts b/packages/backend/src/models/repositories/queue.ts index 521c634390..7ec4ecd3b6 100644 --- a/packages/backend/src/models/repositories/queue.ts +++ b/packages/backend/src/models/repositories/queue.ts @@ -22,9 +22,5 @@ export const packedQueueCountSchema = { type: 'number' as const, optional: false as const, nullable: false as const, }, - paused: { - type: 'number' as const, - optional: false as const, nullable: false as const, - }, }, }; diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts index a61b3f564c..57da1e347a 100644 --- a/packages/backend/src/server/api/endpoints.ts +++ b/packages/backend/src/server/api/endpoints.ts @@ -3,7 +3,7 @@ import { dirname } from 'path'; import { Context } from 'cafy'; import * as path from 'path'; import * as glob from 'glob'; -import { SimpleSchema } from '@/misc/simple-schema'; +import { Schema } from '@/misc/schema'; //const _filename = fileURLToPath(import.meta.url); const _filename = __filename; @@ -34,7 +34,7 @@ export interface IEndpointMeta { }; }; - res?: SimpleSchema; + res?: Schema; /** * このエンドポイントにリクエストするのにユーザー情報が必須か否か 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 5d4cc2c044..5cbbc88e46 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 @@ -93,17 +93,17 @@ export const meta = { reporter: { type: 'object' as const, nullable: false as const, optional: false as const, - ref: 'User', + ref: 'User' as const, }, targetUser: { type: 'object' as const, nullable: false as const, optional: false as const, - ref: 'User', + ref: 'User' as const, }, assignee: { type: 'object' as const, nullable: true as const, optional: true as const, - ref: 'User', + ref: 'User' as const, }, }, }, 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 edfac244f5..85b72b360e 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 = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, properties: { token: { type: 'string' as const, 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 b90ad90440..a53b73a72a 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts @@ -49,7 +49,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFile', + ref: 'DriveFile' as const, }, }, }; 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 5de871a60a..378e0c18dd 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts @@ -14,16 +14,24 @@ export const meta = { optional: false as const, nullable: false as const, properties: { deliver: { - ref: 'QueueCount', + type: 'object' as const, + optional: false as const, nullable: false as const, + ref: 'QueueCount' as const, }, inbox: { - ref: 'QueueCount', + type: 'object' as const, + optional: false as const, nullable: false as const, + ref: 'QueueCount' as const, }, db: { - ref: 'QueueCount', + type: 'object' as const, + optional: false as const, nullable: false as const, + ref: 'QueueCount' as const, }, objectStorage: { - ref: 'QueueCount', + type: 'object' as const, + optional: false as const, nullable: false as const, + ref: 'QueueCount' as const, }, }, }, 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 0d3759a84b..2208d038c9 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 @@ -58,7 +58,7 @@ export const meta = { user: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, }, 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 507183e876..5a40d9e86e 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -69,7 +69,7 @@ export const meta = { items: { type: 'object' as const, nullable: false as const, optional: false as const, - ref: 'User', + ref: 'User' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index b3276bd9cd..24d3d3e3c4 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -76,7 +76,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Antenna', + ref: 'Antenna' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/antennas/list.ts b/packages/backend/src/server/api/endpoints/antennas/list.ts index 1f24e0fb97..f04a4fbd89 100644 --- a/packages/backend/src/server/api/endpoints/antennas/list.ts +++ b/packages/backend/src/server/api/endpoints/antennas/list.ts @@ -14,7 +14,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Antenna', + ref: 'Antenna' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts index 09500a38dc..33a61a5c77 100644 --- a/packages/backend/src/server/api/endpoints/antennas/notes.ts +++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts @@ -57,7 +57,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/antennas/show.ts b/packages/backend/src/server/api/endpoints/antennas/show.ts index a02c44ac2b..d19198195e 100644 --- a/packages/backend/src/server/api/endpoints/antennas/show.ts +++ b/packages/backend/src/server/api/endpoints/antennas/show.ts @@ -28,7 +28,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Antenna', + ref: 'Antenna' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts index 968f761a35..0e3ed44c49 100644 --- a/packages/backend/src/server/api/endpoints/antennas/update.ts +++ b/packages/backend/src/server/api/endpoints/antennas/update.ts @@ -85,7 +85,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Antenna', + ref: 'Antenna' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/app/create.ts b/packages/backend/src/server/api/endpoints/app/create.ts index 88e5d866c2..54a09e951a 100644 --- a/packages/backend/src/server/api/endpoints/app/create.ts +++ b/packages/backend/src/server/api/endpoints/app/create.ts @@ -33,7 +33,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'App', + ref: 'App' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/app/show.ts b/packages/backend/src/server/api/endpoints/app/show.ts index 701a23b223..c79e8062e9 100644 --- a/packages/backend/src/server/api/endpoints/app/show.ts +++ b/packages/backend/src/server/api/endpoints/app/show.ts @@ -16,7 +16,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'App', + ref: 'App' as const, }, errors: { @@ -30,7 +30,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'App', + ref: 'App' as const, }, }; 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 3a32b5e548..674dd4de50 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/show.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/show.ts @@ -34,7 +34,7 @@ export const meta = { app: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'App', + ref: 'App' as const, }, token: { type: 'string' as const, 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 131cdf3dfa..882228fc82 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts @@ -30,7 +30,7 @@ export const meta = { user: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/blocking/create.ts b/packages/backend/src/server/api/endpoints/blocking/create.ts index f718bcd205..b0b0ddbfe9 100644 --- a/packages/backend/src/server/api/endpoints/blocking/create.ts +++ b/packages/backend/src/server/api/endpoints/blocking/create.ts @@ -48,7 +48,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/blocking/delete.ts b/packages/backend/src/server/api/endpoints/blocking/delete.ts index e563117410..c5e216e032 100644 --- a/packages/backend/src/server/api/endpoints/blocking/delete.ts +++ b/packages/backend/src/server/api/endpoints/blocking/delete.ts @@ -48,7 +48,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/blocking/list.ts b/packages/backend/src/server/api/endpoints/blocking/list.ts index f1f4b16999..3e0e7734fa 100644 --- a/packages/backend/src/server/api/endpoints/blocking/list.ts +++ b/packages/backend/src/server/api/endpoints/blocking/list.ts @@ -32,7 +32,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Blocking', + ref: 'Blocking' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/channels/create.ts b/packages/backend/src/server/api/endpoints/channels/create.ts index 9c88231ddd..3342441460 100644 --- a/packages/backend/src/server/api/endpoints/channels/create.ts +++ b/packages/backend/src/server/api/endpoints/channels/create.ts @@ -30,7 +30,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Channel', + ref: 'Channel' as const, }, errors: { diff --git a/packages/backend/src/server/api/endpoints/channels/featured.ts b/packages/backend/src/server/api/endpoints/channels/featured.ts index cec14cda11..b8aa1469cb 100644 --- a/packages/backend/src/server/api/endpoints/channels/featured.ts +++ b/packages/backend/src/server/api/endpoints/channels/featured.ts @@ -12,7 +12,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Channel', + ref: 'Channel' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/channels/followed.ts b/packages/backend/src/server/api/endpoints/channels/followed.ts index 82ae1a3afd..cc2fd71ea5 100644 --- a/packages/backend/src/server/api/endpoints/channels/followed.ts +++ b/packages/backend/src/server/api/endpoints/channels/followed.ts @@ -32,7 +32,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Channel', + ref: 'Channel' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/channels/owned.ts b/packages/backend/src/server/api/endpoints/channels/owned.ts index 128ea41158..8837608c67 100644 --- a/packages/backend/src/server/api/endpoints/channels/owned.ts +++ b/packages/backend/src/server/api/endpoints/channels/owned.ts @@ -32,7 +32,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Channel', + ref: 'Channel' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/channels/show.ts b/packages/backend/src/server/api/endpoints/channels/show.ts index 28cb927647..3e5891632b 100644 --- a/packages/backend/src/server/api/endpoints/channels/show.ts +++ b/packages/backend/src/server/api/endpoints/channels/show.ts @@ -18,7 +18,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Channel', + ref: 'Channel' as const, }, errors: { diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index ec60e5f236..0f1d015d16 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -44,7 +44,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/channels/update.ts b/packages/backend/src/server/api/endpoints/channels/update.ts index fee79df2fa..3e6b7f663d 100644 --- a/packages/backend/src/server/api/endpoints/channels/update.ts +++ b/packages/backend/src/server/api/endpoints/channels/update.ts @@ -32,7 +32,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Channel', + ref: 'Channel' as const, }, errors: { diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts index e9900247a1..b0880f6182 100644 --- a/packages/backend/src/server/api/endpoints/clips/create.ts +++ b/packages/backend/src/server/api/endpoints/clips/create.ts @@ -27,7 +27,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Clip', + ref: 'Clip' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/clips/list.ts b/packages/backend/src/server/api/endpoints/clips/list.ts index 8388438bd1..d9ffae94f6 100644 --- a/packages/backend/src/server/api/endpoints/clips/list.ts +++ b/packages/backend/src/server/api/endpoints/clips/list.ts @@ -14,7 +14,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Clip', + ref: 'Clip' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/clips/notes.ts b/packages/backend/src/server/api/endpoints/clips/notes.ts index c8871cd3fa..88b8aa1b6d 100644 --- a/packages/backend/src/server/api/endpoints/clips/notes.ts +++ b/packages/backend/src/server/api/endpoints/clips/notes.ts @@ -48,7 +48,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/clips/show.ts b/packages/backend/src/server/api/endpoints/clips/show.ts index ce65abd65d..b23a11bc3c 100644 --- a/packages/backend/src/server/api/endpoints/clips/show.ts +++ b/packages/backend/src/server/api/endpoints/clips/show.ts @@ -28,7 +28,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Clip', + ref: 'Clip' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/clips/update.ts b/packages/backend/src/server/api/endpoints/clips/update.ts index 44e8fe33e8..8d1a502de8 100644 --- a/packages/backend/src/server/api/endpoints/clips/update.ts +++ b/packages/backend/src/server/api/endpoints/clips/update.ts @@ -40,7 +40,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Clip', + ref: 'Clip' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/drive/files.ts b/packages/backend/src/server/api/endpoints/drive/files.ts index 7a577bce64..8b9e400d2f 100644 --- a/packages/backend/src/server/api/endpoints/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/drive/files.ts @@ -41,7 +41,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFile', + ref: 'DriveFile' as const, }, }, }; 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 a02ac3eef0..52df41e603 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 @@ -23,7 +23,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, 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 640b62c6ec..4d0aafd743 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts @@ -48,7 +48,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFile', + ref: 'DriveFile' as const, }, errors: { 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 5617769a9e..835b6747d2 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 @@ -21,7 +21,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFile', + ref: 'DriveFile' as const, }, }, }; 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 415ab79612..1eb0bcc601 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find.ts @@ -27,7 +27,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFile', + ref: 'DriveFile' as const, }, }, }; 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 4a8830e9cb..15ccaa4c48 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts @@ -25,7 +25,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFile', + ref: 'DriveFile' as const, }, errors: { 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 329e959c53..9ca2284905 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/update.ts @@ -62,7 +62,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFile', + ref: 'DriveFile' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/drive/folders.ts b/packages/backend/src/server/api/endpoints/drive/folders.ts index 85938e7b54..32a896d364 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders.ts @@ -37,7 +37,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFolder', + ref: 'DriveFolder' as const, }, }, }; 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 401b591525..45577572d0 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/create.ts @@ -35,7 +35,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFolder', + ref: 'DriveFolder' as const, }, }; 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 47e45a23fc..b0bbfd050c 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/find.ts @@ -27,7 +27,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFolder', + ref: 'DriveFolder' as const, }, }, }; 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 d6eac59fe0..44bd18e6e6 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/show.ts @@ -20,7 +20,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFolder', + ref: 'DriveFolder' as const, }, errors: { 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 5ae5424fb2..ad741c80a9 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/update.ts @@ -49,7 +49,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFolder', + ref: 'DriveFolder' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/drive/stream.ts b/packages/backend/src/server/api/endpoints/drive/stream.ts index 675e3225f5..3083d7737e 100644 --- a/packages/backend/src/server/api/endpoints/drive/stream.ts +++ b/packages/backend/src/server/api/endpoints/drive/stream.ts @@ -36,7 +36,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'DriveFile', + ref: 'DriveFile' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/federation/followers.ts b/packages/backend/src/server/api/endpoints/federation/followers.ts index a44b0aecf6..cd0174cd06 100644 --- a/packages/backend/src/server/api/endpoints/federation/followers.ts +++ b/packages/backend/src/server/api/endpoints/federation/followers.ts @@ -34,7 +34,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Following', + ref: 'Following' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/federation/following.ts b/packages/backend/src/server/api/endpoints/federation/following.ts index c10e25864e..bff02b1958 100644 --- a/packages/backend/src/server/api/endpoints/federation/following.ts +++ b/packages/backend/src/server/api/endpoints/federation/following.ts @@ -34,7 +34,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Following', + ref: 'Following' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index e73d0e5ada..72bd317365 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -59,7 +59,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'FederationInstance', + ref: 'FederationInstance' as const, }, }, }; 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 15b4f31518..24d87f1606 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 = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'FederationInstance', + ref: 'FederationInstance' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/federation/users.ts b/packages/backend/src/server/api/endpoints/federation/users.ts index 8372169d67..6291435f6a 100644 --- a/packages/backend/src/server/api/endpoints/federation/users.ts +++ b/packages/backend/src/server/api/endpoints/federation/users.ts @@ -34,7 +34,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/following/create.ts b/packages/backend/src/server/api/endpoints/following/create.ts index 951cf8fa20..228df48fd1 100644 --- a/packages/backend/src/server/api/endpoints/following/create.ts +++ b/packages/backend/src/server/api/endpoints/following/create.ts @@ -60,7 +60,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/following/delete.ts b/packages/backend/src/server/api/endpoints/following/delete.ts index de43fa4387..412f810589 100644 --- a/packages/backend/src/server/api/endpoints/following/delete.ts +++ b/packages/backend/src/server/api/endpoints/following/delete.ts @@ -48,7 +48,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/following/invalidate.ts b/packages/backend/src/server/api/endpoints/following/invalidate.ts index 388ddda797..09e6182df3 100644 --- a/packages/backend/src/server/api/endpoints/following/invalidate.ts +++ b/packages/backend/src/server/api/endpoints/following/invalidate.ts @@ -48,7 +48,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }; 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 d5281c468b..21f7aa5926 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts @@ -36,7 +36,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }; 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 bfd793faf9..b1e99705bc 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/list.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/list.ts @@ -23,12 +23,12 @@ export const meta = { follower: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, followee: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/gallery/featured.ts b/packages/backend/src/server/api/endpoints/gallery/featured.ts index a6ca956924..9a2ecca9cc 100644 --- a/packages/backend/src/server/api/endpoints/gallery/featured.ts +++ b/packages/backend/src/server/api/endpoints/gallery/featured.ts @@ -12,7 +12,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'GalleryPost', + ref: 'GalleryPost' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/gallery/popular.ts b/packages/backend/src/server/api/endpoints/gallery/popular.ts index efd1f76052..67cf17ef9d 100644 --- a/packages/backend/src/server/api/endpoints/gallery/popular.ts +++ b/packages/backend/src/server/api/endpoints/gallery/popular.ts @@ -12,7 +12,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'GalleryPost', + ref: 'GalleryPost' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/gallery/posts.ts b/packages/backend/src/server/api/endpoints/gallery/posts.ts index 1b1368b06f..4c49ccc355 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts.ts @@ -28,7 +28,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'GalleryPost', + ref: 'GalleryPost' as const, }, }, }; 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 1a75ba2cb2..3e7b603615 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts @@ -42,7 +42,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'GalleryPost', + ref: 'GalleryPost' as const, }, errors: { 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 7044f948fb..cad2d58ffa 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts @@ -26,7 +26,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'GalleryPost', + ref: 'GalleryPost' as const, }, }; 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 67028125d4..88608e7b5f 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts @@ -45,7 +45,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'GalleryPost', + ref: 'GalleryPost' as const, }, errors: { diff --git a/packages/backend/src/server/api/endpoints/hashtags/list.ts b/packages/backend/src/server/api/endpoints/hashtags/list.ts index 3900fdcc4a..4eac5c5ccb 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/list.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/list.ts @@ -52,7 +52,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Hashtag', + ref: 'Hashtag' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/hashtags/show.ts b/packages/backend/src/server/api/endpoints/hashtags/show.ts index 454b98e5a4..247246ee9d 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/show.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/show.ts @@ -18,7 +18,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Hashtag', + ref: 'Hashtag' as const, }, errors: { diff --git a/packages/backend/src/server/api/endpoints/hashtags/users.ts b/packages/backend/src/server/api/endpoints/hashtags/users.ts index 6bbe87a0d5..a6f3dedab2 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/users.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/users.ts @@ -53,7 +53,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/i.ts b/packages/backend/src/server/api/endpoints/i.ts index e5a2c9d2f7..30fc5e154e 100644 --- a/packages/backend/src/server/api/endpoints/i.ts +++ b/packages/backend/src/server/api/endpoints/i.ts @@ -11,7 +11,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/i/favorites.ts b/packages/backend/src/server/api/endpoints/i/favorites.ts index 2ae5aa87a7..2f0cc09c2f 100644 --- a/packages/backend/src/server/api/endpoints/i/favorites.ts +++ b/packages/backend/src/server/api/endpoints/i/favorites.ts @@ -32,7 +32,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'NoteFavorite', + ref: 'NoteFavorite' as const, }, }, }; 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 ebcb459c68..3cfbf849f3 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts @@ -38,7 +38,7 @@ export const meta = { page: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'GalleryPost', + ref: 'GalleryPost' as const, }, }, }, 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 bb77484dab..1ee8e3e8dd 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts @@ -32,7 +32,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'GalleryPost', + ref: 'GalleryPost' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index f02e94f328..3794c58ab8 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -60,7 +60,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Notification', + ref: 'Notification' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/i/page-likes.ts b/packages/backend/src/server/api/endpoints/i/page-likes.ts index 7b8f4864fa..19232288aa 100644 --- a/packages/backend/src/server/api/endpoints/i/page-likes.ts +++ b/packages/backend/src/server/api/endpoints/i/page-likes.ts @@ -38,7 +38,7 @@ export const meta = { page: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Page', + ref: 'Page' as const, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/i/pages.ts b/packages/backend/src/server/api/endpoints/i/pages.ts index 78de9e2bfb..6990bd7991 100644 --- a/packages/backend/src/server/api/endpoints/i/pages.ts +++ b/packages/backend/src/server/api/endpoints/i/pages.ts @@ -32,7 +32,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Page', + ref: 'Page' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/i/pin.ts b/packages/backend/src/server/api/endpoints/i/pin.ts index 9fc73908ae..53b3713256 100644 --- a/packages/backend/src/server/api/endpoints/i/pin.ts +++ b/packages/backend/src/server/api/endpoints/i/pin.ts @@ -41,7 +41,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/i/unpin.ts b/packages/backend/src/server/api/endpoints/i/unpin.ts index 8182254ac1..17cbe38fbe 100644 --- a/packages/backend/src/server/api/endpoints/i/unpin.ts +++ b/packages/backend/src/server/api/endpoints/i/unpin.ts @@ -29,7 +29,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }; diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 3c6050efde..0336fb3dc7 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -164,7 +164,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }; 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 cbe3f64a20..dc06890aff 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 @@ -41,7 +41,7 @@ export const meta = { group: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserGroup', + ref: 'UserGroup' as const, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/messaging/history.ts b/packages/backend/src/server/api/endpoints/messaging/history.ts index ca5b1d06a3..2e73234f3f 100644 --- a/packages/backend/src/server/api/endpoints/messaging/history.ts +++ b/packages/backend/src/server/api/endpoints/messaging/history.ts @@ -29,7 +29,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'MessagingMessage', + ref: 'MessagingMessage' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/messaging/messages.ts b/packages/backend/src/server/api/endpoints/messaging/messages.ts index 9332695fdc..4a51c463a3 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts @@ -49,7 +49,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'MessagingMessage', + ref: 'MessagingMessage' as const, }, }, 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 6092746676..e1c89c7f2c 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts @@ -36,7 +36,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'MessagingMessage', + ref: 'MessagingMessage' as const, }, errors: { diff --git a/packages/backend/src/server/api/endpoints/mute/list.ts b/packages/backend/src/server/api/endpoints/mute/list.ts index a736161b9c..1218875962 100644 --- a/packages/backend/src/server/api/endpoints/mute/list.ts +++ b/packages/backend/src/server/api/endpoints/mute/list.ts @@ -32,7 +32,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Muting', + ref: 'Muting' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index c853996a48..4a6c0dde5f 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -48,7 +48,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/notes/children.ts b/packages/backend/src/server/api/endpoints/notes/children.ts index d6062f4ebb..452ef8a5dd 100644 --- a/packages/backend/src/server/api/endpoints/notes/children.ts +++ b/packages/backend/src/server/api/endpoints/notes/children.ts @@ -39,7 +39,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/notes/clips.ts b/packages/backend/src/server/api/endpoints/notes/clips.ts index 67bac3670b..d723497d87 100644 --- a/packages/backend/src/server/api/endpoints/notes/clips.ts +++ b/packages/backend/src/server/api/endpoints/notes/clips.ts @@ -23,7 +23,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts index a465b08d3a..56170cf43e 100644 --- a/packages/backend/src/server/api/endpoints/notes/conversation.ts +++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts @@ -33,7 +33,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index ec05e5ea94..4b9f7eff97 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -119,7 +119,7 @@ export const meta = { createdNote: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index 8f45b541dc..7ad9f3d71f 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -27,7 +27,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }; 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 14831a127c..f33f7a79f1 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -48,7 +48,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, 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 bac2437056..7b2ec9728d 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -68,7 +68,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, 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 334e754d0d..f6feb46012 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -59,7 +59,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/notes/mentions.ts b/packages/backend/src/server/api/endpoints/notes/mentions.ts index 8ae90233a9..91027cf95c 100644 --- a/packages/backend/src/server/api/endpoints/notes/mentions.ts +++ b/packages/backend/src/server/api/endpoints/notes/mentions.ts @@ -45,7 +45,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }; 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 7562c6d7f8..4571ab43e4 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts @@ -26,7 +26,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts index d29893e203..904dac0592 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts @@ -46,7 +46,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'NoteReaction', + ref: 'NoteReaction' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index abfd928db1..00a1965ebf 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -39,7 +39,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/notes/replies.ts b/packages/backend/src/server/api/endpoints/notes/replies.ts index 12efe94be1..b8421f6416 100644 --- a/packages/backend/src/server/api/endpoints/notes/replies.ts +++ b/packages/backend/src/server/api/endpoints/notes/replies.ts @@ -37,7 +37,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }; 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 85daf7e48e..471b90e009 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 @@ -61,7 +61,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index 5ff3258954..f17c50dc4f 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -55,7 +55,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts index b645f86793..cd0da52ff0 100644 --- a/packages/backend/src/server/api/endpoints/notes/show.ts +++ b/packages/backend/src/server/api/endpoints/notes/show.ts @@ -19,7 +19,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, errors: { diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index 4acfed35e9..c8d7580252 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -66,7 +66,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, }; 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 c3b273937c..8e52483040 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 @@ -65,7 +65,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/pages/create.ts b/packages/backend/src/server/api/endpoints/pages/create.ts index dcf916909d..ce1f14133d 100644 --- a/packages/backend/src/server/api/endpoints/pages/create.ts +++ b/packages/backend/src/server/api/endpoints/pages/create.ts @@ -67,7 +67,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Page', + ref: 'Page' as const, }, errors: { diff --git a/packages/backend/src/server/api/endpoints/pages/featured.ts b/packages/backend/src/server/api/endpoints/pages/featured.ts index b32964c49d..0d2cf6e206 100644 --- a/packages/backend/src/server/api/endpoints/pages/featured.ts +++ b/packages/backend/src/server/api/endpoints/pages/featured.ts @@ -12,7 +12,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Page', + ref: 'Page' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts index 4a98ec0736..0ea90560a0 100644 --- a/packages/backend/src/server/api/endpoints/pages/show.ts +++ b/packages/backend/src/server/api/endpoints/pages/show.ts @@ -27,7 +27,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Page', + ref: 'Page' as const, }, errors: { diff --git a/packages/backend/src/server/api/endpoints/pinned-users.ts b/packages/backend/src/server/api/endpoints/pinned-users.ts index 548871a02c..beb5e07726 100644 --- a/packages/backend/src/server/api/endpoints/pinned-users.ts +++ b/packages/backend/src/server/api/endpoints/pinned-users.ts @@ -18,7 +18,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/users.ts b/packages/backend/src/server/api/endpoints/users.ts index fdcf59f777..45e0d8e232 100644 --- a/packages/backend/src/server/api/endpoints/users.ts +++ b/packages/backend/src/server/api/endpoints/users.ts @@ -58,7 +58,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts index d9c0ed7623..76b3463afd 100644 --- a/packages/backend/src/server/api/endpoints/users/followers.ts +++ b/packages/backend/src/server/api/endpoints/users/followers.ts @@ -44,7 +44,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Following', + ref: 'Following' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index a77fedd68e..ffe24c8f98 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -44,7 +44,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Following', + ref: 'Following' as const, }, }, 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 5852da1849..0f8aabd2bb 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 @@ -29,7 +29,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, 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 bbe041122e..4d2297b00e 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/create.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/create.ts @@ -21,7 +21,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserGroup', + ref: 'UserGroup' as const, }, }; 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 ad18a2f121..4ddf2cd71d 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/joined.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/joined.ts @@ -15,7 +15,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserGroup', + ref: 'UserGroup' as const, }, }, }; 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 d11d04b84d..6cfae8a62e 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/owned.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/owned.ts @@ -14,7 +14,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserGroup', + ref: 'UserGroup' as const, }, }, }; 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 55b86d0e53..bf850892e4 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/show.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/show.ts @@ -20,7 +20,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserGroup', + ref: 'UserGroup' as const, }, errors: { 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 6795f1dd21..c7cea74778 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts @@ -25,7 +25,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserGroup', + ref: 'UserGroup' as const, }, errors: { 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 0d188af738..bd98be1ec1 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 = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserGroup', + ref: 'UserGroup' as const, }, errors: { 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 4c89d1b7eb..a0865d805b 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/create.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts @@ -20,7 +20,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserList', + ref: 'UserList' as const, }, }; 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 4cf7db69a3..889ee7070e 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/list.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/list.ts @@ -14,7 +14,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserList', + ref: 'UserList' as const, }, }, }; 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 5822c06971..18f32037b7 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/show.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/show.ts @@ -20,7 +20,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserList', + ref: 'UserList' as const, }, errors: { 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 50fcf6ff54..4346f5f088 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 = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'UserList', + ref: 'UserList' as const, }, errors: { diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index 2069eb60ab..5d28129e9e 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -71,7 +71,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'Note', + ref: 'Note' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/users/reactions.ts b/packages/backend/src/server/api/endpoints/users/reactions.ts index 6f68aca184..3419626156 100644 --- a/packages/backend/src/server/api/endpoints/users/reactions.ts +++ b/packages/backend/src/server/api/endpoints/users/reactions.ts @@ -44,7 +44,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'NoteReaction', + ref: 'NoteReaction' as const, }, }, diff --git a/packages/backend/src/server/api/endpoints/users/recommendation.ts b/packages/backend/src/server/api/endpoints/users/recommendation.ts index 5e640330c8..4705abcf5c 100644 --- a/packages/backend/src/server/api/endpoints/users/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/users/recommendation.ts @@ -30,7 +30,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, }; 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 b9cf332f47..9a2b5cb32e 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 @@ -36,7 +36,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts index 35f1988fce..3014dc847b 100644 --- a/packages/backend/src/server/api/endpoints/users/search.ts +++ b/packages/backend/src/server/api/endpoints/users/search.ts @@ -41,7 +41,7 @@ export const meta = { items: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, }, }; diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index e8b2a781f7..e9b09ec984 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -34,7 +34,7 @@ export const meta = { res: { type: 'object' as const, optional: false as const, nullable: false as const, - ref: 'User', + ref: 'User' as const, }, errors: {