Skip to content

Commit

Permalink
kokonect-link#387 のjson-schemaを修正 (kokonect-link#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
penginn-net authored Nov 2, 2024
1 parent d092e1d commit 0e9d8b9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
28 changes: 27 additions & 1 deletion packages/backend/src/models/json-schema/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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: {
Expand Down
9 changes: 9 additions & 0 deletions packages/cherrypick-js/src/autogen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0e9d8b9

Please sign in to comment.