monkeeShark/packages/misskey-js/src/schemas/antenna.ts

94 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-05-02 17:31:17 +00:00
import type { JSONSchema7Reference } from 'json-schema-to-ts';
2023-05-02 12:05:17 +00:00
export const packedAntennaSchema = {
2023-05-02 16:51:41 +00:00
$id: '/schemas/Antenna',
2023-05-02 12:05:17 +00:00
type: 'object',
properties: {
id: {
type: 'string',
format: 'id',
},
createdAt: {
type: 'string',
format: 'date-time',
},
name: {
type: 'string',
},
keywords: {
type: 'array',
items: {
type: 'array',
items: {
type: 'string',
},
},
},
excludeKeywords: {
type: 'array',
items: {
type: 'array',
items: {
type: 'string',
},
},
},
src: {
type: 'string',
enum: ['home', 'all', 'users', 'list'],
},
userListId: {
oneOf: [{
type: 'string',
format: 'id',
}, {
type: 'null',
}],
},
users: {
type: 'array',
items: {
type: 'string',
},
},
caseSensitive: {
type: 'boolean',
default: false,
},
notify: {
type: 'boolean',
},
withReplies: {
type: 'boolean',
default: false,
},
withFile: {
type: 'boolean',
},
isActive: {
type: 'boolean',
},
hasUnreadNote: {
type: 'boolean',
default: false,
},
},
2023-05-02 16:51:41 +00:00
required: [
'id',
'createdAt',
'name',
'keywords',
'excludeKeywords',
'src',
'userListId',
'users',
'caseSensitive',
'notify',
'withReplies',
'withFile',
'isActive',
'hasUnreadNote',
],
2023-05-02 17:31:17 +00:00
} as const satisfies JSONSchema7Reference;