1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
unleash.unleash/frontend/src/interfaces/strategy.ts
andreas-unleash 988a3a57e8
feat: Change Request on Reorder UI (#4249)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Change request UI for reordering strategies with variants
## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-07-25 14:12:35 +03:00

70 lines
1.5 KiB
TypeScript

import { Operator } from 'constants/operators';
import { IFeatureVariant } from './featureToggle';
export interface IFeatureStrategy {
id: string;
strategyName?: string;
name: string;
title?: string;
constraints: IConstraint[];
parameters: IFeatureStrategyParameters;
variants?: IFeatureVariant[];
featureName?: string;
projectId?: string;
environment?: string;
segments?: number[];
disabled?: boolean;
sortOrder?: number;
}
export interface IFeatureStrategyParameters {
[key: string]: string | number | undefined;
}
export interface IFeatureStrategyPayload {
id?: string;
name?: string;
title?: string;
constraints: IConstraint[];
parameters: IFeatureStrategyParameters;
variants?: IFeatureVariant[];
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;
}