This commit is contained in:
tamaina 2023-05-10 14:37:01 +00:00
parent 9699bac704
commit fc10a9026c

View file

@ -1,51 +1,50 @@
import type { JSONSchema7Definition } from 'schema-type';
export const packedClipSchema = { export const packedClipSchema = {
$id: 'https://misskey-hub.net/api/schemas/Clip',
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',
}, },
lastClippedAt: { lastClippedAt: {
oneOf: [{
type: 'string', type: 'string',
optional: false, nullable: true,
format: 'date-time', format: 'date-time',
}, {
type: 'null',
}],
}, },
userId: { userId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
type: 'string', user: { $ref: 'https://misskey-hub.net/api/schemas/UserLite' },
optional: false, nullable: false,
format: 'id',
},
user: {
type: 'object',
ref: 'UserLite',
optional: false, nullable: false,
},
name: { name: {
type: 'string', type: 'string',
optional: false, nullable: false,
}, },
description: { description: {
type: 'string', type: ['string', 'null'],
optional: false, nullable: true,
}, },
isPublic: { isPublic: {
type: 'boolean', type: 'boolean',
optional: false, nullable: false,
}, },
isFavorited: { isFavorited: {
type: 'boolean', type: 'boolean',
optional: true, nullable: false,
}, },
favoritedCount: { favoritedCount: {
type: 'number', type: 'number',
optional: false, nullable: false,
}, },
}, },
} as const; required: [
'id',
'createdAt',
'lastClippedAt',
'userId',
'user',
'name',
'description',
'isPublic',
'favoritedCount',
],
} as const satisfies JSONSchema7Definition;