mizzkey/packages/misskey-js/src/schemas/gallery-post.ts

54 lines
1 KiB
TypeScript
Raw Normal View History

2023-05-10 17:07:37 +02:00
import type { JSONSchema7Definition } from 'schema-type';
2023-05-02 14:05:17 +02:00
export const packedGalleryPostSchema = {
2023-05-10 17:07:37 +02:00
$id: 'https://misskey-hub.net/api/schemas/GalleryPost',
2023-05-02 14:05:17 +02:00
type: 'object',
properties: {
2023-05-10 17:07:37 +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',
},
description: {
2023-05-10 17:07:37 +02:00
type: ['string', 'null'],
2023-05-02 14:05:17 +02:00
},
2023-05-10 17:07:37 +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
fileIds: {
type: 'array',
2023-05-10 17:07:37 +02:00
items: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
2023-05-02 14:05:17 +02:00
},
files: {
type: 'array',
2023-05-10 17:07:37 +02:00
items: { $ref: 'https://misskey-hub.net/api/schemas/DriveFile' },
2023-05-02 14:05:17 +02:00
},
tags: {
type: 'array',
items: {
type: 'string',
},
},
isSensitive: {
type: 'boolean',
},
},
2023-05-10 17:07:37 +02:00
required: [
'id',
'createdAt',
'updatedAt',
'title',
'description',
'userId',
'user',
'isSensitive',
],
} as const satisfies JSONSchema7Definition;