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
@@ -25,35 +25,45 @@ export declare const segmentSchema: {
25
25
  readonly components: {
26
26
  readonly schemas: {
27
27
  readonly constraintSchema: {
28
- readonly $id: "#/components/schemas/constraintSchema";
29
28
  readonly type: "object";
30
- readonly additionalProperties: false;
31
29
  readonly required: readonly ["contextName", "operator"];
30
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
32
31
  readonly properties: {
33
32
  readonly contextName: {
33
+ readonly description: "The name of the context field that this constraint should apply to.";
34
+ readonly example: "appName";
34
35
  readonly type: "string";
35
36
  };
36
37
  readonly operator: {
38
+ 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).";
37
39
  readonly type: "string";
38
40
  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"];
39
41
  };
40
42
  readonly caseInsensitive: {
43
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
41
44
  readonly type: "boolean";
45
+ readonly default: false;
42
46
  };
43
47
  readonly inverted: {
48
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
44
49
  readonly type: "boolean";
50
+ readonly default: false;
45
51
  };
46
52
  readonly values: {
47
53
  readonly type: "array";
54
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
48
55
  readonly items: {
49
56
  readonly type: "string";
50
57
  };
51
58
  };
52
59
  readonly value: {
60
+ 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.";
53
61
  readonly type: "string";
54
62
  };
55
63
  };
56
64
  readonly components: {};
65
+ readonly $id: "#/components/schemas/constraintSchema";
66
+ readonly additionalProperties: false;
57
67
  };
58
68
  };
59
69
  };
@@ -144,35 +144,45 @@ export declare const stateSchema: {
144
144
  readonly components: {
145
145
  readonly schemas: {
146
146
  readonly constraintSchema: {
147
- readonly $id: "#/components/schemas/constraintSchema";
148
147
  readonly type: "object";
149
- readonly additionalProperties: false;
150
148
  readonly required: readonly ["contextName", "operator"];
149
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
151
150
  readonly properties: {
152
151
  readonly contextName: {
152
+ readonly description: "The name of the context field that this constraint should apply to.";
153
+ readonly example: "appName";
153
154
  readonly type: "string";
154
155
  };
155
156
  readonly operator: {
157
+ 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).";
156
158
  readonly type: "string";
157
159
  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"];
158
160
  };
159
161
  readonly caseInsensitive: {
162
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
160
163
  readonly type: "boolean";
164
+ readonly default: false;
161
165
  };
162
166
  readonly inverted: {
167
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
163
168
  readonly type: "boolean";
169
+ readonly default: false;
164
170
  };
165
171
  readonly values: {
166
172
  readonly type: "array";
173
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
167
174
  readonly items: {
168
175
  readonly type: "string";
169
176
  };
170
177
  };
171
178
  readonly value: {
179
+ 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.";
172
180
  readonly type: "string";
173
181
  };
174
182
  };
175
183
  readonly components: {};
184
+ readonly $id: "#/components/schemas/constraintSchema";
185
+ readonly additionalProperties: false;
176
186
  };
177
187
  readonly environmentSchema: {
178
188
  readonly $id: "#/components/schemas/environmentSchema";
@@ -258,35 +268,45 @@ export declare const stateSchema: {
258
268
  readonly components: {
259
269
  readonly schemas: {
260
270
  readonly constraintSchema: {
261
- readonly $id: "#/components/schemas/constraintSchema";
262
271
  readonly type: "object";
263
- readonly additionalProperties: false;
264
272
  readonly required: readonly ["contextName", "operator"];
273
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
265
274
  readonly properties: {
266
275
  readonly contextName: {
276
+ readonly description: "The name of the context field that this constraint should apply to.";
277
+ readonly example: "appName";
267
278
  readonly type: "string";
268
279
  };
269
280
  readonly operator: {
281
+ 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).";
270
282
  readonly type: "string";
271
283
  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"];
272
284
  };
273
285
  readonly caseInsensitive: {
286
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
274
287
  readonly type: "boolean";
288
+ readonly default: false;
275
289
  };
276
290
  readonly inverted: {
291
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
277
292
  readonly type: "boolean";
293
+ readonly default: false;
278
294
  };
279
295
  readonly values: {
280
296
  readonly type: "array";
297
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
281
298
  readonly items: {
282
299
  readonly type: "string";
283
300
  };
284
301
  };
285
302
  readonly value: {
303
+ 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.";
286
304
  readonly type: "string";
287
305
  };
288
306
  };
289
307
  readonly components: {};
308
+ readonly $id: "#/components/schemas/constraintSchema";
309
+ readonly additionalProperties: false;
290
310
  };
291
311
  readonly parametersSchema: {
292
312
  readonly $id: "#/components/schemas/parametersSchema";
@@ -303,7 +323,7 @@ export declare const stateSchema: {
303
323
  readonly $id: "#/components/schemas/variantSchema";
304
324
  readonly type: "object";
305
325
  readonly additionalProperties: false;
306
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
326
+ readonly required: readonly ["name", "weight"];
307
327
  readonly properties: {
308
328
  readonly name: {
309
329
  readonly type: "string";
@@ -490,35 +510,45 @@ export declare const stateSchema: {
490
510
  readonly components: {
491
511
  readonly schemas: {
492
512
  readonly constraintSchema: {
493
- readonly $id: "#/components/schemas/constraintSchema";
494
513
  readonly type: "object";
495
- readonly additionalProperties: false;
496
514
  readonly required: readonly ["contextName", "operator"];
515
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
497
516
  readonly properties: {
498
517
  readonly contextName: {
518
+ readonly description: "The name of the context field that this constraint should apply to.";
519
+ readonly example: "appName";
499
520
  readonly type: "string";
500
521
  };
501
522
  readonly operator: {
523
+ 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).";
502
524
  readonly type: "string";
503
525
  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"];
504
526
  };
505
527
  readonly caseInsensitive: {
528
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
506
529
  readonly type: "boolean";
530
+ readonly default: false;
507
531
  };
508
532
  readonly inverted: {
533
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
509
534
  readonly type: "boolean";
535
+ readonly default: false;
510
536
  };
511
537
  readonly values: {
512
538
  readonly type: "array";
539
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
513
540
  readonly items: {
514
541
  readonly type: "string";
515
542
  };
516
543
  };
517
544
  readonly value: {
545
+ 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.";
518
546
  readonly type: "string";
519
547
  };
520
548
  };
521
549
  readonly components: {};
550
+ readonly $id: "#/components/schemas/constraintSchema";
551
+ readonly additionalProperties: false;
522
552
  };
523
553
  readonly parametersSchema: {
524
554
  readonly $id: "#/components/schemas/parametersSchema";
@@ -594,35 +624,45 @@ export declare const stateSchema: {
594
624
  readonly components: {
595
625
  readonly schemas: {
596
626
  readonly constraintSchema: {
597
- readonly $id: "#/components/schemas/constraintSchema";
598
627
  readonly type: "object";
599
- readonly additionalProperties: false;
600
628
  readonly required: readonly ["contextName", "operator"];
629
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
601
630
  readonly properties: {
602
631
  readonly contextName: {
632
+ readonly description: "The name of the context field that this constraint should apply to.";
633
+ readonly example: "appName";
603
634
  readonly type: "string";
604
635
  };
605
636
  readonly operator: {
637
+ 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).";
606
638
  readonly type: "string";
607
639
  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"];
608
640
  };
609
641
  readonly caseInsensitive: {
642
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
610
643
  readonly type: "boolean";
644
+ readonly default: false;
611
645
  };
612
646
  readonly inverted: {
647
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
613
648
  readonly type: "boolean";
649
+ readonly default: false;
614
650
  };
615
651
  readonly values: {
616
652
  readonly type: "array";
653
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
617
654
  readonly items: {
618
655
  readonly type: "string";
619
656
  };
620
657
  };
621
658
  readonly value: {
659
+ 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.";
622
660
  readonly type: "string";
623
661
  };
624
662
  };
625
663
  readonly components: {};
664
+ readonly $id: "#/components/schemas/constraintSchema";
665
+ readonly additionalProperties: false;
626
666
  };
627
667
  readonly parametersSchema: {
628
668
  readonly $id: "#/components/schemas/parametersSchema";
@@ -685,35 +725,45 @@ export declare const stateSchema: {
685
725
  readonly components: {
686
726
  readonly schemas: {
687
727
  readonly constraintSchema: {
688
- readonly $id: "#/components/schemas/constraintSchema";
689
728
  readonly type: "object";
690
- readonly additionalProperties: false;
691
729
  readonly required: readonly ["contextName", "operator"];
730
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
692
731
  readonly properties: {
693
732
  readonly contextName: {
733
+ readonly description: "The name of the context field that this constraint should apply to.";
734
+ readonly example: "appName";
694
735
  readonly type: "string";
695
736
  };
696
737
  readonly operator: {
738
+ 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).";
697
739
  readonly type: "string";
698
740
  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"];
699
741
  };
700
742
  readonly caseInsensitive: {
743
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
701
744
  readonly type: "boolean";
745
+ readonly default: false;
702
746
  };
703
747
  readonly inverted: {
748
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
704
749
  readonly type: "boolean";
750
+ readonly default: false;
705
751
  };
706
752
  readonly values: {
707
753
  readonly type: "array";
754
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
708
755
  readonly items: {
709
756
  readonly type: "string";
710
757
  };
711
758
  };
712
759
  readonly value: {
760
+ 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.";
713
761
  readonly type: "string";
714
762
  };
715
763
  };
716
764
  readonly components: {};
765
+ readonly $id: "#/components/schemas/constraintSchema";
766
+ readonly additionalProperties: false;
717
767
  };
718
768
  };
719
769
  };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const validate_1 = require("../validate");
4
+ test('tagTypesSchema', () => {
5
+ const data = {
6
+ version: 1,
7
+ tagTypes: [
8
+ {
9
+ name: 'simple',
10
+ description: 'Used to simplify filtering of features',
11
+ icon: '#',
12
+ },
13
+ {
14
+ name: 'hashtag',
15
+ description: '',
16
+ icon: null,
17
+ },
18
+ ],
19
+ };
20
+ expect((0, validate_1.validateSchema)('#/components/schemas/tagTypesSchema', {})).not.toBeUndefined();
21
+ expect((0, validate_1.validateSchema)('#/components/schemas/tagTypesSchema', data)).toBeUndefined();
22
+ });
23
+ //# sourceMappingURL=tag-types-schema.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-types-schema.test.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/tag-types-schema.test.ts"],"names":[],"mappings":";;AAAA,0CAA6C;AAG7C,IAAI,CAAC,gBAAgB,EAAE,GAAG,EAAE;IACxB,MAAM,IAAI,GAAmB;QACzB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wCAAwC;gBACrD,IAAI,EAAE,GAAG;aACZ;YACD;gBACI,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,EAAE;gBACf,IAAI,EAAE,IAAI;aACb;SACJ;KACJ,CAAC;IAEF,MAAM,CACF,IAAA,yBAAc,EAAC,qCAAqC,EAAE,EAAE,CAAC,CAC5D,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAEtB,MAAM,CACF,IAAA,yBAAc,EAAC,qCAAqC,EAAE,IAAI,CAAC,CAC9D,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC"}
@@ -26,6 +26,9 @@ export declare const uiConfigSchema: {
26
26
  readonly disablePasswordAuth: {
27
27
  readonly type: "boolean";
28
28
  };
29
+ readonly emailEnabled: {
30
+ readonly type: "boolean";
31
+ };
29
32
  readonly segmentValuesLimit: {
30
33
  readonly type: "number";
31
34
  };
@@ -29,6 +29,9 @@ exports.uiConfigSchema = {
29
29
  disablePasswordAuth: {
30
30
  type: 'boolean',
31
31
  },
32
+ emailEnabled: {
33
+ type: 'boolean',
34
+ },
32
35
  segmentValuesLimit: {
33
36
  type: 'number',
34
37
  },
@@ -1 +1 @@
1
- {"version":3,"file":"ui-config-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/ui-config-schema.ts"],"names":[],"mappings":";;;AACA,qDAAiD;AAEpC,QAAA,cAAc,GAAG;IAC1B,GAAG,EAAE,qCAAqC;IAC1C,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,CAAC;IACjE,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;SACjB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,mBAAmB,EAAE;YACjB,IAAI,EAAE,SAAS;SAClB;QACD,kBAAkB,EAAE;YAChB,IAAI,EAAE,QAAQ;SACjB;QACD,qBAAqB,EAAE;YACnB,IAAI,EAAE,QAAQ;SACjB;QACD,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE;gBAClB,IAAI,EAAE,SAAS;aAClB;SACJ;QACD,KAAK,EAAE;YACH,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;SACJ;QACD,kBAAkB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE;gBACF,aAAa;gBACb,MAAM;gBACN,YAAY;gBACZ,QAAQ;gBACR,QAAQ;gBACR,MAAM;aACT;SACJ;QACD,WAAW,EAAE;YACT,IAAI,EAAE,oCAAoC;SAC7C;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,aAAa,EAAb,8BAAa;SAChB;KACJ;CACK,CAAC"}
1
+ {"version":3,"file":"ui-config-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/ui-config-schema.ts"],"names":[],"mappings":";;;AACA,qDAAiD;AAEpC,QAAA,cAAc,GAAG;IAC1B,GAAG,EAAE,qCAAqC;IAC1C,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,CAAC;IACjE,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;SACjB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,mBAAmB,EAAE;YACjB,IAAI,EAAE,SAAS;SAClB;QACD,YAAY,EAAE;YACV,IAAI,EAAE,SAAS;SAClB;QACD,kBAAkB,EAAE;YAChB,IAAI,EAAE,QAAQ;SACjB;QACD,qBAAqB,EAAE;YACnB,IAAI,EAAE,QAAQ;SACjB;QACD,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE;gBAClB,IAAI,EAAE,SAAS;aAClB;SACJ;QACD,KAAK,EAAE;YACH,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;SACJ;QACD,kBAAkB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE;gBACF,aAAa;gBACb,MAAM;gBACN,YAAY;gBACZ,QAAQ;gBACR,QAAQ;gBACR,MAAM;aACT;SACJ;QACD,WAAW,EAAE;YACT,IAAI,EAAE,oCAAoC;SAC7C;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,aAAa,EAAb,8BAAa;SAChB;KACJ;CACK,CAAC"}
@@ -36,35 +36,45 @@ export declare const updateFeatureSchema: {
36
36
  readonly components: {
37
37
  readonly schemas: {
38
38
  readonly constraintSchema: {
39
- readonly $id: "#/components/schemas/constraintSchema";
40
39
  readonly type: "object";
41
- readonly additionalProperties: false;
42
40
  readonly required: readonly ["contextName", "operator"];
41
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
43
42
  readonly properties: {
44
43
  readonly contextName: {
44
+ readonly description: "The name of the context field that this constraint should apply to.";
45
+ readonly example: "appName";
45
46
  readonly type: "string";
46
47
  };
47
48
  readonly operator: {
49
+ 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).";
48
50
  readonly type: "string";
49
51
  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"];
50
52
  };
51
53
  readonly caseInsensitive: {
54
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
52
55
  readonly type: "boolean";
56
+ readonly default: false;
53
57
  };
54
58
  readonly inverted: {
59
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
55
60
  readonly type: "boolean";
61
+ readonly default: false;
56
62
  };
57
63
  readonly values: {
58
64
  readonly type: "array";
65
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
59
66
  readonly items: {
60
67
  readonly type: "string";
61
68
  };
62
69
  };
63
70
  readonly value: {
71
+ 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.";
64
72
  readonly type: "string";
65
73
  };
66
74
  };
67
75
  readonly components: {};
76
+ readonly $id: "#/components/schemas/constraintSchema";
77
+ readonly additionalProperties: false;
68
78
  };
69
79
  };
70
80
  };
@@ -22,35 +22,45 @@ export declare const updateFeatureStrategySchema: {
22
22
  readonly components: {
23
23
  readonly schemas: {
24
24
  readonly constraintSchema: {
25
- readonly $id: "#/components/schemas/constraintSchema";
26
25
  readonly type: "object";
27
- readonly additionalProperties: false;
28
26
  readonly required: readonly ["contextName", "operator"];
27
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
29
28
  readonly properties: {
30
29
  readonly contextName: {
30
+ readonly description: "The name of the context field that this constraint should apply to.";
31
+ readonly example: "appName";
31
32
  readonly type: "string";
32
33
  };
33
34
  readonly operator: {
35
+ 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).";
34
36
  readonly type: "string";
35
37
  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"];
36
38
  };
37
39
  readonly caseInsensitive: {
40
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
38
41
  readonly type: "boolean";
42
+ readonly default: false;
39
43
  };
40
44
  readonly inverted: {
45
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
41
46
  readonly type: "boolean";
47
+ readonly default: false;
42
48
  };
43
49
  readonly values: {
44
50
  readonly type: "array";
51
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
45
52
  readonly items: {
46
53
  readonly type: "string";
47
54
  };
48
55
  };
49
56
  readonly value: {
57
+ 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.";
50
58
  readonly type: "string";
51
59
  };
52
60
  };
53
61
  readonly components: {};
62
+ readonly $id: "#/components/schemas/constraintSchema";
63
+ readonly additionalProperties: false;
54
64
  };
55
65
  readonly parametersSchema: {
56
66
  readonly $id: "#/components/schemas/parametersSchema";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const validate_1 = require("../validate");
4
+ test('userSchema', () => {
5
+ const data = {
6
+ isAPI: false,
7
+ id: 1,
8
+ username: 'admin',
9
+ imageUrl: 'avatar',
10
+ seenAt: '2022-06-27T12:19:15.838Z',
11
+ loginAttempts: 0,
12
+ createdAt: '2022-04-08T10:59:25.072Z',
13
+ };
14
+ expect((0, validate_1.validateSchema)('#/components/schemas/userSchema', {})).not.toBeUndefined();
15
+ expect((0, validate_1.validateSchema)('#/components/schemas/userSchema', data)).toBeUndefined();
16
+ });
17
+ //# sourceMappingURL=user-schema.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-schema.test.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/user-schema.test.ts"],"names":[],"mappings":";;AAAA,0CAA6C;AAG7C,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE;IACpB,MAAM,IAAI,GAAe;QACrB,KAAK,EAAE,KAAK;QACZ,EAAE,EAAE,CAAC;QACL,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,0BAA0B;QAClC,aAAa,EAAE,CAAC;QAChB,SAAS,EAAE,0BAA0B;KACxC,CAAC;IAEF,MAAM,CACF,IAAA,yBAAc,EAAC,iCAAiC,EAAE,EAAE,CAAC,CACxD,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAEtB,MAAM,CACF,IAAA,yBAAc,EAAC,iCAAiC,EAAE,IAAI,CAAC,CAC1D,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC"}
@@ -62,15 +62,12 @@ export declare const usersGroupsBaseSchema: {
62
62
  readonly $id: "#/components/schemas/groupUserModelSchema";
63
63
  readonly type: "object";
64
64
  readonly additionalProperties: false;
65
- readonly required: readonly ["role", "user"];
65
+ readonly required: readonly ["user"];
66
66
  readonly properties: {
67
67
  readonly joinedAt: {
68
68
  readonly type: "string";
69
69
  readonly format: "date-time";
70
70
  };
71
- readonly role: {
72
- readonly type: "string";
73
- };
74
71
  readonly user: {
75
72
  readonly $ref: "#/components/schemas/userSchema";
76
73
  };
@@ -183,15 +180,12 @@ export declare const usersGroupsBaseSchema: {
183
180
  readonly $id: "#/components/schemas/groupUserModelSchema";
184
181
  readonly type: "object";
185
182
  readonly additionalProperties: false;
186
- readonly required: readonly ["role", "user"];
183
+ readonly required: readonly ["user"];
187
184
  readonly properties: {
188
185
  readonly joinedAt: {
189
186
  readonly type: "string";
190
187
  readonly format: "date-time";
191
188
  };
192
- readonly role: {
193
- readonly type: "string";
194
- };
195
189
  readonly user: {
196
190
  readonly $ref: "#/components/schemas/userSchema";
197
191
  };
@@ -3,7 +3,7 @@ export declare const variantSchema: {
3
3
  readonly $id: "#/components/schemas/variantSchema";
4
4
  readonly type: "object";
5
5
  readonly additionalProperties: false;
6
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
6
+ readonly required: readonly ["name", "weight"];
7
7
  readonly properties: {
8
8
  readonly name: {
9
9
  readonly type: "string";
@@ -6,7 +6,7 @@ exports.variantSchema = {
6
6
  $id: '#/components/schemas/variantSchema',
7
7
  type: 'object',
8
8
  additionalProperties: false,
9
- required: ['name', 'weight', 'weightType', 'stickiness'],
9
+ required: ['name', 'weight'],
10
10
  properties: {
11
11
  name: {
12
12
  type: 'string',
@@ -1 +1 @@
1
- {"version":3,"file":"variant-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/variant-schema.ts"],"names":[],"mappings":";;;AACA,uDAAmD;AAEtC,QAAA,aAAa,GAAG;IACzB,GAAG,EAAE,oCAAoC;IACzC,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,CAAC;IACxD,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;SACjB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;YAC3B,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,IAAI,EAAE,QAAQ;iBACjB;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;iBACjB;aACJ;SACJ;QACD,SAAS,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,qCAAqC;aAC9C;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,cAAc,EAAd,gCAAc;SACjB;KACJ;CACK,CAAC"}
1
+ {"version":3,"file":"variant-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/variant-schema.ts"],"names":[],"mappings":";;;AACA,uDAAmD;AAEtC,QAAA,aAAa,GAAG;IACzB,GAAG,EAAE,oCAAoC;IACzC,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC5B,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;SACjB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;YAC3B,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,IAAI,EAAE,QAAQ;iBACjB;gBACD,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;iBACjB;aACJ;SACJ;QACD,SAAS,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,qCAAqC;aAC9C;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,cAAc,EAAd,gCAAc;SACjB;KACJ;CACK,CAAC"}
@@ -11,7 +11,7 @@ export declare const variantsSchema: {
11
11
  readonly $id: "#/components/schemas/variantSchema";
12
12
  readonly type: "object";
13
13
  readonly additionalProperties: false;
14
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
14
+ readonly required: readonly ["name", "weight"];
15
15
  readonly properties: {
16
16
  readonly name: {
17
17
  readonly type: "string";
@@ -8,6 +8,12 @@ declare const standardResponses: {
8
8
  readonly 401: {
9
9
  readonly description: "Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.";
10
10
  };
11
+ readonly 404: {
12
+ readonly description: "The requested resource was not found.";
13
+ };
14
+ readonly 409: {
15
+ readonly description: "The provided resource can not be created or updated because it would conflict with the current state of the resource or with an already existing resource, respectively.";
16
+ };
11
17
  };
12
18
  declare type StandardResponses = typeof standardResponses;
13
19
  export declare const getStandardResponses: (...statusCodes: (keyof StandardResponses)[]) => Partial<StandardResponses>;
@@ -10,13 +10,21 @@ const unauthorizedResponse = {
10
10
  const badRequestResponse = {
11
11
  description: 'The request data does not match what we expect.',
12
12
  };
13
+ const notFoundResponse = {
14
+ description: 'The requested resource was not found.',
15
+ };
16
+ const conflictResponse = {
17
+ description: 'The provided resource can not be created or updated because it would conflict with the current state of the resource or with an already existing resource, respectively.',
18
+ };
13
19
  const standardResponses = {
14
20
  400: badRequestResponse,
15
21
  401: unauthorizedResponse,
22
+ 404: notFoundResponse,
23
+ 409: conflictResponse,
16
24
  };
17
- const getStandardResponses = (...statusCodes) => statusCodes.reduce((acc, n) => ({
25
+ const getStandardResponses = (...statusCodes) => statusCodes.reduce((acc, statusCode) => ({
18
26
  ...acc,
19
- [n]: standardResponses[n],
27
+ [statusCode]: standardResponses[statusCode],
20
28
  }), {});
21
29
  exports.getStandardResponses = getStandardResponses;
22
30
  //# sourceMappingURL=standard-responses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standard-responses.js","sourceRoot":"","sources":["../../../../src/lib/openapi/util/standard-responses.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IACzB,WAAW,EAAE,4BAA4B;CACnC,CAAC;AAEX,MAAM,oBAAoB,GAAG;IACzB,WAAW,EACP,oJAAoJ;CAClJ,CAAC;AAEX,MAAM,kBAAkB,GAAG;IACvB,WAAW,EAAE,iDAAiD;CACxD,CAAC;AAEX,MAAM,iBAAiB,GAAG;IACtB,GAAG,EAAE,kBAAkB;IACvB,GAAG,EAAE,oBAAoB;CACnB,CAAC;AAIJ,MAAM,oBAAoB,GAAG,CAChC,GAAG,WAAwC,EACjB,EAAE,CAC5B,WAAW,CAAC,MAAM,CACd,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,GAAG,GAAG;IACN,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAC5B,CAAC,EACF,EAAgC,CACnC,CAAC;AATO,QAAA,oBAAoB,wBAS3B"}
1
+ {"version":3,"file":"standard-responses.js","sourceRoot":"","sources":["../../../../src/lib/openapi/util/standard-responses.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IACzB,WAAW,EAAE,4BAA4B;CACnC,CAAC;AAEX,MAAM,oBAAoB,GAAG;IACzB,WAAW,EACP,oJAAoJ;CAClJ,CAAC;AAEX,MAAM,kBAAkB,GAAG;IACvB,WAAW,EAAE,iDAAiD;CACxD,CAAC;AAEX,MAAM,gBAAgB,GAAG;IACrB,WAAW,EAAE,uCAAuC;CAC9C,CAAC;AAEX,MAAM,gBAAgB,GAAG;IACrB,WAAW,EACP,0KAA0K;CACxK,CAAC;AAEX,MAAM,iBAAiB,GAAG;IACtB,GAAG,EAAE,kBAAkB;IACvB,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,gBAAgB;IACrB,GAAG,EAAE,gBAAgB;CACf,CAAC;AAIJ,MAAM,oBAAoB,GAAG,CAChC,GAAG,WAAwC,EACjB,EAAE,CAC5B,WAAW,CAAC,MAAM,CACd,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IAClB,GAAG,GAAG;IACN,CAAC,UAAU,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC;CAC9C,CAAC,EACF,EAAgC,CACnC,CAAC;AATO,QAAA,oBAAoB,wBAS3B"}
@@ -6,8 +6,9 @@ import { UiConfigSchema } from '../../openapi/spec/ui-config-schema';
6
6
  declare class ConfigController extends Controller {
7
7
  private versionService;
8
8
  private settingService;
9
+ private emailService;
9
10
  private readonly openApiService;
10
- constructor(config: IUnleashConfig, { versionService, settingService, openApiService, }: Pick<IUnleashServices, 'versionService' | 'settingService' | 'openApiService'>);
11
+ constructor(config: IUnleashConfig, { versionService, settingService, emailService, openApiService, }: Pick<IUnleashServices, 'versionService' | 'settingService' | 'emailService' | 'openApiService'>);
11
12
  getUIConfig(req: Request, res: Response<UiConfigSchema>): Promise<void>;
12
13
  }
13
14
  export default ConfigController;