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
|
|
|
|
|
|
|
export interface IFeatureToggle {
|
|
|
|
stale: boolean;
|
|
|
|
archived: boolean;
|
|
|
|
createdAt: string;
|
2021-10-08 15:18:43 +02:00
|
|
|
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 {
|
|
|
|
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;
|
|
|
|
}
|