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
@@ -1092,6 +1092,13 @@ export declare const healthOverviewSchema: {
1092
1092
  readonly $ref: "#/components/schemas/releasePlanSchema";
1093
1093
  };
1094
1094
  };
1095
+ readonly safeguards: {
1096
+ readonly type: "array";
1097
+ readonly description: "Safeguards for this feature environment";
1098
+ readonly items: {
1099
+ readonly $ref: "#/components/schemas/featureEnvironmentSafeguardSchema";
1100
+ };
1101
+ };
1095
1102
  readonly yes: {
1096
1103
  readonly type: "integer";
1097
1104
  readonly description: "How many times the feature evaluated to true (enabled)";
@@ -1550,7 +1557,7 @@ export declare const healthOverviewSchema: {
1550
1557
  readonly type: "array";
1551
1558
  readonly description: "An array of safeguards configured for this release plan.";
1552
1559
  readonly items: {
1553
- readonly $ref: "#/components/schemas/safeguardSchema";
1560
+ readonly $ref: "#/components/schemas/releasePlanSafeguardSchema";
1554
1561
  };
1555
1562
  };
1556
1563
  };
@@ -1635,7 +1642,7 @@ export declare const healthOverviewSchema: {
1635
1642
  readonly additionalProperties: false;
1636
1643
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
1637
1644
  readonly type: "object";
1638
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
1645
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
1639
1646
  readonly properties: {
1640
1647
  readonly id: {
1641
1648
  readonly type: "string";
@@ -2304,7 +2311,7 @@ export declare const healthOverviewSchema: {
2304
2311
  readonly additionalProperties: false;
2305
2312
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
2306
2313
  readonly type: "object";
2307
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
2314
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
2308
2315
  readonly properties: {
2309
2316
  readonly id: {
2310
2317
  readonly type: "string";
@@ -2965,8 +2972,8 @@ export declare const healthOverviewSchema: {
2965
2972
  };
2966
2973
  readonly components: {};
2967
2974
  };
2968
- readonly safeguardSchema: {
2969
- readonly $id: "#/components/schemas/safeguardSchema";
2975
+ readonly releasePlanSafeguardSchema: {
2976
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
2970
2977
  readonly type: "object";
2971
2978
  readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
2972
2979
  readonly description: "A safeguard configuration for a release plan.";
@@ -3035,6 +3042,12 @@ export declare const healthOverviewSchema: {
3035
3042
  readonly project: readonly ["default"];
3036
3043
  };
3037
3044
  };
3045
+ readonly source: {
3046
+ readonly type: "string";
3047
+ readonly enum: readonly ["internal", "external"];
3048
+ 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.";
3049
+ readonly example: "internal";
3050
+ };
3038
3051
  readonly id: {
3039
3052
  readonly type: "string";
3040
3053
  readonly description: "The unique identifier for this impact metric";
@@ -3084,6 +3097,12 @@ export declare const healthOverviewSchema: {
3084
3097
  readonly project: readonly ["default"];
3085
3098
  };
3086
3099
  };
3100
+ readonly source: {
3101
+ readonly type: "string";
3102
+ readonly enum: readonly ["internal", "external"];
3103
+ 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.";
3104
+ readonly example: "internal";
3105
+ };
3087
3106
  };
3088
3107
  readonly components: {};
3089
3108
  };
@@ -3149,6 +3168,12 @@ export declare const healthOverviewSchema: {
3149
3168
  readonly project: readonly ["default"];
3150
3169
  };
3151
3170
  };
3171
+ readonly source: {
3172
+ readonly type: "string";
3173
+ readonly enum: readonly ["internal", "external"];
3174
+ 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.";
3175
+ readonly example: "internal";
3176
+ };
3152
3177
  };
3153
3178
  readonly components: {};
3154
3179
  };
@@ -3255,7 +3280,7 @@ export declare const healthOverviewSchema: {
3255
3280
  readonly additionalProperties: false;
3256
3281
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
3257
3282
  readonly type: "object";
3258
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
3283
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
3259
3284
  readonly properties: {
3260
3285
  readonly id: {
3261
3286
  readonly type: "string";
@@ -3924,7 +3949,7 @@ export declare const healthOverviewSchema: {
3924
3949
  readonly additionalProperties: false;
3925
3950
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
3926
3951
  readonly type: "object";
3927
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
3952
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
3928
3953
  readonly properties: {
3929
3954
  readonly id: {
3930
3955
  readonly type: "string";
@@ -4532,6 +4557,239 @@ export declare const healthOverviewSchema: {
4532
4557
  };
4533
4558
  readonly components: {};
4534
4559
  };
4560
+ readonly featureEnvironmentSafeguardSchema: {
4561
+ readonly $id: "#/components/schemas/featureEnvironmentSafeguardSchema";
4562
+ readonly type: "object";
4563
+ readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
4564
+ readonly description: "A safeguard configuration for a feature environment.";
4565
+ readonly additionalProperties: false;
4566
+ readonly properties: {
4567
+ readonly id: {
4568
+ readonly type: "string";
4569
+ readonly description: "The unique ULID identifier for this safeguard";
4570
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
4571
+ };
4572
+ readonly action: {
4573
+ readonly type: "object";
4574
+ readonly required: readonly ["type", "featureName", "environment", "project"];
4575
+ readonly additionalProperties: false;
4576
+ readonly description: "Disable a feature in an environment when triggered.";
4577
+ readonly properties: {
4578
+ readonly type: {
4579
+ readonly type: "string";
4580
+ readonly description: "The type of action to perform.";
4581
+ readonly example: "disableFeatureEnvironment";
4582
+ };
4583
+ readonly featureName: {
4584
+ readonly type: "string";
4585
+ readonly description: "The feature flag name this safeguard applies to.";
4586
+ };
4587
+ readonly environment: {
4588
+ readonly type: "string";
4589
+ readonly description: "The environment this safeguard applies to.";
4590
+ };
4591
+ readonly project: {
4592
+ readonly type: "string";
4593
+ readonly description: "The project this safeguard applies to.";
4594
+ };
4595
+ };
4596
+ };
4597
+ readonly triggerCondition: {
4598
+ readonly $ref: "#/components/schemas/safeguardTriggerConditionSchema";
4599
+ readonly description: "The condition that triggers the safeguard.";
4600
+ };
4601
+ readonly impactMetric: {
4602
+ readonly type: "object";
4603
+ readonly required: readonly ["id", "metricName", "timeRange", "aggregationMode", "labelSelectors"];
4604
+ readonly additionalProperties: false;
4605
+ readonly properties: {
4606
+ readonly metricName: {
4607
+ readonly type: "string";
4608
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
4609
+ readonly example: "unleash_counter_feature_toggle_usage_total";
4610
+ };
4611
+ readonly timeRange: {
4612
+ readonly type: "string";
4613
+ readonly enum: readonly ["hour", "day", "week", "month"];
4614
+ readonly description: "The time range for the metric data.";
4615
+ readonly example: "day";
4616
+ };
4617
+ readonly aggregationMode: {
4618
+ readonly type: "string";
4619
+ readonly description: "The aggregation mode for the metric data.";
4620
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
4621
+ readonly example: "rps";
4622
+ };
4623
+ readonly labelSelectors: {
4624
+ readonly type: "object";
4625
+ readonly additionalProperties: {
4626
+ readonly type: "array";
4627
+ readonly items: {
4628
+ readonly type: "string";
4629
+ };
4630
+ };
4631
+ readonly description: "The selected labels and their values for filtering the metric data.";
4632
+ readonly example: {
4633
+ readonly environment: readonly ["development"];
4634
+ readonly project: readonly ["default"];
4635
+ };
4636
+ };
4637
+ readonly source: {
4638
+ readonly type: "string";
4639
+ readonly enum: readonly ["internal", "external"];
4640
+ 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.";
4641
+ readonly example: "internal";
4642
+ };
4643
+ readonly id: {
4644
+ readonly type: "string";
4645
+ readonly description: "The unique identifier for this impact metric";
4646
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
4647
+ };
4648
+ };
4649
+ readonly description: "The metric configuration used to evaluate the safeguard condition.";
4650
+ };
4651
+ };
4652
+ readonly components: {
4653
+ readonly schemas: {
4654
+ readonly metricQuerySchema: {
4655
+ readonly $id: "#/components/schemas/metricQuerySchema";
4656
+ readonly type: "object";
4657
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
4658
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
4659
+ readonly additionalProperties: false;
4660
+ readonly properties: {
4661
+ readonly metricName: {
4662
+ readonly type: "string";
4663
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
4664
+ readonly example: "unleash_counter_feature_toggle_usage_total";
4665
+ };
4666
+ readonly timeRange: {
4667
+ readonly type: "string";
4668
+ readonly enum: readonly ["hour", "day", "week", "month"];
4669
+ readonly description: "The time range for the metric data.";
4670
+ readonly example: "day";
4671
+ };
4672
+ readonly aggregationMode: {
4673
+ readonly type: "string";
4674
+ readonly description: "The aggregation mode for the metric data.";
4675
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
4676
+ readonly example: "rps";
4677
+ };
4678
+ readonly labelSelectors: {
4679
+ readonly type: "object";
4680
+ readonly additionalProperties: {
4681
+ readonly type: "array";
4682
+ readonly items: {
4683
+ readonly type: "string";
4684
+ };
4685
+ };
4686
+ readonly description: "The selected labels and their values for filtering the metric data.";
4687
+ readonly example: {
4688
+ readonly environment: readonly ["development"];
4689
+ readonly project: readonly ["default"];
4690
+ };
4691
+ };
4692
+ readonly source: {
4693
+ readonly type: "string";
4694
+ readonly enum: readonly ["internal", "external"];
4695
+ 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.";
4696
+ readonly example: "internal";
4697
+ };
4698
+ };
4699
+ readonly components: {};
4700
+ };
4701
+ readonly safeguardTriggerConditionSchema: {
4702
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
4703
+ readonly type: "object";
4704
+ readonly required: readonly ["operator", "threshold"];
4705
+ readonly additionalProperties: false;
4706
+ readonly description: "The condition that triggers the safeguard.";
4707
+ readonly properties: {
4708
+ readonly operator: {
4709
+ readonly type: "string";
4710
+ readonly enum: readonly [">", "<"];
4711
+ readonly description: "The comparison operator for the threshold check.";
4712
+ readonly example: ">";
4713
+ };
4714
+ readonly threshold: {
4715
+ readonly type: "number";
4716
+ readonly description: "The threshold value to compare against.";
4717
+ readonly example: 100;
4718
+ };
4719
+ };
4720
+ readonly components: {};
4721
+ };
4722
+ };
4723
+ };
4724
+ };
4725
+ readonly safeguardTriggerConditionSchema: {
4726
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
4727
+ readonly type: "object";
4728
+ readonly required: readonly ["operator", "threshold"];
4729
+ readonly additionalProperties: false;
4730
+ readonly description: "The condition that triggers the safeguard.";
4731
+ readonly properties: {
4732
+ readonly operator: {
4733
+ readonly type: "string";
4734
+ readonly enum: readonly [">", "<"];
4735
+ readonly description: "The comparison operator for the threshold check.";
4736
+ readonly example: ">";
4737
+ };
4738
+ readonly threshold: {
4739
+ readonly type: "number";
4740
+ readonly description: "The threshold value to compare against.";
4741
+ readonly example: 100;
4742
+ };
4743
+ };
4744
+ readonly components: {};
4745
+ };
4746
+ readonly metricQuerySchema: {
4747
+ readonly $id: "#/components/schemas/metricQuerySchema";
4748
+ readonly type: "object";
4749
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
4750
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
4751
+ readonly additionalProperties: false;
4752
+ readonly properties: {
4753
+ readonly metricName: {
4754
+ readonly type: "string";
4755
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
4756
+ readonly example: "unleash_counter_feature_toggle_usage_total";
4757
+ };
4758
+ readonly timeRange: {
4759
+ readonly type: "string";
4760
+ readonly enum: readonly ["hour", "day", "week", "month"];
4761
+ readonly description: "The time range for the metric data.";
4762
+ readonly example: "day";
4763
+ };
4764
+ readonly aggregationMode: {
4765
+ readonly type: "string";
4766
+ readonly description: "The aggregation mode for the metric data.";
4767
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
4768
+ readonly example: "rps";
4769
+ };
4770
+ readonly labelSelectors: {
4771
+ readonly type: "object";
4772
+ readonly additionalProperties: {
4773
+ readonly type: "array";
4774
+ readonly items: {
4775
+ readonly type: "string";
4776
+ };
4777
+ };
4778
+ readonly description: "The selected labels and their values for filtering the metric data.";
4779
+ readonly example: {
4780
+ readonly environment: readonly ["development"];
4781
+ readonly project: readonly ["default"];
4782
+ };
4783
+ };
4784
+ readonly source: {
4785
+ readonly type: "string";
4786
+ readonly enum: readonly ["internal", "external"];
4787
+ 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.";
4788
+ readonly example: "internal";
4789
+ };
4790
+ };
4791
+ readonly components: {};
4792
+ };
4535
4793
  };
4536
4794
  };
4537
4795
  };
@@ -4988,7 +5246,7 @@ export declare const healthOverviewSchema: {
4988
5246
  readonly type: "array";
4989
5247
  readonly description: "An array of safeguards configured for this release plan.";
4990
5248
  readonly items: {
4991
- readonly $ref: "#/components/schemas/safeguardSchema";
5249
+ readonly $ref: "#/components/schemas/releasePlanSafeguardSchema";
4992
5250
  };
4993
5251
  };
4994
5252
  };
@@ -5073,7 +5331,7 @@ export declare const healthOverviewSchema: {
5073
5331
  readonly additionalProperties: false;
5074
5332
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
5075
5333
  readonly type: "object";
5076
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
5334
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
5077
5335
  readonly properties: {
5078
5336
  readonly id: {
5079
5337
  readonly type: "string";
@@ -5742,7 +6000,7 @@ export declare const healthOverviewSchema: {
5742
6000
  readonly additionalProperties: false;
5743
6001
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
5744
6002
  readonly type: "object";
5745
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
6003
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
5746
6004
  readonly properties: {
5747
6005
  readonly id: {
5748
6006
  readonly type: "string";
@@ -6403,8 +6661,8 @@ export declare const healthOverviewSchema: {
6403
6661
  };
6404
6662
  readonly components: {};
6405
6663
  };
6406
- readonly safeguardSchema: {
6407
- readonly $id: "#/components/schemas/safeguardSchema";
6664
+ readonly releasePlanSafeguardSchema: {
6665
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
6408
6666
  readonly type: "object";
6409
6667
  readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
6410
6668
  readonly description: "A safeguard configuration for a release plan.";
@@ -6473,6 +6731,12 @@ export declare const healthOverviewSchema: {
6473
6731
  readonly project: readonly ["default"];
6474
6732
  };
6475
6733
  };
6734
+ readonly source: {
6735
+ readonly type: "string";
6736
+ readonly enum: readonly ["internal", "external"];
6737
+ 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.";
6738
+ readonly example: "internal";
6739
+ };
6476
6740
  readonly id: {
6477
6741
  readonly type: "string";
6478
6742
  readonly description: "The unique identifier for this impact metric";
@@ -6522,6 +6786,12 @@ export declare const healthOverviewSchema: {
6522
6786
  readonly project: readonly ["default"];
6523
6787
  };
6524
6788
  };
6789
+ readonly source: {
6790
+ readonly type: "string";
6791
+ readonly enum: readonly ["internal", "external"];
6792
+ 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.";
6793
+ readonly example: "internal";
6794
+ };
6525
6795
  };
6526
6796
  readonly components: {};
6527
6797
  };
@@ -6587,6 +6857,12 @@ export declare const healthOverviewSchema: {
6587
6857
  readonly project: readonly ["default"];
6588
6858
  };
6589
6859
  };
6860
+ readonly source: {
6861
+ readonly type: "string";
6862
+ readonly enum: readonly ["internal", "external"];
6863
+ 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.";
6864
+ readonly example: "internal";
6865
+ };
6590
6866
  };
6591
6867
  readonly components: {};
6592
6868
  };
@@ -6693,7 +6969,7 @@ export declare const healthOverviewSchema: {
6693
6969
  readonly additionalProperties: false;
6694
6970
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
6695
6971
  readonly type: "object";
6696
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
6972
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
6697
6973
  readonly properties: {
6698
6974
  readonly id: {
6699
6975
  readonly type: "string";
@@ -7362,7 +7638,7 @@ export declare const healthOverviewSchema: {
7362
7638
  readonly additionalProperties: false;
7363
7639
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
7364
7640
  readonly type: "object";
7365
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
7641
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
7366
7642
  readonly properties: {
7367
7643
  readonly id: {
7368
7644
  readonly type: "string";
@@ -7970,8 +8246,8 @@ export declare const healthOverviewSchema: {
7970
8246
  };
7971
8247
  readonly components: {};
7972
8248
  };
7973
- readonly safeguardSchema: {
7974
- readonly $id: "#/components/schemas/safeguardSchema";
8249
+ readonly releasePlanSafeguardSchema: {
8250
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
7975
8251
  readonly type: "object";
7976
8252
  readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
7977
8253
  readonly description: "A safeguard configuration for a release plan.";
@@ -8040,6 +8316,12 @@ export declare const healthOverviewSchema: {
8040
8316
  readonly project: readonly ["default"];
8041
8317
  };
8042
8318
  };
8319
+ readonly source: {
8320
+ readonly type: "string";
8321
+ readonly enum: readonly ["internal", "external"];
8322
+ 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.";
8323
+ readonly example: "internal";
8324
+ };
8043
8325
  readonly id: {
8044
8326
  readonly type: "string";
8045
8327
  readonly description: "The unique identifier for this impact metric";
@@ -8089,6 +8371,12 @@ export declare const healthOverviewSchema: {
8089
8371
  readonly project: readonly ["default"];
8090
8372
  };
8091
8373
  };
8374
+ readonly source: {
8375
+ readonly type: "string";
8376
+ readonly enum: readonly ["internal", "external"];
8377
+ 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.";
8378
+ readonly example: "internal";
8379
+ };
8092
8380
  };
8093
8381
  readonly components: {};
8094
8382
  };
@@ -8116,33 +8404,198 @@ export declare const healthOverviewSchema: {
8116
8404
  };
8117
8405
  };
8118
8406
  };
8119
- readonly metricQuerySchema: {
8120
- readonly $id: "#/components/schemas/metricQuerySchema";
8407
+ readonly featureEnvironmentSafeguardSchema: {
8408
+ readonly $id: "#/components/schemas/featureEnvironmentSafeguardSchema";
8121
8409
  readonly type: "object";
8122
- readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
8123
- readonly description: "Common metric query configuration for selecting and filtering metric data.";
8410
+ readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
8411
+ readonly description: "A safeguard configuration for a feature environment.";
8124
8412
  readonly additionalProperties: false;
8125
8413
  readonly properties: {
8126
- readonly metricName: {
8127
- readonly type: "string";
8128
- readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
8129
- readonly example: "unleash_counter_feature_toggle_usage_total";
8130
- };
8131
- readonly timeRange: {
8132
- readonly type: "string";
8133
- readonly enum: readonly ["hour", "day", "week", "month"];
8134
- readonly description: "The time range for the metric data.";
8135
- readonly example: "day";
8136
- };
8137
- readonly aggregationMode: {
8414
+ readonly id: {
8138
8415
  readonly type: "string";
8139
- readonly description: "The aggregation mode for the metric data.";
8140
- readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
8141
- readonly example: "rps";
8416
+ readonly description: "The unique ULID identifier for this safeguard";
8417
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
8142
8418
  };
8143
- readonly labelSelectors: {
8419
+ readonly action: {
8144
8420
  readonly type: "object";
8145
- readonly additionalProperties: {
8421
+ readonly required: readonly ["type", "featureName", "environment", "project"];
8422
+ readonly additionalProperties: false;
8423
+ readonly description: "Disable a feature in an environment when triggered.";
8424
+ readonly properties: {
8425
+ readonly type: {
8426
+ readonly type: "string";
8427
+ readonly description: "The type of action to perform.";
8428
+ readonly example: "disableFeatureEnvironment";
8429
+ };
8430
+ readonly featureName: {
8431
+ readonly type: "string";
8432
+ readonly description: "The feature flag name this safeguard applies to.";
8433
+ };
8434
+ readonly environment: {
8435
+ readonly type: "string";
8436
+ readonly description: "The environment this safeguard applies to.";
8437
+ };
8438
+ readonly project: {
8439
+ readonly type: "string";
8440
+ readonly description: "The project this safeguard applies to.";
8441
+ };
8442
+ };
8443
+ };
8444
+ readonly triggerCondition: {
8445
+ readonly $ref: "#/components/schemas/safeguardTriggerConditionSchema";
8446
+ readonly description: "The condition that triggers the safeguard.";
8447
+ };
8448
+ readonly impactMetric: {
8449
+ readonly type: "object";
8450
+ readonly required: readonly ["id", "metricName", "timeRange", "aggregationMode", "labelSelectors"];
8451
+ readonly additionalProperties: false;
8452
+ readonly properties: {
8453
+ readonly metricName: {
8454
+ readonly type: "string";
8455
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
8456
+ readonly example: "unleash_counter_feature_toggle_usage_total";
8457
+ };
8458
+ readonly timeRange: {
8459
+ readonly type: "string";
8460
+ readonly enum: readonly ["hour", "day", "week", "month"];
8461
+ readonly description: "The time range for the metric data.";
8462
+ readonly example: "day";
8463
+ };
8464
+ readonly aggregationMode: {
8465
+ readonly type: "string";
8466
+ readonly description: "The aggregation mode for the metric data.";
8467
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
8468
+ readonly example: "rps";
8469
+ };
8470
+ readonly labelSelectors: {
8471
+ readonly type: "object";
8472
+ readonly additionalProperties: {
8473
+ readonly type: "array";
8474
+ readonly items: {
8475
+ readonly type: "string";
8476
+ };
8477
+ };
8478
+ readonly description: "The selected labels and their values for filtering the metric data.";
8479
+ readonly example: {
8480
+ readonly environment: readonly ["development"];
8481
+ readonly project: readonly ["default"];
8482
+ };
8483
+ };
8484
+ readonly source: {
8485
+ readonly type: "string";
8486
+ readonly enum: readonly ["internal", "external"];
8487
+ 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.";
8488
+ readonly example: "internal";
8489
+ };
8490
+ readonly id: {
8491
+ readonly type: "string";
8492
+ readonly description: "The unique identifier for this impact metric";
8493
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
8494
+ };
8495
+ };
8496
+ readonly description: "The metric configuration used to evaluate the safeguard condition.";
8497
+ };
8498
+ };
8499
+ readonly components: {
8500
+ readonly schemas: {
8501
+ readonly metricQuerySchema: {
8502
+ readonly $id: "#/components/schemas/metricQuerySchema";
8503
+ readonly type: "object";
8504
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
8505
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
8506
+ readonly additionalProperties: false;
8507
+ readonly properties: {
8508
+ readonly metricName: {
8509
+ readonly type: "string";
8510
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
8511
+ readonly example: "unleash_counter_feature_toggle_usage_total";
8512
+ };
8513
+ readonly timeRange: {
8514
+ readonly type: "string";
8515
+ readonly enum: readonly ["hour", "day", "week", "month"];
8516
+ readonly description: "The time range for the metric data.";
8517
+ readonly example: "day";
8518
+ };
8519
+ readonly aggregationMode: {
8520
+ readonly type: "string";
8521
+ readonly description: "The aggregation mode for the metric data.";
8522
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
8523
+ readonly example: "rps";
8524
+ };
8525
+ readonly labelSelectors: {
8526
+ readonly type: "object";
8527
+ readonly additionalProperties: {
8528
+ readonly type: "array";
8529
+ readonly items: {
8530
+ readonly type: "string";
8531
+ };
8532
+ };
8533
+ readonly description: "The selected labels and their values for filtering the metric data.";
8534
+ readonly example: {
8535
+ readonly environment: readonly ["development"];
8536
+ readonly project: readonly ["default"];
8537
+ };
8538
+ };
8539
+ readonly source: {
8540
+ readonly type: "string";
8541
+ readonly enum: readonly ["internal", "external"];
8542
+ 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.";
8543
+ readonly example: "internal";
8544
+ };
8545
+ };
8546
+ readonly components: {};
8547
+ };
8548
+ readonly safeguardTriggerConditionSchema: {
8549
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
8550
+ readonly type: "object";
8551
+ readonly required: readonly ["operator", "threshold"];
8552
+ readonly additionalProperties: false;
8553
+ readonly description: "The condition that triggers the safeguard.";
8554
+ readonly properties: {
8555
+ readonly operator: {
8556
+ readonly type: "string";
8557
+ readonly enum: readonly [">", "<"];
8558
+ readonly description: "The comparison operator for the threshold check.";
8559
+ readonly example: ">";
8560
+ };
8561
+ readonly threshold: {
8562
+ readonly type: "number";
8563
+ readonly description: "The threshold value to compare against.";
8564
+ readonly example: 100;
8565
+ };
8566
+ };
8567
+ readonly components: {};
8568
+ };
8569
+ };
8570
+ };
8571
+ };
8572
+ readonly metricQuerySchema: {
8573
+ readonly $id: "#/components/schemas/metricQuerySchema";
8574
+ readonly type: "object";
8575
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
8576
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
8577
+ readonly additionalProperties: false;
8578
+ readonly properties: {
8579
+ readonly metricName: {
8580
+ readonly type: "string";
8581
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
8582
+ readonly example: "unleash_counter_feature_toggle_usage_total";
8583
+ };
8584
+ readonly timeRange: {
8585
+ readonly type: "string";
8586
+ readonly enum: readonly ["hour", "day", "week", "month"];
8587
+ readonly description: "The time range for the metric data.";
8588
+ readonly example: "day";
8589
+ };
8590
+ readonly aggregationMode: {
8591
+ readonly type: "string";
8592
+ readonly description: "The aggregation mode for the metric data.";
8593
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
8594
+ readonly example: "rps";
8595
+ };
8596
+ readonly labelSelectors: {
8597
+ readonly type: "object";
8598
+ readonly additionalProperties: {
8146
8599
  readonly type: "array";
8147
8600
  readonly items: {
8148
8601
  readonly type: "string";
@@ -8154,6 +8607,12 @@ export declare const healthOverviewSchema: {
8154
8607
  readonly project: readonly ["default"];
8155
8608
  };
8156
8609
  };
8610
+ readonly source: {
8611
+ readonly type: "string";
8612
+ readonly enum: readonly ["internal", "external"];
8613
+ 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.";
8614
+ readonly example: "internal";
8615
+ };
8157
8616
  };
8158
8617
  readonly components: {};
8159
8618
  };
@@ -8280,6 +8739,13 @@ export declare const healthOverviewSchema: {
8280
8739
  readonly $ref: "#/components/schemas/releasePlanSchema";
8281
8740
  };
8282
8741
  };
8742
+ readonly safeguards: {
8743
+ readonly type: "array";
8744
+ readonly description: "Safeguards for this feature environment";
8745
+ readonly items: {
8746
+ readonly $ref: "#/components/schemas/featureEnvironmentSafeguardSchema";
8747
+ };
8748
+ };
8283
8749
  readonly yes: {
8284
8750
  readonly type: "integer";
8285
8751
  readonly description: "How many times the feature evaluated to true (enabled)";
@@ -8738,7 +9204,7 @@ export declare const healthOverviewSchema: {
8738
9204
  readonly type: "array";
8739
9205
  readonly description: "An array of safeguards configured for this release plan.";
8740
9206
  readonly items: {
8741
- readonly $ref: "#/components/schemas/safeguardSchema";
9207
+ readonly $ref: "#/components/schemas/releasePlanSafeguardSchema";
8742
9208
  };
8743
9209
  };
8744
9210
  };
@@ -8823,7 +9289,7 @@ export declare const healthOverviewSchema: {
8823
9289
  readonly additionalProperties: false;
8824
9290
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
8825
9291
  readonly type: "object";
8826
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
9292
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
8827
9293
  readonly properties: {
8828
9294
  readonly id: {
8829
9295
  readonly type: "string";
@@ -9492,7 +9958,7 @@ export declare const healthOverviewSchema: {
9492
9958
  readonly additionalProperties: false;
9493
9959
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
9494
9960
  readonly type: "object";
9495
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
9961
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
9496
9962
  readonly properties: {
9497
9963
  readonly id: {
9498
9964
  readonly type: "string";
@@ -10153,8 +10619,8 @@ export declare const healthOverviewSchema: {
10153
10619
  };
10154
10620
  readonly components: {};
10155
10621
  };
10156
- readonly safeguardSchema: {
10157
- readonly $id: "#/components/schemas/safeguardSchema";
10622
+ readonly releasePlanSafeguardSchema: {
10623
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
10158
10624
  readonly type: "object";
10159
10625
  readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
10160
10626
  readonly description: "A safeguard configuration for a release plan.";
@@ -10223,6 +10689,12 @@ export declare const healthOverviewSchema: {
10223
10689
  readonly project: readonly ["default"];
10224
10690
  };
10225
10691
  };
10692
+ readonly source: {
10693
+ readonly type: "string";
10694
+ readonly enum: readonly ["internal", "external"];
10695
+ 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.";
10696
+ readonly example: "internal";
10697
+ };
10226
10698
  readonly id: {
10227
10699
  readonly type: "string";
10228
10700
  readonly description: "The unique identifier for this impact metric";
@@ -10272,6 +10744,12 @@ export declare const healthOverviewSchema: {
10272
10744
  readonly project: readonly ["default"];
10273
10745
  };
10274
10746
  };
10747
+ readonly source: {
10748
+ readonly type: "string";
10749
+ readonly enum: readonly ["internal", "external"];
10750
+ 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.";
10751
+ readonly example: "internal";
10752
+ };
10275
10753
  };
10276
10754
  readonly components: {};
10277
10755
  };
@@ -10337,6 +10815,12 @@ export declare const healthOverviewSchema: {
10337
10815
  readonly project: readonly ["default"];
10338
10816
  };
10339
10817
  };
10818
+ readonly source: {
10819
+ readonly type: "string";
10820
+ readonly enum: readonly ["internal", "external"];
10821
+ 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.";
10822
+ readonly example: "internal";
10823
+ };
10340
10824
  };
10341
10825
  readonly components: {};
10342
10826
  };
@@ -10443,7 +10927,7 @@ export declare const healthOverviewSchema: {
10443
10927
  readonly additionalProperties: false;
10444
10928
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
10445
10929
  readonly type: "object";
10446
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
10930
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
10447
10931
  readonly properties: {
10448
10932
  readonly id: {
10449
10933
  readonly type: "string";
@@ -11112,7 +11596,7 @@ export declare const healthOverviewSchema: {
11112
11596
  readonly additionalProperties: false;
11113
11597
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
11114
11598
  readonly type: "object";
11115
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
11599
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
11116
11600
  readonly properties: {
11117
11601
  readonly id: {
11118
11602
  readonly type: "string";
@@ -11720,88 +12204,321 @@ export declare const healthOverviewSchema: {
11720
12204
  };
11721
12205
  readonly components: {};
11722
12206
  };
11723
- };
11724
- };
11725
- };
11726
- readonly overrideSchema: {
11727
- readonly $id: "#/components/schemas/overrideSchema";
11728
- readonly type: "object";
11729
- readonly additionalProperties: false;
11730
- readonly required: readonly ["contextName", "values"];
11731
- readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
11732
- readonly properties: {
11733
- readonly contextName: {
11734
- readonly description: "The name of the context field used to determine overrides";
11735
- readonly type: "string";
11736
- readonly example: "userId";
11737
- };
11738
- readonly values: {
11739
- readonly description: "Which values that should be overriden";
11740
- readonly type: "array";
11741
- readonly items: {
11742
- readonly type: "string";
11743
- };
11744
- readonly example: readonly ["red", "blue"];
11745
- };
11746
- };
11747
- readonly components: {};
11748
- };
11749
- readonly parametersSchema: {
11750
- readonly $id: "#/components/schemas/parametersSchema";
11751
- readonly type: "object";
11752
- readonly description: "A list of parameters for a strategy";
11753
- readonly additionalProperties: {
11754
- readonly type: "string";
11755
- };
11756
- readonly components: {};
11757
- };
11758
- readonly featureStrategySchema: {
11759
- readonly $id: "#/components/schemas/featureStrategySchema";
11760
- readonly description: "A single activation strategy configuration schema for a feature";
11761
- readonly type: "object";
11762
- readonly additionalProperties: false;
11763
- readonly required: readonly ["name"];
11764
- readonly properties: {
11765
- readonly id: {
11766
- readonly type: "string";
11767
- readonly description: "A uuid for the feature strategy";
11768
- readonly example: "6b5157cb-343a-41e7-bfa3-7b4ec3044840";
11769
- };
11770
- readonly name: {
11771
- readonly type: "string";
11772
- readonly description: "The name or type of strategy";
11773
- readonly example: "flexibleRollout";
11774
- };
11775
- readonly title: {
11776
- readonly type: "string";
11777
- readonly description: "A descriptive title for the strategy";
11778
- readonly example: "Gradual Rollout 25-Prod";
11779
- readonly nullable: true;
11780
- };
11781
- readonly disabled: {
11782
- readonly type: "boolean";
11783
- readonly description: "A toggle to disable the strategy. defaults to false. Disabled strategies are not evaluated or returned to the SDKs";
11784
- readonly example: false;
11785
- readonly nullable: true;
11786
- };
11787
- readonly featureName: {
11788
- readonly type: "string";
11789
- readonly description: "The name or feature the strategy is attached to";
11790
- readonly example: "myAwesomeFeature";
11791
- };
11792
- readonly sortOrder: {
11793
- readonly type: "number";
11794
- readonly description: "The order of the strategy in the list";
11795
- readonly example: 9999;
11796
- };
11797
- readonly segments: {
11798
- readonly type: "array";
11799
- readonly description: "A list of segment ids attached to the strategy";
11800
- readonly example: readonly [1, 2];
11801
- readonly items: {
11802
- readonly type: "number";
11803
- };
11804
- };
12207
+ readonly featureEnvironmentSafeguardSchema: {
12208
+ readonly $id: "#/components/schemas/featureEnvironmentSafeguardSchema";
12209
+ readonly type: "object";
12210
+ readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
12211
+ readonly description: "A safeguard configuration for a feature environment.";
12212
+ readonly additionalProperties: false;
12213
+ readonly properties: {
12214
+ readonly id: {
12215
+ readonly type: "string";
12216
+ readonly description: "The unique ULID identifier for this safeguard";
12217
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
12218
+ };
12219
+ readonly action: {
12220
+ readonly type: "object";
12221
+ readonly required: readonly ["type", "featureName", "environment", "project"];
12222
+ readonly additionalProperties: false;
12223
+ readonly description: "Disable a feature in an environment when triggered.";
12224
+ readonly properties: {
12225
+ readonly type: {
12226
+ readonly type: "string";
12227
+ readonly description: "The type of action to perform.";
12228
+ readonly example: "disableFeatureEnvironment";
12229
+ };
12230
+ readonly featureName: {
12231
+ readonly type: "string";
12232
+ readonly description: "The feature flag name this safeguard applies to.";
12233
+ };
12234
+ readonly environment: {
12235
+ readonly type: "string";
12236
+ readonly description: "The environment this safeguard applies to.";
12237
+ };
12238
+ readonly project: {
12239
+ readonly type: "string";
12240
+ readonly description: "The project this safeguard applies to.";
12241
+ };
12242
+ };
12243
+ };
12244
+ readonly triggerCondition: {
12245
+ readonly $ref: "#/components/schemas/safeguardTriggerConditionSchema";
12246
+ readonly description: "The condition that triggers the safeguard.";
12247
+ };
12248
+ readonly impactMetric: {
12249
+ readonly type: "object";
12250
+ readonly required: readonly ["id", "metricName", "timeRange", "aggregationMode", "labelSelectors"];
12251
+ readonly additionalProperties: false;
12252
+ readonly properties: {
12253
+ readonly metricName: {
12254
+ readonly type: "string";
12255
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
12256
+ readonly example: "unleash_counter_feature_toggle_usage_total";
12257
+ };
12258
+ readonly timeRange: {
12259
+ readonly type: "string";
12260
+ readonly enum: readonly ["hour", "day", "week", "month"];
12261
+ readonly description: "The time range for the metric data.";
12262
+ readonly example: "day";
12263
+ };
12264
+ readonly aggregationMode: {
12265
+ readonly type: "string";
12266
+ readonly description: "The aggregation mode for the metric data.";
12267
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
12268
+ readonly example: "rps";
12269
+ };
12270
+ readonly labelSelectors: {
12271
+ readonly type: "object";
12272
+ readonly additionalProperties: {
12273
+ readonly type: "array";
12274
+ readonly items: {
12275
+ readonly type: "string";
12276
+ };
12277
+ };
12278
+ readonly description: "The selected labels and their values for filtering the metric data.";
12279
+ readonly example: {
12280
+ readonly environment: readonly ["development"];
12281
+ readonly project: readonly ["default"];
12282
+ };
12283
+ };
12284
+ readonly source: {
12285
+ readonly type: "string";
12286
+ readonly enum: readonly ["internal", "external"];
12287
+ 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.";
12288
+ readonly example: "internal";
12289
+ };
12290
+ readonly id: {
12291
+ readonly type: "string";
12292
+ readonly description: "The unique identifier for this impact metric";
12293
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
12294
+ };
12295
+ };
12296
+ readonly description: "The metric configuration used to evaluate the safeguard condition.";
12297
+ };
12298
+ };
12299
+ readonly components: {
12300
+ readonly schemas: {
12301
+ readonly metricQuerySchema: {
12302
+ readonly $id: "#/components/schemas/metricQuerySchema";
12303
+ readonly type: "object";
12304
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
12305
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
12306
+ readonly additionalProperties: false;
12307
+ readonly properties: {
12308
+ readonly metricName: {
12309
+ readonly type: "string";
12310
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
12311
+ readonly example: "unleash_counter_feature_toggle_usage_total";
12312
+ };
12313
+ readonly timeRange: {
12314
+ readonly type: "string";
12315
+ readonly enum: readonly ["hour", "day", "week", "month"];
12316
+ readonly description: "The time range for the metric data.";
12317
+ readonly example: "day";
12318
+ };
12319
+ readonly aggregationMode: {
12320
+ readonly type: "string";
12321
+ readonly description: "The aggregation mode for the metric data.";
12322
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
12323
+ readonly example: "rps";
12324
+ };
12325
+ readonly labelSelectors: {
12326
+ readonly type: "object";
12327
+ readonly additionalProperties: {
12328
+ readonly type: "array";
12329
+ readonly items: {
12330
+ readonly type: "string";
12331
+ };
12332
+ };
12333
+ readonly description: "The selected labels and their values for filtering the metric data.";
12334
+ readonly example: {
12335
+ readonly environment: readonly ["development"];
12336
+ readonly project: readonly ["default"];
12337
+ };
12338
+ };
12339
+ readonly source: {
12340
+ readonly type: "string";
12341
+ readonly enum: readonly ["internal", "external"];
12342
+ 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.";
12343
+ readonly example: "internal";
12344
+ };
12345
+ };
12346
+ readonly components: {};
12347
+ };
12348
+ readonly safeguardTriggerConditionSchema: {
12349
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
12350
+ readonly type: "object";
12351
+ readonly required: readonly ["operator", "threshold"];
12352
+ readonly additionalProperties: false;
12353
+ readonly description: "The condition that triggers the safeguard.";
12354
+ readonly properties: {
12355
+ readonly operator: {
12356
+ readonly type: "string";
12357
+ readonly enum: readonly [">", "<"];
12358
+ readonly description: "The comparison operator for the threshold check.";
12359
+ readonly example: ">";
12360
+ };
12361
+ readonly threshold: {
12362
+ readonly type: "number";
12363
+ readonly description: "The threshold value to compare against.";
12364
+ readonly example: 100;
12365
+ };
12366
+ };
12367
+ readonly components: {};
12368
+ };
12369
+ };
12370
+ };
12371
+ };
12372
+ readonly safeguardTriggerConditionSchema: {
12373
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
12374
+ readonly type: "object";
12375
+ readonly required: readonly ["operator", "threshold"];
12376
+ readonly additionalProperties: false;
12377
+ readonly description: "The condition that triggers the safeguard.";
12378
+ readonly properties: {
12379
+ readonly operator: {
12380
+ readonly type: "string";
12381
+ readonly enum: readonly [">", "<"];
12382
+ readonly description: "The comparison operator for the threshold check.";
12383
+ readonly example: ">";
12384
+ };
12385
+ readonly threshold: {
12386
+ readonly type: "number";
12387
+ readonly description: "The threshold value to compare against.";
12388
+ readonly example: 100;
12389
+ };
12390
+ };
12391
+ readonly components: {};
12392
+ };
12393
+ readonly metricQuerySchema: {
12394
+ readonly $id: "#/components/schemas/metricQuerySchema";
12395
+ readonly type: "object";
12396
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
12397
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
12398
+ readonly additionalProperties: false;
12399
+ readonly properties: {
12400
+ readonly metricName: {
12401
+ readonly type: "string";
12402
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
12403
+ readonly example: "unleash_counter_feature_toggle_usage_total";
12404
+ };
12405
+ readonly timeRange: {
12406
+ readonly type: "string";
12407
+ readonly enum: readonly ["hour", "day", "week", "month"];
12408
+ readonly description: "The time range for the metric data.";
12409
+ readonly example: "day";
12410
+ };
12411
+ readonly aggregationMode: {
12412
+ readonly type: "string";
12413
+ readonly description: "The aggregation mode for the metric data.";
12414
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
12415
+ readonly example: "rps";
12416
+ };
12417
+ readonly labelSelectors: {
12418
+ readonly type: "object";
12419
+ readonly additionalProperties: {
12420
+ readonly type: "array";
12421
+ readonly items: {
12422
+ readonly type: "string";
12423
+ };
12424
+ };
12425
+ readonly description: "The selected labels and their values for filtering the metric data.";
12426
+ readonly example: {
12427
+ readonly environment: readonly ["development"];
12428
+ readonly project: readonly ["default"];
12429
+ };
12430
+ };
12431
+ readonly source: {
12432
+ readonly type: "string";
12433
+ readonly enum: readonly ["internal", "external"];
12434
+ 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.";
12435
+ readonly example: "internal";
12436
+ };
12437
+ };
12438
+ readonly components: {};
12439
+ };
12440
+ };
12441
+ };
12442
+ };
12443
+ readonly overrideSchema: {
12444
+ readonly $id: "#/components/schemas/overrideSchema";
12445
+ readonly type: "object";
12446
+ readonly additionalProperties: false;
12447
+ readonly required: readonly ["contextName", "values"];
12448
+ readonly description: "An override for deciding which variant should be assigned to a user based on the context name";
12449
+ readonly properties: {
12450
+ readonly contextName: {
12451
+ readonly description: "The name of the context field used to determine overrides";
12452
+ readonly type: "string";
12453
+ readonly example: "userId";
12454
+ };
12455
+ readonly values: {
12456
+ readonly description: "Which values that should be overriden";
12457
+ readonly type: "array";
12458
+ readonly items: {
12459
+ readonly type: "string";
12460
+ };
12461
+ readonly example: readonly ["red", "blue"];
12462
+ };
12463
+ };
12464
+ readonly components: {};
12465
+ };
12466
+ readonly parametersSchema: {
12467
+ readonly $id: "#/components/schemas/parametersSchema";
12468
+ readonly type: "object";
12469
+ readonly description: "A list of parameters for a strategy";
12470
+ readonly additionalProperties: {
12471
+ readonly type: "string";
12472
+ };
12473
+ readonly components: {};
12474
+ };
12475
+ readonly featureStrategySchema: {
12476
+ readonly $id: "#/components/schemas/featureStrategySchema";
12477
+ readonly description: "A single activation strategy configuration schema for a feature";
12478
+ readonly type: "object";
12479
+ readonly additionalProperties: false;
12480
+ readonly required: readonly ["name"];
12481
+ readonly properties: {
12482
+ readonly id: {
12483
+ readonly type: "string";
12484
+ readonly description: "A uuid for the feature strategy";
12485
+ readonly example: "6b5157cb-343a-41e7-bfa3-7b4ec3044840";
12486
+ };
12487
+ readonly name: {
12488
+ readonly type: "string";
12489
+ readonly description: "The name or type of strategy";
12490
+ readonly example: "flexibleRollout";
12491
+ };
12492
+ readonly title: {
12493
+ readonly type: "string";
12494
+ readonly description: "A descriptive title for the strategy";
12495
+ readonly example: "Gradual Rollout 25-Prod";
12496
+ readonly nullable: true;
12497
+ };
12498
+ readonly disabled: {
12499
+ readonly type: "boolean";
12500
+ readonly description: "A toggle to disable the strategy. defaults to false. Disabled strategies are not evaluated or returned to the SDKs";
12501
+ readonly example: false;
12502
+ readonly nullable: true;
12503
+ };
12504
+ readonly featureName: {
12505
+ readonly type: "string";
12506
+ readonly description: "The name or feature the strategy is attached to";
12507
+ readonly example: "myAwesomeFeature";
12508
+ };
12509
+ readonly sortOrder: {
12510
+ readonly type: "number";
12511
+ readonly description: "The order of the strategy in the list";
12512
+ readonly example: 9999;
12513
+ };
12514
+ readonly segments: {
12515
+ readonly type: "array";
12516
+ readonly description: "A list of segment ids attached to the strategy";
12517
+ readonly example: readonly [1, 2];
12518
+ readonly items: {
12519
+ readonly type: "number";
12520
+ };
12521
+ };
11805
12522
  readonly constraints: {
11806
12523
  readonly type: "array";
11807
12524
  readonly description: "A list of the constraints attached to the strategy. See https://docs.getunleash.io/concepts/activation-strategies#constraints";
@@ -12007,7 +12724,7 @@ export declare const healthOverviewSchema: {
12007
12724
  readonly type: "array";
12008
12725
  readonly description: "An array of safeguards configured for this release plan.";
12009
12726
  readonly items: {
12010
- readonly $ref: "#/components/schemas/safeguardSchema";
12727
+ readonly $ref: "#/components/schemas/releasePlanSafeguardSchema";
12011
12728
  };
12012
12729
  };
12013
12730
  };
@@ -12092,7 +12809,7 @@ export declare const healthOverviewSchema: {
12092
12809
  readonly additionalProperties: false;
12093
12810
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
12094
12811
  readonly type: "object";
12095
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
12812
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
12096
12813
  readonly properties: {
12097
12814
  readonly id: {
12098
12815
  readonly type: "string";
@@ -12761,7 +13478,7 @@ export declare const healthOverviewSchema: {
12761
13478
  readonly additionalProperties: false;
12762
13479
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
12763
13480
  readonly type: "object";
12764
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
13481
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
12765
13482
  readonly properties: {
12766
13483
  readonly id: {
12767
13484
  readonly type: "string";
@@ -13422,8 +14139,8 @@ export declare const healthOverviewSchema: {
13422
14139
  };
13423
14140
  readonly components: {};
13424
14141
  };
13425
- readonly safeguardSchema: {
13426
- readonly $id: "#/components/schemas/safeguardSchema";
14142
+ readonly releasePlanSafeguardSchema: {
14143
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
13427
14144
  readonly type: "object";
13428
14145
  readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
13429
14146
  readonly description: "A safeguard configuration for a release plan.";
@@ -13492,6 +14209,12 @@ export declare const healthOverviewSchema: {
13492
14209
  readonly project: readonly ["default"];
13493
14210
  };
13494
14211
  };
14212
+ readonly source: {
14213
+ readonly type: "string";
14214
+ readonly enum: readonly ["internal", "external"];
14215
+ 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.";
14216
+ readonly example: "internal";
14217
+ };
13495
14218
  readonly id: {
13496
14219
  readonly type: "string";
13497
14220
  readonly description: "The unique identifier for this impact metric";
@@ -13541,6 +14264,12 @@ export declare const healthOverviewSchema: {
13541
14264
  readonly project: readonly ["default"];
13542
14265
  };
13543
14266
  };
14267
+ readonly source: {
14268
+ readonly type: "string";
14269
+ readonly enum: readonly ["internal", "external"];
14270
+ 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.";
14271
+ readonly example: "internal";
14272
+ };
13544
14273
  };
13545
14274
  readonly components: {};
13546
14275
  };
@@ -13606,6 +14335,12 @@ export declare const healthOverviewSchema: {
13606
14335
  readonly project: readonly ["default"];
13607
14336
  };
13608
14337
  };
14338
+ readonly source: {
14339
+ readonly type: "string";
14340
+ readonly enum: readonly ["internal", "external"];
14341
+ 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.";
14342
+ readonly example: "internal";
14343
+ };
13609
14344
  };
13610
14345
  readonly components: {};
13611
14346
  };
@@ -13712,7 +14447,7 @@ export declare const healthOverviewSchema: {
13712
14447
  readonly additionalProperties: false;
13713
14448
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
13714
14449
  readonly type: "object";
13715
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
14450
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
13716
14451
  readonly properties: {
13717
14452
  readonly id: {
13718
14453
  readonly type: "string";
@@ -14381,7 +15116,7 @@ export declare const healthOverviewSchema: {
14381
15116
  readonly additionalProperties: false;
14382
15117
  readonly description: "Schema representing the creation of a release plan milestone strategy.";
14383
15118
  readonly type: "object";
14384
- readonly required: readonly ["id", "milestoneId", "sortOrder", "strategyName"];
15119
+ readonly required: readonly ["id", "milestoneId", "sortOrder", "name", "strategyName"];
14385
15120
  readonly properties: {
14386
15121
  readonly id: {
14387
15122
  readonly type: "string";
@@ -14638,126 +15373,517 @@ export declare const healthOverviewSchema: {
14638
15373
  };
14639
15374
  };
14640
15375
  };
14641
- };
14642
- readonly parametersSchema: {
14643
- readonly $id: "#/components/schemas/parametersSchema";
14644
- readonly type: "object";
14645
- readonly description: "A list of parameters for a strategy";
14646
- readonly additionalProperties: {
15376
+ };
15377
+ readonly parametersSchema: {
15378
+ readonly $id: "#/components/schemas/parametersSchema";
15379
+ readonly type: "object";
15380
+ readonly description: "A list of parameters for a strategy";
15381
+ readonly additionalProperties: {
15382
+ readonly type: "string";
15383
+ };
15384
+ readonly components: {};
15385
+ };
15386
+ readonly constraintSchema: {
15387
+ readonly type: "object";
15388
+ readonly required: readonly ["contextName", "operator"];
15389
+ readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/concepts/activation-strategies#constraints)";
15390
+ readonly properties: {
15391
+ readonly contextName: {
15392
+ readonly description: "The name of the context field that this constraint should apply to.";
15393
+ readonly example: "appName";
15394
+ readonly type: "string";
15395
+ };
15396
+ readonly operator: {
15397
+ 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).";
15398
+ readonly type: "string";
15399
+ 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"];
15400
+ readonly example: "IN";
15401
+ };
15402
+ readonly caseInsensitive: {
15403
+ readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
15404
+ readonly type: "boolean";
15405
+ readonly default: false;
15406
+ };
15407
+ readonly inverted: {
15408
+ readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
15409
+ readonly type: "boolean";
15410
+ readonly default: false;
15411
+ };
15412
+ readonly values: {
15413
+ readonly type: "array";
15414
+ readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
15415
+ readonly items: {
15416
+ readonly type: "string";
15417
+ };
15418
+ readonly example: readonly ["my-app", "my-other-app"];
15419
+ };
15420
+ readonly value: {
15421
+ 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.";
15422
+ readonly type: "string";
15423
+ readonly example: "my-app";
15424
+ };
15425
+ };
15426
+ readonly components: {};
15427
+ readonly $id: "#/components/schemas/constraintSchema";
15428
+ readonly additionalProperties: false;
15429
+ };
15430
+ readonly createStrategyVariantSchema: {
15431
+ readonly $id: "#/components/schemas/createStrategyVariantSchema";
15432
+ readonly type: "object";
15433
+ 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.";
15434
+ readonly required: readonly ["name", "weight", "weightType", "stickiness"];
15435
+ readonly properties: {
15436
+ readonly name: {
15437
+ readonly type: "string";
15438
+ readonly description: "The variant name. Must be unique for this feature flag";
15439
+ readonly example: "blue_group";
15440
+ };
15441
+ readonly weight: {
15442
+ readonly type: "integer";
15443
+ 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";
15444
+ readonly minimum: 0;
15445
+ readonly maximum: 1000;
15446
+ };
15447
+ readonly weightType: {
15448
+ 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).";
15449
+ readonly type: "string";
15450
+ readonly example: "fix";
15451
+ readonly enum: readonly ["variable", "fix"];
15452
+ };
15453
+ readonly stickiness: {
15454
+ readonly type: "string";
15455
+ 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";
15456
+ readonly example: "custom.context.field";
15457
+ };
15458
+ readonly payload: {
15459
+ readonly type: "object";
15460
+ readonly required: readonly ["type", "value"];
15461
+ readonly description: "Extra data configured for this variant";
15462
+ readonly properties: {
15463
+ readonly type: {
15464
+ readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
15465
+ readonly type: "string";
15466
+ readonly enum: readonly ["json", "csv", "string", "number"];
15467
+ };
15468
+ readonly value: {
15469
+ readonly description: "The actual value of payload";
15470
+ readonly type: "string";
15471
+ };
15472
+ };
15473
+ readonly example: {
15474
+ readonly type: "json";
15475
+ readonly value: "{\"color\": \"red\"}";
15476
+ };
15477
+ };
15478
+ };
15479
+ readonly components: {};
15480
+ };
15481
+ };
15482
+ };
15483
+ };
15484
+ readonly transitionConditionSchema: {
15485
+ readonly $id: "#/components/schemas/transitionConditionSchema";
15486
+ readonly type: "object";
15487
+ readonly additionalProperties: false;
15488
+ readonly required: readonly ["intervalMinutes"];
15489
+ readonly description: "A transition condition for milestone progression";
15490
+ readonly properties: {
15491
+ readonly intervalMinutes: {
15492
+ readonly type: "integer";
15493
+ readonly minimum: 1;
15494
+ readonly description: "The interval in minutes before transitioning";
15495
+ readonly example: 30;
15496
+ };
15497
+ };
15498
+ readonly components: {};
15499
+ };
15500
+ readonly releasePlanSafeguardSchema: {
15501
+ readonly $id: "#/components/schemas/releasePlanSafeguardSchema";
15502
+ readonly type: "object";
15503
+ readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
15504
+ readonly description: "A safeguard configuration for a release plan.";
15505
+ readonly additionalProperties: false;
15506
+ readonly properties: {
15507
+ readonly id: {
15508
+ readonly type: "string";
15509
+ readonly description: "The unique ULID identifier for this safeguard";
15510
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
15511
+ };
15512
+ readonly action: {
15513
+ readonly type: "object";
15514
+ readonly required: readonly ["type", "id"];
15515
+ readonly additionalProperties: false;
15516
+ readonly description: "The action to take when the safeguard is triggered.";
15517
+ readonly properties: {
15518
+ readonly type: {
15519
+ readonly type: "string";
15520
+ readonly description: "The type of action to perform.";
15521
+ readonly example: "pauseReleasePlanProgressions";
15522
+ };
15523
+ readonly id: {
15524
+ readonly type: "string";
15525
+ readonly description: "The ID of the release plan this safeguard applies to.";
15526
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW2";
15527
+ };
15528
+ };
15529
+ };
15530
+ readonly triggerCondition: {
15531
+ readonly $ref: "#/components/schemas/safeguardTriggerConditionSchema";
15532
+ readonly description: "The condition that triggers the safeguard.";
15533
+ };
15534
+ readonly impactMetric: {
15535
+ readonly type: "object";
15536
+ readonly required: readonly ["id", "metricName", "timeRange", "aggregationMode", "labelSelectors"];
15537
+ readonly additionalProperties: false;
15538
+ readonly properties: {
15539
+ readonly metricName: {
15540
+ readonly type: "string";
15541
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
15542
+ readonly example: "unleash_counter_feature_toggle_usage_total";
15543
+ };
15544
+ readonly timeRange: {
15545
+ readonly type: "string";
15546
+ readonly enum: readonly ["hour", "day", "week", "month"];
15547
+ readonly description: "The time range for the metric data.";
15548
+ readonly example: "day";
15549
+ };
15550
+ readonly aggregationMode: {
15551
+ readonly type: "string";
15552
+ readonly description: "The aggregation mode for the metric data.";
15553
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
15554
+ readonly example: "rps";
15555
+ };
15556
+ readonly labelSelectors: {
15557
+ readonly type: "object";
15558
+ readonly additionalProperties: {
15559
+ readonly type: "array";
15560
+ readonly items: {
15561
+ readonly type: "string";
15562
+ };
15563
+ };
15564
+ readonly description: "The selected labels and their values for filtering the metric data.";
15565
+ readonly example: {
15566
+ readonly environment: readonly ["development"];
15567
+ readonly project: readonly ["default"];
15568
+ };
15569
+ };
15570
+ readonly source: {
14647
15571
  readonly type: "string";
15572
+ readonly enum: readonly ["internal", "external"];
15573
+ 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.";
15574
+ readonly example: "internal";
15575
+ };
15576
+ readonly id: {
15577
+ readonly type: "string";
15578
+ readonly description: "The unique identifier for this impact metric";
15579
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
14648
15580
  };
14649
- readonly components: {};
14650
15581
  };
14651
- readonly constraintSchema: {
15582
+ readonly description: "The metric configuration used to evaluate the safeguard condition.";
15583
+ };
15584
+ };
15585
+ readonly components: {
15586
+ readonly schemas: {
15587
+ readonly metricQuerySchema: {
15588
+ readonly $id: "#/components/schemas/metricQuerySchema";
14652
15589
  readonly type: "object";
14653
- readonly required: readonly ["contextName", "operator"];
14654
- readonly description: "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/concepts/activation-strategies#constraints)";
15590
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
15591
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
15592
+ readonly additionalProperties: false;
14655
15593
  readonly properties: {
14656
- readonly contextName: {
14657
- readonly description: "The name of the context field that this constraint should apply to.";
14658
- readonly example: "appName";
15594
+ readonly metricName: {
14659
15595
  readonly type: "string";
15596
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
15597
+ readonly example: "unleash_counter_feature_toggle_usage_total";
14660
15598
  };
14661
- readonly operator: {
14662
- 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).";
15599
+ readonly timeRange: {
14663
15600
  readonly type: "string";
14664
- 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"];
14665
- readonly example: "IN";
15601
+ readonly enum: readonly ["hour", "day", "week", "month"];
15602
+ readonly description: "The time range for the metric data.";
15603
+ readonly example: "day";
14666
15604
  };
14667
- readonly caseInsensitive: {
14668
- readonly description: "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).";
14669
- readonly type: "boolean";
14670
- readonly default: false;
15605
+ readonly aggregationMode: {
15606
+ readonly type: "string";
15607
+ readonly description: "The aggregation mode for the metric data.";
15608
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
15609
+ readonly example: "rps";
14671
15610
  };
14672
- readonly inverted: {
14673
- readonly description: "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.";
14674
- readonly type: "boolean";
14675
- readonly default: false;
15611
+ readonly labelSelectors: {
15612
+ readonly type: "object";
15613
+ readonly additionalProperties: {
15614
+ readonly type: "array";
15615
+ readonly items: {
15616
+ readonly type: "string";
15617
+ };
15618
+ };
15619
+ readonly description: "The selected labels and their values for filtering the metric data.";
15620
+ readonly example: {
15621
+ readonly environment: readonly ["development"];
15622
+ readonly project: readonly ["default"];
15623
+ };
14676
15624
  };
14677
- readonly values: {
15625
+ readonly source: {
15626
+ readonly type: "string";
15627
+ readonly enum: readonly ["internal", "external"];
15628
+ 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.";
15629
+ readonly example: "internal";
15630
+ };
15631
+ };
15632
+ readonly components: {};
15633
+ };
15634
+ readonly safeguardTriggerConditionSchema: {
15635
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
15636
+ readonly type: "object";
15637
+ readonly required: readonly ["operator", "threshold"];
15638
+ readonly additionalProperties: false;
15639
+ readonly description: "The condition that triggers the safeguard.";
15640
+ readonly properties: {
15641
+ readonly operator: {
15642
+ readonly type: "string";
15643
+ readonly enum: readonly [">", "<"];
15644
+ readonly description: "The comparison operator for the threshold check.";
15645
+ readonly example: ">";
15646
+ };
15647
+ readonly threshold: {
15648
+ readonly type: "number";
15649
+ readonly description: "The threshold value to compare against.";
15650
+ readonly example: 100;
15651
+ };
15652
+ };
15653
+ readonly components: {};
15654
+ };
15655
+ };
15656
+ };
15657
+ };
15658
+ readonly featureEnvironmentSafeguardSchema: {
15659
+ readonly $id: "#/components/schemas/featureEnvironmentSafeguardSchema";
15660
+ readonly type: "object";
15661
+ readonly required: readonly ["id", "action", "triggerCondition", "impactMetric"];
15662
+ readonly description: "A safeguard configuration for a feature environment.";
15663
+ readonly additionalProperties: false;
15664
+ readonly properties: {
15665
+ readonly id: {
15666
+ readonly type: "string";
15667
+ readonly description: "The unique ULID identifier for this safeguard";
15668
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
15669
+ };
15670
+ readonly action: {
15671
+ readonly type: "object";
15672
+ readonly required: readonly ["type", "featureName", "environment", "project"];
15673
+ readonly additionalProperties: false;
15674
+ readonly description: "Disable a feature in an environment when triggered.";
15675
+ readonly properties: {
15676
+ readonly type: {
15677
+ readonly type: "string";
15678
+ readonly description: "The type of action to perform.";
15679
+ readonly example: "disableFeatureEnvironment";
15680
+ };
15681
+ readonly featureName: {
15682
+ readonly type: "string";
15683
+ readonly description: "The feature flag name this safeguard applies to.";
15684
+ };
15685
+ readonly environment: {
15686
+ readonly type: "string";
15687
+ readonly description: "The environment this safeguard applies to.";
15688
+ };
15689
+ readonly project: {
15690
+ readonly type: "string";
15691
+ readonly description: "The project this safeguard applies to.";
15692
+ };
15693
+ };
15694
+ };
15695
+ readonly triggerCondition: {
15696
+ readonly $ref: "#/components/schemas/safeguardTriggerConditionSchema";
15697
+ readonly description: "The condition that triggers the safeguard.";
15698
+ };
15699
+ readonly impactMetric: {
15700
+ readonly type: "object";
15701
+ readonly required: readonly ["id", "metricName", "timeRange", "aggregationMode", "labelSelectors"];
15702
+ readonly additionalProperties: false;
15703
+ readonly properties: {
15704
+ readonly metricName: {
15705
+ readonly type: "string";
15706
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
15707
+ readonly example: "unleash_counter_feature_toggle_usage_total";
15708
+ };
15709
+ readonly timeRange: {
15710
+ readonly type: "string";
15711
+ readonly enum: readonly ["hour", "day", "week", "month"];
15712
+ readonly description: "The time range for the metric data.";
15713
+ readonly example: "day";
15714
+ };
15715
+ readonly aggregationMode: {
15716
+ readonly type: "string";
15717
+ readonly description: "The aggregation mode for the metric data.";
15718
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
15719
+ readonly example: "rps";
15720
+ };
15721
+ readonly labelSelectors: {
15722
+ readonly type: "object";
15723
+ readonly additionalProperties: {
14678
15724
  readonly type: "array";
14679
- readonly description: "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.";
14680
15725
  readonly items: {
14681
15726
  readonly type: "string";
14682
15727
  };
14683
- readonly example: readonly ["my-app", "my-other-app"];
14684
15728
  };
14685
- readonly value: {
14686
- 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.";
14687
- readonly type: "string";
14688
- readonly example: "my-app";
15729
+ readonly description: "The selected labels and their values for filtering the metric data.";
15730
+ readonly example: {
15731
+ readonly environment: readonly ["development"];
15732
+ readonly project: readonly ["default"];
14689
15733
  };
14690
15734
  };
14691
- readonly components: {};
14692
- readonly $id: "#/components/schemas/constraintSchema";
14693
- readonly additionalProperties: false;
15735
+ readonly source: {
15736
+ readonly type: "string";
15737
+ readonly enum: readonly ["internal", "external"];
15738
+ 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.";
15739
+ readonly example: "internal";
15740
+ };
15741
+ readonly id: {
15742
+ readonly type: "string";
15743
+ readonly description: "The unique identifier for this impact metric";
15744
+ readonly example: "01JB9GGTGQYEQ9D40R17T3YVW1";
15745
+ };
14694
15746
  };
14695
- readonly createStrategyVariantSchema: {
14696
- readonly $id: "#/components/schemas/createStrategyVariantSchema";
15747
+ readonly description: "The metric configuration used to evaluate the safeguard condition.";
15748
+ };
15749
+ };
15750
+ readonly components: {
15751
+ readonly schemas: {
15752
+ readonly metricQuerySchema: {
15753
+ readonly $id: "#/components/schemas/metricQuerySchema";
14697
15754
  readonly type: "object";
14698
- 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.";
14699
- readonly required: readonly ["name", "weight", "weightType", "stickiness"];
15755
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
15756
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
15757
+ readonly additionalProperties: false;
14700
15758
  readonly properties: {
14701
- readonly name: {
15759
+ readonly metricName: {
14702
15760
  readonly type: "string";
14703
- readonly description: "The variant name. Must be unique for this feature flag";
14704
- readonly example: "blue_group";
14705
- };
14706
- readonly weight: {
14707
- readonly type: "integer";
14708
- 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";
14709
- readonly minimum: 0;
14710
- readonly maximum: 1000;
15761
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
15762
+ readonly example: "unleash_counter_feature_toggle_usage_total";
14711
15763
  };
14712
- readonly weightType: {
14713
- 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).";
15764
+ readonly timeRange: {
14714
15765
  readonly type: "string";
14715
- readonly example: "fix";
14716
- readonly enum: readonly ["variable", "fix"];
15766
+ readonly enum: readonly ["hour", "day", "week", "month"];
15767
+ readonly description: "The time range for the metric data.";
15768
+ readonly example: "day";
14717
15769
  };
14718
- readonly stickiness: {
15770
+ readonly aggregationMode: {
14719
15771
  readonly type: "string";
14720
- 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";
14721
- readonly example: "custom.context.field";
15772
+ readonly description: "The aggregation mode for the metric data.";
15773
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
15774
+ readonly example: "rps";
14722
15775
  };
14723
- readonly payload: {
15776
+ readonly labelSelectors: {
14724
15777
  readonly type: "object";
14725
- readonly required: readonly ["type", "value"];
14726
- readonly description: "Extra data configured for this variant";
14727
- readonly properties: {
14728
- readonly type: {
14729
- readonly description: "The type of the value. Commonly used types are string, number, json and csv.";
14730
- readonly type: "string";
14731
- readonly enum: readonly ["json", "csv", "string", "number"];
14732
- };
14733
- readonly value: {
14734
- readonly description: "The actual value of payload";
15778
+ readonly additionalProperties: {
15779
+ readonly type: "array";
15780
+ readonly items: {
14735
15781
  readonly type: "string";
14736
15782
  };
14737
15783
  };
15784
+ readonly description: "The selected labels and their values for filtering the metric data.";
14738
15785
  readonly example: {
14739
- readonly type: "json";
14740
- readonly value: "{\"color\": \"red\"}";
15786
+ readonly environment: readonly ["development"];
15787
+ readonly project: readonly ["default"];
14741
15788
  };
14742
15789
  };
15790
+ readonly source: {
15791
+ readonly type: "string";
15792
+ readonly enum: readonly ["internal", "external"];
15793
+ 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.";
15794
+ readonly example: "internal";
15795
+ };
15796
+ };
15797
+ readonly components: {};
15798
+ };
15799
+ readonly safeguardTriggerConditionSchema: {
15800
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
15801
+ readonly type: "object";
15802
+ readonly required: readonly ["operator", "threshold"];
15803
+ readonly additionalProperties: false;
15804
+ readonly description: "The condition that triggers the safeguard.";
15805
+ readonly properties: {
15806
+ readonly operator: {
15807
+ readonly type: "string";
15808
+ readonly enum: readonly [">", "<"];
15809
+ readonly description: "The comparison operator for the threshold check.";
15810
+ readonly example: ">";
15811
+ };
15812
+ readonly threshold: {
15813
+ readonly type: "number";
15814
+ readonly description: "The threshold value to compare against.";
15815
+ readonly example: 100;
15816
+ };
14743
15817
  };
14744
15818
  readonly components: {};
14745
15819
  };
14746
15820
  };
14747
15821
  };
14748
15822
  };
14749
- readonly transitionConditionSchema: {
14750
- readonly $id: "#/components/schemas/transitionConditionSchema";
15823
+ readonly metricQuerySchema: {
15824
+ readonly $id: "#/components/schemas/metricQuerySchema";
14751
15825
  readonly type: "object";
15826
+ readonly required: readonly ["metricName", "timeRange", "aggregationMode", "labelSelectors"];
15827
+ readonly description: "Common metric query configuration for selecting and filtering metric data.";
14752
15828
  readonly additionalProperties: false;
14753
- readonly required: readonly ["intervalMinutes"];
14754
- readonly description: "A transition condition for milestone progression";
14755
15829
  readonly properties: {
14756
- readonly intervalMinutes: {
14757
- readonly type: "integer";
14758
- readonly minimum: 1;
14759
- readonly description: "The interval in minutes before transitioning";
14760
- readonly example: 30;
15830
+ readonly metricName: {
15831
+ readonly type: "string";
15832
+ readonly description: "The Prometheus metric series to query. It includes both unleash prefix and metric type and display name";
15833
+ readonly example: "unleash_counter_feature_toggle_usage_total";
15834
+ };
15835
+ readonly timeRange: {
15836
+ readonly type: "string";
15837
+ readonly enum: readonly ["hour", "day", "week", "month"];
15838
+ readonly description: "The time range for the metric data.";
15839
+ readonly example: "day";
15840
+ };
15841
+ readonly aggregationMode: {
15842
+ readonly type: "string";
15843
+ readonly description: "The aggregation mode for the metric data.";
15844
+ readonly enum: readonly ["rps", "count", "avg", "sum", "p95", "p99", "p50"];
15845
+ readonly example: "rps";
15846
+ };
15847
+ readonly labelSelectors: {
15848
+ readonly type: "object";
15849
+ readonly additionalProperties: {
15850
+ readonly type: "array";
15851
+ readonly items: {
15852
+ readonly type: "string";
15853
+ };
15854
+ };
15855
+ readonly description: "The selected labels and their values for filtering the metric data.";
15856
+ readonly example: {
15857
+ readonly environment: readonly ["development"];
15858
+ readonly project: readonly ["default"];
15859
+ };
15860
+ };
15861
+ readonly source: {
15862
+ readonly type: "string";
15863
+ readonly enum: readonly ["internal", "external"];
15864
+ 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.";
15865
+ readonly example: "internal";
15866
+ };
15867
+ };
15868
+ readonly components: {};
15869
+ };
15870
+ readonly safeguardTriggerConditionSchema: {
15871
+ readonly $id: "#/components/schemas/safeguardTriggerConditionSchema";
15872
+ readonly type: "object";
15873
+ readonly required: readonly ["operator", "threshold"];
15874
+ readonly additionalProperties: false;
15875
+ readonly description: "The condition that triggers the safeguard.";
15876
+ readonly properties: {
15877
+ readonly operator: {
15878
+ readonly type: "string";
15879
+ readonly enum: readonly [">", "<"];
15880
+ readonly description: "The comparison operator for the threshold check.";
15881
+ readonly example: ">";
15882
+ };
15883
+ readonly threshold: {
15884
+ readonly type: "number";
15885
+ readonly description: "The threshold value to compare against.";
15886
+ readonly example: 100;
14761
15887
  };
14762
15888
  };
14763
15889
  readonly components: {};