import { type LockResponse, type LockStatus, type PromotionReport, type PromotionReportStub, type PromotionRequestConfig, type PromotionResponse, type PromotionStatus, type RollbackConfig, type RollbackResponse } from '../../api/cloud/EnvPromotionApi'; import { State } from '../../shared/State'; export type EnvPromotion = { /** * Lock environment * @returns {Promise} a promise that resolves to a LockResponse object. */ lockEnvironment(): Promise; /** * Unlock environment * @param {string} promotionId Promotion id. * @returns {Promise} a promise that resolves to a LockResponse object */ unlockEnvironment(promotionId: string): Promise; /** * Read lock status * @returns {Promise} a promise that resolves to a LockStatus object */ readLockStatus(): Promise; /** * Promote configuration * @param {PromotionRequestConfig} config Promotion request config * @returns {Promise} a promise that resolves to a PromotionResponse object. */ promoteConfiguration(config: PromotionRequestConfig): Promise; /** * Read promotion status * @returns {Promise} a promise that resolves to a PromotionStatus object */ readPromotionStatus(): Promise; /** * Read last promotion report * @returns {Promise} a promise that resolves to a PromotionReport object */ readLastPromotionReport(): Promise; /** * Read promotion report * @param {string} reportId Promotion id * @returns {Promise} a promise that resolves to a PromotionReport object */ readPromotionReport(reportId: string): Promise; /** * Run 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. * @returns {Promise} a promise that resolves to a PromotionReport object */ runProvisionalPromotionReport(): Promise; /** * Run a provisional rollback report of changes when we rollback the configuration to the previous promotion. * @returns {Promise} a promise that resolves to a PromotionReport object */ runProvisionalRollbackReport(): Promise; /** * Read a list of promotion reports in date order. * @returns {Promise} a promise that resolves to an array of PromotionReportStub objects */ readPromotionReports(): Promise; /** * Rollback a promotion * @param {RollbackConfig} config Rollback config * @returns {Promise} a promise that resolves to a RollbackResponse object. */ rollbackPromotion(config: RollbackConfig): Promise; }; declare const _default: (state: State) => EnvPromotion; export default _default; /** * 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; /** * Read lock status * @returns {Promise} a promise that resolves to a LockStatus object */ export declare function readLockStatus({ 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; /** * Read 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 readPromotionStatus({ state, }: { state: State; }): Promise; /** * Read 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 readLastPromotionReport({ state, }: { state: State; }): Promise; /** * Read 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 readPromotionReport({ reportId, state, }: { reportId: string; state: State; }): Promise; /** * Run 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 runProvisionalPromotionReport({ state, }: { state: State; }): Promise; /** * Run 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 runProvisionalRollbackReport({ state, }: { state: State; }): Promise; /** * Read 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 readPromotionReports({ 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=EnvPromotionOps.d.ts.map