@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,102 +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 { describe, expect, it } from 'vitest';
7
- import { C4_EXTERNAL_URLS, getC4ClusterClientDetailsDocsUrl, getC4ClusterDetailsUrls, getC4ClustersGettingStartedHref, getC4CreateClusterExternalLinks, getC4TalkToAnExpertUrl, } from './externalUrls.const.js';
8
- describe('getC4TalkToAnExpertUrl', () => {
9
- it('returns the base URL when no properties are provided', () => {
10
- expect(getC4TalkToAnExpertUrl()).toBe(C4_EXTERNAL_URLS.help.talkToAnExpert);
11
- });
12
- it('filters undefined and blank values while appending valid params', () => {
13
- expect(getC4TalkToAnExpertUrl({
14
- email: 'user@example.com',
15
- utm_content: ' ',
16
- })).toBe(`${C4_EXTERNAL_URLS.help.talkToAnExpert}&email=user%40example.com`);
17
- });
18
- it('appends multiple valid params to the existing query string', () => {
19
- expect(getC4TalkToAnExpertUrl({
20
- email: 'user@example.com',
21
- utm_content: 'pricing',
22
- })).toBe(`${C4_EXTERNAL_URLS.help.talkToAnExpert}&email=user%40example.com&utm_content=pricing`);
23
- });
24
- });
25
- describe('getC4ClusterDetailsUrls', () => {
26
- it('fills cluster detail docs with defaults when overrides are missing', () => {
27
- const urls = getC4ClusterDetailsUrls({
28
- clusters: '/org/org-1/clusters',
29
- });
30
- expect(urls).toEqual({
31
- clusters: '/org/org-1/clusters',
32
- docs: {
33
- alerts: C4_EXTERNAL_URLS.docs.consoleAlerts,
34
- auditlogs: C4_EXTERNAL_URLS.docs.auditLog,
35
- ipWhitelist: C4_EXTERNAL_URLS.docs.consoleIpWhitelist,
36
- clients: C4_EXTERNAL_URLS.docs.consoleClusterClients,
37
- connectorSecrets: C4_EXTERNAL_URLS.docs.connectorSecrets,
38
- mcpSetup: C4_EXTERNAL_URLS.docs.mcpSetup,
39
- upgrade: {
40
- whatsNewIn88: C4_EXTERNAL_URLS.docs.whatsNewIn88,
41
- tasklistApiVersions: C4_EXTERNAL_URLS.docs.tasklistApiVersions,
42
- announcementsApiTools: C4_EXTERNAL_URLS.docs.announcementsApiTools,
43
- },
44
- byom: C4_EXTERNAL_URLS.docs.byom,
45
- hotBackups: C4_EXTERNAL_URLS.docs.hotBackups,
46
- secureConnectivity: C4_EXTERNAL_URLS.docs.secureConnectivity,
47
- releasePolicy: C4_EXTERNAL_URLS.docs.releasePolicy,
48
- identityAuthorization: C4_EXTERNAL_URLS.docs.identityAuthorizations,
49
- resourceAuthorizations: C4_EXTERNAL_URLS.docs.conceptsRBA,
50
- multiTenancy: C4_EXTERNAL_URLS.docs.multiTenancy,
51
- byoidp: C4_EXTERNAL_URLS.docs.byoidp,
52
- swagger: C4_EXTERNAL_URLS.docs.swagger,
53
- mcpOverview: C4_EXTERNAL_URLS.docs.mcpOverview,
54
- msTeamsIntegration: C4_EXTERNAL_URLS.docs.msTeamsIntegration,
55
- tasklistApiVersions: C4_EXTERNAL_URLS.docs.tasklistApiVersions,
56
- springZeebeGettingStarted: C4_EXTERNAL_URLS.docs.springZeebe,
57
- springZeebeConfig: C4_EXTERNAL_URLS.docs.springZeebeConfig,
58
- clusterLoad: C4_EXTERNAL_URLS.docs.clusterLoad,
59
- encryption: C4_EXTERNAL_URLS.docs.encryption,
60
- encryptionCli: C4_EXTERNAL_URLS.docs.byok.cliScript.learnMore,
61
- encryptionManual: C4_EXTERNAL_URLS.docs.byok.learnMoreAboutCreatingKmsKey,
62
- identityDocsUrl: C4_EXTERNAL_URLS.docs.introToIdentity,
63
- support: C4_EXTERNAL_URLS.help.enterpriseSupport,
64
- contact: C4_EXTERNAL_URLS.camunda.contact,
65
- },
66
- });
67
- });
68
- it('merges partial overrides with defaults', () => {
69
- const urls = getC4ClusterDetailsUrls({
70
- clusters: '/org/org-1/clusters',
71
- docs: {
72
- alerts: 'https://docs.example/alerts',
73
- upgrade: {
74
- whatsNewIn88: 'https://docs.example/upgrade',
75
- },
76
- },
77
- });
78
- expect(urls.docs.alerts).toBe('https://docs.example/alerts');
79
- expect(urls.docs.upgrade.whatsNewIn88).toBe('https://docs.example/upgrade');
80
- expect(urls.docs.upgrade.tasklistApiVersions).toBe(C4_EXTERNAL_URLS.docs.tasklistApiVersions);
81
- expect(urls.docs.contact).toBe(C4_EXTERNAL_URLS.camunda.contact);
82
- });
83
- });
84
- describe('trim-based docs helpers', () => {
85
- it('falls back for blank cluster client docs URLs', () => {
86
- expect(getC4ClusterClientDetailsDocsUrl(' ')).toBe(C4_EXTERNAL_URLS.docs.consoleClusterClients);
87
- });
88
- it('falls back for blank clusters getting started URLs', () => {
89
- expect(getC4ClustersGettingStartedHref(' ')).toBe('https://docs.camunda.io/docs/guides/');
90
- });
91
- });
92
- describe('getC4CreateClusterExternalLinks', () => {
93
- it('uses the centralized docs constants for defaults', () => {
94
- expect(getC4CreateClusterExternalLinks()).toEqual({
95
- docsEncryption: C4_EXTERNAL_URLS.docs.encryption,
96
- docsByok: C4_EXTERNAL_URLS.docs.byok.overview,
97
- docsAutopause: C4_EXTERNAL_URLS.docs.clusters.autoPause,
98
- docsTasklistApiVersions: C4_EXTERNAL_URLS.docs.tasklistApiVersions,
99
- identityAuthorizations: C4_EXTERNAL_URLS.docs.identityAuthorizations,
100
- });
101
- });
102
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,202 +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 { ConsolePermissions, OrganizationRole, } from '@camunda/ccma-shared-types';
7
- import { describe, expect, it } from 'vitest';
8
- import { deriveConsoleAuthzFromAccessToken, hasAvailableClusterReservation, isDeveloperBlockedFromClusterCreate, } from './c4-console-authz.js';
9
- function base64UrlEncode(input) {
10
- return btoa(input).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/g, '');
11
- }
12
- function makeFakeJwt(payload) {
13
- const header = { alg: 'none', typ: 'JWT' };
14
- const encodedHeader = base64UrlEncode(JSON.stringify(header));
15
- const encodedPayload = base64UrlEncode(JSON.stringify(payload));
16
- return `${encodedHeader}.${encodedPayload}.`;
17
- }
18
- describe('deriveConsoleAuthzFromAccessToken', () => {
19
- it('extracts permissions and org roles from the token', () => {
20
- const token = makeFakeJwt({
21
- permissions: [ConsolePermissions.CLUSTERS_DELETE_CLUSTER],
22
- 'https://camunda.com/orgs': [
23
- { id: 'org-1', roles: [OrganizationRole.ADMIN] },
24
- { id: 'org-2', roles: [OrganizationRole.VISITOR] },
25
- ],
26
- });
27
- const result = deriveConsoleAuthzFromAccessToken({
28
- accessToken: token,
29
- orgId: 'org-1',
30
- });
31
- expect(result.tokenPermissions).toContain(ConsolePermissions.CLUSTERS_DELETE_CLUSTER);
32
- expect(result.orgRoles).toEqual([OrganizationRole.ADMIN]);
33
- expect(result.features.console.clusters.canDeleteAllClusters).toBe(true);
34
- expect(result.visibilities.clusters?.canDelete).toBe(true);
35
- });
36
- it('derives cluster load visibility from org cluster read access', () => {
37
- const token = makeFakeJwt({
38
- permissions: [],
39
- 'https://camunda.com/orgs': [
40
- { id: 'org-1', roles: [OrganizationRole.VISITOR] },
41
- ],
42
- });
43
- const result = deriveConsoleAuthzFromAccessToken({
44
- accessToken: token,
45
- orgId: 'org-1',
46
- });
47
- expect(result.visibilities.clusters?.canSeeClusterLoad).toBe(true);
48
- });
49
- it('derives cluster mutation visibilities from org roles', () => {
50
- const token = makeFakeJwt({
51
- permissions: [],
52
- 'https://camunda.com/orgs': [
53
- { id: 'org-1', roles: [OrganizationRole.MEMBER] },
54
- ],
55
- });
56
- const result = deriveConsoleAuthzFromAccessToken({
57
- accessToken: token,
58
- orgId: 'org-1',
59
- });
60
- expect(result.visibilities.clusters?.canCreate).toBe(true);
61
- expect(result.visibilities.clusters?.canDelete).toBe(true);
62
- expect(result.visibilities.clusters?.canEdit).toBe(true);
63
- expect(result.visibilities.clusters?.canUpdateTag).toBe(true);
64
- expect(result.visibilities.clusters?.canWake).toBe(true);
65
- expect(result.visibilities.clusters?.canSleep).toBe(false);
66
- });
67
- it('keeps manual suspend tied to the internal token permission', () => {
68
- const token = makeFakeJwt({
69
- permissions: [
70
- ConsolePermissions.CLUSTERS_DELETE_CLUSTER,
71
- ConsolePermissions.CLUSTERS_CAN_SEND_TO_SLEEP,
72
- ConsolePermissions.CLUSTERS_CAN_UPDATE_CLUSTERPLANTYPE,
73
- ],
74
- 'https://camunda.com/orgs': [
75
- { id: 'org-1', roles: [OrganizationRole.VISITOR] },
76
- ],
77
- });
78
- const result = deriveConsoleAuthzFromAccessToken({
79
- accessToken: token,
80
- orgId: 'org-1',
81
- });
82
- expect(result.visibilities.clusters?.canCreate).toBe(false);
83
- expect(result.visibilities.clusters?.canDelete).toBe(false);
84
- expect(result.visibilities.clusters?.canEdit).toBe(false);
85
- expect(result.visibilities.clusters?.canUpdateTag).toBe(false);
86
- expect(result.visibilities.clusters?.canWake).toBe(false);
87
- expect(result.visibilities.clusters?.canSleep).toBe(true);
88
- expect(result.visibilities.clusters?.canSeeClusterLoad).toBe(true);
89
- });
90
- it('falls back to global token permissions for non-wake actions when org permissions are unavailable', () => {
91
- const token = makeFakeJwt({
92
- permissions: [
93
- ConsolePermissions.CLUSTERS_DELETE_CLUSTER,
94
- ConsolePermissions.CLUSTERS_CAN_SEND_TO_SLEEP,
95
- ConsolePermissions.CLUSTERS_CAN_UPDATE_CLUSTERPLANTYPE,
96
- ],
97
- 'https://camunda.com/orgs': [],
98
- });
99
- const result = deriveConsoleAuthzFromAccessToken({
100
- accessToken: token,
101
- orgId: 'org-1',
102
- });
103
- expect(result.visibilities.clusters?.canCreate).toBe(false);
104
- expect(result.visibilities.clusters?.canDelete).toBe(true);
105
- expect(result.visibilities.clusters?.canEdit).toBe(true);
106
- expect(result.visibilities.clusters?.canUpdateTag).toBe(true);
107
- expect(result.visibilities.clusters?.canWake).toBe(false);
108
- expect(result.visibilities.clusters?.canSleep).toBe(true);
109
- });
110
- it('is safe on invalid tokens', () => {
111
- const result = deriveConsoleAuthzFromAccessToken({
112
- accessToken: 'not-a-jwt',
113
- orgId: 'org-1',
114
- });
115
- expect(result.tokenPermissions).toEqual([]);
116
- expect(result.orgRoles).toEqual([]);
117
- expect(result.visibilities.clusters?.canDelete).toBe(false);
118
- });
119
- });
120
- describe('isDeveloperBlockedFromClusterCreate', () => {
121
- it('never blocks when the limit is off', () => {
122
- expect(isDeveloperBlockedFromClusterCreate({
123
- developerNoClusterCreateLimit: false,
124
- orgRoles: [OrganizationRole.DEVELOPER],
125
- })).toBe(false);
126
- });
127
- it('blocks a developer-only member when the limit is on', () => {
128
- expect(isDeveloperBlockedFromClusterCreate({
129
- developerNoClusterCreateLimit: true,
130
- orgRoles: [OrganizationRole.DEVELOPER],
131
- })).toBe(true);
132
- });
133
- it('does not block a developer who also holds a cluster-create role', () => {
134
- expect(isDeveloperBlockedFromClusterCreate({
135
- developerNoClusterCreateLimit: true,
136
- orgRoles: [OrganizationRole.DEVELOPER, OrganizationRole.ADMIN],
137
- })).toBe(false);
138
- });
139
- it('normalizes formatted role strings before matching', () => {
140
- // "Owner" (mixed case, as emitted by the raw claim) still normalizes to
141
- // the OWNER cluster-create role, so a developer who also holds it must
142
- // not be blocked. Note: the legacy "Organization Owner"/"Organization
143
- // Admin" aliases no longer normalize to anything (see the removal of
144
- // OrganizationRole.ORGANIZATION_ADMIN/ORGANIZATION_OWNER).
145
- expect(isDeveloperBlockedFromClusterCreate({
146
- developerNoClusterCreateLimit: true,
147
- orgRoles: ['Developer', 'Owner'],
148
- })).toBe(false);
149
- });
150
- });
151
- describe('hasAvailableClusterReservation', () => {
152
- it('allows creation while there are unused reservations', () => {
153
- expect(hasAvailableClusterReservation({
154
- clusterCount: 0,
155
- clusterPlanTypesToReserved: { 'plan-a': 1 },
156
- })).toBe(true);
157
- });
158
- it('blocks creation once reservations are used up', () => {
159
- expect(hasAvailableClusterReservation({
160
- clusterCount: 1,
161
- clusterPlanTypesToReserved: { 'plan-a': 1 },
162
- })).toBe(false);
163
- });
164
- it('sums reservations across plan types', () => {
165
- expect(hasAvailableClusterReservation({
166
- clusterCount: 1,
167
- clusterPlanTypesToReserved: { 'plan-a': 1, 'plan-b': 1 },
168
- })).toBe(true);
169
- });
170
- it('ignores the stringified "undefined" plan-type key', () => {
171
- expect(hasAvailableClusterReservation({
172
- clusterCount: 1,
173
- clusterPlanTypesToReserved: { 'plan-a': 1, undefined: 5 },
174
- })).toBe(false);
175
- });
176
- it('blocks when reservations are explicitly zero', () => {
177
- expect(hasAvailableClusterReservation({
178
- clusterCount: 0,
179
- clusterPlanTypesToReserved: { 'plan-a': 0 },
180
- })).toBe(false);
181
- });
182
- it('is permissive when reservation data is absent or empty', () => {
183
- expect(hasAvailableClusterReservation({
184
- clusterCount: 5,
185
- clusterPlanTypesToReserved: undefined,
186
- })).toBe(true);
187
- expect(hasAvailableClusterReservation({
188
- clusterCount: 5,
189
- clusterPlanTypesToReserved: {},
190
- })).toBe(true);
191
- });
192
- it('is permissive when values are non-numeric or an array (unparsed data)', () => {
193
- expect(hasAvailableClusterReservation({
194
- clusterCount: 5,
195
- clusterPlanTypesToReserved: { 'plan-a': '3', 'plan-b': Number.NaN },
196
- })).toBe(true);
197
- expect(hasAvailableClusterReservation({
198
- clusterCount: 5,
199
- clusterPlanTypesToReserved: [1, 2, 3],
200
- })).toBe(true);
201
- });
202
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,354 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
- * under one or more contributor license agreements. Licensed under a commercial license.
5
- * You may not use this file except in compliance with the commercial license.
6
- */
7
- /**
8
- * Characterization tests for the C4 console data layer.
9
- *
10
- * These pin the *observable contract* of `C4ConsoleDataProvider` /
11
- * `useC4ConsoleData` — the public API surface, that reads return the right
12
- * data, that consumers update when their data changes (fetch resolves, SSE
13
- * patches the cache), request dedup, error surfacing, and initialState seeding.
14
- *
15
- * They intentionally do NOT assert render counts or that a consumer re-renders
16
- * on *unrelated* changes: reducing that over-rendering is a planned improvement,
17
- * so pinning it here would be counter-productive. The goal is that everything
18
- * below stays green across a reactivity refactor of the provider.
19
- */
20
- import { SseEntity, SseType } from '@camunda/ccma-shared-types';
21
- import { act, render, renderHook, screen, waitFor, } from '@testing-library/react';
22
- import { observer } from 'mobx-react-lite';
23
- import { useEffect } from 'react';
24
- import { beforeEach, describe, expect, it, vi } from 'vitest';
25
- import { C4ConsoleDataProvider, useC4ConsoleData, } from './c4-console-data-context.js';
26
- import { C4ConsoleRuntimeProvider } from './c4-console-runtime-context.js';
27
- vi.mock('@camunda/ccma-api', () => ({
28
- AuditLoggerService: { getAudit: vi.fn() },
29
- ConsoleClusterService: { getClusters: vi.fn() },
30
- EarlyAccessFeaturesService: { getForOrg: vi.fn() },
31
- ExternalAccountsService: { getMyOrganizations: vi.fn() },
32
- ExternalConsoleService: { getOrgClusters: vi.fn() },
33
- GenerationService: {
34
- getUpgradableMulti: vi.fn(),
35
- getGeneration: vi.fn(),
36
- upgradeCluster: vi.fn(),
37
- },
38
- HdpService: { getClusterCapacity: vi.fn() },
39
- HttpError: class HttpError extends Error {
40
- },
41
- OrganizationMembersService: { getMembers: vi.fn() },
42
- OrgsService: { getOrgInfo: vi.fn(), getMyOrgs: vi.fn(), getOwner: vi.fn() },
43
- // toApiConfig wires this in as `getDynamicHeaders` on every request config;
44
- // Vitest's ESM mock throws on any access to an export the factory omits.
45
- correlationHeaders: () => ({}),
46
- }));
47
- import { ConsoleClusterService, ExternalConsoleService, } from '@camunda/ccma-api';
48
- import { useC4ClusterNavEntries } from './nav/use-webapp-nav-data.js';
49
- const runtime = {
50
- stage: 'dev',
51
- auth: { getAccessToken: async () => 'token' },
52
- backendUrls: {},
53
- };
54
- const cacheEntry = (data) => ({
55
- data,
56
- isLoading: false,
57
- error: null,
58
- lastFetched: null,
59
- });
60
- const wrapper = (initialState) => ({ children }) => (_jsx(C4ConsoleRuntimeProvider, { config: runtime, children: _jsx(C4ConsoleDataProvider, { initialState: initialState, children: children }) }));
61
- beforeEach(() => {
62
- vi.clearAllMocks();
63
- });
64
- describe('useC4ConsoleData — public API surface', () => {
65
- // Pins the client interface: every documented action/getter must remain
66
- // present with the same name so a refactor cannot silently drop or rename one.
67
- const ACTION_MEMBERS = [
68
- 'fetchClusters',
69
- 'fetchOrgInfo',
70
- 'fetchOrgOwner',
71
- 'fetchEarlyAccessFeatures',
72
- 'fetchMembers',
73
- 'fetchAudits',
74
- 'fetchClusterCapacity',
75
- 'fetchMyOrgs',
76
- 'fetchWebappClusters',
77
- 'fetchUpgradableGenerations',
78
- 'fetchGenerationDetails',
79
- 'upgradeClusterGeneration',
80
- 'upsertCluster',
81
- 'setOrgInfo',
82
- 'setEarlyAccessFeatures',
83
- 'invalidateClusters',
84
- 'invalidateClusterCapacity',
85
- 'invalidateMembers',
86
- 'invalidateAudits',
87
- 'invalidateMyOrgs',
88
- 'invalidateWebappClusters',
89
- 'invalidateAll',
90
- 'getClusters',
91
- 'getOrgInfo',
92
- 'getOrgOwner',
93
- 'getEarlyAccessFeatures',
94
- 'getMembers',
95
- 'getAudits',
96
- 'getClusterCapacity',
97
- 'getMyOrgs',
98
- 'getWebappClusters',
99
- 'getSseEntityVersion',
100
- 'getUpgradableGenerations',
101
- 'getGenerationDetails',
102
- ];
103
- const GETTER_MEMBERS = [
104
- 'clusters',
105
- 'orgInfo',
106
- 'orgOwner',
107
- 'earlyAccessFeatures',
108
- 'members',
109
- 'audits',
110
- 'clusterCapacity',
111
- 'myOrgs',
112
- 'webappClusters',
113
- 'upgradableGenerations',
114
- 'generationDetails',
115
- ];
116
- it('exposes every documented action as a function', () => {
117
- const { result } = renderHook(() => useC4ConsoleData(), {
118
- wrapper: wrapper(),
119
- });
120
- for (const member of ACTION_MEMBERS) {
121
- expect(typeof result.current[member], `${member} should be a function`).toBe('function');
122
- }
123
- });
124
- it('exposes every documented data collection getter', () => {
125
- const { result } = renderHook(() => useC4ConsoleData(), {
126
- wrapper: wrapper(),
127
- });
128
- for (const member of GETTER_MEMBERS) {
129
- expect(result.current[member], `${member} should be defined`).toBeDefined();
130
- }
131
- });
132
- it('throws when used outside the provider', () => {
133
- const spy = vi.spyOn(console, 'error').mockImplementation(() => undefined);
134
- expect(() => renderHook(() => useC4ConsoleData())).toThrow(/must be used within C4ConsoleDataProvider/);
135
- spy.mockRestore();
136
- });
137
- });
138
- describe('useC4ConsoleData — seeded reads (initialState)', () => {
139
- it('returns seeded clusters via both the getter and the collection', () => {
140
- const { result } = renderHook(() => useC4ConsoleData(), {
141
- wrapper: wrapper({
142
- clusters: { 'org-1': cacheEntry([{ uuid: 'c1', name: 'Prod' }]) },
143
- }),
144
- });
145
- expect(result.current.getClusters('org-1')).toEqual([
146
- { uuid: 'c1', name: 'Prod' },
147
- ]);
148
- expect(result.current.clusters['org-1']?.data).toEqual([
149
- { uuid: 'c1', name: 'Prod' },
150
- ]);
151
- expect(result.current.clusters['org-1']?.isLoading).toBe(false);
152
- });
153
- it('returns seeded webapp clusters, orgs and cluster capacity', () => {
154
- const { result } = renderHook(() => useC4ConsoleData(), {
155
- wrapper: wrapper({
156
- webappClusters: {
157
- 'org-1': cacheEntry([{ uuid: 'c1', name: 'Prod' }]),
158
- },
159
- myOrgs: cacheEntry([{ uuid: 'org-1', name: 'Acme' }]),
160
- clusterCapacity: { 'org-1': new Map([['c1', 0.42]]) },
161
- }),
162
- });
163
- expect(result.current.getWebappClusters('org-1')).toEqual([
164
- { uuid: 'c1', name: 'Prod' },
165
- ]);
166
- expect(result.current.getMyOrgs()).toEqual([
167
- { uuid: 'org-1', name: 'Acme' },
168
- ]);
169
- expect(result.current.myOrgs.data).toEqual([
170
- { uuid: 'org-1', name: 'Acme' },
171
- ]);
172
- expect(result.current.getClusterCapacity('org-1', 'c1')).toBe(0.42);
173
- });
174
- it('returns undefined for orgs that were never seeded or fetched', () => {
175
- const { result } = renderHook(() => useC4ConsoleData(), {
176
- wrapper: wrapper(),
177
- });
178
- expect(result.current.getClusters('missing')).toBeUndefined();
179
- expect(result.current.clusters.missing).toBeUndefined();
180
- });
181
- });
182
- // A minimal consumer that reads clusters and records how many times it rendered.
183
- // Wrapped in `observer` — the required pattern for components that read data
184
- // from useC4ConsoleData during render (the context value is now stable, so
185
- // reactivity comes from MobX tracking, not from the context value changing).
186
- const ClustersConsumer = observer(function ClustersConsumer({ orgId, autofetch, renderSpy, }) {
187
- const data = useC4ConsoleData();
188
- renderSpy?.();
189
- // Emulate a real widget's mount-time fetch (in an effect, so it runs after
190
- // the provider's layout effect has injected the runtime config).
191
- useEffect(() => {
192
- if (autofetch) {
193
- void data.fetchClusters(orgId);
194
- }
195
- }, [autofetch, data, orgId]);
196
- const clusters = data.getClusters(orgId);
197
- return (_jsx("ul", { children: (clusters ?? []).map((cluster) => (_jsx("li", { children: cluster.name }, cluster.uuid))) }));
198
- });
199
- describe('C4ConsoleDataProvider — reactivity (the core contract)', () => {
200
- it('updates a consumer when a fetch resolves', async () => {
201
- vi.mocked(ConsoleClusterService.getClusters).mockResolvedValue([
202
- { uuid: 'c1', name: 'Fetched Cluster' },
203
- ]);
204
- render(_jsx(ClustersConsumer, { orgId: 'org-1', autofetch: true }), {
205
- wrapper: wrapper(),
206
- });
207
- // Nothing rendered until the fetch resolves...
208
- expect(screen.queryByText('Fetched Cluster')).not.toBeInTheDocument();
209
- // ...then the consumer re-renders with the fetched data.
210
- expect(await screen.findByText('Fetched Cluster')).toBeInTheDocument();
211
- });
212
- it('updates a consumer when an SSE clusterchange patches the cache', async () => {
213
- render(_jsx(ClustersConsumer, { orgId: 'org-1' }), {
214
- wrapper: wrapper({
215
- clusters: { 'org-1': cacheEntry([{ uuid: 'c1', name: 'Old Name' }]) },
216
- }),
217
- });
218
- expect(screen.getByText('Old Name')).toBeInTheDocument();
219
- act(() => {
220
- window.dispatchEvent(new CustomEvent('clusterchange', {
221
- detail: {
222
- org: 'org-1',
223
- entity: SseEntity.CLUSTER,
224
- type: SseType.UPDATED,
225
- clusterId: 'c1',
226
- payload: { cluster: { uuid: 'c1', name: 'New Name' } },
227
- },
228
- }));
229
- });
230
- expect(await screen.findByText('New Name')).toBeInTheDocument();
231
- expect(screen.queryByText('Old Name')).not.toBeInTheDocument();
232
- });
233
- it('exposes a changing SSE entity version for effect-based consumers', () => {
234
- const { result } = renderHook(() => useC4ConsoleData(), {
235
- wrapper: wrapper({
236
- clusters: { 'org-1': cacheEntry([{ uuid: 'c1', name: 'Old Name' }]) },
237
- }),
238
- });
239
- const before = result.current.getSseEntityVersion('org-1', SseEntity.CLUSTER, 'c1');
240
- act(() => {
241
- window.dispatchEvent(new CustomEvent('clusterchange', {
242
- detail: {
243
- org: 'org-1',
244
- entity: SseEntity.CLUSTER,
245
- type: SseType.UPDATED,
246
- clusterId: 'c1',
247
- payload: { cluster: { uuid: 'c1', name: 'New Name' } },
248
- },
249
- }));
250
- });
251
- const after = result.current.getSseEntityVersion('org-1', SseEntity.CLUSTER, 'c1');
252
- expect(after).not.toBe(before);
253
- });
254
- });
255
- describe('C4ConsoleDataProvider — fine-grained reactivity (the improvement)', () => {
256
- it('does not re-render an observer reading org B when org A changes', () => {
257
- const orgARenders = vi.fn();
258
- const orgBRenders = vi.fn();
259
- render(_jsxs(_Fragment, { children: [_jsx(ClustersConsumer, { orgId: 'org-a', renderSpy: orgARenders }), _jsx(ClustersConsumer, { orgId: 'org-b', renderSpy: orgBRenders })] }), {
260
- wrapper: wrapper({
261
- clusters: {
262
- 'org-a': cacheEntry([{ uuid: 'a1', name: 'A One' }]),
263
- 'org-b': cacheEntry([{ uuid: 'b1', name: 'B One' }]),
264
- },
265
- }),
266
- });
267
- const orgBRendersBeforeChange = orgBRenders.mock.calls.length;
268
- const orgARendersBeforeChange = orgARenders.mock.calls.length;
269
- act(() => {
270
- window.dispatchEvent(new CustomEvent('clusterchange', {
271
- detail: {
272
- org: 'org-a',
273
- entity: SseEntity.CLUSTER,
274
- type: SseType.UPDATED,
275
- clusterId: 'a1',
276
- payload: { cluster: { uuid: 'a1', name: 'A Two' } },
277
- },
278
- }));
279
- });
280
- // Org A's consumer re-rendered with the new data...
281
- expect(screen.getByText('A Two')).toBeInTheDocument();
282
- expect(orgARenders.mock.calls.length).toBeGreaterThan(orgARendersBeforeChange);
283
- // ...but org B's consumer did not re-render at all.
284
- expect(orgBRenders.mock.calls.length).toBe(orgBRendersBeforeChange);
285
- });
286
- });
287
- describe('public data hooks stay reactive for non-observer callers', () => {
288
- it('re-renders a non-observer caller of useC4ClusterNavEntries when data loads', async () => {
289
- vi.mocked(ExternalConsoleService.getOrgClusters).mockResolvedValue([
290
- {
291
- uuid: 'c1',
292
- name: 'Prod',
293
- endpoints: { operate: 'https://c1.operate' },
294
- status: { operate: 'Healthy' },
295
- },
296
- ]);
297
- // renderHook's default wrapper is a plain (non-observer) component; the
298
- // hook must still re-render it when the auto-fetch resolves. This is the
299
- // external contract that the useObserver bridge preserves.
300
- const { result } = renderHook(() => useC4ClusterNavEntries('org-1'), {
301
- wrapper: wrapper(),
302
- });
303
- expect(result.current).toHaveLength(0);
304
- await waitFor(() => expect(result.current).toHaveLength(1));
305
- expect(result.current[0].cluster).toMatchObject({
306
- uuid: 'c1',
307
- name: 'Prod',
308
- });
309
- });
310
- });
311
- describe('C4ConsoleDataProvider — dedup, errors and cache hits', () => {
312
- it('dedupes concurrent fetches from two consumers into one request', async () => {
313
- let resolveFetch = () => undefined;
314
- vi.mocked(ConsoleClusterService.getClusters).mockImplementation(() => new Promise((resolve) => {
315
- resolveFetch = resolve;
316
- }));
317
- render(_jsxs(_Fragment, { children: [_jsx(ClustersConsumer, { orgId: 'org-1', autofetch: true }), _jsx(ClustersConsumer, { orgId: 'org-1', autofetch: true })] }), { wrapper: wrapper() });
318
- await waitFor(() => {
319
- expect(ConsoleClusterService.getClusters).toHaveBeenCalledTimes(1);
320
- });
321
- act(() => {
322
- resolveFetch([{ uuid: 'c1', name: 'Shared' }]);
323
- });
324
- expect(await screen.findAllByText('Shared')).toHaveLength(2);
325
- expect(ConsoleClusterService.getClusters).toHaveBeenCalledTimes(1);
326
- });
327
- it('surfaces a fetch error on the cache entry without throwing', async () => {
328
- vi.mocked(ConsoleClusterService.getClusters).mockRejectedValue(new Error('boom'));
329
- const { result } = renderHook(() => useC4ConsoleData(), {
330
- wrapper: wrapper(),
331
- });
332
- await act(async () => {
333
- await result.current.fetchClusters('org-1');
334
- });
335
- await waitFor(() => {
336
- expect(result.current.clusters['org-1']?.error).toBeInstanceOf(Error);
337
- });
338
- expect(result.current.clusters['org-1']?.isLoading).toBe(false);
339
- });
340
- it('does not fetch when the cache is already seeded (non-force)', async () => {
341
- const { result } = renderHook(() => useC4ConsoleData(), {
342
- wrapper: wrapper({
343
- clusters: { 'org-1': cacheEntry([{ uuid: 'c1', name: 'Prod' }]) },
344
- }),
345
- });
346
- await act(async () => {
347
- await result.current.fetchClusters('org-1');
348
- });
349
- expect(ConsoleClusterService.getClusters).not.toHaveBeenCalled();
350
- expect(result.current.getClusters('org-1')).toEqual([
351
- { uuid: 'c1', name: 'Prod' },
352
- ]);
353
- });
354
- });
@@ -1 +0,0 @@
1
- export {};