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
|
|
|
|
2022-02-03 12:39:43 +01:00
|
|
|
export interface IFeatureTogglePayload {
|
|
|
|
description: string;
|
|
|
|
name: string;
|
|
|
|
projectId: string;
|
|
|
|
type: string;
|
|
|
|
impressionData: boolean;
|
|
|
|
}
|
|
|
|
|
2021-09-14 14:20:23 +02:00
|
|
|
export interface IFeatureToggle {
|
|
|
|
stale: boolean;
|
|
|
|
archived: boolean;
|
2022-02-08 12:06:25 +01:00
|
|
|
enabled?: boolean;
|
|
|
|
createdAt: string;
|
|
|
|
lastSeenAt?: string;
|
2021-09-14 14:20:23 +02:00
|
|
|
description: string;
|
|
|
|
environments: IFeatureEnvironment[];
|
|
|
|
name: string;
|
|
|
|
project: string;
|
|
|
|
type: string;
|
|
|
|
variants: IFeatureVariant[];
|
2022-02-03 12:39:43 +01:00
|
|
|
impressionData: boolean;
|
2022-02-08 12:06:25 +01:00
|
|
|
strategies?: IFeatureStrategy[];
|
2021-09-14 14:20:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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 {
|
2022-02-25 10:55:39 +01:00
|
|
|
version?: number;
|
|
|
|
maturity?: string;
|
2022-02-18 09:51:10 +01:00
|
|
|
lastHourUsage: IFeatureEnvironmentMetrics[];
|
|
|
|
seenApplications: string[];
|
2021-10-13 10:20:34 +02:00
|
|
|
}
|
2022-02-21 13:47:54 +01:00
|
|
|
|
|
|
|
export interface IFeatureMetrics {
|
|
|
|
version: number;
|
|
|
|
maturity: string;
|
|
|
|
lastHourUsage: IFeatureEnvironmentMetrics[];
|
|
|
|
seenApplications: string[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IFeatureMetricsRaw {
|
|
|
|
featureName: string;
|
|
|
|
appName: string;
|
|
|
|
environment: string;
|
|
|
|
timestamp: string;
|
|
|
|
yes: number;
|
|
|
|
no: number;
|
|
|
|
}
|