unleash-server
Version:
Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.
78 lines • 3.49 kB
TypeScript
import type { FromSchema } from 'json-schema-to-ts';
export declare const frontendApiFeatureSchema: {
readonly $id: "#/components/schemas/frontendApiFeatureSchema";
readonly type: "object";
readonly required: readonly ["name", "enabled", "impressionData"];
readonly additionalProperties: false;
readonly description: "Frontend API feature";
readonly properties: {
readonly name: {
readonly type: "string";
readonly example: "disable-comments";
readonly description: "Unique feature name.";
};
readonly enabled: {
readonly type: "boolean";
readonly example: true;
readonly description: "Always set to `true`.";
};
readonly impressionData: {
readonly type: "boolean";
readonly example: false;
readonly description: "`true` if the impression data collection is enabled for the feature, otherwise `false`.";
};
readonly variant: {
readonly type: "object";
readonly required: readonly ["name", "enabled"];
readonly additionalProperties: false;
readonly description: "Variant details";
readonly properties: {
readonly name: {
readonly type: "string";
readonly description: "The variants name. Is unique for this feature flag";
readonly example: "blue_group";
};
readonly enabled: {
readonly type: "boolean";
readonly example: true;
readonly description: "Whether the variant is enabled or not.";
};
readonly payload: {
readonly type: "object";
readonly additionalProperties: false;
readonly required: readonly ["type", "value"];
readonly description: "Extra data configured for this variant";
readonly example: {
readonly type: "json";
readonly value: "{\"color\": \"red\"}";
};
readonly properties: {
readonly type: {
readonly type: "string";
readonly description: "The format of the payload.";
readonly enum: readonly ["json", "csv", "string", "number"];
};
readonly value: {
readonly type: "string";
readonly description: "The payload value stringified.";
};
};
};
readonly feature_enabled: {
readonly type: "boolean";
readonly description: "Whether the feature is enabled or not.";
readonly example: true;
};
readonly featureEnabled: {
readonly deprecated: true;
readonly type: "boolean";
readonly description: "Use `feature_enabled` instead.";
readonly example: true;
};
};
};
};
readonly components: {};
};
export type FrontendApiFeatureSchema = FromSchema<typeof frontendApiFeatureSchema>;
//# sourceMappingURL=frontend-api-feature-schema.d.ts.map