1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/frontend/src/interfaces/strategy.ts
Tymoteusz Czech 3bb09c5ce4
Disable and enable strategies - frontend (#3582)
Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: andreas-unleash <andreas@getunleash.ai>
2023-04-26 11:41:24 +02:00

66 lines
1.4 KiB
TypeScript

import { Operator } from 'constants/operators';
export interface IFeatureStrategy {
id: string;
strategyName?: string;
name: string;
title?: string;
constraints: IConstraint[];
parameters: IFeatureStrategyParameters;
featureName?: string;
projectId?: string;
environment?: string;
segments?: number[];
disabled?: boolean;
}
export interface IFeatureStrategyParameters {
[key: string]: string | number | undefined;
}
export interface IFeatureStrategyPayload {
id?: string;
name?: string;
title?: string;
constraints: IConstraint[];
parameters: IFeatureStrategyParameters;
segments?: number[];
disabled?: boolean;
}
export interface IStrategy {
name: string;
displayName: string;
editable: boolean;
deprecated: boolean;
description: string;
parameters: IStrategyParameter[];
}
export interface IStrategyParameter {
name: string;
description: string;
required: boolean;
type: string;
}
export interface IStrategyPayload {
name: string;
description: string;
parameters: IStrategyParameter[];
}
export interface IConstraint {
inverted?: boolean;
values?: string[];
value?: string;
caseInsensitive?: boolean;
operator: Operator;
contextName: string;
}
export interface IFeatureStrategySortOrder {
id: string;
sortOrder: number;
}