unleash-server 5.1.8 → 5.2.0

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 (485) hide show
  1. package/dist/lib/create-config.js +5 -2
  2. package/dist/lib/create-config.js.map +1 -1
  3. package/dist/lib/db/access-store.d.ts +2 -1
  4. package/dist/lib/db/access-store.js +17 -3
  5. package/dist/lib/db/access-store.js.map +1 -1
  6. package/dist/lib/db/client-metrics-store-v2.js +19 -30
  7. package/dist/lib/db/client-metrics-store-v2.js.map +1 -1
  8. package/dist/lib/db/context-field-store.d.ts +4 -1
  9. package/dist/lib/db/context-field-store.js +44 -14
  10. package/dist/lib/db/context-field-store.js.map +1 -1
  11. package/dist/lib/db/environment-store.d.ts +1 -0
  12. package/dist/lib/db/environment-store.js +6 -0
  13. package/dist/lib/db/environment-store.js.map +1 -1
  14. package/dist/lib/db/event-store.js +2 -1
  15. package/dist/lib/db/event-store.js.map +1 -1
  16. package/dist/lib/db/feature-strategy-store.d.ts +2 -0
  17. package/dist/lib/db/feature-strategy-store.js +25 -0
  18. package/dist/lib/db/feature-strategy-store.js.map +1 -1
  19. package/dist/lib/db/feature-strategy-store.test.js +75 -0
  20. package/dist/lib/db/feature-strategy-store.test.js.map +1 -0
  21. package/dist/lib/db/group-store.d.ts +1 -1
  22. package/dist/lib/db/group-store.js +2 -2
  23. package/dist/lib/db/group-store.js.map +1 -1
  24. package/dist/lib/db/index.js +2 -2
  25. package/dist/lib/db/index.js.map +1 -1
  26. package/dist/lib/db/project-store.js +2 -1
  27. package/dist/lib/db/project-store.js.map +1 -1
  28. package/dist/lib/db/role-store.js +2 -2
  29. package/dist/lib/db/role-store.js.map +1 -1
  30. package/dist/lib/db/segment-store.d.ts +6 -2
  31. package/dist/lib/db/segment-store.js +27 -6
  32. package/dist/lib/db/segment-store.js.map +1 -1
  33. package/dist/lib/error/no-access-error.d.ts +3 -2
  34. package/dist/lib/error/no-access-error.js +10 -4
  35. package/dist/lib/error/no-access-error.js.map +1 -1
  36. package/dist/lib/error/unleash-error.test.js +8 -2
  37. package/dist/lib/error/unleash-error.test.js.map +1 -1
  38. package/dist/lib/features/access/createAccessService.js +5 -5
  39. package/dist/lib/features/access/createAccessService.js.map +1 -1
  40. package/dist/lib/features/export-import-toggles/createExportImportService.js +4 -2
  41. package/dist/lib/features/export-import-toggles/createExportImportService.js.map +1 -1
  42. package/dist/lib/features/export-import-toggles/export-import-api-usage.test.d.ts +1 -0
  43. package/dist/lib/features/export-import-toggles/export-import-api-usage.test.js +69 -0
  44. package/dist/lib/features/export-import-toggles/export-import-api-usage.test.js.map +1 -0
  45. package/dist/lib/features/export-import-toggles/export-import-controller.js +5 -1
  46. package/dist/lib/features/export-import-toggles/export-import-controller.js.map +1 -1
  47. package/dist/lib/features/export-import-toggles/export-import-service.js +7 -2
  48. package/dist/lib/features/export-import-toggles/export-import-service.js.map +1 -1
  49. package/dist/lib/features/feature-toggle/createFeatureToggleService.js +4 -4
  50. package/dist/lib/features/feature-toggle/createFeatureToggleService.js.map +1 -1
  51. package/dist/lib/features/playground/advanced-playground.test.d.ts +1 -0
  52. package/dist/lib/features/playground/advanced-playground.test.js +238 -0
  53. package/dist/lib/features/playground/advanced-playground.test.js.map +1 -0
  54. package/dist/lib/{util → features/playground}/feature-evaluator/client.d.ts +3 -2
  55. package/dist/lib/{util → features/playground}/feature-evaluator/client.js +1 -1
  56. package/dist/lib/features/playground/feature-evaluator/client.js.map +1 -0
  57. package/dist/lib/features/playground/feature-evaluator/constraint.js.map +1 -0
  58. package/dist/lib/features/playground/feature-evaluator/context.js.map +1 -0
  59. package/dist/lib/features/playground/feature-evaluator/feature-evaluator.js.map +1 -0
  60. package/dist/lib/features/playground/feature-evaluator/feature.js.map +1 -0
  61. package/dist/lib/{util → features/playground}/feature-evaluator/helpers.d.ts +1 -1
  62. package/dist/lib/features/playground/feature-evaluator/helpers.js.map +1 -0
  63. package/dist/lib/{util → features/playground}/feature-evaluator/index.d.ts +1 -1
  64. package/dist/lib/{util → features/playground}/feature-evaluator/index.js +2 -2
  65. package/dist/lib/features/playground/feature-evaluator/index.js.map +1 -0
  66. package/dist/lib/features/playground/feature-evaluator/repository/bootstrap-provider.js.map +1 -0
  67. package/dist/lib/features/playground/feature-evaluator/repository/index.js.map +1 -0
  68. package/dist/lib/features/playground/feature-evaluator/repository/storage-provider-in-mem.js.map +1 -0
  69. package/dist/lib/features/playground/feature-evaluator/repository/storage-provider.js.map +1 -0
  70. package/dist/lib/features/playground/feature-evaluator/strategy/application-hostname-strategy.js.map +1 -0
  71. package/dist/lib/features/playground/feature-evaluator/strategy/default-strategy.js.map +1 -0
  72. package/dist/lib/features/playground/feature-evaluator/strategy/flexible-rollout-strategy.js.map +1 -0
  73. package/dist/lib/features/playground/feature-evaluator/strategy/gradual-rollout-random.js.map +1 -0
  74. package/dist/lib/features/playground/feature-evaluator/strategy/gradual-rollout-session-id.js.map +1 -0
  75. package/dist/lib/features/playground/feature-evaluator/strategy/gradual-rollout-user-id.js.map +1 -0
  76. package/dist/lib/features/playground/feature-evaluator/strategy/index.js.map +1 -0
  77. package/dist/lib/features/playground/feature-evaluator/strategy/remote-address-strategy.js.map +1 -0
  78. package/dist/lib/features/playground/feature-evaluator/strategy/strategy.js.map +1 -0
  79. package/dist/lib/{util → features/playground}/feature-evaluator/strategy/unknown-strategy.js +1 -1
  80. package/dist/lib/features/playground/feature-evaluator/strategy/unknown-strategy.js.map +1 -0
  81. package/dist/lib/features/playground/feature-evaluator/strategy/user-with-id-strategy.js.map +1 -0
  82. package/dist/lib/features/playground/feature-evaluator/strategy/util.js.map +1 -0
  83. package/dist/lib/features/playground/feature-evaluator/variant.js.map +1 -0
  84. package/dist/lib/features/playground/generateObjectCombinations.d.ts +7 -0
  85. package/dist/lib/features/playground/generateObjectCombinations.js +16 -0
  86. package/dist/lib/features/playground/generateObjectCombinations.js.map +1 -0
  87. package/dist/lib/features/playground/generateObjectCombinations.test.d.ts +1 -0
  88. package/dist/lib/features/playground/generateObjectCombinations.test.js +33 -0
  89. package/dist/lib/features/playground/generateObjectCombinations.test.js.map +1 -0
  90. package/dist/lib/{util → features/playground}/offline-unleash-client.js +2 -2
  91. package/dist/lib/features/playground/offline-unleash-client.js.map +1 -0
  92. package/dist/lib/{util → features/playground}/offline-unleash-client.test.js +1 -1
  93. package/dist/lib/features/playground/offline-unleash-client.test.js.map +1 -0
  94. package/dist/lib/features/playground/playground-service.d.ts +34 -0
  95. package/dist/lib/features/playground/playground-service.js +114 -0
  96. package/dist/lib/features/playground/playground-service.js.map +1 -0
  97. package/dist/lib/features/playground/playground-view-model.d.ts +4 -0
  98. package/dist/lib/features/playground/playground-view-model.js +49 -0
  99. package/dist/lib/features/playground/playground-view-model.js.map +1 -0
  100. package/dist/lib/features/playground/playground-view-model.test.d.ts +1 -0
  101. package/dist/lib/features/playground/playground-view-model.test.js +122 -0
  102. package/dist/lib/features/playground/playground-view-model.test.js.map +1 -0
  103. package/dist/lib/features/playground/playground.d.ts +16 -0
  104. package/dist/lib/features/playground/playground.js +78 -0
  105. package/dist/lib/features/playground/playground.js.map +1 -0
  106. package/dist/lib/features/playground/playground.test.d.ts +1 -0
  107. package/dist/lib/{routes/admin-api → features/playground}/playground.test.js +3 -2
  108. package/dist/lib/features/playground/playground.test.js.map +1 -0
  109. package/dist/lib/features/playground/validateQueryComplexity.d.ts +1 -0
  110. package/dist/lib/features/playground/validateQueryComplexity.js +15 -0
  111. package/dist/lib/features/playground/validateQueryComplexity.js.map +1 -0
  112. package/dist/lib/features/playground/validateQueryComplexity.test.d.ts +1 -0
  113. package/dist/lib/features/playground/validateQueryComplexity.test.js +19 -0
  114. package/dist/lib/features/playground/validateQueryComplexity.test.js.map +1 -0
  115. package/dist/lib/middleware/rbac-middleware.d.ts +1 -1
  116. package/dist/lib/middleware/rbac-middleware.js +7 -4
  117. package/dist/lib/middleware/rbac-middleware.js.map +1 -1
  118. package/dist/lib/middleware/rbac-middleware.test.js +8 -8
  119. package/dist/lib/middleware/rbac-middleware.test.js.map +1 -1
  120. package/dist/lib/openapi/endpoint-descriptions.d.ts +4 -0
  121. package/dist/lib/openapi/endpoint-descriptions.js +4 -0
  122. package/dist/lib/openapi/endpoint-descriptions.js.map +1 -1
  123. package/dist/lib/openapi/index.js +7 -0
  124. package/dist/lib/openapi/index.js.map +1 -1
  125. package/dist/lib/openapi/meta-schema-rules.test.js +16 -25
  126. package/dist/lib/openapi/meta-schema-rules.test.js.map +1 -1
  127. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.d.ts +652 -0
  128. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.js +146 -0
  129. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.js.map +1 -0
  130. package/dist/lib/openapi/spec/advanced-playground-feature-schema.d.ts +1217 -0
  131. package/dist/lib/openapi/spec/advanced-playground-feature-schema.js +51 -0
  132. package/dist/lib/openapi/spec/advanced-playground-feature-schema.js.map +1 -0
  133. package/dist/lib/openapi/spec/advanced-playground-request-schema.d.ts +95 -0
  134. package/dist/lib/openapi/spec/advanced-playground-request-schema.js +49 -0
  135. package/dist/lib/openapi/spec/advanced-playground-request-schema.js.map +1 -0
  136. package/dist/lib/openapi/spec/advanced-playground-response-schema.d.ts +2560 -0
  137. package/dist/lib/openapi/spec/advanced-playground-response-schema.js +50 -0
  138. package/dist/lib/openapi/spec/advanced-playground-response-schema.js.map +1 -0
  139. package/dist/lib/openapi/spec/client-application-schema.d.ts +17 -0
  140. package/dist/lib/openapi/spec/client-application-schema.js +17 -0
  141. package/dist/lib/openapi/spec/client-application-schema.js.map +1 -1
  142. package/dist/lib/openapi/spec/client-feature-schema.d.ts +44 -13
  143. package/dist/lib/openapi/spec/client-feature-schema.js +17 -12
  144. package/dist/lib/openapi/spec/client-feature-schema.js.map +1 -1
  145. package/dist/lib/openapi/spec/client-features-query-schema.d.ts +12 -0
  146. package/dist/lib/openapi/spec/client-features-query-schema.js +12 -0
  147. package/dist/lib/openapi/spec/client-features-query-schema.js.map +1 -1
  148. package/dist/lib/openapi/spec/client-features-schema.d.ts +90 -14
  149. package/dist/lib/openapi/spec/client-features-schema.js +7 -0
  150. package/dist/lib/openapi/spec/client-features-schema.js.map +1 -1
  151. package/dist/lib/openapi/spec/client-features-schema.test.js +5 -12
  152. package/dist/lib/openapi/spec/client-features-schema.test.js.map +1 -1
  153. package/dist/lib/openapi/spec/client-metrics-schema.d.ts +1 -1
  154. package/dist/lib/openapi/spec/client-metrics-schema.js +1 -1
  155. package/dist/lib/openapi/spec/client-metrics-schema.js.map +1 -1
  156. package/dist/lib/openapi/spec/context-field-schema.d.ts +13 -0
  157. package/dist/lib/openapi/spec/context-field-schema.js +13 -0
  158. package/dist/lib/openapi/spec/context-field-schema.js.map +1 -1
  159. package/dist/lib/openapi/spec/context-field-strategies-schema.d.ts +43 -0
  160. package/dist/lib/openapi/spec/context-field-strategies-schema.js +51 -0
  161. package/dist/lib/openapi/spec/context-field-strategies-schema.js.map +1 -0
  162. package/dist/lib/openapi/spec/context-fields-schema.d.ts +13 -0
  163. package/dist/lib/openapi/spec/create-application-schema.d.ts +0 -1
  164. package/dist/lib/openapi/spec/create-application-schema.js +0 -1
  165. package/dist/lib/openapi/spec/create-application-schema.js.map +1 -1
  166. package/dist/lib/openapi/spec/export-result-schema.d.ts +137 -4
  167. package/dist/lib/openapi/spec/feature-environment-schema.d.ts +22 -1
  168. package/dist/lib/openapi/spec/feature-schema.d.ts +49 -2
  169. package/dist/lib/openapi/spec/feature-schema.test.js +1 -1
  170. package/dist/lib/openapi/spec/feature-schema.test.js.map +1 -1
  171. package/dist/lib/openapi/spec/feature-strategy-schema.d.ts +1 -1
  172. package/dist/lib/openapi/spec/feature-strategy-schema.js +1 -1
  173. package/dist/lib/openapi/spec/feature-strategy-schema.js.map +1 -1
  174. package/dist/lib/openapi/spec/feature-variants-schema.d.ts +26 -0
  175. package/dist/lib/openapi/spec/features-schema.d.ts +98 -4
  176. package/dist/lib/openapi/spec/health-check-schema.d.ts +3 -0
  177. package/dist/lib/openapi/spec/health-check-schema.js +3 -0
  178. package/dist/lib/openapi/spec/health-check-schema.js.map +1 -1
  179. package/dist/lib/openapi/spec/health-overview-schema.d.ts +105 -4
  180. package/dist/lib/openapi/spec/health-overview-schema.js +7 -0
  181. package/dist/lib/openapi/spec/health-overview-schema.js.map +1 -1
  182. package/dist/lib/openapi/spec/health-report-schema.d.ts +105 -4
  183. package/dist/lib/openapi/spec/import-toggles-schema.d.ts +274 -8
  184. package/dist/lib/openapi/spec/index.d.ts +3 -0
  185. package/dist/lib/openapi/spec/index.js +3 -0
  186. package/dist/lib/openapi/spec/index.js.map +1 -1
  187. package/dist/lib/openapi/spec/instance-admin-stats-schema.d.ts +65 -2
  188. package/dist/lib/openapi/spec/instance-admin-stats-schema.js +65 -2
  189. package/dist/lib/openapi/spec/instance-admin-stats-schema.js.map +1 -1
  190. package/dist/lib/openapi/spec/override-schema.d.ts +5 -0
  191. package/dist/lib/openapi/spec/override-schema.js +5 -0
  192. package/dist/lib/openapi/spec/override-schema.js.map +1 -1
  193. package/dist/lib/openapi/spec/password-schema.d.ts +3 -0
  194. package/dist/lib/openapi/spec/password-schema.js +3 -0
  195. package/dist/lib/openapi/spec/password-schema.js.map +1 -1
  196. package/dist/lib/openapi/spec/playground-feature-schema.d.ts +41 -1
  197. package/dist/lib/openapi/spec/playground-feature-schema.js +6 -1
  198. package/dist/lib/openapi/spec/playground-feature-schema.js.map +1 -1
  199. package/dist/lib/openapi/spec/playground-feature-schema.test.js +3 -0
  200. package/dist/lib/openapi/spec/playground-feature-schema.test.js.map +1 -1
  201. package/dist/lib/openapi/spec/playground-request-schema.d.ts +7 -1
  202. package/dist/lib/openapi/spec/playground-request-schema.js +1 -1
  203. package/dist/lib/openapi/spec/playground-request-schema.js.map +1 -1
  204. package/dist/lib/openapi/spec/playground-response-schema.d.ts +93 -3
  205. package/dist/lib/openapi/spec/playground-strategy-schema.d.ts +13 -1
  206. package/dist/lib/openapi/spec/playground-strategy-schema.js +13 -0
  207. package/dist/lib/openapi/spec/playground-strategy-schema.js.map +1 -1
  208. package/dist/lib/openapi/spec/profile-schema.d.ts +49 -2
  209. package/dist/lib/openapi/spec/project-overview-schema.d.ts +104 -4
  210. package/dist/lib/openapi/spec/project-overview-schema.js +6 -0
  211. package/dist/lib/openapi/spec/project-overview-schema.js.map +1 -1
  212. package/dist/lib/openapi/spec/push-variants-schema.d.ts +26 -0
  213. package/dist/lib/openapi/spec/sdk-context-schema.d.ts +6 -0
  214. package/dist/lib/openapi/spec/sdk-context-schema.js +14 -2
  215. package/dist/lib/openapi/spec/sdk-context-schema.js.map +1 -1
  216. package/dist/lib/openapi/spec/state-schema.d.ts +72 -4
  217. package/dist/lib/openapi/spec/variant-schema.d.ts +21 -0
  218. package/dist/lib/openapi/spec/variant-schema.js +13 -0
  219. package/dist/lib/openapi/spec/variant-schema.js.map +1 -1
  220. package/dist/lib/openapi/spec/variants-schema.d.ts +26 -0
  221. package/dist/lib/openapi/util/create-response-schema.d.ts +1 -0
  222. package/dist/lib/openapi/util/create-response-schema.js +7 -1
  223. package/dist/lib/openapi/util/create-response-schema.js.map +1 -1
  224. package/dist/lib/proxy/proxy-repository.js +1 -1
  225. package/dist/lib/proxy/proxy-repository.js.map +1 -1
  226. package/dist/lib/routes/admin-api/api-token.d.ts +2 -0
  227. package/dist/lib/routes/admin-api/api-token.js +120 -11
  228. package/dist/lib/routes/admin-api/api-token.js.map +1 -1
  229. package/dist/lib/routes/admin-api/context.d.ts +3 -0
  230. package/dist/lib/routes/admin-api/context.js +21 -0
  231. package/dist/lib/routes/admin-api/context.js.map +1 -1
  232. package/dist/lib/routes/admin-api/index.js +1 -1
  233. package/dist/lib/routes/admin-api/index.js.map +1 -1
  234. package/dist/lib/routes/admin-api/instance-admin.d.ts +3 -1
  235. package/dist/lib/routes/admin-api/instance-admin.js +41 -0
  236. package/dist/lib/routes/admin-api/instance-admin.js.map +1 -1
  237. package/dist/lib/routes/admin-api/metrics.test.js +12 -0
  238. package/dist/lib/routes/admin-api/metrics.test.js.map +1 -1
  239. package/dist/lib/routes/admin-api/project/api-token.js +7 -0
  240. package/dist/lib/routes/admin-api/project/api-token.js.map +1 -1
  241. package/dist/lib/routes/admin-api/user/user.js +5 -4
  242. package/dist/lib/routes/admin-api/user/user.js.map +1 -1
  243. package/dist/lib/routes/admin-api/user/user.test.js +30 -5
  244. package/dist/lib/routes/admin-api/user/user.test.js.map +1 -1
  245. package/dist/lib/routes/admin-api/user-admin.js +0 -1
  246. package/dist/lib/routes/admin-api/user-admin.js.map +1 -1
  247. package/dist/lib/routes/client-api/feature.js +4 -0
  248. package/dist/lib/routes/client-api/feature.js.map +1 -1
  249. package/dist/lib/routes/client-api/metrics.js +2 -0
  250. package/dist/lib/routes/client-api/metrics.js.map +1 -1
  251. package/dist/lib/routes/client-api/register.js +2 -0
  252. package/dist/lib/routes/client-api/register.js.map +1 -1
  253. package/dist/lib/routes/controller.d.ts +8 -7
  254. package/dist/lib/routes/controller.js +11 -10
  255. package/dist/lib/routes/controller.js.map +1 -1
  256. package/dist/lib/routes/health-check.js +2 -0
  257. package/dist/lib/routes/health-check.js.map +1 -1
  258. package/dist/lib/server-impl.js +1 -1
  259. package/dist/lib/server-impl.js.map +1 -1
  260. package/dist/lib/services/access-service.d.ts +6 -4
  261. package/dist/lib/services/access-service.js +47 -11
  262. package/dist/lib/services/access-service.js.map +1 -1
  263. package/dist/lib/services/access-service.test.js +39 -22
  264. package/dist/lib/services/access-service.test.js.map +1 -1
  265. package/dist/lib/services/api-token-service.d.ts +1 -0
  266. package/dist/lib/services/api-token-service.js +3 -0
  267. package/dist/lib/services/api-token-service.js.map +1 -1
  268. package/dist/lib/services/context-service.d.ts +4 -1
  269. package/dist/lib/services/context-service.js +14 -1
  270. package/dist/lib/services/context-service.js.map +1 -1
  271. package/dist/lib/services/feature-toggle-service.d.ts +1 -1
  272. package/dist/lib/services/feature-toggle-service.js +6 -7
  273. package/dist/lib/services/feature-toggle-service.js.map +1 -1
  274. package/dist/lib/services/group-service.js +1 -3
  275. package/dist/lib/services/group-service.js.map +1 -1
  276. package/dist/lib/services/index.d.ts +1 -1
  277. package/dist/lib/services/index.js +1 -1
  278. package/dist/lib/services/index.js.map +1 -1
  279. package/dist/lib/services/instance-stats-service.d.ts +2 -3
  280. package/dist/lib/services/project-service.js +1 -0
  281. package/dist/lib/services/project-service.js.map +1 -1
  282. package/dist/lib/services/user-service.d.ts +1 -0
  283. package/dist/lib/services/user-service.js +8 -0
  284. package/dist/lib/services/user-service.js.map +1 -1
  285. package/dist/lib/services/version-service.d.ts +37 -1
  286. package/dist/lib/services/version-service.js +76 -5
  287. package/dist/lib/services/version-service.js.map +1 -1
  288. package/dist/lib/services/version-service.test.js +196 -9
  289. package/dist/lib/services/version-service.test.js.map +1 -1
  290. package/dist/lib/types/experimental.d.ts +1 -1
  291. package/dist/lib/types/experimental.js +6 -2
  292. package/dist/lib/types/experimental.js.map +1 -1
  293. package/dist/lib/types/model.d.ts +9 -4
  294. package/dist/lib/types/model.js +1 -0
  295. package/dist/lib/types/model.js.map +1 -1
  296. package/dist/lib/types/option.d.ts +2 -0
  297. package/dist/lib/types/permissions.d.ts +34 -27
  298. package/dist/lib/types/permissions.js +85 -29
  299. package/dist/lib/types/permissions.js.map +1 -1
  300. package/dist/lib/types/services.d.ts +1 -1
  301. package/dist/lib/types/stores/access-store.d.ts +1 -1
  302. package/dist/lib/types/stores/context-field-store.d.ts +2 -0
  303. package/dist/lib/types/stores/environment-store.d.ts +1 -0
  304. package/dist/lib/types/stores/feature-strategies-store.d.ts +2 -0
  305. package/dist/lib/types/stores/feature-toggle-store.d.ts +1 -1
  306. package/dist/lib/types/stores/group-store.d.ts +1 -1
  307. package/dist/lib/util/constants.d.ts +7 -1
  308. package/dist/lib/util/constants.js +8 -2
  309. package/dist/lib/util/constants.js.map +1 -1
  310. package/dist/lib/util/ensureArray.d.ts +1 -0
  311. package/dist/lib/util/ensureArray.js +8 -0
  312. package/dist/lib/util/ensureArray.js.map +1 -0
  313. package/dist/lib/util/index.d.ts +1 -1
  314. package/dist/lib/util/index.js +1 -1
  315. package/dist/lib/util/index.js.map +1 -1
  316. package/dist/migrations/20230615122909-fix-env-sort-order.d.ts +2 -0
  317. package/dist/migrations/20230615122909-fix-env-sort-order.js +28 -0
  318. package/dist/migrations/20230615122909-fix-env-sort-order.js.map +1 -0
  319. package/dist/migrations/20230619105029-new-fine-grained-api-token-permissions.d.ts +2 -0
  320. package/dist/migrations/20230619105029-new-fine-grained-api-token-permissions.js +26 -0
  321. package/dist/migrations/20230619105029-new-fine-grained-api-token-permissions.js.map +1 -0
  322. package/dist/migrations/20230619110243-assign-apitoken-permissions-to-rootroles.d.ts +2 -0
  323. package/dist/migrations/20230619110243-assign-apitoken-permissions-to-rootroles.js +23 -0
  324. package/dist/migrations/20230619110243-assign-apitoken-permissions-to-rootroles.js.map +1 -0
  325. package/dist/migrations/20230621141239-refactor-api-token-permissions.d.ts +2 -0
  326. package/dist/migrations/20230621141239-refactor-api-token-permissions.js +19 -0
  327. package/dist/migrations/20230621141239-refactor-api-token-permissions.js.map +1 -0
  328. package/dist/server-dev.js +3 -3
  329. package/dist/server-dev.js.map +1 -1
  330. package/dist/test/arbitraries.test.js +3 -1
  331. package/dist/test/arbitraries.test.js.map +1 -1
  332. package/dist/test/config/test-config.js +0 -1
  333. package/dist/test/config/test-config.js.map +1 -1
  334. package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js +542 -3
  335. package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js.map +1 -1
  336. package/dist/test/e2e/api/admin/api-token.e2e.test.js +14 -1
  337. package/dist/test/e2e/api/admin/api-token.e2e.test.js.map +1 -1
  338. package/dist/test/e2e/api/admin/client-metrics.e2e.test.js +1 -8
  339. package/dist/test/e2e/api/admin/client-metrics.e2e.test.js.map +1 -1
  340. package/dist/test/e2e/api/admin/context.e2e.test.js +47 -1
  341. package/dist/test/e2e/api/admin/context.e2e.test.js.map +1 -1
  342. package/dist/test/e2e/api/admin/project/features.e2e.test.js +14 -14
  343. package/dist/test/e2e/api/admin/project/features.e2e.test.js.map +1 -1
  344. package/dist/test/e2e/api/admin/project/projects.e2e.test.js +14 -0
  345. package/dist/test/e2e/api/admin/project/projects.e2e.test.js.map +1 -1
  346. package/dist/test/e2e/helpers/test-helper.d.ts +1 -1
  347. package/dist/test/e2e/helpers/test-helper.js +4 -2
  348. package/dist/test/e2e/helpers/test-helper.js.map +1 -1
  349. package/dist/test/e2e/services/access-service.e2e.test.js +1 -1
  350. package/dist/test/e2e/services/access-service.e2e.test.js.map +1 -1
  351. package/dist/test/e2e/services/playground-service.test.js +2 -2
  352. package/dist/test/e2e/services/playground-service.test.js.map +1 -1
  353. package/dist/test/fixtures/access-service-mock.js +1 -1
  354. package/dist/test/fixtures/access-service-mock.js.map +1 -1
  355. package/dist/test/fixtures/fake-access-store.d.ts +5 -3
  356. package/dist/test/fixtures/fake-access-store.js +24 -9
  357. package/dist/test/fixtures/fake-access-store.js.map +1 -1
  358. package/dist/test/fixtures/fake-environment-store.d.ts +1 -0
  359. package/dist/test/fixtures/fake-environment-store.js +3 -0
  360. package/dist/test/fixtures/fake-environment-store.js.map +1 -1
  361. package/dist/test/fixtures/fake-feature-strategies-store.d.ts +2 -0
  362. package/dist/test/fixtures/fake-feature-strategies-store.js +7 -0
  363. package/dist/test/fixtures/fake-feature-strategies-store.js.map +1 -1
  364. package/dist/test/fixtures/fake-group-store.d.ts +1 -1
  365. package/dist/test/fixtures/fake-group-store.js +1 -1
  366. package/dist/test/fixtures/fake-group-store.js.map +1 -1
  367. package/dist/test/fixtures/fake-role-store.d.ts +1 -1
  368. package/dist/test/fixtures/fake-role-store.js +9 -4
  369. package/dist/test/fixtures/fake-role-store.js.map +1 -1
  370. package/frontend/build/index.html +1 -1
  371. package/frontend/build/static/AdvancedPlayground-520a25e1.js +1 -0
  372. package/frontend/build/static/CreateProject-c430691b.js +4 -0
  373. package/frontend/build/static/{Error-5606eccd.js → Error-492e8b38.js} +1 -1
  374. package/frontend/build/static/FeatureArchiveDialog-70daa567.js +10 -0
  375. package/frontend/build/static/{FeatureMetricsChart-1c6bb078.js → FeatureMetricsChart-bc99b364.js} +2 -2
  376. package/frontend/build/static/FeatureViewLazyExport-01d70575.js +7 -0
  377. package/frontend/build/static/LazyAdminExport-e2c90193.js +37 -0
  378. package/frontend/build/static/LazyProjectExport-fa62d2fe.js +13 -0
  379. package/frontend/build/static/NetworkOverview-3b72e4ea.js +1298 -0
  380. package/frontend/build/static/NetworkTraffic-365db744.js +1 -0
  381. package/frontend/build/static/Playground-b473b399.js +1 -0
  382. package/frontend/build/static/{Playground-6602cb1a.js → PlaygroundGuidancePopper-8e3e97db.js} +12 -12
  383. package/frontend/build/static/RoleCell-9bb513a8.js +1 -0
  384. package/frontend/build/static/StrategyItemContainer-1f7503c7.js +1 -0
  385. package/frontend/build/static/{chartjs-adapter-date-fns.esm-c75aa905.js → chartjs-adapter-date-fns.esm-db338d44.js} +1 -1
  386. package/frontend/build/static/flowchart-elk-definition-170a3958-a428dd25.js +134 -0
  387. package/frontend/build/static/index-0a56292a.js +450 -0
  388. package/frontend/build/static/{index-b3def5eb.js → index-d362ae7a.js} +1 -1
  389. package/frontend/build/static/{index-f8439975.js → index-dc5debe9.js} +1 -1
  390. package/frontend/build/static/is_dark-884249e0.js +1 -0
  391. package/frontend/build/static/mindmap-definition-44684416-3c9425ff.js +101 -0
  392. package/frontend/build/static/stringify-ec884b6d.js +1 -0
  393. package/frontend/build/static/timeline-definition-8e5a9bc6-d289cd6d.js +62 -0
  394. package/frontend/build/static/{unknownify-6683037a.js → unknownify-5b23bf29.js} +1 -1
  395. package/frontend/package.json +18 -17
  396. package/package.json +16 -13
  397. package/dist/lib/routes/admin-api/playground.d.ts +0 -12
  398. package/dist/lib/routes/admin-api/playground.js +0 -46
  399. package/dist/lib/routes/admin-api/playground.js.map +0 -1
  400. package/dist/lib/routes/admin-api/playground.test.js.map +0 -1
  401. package/dist/lib/services/playground-service.d.ts +0 -12
  402. package/dist/lib/services/playground-service.js +0 -65
  403. package/dist/lib/services/playground-service.js.map +0 -1
  404. package/dist/lib/util/feature-evaluator/client.js.map +0 -1
  405. package/dist/lib/util/feature-evaluator/constraint.js.map +0 -1
  406. package/dist/lib/util/feature-evaluator/context.js.map +0 -1
  407. package/dist/lib/util/feature-evaluator/feature-evaluator.js.map +0 -1
  408. package/dist/lib/util/feature-evaluator/feature.js.map +0 -1
  409. package/dist/lib/util/feature-evaluator/helpers.js.map +0 -1
  410. package/dist/lib/util/feature-evaluator/index.js.map +0 -1
  411. package/dist/lib/util/feature-evaluator/repository/bootstrap-provider.js.map +0 -1
  412. package/dist/lib/util/feature-evaluator/repository/index.js.map +0 -1
  413. package/dist/lib/util/feature-evaluator/repository/storage-provider-in-mem.js.map +0 -1
  414. package/dist/lib/util/feature-evaluator/repository/storage-provider.js.map +0 -1
  415. package/dist/lib/util/feature-evaluator/strategy/application-hostname-strategy.js.map +0 -1
  416. package/dist/lib/util/feature-evaluator/strategy/default-strategy.js.map +0 -1
  417. package/dist/lib/util/feature-evaluator/strategy/flexible-rollout-strategy.js.map +0 -1
  418. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-random.js.map +0 -1
  419. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-session-id.js.map +0 -1
  420. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-user-id.js.map +0 -1
  421. package/dist/lib/util/feature-evaluator/strategy/index.js.map +0 -1
  422. package/dist/lib/util/feature-evaluator/strategy/remote-address-strategy.js.map +0 -1
  423. package/dist/lib/util/feature-evaluator/strategy/strategy.js.map +0 -1
  424. package/dist/lib/util/feature-evaluator/strategy/unknown-strategy.js.map +0 -1
  425. package/dist/lib/util/feature-evaluator/strategy/user-with-id-strategy.js.map +0 -1
  426. package/dist/lib/util/feature-evaluator/strategy/util.js.map +0 -1
  427. package/dist/lib/util/feature-evaluator/variant.js.map +0 -1
  428. package/dist/lib/util/offline-unleash-client.js.map +0 -1
  429. package/dist/lib/util/offline-unleash-client.test.js.map +0 -1
  430. package/frontend/build/static/CreateProject-217f67b6.js +0 -4
  431. package/frontend/build/static/FeatureArchiveDialog-c311c641.js +0 -4
  432. package/frontend/build/static/FeatureViewLazyExport-06cf4baa.js +0 -7
  433. package/frontend/build/static/LazyAdminExport-04c8032d.js +0 -43
  434. package/frontend/build/static/LazyProjectExport-d9663a8c.js +0 -19
  435. package/frontend/build/static/NetworkOverview-2bce4916.js +0 -1296
  436. package/frontend/build/static/NetworkTraffic-7db94d86.js +0 -1
  437. package/frontend/build/static/StrategyItemContainer-0140b94f.js +0 -1
  438. package/frontend/build/static/index-1f392976.js +0 -450
  439. package/frontend/build/static/useProjectRole-122ac4bb.js +0 -1
  440. package/frontend/build/static/v4-a960c1f4.js +0 -1
  441. /package/dist/lib/{routes/admin-api/playground.test.d.ts → db/feature-strategy-store.test.d.ts} +0 -0
  442. /package/dist/lib/{util → features/playground}/feature-evaluator/constraint.d.ts +0 -0
  443. /package/dist/lib/{util → features/playground}/feature-evaluator/constraint.js +0 -0
  444. /package/dist/lib/{util → features/playground}/feature-evaluator/context.d.ts +0 -0
  445. /package/dist/lib/{util → features/playground}/feature-evaluator/context.js +0 -0
  446. /package/dist/lib/{util → features/playground}/feature-evaluator/feature-evaluator.d.ts +0 -0
  447. /package/dist/lib/{util → features/playground}/feature-evaluator/feature-evaluator.js +0 -0
  448. /package/dist/lib/{util → features/playground}/feature-evaluator/feature.d.ts +0 -0
  449. /package/dist/lib/{util → features/playground}/feature-evaluator/feature.js +0 -0
  450. /package/dist/lib/{util → features/playground}/feature-evaluator/helpers.js +0 -0
  451. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/bootstrap-provider.d.ts +0 -0
  452. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/bootstrap-provider.js +0 -0
  453. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/index.d.ts +0 -0
  454. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/index.js +0 -0
  455. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider-in-mem.d.ts +0 -0
  456. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider-in-mem.js +0 -0
  457. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider.d.ts +0 -0
  458. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider.js +0 -0
  459. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/application-hostname-strategy.d.ts +0 -0
  460. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/application-hostname-strategy.js +0 -0
  461. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/default-strategy.d.ts +0 -0
  462. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/default-strategy.js +0 -0
  463. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/flexible-rollout-strategy.d.ts +0 -0
  464. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/flexible-rollout-strategy.js +0 -0
  465. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-random.d.ts +0 -0
  466. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-random.js +0 -0
  467. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-session-id.d.ts +0 -0
  468. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-session-id.js +0 -0
  469. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-user-id.d.ts +0 -0
  470. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-user-id.js +0 -0
  471. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/index.d.ts +0 -0
  472. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/index.js +0 -0
  473. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/remote-address-strategy.d.ts +0 -0
  474. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/remote-address-strategy.js +0 -0
  475. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/strategy.d.ts +0 -0
  476. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/strategy.js +0 -0
  477. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/unknown-strategy.d.ts +0 -0
  478. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/user-with-id-strategy.d.ts +0 -0
  479. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/user-with-id-strategy.js +0 -0
  480. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/util.d.ts +0 -0
  481. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/util.js +0 -0
  482. /package/dist/lib/{util → features/playground}/feature-evaluator/variant.d.ts +0 -0
  483. /package/dist/lib/{util → features/playground}/feature-evaluator/variant.js +0 -0
  484. /package/dist/lib/{util → features/playground}/offline-unleash-client.d.ts +0 -0
  485. /package/dist/lib/{util → features/playground}/offline-unleash-client.test.d.ts +0 -0
@@ -3,23 +3,30 @@ export declare const clientFeaturesSchema: {
3
3
  readonly $id: "#/components/schemas/clientFeaturesSchema";
4
4
  readonly type: "object";
5
5
  readonly required: readonly ["version", "features"];
6
+ readonly description: "Configuration data for server-side SDKs for evaluating feature flags.";
6
7
  readonly properties: {
7
8
  readonly version: {
8
9
  readonly type: "number";
10
+ readonly description: "A version number for the format used in the response. Most Unleash instances now return version 2, which includes segments as a separate array";
11
+ readonly example: 2;
12
+ readonly minimum: 0;
9
13
  };
10
14
  readonly features: {
15
+ readonly description: "A list of feature toggles with their configuration";
11
16
  readonly type: "array";
12
17
  readonly items: {
13
18
  readonly $ref: "#/components/schemas/clientFeatureSchema";
14
19
  };
15
20
  };
16
21
  readonly segments: {
22
+ readonly description: "A list of [Segments](https://docs.getunleash.io/reference/segments) configured for this Unleash instance";
17
23
  readonly type: "array";
18
24
  readonly items: {
19
25
  readonly $ref: "#/components/schemas/segmentSchema";
20
26
  };
21
27
  };
22
28
  readonly query: {
29
+ readonly description: "A summary of filters and parameters sent to the endpoint. Used by the server to build the features and segments response";
23
30
  readonly $ref: "#/components/schemas/clientFeaturesQuerySchema";
24
31
  };
25
32
  };
@@ -73,55 +80,60 @@ export declare const clientFeaturesSchema: {
73
80
  readonly $id: "#/components/schemas/clientFeatureSchema";
74
81
  readonly type: "object";
75
82
  readonly required: readonly ["name", "enabled"];
83
+ readonly description: "Feature toggle configuration used by SDKs to evaluate state of a toggle";
76
84
  readonly additionalProperties: false;
77
85
  readonly properties: {
78
86
  readonly name: {
79
87
  readonly type: "string";
88
+ readonly description: "The unique name of a feature toggle. Is validated to be URL safe on creation";
89
+ readonly example: "new.payment.flow.stripe";
80
90
  };
81
91
  readonly type: {
82
92
  readonly type: "string";
93
+ readonly description: "What kind of feature flag is this. Refer to the documentation on [feature toggle types](https://docs.getunleash.io/reference/feature-toggle-types) for more information";
94
+ readonly example: "release";
83
95
  };
84
96
  readonly description: {
85
97
  readonly type: "string";
98
+ readonly description: "A description of the toggle";
86
99
  readonly nullable: true;
87
- };
88
- readonly createdAt: {
89
- readonly type: "string";
90
- readonly format: "date-time";
91
- readonly nullable: true;
92
- };
93
- readonly lastSeenAt: {
94
- readonly type: "string";
95
- readonly format: "date-time";
96
- readonly nullable: true;
100
+ readonly example: "No variants here";
97
101
  };
98
102
  readonly enabled: {
99
103
  readonly type: "boolean";
104
+ readonly description: "Whether the feature flag is enabled for the current API key or not. This is ANDed with the evaluation results of the strategies list, so if this is false, the evaluation result will always be false";
105
+ readonly example: true;
100
106
  };
101
107
  readonly stale: {
108
+ readonly description: "If this is true Unleash believes this feature toggle has been active longer than Unleash expects a toggle of this type to be active";
102
109
  readonly type: "boolean";
110
+ readonly example: false;
103
111
  };
104
112
  readonly impressionData: {
113
+ readonly description: "Set to true if SDKs should trigger [impression events](https://docs.getunleash.io/reference/impression-data) when this toggle is evaluated";
105
114
  readonly type: "boolean";
106
115
  readonly nullable: true;
116
+ readonly example: false;
107
117
  };
108
118
  readonly project: {
119
+ readonly description: "Which project this feature toggle belongs to";
109
120
  readonly type: "string";
121
+ readonly example: "new.payment.flow";
110
122
  };
111
123
  readonly strategies: {
112
124
  readonly type: "array";
125
+ readonly description: "Evaluation strategies for this toggle. Each entry in this list will be evaluated and ORed together";
113
126
  readonly items: {
114
127
  readonly $ref: "#/components/schemas/featureStrategySchema";
115
128
  };
116
- readonly deprecated: true;
117
129
  };
118
130
  readonly variants: {
119
131
  readonly type: "array";
132
+ readonly description: "[Variants](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) configured for this toggle";
120
133
  readonly items: {
121
134
  readonly $ref: "#/components/schemas/variantSchema";
122
135
  };
123
136
  readonly nullable: true;
124
- readonly deprecated: true;
125
137
  };
126
138
  };
127
139
  readonly components: {
@@ -180,7 +192,7 @@ export declare const clientFeaturesSchema: {
180
192
  };
181
193
  readonly featureStrategySchema: {
182
194
  readonly $id: "#/components/schemas/featureStrategySchema";
183
- readonly description: "A singles activation strategy configuration schema for a feature";
195
+ readonly description: "A single activation strategy configuration schema for a feature";
184
196
  readonly type: "object";
185
197
  readonly additionalProperties: false;
186
198
  readonly required: readonly ["name"];
@@ -297,23 +309,34 @@ export declare const clientFeaturesSchema: {
297
309
  readonly $id: "#/components/schemas/variantSchema";
298
310
  readonly type: "object";
299
311
  readonly additionalProperties: false;
312
+ readonly description: "A variant allows for further separation of users into segments. See [our excellent documentation](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) for a more detailed description";
300
313
  readonly required: readonly ["name", "weight"];
301
314
  readonly properties: {
302
315
  readonly name: {
303
316
  readonly type: "string";
317
+ readonly description: "The variants name. Is unique for this feature toggle";
318
+ readonly example: "blue_group";
304
319
  };
305
320
  readonly weight: {
306
321
  readonly type: "number";
322
+ readonly description: "The weight is the likelihood of any one user getting this variant. It is a number between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/reference/feature-toggle-variants#variant-weight) for more information";
323
+ readonly minimum: 0;
324
+ readonly maximum: 1000;
307
325
  };
308
326
  readonly weightType: {
327
+ readonly description: "Set to fix if this variant must have exactly the weight allocated to it. If the type is variable, the weight will adjust so that the total weight of all variants adds up to 1000";
309
328
  readonly type: "string";
329
+ readonly example: "fix";
310
330
  };
311
331
  readonly stickiness: {
312
332
  readonly type: "string";
333
+ readonly description: "[Stickiness](https://docs.getunleash.io/reference/feature-toggle-variants#variant-stickiness) is how Unleash guarantees that the same user gets the same variant every time";
334
+ readonly example: "custom.context.field";
313
335
  };
314
336
  readonly payload: {
315
337
  readonly type: "object";
316
338
  readonly required: readonly ["type", "value"];
339
+ readonly description: "Extra data configured for this variant";
317
340
  readonly properties: {
318
341
  readonly type: {
319
342
  readonly type: "string";
@@ -322,8 +345,13 @@ export declare const clientFeaturesSchema: {
322
345
  readonly type: "string";
323
346
  };
324
347
  };
348
+ readonly example: {
349
+ readonly type: "json";
350
+ readonly value: "{color: red}";
351
+ };
325
352
  };
326
353
  readonly overrides: {
354
+ readonly description: "Overrides assigning specific variants to specific users. The weighting system automatically assigns users to specific groups for you, but any overrides in this list will take precedence.";
327
355
  readonly type: "array";
328
356
  readonly items: {
329
357
  readonly $ref: "#/components/schemas/overrideSchema";
@@ -337,15 +365,20 @@ export declare const clientFeaturesSchema: {
337
365
  readonly type: "object";
338
366
  readonly additionalProperties: false;
339
367
  readonly required: readonly ["contextName", "values"];
368
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
340
369
  readonly properties: {
341
370
  readonly contextName: {
371
+ readonly description: "The name of the context field used to determine overrides";
342
372
  readonly type: "string";
373
+ readonly example: "userId";
343
374
  };
344
375
  readonly values: {
376
+ readonly description: "Which values that should be overriden";
345
377
  readonly type: "array";
346
378
  readonly items: {
347
379
  readonly type: "string";
348
380
  };
381
+ readonly example: readonly ["red", "blue"];
349
382
  };
350
383
  };
351
384
  readonly components: {};
@@ -358,15 +391,20 @@ export declare const clientFeaturesSchema: {
358
391
  readonly type: "object";
359
392
  readonly additionalProperties: false;
360
393
  readonly required: readonly ["contextName", "values"];
394
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
361
395
  readonly properties: {
362
396
  readonly contextName: {
397
+ readonly description: "The name of the context field used to determine overrides";
363
398
  readonly type: "string";
399
+ readonly example: "userId";
364
400
  };
365
401
  readonly values: {
402
+ readonly description: "Which values that should be overriden";
366
403
  readonly type: "array";
367
404
  readonly items: {
368
405
  readonly type: "string";
369
406
  };
407
+ readonly example: readonly ["red", "blue"];
370
408
  };
371
409
  };
372
410
  readonly components: {};
@@ -513,30 +551,42 @@ export declare const clientFeaturesSchema: {
513
551
  readonly $id: "#/components/schemas/clientFeaturesQuerySchema";
514
552
  readonly type: "object";
515
553
  readonly additionalProperties: false;
554
+ readonly description: "Query parameters active for a client features request";
516
555
  readonly properties: {
517
556
  readonly tag: {
518
557
  readonly type: "array";
558
+ readonly description: "Features tagged with one of these tags are included";
519
559
  readonly items: {
520
560
  readonly type: "array";
521
561
  readonly items: {
522
562
  readonly type: "string";
523
563
  };
524
564
  };
565
+ readonly example: readonly [readonly ["simple:payment", "simple:stripejourney"]];
525
566
  };
526
567
  readonly project: {
527
568
  readonly type: "array";
528
569
  readonly items: {
529
570
  readonly type: "string";
530
571
  };
572
+ readonly description: "Features that are part of these projects are included in this response. (DEPRECATED) - Handled by API tokens";
573
+ readonly example: readonly ["new.payment.flow"];
574
+ readonly deprecated: true;
531
575
  };
532
576
  readonly namePrefix: {
577
+ readonly description: "Features are filtered to only include features whose name starts with this prefix";
533
578
  readonly type: "string";
579
+ readonly example: "payment";
534
580
  };
535
581
  readonly environment: {
536
582
  readonly type: "string";
583
+ readonly description: "Strategies for the feature toggle configured for this environment are included. (DEPRECATED) - Handled by API tokens";
584
+ readonly deprecated: true;
537
585
  };
538
586
  readonly inlineSegmentConstraints: {
587
+ readonly description: "Set to true if requesting client does not support Unleash-Client-Specification 4.2.2 or newer. Modern SDKs will have this set to false, since they will be able to merge constraints and segments themselves";
539
588
  readonly type: "boolean";
589
+ readonly example: true;
540
590
  };
541
591
  };
542
592
  readonly components: {};
@@ -546,15 +596,20 @@ export declare const clientFeaturesSchema: {
546
596
  readonly type: "object";
547
597
  readonly additionalProperties: false;
548
598
  readonly required: readonly ["contextName", "values"];
599
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
549
600
  readonly properties: {
550
601
  readonly contextName: {
602
+ readonly description: "The name of the context field used to determine overrides";
551
603
  readonly type: "string";
604
+ readonly example: "userId";
552
605
  };
553
606
  readonly values: {
607
+ readonly description: "Which values that should be overriden";
554
608
  readonly type: "array";
555
609
  readonly items: {
556
610
  readonly type: "string";
557
611
  };
612
+ readonly example: readonly ["red", "blue"];
558
613
  };
559
614
  };
560
615
  readonly components: {};
@@ -569,7 +624,7 @@ export declare const clientFeaturesSchema: {
569
624
  };
570
625
  readonly featureStrategySchema: {
571
626
  readonly $id: "#/components/schemas/featureStrategySchema";
572
- readonly description: "A singles activation strategy configuration schema for a feature";
627
+ readonly description: "A single activation strategy configuration schema for a feature";
573
628
  readonly type: "object";
574
629
  readonly additionalProperties: false;
575
630
  readonly required: readonly ["name"];
@@ -686,23 +741,34 @@ export declare const clientFeaturesSchema: {
686
741
  readonly $id: "#/components/schemas/variantSchema";
687
742
  readonly type: "object";
688
743
  readonly additionalProperties: false;
744
+ readonly description: "A variant allows for further separation of users into segments. See [our excellent documentation](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) for a more detailed description";
689
745
  readonly required: readonly ["name", "weight"];
690
746
  readonly properties: {
691
747
  readonly name: {
692
748
  readonly type: "string";
749
+ readonly description: "The variants name. Is unique for this feature toggle";
750
+ readonly example: "blue_group";
693
751
  };
694
752
  readonly weight: {
695
753
  readonly type: "number";
754
+ readonly description: "The weight is the likelihood of any one user getting this variant. It is a number between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/reference/feature-toggle-variants#variant-weight) for more information";
755
+ readonly minimum: 0;
756
+ readonly maximum: 1000;
696
757
  };
697
758
  readonly weightType: {
759
+ readonly description: "Set to fix if this variant must have exactly the weight allocated to it. If the type is variable, the weight will adjust so that the total weight of all variants adds up to 1000";
698
760
  readonly type: "string";
761
+ readonly example: "fix";
699
762
  };
700
763
  readonly stickiness: {
701
764
  readonly type: "string";
765
+ readonly description: "[Stickiness](https://docs.getunleash.io/reference/feature-toggle-variants#variant-stickiness) is how Unleash guarantees that the same user gets the same variant every time";
766
+ readonly example: "custom.context.field";
702
767
  };
703
768
  readonly payload: {
704
769
  readonly type: "object";
705
770
  readonly required: readonly ["type", "value"];
771
+ readonly description: "Extra data configured for this variant";
706
772
  readonly properties: {
707
773
  readonly type: {
708
774
  readonly type: "string";
@@ -711,8 +777,13 @@ export declare const clientFeaturesSchema: {
711
777
  readonly type: "string";
712
778
  };
713
779
  };
780
+ readonly example: {
781
+ readonly type: "json";
782
+ readonly value: "{color: red}";
783
+ };
714
784
  };
715
785
  readonly overrides: {
786
+ readonly description: "Overrides assigning specific variants to specific users. The weighting system automatically assigns users to specific groups for you, but any overrides in this list will take precedence.";
716
787
  readonly type: "array";
717
788
  readonly items: {
718
789
  readonly $ref: "#/components/schemas/overrideSchema";
@@ -726,15 +797,20 @@ export declare const clientFeaturesSchema: {
726
797
  readonly type: "object";
727
798
  readonly additionalProperties: false;
728
799
  readonly required: readonly ["contextName", "values"];
800
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
729
801
  readonly properties: {
730
802
  readonly contextName: {
803
+ readonly description: "The name of the context field used to determine overrides";
731
804
  readonly type: "string";
805
+ readonly example: "userId";
732
806
  };
733
807
  readonly values: {
808
+ readonly description: "Which values that should be overriden";
734
809
  readonly type: "array";
735
810
  readonly items: {
736
811
  readonly type: "string";
737
812
  };
813
+ readonly example: readonly ["red", "blue"];
738
814
  };
739
815
  };
740
816
  readonly components: {};
@@ -14,23 +14,30 @@ exports.clientFeaturesSchema = {
14
14
  $id: '#/components/schemas/clientFeaturesSchema',
15
15
  type: 'object',
16
16
  required: ['version', 'features'],
17
+ description: 'Configuration data for server-side SDKs for evaluating feature flags.',
17
18
  properties: {
18
19
  version: {
19
20
  type: 'number',
21
+ description: 'A version number for the format used in the response. Most Unleash instances now return version 2, which includes segments as a separate array',
22
+ example: 2,
23
+ minimum: 0,
20
24
  },
21
25
  features: {
26
+ description: 'A list of feature toggles with their configuration',
22
27
  type: 'array',
23
28
  items: {
24
29
  $ref: '#/components/schemas/clientFeatureSchema',
25
30
  },
26
31
  },
27
32
  segments: {
33
+ description: 'A list of [Segments](https://docs.getunleash.io/reference/segments) configured for this Unleash instance',
28
34
  type: 'array',
29
35
  items: {
30
36
  $ref: '#/components/schemas/segmentSchema',
31
37
  },
32
38
  },
33
39
  query: {
40
+ description: 'A summary of filters and parameters sent to the endpoint. Used by the server to build the features and segments response',
34
41
  $ref: '#/components/schemas/clientFeaturesQuerySchema',
35
42
  },
36
43
  },
@@ -1 +1 @@
1
- {"version":3,"file":"client-features-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/client-features-schema.ts"],"names":[],"mappings":";;;AACA,iFAA2E;AAC3E,qDAAiD;AACjD,2DAAuD;AACvD,6DAAyD;AACzD,uDAAmD;AACnD,2DAAuD;AACvD,uEAAkE;AAClE,mEAA8D;AAC9D,qDAAiD;AAEpC,QAAA,oBAAoB,GAAG;IAChC,GAAG,EAAE,2CAA2C;IAChD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;IACjC,UAAU,EAAE;QACR,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;SACjB;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,0CAA0C;aACnD;SACJ;QACD,QAAQ,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,oCAAoC;aAC7C;SACJ;QACD,KAAK,EAAE;YACH,IAAI,EAAE,gDAAgD;SACzD;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,gBAAgB,EAAhB,oCAAgB;YAChB,mBAAmB,EAAnB,2CAAmB;YACnB,iBAAiB,EAAjB,sCAAiB;YACjB,aAAa,EAAb,8BAAa;YACb,yBAAyB,EAAzB,wDAAyB;YACzB,cAAc,EAAd,gCAAc;YACd,gBAAgB,EAAhB,oCAAgB;YAChB,qBAAqB,EAArB,+CAAqB;YACrB,aAAa,EAAb,8BAAa;SAChB;KACJ;CACK,CAAC"}
1
+ {"version":3,"file":"client-features-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/client-features-schema.ts"],"names":[],"mappings":";;;AACA,iFAA2E;AAC3E,qDAAiD;AACjD,2DAAuD;AACvD,6DAAyD;AACzD,uDAAmD;AACnD,2DAAuD;AACvD,uEAAkE;AAClE,mEAA8D;AAC9D,qDAAiD;AAEpC,QAAA,oBAAoB,GAAG;IAChC,GAAG,EAAE,2CAA2C;IAChD,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;IACjC,WAAW,EACP,uEAAuE;IAC3E,UAAU,EAAE;QACR,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EACP,gJAAgJ;YACpJ,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;SACb;QACD,QAAQ,EAAE;YACN,WAAW,EAAE,oDAAoD;YACjE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,0CAA0C;aACnD;SACJ;QACD,QAAQ,EAAE;YACN,WAAW,EACP,0GAA0G;YAC9G,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,oCAAoC;aAC7C;SACJ;QACD,KAAK,EAAE;YACH,WAAW,EACP,0HAA0H;YAC9H,IAAI,EAAE,gDAAgD;SACzD;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,gBAAgB,EAAhB,oCAAgB;YAChB,mBAAmB,EAAnB,2CAAmB;YACnB,iBAAiB,EAAjB,sCAAiB;YACjB,aAAa,EAAb,8BAAa;YACb,yBAAyB,EAAzB,wDAAyB;YACzB,cAAc,EAAd,gCAAc;YACd,gBAAgB,EAAhB,oCAAgB;YAChB,qBAAqB,EAArB,+CAAqB;YACrB,aAAa,EAAb,8BAAa;SAChB;KACJ;CACK,CAAC"}
@@ -17,7 +17,7 @@ test('clientFeaturesSchema required fields', () => {
17
17
  {
18
18
  name: 'a',
19
19
  weight: 1,
20
- weightType: 'b',
20
+ weightType: 'fix',
21
21
  stickiness: 'c',
22
22
  payload: {
23
23
  type: 'a',
@@ -43,7 +43,6 @@ test('clientFeaturesSchema java-sdk expected response', () => {
43
43
  {
44
44
  "id": 1,
45
45
  "name": "some-name",
46
- "description": null,
47
46
  "constraints": [
48
47
  {
49
48
  "contextName": "some-name",
@@ -58,19 +57,16 @@ test('clientFeaturesSchema java-sdk expected response', () => {
58
57
  "features": [
59
58
  {
60
59
  "name": "Test.old",
61
- "description": "No variants here!",
62
60
  "enabled": true,
63
61
  "strategies": [
64
62
  {
65
63
  "name": "default"
66
64
  }
67
65
  ],
68
- "variants": null,
69
- "createdAt": "2019-01-24T10:38:10.370Z"
66
+ "variants": null
70
67
  },
71
68
  {
72
69
  "name": "Test.variants",
73
- "description": null,
74
70
  "enabled": true,
75
71
  "strategies": [
76
72
  {
@@ -89,8 +85,7 @@ test('clientFeaturesSchema java-sdk expected response', () => {
89
85
  "name": "variant2",
90
86
  "weight": 50
91
87
  }
92
- ],
93
- "createdAt": "2019-01-24T10:41:45.236Z"
88
+ ]
94
89
  },
95
90
  {
96
91
  "name": "featureX",
@@ -164,8 +159,7 @@ test('clientFeaturesSchema unleash-proxy expected response', () => {
164
159
  "name": "default"
165
160
  }
166
161
  ],
167
- "variants": null,
168
- "createdAt": "2019-01-24T10:38:10.370Z"
162
+ "variants": null
169
163
  },
170
164
  {
171
165
  "name": "Test.variants",
@@ -188,8 +182,7 @@ test('clientFeaturesSchema unleash-proxy expected response', () => {
188
182
  "name": "variant2",
189
183
  "weight": 50
190
184
  }
191
- ],
192
- "createdAt": "2019-01-24T10:41:45.236Z"
185
+ ]
193
186
  },
194
187
  {
195
188
  "name": "featureX",
@@ -1 +1 @@
1
- {"version":3,"file":"client-features-schema.test.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/client-features-schema.test.ts"],"names":[],"mappings":";;AAAA,0CAA6C;AAG7C,IAAI,CAAC,gCAAgC,EAAE,GAAG,EAAE;IACxC,MAAM,CACF,IAAA,yBAAc,EAAC,2CAA2C,EAAE,EAAE,CAAC,CAClE,CAAC,eAAe,EAAE,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,sCAAsC,EAAE,GAAG,EAAE;IAC9C,MAAM,IAAI,GAAyB;QAC/B,OAAO,EAAE,CAAC;QACV,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,KAAK;gBACd,cAAc,EAAE,KAAK;gBACrB,QAAQ,EAAE;oBACN;wBACI,IAAI,EAAE,GAAG;wBACT,MAAM,EAAE,CAAC;wBACT,UAAU,EAAE,GAAG;wBACf,UAAU,EAAE,GAAG;wBACf,OAAO,EAAE;4BACL,IAAI,EAAE,GAAG;4BACT,KAAK,EAAE,GAAG;yBACb;wBACD,SAAS,EAAE;4BACP;gCACI,WAAW,EAAE,GAAG;gCAChB,MAAM,EAAE,CAAC,GAAG,CAAC;6BAChB;yBACJ;qBACJ;iBACJ;aACJ;SACJ;KACJ,CAAC;IAEF,MAAM,CACF,IAAA,yBAAc,EAAC,2CAA2C,EAAE,IAAI,CAAC,CACpE,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,iDAAiD,EAAE,GAAG,EAAE;IACzD,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+FX,CAAC;IAEH,MAAM,CACF,IAAA,yBAAc,EACV,2CAA2C,EAC3C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CACnB,CACJ,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,sDAAsD,EAAE,GAAG,EAAE;IAC9D,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+FX,CAAC;IAEH,MAAM,CACF,IAAA,yBAAc,EACV,2CAA2C,EAC3C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CACnB,CACJ,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,mDAAmD,EAAE,GAAG,EAAE;IAC3D,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6JX,CAAC;IAEH,MAAM,CACF,IAAA,yBAAc,EACV,2CAA2C,EAC3C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CACnB,CACJ,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"client-features-schema.test.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/client-features-schema.test.ts"],"names":[],"mappings":";;AAAA,0CAA6C;AAG7C,IAAI,CAAC,gCAAgC,EAAE,GAAG,EAAE;IACxC,MAAM,CACF,IAAA,yBAAc,EAAC,2CAA2C,EAAE,EAAE,CAAC,CAClE,CAAC,eAAe,EAAE,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,sCAAsC,EAAE,GAAG,EAAE;IAC9C,MAAM,IAAI,GAAyB;QAC/B,OAAO,EAAE,CAAC;QACV,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,KAAK;gBACd,cAAc,EAAE,KAAK;gBACrB,QAAQ,EAAE;oBACN;wBACI,IAAI,EAAE,GAAG;wBACT,MAAM,EAAE,CAAC;wBACT,UAAU,EAAE,KAAK;wBACjB,UAAU,EAAE,GAAG;wBACf,OAAO,EAAE;4BACL,IAAI,EAAE,GAAG;4BACT,KAAK,EAAE,GAAG;yBACb;wBACD,SAAS,EAAE;4BACP;gCACI,WAAW,EAAE,GAAG;gCAChB,MAAM,EAAE,CAAC,GAAG,CAAC;6BAChB;yBACJ;qBACJ;iBACJ;aACJ;SACJ;KACJ,CAAC;IAEF,MAAM,CACF,IAAA,yBAAc,EAAC,2CAA2C,EAAE,IAAI,CAAC,CACpE,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,iDAAiD,EAAE,GAAG,EAAE;IACzD,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0FX,CAAC;IAEH,MAAM,CACF,IAAA,yBAAc,EACV,2CAA2C,EAC3C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CACnB,CACJ,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,sDAAsD,EAAE,GAAG,EAAE;IAC9D,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6FX,CAAC;IAEH,MAAM,CACF,IAAA,yBAAc,EACV,2CAA2C,EAC3C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CACnB,CACJ,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,mDAAmD,EAAE,GAAG,EAAE;IAC3D,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6JX,CAAC;IAEH,MAAM,CACF,IAAA,yBAAc,EACV,2CAA2C,EAC3C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CACnB,CACJ,CAAC,aAAa,EAAE,CAAC;AACtB,CAAC,CAAC,CAAC"}
@@ -69,7 +69,7 @@ export declare const clientMetricsSchema: {
69
69
  readonly minimum: 0;
70
70
  };
71
71
  readonly variants: {
72
- readonly description: "How many times each variant was returned";
72
+ readonly description: "An object describing how many times each variant was returned. Variant names are used as properties, and the number of times they were exposed is the corresponding value (i.e. `{ [variantName]: number }`).";
73
73
  readonly type: "object";
74
74
  readonly additionalProperties: {
75
75
  readonly type: "integer";
@@ -72,7 +72,7 @@ exports.clientMetricsSchema = {
72
72
  minimum: 0,
73
73
  },
74
74
  variants: {
75
- description: 'How many times each variant was returned',
75
+ description: 'An object describing how many times each variant was returned. Variant names are used as properties, and the number of times they were exposed is the corresponding value (i.e. `{ [variantName]: number }`).',
76
76
  type: 'object',
77
77
  additionalProperties: {
78
78
  type: 'integer',
@@ -1 +1 @@
1
- {"version":3,"file":"client-metrics-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/client-metrics-schema.ts"],"names":[],"mappings":";;;AACA,+CAA2C;AAE9B,QAAA,mBAAmB,GAAG;IAC/B,GAAG,EAAE,0CAA0C;IAC/C,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IAC/B,WAAW,EACP,yEAAyE;IAC7E,UAAU,EAAE;QACR,OAAO,EAAE;YACL,WAAW,EACP,wDAAwD;YAC5D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,oBAAoB;SAChC;QACD,UAAU,EAAE;YACR,WAAW,EACP,qHAAqH;YACzH,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,2BAA2B;SACvC;QACD,WAAW,EAAE;YACT,WAAW,EAAE,iDAAiD;YAC9D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,aAAa;SACzB;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC;YACtC,WAAW,EACP,yEAAyE;YAC7E,UAAU,EAAE;gBACR,KAAK,EAAE;oBACH,IAAI,EAAE,iCAAiC;oBACvC,WAAW,EACP,6FAA6F;oBACjG,OAAO,EAAE,0BAA0B;iBACtC;gBACD,IAAI,EAAE;oBACF,IAAI,EAAE,iCAAiC;oBACvC,WAAW,EACP,mFAAmF;oBACvF,OAAO,EAAE,0BAA0B;iBACtC;gBACD,OAAO,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EACP,mEAAmE;oBACvE,OAAO,EAAE;wBACL,YAAY,EAAE;4BACV,GAAG,EAAE,EAAE;4BACP,EAAE,EAAE,EAAE;4BACN,QAAQ,EAAE;gCACN,IAAI,EAAE,CAAC;gCACP,KAAK,EAAE,EAAE;gCACT,GAAG,EAAE,EAAE;6BACV;yBACJ;wBACD,aAAa,EAAE;4BACX,GAAG,EAAE,CAAC;4BACN,EAAE,EAAE,GAAG;yBACV;qBACJ;oBACD,oBAAoB,EAAE;wBAClB,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACR,GAAG,EAAE;gCACD,WAAW,EACP,6CAA6C;gCACjD,IAAI,EAAE,QAAQ;gCACd,OAAO,EAAE,GAAG;gCACZ,OAAO,EAAE,CAAC;6BACb;4BACD,EAAE,EAAE;gCACA,WAAW,EACP,8CAA8C;gCAClD,IAAI,EAAE,SAAS;gCACf,OAAO,EAAE,EAAE;gCACX,OAAO,EAAE,CAAC;6BACb;4BACD,QAAQ,EAAE;gCACN,WAAW,EACP,0CAA0C;gCAC9C,IAAI,EAAE,QAAQ;gCACd,oBAAoB,EAAE;oCAClB,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE,CAAC;iCACb;gCACD,OAAO,EAAE;oCACL,QAAQ,EAAE,EAAE;oCACZ,QAAQ,EAAE,EAAE;oCACZ,QAAQ,EAAE,CAAC;iCACd;6BACJ;yBACJ;qBACJ;iBACJ;aACJ;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,UAAU,EAAV,wBAAU;SACb;KACJ;CACK,CAAC"}
1
+ {"version":3,"file":"client-metrics-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/client-metrics-schema.ts"],"names":[],"mappings":";;;AACA,+CAA2C;AAE9B,QAAA,mBAAmB,GAAG;IAC/B,GAAG,EAAE,0CAA0C;IAC/C,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IAC/B,WAAW,EACP,yEAAyE;IAC7E,UAAU,EAAE;QACR,OAAO,EAAE;YACL,WAAW,EACP,wDAAwD;YAC5D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,oBAAoB;SAChC;QACD,UAAU,EAAE;YACR,WAAW,EACP,qHAAqH;YACzH,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,2BAA2B;SACvC;QACD,WAAW,EAAE;YACT,WAAW,EAAE,iDAAiD;YAC9D,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,aAAa;SACzB;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC;YACtC,WAAW,EACP,yEAAyE;YAC7E,UAAU,EAAE;gBACR,KAAK,EAAE;oBACH,IAAI,EAAE,iCAAiC;oBACvC,WAAW,EACP,6FAA6F;oBACjG,OAAO,EAAE,0BAA0B;iBACtC;gBACD,IAAI,EAAE;oBACF,IAAI,EAAE,iCAAiC;oBACvC,WAAW,EACP,mFAAmF;oBACvF,OAAO,EAAE,0BAA0B;iBACtC;gBACD,OAAO,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EACP,mEAAmE;oBACvE,OAAO,EAAE;wBACL,YAAY,EAAE;4BACV,GAAG,EAAE,EAAE;4BACP,EAAE,EAAE,EAAE;4BACN,QAAQ,EAAE;gCACN,IAAI,EAAE,CAAC;gCACP,KAAK,EAAE,EAAE;gCACT,GAAG,EAAE,EAAE;6BACV;yBACJ;wBACD,aAAa,EAAE;4BACX,GAAG,EAAE,CAAC;4BACN,EAAE,EAAE,GAAG;yBACV;qBACJ;oBACD,oBAAoB,EAAE;wBAClB,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACR,GAAG,EAAE;gCACD,WAAW,EACP,6CAA6C;gCACjD,IAAI,EAAE,QAAQ;gCACd,OAAO,EAAE,GAAG;gCACZ,OAAO,EAAE,CAAC;6BACb;4BACD,EAAE,EAAE;gCACA,WAAW,EACP,8CAA8C;gCAClD,IAAI,EAAE,SAAS;gCACf,OAAO,EAAE,EAAE;gCACX,OAAO,EAAE,CAAC;6BACb;4BACD,QAAQ,EAAE;gCACN,WAAW,EACP,+MAA+M;gCACnN,IAAI,EAAE,QAAQ;gCACd,oBAAoB,EAAE;oCAClB,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE,CAAC;iCACb;gCACD,OAAO,EAAE;oCACL,QAAQ,EAAE,EAAE;oCACZ,QAAQ,EAAE,EAAE;oCACZ,QAAQ,EAAE,CAAC;iCACd;6BACJ;yBACJ;qBACJ;iBACJ;aACJ;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,UAAU,EAAV,wBAAU;SACb;KACJ;CACK,CAAC"}
@@ -10,6 +10,7 @@ export declare const contextFieldSchema: {
10
10
  };
11
11
  readonly description: {
12
12
  readonly type: "string";
13
+ readonly nullable: true;
13
14
  };
14
15
  readonly stickiness: {
15
16
  readonly type: "boolean";
@@ -22,6 +23,18 @@ export declare const contextFieldSchema: {
22
23
  readonly format: "date-time";
23
24
  readonly nullable: true;
24
25
  };
26
+ readonly usedInFeatures: {
27
+ readonly type: "number";
28
+ readonly description: "Number of projects where this context field is used in";
29
+ readonly example: 3;
30
+ readonly nullable: true;
31
+ };
32
+ readonly usedInProjects: {
33
+ readonly type: "number";
34
+ readonly description: "Number of projects where this context field is used in";
35
+ readonly example: 2;
36
+ readonly nullable: true;
37
+ };
25
38
  readonly legalValues: {
26
39
  readonly type: "array";
27
40
  readonly items: {
@@ -13,6 +13,7 @@ exports.contextFieldSchema = {
13
13
  },
14
14
  description: {
15
15
  type: 'string',
16
+ nullable: true,
16
17
  },
17
18
  stickiness: {
18
19
  type: 'boolean',
@@ -25,6 +26,18 @@ exports.contextFieldSchema = {
25
26
  format: 'date-time',
26
27
  nullable: true,
27
28
  },
29
+ usedInFeatures: {
30
+ type: 'number',
31
+ description: 'Number of projects where this context field is used in',
32
+ example: 3,
33
+ nullable: true,
34
+ },
35
+ usedInProjects: {
36
+ type: 'number',
37
+ description: 'Number of projects where this context field is used in',
38
+ example: 2,
39
+ nullable: true,
40
+ },
28
41
  legalValues: {
29
42
  type: 'array',
30
43
  items: {
@@ -1 +1 @@
1
- {"version":3,"file":"context-field-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/context-field-schema.ts"],"names":[],"mappings":";;;AACA,6DAAwD;AAE3C,QAAA,kBAAkB,GAAG;IAC9B,GAAG,EAAE,yCAAyC;IAC9C,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,SAAS;SAClB;QACD,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;SACjB;QACD,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,uCAAuC;aAChD;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,gBAAgB,EAAhB,qCAAgB;SACnB;KACJ;CACK,CAAC"}
1
+ {"version":3,"file":"context-field-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/context-field-schema.ts"],"names":[],"mappings":";;;AACA,6DAAwD;AAE3C,QAAA,kBAAkB,GAAG;IAC9B,GAAG,EAAE,yCAAyC;IAC9C,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACjB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,SAAS;SAClB;QACD,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;SACjB;QACD,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;SACjB;QACD,cAAc,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EACP,wDAAwD;YAC5D,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,IAAI;SACjB;QACD,cAAc,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EACP,wDAAwD;YAC5D,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,IAAI;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,uCAAuC;aAChD;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,gBAAgB,EAAhB,qCAAgB;SACnB;KACJ;CACK,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { FromSchema } from 'json-schema-to-ts';
2
+ export declare const contextFieldStrategiesSchema: {
3
+ readonly $id: "#/components/schemas/segmentStrategiesSchema";
4
+ readonly type: "object";
5
+ readonly description: "A wrapper object containing all for strategies using a specific context field";
6
+ readonly required: readonly ["strategies"];
7
+ readonly properties: {
8
+ readonly strategies: {
9
+ readonly type: "array";
10
+ readonly description: "List of strategies using the context field";
11
+ readonly items: {
12
+ readonly type: "object";
13
+ readonly required: readonly ["id", "featureName", "projectId", "environment", "strategyName"];
14
+ readonly properties: {
15
+ readonly id: {
16
+ readonly type: "string";
17
+ readonly example: "433ae8d9-dd69-4ad0-bc46-414aedbe9c55";
18
+ readonly description: "The ID of the strategy.";
19
+ };
20
+ readonly featureName: {
21
+ readonly type: "string";
22
+ readonly example: "best-feature";
23
+ readonly description: "The name of the feature that contains this strategy.";
24
+ };
25
+ readonly projectId: {
26
+ readonly type: "string";
27
+ readonly description: "The ID of the project that contains this feature.";
28
+ };
29
+ readonly environment: {
30
+ readonly type: "string";
31
+ readonly description: "The ID of the environment where this strategy is in.";
32
+ };
33
+ readonly strategyName: {
34
+ readonly type: "string";
35
+ readonly description: "The name of the strategy.";
36
+ };
37
+ };
38
+ };
39
+ };
40
+ };
41
+ readonly components: {};
42
+ };
43
+ export declare type ContextFieldStrategiesSchema = FromSchema<typeof contextFieldStrategiesSchema>;