1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/frontend/src/interfaces/featureToggle.ts
Fredrik Strand Oseberg 27988e4b30 Feat/environment strategies (#339)
* feat: strategies list

* feat: dnd

* fix: resolve reference issues

* feat: configure strategy wip

* feat: rearrange list

* feat: add debounce and execution plan

* feat: add separator

* feat: update strategy

* fix: feature strategy accordion key

* fix: localize parameter update logic

* feat: ts conversion

* fix: perf issues

* feat: production guard

* fix: clean up environment list

* fix: implement markup hooks for environment list

* feat: wip constraints

* fix: handle nested data structure reference issue

* fix: clone deep on child props

* fix: remove constraints check

* fix: revert to strategies length

* fix: refactor useFeature

* feat: cache revalidation

* fix: set correct starting tab

* fix: reset params on adding new strategy

* fix: refactor to use useSWR instead of local cache

* fix: check dirty directly from new params

* fix: dialogue ts

* fix: Clean-up typescript warnings

* fix: some more typescript nits

* feat: strategy execution

* feat: strategy execution for environment

* fix: refactor execution separator

* fix: remove unused property

* fix: add header

* fix: 0 value for rollout

* fix: update snapshots

* fix: remove empty deps

* fix: use constant for env type

* fix: use default for useFeatureStrategy

* fix: update snapshot

* Update src/component/feature/FeatureView2/FeatureStrategies/FeatureStrategiesEnvironments/FeatureStrategiesEnvironmentList/useDeleteStrategyMarkup.tsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

* Update src/component/feature/FeatureView2/FeatureStrategies/FeatureStrategyExecution/FeatureStrategyExecution.tsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

* Update src/component/feature/strategy/EditStrategyModal/general-strategy.jsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: UnleashTeam <79193084+UnleashTeam@users.noreply.github.com>
2021-09-27 13:35:32 +02:00

52 lines
988 B
TypeScript

import { IFeatureStrategy } from './strategy';
export interface IFeatureToggleListItem {
type: string;
name: string;
environments: IEnvironments[];
}
export interface IEnvironments {
name: string;
displayName: string;
enabled: boolean;
}
export interface IFeatureToggle {
stale: boolean;
archived: boolean;
createdAt: string;
lastSeenAt: string;
description: string;
environments: IFeatureEnvironment[];
name: string;
project: string;
type: string;
variants: IFeatureVariant[];
}
export interface IFeatureEnvironment {
name: string;
enabled: boolean;
strategies: IFeatureStrategy[];
}
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;
}