1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/frontend/src/interfaces/environments.ts
Christopher Kolstad 53354224fc
chore: Bump biome and configure husky (#6589)
Upgrades biome to 1.6.1, and updates husky pre-commit hook.

Most changes here are making type imports explicit.
2024-03-18 13:58:05 +01:00

53 lines
1.2 KiB
TypeScript

import type { CreateFeatureStrategySchema } from '../openapi';
import type { 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;
defaultStrategy?: Partial<IFeatureStrategy> | CreateFeatureStrategySchema;
}
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;
}