This commit is contained in:
tamaina 2023-05-10 15:01:45 +00:00
parent 49e32ebf2b
commit 44e819bf6a
1 changed files with 20 additions and 25 deletions

View File

@ -1,51 +1,46 @@
import type { JSONSchema7Definition } from 'schema-type';
export const packedFlashSchema = { export const packedFlashSchema = {
$id: 'https://misskey-hub.net/api/schemas/Flash',
type: 'object', type: 'object',
properties: { properties: {
id: { id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
type: 'string',
optional: false, nullable: false,
format: 'id',
example: 'xxxxxxxxxx',
},
createdAt: { createdAt: {
type: 'string', type: 'string',
optional: false, nullable: false,
format: 'date-time', format: 'date-time',
}, },
updatedAt: { updatedAt: {
type: 'string', type: 'string',
optional: false, nullable: false,
format: 'date-time', format: 'date-time',
}, },
title: { title: {
type: 'string', type: 'string',
optional: false, nullable: false,
}, },
summary: { summary: {
type: 'string', type: 'string',
optional: false, nullable: false,
}, },
script: { script: {
type: 'string', type: 'string',
optional: false, nullable: false,
},
userId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
}, },
userId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
user: { $ref: 'https://misskey-hub.net/api/schemas/UserLite' },
likedCount: { likedCount: {
type: 'number', type: ['number', 'null'],
optional: false, nullable: true,
}, },
isLiked: { isLiked: {
type: 'boolean', type: 'boolean',
optional: true, nullable: false,
}, },
}, },
} as const; required: [
'id',
'createdAt',
'updatedAt',
'title',
'summary',
'script',
'userId',
'user',
'likedCount',
],
} as const satisfies JSONSchema7Definition;