Skip to content

Commit 64d65f8

Browse files
committed
feat: Add ProcessPluginDataParamsType for CI and CD pipelines
1 parent bbc63db commit 64d65f8

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

src/Common/Policy.Types.ts

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { PluginDataStoreType } from '../Shared'
18-
import { VariableType } from './CIPipeline.Types'
17+
import { PluginDataStoreType, PluginDetailPayloadType } from '../Shared'
18+
import { FormType, VariableType } from './CIPipeline.Types'
1919
import { ServerErrors } from './ServerError'
2020
import { ResponseType } from './Types'
2121

@@ -62,6 +62,36 @@ export interface ProcessPluginDataReturnType {
6262
mandatoryPluginsError?: ServerErrors
6363
}
6464

65+
export type ProcessPluginDataCIParamsType = {
66+
ciPipelineId: number
67+
/**
68+
* Comma separated branch names used for v1 api
69+
* For v2 format is [branchName1],[branchName2]
70+
*/
71+
branchName?: string
72+
73+
cdPipelineId?: never
74+
envName?: never
75+
}
76+
77+
export type ProcessPluginDataCDParamsType = {
78+
cdPipelineId: number
79+
envName?: string
80+
81+
ciPipelineId?: never
82+
branchName?: never
83+
}
84+
85+
export type ProcessPluginDataParamsType = {
86+
formData: FormType
87+
pluginDataStoreState: PluginDataStoreType
88+
appId: number
89+
/**
90+
* Would be sent in case we have to get data for steps
91+
*/
92+
requiredPluginIds: PluginDetailPayloadType['pluginId']
93+
} & (ProcessPluginDataCIParamsType | ProcessPluginDataCDParamsType)
94+
6595
export enum ConsequenceAction {
6696
BLOCK = 'BLOCK',
6797
ALLOW_UNTIL_TIME = 'ALLOW_UNTIL_TIME',

0 commit comments

Comments
 (0)