UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.

1,089 lines (1,088 loc) • 638 kB
import { OpenAPIV3 } from 'openapi-types'; import { IServerOption } from '../types'; export declare const schemas: { addonParameterSchema: { readonly $id: "#/components/schemas/addonParameterSchema"; readonly type: "object"; readonly required: readonly ["name", "displayName", "type", "required", "sensitive"]; readonly properties: { readonly name: { readonly type: "string"; }; readonly displayName: { readonly type: "string"; }; readonly type: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly placeholder: { readonly type: "string"; }; readonly required: { readonly type: "boolean"; }; readonly sensitive: { readonly type: "boolean"; }; }; readonly components: {}; }; addonSchema: { readonly $id: "#/components/schemas/addonSchema"; readonly type: "object"; readonly required: readonly ["provider", "enabled", "parameters", "events"]; readonly properties: { readonly id: { readonly type: "number"; }; readonly createdAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly provider: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly enabled: { readonly type: "boolean"; }; readonly parameters: { readonly type: "object"; readonly additionalProperties: true; }; readonly events: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly projects: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly environments: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; }; readonly components: {}; }; addonsSchema: { readonly $id: "#/components/schemas/addonsSchema"; readonly type: "object"; readonly required: readonly ["addons", "providers"]; readonly properties: { readonly addons: { readonly type: "array"; readonly items: { readonly $ref: "#/components/schemas/addonSchema"; }; }; readonly providers: { readonly type: "array"; readonly items: { readonly $ref: "#/components/schemas/addonTypeSchema"; }; }; }; readonly components: { readonly schemas: { readonly addonSchema: { readonly $id: "#/components/schemas/addonSchema"; readonly type: "object"; readonly required: readonly ["provider", "enabled", "parameters", "events"]; readonly properties: { readonly id: { readonly type: "number"; }; readonly createdAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly provider: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly enabled: { readonly type: "boolean"; }; readonly parameters: { readonly type: "object"; readonly additionalProperties: true; }; readonly events: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly projects: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly environments: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; }; readonly components: {}; }; readonly addonTypeSchema: { readonly $id: "#/components/schemas/addonTypeSchema"; readonly type: "object"; readonly required: readonly ["name", "displayName", "documentationUrl", "description"]; readonly properties: { readonly name: { readonly type: "string"; }; readonly displayName: { readonly type: "string"; }; readonly documentationUrl: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly tagTypes: { readonly type: "array"; readonly items: { readonly $ref: "#/components/schemas/tagTypeSchema"; }; }; readonly parameters: { readonly type: "array"; readonly items: { readonly $ref: "#/components/schemas/addonParameterSchema"; }; }; readonly events: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; }; readonly components: { readonly schemas: { readonly tagTypeSchema: { readonly $id: "#/components/schemas/tagTypeSchema"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["name"]; readonly properties: { readonly name: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly icon: { readonly type: "string"; readonly nullable: true; }; }; readonly components: {}; }; readonly addonParameterSchema: { readonly $id: "#/components/schemas/addonParameterSchema"; readonly type: "object"; readonly required: readonly ["name", "displayName", "type", "required", "sensitive"]; readonly properties: { readonly name: { readonly type: "string"; }; readonly displayName: { readonly type: "string"; }; readonly type: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly placeholder: { readonly type: "string"; }; readonly required: { readonly type: "boolean"; }; readonly sensitive: { readonly type: "boolean"; }; }; readonly components: {}; }; }; }; }; readonly tagTypeSchema: { readonly $id: "#/components/schemas/tagTypeSchema"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["name"]; readonly properties: { readonly name: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly icon: { readonly type: "string"; readonly nullable: true; }; }; readonly components: {}; }; readonly addonParameterSchema: { readonly $id: "#/components/schemas/addonParameterSchema"; readonly type: "object"; readonly required: readonly ["name", "displayName", "type", "required", "sensitive"]; readonly properties: { readonly name: { readonly type: "string"; }; readonly displayName: { readonly type: "string"; }; readonly type: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly placeholder: { readonly type: "string"; }; readonly required: { readonly type: "boolean"; }; readonly sensitive: { readonly type: "boolean"; }; }; readonly components: {}; }; }; }; }; addonTypeSchema: { readonly $id: "#/components/schemas/addonTypeSchema"; readonly type: "object"; readonly required: readonly ["name", "displayName", "documentationUrl", "description"]; readonly properties: { readonly name: { readonly type: "string"; }; readonly displayName: { readonly type: "string"; }; readonly documentationUrl: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly tagTypes: { readonly type: "array"; readonly items: { readonly $ref: "#/components/schemas/tagTypeSchema"; }; }; readonly parameters: { readonly type: "array"; readonly items: { readonly $ref: "#/components/schemas/addonParameterSchema"; }; }; readonly events: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; }; readonly components: { readonly schemas: { readonly tagTypeSchema: { readonly $id: "#/components/schemas/tagTypeSchema"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["name"]; readonly properties: { readonly name: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly icon: { readonly type: "string"; readonly nullable: true; }; }; readonly components: {}; }; readonly addonParameterSchema: { readonly $id: "#/components/schemas/addonParameterSchema"; readonly type: "object"; readonly required: readonly ["name", "displayName", "type", "required", "sensitive"]; readonly properties: { readonly name: { readonly type: "string"; }; readonly displayName: { readonly type: "string"; }; readonly type: { readonly type: "string"; }; readonly description: { readonly type: "string"; }; readonly placeholder: { readonly type: "string"; }; readonly required: { readonly type: "boolean"; }; readonly sensitive: { readonly type: "boolean"; }; }; readonly components: {}; }; }; }; }; apiTokenSchema: { readonly $id: "#/components/schemas/apiTokenSchema"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["username", "type"]; readonly properties: { readonly secret: { readonly type: "string"; }; readonly username: { readonly type: "string"; }; readonly type: { readonly type: "string"; readonly enum: import("../types/models/api-token").ApiTokenType[]; }; readonly environment: { readonly type: "string"; }; readonly project: { readonly type: "string"; }; readonly projects: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly expiresAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly createdAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly seenAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly alias: { readonly type: "string"; readonly nullable: true; }; }; readonly components: {}; }; apiTokensSchema: { readonly $id: "#/components/schemas/apiTokensSchema"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["tokens"]; readonly properties: { readonly tokens: { readonly type: "array"; readonly items: { readonly $ref: "#/components/schemas/apiTokenSchema"; }; }; }; readonly components: { readonly schemas: { readonly apiTokenSchema: { readonly $id: "#/components/schemas/apiTokenSchema"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["username", "type"]; readonly properties: { readonly secret: { readonly type: "string"; }; readonly username: { readonly type: "string"; }; readonly type: { readonly type: "string"; readonly enum: import("../types/models/api-token").ApiTokenType[]; }; readonly environment: { readonly type: "string"; }; readonly project: { readonly type: "string"; }; readonly projects: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly expiresAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly createdAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly seenAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly alias: { readonly type: "string"; readonly nullable: true; }; }; readonly components: {}; }; }; }; }; applicationSchema: { readonly $id: "#/components/schemas/applicationSchema"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["appName"]; readonly properties: { readonly appName: { readonly type: "string"; }; readonly sdkVersion: { readonly type: "string"; }; readonly strategies: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly description: { readonly type: "string"; }; readonly url: { readonly type: "string"; }; readonly color: { readonly type: "string"; }; readonly icon: { readonly type: "string"; }; readonly announced: { readonly type: "boolean"; }; }; readonly components: {}; }; applicationsSchema: { readonly $id: "#/components/schemas/applicationsSchema"; readonly type: "object"; readonly properties: { readonly applications: { readonly type: "array"; readonly items: { readonly $ref: "#/components/schemas/applicationSchema"; }; }; }; readonly components: { readonly schemas: { readonly applicationSchema: { readonly $id: "#/components/schemas/applicationSchema"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["appName"]; readonly properties: { readonly appName: { readonly type: "string"; }; readonly sdkVersion: { readonly type: "string"; }; readonly strategies: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly description: { readonly type: "string"; }; readonly url: { readonly type: "string"; }; readonly color: { readonly type: "string"; }; readonly icon: { readonly type: "string"; }; readonly announced: { readonly type: "boolean"; }; }; readonly components: {}; }; }; }; }; changePasswordSchema: { readonly $id: "#/components/schemas/changePasswordSchema"; readonly type: "object"; readonly additionalProperties: false; readonly required: readonly ["token", "password"]; readonly properties: { readonly token: { readonly type: "string"; }; readonly password: { readonly type: "string"; }; }; readonly components: {}; }; clientApplicationSchema: { readonly $id: "#/components/schemas/clientApplicationSchema"; readonly type: "object"; readonly required: readonly ["appName", "interval", "started", "strategies"]; readonly properties: { readonly appName: { readonly type: "string"; }; readonly instanceId: { readonly type: "string"; }; readonly sdkVersion: { readonly type: "string"; }; readonly environment: { readonly type: "string"; }; readonly interval: { readonly type: "number"; }; readonly started: { readonly oneOf: readonly [{ readonly type: "string"; readonly format: "date-time"; }, { readonly type: "number"; }]; }; readonly strategies: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; }; readonly components: {}; }; clientFeatureSchema: { readonly $id: "#/components/schemas/clientFeatureSchema"; readonly type: "object"; readonly required: readonly ["name", "enabled"]; readonly additionalProperties: false; readonly properties: { readonly name: { readonly type: "string"; }; readonly type: { readonly type: "string"; }; readonly description: { readonly type: "string"; readonly nullable: true; }; readonly createdAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly lastSeenAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly enabled: { readonly type: "boolean"; }; readonly stale: { readonly type: "boolean"; }; readonly impressionData: { readonly type: "boolean"; readonly nullable: true; }; readonly project: { readonly type: "string"; }; 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 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 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 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: {}; }; }; }; }; clientFeaturesQuerySchema: { readonly $id: "#/components/schemas/clientFeaturesQuerySchema"; readonly type: "object"; readonly additionalProperties: false; readonly properties: { readonly tag: { readonly type: "array"; readonly items: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; }; readonly project: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly namePrefix: { readonly type: "string"; }; readonly environment: { readonly type: "string"; }; readonly inlineSegmentConstraints: { readonly type: "boolean"; }; }; readonly components: {}; }; clientFeaturesSchema: { readonly $id: "#/components/schemas/clientFeaturesSchema"; readonly type: "object"; readonly required: readonly ["version", "features"]; readonly properties: { readonly version: { readonly type: "number"; }; readonly features: { readonly type: "array"; readonly items: { readonly $ref: "#/components/schemas/clientFeatureSchema"; }; }; readonly segments: { readonly type: "array"; readonly items: { readonly $ref: "#/components/schemas/segmentSchema"; }; }; readonly query: { readonly $ref: "#/components/schemas/clientFeaturesQuerySchema"; }; }; 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 clientFeatureSchema: { readonly $id: "#/components/schemas/clientFeatureSchema"; readonly type: "object"; readonly required: readonly ["name", "enabled"]; readonly additionalProperties: false; readonly properties: { readonly name: { readonly type: "string"; }; readonly type: { readonly type: "string"; }; readonly description: { readonly type: "string"; readonly nullable: true; }; readonly createdAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly lastSeenAt: { readonly type: "string"; readonly format: "date-time"; readonly nullable: true; }; readonly enabled: { readonly type: "boolean"; }; readonly stale: { readonly type: "boolean"; }; readonly impressionData: { readonly type: "boolean"; readonly nullable: true; }; readonly project: { readonly type: "string"; }; 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 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"; };