2023-05-10 17:01:45 +02:00
|
|
|
import type { JSONSchema7Definition } from 'schema-type';
|
|
|
|
|
2023-05-02 14:05:17 +02:00
|
|
|
export const packedFlashSchema = {
|
2023-05-10 17:01:45 +02:00
|
|
|
$id: 'https://misskey-hub.net/api/schemas/Flash',
|
|
|
|
|
2023-05-02 14:05:17 +02:00
|
|
|
type: 'object',
|
|
|
|
properties: {
|
2023-05-10 17:01:45 +02:00
|
|
|
id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
2023-05-02 14:05:17 +02:00
|
|
|
createdAt: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
updatedAt: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
summary: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
script: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
2023-05-10 17:01:45 +02:00
|
|
|
userId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
|
|
|
user: { $ref: 'https://misskey-hub.net/api/schemas/UserLite' },
|
2023-05-02 14:05:17 +02:00
|
|
|
likedCount: {
|
2023-05-10 17:01:45 +02:00
|
|
|
type: ['number', 'null'],
|
2023-05-02 14:05:17 +02:00
|
|
|
},
|
|
|
|
isLiked: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
|
|
|
},
|
2023-05-10 17:01:45 +02:00
|
|
|
required: [
|
|
|
|
'id',
|
|
|
|
'createdAt',
|
|
|
|
'updatedAt',
|
|
|
|
'title',
|
|
|
|
'summary',
|
|
|
|
'script',
|
|
|
|
'userId',
|
|
|
|
'user',
|
|
|
|
'likedCount',
|
|
|
|
],
|
|
|
|
} as const satisfies JSONSchema7Definition;
|