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
@@ -4,8 +4,13 @@ exports.playgroundResponseSchema = void 0;
4
4
  const sdk_context_schema_1 = require("./sdk-context-schema");
5
5
  const playground_request_schema_1 = require("./playground-request-schema");
6
6
  const playground_feature_schema_1 = require("./playground-feature-schema");
7
+ const constraint_schema_1 = require("./constraint-schema");
8
+ const parameters_schema_1 = require("./parameters-schema");
7
9
  const variant_schema_1 = require("./variant-schema");
8
10
  const override_schema_1 = require("./override-schema");
11
+ const playground_constraint_schema_1 = require("./playground-constraint-schema");
12
+ const playground_segment_schema_1 = require("./playground-segment-schema");
13
+ const playground_strategy_schema_1 = require("./playground-strategy-schema");
9
14
  exports.playgroundResponseSchema = {
10
15
  $id: '#/components/schemas/playgroundResponseSchema',
11
16
  description: 'The state of all features given the provided input.',
@@ -14,17 +19,26 @@ exports.playgroundResponseSchema = {
14
19
  required: ['features', 'input'],
15
20
  properties: {
16
21
  input: {
22
+ description: 'The given input used to evaluate the features.',
17
23
  $ref: playground_request_schema_1.playgroundRequestSchema.$id,
18
24
  },
19
25
  features: {
20
26
  type: 'array',
21
- items: { $ref: playground_feature_schema_1.playgroundFeatureSchema.$id },
27
+ description: 'The list of features that have been evaluated.',
28
+ items: {
29
+ $ref: playground_feature_schema_1.playgroundFeatureSchema.$id,
30
+ },
22
31
  },
23
32
  },
24
33
  components: {
25
34
  schemas: {
35
+ constraintSchema: constraint_schema_1.constraintSchema,
36
+ parametersSchema: parameters_schema_1.parametersSchema,
37
+ playgroundConstraintSchema: playground_constraint_schema_1.playgroundConstraintSchema,
26
38
  playgroundFeatureSchema: playground_feature_schema_1.playgroundFeatureSchema,
27
39
  playgroundRequestSchema: playground_request_schema_1.playgroundRequestSchema,
40
+ playgroundSegmentSchema: playground_segment_schema_1.playgroundSegmentSchema,
41
+ playgroundStrategySchema: playground_strategy_schema_1.playgroundStrategySchema,
28
42
  sdkContextSchema: sdk_context_schema_1.sdkContextSchema,
29
43
  variantSchema: variant_schema_1.variantSchema,
30
44
  overrideSchema: override_schema_1.overrideSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"playground-response-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/playground-response-schema.ts"],"names":[],"mappings":";;;AACA,6DAAwD;AACxD,2EAAsE;AACtE,2EAAsE;AACtE,qDAAiD;AACjD,uDAAmD;AAEtC,QAAA,wBAAwB,GAAG;IACpC,GAAG,EAAE,+CAA+C;IACpD,WAAW,EAAE,qDAAqD;IAClE,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,UAAU,EAAE;QACR,KAAK,EAAE;YACH,IAAI,EAAE,mDAAuB,CAAC,GAAG;SACpC;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,mDAAuB,CAAC,GAAG,EAAE;SAC/C;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,uBAAuB,EAAvB,mDAAuB;YACvB,uBAAuB,EAAvB,mDAAuB;YACvB,gBAAgB,EAAhB,qCAAgB;YAChB,aAAa,EAAb,8BAAa;YACb,cAAc,EAAd,gCAAc;SACjB;KACJ;CACK,CAAC"}
1
+ {"version":3,"file":"playground-response-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/playground-response-schema.ts"],"names":[],"mappings":";;;AACA,6DAAwD;AACxD,2EAAsE;AACtE,2EAAsE;AACtE,2DAAuD;AACvD,2DAAuD;AACvD,qDAAiD;AACjD,uDAAmD;AACnD,iFAA4E;AAC5E,2EAAsE;AACtE,6EAAwE;AAE3D,QAAA,wBAAwB,GAAG;IACpC,GAAG,EAAE,+CAA+C;IACpD,WAAW,EAAE,qDAAqD;IAClE,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,UAAU,EAAE;QACR,KAAK,EAAE;YACH,WAAW,EAAE,gDAAgD;YAC7D,IAAI,EAAE,mDAAuB,CAAC,GAAG;SACpC;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,gDAAgD;YAC7D,KAAK,EAAE;gBACH,IAAI,EAAE,mDAAuB,CAAC,GAAG;aACpC;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,gBAAgB,EAAhB,oCAAgB;YAChB,gBAAgB,EAAhB,oCAAgB;YAChB,0BAA0B,EAA1B,yDAA0B;YAC1B,uBAAuB,EAAvB,mDAAuB;YACvB,uBAAuB,EAAvB,mDAAuB;YACvB,uBAAuB,EAAvB,mDAAuB;YACvB,wBAAwB,EAAxB,qDAAwB;YACxB,gBAAgB,EAAhB,qCAAgB;YAChB,aAAa,EAAb,8BAAa;YACb,cAAc,EAAd,gCAAc;SACjB;KACJ;CACK,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { FromSchema } from 'json-schema-to-ts';
2
+ export declare const playgroundSegmentSchema: {
3
+ readonly $id: "#/components/schemas/playgroundSegmentSchema";
4
+ readonly type: "object";
5
+ readonly additionalProperties: false;
6
+ readonly required: readonly ["name", "id", "constraints", "result"];
7
+ readonly properties: {
8
+ readonly id: {
9
+ readonly description: "The segment's id.";
10
+ readonly type: "integer";
11
+ };
12
+ readonly name: {
13
+ readonly description: "The name of the segment.";
14
+ readonly example: "segment A";
15
+ readonly type: "string";
16
+ };
17
+ readonly result: {
18
+ readonly description: "Whether this was evaluated as true or false.";
19
+ readonly type: "boolean";
20
+ };
21
+ readonly constraints: {
22
+ readonly type: "array";
23
+ readonly description: "The list of constraints in this segment.";
24
+ readonly items: {
25
+ readonly $ref: "#/components/schemas/playgroundConstraintSchema";
26
+ };
27
+ };
28
+ };
29
+ readonly components: {
30
+ readonly schemas: {
31
+ readonly playgroundConstraintSchema: {
32
+ readonly required: readonly ["contextName", "operator", "result"];
33
+ readonly properties: {
34
+ readonly result: {
35
+ readonly description: "Whether this was evaluated as true or false.";
36
+ readonly type: "boolean";
37
+ };
38
+ readonly contextName: {
39
+ readonly description: "The name of the context field that this constraint should apply to.";
40
+ readonly example: "appName";
41
+ readonly type: "string";
42
+ };
43
+ readonly operator: {
44
+ 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).";
45
+ readonly type: "string";
46
+ 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"];
47
+ };
48
+ readonly caseInsensitive: {
49
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
50
+ readonly type: "boolean";
51
+ readonly default: false;
52
+ };
53
+ readonly inverted: {
54
+ 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
+ readonly type: "boolean";
56
+ readonly default: false;
57
+ };
58
+ readonly values: {
59
+ readonly type: "array";
60
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
61
+ readonly items: {
62
+ readonly type: "string";
63
+ };
64
+ };
65
+ readonly value: {
66
+ 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.";
67
+ readonly type: "string";
68
+ };
69
+ };
70
+ readonly type: "object";
71
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
72
+ readonly components: {};
73
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
74
+ readonly additionalProperties: false;
75
+ };
76
+ };
77
+ };
78
+ };
79
+ export declare type PlaygroundSegmentSchema = FromSchema<typeof playgroundSegmentSchema>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.playgroundSegmentSchema = void 0;
4
+ const playground_constraint_schema_1 = require("./playground-constraint-schema");
5
+ exports.playgroundSegmentSchema = {
6
+ $id: '#/components/schemas/playgroundSegmentSchema',
7
+ type: 'object',
8
+ additionalProperties: false,
9
+ required: ['name', 'id', 'constraints', 'result'],
10
+ properties: {
11
+ id: {
12
+ description: "The segment's id.",
13
+ type: 'integer',
14
+ },
15
+ name: {
16
+ description: 'The name of the segment.',
17
+ example: 'segment A',
18
+ type: 'string',
19
+ },
20
+ result: {
21
+ description: 'Whether this was evaluated as true or false.',
22
+ type: 'boolean',
23
+ },
24
+ constraints: {
25
+ type: 'array',
26
+ description: 'The list of constraints in this segment.',
27
+ items: { $ref: playground_constraint_schema_1.playgroundConstraintSchema.$id },
28
+ },
29
+ },
30
+ components: {
31
+ schemas: {
32
+ playgroundConstraintSchema: playground_constraint_schema_1.playgroundConstraintSchema,
33
+ },
34
+ },
35
+ };
36
+ //# sourceMappingURL=playground-segment-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground-segment-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/playground-segment-schema.ts"],"names":[],"mappings":";;;AACA,iFAA4E;AAE/D,QAAA,uBAAuB,GAAG;IACnC,GAAG,EAAE,8CAA8C;IACnD,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,CAAC;IACjD,UAAU,EAAE;QACR,EAAE,EAAE;YACA,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,SAAS;SAClB;QACD,IAAI,EAAE;YACF,WAAW,EAAE,0BAA0B;YACvC,OAAO,EAAE,WAAW;YACpB,IAAI,EAAE,QAAQ;SACjB;QACD,MAAM,EAAE;YACJ,WAAW,EAAE,8CAA8C;YAC3D,IAAI,EAAE,SAAS;SAClB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,0CAA0C;YACvD,KAAK,EAAE,EAAE,IAAI,EAAE,yDAA0B,CAAC,GAAG,EAAE;SAClD;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,0BAA0B,EAA1B,yDAA0B;SAC7B;KACJ;CACK,CAAC"}
@@ -0,0 +1,257 @@
1
+ import { FromSchema } from 'json-schema-to-ts';
2
+ export declare const playgroundStrategyEvaluation: {
3
+ readonly evaluationComplete: "complete";
4
+ readonly evaluationIncomplete: "incomplete";
5
+ readonly unknownResult: "unknown";
6
+ };
7
+ export declare const strategyEvaluationResults: {
8
+ readonly anyOf: readonly [{
9
+ readonly type: "object";
10
+ readonly additionalProperties: false;
11
+ readonly required: readonly ["evaluationStatus", "enabled"];
12
+ readonly properties: {
13
+ readonly evaluationStatus: {
14
+ readonly type: "string";
15
+ readonly description: "Signals that this strategy could not be evaluated. This is most likely because you're using a custom strategy that Unleash doesn't know about.";
16
+ readonly enum: readonly ["incomplete"];
17
+ };
18
+ readonly enabled: {
19
+ readonly description: "Whether this strategy resolves to `false` or if it might resolve to `true`. Because Unleash can't evaluate the strategy, it can't say for certain whether it will be `true`, but if you have failing constraints or segments, it _can_ determine that your strategy would be `false`.";
20
+ readonly anyOf: readonly [{
21
+ readonly type: "boolean";
22
+ readonly enum: readonly [false];
23
+ }, {
24
+ readonly type: "string";
25
+ readonly enum: readonly ["unknown"];
26
+ }];
27
+ };
28
+ };
29
+ }, {
30
+ readonly type: "object";
31
+ readonly additionalProperties: false;
32
+ readonly required: readonly ["evaluationStatus", "enabled"];
33
+ readonly properties: {
34
+ readonly evaluationStatus: {
35
+ readonly description: "Signals that this strategy was evaluated successfully.";
36
+ readonly type: "string";
37
+ readonly enum: readonly ["complete"];
38
+ };
39
+ readonly enabled: {
40
+ readonly type: "boolean";
41
+ readonly description: "Whether this strategy evaluates to true or not.";
42
+ };
43
+ };
44
+ }];
45
+ };
46
+ export declare const playgroundStrategySchema: {
47
+ readonly $id: "#/components/schemas/playgroundStrategySchema";
48
+ readonly type: "object";
49
+ readonly additionalProperties: false;
50
+ readonly required: readonly ["id", "name", "result", "segments", "constraints", "parameters"];
51
+ readonly properties: {
52
+ readonly name: {
53
+ readonly description: "The strategy's name.";
54
+ readonly type: "string";
55
+ };
56
+ readonly id: {
57
+ readonly description: "The strategy's id.";
58
+ readonly type: "string";
59
+ };
60
+ readonly result: {
61
+ readonly anyOf: readonly [{
62
+ readonly type: "object";
63
+ readonly additionalProperties: false;
64
+ readonly required: readonly ["evaluationStatus", "enabled"];
65
+ readonly properties: {
66
+ readonly evaluationStatus: {
67
+ readonly type: "string";
68
+ readonly description: "Signals that this strategy could not be evaluated. This is most likely because you're using a custom strategy that Unleash doesn't know about.";
69
+ readonly enum: readonly ["incomplete"];
70
+ };
71
+ readonly enabled: {
72
+ readonly description: "Whether this strategy resolves to `false` or if it might resolve to `true`. Because Unleash can't evaluate the strategy, it can't say for certain whether it will be `true`, but if you have failing constraints or segments, it _can_ determine that your strategy would be `false`.";
73
+ readonly anyOf: readonly [{
74
+ readonly type: "boolean";
75
+ readonly enum: readonly [false];
76
+ }, {
77
+ readonly type: "string";
78
+ readonly enum: readonly ["unknown"];
79
+ }];
80
+ };
81
+ };
82
+ }, {
83
+ readonly type: "object";
84
+ readonly additionalProperties: false;
85
+ readonly required: readonly ["evaluationStatus", "enabled"];
86
+ readonly properties: {
87
+ readonly evaluationStatus: {
88
+ readonly description: "Signals that this strategy was evaluated successfully.";
89
+ readonly type: "string";
90
+ readonly enum: readonly ["complete"];
91
+ };
92
+ readonly enabled: {
93
+ readonly type: "boolean";
94
+ readonly description: "Whether this strategy evaluates to true or not.";
95
+ };
96
+ };
97
+ }];
98
+ readonly description: "The strategy's evaluation result. If the strategy is a custom strategy that Unleash can't evaluate, `evaluationStatus` will be `unknown`. Otherwise, it will be `true` or `false`";
99
+ };
100
+ readonly segments: {
101
+ readonly type: "array";
102
+ readonly description: "The strategy's segments and their evaluation results.";
103
+ readonly items: {
104
+ readonly $ref: "#/components/schemas/playgroundSegmentSchema";
105
+ };
106
+ };
107
+ readonly constraints: {
108
+ readonly type: "array";
109
+ readonly description: "The strategy's constraints and their evaluation results.";
110
+ readonly items: {
111
+ readonly $ref: "#/components/schemas/playgroundConstraintSchema";
112
+ };
113
+ };
114
+ readonly parameters: {
115
+ readonly description: "The strategy's constraints and their evaluation results.";
116
+ readonly example: {
117
+ readonly myParam1: "param value";
118
+ };
119
+ readonly $ref: "#/components/schemas/parametersSchema";
120
+ };
121
+ };
122
+ readonly components: {
123
+ readonly schemas: {
124
+ readonly playgroundConstraintSchema: {
125
+ readonly required: readonly ["contextName", "operator", "result"];
126
+ readonly properties: {
127
+ readonly result: {
128
+ readonly description: "Whether this was evaluated as true or false.";
129
+ readonly type: "boolean";
130
+ };
131
+ readonly contextName: {
132
+ readonly description: "The name of the context field that this constraint should apply to.";
133
+ readonly example: "appName";
134
+ readonly type: "string";
135
+ };
136
+ readonly operator: {
137
+ 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).";
138
+ readonly type: "string";
139
+ 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"];
140
+ };
141
+ readonly caseInsensitive: {
142
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
143
+ readonly type: "boolean";
144
+ readonly default: false;
145
+ };
146
+ readonly inverted: {
147
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
148
+ readonly type: "boolean";
149
+ readonly default: false;
150
+ };
151
+ readonly values: {
152
+ readonly type: "array";
153
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
154
+ readonly items: {
155
+ readonly type: "string";
156
+ };
157
+ };
158
+ readonly value: {
159
+ 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.";
160
+ readonly type: "string";
161
+ };
162
+ };
163
+ readonly type: "object";
164
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
165
+ readonly components: {};
166
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
167
+ readonly additionalProperties: false;
168
+ };
169
+ readonly playgroundSegmentSchema: {
170
+ readonly $id: "#/components/schemas/playgroundSegmentSchema";
171
+ readonly type: "object";
172
+ readonly additionalProperties: false;
173
+ readonly required: readonly ["name", "id", "constraints", "result"];
174
+ readonly properties: {
175
+ readonly id: {
176
+ readonly description: "The segment's id.";
177
+ readonly type: "integer";
178
+ };
179
+ readonly name: {
180
+ readonly description: "The name of the segment.";
181
+ readonly example: "segment A";
182
+ readonly type: "string";
183
+ };
184
+ readonly result: {
185
+ readonly description: "Whether this was evaluated as true or false.";
186
+ readonly type: "boolean";
187
+ };
188
+ readonly constraints: {
189
+ readonly type: "array";
190
+ readonly description: "The list of constraints in this segment.";
191
+ readonly items: {
192
+ readonly $ref: "#/components/schemas/playgroundConstraintSchema";
193
+ };
194
+ };
195
+ };
196
+ readonly components: {
197
+ readonly schemas: {
198
+ readonly playgroundConstraintSchema: {
199
+ readonly required: readonly ["contextName", "operator", "result"];
200
+ readonly properties: {
201
+ readonly result: {
202
+ readonly description: "Whether this was evaluated as true or false.";
203
+ readonly type: "boolean";
204
+ };
205
+ readonly contextName: {
206
+ readonly description: "The name of the context field that this constraint should apply to.";
207
+ readonly example: "appName";
208
+ readonly type: "string";
209
+ };
210
+ readonly operator: {
211
+ 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).";
212
+ readonly type: "string";
213
+ 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"];
214
+ };
215
+ readonly caseInsensitive: {
216
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
217
+ readonly type: "boolean";
218
+ readonly default: false;
219
+ };
220
+ readonly inverted: {
221
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
222
+ readonly type: "boolean";
223
+ readonly default: false;
224
+ };
225
+ readonly values: {
226
+ readonly type: "array";
227
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
228
+ readonly items: {
229
+ readonly type: "string";
230
+ };
231
+ };
232
+ readonly value: {
233
+ 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.";
234
+ readonly type: "string";
235
+ };
236
+ };
237
+ readonly type: "object";
238
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)";
239
+ readonly components: {};
240
+ readonly $id: "#/components/schemas/playgroundConstraintSchema";
241
+ readonly additionalProperties: false;
242
+ };
243
+ };
244
+ };
245
+ };
246
+ readonly parametersSchema: {
247
+ readonly $id: "#/components/schemas/parametersSchema";
248
+ readonly type: "object";
249
+ readonly additionalProperties: {
250
+ readonly type: "string";
251
+ };
252
+ readonly components: {};
253
+ };
254
+ };
255
+ };
256
+ };
257
+ export declare type PlaygroundStrategySchema = FromSchema<typeof playgroundStrategySchema>;
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.playgroundStrategySchema = exports.strategyEvaluationResults = exports.playgroundStrategyEvaluation = void 0;
4
+ const parameters_schema_1 = require("./parameters-schema");
5
+ const playground_constraint_schema_1 = require("./playground-constraint-schema");
6
+ const playground_segment_schema_1 = require("./playground-segment-schema");
7
+ exports.playgroundStrategyEvaluation = {
8
+ evaluationComplete: 'complete',
9
+ evaluationIncomplete: 'incomplete',
10
+ unknownResult: 'unknown',
11
+ };
12
+ exports.strategyEvaluationResults = {
13
+ anyOf: [
14
+ {
15
+ type: 'object',
16
+ additionalProperties: false,
17
+ required: ['evaluationStatus', 'enabled'],
18
+ properties: {
19
+ evaluationStatus: {
20
+ type: 'string',
21
+ description: "Signals that this strategy could not be evaluated. This is most likely because you're using a custom strategy that Unleash doesn't know about.",
22
+ enum: [exports.playgroundStrategyEvaluation.evaluationIncomplete],
23
+ },
24
+ enabled: {
25
+ description: "Whether this strategy resolves to `false` or if it might resolve to `true`. Because Unleash can't evaluate the strategy, it can't say for certain whether it will be `true`, but if you have failing constraints or segments, it _can_ determine that your strategy would be `false`.",
26
+ anyOf: [
27
+ { type: 'boolean', enum: [false] },
28
+ {
29
+ type: 'string',
30
+ enum: [exports.playgroundStrategyEvaluation.unknownResult],
31
+ },
32
+ ],
33
+ },
34
+ },
35
+ },
36
+ {
37
+ type: 'object',
38
+ additionalProperties: false,
39
+ required: ['evaluationStatus', 'enabled'],
40
+ properties: {
41
+ evaluationStatus: {
42
+ description: 'Signals that this strategy was evaluated successfully.',
43
+ type: 'string',
44
+ enum: ['complete'],
45
+ },
46
+ enabled: {
47
+ type: 'boolean',
48
+ description: 'Whether this strategy evaluates to true or not.',
49
+ },
50
+ },
51
+ },
52
+ ],
53
+ };
54
+ exports.playgroundStrategySchema = {
55
+ $id: '#/components/schemas/playgroundStrategySchema',
56
+ type: 'object',
57
+ additionalProperties: false,
58
+ required: ['id', 'name', 'result', 'segments', 'constraints', 'parameters'],
59
+ properties: {
60
+ name: {
61
+ description: "The strategy's name.",
62
+ type: 'string',
63
+ },
64
+ id: {
65
+ description: "The strategy's id.",
66
+ type: 'string',
67
+ },
68
+ result: {
69
+ description: `The strategy's evaluation result. If the strategy is a custom strategy that Unleash can't evaluate, \`evaluationStatus\` will be \`${exports.playgroundStrategyEvaluation.unknownResult}\`. Otherwise, it will be \`true\` or \`false\``,
70
+ ...exports.strategyEvaluationResults,
71
+ },
72
+ segments: {
73
+ type: 'array',
74
+ description: "The strategy's segments and their evaluation results.",
75
+ items: {
76
+ $ref: playground_segment_schema_1.playgroundSegmentSchema.$id,
77
+ },
78
+ },
79
+ constraints: {
80
+ type: 'array',
81
+ description: "The strategy's constraints and their evaluation results.",
82
+ items: {
83
+ $ref: playground_constraint_schema_1.playgroundConstraintSchema.$id,
84
+ },
85
+ },
86
+ parameters: {
87
+ description: "The strategy's constraints and their evaluation results.",
88
+ example: {
89
+ myParam1: 'param value',
90
+ },
91
+ $ref: parameters_schema_1.parametersSchema.$id,
92
+ },
93
+ },
94
+ components: {
95
+ schemas: {
96
+ playgroundConstraintSchema: playground_constraint_schema_1.playgroundConstraintSchema,
97
+ playgroundSegmentSchema: playground_segment_schema_1.playgroundSegmentSchema,
98
+ parametersSchema: parameters_schema_1.parametersSchema,
99
+ },
100
+ },
101
+ };
102
+ //# sourceMappingURL=playground-strategy-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground-strategy-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/playground-strategy-schema.ts"],"names":[],"mappings":";;;AACA,2DAAuD;AACvD,iFAA4E;AAC5E,2EAAsE;AAEzD,QAAA,4BAA4B,GAAG;IACxC,kBAAkB,EAAE,UAAU;IAC9B,oBAAoB,EAAE,YAAY;IAClC,aAAa,EAAE,SAAS;CAClB,CAAC;AAEE,QAAA,yBAAyB,GAAG;IACrC,KAAK,EAAE;QACH;YACI,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,kBAAkB,EAAE,SAAS,CAAC;YACzC,UAAU,EAAE;gBACR,gBAAgB,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EACP,gJAAgJ;oBACpJ,IAAI,EAAE,CAAC,oCAA4B,CAAC,oBAAoB,CAAC;iBAC5D;gBACD,OAAO,EAAE;oBACL,WAAW,EACP,uRAAuR;oBAC3R,KAAK,EAAE;wBACH,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE;wBAClC;4BACI,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE,CAAC,oCAA4B,CAAC,aAAa,CAAC;yBACrD;qBACJ;iBACJ;aACJ;SACJ;QACD;YACI,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,kBAAkB,EAAE,SAAS,CAAC;YACzC,UAAU,EAAE;gBACR,gBAAgB,EAAE;oBACd,WAAW,EACP,wDAAwD;oBAC5D,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,UAAU,CAAC;iBACrB;gBACD,OAAO,EAAE;oBACL,IAAI,EAAE,SAAS;oBACf,WAAW,EACP,iDAAiD;iBACxD;aACJ;SACJ;KACJ;CACK,CAAC;AAEE,QAAA,wBAAwB,GAAG;IACpC,GAAG,EAAE,+CAA+C;IACpD,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,CAAC;IAC3E,UAAU,EAAE;QACR,IAAI,EAAE;YACF,WAAW,EAAE,sBAAsB;YACnC,IAAI,EAAE,QAAQ;SACjB;QACD,EAAE,EAAE;YACA,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;SACjB;QACD,MAAM,EAAE;YACJ,WAAW,EAAE,sIAAsI,oCAA4B,CAAC,aAAa,iDAAiD;YAC9O,GAAG,iCAAyB;SAC/B;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,OAAO;YACb,WAAW,EACP,uDAAuD;YAC3D,KAAK,EAAE;gBACH,IAAI,EAAE,mDAAuB,CAAC,GAAG;aACpC;SACJ;QACD,WAAW,EAAE;YACT,IAAI,EAAE,OAAO;YACb,WAAW,EACP,0DAA0D;YAC9D,KAAK,EAAE;gBACH,IAAI,EAAE,yDAA0B,CAAC,GAAG;aACvC;SACJ;QACD,UAAU,EAAE;YACR,WAAW,EACP,0DAA0D;YAC9D,OAAO,EAAE;gBACL,QAAQ,EAAE,aAAa;aAC1B;YACD,IAAI,EAAE,oCAAgB,CAAC,GAAG;SAC7B;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,0BAA0B,EAA1B,yDAA0B;YAC1B,uBAAuB,EAAvB,mDAAuB;YACvB,gBAAgB,EAAhB,oCAAgB;SACnB;KACJ;CACK,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const validate_1 = require("../validate");
4
+ test('projectSchema', () => {
5
+ const data = {
6
+ name: 'Default',
7
+ id: 'default',
8
+ description: 'Default project',
9
+ health: 74,
10
+ featureCount: 10,
11
+ memberCount: 3,
12
+ updatedAt: '2022-06-28T17:33:53.963Z',
13
+ };
14
+ expect((0, validate_1.validateSchema)('#/components/schemas/projectSchema', {})).not.toBeUndefined();
15
+ expect((0, validate_1.validateSchema)('#/components/schemas/projectSchema', data)).toBeUndefined();
16
+ });
17
+ //# sourceMappingURL=project-schema.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-schema.test.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/project-schema.test.ts"],"names":[],"mappings":";;AAAA,0CAA6C;AAG7C,IAAI,CAAC,eAAe,EAAE,GAAG,EAAE;IACvB,MAAM,IAAI,GAAkB;QACxB,IAAI,EAAE,SAAS;QACf,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,iBAAiB;QAC9B,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,CAAC;QACd,SAAS,EAAE,0BAA0B;KACxC,CAAC;IAEF,MAAM,CACF,IAAA,yBAAc,EAAC,oCAAoC,EAAE,EAAE,CAAC,CAC3D,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAEtB,MAAM,CACF,IAAA,yBAAc,EAAC,oCAAoC,EAAE,IAAI,CAAC,CAC7D,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { FromSchema } from 'json-schema-to-ts';
2
+ export declare const searchEventsSchema: {
3
+ readonly $id: "#/components/schemas/searchEventsSchema";
4
+ readonly type: "object";
5
+ readonly description: "\n Search for events by type, project, feature, free-text query,\n or a combination thereof. Pass an empty object to fetch all events.\n ";
6
+ readonly properties: {
7
+ readonly type: {
8
+ readonly type: "string";
9
+ readonly description: "Find events by event type (case-sensitive).";
10
+ };
11
+ readonly project: {
12
+ readonly type: "string";
13
+ readonly description: "Find events by project ID (case-sensitive).";
14
+ };
15
+ readonly feature: {
16
+ readonly type: "string";
17
+ readonly description: "Find events by feature toggle name (case-sensitive).";
18
+ };
19
+ readonly query: {
20
+ readonly type: "string";
21
+ readonly description: "\n Find events by a free-text search query.\n The query will be matched against the event type,\n the username or email that created the event (if any),\n and the event data payload (if any).\n ";
22
+ };
23
+ readonly limit: {
24
+ readonly type: "integer";
25
+ readonly minimum: 1;
26
+ readonly maximum: 100;
27
+ readonly default: 100;
28
+ };
29
+ readonly offset: {
30
+ readonly type: "integer";
31
+ readonly minimum: 0;
32
+ readonly default: 0;
33
+ };
34
+ };
35
+ readonly components: {};
36
+ };
37
+ export declare type SearchEventsSchema = FromSchema<typeof searchEventsSchema>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.searchEventsSchema = void 0;
4
+ exports.searchEventsSchema = {
5
+ $id: '#/components/schemas/searchEventsSchema',
6
+ type: 'object',
7
+ description: `
8
+ Search for events by type, project, feature, free-text query,
9
+ or a combination thereof. Pass an empty object to fetch all events.
10
+ `,
11
+ properties: {
12
+ type: {
13
+ type: 'string',
14
+ description: 'Find events by event type (case-sensitive).',
15
+ },
16
+ project: {
17
+ type: 'string',
18
+ description: 'Find events by project ID (case-sensitive).',
19
+ },
20
+ feature: {
21
+ type: 'string',
22
+ description: 'Find events by feature toggle name (case-sensitive).',
23
+ },
24
+ query: {
25
+ type: 'string',
26
+ description: `
27
+ Find events by a free-text search query.
28
+ The query will be matched against the event type,
29
+ the username or email that created the event (if any),
30
+ and the event data payload (if any).
31
+ `,
32
+ },
33
+ limit: {
34
+ type: 'integer',
35
+ minimum: 1,
36
+ maximum: 100,
37
+ default: 100,
38
+ },
39
+ offset: {
40
+ type: 'integer',
41
+ minimum: 0,
42
+ default: 0,
43
+ },
44
+ },
45
+ components: {},
46
+ };
47
+ //# sourceMappingURL=search-events-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-events-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/search-events-schema.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAG;IAC9B,GAAG,EAAE,yCAAyC;IAC9C,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE;;;KAGZ;IACD,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,6CAA6C;SAC7D;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,6CAA6C;SAC7D;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,sDAAsD;SACtE;QACD,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE;;;;;aAKZ;SACJ;QACD,KAAK,EAAE;YACH,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,GAAG;SACf;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;SACb;KACJ;IACD,UAAU,EAAE,EAAE;CACR,CAAC"}