From 0e9d8b96338fb0085fd8098c8d2ee98537001fbf Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-net@users.noreply.github.com> Date: Sat, 2 Nov 2024 16:11:16 +0900 Subject: [PATCH] =?UTF-8?q?#387=20=E3=81=AEjson-schema=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20(#525)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/models/json-schema/notification.ts | 28 ++++++++++++++++++- packages/cherrypick-js/src/autogen/types.ts | 9 ++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/models/json-schema/notification.ts b/packages/backend/src/models/json-schema/notification.ts index 052eb84bf7..d941930916 100644 --- a/packages/backend/src/models/json-schema/notification.ts +++ b/packages/backend/src/models/json-schema/notification.ts @@ -21,7 +21,7 @@ const baseSchema = { type: { type: 'string', optional: false, nullable: false, - enum: [...notificationTypes, 'reaction:grouped', 'renote:grouped'], + enum: [...notificationTypes, 'reaction:grouped', 'renote:grouped', 'note:grouped'], }, }, } as const; @@ -376,6 +376,32 @@ export const packedNotificationSchema = { }, }, }, + }, { + type: 'object', + properties: { + ...baseSchema.properties, + type: { + type: 'string', + optional: false, nullable: false, + enum: ['note:grouped'], + }, + noteIds: { + type: 'array', + items: { + type: 'string', + optional: false, nullable: false, + }, + }, + users: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + ref: 'UserLite', + optional: false, nullable: false, + }, + }, + }, }, { type: 'object', properties: { diff --git a/packages/cherrypick-js/src/autogen/types.ts b/packages/cherrypick-js/src/autogen/types.ts index 8d9c0ed574..de79188ae1 100644 --- a/packages/cherrypick-js/src/autogen/types.ts +++ b/packages/cherrypick-js/src/autogen/types.ts @@ -4629,6 +4629,15 @@ export type components = { type: 'renote:grouped'; note: components['schemas']['Note']; users: components['schemas']['UserLite'][]; + } | { + /** Format: id */ + id: string; + /** Format: date-time */ + createdAt: string; + /** @enum {string} */ + type: 'note:grouped'; + noteIds: string[]; + users: components['schemas']['UserLite'][]; } | { /** Format: id */ id: string;