1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/frontend/src/interfaces/environments.ts

53 lines
1.2 KiB
TypeScript
Raw Normal View History

2023-05-05 13:32:44 +02:00
import { CreateFeatureStrategySchema } from '../openapi';
import { IFeatureStrategy } from './strategy';
export interface IEnvironment {
name: string;
type: string;
createdAt: string;
sortOrder: number;
enabled: boolean;
protected: boolean;
projectCount?: number;
apiTokenCount?: number;
enabledToggleCount?: number;
lastSeenAt: string;
}
export interface IProjectEnvironment extends IEnvironment {
projectVisible?: boolean;
projectApiTokenCount?: number;
projectEnabledToggleCount?: number;
2023-05-05 13:32:44 +02:00
defaultStrategy?: Partial<IFeatureStrategy> | CreateFeatureStrategySchema;
}
2023-05-05 13:32:44 +02:00
export type ProjectEnvironmentType = {
environment: string;
defaultStrategy?: CreateFeatureStrategySchema;
};
export interface IEnvironmentPayload {
name: string;
type: string;
}
export interface IEnvironmentEditPayload {
sortOrder: number;
type: string;
}
export interface IEnvironmentClonePayload {
name: string;
type: string;
projects: string[];
clonePermissions: boolean;
}
export interface IEnvironmentResponse {
environments: IEnvironment[];
}
export interface ISortOrderPayload {
[index: string]: number;
}