1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-11-10 01:19:53 +01:00

Chore: update interface (and make it a type)

This commit is contained in:
Thomas Heartman 2024-01-11 18:31:17 +05:30
parent 270520e7fc
commit 9b3dc328ad
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -21,11 +21,22 @@ export interface IChangeRequest {
schedule?: IChangeRequestSchedule;
}
export interface IChangeRequestSchedule {
scheduledAt: string;
status: 'pending' | 'failed';
failureReason?: string;
}
export type IChangeRequestSchedule =
| {
status: 'pending';
scheduledAt: string;
}
| {
status: 'failed';
scheduledAt: string;
failureReason?: string | null;
reason: string;
}
| {
status: 'suspended';
scheduledAt: string;
reason: string;
};
export interface IChangeRequestEnvironmentConfig {
environment: string;