@camunda/ccma-saas-frontend 0.35.5 → 0.35.7

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.
@@ -91,7 +91,7 @@ export declare const ConsoleDataStore: import("mobx-state-tree").IModelType<{
91
91
  clustersLastRefreshMs: Map<string, number>;
92
92
  clusterCapacityLastRefreshMs: Map<string, number>;
93
93
  } & {
94
- getClusters(orgId: string): any[] | undefined;
94
+ getClusters(orgId: string): ConsoleClusterDto[] | undefined;
95
95
  getOrgInfo(orgId: string): unknown | undefined;
96
96
  getOrgInfoError(orgId: string): Error | undefined;
97
97
  getOrgOwner(orgId: string): {
@@ -3,10 +3,11 @@
3
3
  * under one or more contributor license agreements. Licensed under a commercial license.
4
4
  * You may not use this file except in compliance with the commercial license.
5
5
  */
6
- import { AuditLoggerService, ConsoleClusterService, EarlyAccessFeaturesService, ExternalAccountsService, ExternalConsoleService, GenerationService, HdpService, HttpError, OrganizationMembersService, OrgsService, } from '@camunda/ccma-api';
6
+ import { AuditLoggerService, EarlyAccessFeaturesService, ExternalAccountsService, ExternalConsoleService, GenerationService, HdpService, HttpError, OrganizationMembersService, OrgsService, } from '@camunda/ccma-api';
7
7
  import { SseEntity, SseType, } from '@camunda/ccma-shared-types';
8
8
  import { flow, types } from 'mobx-state-tree';
9
9
  import { toApiConfig } from './to-api-config.js';
10
+ import { cliClusterReadsApi } from './use-cli-cluster-reads-api.js';
10
11
  import { cliOrgApi, isConsoleCliApiOn } from './use-cli-org-api.js';
11
12
  function isRecord(value) {
12
13
  return typeof value === 'object' && value !== null;
@@ -546,15 +547,10 @@ export const ConsoleDataStore = types
546
547
  });
547
548
  try {
548
549
  const apiConfig = toApiConfig(self.runtime);
549
- const response = yield ConsoleClusterService.getClusters({
550
+ const clustersList = yield cliClusterReadsApi(isConsoleCliApiOn(self.runtime)).getClusters({
550
551
  params: { orgId },
551
552
  config: apiConfig,
552
553
  });
553
- const clustersList = Array.isArray(response)
554
- ? response
555
- : response?.clusters && Array.isArray(response.clusters)
556
- ? response.clusters
557
- : [];
558
554
  self.clusters.set(orgId, {
559
555
  data: clustersList,
560
556
  isLoading: false,
@@ -0,0 +1,48 @@
1
+ import type { ConsoleCliCluster, ConsoleCliClusterParameters, ConsoleClusterCreationParametersResponse, RequestBaseParamsConfig } from '@camunda/ccma-api';
2
+ import type { ConsoleClusterDto } from '@camunda/ccma-shared-types';
3
+ interface OrgRequest {
4
+ config: RequestBaseParamsConfig;
5
+ params: {
6
+ orgId: string;
7
+ };
8
+ }
9
+ interface ClusterRequest {
10
+ config: RequestBaseParamsConfig;
11
+ params: {
12
+ orgId: string;
13
+ clusterId: string;
14
+ };
15
+ }
16
+ /**
17
+ * Maps the `/cli/v1` cluster to the field names of the internal route, so
18
+ * that the readers and the SSE patches of the cache stay the same. A field
19
+ * that the CLI does not give stays out (see the PR of #11623 for the list).
20
+ */
21
+ export declare const toC4Cluster: (orgId: string, cluster: ConsoleCliCluster, fromList?: boolean) => ConsoleClusterDto & {
22
+ businessIdUniquenessEnabled?: boolean;
23
+ externalMetadata?: ConsoleClusterDto["externalMetadata"] & {
24
+ tasklistV2Enabled?: boolean;
25
+ };
26
+ };
27
+ /**
28
+ * Maps the `/cli/v1` create parameters to the shape of the internal route.
29
+ * The CLI marks the defaults itself, and `default` takes the place of
30
+ * `isDefault` and `defaultGeneration`.
31
+ */
32
+ export declare const toCreationParameters: (parameters: ConsoleCliClusterParameters) => ConsoleClusterCreationParametersResponse;
33
+ /**
34
+ * The cluster reads. They go to the `/cli/v1` routes when `cliApi` is on,
35
+ * else to the internal routes. Both give the shapes of the internal routes.
36
+ * Part of #11623: delete it with the flag.
37
+ */
38
+ export declare const cliClusterReadsApi: (cliApi: boolean) => {
39
+ getClusters: (request: OrgRequest) => Promise<ConsoleClusterDto[]>;
40
+ getCluster: (request: ClusterRequest) => Promise<ConsoleClusterDto>;
41
+ getCreationParameters: (request: OrgRequest) => Promise<ConsoleClusterCreationParametersResponse>;
42
+ };
43
+ export declare const useCliClusterReadsApi: () => {
44
+ getClusters: (request: OrgRequest) => Promise<ConsoleClusterDto[]>;
45
+ getCluster: (request: ClusterRequest) => Promise<ConsoleClusterDto>;
46
+ getCreationParameters: (request: OrgRequest) => Promise<ConsoleClusterCreationParametersResponse>;
47
+ };
48
+ export {};
@@ -0,0 +1,207 @@
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 { ConsoleCliClusterService, ConsoleClusterParametersService, ConsoleClusterService, } from '@camunda/ccma-api';
7
+ import { useMemo } from 'react';
8
+ import { useConsoleCliApi } from './use-console-cli-api.js';
9
+ const toGeneration = (generation) => generation && {
10
+ uuid: generation.id,
11
+ name: generation.name,
12
+ versions: generation.versions,
13
+ };
14
+ /**
15
+ * Maps the `/cli/v1` cluster to the field names of the internal route, so
16
+ * that the readers and the SSE patches of the cache stay the same. A field
17
+ * that the CLI does not give stays out (see the PR of #11623 for the list).
18
+ */
19
+ export const toC4Cluster = (orgId, cluster,
20
+ // The list has no restore state. A list item leaves it out, so that a
21
+ // merge keeps the value of the detail.
22
+ fromList = false) => {
23
+ const update = cluster.update;
24
+ return {
25
+ uuid: cluster.id,
26
+ name: cluster.name,
27
+ description: cluster.description,
28
+ ownerId: orgId,
29
+ // The internal route sends the date as a string too. The DTO type is
30
+ // wrong about it.
31
+ created: cluster.createdAt,
32
+ status: {
33
+ ready: cluster.statusDetail ?? '',
34
+ zeebeStatus: cluster.health?.zeebe,
35
+ operateStatus: cluster.health?.operate,
36
+ tasklistStatus: cluster.health?.tasklist,
37
+ optimizeStatus: cluster.health?.optimize,
38
+ connectorsStatus: cluster.health?.connectors,
39
+ zeebeUrl: cluster.urls.zeebeGrpc,
40
+ zeebeRestUrl: cluster.urls.zeebeRest,
41
+ operateUrl: cluster.urls.operate,
42
+ tasklistUrl: cluster.urls.tasklist,
43
+ optimizeUrl: cluster.urls.optimize,
44
+ connectorsUrl: cluster.urls.connectors,
45
+ identityUrl: cluster.urls.identity,
46
+ accountId: cluster.encryptionAccountId,
47
+ conditions: cluster.conditions,
48
+ updateClusterStatus: update && {
49
+ updateState: update.state,
50
+ currentGeneration: toGeneration(update.currentGeneration),
51
+ previousGeneration: toGeneration(update.previousGeneration),
52
+ lastUpdatedTime: update.lastUpdatedAt,
53
+ },
54
+ },
55
+ // The internal list sends these objects with the same few fields.
56
+ generation: {
57
+ uuid: cluster.generation.id,
58
+ name: cluster.generation.name,
59
+ versions: cluster.generation.versions,
60
+ isUnsupportedStarting: cluster.generation.unsupportedStarting,
61
+ },
62
+ k8sContext: {
63
+ uuid: cluster.region.id,
64
+ name: cluster.region.name,
65
+ provider: cluster.region.provider,
66
+ },
67
+ k8sContextUuid: cluster.region.id,
68
+ planType: {
69
+ uuid: cluster.planType.id,
70
+ name: cluster.planType.name,
71
+ development: cluster.planType.development,
72
+ category: cluster.planType.category,
73
+ availabilityClass: cluster.planType.availabilityClass,
74
+ },
75
+ labels: {
76
+ // The backend only stores the allowed stage labels.
77
+ camunda: (cluster.labels?.camunda ?? []),
78
+ custom: cluster.labels?.custom ?? [],
79
+ },
80
+ autoUpdate: cluster.autoUpdate,
81
+ rba: cluster.rba,
82
+ identityBackendChecksEnabled: cluster.identityBackendChecksEnabled,
83
+ enforceGroups: cluster.enforceGroups,
84
+ playMode: cluster.playMode,
85
+ mcpEnabled: cluster.mcpEnabled,
86
+ businessIdUniquenessEnabled: cluster.businessIdUniquenessEnabled,
87
+ multiTenancyEnabled: cluster.multiTenancyEnabled,
88
+ sessionMaxInactiveIntervalMinutes: cluster.sessionMaxInactiveIntervalMinutes,
89
+ sessionHeartbeatEnabled: cluster.sessionHeartbeatEnabled,
90
+ externalIdpEnabled: cluster.externalIdpEnabled,
91
+ externalIdpConfig: cluster.externalIdpConfig,
92
+ numberOfAllocatedHwPackages: cluster.numberOfAllocatedHwPackages,
93
+ encryption: cluster.encryption,
94
+ primaryEncryptionKeyId: cluster.primaryEncryptionKeyId,
95
+ secondaryEncryptionKeyId: cluster.secondaryEncryptionKeyId,
96
+ externalMetadata: {
97
+ swagger: cluster.swagger,
98
+ appIntegrationsEnabled: cluster.appIntegrationsEnabled,
99
+ optimizeEnabled: cluster.optimizeEnabled,
100
+ optimizeFiltering: cluster.optimizeFiltering,
101
+ secretsFilterMode: cluster.secretsFilterMode,
102
+ tasklistV2Enabled: cluster.tasklistV2Enabled,
103
+ auditLog: {
104
+ enabled: cluster.auditLogEnabled,
105
+ userCategories: cluster.auditLogUserCategories,
106
+ clientCategories: cluster.auditLogClientCategories,
107
+ },
108
+ },
109
+ // Always set, so that a merge into the cache clears an old pause.
110
+ spec: { reconciliation: { paused: cluster.maintenance === true } },
111
+ restoreInProgress: cluster.status === 'restoring',
112
+ restoreFailed: fromList ? undefined : cluster.restoreFailedId !== undefined,
113
+ failedRestoreId: cluster.restoreFailedId,
114
+ backupRegionId: cluster.backup?.regionId,
115
+ backupRegion: cluster.backup?.region,
116
+ backupRegionCodes: cluster.backup?.regionCodes,
117
+ backupFailoverSupported: cluster.backup?.failoverSupported,
118
+ secondaryBucketSyncCompleted: cluster.backup?.secondarySyncCompleted,
119
+ isFailoverSource: cluster.failover?.isSource,
120
+ failoverSourceClusterId: cluster.failover?.sourceClusterId,
121
+ stableId: cluster.failover?.stableId,
122
+ ttl: cluster.ttl,
123
+ hasOptimize: cluster.optimizeAvailable,
124
+ ipWhitelist: cluster.ipAllowlist?.map((entry) => ({
125
+ ip: entry.ip,
126
+ description: entry.description ?? '',
127
+ })),
128
+ };
129
+ };
130
+ /**
131
+ * Maps the `/cli/v1` create parameters to the shape of the internal route.
132
+ * The CLI marks the defaults itself, and `default` takes the place of
133
+ * `isDefault` and `defaultGeneration`.
134
+ */
135
+ export const toCreationParameters = (parameters) => ({
136
+ regions: parameters.regions.map((region) => ({
137
+ uuid: region.id,
138
+ name: region.name,
139
+ provider: region.provider,
140
+ backups: region.backups?.map((backup) => ({
141
+ uuid: backup.id,
142
+ failover: backup.failover,
143
+ regions: backup.regions.map((value) => ({
144
+ id: value.id,
145
+ label: value.name,
146
+ })),
147
+ })),
148
+ })),
149
+ channels: parameters.channels.map((channel) => ({
150
+ uuid: channel.id,
151
+ name: channel.name,
152
+ description: channel.description,
153
+ isDefault: channel.default,
154
+ defaultGeneration: {
155
+ uuid: channel.generations.find((generation) => generation.default)?.id,
156
+ },
157
+ allowedGenerations: channel.generations.map((generation) => ({
158
+ uuid: generation.id,
159
+ name: generation.name,
160
+ classification: generation.classification,
161
+ versions: generation.versions,
162
+ })),
163
+ })),
164
+ clusterPlanTypes: parameters.planTypes.map((planType) => ({
165
+ uuid: planType.id,
166
+ name: planType.name,
167
+ description: planType.description,
168
+ development: planType.development,
169
+ category: planType.category,
170
+ availabilityClass: planType.availabilityClass,
171
+ })),
172
+ unlockedClusterPlans: parameters.clusterPlans?.map((plan) => ({
173
+ uuid: plan.id,
174
+ name: plan.name,
175
+ })),
176
+ clusterTtlEnabled: parameters.ttlEnabled,
177
+ });
178
+ /**
179
+ * The cluster reads. They go to the `/cli/v1` routes when `cliApi` is on,
180
+ * else to the internal routes. Both give the shapes of the internal routes.
181
+ * Part of #11623: delete it with the flag.
182
+ */
183
+ export const cliClusterReadsApi = (cliApi) => ({
184
+ getClusters: async (request) => {
185
+ if (!cliApi) {
186
+ const response = await ConsoleClusterService.getClusters(request);
187
+ // Old responses wrap the list in `clusters`.
188
+ if (Array.isArray(response)) {
189
+ return response;
190
+ }
191
+ const wrapped = response?.clusters;
192
+ return Array.isArray(wrapped) ? wrapped : [];
193
+ }
194
+ const clusters = await ConsoleCliClusterService.getClusters(request);
195
+ return clusters.map((cluster) => toC4Cluster(request.params.orgId, cluster, true));
196
+ },
197
+ getCluster: async (request) => cliApi
198
+ ? toC4Cluster(request.params.orgId, await ConsoleCliClusterService.getCluster(request))
199
+ : ConsoleClusterService.getCluster(request),
200
+ getCreationParameters: async (request) => cliApi
201
+ ? toCreationParameters(await ConsoleCliClusterService.getClusterParameters(request))
202
+ : ConsoleClusterParametersService.getCreationParameters(request),
203
+ });
204
+ export const useCliClusterReadsApi = () => {
205
+ const cliApi = useConsoleCliApi();
206
+ return useMemo(() => cliClusterReadsApi(cliApi), [cliApi]);
207
+ };
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
4
4
  * under one or more contributor license agreements. Licensed under a commercial license.
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
- import { AuditLoggerService, ConsoleClusterParametersService, ConsoleClusterService, GenerationService, HdpService, HttpError, SaaSJobsService, } from '@camunda/ccma-api';
7
+ import { AuditLoggerService, GenerationService, HdpService, HttpError, SaaSJobsService, } from '@camunda/ccma-api';
8
8
  import { AUDIT_LOG_TAB_MIN_VERSION, CLUSTER_STATISTICS_CONFIG_MIN_VERSION, checkVersion, deriveEncryptionKeyStatus, deriveEncryptionStatus, deriveSecondaryStorageStatus, needsKeyOwnerAction, SalesPlanType, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
9
9
  import { observer } from 'mobx-react-lite';
10
10
  import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
@@ -20,6 +20,7 @@ import { SELF_MANAGED_MIGRATION_FLAG } from '../../runtime/self-managed-migratio
20
20
  import { toApiConfig } from '../../runtime/to-api-config.js';
21
21
  import { useCliActionsApi } from '../../runtime/use-cli-actions-api.js';
22
22
  import { useCliClusterApi } from '../../runtime/use-cli-cluster-api.js';
23
+ import { useCliClusterReadsApi } from '../../runtime/use-cli-cluster-reads-api.js';
23
24
  import { useCliExtrasApi } from '../../runtime/use-cli-extras-api.js';
24
25
  import { useCliResourcesApi } from '../../runtime/use-cli-resources-api.js';
25
26
  import { Modal, Stack, TextInput } from '../../ui/index.js';
@@ -311,6 +312,7 @@ export const C4ClusterDetailsApp = observer((props) => {
311
312
  const runtime = useC4ConsoleRuntime();
312
313
  const clusterActions = useCliActionsApi();
313
314
  const clusterApi = useCliClusterApi();
315
+ const clusterReads = useCliClusterReadsApi();
314
316
  const cliExtras = useCliExtrasApi();
315
317
  const clusterCreationBlocked = useC4FeatureFlag(CLUSTER_CREATION_BLOCKED_FLAG);
316
318
  const upgradeReadinessGateEnabled = useC4FeatureFlag('console.upgradeReadinessGate');
@@ -393,7 +395,7 @@ export const C4ClusterDetailsApp = observer((props) => {
393
395
  setIsClusterLoading(true);
394
396
  setClusterError('');
395
397
  try {
396
- const loaded = await ConsoleClusterService.getCluster({
398
+ const loaded = await clusterReads.getCluster({
397
399
  config: apiConfig,
398
400
  params: { orgId: props.orgId, clusterId: props.clusterId },
399
401
  });
@@ -420,11 +422,18 @@ export const C4ClusterDetailsApp = observer((props) => {
420
422
  finally {
421
423
  setIsClusterLoading(false);
422
424
  }
423
- }, [apiConfig, data, props.clusterId, props.onNavigate, props.orgId]);
425
+ }, [
426
+ apiConfig,
427
+ clusterReads,
428
+ data,
429
+ props.clusterId,
430
+ props.onNavigate,
431
+ props.orgId,
432
+ ]);
424
433
  const reloadCreationParameters = useCallback(async () => {
425
434
  setIsCreationParametersLoading(true);
426
435
  try {
427
- const loaded = await ConsoleClusterParametersService.getCreationParameters({
436
+ const loaded = await clusterReads.getCreationParameters({
428
437
  config: apiConfig,
429
438
  params: { orgId: props.orgId },
430
439
  });
@@ -436,7 +445,7 @@ export const C4ClusterDetailsApp = observer((props) => {
436
445
  finally {
437
446
  setIsCreationParametersLoading(false);
438
447
  }
439
- }, [apiConfig, props.orgId]);
448
+ }, [apiConfig, clusterReads, props.orgId]);
440
449
  const canSeeClusterLoad = Boolean(authz.visibilities.clusters?.canSeeClusterLoad);
441
450
  // After a manual reload, skip the immediately-following SSE merge. A stale
442
451
  // SSE event that arrives during the PATCH+reload cycle can overwrite the
@@ -4,7 +4,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
4
4
  * under one or more contributor license agreements. Licensed under a commercial license.
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
- import { ConsoleClusterParametersService, ConsoleClusterService, OrgsService, } from '@camunda/ccma-api';
7
+ import { OrgsService } from '@camunda/ccma-api';
8
8
  import { CLUSTER_TTL_OPTIONS, CLUSTER_TTL_UNLIMITED_LINK_MAX_LENGTH, CLUSTER_TTL_UNLIMITED_REASON_MAX_LENGTH, ClusterEncryptionKey, DEFAULT_CLUSTER_TTL_OPTION, getDisplayedSalesPlan, isHttpUrl, MAX_HARDWARE_PACKAGE_COUNT, MAX_LENGTH_CLUSTER_NAME, SalesPlanType, sortByAvailabilityClasses, sortGenerationBySemverOfZeebe, } from '@camunda/ccma-shared-types';
9
9
  import { observer } from 'mobx-react-lite';
10
10
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
@@ -18,6 +18,7 @@ import { useC4ConsoleRuntime, useC4FeatureFlag, } from '../../runtime/c4-console
18
18
  import { SELF_MANAGED_MIGRATION_FLAG } from '../../runtime/self-managed-migration.js';
19
19
  import { toApiConfig } from '../../runtime/to-api-config.js';
20
20
  import { useCliActionsApi } from '../../runtime/use-cli-actions-api.js';
21
+ import { useCliClusterReadsApi } from '../../runtime/use-cli-cluster-reads-api.js';
21
22
  import { Link, Stack } from '../../ui/index.js';
22
23
  import { buildMigrationCreateName, isValidAwsRoleArn, MIGRATION_NAME_MAX_LENGTH, MIGRATION_ROLE_ARN_MAX_LENGTH, } from '../../utils/migration-workaround.js';
23
24
  import { safeTranslate } from '../../utils/safe-translate.js';
@@ -408,6 +409,7 @@ export function buildCreateClusterTranslations(t) {
408
409
  export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkToAnExpertUrl, externalLinks, onNavigate, duplicateOfClusterId: sourceClusterId, }) => {
409
410
  const runtime = useC4ConsoleRuntime();
410
411
  const clusterActions = useCliActionsApi();
412
+ const clusterReads = useCliClusterReadsApi();
411
413
  const data = useC4ConsoleData();
412
414
  const authz = useC4ConsoleAuthz({ orgId });
413
415
  const resolvedTalkToAnExpertUrl = useMemo(() => talkToAnExpertUrl ??
@@ -451,7 +453,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
451
453
  setSourceClusterLoading(Boolean(sourceClusterId));
452
454
  try {
453
455
  const [parametersResponse, orgResponse, sourceClusterResponse] = await Promise.all([
454
- ConsoleClusterParametersService.getCreationParameters({
456
+ clusterReads.getCreationParameters({
455
457
  params: { orgId },
456
458
  config: apiConfig,
457
459
  }),
@@ -460,7 +462,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
460
462
  config: apiConfig,
461
463
  }),
462
464
  sourceClusterId
463
- ? ConsoleClusterService.getCluster({
465
+ ? clusterReads.getCluster({
464
466
  params: { orgId, clusterId: sourceClusterId },
465
467
  config: apiConfig,
466
468
  })
@@ -496,7 +498,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
496
498
  return () => {
497
499
  cancelled = true;
498
500
  };
499
- }, [orgId, apiConfig, runtime.telemetry, sourceClusterId]);
501
+ }, [orgId, apiConfig, clusterReads, runtime.telemetry, sourceClusterId]);
500
502
  const clustersCache = data.clusters[orgId];
501
503
  const rawClusters = (clustersCache?.data ?? []);
502
504
  const clustersLoading = clustersCache?.isLoading ?? false;
@@ -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, ConsoleClusterParametersService, EarlyAccessFeaturesService, HdpService, HttpError, OrganizationMembersService, OrgsService, UsageAlertsService, } from '@camunda/ccma-api';
9
+ import { AuditLoggerService, 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,7 @@ 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 { useCliClusterReadsApi } from '../../runtime/use-cli-cluster-reads-api.js';
23
24
  import { useCliExtrasApi } from '../../runtime/use-cli-extras-api.js';
24
25
  import { useCliOrgApi } from '../../runtime/use-cli-org-api.js';
25
26
  import { useHubApiNaming } from '../../runtime/use-hub-api-naming.js';
@@ -567,6 +568,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
567
568
  const data = useC4ConsoleData();
568
569
  const apiConfig = useMemo(() => toApiConfig(runtime), [runtime]);
569
570
  const orgApi = useCliOrgApi();
571
+ const clusterReads = useCliClusterReadsApi();
570
572
  const fetchMembers = data.fetchMembers;
571
573
  const fetchClusters = data.fetchClusters;
572
574
  const fetchOrgInfo = data.fetchOrgInfo;
@@ -1303,7 +1305,8 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
1303
1305
  // billing figure on the page — hostage. Because it is in flight before the
1304
1306
  // cluster fetch even starts, it normally lands well before the numbers do
1305
1307
  // and the table never renders a placeholder name.
1306
- void ConsoleClusterParametersService.getCreationParameters({
1308
+ void clusterReads
1309
+ .getCreationParameters({
1307
1310
  config: apiConfig,
1308
1311
  params: { orgId },
1309
1312
  })
@@ -1388,7 +1391,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
1388
1391
  finally {
1389
1392
  setBillingLoading(false);
1390
1393
  }
1391
- }, [apiConfig, cliExtras, orgId, isLicensingModel2025]);
1394
+ }, [apiConfig, cliExtras, clusterReads, orgId, isLicensingModel2025]);
1392
1395
  const enterpriseDevOnly = useMemo(() => getNestedBoolean(org, ['metadata', 'enterpriseDevOnly']), [org]);
1393
1396
  const billingIsEnterprise = useMemo(() => orgHasSalesPlanType(org, 'enterprise'), [org]);
1394
1397
  const billingGeneralData = useMemo(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-saas-frontend",
3
- "version": "0.35.5",
3
+ "version": "0.35.7",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
@@ -85,8 +85,8 @@
85
85
  "react-markdown": "^8.0.7 || ^10.0.0"
86
86
  },
87
87
  "dependencies": {
88
- "@camunda/ccma-api": "12.1.0",
89
- "@camunda/ccma-shared-types": "18.0.0",
88
+ "@camunda/ccma-api": "12.2.1",
89
+ "@camunda/ccma-shared-types": "18.1.0",
90
90
  "@pactsafe/pactsafe-react-sdk": "2.15.0",
91
91
  "cron-parser": "5.10.2",
92
92
  "mobx": "6.16.1",