import { State } from '../../shared/State'; /** * Lock response */ export type LockResponse = { description: string; promotionId: string; result: string; }; /** * Lock status */ export type LockStatus = { description: string; lowerEnv: { promotionId: string; proxyState: string; state: string; }; promotionId: string; result: 'unlocked' | 'locking' | 'unlocking' | 'locked' | 'error'; upperEnv: { promotionId: string; proxyState: string; state: string; }; }; /** * Promotion request config */ export type PromotionRequestConfig = { dryRun: boolean; ignoreEncryptedSecrets: boolean; promoter: string; promotionDescription: string; unlockEnvironmentsAfterPromotion: boolean; zendeskTicketReference: string; }; /** * Promotion response */ export type PromotionResponse = { result: string; }; export type PromotionType = 'promotion' | 'rollback'; /** * Promotion status */ export type PromotionStatus = { blockingError: boolean; encryptedSecrets: string[]; globalLock: string; message: string; missingESVs: string[]; promotionId: string; status: string; timeStamp: string; type: PromotionType; }; export type PromotionConfigChange = { name: string; realm: string; uid: string; }; export type PromotionConfig = { configChange: { added: PromotionConfigChange[]; deleted: PromotionConfigChange[]; modified: PromotionConfigChange[]; }; configItem: string; }; export type PromotionReport = { createdDate: string; dryRun: boolean; missingESVs: string[]; previouslyIgnoredEncryptedSecrets: string[]; promoter: string; promotionDescription: string; promotionId: string; report: { AMConfig: PromotionConfig[]; IDMConfig: PromotionConfig[]; }; reportId: string; reportName: string; type: PromotionType; }; export type PromotionReportStub = { createdDate: '2022-01-19T13:04:00Z'; dryRun: true; promotionId: '7575f185-cd0b-4823-b8b1-f677895291d4'; reportId: 'd19e140-8325-4669-b9f3-1cd82784e24e'; type: 'rollback'; }; /** * Rollback request */ export type RollbackConfig = { promoter: string; promotionDescription: string; unlockEnvironmentsAfterPromotion: boolean; zendeskTicketReference: string; }; /** * Rollback response */ export type RollbackResponse = { result: string; }; /** * Lock environment * @param {Object} params Parameters object. * @param {State} params.state State object. * @returns {Promise} a promise that resolves to a LockResponse object. */ export declare function lockEnvironment({ state, }: { state: State; }): Promise; /** * Unlock environment * @param {Object} params Parameters object. * @param {string} params.promotionId Promotion id. * @param {State} params.state State object. * @returns {Promise} a promise that resolves to a LockResponse object */ export declare function unlockEnvironment({ promotionId, state, }: { promotionId: string; state: State; }): Promise; /** * Get lock status * @returns {Promise} a promise that resolves to a LockStatus object */ export declare function getLockStatus({ state, }: { state: State; }): Promise; /** * Promote configuration * @param {Object} params Parameters object. * @param {PromotionRequestConfig} params.config Promotion request config * @param {State} params.state State object. * @returns {Promise} a promise that resolves to a PromotionResponse object. */ export declare function promoteConfiguration({ config, state, }: { config: PromotionRequestConfig; state: State; }): Promise; /** * Get promotion status * @param {Object} params Parameters object. * @param {State} params.state State object. * @returns {Promise} a promise that resolves to a PromotionStatus object */ export declare function getPromotionStatus({ state, }: { state: State; }): Promise; /** * Get last promotion report * @param {Object} params Parameters object. * @param {State} params.state State object. * @returns {Promise} a promise that resolves to a PromotionReport object */ export declare function getLastPromotionReport({ state, }: { state: State; }): Promise; /** * Get promotion report * @param {Object} params Parameters object. * @param {string} params.reportId Promotion id * @param {State} params.state State object. * @returns {Promise} a promise that resolves to a PromotionReport object */ export declare function getPromotionReport({ reportId, state, }: { reportId: string; state: State; }): Promise; /** * Get a provisional report of changes since the last time the lower environment was promoted to the upper environment. * The report generated is for informational purposes only and may not reflect all the changes in a full promotion. * A dry-run promotion is always recommended prior to a full promotion between environments. * @param {Object} params Parameters object. * @param {State} params.state State object. * @returns {Promise} a promise that resolves to a PromotionReport object */ export declare function getProvisionalPromotionReport({ state, }: { state: State; }): Promise; /** * Get a provisional rollback report of changes when we rollback the configuration to the previous promotion. * @param {Object} params Parameters object. * @param {State} params.state State object. * @returns {Promise} a promise that resolves to a PromotionReport object */ export declare function getProvisionalRollbackReport({ state, }: { state: State; }): Promise; /** * Get a list of promotion reports in date order. * @param {Object} params Parameters object. * @param {State} params.state State object. * @returns {Promise} a promise that resolves to an array of PromotionReportStub objects */ export declare function getPromotionReports({ state, }: { state: State; }): Promise; /** * Rollback a promotion * @param {Object} params Parameters object. * @param {RollbackConfig} params.config Rollback config * @param {State} params.state State object. * @returns {Promise} a promise that resolves to a RollbackResponse object. */ export declare function rollbackPromotion({ config, state, }: { config: RollbackConfig; state: State; }): Promise; //# sourceMappingURL=EnvPromotionApi.d.ts.map