jointrashposs/types/instances-info.ts

57 lines
1.6 KiB
TypeScript
Raw Permalink Normal View History

2024-03-11 10:26:08 +01:00
import type { entities as MisskeyEntities } from 'misskey-js';
2023-07-09 11:58:53 +02:00
/** 各インスタンスの情報 */
export type InstanceItem = {
/** Hostname (e.g. `misskey.io`) */
url: string;
/** Name (e.g. `すしすきー`) */
name: string;
/** Language the API author aqz set manually (e.g. `["ja"]`, `["zh"]`) */
langs: string[],
/** `meta.description` or the the API author aqz set manually */
description: string | null;
/** `true` only */
isAlive: true,
/** The server Value calculated from the version, etc. */
value: number,
/** Banner existance */
banner: boolean;
/** Background Image existance */
background: boolean;
/** Icon Image existance */
icon: boolean;
/** nodeinfo */
2023-07-09 20:09:50 +02:00
nodeinfo: Record<string, any> | null,
2023-07-09 11:58:53 +02:00
/** result of api/meta */
2024-03-11 10:26:08 +01:00
meta: MisskeyEntities.MetaLite | null,
/** Number of Notes per Day (15-day average) */
npd15: number,
2023-07-09 20:09:50 +02:00
stats?: Record<string, any>, // deprecated (result of api/stats)
2023-07-09 11:58:53 +02:00
};
/** JSON Object Returned from `joinmisskey/api`. */
export type InstanceInfo = {
/** The date instances.json was published at. */
date: string;
/** Statistics */
stats: {
/** Total notes */
notesCount: number;
/** Total Users */
usersCount: number;
/** Total MAUs */
mau: number;
/** Servers counter */
instancesCount: number;
},
/** Instance List */
instancesInfos: InstanceItem[];
}
export type InstancesStatsObj = {
notesCount?: number;
usersCount?: number;
instancesCount?: number;
};