refactor: noteのjson-schemaの型を改善

This commit is contained in:
yukineko
2024-01-08 23:15:02 +09:00
parent c81934563a
commit ad846c33d9
6 changed files with 35 additions and 9 deletions

View File

@@ -154,6 +154,11 @@ export const packedNoteSchema = {
emojis: {
type: 'object',
optional: true, nullable: false,
additionalProperties: {
anyOf: [{
type: 'string',
}],
},
},
channelId: {
type: 'string',
@@ -199,9 +204,23 @@ export const packedNoteSchema = {
type: 'string',
optional: false, nullable: true,
},
reactionEmojis: {
type: 'object',
optional: false, nullable: false,
additionalProperties: {
anyOf: [{
type: 'string',
}],
},
},
reactions: {
type: 'object',
optional: false, nullable: false,
additionalProperties: {
anyOf: [{
type: 'number',
}],
},
},
renoteCount: {
type: 'number',
@@ -233,7 +252,7 @@ export const packedNoteSchema = {
},
myReaction: {
type: 'object',
type: 'string',
optional: true, nullable: true,
},
},