unleash-server 5.4.4 → 5.5.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 (586) hide show
  1. package/README.md +5 -3
  2. package/dist/lib/addons/addon-schema.js +2 -1
  3. package/dist/lib/addons/addon-schema.js.map +1 -1
  4. package/dist/lib/addons/datadog-definition.js +22 -7
  5. package/dist/lib/addons/datadog-definition.js.map +1 -1
  6. package/dist/lib/addons/datadog.d.ts +7 -1
  7. package/dist/lib/addons/datadog.js +16 -3
  8. package/dist/lib/addons/datadog.js.map +1 -1
  9. package/dist/lib/addons/datadog.test.js +62 -0
  10. package/dist/lib/addons/datadog.test.js.map +1 -1
  11. package/dist/lib/addons/index.js +3 -11
  12. package/dist/lib/addons/index.js.map +1 -1
  13. package/dist/lib/addons/slack-app-definition.js +5 -24
  14. package/dist/lib/addons/slack-app-definition.js.map +1 -1
  15. package/dist/lib/addons/slack-app.d.ts +0 -1
  16. package/dist/lib/addons/slack-app.js +5 -17
  17. package/dist/lib/addons/slack-app.js.map +1 -1
  18. package/dist/lib/addons/slack-app.test.js +39 -25
  19. package/dist/lib/addons/slack-app.test.js.map +1 -1
  20. package/dist/lib/addons/slack-definition.js +11 -4
  21. package/dist/lib/addons/slack-definition.js.map +1 -1
  22. package/dist/lib/addons/teams-definition.js +5 -4
  23. package/dist/lib/addons/teams-definition.js.map +1 -1
  24. package/dist/lib/addons/webhook-definition.js +10 -12
  25. package/dist/lib/addons/webhook-definition.js.map +1 -1
  26. package/dist/lib/create-config.js +13 -1
  27. package/dist/lib/create-config.js.map +1 -1
  28. package/dist/lib/create-config.test.js +14 -0
  29. package/dist/lib/create-config.test.js.map +1 -1
  30. package/dist/lib/db/access-store.d.ts +23 -5
  31. package/dist/lib/db/access-store.js +263 -17
  32. package/dist/lib/db/access-store.js.map +1 -1
  33. package/dist/lib/db/access-store.test.js +83 -0
  34. package/dist/lib/db/access-store.test.js.map +1 -0
  35. package/dist/lib/db/client-applications-store.d.ts +1 -3
  36. package/dist/lib/db/client-applications-store.js +13 -24
  37. package/dist/lib/db/client-applications-store.js.map +1 -1
  38. package/dist/lib/db/event-store.js +1 -0
  39. package/dist/lib/db/event-store.js.map +1 -1
  40. package/dist/lib/db/feature-toggle-client-store.js +17 -4
  41. package/dist/lib/db/feature-toggle-client-store.js.map +1 -1
  42. package/dist/lib/db/feature-toggle-store.js +1 -1
  43. package/dist/lib/db/feature-toggle-store.js.map +1 -1
  44. package/dist/lib/db/group-store.d.ts +4 -2
  45. package/dist/lib/db/group-store.js +24 -0
  46. package/dist/lib/db/group-store.js.map +1 -1
  47. package/dist/lib/db/index.d.ts +1 -2
  48. package/dist/lib/db/index.js +5 -1
  49. package/dist/lib/db/index.js.map +1 -1
  50. package/dist/lib/db/project-stats-store.d.ts +2 -0
  51. package/dist/lib/db/project-stats-store.js +27 -0
  52. package/dist/lib/db/project-stats-store.js.map +1 -1
  53. package/dist/lib/db/project-store.d.ts +7 -1
  54. package/dist/lib/db/project-store.js +34 -1
  55. package/dist/lib/db/project-store.js.map +1 -1
  56. package/dist/lib/error/bad-data-error.d.ts +1 -1
  57. package/dist/lib/error/index.d.ts +2 -1
  58. package/dist/lib/error/index.js +3 -1
  59. package/dist/lib/error/index.js.map +1 -1
  60. package/dist/lib/error/pattern-error.d.ts +10 -0
  61. package/dist/lib/error/pattern-error.js +20 -0
  62. package/dist/lib/error/pattern-error.js.map +1 -0
  63. package/dist/lib/features/dependent-features/createDependentFeaturesService.d.ts +3 -0
  64. package/dist/lib/features/dependent-features/createDependentFeaturesService.js +11 -0
  65. package/dist/lib/features/dependent-features/createDependentFeaturesService.js.map +1 -0
  66. package/dist/lib/features/dependent-features/dependent-features-controller.d.ts +28 -0
  67. package/dist/lib/features/dependent-features/dependent-features-controller.js +151 -0
  68. package/dist/lib/features/dependent-features/dependent-features-controller.js.map +1 -0
  69. package/dist/lib/features/dependent-features/dependent-features-service.d.ts +11 -0
  70. package/dist/lib/features/dependent-features/dependent-features-service.js +40 -0
  71. package/dist/lib/features/dependent-features/dependent-features-service.js.map +1 -0
  72. package/dist/lib/features/dependent-features/dependent-features-store-type.d.ts +8 -0
  73. package/dist/lib/features/dependent-features/dependent-features-store-type.js +3 -0
  74. package/dist/lib/features/dependent-features/dependent-features-store-type.js.map +1 -0
  75. package/dist/lib/features/dependent-features/dependent-features-store.d.ts +12 -0
  76. package/dist/lib/features/dependent-features/dependent-features-store.js +56 -0
  77. package/dist/lib/features/dependent-features/dependent-features-store.js.map +1 -0
  78. package/dist/lib/features/dependent-features/dependent-features.d.ts +14 -0
  79. package/dist/lib/features/dependent-features/dependent-features.js +3 -0
  80. package/dist/lib/features/dependent-features/dependent-features.js.map +1 -0
  81. package/dist/lib/features/dependent-features/dependent.features.e2e.test.d.ts +1 -0
  82. package/dist/lib/features/dependent-features/dependent.features.e2e.test.js +82 -0
  83. package/dist/lib/features/dependent-features/dependent.features.e2e.test.js.map +1 -0
  84. package/dist/lib/features/dependent-features/fake-dependent-features-store.d.ts +8 -0
  85. package/dist/lib/features/dependent-features/fake-dependent-features-store.js +22 -0
  86. package/dist/lib/features/dependent-features/fake-dependent-features-store.js.map +1 -0
  87. package/dist/lib/features/export-import-toggles/createExportImportService.js +6 -3
  88. package/dist/lib/features/export-import-toggles/createExportImportService.js.map +1 -1
  89. package/dist/lib/features/export-import-toggles/export-import-service.d.ts +9 -3
  90. package/dist/lib/features/export-import-toggles/export-import-service.js +51 -21
  91. package/dist/lib/features/export-import-toggles/export-import-service.js.map +1 -1
  92. package/dist/lib/features/export-import-toggles/export-import.e2e.test.js +120 -50
  93. package/dist/lib/features/export-import-toggles/export-import.e2e.test.js.map +1 -1
  94. package/dist/lib/features/export-import-toggles/import-permissions-service.d.ts +1 -2
  95. package/dist/lib/features/export-import-toggles/import-toggles-store-type.d.ts +6 -0
  96. package/dist/lib/features/export-import-toggles/import-toggles-store.d.ts +2 -1
  97. package/dist/lib/features/export-import-toggles/import-toggles-store.js +25 -0
  98. package/dist/lib/features/export-import-toggles/import-toggles-store.js.map +1 -1
  99. package/dist/lib/features/export-import-toggles/import-validation-messages.d.ts +18 -2
  100. package/dist/lib/features/export-import-toggles/import-validation-messages.js +27 -11
  101. package/dist/lib/features/export-import-toggles/import-validation-messages.js.map +1 -1
  102. package/dist/lib/features/feature-naming-pattern/feature-naming-validation.d.ts +14 -0
  103. package/dist/lib/features/feature-naming-pattern/feature-naming-validation.js +46 -0
  104. package/dist/lib/features/feature-naming-pattern/feature-naming-validation.js.map +1 -0
  105. package/dist/lib/features/feature-naming-pattern/feature-naming-validation.test.d.ts +1 -0
  106. package/dist/lib/features/feature-naming-pattern/feature-naming-validation.test.js +116 -0
  107. package/dist/lib/features/feature-naming-pattern/feature-naming-validation.test.js.map +1 -0
  108. package/dist/lib/features/feature-toggle/createFeatureToggleService.js +11 -2
  109. package/dist/lib/features/feature-toggle/createFeatureToggleService.js.map +1 -1
  110. package/dist/lib/features/instance-stats/getActiveUsers.d.ts +9 -0
  111. package/dist/lib/features/instance-stats/getActiveUsers.e2e.test.d.ts +1 -0
  112. package/dist/lib/features/instance-stats/getActiveUsers.e2e.test.js +141 -0
  113. package/dist/lib/features/instance-stats/getActiveUsers.e2e.test.js.map +1 -0
  114. package/dist/lib/features/instance-stats/getActiveUsers.js +33 -0
  115. package/dist/lib/features/instance-stats/getActiveUsers.js.map +1 -0
  116. package/dist/lib/{services → features/instance-stats}/instance-stats-service.d.ts +13 -7
  117. package/dist/lib/{services → features/instance-stats}/instance-stats-service.js +16 -7
  118. package/dist/lib/features/instance-stats/instance-stats-service.js.map +1 -0
  119. package/dist/lib/features/instance-stats/instance-stats-service.test.d.ts +1 -0
  120. package/dist/lib/{services → features/instance-stats}/instance-stats-service.test.js +6 -5
  121. package/dist/lib/features/instance-stats/instance-stats-service.test.js.map +1 -0
  122. package/dist/lib/features/playground/advanced-playground.test.js +2 -3
  123. package/dist/lib/features/playground/advanced-playground.test.js.map +1 -1
  124. package/dist/lib/features/playground/feature-evaluator/variant.d.ts +1 -1
  125. package/dist/lib/features/playground/generateObjectCombinations.d.ts +1 -1
  126. package/dist/lib/features/playground/generateObjectCombinations.js +14 -4
  127. package/dist/lib/features/playground/generateObjectCombinations.js.map +1 -1
  128. package/dist/lib/features/playground/generateObjectCombinations.test.js +21 -0
  129. package/dist/lib/features/playground/generateObjectCombinations.test.js.map +1 -1
  130. package/dist/lib/features/playground/playground-service.d.ts +5 -3
  131. package/dist/lib/features/playground/playground-service.js +18 -3
  132. package/dist/lib/features/playground/playground-service.js.map +1 -1
  133. package/dist/lib/features/playground/playground.d.ts +2 -1
  134. package/dist/lib/features/playground/playground.js +2 -1
  135. package/dist/lib/features/playground/playground.js.map +1 -1
  136. package/dist/lib/features/private-project/createPrivateProjectChecker.d.ts +5 -0
  137. package/dist/lib/features/private-project/createPrivateProjectChecker.js +22 -0
  138. package/dist/lib/features/private-project/createPrivateProjectChecker.js.map +1 -0
  139. package/dist/lib/features/private-project/fakePrivateProjectChecker.d.ts +7 -0
  140. package/dist/lib/features/private-project/fakePrivateProjectChecker.js +15 -0
  141. package/dist/lib/features/private-project/fakePrivateProjectChecker.js.map +1 -0
  142. package/dist/lib/features/private-project/privateProjectChecker.d.ts +10 -0
  143. package/dist/lib/features/private-project/privateProjectChecker.js +22 -0
  144. package/dist/lib/features/private-project/privateProjectChecker.js.map +1 -0
  145. package/dist/lib/features/private-project/privateProjectCheckerType.d.ts +5 -0
  146. package/dist/lib/features/private-project/privateProjectCheckerType.js +3 -0
  147. package/dist/lib/features/private-project/privateProjectCheckerType.js.map +1 -0
  148. package/dist/lib/features/private-project/privateProjectStore.d.ts +18 -0
  149. package/dist/lib/features/private-project/privateProjectStore.js +70 -0
  150. package/dist/lib/features/private-project/privateProjectStore.js.map +1 -0
  151. package/dist/lib/features/private-project/privateProjectStoreType.d.ts +4 -0
  152. package/dist/lib/features/private-project/privateProjectStoreType.js +3 -0
  153. package/dist/lib/features/private-project/privateProjectStoreType.js.map +1 -0
  154. package/dist/lib/features/project/createProjectService.js +5 -8
  155. package/dist/lib/features/project/createProjectService.js.map +1 -1
  156. package/dist/lib/features/segment/createSegmentService.js +5 -2
  157. package/dist/lib/features/segment/createSegmentService.js.map +1 -1
  158. package/dist/lib/features/segment/segment-controller.d.ts +39 -0
  159. package/dist/lib/features/segment/segment-controller.js +291 -0
  160. package/dist/lib/features/segment/segment-controller.js.map +1 -0
  161. package/dist/lib/metrics.d.ts +1 -1
  162. package/dist/lib/metrics.js +30 -1
  163. package/dist/lib/metrics.js.map +1 -1
  164. package/dist/lib/metrics.test.js +3 -2
  165. package/dist/lib/metrics.test.js.map +1 -1
  166. package/dist/lib/middleware/rbac-middleware.d.ts +2 -0
  167. package/dist/lib/middleware/rbac-middleware.js +2 -0
  168. package/dist/lib/middleware/rbac-middleware.js.map +1 -1
  169. package/dist/lib/middleware/secure-headers.js +18 -0
  170. package/dist/lib/middleware/secure-headers.js.map +1 -1
  171. package/dist/lib/openapi/index.js +13 -0
  172. package/dist/lib/openapi/index.js.map +1 -1
  173. package/dist/lib/openapi/meta-schema-rules.test.js +14 -4
  174. package/dist/lib/openapi/meta-schema-rules.test.js.map +1 -1
  175. package/dist/lib/openapi/spec/addon-type-schema.d.ts +6 -1
  176. package/dist/lib/openapi/spec/addon-type-schema.js +6 -1
  177. package/dist/lib/openapi/spec/addon-type-schema.js.map +1 -1
  178. package/dist/lib/openapi/spec/addons-schema.d.ts +8 -3
  179. package/dist/lib/openapi/spec/addons-schema.js +8 -3
  180. package/dist/lib/openapi/spec/addons-schema.js.map +1 -1
  181. package/dist/lib/openapi/spec/admin-segment-schema.d.ts +115 -0
  182. package/dist/lib/openapi/spec/admin-segment-schema.js +75 -0
  183. package/dist/lib/openapi/spec/admin-segment-schema.js.map +1 -0
  184. package/dist/lib/openapi/spec/admin-segment-schema.test.d.ts +1 -0
  185. package/dist/lib/openapi/spec/admin-segment-schema.test.js +39 -0
  186. package/dist/lib/openapi/spec/admin-segment-schema.test.js.map +1 -0
  187. package/dist/lib/openapi/spec/admin-strategies-schema.d.ts +46 -0
  188. package/dist/lib/openapi/spec/admin-strategies-schema.js +54 -0
  189. package/dist/lib/openapi/spec/admin-strategies-schema.js.map +1 -0
  190. package/dist/lib/openapi/spec/admin-strategies-schema.test.d.ts +1 -0
  191. package/dist/lib/openapi/spec/admin-strategies-schema.test.js +40 -0
  192. package/dist/lib/openapi/spec/admin-strategies-schema.test.js.map +1 -0
  193. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.d.ts +51 -6
  194. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.js +3 -1
  195. package/dist/lib/openapi/spec/advanced-playground-environment-feature-schema.js.map +1 -1
  196. package/dist/lib/openapi/spec/advanced-playground-feature-schema.d.ts +101 -11
  197. package/dist/lib/openapi/spec/advanced-playground-feature-schema.js +2 -0
  198. package/dist/lib/openapi/spec/advanced-playground-feature-schema.js.map +1 -1
  199. package/dist/lib/openapi/spec/advanced-playground-request-schema.d.ts +1 -0
  200. package/dist/lib/openapi/spec/advanced-playground-response-schema.d.ts +203 -22
  201. package/dist/lib/openapi/spec/advanced-playground-response-schema.js +2 -0
  202. package/dist/lib/openapi/spec/advanced-playground-response-schema.js.map +1 -1
  203. package/dist/lib/openapi/spec/client-feature-schema.d.ts +41 -6
  204. package/dist/lib/openapi/spec/client-feature-schema.js +9 -0
  205. package/dist/lib/openapi/spec/client-feature-schema.js.map +1 -1
  206. package/dist/lib/openapi/spec/client-features-schema.d.ts +75 -12
  207. package/dist/lib/openapi/spec/client-features-schema.js +2 -0
  208. package/dist/lib/openapi/spec/client-features-schema.js.map +1 -1
  209. package/dist/lib/openapi/spec/context-field-strategies-schema.d.ts +1 -1
  210. package/dist/lib/openapi/spec/context-field-strategies-schema.js +1 -1
  211. package/dist/lib/openapi/spec/context-field-strategies-schema.js.map +1 -1
  212. package/dist/lib/openapi/spec/create-api-token-schema.d.ts +1 -139
  213. package/dist/lib/openapi/spec/create-api-token-schema.js +16 -20
  214. package/dist/lib/openapi/spec/create-api-token-schema.js.map +1 -1
  215. package/dist/lib/openapi/spec/create-dependent-feature-schema.d.ts +29 -0
  216. package/dist/lib/openapi/spec/create-dependent-feature-schema.js +31 -0
  217. package/dist/lib/openapi/spec/create-dependent-feature-schema.js.map +1 -0
  218. package/dist/lib/openapi/spec/create-feature-naming-pattern-schema.d.ts +29 -0
  219. package/dist/lib/openapi/spec/create-feature-naming-pattern-schema.js +33 -0
  220. package/dist/lib/openapi/spec/create-feature-naming-pattern-schema.js.map +1 -0
  221. package/dist/lib/openapi/spec/create-feature-strategy-schema.d.ts +2 -2
  222. package/dist/lib/openapi/spec/create-strategy-schema.d.ts +15 -0
  223. package/dist/lib/openapi/spec/create-strategy-schema.js +15 -0
  224. package/dist/lib/openapi/spec/create-strategy-schema.js.map +1 -1
  225. package/dist/lib/openapi/spec/create-strategy-variant-schema.d.ts +2 -2
  226. package/dist/lib/openapi/spec/create-strategy-variant-schema.js +2 -2
  227. package/dist/lib/openapi/spec/create-strategy-variant-schema.js.map +1 -1
  228. package/dist/lib/openapi/spec/dependent-feature-schema.d.ts +30 -0
  229. package/dist/lib/openapi/spec/dependent-feature-schema.js +14 -0
  230. package/dist/lib/openapi/spec/dependent-feature-schema.js.map +1 -0
  231. package/dist/lib/openapi/spec/dora-features-schema.d.ts +20 -0
  232. package/dist/lib/openapi/spec/dora-features-schema.js +22 -0
  233. package/dist/lib/openapi/spec/dora-features-schema.js.map +1 -0
  234. package/dist/lib/openapi/spec/environment-project-schema.d.ts +4 -4
  235. package/dist/lib/openapi/spec/environments-project-schema.d.ts +4 -4
  236. package/dist/lib/openapi/spec/event-schema.d.ts +3 -3
  237. package/dist/lib/openapi/spec/events-schema.d.ts +3 -3
  238. package/dist/lib/openapi/spec/export-query-schema.d.ts +22 -15
  239. package/dist/lib/openapi/spec/export-query-schema.js +16 -15
  240. package/dist/lib/openapi/spec/export-query-schema.js.map +1 -1
  241. package/dist/lib/openapi/spec/export-result-schema.d.ts +26 -26
  242. package/dist/lib/openapi/spec/feature-environment-schema.d.ts +6 -6
  243. package/dist/lib/openapi/spec/feature-events-schema.d.ts +3 -3
  244. package/dist/lib/openapi/spec/feature-schema.d.ts +12 -12
  245. package/dist/lib/openapi/spec/feature-strategy-schema.d.ts +2 -2
  246. package/dist/lib/openapi/spec/feature-variants-schema.d.ts +2 -2
  247. package/dist/lib/openapi/spec/features-schema.d.ts +24 -24
  248. package/dist/lib/openapi/spec/health-overview-schema.d.ts +63 -33
  249. package/dist/lib/openapi/spec/health-overview-schema.js +6 -1
  250. package/dist/lib/openapi/spec/health-overview-schema.js.map +1 -1
  251. package/dist/lib/openapi/spec/health-report-schema.d.ts +63 -33
  252. package/dist/lib/openapi/spec/import-toggles-schema.d.ts +52 -52
  253. package/dist/lib/openapi/spec/index.d.ts +9 -0
  254. package/dist/lib/openapi/spec/index.js +9 -0
  255. package/dist/lib/openapi/spec/index.js.map +1 -1
  256. package/dist/lib/openapi/spec/instance-admin-stats-schema.d.ts +42 -0
  257. package/dist/lib/openapi/spec/instance-admin-stats-schema.js +42 -0
  258. package/dist/lib/openapi/spec/instance-admin-stats-schema.js.map +1 -1
  259. package/dist/lib/openapi/spec/parent-feature-options-schema.d.ts +11 -0
  260. package/dist/lib/openapi/spec/parent-feature-options-schema.js +13 -0
  261. package/dist/lib/openapi/spec/parent-feature-options-schema.js.map +1 -0
  262. package/dist/lib/openapi/spec/playground-feature-schema.d.ts +5 -5
  263. package/dist/lib/openapi/spec/playground-request-schema.d.ts +1 -0
  264. package/dist/lib/openapi/spec/playground-response-schema.d.ts +12 -10
  265. package/dist/lib/openapi/spec/playground-strategy-schema.d.ts +4 -4
  266. package/dist/lib/openapi/spec/playground-strategy-schema.js +1 -1
  267. package/dist/lib/openapi/spec/playground-strategy-schema.js.map +1 -1
  268. package/dist/lib/openapi/spec/profile-schema.d.ts +12 -12
  269. package/dist/lib/openapi/spec/project-dora-metrics-schema.d.ts +44 -0
  270. package/dist/lib/openapi/spec/project-dora-metrics-schema.js +28 -0
  271. package/dist/lib/openapi/spec/project-dora-metrics-schema.js.map +1 -0
  272. package/dist/lib/openapi/spec/project-environment-schema.d.ts +4 -4
  273. package/dist/lib/openapi/spec/project-overview-schema.d.ts +63 -33
  274. package/dist/lib/openapi/spec/project-overview-schema.js +6 -1
  275. package/dist/lib/openapi/spec/project-overview-schema.js.map +1 -1
  276. package/dist/lib/openapi/spec/project-schema.d.ts +1 -1
  277. package/dist/lib/openapi/spec/project-schema.js +1 -1
  278. package/dist/lib/openapi/spec/project-schema.js.map +1 -1
  279. package/dist/lib/openapi/spec/projects-schema.d.ts +1 -1
  280. package/dist/lib/openapi/spec/push-variants-schema.d.ts +2 -2
  281. package/dist/lib/openapi/spec/sdk-context-schema.d.ts +1 -0
  282. package/dist/lib/openapi/spec/sdk-context-schema.js +1 -0
  283. package/dist/lib/openapi/spec/sdk-context-schema.js.map +1 -1
  284. package/dist/lib/openapi/spec/sdk-flat-context-schema.d.ts +46 -0
  285. package/dist/lib/openapi/spec/sdk-flat-context-schema.js +15 -0
  286. package/dist/lib/openapi/spec/sdk-flat-context-schema.js.map +1 -0
  287. package/dist/lib/openapi/spec/search-events-schema.d.ts +1 -1
  288. package/dist/lib/openapi/spec/segments-schema.d.ts +177 -0
  289. package/dist/lib/openapi/spec/segments-schema.js +26 -0
  290. package/dist/lib/openapi/spec/segments-schema.js.map +1 -0
  291. package/dist/lib/openapi/spec/segments-schema.test.d.ts +1 -0
  292. package/dist/lib/openapi/spec/segments-schema.test.js +16 -0
  293. package/dist/lib/openapi/spec/segments-schema.test.js.map +1 -0
  294. package/dist/lib/openapi/spec/state-schema.d.ts +23 -23
  295. package/dist/lib/openapi/spec/strategy-variant-schema.d.ts +2 -2
  296. package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.d.ts +35 -0
  297. package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.js +37 -0
  298. package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.js.map +1 -0
  299. package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.test.d.ts +1 -0
  300. package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.test.js +19 -0
  301. package/dist/lib/openapi/spec/update-feature-strategy-segments-schema.test.js.map +1 -0
  302. package/dist/lib/openapi/spec/upsert-segment-schema.d.ts +8 -15
  303. package/dist/lib/openapi/spec/upsert-segment-schema.js +8 -17
  304. package/dist/lib/openapi/spec/upsert-segment-schema.js.map +1 -1
  305. package/dist/lib/openapi/spec/upsert-segment-schema.test.d.ts +1 -0
  306. package/dist/lib/openapi/spec/upsert-segment-schema.test.js +35 -0
  307. package/dist/lib/openapi/spec/upsert-segment-schema.test.js.map +1 -0
  308. package/dist/lib/openapi/spec/validate-feature-schema.d.ts +6 -0
  309. package/dist/lib/openapi/spec/validate-feature-schema.js +6 -0
  310. package/dist/lib/openapi/spec/validate-feature-schema.js.map +1 -1
  311. package/dist/lib/openapi/spec/variant-schema.d.ts +2 -2
  312. package/dist/lib/openapi/spec/variant-schema.js +2 -2
  313. package/dist/lib/openapi/spec/variant-schema.js.map +1 -1
  314. package/dist/lib/openapi/spec/variants-schema.d.ts +2 -2
  315. package/dist/lib/openapi/util/all-of.d.ts +3 -0
  316. package/dist/lib/openapi/util/all-of.js +34 -0
  317. package/dist/lib/openapi/util/all-of.js.map +1 -0
  318. package/dist/lib/openapi/util/openapi-tags.d.ts +46 -58
  319. package/dist/lib/openapi/util/openapi-tags.js +27 -34
  320. package/dist/lib/openapi/util/openapi-tags.js.map +1 -1
  321. package/dist/lib/openapi/util/openapi-tags.test.d.ts +1 -0
  322. package/dist/lib/openapi/util/openapi-tags.test.js +15 -0
  323. package/dist/lib/openapi/util/openapi-tags.test.js.map +1 -0
  324. package/dist/lib/openapi/validate.js +0 -1
  325. package/dist/lib/openapi/validate.js.map +1 -1
  326. package/dist/lib/routes/admin-api/archive.d.ts +1 -1
  327. package/dist/lib/routes/admin-api/archive.js +3 -2
  328. package/dist/lib/routes/admin-api/archive.js.map +1 -1
  329. package/dist/lib/routes/admin-api/context.js +2 -1
  330. package/dist/lib/routes/admin-api/context.js.map +1 -1
  331. package/dist/lib/routes/admin-api/feature.js +2 -1
  332. package/dist/lib/routes/admin-api/feature.js.map +1 -1
  333. package/dist/lib/routes/admin-api/index.js +2 -0
  334. package/dist/lib/routes/admin-api/index.js.map +1 -1
  335. package/dist/lib/routes/admin-api/instance-admin.d.ts +2 -2
  336. package/dist/lib/routes/admin-api/instance-admin.js +7 -1
  337. package/dist/lib/routes/admin-api/instance-admin.js.map +1 -1
  338. package/dist/lib/routes/admin-api/metrics.d.ts +2 -1
  339. package/dist/lib/routes/admin-api/metrics.js +2 -1
  340. package/dist/lib/routes/admin-api/metrics.js.map +1 -1
  341. package/dist/lib/routes/admin-api/project/api-token.d.ts +2 -1
  342. package/dist/lib/routes/admin-api/project/api-token.js +12 -3
  343. package/dist/lib/routes/admin-api/project/api-token.js.map +1 -1
  344. package/dist/lib/routes/admin-api/project/environments.d.ts +2 -1
  345. package/dist/lib/routes/admin-api/project/environments.js +3 -1
  346. package/dist/lib/routes/admin-api/project/environments.js.map +1 -1
  347. package/dist/lib/routes/admin-api/project/index.d.ts +2 -1
  348. package/dist/lib/routes/admin-api/project/index.js +31 -0
  349. package/dist/lib/routes/admin-api/project/index.js.map +1 -1
  350. package/dist/lib/routes/admin-api/strategy.d.ts +1 -1
  351. package/dist/lib/routes/admin-api/strategy.js.map +1 -1
  352. package/dist/lib/routes/client-api/metrics.js +14 -8
  353. package/dist/lib/routes/client-api/metrics.js.map +1 -1
  354. package/dist/lib/routes/client-api/metrics.test.js +27 -0
  355. package/dist/lib/routes/client-api/metrics.test.js.map +1 -1
  356. package/dist/lib/routes/controller.d.ts +1 -1
  357. package/dist/lib/routes/controller.js +17 -10
  358. package/dist/lib/routes/controller.js.map +1 -1
  359. package/dist/lib/routes/proxy-api/index.js +5 -0
  360. package/dist/lib/routes/proxy-api/index.js.map +1 -1
  361. package/dist/lib/schema/role-schema.js +3 -1
  362. package/dist/lib/schema/role-schema.js.map +1 -1
  363. package/dist/lib/schema/role-schema.test.js +1 -1
  364. package/dist/lib/schema/role-schema.test.js.map +1 -1
  365. package/dist/lib/segments/segment-service-interface.d.ts +1 -1
  366. package/dist/lib/services/access-service.d.ts +29 -11
  367. package/dist/lib/services/access-service.js +53 -10
  368. package/dist/lib/services/access-service.js.map +1 -1
  369. package/dist/lib/services/access-service.test.js +2 -1
  370. package/dist/lib/services/access-service.test.js.map +1 -1
  371. package/dist/lib/services/addon-service.js +4 -2
  372. package/dist/lib/services/addon-service.js.map +1 -1
  373. package/dist/lib/services/addon-service.test.js +65 -0
  374. package/dist/lib/services/addon-service.test.js.map +1 -1
  375. package/dist/lib/services/client-metrics/instance-service.d.ts +5 -2
  376. package/dist/lib/services/client-metrics/instance-service.js +22 -3
  377. package/dist/lib/services/client-metrics/instance-service.js.map +1 -1
  378. package/dist/lib/services/client-metrics/instance-service.test.js +5 -4
  379. package/dist/lib/services/client-metrics/instance-service.test.js.map +1 -1
  380. package/dist/lib/services/context-service.d.ts +6 -2
  381. package/dist/lib/services/context-service.js +16 -2
  382. package/dist/lib/services/context-service.js.map +1 -1
  383. package/dist/lib/services/feature-service-potentially-stale.test.js +1 -1
  384. package/dist/lib/services/feature-service-potentially-stale.test.js.map +1 -1
  385. package/dist/lib/services/feature-toggle-service.d.ts +20 -7
  386. package/dist/lib/services/feature-toggle-service.js +105 -41
  387. package/dist/lib/services/feature-toggle-service.js.map +1 -1
  388. package/dist/lib/services/group-service.d.ts +4 -4
  389. package/dist/lib/services/group-service.js +17 -16
  390. package/dist/lib/services/group-service.js.map +1 -1
  391. package/dist/lib/services/index.d.ts +3 -2
  392. package/dist/lib/services/index.js +31 -17
  393. package/dist/lib/services/index.js.map +1 -1
  394. package/dist/lib/services/project-schema.js +9 -1
  395. package/dist/lib/services/project-schema.js.map +1 -1
  396. package/dist/lib/services/project-service.d.ts +16 -12
  397. package/dist/lib/services/project-service.js +127 -17
  398. package/dist/lib/services/project-service.js.map +1 -1
  399. package/dist/lib/services/scheduler-service.d.ts +1 -1
  400. package/dist/lib/services/scheduler-service.js +3 -3
  401. package/dist/lib/services/scheduler-service.js.map +1 -1
  402. package/dist/lib/services/scheduler-service.test.js +15 -15
  403. package/dist/lib/services/scheduler-service.test.js.map +1 -1
  404. package/dist/lib/services/segment-service.d.ts +4 -2
  405. package/dist/lib/services/segment-service.js +17 -10
  406. package/dist/lib/services/segment-service.js.map +1 -1
  407. package/dist/lib/services/state-service.test.js +13 -3
  408. package/dist/lib/services/state-service.test.js.map +1 -1
  409. package/dist/lib/services/version-service.test.js +3 -0
  410. package/dist/lib/services/version-service.test.js.map +1 -1
  411. package/dist/lib/types/events.d.ts +60 -1
  412. package/dist/lib/types/events.js +65 -3
  413. package/dist/lib/types/events.js.map +1 -1
  414. package/dist/lib/types/experimental.d.ts +1 -1
  415. package/dist/lib/types/experimental.js +9 -5
  416. package/dist/lib/types/experimental.js.map +1 -1
  417. package/dist/lib/types/group.d.ts +2 -2
  418. package/dist/lib/types/model.d.ts +31 -2
  419. package/dist/lib/types/model.js.map +1 -1
  420. package/dist/lib/types/no-auth-user.d.ts +1 -0
  421. package/dist/lib/types/no-auth-user.js +3 -1
  422. package/dist/lib/types/no-auth-user.js.map +1 -1
  423. package/dist/lib/types/option.d.ts +7 -0
  424. package/dist/lib/types/services.d.ts +6 -1
  425. package/dist/lib/types/stores/access-store.d.ts +23 -4
  426. package/dist/lib/types/stores/feature-strategies-store.d.ts +2 -1
  427. package/dist/lib/types/stores/group-store.d.ts +4 -2
  428. package/dist/lib/types/stores/project-stats-store-type.d.ts +2 -0
  429. package/dist/lib/types/stores/project-store.d.ts +7 -14
  430. package/dist/lib/types/stores/strategy-store.d.ts +3 -17
  431. package/dist/lib/types/stores.d.ts +5 -1
  432. package/dist/lib/util/findDuplicates.d.ts +1 -0
  433. package/dist/lib/util/findDuplicates.js +18 -0
  434. package/dist/lib/util/findDuplicates.js.map +1 -0
  435. package/dist/lib/util/findDuplicates.test.d.ts +1 -0
  436. package/dist/lib/util/findDuplicates.test.js +23 -0
  437. package/dist/lib/util/findDuplicates.test.js.map +1 -0
  438. package/dist/migrations/20230830121352-update-client-applications-usage-table.d.ts +2 -0
  439. package/dist/migrations/20230830121352-update-client-applications-usage-table.js +16 -0
  440. package/dist/migrations/20230830121352-update-client-applications-usage-table.js.map +1 -0
  441. package/dist/migrations/20230905122605-add-feature-naming-description.d.ts +2 -0
  442. package/dist/migrations/20230905122605-add-feature-naming-description.js +13 -0
  443. package/dist/migrations/20230905122605-add-feature-naming-description.js.map +1 -0
  444. package/dist/migrations/20230919104006-dependent-features.d.ts +2 -0
  445. package/dist/migrations/20230919104006-dependent-features.js +21 -0
  446. package/dist/migrations/20230919104006-dependent-features.js.map +1 -0
  447. package/dist/migrations/20230927071830-reset-pnps-feedback.d.ts +2 -0
  448. package/dist/migrations/20230927071830-reset-pnps-feedback.js +10 -0
  449. package/dist/migrations/20230927071830-reset-pnps-feedback.js.map +1 -0
  450. package/dist/server-dev.js +7 -4
  451. package/dist/server-dev.js.map +1 -1
  452. package/dist/test/e2e/api/admin/addon.e2e.test.js +0 -1
  453. package/dist/test/e2e/api/admin/addon.e2e.test.js.map +1 -1
  454. package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js +8 -12
  455. package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js.map +1 -1
  456. package/dist/test/e2e/api/admin/event.e2e.test.js +9 -2
  457. package/dist/test/e2e/api/admin/event.e2e.test.js.map +1 -1
  458. package/dist/test/e2e/api/admin/metrics.e2e.test.js +2 -10
  459. package/dist/test/e2e/api/admin/metrics.e2e.test.js.map +1 -1
  460. package/dist/test/e2e/api/admin/project/environments.e2e.test.js +8 -0
  461. package/dist/test/e2e/api/admin/project/environments.e2e.test.js.map +1 -1
  462. package/dist/test/e2e/api/admin/project/features.e2e.test.js +41 -15
  463. package/dist/test/e2e/api/admin/project/features.e2e.test.js.map +1 -1
  464. package/dist/test/e2e/api/admin/project/project.api.tokens.e2e.test.js +30 -3
  465. package/dist/test/e2e/api/admin/project/project.api.tokens.e2e.test.js.map +1 -1
  466. package/dist/test/e2e/api/admin/segment.e2e.test.d.ts +1 -0
  467. package/dist/test/e2e/api/admin/segment.e2e.test.js +272 -0
  468. package/dist/test/e2e/api/admin/segment.e2e.test.js.map +1 -0
  469. package/dist/test/e2e/api/admin/state.e2e.test.js +0 -11
  470. package/dist/test/e2e/api/admin/state.e2e.test.js.map +1 -1
  471. package/dist/test/e2e/api/admin/strategy.e2e.test.js +1 -1
  472. package/dist/test/e2e/api/client/feature.e2e.test.js +27 -3
  473. package/dist/test/e2e/api/client/feature.e2e.test.js.map +1 -1
  474. package/dist/test/e2e/api/client/feature.token.access.e2e.test.js +2 -2
  475. package/dist/test/e2e/api/client/feature.token.access.e2e.test.js.map +1 -1
  476. package/dist/test/e2e/api/client/segment.e2e.test.js +1 -1
  477. package/dist/test/e2e/api/client/segment.e2e.test.js.map +1 -1
  478. package/dist/test/e2e/api/proxy/proxy.e2e.test.js +34 -9
  479. package/dist/test/e2e/api/proxy/proxy.e2e.test.js.map +1 -1
  480. package/dist/test/e2e/helpers/app.utils.d.ts +6 -0
  481. package/dist/test/e2e/helpers/app.utils.js +16 -0
  482. package/dist/test/e2e/helpers/app.utils.js.map +1 -0
  483. package/dist/test/e2e/helpers/database.json +24 -0
  484. package/dist/test/e2e/services/access-service.e2e.test.js +549 -135
  485. package/dist/test/e2e/services/access-service.e2e.test.js.map +1 -1
  486. package/dist/test/e2e/services/api-token-service.e2e.test.js +4 -2
  487. package/dist/test/e2e/services/api-token-service.e2e.test.js.map +1 -1
  488. package/dist/test/e2e/services/client-metrics-service.e2e.test.js +2 -1
  489. package/dist/test/e2e/services/client-metrics-service.e2e.test.js.map +1 -1
  490. package/dist/test/e2e/services/feature-toggle-service-v2.e2e.test.js +38 -5
  491. package/dist/test/e2e/services/feature-toggle-service-v2.e2e.test.js.map +1 -1
  492. package/dist/test/e2e/services/group-service.e2e.test.js +16 -11
  493. package/dist/test/e2e/services/group-service.e2e.test.js.map +1 -1
  494. package/dist/test/e2e/services/playground-service.test.js +5 -2
  495. package/dist/test/e2e/services/playground-service.test.js.map +1 -1
  496. package/dist/test/e2e/services/project-health-service.e2e.test.js +4 -2
  497. package/dist/test/e2e/services/project-health-service.e2e.test.js.map +1 -1
  498. package/dist/test/e2e/services/project-service.e2e.test.js +242 -60
  499. package/dist/test/e2e/services/project-service.e2e.test.js.map +1 -1
  500. package/dist/test/fixtures/access-service-mock.d.ts +3 -4
  501. package/dist/test/fixtures/access-service-mock.js.map +1 -1
  502. package/dist/test/fixtures/fake-access-store.d.ts +15 -5
  503. package/dist/test/fixtures/fake-access-store.js +30 -3
  504. package/dist/test/fixtures/fake-access-store.js.map +1 -1
  505. package/dist/test/fixtures/fake-group-store.d.ts +4 -2
  506. package/dist/test/fixtures/fake-group-store.js +3 -0
  507. package/dist/test/fixtures/fake-group-store.js.map +1 -1
  508. package/dist/test/fixtures/fake-project-stats-store.d.ts +1 -0
  509. package/dist/test/fixtures/fake-project-stats-store.js +3 -0
  510. package/dist/test/fixtures/fake-project-stats-store.js.map +1 -1
  511. package/dist/test/fixtures/fake-project-store.d.ts +2 -1
  512. package/dist/test/fixtures/fake-project-store.js +3 -0
  513. package/dist/test/fixtures/fake-project-store.js.map +1 -1
  514. package/dist/test/fixtures/no-logger.d.ts +2 -1
  515. package/dist/test/fixtures/no-logger.js +8 -4
  516. package/dist/test/fixtures/no-logger.js.map +1 -1
  517. package/dist/test/fixtures/store.js +3 -0
  518. package/dist/test/fixtures/store.js.map +1 -1
  519. package/frontend/README.md +7 -1
  520. package/frontend/build/index.html +2 -2
  521. package/frontend/build/static/{AdvancedPlayground-1748fcdd.js → AdvancedPlayground-20059178.js} +11 -11
  522. package/frontend/build/static/CreateProject-6955728f.js +4 -0
  523. package/frontend/build/static/{Error-cbce6b64.js → Error-f56339ab.js} +1 -1
  524. package/frontend/build/static/FeatureArchiveDialog-33dc3a5b.js +10 -0
  525. package/frontend/build/static/{FeatureMetricsChart-8fd8a304.js → FeatureMetricsChart-5ad514bc.js} +2 -2
  526. package/frontend/build/static/FeatureViewLazyExport-85a68ed0.js +7 -0
  527. package/frontend/build/static/LazyAdminExport-e2677758.js +35 -0
  528. package/frontend/build/static/LazyProjectExport-969bb54e.js +24 -0
  529. package/frontend/build/static/Logo-android-218bddbb.svg +1 -0
  530. package/frontend/build/static/Logo-flutter-cc3c706f.svg +1 -0
  531. package/frontend/build/static/Logo-go-02475b3d.svg +1 -0
  532. package/frontend/build/static/Logo-java-6e556b26.svg +1 -0
  533. package/frontend/build/static/Logo-javascript-caebc06e.svg +1 -0
  534. package/frontend/build/static/Logo-net-0a33abee.svg +1 -0
  535. package/frontend/build/static/Logo-node-318ed025.svg +1 -0
  536. package/frontend/build/static/Logo-php-201f18c3.svg +1 -0
  537. package/frontend/build/static/Logo-python-4305760e.svg +1 -0
  538. package/frontend/build/static/Logo-react-18e98687.svg +1 -0
  539. package/frontend/build/static/Logo-ruby-58f46832.svg +1 -0
  540. package/frontend/build/static/Logo-rust-c83a80f9.svg +1 -0
  541. package/frontend/build/static/Logo-svelte-97dcb624.svg +1 -0
  542. package/frontend/build/static/Logo-swift-315f842b.svg +5 -0
  543. package/frontend/build/static/Logo-vue-0de73099.svg +1 -0
  544. package/frontend/build/static/{NetworkOverview-349a7bdd.js → NetworkOverview-894877e6.js} +2 -2
  545. package/frontend/build/static/{NetworkTraffic-60478e50.js → NetworkTraffic-81eff1ae.js} +1 -1
  546. package/frontend/build/static/ReactJSONEditor-59c8a094.js +129 -0
  547. package/frontend/build/static/RoleCell-35857d41.js +1 -0
  548. package/frontend/build/static/{StrategyItemContainer-a4caeace.js → StrategyItemContainer-b250f2d4.js} +1 -1
  549. package/frontend/build/static/{chartjs-adapter-date-fns.esm-03d2fbea.js → chartjs-adapter-date-fns.esm-c51fe022.js} +1 -1
  550. package/frontend/build/static/cr-db7653ac.png +0 -0
  551. package/frontend/build/static/datadog-543762b6.svg +5 -0
  552. package/frontend/build/static/edge-daisy-chaining-012bfdef.svg +48 -0
  553. package/frontend/build/static/edge-mode-5d25949b.svg +22 -0
  554. package/frontend/build/static/edge-offline-f6a0f761.svg +19 -0
  555. package/frontend/build/static/{flowchart-elk-definition-170a3958-fc100c77.js → flowchart-elk-definition-170a3958-a8c4a86a.js} +1 -1
  556. package/frontend/build/static/{index-866f9bf9.js → index-0515f416.js} +1 -1
  557. package/frontend/build/static/index-942e9eeb.js +463 -0
  558. package/frontend/build/static/{index-3c63138f.js → index-a59b2d65.js} +1 -1
  559. package/frontend/build/static/{is_dark-31c253e9.js → is_dark-464961a8.js} +1 -1
  560. package/frontend/build/static/jira-1abe7cbf.svg +17 -0
  561. package/frontend/build/static/{mindmap-definition-44684416-398682f9.js → mindmap-definition-44684416-3a71a9a5.js} +1 -1
  562. package/frontend/build/static/slack-36ce798a.svg +18 -0
  563. package/frontend/build/static/style-97d3ef98.css +1 -0
  564. package/frontend/build/static/teams-4e30b51f.svg +45 -0
  565. package/frontend/build/static/{timeline-definition-8e5a9bc6-04a0ae08.js → timeline-definition-8e5a9bc6-da4ebc88.js} +1 -1
  566. package/frontend/build/static/{unknownify-b8618d88.js → unknownify-3563456b.js} +1 -1
  567. package/frontend/build/static/unleash-integration-949d8966.svg +1 -0
  568. package/frontend/build/static/webhooks-b1b44207.svg +16 -0
  569. package/frontend/package.json +20 -18
  570. package/package.json +23 -23
  571. package/dist/lib/services/instance-stats-service.js.map +0 -1
  572. package/dist/lib/services/instance-stats-service.test.js.map +0 -1
  573. package/frontend/build/static/CreateProject-972fa820.js +0 -4
  574. package/frontend/build/static/FeatureArchiveDialog-8a281845.js +0 -10
  575. package/frontend/build/static/FeatureViewLazyExport-a215d53b.js +0 -7
  576. package/frontend/build/static/LazyAdminExport-ba7d55ca.js +0 -35
  577. package/frontend/build/static/LazyProjectExport-12bccd40.js +0 -17
  578. package/frontend/build/static/RoleCell-144e7eca.js +0 -1
  579. package/frontend/build/static/datadog-591b6a73.svg +0 -1
  580. package/frontend/build/static/index-17d74ac9.js +0 -454
  581. package/frontend/build/static/slack-c0af31c6.svg +0 -1
  582. package/frontend/build/static/style-770afaee.css +0 -1
  583. package/frontend/build/static/teams-62e72076.svg +0 -26
  584. package/frontend/build/static/webhooks-ffa904ac.svg +0 -1
  585. /package/dist/lib/{services/instance-stats-service.test.d.ts → db/access-store.test.d.ts} +0 -0
  586. /package/frontend/build/static/{jira-d9eb9af9.svg → jira-comment-d9eb9af9.svg} +0 -0
@@ -0,0 +1,177 @@
1
+ import { FromSchema } from 'json-schema-to-ts';
2
+ export declare const segmentsSchema: {
3
+ readonly $id: "#/components/schemas/segmentsSchema";
4
+ readonly description: "Data containing a list of [segments](https://docs.getunleash.io/reference/segments)";
5
+ readonly type: "object";
6
+ readonly properties: {
7
+ readonly segments: {
8
+ readonly type: "array";
9
+ readonly description: "A list of segments";
10
+ readonly items: {
11
+ readonly $ref: "#/components/schemas/adminSegmentSchema";
12
+ };
13
+ };
14
+ };
15
+ readonly components: {
16
+ readonly schemas: {
17
+ readonly adminSegmentSchema: {
18
+ readonly $id: "#/components/schemas/adminSegmentSchema";
19
+ readonly type: "object";
20
+ readonly required: readonly ["id", "name", "constraints", "createdAt"];
21
+ readonly description: "A description of a [segment](https://docs.getunleash.io/reference/segments)";
22
+ readonly additionalProperties: false;
23
+ readonly properties: {
24
+ readonly id: {
25
+ readonly type: "integer";
26
+ readonly description: "The ID of this segment";
27
+ readonly example: 2;
28
+ readonly minimum: 0;
29
+ };
30
+ readonly name: {
31
+ readonly type: "string";
32
+ readonly description: "The name of this segment";
33
+ readonly example: "ios-users";
34
+ };
35
+ readonly description: {
36
+ readonly type: "string";
37
+ readonly nullable: true;
38
+ readonly description: "The description for this segment";
39
+ readonly example: "IOS users segment";
40
+ };
41
+ readonly constraints: {
42
+ readonly type: "array";
43
+ readonly description: "The list of constraints that are used in this segment";
44
+ readonly items: {
45
+ readonly $ref: "#/components/schemas/constraintSchema";
46
+ };
47
+ };
48
+ readonly usedInFeatures: {
49
+ readonly type: "integer";
50
+ readonly minimum: 0;
51
+ readonly description: "The number of projects that use this segment";
52
+ readonly example: 3;
53
+ readonly nullable: true;
54
+ };
55
+ readonly usedInProjects: {
56
+ readonly type: "integer";
57
+ readonly minimum: 0;
58
+ readonly description: "The number of projects that use this segment";
59
+ readonly example: 2;
60
+ readonly nullable: true;
61
+ };
62
+ readonly project: {
63
+ readonly type: "string";
64
+ readonly nullable: true;
65
+ readonly example: "red-vista";
66
+ readonly description: "The project the segment belongs to. Only present if the segment is a project-specific segment.";
67
+ };
68
+ readonly createdBy: {
69
+ readonly description: "The creator's email or username";
70
+ readonly example: "someone@example.com";
71
+ readonly type: "string";
72
+ readonly nullable: true;
73
+ };
74
+ readonly createdAt: {
75
+ readonly type: "string";
76
+ readonly format: "date-time";
77
+ readonly description: "When the segment was created";
78
+ readonly example: "2023-04-12T11:13:31.960Z";
79
+ };
80
+ };
81
+ readonly components: {
82
+ readonly schemas: {
83
+ readonly constraintSchema: {
84
+ readonly type: "object";
85
+ readonly required: readonly ["contextName", "operator"];
86
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/reference/strategy-constraints)";
87
+ readonly properties: {
88
+ readonly contextName: {
89
+ readonly description: "The name of the context field that this constraint should apply to.";
90
+ readonly example: "appName";
91
+ readonly type: "string";
92
+ };
93
+ readonly operator: {
94
+ readonly description: "The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/reference/strategy-constraints#strategy-constraint-operators).";
95
+ readonly type: "string";
96
+ readonly enum: readonly ["NOT_IN", "IN", "STR_ENDS_WITH", "STR_STARTS_WITH", "STR_CONTAINS", "NUM_EQ", "NUM_GT", "NUM_GTE", "NUM_LT", "NUM_LTE", "DATE_AFTER", "DATE_BEFORE", "SEMVER_EQ", "SEMVER_GT", "SEMVER_LT"];
97
+ readonly example: "IN";
98
+ };
99
+ readonly caseInsensitive: {
100
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
101
+ readonly type: "boolean";
102
+ readonly default: false;
103
+ };
104
+ readonly inverted: {
105
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
106
+ readonly type: "boolean";
107
+ readonly default: false;
108
+ };
109
+ readonly values: {
110
+ readonly type: "array";
111
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
112
+ readonly items: {
113
+ readonly type: "string";
114
+ };
115
+ readonly example: readonly ["my-app", "my-other-app"];
116
+ };
117
+ readonly value: {
118
+ readonly description: "The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.";
119
+ readonly type: "string";
120
+ readonly example: "my-app";
121
+ };
122
+ };
123
+ readonly components: {};
124
+ readonly $id: "#/components/schemas/constraintSchema";
125
+ readonly additionalProperties: false;
126
+ };
127
+ };
128
+ };
129
+ };
130
+ readonly constraintSchema: {
131
+ readonly type: "object";
132
+ readonly required: readonly ["contextName", "operator"];
133
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/reference/strategy-constraints)";
134
+ readonly properties: {
135
+ readonly contextName: {
136
+ readonly description: "The name of the context field that this constraint should apply to.";
137
+ readonly example: "appName";
138
+ readonly type: "string";
139
+ };
140
+ readonly operator: {
141
+ readonly description: "The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/reference/strategy-constraints#strategy-constraint-operators).";
142
+ readonly type: "string";
143
+ readonly enum: readonly ["NOT_IN", "IN", "STR_ENDS_WITH", "STR_STARTS_WITH", "STR_CONTAINS", "NUM_EQ", "NUM_GT", "NUM_GTE", "NUM_LT", "NUM_LTE", "DATE_AFTER", "DATE_BEFORE", "SEMVER_EQ", "SEMVER_GT", "SEMVER_LT"];
144
+ readonly example: "IN";
145
+ };
146
+ readonly caseInsensitive: {
147
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
148
+ readonly type: "boolean";
149
+ readonly default: false;
150
+ };
151
+ readonly inverted: {
152
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
153
+ readonly type: "boolean";
154
+ readonly default: false;
155
+ };
156
+ readonly values: {
157
+ readonly type: "array";
158
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
159
+ readonly items: {
160
+ readonly type: "string";
161
+ };
162
+ readonly example: readonly ["my-app", "my-other-app"];
163
+ };
164
+ readonly value: {
165
+ readonly description: "The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.";
166
+ readonly type: "string";
167
+ readonly example: "my-app";
168
+ };
169
+ };
170
+ readonly components: {};
171
+ readonly $id: "#/components/schemas/constraintSchema";
172
+ readonly additionalProperties: false;
173
+ };
174
+ };
175
+ };
176
+ };
177
+ export declare type SegmentsSchema = FromSchema<typeof segmentsSchema>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.segmentsSchema = void 0;
4
+ const admin_segment_schema_1 = require("./admin-segment-schema");
5
+ const constraint_schema_1 = require("./constraint-schema");
6
+ exports.segmentsSchema = {
7
+ $id: '#/components/schemas/segmentsSchema',
8
+ description: 'Data containing a list of [segments](https://docs.getunleash.io/reference/segments)',
9
+ type: 'object',
10
+ properties: {
11
+ segments: {
12
+ type: 'array',
13
+ description: 'A list of segments',
14
+ items: {
15
+ $ref: '#/components/schemas/adminSegmentSchema',
16
+ },
17
+ },
18
+ },
19
+ components: {
20
+ schemas: {
21
+ adminSegmentSchema: admin_segment_schema_1.adminSegmentSchema,
22
+ constraintSchema: constraint_schema_1.constraintSchema,
23
+ },
24
+ },
25
+ };
26
+ //# sourceMappingURL=segments-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segments-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/segments-schema.ts"],"names":[],"mappings":";;;AACA,iEAA4D;AAC5D,2DAAuD;AAE1C,QAAA,cAAc,GAAG;IAC1B,GAAG,EAAE,qCAAqC;IAC1C,WAAW,EACP,qFAAqF;IACzF,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,QAAQ,EAAE;YACN,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,oBAAoB;YACjC,KAAK,EAAE;gBACH,IAAI,EAAE,yCAAyC;aAClD;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,kBAAkB,EAAlB,yCAAkB;YAClB,gBAAgB,EAAhB,oCAAgB;SACnB;KACJ;CACK,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const validate_1 = require("../validate");
4
+ test('updateEnvironmentSchema', () => {
5
+ const data = {
6
+ segments: [],
7
+ };
8
+ expect((0, validate_1.validateSchema)('#/components/schemas/segmentsSchema', data)).toBeUndefined();
9
+ expect((0, validate_1.validateSchema)('#/components/schemas/segmentsSchema', {
10
+ segments: [],
11
+ additional: 'property',
12
+ })).toBeUndefined();
13
+ expect((0, validate_1.validateSchema)('#/components/schemas/segmentsSchema', {})).toMatchSnapshot();
14
+ expect((0, validate_1.validateSchema)('#/components/schemas/segmentsSchema', 'not an object')).toMatchSnapshot();
15
+ });
16
+ //# sourceMappingURL=segments-schema.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segments-schema.test.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/segments-schema.test.ts"],"names":[],"mappings":";;AAAA,0CAA6C;AAG7C,IAAI,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACjC,MAAM,IAAI,GAAmB;QACzB,QAAQ,EAAE,EAAE;KACf,CAAC;IAEF,MAAM,CACF,IAAA,yBAAc,EAAC,qCAAqC,EAAE,IAAI,CAAC,CAC9D,CAAC,aAAa,EAAE,CAAC;IAElB,MAAM,CACF,IAAA,yBAAc,EAAC,qCAAqC,EAAE;QAClD,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,UAAU;KACzB,CAAC,CACL,CAAC,aAAa,EAAE,CAAC;IAElB,MAAM,CACF,IAAA,yBAAc,EAAC,qCAAqC,EAAE,EAAE,CAAC,CAC5D,CAAC,eAAe,EAAE,CAAC;IAEpB,MAAM,CACF,IAAA,yBAAc,EAAC,qCAAqC,EAAE,eAAe,CAAC,CACzE,CAAC,eAAe,EAAE,CAAC;AACxB,CAAC,CAAC,CAAC"}
@@ -517,9 +517,9 @@ export declare const stateSchema: {
517
517
  readonly description: "Extra data configured for this variant";
518
518
  readonly properties: {
519
519
  readonly type: {
520
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
520
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
521
521
  readonly type: "string";
522
- readonly enum: readonly ["json", "csv", "string"];
522
+ readonly enum: readonly ["json", "csv", "string", "number"];
523
523
  };
524
524
  readonly value: {
525
525
  readonly description: "The actual value of payload";
@@ -572,9 +572,9 @@ export declare const stateSchema: {
572
572
  readonly description: "Extra data configured for this variant";
573
573
  readonly properties: {
574
574
  readonly type: {
575
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
575
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
576
576
  readonly type: "string";
577
- readonly enum: readonly ["json", "csv", "string"];
577
+ readonly enum: readonly ["json", "csv", "string", "number"];
578
578
  };
579
579
  readonly value: {
580
580
  readonly description: "The actual value of payload";
@@ -625,9 +625,9 @@ export declare const stateSchema: {
625
625
  readonly additionalProperties: false;
626
626
  readonly properties: {
627
627
  readonly type: {
628
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
628
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
629
629
  readonly type: "string";
630
- readonly enum: readonly ["json", "csv", "string"];
630
+ readonly enum: readonly ["json", "csv", "string", "number"];
631
631
  };
632
632
  readonly value: {
633
633
  readonly description: "The actual value of payload";
@@ -833,9 +833,9 @@ export declare const stateSchema: {
833
833
  readonly description: "Extra data configured for this variant";
834
834
  readonly properties: {
835
835
  readonly type: {
836
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
836
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
837
837
  readonly type: "string";
838
- readonly enum: readonly ["json", "csv", "string"];
838
+ readonly enum: readonly ["json", "csv", "string", "number"];
839
839
  };
840
840
  readonly value: {
841
841
  readonly description: "The actual value of payload";
@@ -888,9 +888,9 @@ export declare const stateSchema: {
888
888
  readonly description: "Extra data configured for this variant";
889
889
  readonly properties: {
890
890
  readonly type: {
891
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
891
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
892
892
  readonly type: "string";
893
- readonly enum: readonly ["json", "csv", "string"];
893
+ readonly enum: readonly ["json", "csv", "string", "number"];
894
894
  };
895
895
  readonly value: {
896
896
  readonly description: "The actual value of payload";
@@ -973,9 +973,9 @@ export declare const stateSchema: {
973
973
  readonly additionalProperties: false;
974
974
  readonly properties: {
975
975
  readonly type: {
976
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
976
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
977
977
  readonly type: "string";
978
- readonly enum: readonly ["json", "csv", "string"];
978
+ readonly enum: readonly ["json", "csv", "string", "number"];
979
979
  };
980
980
  readonly value: {
981
981
  readonly description: "The actual value of payload";
@@ -1195,7 +1195,7 @@ export declare const stateSchema: {
1195
1195
  };
1196
1196
  readonly mode: {
1197
1197
  readonly type: "string";
1198
- readonly enum: readonly ["open", "protected"];
1198
+ readonly enum: readonly ["open", "protected", "private"];
1199
1199
  readonly example: "open";
1200
1200
  readonly description: "The project's [collaboration mode](https://docs.getunleash.io/reference/project-collaboration-mode). Determines whether non-project members can submit change requests or not.";
1201
1201
  };
@@ -1362,9 +1362,9 @@ export declare const stateSchema: {
1362
1362
  readonly description: "Extra data configured for this variant";
1363
1363
  readonly properties: {
1364
1364
  readonly type: {
1365
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
1365
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
1366
1366
  readonly type: "string";
1367
- readonly enum: readonly ["json", "csv", "string"];
1367
+ readonly enum: readonly ["json", "csv", "string", "number"];
1368
1368
  };
1369
1369
  readonly value: {
1370
1370
  readonly description: "The actual value of payload";
@@ -1417,9 +1417,9 @@ export declare const stateSchema: {
1417
1417
  readonly description: "Extra data configured for this variant";
1418
1418
  readonly properties: {
1419
1419
  readonly type: {
1420
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
1420
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
1421
1421
  readonly type: "string";
1422
- readonly enum: readonly ["json", "csv", "string"];
1422
+ readonly enum: readonly ["json", "csv", "string", "number"];
1423
1423
  };
1424
1424
  readonly value: {
1425
1425
  readonly description: "The actual value of payload";
@@ -1707,9 +1707,9 @@ export declare const stateSchema: {
1707
1707
  readonly description: "Extra data configured for this variant";
1708
1708
  readonly properties: {
1709
1709
  readonly type: {
1710
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
1710
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
1711
1711
  readonly type: "string";
1712
- readonly enum: readonly ["json", "csv", "string"];
1712
+ readonly enum: readonly ["json", "csv", "string", "number"];
1713
1713
  };
1714
1714
  readonly value: {
1715
1715
  readonly description: "The actual value of payload";
@@ -1762,9 +1762,9 @@ export declare const stateSchema: {
1762
1762
  readonly description: "Extra data configured for this variant";
1763
1763
  readonly properties: {
1764
1764
  readonly type: {
1765
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
1765
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
1766
1766
  readonly type: "string";
1767
- readonly enum: readonly ["json", "csv", "string"];
1767
+ readonly enum: readonly ["json", "csv", "string", "number"];
1768
1768
  };
1769
1769
  readonly value: {
1770
1770
  readonly description: "The actual value of payload";
@@ -1815,9 +1815,9 @@ export declare const stateSchema: {
1815
1815
  readonly additionalProperties: false;
1816
1816
  readonly properties: {
1817
1817
  readonly type: {
1818
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
1818
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
1819
1819
  readonly type: "string";
1820
- readonly enum: readonly ["json", "csv", "string"];
1820
+ readonly enum: readonly ["json", "csv", "string", "number"];
1821
1821
  };
1822
1822
  readonly value: {
1823
1823
  readonly description: "The actual value of payload";
@@ -34,9 +34,9 @@ export declare const strategyVariantSchema: {
34
34
  readonly description: "Extra data configured for this variant";
35
35
  readonly properties: {
36
36
  readonly type: {
37
- readonly description: "The type of the value. Commonly used types are string, json and csv.";
37
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
38
38
  readonly type: "string";
39
- readonly enum: readonly ["json", "csv", "string"];
39
+ readonly enum: readonly ["json", "csv", "string", "number"];
40
40
  };
41
41
  readonly value: {
42
42
  readonly description: "The actual value of payload";
@@ -0,0 +1,35 @@
1
+ import { FromSchema } from 'json-schema-to-ts';
2
+ export declare const updateFeatureStrategySegmentsSchema: {
3
+ readonly $id: "#/components/schemas/updateFeatureStrategySegmentsSchema";
4
+ readonly type: "object";
5
+ readonly required: readonly ["projectId", "strategyId", "environmentId", "segmentIds"];
6
+ readonly description: "Data required to update segments for a strategy.";
7
+ readonly properties: {
8
+ readonly projectId: {
9
+ readonly type: "string";
10
+ readonly description: "The ID of the project that the strategy belongs to.";
11
+ readonly example: "red-vista";
12
+ };
13
+ readonly strategyId: {
14
+ readonly type: "string";
15
+ readonly description: "The ID of the strategy to update segments for.";
16
+ readonly example: "15d1e20b-6310-4e17-a0c2-9fb84de3053a";
17
+ };
18
+ readonly environmentId: {
19
+ readonly type: "string";
20
+ readonly description: "The ID of the strategy environment.";
21
+ readonly example: "development";
22
+ };
23
+ readonly segmentIds: {
24
+ readonly type: "array";
25
+ readonly description: "The new list of segments (IDs) to use for this strategy. Any segments not in this list will be removed from the strategy.";
26
+ readonly example: readonly [1, 5, 6];
27
+ readonly items: {
28
+ readonly type: "integer";
29
+ readonly minimum: 0;
30
+ };
31
+ };
32
+ };
33
+ readonly components: {};
34
+ };
35
+ export declare type UpdateFeatureStrategySegmentsSchema = FromSchema<typeof updateFeatureStrategySegmentsSchema>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateFeatureStrategySegmentsSchema = void 0;
4
+ exports.updateFeatureStrategySegmentsSchema = {
5
+ $id: '#/components/schemas/updateFeatureStrategySegmentsSchema',
6
+ type: 'object',
7
+ required: ['projectId', 'strategyId', 'environmentId', 'segmentIds'],
8
+ description: 'Data required to update segments for a strategy.',
9
+ properties: {
10
+ projectId: {
11
+ type: 'string',
12
+ description: 'The ID of the project that the strategy belongs to.',
13
+ example: 'red-vista',
14
+ },
15
+ strategyId: {
16
+ type: 'string',
17
+ description: 'The ID of the strategy to update segments for.',
18
+ example: '15d1e20b-6310-4e17-a0c2-9fb84de3053a',
19
+ },
20
+ environmentId: {
21
+ type: 'string',
22
+ description: 'The ID of the strategy environment.',
23
+ example: 'development',
24
+ },
25
+ segmentIds: {
26
+ type: 'array',
27
+ description: 'The new list of segments (IDs) to use for this strategy. Any segments not in this list will be removed from the strategy.',
28
+ example: [1, 5, 6],
29
+ items: {
30
+ type: 'integer',
31
+ minimum: 0,
32
+ },
33
+ },
34
+ },
35
+ components: {},
36
+ };
37
+ //# sourceMappingURL=update-feature-strategy-segments-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-feature-strategy-segments-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/update-feature-strategy-segments-schema.ts"],"names":[],"mappings":";;;AAEa,QAAA,mCAAmC,GAAG;IAC/C,GAAG,EAAE,0DAA0D;IAC/D,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,CAAC;IACpE,WAAW,EAAE,kDAAkD;IAC/D,UAAU,EAAE;QACR,SAAS,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qDAAqD;YAClE,OAAO,EAAE,WAAW;SACvB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gDAAgD;YAC7D,OAAO,EAAE,sCAAsC;SAClD;QACD,aAAa,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qCAAqC;YAClD,OAAO,EAAE,aAAa;SACzB;QACD,UAAU,EAAE;YACR,IAAI,EAAE,OAAO;YACb,WAAW,EACP,2HAA2H;YAC/H,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YAClB,KAAK,EAAE;gBACH,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,CAAC;aACb;SACJ;KACJ;IACD,UAAU,EAAE,EAAE;CACR,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const validate_1 = require("../validate");
4
+ test('updateFeatureStrategySegmentsSchema schema', () => {
5
+ const data = {
6
+ strategyId: '1',
7
+ segmentIds: [1, 2],
8
+ projectId: 'default',
9
+ environmentId: 'default',
10
+ additional: 'property',
11
+ };
12
+ expect((0, validate_1.validateSchema)('#/components/schemas/updateFeatureStrategySegmentsSchema', data)).toBeUndefined();
13
+ expect((0, validate_1.validateSchema)('#/components/schemas/updateFeatureStrategySegmentsSchema', {})).toMatchSnapshot();
14
+ expect((0, validate_1.validateSchema)('#/components/schemas/updateFeatureStrategySegmentsSchema', {
15
+ strategyId: '1',
16
+ segmentIds: [],
17
+ })).toMatchSnapshot();
18
+ });
19
+ //# sourceMappingURL=update-feature-strategy-segments-schema.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-feature-strategy-segments-schema.test.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/update-feature-strategy-segments-schema.test.ts"],"names":[],"mappings":";;AAAA,0CAA6C;AAG7C,IAAI,CAAC,4CAA4C,EAAE,GAAG,EAAE;IACpD,MAAM,IAAI,GAAwC;QAC9C,UAAU,EAAE,GAAG;QACf,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAClB,SAAS,EAAE,SAAS;QACpB,aAAa,EAAE,SAAS;QACxB,UAAU,EAAE,UAAU;KACzB,CAAC;IAEF,MAAM,CACF,IAAA,yBAAc,EACV,0DAA0D,EAC1D,IAAI,CACP,CACJ,CAAC,aAAa,EAAE,CAAC;IAElB,MAAM,CACF,IAAA,yBAAc,EACV,0DAA0D,EAC1D,EAAE,CACL,CACJ,CAAC,eAAe,EAAE,CAAC;IAEpB,MAAM,CACF,IAAA,yBAAc,EACV,0DAA0D,EAC1D;QACI,UAAU,EAAE,GAAG;QACf,UAAU,EAAE,EAAE;KACjB,CACJ,CACJ,CAAC,eAAe,EAAE,CAAC;AACxB,CAAC,CAAC,CAAC"}
@@ -2,41 +2,34 @@ import { FromSchema } from 'json-schema-to-ts';
2
2
  export declare const upsertSegmentSchema: {
3
3
  readonly $id: "#/components/schemas/upsertSegmentSchema";
4
4
  readonly type: "object";
5
- readonly description: "Represents a segment of users defined by a set of constraints.";
5
+ readonly description: "Data used to create or update a segment";
6
6
  readonly required: readonly ["name", "constraints"];
7
7
  readonly properties: {
8
8
  readonly name: {
9
+ readonly description: "The name of the segment";
10
+ readonly example: "beta-users";
9
11
  readonly type: "string";
10
- readonly description: "The name of the segment.";
11
12
  };
12
13
  readonly description: {
13
14
  readonly type: "string";
14
15
  readonly nullable: true;
15
- readonly description: "The description of the segment.";
16
+ readonly description: "A description of what the segment is for";
17
+ readonly example: "Users willing to help us test and build new features.";
16
18
  };
17
19
  readonly project: {
18
20
  readonly type: "string";
19
21
  readonly nullable: true;
20
- readonly description: "Project from where this segment will be accessible. If none is defined the segment will be global (i.e. accessible from any project).";
22
+ readonly description: "The project the segment belongs to if any.";
23
+ readonly example: "red-vista";
21
24
  };
22
25
  readonly constraints: {
23
26
  readonly type: "array";
24
- readonly description: "List of constraints that determine which users will be part of the segment";
27
+ readonly description: "The list of constraints that make up this segment";
25
28
  readonly items: {
26
29
  readonly $ref: "#/components/schemas/constraintSchema";
27
30
  };
28
31
  };
29
32
  };
30
- readonly example: {
31
- readonly name: "segment name";
32
- readonly description: "segment description";
33
- readonly project: "optional project id";
34
- readonly constraints: readonly [{
35
- readonly contextName: "environment";
36
- readonly operator: "IN";
37
- readonly values: readonly ["production", "staging"];
38
- }];
39
- };
40
33
  readonly components: {
41
34
  readonly schemas: {
42
35
  readonly constraintSchema: {
@@ -5,43 +5,34 @@ const constraint_schema_1 = require("./constraint-schema");
5
5
  exports.upsertSegmentSchema = {
6
6
  $id: '#/components/schemas/upsertSegmentSchema',
7
7
  type: 'object',
8
- description: 'Represents a segment of users defined by a set of constraints.',
8
+ description: 'Data used to create or update a segment',
9
9
  required: ['name', 'constraints'],
10
10
  properties: {
11
11
  name: {
12
+ description: 'The name of the segment',
13
+ example: 'beta-users',
12
14
  type: 'string',
13
- description: 'The name of the segment.',
14
15
  },
15
16
  description: {
16
17
  type: 'string',
17
18
  nullable: true,
18
- description: 'The description of the segment.',
19
+ description: 'A description of what the segment is for',
20
+ example: 'Users willing to help us test and build new features.',
19
21
  },
20
22
  project: {
21
23
  type: 'string',
22
24
  nullable: true,
23
- description: 'Project from where this segment will be accessible. If none is defined the segment will be global (i.e. accessible from any project).',
25
+ description: 'The project the segment belongs to if any.',
26
+ example: 'red-vista',
24
27
  },
25
28
  constraints: {
26
29
  type: 'array',
27
- description: 'List of constraints that determine which users will be part of the segment',
30
+ description: 'The list of constraints that make up this segment',
28
31
  items: {
29
32
  $ref: '#/components/schemas/constraintSchema',
30
33
  },
31
34
  },
32
35
  },
33
- example: {
34
- name: 'segment name',
35
- description: 'segment description',
36
- project: 'optional project id',
37
- constraints: [
38
- {
39
- contextName: 'environment',
40
- operator: 'IN',
41
- values: ['production', 'staging'],
42
- },
43
- ],
44
- },
45
36
  components: {
46
37
  schemas: {
47
38
  constraintSchema: constraint_schema_1.constraintSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"upsert-segment-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/upsert-segment-schema.ts"],"names":[],"mappings":";;;AACA,2DAAuD;AAE1C,QAAA,mBAAmB,GAAG;IAC/B,GAAG,EAAE,0CAA0C;IAC/C,IAAI,EAAE,QAAQ;IACd,WAAW,EACP,gEAAgE;IACpE,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;IACjC,UAAU,EAAE;QACR,IAAI,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0BAA0B;SAC1C;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,iCAAiC;SACjD;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EACP,uIAAuI;SAC9I;QACD,WAAW,EAAE;YACT,IAAI,EAAE,OAAO;YACb,WAAW,EACP,4EAA4E;YAChF,KAAK,EAAE;gBACH,IAAI,EAAE,uCAAuC;aAChD;SACJ;KACJ;IACD,OAAO,EAAE;QACL,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE,qBAAqB;QAC9B,WAAW,EAAE;YACT;gBACI,WAAW,EAAE,aAAa;gBAC1B,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC;aACpC;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,gBAAgB,EAAhB,oCAAgB;SACnB;KACJ;CACK,CAAC"}
1
+ {"version":3,"file":"upsert-segment-schema.js","sourceRoot":"","sources":["../../../../src/lib/openapi/spec/upsert-segment-schema.ts"],"names":[],"mappings":";;;AACA,2DAAuD;AAE1C,QAAA,mBAAmB,GAAG;IAC/B,GAAG,EAAE,0CAA0C;IAC/C,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,yCAAyC;IACtD,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;IACjC,UAAU,EAAE;QACR,IAAI,EAAE;YACF,WAAW,EAAE,yBAAyB;YACtC,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE,QAAQ;SACjB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,0CAA0C;YACvD,OAAO,EAAE,uDAAuD;SACnE;QACD,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,4CAA4C;YACzD,OAAO,EAAE,WAAW;SACvB;QACD,WAAW,EAAE;YACT,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,mDAAmD;YAChE,KAAK,EAAE;gBACH,IAAI,EAAE,uCAAuC;aAChD;SACJ;KACJ;IACD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,gBAAgB,EAAhB,oCAAgB;SACnB;KACJ;CACK,CAAC"}