Skip to content

Commit bbc63db

Browse files
committed
feat: update DefinitionSourceType for v2
1 parent 77d7ebc commit bbc63db

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/Common/Policy.Types.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export enum ApplyPolicyToStage {
2323
PRE_CI = 'PRE_CI',
2424
POST_CI = 'POST_CI',
2525
PRE_OR_POST_CI = 'PRE_OR_POST_CI',
26+
POST_CD = 'POST_CD',
27+
PRE_CD = 'PRE_CD',
2628
}
2729

2830
export enum PluginRequiredStage {
@@ -32,16 +34,10 @@ export enum PluginRequiredStage {
3234
}
3335

3436
export interface DefinitionSourceType {
35-
projectName: string
36-
isDueToProductionEnvironment: boolean
37-
isDueToLinkedPipeline: boolean
38-
policyName: string
39-
appName?: string
40-
clusterName?: string
41-
environmentName?: string
42-
branchNames?: string[]
43-
ciPipelineName?: string
37+
policyNames: string[]
38+
linkedCIPipelineNames?: string[]
4439
}
40+
4541
export interface MandatoryPluginDetailType {
4642
id: number
4743
parentPluginId: number
@@ -52,7 +48,7 @@ export interface MandatoryPluginDetailType {
5248
applied?: boolean
5349
inputVariables?: VariableType[]
5450
outputVariables?: VariableType[]
55-
definitionSources?: DefinitionSourceType[]
51+
definitionSources?: DefinitionSourceType
5652
}
5753
export interface MandatoryPluginDataType {
5854
pluginData: MandatoryPluginDetailType[]

src/Shared/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ export enum ResourceKindType {
439439
installation = 'installation',
440440
environment = 'environment',
441441
cdPipeline = 'cd-pipeline',
442+
ciPipeline = 'ci-pipeline',
442443
project = 'project',
443444
}
444445

0 commit comments

Comments
 (0)