mizzkey/packages/misskey-js/src/schemas/federation-instance.ts

113 lines
1.9 KiB
TypeScript
Raw Normal View History

2023-05-10 16:58:45 +02:00
import type { JSONSchema7Definition } from 'schema-type';
2023-05-02 14:05:17 +02:00
export const packedFederationInstanceSchema = {
2023-05-10 16:58:45 +02:00
$id: 'https://misskey-hub.net/api/schemas/FederationInstance',
2023-05-02 14:05:17 +02:00
type: 'object',
properties: {
2023-05-10 16:58:45 +02:00
id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
2023-05-02 14:05:17 +02:00
firstRetrievedAt: {
type: 'string',
format: 'date-time',
},
host: {
type: 'string',
2023-05-10 16:58:45 +02:00
examples: 'misskey.example.com',
2023-05-02 14:05:17 +02:00
},
usersCount: {
type: 'number',
},
notesCount: {
type: 'number',
},
followingCount: {
type: 'number',
},
followersCount: {
type: 'number',
},
isNotResponding: {
type: 'boolean',
},
isSuspended: {
type: 'boolean',
},
isBlocked: {
type: 'boolean',
},
softwareName: {
2023-05-10 16:58:45 +02:00
type: ['string', 'null'],
examples: 'misskey',
2023-05-02 14:05:17 +02:00
},
softwareVersion: {
2023-05-10 16:58:45 +02:00
type: ['string', 'null'],
2023-05-02 14:05:17 +02:00
},
openRegistrations: {
2023-05-10 16:58:45 +02:00
type: ['boolean', 'null'],
examples: true,
2023-05-02 14:05:17 +02:00
},
name: {
2023-05-10 16:58:45 +02:00
type: ['string', 'null'],
2023-05-02 14:05:17 +02:00
},
description: {
2023-05-10 16:58:45 +02:00
type: ['string', 'null'],
2023-05-02 14:05:17 +02:00
},
maintainerName: {
2023-05-10 16:58:45 +02:00
type: ['string', 'null'],
2023-05-02 14:05:17 +02:00
},
maintainerEmail: {
2023-05-10 16:58:45 +02:00
type: ['string', 'null'],
2023-05-02 14:05:17 +02:00
},
iconUrl: {
2023-05-10 16:58:45 +02:00
oneOf: [{
type: 'string',
format: 'url',
}, {
type: 'null',
}],
2023-05-02 14:05:17 +02:00
},
faviconUrl: {
2023-05-10 16:58:45 +02:00
oneOf: [{
type: 'string',
format: 'url',
}, {
type: 'null',
}],
2023-05-02 14:05:17 +02:00
},
themeColor: {
2023-05-10 16:58:45 +02:00
type: ['string', 'null'],
2023-05-02 14:05:17 +02:00
},
infoUpdatedAt: {
2023-05-10 16:58:45 +02:00
oneOf: [{
type: 'string',
format: 'date-time',
}, {
type: 'null',
}],
2023-05-02 14:05:17 +02:00
},
},
2023-05-10 16:58:45 +02:00
required: [
'id',
'firstRetrievedAt',
'host',
'usersCount',
'notesCount',
'followingCount',
'followersCount',
'isNotResponding',
'isSuspended',
'isBlocked',
'softwareName',
'softwareVersion',
'openRegistrations',
'name',
'description',
'maintainerName',
'maintainerEmail',
'iconUrl',
'faviconUrl',
'themeColor',
'infoUpdatedAt',
],
} as const satisfies JSONSchema7Definition;