wip
This commit is contained in:
parent
37142d7495
commit
cdfab72b35
48
packages/misskey-js/src/schemas/ad.ts
Normal file
48
packages/misskey-js/src/schemas/ad.ts
Normal 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;
|
35
packages/misskey-js/src/schemas/announcement.ts
Normal file
35
packages/misskey-js/src/schemas/announcement.ts
Normal 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;
|
Loading…
Reference in a new issue