mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 08:10:24 +01:00
packedNotificationSchemaを更新
This commit is contained in:
parent
0281bdd90c
commit
ba1c57c7bd
1 changed files with 28 additions and 6 deletions
|
@ -7,6 +7,7 @@ import { Note } from '@/models/entities/note';
|
|||
import { NoteReaction } from '@/models/entities/note-reaction';
|
||||
import { User } from '@/models/entities/user';
|
||||
import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis';
|
||||
import { notificationTypes } from '@/types';
|
||||
|
||||
export type PackedNotification = SchemaType<typeof packedNotificationSchema>;
|
||||
|
||||
|
@ -124,20 +125,41 @@ export const packedNotificationSchema = {
|
|||
optional: false as const, nullable: false as const,
|
||||
format: 'date-time',
|
||||
},
|
||||
isRead: {
|
||||
type: 'boolean' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
},
|
||||
type: {
|
||||
type: 'string' as const,
|
||||
optional: false as const, nullable: false as const,
|
||||
enum: ['follow', 'followRequestAccepted', 'receiveFollowRequest', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote'],
|
||||
},
|
||||
userId: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
format: 'id',
|
||||
enum: [...notificationTypes],
|
||||
},
|
||||
user: {
|
||||
type: 'object' as const,
|
||||
ref: 'User',
|
||||
optional: true as const, nullable: true as const,
|
||||
},
|
||||
userId: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
format: 'id',
|
||||
},
|
||||
note: {
|
||||
type: 'object' as const,
|
||||
ref: 'Note',
|
||||
optional: true as const, nullable: true as const,
|
||||
},
|
||||
reaction: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
},
|
||||
body: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
},
|
||||
icon: {
|
||||
type: 'string' as const,
|
||||
optional: true as const, nullable: true as const,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue