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;
|
2022-03-29 09:30:57 +02:00
|
|
|
strategyName?: string;
|
2021-09-14 14:20:23 +02:00
|
|
|
name: string;
|
2021-09-27 13:35:32 +02:00
|
|
|
constraints: IConstraint[];
|
2022-05-04 15:16:34 +02:00
|
|
|
parameters: IFeatureStrategyParameters;
|
2022-03-29 09:30:57 +02:00
|
|
|
featureName?: string;
|
|
|
|
projectId?: string;
|
|
|
|
environment?: string;
|
2021-09-14 14:20:23 +02:00
|
|
|
}
|
|
|
|
|
2022-05-04 15:16:34 +02:00
|
|
|
export interface IFeatureStrategyParameters {
|
|
|
|
[key: string]: string | number | undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IFeatureStrategyPayload {
|
|
|
|
name?: string;
|
|
|
|
constraints: IConstraint[];
|
|
|
|
parameters: IFeatureStrategyParameters;
|
|
|
|
}
|
|
|
|
|
2021-09-27 13:35:32 +02:00
|
|
|
export interface IStrategy {
|
|
|
|
name: string;
|
|
|
|
displayName: string;
|
|
|
|
editable: boolean;
|
|
|
|
deprecated: boolean;
|
|
|
|
description: string;
|
2022-05-04 15:16:34 +02:00
|
|
|
parameters: IStrategyParameter[];
|
2021-09-27 13:35:32 +02:00
|
|
|
}
|
|
|
|
|
2022-05-04 15:16:34 +02:00
|
|
|
export interface IStrategyParameter {
|
2022-03-04 23:39:41 +01:00
|
|
|
name: string;
|
|
|
|
description: string;
|
|
|
|
required: boolean;
|
|
|
|
type: string;
|
|
|
|
}
|
|
|
|
|
2022-05-04 15:16:34 +02:00
|
|
|
export interface IStrategyPayload {
|
2022-03-04 23:39:41 +01:00
|
|
|
name: string;
|
|
|
|
description: string;
|
2022-05-04 15:16:34 +02:00
|
|
|
parameters: IStrategyParameter[];
|
2022-03-04 23:39:41 +01:00
|
|
|
}
|
|
|
|
|
2022-05-04 15:16:34 +02:00
|
|
|
export interface IConstraint {
|
|
|
|
inverted?: boolean;
|
|
|
|
values?: string[];
|
|
|
|
value?: string;
|
|
|
|
caseInsensitive?: boolean;
|
|
|
|
operator: Operator;
|
|
|
|
contextName: string;
|
2022-03-04 23:39:41 +01:00
|
|
|
}
|
2022-07-27 12:00:15 +02:00
|
|
|
|
|
|
|
export interface IFeatureStrategySortOrder {
|
|
|
|
id: string;
|
|
|
|
sortOrder: number;
|
|
|
|
}
|