summaryrefslogtreecommitdiff
path: root/packages/megalodon/src/entities/instance.ts
blob: 7849a94aa70ec29ea8d30a2dbe5c0827f9361647 (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
/// <reference path="account.ts" />
/// <reference path="urls.ts" />
/// <reference path="stats.ts" />

namespace Entity {
  export type Instance = {
    uri: string
    title: string
    description: string
    email: string
    version: string
    thumbnail: string | null
    urls: URLs
    stats: Stats
    languages: Array<string>
    registrations: boolean
    approval_required: boolean
    invites_enabled?: boolean
    configuration: {
      statuses: {
        max_characters: number
        max_media_attachments?: number
        characters_reserved_per_url?: number
      }
      polls?: {
        max_options: number
        max_characters_per_option: number
        min_expiration: number
        max_expiration: number
      }
    }
    contact_account?: Account
    rules?: Array<InstanceRule>
  }

  export type InstanceRule = {
    id: string
    text: string
  }
}