-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
156 lines (141 loc) · 2.91 KB
/
types.ts
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
export type Account = {
allow_tracking: boolean,
beta: boolean,
country_of_residence?: string,
created_at: DateTime,
default_organization?: Base,
default_team?: Base,
delinquent_at?: DateTime,
email: string,
federated: boolean,
id: UUID,
identity_provider?: IdentityProvider,
last_login?: DateTime,
name?: string,
sms_number?: string,
suspended_at?: DateTime,
two_factor_authentication: boolean,
updated_at?: DateTime,
verified: boolean
}
export type IdentityProvider = {
id: UUID,
name: string,
organization: {
name: string
},
team: {
name: string
},
owner: Base & {
type: AccountType
}
}
export type App = Base & {
acm: boolean,
archived_at?: DateTime,
build_stack: Base,
buildpack_provided_description?: string,
created_at: DateTime,
git_url: string,
internal_routing: boolean,
maintenance: boolean,
organization: Base,
owner: {
email: string,
id: UUID
},
region: Base,
released_at?: DateTime,
repo_size?: number,
slug_size?: number,
space: BaseSpace,
stack: Base,
team: Base,
updated_at: DateTime,
web_url: string
}
export type PartialApp = {
build_stack: string,
maintenance: boolean,
name: string
}
export type CreateDynoOptions = {
command: string,
attach?: boolean,
env?: any,
force_no_tty?: boolean,
size?: string,
time_to_live?: number,
type?: string
}
export type Dyno = Base & {
app: Base,
attach_url?: string,
command: string,
created_at: DateTime,
release: {
id: UUID,
version: number
},
state: "crashed" | "down" | "idle" | "starting" | "up",
size: string,
type: string,
updated_at: DateTime
}
export type Base = {
id: UUID,
name: string,
}
export type BaseSpace = Base & {
shield: boolean
}
export type Stack = Base & {
created_at: DateTime,
default: boolean,
state: string,
updated_at: DateTime
}
export type Team = Base & {
created_at: DateTime,
credit_card_collections: boolean,
default: boolean,
enterprise_account?: Base,
identity_provider: IdentityProvider,
membership_limit?: number,
provisioned_licenses: boolean,
role?: TeamRole,
type: AccountType,
updated_at: DateTime
}
export type Region = Base & {
country: string,
created_at: DateTime,
description: string,
locale: string,
private_capable: boolean,
provider: {
name: string,
region: string
},
updated_at: DateTime
}
export type Formation = Required<BatchUpdateFormation> & {
app: Base,
command: string,
created_at: DateTime,
id: UUID,
updated_at: DateTime
}
export type BatchUpdateFormation = UpdateFormation & {
type: string,
}
export type UpdateFormation = {
quantity?: number,
size?: string
}
export type AccountType = "team" | "enterprise-account"
export type TeamRole = "admin" | "collaborator" | "member" | "owner" | null
export type APIToken = string
export type DateTime = string
export type UUID = string