unleash-server 4.14.2 → 4.14.3

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 +20 -20
  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
@@ -41,35 +41,45 @@ export declare const healthOverviewSchema: {
41
41
  readonly components: {
42
42
  readonly schemas: {
43
43
  readonly constraintSchema: {
44
- readonly $id: "#/components/schemas/constraintSchema";
45
44
  readonly type: "object";
46
- readonly additionalProperties: false;
47
45
  readonly required: readonly ["contextName", "operator"];
46
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
48
47
  readonly properties: {
49
48
  readonly contextName: {
49
+ readonly description: "The name of the context field that this constraint should apply to.";
50
+ readonly example: "appName";
50
51
  readonly type: "string";
51
52
  };
52
53
  readonly operator: {
54
+ 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).";
53
55
  readonly type: "string";
54
56
  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"];
55
57
  };
56
58
  readonly caseInsensitive: {
59
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
57
60
  readonly type: "boolean";
61
+ readonly default: false;
58
62
  };
59
63
  readonly inverted: {
64
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
60
65
  readonly type: "boolean";
66
+ readonly default: false;
61
67
  };
62
68
  readonly values: {
63
69
  readonly type: "array";
70
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
64
71
  readonly items: {
65
72
  readonly type: "string";
66
73
  };
67
74
  };
68
75
  readonly value: {
76
+ 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.";
69
77
  readonly type: "string";
70
78
  };
71
79
  };
72
80
  readonly components: {};
81
+ readonly $id: "#/components/schemas/constraintSchema";
82
+ readonly additionalProperties: false;
73
83
  };
74
84
  readonly environmentSchema: {
75
85
  readonly $id: "#/components/schemas/environmentSchema";
@@ -162,35 +172,45 @@ export declare const healthOverviewSchema: {
162
172
  readonly components: {
163
173
  readonly schemas: {
164
174
  readonly constraintSchema: {
165
- readonly $id: "#/components/schemas/constraintSchema";
166
175
  readonly type: "object";
167
- readonly additionalProperties: false;
168
176
  readonly required: readonly ["contextName", "operator"];
177
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
169
178
  readonly properties: {
170
179
  readonly contextName: {
180
+ readonly description: "The name of the context field that this constraint should apply to.";
181
+ readonly example: "appName";
171
182
  readonly type: "string";
172
183
  };
173
184
  readonly operator: {
185
+ 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).";
174
186
  readonly type: "string";
175
187
  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"];
176
188
  };
177
189
  readonly caseInsensitive: {
190
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
178
191
  readonly type: "boolean";
192
+ readonly default: false;
179
193
  };
180
194
  readonly inverted: {
195
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
181
196
  readonly type: "boolean";
197
+ readonly default: false;
182
198
  };
183
199
  readonly values: {
184
200
  readonly type: "array";
201
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
185
202
  readonly items: {
186
203
  readonly type: "string";
187
204
  };
188
205
  };
189
206
  readonly value: {
207
+ 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.";
190
208
  readonly type: "string";
191
209
  };
192
210
  };
193
211
  readonly components: {};
212
+ readonly $id: "#/components/schemas/constraintSchema";
213
+ readonly additionalProperties: false;
194
214
  };
195
215
  readonly environmentSchema: {
196
216
  readonly $id: "#/components/schemas/environmentSchema";
@@ -276,35 +296,45 @@ export declare const healthOverviewSchema: {
276
296
  readonly components: {
277
297
  readonly schemas: {
278
298
  readonly constraintSchema: {
279
- readonly $id: "#/components/schemas/constraintSchema";
280
299
  readonly type: "object";
281
- readonly additionalProperties: false;
282
300
  readonly required: readonly ["contextName", "operator"];
301
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
283
302
  readonly properties: {
284
303
  readonly contextName: {
304
+ readonly description: "The name of the context field that this constraint should apply to.";
305
+ readonly example: "appName";
285
306
  readonly type: "string";
286
307
  };
287
308
  readonly operator: {
309
+ 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).";
288
310
  readonly type: "string";
289
311
  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"];
290
312
  };
291
313
  readonly caseInsensitive: {
314
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
292
315
  readonly type: "boolean";
316
+ readonly default: false;
293
317
  };
294
318
  readonly inverted: {
319
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
295
320
  readonly type: "boolean";
321
+ readonly default: false;
296
322
  };
297
323
  readonly values: {
298
324
  readonly type: "array";
325
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
299
326
  readonly items: {
300
327
  readonly type: "string";
301
328
  };
302
329
  };
303
330
  readonly value: {
331
+ 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.";
304
332
  readonly type: "string";
305
333
  };
306
334
  };
307
335
  readonly components: {};
336
+ readonly $id: "#/components/schemas/constraintSchema";
337
+ readonly additionalProperties: false;
308
338
  };
309
339
  readonly parametersSchema: {
310
340
  readonly $id: "#/components/schemas/parametersSchema";
@@ -321,7 +351,7 @@ export declare const healthOverviewSchema: {
321
351
  readonly $id: "#/components/schemas/variantSchema";
322
352
  readonly type: "object";
323
353
  readonly additionalProperties: false;
324
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
354
+ readonly required: readonly ["name", "weight"];
325
355
  readonly properties: {
326
356
  readonly name: {
327
357
  readonly type: "string";
@@ -440,35 +470,45 @@ export declare const healthOverviewSchema: {
440
470
  readonly components: {
441
471
  readonly schemas: {
442
472
  readonly constraintSchema: {
443
- readonly $id: "#/components/schemas/constraintSchema";
444
473
  readonly type: "object";
445
- readonly additionalProperties: false;
446
474
  readonly required: readonly ["contextName", "operator"];
475
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
447
476
  readonly properties: {
448
477
  readonly contextName: {
478
+ readonly description: "The name of the context field that this constraint should apply to.";
479
+ readonly example: "appName";
449
480
  readonly type: "string";
450
481
  };
451
482
  readonly operator: {
483
+ 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).";
452
484
  readonly type: "string";
453
485
  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"];
454
486
  };
455
487
  readonly caseInsensitive: {
488
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
456
489
  readonly type: "boolean";
490
+ readonly default: false;
457
491
  };
458
492
  readonly inverted: {
493
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
459
494
  readonly type: "boolean";
495
+ readonly default: false;
460
496
  };
461
497
  readonly values: {
462
498
  readonly type: "array";
499
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
463
500
  readonly items: {
464
501
  readonly type: "string";
465
502
  };
466
503
  };
467
504
  readonly value: {
505
+ 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.";
468
506
  readonly type: "string";
469
507
  };
470
508
  };
471
509
  readonly components: {};
510
+ readonly $id: "#/components/schemas/constraintSchema";
511
+ readonly additionalProperties: false;
472
512
  };
473
513
  readonly parametersSchema: {
474
514
  readonly $id: "#/components/schemas/parametersSchema";
@@ -485,7 +525,7 @@ export declare const healthOverviewSchema: {
485
525
  readonly $id: "#/components/schemas/variantSchema";
486
526
  readonly type: "object";
487
527
  readonly additionalProperties: false;
488
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
528
+ readonly required: readonly ["name", "weight"];
489
529
  readonly properties: {
490
530
  readonly name: {
491
531
  readonly type: "string";
@@ -50,35 +50,45 @@ export declare const healthReportSchema: {
50
50
  readonly components: {
51
51
  readonly schemas: {
52
52
  readonly constraintSchema: {
53
- readonly $id: "#/components/schemas/constraintSchema";
54
53
  readonly type: "object";
55
- readonly additionalProperties: false;
56
54
  readonly required: readonly ["contextName", "operator"];
55
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
57
56
  readonly properties: {
58
57
  readonly contextName: {
58
+ readonly description: "The name of the context field that this constraint should apply to.";
59
+ readonly example: "appName";
59
60
  readonly type: "string";
60
61
  };
61
62
  readonly operator: {
63
+ 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).";
62
64
  readonly type: "string";
63
65
  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"];
64
66
  };
65
67
  readonly caseInsensitive: {
68
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
66
69
  readonly type: "boolean";
70
+ readonly default: false;
67
71
  };
68
72
  readonly inverted: {
73
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
69
74
  readonly type: "boolean";
75
+ readonly default: false;
70
76
  };
71
77
  readonly values: {
72
78
  readonly type: "array";
79
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
73
80
  readonly items: {
74
81
  readonly type: "string";
75
82
  };
76
83
  };
77
84
  readonly value: {
85
+ 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.";
78
86
  readonly type: "string";
79
87
  };
80
88
  };
81
89
  readonly components: {};
90
+ readonly $id: "#/components/schemas/constraintSchema";
91
+ readonly additionalProperties: false;
82
92
  };
83
93
  readonly environmentSchema: {
84
94
  readonly $id: "#/components/schemas/environmentSchema";
@@ -171,35 +181,45 @@ export declare const healthReportSchema: {
171
181
  readonly components: {
172
182
  readonly schemas: {
173
183
  readonly constraintSchema: {
174
- readonly $id: "#/components/schemas/constraintSchema";
175
184
  readonly type: "object";
176
- readonly additionalProperties: false;
177
185
  readonly required: readonly ["contextName", "operator"];
186
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
178
187
  readonly properties: {
179
188
  readonly contextName: {
189
+ readonly description: "The name of the context field that this constraint should apply to.";
190
+ readonly example: "appName";
180
191
  readonly type: "string";
181
192
  };
182
193
  readonly operator: {
194
+ 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).";
183
195
  readonly type: "string";
184
196
  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"];
185
197
  };
186
198
  readonly caseInsensitive: {
199
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
187
200
  readonly type: "boolean";
201
+ readonly default: false;
188
202
  };
189
203
  readonly inverted: {
204
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
190
205
  readonly type: "boolean";
206
+ readonly default: false;
191
207
  };
192
208
  readonly values: {
193
209
  readonly type: "array";
210
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
194
211
  readonly items: {
195
212
  readonly type: "string";
196
213
  };
197
214
  };
198
215
  readonly value: {
216
+ 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.";
199
217
  readonly type: "string";
200
218
  };
201
219
  };
202
220
  readonly components: {};
221
+ readonly $id: "#/components/schemas/constraintSchema";
222
+ readonly additionalProperties: false;
203
223
  };
204
224
  readonly environmentSchema: {
205
225
  readonly $id: "#/components/schemas/environmentSchema";
@@ -285,35 +305,45 @@ export declare const healthReportSchema: {
285
305
  readonly components: {
286
306
  readonly schemas: {
287
307
  readonly constraintSchema: {
288
- readonly $id: "#/components/schemas/constraintSchema";
289
308
  readonly type: "object";
290
- readonly additionalProperties: false;
291
309
  readonly required: readonly ["contextName", "operator"];
310
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
292
311
  readonly properties: {
293
312
  readonly contextName: {
313
+ readonly description: "The name of the context field that this constraint should apply to.";
314
+ readonly example: "appName";
294
315
  readonly type: "string";
295
316
  };
296
317
  readonly operator: {
318
+ 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).";
297
319
  readonly type: "string";
298
320
  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"];
299
321
  };
300
322
  readonly caseInsensitive: {
323
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
301
324
  readonly type: "boolean";
325
+ readonly default: false;
302
326
  };
303
327
  readonly inverted: {
328
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
304
329
  readonly type: "boolean";
330
+ readonly default: false;
305
331
  };
306
332
  readonly values: {
307
333
  readonly type: "array";
334
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
308
335
  readonly items: {
309
336
  readonly type: "string";
310
337
  };
311
338
  };
312
339
  readonly value: {
340
+ 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.";
313
341
  readonly type: "string";
314
342
  };
315
343
  };
316
344
  readonly components: {};
345
+ readonly $id: "#/components/schemas/constraintSchema";
346
+ readonly additionalProperties: false;
317
347
  };
318
348
  readonly parametersSchema: {
319
349
  readonly $id: "#/components/schemas/parametersSchema";
@@ -330,7 +360,7 @@ export declare const healthReportSchema: {
330
360
  readonly $id: "#/components/schemas/variantSchema";
331
361
  readonly type: "object";
332
362
  readonly additionalProperties: false;
333
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
363
+ readonly required: readonly ["name", "weight"];
334
364
  readonly properties: {
335
365
  readonly name: {
336
366
  readonly type: "string";
@@ -449,35 +479,45 @@ export declare const healthReportSchema: {
449
479
  readonly components: {
450
480
  readonly schemas: {
451
481
  readonly constraintSchema: {
452
- readonly $id: "#/components/schemas/constraintSchema";
453
482
  readonly type: "object";
454
- readonly additionalProperties: false;
455
483
  readonly required: readonly ["contextName", "operator"];
484
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
456
485
  readonly properties: {
457
486
  readonly contextName: {
487
+ readonly description: "The name of the context field that this constraint should apply to.";
488
+ readonly example: "appName";
458
489
  readonly type: "string";
459
490
  };
460
491
  readonly operator: {
492
+ 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).";
461
493
  readonly type: "string";
462
494
  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"];
463
495
  };
464
496
  readonly caseInsensitive: {
497
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
465
498
  readonly type: "boolean";
499
+ readonly default: false;
466
500
  };
467
501
  readonly inverted: {
502
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
468
503
  readonly type: "boolean";
504
+ readonly default: false;
469
505
  };
470
506
  readonly values: {
471
507
  readonly type: "array";
508
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
472
509
  readonly items: {
473
510
  readonly type: "string";
474
511
  };
475
512
  };
476
513
  readonly value: {
514
+ 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.";
477
515
  readonly type: "string";
478
516
  };
479
517
  };
480
518
  readonly components: {};
519
+ readonly $id: "#/components/schemas/constraintSchema";
520
+ readonly additionalProperties: false;
481
521
  };
482
522
  readonly parametersSchema: {
483
523
  readonly $id: "#/components/schemas/parametersSchema";
@@ -494,7 +534,7 @@ export declare const healthReportSchema: {
494
534
  readonly $id: "#/components/schemas/variantSchema";
495
535
  readonly type: "object";
496
536
  readonly additionalProperties: false;
497
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
537
+ readonly required: readonly ["name", "weight"];
498
538
  readonly properties: {
499
539
  readonly name: {
500
540
  readonly type: "string";
@@ -0,0 +1,47 @@
1
+ import { FromSchema } from 'json-schema-to-ts';
2
+ export declare const playgroundConstraintSchema: {
3
+ readonly required: readonly ["contextName", "operator", "result"];
4
+ readonly properties: {
5
+ readonly result: {
6
+ readonly description: "Whether this was evaluated as true or false.";
7
+ readonly type: "boolean";
8
+ };
9
+ readonly contextName: {
10
+ readonly description: "The name of the context field that this constraint should apply to.";
11
+ readonly example: "appName";
12
+ readonly type: "string";
13
+ };
14
+ readonly operator: {
15
+ 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).";
16
+ readonly type: "string";
17
+ 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"];
18
+ };
19
+ readonly caseInsensitive: {
20
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
21
+ readonly type: "boolean";
22
+ readonly default: false;
23
+ };
24
+ readonly inverted: {
25
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
26
+ readonly type: "boolean";
27
+ readonly default: false;
28
+ };
29
+ readonly values: {
30
+ readonly type: "array";
31
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
32
+ readonly items: {
33
+ readonly type: "string";
34
+ };
35
+ };
36
+ readonly value: {
37
+ 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.";
38
+ readonly type: "string";
39
+ };
40
+ };
41
+ readonly type: "object";
42
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
43
+ readonly components: {};
44
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
45
+ readonly additionalProperties: false;
46
+ };
47
+ export declare type PlaygroundConstraintSchema = FromSchema<typeof playgroundConstraintSchema>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.playgroundConstraintSchema = void 0;
4
+ const constraint_schema_1 = require("./constraint-schema");
5
+ exports.playgroundConstraintSchema = {
6
+ $id: '#/components/schemas/playgroundConstraintSchema',
7
+ additionalProperties: false,
8
+ ...constraint_schema_1.constraintSchemaBase,
9
+ required: [...constraint_schema_1.constraintSchemaBase.required, 'result'],
10
+ properties: {
11
+ ...constraint_schema_1.constraintSchemaBase.properties,
12
+ result: {
13
+ description: 'Whether this was evaluated as true or false.',
14
+ type: 'boolean',
15
+ },
16
+ },
17
+ };
18
+ //# sourceMappingURL=playground-constraint-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground-constraint-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/playground-constraint-schema.ts"],"names":[],"mappings":";;;AAAA,2DAA2D;AAG9C,QAAA,0BAA0B,GAAG;IACtC,GAAG,EAAE,iDAAiD;IACtD,oBAAoB,EAAE,KAAK;IAC3B,GAAG,wCAAoB;IACvB,QAAQ,EAAE,CAAC,GAAG,wCAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACtD,UAAU,EAAE;QACR,GAAG,wCAAoB,CAAC,UAAU;QAClC,MAAM,EAAE;YACJ,WAAW,EAAE,8CAA8C;YAC3D,IAAI,EAAE,SAAS;SAClB;KACJ;CACK,CAAC"}