@camunda/ccma-saas-frontend 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/README.md +24 -1
  2. package/lib/esm/components/c4-activity-graph/c4-activity-graph.d.ts +1 -1
  3. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.d.ts +2 -2
  4. package/lib/esm/components/c4-advanced-search-filters/FieldRow.d.ts +2 -2
  5. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.d.ts +2 -2
  6. package/lib/esm/components/c4-advanced-search-filters/OrSection.d.ts +2 -2
  7. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.d.ts +1 -1
  8. package/lib/esm/components/c4-advanced-search-filters/state.types.d.ts +1 -1
  9. package/lib/esm/components/c4-advanced-search-filters/utils.d.ts +1 -1
  10. package/lib/esm/components/c4-ai-usage/c4-ai-usage.d.ts +1 -1
  11. package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.d.ts +1 -1
  12. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.d.ts +1 -1
  13. package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.d.ts +1 -1
  14. package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.types.d.ts +1 -1
  15. package/lib/esm/components/c4-async-modal/c4-async-modal.d.ts +1 -1
  16. package/lib/esm/components/c4-audit-log/c4-audit-log.d.ts +1 -1
  17. package/lib/esm/components/c4-billing-page/c4-billing-page.d.ts +1 -1
  18. package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.d.ts +1 -1
  19. package/lib/esm/components/c4-billing-page/c4-billing-page.types.d.ts +4 -4
  20. package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.d.ts +4 -3
  21. package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +6 -1
  22. package/lib/esm/components/c4-bottom-links/c4-bottom-links.d.ts +1 -1
  23. package/lib/esm/components/c4-bottom-links/c4-bottom-links.types.d.ts +1 -1
  24. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +1 -1
  25. package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.d.ts +1 -1
  26. package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.d.ts +1 -1
  27. package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.d.ts +1 -1
  28. package/lib/esm/components/c4-charts-dashboard/elements/line-chart.d.ts +1 -1
  29. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.d.ts +1 -1
  30. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.d.ts +1 -1
  31. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.d.ts +1 -1
  32. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.d.ts +1 -1
  33. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.d.ts +1 -1
  34. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.d.ts +1 -1
  35. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.d.ts +1 -1
  36. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.d.ts +1 -1
  37. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.d.ts +1 -1
  38. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.d.ts +1 -1
  39. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.d.ts +1 -1
  40. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.d.ts +1 -1
  41. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +22 -2
  42. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.d.ts +1 -1
  43. package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.d.ts +2 -2
  44. package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.js +4 -2
  45. package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.types.d.ts +2 -0
  46. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.d.ts +1 -1
  47. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.d.ts +1 -1
  48. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.d.ts +1 -1
  49. package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  50. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +5 -2
  51. package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.d.ts +1 -1
  52. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +1 -1
  53. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +3 -3
  54. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.types.d.ts +4 -4
  55. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
  56. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.d.ts +8 -8
  57. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +5 -5
  58. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +11 -11
  59. package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-settings.d.ts +1 -1
  60. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.d.ts +1 -1
  61. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.d.ts +1 -1
  62. package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.d.ts +1 -1
  63. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.d.ts +1 -1
  64. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +26 -5
  65. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.d.ts +1 -1
  66. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.js +1 -0
  67. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.types.d.ts +1 -0
  68. package/lib/esm/components/c4-console-dashboard/elements/empty-state.d.ts +1 -1
  69. package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.d.ts +1 -1
  70. package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.types.d.ts +1 -1
  71. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.d.ts +1 -1
  72. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.d.ts +1 -1
  73. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +16 -1
  74. package/lib/esm/components/c4-create-cluster/c4-create-cluster.d.ts +1 -1
  75. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +5 -2
  76. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.d.ts +1 -1
  77. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.d.ts +1 -1
  78. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.d.ts +1 -1
  79. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.d.ts +1 -1
  80. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.d.ts +1 -1
  81. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.d.ts +1 -1
  82. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.d.ts +1 -1
  83. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.d.ts +1 -1
  84. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.d.ts +1 -1
  85. package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.d.ts +1 -1
  86. package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.d.ts +1 -1
  87. package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.types.d.ts +1 -1
  88. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.d.ts +1 -1
  89. package/lib/esm/components/c4-divider/c4-divider.d.ts +1 -1
  90. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.d.ts +1 -1
  91. package/lib/esm/components/c4-external-link/c4-external-link.d.ts +1 -1
  92. package/lib/esm/components/c4-help-center/c4-help-center.d.ts +1 -1
  93. package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.d.ts +1 -1
  94. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.d.ts +1 -1
  95. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +2 -47
  96. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -1
  97. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.d.ts +1 -1
  98. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +4 -4
  99. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.d.ts +2 -2
  100. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.d.ts +3 -3
  101. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.d.ts +3 -3
  102. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.d.ts +2 -2
  103. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.d.ts +1 -1
  104. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +2 -2
  105. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.d.ts +1 -1
  106. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.d.ts +1 -1
  107. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +4 -4
  108. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.d.ts +1 -1
  109. package/lib/esm/components/c4-job-dashboard-shared/c4-stories-data-generator.d.ts +2 -2
  110. package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.d.ts +1 -1
  111. package/lib/esm/components/c4-link-button/c4-link-button.d.ts +1 -1
  112. package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.d.ts +1 -1
  113. package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +1 -1
  114. package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.d.ts +1 -1
  115. package/lib/esm/components/c4-management-api/c4-management-api.d.ts +1 -1
  116. package/lib/esm/components/c4-management-api/c4-management-api.mocks.d.ts +1 -1
  117. package/lib/esm/components/c4-management-overview/c4-management-overview.d.ts +1 -1
  118. package/lib/esm/components/c4-management-settings/c4-management-settings.d.ts +1 -1
  119. package/lib/esm/components/c4-management-users/c4-management-users.d.ts +1 -1
  120. package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.d.ts +1 -1
  121. package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.d.ts +1 -1
  122. package/lib/esm/components/c4-navigation/c4-navigation.d.ts +2 -2
  123. package/lib/esm/components/c4-number-input/c4-number-input.d.ts +1 -1
  124. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.d.ts +1 -1
  125. package/lib/esm/components/c4-optimize-activation-modal/c4-optimize-activation-modal.d.ts +1 -1
  126. package/lib/esm/components/c4-page-template/c4-page-template.d.ts +9 -4
  127. package/lib/esm/components/c4-page-template/c4-page-template.js +1 -1
  128. package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.d.ts +1 -1
  129. package/lib/esm/components/c4-pricing/c4-pricing.d.ts +1 -1
  130. package/lib/esm/components/c4-pricing/c4-pricing.types.d.ts +1 -1
  131. package/lib/esm/components/c4-pricing-card/c4-pricing-card.d.ts +1 -1
  132. package/lib/esm/components/c4-pricing-card/c4-pricing-card.utils.d.ts +1 -1
  133. package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.d.ts +1 -1
  134. package/lib/esm/components/c4-search/c4-search-results.d.ts +1 -1
  135. package/lib/esm/components/c4-search/c4-search-results.types.d.ts +1 -1
  136. package/lib/esm/components/c4-search/c4-search.d.ts +2 -2
  137. package/lib/esm/components/c4-search/c4-search.types.d.ts +1 -1
  138. package/lib/esm/components/c4-search/search.utils.d.ts +3 -3
  139. package/lib/esm/components/c4-sm-cluster-details/automation-components.d.ts +1 -1
  140. package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.d.ts +1 -1
  141. package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.types.d.ts +3 -3
  142. package/lib/esm/components/c4-sm-cluster-details/custom-properties.d.ts +1 -1
  143. package/lib/esm/components/c4-sm-cluster-details/details.d.ts +1 -1
  144. package/lib/esm/components/c4-sm-cluster-details/zeebe-components.d.ts +1 -1
  145. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.d.ts +1 -1
  146. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +2 -2
  147. package/lib/esm/components/c4-sm-dashboard/cluster-tile.d.ts +1 -1
  148. package/lib/esm/components/c4-sm-dashboard/explore.d.ts +1 -1
  149. package/lib/esm/components/c4-sm-dashboard/health-status.d.ts +1 -1
  150. package/lib/esm/components/c4-sm-dashboard/overview.d.ts +1 -1
  151. package/lib/esm/components/c4-stat/c4-stat.d.ts +1 -1
  152. package/lib/esm/components/c4-stateful-button/c4-stateful-button.d.ts +1 -1
  153. package/lib/esm/components/c4-tabs/c4-tabs.d.ts +1 -1
  154. package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.d.ts +1 -1
  155. package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.types.d.ts +1 -1
  156. package/lib/esm/components/c4-telemetry-page/telemetry-for-component.d.ts +2 -2
  157. package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.d.ts +1 -1
  158. package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.d.ts +1 -1
  159. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.d.ts +1 -1
  160. package/lib/esm/components/c4-toggle/c4-toggle.d.ts +1 -1
  161. package/lib/esm/components/c4-tsuga-links/c4-tsuga-links.d.ts +8 -0
  162. package/lib/esm/components/c4-tsuga-links/c4-tsuga-links.js +18 -0
  163. package/lib/esm/components/c4-tsuga-links/c4-tsuga-links.types.d.ts +15 -0
  164. package/lib/esm/components/c4-tsuga-links/tsuga-logs-url.d.ts +5 -0
  165. package/lib/esm/components/c4-tsuga-links/tsuga-logs-url.js +36 -0
  166. package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.d.ts +1 -1
  167. package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.utils.d.ts +1 -1
  168. package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.d.ts +1 -1
  169. package/lib/esm/components/c4-usage-history/c4-usage-history.d.ts +1 -1
  170. package/lib/esm/components/c4-usage-history/c4-usage-history.types.d.ts +1 -1
  171. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.d.ts +1 -1
  172. package/lib/esm/components/c4-user-details/c4-user-details.d.ts +1 -1
  173. package/lib/esm/components/c4-user-details/c4-user-details.types.d.ts +3 -3
  174. package/lib/esm/components/shared-charts/recharts-tokens.d.ts +14 -2
  175. package/lib/esm/components/shared-charts/recharts-tokens.js +22 -1
  176. package/lib/esm/externalUrls.const.d.ts +6 -6
  177. package/lib/esm/i18n/en/entities/orgroles.json +2 -0
  178. package/lib/esm/i18n/en/modals/users.json +0 -1
  179. package/lib/esm/i18n/en/pages/clusterdetails.json +14 -3
  180. package/lib/esm/i18n/en/pages/dashboard.json +1 -0
  181. package/lib/esm/i18n/en/pages/orgmanagement.json +8 -0
  182. package/lib/esm/icons/c4-icons.d.ts +1 -1
  183. package/lib/esm/index.d.ts +237 -253
  184. package/lib/esm/index.js +6 -11
  185. package/lib/esm/modals/c4-create-cluster-api-client-modal-handle.d.ts +1 -1
  186. package/lib/esm/modals/c4-create-connector-secret-modal-handle.d.ts +1 -1
  187. package/lib/esm/modals/c4-create-console-api-client-modal-handle.d.ts +1 -1
  188. package/lib/esm/modals/c4-invite-user-to-organization-modal-handle.d.ts +1 -1
  189. package/lib/esm/modals/c4-rename-organization-modal-handle.d.ts +1 -1
  190. package/lib/esm/notifications/c4-console-notifications-handle.d.ts +1 -1
  191. package/lib/esm/runtime/build-cluster-swagger-url.d.ts +1 -1
  192. package/lib/esm/runtime/c4-console-data-context.d.ts +2 -2
  193. package/lib/esm/runtime/c4-console-data-store.d.ts +1 -1
  194. package/lib/esm/runtime/c4-console-notifications-context.d.ts +1 -1
  195. package/lib/esm/runtime/c4-console-runtime-context.d.ts +1 -1
  196. package/lib/esm/runtime/c4-user-notifications-context.d.ts +1 -1
  197. package/lib/esm/runtime/index.d.ts +40 -0
  198. package/lib/esm/runtime/index.js +18 -0
  199. package/lib/esm/runtime/to-api-config.d.ts +1 -1
  200. package/lib/esm/runtime/to-api-domain.d.ts +1 -1
  201. package/lib/esm/runtime/to-identity-api-base-url.d.ts +1 -1
  202. package/lib/esm/ui/c4-modal-dialog.js +16 -3
  203. package/lib/esm/ui/index.d.ts +2 -2
  204. package/lib/esm/ui/index.js +28 -2
  205. package/lib/esm/utils/role-labels.d.ts +20 -0
  206. package/lib/esm/utils/role-labels.js +79 -0
  207. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.d.ts +1 -1
  208. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.types.d.ts +1 -1
  209. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +1 -1
  210. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +55 -2
  211. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
  212. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +8 -0
  213. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +4 -1
  214. package/lib/esm/widgets/cluster-details/cluster-details-tabs.d.ts +1 -1
  215. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-activity-tab.d.ts +1 -1
  216. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.d.ts +1 -1
  217. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-audit-log-tab.d.ts +1 -1
  218. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.d.ts +1 -1
  219. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +5 -0
  220. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +4 -4
  221. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.d.ts +1 -1
  222. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +26 -5
  223. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +1 -1
  224. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +18 -7
  225. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +1 -1
  226. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +115 -45
  227. package/lib/esm/widgets/cluster-details/tabs/use-restart-confirm.d.ts +36 -0
  228. package/lib/esm/widgets/cluster-details/tabs/use-restart-confirm.js +58 -0
  229. package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
  230. package/lib/esm/widgets/clusters/c4-clusters-page.js +2 -2
  231. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +1 -1
  232. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +1 -1
  233. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +1 -1
  234. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +1 -1
  235. package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
  236. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +1 -1
  237. package/lib/esm/widgets/dashboard/c4-dashboard-app.d.ts +1 -1
  238. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +1 -0
  239. package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
  240. package/lib/esm/widgets/job-worker/c4-job-worker-details-page.d.ts +1 -1
  241. package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.d.ts +1 -1
  242. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +1 -1
  243. package/lib/esm/widgets/management/c4-management-app.d.ts +2 -2
  244. package/lib/esm/widgets/management/c4-management-app.js +142 -22
  245. package/lib/esm/widgets/management/c4-management-app.types.d.ts +16 -1
  246. package/lib/esm/widgets/management/c4-management-page.d.ts +1 -1
  247. package/lib/esm/widgets/management/c4-management-page.types.d.ts +1 -1
  248. package/lib/esm/widgets/management/tabs/c4-management-activity-tab.d.ts +1 -1
  249. package/lib/esm/widgets/management/tabs/c4-management-api-tab.d.ts +1 -1
  250. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.d.ts +3 -0
  251. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +19 -3
  252. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.d.ts +1 -1
  253. package/lib/esm/widgets/management/tabs/c4-management-settings-tab.d.ts +1 -1
  254. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +1 -1
  255. package/lib/esm/widgets/management/tabs/c4-management-users-tab.d.ts +4 -8
  256. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +63 -87
  257. package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
  258. package/lib/esm/widgets/user-details/c4-user-details-page.js +29 -82
  259. package/package.json +45 -28
  260. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.d.ts +0 -1
  261. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.js +0 -43
  262. package/lib/esm/components/c4-billing-page/elements/value-metric.spec.d.ts +0 -1
  263. package/lib/esm/components/c4-billing-page/elements/value-metric.spec.js +0 -67
  264. package/lib/esm/components/c4-cluster-list/c4-cluster-list.spec.d.ts +0 -1
  265. package/lib/esm/components/c4-cluster-list/c4-cluster-list.spec.js +0 -132
  266. package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.d.ts +0 -1
  267. package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.js +0 -87
  268. package/lib/esm/components/c4-cluster-overview/applications.spec.d.ts +0 -1
  269. package/lib/esm/components/c4-cluster-overview/applications.spec.js +0 -58
  270. package/lib/esm/components/c4-cluster-overview/cluster-load.formatNumber.test.d.ts +0 -1
  271. package/lib/esm/components/c4-cluster-overview/cluster-load.formatNumber.test.js +0 -38
  272. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.d.ts +0 -1
  273. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.js +0 -93
  274. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.d.ts +0 -1
  275. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.js +0 -50
  276. package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.spec.d.ts +0 -1
  277. package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.spec.js +0 -42
  278. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.d.ts +0 -1
  279. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.js +0 -120
  280. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.d.ts +0 -1
  281. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.js +0 -40
  282. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.d.ts +0 -1
  283. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.js +0 -83
  284. package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.d.ts +0 -1
  285. package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.js +0 -350
  286. package/lib/esm/components/c4-data-table/c4-data-table.spec.d.ts +0 -1
  287. package/lib/esm/components/c4-data-table/c4-data-table.spec.js +0 -122
  288. package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.d.ts +0 -1
  289. package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.js +0 -151
  290. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.d.ts +0 -1
  291. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.js +0 -33
  292. package/lib/esm/components/c4-page-template/c4-page-template.spec.d.ts +0 -1
  293. package/lib/esm/components/c4-page-template/c4-page-template.spec.js +0 -58
  294. package/lib/esm/components/c4-page-template/c4-page-template.stories.d.ts +0 -6
  295. package/lib/esm/components/c4-page-template/c4-page-template.stories.js +0 -73
  296. package/lib/esm/components/c4-stackdriver-links/c4-stackdriver-links.d.ts +0 -3
  297. package/lib/esm/components/c4-stackdriver-links/c4-stackdriver-links.js +0 -25
  298. package/lib/esm/components/c4-stackdriver-links/c4-stackdriver-links.types.d.ts +0 -12
  299. package/lib/esm/components/c4-tabs/c4-tabs.spec.d.ts +0 -1
  300. package/lib/esm/components/c4-tabs/c4-tabs.spec.js +0 -97
  301. package/lib/esm/components/c4-tabs/c4-tabs.stories.d.ts +0 -6
  302. package/lib/esm/components/c4-tabs/c4-tabs.stories.js +0 -35
  303. package/lib/esm/components/shared-charts/ds-charts.smoke.spec.d.ts +0 -1
  304. package/lib/esm/components/shared-charts/ds-charts.smoke.spec.js +0 -47
  305. package/lib/esm/externalUrls.const.spec.d.ts +0 -1
  306. package/lib/esm/externalUrls.const.spec.js +0 -102
  307. package/lib/esm/runtime/c4-console-authz.spec.d.ts +0 -1
  308. package/lib/esm/runtime/c4-console-authz.spec.js +0 -202
  309. package/lib/esm/runtime/c4-console-data-context.spec.d.ts +0 -1
  310. package/lib/esm/runtime/c4-console-data-context.spec.js +0 -354
  311. package/lib/esm/runtime/c4-console-data-store.nav.spec.d.ts +0 -1
  312. package/lib/esm/runtime/c4-console-data-store.nav.spec.js +0 -122
  313. package/lib/esm/runtime/c4-console-data-store.spec.d.ts +0 -1
  314. package/lib/esm/runtime/c4-console-data-store.spec.js +0 -409
  315. package/lib/esm/runtime/c4-user-notifications-context.spec.d.ts +0 -1
  316. package/lib/esm/runtime/c4-user-notifications-context.spec.js +0 -82
  317. package/lib/esm/runtime/nav/camunda-apps.spec.d.ts +0 -1
  318. package/lib/esm/runtime/nav/camunda-apps.spec.js +0 -90
  319. package/lib/esm/runtime/nav/use-webapp-nav-data.spec.d.ts +0 -1
  320. package/lib/esm/runtime/nav/use-webapp-nav-data.spec.js +0 -91
  321. package/lib/esm/setupTests.d.ts +0 -1
  322. package/lib/esm/setupTests.js +0 -37
  323. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.d.ts +0 -1
  324. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.js +0 -49
  325. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.permissions.spec.d.ts +0 -1
  326. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.permissions.spec.js +0 -471
  327. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.d.ts +0 -1
  328. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +0 -95
  329. package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.d.ts +0 -1
  330. package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.js +0 -33
  331. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.spec.d.ts +0 -1
  332. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.spec.js +0 -72
  333. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.spec.d.ts +0 -1
  334. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.spec.js +0 -85
  335. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.mcp.spec.d.ts +0 -1
  336. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.mcp.spec.js +0 -105
  337. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.d.ts +0 -1
  338. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.js +0 -226
  339. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.spec.d.ts +0 -1
  340. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.spec.js +0 -179
  341. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.d.ts +0 -1
  342. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +0 -1255
  343. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.spec.d.ts +0 -1
  344. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.spec.js +0 -397
  345. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.d.ts +0 -1
  346. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +0 -488
  347. package/lib/esm/widgets/cluster-details/tabs/url-utils.test.d.ts +0 -1
  348. package/lib/esm/widgets/cluster-details/tabs/url-utils.test.js +0 -34
  349. package/lib/esm/widgets/clusters/c4-clusters-page.spec.d.ts +0 -1
  350. package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +0 -502
  351. package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.d.ts +0 -1
  352. package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +0 -226
  353. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.spec.d.ts +0 -1
  354. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.spec.js +0 -191
  355. package/lib/esm/widgets/group-details/c4-group-details-page.spec.d.ts +0 -1
  356. package/lib/esm/widgets/group-details/c4-group-details-page.spec.js +0 -35
  357. package/lib/esm/widgets/management/c4-management-app.spec.d.ts +0 -1
  358. package/lib/esm/widgets/management/c4-management-app.spec.js +0 -509
  359. package/lib/esm/widgets/management/c4-management-page.spec.d.ts +0 -1
  360. package/lib/esm/widgets/management/c4-management-page.spec.js +0 -40
  361. package/lib/esm/widgets/management/management-tabs.spec.d.ts +0 -1
  362. package/lib/esm/widgets/management/management-tabs.spec.js +0 -28
  363. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.spec.d.ts +0 -1
  364. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.spec.js +0 -246
  365. package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.d.ts +0 -1
  366. package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.js +0 -225
  367. package/lib/esm/widgets/use-extend-trial.spec.d.ts +0 -1
  368. package/lib/esm/widgets/use-extend-trial.spec.js +0 -79
  369. package/lib/esm/widgets/user-details/c4-user-details-page.spec.d.ts +0 -1
  370. package/lib/esm/widgets/user-details/c4-user-details-page.spec.js +0 -65
  371. /package/lib/esm/components/{c4-stackdriver-links/c4-stackdriver-links.types.js → c4-tsuga-links/c4-tsuga-links.types.js} +0 -0
@@ -1,122 +0,0 @@
1
- /*
2
- * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
- * under one or more contributor license agreements. Licensed under a commercial license.
4
- * You may not use this file except in compliance with the commercial license.
5
- */
6
- import { SseEntity, SseType } from '@camunda/ccma-shared-types';
7
- import { beforeEach, describe, expect, it, vi } from 'vitest';
8
- import { ConsoleDataStore } from './c4-console-data-store.js';
9
- vi.mock('@camunda/ccma-api', () => ({
10
- ExternalAccountsService: {
11
- getMyOrganizations: vi.fn(),
12
- },
13
- ExternalConsoleService: {
14
- getOrgClusters: vi.fn(),
15
- },
16
- // Unused by these tests but imported by the store module.
17
- AuditLoggerService: {},
18
- ConsoleClusterService: {},
19
- EarlyAccessFeaturesService: {},
20
- GenerationService: {},
21
- HdpService: {},
22
- HttpError: class {
23
- },
24
- OrganizationMembersService: {},
25
- OrgsService: {},
26
- correlationHeaders: () => ({}),
27
- }));
28
- import { ExternalAccountsService, ExternalConsoleService, } from '@camunda/ccma-api';
29
- const FAKE_RUNTIME = {
30
- stage: 'dev',
31
- auth: { getAccessToken: async () => 'token' },
32
- backendUrls: {},
33
- };
34
- const cacheEntry = (data) => ({
35
- data,
36
- isLoading: false,
37
- error: null,
38
- lastFetched: null,
39
- });
40
- const makeStore = (webappClusters = {}) => ConsoleDataStore.create({
41
- clusters: {},
42
- orgInfo: {},
43
- orgOwner: {},
44
- earlyAccessFeatures: {},
45
- members: {},
46
- audits: {},
47
- clusterCapacity: {},
48
- upgradableGenerations: {},
49
- generationDetails: {},
50
- webappClusters,
51
- });
52
- describe('ConsoleDataStore.fetchMyOrgs', () => {
53
- beforeEach(() => vi.clearAllMocks());
54
- it('sorts organizations alphabetically by name', async () => {
55
- vi.mocked(ExternalAccountsService.getMyOrganizations).mockResolvedValue([
56
- { uuid: '1', name: 'Zeta' },
57
- { uuid: '2', name: 'Alpha' },
58
- ]);
59
- const store = makeStore();
60
- store.setRuntime(FAKE_RUNTIME);
61
- await store.fetchMyOrgs();
62
- expect(store.getMyOrgs()?.map((o) => o.name)).toEqual(['Alpha', 'Zeta']);
63
- });
64
- it('skips the fetch when already cached (no force)', async () => {
65
- vi.mocked(ExternalAccountsService.getMyOrganizations).mockResolvedValue([
66
- { uuid: '1', name: 'Alpha' },
67
- ]);
68
- const store = makeStore();
69
- store.setRuntime(FAKE_RUNTIME);
70
- await store.fetchMyOrgs();
71
- await store.fetchMyOrgs();
72
- expect(ExternalAccountsService.getMyOrganizations).toHaveBeenCalledTimes(1);
73
- });
74
- });
75
- describe('ConsoleDataStore.fetchWebappClusters', () => {
76
- beforeEach(() => vi.clearAllMocks());
77
- it('caches clusters keyed by orgId', async () => {
78
- vi.mocked(ExternalConsoleService.getOrgClusters).mockResolvedValue([
79
- { uuid: 'c1', name: 'Cluster 1' },
80
- ]);
81
- const store = makeStore();
82
- store.setRuntime(FAKE_RUNTIME);
83
- await store.fetchWebappClusters('org-1');
84
- expect(store.getWebappClusters('org-1')?.map((c) => c.uuid)).toEqual(['c1']);
85
- expect(ExternalConsoleService.getOrgClusters).toHaveBeenCalledWith(expect.objectContaining({ params: { orgId: 'org-1' } }));
86
- });
87
- });
88
- describe('handleClusterChange patches the webappClusters cache', () => {
89
- it('upserts a cluster from an SSE payload when the cache is populated', () => {
90
- const store = makeStore({
91
- 'org-1': cacheEntry([{ uuid: 'c1', name: 'Old name' }]),
92
- });
93
- store.setRuntime(FAKE_RUNTIME);
94
- store.handleClusterChange({
95
- org: 'org-1',
96
- entity: SseEntity.CLUSTER,
97
- type: SseType.UPDATED,
98
- clusterId: 'c1',
99
- payload: { cluster: { uuid: 'c1', name: 'New name' } },
100
- });
101
- expect(store.getWebappClusters('org-1')?.[0]).toMatchObject({
102
- uuid: 'c1',
103
- name: 'New name',
104
- });
105
- });
106
- it('removes a cluster on a DELETED event', () => {
107
- const store = makeStore({
108
- 'org-1': cacheEntry([
109
- { uuid: 'c1', name: 'One' },
110
- { uuid: 'c2', name: 'Two' },
111
- ]),
112
- });
113
- store.setRuntime(FAKE_RUNTIME);
114
- store.handleClusterChange({
115
- org: 'org-1',
116
- entity: SseEntity.CLUSTER,
117
- type: SseType.DELETED,
118
- clusterId: 'c1',
119
- });
120
- expect(store.getWebappClusters('org-1')?.map((c) => c.uuid)).toEqual(['c2']);
121
- });
122
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,409 +0,0 @@
1
- /*
2
- * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
- * under one or more contributor license agreements. Licensed under a commercial license.
4
- * You may not use this file except in compliance with the commercial license.
5
- */
6
- import { SseEntity } from '@camunda/ccma-shared-types';
7
- import { beforeEach, describe, expect, it, vi } from 'vitest';
8
- import { ConsoleDataStore } from './c4-console-data-store.js';
9
- vi.mock('@camunda/ccma-api', () => ({
10
- GenerationService: {
11
- getUpgradableMulti: vi
12
- .fn()
13
- .mockResolvedValue({ preferred: null, options: [] }),
14
- getGeneration: vi.fn().mockResolvedValue(undefined),
15
- upgradeCluster: vi.fn().mockResolvedValue(undefined),
16
- },
17
- ClusterService: { updateCluster: vi.fn() },
18
- OrgsService: { getOrgInfo: vi.fn(), getOwner: vi.fn() },
19
- EarlyAccessService: { getEarlyAccessFeatures: vi.fn() },
20
- MembersService: { getMembers: vi.fn() },
21
- AuditService: { getAudits: vi.fn() },
22
- HdpService: { getClusterCapacity: vi.fn() },
23
- ConsoleApiClientsService: { getAll: vi.fn().mockResolvedValue([]) },
24
- correlationHeaders: () => ({}),
25
- }));
26
- import { ConsoleApiClientsService, GenerationService, HdpService, } from '@camunda/ccma-api';
27
- const FAKE_RUNTIME = {
28
- stage: 'dev',
29
- auth: { getAccessToken: async () => 'token' },
30
- backendUrls: {
31
- consoleApiBaseUrl: 'https://console.example.com',
32
- },
33
- };
34
- const makeStore = () => ConsoleDataStore.create({
35
- clusters: {},
36
- orgInfo: {},
37
- orgOwner: {},
38
- earlyAccessFeatures: {},
39
- members: {},
40
- audits: {},
41
- clusterCapacity: {},
42
- upgradableGenerations: {},
43
- generationDetails: {},
44
- });
45
- describe('ConsoleDataStore.fetchUpgradableGenerations', () => {
46
- beforeEach(() => {
47
- vi.clearAllMocks();
48
- });
49
- it('passes clusterId to GenerationService.getUpgradableMulti', async () => {
50
- const store = makeStore();
51
- store.setRuntime(FAKE_RUNTIME);
52
- await store.fetchUpgradableGenerations('gen-uuid', 'cluster-uuid');
53
- expect(GenerationService.getUpgradableMulti).toHaveBeenCalledWith(expect.objectContaining({
54
- fromGenerationUuid: 'gen-uuid',
55
- clusterId: 'cluster-uuid',
56
- }));
57
- });
58
- it('calls GenerationService.getUpgradableMulti without clusterId when not provided', async () => {
59
- const store = makeStore();
60
- store.setRuntime(FAKE_RUNTIME);
61
- await store.fetchUpgradableGenerations('gen-uuid');
62
- expect(GenerationService.getUpgradableMulti).toHaveBeenCalledWith(expect.objectContaining({
63
- fromGenerationUuid: 'gen-uuid',
64
- }));
65
- expect(GenerationService.getUpgradableMulti).toHaveBeenCalledWith(expect.not.objectContaining({ clusterId: expect.anything() }));
66
- });
67
- });
68
- describe('ConsoleDataStore.fetchClients', () => {
69
- beforeEach(() => {
70
- vi.clearAllMocks();
71
- });
72
- it('populates the clients cache from ConsoleApiClientsService.getAll', async () => {
73
- const store = makeStore();
74
- store.setRuntime(FAKE_RUNTIME);
75
- const clientsList = [
76
- { uuid: 'client-1', clientId: 'id-1', name: 'Client 1' },
77
- ];
78
- vi.mocked(ConsoleApiClientsService.getAll).mockResolvedValueOnce(clientsList);
79
- await store.fetchClients('org-1');
80
- expect(ConsoleApiClientsService.getAll).toHaveBeenCalledWith(expect.objectContaining({ params: { orgId: 'org-1' } }));
81
- expect(store.getClients('org-1')).toEqual(clientsList);
82
- });
83
- it('updates an already-populated clients cache when forced', async () => {
84
- const store = ConsoleDataStore.create({
85
- clusters: {},
86
- orgInfo: {},
87
- orgOwner: {},
88
- earlyAccessFeatures: {},
89
- members: {},
90
- audits: {},
91
- clients: {
92
- 'org-1': {
93
- data: [{ uuid: 'old-client' }],
94
- isLoading: false,
95
- error: null,
96
- lastFetched: null,
97
- },
98
- },
99
- clusterCapacity: {},
100
- upgradableGenerations: {},
101
- generationDetails: {},
102
- });
103
- store.setRuntime(FAKE_RUNTIME);
104
- const nextClients = [{ uuid: 'new-client' }];
105
- vi.mocked(ConsoleApiClientsService.getAll).mockResolvedValueOnce(nextClients);
106
- await store.fetchClients('org-1', { force: true });
107
- expect(store.getClients('org-1')).toEqual(nextClients);
108
- });
109
- });
110
- describe('ConsoleDataStore.handleClusterChange', () => {
111
- it('bumps sse entity versions for all SseEntity values', () => {
112
- const store = ConsoleDataStore.create({
113
- clusters: {},
114
- orgInfo: {},
115
- orgOwner: {},
116
- earlyAccessFeatures: {},
117
- members: {},
118
- audits: {},
119
- clusterCapacity: {},
120
- upgradableGenerations: {},
121
- generationDetails: {},
122
- });
123
- const orgId = 'org-1';
124
- const clusterId = 'cluster-1';
125
- const entities = Object.values(SseEntity);
126
- for (const entity of entities) {
127
- const before = store.getSseEntityVersion(orgId, entity, clusterId);
128
- store.handleClusterChange({
129
- org: orgId,
130
- entity,
131
- clusterId,
132
- payload: { name: 'x', uuid: 'u' },
133
- type: 'created',
134
- });
135
- const after = store.getSseEntityVersion(orgId, entity, clusterId);
136
- expect(after).toBe(before + 1);
137
- }
138
- });
139
- it('upserts refreshed cluster data into the shared cache', () => {
140
- const store = ConsoleDataStore.create({
141
- clusters: {
142
- 'org-1': {
143
- data: [
144
- {
145
- uuid: 'cluster-1',
146
- externalMetadata: {
147
- tasklistV2Enabled: false,
148
- },
149
- },
150
- ],
151
- isLoading: false,
152
- error: null,
153
- lastFetched: null,
154
- },
155
- },
156
- orgInfo: {},
157
- orgOwner: {},
158
- earlyAccessFeatures: {},
159
- members: {},
160
- audits: {},
161
- clusterCapacity: {},
162
- upgradableGenerations: {},
163
- generationDetails: {},
164
- });
165
- store.upsertCluster('org-1', {
166
- uuid: 'cluster-1',
167
- externalMetadata: {
168
- tasklistV2Enabled: true,
169
- },
170
- });
171
- expect(store.getClusters('org-1')).toEqual([
172
- expect.objectContaining({
173
- uuid: 'cluster-1',
174
- externalMetadata: expect.objectContaining({
175
- tasklistV2Enabled: true,
176
- }),
177
- }),
178
- ]);
179
- });
180
- it('preserves nested planType fields when an SSE payload is partial', () => {
181
- const store = ConsoleDataStore.create({
182
- clusters: {
183
- 'org-1': {
184
- data: [
185
- {
186
- uuid: 'cluster-1',
187
- planType: {
188
- uuid: 'plan-1',
189
- name: 'Advanced',
190
- category: 'ADVANCED_OFFERING',
191
- availabilityClass: 'MULTI_TENANT',
192
- },
193
- },
194
- ],
195
- isLoading: false,
196
- error: null,
197
- lastFetched: null,
198
- },
199
- },
200
- orgInfo: {},
201
- orgOwner: {},
202
- earlyAccessFeatures: {},
203
- members: {},
204
- audits: {},
205
- clusterCapacity: {},
206
- upgradableGenerations: {},
207
- generationDetails: {},
208
- });
209
- store.handleClusterChange({
210
- org: 'org-1',
211
- entity: SseEntity.CLUSTER,
212
- clusterId: 'cluster-1',
213
- type: 'updated',
214
- payload: {
215
- cluster: {
216
- uuid: 'cluster-1',
217
- planType: {
218
- uuid: 'plan-1',
219
- name: 'Advanced',
220
- },
221
- },
222
- },
223
- });
224
- expect(store.getClusters('org-1')).toEqual([
225
- expect.objectContaining({
226
- uuid: 'cluster-1',
227
- planType: expect.objectContaining({
228
- uuid: 'plan-1',
229
- name: 'Advanced',
230
- category: 'ADVANCED_OFFERING',
231
- availabilityClass: 'MULTI_TENANT',
232
- }),
233
- }),
234
- ]);
235
- });
236
- it('treats nested Date values as scalar data during merges', () => {
237
- const previousUpdatedAt = new Date('2026-01-01T00:00:00.000Z');
238
- const nextUpdatedAt = new Date('2026-02-01T00:00:00.000Z');
239
- const store = ConsoleDataStore.create({
240
- clusters: {
241
- 'org-1': {
242
- data: [
243
- {
244
- uuid: 'cluster-1',
245
- status: {
246
- ready: 'Healthy',
247
- updatedAt: previousUpdatedAt,
248
- },
249
- },
250
- ],
251
- isLoading: false,
252
- error: null,
253
- lastFetched: null,
254
- },
255
- },
256
- orgInfo: {},
257
- orgOwner: {},
258
- earlyAccessFeatures: {},
259
- members: {},
260
- audits: {},
261
- clusterCapacity: {},
262
- upgradableGenerations: {},
263
- generationDetails: {},
264
- });
265
- store.upsertCluster('org-1', {
266
- uuid: 'cluster-1',
267
- status: {
268
- updatedAt: nextUpdatedAt,
269
- },
270
- });
271
- expect(store.getClusters('org-1')).toEqual([
272
- expect.objectContaining({
273
- uuid: 'cluster-1',
274
- status: expect.objectContaining({
275
- ready: 'Healthy',
276
- updatedAt: nextUpdatedAt,
277
- }),
278
- }),
279
- ]);
280
- });
281
- it('clears externalMetadata.optimizeFiltering when a CLUSTER event turns it off', () => {
282
- const store = makeStore();
283
- store.upsertCluster('org-1', {
284
- uuid: 'cluster-1',
285
- externalMetadata: {
286
- optimizeFiltering: {
287
- processDefinition: { inclusion: ['order-process'] },
288
- },
289
- },
290
- });
291
- // Disabling drops the `optimizeFiltering` key entirely from the JSON
292
- // wire payload (the backend persists/serializes it as `undefined`, which
293
- // JSON.stringify omits) rather than sending an explicit `null`.
294
- const disabledPayload = JSON.parse(JSON.stringify({
295
- uuid: 'cluster-1',
296
- externalMetadata: { optimizeFiltering: undefined },
297
- }));
298
- store.handleClusterChange({
299
- org: 'org-1',
300
- entity: SseEntity.CLUSTER,
301
- clusterId: 'cluster-1',
302
- type: 'updated',
303
- payload: { cluster: disabledPayload },
304
- });
305
- const cluster = store.getClusters('org-1')?.[0];
306
- expect(cluster?.externalMetadata?.optimizeFiltering).toBeUndefined();
307
- });
308
- it('triggers a forced fetchClients refetch when the clients cache is present', async () => {
309
- vi.clearAllMocks();
310
- const store = ConsoleDataStore.create({
311
- clusters: {},
312
- orgInfo: {},
313
- orgOwner: {},
314
- earlyAccessFeatures: {},
315
- members: {},
316
- audits: {},
317
- clients: {
318
- 'org-1': {
319
- // Cache already has data and is not loading, so a *non-forced*
320
- // fetchClients call would short-circuit and skip the API call
321
- // (see the early-return in fetchClients). Observing a call to
322
- // ConsoleApiClientsService.getAll here proves handleClusterChange
323
- // passed `{ force: true }`.
324
- data: [{ uuid: 'existing-client' }],
325
- isLoading: false,
326
- error: null,
327
- lastFetched: new Date(),
328
- },
329
- },
330
- clusterCapacity: {},
331
- upgradableGenerations: {},
332
- generationDetails: {},
333
- });
334
- store.setRuntime(FAKE_RUNTIME);
335
- const refreshedClients = [{ uuid: 'refreshed-client' }];
336
- vi.mocked(ConsoleApiClientsService.getAll).mockResolvedValueOnce(refreshedClients);
337
- store.handleClusterChange({
338
- org: 'org-1',
339
- entity: SseEntity.CONSOLE_API_CLIENT,
340
- clusterId: 'client-1',
341
- type: 'created',
342
- });
343
- await vi.waitFor(() => {
344
- expect(ConsoleApiClientsService.getAll).toHaveBeenCalledWith(expect.objectContaining({ params: { orgId: 'org-1' } }));
345
- });
346
- await vi.waitFor(() => {
347
- expect(store.getClients('org-1')).toEqual(refreshedClients);
348
- });
349
- });
350
- it('does not trigger fetchClients when the clients cache has not been populated', () => {
351
- vi.clearAllMocks();
352
- const store = makeStore();
353
- store.setRuntime(FAKE_RUNTIME);
354
- store.handleClusterChange({
355
- org: 'org-1',
356
- entity: SseEntity.CONSOLE_API_CLIENT,
357
- clusterId: 'client-1',
358
- type: 'created',
359
- });
360
- expect(ConsoleApiClientsService.getAll).not.toHaveBeenCalled();
361
- });
362
- });
363
- describe('ConsoleDataStore.fetchClusterCapacity', () => {
364
- beforeEach(() => {
365
- vi.clearAllMocks();
366
- });
367
- it('fetches capacity for all clusters in a single batched request', async () => {
368
- const store = makeStore();
369
- store.setRuntime(FAKE_RUNTIME);
370
- vi.mocked(HdpService.getClusterCapacity).mockResolvedValue([
371
- { clusterId: 'c1', ts: 0, avg: 0.1, min: 0.1, max: 0.1 },
372
- { clusterId: 'c2', ts: 0, avg: 0.2, min: 0.2, max: 0.2 },
373
- { clusterId: 'c3', ts: 0, avg: 0.3, min: 0.3, max: 0.3 },
374
- ]);
375
- await store.fetchClusterCapacity('org-1', ['c1', 'c2', 'c3']);
376
- // Exactly one HTTP call for N clusters (previously N serial calls).
377
- expect(HdpService.getClusterCapacity).toHaveBeenCalledTimes(1);
378
- expect(HdpService.getClusterCapacity).toHaveBeenCalledWith(expect.objectContaining({
379
- params: expect.objectContaining({
380
- orgId: 'org-1',
381
- clusterIds: ['c1', 'c2', 'c3'],
382
- operation: 'latest',
383
- }),
384
- }));
385
- expect(store.getClusterCapacity('org-1', 'c1')).toBe(0.1);
386
- expect(store.getClusterCapacity('org-1', 'c2')).toBe(0.2);
387
- expect(store.getClusterCapacity('org-1', 'c3')).toBe(0.3);
388
- });
389
- it('maps only clusters present in the response (partial data)', async () => {
390
- const store = makeStore();
391
- store.setRuntime(FAKE_RUNTIME);
392
- vi.mocked(HdpService.getClusterCapacity).mockResolvedValue([
393
- { clusterId: 'c1', ts: 0, avg: 0.5, min: 0.5, max: 0.5 },
394
- ]);
395
- await store.fetchClusterCapacity('org-1', ['c1', 'c2']);
396
- expect(store.getClusterCapacity('org-1', 'c1')).toBe(0.5);
397
- expect(store.getClusterCapacity('org-1', 'c2')).toBeUndefined();
398
- });
399
- it('caches an empty result on request failure without throwing', async () => {
400
- const store = makeStore();
401
- store.setRuntime(FAKE_RUNTIME);
402
- vi.mocked(HdpService.getClusterCapacity).mockRejectedValue(new Error('boom'));
403
- await expect(store.fetchClusterCapacity('org-1', ['c1'])).resolves.toBeUndefined();
404
- expect(store.getClusterCapacity('org-1', 'c1')).toBeUndefined();
405
- // A second call is a cache hit (no retry storm).
406
- await store.fetchClusterCapacity('org-1', ['c1']);
407
- expect(HdpService.getClusterCapacity).toHaveBeenCalledTimes(1);
408
- });
409
- });
@@ -1,82 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { act, renderHook, waitFor } from '@testing-library/react';
3
- import { beforeEach, describe, expect, it, vi } from 'vitest';
4
- vi.mock('@camunda/ccma-api', () => ({
5
- ExternalNotificationsService: {
6
- getUserNotifications: vi.fn(),
7
- setNotificationState: vi.fn().mockResolvedValue(undefined),
8
- markManyAsRead: vi.fn().mockResolvedValue(undefined),
9
- dismissAll: vi.fn().mockResolvedValue(undefined),
10
- trackEvent: vi.fn().mockResolvedValue(undefined),
11
- streamUserNotifications: vi.fn(() => ({ close: vi.fn(), state: 'closed' })),
12
- },
13
- // Imported by to-api-config (used by the provider) — must be present on the mock.
14
- correlationHeaders: vi.fn(() => ({})),
15
- }));
16
- import { ExternalNotificationsService } from '@camunda/ccma-api';
17
- import { C4ConsoleRuntimeProvider } from './c4-console-runtime-context.js';
18
- import { C4UserNotificationsProvider, useC4UserNotifications, } from './c4-user-notifications-context.js';
19
- const runtime = {
20
- stage: 'dev',
21
- auth: { getAccessToken: async () => 'token' },
22
- backendUrls: {},
23
- };
24
- const notif = (over) => ({
25
- uuid: 'n1',
26
- timestamp: 1,
27
- state: 'new',
28
- source: 'console',
29
- type: 'org',
30
- title: 't',
31
- description: 'd',
32
- ...over,
33
- });
34
- const wrapper = ({ children }) => (_jsx(C4ConsoleRuntimeProvider, { config: runtime, children: _jsx(C4UserNotificationsProvider, { orgId: 'org-1', live: false, children: children }) }));
35
- const mockService = vi.mocked(ExternalNotificationsService);
36
- beforeEach(() => {
37
- vi.clearAllMocks();
38
- mockService.getUserNotifications.mockResolvedValue([
39
- notif({ uuid: 'old', timestamp: 1, state: 'read' }),
40
- notif({ uuid: 'new', timestamp: 2, state: 'new' }),
41
- ]);
42
- });
43
- describe('C4UserNotificationsProvider', () => {
44
- it('fetches, sorts newest-first, and derives hasUnread', async () => {
45
- const { result } = renderHook(() => useC4UserNotifications(), { wrapper });
46
- await waitFor(() => expect(result.current.isLoading).toBe(false));
47
- expect(result.current.notifications.map((n) => n.uuid)).toEqual([
48
- 'new',
49
- 'old',
50
- ]);
51
- expect(result.current.hasUnread).toBe(true);
52
- });
53
- it('markAsRead optimistically flips state and persists', async () => {
54
- const { result } = renderHook(() => useC4UserNotifications(), { wrapper });
55
- await waitFor(() => expect(result.current.isLoading).toBe(false));
56
- act(() => result.current.markAsRead('new'));
57
- expect(result.current.notifications.find((n) => n.uuid === 'new')?.state).toBe('read');
58
- expect(result.current.hasUnread).toBe(false);
59
- expect(mockService.setNotificationState).toHaveBeenCalledWith(expect.objectContaining({ params: { uuid: 'new', state: 'read' } }));
60
- });
61
- it('dismiss removes the notification and persists', async () => {
62
- const { result } = renderHook(() => useC4UserNotifications(), { wrapper });
63
- await waitFor(() => expect(result.current.isLoading).toBe(false));
64
- act(() => result.current.dismiss('old'));
65
- expect(result.current.notifications.map((n) => n.uuid)).toEqual(['new']);
66
- expect(mockService.setNotificationState).toHaveBeenCalledWith(expect.objectContaining({ params: { uuid: 'old', state: 'dismiss' } }));
67
- });
68
- it('markAllAsRead batches only the unread uuids', async () => {
69
- const { result } = renderHook(() => useC4UserNotifications(), { wrapper });
70
- await waitFor(() => expect(result.current.isLoading).toBe(false));
71
- act(() => result.current.markAllAsRead());
72
- expect(mockService.markManyAsRead).toHaveBeenCalledWith(expect.objectContaining({ params: { uuids: ['new'] } }));
73
- expect(result.current.hasUnread).toBe(false);
74
- });
75
- it('dismissAll clears the list and calls the bulk endpoint', async () => {
76
- const { result } = renderHook(() => useC4UserNotifications(), { wrapper });
77
- await waitFor(() => expect(result.current.isLoading).toBe(false));
78
- act(() => result.current.dismissAll());
79
- expect(result.current.notifications).toHaveLength(0);
80
- expect(mockService.dismissAll).toHaveBeenCalledWith(expect.objectContaining({ params: { orgId: 'org-1' } }));
81
- });
82
- });
@@ -1 +0,0 @@
1
- export {};