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.
Files changed (256) hide show
  1. package/dist/lib/db/event-store.d.ts +2 -3
  2. package/dist/lib/db/event-store.js +26 -36
  3. package/dist/lib/db/event-store.js.map +1 -1
  4. package/dist/lib/db/event-store.test.js +1 -1
  5. package/dist/lib/db/event-store.test.js.map +1 -1
  6. package/dist/lib/db/feature-strategy-store.js +3 -3
  7. package/dist/lib/db/feature-strategy-store.js.map +1 -1
  8. package/dist/lib/db/feature-toggle-client-store.d.ts +1 -1
  9. package/dist/lib/db/feature-toggle-client-store.js +6 -6
  10. package/dist/lib/db/feature-toggle-client-store.js.map +1 -1
  11. package/dist/lib/db/group-store.d.ts +0 -1
  12. package/dist/lib/db/group-store.js +1 -14
  13. package/dist/lib/db/group-store.js.map +1 -1
  14. package/dist/lib/db/user-store.js +8 -1
  15. package/dist/lib/db/user-store.js.map +1 -1
  16. package/dist/lib/openapi/index.d.ts +2388 -952
  17. package/dist/lib/openapi/index.js +8 -4
  18. package/dist/lib/openapi/index.js.map +1 -1
  19. package/dist/lib/openapi/spec/client-feature-schema.d.ts +72 -7
  20. package/dist/lib/openapi/spec/client-feature-schema.js +5 -3
  21. package/dist/lib/openapi/spec/client-feature-schema.js.map +1 -1
  22. package/dist/lib/openapi/spec/client-features-schema.d.ts +138 -16
  23. package/dist/lib/openapi/spec/client-features-schema.js +2 -2
  24. package/dist/lib/openapi/spec/client-features-schema.js.map +1 -1
  25. package/dist/lib/openapi/spec/client-features-schema.test.js +10 -0
  26. package/dist/lib/openapi/spec/client-features-schema.test.js.map +1 -1
  27. package/dist/lib/openapi/spec/constraint-schema.d.ts +51 -2
  28. package/dist/lib/openapi/spec/constraint-schema.js +17 -4
  29. package/dist/lib/openapi/spec/constraint-schema.js.map +1 -1
  30. package/dist/lib/openapi/spec/context-field-schema.test.js +5 -1
  31. package/dist/lib/openapi/spec/context-field-schema.test.js.map +1 -1
  32. package/dist/lib/openapi/spec/create-feature-strategy-schema.d.ts +12 -2
  33. package/dist/lib/openapi/spec/feature-environment-schema.d.ts +12 -2
  34. package/dist/lib/openapi/spec/feature-events-schema.d.ts +1 -1
  35. package/dist/lib/openapi/spec/feature-events-schema.js +1 -1
  36. package/dist/lib/openapi/spec/feature-events-schema.js.map +1 -1
  37. package/dist/lib/openapi/spec/feature-schema.d.ts +25 -5
  38. package/dist/lib/openapi/spec/feature-schema.test.js +13 -1
  39. package/dist/lib/openapi/spec/feature-schema.test.js.map +1 -1
  40. package/dist/lib/openapi/spec/feature-strategy-schema.d.ts +12 -2
  41. package/dist/lib/openapi/spec/feature-variants-schema.d.ts +1 -1
  42. package/dist/lib/openapi/spec/features-schema.d.ts +50 -10
  43. package/dist/lib/openapi/spec/group-schema.d.ts +1 -4
  44. package/dist/lib/openapi/spec/group-user-model-schema.d.ts +1 -4
  45. package/dist/lib/openapi/spec/group-user-model-schema.js +1 -4
  46. package/dist/lib/openapi/spec/group-user-model-schema.js.map +1 -1
  47. package/dist/lib/openapi/spec/groups-schema.d.ts +2 -8
  48. package/dist/lib/openapi/spec/groups-schema.test.js +0 -1
  49. package/dist/lib/openapi/spec/groups-schema.test.js.map +1 -1
  50. package/dist/lib/openapi/spec/health-overview-schema.d.ts +50 -10
  51. package/dist/lib/openapi/spec/health-report-schema.d.ts +50 -10
  52. package/dist/lib/openapi/spec/playground-constraint-schema.d.ts +47 -0
  53. package/dist/lib/openapi/spec/playground-constraint-schema.js +18 -0
  54. package/dist/lib/openapi/spec/playground-constraint-schema.js.map +1 -0
  55. package/dist/lib/openapi/spec/playground-feature-schema.d.ts +388 -2
  56. package/dist/lib/openapi/spec/playground-feature-schema.js +95 -9
  57. package/dist/lib/openapi/spec/playground-feature-schema.js.map +1 -1
  58. package/dist/lib/openapi/spec/playground-feature-schema.test.js +64 -3
  59. package/dist/lib/openapi/spec/playground-feature-schema.test.js.map +1 -1
  60. package/dist/lib/openapi/spec/playground-request-schema.d.ts +2 -0
  61. package/dist/lib/openapi/spec/playground-request-schema.js +6 -1
  62. package/dist/lib/openapi/spec/playground-request-schema.js.map +1 -1
  63. package/dist/lib/openapi/spec/playground-response-schema.d.ts +774 -3
  64. package/dist/lib/openapi/spec/playground-response-schema.js +15 -1
  65. package/dist/lib/openapi/spec/playground-response-schema.js.map +1 -1
  66. package/dist/lib/openapi/spec/playground-segment-schema.d.ts +79 -0
  67. package/dist/lib/openapi/spec/playground-segment-schema.js +36 -0
  68. package/dist/lib/openapi/spec/playground-segment-schema.js.map +1 -0
  69. package/dist/lib/openapi/spec/playground-strategy-schema.d.ts +257 -0
  70. package/dist/lib/openapi/spec/playground-strategy-schema.js +102 -0
  71. package/dist/lib/openapi/spec/playground-strategy-schema.js.map +1 -0
  72. package/dist/lib/openapi/spec/{bootstrap-ui-schema.test.d.ts → project-schema.test.d.ts} +0 -0
  73. package/dist/lib/openapi/spec/project-schema.test.js +17 -0
  74. package/dist/lib/openapi/spec/project-schema.test.js.map +1 -0
  75. package/dist/lib/openapi/spec/search-events-schema.d.ts +37 -0
  76. package/dist/lib/openapi/spec/search-events-schema.js +47 -0
  77. package/dist/lib/openapi/spec/search-events-schema.js.map +1 -0
  78. package/dist/lib/openapi/spec/segment-schema.d.ts +12 -2
  79. package/dist/lib/openapi/spec/state-schema.d.ts +61 -11
  80. package/dist/lib/{routes/admin-api/bootstrap-ui.test.d.ts → openapi/spec/tag-types-schema.test.d.ts} +0 -0
  81. package/dist/lib/openapi/spec/tag-types-schema.test.js +23 -0
  82. package/dist/lib/openapi/spec/tag-types-schema.test.js.map +1 -0
  83. package/dist/lib/openapi/spec/ui-config-schema.d.ts +3 -0
  84. package/dist/lib/openapi/spec/ui-config-schema.js +3 -0
  85. package/dist/lib/openapi/spec/ui-config-schema.js.map +1 -1
  86. package/dist/lib/openapi/spec/update-feature-schema.d.ts +12 -2
  87. package/dist/lib/openapi/spec/update-feature-strategy-schema.d.ts +12 -2
  88. package/dist/{test/e2e/api/admin/bootstrap.test.d.ts → lib/openapi/spec/user-schema.test.d.ts} +0 -0
  89. package/dist/lib/openapi/spec/user-schema.test.js +17 -0
  90. package/dist/lib/openapi/spec/user-schema.test.js.map +1 -0
  91. package/dist/lib/openapi/spec/users-groups-base-schema.d.ts +2 -8
  92. package/dist/lib/openapi/spec/variant-schema.d.ts +1 -1
  93. package/dist/lib/openapi/spec/variant-schema.js +1 -1
  94. package/dist/lib/openapi/spec/variant-schema.js.map +1 -1
  95. package/dist/lib/openapi/spec/variants-schema.d.ts +1 -1
  96. package/dist/lib/openapi/util/standard-responses.d.ts +6 -0
  97. package/dist/lib/openapi/util/standard-responses.js +10 -2
  98. package/dist/lib/openapi/util/standard-responses.js.map +1 -1
  99. package/dist/lib/routes/admin-api/config.d.ts +2 -1
  100. package/dist/lib/routes/admin-api/config.js +3 -1
  101. package/dist/lib/routes/admin-api/config.js.map +1 -1
  102. package/dist/lib/routes/admin-api/event.d.ts +3 -1
  103. package/dist/lib/routes/admin-api/event.js +30 -7
  104. package/dist/lib/routes/admin-api/event.js.map +1 -1
  105. package/dist/lib/routes/admin-api/index.js +0 -2
  106. package/dist/lib/routes/admin-api/index.js.map +1 -1
  107. package/dist/lib/routes/admin-api/playground.js.map +1 -1
  108. package/dist/lib/services/event-service.d.ts +2 -2
  109. package/dist/lib/services/event-service.js +2 -5
  110. package/dist/lib/services/event-service.js.map +1 -1
  111. package/dist/lib/services/feature-toggle-service.d.ts +1 -1
  112. package/dist/lib/services/feature-toggle-service.js +2 -2
  113. package/dist/lib/services/feature-toggle-service.js.map +1 -1
  114. package/dist/lib/services/group-service.d.ts +1 -1
  115. package/dist/lib/services/group-service.js +1 -5
  116. package/dist/lib/services/group-service.js.map +1 -1
  117. package/dist/lib/services/index.js +1 -0
  118. package/dist/lib/services/index.js.map +1 -1
  119. package/dist/lib/services/openapi-service.js +1 -1
  120. package/dist/lib/services/openapi-service.js.map +1 -1
  121. package/dist/lib/services/playground-service.d.ts +2 -1
  122. package/dist/lib/services/playground-service.js +30 -11
  123. package/dist/lib/services/playground-service.js.map +1 -1
  124. package/dist/lib/types/group.d.ts +1 -2
  125. package/dist/lib/types/group.js.map +1 -1
  126. package/dist/lib/types/stores/event-store.d.ts +2 -3
  127. package/dist/lib/types/stores/feature-toggle-client-store.d.ts +1 -1
  128. package/dist/lib/types/stores/group-store.d.ts +0 -1
  129. package/dist/lib/util/feature-evaluator/client.d.ts +25 -0
  130. package/dist/lib/util/feature-evaluator/client.js +135 -0
  131. package/dist/lib/util/feature-evaluator/client.js.map +1 -0
  132. package/dist/lib/util/feature-evaluator/constraint.d.ts +28 -0
  133. package/dist/lib/util/feature-evaluator/constraint.js +129 -0
  134. package/dist/lib/util/feature-evaluator/constraint.js.map +1 -0
  135. package/dist/lib/util/feature-evaluator/context.d.ts +13 -0
  136. package/dist/lib/util/feature-evaluator/context.js +3 -0
  137. package/dist/lib/util/feature-evaluator/context.js.map +1 -0
  138. package/dist/lib/util/feature-evaluator/feature-evaluator.d.ts +36 -0
  139. package/dist/lib/util/feature-evaluator/feature-evaluator.js +55 -0
  140. package/dist/lib/util/feature-evaluator/feature-evaluator.js.map +1 -0
  141. package/dist/lib/util/feature-evaluator/feature.d.ts +19 -0
  142. package/dist/lib/util/feature-evaluator/feature.js +3 -0
  143. package/dist/lib/util/feature-evaluator/feature.js.map +1 -0
  144. package/dist/lib/util/feature-evaluator/helpers.d.ts +6 -0
  145. package/dist/lib/util/feature-evaluator/helpers.js +32 -0
  146. package/dist/lib/util/feature-evaluator/helpers.js.map +1 -0
  147. package/dist/lib/util/feature-evaluator/index.d.ts +8 -0
  148. package/dist/lib/util/feature-evaluator/index.js +14 -0
  149. package/dist/lib/util/feature-evaluator/index.js.map +1 -0
  150. package/dist/lib/util/feature-evaluator/repository/bootstrap-provider.d.ts +16 -0
  151. package/dist/lib/util/feature-evaluator/repository/bootstrap-provider.js +25 -0
  152. package/dist/lib/util/feature-evaluator/repository/bootstrap-provider.js.map +1 -0
  153. package/dist/lib/util/feature-evaluator/repository/index.d.ts +35 -0
  154. package/dist/lib/util/feature-evaluator/repository/index.js +63 -0
  155. package/dist/lib/util/feature-evaluator/repository/index.js.map +1 -0
  156. package/dist/lib/util/feature-evaluator/repository/storage-provider-in-mem.d.ts +6 -0
  157. package/dist/lib/util/feature-evaluator/repository/storage-provider-in-mem.js +16 -0
  158. package/dist/lib/util/feature-evaluator/repository/storage-provider-in-mem.js.map +1 -0
  159. package/dist/lib/util/feature-evaluator/repository/storage-provider.d.ts +14 -0
  160. package/dist/lib/util/feature-evaluator/repository/storage-provider.js +50 -0
  161. package/dist/lib/util/feature-evaluator/repository/storage-provider.js.map +1 -0
  162. package/dist/lib/util/feature-evaluator/strategy/application-hostname-strategy.d.ts +8 -0
  163. package/dist/lib/util/feature-evaluator/strategy/application-hostname-strategy.js +23 -0
  164. package/dist/lib/util/feature-evaluator/strategy/application-hostname-strategy.js.map +1 -0
  165. package/dist/lib/util/feature-evaluator/strategy/default-strategy.d.ts +5 -0
  166. package/dist/lib/util/feature-evaluator/strategy/default-strategy.js +13 -0
  167. package/dist/lib/util/feature-evaluator/strategy/default-strategy.js.map +1 -0
  168. package/dist/lib/util/feature-evaluator/strategy/flexible-rollout-strategy.d.ts +12 -0
  169. package/dist/lib/util/feature-evaluator/strategy/flexible-rollout-strategy.js +49 -0
  170. package/dist/lib/util/feature-evaluator/strategy/flexible-rollout-strategy.js.map +1 -0
  171. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-random.d.ts +9 -0
  172. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-random.js +19 -0
  173. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-random.js.map +1 -0
  174. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-session-id.d.ts +9 -0
  175. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-session-id.js +24 -0
  176. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-session-id.js.map +1 -0
  177. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-user-id.d.ts +9 -0
  178. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-user-id.js +24 -0
  179. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-user-id.js.map +1 -0
  180. package/dist/lib/util/feature-evaluator/strategy/index.d.ts +4 -0
  181. package/dist/lib/util/feature-evaluator/strategy/index.js +29 -0
  182. package/dist/lib/util/feature-evaluator/strategy/index.js.map +1 -0
  183. package/dist/lib/util/feature-evaluator/strategy/remote-address-strategy.d.ts +8 -0
  184. package/dist/lib/util/feature-evaluator/strategy/remote-address-strategy.js +35 -0
  185. package/dist/lib/util/feature-evaluator/strategy/remote-address-strategy.js.map +1 -0
  186. package/dist/lib/util/feature-evaluator/strategy/strategy.d.ts +41 -0
  187. package/dist/lib/util/feature-evaluator/strategy/strategy.js +75 -0
  188. package/dist/lib/util/feature-evaluator/strategy/strategy.js.map +1 -0
  189. package/dist/lib/util/feature-evaluator/strategy/unknown-strategy.d.ts +9 -0
  190. package/dist/lib/util/feature-evaluator/strategy/unknown-strategy.js +29 -0
  191. package/dist/lib/util/feature-evaluator/strategy/unknown-strategy.js.map +1 -0
  192. package/dist/lib/util/feature-evaluator/strategy/user-with-id-strategy.d.ts +8 -0
  193. package/dist/lib/util/feature-evaluator/strategy/user-with-id-strategy.js +16 -0
  194. package/dist/lib/util/feature-evaluator/strategy/user-with-id-strategy.js.map +1 -0
  195. package/dist/lib/util/feature-evaluator/strategy/util.d.ts +1 -0
  196. package/dist/lib/util/feature-evaluator/strategy/util.js +31 -0
  197. package/dist/lib/util/feature-evaluator/strategy/util.js.map +1 -0
  198. package/dist/lib/util/feature-evaluator/variant.d.ts +28 -0
  199. package/dist/lib/util/feature-evaluator/variant.js +73 -0
  200. package/dist/lib/util/feature-evaluator/variant.js.map +1 -0
  201. package/dist/lib/util/offline-unleash-client.d.ts +13 -2
  202. package/dist/lib/util/offline-unleash-client.js +12 -13
  203. package/dist/lib/util/offline-unleash-client.js.map +1 -1
  204. package/dist/lib/util/offline-unleash-client.test.d.ts +3 -1
  205. package/dist/lib/util/offline-unleash-client.test.js +349 -139
  206. package/dist/lib/util/offline-unleash-client.test.js.map +1 -1
  207. package/dist/migrations/20220808084524-add-group-permissions.d.ts +2 -0
  208. package/dist/migrations/20220808084524-add-group-permissions.js +12 -0
  209. package/dist/migrations/20220808084524-add-group-permissions.js.map +1 -0
  210. package/dist/migrations/20220808110415-add-projects-foreign-key.d.ts +2 -0
  211. package/dist/migrations/20220808110415-add-projects-foreign-key.js +14 -0
  212. package/dist/migrations/20220808110415-add-projects-foreign-key.js.map +1 -0
  213. package/dist/test/arbitraries.test.d.ts +12 -2
  214. package/dist/test/arbitraries.test.js +67 -9
  215. package/dist/test/arbitraries.test.js.map +1 -1
  216. package/dist/test/e2e/api/admin/config.e2e.test.js +2 -1
  217. package/dist/test/e2e/api/admin/config.e2e.test.js.map +1 -1
  218. package/dist/test/e2e/api/admin/event.e2e.test.js +57 -0
  219. package/dist/test/e2e/api/admin/event.e2e.test.js.map +1 -1
  220. package/dist/test/e2e/api/admin/feature.e2e.test.js +8 -7
  221. package/dist/test/e2e/api/admin/feature.e2e.test.js.map +1 -1
  222. package/dist/test/e2e/api/admin/playground.e2e.test.js +22 -0
  223. package/dist/test/e2e/api/admin/playground.e2e.test.js.map +1 -1
  224. package/dist/test/e2e/services/access-service.e2e.test.js +38 -20
  225. package/dist/test/e2e/services/access-service.e2e.test.js.map +1 -1
  226. package/dist/test/e2e/services/playground-service.test.d.ts +5 -1
  227. package/dist/test/e2e/services/playground-service.test.js +725 -37
  228. package/dist/test/e2e/services/playground-service.test.js.map +1 -1
  229. package/dist/test/e2e/services/project-service.e2e.test.js +12 -4
  230. package/dist/test/e2e/services/project-service.e2e.test.js.map +1 -1
  231. package/dist/test/e2e/services/setting-service.test.js +9 -3
  232. package/dist/test/e2e/services/setting-service.test.js.map +1 -1
  233. package/dist/test/e2e/stores/event-store.e2e.test.js +6 -2
  234. package/dist/test/e2e/stores/event-store.e2e.test.js.map +1 -1
  235. package/dist/test/fixtures/fake-event-store.d.ts +1 -3
  236. package/dist/test/fixtures/fake-event-store.js +2 -8
  237. package/dist/test/fixtures/fake-event-store.js.map +1 -1
  238. package/dist/test/fixtures/fake-group-store.d.ts +0 -1
  239. package/dist/test/fixtures/fake-group-store.js +0 -3
  240. package/dist/test/fixtures/fake-group-store.js.map +1 -1
  241. package/package.json +15 -13
  242. package/dist/lib/openapi/spec/bootstrap-ui-schema.d.ts +0 -491
  243. package/dist/lib/openapi/spec/bootstrap-ui-schema.js +0 -94
  244. package/dist/lib/openapi/spec/bootstrap-ui-schema.js.map +0 -1
  245. package/dist/lib/openapi/spec/bootstrap-ui-schema.test.js +0 -145
  246. package/dist/lib/openapi/spec/bootstrap-ui-schema.test.js.map +0 -1
  247. package/dist/lib/openapi/spec/client-variant-schema.d.ts +0 -35
  248. package/dist/lib/openapi/spec/client-variant-schema.js +0 -37
  249. package/dist/lib/openapi/spec/client-variant-schema.js.map +0 -1
  250. package/dist/lib/routes/admin-api/bootstrap-ui.d.ts +0 -25
  251. package/dist/lib/routes/admin-api/bootstrap-ui.js +0 -82
  252. package/dist/lib/routes/admin-api/bootstrap-ui.js.map +0 -1
  253. package/dist/lib/routes/admin-api/bootstrap-ui.test.js +0 -60
  254. package/dist/lib/routes/admin-api/bootstrap-ui.test.js.map +0 -1
  255. package/dist/test/e2e/api/admin/bootstrap.test.js +0 -43
  256. package/dist/test/e2e/api/admin/bootstrap.test.js.map +0 -1
@@ -7,10 +7,12 @@ export declare const playgroundResponseSchema: {
7
7
  readonly required: readonly ["features", "input"];
8
8
  readonly properties: {
9
9
  readonly input: {
10
+ readonly description: "The given input used to evaluate the features.";
10
11
  readonly $ref: "#/components/schemas/playgroundRequestSchema";
11
12
  };
12
13
  readonly features: {
13
14
  readonly type: "array";
15
+ readonly description: "The list of features that have been evaluated.";
14
16
  readonly items: {
15
17
  readonly $ref: "#/components/schemas/playgroundFeatureSchema";
16
18
  };
@@ -18,47 +20,179 @@ export declare const playgroundResponseSchema: {
18
20
  };
19
21
  readonly components: {
20
22
  readonly schemas: {
23
+ readonly constraintSchema: {
24
+ readonly type: "object";
25
+ readonly required: readonly ["contextName", "operator"];
26
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
27
+ readonly properties: {
28
+ readonly contextName: {
29
+ readonly description: "The name of the context field that this constraint should apply to.";
30
+ readonly example: "appName";
31
+ readonly type: "string";
32
+ };
33
+ readonly operator: {
34
+ 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).";
35
+ readonly type: "string";
36
+ 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"];
37
+ };
38
+ readonly caseInsensitive: {
39
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
40
+ readonly type: "boolean";
41
+ readonly default: false;
42
+ };
43
+ readonly inverted: {
44
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
45
+ readonly type: "boolean";
46
+ readonly default: false;
47
+ };
48
+ readonly values: {
49
+ readonly type: "array";
50
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
51
+ readonly items: {
52
+ readonly type: "string";
53
+ };
54
+ };
55
+ readonly value: {
56
+ 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.";
57
+ readonly type: "string";
58
+ };
59
+ };
60
+ readonly components: {};
61
+ readonly $id: "#/components/schemas/constraintSchema";
62
+ readonly additionalProperties: false;
63
+ };
64
+ readonly parametersSchema: {
65
+ readonly $id: "#/components/schemas/parametersSchema";
66
+ readonly type: "object";
67
+ readonly additionalProperties: {
68
+ readonly type: "string";
69
+ };
70
+ readonly components: {};
71
+ };
72
+ readonly playgroundConstraintSchema: {
73
+ readonly required: readonly ["contextName", "operator", "result"];
74
+ readonly properties: {
75
+ readonly result: {
76
+ readonly description: "Whether this was evaluated as true or false.";
77
+ readonly type: "boolean";
78
+ };
79
+ readonly contextName: {
80
+ readonly description: "The name of the context field that this constraint should apply to.";
81
+ readonly example: "appName";
82
+ readonly type: "string";
83
+ };
84
+ readonly operator: {
85
+ 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).";
86
+ readonly type: "string";
87
+ 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"];
88
+ };
89
+ readonly caseInsensitive: {
90
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
91
+ readonly type: "boolean";
92
+ readonly default: false;
93
+ };
94
+ readonly inverted: {
95
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
96
+ readonly type: "boolean";
97
+ readonly default: false;
98
+ };
99
+ readonly values: {
100
+ readonly type: "array";
101
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
102
+ readonly items: {
103
+ readonly type: "string";
104
+ };
105
+ };
106
+ readonly value: {
107
+ 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.";
108
+ readonly type: "string";
109
+ };
110
+ };
111
+ readonly type: "object";
112
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
113
+ readonly components: {};
114
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
115
+ readonly additionalProperties: false;
116
+ };
21
117
  readonly playgroundFeatureSchema: {
22
118
  readonly $id: "#/components/schemas/playgroundFeatureSchema";
23
119
  readonly description: "A simplified feature toggle model intended for the Unleash playground.";
24
120
  readonly type: "object";
25
121
  readonly additionalProperties: false;
26
- readonly required: readonly ["name", "projectId", "isEnabled", "variant", "variants"];
122
+ readonly required: readonly ["name", "projectId", "isEnabled", "isEnabledInCurrentEnvironment", "variant", "variants", "strategies"];
27
123
  readonly properties: {
28
124
  readonly name: {
29
125
  readonly type: "string";
30
126
  readonly example: "my-feature";
127
+ readonly description: "The feature's name.";
31
128
  };
32
129
  readonly projectId: {
33
130
  readonly type: "string";
34
131
  readonly example: "my-project";
132
+ readonly description: "The ID of the project that contains this feature.";
133
+ };
134
+ readonly strategies: {
135
+ readonly type: "object";
136
+ readonly additionalProperties: false;
137
+ readonly required: readonly ["result", "data"];
138
+ readonly properties: {
139
+ readonly result: {
140
+ 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`.";
141
+ readonly anyOf: readonly [{
142
+ readonly type: "boolean";
143
+ }, {
144
+ readonly type: "string";
145
+ readonly enum: readonly ["unknown"];
146
+ }];
147
+ };
148
+ readonly data: {
149
+ readonly description: "The strategies that apply to this feature.";
150
+ readonly type: "array";
151
+ readonly items: {
152
+ readonly $ref: "#/components/schemas/playgroundStrategySchema";
153
+ };
154
+ };
155
+ };
156
+ };
157
+ readonly isEnabledInCurrentEnvironment: {
158
+ readonly type: "boolean";
159
+ readonly description: "Whether the feature is active and would be evaluated in the provided environment in a normal SDK context.";
35
160
  };
36
161
  readonly isEnabled: {
162
+ 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.";
37
163
  readonly type: "boolean";
38
164
  readonly example: true;
39
165
  };
40
166
  readonly variant: {
167
+ 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.";
41
168
  readonly type: "object";
42
169
  readonly additionalProperties: false;
43
170
  readonly required: readonly ["name", "enabled"];
44
171
  readonly properties: {
45
172
  readonly name: {
46
173
  readonly type: "string";
174
+ readonly description: "The variant's name. If there is no variant or if the toggle is disabled, this will be `disabled`";
175
+ readonly example: "red-variant";
47
176
  };
48
177
  readonly enabled: {
49
178
  readonly type: "boolean";
179
+ 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`";
50
180
  };
51
181
  readonly payload: {
52
182
  readonly type: "object";
53
183
  readonly additionalProperties: false;
54
184
  readonly required: readonly ["type", "value"];
185
+ readonly description: "An optional payload attached to the variant.";
55
186
  readonly properties: {
56
187
  readonly type: {
188
+ readonly description: "The format of the payload.";
57
189
  readonly type: "string";
58
190
  readonly enum: readonly ["json", "csv", "string"];
59
191
  };
60
192
  readonly value: {
61
193
  readonly type: "string";
194
+ readonly description: "The payload value stringified.";
195
+ readonly example: "{\"property\": \"value\"}";
62
196
  };
63
197
  };
64
198
  };
@@ -78,11 +212,352 @@ export declare const playgroundResponseSchema: {
78
212
  };
79
213
  readonly components: {
80
214
  readonly schemas: {
215
+ readonly playgroundStrategySchema: {
216
+ readonly $id: "#/components/schemas/playgroundStrategySchema";
217
+ readonly type: "object";
218
+ readonly additionalProperties: false;
219
+ readonly required: readonly ["id", "name", "result", "segments", "constraints", "parameters"];
220
+ readonly properties: {
221
+ readonly name: {
222
+ readonly description: "The strategy's name.";
223
+ readonly type: "string";
224
+ };
225
+ readonly id: {
226
+ readonly description: "The strategy's id.";
227
+ readonly type: "string";
228
+ };
229
+ readonly result: {
230
+ readonly anyOf: readonly [{
231
+ readonly type: "object";
232
+ readonly additionalProperties: false;
233
+ readonly required: readonly ["evaluationStatus", "enabled"];
234
+ readonly properties: {
235
+ readonly evaluationStatus: {
236
+ readonly type: "string";
237
+ 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.";
238
+ readonly enum: readonly ["incomplete"];
239
+ };
240
+ readonly enabled: {
241
+ 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`.";
242
+ readonly anyOf: readonly [{
243
+ readonly type: "boolean";
244
+ readonly enum: readonly [false];
245
+ }, {
246
+ readonly type: "string";
247
+ readonly enum: readonly ["unknown"];
248
+ }];
249
+ };
250
+ };
251
+ }, {
252
+ readonly type: "object";
253
+ readonly additionalProperties: false;
254
+ readonly required: readonly ["evaluationStatus", "enabled"];
255
+ readonly properties: {
256
+ readonly evaluationStatus: {
257
+ readonly description: "Signals that this strategy was evaluated successfully.";
258
+ readonly type: "string";
259
+ readonly enum: readonly ["complete"];
260
+ };
261
+ readonly enabled: {
262
+ readonly type: "boolean";
263
+ readonly description: "Whether this strategy evaluates to true or not.";
264
+ };
265
+ };
266
+ }];
267
+ 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`";
268
+ };
269
+ readonly segments: {
270
+ readonly type: "array";
271
+ readonly description: "The strategy's segments and their evaluation results.";
272
+ readonly items: {
273
+ readonly $ref: "#/components/schemas/playgroundSegmentSchema";
274
+ };
275
+ };
276
+ readonly constraints: {
277
+ readonly type: "array";
278
+ readonly description: "The strategy's constraints and their evaluation results.";
279
+ readonly items: {
280
+ readonly $ref: "#/components/schemas/playgroundConstraintSchema";
281
+ };
282
+ };
283
+ readonly parameters: {
284
+ readonly description: "The strategy's constraints and their evaluation results.";
285
+ readonly example: {
286
+ readonly myParam1: "param value";
287
+ };
288
+ readonly $ref: "#/components/schemas/parametersSchema";
289
+ };
290
+ };
291
+ readonly components: {
292
+ readonly schemas: {
293
+ readonly playgroundConstraintSchema: {
294
+ readonly required: readonly ["contextName", "operator", "result"];
295
+ readonly properties: {
296
+ readonly result: {
297
+ readonly description: "Whether this was evaluated as true or false.";
298
+ readonly type: "boolean";
299
+ };
300
+ readonly contextName: {
301
+ readonly description: "The name of the context field that this constraint should apply to.";
302
+ readonly example: "appName";
303
+ readonly type: "string";
304
+ };
305
+ readonly operator: {
306
+ 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).";
307
+ readonly type: "string";
308
+ 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"];
309
+ };
310
+ readonly caseInsensitive: {
311
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
312
+ readonly type: "boolean";
313
+ readonly default: false;
314
+ };
315
+ readonly inverted: {
316
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
317
+ readonly type: "boolean";
318
+ readonly default: false;
319
+ };
320
+ readonly values: {
321
+ readonly type: "array";
322
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
323
+ readonly items: {
324
+ readonly type: "string";
325
+ };
326
+ };
327
+ readonly value: {
328
+ 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.";
329
+ readonly type: "string";
330
+ };
331
+ };
332
+ readonly type: "object";
333
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
334
+ readonly components: {};
335
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
336
+ readonly additionalProperties: false;
337
+ };
338
+ readonly playgroundSegmentSchema: {
339
+ readonly $id: "#/components/schemas/playgroundSegmentSchema";
340
+ readonly type: "object";
341
+ readonly additionalProperties: false;
342
+ readonly required: readonly ["name", "id", "constraints", "result"];
343
+ readonly properties: {
344
+ readonly id: {
345
+ readonly description: "The segment's id.";
346
+ readonly type: "integer";
347
+ };
348
+ readonly name: {
349
+ readonly description: "The name of the segment.";
350
+ readonly example: "segment A";
351
+ readonly type: "string";
352
+ };
353
+ readonly result: {
354
+ readonly description: "Whether this was evaluated as true or false.";
355
+ readonly type: "boolean";
356
+ };
357
+ readonly constraints: {
358
+ readonly type: "array";
359
+ readonly description: "The list of constraints in this segment.";
360
+ readonly items: {
361
+ readonly $ref: "#/components/schemas/playgroundConstraintSchema";
362
+ };
363
+ };
364
+ };
365
+ readonly components: {
366
+ readonly schemas: {
367
+ readonly playgroundConstraintSchema: {
368
+ readonly required: readonly ["contextName", "operator", "result"];
369
+ readonly properties: {
370
+ readonly result: {
371
+ readonly description: "Whether this was evaluated as true or false.";
372
+ readonly type: "boolean";
373
+ };
374
+ readonly contextName: {
375
+ readonly description: "The name of the context field that this constraint should apply to.";
376
+ readonly example: "appName";
377
+ readonly type: "string";
378
+ };
379
+ readonly operator: {
380
+ 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).";
381
+ readonly type: "string";
382
+ 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"];
383
+ };
384
+ readonly caseInsensitive: {
385
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
386
+ readonly type: "boolean";
387
+ readonly default: false;
388
+ };
389
+ readonly inverted: {
390
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
391
+ readonly type: "boolean";
392
+ readonly default: false;
393
+ };
394
+ readonly values: {
395
+ readonly type: "array";
396
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
397
+ readonly items: {
398
+ readonly type: "string";
399
+ };
400
+ };
401
+ readonly value: {
402
+ 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.";
403
+ readonly type: "string";
404
+ };
405
+ };
406
+ readonly type: "object";
407
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
408
+ readonly components: {};
409
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
410
+ readonly additionalProperties: false;
411
+ };
412
+ };
413
+ };
414
+ };
415
+ readonly parametersSchema: {
416
+ readonly $id: "#/components/schemas/parametersSchema";
417
+ readonly type: "object";
418
+ readonly additionalProperties: {
419
+ readonly type: "string";
420
+ };
421
+ readonly components: {};
422
+ };
423
+ };
424
+ };
425
+ };
426
+ readonly playgroundConstraintSchema: {
427
+ readonly required: readonly ["contextName", "operator", "result"];
428
+ readonly properties: {
429
+ readonly result: {
430
+ readonly description: "Whether this was evaluated as true or false.";
431
+ readonly type: "boolean";
432
+ };
433
+ readonly contextName: {
434
+ readonly description: "The name of the context field that this constraint should apply to.";
435
+ readonly example: "appName";
436
+ readonly type: "string";
437
+ };
438
+ readonly operator: {
439
+ 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).";
440
+ readonly type: "string";
441
+ 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"];
442
+ };
443
+ readonly caseInsensitive: {
444
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
445
+ readonly type: "boolean";
446
+ readonly default: false;
447
+ };
448
+ readonly inverted: {
449
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
450
+ readonly type: "boolean";
451
+ readonly default: false;
452
+ };
453
+ readonly values: {
454
+ readonly type: "array";
455
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
456
+ readonly items: {
457
+ readonly type: "string";
458
+ };
459
+ };
460
+ readonly value: {
461
+ 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.";
462
+ readonly type: "string";
463
+ };
464
+ };
465
+ readonly type: "object";
466
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
467
+ readonly components: {};
468
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
469
+ readonly additionalProperties: false;
470
+ };
471
+ readonly playgroundSegmentSchema: {
472
+ readonly $id: "#/components/schemas/playgroundSegmentSchema";
473
+ readonly type: "object";
474
+ readonly additionalProperties: false;
475
+ readonly required: readonly ["name", "id", "constraints", "result"];
476
+ readonly properties: {
477
+ readonly id: {
478
+ readonly description: "The segment's id.";
479
+ readonly type: "integer";
480
+ };
481
+ readonly name: {
482
+ readonly description: "The name of the segment.";
483
+ readonly example: "segment A";
484
+ readonly type: "string";
485
+ };
486
+ readonly result: {
487
+ readonly description: "Whether this was evaluated as true or false.";
488
+ readonly type: "boolean";
489
+ };
490
+ readonly constraints: {
491
+ readonly type: "array";
492
+ readonly description: "The list of constraints in this segment.";
493
+ readonly items: {
494
+ readonly $ref: "#/components/schemas/playgroundConstraintSchema";
495
+ };
496
+ };
497
+ };
498
+ readonly components: {
499
+ readonly schemas: {
500
+ readonly playgroundConstraintSchema: {
501
+ readonly required: readonly ["contextName", "operator", "result"];
502
+ readonly properties: {
503
+ readonly result: {
504
+ readonly description: "Whether this was evaluated as true or false.";
505
+ readonly type: "boolean";
506
+ };
507
+ readonly contextName: {
508
+ readonly description: "The name of the context field that this constraint should apply to.";
509
+ readonly example: "appName";
510
+ readonly type: "string";
511
+ };
512
+ readonly operator: {
513
+ 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).";
514
+ readonly type: "string";
515
+ 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"];
516
+ };
517
+ readonly caseInsensitive: {
518
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
519
+ readonly type: "boolean";
520
+ readonly default: false;
521
+ };
522
+ readonly inverted: {
523
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
524
+ readonly type: "boolean";
525
+ readonly default: false;
526
+ };
527
+ readonly values: {
528
+ readonly type: "array";
529
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
530
+ readonly items: {
531
+ readonly type: "string";
532
+ };
533
+ };
534
+ readonly value: {
535
+ 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.";
536
+ readonly type: "string";
537
+ };
538
+ };
539
+ readonly type: "object";
540
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
541
+ readonly components: {};
542
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
543
+ readonly additionalProperties: false;
544
+ };
545
+ };
546
+ };
547
+ };
548
+ readonly parametersSchema: {
549
+ readonly $id: "#/components/schemas/parametersSchema";
550
+ readonly type: "object";
551
+ readonly additionalProperties: {
552
+ readonly type: "string";
553
+ };
554
+ readonly components: {};
555
+ };
81
556
  readonly variantSchema: {
82
557
  readonly $id: "#/components/schemas/variantSchema";
83
558
  readonly type: "object";
84
559
  readonly additionalProperties: false;
85
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
560
+ readonly required: readonly ["name", "weight"];
86
561
  readonly properties: {
87
562
  readonly name: {
88
563
  readonly type: "string";
@@ -157,6 +632,12 @@ export declare const playgroundResponseSchema: {
157
632
  readonly components: {};
158
633
  };
159
634
  };
635
+ readonly variants: {
636
+ readonly type: "array";
637
+ readonly items: {
638
+ readonly $ref: "#/components/schemas/variantSchema";
639
+ };
640
+ };
160
641
  };
161
642
  };
162
643
  readonly playgroundRequestSchema: {
@@ -168,6 +649,7 @@ export declare const playgroundResponseSchema: {
168
649
  readonly environment: {
169
650
  readonly type: "string";
170
651
  readonly example: "development";
652
+ readonly description: "The environment to evaluate toggles in.";
171
653
  };
172
654
  readonly projects: {
173
655
  readonly oneOf: readonly [{
@@ -184,6 +666,7 @@ export declare const playgroundResponseSchema: {
184
666
  }];
185
667
  };
186
668
  readonly context: {
669
+ readonly description: "The context to use when evaluating toggles";
187
670
  readonly $ref: "#/components/schemas/sdkContextSchema";
188
671
  };
189
672
  };
@@ -241,6 +724,294 @@ export declare const playgroundResponseSchema: {
241
724
  };
242
725
  };
243
726
  };
727
+ readonly playgroundSegmentSchema: {
728
+ readonly $id: "#/components/schemas/playgroundSegmentSchema";
729
+ readonly type: "object";
730
+ readonly additionalProperties: false;
731
+ readonly required: readonly ["name", "id", "constraints", "result"];
732
+ readonly properties: {
733
+ readonly id: {
734
+ readonly description: "The segment's id.";
735
+ readonly type: "integer";
736
+ };
737
+ readonly name: {
738
+ readonly description: "The name of the segment.";
739
+ readonly example: "segment A";
740
+ readonly type: "string";
741
+ };
742
+ readonly result: {
743
+ readonly description: "Whether this was evaluated as true or false.";
744
+ readonly type: "boolean";
745
+ };
746
+ readonly constraints: {
747
+ readonly type: "array";
748
+ readonly description: "The list of constraints in this segment.";
749
+ readonly items: {
750
+ readonly $ref: "#/components/schemas/playgroundConstraintSchema";
751
+ };
752
+ };
753
+ };
754
+ readonly components: {
755
+ readonly schemas: {
756
+ readonly playgroundConstraintSchema: {
757
+ readonly required: readonly ["contextName", "operator", "result"];
758
+ readonly properties: {
759
+ readonly result: {
760
+ readonly description: "Whether this was evaluated as true or false.";
761
+ readonly type: "boolean";
762
+ };
763
+ readonly contextName: {
764
+ readonly description: "The name of the context field that this constraint should apply to.";
765
+ readonly example: "appName";
766
+ readonly type: "string";
767
+ };
768
+ readonly operator: {
769
+ 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).";
770
+ readonly type: "string";
771
+ 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"];
772
+ };
773
+ readonly caseInsensitive: {
774
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
775
+ readonly type: "boolean";
776
+ readonly default: false;
777
+ };
778
+ readonly inverted: {
779
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
780
+ readonly type: "boolean";
781
+ readonly default: false;
782
+ };
783
+ readonly values: {
784
+ readonly type: "array";
785
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
786
+ readonly items: {
787
+ readonly type: "string";
788
+ };
789
+ };
790
+ readonly value: {
791
+ 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.";
792
+ readonly type: "string";
793
+ };
794
+ };
795
+ readonly type: "object";
796
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
797
+ readonly components: {};
798
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
799
+ readonly additionalProperties: false;
800
+ };
801
+ };
802
+ };
803
+ };
804
+ readonly playgroundStrategySchema: {
805
+ readonly $id: "#/components/schemas/playgroundStrategySchema";
806
+ readonly type: "object";
807
+ readonly additionalProperties: false;
808
+ readonly required: readonly ["id", "name", "result", "segments", "constraints", "parameters"];
809
+ readonly properties: {
810
+ readonly name: {
811
+ readonly description: "The strategy's name.";
812
+ readonly type: "string";
813
+ };
814
+ readonly id: {
815
+ readonly description: "The strategy's id.";
816
+ readonly type: "string";
817
+ };
818
+ readonly result: {
819
+ readonly anyOf: readonly [{
820
+ readonly type: "object";
821
+ readonly additionalProperties: false;
822
+ readonly required: readonly ["evaluationStatus", "enabled"];
823
+ readonly properties: {
824
+ readonly evaluationStatus: {
825
+ readonly type: "string";
826
+ 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.";
827
+ readonly enum: readonly ["incomplete"];
828
+ };
829
+ readonly enabled: {
830
+ 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`.";
831
+ readonly anyOf: readonly [{
832
+ readonly type: "boolean";
833
+ readonly enum: readonly [false];
834
+ }, {
835
+ readonly type: "string";
836
+ readonly enum: readonly ["unknown"];
837
+ }];
838
+ };
839
+ };
840
+ }, {
841
+ readonly type: "object";
842
+ readonly additionalProperties: false;
843
+ readonly required: readonly ["evaluationStatus", "enabled"];
844
+ readonly properties: {
845
+ readonly evaluationStatus: {
846
+ readonly description: "Signals that this strategy was evaluated successfully.";
847
+ readonly type: "string";
848
+ readonly enum: readonly ["complete"];
849
+ };
850
+ readonly enabled: {
851
+ readonly type: "boolean";
852
+ readonly description: "Whether this strategy evaluates to true or not.";
853
+ };
854
+ };
855
+ }];
856
+ 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`";
857
+ };
858
+ readonly segments: {
859
+ readonly type: "array";
860
+ readonly description: "The strategy's segments and their evaluation results.";
861
+ readonly items: {
862
+ readonly $ref: "#/components/schemas/playgroundSegmentSchema";
863
+ };
864
+ };
865
+ readonly constraints: {
866
+ readonly type: "array";
867
+ readonly description: "The strategy's constraints and their evaluation results.";
868
+ readonly items: {
869
+ readonly $ref: "#/components/schemas/playgroundConstraintSchema";
870
+ };
871
+ };
872
+ readonly parameters: {
873
+ readonly description: "The strategy's constraints and their evaluation results.";
874
+ readonly example: {
875
+ readonly myParam1: "param value";
876
+ };
877
+ readonly $ref: "#/components/schemas/parametersSchema";
878
+ };
879
+ };
880
+ readonly components: {
881
+ readonly schemas: {
882
+ readonly playgroundConstraintSchema: {
883
+ readonly required: readonly ["contextName", "operator", "result"];
884
+ readonly properties: {
885
+ readonly result: {
886
+ readonly description: "Whether this was evaluated as true or false.";
887
+ readonly type: "boolean";
888
+ };
889
+ readonly contextName: {
890
+ readonly description: "The name of the context field that this constraint should apply to.";
891
+ readonly example: "appName";
892
+ readonly type: "string";
893
+ };
894
+ readonly operator: {
895
+ 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).";
896
+ readonly type: "string";
897
+ 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"];
898
+ };
899
+ readonly caseInsensitive: {
900
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
901
+ readonly type: "boolean";
902
+ readonly default: false;
903
+ };
904
+ readonly inverted: {
905
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
906
+ readonly type: "boolean";
907
+ readonly default: false;
908
+ };
909
+ readonly values: {
910
+ readonly type: "array";
911
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
912
+ readonly items: {
913
+ readonly type: "string";
914
+ };
915
+ };
916
+ readonly value: {
917
+ 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.";
918
+ readonly type: "string";
919
+ };
920
+ };
921
+ readonly type: "object";
922
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
923
+ readonly components: {};
924
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
925
+ readonly additionalProperties: false;
926
+ };
927
+ readonly playgroundSegmentSchema: {
928
+ readonly $id: "#/components/schemas/playgroundSegmentSchema";
929
+ readonly type: "object";
930
+ readonly additionalProperties: false;
931
+ readonly required: readonly ["name", "id", "constraints", "result"];
932
+ readonly properties: {
933
+ readonly id: {
934
+ readonly description: "The segment's id.";
935
+ readonly type: "integer";
936
+ };
937
+ readonly name: {
938
+ readonly description: "The name of the segment.";
939
+ readonly example: "segment A";
940
+ readonly type: "string";
941
+ };
942
+ readonly result: {
943
+ readonly description: "Whether this was evaluated as true or false.";
944
+ readonly type: "boolean";
945
+ };
946
+ readonly constraints: {
947
+ readonly type: "array";
948
+ readonly description: "The list of constraints in this segment.";
949
+ readonly items: {
950
+ readonly $ref: "#/components/schemas/playgroundConstraintSchema";
951
+ };
952
+ };
953
+ };
954
+ readonly components: {
955
+ readonly schemas: {
956
+ readonly playgroundConstraintSchema: {
957
+ readonly required: readonly ["contextName", "operator", "result"];
958
+ readonly properties: {
959
+ readonly result: {
960
+ readonly description: "Whether this was evaluated as true or false.";
961
+ readonly type: "boolean";
962
+ };
963
+ readonly contextName: {
964
+ readonly description: "The name of the context field that this constraint should apply to.";
965
+ readonly example: "appName";
966
+ readonly type: "string";
967
+ };
968
+ readonly operator: {
969
+ 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).";
970
+ readonly type: "string";
971
+ 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"];
972
+ };
973
+ readonly caseInsensitive: {
974
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
975
+ readonly type: "boolean";
976
+ readonly default: false;
977
+ };
978
+ readonly inverted: {
979
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
980
+ readonly type: "boolean";
981
+ readonly default: false;
982
+ };
983
+ readonly values: {
984
+ readonly type: "array";
985
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
986
+ readonly items: {
987
+ readonly type: "string";
988
+ };
989
+ };
990
+ readonly value: {
991
+ 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.";
992
+ readonly type: "string";
993
+ };
994
+ };
995
+ readonly type: "object";
996
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
997
+ readonly components: {};
998
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
999
+ readonly additionalProperties: false;
1000
+ };
1001
+ };
1002
+ };
1003
+ };
1004
+ readonly parametersSchema: {
1005
+ readonly $id: "#/components/schemas/parametersSchema";
1006
+ readonly type: "object";
1007
+ readonly additionalProperties: {
1008
+ readonly type: "string";
1009
+ };
1010
+ readonly components: {};
1011
+ };
1012
+ };
1013
+ };
1014
+ };
244
1015
  readonly sdkContextSchema: {
245
1016
  readonly $id: "#/components/schemas/sdkContextSchema";
246
1017
  readonly description: "The Unleash context as modeled in client SDKs";
@@ -294,7 +1065,7 @@ export declare const playgroundResponseSchema: {
294
1065
  readonly $id: "#/components/schemas/variantSchema";
295
1066
  readonly type: "object";
296
1067
  readonly additionalProperties: false;
297
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
1068
+ readonly required: readonly ["name", "weight"];
298
1069
  readonly properties: {
299
1070
  readonly name: {
300
1071
  readonly type: "string";