2023-05-10 14:37:01 +00:00
|
|
|
import type { JSONSchema7Definition } from 'schema-type';
|
|
|
|
|
2023-05-02 12:05:17 +00:00
|
|
|
export const packedClipSchema = {
|
2023-05-10 14:37:01 +00:00
|
|
|
$id: 'https://misskey-hub.net/api/schemas/Clip',
|
|
|
|
|
2023-05-02 12:05:17 +00:00
|
|
|
type: 'object',
|
|
|
|
properties: {
|
2023-05-10 14:37:01 +00:00
|
|
|
id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
2023-05-02 12:05:17 +00:00
|
|
|
createdAt: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
lastClippedAt: {
|
2023-05-10 14:37:01 +00:00
|
|
|
oneOf: [{
|
|
|
|
type: 'string',
|
|
|
|
format: 'date-time',
|
|
|
|
}, {
|
|
|
|
type: 'null',
|
|
|
|
}],
|
|
|
|
},
|
|
|
|
userId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
|
|
|
user: { $ref: 'https://misskey-hub.net/api/schemas/UserLite' },
|
2023-05-02 12:05:17 +00:00
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
description: {
|
2023-05-10 14:37:01 +00:00
|
|
|
type: ['string', 'null'],
|
2023-05-02 12:05:17 +00:00
|
|
|
},
|
|
|
|
isPublic: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
|
|
|
isFavorited: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
|
|
|
favoritedCount: {
|
|
|
|
type: 'number',
|
|
|
|
},
|
|
|
|
},
|
2023-05-10 14:37:01 +00:00
|
|
|
required: [
|
|
|
|
'id',
|
|
|
|
'createdAt',
|
|
|
|
'lastClippedAt',
|
|
|
|
'userId',
|
|
|
|
'user',
|
|
|
|
'name',
|
|
|
|
'description',
|
|
|
|
'isPublic',
|
|
|
|
'favoritedCount',
|
|
|
|
],
|
|
|
|
} as const satisfies JSONSchema7Definition;
|