chore: APIドキュメントの修正 (#7771)
* packedNotificationSchemaを更新 * read:gallery, write:gallery, read:gallery-likes, write:gallery-likesに翻訳を追加 * fix * add header, choice, invitation
This commit is contained in:
parent
0faa4470fb
commit
935d6473ed
3 changed files with 45 additions and 6 deletions
|
@ -1150,6 +1150,10 @@ _permissions:
|
||||||
"write:user-groups": "ユーザーグループを操作する"
|
"write:user-groups": "ユーザーグループを操作する"
|
||||||
"read:channels": "チャンネルを見る"
|
"read:channels": "チャンネルを見る"
|
||||||
"write:channels": "チャンネルを操作する"
|
"write:channels": "チャンネルを操作する"
|
||||||
|
"read:gallery": "ギャラリーを見る"
|
||||||
|
"write:gallery": "ギャラリーを操作する"
|
||||||
|
"read:gallery-likes": "ギャラリーのいいねを見る"
|
||||||
|
"write:gallery-likes": "ギャラリーのいいねを操作する"
|
||||||
|
|
||||||
_auth:
|
_auth:
|
||||||
shareAccess: "「{name}」がアカウントにアクセスすることを許可しますか?"
|
shareAccess: "「{name}」がアカウントにアクセスすることを許可しますか?"
|
||||||
|
|
|
@ -32,3 +32,4 @@ export const kinds = [
|
||||||
'read:gallery-likes',
|
'read:gallery-likes',
|
||||||
'write:gallery-likes',
|
'write:gallery-likes',
|
||||||
];
|
];
|
||||||
|
// IF YOU ADD KINDS(PERMISSIONS), YOU MUST ADD TRANSLATIONS (under _permissions).
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { Note } from '@/models/entities/note';
|
||||||
import { NoteReaction } from '@/models/entities/note-reaction';
|
import { NoteReaction } from '@/models/entities/note-reaction';
|
||||||
import { User } from '@/models/entities/user';
|
import { User } from '@/models/entities/user';
|
||||||
import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis';
|
import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis';
|
||||||
|
import { notificationTypes } from '@/types';
|
||||||
|
|
||||||
export type PackedNotification = SchemaType<typeof packedNotificationSchema>;
|
export type PackedNotification = SchemaType<typeof packedNotificationSchema>;
|
||||||
|
|
||||||
|
@ -124,20 +125,53 @@ export const packedNotificationSchema = {
|
||||||
optional: false as const, nullable: false as const,
|
optional: false as const, nullable: false as const,
|
||||||
format: 'date-time',
|
format: 'date-time',
|
||||||
},
|
},
|
||||||
|
isRead: {
|
||||||
|
type: 'boolean' as const,
|
||||||
|
optional: false as const, nullable: false as const,
|
||||||
|
},
|
||||||
type: {
|
type: {
|
||||||
type: 'string' as const,
|
type: 'string' as const,
|
||||||
optional: false as const, nullable: false as const,
|
optional: false as const, nullable: false as const,
|
||||||
enum: ['follow', 'followRequestAccepted', 'receiveFollowRequest', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote'],
|
enum: [...notificationTypes],
|
||||||
},
|
|
||||||
userId: {
|
|
||||||
type: 'string' as const,
|
|
||||||
optional: true as const, nullable: true as const,
|
|
||||||
format: 'id',
|
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
type: 'object' as const,
|
type: 'object' as const,
|
||||||
ref: 'User',
|
ref: 'User',
|
||||||
optional: true as const, nullable: true as const,
|
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,
|
||||||
|
},
|
||||||
|
choice: {
|
||||||
|
type: 'number' as const,
|
||||||
|
optional: true as const, nullable: true as const,
|
||||||
|
},
|
||||||
|
invitation: {
|
||||||
|
type: 'object' as const,
|
||||||
|
optional: true as const, nullable: true as const,
|
||||||
|
},
|
||||||
|
body: {
|
||||||
|
type: 'string' as const,
|
||||||
|
optional: true as const, nullable: true as const,
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
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