unleash-server
Version:
Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.
614 lines (613 loc) • 34.4 kB
TypeScript
import { FromSchema } from 'json-schema-to-ts';
export declare const featuresSchema: {
readonly $id: "#/components/schemas/featuresSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["version", "features"];
readonly properties: {
readonly version: {
readonly type: "integer";
};
readonly features: {
readonly type: "array";
readonly items: {
readonly $ref: "#/components/schemas/featureSchema";
};
};
};
readonly components: {
readonly schemas: {
readonly constraintSchema: {
readonly type: "object";
readonly required: readonly ["contextName", "operator"];
readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/reference/strategy-constraints)";
readonly properties: {
readonly contextName: {
readonly description: "The name of the context field that this constraint should apply to.";
readonly example: "appName";
readonly type: "string";
};
readonly operator: {
readonly description: "The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/reference/strategy-constraints#strategy-constraint-operators).";
readonly type: "string";
readonly enum: readonly ["NOT_IN", "IN", "STR_ENDS_WITH", "STR_STARTS_WITH", "STR_CONTAINS", "NUM_EQ", "NUM_GT", "NUM_GTE", "NUM_LT", "NUM_LTE", "DATE_AFTER", "DATE_BEFORE", "SEMVER_EQ", "SEMVER_GT", "SEMVER_LT"];
};
readonly caseInsensitive: {
readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
readonly type: "boolean";
readonly default: false;
};
readonly inverted: {
readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
readonly type: "boolean";
readonly default: false;
};
readonly values: {
readonly type: "array";
readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
readonly items: {
readonly type: "string";
};
};
readonly value: {
readonly description: "The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.";
readonly type: "string";
};
};
readonly components: {};
readonly $id: "#/components/schemas/constraintSchema";
readonly additionalProperties: false;
};
readonly environmentSchema: {
readonly $id: "#/components/schemas/environmentSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["name", "type", "enabled"];
readonly properties: {
readonly name: {
readonly type: "string";
};
readonly type: {
readonly type: "string";
};
readonly enabled: {
readonly type: "boolean";
};
readonly protected: {
readonly type: "boolean";
};
readonly sortOrder: {
readonly type: "number";
};
readonly projectCount: {
readonly type: "number";
readonly nullable: true;
};
readonly apiTokenCount: {
readonly type: "number";
readonly nullable: true;
};
readonly enabledToggleCount: {
readonly type: "number";
readonly nullable: true;
};
};
readonly components: {};
};
readonly featureSchema: {
readonly $id: "#/components/schemas/featureSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["name"];
readonly properties: {
readonly name: {
readonly type: "string";
};
readonly type: {
readonly type: "string";
};
readonly description: {
readonly type: "string";
};
readonly archived: {
readonly type: "boolean";
};
readonly project: {
readonly type: "string";
};
readonly enabled: {
readonly type: "boolean";
};
readonly stale: {
readonly type: "boolean";
};
readonly favorite: {
readonly type: "boolean";
};
readonly impressionData: {
readonly type: "boolean";
};
readonly createdAt: {
readonly type: "string";
readonly format: "date-time";
readonly nullable: true;
};
readonly archivedAt: {
readonly type: "string";
readonly format: "date-time";
readonly nullable: true;
};
readonly lastSeenAt: {
readonly type: "string";
readonly format: "date-time";
readonly nullable: true;
};
readonly environments: {
readonly type: "array";
readonly items: {
readonly $ref: "#/components/schemas/environmentSchema";
};
};
readonly strategies: {
readonly type: "array";
readonly items: {
readonly $ref: "#/components/schemas/featureStrategySchema";
};
};
readonly variants: {
readonly type: "array";
readonly items: {
readonly $ref: "#/components/schemas/variantSchema";
};
};
readonly tags: {
readonly type: "array";
readonly items: {
readonly $ref: "#/components/schemas/tagSchema";
};
readonly nullable: true;
};
};
readonly components: {
readonly schemas: {
readonly constraintSchema: {
readonly type: "object";
readonly required: readonly ["contextName", "operator"];
readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/reference/strategy-constraints)";
readonly properties: {
readonly contextName: {
readonly description: "The name of the context field that this constraint should apply to.";
readonly example: "appName";
readonly type: "string";
};
readonly operator: {
readonly description: "The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/reference/strategy-constraints#strategy-constraint-operators).";
readonly type: "string";
readonly enum: readonly ["NOT_IN", "IN", "STR_ENDS_WITH", "STR_STARTS_WITH", "STR_CONTAINS", "NUM_EQ", "NUM_GT", "NUM_GTE", "NUM_LT", "NUM_LTE", "DATE_AFTER", "DATE_BEFORE", "SEMVER_EQ", "SEMVER_GT", "SEMVER_LT"];
};
readonly caseInsensitive: {
readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
readonly type: "boolean";
readonly default: false;
};
readonly inverted: {
readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
readonly type: "boolean";
readonly default: false;
};
readonly values: {
readonly type: "array";
readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
readonly items: {
readonly type: "string";
};
};
readonly value: {
readonly description: "The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.";
readonly type: "string";
};
};
readonly components: {};
readonly $id: "#/components/schemas/constraintSchema";
readonly additionalProperties: false;
};
readonly environmentSchema: {
readonly $id: "#/components/schemas/environmentSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["name", "type", "enabled"];
readonly properties: {
readonly name: {
readonly type: "string";
};
readonly type: {
readonly type: "string";
};
readonly enabled: {
readonly type: "boolean";
};
readonly protected: {
readonly type: "boolean";
};
readonly sortOrder: {
readonly type: "number";
};
readonly projectCount: {
readonly type: "number";
readonly nullable: true;
};
readonly apiTokenCount: {
readonly type: "number";
readonly nullable: true;
};
readonly enabledToggleCount: {
readonly type: "number";
readonly nullable: true;
};
};
readonly components: {};
};
readonly overrideSchema: {
readonly $id: "#/components/schemas/overrideSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["contextName", "values"];
readonly properties: {
readonly contextName: {
readonly type: "string";
};
readonly values: {
readonly type: "array";
readonly items: {
readonly type: "string";
};
};
};
readonly components: {};
};
readonly parametersSchema: {
readonly $id: "#/components/schemas/parametersSchema";
readonly type: "object";
readonly additionalProperties: {
readonly type: "string";
};
readonly components: {};
};
readonly featureStrategySchema: {
readonly $id: "#/components/schemas/featureStrategySchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["name"];
readonly properties: {
readonly id: {
readonly type: "string";
};
readonly name: {
readonly type: "string";
};
readonly sortOrder: {
readonly type: "number";
};
readonly segments: {
readonly type: "array";
readonly items: {
readonly type: "number";
};
};
readonly constraints: {
readonly type: "array";
readonly items: {
readonly $ref: "#/components/schemas/constraintSchema";
};
};
readonly parameters: {
readonly $ref: "#/components/schemas/parametersSchema";
};
};
readonly components: {
readonly schemas: {
readonly constraintSchema: {
readonly type: "object";
readonly required: readonly ["contextName", "operator"];
readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/reference/strategy-constraints)";
readonly properties: {
readonly contextName: {
readonly description: "The name of the context field that this constraint should apply to.";
readonly example: "appName";
readonly type: "string";
};
readonly operator: {
readonly description: "The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/reference/strategy-constraints#strategy-constraint-operators).";
readonly type: "string";
readonly enum: readonly ["NOT_IN", "IN", "STR_ENDS_WITH", "STR_STARTS_WITH", "STR_CONTAINS", "NUM_EQ", "NUM_GT", "NUM_GTE", "NUM_LT", "NUM_LTE", "DATE_AFTER", "DATE_BEFORE", "SEMVER_EQ", "SEMVER_GT", "SEMVER_LT"];
};
readonly caseInsensitive: {
readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
readonly type: "boolean";
readonly default: false;
};
readonly inverted: {
readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
readonly type: "boolean";
readonly default: false;
};
readonly values: {
readonly type: "array";
readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
readonly items: {
readonly type: "string";
};
};
readonly value: {
readonly description: "The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.";
readonly type: "string";
};
};
readonly components: {};
readonly $id: "#/components/schemas/constraintSchema";
readonly additionalProperties: false;
};
readonly parametersSchema: {
readonly $id: "#/components/schemas/parametersSchema";
readonly type: "object";
readonly additionalProperties: {
readonly type: "string";
};
readonly components: {};
};
};
};
};
readonly variantSchema: {
readonly $id: "#/components/schemas/variantSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["name", "weight"];
readonly properties: {
readonly name: {
readonly type: "string";
};
readonly weight: {
readonly type: "number";
};
readonly weightType: {
readonly type: "string";
};
readonly stickiness: {
readonly type: "string";
};
readonly payload: {
readonly type: "object";
readonly required: readonly ["type", "value"];
readonly properties: {
readonly type: {
readonly type: "string";
};
readonly value: {
readonly type: "string";
};
};
};
readonly overrides: {
readonly type: "array";
readonly items: {
readonly $ref: "#/components/schemas/overrideSchema";
};
};
};
readonly components: {
readonly schemas: {
readonly overrideSchema: {
readonly $id: "#/components/schemas/overrideSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["contextName", "values"];
readonly properties: {
readonly contextName: {
readonly type: "string";
};
readonly values: {
readonly type: "array";
readonly items: {
readonly type: "string";
};
};
};
readonly components: {};
};
};
};
};
readonly tagSchema: {
readonly $id: "#/components/schemas/tagSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["value", "type"];
readonly properties: {
readonly value: {
readonly type: "string";
};
readonly type: {
readonly type: "string";
};
};
readonly components: {};
};
};
};
};
readonly overrideSchema: {
readonly $id: "#/components/schemas/overrideSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["contextName", "values"];
readonly properties: {
readonly contextName: {
readonly type: "string";
};
readonly values: {
readonly type: "array";
readonly items: {
readonly type: "string";
};
};
};
readonly components: {};
};
readonly parametersSchema: {
readonly $id: "#/components/schemas/parametersSchema";
readonly type: "object";
readonly additionalProperties: {
readonly type: "string";
};
readonly components: {};
};
readonly featureStrategySchema: {
readonly $id: "#/components/schemas/featureStrategySchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["name"];
readonly properties: {
readonly id: {
readonly type: "string";
};
readonly name: {
readonly type: "string";
};
readonly sortOrder: {
readonly type: "number";
};
readonly segments: {
readonly type: "array";
readonly items: {
readonly type: "number";
};
};
readonly constraints: {
readonly type: "array";
readonly items: {
readonly $ref: "#/components/schemas/constraintSchema";
};
};
readonly parameters: {
readonly $ref: "#/components/schemas/parametersSchema";
};
};
readonly components: {
readonly schemas: {
readonly constraintSchema: {
readonly type: "object";
readonly required: readonly ["contextName", "operator"];
readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/reference/strategy-constraints)";
readonly properties: {
readonly contextName: {
readonly description: "The name of the context field that this constraint should apply to.";
readonly example: "appName";
readonly type: "string";
};
readonly operator: {
readonly description: "The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/reference/strategy-constraints#strategy-constraint-operators).";
readonly type: "string";
readonly enum: readonly ["NOT_IN", "IN", "STR_ENDS_WITH", "STR_STARTS_WITH", "STR_CONTAINS", "NUM_EQ", "NUM_GT", "NUM_GTE", "NUM_LT", "NUM_LTE", "DATE_AFTER", "DATE_BEFORE", "SEMVER_EQ", "SEMVER_GT", "SEMVER_LT"];
};
readonly caseInsensitive: {
readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
readonly type: "boolean";
readonly default: false;
};
readonly inverted: {
readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
readonly type: "boolean";
readonly default: false;
};
readonly values: {
readonly type: "array";
readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
readonly items: {
readonly type: "string";
};
};
readonly value: {
readonly description: "The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.";
readonly type: "string";
};
};
readonly components: {};
readonly $id: "#/components/schemas/constraintSchema";
readonly additionalProperties: false;
};
readonly parametersSchema: {
readonly $id: "#/components/schemas/parametersSchema";
readonly type: "object";
readonly additionalProperties: {
readonly type: "string";
};
readonly components: {};
};
};
};
};
readonly variantSchema: {
readonly $id: "#/components/schemas/variantSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["name", "weight"];
readonly properties: {
readonly name: {
readonly type: "string";
};
readonly weight: {
readonly type: "number";
};
readonly weightType: {
readonly type: "string";
};
readonly stickiness: {
readonly type: "string";
};
readonly payload: {
readonly type: "object";
readonly required: readonly ["type", "value"];
readonly properties: {
readonly type: {
readonly type: "string";
};
readonly value: {
readonly type: "string";
};
};
};
readonly overrides: {
readonly type: "array";
readonly items: {
readonly $ref: "#/components/schemas/overrideSchema";
};
};
};
readonly components: {
readonly schemas: {
readonly overrideSchema: {
readonly $id: "#/components/schemas/overrideSchema";
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["contextName", "values"];
readonly properties: {
readonly contextName: {
readonly type: "string";
};
readonly values: {
readonly type: "array";
readonly items: {
readonly type: "string";
};
};
};
readonly components: {};
};
};
};
};
};
};
};
export declare type FeaturesSchema = FromSchema<typeof featuresSchema>;