mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Upgrades biome to 1.6.1, and updates husky pre-commit hook. Most changes here are making type imports explicit.
		
			
				
	
	
		
			112 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			112 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import type { IFeatureStrategy } from './strategy';
 | |
| import type { ITag } from './tags';
 | |
| 
 | |
| /**
 | |
|  * @deprecated use FeatureSchema from openapi
 | |
|  */
 | |
| export interface IFeatureToggleListItem {
 | |
|     type: string;
 | |
|     name: string;
 | |
|     stale?: boolean;
 | |
|     lastSeenAt?: string;
 | |
|     createdAt: string;
 | |
|     environments: IEnvironments[];
 | |
|     tags?: ITag[];
 | |
|     favorite?: boolean;
 | |
| }
 | |
| 
 | |
| export interface IEnvironments {
 | |
|     name: string;
 | |
|     enabled: boolean;
 | |
|     variantCount: number;
 | |
|     lastSeenAt?: string | null;
 | |
|     type?: string;
 | |
|     hasStrategies?: boolean;
 | |
|     hasEnabledStrategies?: boolean;
 | |
| }
 | |
| 
 | |
| export type ILastSeenEnvironments = Pick<
 | |
|     IEnvironments,
 | |
|     'name' | 'enabled' | 'lastSeenAt'
 | |
| >;
 | |
| 
 | |
| export interface IFeatureToggle {
 | |
|     stale: boolean;
 | |
|     archived: boolean;
 | |
|     enabled?: boolean;
 | |
|     createdAt: string;
 | |
|     lastSeenAt?: string;
 | |
|     description?: string;
 | |
|     environments: IFeatureEnvironment[];
 | |
|     name: string;
 | |
| 
 | |
|     favorite: boolean;
 | |
|     project: string;
 | |
|     type: string;
 | |
|     variants: IFeatureVariant[];
 | |
|     impressionData: boolean;
 | |
|     strategies?: IFeatureStrategy[];
 | |
|     dependencies: Array<IDependency>;
 | |
|     children: Array<string>;
 | |
| }
 | |
| 
 | |
| export interface IDependency {
 | |
|     feature: string;
 | |
| }
 | |
| 
 | |
| export interface IFeatureEnvironment {
 | |
|     type: string;
 | |
|     name: string;
 | |
|     enabled: boolean;
 | |
|     strategies: IFeatureStrategy[];
 | |
|     variants?: IFeatureVariant[];
 | |
|     lastSeenAt?: string;
 | |
| }
 | |
| 
 | |
| export interface IFeatureEnvironmentWithCrEnabled extends IFeatureEnvironment {
 | |
|     crEnabled?: boolean;
 | |
| }
 | |
| 
 | |
| export interface IFeatureVariant {
 | |
|     name: string;
 | |
|     stickiness: string;
 | |
|     weight: number;
 | |
|     weightType: 'fix' | 'variable';
 | |
|     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;
 | |
|     variants?: Record<string, number>;
 | |
| }
 |