unleash-server 8.0.0 → 8.0.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 (501) hide show
  1. package/dist/lib/addons/addon.d.ts +10 -2
  2. package/dist/lib/addons/addon.d.ts.map +1 -1
  3. package/dist/lib/addons/addon.js +104 -6
  4. package/dist/lib/addons/addon.js.map +1 -1
  5. package/dist/lib/addons/datadog-definition.js +1 -1
  6. package/dist/lib/addons/datadog-definition.js.map +1 -1
  7. package/dist/lib/addons/datadog.test.js +2 -0
  8. package/dist/lib/addons/datadog.test.js.map +1 -1
  9. package/dist/lib/addons/index.d.ts.map +1 -1
  10. package/dist/lib/addons/index.js +2 -0
  11. package/dist/lib/addons/index.js.map +1 -1
  12. package/dist/lib/addons/new-relic.d.ts.map +1 -1
  13. package/dist/lib/addons/new-relic.js +0 -1
  14. package/dist/lib/addons/new-relic.js.map +1 -1
  15. package/dist/lib/addons/new-relic.test.js +0 -1
  16. package/dist/lib/addons/new-relic.test.js.map +1 -1
  17. package/dist/lib/addons/slack.test.js +1 -2
  18. package/dist/lib/addons/slack.test.js.map +1 -1
  19. package/dist/lib/addons/teams-definition.d.ts.map +1 -1
  20. package/dist/lib/addons/teams-definition.js +1 -0
  21. package/dist/lib/addons/teams-definition.js.map +1 -1
  22. package/dist/lib/addons/teams-workflow-definition.d.ts +4 -0
  23. package/dist/lib/addons/teams-workflow-definition.d.ts.map +1 -0
  24. package/dist/lib/addons/teams-workflow-definition.js +66 -0
  25. package/dist/lib/addons/teams-workflow-definition.js.map +1 -0
  26. package/dist/lib/addons/teams-workflow.d.ts +15 -0
  27. package/dist/lib/addons/teams-workflow.d.ts.map +1 -0
  28. package/dist/lib/addons/teams-workflow.js +110 -0
  29. package/dist/lib/addons/teams-workflow.js.map +1 -0
  30. package/dist/lib/addons/teams-workflow.test.d.ts +2 -0
  31. package/dist/lib/addons/teams-workflow.test.d.ts.map +1 -0
  32. package/dist/lib/addons/teams-workflow.test.js +202 -0
  33. package/dist/lib/addons/teams-workflow.test.js.map +1 -0
  34. package/dist/lib/addons/teams.d.ts.map +1 -1
  35. package/dist/lib/addons/teams.js +0 -1
  36. package/dist/lib/addons/teams.js.map +1 -1
  37. package/dist/lib/addons/teams.test.js +0 -1
  38. package/dist/lib/addons/teams.test.js.map +1 -1
  39. package/dist/lib/addons/validate-url.d.ts +18 -0
  40. package/dist/lib/addons/validate-url.d.ts.map +1 -0
  41. package/dist/lib/addons/validate-url.js +93 -0
  42. package/dist/lib/addons/validate-url.js.map +1 -0
  43. package/dist/lib/addons/validate-url.test.d.ts +2 -0
  44. package/dist/lib/addons/validate-url.test.d.ts.map +1 -0
  45. package/dist/lib/addons/validate-url.test.js +199 -0
  46. package/dist/lib/addons/validate-url.test.js.map +1 -0
  47. package/dist/lib/create-config.d.ts.map +1 -1
  48. package/dist/lib/create-config.js +7 -0
  49. package/dist/lib/create-config.js.map +1 -1
  50. package/dist/lib/db/session-store.d.ts +1 -0
  51. package/dist/lib/db/session-store.d.ts.map +1 -1
  52. package/dist/lib/db/session-store.js +6 -0
  53. package/dist/lib/db/session-store.js.map +1 -1
  54. package/dist/lib/error/bad-data-error.d.ts.map +1 -1
  55. package/dist/lib/error/bad-data-error.js +10 -2
  56. package/dist/lib/error/bad-data-error.js.map +1 -1
  57. package/dist/lib/error/unleash-error.test.js +23 -0
  58. package/dist/lib/error/unleash-error.test.js.map +1 -1
  59. package/dist/lib/features/client-feature-toggles/client-feature-toggle.controller.d.ts.map +1 -1
  60. package/dist/lib/features/client-feature-toggles/client-feature-toggle.controller.js +2 -0
  61. package/dist/lib/features/client-feature-toggles/client-feature-toggle.controller.js.map +1 -1
  62. package/dist/lib/features/constraints/constraints-controller.d.ts.map +1 -1
  63. package/dist/lib/features/constraints/constraints-controller.js +1 -0
  64. package/dist/lib/features/constraints/constraints-controller.js.map +1 -1
  65. package/dist/lib/features/context/context.d.ts.map +1 -1
  66. package/dist/lib/features/context/context.js +3 -1
  67. package/dist/lib/features/context/context.js.map +1 -1
  68. package/dist/lib/features/dependent-features/dependent-features-controller.d.ts.map +1 -1
  69. package/dist/lib/features/dependent-features/dependent-features-controller.js +6 -0
  70. package/dist/lib/features/dependent-features/dependent-features-controller.js.map +1 -1
  71. package/dist/lib/features/environments/environments-controller.d.ts.map +1 -1
  72. package/dist/lib/features/environments/environments-controller.js +6 -0
  73. package/dist/lib/features/environments/environments-controller.js.map +1 -1
  74. package/dist/lib/features/events/event-search-controller.d.ts.map +1 -1
  75. package/dist/lib/features/events/event-search-controller.js +1 -0
  76. package/dist/lib/features/events/event-search-controller.js.map +1 -1
  77. package/dist/lib/features/export-import-toggles/export-import-controller.d.ts.map +1 -1
  78. package/dist/lib/features/export-import-toggles/export-import-controller.js +3 -0
  79. package/dist/lib/features/export-import-toggles/export-import-controller.js.map +1 -1
  80. package/dist/lib/features/feature-search/feature-search-controller.d.ts.map +1 -1
  81. package/dist/lib/features/feature-search/feature-search-controller.js +1 -0
  82. package/dist/lib/features/feature-search/feature-search-controller.js.map +1 -1
  83. package/dist/lib/features/feature-search/feature-search-service.d.ts.map +1 -1
  84. package/dist/lib/features/feature-search/feature-search-service.js +5 -0
  85. package/dist/lib/features/feature-search/feature-search-service.js.map +1 -1
  86. package/dist/lib/features/feature-search/feature-search-store.d.ts +1 -1
  87. package/dist/lib/features/feature-search/feature-search-store.d.ts.map +1 -1
  88. package/dist/lib/features/feature-search/feature-search-store.js +60 -10
  89. package/dist/lib/features/feature-search/feature-search-store.js.map +1 -1
  90. package/dist/lib/features/feature-search/feature.search.e2e.test.js +77 -0
  91. package/dist/lib/features/feature-search/feature.search.e2e.test.js.map +1 -1
  92. package/dist/lib/features/feature-toggle/archive-feature-toggle-controller.d.ts.map +1 -1
  93. package/dist/lib/features/feature-toggle/archive-feature-toggle-controller.js +2 -0
  94. package/dist/lib/features/feature-toggle/archive-feature-toggle-controller.js.map +1 -1
  95. package/dist/lib/features/feature-toggle/feature-toggle-controller.d.ts.map +1 -1
  96. package/dist/lib/features/feature-toggle/feature-toggle-controller.js +21 -0
  97. package/dist/lib/features/feature-toggle/feature-toggle-controller.js.map +1 -1
  98. package/dist/lib/features/feature-toggle/legacy/feature-toggle-legacy-controller.d.ts.map +1 -1
  99. package/dist/lib/features/feature-toggle/legacy/feature-toggle-legacy-controller.js +5 -0
  100. package/dist/lib/features/feature-toggle/legacy/feature-toggle-legacy-controller.js.map +1 -1
  101. package/dist/lib/features/frontend-api/frontend-api-controller.d.ts.map +1 -1
  102. package/dist/lib/features/frontend-api/frontend-api-controller.js +4 -0
  103. package/dist/lib/features/frontend-api/frontend-api-controller.js.map +1 -1
  104. package/dist/lib/features/frontend-api/frontend-api-service.d.ts.map +1 -1
  105. package/dist/lib/features/frontend-api/frontend-api-service.js +17 -20
  106. package/dist/lib/features/frontend-api/frontend-api-service.js.map +1 -1
  107. package/dist/lib/features/maintenance/maintenance-controller.d.ts.map +1 -1
  108. package/dist/lib/features/maintenance/maintenance-controller.js +2 -0
  109. package/dist/lib/features/maintenance/maintenance-controller.js.map +1 -1
  110. package/dist/lib/features/metrics/client-metrics/client-metrics.d.ts.map +1 -1
  111. package/dist/lib/features/metrics/client-metrics/client-metrics.js +2 -0
  112. package/dist/lib/features/metrics/client-metrics/client-metrics.js.map +1 -1
  113. package/dist/lib/features/metrics/custom/custom-metrics-controller.d.ts.map +1 -1
  114. package/dist/lib/features/metrics/custom/custom-metrics-controller.js +2 -0
  115. package/dist/lib/features/metrics/custom/custom-metrics-controller.js.map +1 -1
  116. package/dist/lib/features/metrics/instance/metrics.d.ts.map +1 -1
  117. package/dist/lib/features/metrics/instance/metrics.js +3 -0
  118. package/dist/lib/features/metrics/instance/metrics.js.map +1 -1
  119. package/dist/lib/features/metrics/instance/register.d.ts.map +1 -1
  120. package/dist/lib/features/metrics/instance/register.js +1 -0
  121. package/dist/lib/features/metrics/instance/register.js.map +1 -1
  122. package/dist/lib/features/metrics/integrations/integration-metrics.d.ts +1 -1
  123. package/dist/lib/features/metrics/integrations/integration-metrics.d.ts.map +1 -1
  124. package/dist/lib/features/metrics/integrations/integration-metrics.js +2 -0
  125. package/dist/lib/features/metrics/integrations/integration-metrics.js.map +1 -1
  126. package/dist/lib/features/metrics/unknown-flags/unknown-flags-controller.d.ts.map +1 -1
  127. package/dist/lib/features/metrics/unknown-flags/unknown-flags-controller.js +1 -0
  128. package/dist/lib/features/metrics/unknown-flags/unknown-flags-controller.js.map +1 -1
  129. package/dist/lib/features/playground/playground.d.ts.map +1 -1
  130. package/dist/lib/features/playground/playground.js +2 -0
  131. package/dist/lib/features/playground/playground.js.map +1 -1
  132. package/dist/lib/features/project/project-controller.d.ts.map +1 -1
  133. package/dist/lib/features/project/project-controller.js +6 -0
  134. package/dist/lib/features/project/project-controller.js.map +1 -1
  135. package/dist/lib/features/project-environments/project-environments-controller.d.ts.map +1 -1
  136. package/dist/lib/features/project-environments/project-environments-controller.js +3 -0
  137. package/dist/lib/features/project-environments/project-environments-controller.js.map +1 -1
  138. package/dist/lib/features/project-insights/project-insights-controller.d.ts.map +1 -1
  139. package/dist/lib/features/project-insights/project-insights-controller.js +1 -0
  140. package/dist/lib/features/project-insights/project-insights-controller.js.map +1 -1
  141. package/dist/lib/features/project-status/project-lifecycle-read-model/project-lifecycle-summary-read-model.d.ts.map +1 -1
  142. package/dist/lib/features/project-status/project-lifecycle-read-model/project-lifecycle-summary-read-model.js +5 -2
  143. package/dist/lib/features/project-status/project-lifecycle-read-model/project-lifecycle-summary-read-model.js.map +1 -1
  144. package/dist/lib/features/project-status/project-lifecycle-read-model/project-lifecycle-summary-read-model.test.js +34 -0
  145. package/dist/lib/features/project-status/project-lifecycle-read-model/project-lifecycle-summary-read-model.test.js.map +1 -1
  146. package/dist/lib/features/segment/segment-controller.d.ts.map +1 -1
  147. package/dist/lib/features/segment/segment-controller.js +9 -0
  148. package/dist/lib/features/segment/segment-controller.js.map +1 -1
  149. package/dist/lib/features/tag-type/tag-type.d.ts.map +1 -1
  150. package/dist/lib/features/tag-type/tag-type.js +6 -0
  151. package/dist/lib/features/tag-type/tag-type.js.map +1 -1
  152. package/dist/lib/features/ui-observability-controller/ui-observability-controller.d.ts.map +1 -1
  153. package/dist/lib/features/ui-observability-controller/ui-observability-controller.js +1 -0
  154. package/dist/lib/features/ui-observability-controller/ui-observability-controller.js.map +1 -1
  155. package/dist/lib/middleware/secure-headers.d.ts.map +1 -1
  156. package/dist/lib/middleware/secure-headers.js +20 -1
  157. package/dist/lib/middleware/secure-headers.js.map +1 -1
  158. package/dist/lib/openapi/spec/addon-create-update-schema.d.ts +1 -1
  159. package/dist/lib/openapi/spec/addon-create-update-schema.js +1 -1
  160. package/dist/lib/openapi/spec/addons-schema.d.ts +15 -0
  161. package/dist/lib/openapi/spec/addons-schema.d.ts.map +1 -1
  162. package/dist/lib/openapi/spec/addons-schema.js +51 -0
  163. package/dist/lib/openapi/spec/addons-schema.js.map +1 -1
  164. package/dist/lib/openapi/spec/feature-search-query-parameters.d.ts +3 -2
  165. package/dist/lib/openapi/spec/feature-search-query-parameters.d.ts.map +1 -1
  166. package/dist/lib/openapi/spec/feature-search-query-parameters.js +3 -2
  167. package/dist/lib/openapi/spec/feature-search-query-parameters.js.map +1 -1
  168. package/dist/lib/openapi/spec/profile-schema.d.ts +6 -1
  169. package/dist/lib/openapi/spec/profile-schema.d.ts.map +1 -1
  170. package/dist/lib/openapi/spec/profile-schema.js +13 -1
  171. package/dist/lib/openapi/spec/profile-schema.js.map +1 -1
  172. package/dist/lib/openapi/spec/profile-schema.test.js +1 -0
  173. package/dist/lib/openapi/spec/profile-schema.test.js.map +1 -1
  174. package/dist/lib/openapi/util/api-operation.d.ts +1 -1
  175. package/dist/lib/openapi/util/api-stability.js +1 -1
  176. package/dist/lib/openapi/util/api-stability.test.js +8 -5
  177. package/dist/lib/openapi/util/api-stability.test.js.map +1 -1
  178. package/dist/lib/routes/admin-api/addon.d.ts.map +1 -1
  179. package/dist/lib/routes/admin-api/addon.js +12 -2
  180. package/dist/lib/routes/admin-api/addon.js.map +1 -1
  181. package/dist/lib/routes/admin-api/api-token.d.ts.map +1 -1
  182. package/dist/lib/routes/admin-api/api-token.js +5 -0
  183. package/dist/lib/routes/admin-api/api-token.js.map +1 -1
  184. package/dist/lib/routes/admin-api/event.d.ts.map +1 -1
  185. package/dist/lib/routes/admin-api/event.js +3 -0
  186. package/dist/lib/routes/admin-api/event.js.map +1 -1
  187. package/dist/lib/routes/admin-api/favorites.d.ts.map +1 -1
  188. package/dist/lib/routes/admin-api/favorites.js +4 -0
  189. package/dist/lib/routes/admin-api/favorites.js.map +1 -1
  190. package/dist/lib/routes/admin-api/feature-type.d.ts.map +1 -1
  191. package/dist/lib/routes/admin-api/feature-type.js +2 -0
  192. package/dist/lib/routes/admin-api/feature-type.js.map +1 -1
  193. package/dist/lib/routes/admin-api/instance-admin.d.ts.map +1 -1
  194. package/dist/lib/routes/admin-api/instance-admin.js +2 -0
  195. package/dist/lib/routes/admin-api/instance-admin.js.map +1 -1
  196. package/dist/lib/routes/admin-api/metrics.d.ts.map +1 -1
  197. package/dist/lib/routes/admin-api/metrics.js +7 -0
  198. package/dist/lib/routes/admin-api/metrics.js.map +1 -1
  199. package/dist/lib/routes/admin-api/project/api-token.d.ts.map +1 -1
  200. package/dist/lib/routes/admin-api/project/api-token.js +3 -0
  201. package/dist/lib/routes/admin-api/project/api-token.js.map +1 -1
  202. package/dist/lib/routes/admin-api/project/health-report.d.ts.map +1 -1
  203. package/dist/lib/routes/admin-api/project/health-report.js +1 -0
  204. package/dist/lib/routes/admin-api/project/health-report.js.map +1 -1
  205. package/dist/lib/routes/admin-api/project/project-archive.d.ts.map +1 -1
  206. package/dist/lib/routes/admin-api/project/project-archive.js +4 -0
  207. package/dist/lib/routes/admin-api/project/project-archive.js.map +1 -1
  208. package/dist/lib/routes/admin-api/project/variants.d.ts.map +1 -1
  209. package/dist/lib/routes/admin-api/project/variants.js +4 -0
  210. package/dist/lib/routes/admin-api/project/variants.js.map +1 -1
  211. package/dist/lib/routes/admin-api/public-signup.d.ts.map +1 -1
  212. package/dist/lib/routes/admin-api/public-signup.js +4 -0
  213. package/dist/lib/routes/admin-api/public-signup.js.map +1 -1
  214. package/dist/lib/routes/admin-api/strategy.d.ts.map +1 -1
  215. package/dist/lib/routes/admin-api/strategy.js +7 -0
  216. package/dist/lib/routes/admin-api/strategy.js.map +1 -1
  217. package/dist/lib/routes/admin-api/tag.d.ts.map +1 -1
  218. package/dist/lib/routes/admin-api/tag.js +5 -0
  219. package/dist/lib/routes/admin-api/tag.js.map +1 -1
  220. package/dist/lib/routes/admin-api/telemetry.d.ts.map +1 -1
  221. package/dist/lib/routes/admin-api/telemetry.js +1 -0
  222. package/dist/lib/routes/admin-api/telemetry.js.map +1 -1
  223. package/dist/lib/routes/admin-api/user/pat.d.ts.map +1 -1
  224. package/dist/lib/routes/admin-api/user/pat.js +3 -0
  225. package/dist/lib/routes/admin-api/user/pat.js.map +1 -1
  226. package/dist/lib/routes/admin-api/user/user.d.ts.map +1 -1
  227. package/dist/lib/routes/admin-api/user/user.js +11 -2
  228. package/dist/lib/routes/admin-api/user/user.js.map +1 -1
  229. package/dist/lib/routes/admin-api/user/user.test.js +56 -6
  230. package/dist/lib/routes/admin-api/user/user.test.js.map +1 -1
  231. package/dist/lib/routes/admin-api/user-admin.d.ts.map +1 -1
  232. package/dist/lib/routes/admin-api/user-admin.js +12 -0
  233. package/dist/lib/routes/admin-api/user-admin.js.map +1 -1
  234. package/dist/lib/routes/admin-api/user-feedback.d.ts.map +1 -1
  235. package/dist/lib/routes/admin-api/user-feedback.js +2 -0
  236. package/dist/lib/routes/admin-api/user-feedback.js.map +1 -1
  237. package/dist/lib/routes/admin-api/user-splash.d.ts.map +1 -1
  238. package/dist/lib/routes/admin-api/user-splash.js +1 -0
  239. package/dist/lib/routes/admin-api/user-splash.js.map +1 -1
  240. package/dist/lib/routes/auth/reset-password-controller.d.ts.map +1 -1
  241. package/dist/lib/routes/auth/reset-password-controller.js +4 -0
  242. package/dist/lib/routes/auth/reset-password-controller.js.map +1 -1
  243. package/dist/lib/routes/auth/simple-password-provider.d.ts.map +1 -1
  244. package/dist/lib/routes/auth/simple-password-provider.js +1 -0
  245. package/dist/lib/routes/auth/simple-password-provider.js.map +1 -1
  246. package/dist/lib/routes/edge-api/index.d.ts.map +1 -1
  247. package/dist/lib/routes/edge-api/index.js +1 -0
  248. package/dist/lib/routes/edge-api/index.js.map +1 -1
  249. package/dist/lib/routes/health-check.d.ts.map +1 -1
  250. package/dist/lib/routes/health-check.js +1 -0
  251. package/dist/lib/routes/health-check.js.map +1 -1
  252. package/dist/lib/routes/public-invite.d.ts.map +1 -1
  253. package/dist/lib/routes/public-invite.js +2 -0
  254. package/dist/lib/routes/public-invite.js.map +1 -1
  255. package/dist/lib/routes/ready-check.d.ts.map +1 -1
  256. package/dist/lib/routes/ready-check.js +1 -0
  257. package/dist/lib/routes/ready-check.js.map +1 -1
  258. package/dist/lib/routes/util.d.ts.map +1 -1
  259. package/dist/lib/routes/util.js +8 -1
  260. package/dist/lib/routes/util.js.map +1 -1
  261. package/dist/lib/routes/util.test.d.ts +2 -0
  262. package/dist/lib/routes/util.test.d.ts.map +1 -0
  263. package/dist/lib/routes/util.test.js +18 -0
  264. package/dist/lib/routes/util.test.js.map +1 -0
  265. package/dist/lib/schema/html-input.d.ts +4 -0
  266. package/dist/lib/schema/html-input.d.ts.map +1 -0
  267. package/dist/lib/schema/html-input.js +38 -0
  268. package/dist/lib/schema/html-input.js.map +1 -0
  269. package/dist/lib/schema/html-input.test.d.ts +2 -0
  270. package/dist/lib/schema/html-input.test.d.ts.map +1 -0
  271. package/dist/lib/schema/html-input.test.js +98 -0
  272. package/dist/lib/schema/html-input.test.js.map +1 -0
  273. package/dist/lib/server-impl.d.ts +2 -1
  274. package/dist/lib/server-impl.d.ts.map +1 -1
  275. package/dist/lib/server-impl.js +2 -1
  276. package/dist/lib/server-impl.js.map +1 -1
  277. package/dist/lib/services/addon-service.d.ts +8 -1
  278. package/dist/lib/services/addon-service.d.ts.map +1 -1
  279. package/dist/lib/services/addon-service.js +24 -1
  280. package/dist/lib/services/addon-service.js.map +1 -1
  281. package/dist/lib/services/addon-service.test.js +75 -8
  282. package/dist/lib/services/addon-service.test.js.map +1 -1
  283. package/dist/lib/services/openapi-service.d.ts +2 -6
  284. package/dist/lib/services/openapi-service.d.ts.map +1 -1
  285. package/dist/lib/services/openapi-service.js.map +1 -1
  286. package/dist/lib/services/project-schema.d.ts +1 -2
  287. package/dist/lib/services/project-schema.d.ts.map +1 -1
  288. package/dist/lib/services/project-schema.js +4 -2
  289. package/dist/lib/services/project-schema.js.map +1 -1
  290. package/dist/lib/services/session-service.d.ts +6 -0
  291. package/dist/lib/services/session-service.d.ts.map +1 -1
  292. package/dist/lib/services/session-service.js +8 -0
  293. package/dist/lib/services/session-service.js.map +1 -1
  294. package/dist/lib/services/user-service.d.ts +18 -5
  295. package/dist/lib/services/user-service.d.ts.map +1 -1
  296. package/dist/lib/services/user-service.js +27 -7
  297. package/dist/lib/services/user-service.js.map +1 -1
  298. package/dist/lib/services/user-service.test.js +68 -0
  299. package/dist/lib/services/user-service.test.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 +23 -2
  303. package/dist/lib/types/experimental.js.map +1 -1
  304. package/dist/lib/types/model.d.ts +2 -0
  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 +4 -0
  308. package/dist/lib/types/option.d.ts.map +1 -1
  309. package/dist/lib/types/stores/session-store.d.ts +1 -0
  310. package/dist/lib/types/stores/session-store.d.ts.map +1 -1
  311. package/dist/lib/ui-config/ui-config-controller.d.ts.map +1 -1
  312. package/dist/lib/ui-config/ui-config-controller.js +2 -0
  313. package/dist/lib/ui-config/ui-config-controller.js.map +1 -1
  314. package/dist/lib/ui-config/ui-config-service.d.ts.map +1 -1
  315. package/dist/lib/ui-config/ui-config-service.js +4 -2
  316. package/dist/lib/ui-config/ui-config-service.js.map +1 -1
  317. package/dist/lib/ui-config/ui-config.test.js +21 -2
  318. package/dist/lib/ui-config/ui-config.test.js.map +1 -1
  319. package/dist/lib/users/inactive/inactive-users-controller.d.ts.map +1 -1
  320. package/dist/lib/users/inactive/inactive-users-controller.js +2 -0
  321. package/dist/lib/users/inactive/inactive-users-controller.js.map +1 -1
  322. package/dist/lib/util/anonymise.d.ts +1 -0
  323. package/dist/lib/util/anonymise.d.ts.map +1 -1
  324. package/dist/lib/util/anonymise.js +3 -0
  325. package/dist/lib/util/anonymise.js.map +1 -1
  326. package/dist/lib/util/anonymise.test.js +4 -1
  327. package/dist/lib/util/anonymise.test.js.map +1 -1
  328. package/dist/migrations/20260617115403-update-flag-descriptions.d.ts +3 -0
  329. package/dist/migrations/20260617115403-update-flag-descriptions.d.ts.map +1 -0
  330. package/dist/migrations/20260617115403-update-flag-descriptions.js +38 -0
  331. package/dist/migrations/20260617115403-update-flag-descriptions.js.map +1 -0
  332. package/dist/migrations/20260624120000-servicenow-change-references.d.ts +3 -0
  333. package/dist/migrations/20260624120000-servicenow-change-references.d.ts.map +1 -0
  334. package/dist/migrations/20260624120000-servicenow-change-references.js +22 -0
  335. package/dist/migrations/20260624120000-servicenow-change-references.js.map +1 -0
  336. package/dist/server-dev.js +6 -1
  337. package/dist/server-dev.js.map +1 -1
  338. package/dist/test/e2e/api/admin/addon.e2e.test.js +2 -1
  339. package/dist/test/e2e/api/admin/addon.e2e.test.js.map +1 -1
  340. package/dist/test/e2e/services/addon-service.e2e.test.js +2 -0
  341. package/dist/test/e2e/services/addon-service.e2e.test.js.map +1 -1
  342. package/dist/test/e2e/services/session-service.e2e.test.js +11 -0
  343. package/dist/test/e2e/services/session-service.e2e.test.js.map +1 -1
  344. package/dist/test/fixtures/fake-session-store.d.ts +1 -0
  345. package/dist/test/fixtures/fake-session-store.d.ts.map +1 -1
  346. package/dist/test/fixtures/fake-session-store.js +3 -0
  347. package/dist/test/fixtures/fake-session-store.js.map +1 -1
  348. package/frontend/build/index.html +2 -2
  349. package/frontend/build/static/AccordionSummary-wye3oOm6.js +1 -0
  350. package/frontend/build/static/AdvancedPlayground-DdeMb-6I.js +3 -0
  351. package/frontend/build/static/Alert-_bLyWbvx.js +1 -0
  352. package/frontend/build/static/BackendConnections-kgR0xyIH.js +1 -0
  353. package/frontend/build/static/Box-BQsxfFmC.js +1 -0
  354. package/frontend/build/static/Button-CebB8EPB.js +1 -0
  355. package/frontend/build/static/CircularProgress-C_LUU3DK.js +101 -0
  356. package/frontend/build/static/Close-DyTASMSq.js +1 -0
  357. package/frontend/build/static/Collapse-DPPTUMpf.js +1 -0
  358. package/frontend/build/static/ConditionallyRender---uTpMBn.js +1 -0
  359. package/frontend/build/static/CreateProject-BSlg0WYM.js +1 -0
  360. package/frontend/build/static/Dialog-C-xQxqWX.js +1 -0
  361. package/frontend/build/static/DialogWithAside-DzCSDyWo.js +1110 -0
  362. package/frontend/build/static/Divider-CsdWvu5F.js +1 -0
  363. package/frontend/build/static/EnterpriseEdge-CjslqYDM.js +6 -0
  364. package/frontend/build/static/FeatureMetricsChart-B4WryxcW.js +2 -0
  365. package/frontend/build/static/FeatureStaleDialog-EzReRTI5.js +8 -0
  366. package/frontend/build/static/FeatureViewLazyExport-8eQKTvdS.js +10 -0
  367. package/frontend/build/static/FileCopy-B8HZEA83.js +1 -0
  368. package/frontend/build/static/FlagMetricsChart-hNQuwOxW.js +2 -0
  369. package/frontend/build/static/FormControlLabel-F5gDLixN.js +1 -0
  370. package/frontend/build/static/FrontendNetworkTrafficUsage-pcr83PWo.js +1 -0
  371. package/frontend/build/static/GridLayoutWrapper-B_YyjZ7l.js +5 -0
  372. package/frontend/build/static/Grow-BIbmvKVy.js +1 -0
  373. package/frontend/build/static/HelpOutlineOutlined-CpMsVJZu.js +1 -0
  374. package/frontend/build/static/Highlighter-MomUaQww.js +1 -0
  375. package/frontend/build/static/HtmlTooltip-B9jv1G1R.js +1 -0
  376. package/frontend/build/static/ImpactMetricsPage-DGH_S9oz.js +1 -0
  377. package/frontend/build/static/ImpactViewsPage-DZqKPFvE.js +1 -0
  378. package/frontend/build/static/LazyAdminExport-B1ReAViz.js +38 -0
  379. package/frontend/build/static/LazyProjectExport-BMVcGpNI.js +46 -0
  380. package/frontend/build/static/LifecycleChartComponent-BeoRUO9q.js +2 -0
  381. package/frontend/build/static/LineChartComponent-BbCMbJ-m.js +1 -0
  382. package/frontend/build/static/Link-CfIScd2f.js +1 -0
  383. package/frontend/build/static/Loader-DdgXftPc.js +1 -0
  384. package/frontend/build/static/{LogRocketRunner-D_e4hzJQ.js → LogRocketRunner-Duzg1Kzh.js} +4 -4
  385. package/frontend/build/static/Logo-nextjs-DCzT4YXr.svg +1 -0
  386. package/frontend/build/static/Logo-react-CyIpikqs.svg +10 -0
  387. package/frontend/build/static/Logo-reactnative-DZ9HKW2l.svg +10 -0
  388. package/frontend/build/static/MarkCompletedDialogue-CcXyp8UE.js +1 -0
  389. package/frontend/build/static/NetworkOverview-0mBnFAZX.js +1 -0
  390. package/frontend/build/static/NetworkPrometheusAPIWarning-Bq62ygkV.js +1 -0
  391. package/frontend/build/static/NetworkTraffic-DmG5Iv25.js +1 -0
  392. package/frontend/build/static/NetworkTrafficUsage-DccaVLYs.js +1 -0
  393. package/frontend/build/static/OnboardingProgress-Bp9sZ-ZM.js +1 -0
  394. package/frontend/build/static/PageContent-c0NDm5oD.js +1 -0
  395. package/frontend/build/static/PercentageDonut-DBDGNJlh.js +1 -0
  396. package/frontend/build/static/PermissionButton-B-IfzChn.js +1 -0
  397. package/frontend/build/static/Popover-CUTnSn2h.js +1 -0
  398. package/frontend/build/static/Radio-DL8ja0ll.js +1 -0
  399. package/frontend/build/static/RadioGroup-Ci3WHaOy.js +1 -0
  400. package/frontend/build/static/ReactJSONEditor-DeBI7JPg.js +4 -0
  401. package/frontend/build/static/RoleCell-DhYvu4YH.js +1 -0
  402. package/frontend/build/static/Safeguard-DErU6fSK.js +1 -0
  403. package/frontend/build/static/SelectSdk-Dr_pzQgX.js +2 -0
  404. package/frontend/build/static/StoriesPage-frGP1Bfr.js +2 -0
  405. package/frontend/build/static/SwitchBase-DWPIxZnN.js +1 -0
  406. package/frontend/build/static/TextField-oipjeg6n.js +3 -0
  407. package/frontend/build/static/Tooltip-BaILXXti.js +1 -0
  408. package/frontend/build/static/TooltipResolver-4A1YhwBy.js +1 -0
  409. package/frontend/build/static/Truncator-D2bO9ub6.js +1 -0
  410. package/frontend/build/static/Typography-BTdLWIUX.js +1 -0
  411. package/frontend/build/static/aggregateFeatureMetrics-B-67HaIZ.js +1 -0
  412. package/frontend/build/static/chartjs-plugin-annotation.esm-DP4wCpdA.js +1 -0
  413. package/frontend/build/static/chunk-QUQL4437-Dr42NpoL.js +3 -0
  414. package/frontend/build/static/createBox-Cf2UJsmc.js +1 -0
  415. package/frontend/build/static/createLocalStorage-WS-MCMlG.js +1 -0
  416. package/frontend/build/static/createSimplePaletteValueFilter-BRAMrHWJ.js +1 -0
  417. package/frontend/build/static/differenceInSeconds-DMZGQwjK.js +1 -0
  418. package/frontend/build/static/dividerClasses-Cc45lyWo.js +1 -0
  419. package/frontend/build/static/endOfMonth-CkSR_DAx.js +1 -0
  420. package/frontend/build/static/{enterpriseEdgeCloud-DtcZf9iv.js → enterpriseEdgeCloud-C5u35XAw.js} +1 -1
  421. package/frontend/build/static/esm-DdgY1Q5s.js +12 -0
  422. package/frontend/build/static/format-C8UVjLNw.js +1 -0
  423. package/frontend/build/static/formatDate-cFuM4JYl.js +1 -0
  424. package/frontend/build/static/formatDistanceToNow-CyouiCIY.js +1 -0
  425. package/frontend/build/static/httpErrorResponseHandler-FMtt7Zqh.js +1 -0
  426. package/frontend/build/static/{impact-metrics-icon-1LLLS-bG.js → impact-metrics-icon-6dt-ye-h.js} +1 -1
  427. package/frontend/build/static/index-C04TEs4k.js +290 -0
  428. package/frontend/build/static/jsx-runtime-BnvnyDTF.js +1 -0
  429. package/frontend/build/static/metricsFormatters-DhX-aU17.js +1 -0
  430. package/frontend/build/static/mui-CoU2c-id.js +5 -0
  431. package/frontend/build/static/networkTrafficUsageHighlightPlugin-DlOtHZg3.js +1 -0
  432. package/frontend/build/static/parse-Chj4PyAg.js +1 -0
  433. package/frontend/build/static/parseISO-Cup6hyvQ.js +1 -0
  434. package/frontend/build/static/{react-DW1tWzGJ.js → react-GZhdek4G.js} +1 -1
  435. package/frontend/build/static/startOfHour-P0Sr6h8e.js +1 -0
  436. package/frontend/build/static/testIds-B_Ev-uQn.js +1 -0
  437. package/frontend/build/static/themeStyles-DGVpwkcv.js +1 -0
  438. package/frontend/build/static/useApiGetter-7FP8Avm4.js +1 -0
  439. package/frontend/build/static/useApiTokens-C8Dqw_X1.js +1 -0
  440. package/frontend/build/static/useConditionalSWR-DGgzun6i.js +1 -0
  441. package/frontend/build/static/useConditionallyHiddenColumns-C5q9zdfJ.js +5 -0
  442. package/frontend/build/static/useCustomEvent-Dj2V5RVb.js +1 -0
  443. package/frontend/build/static/useEnvironments-CTguhgy0.js +2 -0
  444. package/frontend/build/static/useGroupedImpactMetricsData-CW9qnV2y.js +1 -0
  445. package/frontend/build/static/useImpactMetrics-9qDSEpTn.js +3 -0
  446. package/frontend/build/static/useImpactMetricsEnabled-wRNO6-Oh.js +1 -0
  447. package/frontend/build/static/useInstanceTrafficMetrics-CRCDB4TX.js +1 -0
  448. package/frontend/build/static/useMediaQuery-DGx8zAkf.js +2 -0
  449. package/frontend/build/static/useOptionalPathParam-Cx3ru9yC.js +1 -0
  450. package/frontend/build/static/usePageTitle-CHzzFshF.js +1 -0
  451. package/frontend/build/static/useTheme-CQqAmDLr.js +9 -0
  452. package/frontend/build/static/useUiConfig-DbVjTDpE.js +1 -0
  453. package/frontend/package.json +13 -13
  454. package/package.json +13 -11
  455. package/frontend/build/static/AdvancedPlayground-Dc5CjsH6.js +0 -3
  456. package/frontend/build/static/BackendConnections-BzoyVkqE.js +0 -1
  457. package/frontend/build/static/CreateProject-CARqyXgr.js +0 -1
  458. package/frontend/build/static/DialogWithAside-CtKlvRxJ.js +0 -947
  459. package/frontend/build/static/EnterpriseEdge-6F99gSET.js +0 -6
  460. package/frontend/build/static/FeatureMetricsChart-CCUsCbvl.js +0 -2
  461. package/frontend/build/static/FeatureStaleDialog-IRgDg5x8.js +0 -8
  462. package/frontend/build/static/FeatureViewLazyExport-7dlvG8T-.js +0 -10
  463. package/frontend/build/static/FlagMetricsChart-CQCEqI6k.js +0 -2
  464. package/frontend/build/static/FrontendNetworkTrafficUsage-CdHe-oU2.js +0 -1
  465. package/frontend/build/static/GridLayoutWrapper-L_W9K-dV.js +0 -3
  466. package/frontend/build/static/ImpactMetricsPage-0OKGAVog.js +0 -1
  467. package/frontend/build/static/ImpactViewsPage-CdwvIuE9.js +0 -1
  468. package/frontend/build/static/LazyAdminExport-lAWqz1Kg.js +0 -38
  469. package/frontend/build/static/LazyProjectExport-CjjWWq5H.js +0 -46
  470. package/frontend/build/static/LifecycleChartComponent-Dw7X54qU.js +0 -2
  471. package/frontend/build/static/LineChartComponent-D81JPWi4.js +0 -1
  472. package/frontend/build/static/Logo-react-D2SuVol5.svg +0 -1
  473. package/frontend/build/static/MarkCompletedDialogue-vW74sVuW.js +0 -1
  474. package/frontend/build/static/NetworkOverview-Dx3Yhmnr.js +0 -1
  475. package/frontend/build/static/NetworkPrometheusAPIWarning-BlbOSbDW.js +0 -1
  476. package/frontend/build/static/NetworkTraffic-CJI952Qr.js +0 -1
  477. package/frontend/build/static/NetworkTrafficUsage-DP83K2Q6.js +0 -1
  478. package/frontend/build/static/OnboardingProgress-DECLEUJE.js +0 -1
  479. package/frontend/build/static/PercentageDonut-CV__KCpE.js +0 -1
  480. package/frontend/build/static/ReactJSONEditor-D4-lWgEb.js +0 -4
  481. package/frontend/build/static/RoleCell-0_ZJUpz5.js +0 -1
  482. package/frontend/build/static/Safeguard-B93Tz6lG.js +0 -1
  483. package/frontend/build/static/SelectSdk-Cxw0QOfY.js +0 -2
  484. package/frontend/build/static/StoriesPage-ZDw2ahU0.js +0 -1
  485. package/frontend/build/static/aggregateFeatureMetrics-Byd95jx-.js +0 -1
  486. package/frontend/build/static/chart-CG3XAKw_.js +0 -3
  487. package/frontend/build/static/chartjs-plugin-annotation.esm-bUcqmHD4.js +0 -1
  488. package/frontend/build/static/esm-LYuUsJ00.js +0 -15
  489. package/frontend/build/static/index-DIBimazR.js +0 -409
  490. package/frontend/build/static/networkTrafficUsageHighlightPlugin-C8avnJ5K.js +0 -1
  491. package/frontend/build/static/objectId-CwvEBicG.js +0 -1
  492. package/frontend/build/static/useApiTokens-CdZD_-zn.js +0 -1
  493. package/frontend/build/static/useGroupedImpactMetricsData-D2KwIe7Z.js +0 -1
  494. package/frontend/build/static/useImpactMetricsEnabled-Yb36cM6y.js +0 -1
  495. package/frontend/build/static/useInstanceTrafficMetrics-CcZqSYy1.js +0 -1
  496. /package/frontend/build/static/{daysOrHours-DZ037Bzn.js → daysOrHours-owFAL-4S.js} +0 -0
  497. /package/frontend/build/static/{formatPath-vbOoY_VU.js → formatPath-j72gcKwy.js} +0 -0
  498. /package/frontend/build/static/{formatTickValue-xCLMih6P.js → formatTickValue-DWHZUXee.js} +0 -0
  499. /package/frontend/build/static/{storage-DS1Ts5PA.js → storage-tBZ25pJM.js} +0 -0
  500. /package/frontend/build/static/{toDate-JUEZGP0n.js → toDate-BEKdmfOu.js} +0 -0
  501. /package/frontend/build/static/{unknownify-D0N8k6Ch.js → unknownify-CCAQc7w1.js} +0 -0
@@ -1,947 +0,0 @@
1
- import{o as e,t}from"./react-DW1tWzGJ.js";import{n,r}from"./formatPath-vbOoY_VU.js";import{$s as i,Aa as a,Bu as o,Ca as s,Da as c,Dd as l,Ea as u,Ed as d,Et as f,Fa as p,Ia as m,Jd as h,Kd as g,Ma as _,Mt as v,Na as ee,Nt as y,Oa as b,Ou as te,Pa as ne,Qc as re,Qs as ie,Ru as ae,Sa as oe,Ta as se,Td as ce,Uu as le,Yl as ue,Zd as x,_u as S,co as de,da as fe,dd as pe,df as me,ec as C,fa as he,fc as ge,gd as w,hd as T,ja as _e,ka as ve,pf as ye,rc as be,vd as xe,wa as Se}from"./index-DIBimazR.js";var E=e(t()),D=me(),Ce=e=>(0,D.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:20,height:20,viewBox:`0 0 20 20`,fill:`none`,...e,children:(0,D.jsx)(`path`,{d:`M4.16667 17.5C3.70833 17.5 3.31597 17.3368 2.98958 17.0104C2.66319 16.684 2.5 16.2917 2.5 15.8333V5.41667C2.5 5.22222 2.53125 5.03819 2.59375 4.86458C2.65625 4.69097 2.75 4.52778 2.875 4.375L4.04167 2.95833C4.16667 2.80556 4.30903 2.69097 4.46875 2.61458C4.62847 2.53819 4.80556 2.5 5 2.5H15C15.1944 2.5 15.3715 2.53819 15.5312 2.61458C15.691 2.69097 15.8333 2.80556 15.9583 2.95833L17.125 4.375C17.25 4.52778 17.3438 4.69097 17.4062 4.86458C17.4688 5.03819 17.5 5.22222 17.5 5.41667V15.8333C17.5 16.2917 17.3368 16.684 17.0104 17.0104C16.684 17.3368 16.2917 17.5 15.8333 17.5H4.16667ZM4.5 5H15.5L14.7917 4.16667H5.20833L4.5 5ZM4.16667 15.8333H15.8333V6.66667H4.16667V15.8333ZM12.125 14.2083L15.0833 11.25L12.125 8.29167L10.9167 9.5L12.6667 11.25L10.9167 13L12.125 14.2083ZM7.91667 14.2083L9.125 13L7.375 11.25L9.125 9.5L7.91667 8.29167L4.95833 11.25L7.91667 14.2083Z`,fill:`#6E6E70`})}),O=g(xe)(({theme:e})=>({width:e.spacing(3),height:e.spacing(3)})),k=[{name:`Node.js`,icon:ve},{name:`Go`,icon:ee},{name:`Ruby`,icon:se},{name:`PHP`,icon:b},{name:`Rust`,icon:Se},{name:`.NET`,icon:p},{name:`Java`,icon:_e},{name:`Python`,icon:c}],A=[{name:`JavaScript`,icon:a},{name:`React`,icon:u},{name:`Vue`,icon:oe},{name:`Svelte`,icon:s},{name:`Swift`,icon:_},{name:`Android`,icon:m},{name:`Flutter`,icon:ne}],we=[...k,...A],Te=g(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,gap:e.spacing(3),backgroundColor:e.palette.background.paper})),j=g(`div`)(({theme:e})=>({fontWeight:e.typography.fontWeightBold,fontSize:e.typography.body1.fontSize})),M=g(`div`)(({theme:e})=>({marginTop:e.spacing(.5),marginBottom:e.spacing(2),fontSize:e.typography.body2.fontSize,color:e.palette.text.secondary})),Ee=g(`div`)(({theme:e})=>({display:`flex`,columnGap:e.spacing(1.5),rowGap:e.spacing(1.5),alignItems:`center`,justifyContent:`flex-start`,flexWrap:`wrap`})),De=g(T,{shouldForwardProp:e=>e!==`isSelected`})(({theme:e,isSelected:t})=>({fontSize:e.typography.body2.fontSize,border:`1px solid ${t?e.palette.primary.main:e.palette.divider}`,borderRadius:e.shape.borderRadius,padding:e.spacing(1,1.5),minWidth:e.spacing(30),display:`flex`,alignItems:`center`,gap:e.spacing(1)})),Oe=g(`div`)(({theme:e})=>({color:e.palette.text.primary,display:`flex`,justifyContent:`space-between`,alignItems:`center`,width:`100%`})),ke=g(`span`)(({theme:e})=>({color:e.palette.primary.main,fontSize:e.typography.body2.fontSize,fontWeight:700})),N=({sdks:e,type:t,selectedSdkName:n,onSelect:i})=>(0,D.jsx)(Ee,{children:e.map(e=>{let a=n===e.name;return(0,D.jsxs)(De,{onClick:()=>i({name:e.name,type:t}),variant:`text`,isSelected:a,children:[(0,D.jsx)(O,{src:r(e.icon),alt:``}),(0,D.jsxs)(Oe,{children:[(0,D.jsx)(`b`,{children:e.name}),(0,D.jsx)(ke,{children:a?`Selected`:`Select`})]})]},e.name)})}),Ae=({onSelect:e,sdk:t})=>{let n=t?.name;return(0,D.jsxs)(Te,{children:[(0,D.jsxs)(w,{children:[(0,D.jsx)(j,{children:`Backend SDKs`}),(0,D.jsx)(M,{children:`Backend SDKs need a backend API key.`}),(0,D.jsx)(N,{sdks:k,type:`client`,selectedSdkName:n,onSelect:e})]}),(0,D.jsxs)(w,{children:[(0,D.jsx)(j,{children:`Frontend SDKs`}),(0,D.jsx)(M,{children:`Frontend SDKs need a frontend API key.`}),(0,D.jsx)(N,{sdks:A,type:`frontend`,selectedSdkName:n,onSelect:e})]})]})},P=(e,t={})=>{let{data:r,error:i,mutate:a}=ue(n(`api/admin/projects/${e}/api-tokens`),je,t),o=(0,E.useMemo)(()=>r??[],[r]),s=(0,E.useCallback)(()=>{a().catch(console.warn)},[a]);return{tokens:o,error:i,loading:!i&&!r,refetch:s}},je=async e=>(await(await fetch(e).then(re(`Project Api tokens`))).json()).tokens,F=()=>{let{makeRequest:e,createRequest:t,errors:n,loading:r}=ie({propagateErrors:!0});return{deleteToken:async(n,r)=>{let i=t(`api/admin/projects/${r}/api-tokens/${n}`,{method:`DELETE`});return e(i.caller,i.id)},createToken:async(n,r)=>{let i=t(`api/admin/projects/${r}/api-tokens`,{method:`POST`,body:JSON.stringify(n)});return e(i.caller,i.id)},errors:n,loading:r}},Me=e=>{if(!e)return null;let[t,n]=e.split(`:`,2);if(!n)return null;let[r,i,...a]=n.split(`.`);return t&&r&&i&&a.length===0?{project:t,environment:r,secret:i}:null},I=y(),Ne=g(`div`)(({theme:e})=>({backgroundColor:e.palette.background.elevation1,borderRadius:e.shape.borderRadius,padding:e.spacing(3),display:`flex`,flexDirection:`column`,alignItems:`center`})),L=g(`div`)({wordBreak:`break-all`}),R=g(`div`)(({theme:e})=>({borderRadius:e.shape.borderRadius,padding:e.spacing(2),flex:1,color:e.palette.text.secondary,fontSize:e.typography.body2.fontSize,background:e.palette.background.default})),z=g(R)(({theme:e})=>({border:`1px solid ${e.palette.primary.main}`})),B=g(R)(({theme:e})=>({border:`1px solid ${e.palette.success.main}`})),Pe=g(R)(({theme:e})=>({border:`1px solid ${e.palette.text.secondary}`})),Fe=g(`div`)(({theme:e})=>({display:`flex`,gap:e.spacing(2),alignItems:`flex-start`,marginTop:e.spacing(8),flexWrap:`wrap`})),Ie=g(`div`)({width:`100%`}),Le=g(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,gap:e.spacing(1),marginTop:e.spacing(2),width:`100%`})),V=g(`span`)(({theme:e})=>({fontFamily:`Sen`,fontSize:e.typography.body2.fontSize,fontStyle:`normal`,fontWeight:400,lineHeight:`20px`})),H=g(V)(({theme:e})=>({color:e.palette.primary.main})),U=g(V)(({theme:e})=>({color:e.palette.success.main})),W=g(V)(({theme:e})=>({color:e.palette.text.secondary})),G=g(V)(({theme:e})=>({color:e.palette.text.disabled})),K={project:`The project this API key can retrieve feature flags from`,environment:`The environment this API key can retrieve feature flag configuration from`,secret:`The API key secret`},q=({project:e,environment:t,secret:n})=>{let r=h(),i=te(r.breakpoints.up(`lg`));return(0,D.jsx)(Ie,{children:(0,D.jsx)(I.ArcherContainer,{strokeColor:r.palette.secondary.border,endMarker:!1,lineStyle:`curve`,children:(0,D.jsxs)(Ne,{children:[(0,D.jsxs)(L,{children:[(0,D.jsx)(I.ArcherElement,{id:`project`,children:(0,D.jsx)(H,{children:e})}),(0,D.jsx)(G,{children:`:`}),(0,D.jsx)(I.ArcherElement,{id:`environment`,children:(0,D.jsx)(U,{children:t})}),(0,D.jsx)(G,{children:`.`}),(0,D.jsx)(I.ArcherElement,{id:`secret`,children:(0,D.jsx)(W,{children:n})})]}),i?(0,D.jsxs)(Fe,{children:[(0,D.jsx)(I.ArcherElement,{id:`project-description`,relations:[{targetId:`project`,targetAnchor:`bottom`,sourceAnchor:`top`,style:{strokeColor:r.palette.primary.main,strokeWidth:2}}],children:(0,D.jsx)(z,{children:K.project})}),(0,D.jsx)(I.ArcherElement,{id:`environment-description`,relations:[{targetId:`environment`,targetAnchor:`bottom`,sourceAnchor:`top`,style:{strokeColor:r.palette.success.main,strokeWidth:2}}],children:(0,D.jsx)(B,{children:K.environment})}),(0,D.jsx)(I.ArcherElement,{id:`secret-description`,relations:[{targetId:`secret`,targetAnchor:`bottom`,sourceAnchor:`top`,style:{strokeColor:r.palette.text.secondary,strokeWidth:2}}],children:(0,D.jsx)(Pe,{children:K.secret})})]}):(0,D.jsxs)(Le,{children:[(0,D.jsxs)(z,{children:[(0,D.jsx)(H,{children:e}),(0,D.jsx)(`div`,{children:K.project})]}),(0,D.jsxs)(B,{children:[(0,D.jsx)(U,{children:t}),(0,D.jsx)(`div`,{children:K.environment})]}),(0,D.jsxs)(Pe,{children:[(0,D.jsx)(L,{children:(0,D.jsx)(W,{children:n})}),(0,D.jsx)(`div`,{children:K.secret})]})]})]})})})},Re={client:`Backend`,frontend:`Frontend`},ze=g(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,gap:e.spacing(3)})),J=g(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,alignItems:`flex-start`,gap:e.spacing(2),padding:e.spacing(2),borderRadius:e.shape.borderRadiusMedium,border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.elevation1})),Y=g(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,gap:e.spacing(.5)})),X=g(`div`)(({theme:e})=>({fontWeight:e.typography.fontWeightBold,fontSize:e.typography.body1.fontSize})),Z=g(`p`)(({theme:e})=>({fontSize:e.typography.body2.fontSize})),Be=g(`div`)({display:`flex`,width:`100%`,justifyContent:`flex-end`}),Ve=({projectId:e,environments:t,sdk:n,onApiKeyChange:r,onNext:a})=>{let{trackEvent:s}=be(),{tokens:c,loading:l,refetch:u}=P(e),{createToken:d,loading:f}=F(),{setToastApiError:p}=C(),[m,h]=(0,E.useState)(t[0]||``),g=c.find(e=>e.environment===m&&e.type===n?.type),_=Me(g?.secret);if((0,E.useEffect)(()=>{r(g?.secret)},[g?.secret,r]),!n)return null;let v=async()=>{try{await d({environment:m,type:n.type,projects:[e],tokenName:`api-key-${e}-${m}`},e),u(),s(`onboarding`,{props:{eventType:`api-key-generated`}})}catch(e){p(i(e))}},ee=t.length>0?Math.max(...t.map(e=>e.length)):0,y=l||f,b=Re[n.type];return(0,D.jsxs)(ze,{children:[(0,D.jsxs)(J,{children:[(0,D.jsxs)(Y,{children:[(0,D.jsx)(X,{children:`First select environment`}),(0,D.jsx)(Z,{children:`The environment connects to an SDK to retrieve information.`})]}),(0,D.jsx)(o,{value:m,onChange:e=>h(e.target.value),size:`small`,inputProps:{"aria-label":`Select environment`},sx:{minWidth:`${ee+5}ch`},children:t.map(e=>(0,D.jsx)(le,{value:e,children:e},e))})]}),(0,D.jsxs)(J,{children:[(0,D.jsx)(Y,{children:_?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(X,{children:[b,` API Key`]}),(0,D.jsxs)(Z,{children:[`Here is your generated`,` `,b.toLowerCase(),` API key. We will use it to connect to the`,` `,(0,D.jsx)(`b`,{children:_.project}),` project in the`,` `,(0,D.jsx)(`b`,{children:_.environment}),` environment.`]})]}):(0,D.jsxs)(X,{children:[`Then generate a `,b,` API Key`]})}),_?(0,D.jsx)(q,{project:_.project,environment:_.environment,secret:_.secret}):(0,D.jsxs)(T,{variant:`contained`,disabled:y,onClick:v,children:[`Generate `,b,` API Key`]})]}),_&&(0,D.jsx)(Be,{children:(0,D.jsx)(T,{variant:`contained`,onClick:a,children:`Next`})})]})},He=({apiKey:e})=>e?(0,D.jsx)(de,{color:`neutral`,children:(0,D.jsx)(ge,{title:e,sx:{maxWidth:200},children:e})}):null,Ue=e(he(),1),We={Android:`1\\. Install the SDK
2
-
3
- \`\`\`gradle
4
- implementation("io.getunleash:unleash-android:+")
5
- \`\`\`
6
-
7
- 2\\. Enable required [permissions](https://developer.android.com/guide/topics/manifest/uses-permission-element)
8
-
9
- \`\`\`xml
10
- <uses-permission android:name="android.permission.INTERNET" />
11
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
12
- \`\`\`
13
-
14
- 3\\. Initialize Unleash in your application
15
-
16
- \`\`\`kotlin
17
- class MyApplication: Application() {
18
- val unleash: Unleash by lazy {
19
- val instance = DefaultUnleash(
20
- androidContext = this,
21
- unleashConfig = UnleashConfig.newBuilder(appName = "unleash-onboarding-android")
22
- .proxyUrl("<YOUR_API_URL>")
23
- .clientKey("<YOUR_API_TOKEN>")
24
- .build()
25
- )
26
- instance.start()
27
- instance
28
- }
29
-
30
- override fun onTerminate() {
31
- super.onTerminate()
32
- unleash.close()
33
- }
34
- }
35
- \`\`\`
36
-
37
- 4\\. Check flag status
38
-
39
- \`\`\`kotlin
40
- class MainActivity : ComponentActivity() {
41
- override fun onCreate(savedInstanceState: Bundle?) {
42
- super.onCreate(savedInstanceState)
43
- val unleashInstance = (application as MyApplication).unleash
44
-
45
- setContent {
46
- var flagStatus by remember { mutableStateOf("loading") }
47
- LaunchedEffect(Unit) {
48
- while (isActive) {
49
- val isFlagEnabled = unleashInstance.isEnabled("<YOUR_FLAG>")
50
- flagStatus = if (isFlagEnabled) {
51
- "Flag is enabled"
52
- } else {
53
- "Flag is disabled"
54
- }
55
- delay(3.seconds)
56
- }
57
- }
58
-
59
- Text(text = flagStatus)
60
- }
61
-
62
- }
63
- }
64
- \`\`\`
65
- ℹ️ **Info:** The Android SDK takes at least 60 seconds to post metrics to Unleash.
66
-
67
- ---
68
- ---
69
- - [SDK repository with documentation and example](https://github.com/Unleash/unleash-android)
70
- - [Android SDK basic example](hhttps://github.com/Unleash/unleash-sdk-examples/tree/main/Android)
71
-
72
- ---
73
-
74
- \`\`\`kotlin
75
- if (unleash.isEnabled("<YOUR_FLAG>")) {
76
- println("<YOUR_FLAG> is enabled")
77
- } else {
78
- println("<YOUR_FLAG> is disabled")
79
- }
80
- \`\`\`
81
-
82
- ℹ️ **Info:** The Android SDK takes at least 60 seconds to post metrics to Unleash.
83
- `,Go:`1\\. Install the SDK
84
- \`\`\`sh
85
- go get github.com/Unleash/unleash-go-sdk/v6@latest
86
- \`\`\`
87
-
88
- 2\\. Run Unleash
89
- \`\`\`go
90
- package main
91
-
92
- import (
93
- unleash "github.com/Unleash/unleash-go-sdk/v6"
94
- "net/http"
95
- )
96
-
97
- func main() {
98
- err := unleash.Initialize(
99
- unleash.WithAppName("unleash-onboarding-golang"),
100
- unleash.WithUrl("<YOUR_API_URL>"),
101
- unleash.WithCustomHeaders(http.Header{"Authorization": {"<YOUR_API_TOKEN>"}}), // in production use environment variable
102
- )
103
- if err != nil {
104
- panic(err)
105
- }
106
- defer unleash.Close()
107
- unleash.WaitForReady() // optional: blocks until first sync
108
-
109
- if unleash.IsEnabled("<YOUR_FLAG>", unleash.FeatureOptions{}) {
110
- // New behaviour
111
- }
112
- }
113
- \`\`\`
114
-
115
- ---
116
- \`\`\`go
117
- package main
118
-
119
- import (
120
- unleash "github.com/Unleash/unleash-go-sdk/v6"
121
- "net/http"
122
- "os"
123
- )
124
-
125
- func main() {
126
- err := unleash.Initialize(
127
- unleash.WithAppName("unleash-onboarding-golang"),
128
- unleash.WithUrl("<YOUR_API_URL>"),
129
- unleash.WithCustomHeaders(http.Header{
130
- "Authorization": {os.Getenv("UNLEASH_API_KEY")},
131
- }),
132
- )
133
- if err != nil {
134
- panic(err)
135
- }
136
- defer unleash.Close()
137
-
138
- if unleash.IsEnabled("<YOUR_FLAG>", unleash.FeatureOptions{}) {
139
- // New behaviour
140
- }
141
- }
142
- \`\`\`
143
-
144
- ---
145
- - [SDK repository with documentation](https://github.com/Unleash/unleash-go-sdk)
146
- - [Go SDK example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/Go)
147
-
148
- ---
149
-
150
- \`\`\`go
151
- if unleash.IsEnabled("<YOUR_FLAG>", unleash.FeatureOptions{}) {
152
- fmt.Println("<YOUR_FLAG> is enabled")
153
- } else {
154
- fmt.Println("<YOUR_FLAG> is disabled")
155
- }
156
- \`\`\`
157
- `,JavaScript:`1\\. Install the SDK
158
- \`\`\`sh
159
- npm install unleash-proxy-client
160
- \`\`\`
161
-
162
- 2\\. Run Unleash
163
- \`\`\`js
164
- const { UnleashClient } = require('unleash-proxy-client');
165
-
166
- const unleash = new UnleashClient({
167
- url: '<YOUR_API_URL>',
168
- clientKey: '<YOUR_API_TOKEN>', // in production use environment variable
169
- appName: 'unleash-onboarding-javascript',
170
- });
171
-
172
- unleash.start();
173
-
174
- setInterval(() => {
175
- if (unleash.isEnabled('<YOUR_FLAG>')) {
176
- console.log('<YOUR_FLAG> is enabled');
177
- } else {
178
- console.log('<YOUR_FLAG> is disabled');
179
- }
180
- }, 1000);
181
- \`\`\`
182
- ---
183
- \`\`\`js
184
- const unleash = new UnleashClient({
185
- url: '<YOUR_API_URL>',
186
- clientKey: process.env.UNLEASH_API_TOKEN,
187
- appName: 'unleash-onboarding-javascript',
188
- });
189
-
190
- setInterval(() => {
191
- if (unleash.isEnabled('<YOUR_FLAG>')) {
192
- console.log('<YOUR_FLAG> is enabled');
193
- } else {
194
- console.log('<YOUR_FLAG> is disabled');
195
- }
196
- }, 1000);
197
-
198
- unleash.start();
199
- \`\`\`
200
-
201
- ---
202
- - [SDK repository with documentation](https://github.com/Unleash/unleash-proxy-client-js)
203
- - [JavaScript SDK example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/JavaScript)
204
-
205
- ---
206
-
207
- \`\`\`js
208
- if (unleash.isEnabled('<YOUR_FLAG>')) {
209
- console.log('<YOUR_FLAG> is enabled');
210
- } else {
211
- console.log('<YOUR_FLAG> is disabled');
212
- }
213
- \`\`\`
214
- `,"Node.js":`1\\. Install the SDK
215
- \`\`\`sh
216
- npm install unleash-client
217
- \`\`\`
218
-
219
- 2\\. Run Unleash
220
- \`\`\`js
221
- const { initialize } = require('unleash-client');
222
-
223
- const unleash = initialize({
224
- url: '<YOUR_API_URL>',
225
- appName: 'unleash-onboarding-node',
226
- customHeaders: {
227
- Authorization: '<YOUR_API_TOKEN>' // in production use environment variable
228
- },
229
- });
230
-
231
- setInterval(() => {
232
- if (unleash.isEnabled('<YOUR_FLAG>')) {
233
- console.log('<YOUR_FLAG> is enabled');
234
- } else {
235
- console.log('<YOUR_FLAG> is disabled');
236
- }
237
- }, 1000);
238
- \`\`\`
239
-
240
- ---
241
- \`\`\`js
242
- const { initialize } = require('unleash-client');
243
-
244
- const unleash = initialize({
245
- url: '<YOUR_API_URL>',
246
- appName: 'unleash-onboarding-node',
247
- customHeaders: { Authorization: process.env.UNLEASH_API_KEY },
248
- });
249
-
250
- unleash.on('synchronized', () => {
251
- console.log('Unleash synchronized');
252
- });
253
- unleash.on('error', console.error);
254
- unleash.on('warn', console.warn);
255
-
256
- setInterval(() => {
257
- if (unleash.isEnabled('<YOUR_FLAG>')) {
258
- console.log('<YOUR_FLAG> is enabled');
259
- } else {
260
- console.log('<YOUR_FLAG> is disabled');
261
- }
262
- }, 1000);
263
- \`\`\`
264
-
265
- ---
266
- - [SDK repository with documentation](https://github.com/Unleash/unleash-client-node)
267
- - [Node.js SDK example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/Node.js)
268
- - [Node.js SDK tutorial](https://dev.to/reeshee/how-to-implement-feature-flags-in-nodejs-using-unleash-3907)
269
-
270
- ---
271
-
272
- \`\`\`js
273
- if (unleash.isEnabled('<YOUR_FLAG>')) {
274
- console.log('<YOUR_FLAG> is enabled');
275
- } else {
276
- console.log('<YOUR_FLAG> is disabled');
277
- }
278
- \`\`\`
279
- `,Python:`1\\. Install the SDK
280
- \`\`\`sh
281
- pip install UnleashClient
282
- \`\`\`
283
-
284
- 2\\. Run Unleash
285
- \`\`\`python
286
- from UnleashClient import UnleashClient
287
- import time
288
-
289
- client = UnleashClient(
290
- url="<YOUR_API_URL>",
291
- app_name="unleash-onboarding-python",
292
- custom_headers={'Authorization': '<YOUR_API_TOKEN>'}) # in production use environment variable
293
-
294
- client.initialize_client()
295
-
296
- while True:
297
- if client.is_enabled("<YOUR_FLAG>"):
298
- print("<YOUR_FLAG> is enabled")
299
- else:
300
- print("<YOUR_FLAG> is disabled")
301
- time.sleep(2)
302
- \`\`\`
303
- ---
304
- \`\`\`python
305
- from UnleashClient import UnleashClient
306
- import os
307
-
308
- client = UnleashClient(
309
- url="<YOUR_API_URL>",
310
- app_name="unleash-onboarding-python",
311
- custom_headers={'Authorization': os.getenv('UNLEASH_API_TOKEN')})
312
-
313
- client.initialize_client()
314
-
315
- \`\`\`
316
-
317
- ---
318
- - [SDK repository with documentation](https://github.com/Unleash/unleash-client-python)
319
- - [Python SDK example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/Python)
320
- - [How to Implement Feature Flags in Python](https://docs.getunleash.io/guides/implement-feature-flags-in-python)
321
-
322
- ---
323
-
324
- \`\`\`python
325
- if client.is_enabled("<YOUR_FLAG>"):
326
- print("<YOUR_FLAG> is enabled")
327
- else:
328
- print("<YOUR_FLAG> is disabled")
329
- \`\`\`
330
- `,Ruby:`1\\. Install the SDK
331
- \`\`\`sh
332
- gem install unleash
333
- \`\`\`
334
-
335
- 2\\. Run Unleash
336
- \`\`\`rb
337
- require 'unleash'
338
-
339
- @unleash = Unleash::Client.new(
340
- url: "<YOUR_API_URL>",
341
- custom_http_headers: { 'Authorization': "<YOUR_API_TOKEN>" }, # in production use environment variable
342
- app_name: 'unleash-onboarding-ruby',
343
- instance_id: 'unleash-onboarding-ruby',
344
- )
345
-
346
- while true
347
- if @unleash.is_enabled?("<YOUR_FLAG>")
348
- puts "Flag is enabled"
349
- else
350
- puts "Flag is not enabled"
351
- end
352
- sleep 3
353
- end
354
-
355
- \`\`\`
356
- ---
357
- \`\`\`rb
358
- @unleash = Unleash::Client.new(
359
- url: "<YOUR_API_URL>",
360
- custom_http_headers: { 'Authorization': ENV['UNLEASH_API_TOKEN'] },
361
- app_name: 'unleash-onboarding-ruby',
362
- instance_id: 'unleash-onboarding-ruby',
363
- )
364
- \`\`\`
365
-
366
- ---
367
- - [SDK repository with documentation](https://github.com/Unleash/unleash-client-ruby)
368
- - [Ruby example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/Ruby)
369
- - [How to Implement Feature Flags in Ruby](https://docs.getunleash.io/guides/implement-feature-flags-in-ruby)
370
-
371
- ---
372
-
373
- \`\`\`rb
374
- if @unleash.is_enabled?("<YOUR_FLAG>")
375
- puts "<YOUR_FLAG> is enabled"
376
- else
377
- puts "<YOUR_FLAG> is disabled"
378
- end
379
- \`\`\`
380
- `,Svelte:`1\\. Install the SDK
381
- \`\`\`sh
382
- npm install @unleash/proxy-client-svelte
383
- \`\`\`
384
-
385
- 2\\. Initialize Unleash
386
- \`\`\`svelte
387
- <script>
388
- import { FlagProvider } from '@unleash/proxy-client-svelte';
389
- const { children } = $props();
390
-
391
- const config = {
392
- url: '<YOUR_API_URL>',
393
- clientKey: '<YOUR_API_TOKEN>', // in production use environment variable
394
- appName: 'unleash-onboarding-svelte',
395
- };
396
- <\/script>
397
-
398
- <div class="app">
399
- <FlagProvider {config}>
400
- <main>
401
- {@render children()}
402
- </main>
403
- </FlagProvider>
404
- </div>
405
- \`\`\`
406
-
407
- 3\\. Check feature flag status
408
- \`\`\`svelte
409
- <script lang="ts">
410
- import { useFlag } from '@unleash/proxy-client-svelte';
411
- const enabled = useFlag('<YOUR_FLAG>');
412
- <\/script>
413
-
414
- <section>
415
- {#if $enabled}
416
- <p><YOUR_FLAG> is enabled!</p>
417
- {:else}
418
- <p><YOUR_FLAG> is disabled!</p>
419
- {/if}
420
- </section>
421
- \`\`\`
422
- ---
423
- \`\`\`svelte
424
- const config = {
425
- url: '<YOUR_API_URL>',
426
- clientKey: import.meta.env.VITE_UNLEASH_API_TOKEN,
427
- appName: 'unleash-onboarding-svelte',
428
- };
429
- \`\`\`
430
-
431
- ---
432
- - [SDK repository with documentation](https://github.com/Unleash/proxy-client-svelte)
433
- - [Svelte example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/Svelte)
434
- - [How to Implement Feature Flags in SvelteKit](https://docs.getunleash.io/guides/implement-feature-flags-in-sveltekit)
435
-
436
- ---
437
-
438
- \`\`\`svelte
439
- <script lang="ts">
440
- import { useFlag } from '@unleash/proxy-client-svelte';
441
- const enabled = useFlag('<YOUR_FLAG>');
442
- <\/script>
443
-
444
- <section>
445
- {#if $enabled}
446
- <p><YOUR_FLAG> is enabled!</p>
447
- {:else}
448
- <p><YOUR_FLAG> is disabled!</p>
449
- {/if}
450
- </section>
451
- \`\`\`
452
- `,Vue:`1\\. Install the SDK
453
- \`\`\`sh
454
- npm install @unleash/proxy-client-vue
455
- \`\`\`
456
-
457
- 2\\. Initialize Unleash
458
- \`\`\`vue
459
- <script setup lang="ts">
460
- import { FlagProvider } from '@unleash/proxy-client-vue'
461
-
462
- const config = {
463
- url: '<YOUR_API_URL>',
464
- clientKey: '<YOUR_API_TOKEN>', // in production use environment variable
465
- appName: 'unleash-onboarding-vue',
466
- }
467
- <\/script>
468
-
469
- <template>
470
- <FlagProvider :config="config">
471
- <!-- <YourComponent /> -->
472
- </FlagProvider>
473
- </template>
474
- \`\`\`
475
-
476
- 3\\. Check feature flag status
477
- \`\`\`vue
478
- <script setup lang="ts">
479
- import { useFlag } from '@unleash/proxy-client-vue'
480
-
481
- const flagEnabled = useFlag('<YOUR_FLAG>')
482
- <\/script>
483
-
484
- <template>
485
- <div>
486
- <div v-if="flagEnabled"><YOUR_FLAG> is enabled</div>
487
- <div v-else><YOUR_FLAG> is disabled</div>
488
- </div>
489
- </template>
490
- \`\`\`
491
- ---
492
- \`\`\`svelte
493
- const config = {
494
- url: '<YOUR_API_URL>',
495
- clientKey: import.meta.env.VITE_UNLEASH_API_TOKEN,
496
- appName: 'unleash-onboarding-vue',
497
- }
498
- \`\`\`
499
-
500
- ---
501
- - [SDK repository with documentation](https://github.com/Unleash/proxy-client-vue)
502
- - [Vue example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/Vue)
503
-
504
- ---
505
-
506
- \`\`\`vue
507
- <script setup lang="ts">
508
- import { useFlag } from '@unleash/proxy-client-vue'
509
-
510
- const flagEnabled = useFlag('<YOUR_FLAG>')
511
- <\/script>
512
-
513
- <template>
514
- <div>
515
- <div v-if="flagEnabled"><YOUR_FLAG> is enabled</div>
516
- <div v-else><YOUR_FLAG> is disabled</div>
517
- </div>
518
- </template>
519
- \`\`\`
520
- `,Flutter:`1\\. Install the SDK
521
- \`\`\`sh
522
- flutter pub add unleash_proxy_client_flutter
523
- \`\`\`
524
-
525
- 2\\. Run Unleash
526
- \`\`\`dart
527
- import 'package:unleash_proxy_client_flutter/unleash_proxy_client_flutter.dart';
528
- import 'dart:async';
529
-
530
- final unleash = UnleashClient(
531
- url: Uri.parse('<YOUR_API_URL>'),
532
- clientKey: '<YOUR_API_TOKEN>', // in production use environment variable
533
- appName: 'unleash-onboarding-flutter');
534
-
535
- unleash.start();
536
-
537
- Timer.periodic(Duration(seconds: 1), (Timer timer) {
538
- if (unleash.isEnabled('<YOUR_FLAG>')) {
539
- print('<YOUR_FLAG> is enabled');
540
- } else {
541
- print('<YOUR_FLAG> is disabled');
542
- }
543
- });
544
- \`\`\`
545
- ---
546
- \`\`\`dart
547
- import 'package:unleash_proxy_client_flutter/unleash_proxy_client_flutter.dart';
548
- import 'dart:io';
549
-
550
- final unleash = UnleashClient(
551
- url: Uri.parse('<YOUR_API_URL>'),
552
- clientKey: Platform.environment['UNLEASH_CLIENT_KEY']!,
553
- appName: 'unleash-onboarding-flutter');
554
-
555
- unleash.start();
556
- \`\`\`
557
-
558
- ---
559
- - [SDK repository with documentation](https://github.com/Unleash/unleash_proxy_client_flutter)
560
- - [Flutter example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/Flutter)
561
- - [A/B Testing in Flutter using Unleash and Mixpanel](https://docs.getunleash.io/guides/implement-ab-test-in-flutter)
562
-
563
- ---
564
-
565
- \`\`\`dart
566
- if (unleash.isEnabled("<YOUR_FLAG>")) {
567
- print("<YOUR_FLAG> is enabled");
568
- } else {
569
- print("<YOUR_FLAG> is disabled");
570
- }
571
- \`\`\`
572
- `,Java:`1\\. Install the SDK
573
- \`\`\`xml
574
- <dependency>
575
- <groupId>io.getunleash</groupId>
576
- <artifactId>unleash-client-java</artifactId>
577
- <version>LATEST</version>
578
- </dependency>
579
- \`\`\`
580
-
581
- 2\\. Run Unleash
582
- \`\`\`java
583
- UnleashConfig config = UnleashConfig.builder()
584
- .appName("unleash-onboarding-java")
585
- .instanceId("unleash-onboarding-instance")
586
- .unleashAPI("<YOUR_API_URL>")
587
- .apiKey("<YOUR_API_TOKEN>") // in production use environment variable
588
- .build();
589
-
590
- Unleash unleash = new DefaultUnleash(config);
591
-
592
- while (true) {
593
- boolean featureEnabled = unleash.isEnabled("<YOUR_FLAG>");
594
- System.out.println("Feature enabled: " + featureEnabled);
595
- Thread.sleep(1000);
596
- }
597
- \`\`\`
598
-
599
- ---
600
- \`\`\`java
601
- UnleashConfig config = UnleashConfig.builder()
602
- .appName("unleash-onboarding-java")
603
- .instanceId("unleash-onboarding-instance")
604
- .unleashAPI("<YOUR_API_URL>")
605
- .apiKey(System.getenv("UNLEASH_API_KEY"))
606
- .build();
607
- \`\`\`
608
-
609
- ---
610
- - [SDK repository with documentation](https://github.com/Unleash/unleash-java-sdk)
611
- - [Java SDK example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/Java)
612
- - [How to Implement Feature Flags in Java](https://docs.getunleash.io/guides/implement-feature-flags-in-java)
613
-
614
- ---
615
-
616
- \`\`\`java
617
- if (unleash.isEnabled("<YOUR_FLAG>")) {
618
- System.out.println("<YOUR_FLAG> is enabled");
619
- } else {
620
- System.out.println("<YOUR_FLAG> is disabled");
621
- }
622
- \`\`\`
623
- `,".NET":`1\\. Install the SDK
624
- \`\`\`sh
625
- dotnet add package unleash.client
626
- // If you do not have a json library in your project:
627
- dotnet add package Newtonsoft.Json
628
- \`\`\`
629
-
630
- 2\\. Initialize Unleash
631
- \`\`\`csharp
632
- using Unleash;
633
- using Unleash.ClientFactory;
634
-
635
- public class Program
636
- {
637
- public static async Task Main()
638
- {
639
- var settings = new UnleashSettings()
640
- {
641
- AppName = "unleash-onboarding-dotnet",
642
- UnleashApi = new Uri("<YOUR_API_URL>"),
643
- CustomHttpHeaders = new Dictionary<string, string>()
644
- {
645
- {"Authorization","<YOUR_API_TOKEN>"} // in production use environment variable
646
- }
647
- };
648
-
649
- var unleash = new DefaultUnleash(settings);
650
-
651
- while (true) {
652
- if (unleash.IsEnabled("<YOUR_FLAG>"))
653
- {
654
- Console.WriteLine("<YOUR_FLAG> is enabled");
655
- }
656
- else
657
- {
658
- Console.WriteLine("<YOUR_FLAG> is disabled");
659
- }
660
- await Task.Delay(1000);
661
- }
662
- }
663
- }
664
-
665
- \`\`\`
666
-
667
- ---
668
- \`\`\`csharp
669
- var settings = new UnleashSettings()
670
- {
671
- AppName = "unleash-onboarding-dotnet",
672
- UnleashApi = new Uri("<YOUR_API_URL>"),
673
- CustomHttpHeaders = new Dictionary<string, string>()
674
- {
675
- {"Authorization",Environment.GetEnvironmentVariable("UNLEASH_API_KEY")}
676
- }
677
- };
678
- \`\`\`
679
-
680
- ---
681
- - [SDK repository with documentation](https://github.com/Unleash/unleash-client-dotnet)
682
- - [.NET/C# SDK example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/Csharp)
683
-
684
- ---
685
-
686
- \`\`\`csharp
687
- if (unleash.IsEnabled("<YOUR_FLAG>"))
688
- {
689
- Console.WriteLine("<YOUR_FLAG> is enabled");
690
- }
691
- else
692
- {
693
- Console.WriteLine("<YOUR_FLAG> is disabled");
694
- }
695
- \`\`\`
696
- `,PHP:`1\\. Install the SDK
697
- \`\`\`sh
698
- composer require unleash/client
699
- \`\`\`
700
-
701
- 2\\. Initialize Unleash
702
- \`\`\`php
703
- <?php
704
-
705
- use Unleash\\\\Client\\\\UnleashBuilder;
706
-
707
- require 'vendor/autoload.php';
708
-
709
- $unleash = UnleashBuilder::create()
710
- ->withAppName('unleash-onboarding-php')
711
- ->withAppUrl('<YOUR_API_URL>')
712
- ->withHeader('Authorization', '<YOUR_API_TOKEN>') // in production use environment variable
713
- ->withInstanceId('unleash-onboarding-instance')
714
- ->build();
715
-
716
- while (true) {
717
- echo 'Feature flag is: ' . $unleash->isEnabled('<YOUR_FLAG>') . PHP_EOL;
718
- sleep(1);
719
- }
720
- \`\`\`
721
- ---
722
- \`\`\`php
723
- $unleash = UnleashBuilder::create()
724
- ->withAppName('unleash-onboarding-php')
725
- ->withAppUrl('<YOUR_API_URL>')
726
- ->withHeader('Authorization', getenv('UNLEASH_API_TOKEN'))
727
- ->withInstanceId('unleash-onboarding-instance')
728
- ->build();
729
- \`\`\`
730
-
731
- ---
732
- - [SDK repository with documentation](https://github.com/Unleash/unleash-client-php)
733
- - [PHP SDK example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/PHP)
734
-
735
- ---
736
-
737
- \`\`\`php
738
- if ($unleash->isEnabled('<YOUR_FLAG>')) {
739
- echo '<YOUR_FLAG> is enabled' . PHP_EOL;
740
- } else {
741
- echo '<YOUR_FLAG> is disabled' . PHP_EOL;
742
- }
743
- \`\`\`
744
- `,React:`1\\. Install the SDK
745
- \`\`\`sh
746
- npm install @unleash/proxy-client-react unleash-proxy-client
747
- \`\`\`
748
-
749
- 2\\. Initialize Unleash
750
- \`\`\`jsx
751
- import React from 'react';
752
- import { createRoot } from 'react-dom/client';
753
- import { FlagProvider } from '@unleash/proxy-client-react';
754
-
755
- const config = {
756
- url: '<YOUR_API_URL>',
757
- clientKey: '<YOUR_API_TOKEN>', // in production use environment variable
758
- appName: 'unleash-onboarding-react',
759
- };
760
-
761
- const root = createRoot(document.getElementById('root'));
762
-
763
- root.render(
764
- <React.StrictMode>
765
- <FlagProvider config={config}>
766
- <App />
767
- </FlagProvider>
768
- </React.StrictMode>
769
- );
770
- \`\`\`
771
-
772
- 3\\. Check feature flag status
773
- \`\`\`jsx
774
- import { useFlag } from '@unleash/proxy-client-react';
775
-
776
- export const TestComponent = () => {
777
- const enabled = useFlag('<YOUR_FLAG>');
778
-
779
- return enabled ? 'Flag is enabled' : 'Flag is disabled'
780
- };
781
- \`\`\`
782
- ---
783
- \`\`\`jsx
784
- const config = {
785
- url: '<YOUR_API_URL>',
786
- clientKey: process.env.UNLEASH_API_TOKEN,
787
- appName: 'unleash-onboarding-react',
788
- };
789
- \`\`\`
790
-
791
- ---
792
- - [SDK repository with documentation](https://github.com/Unleash/proxy-client-react)
793
- - [React SDK example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/React)
794
- - [https://docs.getunleash.io/guides/implement-feature-flags-in-react](https://docs.getunleash.io/guides/implement-feature-flags-in-react)
795
-
796
- ---
797
-
798
- \`\`\`jsx
799
- const TestComponent = () => {
800
- const enabled = useFlag('<YOUR_FLAG>');
801
-
802
- if (enabled) {
803
- return (<div>{'<YOUR_FLAG> is enabled'}</div>);
804
- } else {
805
- return (<div>{'<YOUR_FLAG> is disabled'}</div>);
806
- }
807
- };
808
- \`\`\`
809
-
810
- `,Rust:`1\\. Install the SDK
811
- \`\`\`sh
812
- cargo add unleash-api-client --features reqwest
813
- cargo add serde --features derive
814
- cargo add reqwest@0.12 --features json
815
- cargo add tokio --features full
816
- cargo add enum-map
817
- \`\`\`
818
-
819
- 2\\. Run Unleash
820
- \`\`\`rust
821
- use enum_map::Enum;
822
- use serde::{Deserialize, Serialize};
823
- use std::error::Error;
824
- use std::time::Duration;
825
- use tokio::time::sleep;
826
- use unleash_api_client::client::ClientBuilder;
827
- use unleash_api_client::Client;
828
-
829
- #[derive(Debug, Deserialize, Serialize, Enum, Clone)]
830
- enum Flags {
831
- #[serde(rename = "<YOUR_FLAG>")]
832
- TestFlag,
833
- }
834
-
835
- #[tokio::main]
836
- async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
837
- let client: Client<Flags, reqwest::Client> = ClientBuilder::default()
838
- .into_client(
839
- "<YOUR_API_URL>",
840
- "unleash-onboarding-rust",
841
- "unleash-onboarding-instance",
842
- Some("<YOUR_API_TOKEN>".to_owned()), // in production use environment variable
843
- )?;
844
- client.register().await?;
845
-
846
- let (_, _) = tokio::join!(client.poll_for_updates(), async {
847
- sleep(Duration::from_millis(1000)).await;
848
-
849
- let is_enabled = client.is_enabled(Flags::TestFlag, None, true);
850
- println!("\\nIs flag enabled: {}\\n", is_enabled);
851
-
852
- sleep(Duration::from_millis(5000)).await;
853
-
854
- client.stop_poll().await;
855
- Ok::<(), Box<dyn Error + Send + Sync>>(())
856
- });
857
-
858
- Ok(())
859
- }
860
- \`\`\`
861
- ---
862
- \`\`\`rust
863
- let api_token = env::var("UNLEASH_API_TOKEN").expect("UNLEASH_API_TOKEN environment variable not set");
864
-
865
- let client: Client<Flags, reqwest::Client> = ClientBuilder::default()
866
- .into_client(
867
- "<YOUR_API_URL>",
868
- "unleash-onboarding-rust",
869
- "unleash-onboarding-instance",
870
- Some(api_token.to_owned()),
871
- )?;
872
- client.register().await?;
873
- \`\`\`
874
-
875
- ---
876
- - [SDK repository with documentation](https://github.com/Unleash/unleash-client-rust)
877
- - [Rust example with CodeSandbox](https://github.com/Unleash/unleash-sdk-examples/tree/main/Rust)
878
- - [How to Implement Feature Flags in Rust](https://docs.getunleash.io/guides/implement-feature-flags-in-rust)
879
-
880
- ---
881
-
882
- \`\`\`rust
883
- enum Flags {
884
- #[serde(rename = "<YOUR_FLAG>")]
885
- TestFlag,
886
- }
887
-
888
- if client.is_enabled(Flags::TestFlag, None, true) {
889
- println!("<YOUR_FLAG> is enabled");
890
- } else {
891
- println!("<YOUR_FLAG> is disabled");
892
- }
893
- \`\`\`
894
- `,Swift:`1\\. Install the SDK
895
- \`\`\`sh
896
- // Instructions to add the Swift SDK can be found at the provided URL:
897
- https://github.com/Unleash/unleash-proxy-client-swift.git
898
- \`\`\`
899
-
900
- 2\\. Run Unleash
901
- \`\`\`swift
902
- import Foundation
903
- import UnleashProxyClientSwift
904
-
905
- var unleash = UnleashProxyClientSwift.UnleashClient(
906
- unleashUrl: "<YOUR_API_URL>",
907
- clientKey: "<YOUR_API_TOKEN>", // in production use environment variable
908
- appName: "unleash-onboarding-swift",
909
- context: [:])
910
-
911
- unleash.start()
912
-
913
- Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { _ in
914
- print("Is enabled", unleash.isEnabled(name: "<YOUR_FLAG>"))
915
- }
916
- \`\`\`
917
- ℹ️ **Info:** The Swift SDK takes at least 60 seconds to post metrics to Unleash.
918
- ---
919
- ---
920
- ---
921
-
922
- \`\`\`swift
923
- if unleash.isEnabled(name: "<YOUR_FLAG>") {
924
- print("<YOUR_FLAG> is enabled")
925
- } else {
926
- print("<YOUR_FLAG> is disabled")
927
- }
928
- \`\`\`
929
-
930
- ℹ️ **Info:** The Swift SDK takes at least 60 seconds to post metrics to Unleash.
931
- `},Ge=g(`pre`)(({theme:e})=>({backgroundColor:e.palette.background.elevation1,padding:e.spacing(2),borderRadius:e.shape.borderRadius,overflow:`auto`,fontSize:e.typography.body2.fontSize,wordBreak:`break-all`,whiteSpace:`pre-wrap`,position:`relative`,maxHeight:e.spacing(90)})),Ke=g(ae)(({theme:e})=>({position:`absolute`,top:e.spacing(1),right:e.spacing(1)})),qe=({title:e,code:t})=>{let n=e=>()=>{(0,Ue.default)(e),r({type:`success`,text:`Copied to clipboard`})},{setToastData:r}=C();return(0,D.jsxs)(Ge,{children:[t,(0,D.jsx)(Ke,{title:e,arrow:!0,children:(0,D.jsx)(l,{onClick:n(t),size:`small`,children:(0,D.jsx)(fe,{})})})]})},Je=({children:e,className:t})=>{let n=!!t,r=Array.isArray(e)?e[0]:e;return n&&typeof r==`string`?(0,D.jsx)(qe,{code:r,title:`Copy code`}):(0,D.jsx)(`code`,{className:t,children:e})},Ye=g(`span`)(({theme:e})=>{let t=ye`
932
- 0% {
933
- box-shadow:
934
- 0 0 0 0 ${x(e.palette.primary.main,.5)},
935
- 0 0 0 0 ${x(e.palette.primary.main,.3)};
936
- }
937
- 70% {
938
- box-shadow:
939
- 0 0 0 6px ${x(e.palette.primary.main,0)},
940
- 0 0 0 12px ${x(e.palette.primary.main,0)};
941
- }
942
- 100% {
943
- box-shadow:
944
- 0 0 0 0 ${x(e.palette.primary.main,0)},
945
- 0 0 0 0 ${x(e.palette.primary.main,0)};
946
- }
947
- `;return{display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,width:e.spacing(3),height:e.spacing(3),borderRadius:`50%`,backgroundColor:e.palette.primary.main,color:e.palette.common.white,animation:`${t} 1.8s ease-out infinite`,"@media (prefers-reduced-motion: reduce)":{animation:`none`}}}),Q=()=>(0,D.jsx)(Ye,{children:(0,D.jsx)(f,{fontSize:`small`})}),Xe=g(`div`)(({theme:e})=>({display:`flex`,flexDirection:`row`,gap:e.spacing(2),padding:e.spacing(2),fontSize:e.typography.body2.fontSize,borderRadius:e.shape.borderRadiusMedium,backgroundColor:e.palette.secondary.light,border:`1px solid ${e.palette.secondary.border}`})),Ze=g(Xe)(({theme:e})=>({backgroundColor:e.palette.success.light,border:`1px solid ${e.palette.success.border}`})),Qe=g(`div`)(({theme:e})=>({marginLeft:e.spacing(1),marginTop:e.spacing(1)})),$e=g(v)(({theme:e})=>({marginLeft:e.spacing(1),marginTop:e.spacing(1),width:e.spacing(3),height:e.spacing(3),color:e.palette.success.main})),et=g(d)(({theme:e})=>({marginTop:e.spacing(2),padding:e.spacing(2,3),"& .MuiAlert-message":{padding:0},"& .MuiAlert-icon":{marginRight:e.spacing(1)}})),tt=({sdkConnected:e,connectedTitle:t,connectedBody:n,waitingTitle:r,waitingBody:i,showTroubleshooting:a,troubleshootingText:o})=>e?(0,D.jsxs)(Ze,{children:[(0,D.jsx)(`div`,{children:(0,D.jsx)($e,{})}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:t}),(0,D.jsx)(ce,{variant:`body2`,color:`textSecondary`,children:n})]})]}):(0,D.jsxs)(Xe,{children:[(0,D.jsx)(Qe,{children:(0,D.jsx)(Q,{})}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:r}),(0,D.jsx)(ce,{variant:`body2`,color:`textSecondary`,children:i}),a&&(0,D.jsx)(et,{severity:`warning`,children:o})]})]}),nt=40,$=`md`,rt=g(pe,{shouldForwardProp:e=>e!==`dialogMaxWidth`&&e!==`fullHeight`})(({theme:e,dialogMaxWidth:t=170,fullHeight:n})=>({"& .MuiDialog-paper":{borderRadius:e.shape.borderRadiusLarge,maxWidth:e.spacing(t),width:`100%`,...n&&{height:`100%`},overflow:`hidden`,display:`flex`,flexDirection:`column`,backgroundColor:e.palette.background.sidebar}})),it=g(`div`)(({theme:e})=>({display:`flex`,flexShrink:0,borderBottom:`1px solid ${e.palette.divider}`})),at=g(`div`)(({theme:e})=>({flex:1,display:`flex`,alignItems:`center`,justifyContent:`space-between`,backgroundColor:e.palette.background.paper,paddingRight:e.spacing(1.5),"& .closeButton":{[e.breakpoints.up($)]:{display:`none`}}})),ot=g(`h2`)(({theme:e})=>({margin:0,padding:e.spacing(1.5,3),fontWeight:e.typography.fontWeightBold,fontSize:e.typography.body1.fontSize,lineHeight:e.spacing(2.75)})),st=g(`div`)(({theme:e})=>({width:e.spacing(nt),flexShrink:0,backgroundColor:e.palette.background.sidebar,color:e.palette.primary.contrastText,display:`flex`,alignItems:`center`,justifyContent:`flex-end`,paddingRight:e.spacing(1.5),[e.breakpoints.down($)]:{display:`none`}})),ct=g(`div`)({display:`flex`,flex:1,overflow:`hidden`}),lt=g(`div`)(({theme:e})=>({flex:1,overflowY:`auto`,backgroundColor:e.palette.background.paper})),ut=g(`aside`)(({theme:e})=>({width:e.spacing(nt),flexShrink:0,backgroundColor:e.palette.background.sidebar,color:e.palette.primary.contrastText,[e.breakpoints.down($)]:{display:`none`}})),dt=({open:e,onClose:t,title:n,aside:r,children:i,maxWidth:a,fullHeight:o})=>(0,D.jsxs)(rt,{open:e,onClose:t,maxWidth:!1,dialogMaxWidth:a,fullHeight:o,children:[(0,D.jsxs)(it,{children:[(0,D.jsxs)(at,{children:[(0,D.jsx)(ot,{children:n}),(0,D.jsx)(l,{size:`small`,className:`closeButton`,onClick:t,children:(0,D.jsx)(S,{})})]}),(0,D.jsx)(st,{children:(0,D.jsx)(l,{size:`small`,onClick:t,sx:{color:`inherit`},children:(0,D.jsx)(S,{})})})]}),(0,D.jsxs)(ct,{children:[(0,D.jsx)(lt,{children:i}),(0,D.jsx)(ut,{children:r})]})]});export{We as a,q as c,Ae as d,we as f,Ce as g,O as h,Je as i,F as l,k as m,tt as n,He as o,A as p,Q as r,Ve as s,dt as t,P as u};