2021-09-27 13:35:32 +02:00
|
|
|
import { IFeatureStrategy } from './strategy';
|
2021-09-14 14:20:23 +02:00
|
|
|
|
2021-07-07 11:04:36 +02:00
|
|
|
export interface IFeatureToggleListItem {
|
|
|
|
type: string;
|
|
|
|
name: string;
|
|
|
|
environments: IEnvironments[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IEnvironments {
|
|
|
|
name: string;
|
|
|
|
enabled: boolean;
|
|
|
|
}
|
2021-09-14 14:20:23 +02:00
|
|
|
|
2021-10-15 14:16:08 +02:00
|
|
|
export interface IFeatureToggleDTO {
|
|
|
|
stale: boolean;
|
|
|
|
archived: boolean;
|
|
|
|
description: string;
|
|
|
|
name: string;
|
|
|
|
project: string;
|
|
|
|
type: string;
|
|
|
|
variants: IFeatureVariant[];
|
|
|
|
}
|
|
|
|
|
2021-09-14 14:20:23 +02:00
|
|
|
export interface IFeatureToggle {
|
|
|
|
stale: boolean;
|
|
|
|
archived: boolean;
|
2021-10-15 11:20:14 +02:00
|
|
|
createdAt: Date;
|
|
|
|
lastSeenAt?: Date;
|
2021-09-14 14:20:23 +02:00
|
|
|
description: string;
|
|
|
|
environments: IFeatureEnvironment[];
|
|
|
|
name: string;
|
|
|
|
project: string;
|
|
|
|
type: string;
|
|
|
|
variants: IFeatureVariant[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IFeatureEnvironment {
|
2021-10-15 12:49:14 +02:00
|
|
|
type: string;
|
2021-09-14 14:20:23 +02:00
|
|
|
name: string;
|
|
|
|
enabled: boolean;
|
2021-09-27 13:35:32 +02:00
|
|
|
strategies: IFeatureStrategy[];
|
2021-09-14 14:20:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IFeatureVariant {
|
|
|
|
name: string;
|
|
|
|
stickiness: string;
|
|
|
|
weight: number;
|
|
|
|
weightType: string;
|
|
|
|
overrides: IOverride[];
|
|
|
|
payload?: IPayload;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IOverride {
|
|
|
|
contextName: string;
|
|
|
|
values: string[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IPayload {
|
|
|
|
name: string;
|
|
|
|
value: string;
|
|
|
|
}
|
2021-10-13 10:20:34 +02:00
|
|
|
|
|
|
|
export interface IFeatureEnvironmentMetrics {
|
|
|
|
environment: string;
|
|
|
|
timestamp: string;
|
|
|
|
yes: number;
|
|
|
|
no: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IFeatureMetrics {
|
|
|
|
version: number;
|
|
|
|
maturity: string;
|
|
|
|
lastHourUsage: IFeatureEnvironmentMetrics[],
|
2021-10-15 10:05:10 +02:00
|
|
|
seenApplications: string[]
|
2021-10-13 10:20:34 +02:00
|
|
|
}
|