2022-03-04 17:29:51 +01:00
|
|
|
import { Operator } from 'constants/operators';
|
|
|
|
|
2021-09-27 13:35:32 +02:00
|
|
|
export interface IFeatureStrategy {
|
2021-09-14 14:20:23 +02:00
|
|
|
id: string;
|
|
|
|
name: string;
|
2021-09-27 13:35:32 +02:00
|
|
|
constraints: IConstraint[];
|
2021-09-14 14:20:23 +02:00
|
|
|
parameters: IParameter;
|
|
|
|
}
|
|
|
|
|
2021-09-27 13:35:32 +02:00
|
|
|
export interface IStrategy {
|
|
|
|
name: string;
|
|
|
|
displayName: string;
|
|
|
|
editable: boolean;
|
|
|
|
deprecated: boolean;
|
|
|
|
description: string;
|
2022-02-25 10:55:39 +01:00
|
|
|
parameters: IParameter[];
|
2021-09-27 13:35:32 +02:00
|
|
|
}
|
|
|
|
|
2021-09-14 14:20:23 +02:00
|
|
|
export interface IConstraint {
|
2022-03-04 17:29:51 +01:00
|
|
|
inverted?: boolean;
|
|
|
|
values?: string[];
|
|
|
|
value?: string;
|
|
|
|
caseInsensitive?: boolean;
|
|
|
|
operator: Operator;
|
2021-09-14 14:20:23 +02:00
|
|
|
contextName: string;
|
2022-03-04 17:29:51 +01:00
|
|
|
[index: string]: unknown;
|
2021-09-14 14:20:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IParameter {
|
|
|
|
groupId?: string;
|
2022-03-22 15:00:54 +01:00
|
|
|
rollout?: string;
|
2021-09-14 14:20:23 +02:00
|
|
|
stickiness?: string;
|
2022-02-25 10:55:39 +01:00
|
|
|
|
2021-09-14 14:20:23 +02:00
|
|
|
[index: string]: any;
|
|
|
|
}
|
2021-09-27 13:35:32 +02:00
|
|
|
|
|
|
|
export interface IStrategyPayload {
|
|
|
|
name?: string;
|
|
|
|
constraints: IConstraint[];
|
|
|
|
parameters: IParameter;
|
|
|
|
}
|
2022-03-04 23:39:41 +01:00
|
|
|
export interface ICustomStrategyParameter {
|
|
|
|
name: string;
|
|
|
|
description: string;
|
|
|
|
required: boolean;
|
|
|
|
type: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICustomStrategyPayload {
|
|
|
|
name: string;
|
|
|
|
description: string;
|
|
|
|
parameters: IParameter[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICustomStrategy {
|
|
|
|
name: string;
|
|
|
|
description: string;
|
|
|
|
parameters: IParameter[];
|
|
|
|
editable: boolean;
|
|
|
|
}
|