This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
codepipeline.ts
96 lines (89 loc) · 1.97 KB
/
codepipeline.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
/**
* See https://docs.aws.amazon.com/codepipeline/latest/userguide/detect-state-changes-cloudwatch-events.html
*/
export type CodePipelineState =
| 'STARTED'
| 'SUCCEEDED'
| 'RESUMED'
| 'FAILED'
| 'CANCELED'
| 'SUPERSEDED';
export type CodePipelineStageState =
| 'STARTED'
| 'SUCCEEDED'
| 'RESUMED'
| 'FAILED'
| 'CANCELED';
export type CodePipelineActionState =
| 'STARTED'
| 'SUCCEEDED'
| 'FAILED'
| 'CANCELED';
export interface CodePipelinePiplelineEvent {
version: string;
id: string;
'detail-type': 'CodePipeline Pipeline Execution State Change';
source: 'aws.codepipeline';
account: string;
time: string;
region: string;
resources: string[];
detail: {
pipeline: string;
version: number;
state: CodePipelineState;
'execution-id': string;
};
}
export interface CodePipelineStageEvent {
version: string;
id: string;
'detail-type': 'CodePipeline Stage Execution State Change';
source: 'aws.codepipeline';
account: string;
time: string;
region: string;
resources: string[];
detail: {
pipeline: string;
version: number;
'execution-id': string;
stage: string;
state: CodePipelineStageState;
};
}
export type CodePipelineActionCategory =
| 'Approval'
| 'Build'
| 'Deploy'
| 'Invoke'
| 'Source'
| 'Test';
export interface CodePipelineActionEvent {
version: string;
id: string;
'detail-type': 'CodePipeline Action Execution State Change';
source: 'aws.codepipeline';
account: string;
time: string;
region: string;
resources: string[];
detail: {
pipeline: string;
version: number;
'execution-id': string;
stage: string;
action: string;
state: CodePipelineActionState;
type: {
owner: 'AWS' | 'Custom' | 'ThirdParty';
category: CodePipelineActionCategory;
provider: 'CodeDeploy';
version: number;
};
};
}
export type CodePipelineEvent =
| CodePipelinePiplelineEvent
| CodePipelineStageEvent
| CodePipelineActionEvent;