mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
b9a3be7b3a
* refactor: fix PermissionSwitch event types * refactor: fix variant payload field name * refactor: fix IPermissionSwitchProps extension * refactor: add missing types in AddFeatureVariant * refactor: remove duplicate type * refactor: fix FeatureToggleListNewItem ref type * refactor: fix CreatedAt date prop type * refactor: add missing anchorEl ref types * refactor: fix createdAt prop value * refactor: fix IFeatureToggleListNewItemProps environments prop type * refactor: add missing ISelectOption type * refactor: fix ResponsiveButton prop types
86 lines
1.7 KiB
TypeScript
86 lines
1.7 KiB
TypeScript
import { IFeatureStrategy } from './strategy';
|
|
|
|
export interface IFeatureToggleListItem {
|
|
type: string;
|
|
name: string;
|
|
environments: IEnvironments[];
|
|
}
|
|
|
|
export interface IEnvironments {
|
|
name: string;
|
|
enabled: boolean;
|
|
}
|
|
|
|
export interface IFeatureTogglePayload {
|
|
description: string;
|
|
name: string;
|
|
projectId: string;
|
|
type: string;
|
|
impressionData: boolean;
|
|
}
|
|
|
|
export interface IFeatureToggle {
|
|
stale: boolean;
|
|
archived: boolean;
|
|
enabled?: boolean;
|
|
createdAt: string;
|
|
lastSeenAt?: string;
|
|
description: string;
|
|
environments: IFeatureEnvironment[];
|
|
name: string;
|
|
project: string;
|
|
type: string;
|
|
variants: IFeatureVariant[];
|
|
impressionData: boolean;
|
|
strategies?: IFeatureStrategy[];
|
|
}
|
|
|
|
export interface IFeatureEnvironment {
|
|
type: string;
|
|
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 {
|
|
type: string;
|
|
value: string;
|
|
}
|
|
|
|
export interface IFeatureEnvironmentMetrics {
|
|
environment: string;
|
|
timestamp: string;
|
|
yes: number;
|
|
no: number;
|
|
}
|
|
|
|
export interface IFeatureMetrics {
|
|
version?: number;
|
|
maturity?: string;
|
|
lastHourUsage: IFeatureEnvironmentMetrics[];
|
|
seenApplications: string[];
|
|
}
|
|
|
|
export interface IFeatureMetricsRaw {
|
|
featureName: string;
|
|
appName: string;
|
|
environment: string;
|
|
timestamp: string;
|
|
yes: number;
|
|
no: number;
|
|
}
|