2024-04-29 11:51:44 +02:00
|
|
|
import type { ProjectSchema, ProjectStatsSchema } from 'openapi';
|
2024-05-21 14:18:00 +02:00
|
|
|
import type { IFeatureFlagListItem } from './featureToggle';
|
2024-03-18 13:58:05 +01:00
|
|
|
import type { ProjectEnvironmentType } from 'component/project/Project/ProjectFeatureToggles/hooks/useEnvironmentsRef';
|
|
|
|
import type { ProjectMode } from 'component/project/Project/hooks/useProjectEnterpriseSettingsForm';
|
2021-07-07 11:04:36 +02:00
|
|
|
|
|
|
|
export interface IProjectCard {
|
|
|
|
name: string;
|
|
|
|
id: string;
|
|
|
|
createdAt: string;
|
|
|
|
health: number;
|
|
|
|
description: string;
|
|
|
|
featureCount: number;
|
2023-11-21 11:49:50 +01:00
|
|
|
mode: string;
|
2022-05-04 15:39:50 +02:00
|
|
|
memberCount?: number;
|
2022-12-02 08:16:03 +01:00
|
|
|
favorite?: boolean;
|
2024-04-29 11:51:44 +02:00
|
|
|
owners?: ProjectSchema['owners'];
|
2021-07-07 11:04:36 +02:00
|
|
|
}
|
|
|
|
|
2023-09-04 13:53:33 +02:00
|
|
|
export type FeatureNamingType = {
|
|
|
|
pattern: string;
|
|
|
|
example: string;
|
2023-09-06 10:13:28 +02:00
|
|
|
description: string;
|
2023-09-04 13:53:33 +02:00
|
|
|
};
|
|
|
|
|
2023-12-01 19:00:35 +01:00
|
|
|
export type FeatureTypeCount = {
|
|
|
|
type: string;
|
|
|
|
count: number;
|
|
|
|
};
|
|
|
|
|
2021-07-07 11:04:36 +02:00
|
|
|
export interface IProject {
|
2022-02-25 10:55:39 +01:00
|
|
|
id?: string;
|
2021-07-07 11:04:36 +02:00
|
|
|
members: number;
|
|
|
|
version: string;
|
|
|
|
name: string;
|
2022-03-22 08:23:51 +01:00
|
|
|
description?: string;
|
2023-05-02 09:17:05 +02:00
|
|
|
environments: Array<ProjectEnvironmentType>;
|
2021-07-07 11:04:36 +02:00
|
|
|
health: number;
|
2023-01-27 17:19:27 +01:00
|
|
|
stats: ProjectStatsSchema;
|
2022-12-02 08:16:03 +01:00
|
|
|
favorite: boolean;
|
2024-05-21 14:18:00 +02:00
|
|
|
features: IFeatureFlagListItem[];
|
2023-09-15 10:01:25 +02:00
|
|
|
mode: ProjectMode;
|
2023-04-12 15:22:13 +02:00
|
|
|
defaultStickiness: string;
|
2023-07-13 13:02:35 +02:00
|
|
|
featureLimit?: number;
|
2023-09-04 13:53:33 +02:00
|
|
|
featureNaming?: FeatureNamingType;
|
2021-07-07 11:04:36 +02:00
|
|
|
}
|
|
|
|
|
2023-12-01 19:00:35 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2021-07-07 11:04:36 +02:00
|
|
|
export interface IProjectHealthReport extends IProject {
|
|
|
|
staleCount: number;
|
|
|
|
potentiallyStaleCount: number;
|
|
|
|
activeCount: number;
|
2022-02-07 15:30:33 +01:00
|
|
|
updatedAt: string;
|
2021-07-07 11:04:36 +02:00
|
|
|
}
|
2023-08-17 09:43:43 +02:00
|
|
|
|
|
|
|
export interface IProjectRoleUsageCount {
|
|
|
|
project: string;
|
|
|
|
role: number;
|
|
|
|
userCount: number;
|
|
|
|
groupCount: number;
|
|
|
|
serviceAccountCount: number;
|
|
|
|
}
|