2023-05-05 13:32:44 +02:00
|
|
|
import { CreateFeatureStrategySchema } from '../openapi';
|
|
|
|
import { IFeatureStrategy } from './strategy';
|
|
|
|
|
2021-09-14 14:20:23 +02:00
|
|
|
export interface IEnvironment {
|
|
|
|
name: string;
|
|
|
|
type: string;
|
|
|
|
createdAt: string;
|
|
|
|
sortOrder: number;
|
|
|
|
enabled: boolean;
|
|
|
|
protected: boolean;
|
2022-11-11 11:24:56 +01:00
|
|
|
projectCount?: number;
|
|
|
|
apiTokenCount?: number;
|
|
|
|
enabledToggleCount?: number;
|
2023-08-08 11:32:33 +02:00
|
|
|
lastSeenAt: string;
|
2021-09-14 14:20:23 +02:00
|
|
|
}
|
|
|
|
|
2022-11-11 11:24:56 +01:00
|
|
|
export interface IProjectEnvironment extends IEnvironment {
|
|
|
|
projectVisible?: boolean;
|
|
|
|
projectApiTokenCount?: number;
|
|
|
|
projectEnabledToggleCount?: number;
|
2023-05-05 13:32:44 +02:00
|
|
|
defaultStrategy?: Partial<IFeatureStrategy> | CreateFeatureStrategySchema;
|
2021-11-04 14:24:36 +01:00
|
|
|
}
|
|
|
|
|
2023-05-05 13:32:44 +02:00
|
|
|
export type ProjectEnvironmentType = {
|
|
|
|
environment: string;
|
|
|
|
defaultStrategy?: CreateFeatureStrategySchema;
|
|
|
|
};
|
|
|
|
|
2021-09-14 14:20:23 +02:00
|
|
|
export interface IEnvironmentPayload {
|
|
|
|
name: string;
|
|
|
|
type: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IEnvironmentEditPayload {
|
|
|
|
sortOrder: number;
|
|
|
|
type: string;
|
|
|
|
}
|
|
|
|
|
2022-10-28 10:15:46 +02:00
|
|
|
export interface IEnvironmentClonePayload {
|
|
|
|
name: string;
|
|
|
|
type: string;
|
|
|
|
projects: string[];
|
|
|
|
clonePermissions: boolean;
|
|
|
|
}
|
|
|
|
|
2021-09-14 14:20:23 +02:00
|
|
|
export interface IEnvironmentResponse {
|
|
|
|
environments: IEnvironment[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ISortOrderPayload {
|
|
|
|
[index: string]: number;
|
|
|
|
}
|