This commit is contained in:
tamaina 2023-05-15 17:39:41 +09:00 committed by GitHub
parent 37142d7495
commit cdfab72b35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,48 @@
import type { JSONSchema7Definition } from 'schema-type';
export const packedAdSchema = {
$id: 'https://misskey-hub.net/api/schemas/Ad',
type: 'object',
properties: {
id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
createdAt: {
type: 'string',
format: 'date-time',
},
expiresAt: {
type: 'string',
format: 'date-time',
},
startsAt: {
type: 'string',
format: 'date-time',
},
place: {
type: 'string',
},
property: {
type: 'string',
},
ratio: {
type: 'number',
},
imageUrl: {
type: ['string', 'null'],
},
memo: {
type: 'string',
},
},
required: [
'id',
'createdAt',
'expiresAt',
'startsAt',
'place',
'property',
'ratio',
'imageUrl',
'memo',
],
} as const satisfies JSONSchema7Definition;

View File

@ -0,0 +1,35 @@
import type { JSONSchema7Definition } from 'schema-type';
export const packedAnnouncementSchema = {
$id: 'https://misskey-hub.net/api/schemas/Announcement',
type: 'object',
properties: {
id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
createdAt: {
type: 'string',
format: 'date-time',
},
updatedAt: {
type: 'string',
format: 'date-time',
},
title: {
type: 'string',
},
text: {
type: 'string',
},
imageUrl: {
type: ['string', 'null'],
},
},
required: [
'id',
'createdAt',
'updatedAt',
'title',
'text',
'imageUrl',
],
} as const satisfies JSONSchema7Definition;