unleash-server 4.14.2 → 4.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/db/event-store.d.ts +2 -3
- package/dist/lib/db/event-store.js +26 -36
- package/dist/lib/db/event-store.js.map +1 -1
- package/dist/lib/db/event-store.test.js +1 -1
- package/dist/lib/db/event-store.test.js.map +1 -1
- package/dist/lib/db/feature-strategy-store.js +3 -3
- package/dist/lib/db/feature-strategy-store.js.map +1 -1
- package/dist/lib/db/feature-toggle-client-store.d.ts +1 -1
- package/dist/lib/db/feature-toggle-client-store.js +6 -6
- package/dist/lib/db/feature-toggle-client-store.js.map +1 -1
- package/dist/lib/db/group-store.d.ts +0 -1
- package/dist/lib/db/group-store.js +1 -14
- package/dist/lib/db/group-store.js.map +1 -1
- package/dist/lib/db/user-store.js +8 -1
- package/dist/lib/db/user-store.js.map +1 -1
- package/dist/lib/openapi/index.d.ts +2388 -952
- package/dist/lib/openapi/index.js +8 -4
- package/dist/lib/openapi/index.js.map +1 -1
- package/dist/lib/openapi/spec/client-feature-schema.d.ts +72 -7
- package/dist/lib/openapi/spec/client-feature-schema.js +5 -3
- package/dist/lib/openapi/spec/client-feature-schema.js.map +1 -1
- package/dist/lib/openapi/spec/client-features-schema.d.ts +138 -16
- package/dist/lib/openapi/spec/client-features-schema.js +2 -2
- package/dist/lib/openapi/spec/client-features-schema.js.map +1 -1
- package/dist/lib/openapi/spec/client-features-schema.test.js +10 -0
- package/dist/lib/openapi/spec/client-features-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/constraint-schema.d.ts +51 -2
- package/dist/lib/openapi/spec/constraint-schema.js +17 -4
- package/dist/lib/openapi/spec/constraint-schema.js.map +1 -1
- package/dist/lib/openapi/spec/context-field-schema.test.js +5 -1
- package/dist/lib/openapi/spec/context-field-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/create-feature-strategy-schema.d.ts +12 -2
- package/dist/lib/openapi/spec/feature-environment-schema.d.ts +12 -2
- package/dist/lib/openapi/spec/feature-events-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/feature-events-schema.js +1 -1
- package/dist/lib/openapi/spec/feature-events-schema.js.map +1 -1
- package/dist/lib/openapi/spec/feature-schema.d.ts +25 -5
- package/dist/lib/openapi/spec/feature-schema.test.js +13 -1
- package/dist/lib/openapi/spec/feature-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/feature-strategy-schema.d.ts +12 -2
- package/dist/lib/openapi/spec/feature-variants-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/features-schema.d.ts +50 -10
- package/dist/lib/openapi/spec/group-schema.d.ts +1 -4
- package/dist/lib/openapi/spec/group-user-model-schema.d.ts +1 -4
- package/dist/lib/openapi/spec/group-user-model-schema.js +1 -4
- package/dist/lib/openapi/spec/group-user-model-schema.js.map +1 -1
- package/dist/lib/openapi/spec/groups-schema.d.ts +2 -8
- package/dist/lib/openapi/spec/groups-schema.test.js +0 -1
- package/dist/lib/openapi/spec/groups-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/health-overview-schema.d.ts +50 -10
- package/dist/lib/openapi/spec/health-report-schema.d.ts +50 -10
- package/dist/lib/openapi/spec/playground-constraint-schema.d.ts +47 -0
- package/dist/lib/openapi/spec/playground-constraint-schema.js +18 -0
- package/dist/lib/openapi/spec/playground-constraint-schema.js.map +1 -0
- package/dist/lib/openapi/spec/playground-feature-schema.d.ts +388 -2
- package/dist/lib/openapi/spec/playground-feature-schema.js +95 -9
- package/dist/lib/openapi/spec/playground-feature-schema.js.map +1 -1
- package/dist/lib/openapi/spec/playground-feature-schema.test.js +64 -3
- package/dist/lib/openapi/spec/playground-feature-schema.test.js.map +1 -1
- package/dist/lib/openapi/spec/playground-request-schema.d.ts +2 -0
- package/dist/lib/openapi/spec/playground-request-schema.js +6 -1
- package/dist/lib/openapi/spec/playground-request-schema.js.map +1 -1
- package/dist/lib/openapi/spec/playground-response-schema.d.ts +774 -3
- package/dist/lib/openapi/spec/playground-response-schema.js +15 -1
- package/dist/lib/openapi/spec/playground-response-schema.js.map +1 -1
- package/dist/lib/openapi/spec/playground-segment-schema.d.ts +79 -0
- package/dist/lib/openapi/spec/playground-segment-schema.js +36 -0
- package/dist/lib/openapi/spec/playground-segment-schema.js.map +1 -0
- package/dist/lib/openapi/spec/playground-strategy-schema.d.ts +257 -0
- package/dist/lib/openapi/spec/playground-strategy-schema.js +102 -0
- package/dist/lib/openapi/spec/playground-strategy-schema.js.map +1 -0
- package/dist/lib/openapi/spec/{bootstrap-ui-schema.test.d.ts → project-schema.test.d.ts} +0 -0
- package/dist/lib/openapi/spec/project-schema.test.js +17 -0
- package/dist/lib/openapi/spec/project-schema.test.js.map +1 -0
- package/dist/lib/openapi/spec/search-events-schema.d.ts +37 -0
- package/dist/lib/openapi/spec/search-events-schema.js +47 -0
- package/dist/lib/openapi/spec/search-events-schema.js.map +1 -0
- package/dist/lib/openapi/spec/segment-schema.d.ts +12 -2
- package/dist/lib/openapi/spec/state-schema.d.ts +61 -11
- package/dist/lib/{routes/admin-api/bootstrap-ui.test.d.ts → openapi/spec/tag-types-schema.test.d.ts} +0 -0
- package/dist/lib/openapi/spec/tag-types-schema.test.js +23 -0
- package/dist/lib/openapi/spec/tag-types-schema.test.js.map +1 -0
- package/dist/lib/openapi/spec/ui-config-schema.d.ts +3 -0
- package/dist/lib/openapi/spec/ui-config-schema.js +3 -0
- package/dist/lib/openapi/spec/ui-config-schema.js.map +1 -1
- package/dist/lib/openapi/spec/update-feature-schema.d.ts +12 -2
- package/dist/lib/openapi/spec/update-feature-strategy-schema.d.ts +12 -2
- package/dist/{test/e2e/api/admin/bootstrap.test.d.ts → lib/openapi/spec/user-schema.test.d.ts} +0 -0
- package/dist/lib/openapi/spec/user-schema.test.js +17 -0
- package/dist/lib/openapi/spec/user-schema.test.js.map +1 -0
- package/dist/lib/openapi/spec/users-groups-base-schema.d.ts +2 -8
- package/dist/lib/openapi/spec/variant-schema.d.ts +1 -1
- package/dist/lib/openapi/spec/variant-schema.js +1 -1
- package/dist/lib/openapi/spec/variant-schema.js.map +1 -1
- package/dist/lib/openapi/spec/variants-schema.d.ts +1 -1
- package/dist/lib/openapi/util/standard-responses.d.ts +6 -0
- package/dist/lib/openapi/util/standard-responses.js +10 -2
- package/dist/lib/openapi/util/standard-responses.js.map +1 -1
- package/dist/lib/routes/admin-api/config.d.ts +2 -1
- package/dist/lib/routes/admin-api/config.js +3 -1
- package/dist/lib/routes/admin-api/config.js.map +1 -1
- package/dist/lib/routes/admin-api/event.d.ts +3 -1
- package/dist/lib/routes/admin-api/event.js +30 -7
- package/dist/lib/routes/admin-api/event.js.map +1 -1
- package/dist/lib/routes/admin-api/index.js +0 -2
- package/dist/lib/routes/admin-api/index.js.map +1 -1
- package/dist/lib/routes/admin-api/playground.js.map +1 -1
- package/dist/lib/services/event-service.d.ts +2 -2
- package/dist/lib/services/event-service.js +2 -5
- package/dist/lib/services/event-service.js.map +1 -1
- package/dist/lib/services/feature-toggle-service.d.ts +1 -1
- package/dist/lib/services/feature-toggle-service.js +2 -2
- package/dist/lib/services/feature-toggle-service.js.map +1 -1
- package/dist/lib/services/group-service.d.ts +1 -1
- package/dist/lib/services/group-service.js +1 -5
- package/dist/lib/services/group-service.js.map +1 -1
- package/dist/lib/services/index.js +1 -0
- package/dist/lib/services/index.js.map +1 -1
- package/dist/lib/services/openapi-service.js +1 -1
- package/dist/lib/services/openapi-service.js.map +1 -1
- package/dist/lib/services/playground-service.d.ts +2 -1
- package/dist/lib/services/playground-service.js +30 -11
- package/dist/lib/services/playground-service.js.map +1 -1
- package/dist/lib/types/group.d.ts +1 -2
- package/dist/lib/types/group.js.map +1 -1
- package/dist/lib/types/stores/event-store.d.ts +2 -3
- package/dist/lib/types/stores/feature-toggle-client-store.d.ts +1 -1
- package/dist/lib/types/stores/group-store.d.ts +0 -1
- package/dist/lib/util/feature-evaluator/client.d.ts +25 -0
- package/dist/lib/util/feature-evaluator/client.js +135 -0
- package/dist/lib/util/feature-evaluator/client.js.map +1 -0
- package/dist/lib/util/feature-evaluator/constraint.d.ts +28 -0
- package/dist/lib/util/feature-evaluator/constraint.js +129 -0
- package/dist/lib/util/feature-evaluator/constraint.js.map +1 -0
- package/dist/lib/util/feature-evaluator/context.d.ts +13 -0
- package/dist/lib/util/feature-evaluator/context.js +3 -0
- package/dist/lib/util/feature-evaluator/context.js.map +1 -0
- package/dist/lib/util/feature-evaluator/feature-evaluator.d.ts +36 -0
- package/dist/lib/util/feature-evaluator/feature-evaluator.js +55 -0
- package/dist/lib/util/feature-evaluator/feature-evaluator.js.map +1 -0
- package/dist/lib/util/feature-evaluator/feature.d.ts +19 -0
- package/dist/lib/util/feature-evaluator/feature.js +3 -0
- package/dist/lib/util/feature-evaluator/feature.js.map +1 -0
- package/dist/lib/util/feature-evaluator/helpers.d.ts +6 -0
- package/dist/lib/util/feature-evaluator/helpers.js +32 -0
- package/dist/lib/util/feature-evaluator/helpers.js.map +1 -0
- package/dist/lib/util/feature-evaluator/index.d.ts +8 -0
- package/dist/lib/util/feature-evaluator/index.js +14 -0
- package/dist/lib/util/feature-evaluator/index.js.map +1 -0
- package/dist/lib/util/feature-evaluator/repository/bootstrap-provider.d.ts +16 -0
- package/dist/lib/util/feature-evaluator/repository/bootstrap-provider.js +25 -0
- package/dist/lib/util/feature-evaluator/repository/bootstrap-provider.js.map +1 -0
- package/dist/lib/util/feature-evaluator/repository/index.d.ts +35 -0
- package/dist/lib/util/feature-evaluator/repository/index.js +63 -0
- package/dist/lib/util/feature-evaluator/repository/index.js.map +1 -0
- package/dist/lib/util/feature-evaluator/repository/storage-provider-in-mem.d.ts +6 -0
- package/dist/lib/util/feature-evaluator/repository/storage-provider-in-mem.js +16 -0
- package/dist/lib/util/feature-evaluator/repository/storage-provider-in-mem.js.map +1 -0
- package/dist/lib/util/feature-evaluator/repository/storage-provider.d.ts +14 -0
- package/dist/lib/util/feature-evaluator/repository/storage-provider.js +50 -0
- package/dist/lib/util/feature-evaluator/repository/storage-provider.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/application-hostname-strategy.d.ts +8 -0
- package/dist/lib/util/feature-evaluator/strategy/application-hostname-strategy.js +23 -0
- package/dist/lib/util/feature-evaluator/strategy/application-hostname-strategy.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/default-strategy.d.ts +5 -0
- package/dist/lib/util/feature-evaluator/strategy/default-strategy.js +13 -0
- package/dist/lib/util/feature-evaluator/strategy/default-strategy.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/flexible-rollout-strategy.d.ts +12 -0
- package/dist/lib/util/feature-evaluator/strategy/flexible-rollout-strategy.js +49 -0
- package/dist/lib/util/feature-evaluator/strategy/flexible-rollout-strategy.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-random.d.ts +9 -0
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-random.js +19 -0
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-random.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-session-id.d.ts +9 -0
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-session-id.js +24 -0
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-session-id.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-user-id.d.ts +9 -0
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-user-id.js +24 -0
- package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-user-id.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/index.d.ts +4 -0
- package/dist/lib/util/feature-evaluator/strategy/index.js +29 -0
- package/dist/lib/util/feature-evaluator/strategy/index.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/remote-address-strategy.d.ts +8 -0
- package/dist/lib/util/feature-evaluator/strategy/remote-address-strategy.js +35 -0
- package/dist/lib/util/feature-evaluator/strategy/remote-address-strategy.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/strategy.d.ts +41 -0
- package/dist/lib/util/feature-evaluator/strategy/strategy.js +75 -0
- package/dist/lib/util/feature-evaluator/strategy/strategy.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/unknown-strategy.d.ts +9 -0
- package/dist/lib/util/feature-evaluator/strategy/unknown-strategy.js +29 -0
- package/dist/lib/util/feature-evaluator/strategy/unknown-strategy.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/user-with-id-strategy.d.ts +8 -0
- package/dist/lib/util/feature-evaluator/strategy/user-with-id-strategy.js +16 -0
- package/dist/lib/util/feature-evaluator/strategy/user-with-id-strategy.js.map +1 -0
- package/dist/lib/util/feature-evaluator/strategy/util.d.ts +1 -0
- package/dist/lib/util/feature-evaluator/strategy/util.js +31 -0
- package/dist/lib/util/feature-evaluator/strategy/util.js.map +1 -0
- package/dist/lib/util/feature-evaluator/variant.d.ts +28 -0
- package/dist/lib/util/feature-evaluator/variant.js +73 -0
- package/dist/lib/util/feature-evaluator/variant.js.map +1 -0
- package/dist/lib/util/offline-unleash-client.d.ts +13 -2
- package/dist/lib/util/offline-unleash-client.js +12 -13
- package/dist/lib/util/offline-unleash-client.js.map +1 -1
- package/dist/lib/util/offline-unleash-client.test.d.ts +3 -1
- package/dist/lib/util/offline-unleash-client.test.js +349 -139
- package/dist/lib/util/offline-unleash-client.test.js.map +1 -1
- package/dist/migrations/20220808084524-add-group-permissions.d.ts +2 -0
- package/dist/migrations/20220808084524-add-group-permissions.js +12 -0
- package/dist/migrations/20220808084524-add-group-permissions.js.map +1 -0
- package/dist/migrations/20220808110415-add-projects-foreign-key.d.ts +2 -0
- package/dist/migrations/20220808110415-add-projects-foreign-key.js +14 -0
- package/dist/migrations/20220808110415-add-projects-foreign-key.js.map +1 -0
- package/dist/test/arbitraries.test.d.ts +12 -2
- package/dist/test/arbitraries.test.js +67 -9
- package/dist/test/arbitraries.test.js.map +1 -1
- package/dist/test/e2e/api/admin/config.e2e.test.js +2 -1
- package/dist/test/e2e/api/admin/config.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/event.e2e.test.js +57 -0
- package/dist/test/e2e/api/admin/event.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/feature.e2e.test.js +8 -7
- package/dist/test/e2e/api/admin/feature.e2e.test.js.map +1 -1
- package/dist/test/e2e/api/admin/playground.e2e.test.js +22 -0
- package/dist/test/e2e/api/admin/playground.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/access-service.e2e.test.js +38 -20
- package/dist/test/e2e/services/access-service.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/playground-service.test.d.ts +5 -1
- package/dist/test/e2e/services/playground-service.test.js +725 -37
- package/dist/test/e2e/services/playground-service.test.js.map +1 -1
- package/dist/test/e2e/services/project-service.e2e.test.js +12 -4
- package/dist/test/e2e/services/project-service.e2e.test.js.map +1 -1
- package/dist/test/e2e/services/setting-service.test.js +9 -3
- package/dist/test/e2e/services/setting-service.test.js.map +1 -1
- package/dist/test/e2e/stores/event-store.e2e.test.js +6 -2
- package/dist/test/e2e/stores/event-store.e2e.test.js.map +1 -1
- package/dist/test/fixtures/fake-event-store.d.ts +1 -3
- package/dist/test/fixtures/fake-event-store.js +2 -8
- package/dist/test/fixtures/fake-event-store.js.map +1 -1
- package/dist/test/fixtures/fake-group-store.d.ts +0 -1
- package/dist/test/fixtures/fake-group-store.js +0 -3
- package/dist/test/fixtures/fake-group-store.js.map +1 -1
- package/package.json +15 -13
- package/dist/lib/openapi/spec/bootstrap-ui-schema.d.ts +0 -491
- package/dist/lib/openapi/spec/bootstrap-ui-schema.js +0 -94
- package/dist/lib/openapi/spec/bootstrap-ui-schema.js.map +0 -1
- package/dist/lib/openapi/spec/bootstrap-ui-schema.test.js +0 -145
- package/dist/lib/openapi/spec/bootstrap-ui-schema.test.js.map +0 -1
- package/dist/lib/openapi/spec/client-variant-schema.d.ts +0 -35
- package/dist/lib/openapi/spec/client-variant-schema.js +0 -37
- package/dist/lib/openapi/spec/client-variant-schema.js.map +0 -1
- package/dist/lib/routes/admin-api/bootstrap-ui.d.ts +0 -25
- package/dist/lib/routes/admin-api/bootstrap-ui.js +0 -82
- package/dist/lib/routes/admin-api/bootstrap-ui.js.map +0 -1
- package/dist/lib/routes/admin-api/bootstrap-ui.test.js +0 -60
- package/dist/lib/routes/admin-api/bootstrap-ui.test.js.map +0 -1
- package/dist/test/e2e/api/admin/bootstrap.test.js +0 -43
- package/dist/test/e2e/api/admin/bootstrap.test.js.map +0 -1
|
@@ -1,45 +1,84 @@
|
|
|
1
1
|
import { FromSchema } from 'json-schema-to-ts';
|
|
2
|
+
export declare const unknownFeatureEvaluationResult: "unevaluated";
|
|
2
3
|
export declare const playgroundFeatureSchema: {
|
|
3
4
|
readonly $id: "#/components/schemas/playgroundFeatureSchema";
|
|
4
5
|
readonly description: "A simplified feature toggle model intended for the Unleash playground.";
|
|
5
6
|
readonly type: "object";
|
|
6
7
|
readonly additionalProperties: false;
|
|
7
|
-
readonly required: readonly ["name", "projectId", "isEnabled", "variant", "variants"];
|
|
8
|
+
readonly required: readonly ["name", "projectId", "isEnabled", "isEnabledInCurrentEnvironment", "variant", "variants", "strategies"];
|
|
8
9
|
readonly properties: {
|
|
9
10
|
readonly name: {
|
|
10
11
|
readonly type: "string";
|
|
11
12
|
readonly example: "my-feature";
|
|
13
|
+
readonly description: "The feature's name.";
|
|
12
14
|
};
|
|
13
15
|
readonly projectId: {
|
|
14
16
|
readonly type: "string";
|
|
15
17
|
readonly example: "my-project";
|
|
18
|
+
readonly description: "The ID of the project that contains this feature.";
|
|
19
|
+
};
|
|
20
|
+
readonly strategies: {
|
|
21
|
+
readonly type: "object";
|
|
22
|
+
readonly additionalProperties: false;
|
|
23
|
+
readonly required: readonly ["result", "data"];
|
|
24
|
+
readonly properties: {
|
|
25
|
+
readonly result: {
|
|
26
|
+
readonly description: "The cumulative results of all the feature's strategies. Can be `true`,\n `false`, or `unknown`.\n This property will only be `unknown`\n if one or more of the strategies can't be fully evaluated and the rest of the strategies\n all resolve to `false`.";
|
|
27
|
+
readonly anyOf: readonly [{
|
|
28
|
+
readonly type: "boolean";
|
|
29
|
+
}, {
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly enum: readonly ["unknown"];
|
|
32
|
+
}];
|
|
33
|
+
};
|
|
34
|
+
readonly data: {
|
|
35
|
+
readonly description: "The strategies that apply to this feature.";
|
|
36
|
+
readonly type: "array";
|
|
37
|
+
readonly items: {
|
|
38
|
+
readonly $ref: "#/components/schemas/playgroundStrategySchema";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
readonly isEnabledInCurrentEnvironment: {
|
|
44
|
+
readonly type: "boolean";
|
|
45
|
+
readonly description: "Whether the feature is active and would be evaluated in the provided environment in a normal SDK context.";
|
|
16
46
|
};
|
|
17
47
|
readonly isEnabled: {
|
|
48
|
+
readonly description: "Whether this feature is enabled or not in the current environment.\n If a feature can't be fully evaluated (that is, `strategies.result` is `unknown`),\n this will be `false` to align with how client SDKs treat unresolved feature states.";
|
|
18
49
|
readonly type: "boolean";
|
|
19
50
|
readonly example: true;
|
|
20
51
|
};
|
|
21
52
|
readonly variant: {
|
|
53
|
+
readonly description: "The feature variant you receive based on the provided context or the _disabled\n variant_. If a feature is disabled or doesn't have any\n variants, you would get the _disabled variant_.\n Otherwise, you'll get one of thefeature's defined variants.";
|
|
22
54
|
readonly type: "object";
|
|
23
55
|
readonly additionalProperties: false;
|
|
24
56
|
readonly required: readonly ["name", "enabled"];
|
|
25
57
|
readonly properties: {
|
|
26
58
|
readonly name: {
|
|
27
59
|
readonly type: "string";
|
|
60
|
+
readonly description: "The variant's name. If there is no variant or if the toggle is disabled, this will be `disabled`";
|
|
61
|
+
readonly example: "red-variant";
|
|
28
62
|
};
|
|
29
63
|
readonly enabled: {
|
|
30
64
|
readonly type: "boolean";
|
|
65
|
+
readonly description: "Whether the variant is enabled or not. If the feature is disabled or if it doesn't have variants, this property will be `false`";
|
|
31
66
|
};
|
|
32
67
|
readonly payload: {
|
|
33
68
|
readonly type: "object";
|
|
34
69
|
readonly additionalProperties: false;
|
|
35
70
|
readonly required: readonly ["type", "value"];
|
|
71
|
+
readonly description: "An optional payload attached to the variant.";
|
|
36
72
|
readonly properties: {
|
|
37
73
|
readonly type: {
|
|
74
|
+
readonly description: "The format of the payload.";
|
|
38
75
|
readonly type: "string";
|
|
39
76
|
readonly enum: readonly ["json", "csv", "string"];
|
|
40
77
|
};
|
|
41
78
|
readonly value: {
|
|
42
79
|
readonly type: "string";
|
|
80
|
+
readonly description: "The payload value stringified.";
|
|
81
|
+
readonly example: "{\"property\": \"value\"}";
|
|
43
82
|
};
|
|
44
83
|
};
|
|
45
84
|
};
|
|
@@ -59,11 +98,352 @@ export declare const playgroundFeatureSchema: {
|
|
|
59
98
|
};
|
|
60
99
|
readonly components: {
|
|
61
100
|
readonly schemas: {
|
|
101
|
+
readonly playgroundStrategySchema: {
|
|
102
|
+
readonly $id: "#/components/schemas/playgroundStrategySchema";
|
|
103
|
+
readonly type: "object";
|
|
104
|
+
readonly additionalProperties: false;
|
|
105
|
+
readonly required: readonly ["id", "name", "result", "segments", "constraints", "parameters"];
|
|
106
|
+
readonly properties: {
|
|
107
|
+
readonly name: {
|
|
108
|
+
readonly description: "The strategy's name.";
|
|
109
|
+
readonly type: "string";
|
|
110
|
+
};
|
|
111
|
+
readonly id: {
|
|
112
|
+
readonly description: "The strategy's id.";
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
};
|
|
115
|
+
readonly result: {
|
|
116
|
+
readonly anyOf: readonly [{
|
|
117
|
+
readonly type: "object";
|
|
118
|
+
readonly additionalProperties: false;
|
|
119
|
+
readonly required: readonly ["evaluationStatus", "enabled"];
|
|
120
|
+
readonly properties: {
|
|
121
|
+
readonly evaluationStatus: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly description: "Signals that this strategy could not be evaluated. This is most likely because you're using a custom strategy that Unleash doesn't know about.";
|
|
124
|
+
readonly enum: readonly ["incomplete"];
|
|
125
|
+
};
|
|
126
|
+
readonly enabled: {
|
|
127
|
+
readonly description: "Whether this strategy resolves to `false` or if it might resolve to `true`. Because Unleash can't evaluate the strategy, it can't say for certain whether it will be `true`, but if you have failing constraints or segments, it _can_ determine that your strategy would be `false`.";
|
|
128
|
+
readonly anyOf: readonly [{
|
|
129
|
+
readonly type: "boolean";
|
|
130
|
+
readonly enum: readonly [false];
|
|
131
|
+
}, {
|
|
132
|
+
readonly type: "string";
|
|
133
|
+
readonly enum: readonly ["unknown"];
|
|
134
|
+
}];
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
}, {
|
|
138
|
+
readonly type: "object";
|
|
139
|
+
readonly additionalProperties: false;
|
|
140
|
+
readonly required: readonly ["evaluationStatus", "enabled"];
|
|
141
|
+
readonly properties: {
|
|
142
|
+
readonly evaluationStatus: {
|
|
143
|
+
readonly description: "Signals that this strategy was evaluated successfully.";
|
|
144
|
+
readonly type: "string";
|
|
145
|
+
readonly enum: readonly ["complete"];
|
|
146
|
+
};
|
|
147
|
+
readonly enabled: {
|
|
148
|
+
readonly type: "boolean";
|
|
149
|
+
readonly description: "Whether this strategy evaluates to true or not.";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
}];
|
|
153
|
+
readonly description: "The strategy's evaluation result. If the strategy is a custom strategy that Unleash can't evaluate, `evaluationStatus` will be `unknown`. Otherwise, it will be `true` or `false`";
|
|
154
|
+
};
|
|
155
|
+
readonly segments: {
|
|
156
|
+
readonly type: "array";
|
|
157
|
+
readonly description: "The strategy's segments and their evaluation results.";
|
|
158
|
+
readonly items: {
|
|
159
|
+
readonly $ref: "#/components/schemas/playgroundSegmentSchema";
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
readonly constraints: {
|
|
163
|
+
readonly type: "array";
|
|
164
|
+
readonly description: "The strategy's constraints and their evaluation results.";
|
|
165
|
+
readonly items: {
|
|
166
|
+
readonly $ref: "#/components/schemas/playgroundConstraintSchema";
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
readonly parameters: {
|
|
170
|
+
readonly description: "The strategy's constraints and their evaluation results.";
|
|
171
|
+
readonly example: {
|
|
172
|
+
readonly myParam1: "param value";
|
|
173
|
+
};
|
|
174
|
+
readonly $ref: "#/components/schemas/parametersSchema";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
readonly components: {
|
|
178
|
+
readonly schemas: {
|
|
179
|
+
readonly playgroundConstraintSchema: {
|
|
180
|
+
readonly required: readonly ["contextName", "operator", "result"];
|
|
181
|
+
readonly properties: {
|
|
182
|
+
readonly result: {
|
|
183
|
+
readonly description: "Whether this was evaluated as true or false.";
|
|
184
|
+
readonly type: "boolean";
|
|
185
|
+
};
|
|
186
|
+
readonly contextName: {
|
|
187
|
+
readonly description: "The name of the context field that this constraint should apply to.";
|
|
188
|
+
readonly example: "appName";
|
|
189
|
+
readonly type: "string";
|
|
190
|
+
};
|
|
191
|
+
readonly operator: {
|
|
192
|
+
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/advanced/strategy_constraints#strategy-constraint-operators).";
|
|
193
|
+
readonly type: "string";
|
|
194
|
+
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"];
|
|
195
|
+
};
|
|
196
|
+
readonly caseInsensitive: {
|
|
197
|
+
readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
|
|
198
|
+
readonly type: "boolean";
|
|
199
|
+
readonly default: false;
|
|
200
|
+
};
|
|
201
|
+
readonly inverted: {
|
|
202
|
+
readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
|
|
203
|
+
readonly type: "boolean";
|
|
204
|
+
readonly default: false;
|
|
205
|
+
};
|
|
206
|
+
readonly values: {
|
|
207
|
+
readonly type: "array";
|
|
208
|
+
readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
|
|
209
|
+
readonly items: {
|
|
210
|
+
readonly type: "string";
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
readonly value: {
|
|
214
|
+
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.";
|
|
215
|
+
readonly type: "string";
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
readonly type: "object";
|
|
219
|
+
readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
|
|
220
|
+
readonly components: {};
|
|
221
|
+
readonly $id: "#/components/schemas/playgroundConstraintSchema";
|
|
222
|
+
readonly additionalProperties: false;
|
|
223
|
+
};
|
|
224
|
+
readonly playgroundSegmentSchema: {
|
|
225
|
+
readonly $id: "#/components/schemas/playgroundSegmentSchema";
|
|
226
|
+
readonly type: "object";
|
|
227
|
+
readonly additionalProperties: false;
|
|
228
|
+
readonly required: readonly ["name", "id", "constraints", "result"];
|
|
229
|
+
readonly properties: {
|
|
230
|
+
readonly id: {
|
|
231
|
+
readonly description: "The segment's id.";
|
|
232
|
+
readonly type: "integer";
|
|
233
|
+
};
|
|
234
|
+
readonly name: {
|
|
235
|
+
readonly description: "The name of the segment.";
|
|
236
|
+
readonly example: "segment A";
|
|
237
|
+
readonly type: "string";
|
|
238
|
+
};
|
|
239
|
+
readonly result: {
|
|
240
|
+
readonly description: "Whether this was evaluated as true or false.";
|
|
241
|
+
readonly type: "boolean";
|
|
242
|
+
};
|
|
243
|
+
readonly constraints: {
|
|
244
|
+
readonly type: "array";
|
|
245
|
+
readonly description: "The list of constraints in this segment.";
|
|
246
|
+
readonly items: {
|
|
247
|
+
readonly $ref: "#/components/schemas/playgroundConstraintSchema";
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
readonly components: {
|
|
252
|
+
readonly schemas: {
|
|
253
|
+
readonly playgroundConstraintSchema: {
|
|
254
|
+
readonly required: readonly ["contextName", "operator", "result"];
|
|
255
|
+
readonly properties: {
|
|
256
|
+
readonly result: {
|
|
257
|
+
readonly description: "Whether this was evaluated as true or false.";
|
|
258
|
+
readonly type: "boolean";
|
|
259
|
+
};
|
|
260
|
+
readonly contextName: {
|
|
261
|
+
readonly description: "The name of the context field that this constraint should apply to.";
|
|
262
|
+
readonly example: "appName";
|
|
263
|
+
readonly type: "string";
|
|
264
|
+
};
|
|
265
|
+
readonly operator: {
|
|
266
|
+
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/advanced/strategy_constraints#strategy-constraint-operators).";
|
|
267
|
+
readonly type: "string";
|
|
268
|
+
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"];
|
|
269
|
+
};
|
|
270
|
+
readonly caseInsensitive: {
|
|
271
|
+
readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
|
|
272
|
+
readonly type: "boolean";
|
|
273
|
+
readonly default: false;
|
|
274
|
+
};
|
|
275
|
+
readonly inverted: {
|
|
276
|
+
readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
|
|
277
|
+
readonly type: "boolean";
|
|
278
|
+
readonly default: false;
|
|
279
|
+
};
|
|
280
|
+
readonly values: {
|
|
281
|
+
readonly type: "array";
|
|
282
|
+
readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
|
|
283
|
+
readonly items: {
|
|
284
|
+
readonly type: "string";
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
readonly value: {
|
|
288
|
+
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.";
|
|
289
|
+
readonly type: "string";
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
readonly type: "object";
|
|
293
|
+
readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
|
|
294
|
+
readonly components: {};
|
|
295
|
+
readonly $id: "#/components/schemas/playgroundConstraintSchema";
|
|
296
|
+
readonly additionalProperties: false;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
readonly parametersSchema: {
|
|
302
|
+
readonly $id: "#/components/schemas/parametersSchema";
|
|
303
|
+
readonly type: "object";
|
|
304
|
+
readonly additionalProperties: {
|
|
305
|
+
readonly type: "string";
|
|
306
|
+
};
|
|
307
|
+
readonly components: {};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
readonly playgroundConstraintSchema: {
|
|
313
|
+
readonly required: readonly ["contextName", "operator", "result"];
|
|
314
|
+
readonly properties: {
|
|
315
|
+
readonly result: {
|
|
316
|
+
readonly description: "Whether this was evaluated as true or false.";
|
|
317
|
+
readonly type: "boolean";
|
|
318
|
+
};
|
|
319
|
+
readonly contextName: {
|
|
320
|
+
readonly description: "The name of the context field that this constraint should apply to.";
|
|
321
|
+
readonly example: "appName";
|
|
322
|
+
readonly type: "string";
|
|
323
|
+
};
|
|
324
|
+
readonly operator: {
|
|
325
|
+
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/advanced/strategy_constraints#strategy-constraint-operators).";
|
|
326
|
+
readonly type: "string";
|
|
327
|
+
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"];
|
|
328
|
+
};
|
|
329
|
+
readonly caseInsensitive: {
|
|
330
|
+
readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
|
|
331
|
+
readonly type: "boolean";
|
|
332
|
+
readonly default: false;
|
|
333
|
+
};
|
|
334
|
+
readonly inverted: {
|
|
335
|
+
readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
|
|
336
|
+
readonly type: "boolean";
|
|
337
|
+
readonly default: false;
|
|
338
|
+
};
|
|
339
|
+
readonly values: {
|
|
340
|
+
readonly type: "array";
|
|
341
|
+
readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
|
|
342
|
+
readonly items: {
|
|
343
|
+
readonly type: "string";
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
readonly value: {
|
|
347
|
+
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.";
|
|
348
|
+
readonly type: "string";
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
readonly type: "object";
|
|
352
|
+
readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
|
|
353
|
+
readonly components: {};
|
|
354
|
+
readonly $id: "#/components/schemas/playgroundConstraintSchema";
|
|
355
|
+
readonly additionalProperties: false;
|
|
356
|
+
};
|
|
357
|
+
readonly playgroundSegmentSchema: {
|
|
358
|
+
readonly $id: "#/components/schemas/playgroundSegmentSchema";
|
|
359
|
+
readonly type: "object";
|
|
360
|
+
readonly additionalProperties: false;
|
|
361
|
+
readonly required: readonly ["name", "id", "constraints", "result"];
|
|
362
|
+
readonly properties: {
|
|
363
|
+
readonly id: {
|
|
364
|
+
readonly description: "The segment's id.";
|
|
365
|
+
readonly type: "integer";
|
|
366
|
+
};
|
|
367
|
+
readonly name: {
|
|
368
|
+
readonly description: "The name of the segment.";
|
|
369
|
+
readonly example: "segment A";
|
|
370
|
+
readonly type: "string";
|
|
371
|
+
};
|
|
372
|
+
readonly result: {
|
|
373
|
+
readonly description: "Whether this was evaluated as true or false.";
|
|
374
|
+
readonly type: "boolean";
|
|
375
|
+
};
|
|
376
|
+
readonly constraints: {
|
|
377
|
+
readonly type: "array";
|
|
378
|
+
readonly description: "The list of constraints in this segment.";
|
|
379
|
+
readonly items: {
|
|
380
|
+
readonly $ref: "#/components/schemas/playgroundConstraintSchema";
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
readonly components: {
|
|
385
|
+
readonly schemas: {
|
|
386
|
+
readonly playgroundConstraintSchema: {
|
|
387
|
+
readonly required: readonly ["contextName", "operator", "result"];
|
|
388
|
+
readonly properties: {
|
|
389
|
+
readonly result: {
|
|
390
|
+
readonly description: "Whether this was evaluated as true or false.";
|
|
391
|
+
readonly type: "boolean";
|
|
392
|
+
};
|
|
393
|
+
readonly contextName: {
|
|
394
|
+
readonly description: "The name of the context field that this constraint should apply to.";
|
|
395
|
+
readonly example: "appName";
|
|
396
|
+
readonly type: "string";
|
|
397
|
+
};
|
|
398
|
+
readonly operator: {
|
|
399
|
+
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/advanced/strategy_constraints#strategy-constraint-operators).";
|
|
400
|
+
readonly type: "string";
|
|
401
|
+
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"];
|
|
402
|
+
};
|
|
403
|
+
readonly caseInsensitive: {
|
|
404
|
+
readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
|
|
405
|
+
readonly type: "boolean";
|
|
406
|
+
readonly default: false;
|
|
407
|
+
};
|
|
408
|
+
readonly inverted: {
|
|
409
|
+
readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
|
|
410
|
+
readonly type: "boolean";
|
|
411
|
+
readonly default: false;
|
|
412
|
+
};
|
|
413
|
+
readonly values: {
|
|
414
|
+
readonly type: "array";
|
|
415
|
+
readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
|
|
416
|
+
readonly items: {
|
|
417
|
+
readonly type: "string";
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
readonly value: {
|
|
421
|
+
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.";
|
|
422
|
+
readonly type: "string";
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
readonly type: "object";
|
|
426
|
+
readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
|
|
427
|
+
readonly components: {};
|
|
428
|
+
readonly $id: "#/components/schemas/playgroundConstraintSchema";
|
|
429
|
+
readonly additionalProperties: false;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
readonly parametersSchema: {
|
|
435
|
+
readonly $id: "#/components/schemas/parametersSchema";
|
|
436
|
+
readonly type: "object";
|
|
437
|
+
readonly additionalProperties: {
|
|
438
|
+
readonly type: "string";
|
|
439
|
+
};
|
|
440
|
+
readonly components: {};
|
|
441
|
+
};
|
|
62
442
|
readonly variantSchema: {
|
|
63
443
|
readonly $id: "#/components/schemas/variantSchema";
|
|
64
444
|
readonly type: "object";
|
|
65
445
|
readonly additionalProperties: false;
|
|
66
|
-
readonly required: readonly ["name", "weight"
|
|
446
|
+
readonly required: readonly ["name", "weight"];
|
|
67
447
|
readonly properties: {
|
|
68
448
|
readonly name: {
|
|
69
449
|
readonly type: "string";
|
|
@@ -138,6 +518,12 @@ export declare const playgroundFeatureSchema: {
|
|
|
138
518
|
readonly components: {};
|
|
139
519
|
};
|
|
140
520
|
};
|
|
521
|
+
readonly variants: {
|
|
522
|
+
readonly type: "array";
|
|
523
|
+
readonly items: {
|
|
524
|
+
readonly $ref: "#/components/schemas/variantSchema";
|
|
525
|
+
};
|
|
526
|
+
};
|
|
141
527
|
};
|
|
142
528
|
};
|
|
143
529
|
export declare type PlaygroundFeatureSchema = FromSchema<typeof playgroundFeatureSchema>;
|
|
@@ -1,35 +1,111 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.playgroundFeatureSchema = void 0;
|
|
3
|
+
exports.playgroundFeatureSchema = exports.unknownFeatureEvaluationResult = void 0;
|
|
4
|
+
const parameters_schema_1 = require("./parameters-schema");
|
|
4
5
|
const variant_schema_1 = require("./variant-schema");
|
|
5
6
|
const override_schema_1 = require("./override-schema");
|
|
7
|
+
const playground_strategy_schema_1 = require("./playground-strategy-schema");
|
|
8
|
+
const playground_constraint_schema_1 = require("./playground-constraint-schema");
|
|
9
|
+
const playground_segment_schema_1 = require("./playground-segment-schema");
|
|
10
|
+
exports.unknownFeatureEvaluationResult = 'unevaluated';
|
|
6
11
|
exports.playgroundFeatureSchema = {
|
|
7
12
|
$id: '#/components/schemas/playgroundFeatureSchema',
|
|
8
13
|
description: 'A simplified feature toggle model intended for the Unleash playground.',
|
|
9
14
|
type: 'object',
|
|
10
15
|
additionalProperties: false,
|
|
11
|
-
required: [
|
|
16
|
+
required: [
|
|
17
|
+
'name',
|
|
18
|
+
'projectId',
|
|
19
|
+
'isEnabled',
|
|
20
|
+
'isEnabledInCurrentEnvironment',
|
|
21
|
+
'variant',
|
|
22
|
+
'variants',
|
|
23
|
+
'strategies',
|
|
24
|
+
],
|
|
12
25
|
properties: {
|
|
13
|
-
name: {
|
|
14
|
-
|
|
15
|
-
|
|
26
|
+
name: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
example: 'my-feature',
|
|
29
|
+
description: "The feature's name.",
|
|
30
|
+
},
|
|
31
|
+
projectId: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
example: 'my-project',
|
|
34
|
+
description: 'The ID of the project that contains this feature.',
|
|
35
|
+
},
|
|
36
|
+
strategies: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
additionalProperties: false,
|
|
39
|
+
required: ['result', 'data'],
|
|
40
|
+
properties: {
|
|
41
|
+
result: {
|
|
42
|
+
description: `The cumulative results of all the feature's strategies. Can be \`true\`,
|
|
43
|
+
\`false\`, or \`${playground_strategy_schema_1.playgroundStrategyEvaluation.unknownResult}\`.
|
|
44
|
+
This property will only be \`${playground_strategy_schema_1.playgroundStrategyEvaluation.unknownResult}\`
|
|
45
|
+
if one or more of the strategies can't be fully evaluated and the rest of the strategies
|
|
46
|
+
all resolve to \`false\`.`,
|
|
47
|
+
anyOf: [
|
|
48
|
+
{ type: 'boolean' },
|
|
49
|
+
{
|
|
50
|
+
type: 'string',
|
|
51
|
+
enum: [playground_strategy_schema_1.playgroundStrategyEvaluation.unknownResult],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
data: {
|
|
56
|
+
description: 'The strategies that apply to this feature.',
|
|
57
|
+
type: 'array',
|
|
58
|
+
items: {
|
|
59
|
+
$ref: playground_strategy_schema_1.playgroundStrategySchema.$id,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
isEnabledInCurrentEnvironment: {
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
description: 'Whether the feature is active and would be evaluated in the provided environment in a normal SDK context.',
|
|
67
|
+
},
|
|
68
|
+
isEnabled: {
|
|
69
|
+
description: `Whether this feature is enabled or not in the current environment.
|
|
70
|
+
If a feature can't be fully evaluated (that is, \`strategies.result\` is \`${playground_strategy_schema_1.playgroundStrategyEvaluation.unknownResult}\`),
|
|
71
|
+
this will be \`false\` to align with how client SDKs treat unresolved feature states.`,
|
|
72
|
+
type: 'boolean',
|
|
73
|
+
example: true,
|
|
74
|
+
},
|
|
16
75
|
variant: {
|
|
76
|
+
description: `The feature variant you receive based on the provided context or the _disabled
|
|
77
|
+
variant_. If a feature is disabled or doesn't have any
|
|
78
|
+
variants, you would get the _disabled variant_.
|
|
79
|
+
Otherwise, you'll get one of thefeature's defined variants.`,
|
|
17
80
|
type: 'object',
|
|
18
81
|
additionalProperties: false,
|
|
19
82
|
required: ['name', 'enabled'],
|
|
20
83
|
properties: {
|
|
21
|
-
name: {
|
|
22
|
-
|
|
84
|
+
name: {
|
|
85
|
+
type: 'string',
|
|
86
|
+
description: "The variant's name. If there is no variant or if the toggle is disabled, this will be `disabled`",
|
|
87
|
+
example: 'red-variant',
|
|
88
|
+
},
|
|
89
|
+
enabled: {
|
|
90
|
+
type: 'boolean',
|
|
91
|
+
description: "Whether the variant is enabled or not. If the feature is disabled or if it doesn't have variants, this property will be `false`",
|
|
92
|
+
},
|
|
23
93
|
payload: {
|
|
24
94
|
type: 'object',
|
|
25
95
|
additionalProperties: false,
|
|
26
96
|
required: ['type', 'value'],
|
|
97
|
+
description: 'An optional payload attached to the variant.',
|
|
27
98
|
properties: {
|
|
28
99
|
type: {
|
|
100
|
+
description: 'The format of the payload.',
|
|
29
101
|
type: 'string',
|
|
30
102
|
enum: ['json', 'csv', 'string'],
|
|
31
103
|
},
|
|
32
|
-
value: {
|
|
104
|
+
value: {
|
|
105
|
+
type: 'string',
|
|
106
|
+
description: 'The payload value stringified.',
|
|
107
|
+
example: '{"property": "value"}',
|
|
108
|
+
},
|
|
33
109
|
},
|
|
34
110
|
},
|
|
35
111
|
},
|
|
@@ -38,6 +114,16 @@ exports.playgroundFeatureSchema = {
|
|
|
38
114
|
},
|
|
39
115
|
variants: { type: 'array', items: { $ref: variant_schema_1.variantSchema.$id } },
|
|
40
116
|
},
|
|
41
|
-
components: {
|
|
117
|
+
components: {
|
|
118
|
+
schemas: {
|
|
119
|
+
playgroundStrategySchema: playground_strategy_schema_1.playgroundStrategySchema,
|
|
120
|
+
playgroundConstraintSchema: playground_constraint_schema_1.playgroundConstraintSchema,
|
|
121
|
+
playgroundSegmentSchema: playground_segment_schema_1.playgroundSegmentSchema,
|
|
122
|
+
parametersSchema: parameters_schema_1.parametersSchema,
|
|
123
|
+
variantSchema: variant_schema_1.variantSchema,
|
|
124
|
+
overrideSchema: override_schema_1.overrideSchema,
|
|
125
|
+
},
|
|
126
|
+
variants: { type: 'array', items: { $ref: variant_schema_1.variantSchema.$id } },
|
|
127
|
+
},
|
|
42
128
|
};
|
|
43
129
|
//# sourceMappingURL=playground-feature-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playground-feature-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/playground-feature-schema.ts"],"names":[],"mappings":";;;AACA,qDAAiD;AACjD,uDAAmD;
|
|
1
|
+
{"version":3,"file":"playground-feature-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/playground-feature-schema.ts"],"names":[],"mappings":"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"}
|