This commit is contained in:
tamaina 2023-05-10 14:48:12 +00:00
parent 32e489e536
commit 5bb2d71231

View file

@ -1,39 +1,43 @@
import type { JSONSchema7Definition } from 'schema-type';
export const packedDriveFolderSchema = { export const packedDriveFolderSchema = {
$id: 'https://misskey-hub.net/api/schemas/DriveFolder',
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',
}, },
name: { name: {
type: 'string', type: 'string',
optional: false, nullable: false,
}, },
foldersCount: { foldersCount: {
type: 'number', type: 'number',
optional: true, nullable: false,
}, },
filesCount: { filesCount: {
type: 'number', type: 'number',
optional: true, nullable: false,
}, },
parentId: { parentId: {
type: 'string', oneOf: [{
optional: false, nullable: true, $ref: 'https://misskey-hub.net/api/schemas/Id',
format: 'id', }, {
example: 'xxxxxxxxxx', type: 'null',
}],
}, },
parent: { parent: {
type: 'object', oneOf: [{
optional: true, nullable: true, $ref: 'https://misskey-hub.net/api/schemas/DriveFolder',
ref: 'DriveFolder', }, {
type: 'null',
}],
}, },
}, },
} as const; required: [
'id',
'createdAt',
'name',
'parentId',
],
} as const satisfies JSONSchema7Definition;