-
Notifications
You must be signed in to change notification settings - Fork 1
/
service.ts
48 lines (40 loc) · 943 Bytes
/
service.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
import {
EventDateTimes,
AppBaseMetadata,
ObjectValues
} from "../types.js"
export type IService = ServiceListItem & EventDateTimes & {
active_deployment_id: string
latest_deployment_id: string
state: ServiceState
}
export type ServiceListItem = AppBaseMetadata & {
updated_at: string
created_at: string
}
export type ServiceState = {
desired_deployment: DesiredDeployment
auto_release: AutoRelease
}
export type DesiredDeployment = {
groups: DesiredDeploymentGroup[]
}
export type DesiredDeploymentGroup = {
name: string
deployment_ids: string[]
}
export type AutoRelease = {
groups: AutoReleaseGroup[]
}
export type AutoReleaseGroup = {
name: string
repository: string
git_ref: string
latest_sha: string
}
export type Action = ObjectValues<typeof ACTIONS>
export const ACTIONS = {
PAUSE: 'pause',
RESUME: 'resume',
REDEPLOY: 'redeploy'
} as const