2023-05-10 14:32:46 +00:00
|
|
|
import type { JSONSchema7Definition } from 'schema-type';
|
|
|
|
|
2023-05-02 12:05:17 +00:00
|
|
|
export const packedChannelSchema = {
|
2023-05-10 14:32:46 +00:00
|
|
|
$id: 'https://misskey-hub.net/api/schemas/Channel',
|
|
|
|
|
2023-05-02 12:05:17 +00:00
|
|
|
type: 'object',
|
|
|
|
properties: {
|
2023-05-10 14:32:46 +00:00
|
|
|
id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
|
2023-05-02 12:05:17 +00:00
|
|
|
createdAt: {
|
|
|
|
type: 'string',
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
lastNotedAt: {
|
2023-05-10 14:32:46 +00:00
|
|
|
oneOf: [{
|
|
|
|
type: 'string',
|
|
|
|
format: 'date-time',
|
|
|
|
}, {
|
|
|
|
type: 'null',
|
|
|
|
}],
|
2023-05-02 12:05:17 +00:00
|
|
|
},
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
description: {
|
2023-05-10 14:32:46 +00:00
|
|
|
type: ['string', 'null'],
|
2023-05-02 12:05:17 +00:00
|
|
|
},
|
|
|
|
bannerUrl: {
|
2023-05-10 14:32:46 +00:00
|
|
|
oneOf: [{
|
|
|
|
type: 'string',
|
|
|
|
format: 'url',
|
|
|
|
}, {
|
|
|
|
type: 'null',
|
|
|
|
}],
|
2023-05-02 12:05:17 +00:00
|
|
|
},
|
2023-05-10 14:21:54 +00:00
|
|
|
isArchived: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
2023-05-02 12:05:17 +00:00
|
|
|
notesCount: {
|
|
|
|
type: 'number',
|
|
|
|
},
|
|
|
|
usersCount: {
|
|
|
|
type: 'number',
|
|
|
|
},
|
|
|
|
isFollowing: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
|
|
|
isFavorited: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
|
|
|
userId: {
|
2023-05-10 14:32:46 +00:00
|
|
|
oneOf: [{
|
|
|
|
$ref: 'https://misskey-hub.net/api/schemas/Id',
|
|
|
|
}, {
|
|
|
|
type: 'null',
|
|
|
|
}],
|
2023-05-02 12:05:17 +00:00
|
|
|
},
|
|
|
|
pinnedNoteIds: {
|
|
|
|
type: 'array',
|
|
|
|
items: {
|
2023-05-10 14:32:46 +00:00
|
|
|
$ref: 'https://misskey-hub.net/api/schemas/Id',
|
2023-05-02 12:05:17 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
color: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
},
|
2023-05-10 14:32:46 +00:00
|
|
|
required: [
|
|
|
|
'id',
|
|
|
|
'createdAt',
|
|
|
|
'lastNotedAt',
|
|
|
|
'name',
|
|
|
|
'description',
|
|
|
|
'bannerUrl',
|
|
|
|
'isArchived',
|
|
|
|
'notesCount',
|
|
|
|
'usersCount',
|
|
|
|
'userId',
|
|
|
|
'pinnedNoteIds',
|
|
|
|
'color',
|
|
|
|
],
|
|
|
|
} as const satisfies JSONSchema7Definition;
|