mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-17 02:49:01 +01:00
Improve type definition
This commit is contained in:
parent
d9fbddc26c
commit
b1934d95f2
2 changed files with 31 additions and 2 deletions
|
@ -257,7 +257,7 @@ export type Endpoints = {
|
||||||
'messaging/messages/read': { req: TODO; res: TODO; };
|
'messaging/messages/read': { req: TODO; res: TODO; };
|
||||||
|
|
||||||
// meta
|
// meta
|
||||||
'meta': { req: { detail?: boolean; }; res: InstanceMetadata; };
|
'meta': { req: { detail?: boolean; }; res: InstanceMetadata; }; // TODO: 「detail が true なら DetailedInstanceMetadata を返す」のような型付けをしたい
|
||||||
|
|
||||||
// miauth
|
// miauth
|
||||||
'miauth/gen-token': { req: TODO; res: TODO; };
|
'miauth/gen-token': { req: TODO; res: TODO; };
|
||||||
|
|
|
@ -154,7 +154,30 @@ export type MessagingMessage = {
|
||||||
groupId: string; // TODO
|
groupId: string; // TODO
|
||||||
};
|
};
|
||||||
|
|
||||||
export type InstanceMetadata = {
|
export type LiteInstanceMetadata = {
|
||||||
|
maintainerName: string | null;
|
||||||
|
maintainerEmail: string | null;
|
||||||
|
version: string;
|
||||||
|
name: string | null;
|
||||||
|
uri: string;
|
||||||
|
description: string | null;
|
||||||
|
tosUrl: string | null;
|
||||||
|
disableRegistration: boolean;
|
||||||
|
disableLocalTimeline: boolean;
|
||||||
|
disableGlobalTimeline: boolean;
|
||||||
|
driveCapacityPerLocalUserMb: number;
|
||||||
|
driveCapacityPerRemoteUserMb: number;
|
||||||
|
enableHcaptcha: boolean;
|
||||||
|
hcaptchaSiteKey: string | null;
|
||||||
|
enableRecaptcha: boolean;
|
||||||
|
recaptchaSiteKey: string | null;
|
||||||
|
swPublickey: string | null;
|
||||||
|
maxNoteTextLength: number;
|
||||||
|
enableEmail: boolean;
|
||||||
|
enableTwitterIntegration: boolean;
|
||||||
|
enableGithubIntegration: boolean;
|
||||||
|
enableDiscordIntegration: boolean;
|
||||||
|
enableServiceWorker: boolean;
|
||||||
emojis: {
|
emojis: {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -171,6 +194,12 @@ export type InstanceMetadata = {
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type DetailedInstanceMetadata = LiteInstanceMetadata & {
|
||||||
|
features: Record<string, any>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type InstanceMetadata = LiteInstanceMetadata | DetailedInstanceMetadata;
|
||||||
|
|
||||||
export type ServerInfo = {
|
export type ServerInfo = {
|
||||||
machine: string;
|
machine: string;
|
||||||
cpu: {
|
cpu: {
|
||||||
|
|
Loading…
Reference in a new issue