iceshrimp/packages/backend/src/models/schema/federation-instance.ts
Luna D Dragon 91b8b7b76b
Defry the fish (#125)
Co-authored-by: Luna <luna.dragon@suse.com>
Reviewed-on: https://iceshrimp.dev/iceshrimp/iceshrimp/pulls/125
Co-authored-by: Luna D Dragon <lunarequest@nullrequest.com>
Co-committed-by: Luna D Dragon <lunarequest@nullrequest.com>
2023-08-21 16:14:53 +02:00

145 lines
2.4 KiB
TypeScript

import config from "@/config/index.js";
export const packedFederationInstanceSchema = {
type: "object",
properties: {
id: {
type: "string",
optional: false,
nullable: false,
format: "id",
},
caughtAt: {
type: "string",
optional: false,
nullable: false,
format: "date-time",
},
host: {
type: "string",
optional: false,
nullable: false,
example: "iceshrimp.example.com",
},
accountDomain: {
type: "string",
optional: true,
nullable: true,
example: "example.com",
},
usersCount: {
type: "number",
optional: false,
nullable: false,
},
notesCount: {
type: "number",
optional: false,
nullable: false,
},
followingCount: {
type: "number",
optional: false,
nullable: false,
},
followersCount: {
type: "number",
optional: false,
nullable: false,
},
latestRequestSentAt: {
type: "string",
optional: false,
nullable: true,
format: "date-time",
},
lastCommunicatedAt: {
type: "string",
optional: false,
nullable: false,
format: "date-time",
},
isNotResponding: {
type: "boolean",
optional: false,
nullable: false,
},
isSuspended: {
type: "boolean",
optional: false,
nullable: false,
},
isBlocked: {
type: "boolean",
optional: false,
nullable: false,
},
isSilenced: {
type: "boolean",
optional: false,
nullable: false,
},
softwareName: {
type: "string",
optional: false,
nullable: true,
example: "iceshrimp",
},
softwareVersion: {
type: "string",
optional: false,
nullable: true,
example: config.version,
},
openRegistrations: {
type: "boolean",
optional: false,
nullable: true,
example: true,
},
name: {
type: "string",
optional: false,
nullable: true,
},
description: {
type: "string",
optional: false,
nullable: true,
},
maintainerName: {
type: "string",
optional: false,
nullable: true,
},
maintainerEmail: {
type: "string",
optional: false,
nullable: true,
},
iconUrl: {
type: "string",
optional: false,
nullable: true,
format: "url",
},
faviconUrl: {
type: "string",
optional: false,
nullable: true,
format: "url",
},
themeColor: {
type: "string",
optional: false,
nullable: true,
},
infoUpdatedAt: {
type: "string",
optional: false,
nullable: true,
format: "date-time",
},
},
} as const;