unleash-server 5.1.9 → 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 (475) 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/role-store.js +2 -2
  27. package/dist/lib/db/role-store.js.map +1 -1
  28. package/dist/lib/db/segment-store.d.ts +6 -2
  29. package/dist/lib/db/segment-store.js +27 -6
  30. package/dist/lib/db/segment-store.js.map +1 -1
  31. package/dist/lib/error/no-access-error.d.ts +3 -2
  32. package/dist/lib/error/no-access-error.js +10 -4
  33. package/dist/lib/error/no-access-error.js.map +1 -1
  34. package/dist/lib/error/unleash-error.test.js +8 -2
  35. package/dist/lib/error/unleash-error.test.js.map +1 -1
  36. package/dist/lib/features/access/createAccessService.js +5 -5
  37. package/dist/lib/features/access/createAccessService.js.map +1 -1
  38. package/dist/lib/features/export-import-toggles/createExportImportService.js +4 -2
  39. package/dist/lib/features/export-import-toggles/createExportImportService.js.map +1 -1
  40. package/dist/lib/features/export-import-toggles/export-import-api-usage.test.d.ts +1 -0
  41. package/dist/lib/features/export-import-toggles/export-import-api-usage.test.js +69 -0
  42. package/dist/lib/features/export-import-toggles/export-import-api-usage.test.js.map +1 -0
  43. package/dist/lib/features/export-import-toggles/export-import-controller.js +5 -1
  44. package/dist/lib/features/export-import-toggles/export-import-controller.js.map +1 -1
  45. package/dist/lib/features/export-import-toggles/export-import-service.js +7 -2
  46. package/dist/lib/features/export-import-toggles/export-import-service.js.map +1 -1
  47. package/dist/lib/features/feature-toggle/createFeatureToggleService.js +4 -4
  48. package/dist/lib/features/feature-toggle/createFeatureToggleService.js.map +1 -1
  49. package/dist/lib/features/playground/advanced-playground.test.d.ts +1 -0
  50. package/dist/lib/features/playground/advanced-playground.test.js +238 -0
  51. package/dist/lib/features/playground/advanced-playground.test.js.map +1 -0
  52. package/dist/lib/{util → features/playground}/feature-evaluator/client.d.ts +3 -2
  53. package/dist/lib/{util → features/playground}/feature-evaluator/client.js +1 -1
  54. package/dist/lib/features/playground/feature-evaluator/client.js.map +1 -0
  55. package/dist/lib/features/playground/feature-evaluator/constraint.js.map +1 -0
  56. package/dist/lib/features/playground/feature-evaluator/context.js.map +1 -0
  57. package/dist/lib/features/playground/feature-evaluator/feature-evaluator.js.map +1 -0
  58. package/dist/lib/features/playground/feature-evaluator/feature.js.map +1 -0
  59. package/dist/lib/{util → features/playground}/feature-evaluator/helpers.d.ts +1 -1
  60. package/dist/lib/features/playground/feature-evaluator/helpers.js.map +1 -0
  61. package/dist/lib/{util → features/playground}/feature-evaluator/index.d.ts +1 -1
  62. package/dist/lib/{util → features/playground}/feature-evaluator/index.js +2 -2
  63. package/dist/lib/features/playground/feature-evaluator/index.js.map +1 -0
  64. package/dist/lib/features/playground/feature-evaluator/repository/bootstrap-provider.js.map +1 -0
  65. package/dist/lib/features/playground/feature-evaluator/repository/index.js.map +1 -0
  66. package/dist/lib/features/playground/feature-evaluator/repository/storage-provider-in-mem.js.map +1 -0
  67. package/dist/lib/features/playground/feature-evaluator/repository/storage-provider.js.map +1 -0
  68. package/dist/lib/features/playground/feature-evaluator/strategy/application-hostname-strategy.js.map +1 -0
  69. package/dist/lib/features/playground/feature-evaluator/strategy/default-strategy.js.map +1 -0
  70. package/dist/lib/features/playground/feature-evaluator/strategy/flexible-rollout-strategy.js.map +1 -0
  71. package/dist/lib/features/playground/feature-evaluator/strategy/gradual-rollout-random.js.map +1 -0
  72. package/dist/lib/features/playground/feature-evaluator/strategy/gradual-rollout-session-id.js.map +1 -0
  73. package/dist/lib/features/playground/feature-evaluator/strategy/gradual-rollout-user-id.js.map +1 -0
  74. package/dist/lib/features/playground/feature-evaluator/strategy/index.js.map +1 -0
  75. package/dist/lib/features/playground/feature-evaluator/strategy/remote-address-strategy.js.map +1 -0
  76. package/dist/lib/features/playground/feature-evaluator/strategy/strategy.js.map +1 -0
  77. package/dist/lib/{util → features/playground}/feature-evaluator/strategy/unknown-strategy.js +1 -1
  78. package/dist/lib/features/playground/feature-evaluator/strategy/unknown-strategy.js.map +1 -0
  79. package/dist/lib/features/playground/feature-evaluator/strategy/user-with-id-strategy.js.map +1 -0
  80. package/dist/lib/features/playground/feature-evaluator/strategy/util.js.map +1 -0
  81. package/dist/lib/features/playground/feature-evaluator/variant.js.map +1 -0
  82. package/dist/lib/features/playground/generateObjectCombinations.d.ts +7 -0
  83. package/dist/lib/features/playground/generateObjectCombinations.js +16 -0
  84. package/dist/lib/features/playground/generateObjectCombinations.js.map +1 -0
  85. package/dist/lib/features/playground/generateObjectCombinations.test.d.ts +1 -0
  86. package/dist/lib/features/playground/generateObjectCombinations.test.js +33 -0
  87. package/dist/lib/features/playground/generateObjectCombinations.test.js.map +1 -0
  88. package/dist/lib/{util → features/playground}/offline-unleash-client.js +2 -2
  89. package/dist/lib/features/playground/offline-unleash-client.js.map +1 -0
  90. package/dist/lib/{util → features/playground}/offline-unleash-client.test.js +1 -1
  91. package/dist/lib/features/playground/offline-unleash-client.test.js.map +1 -0
  92. package/dist/lib/features/playground/playground-service.d.ts +34 -0
  93. package/dist/lib/features/playground/playground-service.js +114 -0
  94. package/dist/lib/features/playground/playground-service.js.map +1 -0
  95. package/dist/lib/features/playground/playground-view-model.d.ts +4 -0
  96. package/dist/lib/features/playground/playground-view-model.js +49 -0
  97. package/dist/lib/features/playground/playground-view-model.js.map +1 -0
  98. package/dist/lib/features/playground/playground-view-model.test.d.ts +1 -0
  99. package/dist/lib/features/playground/playground-view-model.test.js +122 -0
  100. package/dist/lib/features/playground/playground-view-model.test.js.map +1 -0
  101. package/dist/lib/features/playground/playground.d.ts +16 -0
  102. package/dist/lib/features/playground/playground.js +78 -0
  103. package/dist/lib/features/playground/playground.js.map +1 -0
  104. package/dist/lib/features/playground/playground.test.d.ts +1 -0
  105. package/dist/lib/{routes/admin-api → features/playground}/playground.test.js +3 -2
  106. package/dist/lib/features/playground/playground.test.js.map +1 -0
  107. package/dist/lib/features/playground/validateQueryComplexity.d.ts +1 -0
  108. package/dist/lib/features/playground/validateQueryComplexity.js +15 -0
  109. package/dist/lib/features/playground/validateQueryComplexity.js.map +1 -0
  110. package/dist/lib/features/playground/validateQueryComplexity.test.d.ts +1 -0
  111. package/dist/lib/features/playground/validateQueryComplexity.test.js +19 -0
  112. package/dist/lib/features/playground/validateQueryComplexity.test.js.map +1 -0
  113. package/dist/lib/middleware/rbac-middleware.d.ts +1 -1
  114. package/dist/lib/middleware/rbac-middleware.js +7 -4
  115. package/dist/lib/middleware/rbac-middleware.js.map +1 -1
  116. package/dist/lib/middleware/rbac-middleware.test.js +8 -8
  117. package/dist/lib/middleware/rbac-middleware.test.js.map +1 -1
  118. package/dist/lib/openapi/endpoint-descriptions.d.ts +4 -0
  119. package/dist/lib/openapi/endpoint-descriptions.js +4 -0
  120. package/dist/lib/openapi/endpoint-descriptions.js.map +1 -1
  121. package/dist/lib/openapi/index.js +7 -0
  122. package/dist/lib/openapi/index.js.map +1 -1
  123. package/dist/lib/openapi/meta-schema-rules.test.js +16 -25
  124. package/dist/lib/openapi/meta-schema-rules.test.js.map +1 -1
  125. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.d.ts +652 -0
  126. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.js +146 -0
  127. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.js.map +1 -0
  128. package/dist/lib/openapi/spec/advanced-playground-feature-schema.d.ts +1217 -0
  129. package/dist/lib/openapi/spec/advanced-playground-feature-schema.js +51 -0
  130. package/dist/lib/openapi/spec/advanced-playground-feature-schema.js.map +1 -0
  131. package/dist/lib/openapi/spec/advanced-playground-request-schema.d.ts +95 -0
  132. package/dist/lib/openapi/spec/advanced-playground-request-schema.js +49 -0
  133. package/dist/lib/openapi/spec/advanced-playground-request-schema.js.map +1 -0
  134. package/dist/lib/openapi/spec/advanced-playground-response-schema.d.ts +2560 -0
  135. package/dist/lib/openapi/spec/advanced-playground-response-schema.js +50 -0
  136. package/dist/lib/openapi/spec/advanced-playground-response-schema.js.map +1 -0
  137. package/dist/lib/openapi/spec/client-application-schema.d.ts +17 -0
  138. package/dist/lib/openapi/spec/client-application-schema.js +17 -0
  139. package/dist/lib/openapi/spec/client-application-schema.js.map +1 -1
  140. package/dist/lib/openapi/spec/client-feature-schema.d.ts +44 -13
  141. package/dist/lib/openapi/spec/client-feature-schema.js +17 -12
  142. package/dist/lib/openapi/spec/client-feature-schema.js.map +1 -1
  143. package/dist/lib/openapi/spec/client-features-query-schema.d.ts +12 -0
  144. package/dist/lib/openapi/spec/client-features-query-schema.js +12 -0
  145. package/dist/lib/openapi/spec/client-features-query-schema.js.map +1 -1
  146. package/dist/lib/openapi/spec/client-features-schema.d.ts +90 -14
  147. package/dist/lib/openapi/spec/client-features-schema.js +7 -0
  148. package/dist/lib/openapi/spec/client-features-schema.js.map +1 -1
  149. package/dist/lib/openapi/spec/client-features-schema.test.js +5 -12
  150. package/dist/lib/openapi/spec/client-features-schema.test.js.map +1 -1
  151. package/dist/lib/openapi/spec/client-metrics-schema.d.ts +1 -1
  152. package/dist/lib/openapi/spec/client-metrics-schema.js +1 -1
  153. package/dist/lib/openapi/spec/client-metrics-schema.js.map +1 -1
  154. package/dist/lib/openapi/spec/context-field-schema.d.ts +13 -0
  155. package/dist/lib/openapi/spec/context-field-schema.js +13 -0
  156. package/dist/lib/openapi/spec/context-field-schema.js.map +1 -1
  157. package/dist/lib/openapi/spec/context-field-strategies-schema.d.ts +43 -0
  158. package/dist/lib/openapi/spec/context-field-strategies-schema.js +51 -0
  159. package/dist/lib/openapi/spec/context-field-strategies-schema.js.map +1 -0
  160. package/dist/lib/openapi/spec/context-fields-schema.d.ts +13 -0
  161. package/dist/lib/openapi/spec/create-application-schema.d.ts +0 -1
  162. package/dist/lib/openapi/spec/create-application-schema.js +0 -1
  163. package/dist/lib/openapi/spec/create-application-schema.js.map +1 -1
  164. package/dist/lib/openapi/spec/export-result-schema.d.ts +137 -4
  165. package/dist/lib/openapi/spec/feature-environment-schema.d.ts +22 -1
  166. package/dist/lib/openapi/spec/feature-schema.d.ts +49 -2
  167. package/dist/lib/openapi/spec/feature-schema.test.js +1 -1
  168. package/dist/lib/openapi/spec/feature-schema.test.js.map +1 -1
  169. package/dist/lib/openapi/spec/feature-strategy-schema.d.ts +1 -1
  170. package/dist/lib/openapi/spec/feature-strategy-schema.js +1 -1
  171. package/dist/lib/openapi/spec/feature-strategy-schema.js.map +1 -1
  172. package/dist/lib/openapi/spec/feature-variants-schema.d.ts +26 -0
  173. package/dist/lib/openapi/spec/features-schema.d.ts +98 -4
  174. package/dist/lib/openapi/spec/health-check-schema.d.ts +3 -0
  175. package/dist/lib/openapi/spec/health-check-schema.js +3 -0
  176. package/dist/lib/openapi/spec/health-check-schema.js.map +1 -1
  177. package/dist/lib/openapi/spec/health-overview-schema.d.ts +98 -4
  178. package/dist/lib/openapi/spec/health-report-schema.d.ts +98 -4
  179. package/dist/lib/openapi/spec/import-toggles-schema.d.ts +274 -8
  180. package/dist/lib/openapi/spec/index.d.ts +3 -0
  181. package/dist/lib/openapi/spec/index.js +3 -0
  182. package/dist/lib/openapi/spec/index.js.map +1 -1
  183. package/dist/lib/openapi/spec/instance-admin-stats-schema.d.ts +65 -2
  184. package/dist/lib/openapi/spec/instance-admin-stats-schema.js +65 -2
  185. package/dist/lib/openapi/spec/instance-admin-stats-schema.js.map +1 -1
  186. package/dist/lib/openapi/spec/override-schema.d.ts +5 -0
  187. package/dist/lib/openapi/spec/override-schema.js +5 -0
  188. package/dist/lib/openapi/spec/override-schema.js.map +1 -1
  189. package/dist/lib/openapi/spec/password-schema.d.ts +3 -0
  190. package/dist/lib/openapi/spec/password-schema.js +3 -0
  191. package/dist/lib/openapi/spec/password-schema.js.map +1 -1
  192. package/dist/lib/openapi/spec/playground-feature-schema.d.ts +41 -1
  193. package/dist/lib/openapi/spec/playground-feature-schema.js +6 -1
  194. package/dist/lib/openapi/spec/playground-feature-schema.js.map +1 -1
  195. package/dist/lib/openapi/spec/playground-feature-schema.test.js +3 -0
  196. package/dist/lib/openapi/spec/playground-feature-schema.test.js.map +1 -1
  197. package/dist/lib/openapi/spec/playground-request-schema.d.ts +7 -1
  198. package/dist/lib/openapi/spec/playground-request-schema.js +1 -1
  199. package/dist/lib/openapi/spec/playground-request-schema.js.map +1 -1
  200. package/dist/lib/openapi/spec/playground-response-schema.d.ts +93 -3
  201. package/dist/lib/openapi/spec/playground-strategy-schema.d.ts +13 -1
  202. package/dist/lib/openapi/spec/playground-strategy-schema.js +13 -0
  203. package/dist/lib/openapi/spec/playground-strategy-schema.js.map +1 -1
  204. package/dist/lib/openapi/spec/profile-schema.d.ts +49 -2
  205. package/dist/lib/openapi/spec/project-overview-schema.d.ts +98 -4
  206. package/dist/lib/openapi/spec/push-variants-schema.d.ts +26 -0
  207. package/dist/lib/openapi/spec/sdk-context-schema.d.ts +6 -0
  208. package/dist/lib/openapi/spec/sdk-context-schema.js +14 -2
  209. package/dist/lib/openapi/spec/sdk-context-schema.js.map +1 -1
  210. package/dist/lib/openapi/spec/state-schema.d.ts +72 -4
  211. package/dist/lib/openapi/spec/variant-schema.d.ts +21 -0
  212. package/dist/lib/openapi/spec/variant-schema.js +13 -0
  213. package/dist/lib/openapi/spec/variant-schema.js.map +1 -1
  214. package/dist/lib/openapi/spec/variants-schema.d.ts +26 -0
  215. package/dist/lib/openapi/util/create-response-schema.d.ts +1 -0
  216. package/dist/lib/openapi/util/create-response-schema.js +7 -1
  217. package/dist/lib/openapi/util/create-response-schema.js.map +1 -1
  218. package/dist/lib/proxy/proxy-repository.js +1 -1
  219. package/dist/lib/proxy/proxy-repository.js.map +1 -1
  220. package/dist/lib/routes/admin-api/api-token.d.ts +2 -0
  221. package/dist/lib/routes/admin-api/api-token.js +120 -11
  222. package/dist/lib/routes/admin-api/api-token.js.map +1 -1
  223. package/dist/lib/routes/admin-api/context.d.ts +3 -0
  224. package/dist/lib/routes/admin-api/context.js +21 -0
  225. package/dist/lib/routes/admin-api/context.js.map +1 -1
  226. package/dist/lib/routes/admin-api/index.js +1 -1
  227. package/dist/lib/routes/admin-api/index.js.map +1 -1
  228. package/dist/lib/routes/admin-api/instance-admin.d.ts +3 -1
  229. package/dist/lib/routes/admin-api/instance-admin.js +41 -0
  230. package/dist/lib/routes/admin-api/instance-admin.js.map +1 -1
  231. package/dist/lib/routes/admin-api/metrics.test.js +12 -0
  232. package/dist/lib/routes/admin-api/metrics.test.js.map +1 -1
  233. package/dist/lib/routes/admin-api/project/api-token.js +7 -0
  234. package/dist/lib/routes/admin-api/project/api-token.js.map +1 -1
  235. package/dist/lib/routes/admin-api/user/user.js +5 -4
  236. package/dist/lib/routes/admin-api/user/user.js.map +1 -1
  237. package/dist/lib/routes/admin-api/user/user.test.js +30 -5
  238. package/dist/lib/routes/admin-api/user/user.test.js.map +1 -1
  239. package/dist/lib/routes/admin-api/user-admin.js +0 -1
  240. package/dist/lib/routes/admin-api/user-admin.js.map +1 -1
  241. package/dist/lib/routes/client-api/feature.js +4 -0
  242. package/dist/lib/routes/client-api/feature.js.map +1 -1
  243. package/dist/lib/routes/client-api/metrics.js +2 -0
  244. package/dist/lib/routes/client-api/metrics.js.map +1 -1
  245. package/dist/lib/routes/client-api/register.js +2 -0
  246. package/dist/lib/routes/client-api/register.js.map +1 -1
  247. package/dist/lib/routes/controller.d.ts +8 -7
  248. package/dist/lib/routes/controller.js +11 -10
  249. package/dist/lib/routes/controller.js.map +1 -1
  250. package/dist/lib/routes/health-check.js +2 -0
  251. package/dist/lib/routes/health-check.js.map +1 -1
  252. package/dist/lib/server-impl.js +1 -1
  253. package/dist/lib/server-impl.js.map +1 -1
  254. package/dist/lib/services/access-service.d.ts +6 -4
  255. package/dist/lib/services/access-service.js +47 -11
  256. package/dist/lib/services/access-service.js.map +1 -1
  257. package/dist/lib/services/access-service.test.js +39 -22
  258. package/dist/lib/services/access-service.test.js.map +1 -1
  259. package/dist/lib/services/api-token-service.d.ts +1 -0
  260. package/dist/lib/services/api-token-service.js +3 -0
  261. package/dist/lib/services/api-token-service.js.map +1 -1
  262. package/dist/lib/services/context-service.d.ts +4 -1
  263. package/dist/lib/services/context-service.js +14 -1
  264. package/dist/lib/services/context-service.js.map +1 -1
  265. package/dist/lib/services/feature-toggle-service.d.ts +1 -1
  266. package/dist/lib/services/feature-toggle-service.js +6 -7
  267. package/dist/lib/services/feature-toggle-service.js.map +1 -1
  268. package/dist/lib/services/group-service.js +1 -3
  269. package/dist/lib/services/group-service.js.map +1 -1
  270. package/dist/lib/services/index.d.ts +1 -1
  271. package/dist/lib/services/index.js +1 -1
  272. package/dist/lib/services/index.js.map +1 -1
  273. package/dist/lib/services/instance-stats-service.d.ts +2 -3
  274. package/dist/lib/services/user-service.d.ts +1 -0
  275. package/dist/lib/services/user-service.js +8 -0
  276. package/dist/lib/services/user-service.js.map +1 -1
  277. package/dist/lib/services/version-service.d.ts +37 -1
  278. package/dist/lib/services/version-service.js +76 -5
  279. package/dist/lib/services/version-service.js.map +1 -1
  280. package/dist/lib/services/version-service.test.js +196 -9
  281. package/dist/lib/services/version-service.test.js.map +1 -1
  282. package/dist/lib/types/experimental.d.ts +1 -1
  283. package/dist/lib/types/experimental.js +6 -2
  284. package/dist/lib/types/experimental.js.map +1 -1
  285. package/dist/lib/types/model.d.ts +8 -4
  286. package/dist/lib/types/model.js +1 -0
  287. package/dist/lib/types/model.js.map +1 -1
  288. package/dist/lib/types/option.d.ts +2 -0
  289. package/dist/lib/types/permissions.d.ts +34 -27
  290. package/dist/lib/types/permissions.js +85 -29
  291. package/dist/lib/types/permissions.js.map +1 -1
  292. package/dist/lib/types/services.d.ts +1 -1
  293. package/dist/lib/types/stores/access-store.d.ts +1 -1
  294. package/dist/lib/types/stores/context-field-store.d.ts +2 -0
  295. package/dist/lib/types/stores/environment-store.d.ts +1 -0
  296. package/dist/lib/types/stores/feature-strategies-store.d.ts +2 -0
  297. package/dist/lib/types/stores/feature-toggle-store.d.ts +1 -1
  298. package/dist/lib/types/stores/group-store.d.ts +1 -1
  299. package/dist/lib/util/constants.d.ts +7 -1
  300. package/dist/lib/util/constants.js +8 -2
  301. package/dist/lib/util/constants.js.map +1 -1
  302. package/dist/lib/util/ensureArray.d.ts +1 -0
  303. package/dist/lib/util/ensureArray.js +8 -0
  304. package/dist/lib/util/ensureArray.js.map +1 -0
  305. package/dist/lib/util/index.d.ts +1 -1
  306. package/dist/lib/util/index.js +1 -1
  307. package/dist/lib/util/index.js.map +1 -1
  308. package/dist/migrations/20230615122909-fix-env-sort-order.d.ts +2 -0
  309. package/dist/migrations/20230615122909-fix-env-sort-order.js +28 -0
  310. package/dist/migrations/20230615122909-fix-env-sort-order.js.map +1 -0
  311. package/dist/migrations/20230619105029-new-fine-grained-api-token-permissions.d.ts +2 -0
  312. package/dist/migrations/20230619105029-new-fine-grained-api-token-permissions.js +26 -0
  313. package/dist/migrations/20230619105029-new-fine-grained-api-token-permissions.js.map +1 -0
  314. package/dist/migrations/20230619110243-assign-apitoken-permissions-to-rootroles.d.ts +2 -0
  315. package/dist/migrations/20230619110243-assign-apitoken-permissions-to-rootroles.js +23 -0
  316. package/dist/migrations/20230619110243-assign-apitoken-permissions-to-rootroles.js.map +1 -0
  317. package/dist/migrations/20230621141239-refactor-api-token-permissions.d.ts +2 -0
  318. package/dist/migrations/20230621141239-refactor-api-token-permissions.js +19 -0
  319. package/dist/migrations/20230621141239-refactor-api-token-permissions.js.map +1 -0
  320. package/dist/server-dev.js +3 -3
  321. package/dist/server-dev.js.map +1 -1
  322. package/dist/test/arbitraries.test.js +3 -1
  323. package/dist/test/arbitraries.test.js.map +1 -1
  324. package/dist/test/config/test-config.js +0 -1
  325. package/dist/test/config/test-config.js.map +1 -1
  326. package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js +542 -3
  327. package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js.map +1 -1
  328. package/dist/test/e2e/api/admin/api-token.e2e.test.js +14 -1
  329. package/dist/test/e2e/api/admin/api-token.e2e.test.js.map +1 -1
  330. package/dist/test/e2e/api/admin/client-metrics.e2e.test.js +1 -8
  331. package/dist/test/e2e/api/admin/client-metrics.e2e.test.js.map +1 -1
  332. package/dist/test/e2e/api/admin/context.e2e.test.js +47 -1
  333. package/dist/test/e2e/api/admin/context.e2e.test.js.map +1 -1
  334. package/dist/test/e2e/api/admin/project/features.e2e.test.js +14 -14
  335. package/dist/test/e2e/api/admin/project/features.e2e.test.js.map +1 -1
  336. package/dist/test/e2e/helpers/test-helper.d.ts +1 -1
  337. package/dist/test/e2e/helpers/test-helper.js +4 -2
  338. package/dist/test/e2e/helpers/test-helper.js.map +1 -1
  339. package/dist/test/e2e/services/access-service.e2e.test.js +1 -1
  340. package/dist/test/e2e/services/access-service.e2e.test.js.map +1 -1
  341. package/dist/test/e2e/services/playground-service.test.js +2 -2
  342. package/dist/test/e2e/services/playground-service.test.js.map +1 -1
  343. package/dist/test/fixtures/access-service-mock.js +1 -1
  344. package/dist/test/fixtures/access-service-mock.js.map +1 -1
  345. package/dist/test/fixtures/fake-access-store.d.ts +5 -3
  346. package/dist/test/fixtures/fake-access-store.js +24 -9
  347. package/dist/test/fixtures/fake-access-store.js.map +1 -1
  348. package/dist/test/fixtures/fake-environment-store.d.ts +1 -0
  349. package/dist/test/fixtures/fake-environment-store.js +3 -0
  350. package/dist/test/fixtures/fake-environment-store.js.map +1 -1
  351. package/dist/test/fixtures/fake-feature-strategies-store.d.ts +2 -0
  352. package/dist/test/fixtures/fake-feature-strategies-store.js +7 -0
  353. package/dist/test/fixtures/fake-feature-strategies-store.js.map +1 -1
  354. package/dist/test/fixtures/fake-group-store.d.ts +1 -1
  355. package/dist/test/fixtures/fake-group-store.js +1 -1
  356. package/dist/test/fixtures/fake-group-store.js.map +1 -1
  357. package/dist/test/fixtures/fake-role-store.d.ts +1 -1
  358. package/dist/test/fixtures/fake-role-store.js +9 -4
  359. package/dist/test/fixtures/fake-role-store.js.map +1 -1
  360. package/frontend/build/index.html +1 -1
  361. package/frontend/build/static/AdvancedPlayground-520a25e1.js +1 -0
  362. package/frontend/build/static/CreateProject-c430691b.js +4 -0
  363. package/frontend/build/static/{Error-fa3099b2.js → Error-492e8b38.js} +1 -1
  364. package/frontend/build/static/FeatureArchiveDialog-70daa567.js +10 -0
  365. package/frontend/build/static/{FeatureMetricsChart-caa58088.js → FeatureMetricsChart-bc99b364.js} +2 -2
  366. package/frontend/build/static/FeatureViewLazyExport-01d70575.js +7 -0
  367. package/frontend/build/static/LazyAdminExport-e2c90193.js +37 -0
  368. package/frontend/build/static/LazyProjectExport-fa62d2fe.js +13 -0
  369. package/frontend/build/static/NetworkOverview-3b72e4ea.js +1298 -0
  370. package/frontend/build/static/NetworkTraffic-365db744.js +1 -0
  371. package/frontend/build/static/Playground-b473b399.js +1 -0
  372. package/frontend/build/static/{Playground-3eeb2ce7.js → PlaygroundGuidancePopper-8e3e97db.js} +12 -12
  373. package/frontend/build/static/RoleCell-9bb513a8.js +1 -0
  374. package/frontend/build/static/StrategyItemContainer-1f7503c7.js +1 -0
  375. package/frontend/build/static/{chartjs-adapter-date-fns.esm-d0669d39.js → chartjs-adapter-date-fns.esm-db338d44.js} +1 -1
  376. package/frontend/build/static/flowchart-elk-definition-170a3958-a428dd25.js +134 -0
  377. package/frontend/build/static/index-0a56292a.js +450 -0
  378. package/frontend/build/static/{index-70a530dd.js → index-d362ae7a.js} +1 -1
  379. package/frontend/build/static/{index-5ae801ef.js → index-dc5debe9.js} +1 -1
  380. package/frontend/build/static/is_dark-884249e0.js +1 -0
  381. package/frontend/build/static/mindmap-definition-44684416-3c9425ff.js +101 -0
  382. package/frontend/build/static/stringify-ec884b6d.js +1 -0
  383. package/frontend/build/static/timeline-definition-8e5a9bc6-d289cd6d.js +62 -0
  384. package/frontend/build/static/{unknownify-d86d026c.js → unknownify-5b23bf29.js} +1 -1
  385. package/frontend/package.json +18 -17
  386. package/package.json +16 -13
  387. package/dist/lib/routes/admin-api/playground.d.ts +0 -12
  388. package/dist/lib/routes/admin-api/playground.js +0 -46
  389. package/dist/lib/routes/admin-api/playground.js.map +0 -1
  390. package/dist/lib/routes/admin-api/playground.test.js.map +0 -1
  391. package/dist/lib/services/playground-service.d.ts +0 -12
  392. package/dist/lib/services/playground-service.js +0 -65
  393. package/dist/lib/services/playground-service.js.map +0 -1
  394. package/dist/lib/util/feature-evaluator/client.js.map +0 -1
  395. package/dist/lib/util/feature-evaluator/constraint.js.map +0 -1
  396. package/dist/lib/util/feature-evaluator/context.js.map +0 -1
  397. package/dist/lib/util/feature-evaluator/feature-evaluator.js.map +0 -1
  398. package/dist/lib/util/feature-evaluator/feature.js.map +0 -1
  399. package/dist/lib/util/feature-evaluator/helpers.js.map +0 -1
  400. package/dist/lib/util/feature-evaluator/index.js.map +0 -1
  401. package/dist/lib/util/feature-evaluator/repository/bootstrap-provider.js.map +0 -1
  402. package/dist/lib/util/feature-evaluator/repository/index.js.map +0 -1
  403. package/dist/lib/util/feature-evaluator/repository/storage-provider-in-mem.js.map +0 -1
  404. package/dist/lib/util/feature-evaluator/repository/storage-provider.js.map +0 -1
  405. package/dist/lib/util/feature-evaluator/strategy/application-hostname-strategy.js.map +0 -1
  406. package/dist/lib/util/feature-evaluator/strategy/default-strategy.js.map +0 -1
  407. package/dist/lib/util/feature-evaluator/strategy/flexible-rollout-strategy.js.map +0 -1
  408. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-random.js.map +0 -1
  409. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-session-id.js.map +0 -1
  410. package/dist/lib/util/feature-evaluator/strategy/gradual-rollout-user-id.js.map +0 -1
  411. package/dist/lib/util/feature-evaluator/strategy/index.js.map +0 -1
  412. package/dist/lib/util/feature-evaluator/strategy/remote-address-strategy.js.map +0 -1
  413. package/dist/lib/util/feature-evaluator/strategy/strategy.js.map +0 -1
  414. package/dist/lib/util/feature-evaluator/strategy/unknown-strategy.js.map +0 -1
  415. package/dist/lib/util/feature-evaluator/strategy/user-with-id-strategy.js.map +0 -1
  416. package/dist/lib/util/feature-evaluator/strategy/util.js.map +0 -1
  417. package/dist/lib/util/feature-evaluator/variant.js.map +0 -1
  418. package/dist/lib/util/offline-unleash-client.js.map +0 -1
  419. package/dist/lib/util/offline-unleash-client.test.js.map +0 -1
  420. package/frontend/build/static/CreateProject-0e1caafd.js +0 -4
  421. package/frontend/build/static/FeatureArchiveDialog-ec9e5524.js +0 -4
  422. package/frontend/build/static/FeatureViewLazyExport-4da2d0f1.js +0 -7
  423. package/frontend/build/static/LazyAdminExport-b294bdfc.js +0 -43
  424. package/frontend/build/static/LazyProjectExport-fc25f20d.js +0 -19
  425. package/frontend/build/static/NetworkOverview-9038e532.js +0 -1296
  426. package/frontend/build/static/NetworkTraffic-de75c58b.js +0 -1
  427. package/frontend/build/static/StrategyItemContainer-4f8afe80.js +0 -1
  428. package/frontend/build/static/index-e59cfb08.js +0 -450
  429. package/frontend/build/static/useProjectRole-cddab9e6.js +0 -1
  430. package/frontend/build/static/v4-a960c1f4.js +0 -1
  431. /package/dist/lib/{routes/admin-api/playground.test.d.ts → db/feature-strategy-store.test.d.ts} +0 -0
  432. /package/dist/lib/{util → features/playground}/feature-evaluator/constraint.d.ts +0 -0
  433. /package/dist/lib/{util → features/playground}/feature-evaluator/constraint.js +0 -0
  434. /package/dist/lib/{util → features/playground}/feature-evaluator/context.d.ts +0 -0
  435. /package/dist/lib/{util → features/playground}/feature-evaluator/context.js +0 -0
  436. /package/dist/lib/{util → features/playground}/feature-evaluator/feature-evaluator.d.ts +0 -0
  437. /package/dist/lib/{util → features/playground}/feature-evaluator/feature-evaluator.js +0 -0
  438. /package/dist/lib/{util → features/playground}/feature-evaluator/feature.d.ts +0 -0
  439. /package/dist/lib/{util → features/playground}/feature-evaluator/feature.js +0 -0
  440. /package/dist/lib/{util → features/playground}/feature-evaluator/helpers.js +0 -0
  441. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/bootstrap-provider.d.ts +0 -0
  442. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/bootstrap-provider.js +0 -0
  443. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/index.d.ts +0 -0
  444. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/index.js +0 -0
  445. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider-in-mem.d.ts +0 -0
  446. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider-in-mem.js +0 -0
  447. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider.d.ts +0 -0
  448. /package/dist/lib/{util → features/playground}/feature-evaluator/repository/storage-provider.js +0 -0
  449. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/application-hostname-strategy.d.ts +0 -0
  450. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/application-hostname-strategy.js +0 -0
  451. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/default-strategy.d.ts +0 -0
  452. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/default-strategy.js +0 -0
  453. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/flexible-rollout-strategy.d.ts +0 -0
  454. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/flexible-rollout-strategy.js +0 -0
  455. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-random.d.ts +0 -0
  456. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-random.js +0 -0
  457. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-session-id.d.ts +0 -0
  458. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-session-id.js +0 -0
  459. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-user-id.d.ts +0 -0
  460. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/gradual-rollout-user-id.js +0 -0
  461. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/index.d.ts +0 -0
  462. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/index.js +0 -0
  463. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/remote-address-strategy.d.ts +0 -0
  464. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/remote-address-strategy.js +0 -0
  465. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/strategy.d.ts +0 -0
  466. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/strategy.js +0 -0
  467. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/unknown-strategy.d.ts +0 -0
  468. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/user-with-id-strategy.d.ts +0 -0
  469. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/user-with-id-strategy.js +0 -0
  470. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/util.d.ts +0 -0
  471. /package/dist/lib/{util → features/playground}/feature-evaluator/strategy/util.js +0 -0
  472. /package/dist/lib/{util → features/playground}/feature-evaluator/variant.d.ts +0 -0
  473. /package/dist/lib/{util → features/playground}/feature-evaluator/variant.js +0 -0
  474. /package/dist/lib/{util → features/playground}/offline-unleash-client.d.ts +0 -0
  475. /package/dist/lib/{util → features/playground}/offline-unleash-client.test.d.ts +0 -0
@@ -278,7 +278,7 @@ export declare const profileSchema: {
278
278
  };
279
279
  readonly featureStrategySchema: {
280
280
  readonly $id: "#/components/schemas/featureStrategySchema";
281
- readonly description: "A singles activation strategy configuration schema for a feature";
281
+ readonly description: "A single activation strategy configuration schema for a feature";
282
282
  readonly type: "object";
283
283
  readonly additionalProperties: false;
284
284
  readonly required: readonly ["name"];
@@ -395,23 +395,34 @@ export declare const profileSchema: {
395
395
  readonly $id: "#/components/schemas/variantSchema";
396
396
  readonly type: "object";
397
397
  readonly additionalProperties: false;
398
+ 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";
398
399
  readonly required: readonly ["name", "weight"];
399
400
  readonly properties: {
400
401
  readonly name: {
401
402
  readonly type: "string";
403
+ readonly description: "The variants name. Is unique for this feature toggle";
404
+ readonly example: "blue_group";
402
405
  };
403
406
  readonly weight: {
404
407
  readonly type: "number";
408
+ 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";
409
+ readonly minimum: 0;
410
+ readonly maximum: 1000;
405
411
  };
406
412
  readonly weightType: {
413
+ 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";
407
414
  readonly type: "string";
415
+ readonly example: "fix";
408
416
  };
409
417
  readonly stickiness: {
410
418
  readonly type: "string";
419
+ 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";
420
+ readonly example: "custom.context.field";
411
421
  };
412
422
  readonly payload: {
413
423
  readonly type: "object";
414
424
  readonly required: readonly ["type", "value"];
425
+ readonly description: "Extra data configured for this variant";
415
426
  readonly properties: {
416
427
  readonly type: {
417
428
  readonly type: "string";
@@ -420,8 +431,13 @@ export declare const profileSchema: {
420
431
  readonly type: "string";
421
432
  };
422
433
  };
434
+ readonly example: {
435
+ readonly type: "json";
436
+ readonly value: "{color: red}";
437
+ };
423
438
  };
424
439
  readonly overrides: {
440
+ 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.";
425
441
  readonly type: "array";
426
442
  readonly items: {
427
443
  readonly $ref: "#/components/schemas/overrideSchema";
@@ -435,15 +451,20 @@ export declare const profileSchema: {
435
451
  readonly type: "object";
436
452
  readonly additionalProperties: false;
437
453
  readonly required: readonly ["contextName", "values"];
454
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
438
455
  readonly properties: {
439
456
  readonly contextName: {
457
+ readonly description: "The name of the context field used to determine overrides";
440
458
  readonly type: "string";
459
+ readonly example: "userId";
441
460
  };
442
461
  readonly values: {
462
+ readonly description: "Which values that should be overriden";
443
463
  readonly type: "array";
444
464
  readonly items: {
445
465
  readonly type: "string";
446
466
  };
467
+ readonly example: readonly ["red", "blue"];
447
468
  };
448
469
  };
449
470
  readonly components: {};
@@ -456,7 +477,7 @@ export declare const profileSchema: {
456
477
  };
457
478
  readonly featureStrategySchema: {
458
479
  readonly $id: "#/components/schemas/featureStrategySchema";
459
- readonly description: "A singles activation strategy configuration schema for a feature";
480
+ readonly description: "A single activation strategy configuration schema for a feature";
460
481
  readonly type: "object";
461
482
  readonly additionalProperties: false;
462
483
  readonly required: readonly ["name"];
@@ -574,15 +595,20 @@ export declare const profileSchema: {
574
595
  readonly type: "object";
575
596
  readonly additionalProperties: false;
576
597
  readonly required: readonly ["contextName", "values"];
598
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
577
599
  readonly properties: {
578
600
  readonly contextName: {
601
+ readonly description: "The name of the context field used to determine overrides";
579
602
  readonly type: "string";
603
+ readonly example: "userId";
580
604
  };
581
605
  readonly values: {
606
+ readonly description: "Which values that should be overriden";
582
607
  readonly type: "array";
583
608
  readonly items: {
584
609
  readonly type: "string";
585
610
  };
611
+ readonly example: readonly ["red", "blue"];
586
612
  };
587
613
  };
588
614
  readonly components: {};
@@ -599,23 +625,34 @@ export declare const profileSchema: {
599
625
  readonly $id: "#/components/schemas/variantSchema";
600
626
  readonly type: "object";
601
627
  readonly additionalProperties: false;
628
+ 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";
602
629
  readonly required: readonly ["name", "weight"];
603
630
  readonly properties: {
604
631
  readonly name: {
605
632
  readonly type: "string";
633
+ readonly description: "The variants name. Is unique for this feature toggle";
634
+ readonly example: "blue_group";
606
635
  };
607
636
  readonly weight: {
608
637
  readonly type: "number";
638
+ 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";
639
+ readonly minimum: 0;
640
+ readonly maximum: 1000;
609
641
  };
610
642
  readonly weightType: {
643
+ 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";
611
644
  readonly type: "string";
645
+ readonly example: "fix";
612
646
  };
613
647
  readonly stickiness: {
614
648
  readonly type: "string";
649
+ 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";
650
+ readonly example: "custom.context.field";
615
651
  };
616
652
  readonly payload: {
617
653
  readonly type: "object";
618
654
  readonly required: readonly ["type", "value"];
655
+ readonly description: "Extra data configured for this variant";
619
656
  readonly properties: {
620
657
  readonly type: {
621
658
  readonly type: "string";
@@ -624,8 +661,13 @@ export declare const profileSchema: {
624
661
  readonly type: "string";
625
662
  };
626
663
  };
664
+ readonly example: {
665
+ readonly type: "json";
666
+ readonly value: "{color: red}";
667
+ };
627
668
  };
628
669
  readonly overrides: {
670
+ 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.";
629
671
  readonly type: "array";
630
672
  readonly items: {
631
673
  readonly $ref: "#/components/schemas/overrideSchema";
@@ -639,15 +681,20 @@ export declare const profileSchema: {
639
681
  readonly type: "object";
640
682
  readonly additionalProperties: false;
641
683
  readonly required: readonly ["contextName", "values"];
684
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
642
685
  readonly properties: {
643
686
  readonly contextName: {
687
+ readonly description: "The name of the context field used to determine overrides";
644
688
  readonly type: "string";
689
+ readonly example: "userId";
645
690
  };
646
691
  readonly values: {
692
+ readonly description: "Which values that should be overriden";
647
693
  readonly type: "array";
648
694
  readonly items: {
649
695
  readonly type: "string";
650
696
  };
697
+ readonly example: readonly ["red", "blue"];
651
698
  };
652
699
  };
653
700
  readonly components: {};
@@ -708,7 +708,7 @@ export declare const projectOverviewSchema: {
708
708
  };
709
709
  readonly featureStrategySchema: {
710
710
  readonly $id: "#/components/schemas/featureStrategySchema";
711
- readonly description: "A singles activation strategy configuration schema for a feature";
711
+ readonly description: "A single activation strategy configuration schema for a feature";
712
712
  readonly type: "object";
713
713
  readonly additionalProperties: false;
714
714
  readonly required: readonly ["name"];
@@ -825,23 +825,34 @@ export declare const projectOverviewSchema: {
825
825
  readonly $id: "#/components/schemas/variantSchema";
826
826
  readonly type: "object";
827
827
  readonly additionalProperties: false;
828
+ 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";
828
829
  readonly required: readonly ["name", "weight"];
829
830
  readonly properties: {
830
831
  readonly name: {
831
832
  readonly type: "string";
833
+ readonly description: "The variants name. Is unique for this feature toggle";
834
+ readonly example: "blue_group";
832
835
  };
833
836
  readonly weight: {
834
837
  readonly type: "number";
838
+ 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";
839
+ readonly minimum: 0;
840
+ readonly maximum: 1000;
835
841
  };
836
842
  readonly weightType: {
843
+ 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";
837
844
  readonly type: "string";
845
+ readonly example: "fix";
838
846
  };
839
847
  readonly stickiness: {
840
848
  readonly type: "string";
849
+ 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";
850
+ readonly example: "custom.context.field";
841
851
  };
842
852
  readonly payload: {
843
853
  readonly type: "object";
844
854
  readonly required: readonly ["type", "value"];
855
+ readonly description: "Extra data configured for this variant";
845
856
  readonly properties: {
846
857
  readonly type: {
847
858
  readonly type: "string";
@@ -850,8 +861,13 @@ export declare const projectOverviewSchema: {
850
861
  readonly type: "string";
851
862
  };
852
863
  };
864
+ readonly example: {
865
+ readonly type: "json";
866
+ readonly value: "{color: red}";
867
+ };
853
868
  };
854
869
  readonly overrides: {
870
+ 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.";
855
871
  readonly type: "array";
856
872
  readonly items: {
857
873
  readonly $ref: "#/components/schemas/overrideSchema";
@@ -865,15 +881,20 @@ export declare const projectOverviewSchema: {
865
881
  readonly type: "object";
866
882
  readonly additionalProperties: false;
867
883
  readonly required: readonly ["contextName", "values"];
884
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
868
885
  readonly properties: {
869
886
  readonly contextName: {
887
+ readonly description: "The name of the context field used to determine overrides";
870
888
  readonly type: "string";
889
+ readonly example: "userId";
871
890
  };
872
891
  readonly values: {
892
+ readonly description: "Which values that should be overriden";
873
893
  readonly type: "array";
874
894
  readonly items: {
875
895
  readonly type: "string";
876
896
  };
897
+ readonly example: readonly ["red", "blue"];
877
898
  };
878
899
  };
879
900
  readonly components: {};
@@ -886,7 +907,7 @@ export declare const projectOverviewSchema: {
886
907
  };
887
908
  readonly featureStrategySchema: {
888
909
  readonly $id: "#/components/schemas/featureStrategySchema";
889
- readonly description: "A singles activation strategy configuration schema for a feature";
910
+ readonly description: "A single activation strategy configuration schema for a feature";
890
911
  readonly type: "object";
891
912
  readonly additionalProperties: false;
892
913
  readonly required: readonly ["name"];
@@ -1004,15 +1025,20 @@ export declare const projectOverviewSchema: {
1004
1025
  readonly type: "object";
1005
1026
  readonly additionalProperties: false;
1006
1027
  readonly required: readonly ["contextName", "values"];
1028
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
1007
1029
  readonly properties: {
1008
1030
  readonly contextName: {
1031
+ readonly description: "The name of the context field used to determine overrides";
1009
1032
  readonly type: "string";
1033
+ readonly example: "userId";
1010
1034
  };
1011
1035
  readonly values: {
1036
+ readonly description: "Which values that should be overriden";
1012
1037
  readonly type: "array";
1013
1038
  readonly items: {
1014
1039
  readonly type: "string";
1015
1040
  };
1041
+ readonly example: readonly ["red", "blue"];
1016
1042
  };
1017
1043
  };
1018
1044
  readonly components: {};
@@ -1029,23 +1055,34 @@ export declare const projectOverviewSchema: {
1029
1055
  readonly $id: "#/components/schemas/variantSchema";
1030
1056
  readonly type: "object";
1031
1057
  readonly additionalProperties: false;
1058
+ 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";
1032
1059
  readonly required: readonly ["name", "weight"];
1033
1060
  readonly properties: {
1034
1061
  readonly name: {
1035
1062
  readonly type: "string";
1063
+ readonly description: "The variants name. Is unique for this feature toggle";
1064
+ readonly example: "blue_group";
1036
1065
  };
1037
1066
  readonly weight: {
1038
1067
  readonly type: "number";
1068
+ 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";
1069
+ readonly minimum: 0;
1070
+ readonly maximum: 1000;
1039
1071
  };
1040
1072
  readonly weightType: {
1073
+ 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";
1041
1074
  readonly type: "string";
1075
+ readonly example: "fix";
1042
1076
  };
1043
1077
  readonly stickiness: {
1044
1078
  readonly type: "string";
1079
+ 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";
1080
+ readonly example: "custom.context.field";
1045
1081
  };
1046
1082
  readonly payload: {
1047
1083
  readonly type: "object";
1048
1084
  readonly required: readonly ["type", "value"];
1085
+ readonly description: "Extra data configured for this variant";
1049
1086
  readonly properties: {
1050
1087
  readonly type: {
1051
1088
  readonly type: "string";
@@ -1054,8 +1091,13 @@ export declare const projectOverviewSchema: {
1054
1091
  readonly type: "string";
1055
1092
  };
1056
1093
  };
1094
+ readonly example: {
1095
+ readonly type: "json";
1096
+ readonly value: "{color: red}";
1097
+ };
1057
1098
  };
1058
1099
  readonly overrides: {
1100
+ 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.";
1059
1101
  readonly type: "array";
1060
1102
  readonly items: {
1061
1103
  readonly $ref: "#/components/schemas/overrideSchema";
@@ -1069,15 +1111,20 @@ export declare const projectOverviewSchema: {
1069
1111
  readonly type: "object";
1070
1112
  readonly additionalProperties: false;
1071
1113
  readonly required: readonly ["contextName", "values"];
1114
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
1072
1115
  readonly properties: {
1073
1116
  readonly contextName: {
1117
+ readonly description: "The name of the context field used to determine overrides";
1074
1118
  readonly type: "string";
1119
+ readonly example: "userId";
1075
1120
  };
1076
1121
  readonly values: {
1122
+ readonly description: "Which values that should be overriden";
1077
1123
  readonly type: "array";
1078
1124
  readonly items: {
1079
1125
  readonly type: "string";
1080
1126
  };
1127
+ readonly example: readonly ["red", "blue"];
1081
1128
  };
1082
1129
  };
1083
1130
  readonly components: {};
@@ -1221,7 +1268,7 @@ export declare const projectOverviewSchema: {
1221
1268
  };
1222
1269
  readonly featureStrategySchema: {
1223
1270
  readonly $id: "#/components/schemas/featureStrategySchema";
1224
- readonly description: "A singles activation strategy configuration schema for a feature";
1271
+ readonly description: "A single activation strategy configuration schema for a feature";
1225
1272
  readonly type: "object";
1226
1273
  readonly additionalProperties: false;
1227
1274
  readonly required: readonly ["name"];
@@ -1338,23 +1385,34 @@ export declare const projectOverviewSchema: {
1338
1385
  readonly $id: "#/components/schemas/variantSchema";
1339
1386
  readonly type: "object";
1340
1387
  readonly additionalProperties: false;
1388
+ 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";
1341
1389
  readonly required: readonly ["name", "weight"];
1342
1390
  readonly properties: {
1343
1391
  readonly name: {
1344
1392
  readonly type: "string";
1393
+ readonly description: "The variants name. Is unique for this feature toggle";
1394
+ readonly example: "blue_group";
1345
1395
  };
1346
1396
  readonly weight: {
1347
1397
  readonly type: "number";
1398
+ 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";
1399
+ readonly minimum: 0;
1400
+ readonly maximum: 1000;
1348
1401
  };
1349
1402
  readonly weightType: {
1403
+ 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";
1350
1404
  readonly type: "string";
1405
+ readonly example: "fix";
1351
1406
  };
1352
1407
  readonly stickiness: {
1353
1408
  readonly type: "string";
1409
+ 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";
1410
+ readonly example: "custom.context.field";
1354
1411
  };
1355
1412
  readonly payload: {
1356
1413
  readonly type: "object";
1357
1414
  readonly required: readonly ["type", "value"];
1415
+ readonly description: "Extra data configured for this variant";
1358
1416
  readonly properties: {
1359
1417
  readonly type: {
1360
1418
  readonly type: "string";
@@ -1363,8 +1421,13 @@ export declare const projectOverviewSchema: {
1363
1421
  readonly type: "string";
1364
1422
  };
1365
1423
  };
1424
+ readonly example: {
1425
+ readonly type: "json";
1426
+ readonly value: "{color: red}";
1427
+ };
1366
1428
  };
1367
1429
  readonly overrides: {
1430
+ 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.";
1368
1431
  readonly type: "array";
1369
1432
  readonly items: {
1370
1433
  readonly $ref: "#/components/schemas/overrideSchema";
@@ -1378,15 +1441,20 @@ export declare const projectOverviewSchema: {
1378
1441
  readonly type: "object";
1379
1442
  readonly additionalProperties: false;
1380
1443
  readonly required: readonly ["contextName", "values"];
1444
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
1381
1445
  readonly properties: {
1382
1446
  readonly contextName: {
1447
+ readonly description: "The name of the context field used to determine overrides";
1383
1448
  readonly type: "string";
1449
+ readonly example: "userId";
1384
1450
  };
1385
1451
  readonly values: {
1452
+ readonly description: "Which values that should be overriden";
1386
1453
  readonly type: "array";
1387
1454
  readonly items: {
1388
1455
  readonly type: "string";
1389
1456
  };
1457
+ readonly example: readonly ["red", "blue"];
1390
1458
  };
1391
1459
  };
1392
1460
  readonly components: {};
@@ -1402,15 +1470,20 @@ export declare const projectOverviewSchema: {
1402
1470
  readonly type: "object";
1403
1471
  readonly additionalProperties: false;
1404
1472
  readonly required: readonly ["contextName", "values"];
1473
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
1405
1474
  readonly properties: {
1406
1475
  readonly contextName: {
1476
+ readonly description: "The name of the context field used to determine overrides";
1407
1477
  readonly type: "string";
1478
+ readonly example: "userId";
1408
1479
  };
1409
1480
  readonly values: {
1481
+ readonly description: "Which values that should be overriden";
1410
1482
  readonly type: "array";
1411
1483
  readonly items: {
1412
1484
  readonly type: "string";
1413
1485
  };
1486
+ readonly example: readonly ["red", "blue"];
1414
1487
  };
1415
1488
  };
1416
1489
  readonly components: {};
@@ -1425,7 +1498,7 @@ export declare const projectOverviewSchema: {
1425
1498
  };
1426
1499
  readonly featureStrategySchema: {
1427
1500
  readonly $id: "#/components/schemas/featureStrategySchema";
1428
- readonly description: "A singles activation strategy configuration schema for a feature";
1501
+ readonly description: "A single activation strategy configuration schema for a feature";
1429
1502
  readonly type: "object";
1430
1503
  readonly additionalProperties: false;
1431
1504
  readonly required: readonly ["name"];
@@ -1542,23 +1615,34 @@ export declare const projectOverviewSchema: {
1542
1615
  readonly $id: "#/components/schemas/variantSchema";
1543
1616
  readonly type: "object";
1544
1617
  readonly additionalProperties: false;
1618
+ 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";
1545
1619
  readonly required: readonly ["name", "weight"];
1546
1620
  readonly properties: {
1547
1621
  readonly name: {
1548
1622
  readonly type: "string";
1623
+ readonly description: "The variants name. Is unique for this feature toggle";
1624
+ readonly example: "blue_group";
1549
1625
  };
1550
1626
  readonly weight: {
1551
1627
  readonly type: "number";
1628
+ 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";
1629
+ readonly minimum: 0;
1630
+ readonly maximum: 1000;
1552
1631
  };
1553
1632
  readonly weightType: {
1633
+ 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";
1554
1634
  readonly type: "string";
1635
+ readonly example: "fix";
1555
1636
  };
1556
1637
  readonly stickiness: {
1557
1638
  readonly type: "string";
1639
+ 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";
1640
+ readonly example: "custom.context.field";
1558
1641
  };
1559
1642
  readonly payload: {
1560
1643
  readonly type: "object";
1561
1644
  readonly required: readonly ["type", "value"];
1645
+ readonly description: "Extra data configured for this variant";
1562
1646
  readonly properties: {
1563
1647
  readonly type: {
1564
1648
  readonly type: "string";
@@ -1567,8 +1651,13 @@ export declare const projectOverviewSchema: {
1567
1651
  readonly type: "string";
1568
1652
  };
1569
1653
  };
1654
+ readonly example: {
1655
+ readonly type: "json";
1656
+ readonly value: "{color: red}";
1657
+ };
1570
1658
  };
1571
1659
  readonly overrides: {
1660
+ 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.";
1572
1661
  readonly type: "array";
1573
1662
  readonly items: {
1574
1663
  readonly $ref: "#/components/schemas/overrideSchema";
@@ -1582,15 +1671,20 @@ export declare const projectOverviewSchema: {
1582
1671
  readonly type: "object";
1583
1672
  readonly additionalProperties: false;
1584
1673
  readonly required: readonly ["contextName", "values"];
1674
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
1585
1675
  readonly properties: {
1586
1676
  readonly contextName: {
1677
+ readonly description: "The name of the context field used to determine overrides";
1587
1678
  readonly type: "string";
1679
+ readonly example: "userId";
1588
1680
  };
1589
1681
  readonly values: {
1682
+ readonly description: "Which values that should be overriden";
1590
1683
  readonly type: "array";
1591
1684
  readonly items: {
1592
1685
  readonly type: "string";
1593
1686
  };
1687
+ readonly example: readonly ["red", "blue"];
1594
1688
  };
1595
1689
  };
1596
1690
  readonly components: {};
@@ -22,23 +22,34 @@ export declare const pushVariantsSchema: {
22
22
  readonly $id: "#/components/schemas/variantSchema";
23
23
  readonly type: "object";
24
24
  readonly additionalProperties: false;
25
+ 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";
25
26
  readonly required: readonly ["name", "weight"];
26
27
  readonly properties: {
27
28
  readonly name: {
28
29
  readonly type: "string";
30
+ readonly description: "The variants name. Is unique for this feature toggle";
31
+ readonly example: "blue_group";
29
32
  };
30
33
  readonly weight: {
31
34
  readonly type: "number";
35
+ 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";
36
+ readonly minimum: 0;
37
+ readonly maximum: 1000;
32
38
  };
33
39
  readonly weightType: {
40
+ 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";
34
41
  readonly type: "string";
42
+ readonly example: "fix";
35
43
  };
36
44
  readonly stickiness: {
37
45
  readonly type: "string";
46
+ 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";
47
+ readonly example: "custom.context.field";
38
48
  };
39
49
  readonly payload: {
40
50
  readonly type: "object";
41
51
  readonly required: readonly ["type", "value"];
52
+ readonly description: "Extra data configured for this variant";
42
53
  readonly properties: {
43
54
  readonly type: {
44
55
  readonly type: "string";
@@ -47,8 +58,13 @@ export declare const pushVariantsSchema: {
47
58
  readonly type: "string";
48
59
  };
49
60
  };
61
+ readonly example: {
62
+ readonly type: "json";
63
+ readonly value: "{color: red}";
64
+ };
50
65
  };
51
66
  readonly overrides: {
67
+ 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.";
52
68
  readonly type: "array";
53
69
  readonly items: {
54
70
  readonly $ref: "#/components/schemas/overrideSchema";
@@ -62,15 +78,20 @@ export declare const pushVariantsSchema: {
62
78
  readonly type: "object";
63
79
  readonly additionalProperties: false;
64
80
  readonly required: readonly ["contextName", "values"];
81
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
65
82
  readonly properties: {
66
83
  readonly contextName: {
84
+ readonly description: "The name of the context field used to determine overrides";
67
85
  readonly type: "string";
86
+ readonly example: "userId";
68
87
  };
69
88
  readonly values: {
89
+ readonly description: "Which values that should be overriden";
70
90
  readonly type: "array";
71
91
  readonly items: {
72
92
  readonly type: "string";
73
93
  };
94
+ readonly example: readonly ["red", "blue"];
74
95
  };
75
96
  };
76
97
  readonly components: {};
@@ -83,15 +104,20 @@ export declare const pushVariantsSchema: {
83
104
  readonly type: "object";
84
105
  readonly additionalProperties: false;
85
106
  readonly required: readonly ["contextName", "values"];
107
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
86
108
  readonly properties: {
87
109
  readonly contextName: {
110
+ readonly description: "The name of the context field used to determine overrides";
88
111
  readonly type: "string";
112
+ readonly example: "userId";
89
113
  };
90
114
  readonly values: {
115
+ readonly description: "Which values that should be overriden";
91
116
  readonly type: "array";
92
117
  readonly items: {
93
118
  readonly type: "string";
94
119
  };
120
+ readonly example: readonly ["red", "blue"];
95
121
  };
96
122
  };
97
123
  readonly components: {};