mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
8897f2ea75
Rename feature toggle to feature flag in the UI and code. Starting with low hanging fruits. Trying to keep these ~100 LoC.
78 lines
1.9 KiB
TypeScript
78 lines
1.9 KiB
TypeScript
import type { ProjectSchema, ProjectStatsSchema } from 'openapi';
|
|
import type { IFeatureFlagListItem } from './featureToggle';
|
|
import type { ProjectEnvironmentType } from 'component/project/Project/ProjectFeatureToggles/hooks/useEnvironmentsRef';
|
|
import type { ProjectMode } from 'component/project/Project/hooks/useProjectEnterpriseSettingsForm';
|
|
|
|
export interface IProjectCard {
|
|
name: string;
|
|
id: string;
|
|
createdAt: string;
|
|
health: number;
|
|
description: string;
|
|
featureCount: number;
|
|
mode: string;
|
|
memberCount?: number;
|
|
favorite?: boolean;
|
|
owners?: ProjectSchema['owners'];
|
|
}
|
|
|
|
export type FeatureNamingType = {
|
|
pattern: string;
|
|
example: string;
|
|
description: string;
|
|
};
|
|
|
|
export type FeatureTypeCount = {
|
|
type: string;
|
|
count: number;
|
|
};
|
|
|
|
export interface IProject {
|
|
id?: string;
|
|
members: number;
|
|
version: string;
|
|
name: string;
|
|
description?: string;
|
|
environments: Array<ProjectEnvironmentType>;
|
|
health: number;
|
|
stats: ProjectStatsSchema;
|
|
favorite: boolean;
|
|
features: IFeatureFlagListItem[];
|
|
mode: ProjectMode;
|
|
defaultStickiness: string;
|
|
featureLimit?: number;
|
|
featureNaming?: FeatureNamingType;
|
|
}
|
|
|
|
export interface IProjectOverview {
|
|
id?: string;
|
|
members: number;
|
|
version: string;
|
|
name: string;
|
|
description?: string;
|
|
environments: Array<ProjectEnvironmentType>;
|
|
health: number;
|
|
stats: ProjectStatsSchema;
|
|
featureTypeCounts: FeatureTypeCount[];
|
|
favorite: boolean;
|
|
mode: ProjectMode;
|
|
defaultStickiness: string;
|
|
featureLimit?: number;
|
|
featureNaming?: FeatureNamingType;
|
|
}
|
|
|
|
export interface IProjectHealthReport extends IProject {
|
|
staleCount: number;
|
|
potentiallyStaleCount: number;
|
|
activeCount: number;
|
|
updatedAt: string;
|
|
}
|
|
|
|
export interface IProjectRoleUsageCount {
|
|
project: string;
|
|
role: number;
|
|
userCount: number;
|
|
groupCount: number;
|
|
serviceAccountCount: number;
|
|
}
|