diff options
Diffstat (limited to 'ci/invidiousType.ts')
-rw-r--r-- | ci/invidiousType.ts | 110 |
1 files changed, 64 insertions, 46 deletions
diff --git a/ci/invidiousType.ts b/ci/invidiousType.ts index e5f682bb..46abdb04 100644 --- a/ci/invidiousType.ts +++ b/ci/invidiousType.ts @@ -1,54 +1,72 @@ -type ratio = { - ratio: string; - label: string; -} - -export type instanceMap = { - name: string; - url: string; - dailyRatios: {ratio: string; label: string }[]; - thirtyDayUptime: string; -}[] - export type InvidiousInstance = [ string, { flag: string; region: string; - stats: null | { - version: string; - software: { - name: string; - version: string; - branch: string; - }; - openRegistrations: boolean; - usage: { - users: { - total: number; - activeHalfyear: number; - activeMonth: number; - }; - }; - metadata: { - updatedAt: number; - lastChannelRefreshedAt: number; - }; - }; - cors: boolean | null; - api: boolean | null; + stats: null | ivStats; + cors: null | boolean; + api: null | boolean; type: "https" | "http" | "onion" | "i2p"; uri: string; - monitor: null | { - monitorId: number; - createdAt: number; - statusClass: string; - name: string; - url: string | null; - type: "HTTP(s)"; - dailyRatios: ratio[]; - "90dRatio": ratio; - "30dRatio": ratio; - }; + monitor: null | monitor; } -]
\ No newline at end of file +] + +export type monitor = { + token: string; + url: string; + alias: string; + last_status: number; + uptime: number; + down: boolean; + down_since: null | string; + up_since: null | string; + error: null | string; + period: number; + apdex_t: number; + string_match: string; + enabled: boolean; + published: boolean; + disabled_locations: string[]; + recipients: string[]; + last_check_at: string; + next_check_at: string; + created_at: string; + mute_until: null | string; + favicon_url: string; + custom_headers: Record<string, string>; + http_verb: string; + http_body: string; + ssl: { + tested_at: string; + expires_at: string; + valid: boolean; + error: null | string; + }; +} + +export type ivStats = { + version: string; + software: { + name: "invidious" | string; + version: string; + branch: "master" | string; + }; + openRegistrations: boolean; + usage: { + users: { + total: number; + activeHalfyear: number; + activeMonth: number; + }; + }; + metadata: { + updatedAt: number; + lastChannelRefreshedAt: number; + }; + playback: { + totalRequests: number; + successfulRequests: number; + ratio: number; + }; +}
\ No newline at end of file |