1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-02 01:17:58 +02:00
unleash.unleash/frontend/src/openapi/models/variantSchema.ts
2024-05-23 13:37:56 +03:00

31 lines
1.7 KiB
TypeScript

/**
* Generated by Orval
* Do not edit manually.
* See `gen:api` script in package.json
*/
import type { OverrideSchema } from './overrideSchema';
import type { VariantSchemaPayload } from './variantSchemaPayload';
import type { VariantSchemaWeightType } from './variantSchemaWeightType';
/**
* A variant allows for further separation of users into segments. See [our excellent documentation](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) for a more detailed description
*/
export interface VariantSchema {
/** The variants name. Is unique for this feature flag */
name: string;
/** Overrides assigning specific variants to specific users. The weighting system automatically assigns users to specific groups for you, but any overrides in this list will take precedence. */
overrides?: OverrideSchema[];
/** Extra data configured for this variant */
payload?: VariantSchemaPayload;
/** [Stickiness](https://docs.getunleash.io/reference/feature-toggle-variants#variant-stickiness) is how Unleash guarantees that the same user gets the same variant every time */
stickiness?: string;
/**
* The weight is the likelihood of any one user getting this variant. It is a number between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/reference/feature-toggle-variants#variant-weight) for more information
* @minimum 0
* @maximum 1000
*/
weight: number;
/** Set to fix if this variant must have exactly the weight allocated to it. If the type is variable, the weight will adjust so that the total weight of all variants adds up to 1000 */
weightType?: VariantSchemaWeightType;
}