unleash-server 7.5.1 → 7.6.2

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 (466) hide show
  1. package/dist/lib/addons/feature-event-formatter-md-events.d.ts.map +1 -1
  2. package/dist/lib/addons/feature-event-formatter-md-events.js +16 -1
  3. package/dist/lib/addons/feature-event-formatter-md-events.js.map +1 -1
  4. package/dist/lib/addons/slack-app-definition.d.ts.map +1 -1
  5. package/dist/lib/addons/slack-app-definition.js +4 -1
  6. package/dist/lib/addons/slack-app-definition.js.map +1 -1
  7. package/dist/lib/app.d.ts.map +1 -1
  8. package/dist/lib/app.js +11 -25
  9. package/dist/lib/app.js.map +1 -1
  10. package/dist/lib/create-config.d.ts.map +1 -1
  11. package/dist/lib/create-config.js +3 -0
  12. package/dist/lib/create-config.js.map +1 -1
  13. package/dist/lib/db/api-token-store.d.ts +4 -1
  14. package/dist/lib/db/api-token-store.d.ts.map +1 -1
  15. package/dist/lib/db/api-token-store.js +17 -3
  16. package/dist/lib/db/api-token-store.js.map +1 -1
  17. package/dist/lib/error/bad-gateway-error.d.ts +7 -0
  18. package/dist/lib/error/bad-gateway-error.d.ts.map +1 -0
  19. package/dist/lib/error/bad-gateway-error.js +9 -0
  20. package/dist/lib/error/bad-gateway-error.js.map +1 -0
  21. package/dist/lib/error/gateway-timeout-error.d.ts +7 -0
  22. package/dist/lib/error/gateway-timeout-error.d.ts.map +1 -0
  23. package/dist/lib/error/gateway-timeout-error.js +9 -0
  24. package/dist/lib/error/gateway-timeout-error.js.map +1 -0
  25. package/dist/lib/error/index.d.ts +3 -1
  26. package/dist/lib/error/index.d.ts.map +1 -1
  27. package/dist/lib/error/index.js +3 -1
  28. package/dist/lib/error/index.js.map +1 -1
  29. package/dist/lib/error/unleash-error.d.ts +1 -1
  30. package/dist/lib/error/unleash-error.d.ts.map +1 -1
  31. package/dist/lib/error/unleash-error.js +2 -0
  32. package/dist/lib/error/unleash-error.js.map +1 -1
  33. package/dist/lib/events/index.d.ts +4 -1
  34. package/dist/lib/events/index.d.ts.map +1 -1
  35. package/dist/lib/events/index.js +6 -0
  36. package/dist/lib/events/index.js.map +1 -1
  37. package/dist/lib/features/client-feature-toggles/client-feature-toggle-store.d.ts.map +1 -1
  38. package/dist/lib/features/client-feature-toggles/client-feature-toggle-store.js +5 -0
  39. package/dist/lib/features/client-feature-toggles/client-feature-toggle-store.js.map +1 -1
  40. package/dist/lib/features/client-feature-toggles/client-feature-toggle-store.test.d.ts +2 -0
  41. package/dist/lib/features/client-feature-toggles/client-feature-toggle-store.test.d.ts.map +1 -0
  42. package/dist/lib/features/client-feature-toggles/client-feature-toggle-store.test.js +53 -0
  43. package/dist/lib/features/client-feature-toggles/client-feature-toggle-store.test.js.map +1 -0
  44. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta-read-model.d.ts.map +1 -1
  45. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta-read-model.js +5 -0
  46. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta-read-model.js.map +1 -1
  47. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta-read-model.test.d.ts +2 -0
  48. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta-read-model.test.d.ts.map +1 -0
  49. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta-read-model.test.js +59 -0
  50. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta-read-model.test.js.map +1 -0
  51. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta.d.ts +9 -3
  52. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta.d.ts.map +1 -1
  53. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta.js +165 -92
  54. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta.js.map +1 -1
  55. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta.test.js +475 -1
  56. package/dist/lib/features/client-feature-toggles/delta/client-feature-toggle-delta.test.js.map +1 -1
  57. package/dist/lib/features/client-feature-toggles/delta/delta-cache.d.ts.map +1 -1
  58. package/dist/lib/features/client-feature-toggles/delta/delta-cache.js +3 -0
  59. package/dist/lib/features/client-feature-toggles/delta/delta-cache.js.map +1 -1
  60. package/dist/lib/features/client-feature-toggles/delta/delta-cache.test.js +15 -0
  61. package/dist/lib/features/client-feature-toggles/delta/delta-cache.test.js.map +1 -1
  62. package/dist/lib/features/client-feature-toggles/delta/visible-revision.d.ts +3 -0
  63. package/dist/lib/features/client-feature-toggles/delta/visible-revision.d.ts.map +1 -0
  64. package/dist/lib/features/client-feature-toggles/delta/visible-revision.js +16 -0
  65. package/dist/lib/features/client-feature-toggles/delta/visible-revision.js.map +1 -0
  66. package/dist/lib/features/client-feature-toggles/delta/visible-revision.test.d.ts +2 -0
  67. package/dist/lib/features/client-feature-toggles/delta/visible-revision.test.d.ts.map +1 -0
  68. package/dist/lib/features/client-feature-toggles/delta/visible-revision.test.js +25 -0
  69. package/dist/lib/features/client-feature-toggles/delta/visible-revision.test.js.map +1 -0
  70. package/dist/lib/features/context/context.d.ts +0 -1
  71. package/dist/lib/features/context/context.d.ts.map +1 -1
  72. package/dist/lib/features/context/context.js +7 -15
  73. package/dist/lib/features/context/context.js.map +1 -1
  74. package/dist/lib/features/edgetokens/edge-token-store.d.ts +2 -0
  75. package/dist/lib/features/edgetokens/edge-token-store.d.ts.map +1 -1
  76. package/dist/lib/features/edgetokens/edge-token-store.js +20 -0
  77. package/dist/lib/features/edgetokens/edge-token-store.js.map +1 -1
  78. package/dist/lib/features/edgetokens/fake-edge-token-store.d.ts +2 -0
  79. package/dist/lib/features/edgetokens/fake-edge-token-store.d.ts.map +1 -1
  80. package/dist/lib/features/edgetokens/fake-edge-token-store.js +6 -0
  81. package/dist/lib/features/edgetokens/fake-edge-token-store.js.map +1 -1
  82. package/dist/lib/features/events/event-store.d.ts +2 -4
  83. package/dist/lib/features/events/event-store.d.ts.map +1 -1
  84. package/dist/lib/features/events/event-store.js +1 -4
  85. package/dist/lib/features/events/event-store.js.map +1 -1
  86. package/dist/lib/features/feature-search/feature-search-controller.d.ts.map +1 -1
  87. package/dist/lib/features/feature-search/feature-search-controller.js +2 -1
  88. package/dist/lib/features/feature-search/feature-search-controller.js.map +1 -1
  89. package/dist/lib/features/feature-search/feature-search-service.d.ts.map +1 -1
  90. package/dist/lib/features/feature-search/feature-search-service.js +5 -0
  91. package/dist/lib/features/feature-search/feature-search-service.js.map +1 -1
  92. package/dist/lib/features/feature-search/feature-search-store.d.ts.map +1 -1
  93. package/dist/lib/features/feature-search/feature-search-store.js +17 -1
  94. package/dist/lib/features/feature-search/feature-search-store.js.map +1 -1
  95. package/dist/lib/features/feature-search/feature.search.e2e.test.js +56 -1
  96. package/dist/lib/features/feature-search/feature.search.e2e.test.js.map +1 -1
  97. package/dist/lib/features/feature-toggle/configuration-revision-service.d.ts +1 -2
  98. package/dist/lib/features/feature-toggle/configuration-revision-service.d.ts.map +1 -1
  99. package/dist/lib/features/feature-toggle/configuration-revision-service.js +2 -10
  100. package/dist/lib/features/feature-toggle/configuration-revision-service.js.map +1 -1
  101. package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.d.ts.map +1 -1
  102. package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.js +3 -2
  103. package/dist/lib/features/feature-toggle/feature-toggle-strategies-store.js.map +1 -1
  104. package/dist/lib/features/feature-toggle/types/feature-toggle-strategies-store-type.d.ts +1 -0
  105. package/dist/lib/features/feature-toggle/types/feature-toggle-strategies-store-type.d.ts.map +1 -1
  106. package/dist/lib/features/frontend-api/frontend-api-service.d.ts.map +1 -1
  107. package/dist/lib/features/frontend-api/frontend-api-service.js +8 -0
  108. package/dist/lib/features/frontend-api/frontend-api-service.js.map +1 -1
  109. package/dist/lib/features/frontend-api/frontend-api.e2e.test.js +43 -0
  110. package/dist/lib/features/frontend-api/frontend-api.e2e.test.js.map +1 -1
  111. package/dist/lib/features/frontend-api/frontend-api.middleware.e2e.test.d.ts +3 -0
  112. package/dist/lib/features/frontend-api/frontend-api.middleware.e2e.test.d.ts.map +1 -0
  113. package/dist/lib/features/frontend-api/frontend-api.middleware.e2e.test.js +1071 -0
  114. package/dist/lib/features/frontend-api/frontend-api.middleware.e2e.test.js.map +1 -0
  115. package/dist/lib/features/index.d.ts +1 -0
  116. package/dist/lib/features/index.d.ts.map +1 -1
  117. package/dist/lib/features/index.js +1 -0
  118. package/dist/lib/features/index.js.map +1 -1
  119. package/dist/lib/features/instance-stats/instance-stats-service.d.ts.map +1 -1
  120. package/dist/lib/features/instance-stats/instance-stats-service.js +1 -3
  121. package/dist/lib/features/instance-stats/instance-stats-service.js.map +1 -1
  122. package/dist/lib/features/metrics/impact/impact-metrics.e2e.test.js +12 -12
  123. package/dist/lib/features/metrics/impact/impact-metrics.e2e.test.js.map +1 -1
  124. package/dist/lib/features/metrics/impact/metrics-translator.d.ts +5 -2
  125. package/dist/lib/features/metrics/impact/metrics-translator.d.ts.map +1 -1
  126. package/dist/lib/features/metrics/impact/metrics-translator.js +86 -102
  127. package/dist/lib/features/metrics/impact/metrics-translator.js.map +1 -1
  128. package/dist/lib/features/metrics/impact/metrics-translator.test.js +70 -112
  129. package/dist/lib/features/metrics/impact/metrics-translator.test.js.map +1 -1
  130. package/dist/lib/features/project/createProjectService.d.ts.map +1 -1
  131. package/dist/lib/features/project/createProjectService.js +6 -0
  132. package/dist/lib/features/project/createProjectService.js.map +1 -1
  133. package/dist/lib/features/project/project-service.d.ts +2 -1
  134. package/dist/lib/features/project/project-service.d.ts.map +1 -1
  135. package/dist/lib/features/project/project-service.js +3 -1
  136. package/dist/lib/features/project/project-service.js.map +1 -1
  137. package/dist/lib/features/project-environments/project-environments.e2e.test.js +37 -0
  138. package/dist/lib/features/project-environments/project-environments.e2e.test.js.map +1 -1
  139. package/dist/lib/features/release-plans/release-plan-milestone-strategy-service.d.ts.map +1 -1
  140. package/dist/lib/features/release-plans/release-plan-milestone-strategy-service.js +2 -5
  141. package/dist/lib/features/release-plans/release-plan-milestone-strategy-service.js.map +1 -1
  142. package/dist/lib/features/release-plans/release-plan-milestone-strategy-service.test.js +2 -2
  143. package/dist/lib/features/release-plans/release-plan-milestone-strategy-service.test.js.map +1 -1
  144. package/dist/lib/features/release-plans/release-plan-milestone-strategy-store.d.ts +2 -1
  145. package/dist/lib/features/release-plans/release-plan-milestone-strategy-store.d.ts.map +1 -1
  146. package/dist/lib/features/release-plans/release-plan-milestone-strategy-store.js +20 -3
  147. package/dist/lib/features/release-plans/release-plan-milestone-strategy-store.js.map +1 -1
  148. package/dist/lib/features/release-plans/release-plan-milestone-strategy.d.ts +2 -0
  149. package/dist/lib/features/release-plans/release-plan-milestone-strategy.d.ts.map +1 -1
  150. package/dist/lib/features/release-plans/release-plan-store.d.ts.map +1 -1
  151. package/dist/lib/features/release-plans/release-plan-store.js +2 -0
  152. package/dist/lib/features/release-plans/release-plan-store.js.map +1 -1
  153. package/dist/lib/features/release-plans/release-plan-template-store.d.ts.map +1 -1
  154. package/dist/lib/features/release-plans/release-plan-template-store.js +4 -3
  155. package/dist/lib/features/release-plans/release-plan-template-store.js.map +1 -1
  156. package/dist/lib/features/release-plans/release-plan-template-store.test.d.ts +2 -0
  157. package/dist/lib/features/release-plans/release-plan-template-store.test.d.ts.map +1 -0
  158. package/dist/lib/features/release-plans/release-plan-template-store.test.js +47 -0
  159. package/dist/lib/features/release-plans/release-plan-template-store.test.js.map +1 -0
  160. package/dist/lib/metric-events.d.ts +3 -2
  161. package/dist/lib/metric-events.d.ts.map +1 -1
  162. package/dist/lib/metric-events.js +2 -1
  163. package/dist/lib/metric-events.js.map +1 -1
  164. package/dist/lib/middleware/api-token-middleware.d.ts.map +1 -1
  165. package/dist/lib/middleware/api-token-middleware.js +1 -5
  166. package/dist/lib/middleware/api-token-middleware.js.map +1 -1
  167. package/dist/lib/middleware/api-token-middleware.test.js +35 -25
  168. package/dist/lib/middleware/api-token-middleware.test.js.map +1 -1
  169. package/dist/lib/middleware/backend-token-middleware.d.ts +5 -0
  170. package/dist/lib/middleware/backend-token-middleware.d.ts.map +1 -0
  171. package/dist/lib/middleware/backend-token-middleware.js +61 -0
  172. package/dist/lib/middleware/backend-token-middleware.js.map +1 -0
  173. package/dist/lib/middleware/backend-token-middleware.test.d.ts +2 -0
  174. package/dist/lib/middleware/backend-token-middleware.test.d.ts.map +1 -0
  175. package/dist/lib/middleware/backend-token-middleware.test.js +73 -0
  176. package/dist/lib/middleware/backend-token-middleware.test.js.map +1 -0
  177. package/dist/lib/middleware/conditional-middleware.d.ts +20 -0
  178. package/dist/lib/middleware/conditional-middleware.d.ts.map +1 -1
  179. package/dist/lib/middleware/conditional-middleware.js +26 -0
  180. package/dist/lib/middleware/conditional-middleware.js.map +1 -1
  181. package/dist/lib/middleware/conditional-middleware.test.d.ts +2 -0
  182. package/dist/lib/middleware/conditional-middleware.test.d.ts.map +1 -0
  183. package/dist/lib/middleware/conditional-middleware.test.js +31 -0
  184. package/dist/lib/middleware/conditional-middleware.test.js.map +1 -0
  185. package/dist/lib/middleware/frontend-token-middleware.d.ts +5 -0
  186. package/dist/lib/middleware/frontend-token-middleware.d.ts.map +1 -0
  187. package/dist/lib/middleware/frontend-token-middleware.js +61 -0
  188. package/dist/lib/middleware/frontend-token-middleware.js.map +1 -0
  189. package/dist/lib/middleware/user-token-client-api-logger-middleware.js +1 -1
  190. package/dist/lib/middleware/user-token-client-api-logger-middleware.js.map +1 -1
  191. package/dist/lib/openapi/spec/event-schema.d.ts +1 -1
  192. package/dist/lib/openapi/spec/event-search-response-schema.d.ts +1 -1
  193. package/dist/lib/openapi/spec/events-schema.d.ts +1 -1
  194. package/dist/lib/openapi/spec/export-result-schema.d.ts +1018 -100
  195. package/dist/lib/openapi/spec/export-result-schema.d.ts.map +1 -1
  196. package/dist/lib/openapi/spec/export-result-schema.js +4 -2
  197. package/dist/lib/openapi/spec/export-result-schema.js.map +1 -1
  198. package/dist/lib/openapi/spec/feature-environment-safeguard-schema.d.ts +168 -0
  199. package/dist/lib/openapi/spec/feature-environment-safeguard-schema.d.ts.map +1 -0
  200. package/dist/lib/openapi/spec/feature-environment-safeguard-schema.js +66 -0
  201. package/dist/lib/openapi/spec/feature-environment-safeguard-schema.js.map +1 -0
  202. package/dist/lib/openapi/spec/feature-environment-schema.d.ts +265 -7
  203. package/dist/lib/openapi/spec/feature-environment-schema.d.ts.map +1 -1
  204. package/dist/lib/openapi/spec/feature-environment-schema.js +13 -0
  205. package/dist/lib/openapi/spec/feature-environment-schema.js.map +1 -1
  206. package/dist/lib/openapi/spec/feature-events-schema.d.ts +1 -1
  207. package/dist/lib/openapi/spec/feature-schema.d.ts +475 -16
  208. package/dist/lib/openapi/spec/feature-schema.d.ts.map +1 -1
  209. package/dist/lib/openapi/spec/feature-schema.js +4 -2
  210. package/dist/lib/openapi/spec/feature-schema.js.map +1 -1
  211. package/dist/lib/openapi/spec/feature-search-environment-schema.d.ts +688 -14
  212. package/dist/lib/openapi/spec/feature-search-environment-schema.d.ts.map +1 -1
  213. package/dist/lib/openapi/spec/feature-search-environment-schema.js +8 -0
  214. package/dist/lib/openapi/spec/feature-search-environment-schema.js.map +1 -1
  215. package/dist/lib/openapi/spec/feature-search-query-parameters.d.ts +10 -1
  216. package/dist/lib/openapi/spec/feature-search-query-parameters.d.ts.map +1 -1
  217. package/dist/lib/openapi/spec/feature-search-query-parameters.js +10 -0
  218. package/dist/lib/openapi/spec/feature-search-query-parameters.js.map +1 -1
  219. package/dist/lib/openapi/spec/feature-search-response-schema.d.ts +8097 -155
  220. package/dist/lib/openapi/spec/feature-search-response-schema.d.ts.map +1 -1
  221. package/dist/lib/openapi/spec/feature-search-response-schema.js +22 -0
  222. package/dist/lib/openapi/spec/feature-search-response-schema.js.map +1 -1
  223. package/dist/lib/openapi/spec/health-overview-schema.d.ts +1336 -210
  224. package/dist/lib/openapi/spec/health-overview-schema.d.ts.map +1 -1
  225. package/dist/lib/openapi/spec/health-overview-schema.js +8 -0
  226. package/dist/lib/openapi/spec/health-overview-schema.js.map +1 -1
  227. package/dist/lib/openapi/spec/health-report-schema.d.ts +1336 -210
  228. package/dist/lib/openapi/spec/health-report-schema.d.ts.map +1 -1
  229. package/dist/lib/openapi/spec/import-toggles-schema.d.ts +2 -2
  230. package/dist/lib/openapi/spec/import-toggles-schema.d.ts.map +1 -1
  231. package/dist/lib/openapi/spec/import-toggles-schema.js +4 -2
  232. package/dist/lib/openapi/spec/import-toggles-schema.js.map +1 -1
  233. package/dist/lib/openapi/spec/index.d.ts +4 -2
  234. package/dist/lib/openapi/spec/index.d.ts.map +1 -1
  235. package/dist/lib/openapi/spec/index.js +4 -2
  236. package/dist/lib/openapi/spec/index.js.map +1 -1
  237. package/dist/lib/openapi/spec/integration-event-schema.d.ts +1 -1
  238. package/dist/lib/openapi/spec/integration-events-schema.d.ts +2 -2
  239. package/dist/lib/openapi/spec/metric-query-schema.d.ts +6 -0
  240. package/dist/lib/openapi/spec/metric-query-schema.d.ts.map +1 -1
  241. package/dist/lib/openapi/spec/metric-query-schema.js +6 -0
  242. package/dist/lib/openapi/spec/metric-query-schema.js.map +1 -1
  243. package/dist/lib/openapi/spec/profile-schema.d.ts +475 -16
  244. package/dist/lib/openapi/spec/profile-schema.d.ts.map +1 -1
  245. package/dist/lib/openapi/spec/project-overview-schema.d.ts +1336 -210
  246. package/dist/lib/openapi/spec/project-overview-schema.d.ts.map +1 -1
  247. package/dist/lib/openapi/spec/project-overview-schema.js +8 -0
  248. package/dist/lib/openapi/spec/project-overview-schema.js.map +1 -1
  249. package/dist/lib/openapi/spec/release-plan-milestone-schema.d.ts +1 -1
  250. package/dist/lib/openapi/spec/release-plan-milestone-strategy-schema.d.ts +1 -1
  251. package/dist/lib/openapi/spec/release-plan-milestone-strategy-schema.js +1 -1
  252. package/dist/lib/openapi/spec/release-plan-milestone-strategy-schema.js.map +1 -1
  253. package/dist/lib/openapi/spec/{safeguard-schema.d.ts → release-plan-safeguard-schema.d.ts} +16 -4
  254. package/dist/lib/openapi/spec/release-plan-safeguard-schema.d.ts.map +1 -0
  255. package/dist/lib/openapi/spec/{safeguard-schema.js → release-plan-safeguard-schema.js} +3 -3
  256. package/dist/lib/openapi/spec/release-plan-safeguard-schema.js.map +1 -0
  257. package/dist/lib/openapi/spec/release-plan-schema.d.ts +23 -5
  258. package/dist/lib/openapi/spec/release-plan-schema.d.ts.map +1 -1
  259. package/dist/lib/openapi/spec/release-plan-schema.js +3 -3
  260. package/dist/lib/openapi/spec/release-plan-schema.js.map +1 -1
  261. package/dist/lib/openapi/spec/release-plan-template-schema.d.ts +2 -2
  262. package/dist/lib/openapi/spec/release-plan-templates-schema.d.ts +2897 -0
  263. package/dist/lib/openapi/spec/release-plan-templates-schema.d.ts.map +1 -0
  264. package/dist/lib/openapi/spec/release-plan-templates-schema.js +29 -0
  265. package/dist/lib/openapi/spec/release-plan-templates-schema.js.map +1 -0
  266. package/dist/lib/openapi/spec/release-plans-schema.d.ts +45 -9
  267. package/dist/lib/openapi/spec/release-plans-schema.d.ts.map +1 -1
  268. package/dist/lib/openapi/spec/release-plans-schema.js +2 -2
  269. package/dist/lib/openapi/spec/release-plans-schema.js.map +1 -1
  270. package/dist/lib/openapi/spec/search-features-schema.d.ts +13694 -5078
  271. package/dist/lib/openapi/spec/search-features-schema.d.ts.map +1 -1
  272. package/dist/lib/routes/admin-api/api-token.js +1 -1
  273. package/dist/lib/routes/admin-api/api-token.js.map +1 -1
  274. package/dist/lib/routes/admin-api/project/api-token.js +1 -1
  275. package/dist/lib/routes/admin-api/project/api-token.js.map +1 -1
  276. package/dist/lib/routes/logout.js +1 -1
  277. package/dist/lib/routes/logout.js.map +1 -1
  278. package/dist/lib/routes/logout.test.js +4 -4
  279. package/dist/lib/routes/logout.test.js.map +1 -1
  280. package/dist/lib/schema/api-token-schema.d.ts.map +1 -1
  281. package/dist/lib/schema/api-token-schema.js +1 -0
  282. package/dist/lib/schema/api-token-schema.js.map +1 -1
  283. package/dist/lib/server-impl.d.ts +5 -5
  284. package/dist/lib/server-impl.d.ts.map +1 -1
  285. package/dist/lib/server-impl.js +3 -3
  286. package/dist/lib/server-impl.js.map +1 -1
  287. package/dist/lib/services/api-token-service.d.ts +2 -2
  288. package/dist/lib/services/api-token-service.d.ts.map +1 -1
  289. package/dist/lib/services/api-token-service.js +5 -3
  290. package/dist/lib/services/api-token-service.js.map +1 -1
  291. package/dist/lib/services/api-token-service.test.js +5 -4
  292. package/dist/lib/services/api-token-service.test.js.map +1 -1
  293. package/dist/lib/services/edge-service.d.ts +1 -0
  294. package/dist/lib/services/edge-service.d.ts.map +1 -1
  295. package/dist/lib/services/edge-service.js +5 -2
  296. package/dist/lib/services/edge-service.js.map +1 -1
  297. package/dist/lib/services/user-service.d.ts.map +1 -1
  298. package/dist/lib/services/user-service.js +0 -4
  299. package/dist/lib/services/user-service.js.map +1 -1
  300. package/dist/lib/types/experimental.d.ts +1 -1
  301. package/dist/lib/types/experimental.d.ts.map +1 -1
  302. package/dist/lib/types/experimental.js +7 -8
  303. package/dist/lib/types/experimental.js.map +1 -1
  304. package/dist/lib/types/model.d.ts +2 -1
  305. package/dist/lib/types/model.d.ts.map +1 -1
  306. package/dist/lib/types/model.js.map +1 -1
  307. package/dist/lib/types/option.d.ts +2 -0
  308. package/dist/lib/types/option.d.ts.map +1 -1
  309. package/dist/lib/types/stores/api-token-store.d.ts +2 -1
  310. package/dist/lib/types/stores/api-token-store.d.ts.map +1 -1
  311. package/dist/lib/types/stores/edge-store.d.ts +2 -0
  312. package/dist/lib/types/stores/edge-store.d.ts.map +1 -1
  313. package/dist/lib/types/stores/event-store.d.ts +1 -1
  314. package/dist/lib/types/stores/event-store.d.ts.map +1 -1
  315. package/dist/lib/util/clone-db-config.d.ts +3 -0
  316. package/dist/lib/util/clone-db-config.d.ts.map +1 -0
  317. package/dist/lib/util/clone-db-config.js +18 -0
  318. package/dist/lib/util/clone-db-config.js.map +1 -0
  319. package/dist/lib/util/clone-db-config.test.d.ts +2 -0
  320. package/dist/lib/util/clone-db-config.test.d.ts.map +1 -0
  321. package/dist/lib/util/clone-db-config.test.js +40 -0
  322. package/dist/lib/util/clone-db-config.test.js.map +1 -0
  323. package/dist/lib/util/db-lock.d.ts.map +1 -1
  324. package/dist/lib/util/db-lock.js +2 -3
  325. package/dist/lib/util/db-lock.js.map +1 -1
  326. package/dist/lib/util/sortStrategies.d.ts +1 -1
  327. package/dist/lib/util/sortStrategies.d.ts.map +1 -1
  328. package/dist/lib/util/sortStrategies.js +6 -2
  329. package/dist/lib/util/sortStrategies.js.map +1 -1
  330. package/dist/lib/util/sortStrategies.test.js +21 -0
  331. package/dist/lib/util/sortStrategies.test.js.map +1 -1
  332. package/dist/migrations/20260309125735-drop-cascade-for-edge-api-token.d.ts +3 -0
  333. package/dist/migrations/20260309125735-drop-cascade-for-edge-api-token.d.ts.map +1 -0
  334. package/dist/migrations/20260309125735-drop-cascade-for-edge-api-token.js +15 -0
  335. package/dist/migrations/20260309125735-drop-cascade-for-edge-api-token.js.map +1 -0
  336. package/dist/migrations/20260310134100-split-safeguards-table.d.ts +3 -0
  337. package/dist/migrations/20260310134100-split-safeguards-table.d.ts.map +1 -0
  338. package/dist/migrations/20260310134100-split-safeguards-table.js +31 -0
  339. package/dist/migrations/20260310134100-split-safeguards-table.js.map +1 -0
  340. package/dist/migrations/20260311073041-migrate-safeguards-data.d.ts +3 -0
  341. package/dist/migrations/20260311073041-migrate-safeguards-data.d.ts.map +1 -0
  342. package/dist/migrations/20260311073041-migrate-safeguards-data.js +42 -0
  343. package/dist/migrations/20260311073041-migrate-safeguards-data.js.map +1 -0
  344. package/dist/migrations/20260312100000-release-plans-fix-cascade-on-env-disconnect.d.ts +3 -0
  345. package/dist/migrations/20260312100000-release-plans-fix-cascade-on-env-disconnect.d.ts.map +1 -0
  346. package/dist/migrations/20260312100000-release-plans-fix-cascade-on-env-disconnect.js +31 -0
  347. package/dist/migrations/20260312100000-release-plans-fix-cascade-on-env-disconnect.js.map +1 -0
  348. package/dist/migrations/20260316113111-update-memory-usage-to-big-int.d.ts +3 -0
  349. package/dist/migrations/20260316113111-update-memory-usage-to-big-int.d.ts.map +1 -0
  350. package/dist/migrations/20260316113111-update-memory-usage-to-big-int.js +8 -0
  351. package/dist/migrations/20260316113111-update-memory-usage-to-big-int.js.map +1 -0
  352. package/dist/migrations/20260316140000-safeguards-fix-cascade-on-env-disconnect.d.ts +3 -0
  353. package/dist/migrations/20260316140000-safeguards-fix-cascade-on-env-disconnect.d.ts.map +1 -0
  354. package/dist/migrations/20260316140000-safeguards-fix-cascade-on-env-disconnect.js +54 -0
  355. package/dist/migrations/20260316140000-safeguards-fix-cascade-on-env-disconnect.js.map +1 -0
  356. package/dist/migrations/20260317140000-safeguards-drop-project-not-null.d.ts +3 -0
  357. package/dist/migrations/20260317140000-safeguards-drop-project-not-null.d.ts.map +1 -0
  358. package/dist/migrations/20260317140000-safeguards-drop-project-not-null.js +21 -0
  359. package/dist/migrations/20260317140000-safeguards-drop-project-not-null.js.map +1 -0
  360. package/dist/migrations/20260318100000-safeguards-drop-project-column.d.ts +3 -0
  361. package/dist/migrations/20260318100000-safeguards-drop-project-column.d.ts.map +1 -0
  362. package/dist/migrations/20260318100000-safeguards-drop-project-column.js +14 -0
  363. package/dist/migrations/20260318100000-safeguards-drop-project-column.js.map +1 -0
  364. package/dist/migrations/20260406132537-user-access-requests.d.ts +3 -0
  365. package/dist/migrations/20260406132537-user-access-requests.d.ts.map +1 -0
  366. package/dist/migrations/20260406132537-user-access-requests.js +16 -0
  367. package/dist/migrations/20260406132537-user-access-requests.js.map +1 -0
  368. package/dist/migrations/20260406161629-user-access-requests-unique-email.d.ts +3 -0
  369. package/dist/migrations/20260406161629-user-access-requests-unique-email.d.ts.map +1 -0
  370. package/dist/migrations/20260406161629-user-access-requests-unique-email.js +14 -0
  371. package/dist/migrations/20260406161629-user-access-requests-unique-email.js.map +1 -0
  372. package/dist/migrator.d.ts.map +1 -1
  373. package/dist/migrator.js +4 -3
  374. package/dist/migrator.js.map +1 -1
  375. package/dist/server-dev.js +4 -7
  376. package/dist/server-dev.js.map +1 -1
  377. package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js +5 -5
  378. package/dist/test/e2e/api/admin/api-token.auth.e2e.test.js.map +1 -1
  379. package/dist/test/e2e/api/admin/api-token.e2e.test.js +3 -2
  380. package/dist/test/e2e/api/admin/api-token.e2e.test.js.map +1 -1
  381. package/dist/test/e2e/api/admin/conditional-middleware.e2e.test.js +106 -38
  382. package/dist/test/e2e/api/admin/conditional-middleware.e2e.test.js.map +1 -1
  383. package/dist/test/e2e/api/admin/context-api-include-query-params.e2e.test.js +1 -7
  384. package/dist/test/e2e/api/admin/context-api-include-query-params.e2e.test.js.map +1 -1
  385. package/dist/test/e2e/api/admin/project/api-token.e2e.test.js +2 -1
  386. package/dist/test/e2e/api/admin/project/api-token.e2e.test.js.map +1 -1
  387. package/dist/test/e2e/api/admin/project/project.api.tokens.e2e.test.js +5 -5
  388. package/dist/test/e2e/api/admin/project/project.api.tokens.e2e.test.js.map +1 -1
  389. package/dist/test/e2e/api/admin/project-context.e2e.test.js +1 -7
  390. package/dist/test/e2e/api/admin/project-context.e2e.test.js.map +1 -1
  391. package/dist/test/e2e/api/client/feature.token.access.e2e.test.js +34 -1
  392. package/dist/test/e2e/api/client/feature.token.access.e2e.test.js.map +1 -1
  393. package/dist/test/e2e/services/api-token-service.e2e.test.js +21 -6
  394. package/dist/test/e2e/services/api-token-service.e2e.test.js.map +1 -1
  395. package/dist/test/e2e/services/edge-service.e2e.test.js +4 -3
  396. package/dist/test/e2e/services/edge-service.e2e.test.js.map +1 -1
  397. package/dist/test/e2e/stores/api-token-store.e2e.test.js +15 -14
  398. package/dist/test/e2e/stores/api-token-store.e2e.test.js.map +1 -1
  399. package/dist/test/e2e/stores/event-store.e2e.test.js +8 -9
  400. package/dist/test/e2e/stores/event-store.e2e.test.js.map +1 -1
  401. package/dist/test/fixtures/fake-api-token-store.d.ts +2 -1
  402. package/dist/test/fixtures/fake-api-token-store.d.ts.map +1 -1
  403. package/dist/test/fixtures/fake-api-token-store.js +4 -1
  404. package/dist/test/fixtures/fake-api-token-store.js.map +1 -1
  405. package/dist/test/fixtures/fake-event-store.d.ts +1 -1
  406. package/dist/test/fixtures/fake-event-store.d.ts.map +1 -1
  407. package/dist/test/fixtures/fake-event-store.js +1 -1
  408. package/dist/test/fixtures/fake-event-store.js.map +1 -1
  409. package/dist/test/fixtures/fake-release-plan-milestone-strategy-store.d.ts +2 -2
  410. package/dist/test/fixtures/fake-release-plan-milestone-strategy-store.d.ts.map +1 -1
  411. package/dist/test/fixtures/fake-release-plan-milestone-strategy-store.js +3 -2
  412. package/dist/test/fixtures/fake-release-plan-milestone-strategy-store.js.map +1 -1
  413. package/frontend/build/index.html +1 -1
  414. package/frontend/build/static/AdvancedPlayground-BTPrG6RW.js +3 -0
  415. package/frontend/build/static/BackendConnections-CRh8Vxoe.js +1 -0
  416. package/frontend/build/static/{CreateProject-DV-Ad8Sn.js → CreateProject-DEMalH1j.js} +1 -1
  417. package/frontend/build/static/EnterpriseEdge-Cp-pGMa0.js +6 -0
  418. package/frontend/build/static/FeatureMetricsChart-DQOE71LA.js +2 -0
  419. package/frontend/build/static/FeatureStaleDialog-B6BfnDiQ.js +689 -0
  420. package/frontend/build/static/{FeatureViewLazyExport-Bsw7-knb.js → FeatureViewLazyExport-BkNTNFqK.js} +4 -7
  421. package/frontend/build/static/FlagMetricsChart-zYDF9bet.js +2 -0
  422. package/frontend/build/static/FrontendNetworkTrafficUsage-CbxdFXH7.js +1 -0
  423. package/frontend/build/static/GridLayoutWrapper-Cq6Bzm36.js +3 -0
  424. package/frontend/build/static/ImpactMetricsPage-CFYXYXPb.js +1 -0
  425. package/frontend/build/static/LazyAdminExport-ByTh4iFa.js +38 -0
  426. package/frontend/build/static/LazyProjectExport-K12Xy3w9.js +46 -0
  427. package/frontend/build/static/{LifecycleChartComponent-cxR-TN3V.js → LifecycleChartComponent-DHvlFNd2.js} +3 -3
  428. package/frontend/build/static/LineChartComponent-BlhKm3cw.js +1 -0
  429. package/frontend/build/static/MarkCompletedDialogue-apmlFjVY.js +1 -0
  430. package/frontend/build/static/{NetworkOverview-DxaPXUzZ.js → NetworkOverview-BiLOuQ4c.js} +1 -1
  431. package/frontend/build/static/{NetworkPrometheusAPIWarning-ltyTlXFF.js → NetworkPrometheusAPIWarning-CYo3j2Tj.js} +1 -1
  432. package/frontend/build/static/{NetworkTraffic-Dhw4yIBs.js → NetworkTraffic-DONL5oIx.js} +1 -1
  433. package/frontend/build/static/NetworkTrafficUsage-DjQiYq0S.js +1 -0
  434. package/frontend/build/static/{PercentageDonut-JGNh2FVZ.js → PercentageDonut-CA9hYg3v.js} +1 -1
  435. package/frontend/build/static/{ReactJSONEditor-GHl7KvdS.js → ReactJSONEditor-9cJL1vJY.js} +31 -31
  436. package/frontend/build/static/{RoleCell-CjVCxBgl.js → RoleCell-ZzU5Oqy8.js} +1 -1
  437. package/frontend/build/static/Safeguard-DY1N4aPz.js +1 -0
  438. package/frontend/build/static/aggregateFeatureMetrics-D6bHft_C.js +1 -0
  439. package/frontend/build/static/{formatTickValue-BZb4ZIL9.js → formatTickValue-BcLsqREh.js} +2 -2
  440. package/frontend/build/static/{index-DcWBU_a4.js → index-B87DWXbl.js} +1 -1
  441. package/frontend/build/static/index-CoLhlfXP.js +565 -0
  442. package/frontend/build/static/loginBackground-CQx0IRYc.png +0 -0
  443. package/frontend/build/static/{networkTrafficUsageHighlightPlugin-BbfAyDiQ.js → networkTrafficUsageHighlightPlugin-CqEM-cK_.js} +1 -1
  444. package/frontend/build/static/passwordSuccess-fcvTEYOw.png +0 -0
  445. package/frontend/build/static/useApiTokens-ClWvohC9.js +1 -0
  446. package/frontend/package.json +50 -42
  447. package/package.json +11 -10
  448. package/dist/lib/openapi/spec/safeguard-schema.d.ts.map +0 -1
  449. package/dist/lib/openapi/spec/safeguard-schema.js.map +0 -1
  450. package/frontend/build/static/AdvancedPlayground-CF0hkpiE.js +0 -3
  451. package/frontend/build/static/BackendConnections-DhZczar-.js +0 -1
  452. package/frontend/build/static/EnterpriseEdge-D1To2ugP.js +0 -3
  453. package/frontend/build/static/FeatureMetricsChart-D8sRgx5P.js +0 -2
  454. package/frontend/build/static/FeatureStaleDialog-DOkhgvaj.js +0 -7
  455. package/frontend/build/static/FlagMetricsChart-CF_kEyQa.js +0 -2
  456. package/frontend/build/static/FrontendNetworkTrafficUsage-C8zJSvoc.js +0 -1
  457. package/frontend/build/static/GridLayoutWrapper-DpJcUbQB.js +0 -3
  458. package/frontend/build/static/ImpactMetricsPage-KLVv-tP4.js +0 -1
  459. package/frontend/build/static/LazyAdminExport-CWQiknO-.js +0 -38
  460. package/frontend/build/static/LazyProjectExport-DsMn4Yxm.js +0 -728
  461. package/frontend/build/static/LineChartComponent-_yZEp3dd.js +0 -1
  462. package/frontend/build/static/MarkCompletedDialogue-DFtLyDN0.js +0 -1
  463. package/frontend/build/static/NetworkTrafficUsage-deKWRhIS.js +0 -1
  464. package/frontend/build/static/aggregateFeatureMetrics-YEdZNNoV.js +0 -1
  465. package/frontend/build/static/index-DMSjiFEm.js +0 -583
  466. package/frontend/build/static/useApiTokens-DBB3NvXL.js +0 -1
@@ -1107,6 +1107,13 @@ export declare const healthReportSchema: {
1107
1107
  readonly $ref: "#/components/schemas/releasePlanSchema";
1108
1108
  };
1109
1109
  };
1110
+ readonly safeguards: {
1111
+ readonly type: "array";
1112
+ readonly description: "Safeguards for this feature environment";
1113
+ readonly items: {
1114
+ readonly $ref: "#/components/schemas/featureEnvironmentSafeguardSchema";
1115
+ };
1116
+ };
1110
1117
  readonly yes: {
1111
1118
  readonly type: "integer";
1112
1119
  readonly description: "How many times the feature evaluated to true (enabled)";
@@ -1565,7 +1572,7 @@ export declare const healthReportSchema: {
1565
1572
  readonly type: "array";
1566
1573
  readonly description: "An array of safeguards configured for this release plan.";
1567
1574
  readonly items: {
1568
- readonly $ref: "#/components/schemas/safeguardSchema";
1575
+ readonly $ref: "#/components/schemas/releasePlanSafeguardSchema";
1569
1576
  };
1570
1577
  };
1571
1578
  };
@@ -1650,7 +1657,7 @@ export declare const healthReportSchema: {
1650
1657
  readonly additionalProperties: false;
1651
1658
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
1652
1659
  readonly type: "object";
1653
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
1660
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
1654
1661
  readonly properties: {
1655
1662
  readonly id: {
1656
1663
  readonly type: "string";
@@ -2319,7 +2326,7 @@ export declare const healthReportSchema: {
2319
2326
  readonly additionalProperties: false;
2320
2327
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
2321
2328
  readonly type: "object";
2322
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
2329
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
2323
2330
  readonly properties: {
2324
2331
  readonly id: {
2325
2332
  readonly type: "string";
@@ -2980,8 +2987,8 @@ export declare const healthReportSchema: {
2980
2987
  };
2981
2988
  readonly components: {};
2982
2989
  };
2983
- readonly safeguardSchema: {
2984
- readonly $id: "#/components/schemas/safeguardSchema";
2990
+ readonly releasePlanSafeguardSchema: {
2991
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
2985
2992
  readonly type: "object";
2986
2993
  readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
2987
2994
  readonly description: "A safeguard configuration for a release plan.";
@@ -3050,6 +3057,12 @@ export declare const healthReportSchema: {
3050
3057
  readonly project: readonly ["default"];
3051
3058
  };
3052
3059
  };
3060
+ readonly source: {
3061
+ readonly type: "string";
3062
+ readonly enum: readonly ["internal", "external"];
3063
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
3064
+ readonly example: "internal";
3065
+ };
3053
3066
  readonly id: {
3054
3067
  readonly type: "string";
3055
3068
  readonly description: "The unique identifier for this impact metric";
@@ -3099,6 +3112,12 @@ export declare const healthReportSchema: {
3099
3112
  readonly project: readonly ["default"];
3100
3113
  };
3101
3114
  };
3115
+ readonly source: {
3116
+ readonly type: "string";
3117
+ readonly enum: readonly ["internal", "external"];
3118
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
3119
+ readonly example: "internal";
3120
+ };
3102
3121
  };
3103
3122
  readonly components: {};
3104
3123
  };
@@ -3164,6 +3183,12 @@ export declare const healthReportSchema: {
3164
3183
  readonly project: readonly ["default"];
3165
3184
  };
3166
3185
  };
3186
+ readonly source: {
3187
+ readonly type: "string";
3188
+ readonly enum: readonly ["internal", "external"];
3189
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
3190
+ readonly example: "internal";
3191
+ };
3167
3192
  };
3168
3193
  readonly components: {};
3169
3194
  };
@@ -3270,7 +3295,7 @@ export declare const healthReportSchema: {
3270
3295
  readonly additionalProperties: false;
3271
3296
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
3272
3297
  readonly type: "object";
3273
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
3298
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
3274
3299
  readonly properties: {
3275
3300
  readonly id: {
3276
3301
  readonly type: "string";
@@ -3939,7 +3964,7 @@ export declare const healthReportSchema: {
3939
3964
  readonly additionalProperties: false;
3940
3965
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
3941
3966
  readonly type: "object";
3942
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
3967
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
3943
3968
  readonly properties: {
3944
3969
  readonly id: {
3945
3970
  readonly type: "string";
@@ -4547,6 +4572,239 @@ export declare const healthReportSchema: {
4547
4572
  };
4548
4573
  readonly components: {};
4549
4574
  };
4575
+ readonly featureEnvironmentSafeguardSchema: {
4576
+ readonly $id: "#/components/schemas/featureEnvironmentSafeguardSchema";
4577
+ readonly type: "object";
4578
+ readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
4579
+ readonly description: "A safeguard configuration for a feature environment.";
4580
+ readonly additionalProperties: false;
4581
+ readonly properties: {
4582
+ readonly id: {
4583
+ readonly type: "string";
4584
+ readonly description: "The unique ULID identifier for this safeguard";
4585
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
4586
+ };
4587
+ readonly action: {
4588
+ readonly type: "object";
4589
+ readonly required: readonly ["type", "featureName", "environment", "project"];
4590
+ readonly additionalProperties: false;
4591
+ readonly description: "Disable a feature in an environment when triggered.";
4592
+ readonly properties: {
4593
+ readonly type: {
4594
+ readonly type: "string";
4595
+ readonly description: "The type of action to perform.";
4596
+ readonly example: "disableFeatureEnvironment";
4597
+ };
4598
+ readonly featureName: {
4599
+ readonly type: "string";
4600
+ readonly description: "The feature flag name this safeguard applies to.";
4601
+ };
4602
+ readonly environment: {
4603
+ readonly type: "string";
4604
+ readonly description: "The environment this safeguard applies to.";
4605
+ };
4606
+ readonly project: {
4607
+ readonly type: "string";
4608
+ readonly description: "The project this safeguard applies to.";
4609
+ };
4610
+ };
4611
+ };
4612
+ readonly triggerCondition: {
4613
+ readonly $ref: "#/components/schemas/safeguardTriggerConditionSchema";
4614
+ readonly description: "The condition that triggers the safeguard.";
4615
+ };
4616
+ readonly impactMetric: {
4617
+ readonly type: "object";
4618
+ readonly required: readonly ["id", "metricName", "timeRange", "aggregationMode", "labelSelectors"];
4619
+ readonly additionalProperties: false;
4620
+ readonly properties: {
4621
+ readonly metricName: {
4622
+ readonly type: "string";
4623
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
4624
+ readonly example: "unleash_counter_feature_toggle_usage_total";
4625
+ };
4626
+ readonly timeRange: {
4627
+ readonly type: "string";
4628
+ readonly enum: readonly ["hour", "day", "week", "month"];
4629
+ readonly description: "The time range for the metric data.";
4630
+ readonly example: "day";
4631
+ };
4632
+ readonly aggregationMode: {
4633
+ readonly type: "string";
4634
+ readonly description: "The aggregation mode for the metric data.";
4635
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
4636
+ readonly example: "rps";
4637
+ };
4638
+ readonly labelSelectors: {
4639
+ readonly type: "object";
4640
+ readonly additionalProperties: {
4641
+ readonly type: "array";
4642
+ readonly items: {
4643
+ readonly type: "string";
4644
+ };
4645
+ };
4646
+ readonly description: "The selected labels and their values for filtering the metric data.";
4647
+ readonly example: {
4648
+ readonly environment: readonly ["development"];
4649
+ readonly project: readonly ["default"];
4650
+ };
4651
+ };
4652
+ readonly source: {
4653
+ readonly type: "string";
4654
+ readonly enum: readonly ["internal", "external"];
4655
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
4656
+ readonly example: "internal";
4657
+ };
4658
+ readonly id: {
4659
+ readonly type: "string";
4660
+ readonly description: "The unique identifier for this impact metric";
4661
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
4662
+ };
4663
+ };
4664
+ readonly description: "The metric configuration used to evaluate the safeguard condition.";
4665
+ };
4666
+ };
4667
+ readonly components: {
4668
+ readonly schemas: {
4669
+ readonly metricQuerySchema: {
4670
+ readonly $id: "#/components/schemas/metricQuerySchema";
4671
+ readonly type: "object";
4672
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
4673
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
4674
+ readonly additionalProperties: false;
4675
+ readonly properties: {
4676
+ readonly metricName: {
4677
+ readonly type: "string";
4678
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
4679
+ readonly example: "unleash_counter_feature_toggle_usage_total";
4680
+ };
4681
+ readonly timeRange: {
4682
+ readonly type: "string";
4683
+ readonly enum: readonly ["hour", "day", "week", "month"];
4684
+ readonly description: "The time range for the metric data.";
4685
+ readonly example: "day";
4686
+ };
4687
+ readonly aggregationMode: {
4688
+ readonly type: "string";
4689
+ readonly description: "The aggregation mode for the metric data.";
4690
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
4691
+ readonly example: "rps";
4692
+ };
4693
+ readonly labelSelectors: {
4694
+ readonly type: "object";
4695
+ readonly additionalProperties: {
4696
+ readonly type: "array";
4697
+ readonly items: {
4698
+ readonly type: "string";
4699
+ };
4700
+ };
4701
+ readonly description: "The selected labels and their values for filtering the metric data.";
4702
+ readonly example: {
4703
+ readonly environment: readonly ["development"];
4704
+ readonly project: readonly ["default"];
4705
+ };
4706
+ };
4707
+ readonly source: {
4708
+ readonly type: "string";
4709
+ readonly enum: readonly ["internal", "external"];
4710
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
4711
+ readonly example: "internal";
4712
+ };
4713
+ };
4714
+ readonly components: {};
4715
+ };
4716
+ readonly safeguardTriggerConditionSchema: {
4717
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
4718
+ readonly type: "object";
4719
+ readonly required: readonly ["operator", "threshold"];
4720
+ readonly additionalProperties: false;
4721
+ readonly description: "The condition that triggers the safeguard.";
4722
+ readonly properties: {
4723
+ readonly operator: {
4724
+ readonly type: "string";
4725
+ readonly enum: readonly [">", "<"];
4726
+ readonly description: "The comparison operator for the threshold check.";
4727
+ readonly example: ">";
4728
+ };
4729
+ readonly threshold: {
4730
+ readonly type: "number";
4731
+ readonly description: "The threshold value to compare against.";
4732
+ readonly example: 100;
4733
+ };
4734
+ };
4735
+ readonly components: {};
4736
+ };
4737
+ };
4738
+ };
4739
+ };
4740
+ readonly safeguardTriggerConditionSchema: {
4741
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
4742
+ readonly type: "object";
4743
+ readonly required: readonly ["operator", "threshold"];
4744
+ readonly additionalProperties: false;
4745
+ readonly description: "The condition that triggers the safeguard.";
4746
+ readonly properties: {
4747
+ readonly operator: {
4748
+ readonly type: "string";
4749
+ readonly enum: readonly [">", "<"];
4750
+ readonly description: "The comparison operator for the threshold check.";
4751
+ readonly example: ">";
4752
+ };
4753
+ readonly threshold: {
4754
+ readonly type: "number";
4755
+ readonly description: "The threshold value to compare against.";
4756
+ readonly example: 100;
4757
+ };
4758
+ };
4759
+ readonly components: {};
4760
+ };
4761
+ readonly metricQuerySchema: {
4762
+ readonly $id: "#/components/schemas/metricQuerySchema";
4763
+ readonly type: "object";
4764
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
4765
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
4766
+ readonly additionalProperties: false;
4767
+ readonly properties: {
4768
+ readonly metricName: {
4769
+ readonly type: "string";
4770
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
4771
+ readonly example: "unleash_counter_feature_toggle_usage_total";
4772
+ };
4773
+ readonly timeRange: {
4774
+ readonly type: "string";
4775
+ readonly enum: readonly ["hour", "day", "week", "month"];
4776
+ readonly description: "The time range for the metric data.";
4777
+ readonly example: "day";
4778
+ };
4779
+ readonly aggregationMode: {
4780
+ readonly type: "string";
4781
+ readonly description: "The aggregation mode for the metric data.";
4782
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
4783
+ readonly example: "rps";
4784
+ };
4785
+ readonly labelSelectors: {
4786
+ readonly type: "object";
4787
+ readonly additionalProperties: {
4788
+ readonly type: "array";
4789
+ readonly items: {
4790
+ readonly type: "string";
4791
+ };
4792
+ };
4793
+ readonly description: "The selected labels and their values for filtering the metric data.";
4794
+ readonly example: {
4795
+ readonly environment: readonly ["development"];
4796
+ readonly project: readonly ["default"];
4797
+ };
4798
+ };
4799
+ readonly source: {
4800
+ readonly type: "string";
4801
+ readonly enum: readonly ["internal", "external"];
4802
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
4803
+ readonly example: "internal";
4804
+ };
4805
+ };
4806
+ readonly components: {};
4807
+ };
4550
4808
  };
4551
4809
  };
4552
4810
  };
@@ -5003,7 +5261,7 @@ export declare const healthReportSchema: {
5003
5261
  readonly type: "array";
5004
5262
  readonly description: "An array of safeguards configured for this release plan.";
5005
5263
  readonly items: {
5006
- readonly $ref: "#/components/schemas/safeguardSchema";
5264
+ readonly $ref: "#/components/schemas/releasePlanSafeguardSchema";
5007
5265
  };
5008
5266
  };
5009
5267
  };
@@ -5088,7 +5346,7 @@ export declare const healthReportSchema: {
5088
5346
  readonly additionalProperties: false;
5089
5347
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
5090
5348
  readonly type: "object";
5091
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
5349
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
5092
5350
  readonly properties: {
5093
5351
  readonly id: {
5094
5352
  readonly type: "string";
@@ -5757,7 +6015,7 @@ export declare const healthReportSchema: {
5757
6015
  readonly additionalProperties: false;
5758
6016
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
5759
6017
  readonly type: "object";
5760
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
6018
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
5761
6019
  readonly properties: {
5762
6020
  readonly id: {
5763
6021
  readonly type: "string";
@@ -6418,8 +6676,8 @@ export declare const healthReportSchema: {
6418
6676
  };
6419
6677
  readonly components: {};
6420
6678
  };
6421
- readonly safeguardSchema: {
6422
- readonly $id: "#/components/schemas/safeguardSchema";
6679
+ readonly releasePlanSafeguardSchema: {
6680
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
6423
6681
  readonly type: "object";
6424
6682
  readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
6425
6683
  readonly description: "A safeguard configuration for a release plan.";
@@ -6488,6 +6746,12 @@ export declare const healthReportSchema: {
6488
6746
  readonly project: readonly ["default"];
6489
6747
  };
6490
6748
  };
6749
+ readonly source: {
6750
+ readonly type: "string";
6751
+ readonly enum: readonly ["internal", "external"];
6752
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
6753
+ readonly example: "internal";
6754
+ };
6491
6755
  readonly id: {
6492
6756
  readonly type: "string";
6493
6757
  readonly description: "The unique identifier for this impact metric";
@@ -6537,6 +6801,12 @@ export declare const healthReportSchema: {
6537
6801
  readonly project: readonly ["default"];
6538
6802
  };
6539
6803
  };
6804
+ readonly source: {
6805
+ readonly type: "string";
6806
+ readonly enum: readonly ["internal", "external"];
6807
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
6808
+ readonly example: "internal";
6809
+ };
6540
6810
  };
6541
6811
  readonly components: {};
6542
6812
  };
@@ -6602,6 +6872,12 @@ export declare const healthReportSchema: {
6602
6872
  readonly project: readonly ["default"];
6603
6873
  };
6604
6874
  };
6875
+ readonly source: {
6876
+ readonly type: "string";
6877
+ readonly enum: readonly ["internal", "external"];
6878
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
6879
+ readonly example: "internal";
6880
+ };
6605
6881
  };
6606
6882
  readonly components: {};
6607
6883
  };
@@ -6708,7 +6984,7 @@ export declare const healthReportSchema: {
6708
6984
  readonly additionalProperties: false;
6709
6985
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
6710
6986
  readonly type: "object";
6711
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
6987
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
6712
6988
  readonly properties: {
6713
6989
  readonly id: {
6714
6990
  readonly type: "string";
@@ -7377,7 +7653,7 @@ export declare const healthReportSchema: {
7377
7653
  readonly additionalProperties: false;
7378
7654
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
7379
7655
  readonly type: "object";
7380
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
7656
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
7381
7657
  readonly properties: {
7382
7658
  readonly id: {
7383
7659
  readonly type: "string";
@@ -7985,8 +8261,8 @@ export declare const healthReportSchema: {
7985
8261
  };
7986
8262
  readonly components: {};
7987
8263
  };
7988
- readonly safeguardSchema: {
7989
- readonly $id: "#/components/schemas/safeguardSchema";
8264
+ readonly releasePlanSafeguardSchema: {
8265
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
7990
8266
  readonly type: "object";
7991
8267
  readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
7992
8268
  readonly description: "A safeguard configuration for a release plan.";
@@ -8055,6 +8331,12 @@ export declare const healthReportSchema: {
8055
8331
  readonly project: readonly ["default"];
8056
8332
  };
8057
8333
  };
8334
+ readonly source: {
8335
+ readonly type: "string";
8336
+ readonly enum: readonly ["internal", "external"];
8337
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
8338
+ readonly example: "internal";
8339
+ };
8058
8340
  readonly id: {
8059
8341
  readonly type: "string";
8060
8342
  readonly description: "The unique identifier for this impact metric";
@@ -8104,6 +8386,12 @@ export declare const healthReportSchema: {
8104
8386
  readonly project: readonly ["default"];
8105
8387
  };
8106
8388
  };
8389
+ readonly source: {
8390
+ readonly type: "string";
8391
+ readonly enum: readonly ["internal", "external"];
8392
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
8393
+ readonly example: "internal";
8394
+ };
8107
8395
  };
8108
8396
  readonly components: {};
8109
8397
  };
@@ -8131,33 +8419,198 @@ export declare const healthReportSchema: {
8131
8419
  };
8132
8420
  };
8133
8421
  };
8134
- readonly metricQuerySchema: {
8135
- readonly $id: "#/components/schemas/metricQuerySchema";
8422
+ readonly featureEnvironmentSafeguardSchema: {
8423
+ readonly $id: "#/components/schemas/featureEnvironmentSafeguardSchema";
8136
8424
  readonly type: "object";
8137
- readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
8138
- readonly description: "Common metric query configuration for selecting and filtering metric data.";
8425
+ readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
8426
+ readonly description: "A safeguard configuration for a feature environment.";
8139
8427
  readonly additionalProperties: false;
8140
8428
  readonly properties: {
8141
- readonly metricName: {
8142
- readonly type: "string";
8143
- readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
8144
- readonly example: "unleash_counter_feature_toggle_usage_total";
8145
- };
8146
- readonly timeRange: {
8147
- readonly type: "string";
8148
- readonly enum: readonly ["hour", "day", "week", "month"];
8149
- readonly description: "The time range for the metric data.";
8150
- readonly example: "day";
8151
- };
8152
- readonly aggregationMode: {
8429
+ readonly id: {
8153
8430
  readonly type: "string";
8154
- readonly description: "The aggregation mode for the metric data.";
8155
- readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
8156
- readonly example: "rps";
8431
+ readonly description: "The unique ULID identifier for this safeguard";
8432
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
8157
8433
  };
8158
- readonly labelSelectors: {
8434
+ readonly action: {
8159
8435
  readonly type: "object";
8160
- readonly additionalProperties: {
8436
+ readonly required: readonly ["type", "featureName", "environment", "project"];
8437
+ readonly additionalProperties: false;
8438
+ readonly description: "Disable a feature in an environment when triggered.";
8439
+ readonly properties: {
8440
+ readonly type: {
8441
+ readonly type: "string";
8442
+ readonly description: "The type of action to perform.";
8443
+ readonly example: "disableFeatureEnvironment";
8444
+ };
8445
+ readonly featureName: {
8446
+ readonly type: "string";
8447
+ readonly description: "The feature flag name this safeguard applies to.";
8448
+ };
8449
+ readonly environment: {
8450
+ readonly type: "string";
8451
+ readonly description: "The environment this safeguard applies to.";
8452
+ };
8453
+ readonly project: {
8454
+ readonly type: "string";
8455
+ readonly description: "The project this safeguard applies to.";
8456
+ };
8457
+ };
8458
+ };
8459
+ readonly triggerCondition: {
8460
+ readonly $ref: "#/components/schemas/safeguardTriggerConditionSchema";
8461
+ readonly description: "The condition that triggers the safeguard.";
8462
+ };
8463
+ readonly impactMetric: {
8464
+ readonly type: "object";
8465
+ readonly required: readonly ["id", "metricName", "timeRange", "aggregationMode", "labelSelectors"];
8466
+ readonly additionalProperties: false;
8467
+ readonly properties: {
8468
+ readonly metricName: {
8469
+ readonly type: "string";
8470
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
8471
+ readonly example: "unleash_counter_feature_toggle_usage_total";
8472
+ };
8473
+ readonly timeRange: {
8474
+ readonly type: "string";
8475
+ readonly enum: readonly ["hour", "day", "week", "month"];
8476
+ readonly description: "The time range for the metric data.";
8477
+ readonly example: "day";
8478
+ };
8479
+ readonly aggregationMode: {
8480
+ readonly type: "string";
8481
+ readonly description: "The aggregation mode for the metric data.";
8482
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
8483
+ readonly example: "rps";
8484
+ };
8485
+ readonly labelSelectors: {
8486
+ readonly type: "object";
8487
+ readonly additionalProperties: {
8488
+ readonly type: "array";
8489
+ readonly items: {
8490
+ readonly type: "string";
8491
+ };
8492
+ };
8493
+ readonly description: "The selected labels and their values for filtering the metric data.";
8494
+ readonly example: {
8495
+ readonly environment: readonly ["development"];
8496
+ readonly project: readonly ["default"];
8497
+ };
8498
+ };
8499
+ readonly source: {
8500
+ readonly type: "string";
8501
+ readonly enum: readonly ["internal", "external"];
8502
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
8503
+ readonly example: "internal";
8504
+ };
8505
+ readonly id: {
8506
+ readonly type: "string";
8507
+ readonly description: "The unique identifier for this impact metric";
8508
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
8509
+ };
8510
+ };
8511
+ readonly description: "The metric configuration used to evaluate the safeguard condition.";
8512
+ };
8513
+ };
8514
+ readonly components: {
8515
+ readonly schemas: {
8516
+ readonly metricQuerySchema: {
8517
+ readonly $id: "#/components/schemas/metricQuerySchema";
8518
+ readonly type: "object";
8519
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
8520
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
8521
+ readonly additionalProperties: false;
8522
+ readonly properties: {
8523
+ readonly metricName: {
8524
+ readonly type: "string";
8525
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
8526
+ readonly example: "unleash_counter_feature_toggle_usage_total";
8527
+ };
8528
+ readonly timeRange: {
8529
+ readonly type: "string";
8530
+ readonly enum: readonly ["hour", "day", "week", "month"];
8531
+ readonly description: "The time range for the metric data.";
8532
+ readonly example: "day";
8533
+ };
8534
+ readonly aggregationMode: {
8535
+ readonly type: "string";
8536
+ readonly description: "The aggregation mode for the metric data.";
8537
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
8538
+ readonly example: "rps";
8539
+ };
8540
+ readonly labelSelectors: {
8541
+ readonly type: "object";
8542
+ readonly additionalProperties: {
8543
+ readonly type: "array";
8544
+ readonly items: {
8545
+ readonly type: "string";
8546
+ };
8547
+ };
8548
+ readonly description: "The selected labels and their values for filtering the metric data.";
8549
+ readonly example: {
8550
+ readonly environment: readonly ["development"];
8551
+ readonly project: readonly ["default"];
8552
+ };
8553
+ };
8554
+ readonly source: {
8555
+ readonly type: "string";
8556
+ readonly enum: readonly ["internal", "external"];
8557
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
8558
+ readonly example: "internal";
8559
+ };
8560
+ };
8561
+ readonly components: {};
8562
+ };
8563
+ readonly safeguardTriggerConditionSchema: {
8564
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
8565
+ readonly type: "object";
8566
+ readonly required: readonly ["operator", "threshold"];
8567
+ readonly additionalProperties: false;
8568
+ readonly description: "The condition that triggers the safeguard.";
8569
+ readonly properties: {
8570
+ readonly operator: {
8571
+ readonly type: "string";
8572
+ readonly enum: readonly [">", "<"];
8573
+ readonly description: "The comparison operator for the threshold check.";
8574
+ readonly example: ">";
8575
+ };
8576
+ readonly threshold: {
8577
+ readonly type: "number";
8578
+ readonly description: "The threshold value to compare against.";
8579
+ readonly example: 100;
8580
+ };
8581
+ };
8582
+ readonly components: {};
8583
+ };
8584
+ };
8585
+ };
8586
+ };
8587
+ readonly metricQuerySchema: {
8588
+ readonly $id: "#/components/schemas/metricQuerySchema";
8589
+ readonly type: "object";
8590
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
8591
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
8592
+ readonly additionalProperties: false;
8593
+ readonly properties: {
8594
+ readonly metricName: {
8595
+ readonly type: "string";
8596
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
8597
+ readonly example: "unleash_counter_feature_toggle_usage_total";
8598
+ };
8599
+ readonly timeRange: {
8600
+ readonly type: "string";
8601
+ readonly enum: readonly ["hour", "day", "week", "month"];
8602
+ readonly description: "The time range for the metric data.";
8603
+ readonly example: "day";
8604
+ };
8605
+ readonly aggregationMode: {
8606
+ readonly type: "string";
8607
+ readonly description: "The aggregation mode for the metric data.";
8608
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
8609
+ readonly example: "rps";
8610
+ };
8611
+ readonly labelSelectors: {
8612
+ readonly type: "object";
8613
+ readonly additionalProperties: {
8161
8614
  readonly type: "array";
8162
8615
  readonly items: {
8163
8616
  readonly type: "string";
@@ -8169,6 +8622,12 @@ export declare const healthReportSchema: {
8169
8622
  readonly project: readonly ["default"];
8170
8623
  };
8171
8624
  };
8625
+ readonly source: {
8626
+ readonly type: "string";
8627
+ readonly enum: readonly ["internal", "external"];
8628
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
8629
+ readonly example: "internal";
8630
+ };
8172
8631
  };
8173
8632
  readonly components: {};
8174
8633
  };
@@ -8295,6 +8754,13 @@ export declare const healthReportSchema: {
8295
8754
  readonly $ref: "#/components/schemas/releasePlanSchema";
8296
8755
  };
8297
8756
  };
8757
+ readonly safeguards: {
8758
+ readonly type: "array";
8759
+ readonly description: "Safeguards for this feature environment";
8760
+ readonly items: {
8761
+ readonly $ref: "#/components/schemas/featureEnvironmentSafeguardSchema";
8762
+ };
8763
+ };
8298
8764
  readonly yes: {
8299
8765
  readonly type: "integer";
8300
8766
  readonly description: "How many times the feature evaluated to true (enabled)";
@@ -8753,7 +9219,7 @@ export declare const healthReportSchema: {
8753
9219
  readonly type: "array";
8754
9220
  readonly description: "An array of safeguards configured for this release plan.";
8755
9221
  readonly items: {
8756
- readonly $ref: "#/components/schemas/safeguardSchema";
9222
+ readonly $ref: "#/components/schemas/releasePlanSafeguardSchema";
8757
9223
  };
8758
9224
  };
8759
9225
  };
@@ -8838,7 +9304,7 @@ export declare const healthReportSchema: {
8838
9304
  readonly additionalProperties: false;
8839
9305
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
8840
9306
  readonly type: "object";
8841
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
9307
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
8842
9308
  readonly properties: {
8843
9309
  readonly id: {
8844
9310
  readonly type: "string";
@@ -9507,7 +9973,7 @@ export declare const healthReportSchema: {
9507
9973
  readonly additionalProperties: false;
9508
9974
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
9509
9975
  readonly type: "object";
9510
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
9976
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
9511
9977
  readonly properties: {
9512
9978
  readonly id: {
9513
9979
  readonly type: "string";
@@ -10168,8 +10634,8 @@ export declare const healthReportSchema: {
10168
10634
  };
10169
10635
  readonly components: {};
10170
10636
  };
10171
- readonly safeguardSchema: {
10172
- readonly $id: "#/components/schemas/safeguardSchema";
10637
+ readonly releasePlanSafeguardSchema: {
10638
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
10173
10639
  readonly type: "object";
10174
10640
  readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
10175
10641
  readonly description: "A safeguard configuration for a release plan.";
@@ -10238,6 +10704,12 @@ export declare const healthReportSchema: {
10238
10704
  readonly project: readonly ["default"];
10239
10705
  };
10240
10706
  };
10707
+ readonly source: {
10708
+ readonly type: "string";
10709
+ readonly enum: readonly ["internal", "external"];
10710
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
10711
+ readonly example: "internal";
10712
+ };
10241
10713
  readonly id: {
10242
10714
  readonly type: "string";
10243
10715
  readonly description: "The unique identifier for this impact metric";
@@ -10287,6 +10759,12 @@ export declare const healthReportSchema: {
10287
10759
  readonly project: readonly ["default"];
10288
10760
  };
10289
10761
  };
10762
+ readonly source: {
10763
+ readonly type: "string";
10764
+ readonly enum: readonly ["internal", "external"];
10765
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
10766
+ readonly example: "internal";
10767
+ };
10290
10768
  };
10291
10769
  readonly components: {};
10292
10770
  };
@@ -10352,6 +10830,12 @@ export declare const healthReportSchema: {
10352
10830
  readonly project: readonly ["default"];
10353
10831
  };
10354
10832
  };
10833
+ readonly source: {
10834
+ readonly type: "string";
10835
+ readonly enum: readonly ["internal", "external"];
10836
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
10837
+ readonly example: "internal";
10838
+ };
10355
10839
  };
10356
10840
  readonly components: {};
10357
10841
  };
@@ -10458,7 +10942,7 @@ export declare const healthReportSchema: {
10458
10942
  readonly additionalProperties: false;
10459
10943
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
10460
10944
  readonly type: "object";
10461
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
10945
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
10462
10946
  readonly properties: {
10463
10947
  readonly id: {
10464
10948
  readonly type: "string";
@@ -11127,7 +11611,7 @@ export declare const healthReportSchema: {
11127
11611
  readonly additionalProperties: false;
11128
11612
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
11129
11613
  readonly type: "object";
11130
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
11614
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
11131
11615
  readonly properties: {
11132
11616
  readonly id: {
11133
11617
  readonly type: "string";
@@ -11735,88 +12219,321 @@ export declare const healthReportSchema: {
11735
12219
  };
11736
12220
  readonly components: {};
11737
12221
  };
11738
- };
11739
- };
11740
- };
11741
- readonly overrideSchema: {
11742
- readonly $id: "#/components/schemas/overrideSchema";
11743
- readonly type: "object";
11744
- readonly additionalProperties: false;
11745
- readonly required: readonly ["contextName", "values"];
11746
- readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
11747
- readonly properties: {
11748
- readonly contextName: {
11749
- readonly description: "The name of the context field used to determine overrides";
11750
- readonly type: "string";
11751
- readonly example: "userId";
11752
- };
11753
- readonly values: {
11754
- readonly description: "Which values that should be overriden";
11755
- readonly type: "array";
11756
- readonly items: {
11757
- readonly type: "string";
11758
- };
11759
- readonly example: readonly ["red", "blue"];
11760
- };
11761
- };
11762
- readonly components: {};
11763
- };
11764
- readonly parametersSchema: {
11765
- readonly $id: "#/components/schemas/parametersSchema";
11766
- readonly type: "object";
11767
- readonly description: "A list of parameters for a strategy";
11768
- readonly additionalProperties: {
11769
- readonly type: "string";
11770
- };
11771
- readonly components: {};
11772
- };
11773
- readonly featureStrategySchema: {
11774
- readonly $id: "#/components/schemas/featureStrategySchema";
11775
- readonly description: "A single activation strategy configuration schema for a feature";
11776
- readonly type: "object";
11777
- readonly additionalProperties: false;
11778
- readonly required: readonly ["name"];
11779
- readonly properties: {
11780
- readonly id: {
11781
- readonly type: "string";
11782
- readonly description: "A uuid for the feature strategy";
11783
- readonly example: "6b5157cb-343a-41e7-bfa3-7b4ec3044840";
11784
- };
11785
- readonly name: {
11786
- readonly type: "string";
11787
- readonly description: "The name or type of strategy";
11788
- readonly example: "flexibleRollout";
11789
- };
11790
- readonly title: {
11791
- readonly type: "string";
11792
- readonly description: "A descriptive title for the strategy";
11793
- readonly example: "Gradual Rollout 25-Prod";
11794
- readonly nullable: true;
11795
- };
11796
- readonly disabled: {
11797
- readonly type: "boolean";
11798
- readonly description: "A toggle to disable the strategy. defaults to false. Disabled strategies are not evaluated or returned to the SDKs";
11799
- readonly example: false;
11800
- readonly nullable: true;
11801
- };
11802
- readonly featureName: {
11803
- readonly type: "string";
11804
- readonly description: "The name or feature the strategy is attached to";
11805
- readonly example: "myAwesomeFeature";
11806
- };
11807
- readonly sortOrder: {
11808
- readonly type: "number";
11809
- readonly description: "The order of the strategy in the list";
11810
- readonly example: 9999;
11811
- };
11812
- readonly segments: {
11813
- readonly type: "array";
11814
- readonly description: "A list of segment ids attached to the strategy";
11815
- readonly example: readonly [1, 2];
11816
- readonly items: {
11817
- readonly type: "number";
11818
- };
11819
- };
12222
+ readonly featureEnvironmentSafeguardSchema: {
12223
+ readonly $id: "#/components/schemas/featureEnvironmentSafeguardSchema";
12224
+ readonly type: "object";
12225
+ readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
12226
+ readonly description: "A safeguard configuration for a feature environment.";
12227
+ readonly additionalProperties: false;
12228
+ readonly properties: {
12229
+ readonly id: {
12230
+ readonly type: "string";
12231
+ readonly description: "The unique ULID identifier for this safeguard";
12232
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
12233
+ };
12234
+ readonly action: {
12235
+ readonly type: "object";
12236
+ readonly required: readonly ["type", "featureName", "environment", "project"];
12237
+ readonly additionalProperties: false;
12238
+ readonly description: "Disable a feature in an environment when triggered.";
12239
+ readonly properties: {
12240
+ readonly type: {
12241
+ readonly type: "string";
12242
+ readonly description: "The type of action to perform.";
12243
+ readonly example: "disableFeatureEnvironment";
12244
+ };
12245
+ readonly featureName: {
12246
+ readonly type: "string";
12247
+ readonly description: "The feature flag name this safeguard applies to.";
12248
+ };
12249
+ readonly environment: {
12250
+ readonly type: "string";
12251
+ readonly description: "The environment this safeguard applies to.";
12252
+ };
12253
+ readonly project: {
12254
+ readonly type: "string";
12255
+ readonly description: "The project this safeguard applies to.";
12256
+ };
12257
+ };
12258
+ };
12259
+ readonly triggerCondition: {
12260
+ readonly $ref: "#/components/schemas/safeguardTriggerConditionSchema";
12261
+ readonly description: "The condition that triggers the safeguard.";
12262
+ };
12263
+ readonly impactMetric: {
12264
+ readonly type: "object";
12265
+ readonly required: readonly ["id", "metricName", "timeRange", "aggregationMode", "labelSelectors"];
12266
+ readonly additionalProperties: false;
12267
+ readonly properties: {
12268
+ readonly metricName: {
12269
+ readonly type: "string";
12270
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
12271
+ readonly example: "unleash_counter_feature_toggle_usage_total";
12272
+ };
12273
+ readonly timeRange: {
12274
+ readonly type: "string";
12275
+ readonly enum: readonly ["hour", "day", "week", "month"];
12276
+ readonly description: "The time range for the metric data.";
12277
+ readonly example: "day";
12278
+ };
12279
+ readonly aggregationMode: {
12280
+ readonly type: "string";
12281
+ readonly description: "The aggregation mode for the metric data.";
12282
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
12283
+ readonly example: "rps";
12284
+ };
12285
+ readonly labelSelectors: {
12286
+ readonly type: "object";
12287
+ readonly additionalProperties: {
12288
+ readonly type: "array";
12289
+ readonly items: {
12290
+ readonly type: "string";
12291
+ };
12292
+ };
12293
+ readonly description: "The selected labels and their values for filtering the metric data.";
12294
+ readonly example: {
12295
+ readonly environment: readonly ["development"];
12296
+ readonly project: readonly ["default"];
12297
+ };
12298
+ };
12299
+ readonly source: {
12300
+ readonly type: "string";
12301
+ readonly enum: readonly ["internal", "external"];
12302
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
12303
+ readonly example: "internal";
12304
+ };
12305
+ readonly id: {
12306
+ readonly type: "string";
12307
+ readonly description: "The unique identifier for this impact metric";
12308
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
12309
+ };
12310
+ };
12311
+ readonly description: "The metric configuration used to evaluate the safeguard condition.";
12312
+ };
12313
+ };
12314
+ readonly components: {
12315
+ readonly schemas: {
12316
+ readonly metricQuerySchema: {
12317
+ readonly $id: "#/components/schemas/metricQuerySchema";
12318
+ readonly type: "object";
12319
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
12320
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
12321
+ readonly additionalProperties: false;
12322
+ readonly properties: {
12323
+ readonly metricName: {
12324
+ readonly type: "string";
12325
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
12326
+ readonly example: "unleash_counter_feature_toggle_usage_total";
12327
+ };
12328
+ readonly timeRange: {
12329
+ readonly type: "string";
12330
+ readonly enum: readonly ["hour", "day", "week", "month"];
12331
+ readonly description: "The time range for the metric data.";
12332
+ readonly example: "day";
12333
+ };
12334
+ readonly aggregationMode: {
12335
+ readonly type: "string";
12336
+ readonly description: "The aggregation mode for the metric data.";
12337
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
12338
+ readonly example: "rps";
12339
+ };
12340
+ readonly labelSelectors: {
12341
+ readonly type: "object";
12342
+ readonly additionalProperties: {
12343
+ readonly type: "array";
12344
+ readonly items: {
12345
+ readonly type: "string";
12346
+ };
12347
+ };
12348
+ readonly description: "The selected labels and their values for filtering the metric data.";
12349
+ readonly example: {
12350
+ readonly environment: readonly ["development"];
12351
+ readonly project: readonly ["default"];
12352
+ };
12353
+ };
12354
+ readonly source: {
12355
+ readonly type: "string";
12356
+ readonly enum: readonly ["internal", "external"];
12357
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
12358
+ readonly example: "internal";
12359
+ };
12360
+ };
12361
+ readonly components: {};
12362
+ };
12363
+ readonly safeguardTriggerConditionSchema: {
12364
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
12365
+ readonly type: "object";
12366
+ readonly required: readonly ["operator", "threshold"];
12367
+ readonly additionalProperties: false;
12368
+ readonly description: "The condition that triggers the safeguard.";
12369
+ readonly properties: {
12370
+ readonly operator: {
12371
+ readonly type: "string";
12372
+ readonly enum: readonly [">", "<"];
12373
+ readonly description: "The comparison operator for the threshold check.";
12374
+ readonly example: ">";
12375
+ };
12376
+ readonly threshold: {
12377
+ readonly type: "number";
12378
+ readonly description: "The threshold value to compare against.";
12379
+ readonly example: 100;
12380
+ };
12381
+ };
12382
+ readonly components: {};
12383
+ };
12384
+ };
12385
+ };
12386
+ };
12387
+ readonly safeguardTriggerConditionSchema: {
12388
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
12389
+ readonly type: "object";
12390
+ readonly required: readonly ["operator", "threshold"];
12391
+ readonly additionalProperties: false;
12392
+ readonly description: "The condition that triggers the safeguard.";
12393
+ readonly properties: {
12394
+ readonly operator: {
12395
+ readonly type: "string";
12396
+ readonly enum: readonly [">", "<"];
12397
+ readonly description: "The comparison operator for the threshold check.";
12398
+ readonly example: ">";
12399
+ };
12400
+ readonly threshold: {
12401
+ readonly type: "number";
12402
+ readonly description: "The threshold value to compare against.";
12403
+ readonly example: 100;
12404
+ };
12405
+ };
12406
+ readonly components: {};
12407
+ };
12408
+ readonly metricQuerySchema: {
12409
+ readonly $id: "#/components/schemas/metricQuerySchema";
12410
+ readonly type: "object";
12411
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
12412
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
12413
+ readonly additionalProperties: false;
12414
+ readonly properties: {
12415
+ readonly metricName: {
12416
+ readonly type: "string";
12417
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
12418
+ readonly example: "unleash_counter_feature_toggle_usage_total";
12419
+ };
12420
+ readonly timeRange: {
12421
+ readonly type: "string";
12422
+ readonly enum: readonly ["hour", "day", "week", "month"];
12423
+ readonly description: "The time range for the metric data.";
12424
+ readonly example: "day";
12425
+ };
12426
+ readonly aggregationMode: {
12427
+ readonly type: "string";
12428
+ readonly description: "The aggregation mode for the metric data.";
12429
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
12430
+ readonly example: "rps";
12431
+ };
12432
+ readonly labelSelectors: {
12433
+ readonly type: "object";
12434
+ readonly additionalProperties: {
12435
+ readonly type: "array";
12436
+ readonly items: {
12437
+ readonly type: "string";
12438
+ };
12439
+ };
12440
+ readonly description: "The selected labels and their values for filtering the metric data.";
12441
+ readonly example: {
12442
+ readonly environment: readonly ["development"];
12443
+ readonly project: readonly ["default"];
12444
+ };
12445
+ };
12446
+ readonly source: {
12447
+ readonly type: "string";
12448
+ readonly enum: readonly ["internal", "external"];
12449
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
12450
+ readonly example: "internal";
12451
+ };
12452
+ };
12453
+ readonly components: {};
12454
+ };
12455
+ };
12456
+ };
12457
+ };
12458
+ readonly overrideSchema: {
12459
+ readonly $id: "#/components/schemas/overrideSchema";
12460
+ readonly type: "object";
12461
+ readonly additionalProperties: false;
12462
+ readonly required: readonly ["contextName", "values"];
12463
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
12464
+ readonly properties: {
12465
+ readonly contextName: {
12466
+ readonly description: "The name of the context field used to determine overrides";
12467
+ readonly type: "string";
12468
+ readonly example: "userId";
12469
+ };
12470
+ readonly values: {
12471
+ readonly description: "Which values that should be overriden";
12472
+ readonly type: "array";
12473
+ readonly items: {
12474
+ readonly type: "string";
12475
+ };
12476
+ readonly example: readonly ["red", "blue"];
12477
+ };
12478
+ };
12479
+ readonly components: {};
12480
+ };
12481
+ readonly parametersSchema: {
12482
+ readonly $id: "#/components/schemas/parametersSchema";
12483
+ readonly type: "object";
12484
+ readonly description: "A list of parameters for a strategy";
12485
+ readonly additionalProperties: {
12486
+ readonly type: "string";
12487
+ };
12488
+ readonly components: {};
12489
+ };
12490
+ readonly featureStrategySchema: {
12491
+ readonly $id: "#/components/schemas/featureStrategySchema";
12492
+ readonly description: "A single activation strategy configuration schema for a feature";
12493
+ readonly type: "object";
12494
+ readonly additionalProperties: false;
12495
+ readonly required: readonly ["name"];
12496
+ readonly properties: {
12497
+ readonly id: {
12498
+ readonly type: "string";
12499
+ readonly description: "A uuid for the feature strategy";
12500
+ readonly example: "6b5157cb-343a-41e7-bfa3-7b4ec3044840";
12501
+ };
12502
+ readonly name: {
12503
+ readonly type: "string";
12504
+ readonly description: "The name or type of strategy";
12505
+ readonly example: "flexibleRollout";
12506
+ };
12507
+ readonly title: {
12508
+ readonly type: "string";
12509
+ readonly description: "A descriptive title for the strategy";
12510
+ readonly example: "Gradual Rollout 25-Prod";
12511
+ readonly nullable: true;
12512
+ };
12513
+ readonly disabled: {
12514
+ readonly type: "boolean";
12515
+ readonly description: "A toggle to disable the strategy. defaults to false. Disabled strategies are not evaluated or returned to the SDKs";
12516
+ readonly example: false;
12517
+ readonly nullable: true;
12518
+ };
12519
+ readonly featureName: {
12520
+ readonly type: "string";
12521
+ readonly description: "The name or feature the strategy is attached to";
12522
+ readonly example: "myAwesomeFeature";
12523
+ };
12524
+ readonly sortOrder: {
12525
+ readonly type: "number";
12526
+ readonly description: "The order of the strategy in the list";
12527
+ readonly example: 9999;
12528
+ };
12529
+ readonly segments: {
12530
+ readonly type: "array";
12531
+ readonly description: "A list of segment ids attached to the strategy";
12532
+ readonly example: readonly [1, 2];
12533
+ readonly items: {
12534
+ readonly type: "number";
12535
+ };
12536
+ };
11820
12537
  readonly constraints: {
11821
12538
  readonly type: "array";
11822
12539
  readonly description: "A list of the constraints attached to the strategy. See https://docs.getunleash.io/concepts/activation-strategies#constraints";
@@ -12022,7 +12739,7 @@ export declare const healthReportSchema: {
12022
12739
  readonly type: "array";
12023
12740
  readonly description: "An array of safeguards configured for this release plan.";
12024
12741
  readonly items: {
12025
- readonly $ref: "#/components/schemas/safeguardSchema";
12742
+ readonly $ref: "#/components/schemas/releasePlanSafeguardSchema";
12026
12743
  };
12027
12744
  };
12028
12745
  };
@@ -12107,7 +12824,7 @@ export declare const healthReportSchema: {
12107
12824
  readonly additionalProperties: false;
12108
12825
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
12109
12826
  readonly type: "object";
12110
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
12827
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
12111
12828
  readonly properties: {
12112
12829
  readonly id: {
12113
12830
  readonly type: "string";
@@ -12776,7 +13493,7 @@ export declare const healthReportSchema: {
12776
13493
  readonly additionalProperties: false;
12777
13494
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
12778
13495
  readonly type: "object";
12779
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
13496
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
12780
13497
  readonly properties: {
12781
13498
  readonly id: {
12782
13499
  readonly type: "string";
@@ -13437,8 +14154,8 @@ export declare const healthReportSchema: {
13437
14154
  };
13438
14155
  readonly components: {};
13439
14156
  };
13440
- readonly safeguardSchema: {
13441
- readonly $id: "#/components/schemas/safeguardSchema";
14157
+ readonly releasePlanSafeguardSchema: {
14158
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
13442
14159
  readonly type: "object";
13443
14160
  readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
13444
14161
  readonly description: "A safeguard configuration for a release plan.";
@@ -13507,6 +14224,12 @@ export declare const healthReportSchema: {
13507
14224
  readonly project: readonly ["default"];
13508
14225
  };
13509
14226
  };
14227
+ readonly source: {
14228
+ readonly type: "string";
14229
+ readonly enum: readonly ["internal", "external"];
14230
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
14231
+ readonly example: "internal";
14232
+ };
13510
14233
  readonly id: {
13511
14234
  readonly type: "string";
13512
14235
  readonly description: "The unique identifier for this impact metric";
@@ -13556,6 +14279,12 @@ export declare const healthReportSchema: {
13556
14279
  readonly project: readonly ["default"];
13557
14280
  };
13558
14281
  };
14282
+ readonly source: {
14283
+ readonly type: "string";
14284
+ readonly enum: readonly ["internal", "external"];
14285
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
14286
+ readonly example: "internal";
14287
+ };
13559
14288
  };
13560
14289
  readonly components: {};
13561
14290
  };
@@ -13621,6 +14350,12 @@ export declare const healthReportSchema: {
13621
14350
  readonly project: readonly ["default"];
13622
14351
  };
13623
14352
  };
14353
+ readonly source: {
14354
+ readonly type: "string";
14355
+ readonly enum: readonly ["internal", "external"];
14356
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
14357
+ readonly example: "internal";
14358
+ };
13624
14359
  };
13625
14360
  readonly components: {};
13626
14361
  };
@@ -13727,7 +14462,7 @@ export declare const healthReportSchema: {
13727
14462
  readonly additionalProperties: false;
13728
14463
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
13729
14464
  readonly type: "object";
13730
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
14465
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
13731
14466
  readonly properties: {
13732
14467
  readonly id: {
13733
14468
  readonly type: "string";
@@ -14396,7 +15131,7 @@ export declare const healthReportSchema: {
14396
15131
  readonly additionalProperties: false;
14397
15132
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
14398
15133
  readonly type: "object";
14399
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
15134
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
14400
15135
  readonly properties: {
14401
15136
  readonly id: {
14402
15137
  readonly type: "string";
@@ -14653,126 +15388,517 @@ export declare const healthReportSchema: {
14653
15388
  };
14654
15389
  };
14655
15390
  };
14656
- };
14657
- readonly parametersSchema: {
14658
- readonly $id: "#/components/schemas/parametersSchema";
14659
- readonly type: "object";
14660
- readonly description: "A list of parameters for a strategy";
14661
- readonly additionalProperties: {
15391
+ };
15392
+ readonly parametersSchema: {
15393
+ readonly $id: "#/components/schemas/parametersSchema";
15394
+ readonly type: "object";
15395
+ readonly description: "A list of parameters for a strategy";
15396
+ readonly additionalProperties: {
15397
+ readonly type: "string";
15398
+ };
15399
+ readonly components: {};
15400
+ };
15401
+ readonly constraintSchema: {
15402
+ readonly type: "object";
15403
+ readonly required: readonly ["contextName", "operator"];
15404
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/concepts/activation-strategies#constraints)";
15405
+ readonly properties: {
15406
+ readonly contextName: {
15407
+ readonly description: "The name of the context field that this constraint should apply to.";
15408
+ readonly example: "appName";
15409
+ readonly type: "string";
15410
+ };
15411
+ readonly operator: {
15412
+ 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/concepts/activation-strategies#constraint-operators).";
15413
+ readonly type: "string";
15414
+ 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", "REGEX"];
15415
+ readonly example: "IN";
15416
+ };
15417
+ readonly caseInsensitive: {
15418
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
15419
+ readonly type: "boolean";
15420
+ readonly default: false;
15421
+ };
15422
+ readonly inverted: {
15423
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
15424
+ readonly type: "boolean";
15425
+ readonly default: false;
15426
+ };
15427
+ readonly values: {
15428
+ readonly type: "array";
15429
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
15430
+ readonly items: {
15431
+ readonly type: "string";
15432
+ };
15433
+ readonly example: readonly ["my-app", "my-other-app"];
15434
+ };
15435
+ readonly value: {
15436
+ 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.";
15437
+ readonly type: "string";
15438
+ readonly example: "my-app";
15439
+ };
15440
+ };
15441
+ readonly components: {};
15442
+ readonly $id: "#/components/schemas/constraintSchema";
15443
+ readonly additionalProperties: false;
15444
+ };
15445
+ readonly createStrategyVariantSchema: {
15446
+ readonly $id: "#/components/schemas/createStrategyVariantSchema";
15447
+ readonly type: "object";
15448
+ readonly description: "This is an experimental property. It may change or be removed as we work on it. Please don't depend on it yet. A strategy variant allows you to attach any data to strategies instead of only returning `true`/`false`. Strategy variants take precedence over feature variants.";
15449
+ readonly required: readonly ["name", "weight", "weightType", "stickiness"];
15450
+ readonly properties: {
15451
+ readonly name: {
15452
+ readonly type: "string";
15453
+ readonly description: "The variant name. Must be unique for this feature flag";
15454
+ readonly example: "blue_group";
15455
+ };
15456
+ readonly weight: {
15457
+ readonly type: "integer";
15458
+ readonly description: "The weight is the likelihood of any one user getting this variant. It is an integer between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight) for more information";
15459
+ readonly minimum: 0;
15460
+ readonly maximum: 1000;
15461
+ };
15462
+ readonly weightType: {
15463
+ 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. Refer to the [variant weight documentation](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight).";
15464
+ readonly type: "string";
15465
+ readonly example: "fix";
15466
+ readonly enum: readonly ["variable", "fix"];
15467
+ };
15468
+ readonly stickiness: {
15469
+ readonly type: "string";
15470
+ readonly description: "The [stickiness](https://docs.getunleash.io/concepts/feature-flag-variants#variant-stickiness) to use for distribution of this variant. Stickiness is how Unleash guarantees that the same user gets the same variant every time";
15471
+ readonly example: "custom.context.field";
15472
+ };
15473
+ readonly payload: {
15474
+ readonly type: "object";
15475
+ readonly required: readonly ["type", "value"];
15476
+ readonly description: "Extra data configured for this variant";
15477
+ readonly properties: {
15478
+ readonly type: {
15479
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
15480
+ readonly type: "string";
15481
+ readonly enum: readonly ["json", "csv", "string", "number"];
15482
+ };
15483
+ readonly value: {
15484
+ readonly description: "The actual value of payload";
15485
+ readonly type: "string";
15486
+ };
15487
+ };
15488
+ readonly example: {
15489
+ readonly type: "json";
15490
+ readonly value: "{\"color\": \"red\"}";
15491
+ };
15492
+ };
15493
+ };
15494
+ readonly components: {};
15495
+ };
15496
+ };
15497
+ };
15498
+ };
15499
+ readonly transitionConditionSchema: {
15500
+ readonly $id: "#/components/schemas/transitionConditionSchema";
15501
+ readonly type: "object";
15502
+ readonly additionalProperties: false;
15503
+ readonly required: readonly ["intervalMinutes"];
15504
+ readonly description: "A transition condition for milestone progression";
15505
+ readonly properties: {
15506
+ readonly intervalMinutes: {
15507
+ readonly type: "integer";
15508
+ readonly minimum: 1;
15509
+ readonly description: "The interval in minutes before transitioning";
15510
+ readonly example: 30;
15511
+ };
15512
+ };
15513
+ readonly components: {};
15514
+ };
15515
+ readonly releasePlanSafeguardSchema: {
15516
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
15517
+ readonly type: "object";
15518
+ readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
15519
+ readonly description: "A safeguard configuration for a release plan.";
15520
+ readonly additionalProperties: false;
15521
+ readonly properties: {
15522
+ readonly id: {
15523
+ readonly type: "string";
15524
+ readonly description: "The unique ULID identifier for this safeguard";
15525
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
15526
+ };
15527
+ readonly action: {
15528
+ readonly type: "object";
15529
+ readonly required: readonly ["type", "id"];
15530
+ readonly additionalProperties: false;
15531
+ readonly description: "The action to take when the safeguard is triggered.";
15532
+ readonly properties: {
15533
+ readonly type: {
15534
+ readonly type: "string";
15535
+ readonly description: "The type of action to perform.";
15536
+ readonly example: "pauseReleasePlanProgressions";
15537
+ };
15538
+ readonly id: {
15539
+ readonly type: "string";
15540
+ readonly description: "The ID of the release plan this safeguard applies to.";
15541
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW2";
15542
+ };
15543
+ };
15544
+ };
15545
+ readonly triggerCondition: {
15546
+ readonly $ref: "#/components/schemas/safeguardTriggerConditionSchema";
15547
+ readonly description: "The condition that triggers the safeguard.";
15548
+ };
15549
+ readonly impactMetric: {
15550
+ readonly type: "object";
15551
+ readonly required: readonly ["id", "metricName", "timeRange", "aggregationMode", "labelSelectors"];
15552
+ readonly additionalProperties: false;
15553
+ readonly properties: {
15554
+ readonly metricName: {
15555
+ readonly type: "string";
15556
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
15557
+ readonly example: "unleash_counter_feature_toggle_usage_total";
15558
+ };
15559
+ readonly timeRange: {
15560
+ readonly type: "string";
15561
+ readonly enum: readonly ["hour", "day", "week", "month"];
15562
+ readonly description: "The time range for the metric data.";
15563
+ readonly example: "day";
15564
+ };
15565
+ readonly aggregationMode: {
15566
+ readonly type: "string";
15567
+ readonly description: "The aggregation mode for the metric data.";
15568
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
15569
+ readonly example: "rps";
15570
+ };
15571
+ readonly labelSelectors: {
15572
+ readonly type: "object";
15573
+ readonly additionalProperties: {
15574
+ readonly type: "array";
15575
+ readonly items: {
15576
+ readonly type: "string";
15577
+ };
15578
+ };
15579
+ readonly description: "The selected labels and their values for filtering the metric data.";
15580
+ readonly example: {
15581
+ readonly environment: readonly ["development"];
15582
+ readonly project: readonly ["default"];
15583
+ };
15584
+ };
15585
+ readonly source: {
14662
15586
  readonly type: "string";
15587
+ readonly enum: readonly ["internal", "external"];
15588
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
15589
+ readonly example: "internal";
15590
+ };
15591
+ readonly id: {
15592
+ readonly type: "string";
15593
+ readonly description: "The unique identifier for this impact metric";
15594
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
14663
15595
  };
14664
- readonly components: {};
14665
15596
  };
14666
- readonly constraintSchema: {
15597
+ readonly description: "The metric configuration used to evaluate the safeguard condition.";
15598
+ };
15599
+ };
15600
+ readonly components: {
15601
+ readonly schemas: {
15602
+ readonly metricQuerySchema: {
15603
+ readonly $id: "#/components/schemas/metricQuerySchema";
14667
15604
  readonly type: "object";
14668
- readonly required: readonly ["contextName", "operator"];
14669
- readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/concepts/activation-strategies#constraints)";
15605
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
15606
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
15607
+ readonly additionalProperties: false;
14670
15608
  readonly properties: {
14671
- readonly contextName: {
14672
- readonly description: "The name of the context field that this constraint should apply to.";
14673
- readonly example: "appName";
15609
+ readonly metricName: {
14674
15610
  readonly type: "string";
15611
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
15612
+ readonly example: "unleash_counter_feature_toggle_usage_total";
14675
15613
  };
14676
- readonly operator: {
14677
- 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/concepts/activation-strategies#constraint-operators).";
15614
+ readonly timeRange: {
14678
15615
  readonly type: "string";
14679
- 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", "REGEX"];
14680
- readonly example: "IN";
15616
+ readonly enum: readonly ["hour", "day", "week", "month"];
15617
+ readonly description: "The time range for the metric data.";
15618
+ readonly example: "day";
14681
15619
  };
14682
- readonly caseInsensitive: {
14683
- readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
14684
- readonly type: "boolean";
14685
- readonly default: false;
15620
+ readonly aggregationMode: {
15621
+ readonly type: "string";
15622
+ readonly description: "The aggregation mode for the metric data.";
15623
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
15624
+ readonly example: "rps";
14686
15625
  };
14687
- readonly inverted: {
14688
- readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
14689
- readonly type: "boolean";
14690
- readonly default: false;
15626
+ readonly labelSelectors: {
15627
+ readonly type: "object";
15628
+ readonly additionalProperties: {
15629
+ readonly type: "array";
15630
+ readonly items: {
15631
+ readonly type: "string";
15632
+ };
15633
+ };
15634
+ readonly description: "The selected labels and their values for filtering the metric data.";
15635
+ readonly example: {
15636
+ readonly environment: readonly ["development"];
15637
+ readonly project: readonly ["default"];
15638
+ };
14691
15639
  };
14692
- readonly values: {
15640
+ readonly source: {
15641
+ readonly type: "string";
15642
+ readonly enum: readonly ["internal", "external"];
15643
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
15644
+ readonly example: "internal";
15645
+ };
15646
+ };
15647
+ readonly components: {};
15648
+ };
15649
+ readonly safeguardTriggerConditionSchema: {
15650
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
15651
+ readonly type: "object";
15652
+ readonly required: readonly ["operator", "threshold"];
15653
+ readonly additionalProperties: false;
15654
+ readonly description: "The condition that triggers the safeguard.";
15655
+ readonly properties: {
15656
+ readonly operator: {
15657
+ readonly type: "string";
15658
+ readonly enum: readonly [">", "<"];
15659
+ readonly description: "The comparison operator for the threshold check.";
15660
+ readonly example: ">";
15661
+ };
15662
+ readonly threshold: {
15663
+ readonly type: "number";
15664
+ readonly description: "The threshold value to compare against.";
15665
+ readonly example: 100;
15666
+ };
15667
+ };
15668
+ readonly components: {};
15669
+ };
15670
+ };
15671
+ };
15672
+ };
15673
+ readonly featureEnvironmentSafeguardSchema: {
15674
+ readonly $id: "#/components/schemas/featureEnvironmentSafeguardSchema";
15675
+ readonly type: "object";
15676
+ readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
15677
+ readonly description: "A safeguard configuration for a feature environment.";
15678
+ readonly additionalProperties: false;
15679
+ readonly properties: {
15680
+ readonly id: {
15681
+ readonly type: "string";
15682
+ readonly description: "The unique ULID identifier for this safeguard";
15683
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
15684
+ };
15685
+ readonly action: {
15686
+ readonly type: "object";
15687
+ readonly required: readonly ["type", "featureName", "environment", "project"];
15688
+ readonly additionalProperties: false;
15689
+ readonly description: "Disable a feature in an environment when triggered.";
15690
+ readonly properties: {
15691
+ readonly type: {
15692
+ readonly type: "string";
15693
+ readonly description: "The type of action to perform.";
15694
+ readonly example: "disableFeatureEnvironment";
15695
+ };
15696
+ readonly featureName: {
15697
+ readonly type: "string";
15698
+ readonly description: "The feature flag name this safeguard applies to.";
15699
+ };
15700
+ readonly environment: {
15701
+ readonly type: "string";
15702
+ readonly description: "The environment this safeguard applies to.";
15703
+ };
15704
+ readonly project: {
15705
+ readonly type: "string";
15706
+ readonly description: "The project this safeguard applies to.";
15707
+ };
15708
+ };
15709
+ };
15710
+ readonly triggerCondition: {
15711
+ readonly $ref: "#/components/schemas/safeguardTriggerConditionSchema";
15712
+ readonly description: "The condition that triggers the safeguard.";
15713
+ };
15714
+ readonly impactMetric: {
15715
+ readonly type: "object";
15716
+ readonly required: readonly ["id", "metricName", "timeRange", "aggregationMode", "labelSelectors"];
15717
+ readonly additionalProperties: false;
15718
+ readonly properties: {
15719
+ readonly metricName: {
15720
+ readonly type: "string";
15721
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
15722
+ readonly example: "unleash_counter_feature_toggle_usage_total";
15723
+ };
15724
+ readonly timeRange: {
15725
+ readonly type: "string";
15726
+ readonly enum: readonly ["hour", "day", "week", "month"];
15727
+ readonly description: "The time range for the metric data.";
15728
+ readonly example: "day";
15729
+ };
15730
+ readonly aggregationMode: {
15731
+ readonly type: "string";
15732
+ readonly description: "The aggregation mode for the metric data.";
15733
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
15734
+ readonly example: "rps";
15735
+ };
15736
+ readonly labelSelectors: {
15737
+ readonly type: "object";
15738
+ readonly additionalProperties: {
14693
15739
  readonly type: "array";
14694
- readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
14695
15740
  readonly items: {
14696
15741
  readonly type: "string";
14697
15742
  };
14698
- readonly example: readonly ["my-app", "my-other-app"];
14699
15743
  };
14700
- readonly value: {
14701
- 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.";
14702
- readonly type: "string";
14703
- readonly example: "my-app";
15744
+ readonly description: "The selected labels and their values for filtering the metric data.";
15745
+ readonly example: {
15746
+ readonly environment: readonly ["development"];
15747
+ readonly project: readonly ["default"];
14704
15748
  };
14705
15749
  };
14706
- readonly components: {};
14707
- readonly $id: "#/components/schemas/constraintSchema";
14708
- readonly additionalProperties: false;
15750
+ readonly source: {
15751
+ readonly type: "string";
15752
+ readonly enum: readonly ["internal", "external"];
15753
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
15754
+ readonly example: "internal";
15755
+ };
15756
+ readonly id: {
15757
+ readonly type: "string";
15758
+ readonly description: "The unique identifier for this impact metric";
15759
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
15760
+ };
14709
15761
  };
14710
- readonly createStrategyVariantSchema: {
14711
- readonly $id: "#/components/schemas/createStrategyVariantSchema";
15762
+ readonly description: "The metric configuration used to evaluate the safeguard condition.";
15763
+ };
15764
+ };
15765
+ readonly components: {
15766
+ readonly schemas: {
15767
+ readonly metricQuerySchema: {
15768
+ readonly $id: "#/components/schemas/metricQuerySchema";
14712
15769
  readonly type: "object";
14713
- readonly description: "This is an experimental property. It may change or be removed as we work on it. Please don't depend on it yet. A strategy variant allows you to attach any data to strategies instead of only returning `true`/`false`. Strategy variants take precedence over feature variants.";
14714
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
15770
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
15771
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
15772
+ readonly additionalProperties: false;
14715
15773
  readonly properties: {
14716
- readonly name: {
15774
+ readonly metricName: {
14717
15775
  readonly type: "string";
14718
- readonly description: "The variant name. Must be unique for this feature flag";
14719
- readonly example: "blue_group";
14720
- };
14721
- readonly weight: {
14722
- readonly type: "integer";
14723
- readonly description: "The weight is the likelihood of any one user getting this variant. It is an integer between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight) for more information";
14724
- readonly minimum: 0;
14725
- readonly maximum: 1000;
15776
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
15777
+ readonly example: "unleash_counter_feature_toggle_usage_total";
14726
15778
  };
14727
- readonly weightType: {
14728
- 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. Refer to the [variant weight documentation](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight).";
15779
+ readonly timeRange: {
14729
15780
  readonly type: "string";
14730
- readonly example: "fix";
14731
- readonly enum: readonly ["variable", "fix"];
15781
+ readonly enum: readonly ["hour", "day", "week", "month"];
15782
+ readonly description: "The time range for the metric data.";
15783
+ readonly example: "day";
14732
15784
  };
14733
- readonly stickiness: {
15785
+ readonly aggregationMode: {
14734
15786
  readonly type: "string";
14735
- readonly description: "The [stickiness](https://docs.getunleash.io/concepts/feature-flag-variants#variant-stickiness) to use for distribution of this variant. Stickiness is how Unleash guarantees that the same user gets the same variant every time";
14736
- readonly example: "custom.context.field";
15787
+ readonly description: "The aggregation mode for the metric data.";
15788
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
15789
+ readonly example: "rps";
14737
15790
  };
14738
- readonly payload: {
15791
+ readonly labelSelectors: {
14739
15792
  readonly type: "object";
14740
- readonly required: readonly ["type", "value"];
14741
- readonly description: "Extra data configured for this variant";
14742
- readonly properties: {
14743
- readonly type: {
14744
- readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
14745
- readonly type: "string";
14746
- readonly enum: readonly ["json", "csv", "string", "number"];
14747
- };
14748
- readonly value: {
14749
- readonly description: "The actual value of payload";
15793
+ readonly additionalProperties: {
15794
+ readonly type: "array";
15795
+ readonly items: {
14750
15796
  readonly type: "string";
14751
15797
  };
14752
15798
  };
15799
+ readonly description: "The selected labels and their values for filtering the metric data.";
14753
15800
  readonly example: {
14754
- readonly type: "json";
14755
- readonly value: "{\"color\": \"red\"}";
15801
+ readonly environment: readonly ["development"];
15802
+ readonly project: readonly ["default"];
14756
15803
  };
14757
15804
  };
15805
+ readonly source: {
15806
+ readonly type: "string";
15807
+ readonly enum: readonly ["internal", "external"];
15808
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
15809
+ readonly example: "internal";
15810
+ };
15811
+ };
15812
+ readonly components: {};
15813
+ };
15814
+ readonly safeguardTriggerConditionSchema: {
15815
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
15816
+ readonly type: "object";
15817
+ readonly required: readonly ["operator", "threshold"];
15818
+ readonly additionalProperties: false;
15819
+ readonly description: "The condition that triggers the safeguard.";
15820
+ readonly properties: {
15821
+ readonly operator: {
15822
+ readonly type: "string";
15823
+ readonly enum: readonly [">", "<"];
15824
+ readonly description: "The comparison operator for the threshold check.";
15825
+ readonly example: ">";
15826
+ };
15827
+ readonly threshold: {
15828
+ readonly type: "number";
15829
+ readonly description: "The threshold value to compare against.";
15830
+ readonly example: 100;
15831
+ };
14758
15832
  };
14759
15833
  readonly components: {};
14760
15834
  };
14761
15835
  };
14762
15836
  };
14763
15837
  };
14764
- readonly transitionConditionSchema: {
14765
- readonly $id: "#/components/schemas/transitionConditionSchema";
15838
+ readonly metricQuerySchema: {
15839
+ readonly $id: "#/components/schemas/metricQuerySchema";
14766
15840
  readonly type: "object";
15841
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
15842
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
14767
15843
  readonly additionalProperties: false;
14768
- readonly required: readonly ["intervalMinutes"];
14769
- readonly description: "A transition condition for milestone progression";
14770
15844
  readonly properties: {
14771
- readonly intervalMinutes: {
14772
- readonly type: "integer";
14773
- readonly minimum: 1;
14774
- readonly description: "The interval in minutes before transitioning";
14775
- readonly example: 30;
15845
+ readonly metricName: {
15846
+ readonly type: "string";
15847
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
15848
+ readonly example: "unleash_counter_feature_toggle_usage_total";
15849
+ };
15850
+ readonly timeRange: {
15851
+ readonly type: "string";
15852
+ readonly enum: readonly ["hour", "day", "week", "month"];
15853
+ readonly description: "The time range for the metric data.";
15854
+ readonly example: "day";
15855
+ };
15856
+ readonly aggregationMode: {
15857
+ readonly type: "string";
15858
+ readonly description: "The aggregation mode for the metric data.";
15859
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
15860
+ readonly example: "rps";
15861
+ };
15862
+ readonly labelSelectors: {
15863
+ readonly type: "object";
15864
+ readonly additionalProperties: {
15865
+ readonly type: "array";
15866
+ readonly items: {
15867
+ readonly type: "string";
15868
+ };
15869
+ };
15870
+ readonly description: "The selected labels and their values for filtering the metric data.";
15871
+ readonly example: {
15872
+ readonly environment: readonly ["development"];
15873
+ readonly project: readonly ["default"];
15874
+ };
15875
+ };
15876
+ readonly source: {
15877
+ readonly type: "string";
15878
+ readonly enum: readonly ["internal", "external"];
15879
+ readonly description: "The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified.";
15880
+ readonly example: "internal";
15881
+ };
15882
+ };
15883
+ readonly components: {};
15884
+ };
15885
+ readonly safeguardTriggerConditionSchema: {
15886
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
15887
+ readonly type: "object";
15888
+ readonly required: readonly ["operator", "threshold"];
15889
+ readonly additionalProperties: false;
15890
+ readonly description: "The condition that triggers the safeguard.";
15891
+ readonly properties: {
15892
+ readonly operator: {
15893
+ readonly type: "string";
15894
+ readonly enum: readonly [">", "<"];
15895
+ readonly description: "The comparison operator for the threshold check.";
15896
+ readonly example: ">";
15897
+ };
15898
+ readonly threshold: {
15899
+ readonly type: "number";
15900
+ readonly description: "The threshold value to compare against.";
15901
+ readonly example: 100;
14776
15902
  };
14777
15903
  };
14778
15904
  readonly components: {};