summaryrefslogtreecommitdiff
path: root/packages/backend/src/models/json-schema/notification.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-11-02 15:57:55 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-11-02 15:57:55 +0900
commitf62ad3ed3eccfd242b2d1f1e25f00276f2bfff77 (patch)
tree4c7280ec000d49ae69f31b97fb1043d20c3de0f1 /packages/backend/src/models/json-schema/notification.ts
parentfix(frontend): /about の連合タブのレイアウトが一部崩れてい... (diff)
downloadsharkey-f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77.tar.gz
sharkey-f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77.tar.bz2
sharkey-f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77.zip
feat: notification grouping
Resolve #12211
Diffstat (limited to 'packages/backend/src/models/json-schema/notification.ts')
-rw-r--r--packages/backend/src/models/json-schema/notification.ts31
1 files changed, 29 insertions, 2 deletions
diff --git a/packages/backend/src/models/json-schema/notification.ts b/packages/backend/src/models/json-schema/notification.ts
index 2c434913da..27db3bb62c 100644
--- a/packages/backend/src/models/json-schema/notification.ts
+++ b/packages/backend/src/models/json-schema/notification.ts
@@ -12,7 +12,6 @@ export const packedNotificationSchema = {
type: 'string',
optional: false, nullable: false,
format: 'id',
- example: 'xxxxxxxxxx',
},
createdAt: {
type: 'string',
@@ -22,7 +21,7 @@ export const packedNotificationSchema = {
type: {
type: 'string',
optional: false, nullable: false,
- enum: [...notificationTypes],
+ enum: [...notificationTypes, 'reaction:grouped', 'renote:grouped'],
},
user: {
type: 'object',
@@ -63,5 +62,33 @@ export const packedNotificationSchema = {
type: 'string',
optional: true, nullable: true,
},
+ reactions: {
+ type: 'array',
+ optional: true, nullable: true,
+ items: {
+ type: 'object',
+ properties: {
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ reaction: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ },
+ required: ['user', 'reaction'],
+ },
+ },
+ },
+ users: {
+ type: 'array',
+ optional: true, nullable: true,
+ items: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
},
} as const;