@camunda/ccma-saas-frontend 0.35.4 → 0.35.5

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 (33) hide show
  1. package/lib/esm/runtime/c4-console-data-store.js +3 -2
  2. package/lib/esm/runtime/use-cli-actions-api.d.ts +18 -0
  3. package/lib/esm/runtime/use-cli-actions-api.js +58 -0
  4. package/lib/esm/runtime/use-cli-cluster-api.d.ts +38 -0
  5. package/lib/esm/runtime/use-cli-cluster-api.js +53 -0
  6. package/lib/esm/runtime/use-cli-extras-api.d.ts +34 -0
  7. package/lib/esm/runtime/use-cli-extras-api.js +165 -0
  8. package/lib/esm/runtime/use-cli-org-api.d.ts +28 -0
  9. package/lib/esm/runtime/use-cli-org-api.js +87 -0
  10. package/lib/esm/runtime/use-cli-resources-api.d.ts +53 -0
  11. package/lib/esm/runtime/use-cli-resources-api.js +273 -0
  12. package/lib/esm/runtime/use-console-cli-api.d.ts +3 -3
  13. package/lib/esm/runtime/use-console-cli-api.js +3 -3
  14. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +33 -13
  15. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +31 -13
  16. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +8 -6
  17. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +13 -13
  18. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +31 -18
  19. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +4 -2
  20. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +7 -6
  21. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +4 -3
  22. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +15 -16
  23. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +8 -6
  24. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +49 -38
  25. package/lib/esm/widgets/clusters/c4-clusters-page.js +14 -12
  26. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +5 -2
  27. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +5 -2
  28. package/lib/esm/widgets/environment/use-cluster-api-clients.js +4 -3
  29. package/lib/esm/widgets/job-worker/c4-job-worker-details-page.js +5 -3
  30. package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.js +5 -3
  31. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +1 -1
  32. package/lib/esm/widgets/management/c4-management-app.js +16 -31
  33. package/package.json +2 -2
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
6
6
  */
7
7
  import { C4GroupsList, C4IdentityContextProvider } from '@camunda/c4-identity';
8
8
  import { useC3Profile } from '@camunda/camunda-composite-components';
9
- import { AuditLoggerService, ConsoleApiClientsService, ConsoleClusterParametersService, ConsoleValueMetricsService, EarlyAccessFeaturesService, HdpService, HttpError, OrganizationMembersService, OrgsService, UsageAlertsService, } from '@camunda/ccma-api';
9
+ import { AuditLoggerService, ConsoleClusterParametersService, EarlyAccessFeaturesService, HdpService, HttpError, OrganizationMembersService, OrgsService, UsageAlertsService, } from '@camunda/ccma-api';
10
10
  import { ACTIVITY_RETENTION_CHOICES, ACTIVITY_RETENTION_FLAG, activityRetentionLabel, addMonthsClamped, checkVersion, diffInWholeMonths, getCurrentEnterpriseTerm, getDisplayedSalesPlan, getRevisitedSalesPlanName, IDENTITY_MANAGEMENT_MIN_VERSION, isActivityRetentionMonths, isLimitedActivityRetention, NEW_CLUSTER_ROLES_MIN_VERSION, OrganizationRole, peakWithinTerm, SseEntity, toUtcDayStartMs, USAGE_SALES_PLAN_TYPES, VersionCheckOperator, } from '@camunda/ccma-shared-types';
11
11
  import { observer } from 'mobx-react-lite';
12
12
  import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
@@ -20,6 +20,8 @@ import { useC4ConsoleRuntime, useC4FeatureFlag, } from '../../runtime/c4-console
20
20
  import { ORG_CLUSTER_DEFAULTS_FLAG } from '../../runtime/org-cluster-defaults.js';
21
21
  import { toApiConfig } from '../../runtime/to-api-config.js';
22
22
  import { toIdentityApiBaseUrl } from '../../runtime/to-identity-api-base-url.js';
23
+ import { useCliExtrasApi } from '../../runtime/use-cli-extras-api.js';
24
+ import { useCliOrgApi } from '../../runtime/use-cli-org-api.js';
23
25
  import { useHubApiNaming } from '../../runtime/use-hub-api-naming.js';
24
26
  import { Link, Stack } from '../../ui/index.js';
25
27
  import { clientErrorMessage } from '../../utils/http-error-message.js';
@@ -560,9 +562,11 @@ function themeNameToClassName(theme) {
560
562
  }
561
563
  export const C4ManagementApp = observer(({ orgId, embedded = false, environmentsEnabled = false, desiredTabId, onTabChange, onNavigate, getTabHref, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, permissionsReworkEnabled = false, urls, onNeedsReload, }) => {
562
564
  const runtime = useC4ConsoleRuntime();
565
+ const cliExtras = useCliExtrasApi();
563
566
  const hubNaming = useHubApiNaming();
564
567
  const data = useC4ConsoleData();
565
568
  const apiConfig = useMemo(() => toApiConfig(runtime), [runtime]);
569
+ const orgApi = useCliOrgApi();
566
570
  const fetchMembers = data.fetchMembers;
567
571
  const fetchClusters = data.fetchClusters;
568
572
  const fetchOrgInfo = data.fetchOrgInfo;
@@ -1205,7 +1209,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
1205
1209
  const [monthlyResult, perDayResult, hdpUsageResult, tenantsResult] = await Promise.allSettled([
1206
1210
  isLicensingModel2025
1207
1211
  ? Promise.resolve([])
1208
- : ConsoleValueMetricsService.getValueMetrics({
1212
+ : cliExtras.getValueMetrics({
1209
1213
  config: apiConfig,
1210
1214
  params: {
1211
1215
  orgId,
@@ -1214,7 +1218,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
1214
1218
  }),
1215
1219
  isLicensingModel2025
1216
1220
  ? Promise.resolve([])
1217
- : ConsoleValueMetricsService.getValueMetricsPerDays({
1221
+ : cliExtras.getValueMetricsPerDays({
1218
1222
  config: apiConfig,
1219
1223
  params: {
1220
1224
  orgId,
@@ -1282,7 +1286,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
1282
1286
  finally {
1283
1287
  setUsageLoading(false);
1284
1288
  }
1285
- }, [apiConfig, orgId, isLicensingModel2025, usageErrorMessage]);
1289
+ }, [apiConfig, cliExtras, orgId, isLicensingModel2025, usageErrorMessage]);
1286
1290
  const loadBilling = useCallback(async () => {
1287
1291
  const loadId = billingLoadIdRef.current + 1;
1288
1292
  billingLoadIdRef.current = loadId;
@@ -1326,7 +1330,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
1326
1330
  ? []
1327
1331
  : (data.getClusters(orgId) ?? []);
1328
1332
  const [monthlyResult, alertsResult, tenantsResult, hdpUsageResult] = await Promise.allSettled([
1329
- ConsoleValueMetricsService.getValueMetrics({
1333
+ cliExtras.getValueMetrics({
1330
1334
  config: apiConfig,
1331
1335
  params: {
1332
1336
  orgId,
@@ -1384,7 +1388,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
1384
1388
  finally {
1385
1389
  setBillingLoading(false);
1386
1390
  }
1387
- }, [apiConfig, orgId, isLicensingModel2025]);
1391
+ }, [apiConfig, cliExtras, orgId, isLicensingModel2025]);
1388
1392
  const enterpriseDevOnly = useMemo(() => getNestedBoolean(org, ['metadata', 'enterpriseDevOnly']), [org]);
1389
1393
  const billingIsEnterprise = useMemo(() => orgHasSalesPlanType(org, 'enterprise'), [org]);
1390
1394
  const billingGeneralData = useMemo(() => {
@@ -2281,7 +2285,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
2281
2285
  setApiClientsLoading(true);
2282
2286
  setApiClientsError(undefined);
2283
2287
  try {
2284
- const clients = await ConsoleApiClientsService.getAll({
2288
+ const clients = await orgApi.listApiClients({
2285
2289
  config: apiConfig,
2286
2290
  params: { orgId },
2287
2291
  });
@@ -2294,7 +2298,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
2294
2298
  apiClientsLoadedRef.current = true;
2295
2299
  setApiClientsLoading(false);
2296
2300
  }
2297
- }, [apiConfig, orgId]);
2301
+ }, [apiConfig, orgApi, orgId]);
2298
2302
  const sseApiClientsVersion = data.getSseEntityVersion(orgId, SseEntity.CONSOLE_API_CLIENT);
2299
2303
  useEffect(() => {
2300
2304
  if (!apiClientsLoadedRef.current) {
@@ -2816,14 +2820,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
2816
2820
  },
2817
2821
  t: runtime.i18n?.t,
2818
2822
  onCreateApiClient: async (name, permissions) => {
2819
- const response = await ConsoleApiClientsService.create({
2820
- config: apiConfig,
2821
- params: {
2822
- orgId,
2823
- clientName: name,
2824
- permissions,
2825
- },
2826
- });
2823
+ const response = await orgApi.createApiClient({ config: apiConfig, params: { orgId } }, name, permissions);
2827
2824
  await loadApiClients();
2828
2825
  return {
2829
2826
  clientId: response.clientId,
@@ -2832,24 +2829,11 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
2832
2829
  };
2833
2830
  },
2834
2831
  onUpdateApiClient: async (clientUuid, clientName) => {
2835
- await ConsoleApiClientsService.update({
2836
- config: apiConfig,
2837
- params: {
2838
- orgId,
2839
- clientUuid,
2840
- clientName,
2841
- },
2842
- });
2832
+ await orgApi.updateApiClient({ config: apiConfig, params: { orgId } }, clientUuid, clientName);
2843
2833
  await loadApiClients();
2844
2834
  },
2845
2835
  onDeleteApiClient: async (clientUuid) => {
2846
- await ConsoleApiClientsService.delete({
2847
- config: apiConfig,
2848
- params: {
2849
- orgId,
2850
- clientUuid,
2851
- },
2852
- });
2836
+ await orgApi.deleteApiClient({ config: apiConfig, params: { orgId } }, clientUuid);
2853
2837
  await loadApiClients();
2854
2838
  },
2855
2839
  };
@@ -2865,6 +2849,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
2865
2849
  showIpWhitelistColumn,
2866
2850
  showSecureConnectivityColumn,
2867
2851
  apiConfig,
2852
+ orgApi,
2868
2853
  orgId,
2869
2854
  loadApiClients,
2870
2855
  runtime.publicUrls?.apiBaseUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-saas-frontend",
3
- "version": "0.35.4",
3
+ "version": "0.35.5",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
@@ -85,7 +85,7 @@
85
85
  "react-markdown": "^8.0.7 || ^10.0.0"
86
86
  },
87
87
  "dependencies": {
88
- "@camunda/ccma-api": "12.0.0",
88
+ "@camunda/ccma-api": "12.1.0",
89
89
  "@camunda/ccma-shared-types": "18.0.0",
90
90
  "@pactsafe/pactsafe-react-sdk": "2.15.0",
91
91
  "cron-parser": "5.10.2",