aboutsummaryrefslogtreecommitdiffhomepage
path: root/ci/invidiousType.ts
blob: e5f682bbb347d910137a75229b2d9ace6cee35e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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;
    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;
    };
  }
]