@camunda/ccma-api 6.0.0 → 6.1.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.
- package/dist/services/console/console.admin.service.d.ts +1 -0
- package/dist/services/console/console.admin.service.js.map +1 -1
- package/dist/services/console/console.channel.service.d.ts +10 -5
- package/dist/services/console/console.channel.service.js.map +2 -2
- package/dist/services/console/console.cluster-parameters.service.d.ts +2 -0
- package/dist/services/console/console.cluster-parameters.service.js.map +2 -2
- package/dist/services/console/generation.service.d.ts +4 -0
- package/dist/services/console/generation.service.js.map +2 -2
- package/package.json +1 -1
|
@@ -535,6 +535,7 @@ export declare class ConsoleAdminService {
|
|
|
535
535
|
configId: string;
|
|
536
536
|
body?: {
|
|
537
537
|
yoloJustification?: string;
|
|
538
|
+
skipK8sUpdate?: boolean;
|
|
538
539
|
};
|
|
539
540
|
}): Promise<ClusterModificationConfigDto | undefined>;
|
|
540
541
|
static deactivateModificationConfig(params: RequestBaseParams & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/services/console/console.admin.service.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type {\n AlertSubscriptionDto,\n BackupDto,\n BackupScheduleDto,\n ByomClientDto,\n ByomStatus,\n ClusterBulkOperationAck,\n ClusterBulkOperationDto,\n ClusterBulkOperationPostContent,\n ClusterModificationConfigDto,\n ClusterModificationDto,\n ClusterPlanTypeDto,\n ClusterTtlDto,\n ClusterUsageMetadataDto,\n ClusterUsageMetricsData,\n ConsoleClusterDto,\n UniqueTaskUser,\n UpdateClusterTtlBody,\n ValueMetrics,\n ZeebeRebalancingSetting,\n} from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\nimport type { OpenIncident } from '../incident-io/incident-io.service.js'\nimport type { ConsoleClusterClientDto } from './console.cluster-clients.service.js'\nimport type { SecureConnectivityStatusDto } from './console.secure-connectivity.service.js'\n\nexport interface UpdateClusterToNewPlanTypeRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n targetPlanTypeId: string\n attemptClusterPlanUpdate?: boolean\n numberOfAllocatedHwPackages?: number\n keepModification?: boolean\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface SignalSignupRequest extends RequestBaseParams {\n params: {\n orgId: string\n targetPlanTypeId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface UpdateClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetClustersOfOrgRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface CreateLiteLLMSecretsForOrgRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface RotateLiteLLMKeySecretsForOrgRequest\n extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface RotateLiteLLMKeySecretsForOrgResponse {\n clustersChecked: number\n secretsUpdated: number\n failedClusterIds: string[]\n}\n\n/**\n * Request to re-point the managed LLM connector secrets of every cluster of an\n * org at the upstream that the org metadata names now.\n *\n * The rotate route writes the API key alone. This one writes the API endpoint\n * and the default model too, because a move from one upstream to the other\n * changes all three values.\n */\nexport interface RepointLlmSecretsForOrgRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\n/** Same counters as the rotate route. `secretsUpdated` counts clusters. */\nexport interface RepointLlmSecretsForOrgResponse {\n clustersChecked: number\n secretsUpdated: number\n failedClusterIds: string[]\n}\n\n/**\n * Request to remove the managed LLM connector secrets of every cluster of an\n * org. Use it when the org loses its managed LLM key.\n */\nexport interface RemoveLlmSecretsForOrgRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\n/** `secretsRemoved` counts clusters, as `secretsUpdated` does for re-point. */\nexport interface RemoveLlmSecretsForOrgResponse {\n clustersChecked: number\n secretsRemoved: number\n failedClusterIds: string[]\n}\n\nexport type SpecExplainerFieldSource =\n | 'plan'\n | 'generation'\n | 'planType'\n | 'override'\n | 'modification'\n | 'infra'\n | 'computed'\n | 'featureFlag'\n | 'org'\n | 'cluster'\n\nexport interface SpecExplainerFieldAnnotation {\n source: SpecExplainerFieldSource\n sourcePath?: string\n sourceValue?: unknown\n finalValue: unknown\n transforms?: string[]\n overrides?: Array<{\n by: SpecExplainerFieldSource\n originalValue: unknown\n }>\n fallbackChain?: Array<{\n source: SpecExplainerFieldSource\n value: unknown\n used: boolean\n }>\n}\n\nexport interface SpecExplainerResponse {\n spec: Record<string, unknown>\n annotations: Record<string, SpecExplainerFieldAnnotation>\n sources: {\n plan: Record<string, unknown>\n generation: Record<string, unknown>\n planType: Record<string, unknown>\n overrideEnvVars?: Record<string, unknown>\n activeModification?: {\n planModifications: Array<{ key: string; value: unknown }>\n }\n featureFlags?: Record<string, boolean>\n }\n}\n\nexport interface GetSpecExplainerRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n}\n\nexport interface GetClusterCrdStateRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n}\n\nexport interface GetAdminClusterDetailsRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n}\n\n/**\n * `GET api/admin/clusters/:clusterId/details`.\n *\n * Each field holds the same data as the related org-scoped route. But an admin\n * permission gates this route, and two fields are different:\n *\n * - `clients` holds the internal clients too. The org-scoped route keeps them\n * out. Read `internal` on a client to tell them apart.\n * - `secrets` masks each value. The route gives the names of the connector\n * secrets, not the values.\n */\nexport interface AdminClusterDetailsDto {\n clients: ConsoleClusterClientDto[]\n alerts: AlertSubscriptionDto[]\n secrets: Record<string, string>\n backups: BackupDto[]\n backupSchedules: BackupScheduleDto[]\n internalBackups: BackupDto[]\n byomClients: ByomClientDto[]\n byomStatus: ByomStatus | Record<string, never>\n secureConnectivity: SecureConnectivityStatusDto | null\n}\n\nexport interface GetAllClustersRequest extends RequestBaseParams {\n params: {\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetClusterRequest extends RequestBaseParams {\n params: {\n clusterId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetCreatedClusterInstancesRequest extends RequestBaseParams {\n params: {\n range: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetClusterPlanTypeRequest extends RequestBaseParams {\n params: {\n clusterPlanTypeId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetAllClusterPlanTypesRequest extends RequestBaseParams {\n params: {\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetValueMetricsUsageDataRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetValueMetricsUsageDataPerDayRequest\n extends RequestBaseParams {\n params: {\n orgId: string\n /** How many days back from now the read covers. */\n days: number\n }\n}\n\nexport interface GetValueMetricsMetadataRequest extends RequestBaseParams {\n params: {\n orgId: string\n }\n}\n\nexport interface GetValueMetricsRequest extends RequestBaseParams {\n params: {\n orgId: string\n lastAvailableTimestamp: number\n timeframe: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetValueMetricsForAllRequest extends RequestBaseParams {\n params: {\n lastAvailableTimestamp: number\n timeframe: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetTaskUsersRequest extends RequestBaseParams {\n params: {\n orgId: string\n lastAvailableTimestamp: number\n timeframe: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetTaskUsersForAllRequest extends RequestBaseParams {\n params: {\n lastAvailableTimestamp: number\n timeframe: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface DeleteClustersOfOrgRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetUpgradableClusterPlanTypesRequest\n extends RequestBaseParams {\n params: {\n sourceClusterPlanTypeId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface UpdateClustersOfOrgToNewPlanTypeRequest\n extends RequestBaseParams {\n params: {\n orgId: string\n sourceClusterPlanTypeId: string\n targetClusterPlanTypeId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface UpdateClusterMetricsStartDateRequest\n extends RequestBaseParams {\n params: {\n orgId: string\n startDate: number\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface AdminClusterAutoUpdateRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n}\n\nexport interface AdminClusterOptionalTelemetryRequest\n extends RequestBaseParams {\n params: {\n clusterId: string\n }\n body: {\n optionalTelemetryEnabled: boolean\n }\n}\n\nexport interface AdminClusterTtlRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n body: UpdateClusterTtlBody\n}\n\nexport interface AdminClusterNonSpotNodesRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n body: {\n nonSpotNodesEnabled: boolean\n }\n}\n\nexport interface AdminClusterZeebeRebalancingRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n body: ZeebeRebalancingSetting\n}\n\n/** What `GET api/admin/clusters/modifications` answers. */\nexport interface ModificationsAnswer {\n clusters: ConsoleClusterDto[]\n modifications: ClusterModificationDto[]\n}\n\n/**\n * How many cluster ids one GET of the modifications carries in its query.\n *\n * 50 uuids are about 1.9 KB of request line, well under the 8 KB that the\n * ingress and node accept. The bound is on the request, not on the answer.\n */\nexport const CLUSTER_UUIDS_PER_READ = 50\n\nexport class ConsoleAdminService {\n public static async updateClusterToNewPlanType(\n params: UpdateClusterToNewPlanTypeRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.updateClusterToNewPlanType`,\n url: `api/admin/clusters/${params.params.clusterId}/org/${params.params.orgId}/clusterplantype`,\n normalizedUrl: `api/admin/clusters/:clusterId/org/:orgId/clusterplantype`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {\n toPlanTypeUuid: params.params.targetPlanTypeId,\n numberOfAllocatedHwPackages: params.params.numberOfAllocatedHwPackages,\n attemptClusterPlanUpdate: params.params.attemptClusterPlanUpdate,\n keepModification: params.params.keepModification,\n },\n headers: params.params.headers,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async updateClusterMetricsStartDate(\n params: UpdateClusterMetricsStartDateRequest,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.updateClusterMetricsStartDate`,\n url: `api/admin/metrics/clusters/org/${params.params.orgId}/start-date`,\n normalizedUrl: `api/admin/metrics/clusters/org/:orgId/start-date`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ success: boolean }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {\n startDate: params.params.startDate,\n },\n headers: params.params.headers,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async disableClusterAutoUpdate(\n params: AdminClusterAutoUpdateRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.disableClusterAutoUpdate',\n url: `api/admin/clusters/${params.params.clusterId}/autoupdate`,\n normalizedUrl: 'api/admin/clusters/:clusterId/autoupdate',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: { autoUpdate: false },\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async enableClusterAutoUpdate(\n params: AdminClusterAutoUpdateRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.enableClusterAutoUpdate',\n url: `api/admin/clusters/${params.params.clusterId}/autoupdate`,\n normalizedUrl: 'api/admin/clusters/:clusterId/autoupdate',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: { autoUpdate: true },\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * Set optional product telemetry for a cluster. Optional telemetry is\n * Camunda-managed: the customer cluster PATCH does not accept the field, so\n * this admin route is the only writer.\n */\n public static async updateClusterOptionalTelemetry(\n params: AdminClusterOptionalTelemetryRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.updateClusterOptionalTelemetry',\n url: `api/admin/clusters/${params.params.clusterId}/optional-telemetry`,\n normalizedUrl: 'api/admin/clusters/:clusterId/optional-telemetry',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: params.body,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * Extend the TTL of a cluster, or make it unlimited with a reason and a\n * link. Answers the new TTL. The route answers 404 while\n * `console.clusterTtl` is off for the caller, 403 on prod for a cluster\n * that is not internal or whose owner org does not have the Internal sales\n * plan, and 409 when the TTL or the owner changed during the update.\n */\n public static async updateClusterTtl(\n params: AdminClusterTtlRequest,\n ): Promise<ClusterTtlDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.updateClusterTtl',\n url: `api/admin/clusters/${params.params.clusterId}/ttl`,\n normalizedUrl: 'api/admin/clusters/:clusterId/ttl',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterTtlDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n if (!response.ok || !response.body) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * Move a cluster to non-spot nodes, or let it get spot nodes again. The\n * cluster restarts on both directions, because the value goes into the\n * `availabilityClass` of the spec.\n */\n public static async updateClusterNonSpotNodes(\n params: AdminClusterNonSpotNodesRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.updateClusterNonSpotNodes',\n url: `api/admin/clusters/${params.params.clusterId}/non-spot-nodes`,\n normalizedUrl: 'api/admin/clusters/:clusterId/non-spot-nodes',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: params.body,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * Set scheduled Zeebe leader rebalancing for a cluster. The body replaces the\n * stored setting, and `enabled: false` keeps the schedule. The route answers\n * 404 while the flag `console.zeebeRebalancing` is off, and 400 with field\n * messages for a setting that `validateZeebeRebalancing` refuses.\n */\n public static async updateZeebeRebalancing(\n params: AdminClusterZeebeRebalancingRequest,\n ): Promise<ZeebeRebalancingSetting> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.updateZeebeRebalancing',\n url: `api/admin/clusters/${params.params.clusterId}/zeebe-rebalancing`,\n normalizedUrl: 'api/admin/clusters/:clusterId/zeebe-rebalancing',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ZeebeRebalancingSetting>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n if (!response.ok || !response.body) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async signalSignup(params: SignalSignupRequest): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.signalSignup`,\n url: `api/admin/clusters/org/${params.params.orgId}/signup`,\n normalizedUrl: `api/admin/clusters/org/:orgId/signup`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {\n planTypeUuid: params.params.targetPlanTypeId,\n },\n headers: params.params.headers,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async unlinkClusterFromModification(\n params: {\n uuid: string\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.unlinkClusterFromModification`,\n url: `api/admin/clusters/modifications/clusterUnlink/${params.uuid}`,\n normalizedUrl: `api/admin/clusters/modifications/clusterUnlink/:clusterId`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async repairClustersActiveModification(\n params: {\n uuid: string\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.repairClustersActiveModification`,\n\n url: `api/admin/clusters/modifications/clusterRepair/${params.uuid}`,\n normalizedUrl: `api/clusters/modifications/clusterRepair/:clusterId`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async updateClusters(\n params: UpdateClusterRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.updateClusters`,\n url: `api/admin/clusters/org/${params.params.orgId}`,\n normalizedUrl: `api/admin/clusters/org/:orgId`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {},\n headers: params.params.headers,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async getClustersOfOrg(\n params: GetClustersOfOrgRequest,\n ): Promise<any[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getClustersOfOrg`,\n url: `api/orgs/${params.params.orgId}/clusters`,\n normalizedUrl: `api/orgs/:orgId/clusters`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<any[]>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n // Read-only GET against console, so a replay has no side effects. Console\n // rolling a pod answers with envoy's \"upstream connect error or\n // disconnect/reset before headers\" 503, and without this opt-in that blip\n // is reported as our failure \u2014 the same reason `OrgsService` and\n // `NotificationsService` opt in.\n retryTransientErrors: true,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getAllClusters(\n params: GetAllClustersRequest,\n ): Promise<any[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getAllClusters`,\n url: `api/admin/clusters`,\n normalizedUrl: `api/admin/clusters`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<any[]>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n // Same reasoning as `getClustersOfOrg` above, and it matters more here:\n // `cron.cluster-plan-cache-refresh` is the main caller, so one envoy 503\n // during a console rollout left the plan cache unrefreshed for a whole\n // interval.\n retryTransientErrors: true,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getCluster(params: GetClusterRequest): Promise<any> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getCluster`,\n url: `api/admin/clusters/${params.params.clusterId}`,\n normalizedUrl: `api/admin/clusters/:clusterId`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<any>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * All clusters with basic org info (concrete plan/planType/status per cluster),\n * used to enrich bulk-operation cluster sets. Mirrors accounts'\n * `clusters.getAllWithBasicOrgInfo` \u2192 `GET api/admin/clusters/enrichedClusters`.\n */\n public static async getEnrichedClusters(\n params: RequestBaseParams,\n ): Promise<{ clusters: unknown[]; orgs: unknown[] }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getEnrichedClusters`,\n url: `api/admin/clusters/enrichedClusters`,\n normalizedUrl: `api/admin/clusters/enrichedClusters`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ clusters: unknown[]; orgs: unknown[] }>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? { clusters: [], orgs: [] }\n }\n\n public static async getCreatedClusterInstances(\n params: GetCreatedClusterInstancesRequest,\n ): Promise<{ clusters: Array<{ uuid: string; count: number }> }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getCreatedClusterInstances`,\n url: `api/admin/clusters/instances/created?range=${params.params.range}`,\n normalizedUrl: `api/admin/clusters/instances/created?range=:range`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{\n clusters: Array<{ uuid: string; count: number }>\n }>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getClusterPlanType(\n params: GetClusterPlanTypeRequest,\n ): Promise<ClusterPlanTypeDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getClusterPlanType`,\n url: `api/plans/type/${params.params.clusterPlanTypeId}`,\n normalizedUrl: `api/plans/type/:clusterPlanTypeId`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<ClusterPlanTypeDto>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getAllClusterPlanTypes(\n params: GetAllClusterPlanTypesRequest,\n ): Promise<ClusterPlanTypeDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getAllClusterPlanTypes`,\n url: `api/plans/type`,\n normalizedUrl: `api/plans/type`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<ClusterPlanTypeDto[]>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getValueMetricsUsageData(\n params: GetValueMetricsUsageDataRequest,\n ): Promise<ClusterUsageMetricsData[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getValueMetricsUsageData`,\n url: `api/orgs/${params.params.orgId}/clusters/usage/value-metrics`,\n normalizedUrl: `api/orgs/:orgId/clusters/usage/value-metrics`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<ClusterUsageMetricsData[]>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n /**\n * The value metrics that console counted itself, one row for each cluster\n * and day of the last `days` days\n * (`GET api/orgs/:orgId/clusters/usage/value-metrics/:days`).\n *\n * This is the source that HDP replaced for a 2025 organization. The\n * comparison of the two sources reads it on purpose, so it never reads HDP\n * under this name: a comparison of a series with itself shows nothing.\n */\n public static async getValueMetricsUsageDataPerDay(\n params: GetValueMetricsUsageDataPerDayRequest,\n ): Promise<ClusterUsageMetricsData[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getValueMetricsUsageDataPerDay`,\n url: `api/orgs/${params.params.orgId}/clusters/usage/value-metrics/${params.params.days}`,\n normalizedUrl: `api/orgs/:orgId/clusters/usage/value-metrics/:days`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<ClusterUsageMetricsData[]>({\n config: params.config,\n base: {\n id: 'console',\n },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? []\n }\n\n /**\n * The usage metadata of an organization: the unique task users and the\n * deployed models for each billing period\n * (`GET api/orgs/:orgId/clusters/usage/value-metrics-metadata`).\n */\n public static async getValueMetricsMetadata(\n params: GetValueMetricsMetadataRequest,\n ): Promise<ClusterUsageMetadataDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getValueMetricsMetadata`,\n url: `api/orgs/${params.params.orgId}/clusters/usage/value-metrics-metadata`,\n normalizedUrl: `api/orgs/:orgId/clusters/usage/value-metrics-metadata`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ metadata: ClusterUsageMetadataDto[] }>({\n config: params.config,\n base: {\n id: 'console',\n },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body?.metadata ?? []\n }\n\n public static async getValueMetrics(\n params: GetValueMetricsRequest,\n ): Promise<ValueMetrics | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getValueMetrics`,\n url: `api/admin/clusters/org/${params.params.orgId}/valuemetrics/${params.params.lastAvailableTimestamp}/${params.params.timeframe}`,\n normalizedUrl: `api/admin/clusters/org/:orgId/valuemetrics/:lastAvailableTimestamp/:timeframe`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ valueMetrics: ValueMetrics }>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body?.valueMetrics\n }\n\n public static async getValueMetricsForAll(\n params: GetValueMetricsForAllRequest,\n ): Promise<ValueMetrics[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getValueMetricsForAll`,\n url: `api/admin/clusters/valuemetrics/${params.params.lastAvailableTimestamp}/${params.params.timeframe}`,\n normalizedUrl: `api/admin/clusters/valuemetrics/:lastAvailableTimestamp/:timeframe`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ valueMetrics: ValueMetrics[] }>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body?.valueMetrics ?? []\n }\n\n public static async getTaskUsers(\n params: GetTaskUsersRequest,\n ): Promise<UniqueTaskUser[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getTaskUsers`,\n url: `api/admin/clusters/org/${params.params.orgId}/valuemetrics/taskusers/${params.params.lastAvailableTimestamp}/${params.params.timeframe}`,\n normalizedUrl: `api/admin/clusters/org/:orgId/valuemetrics/taskusers/:lastAvailableTimestamp/:timeframe`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ taskUsers: UniqueTaskUser[] }>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body?.taskUsers ?? []\n }\n\n public static async getTaskUsersForAll(\n params: GetTaskUsersForAllRequest,\n ): Promise<UniqueTaskUser[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getTaskUsersForAll`,\n url: `api/admin/clusters/valuemetrics/taskusers/${params.params.lastAvailableTimestamp}/${params.params.timeframe}`,\n normalizedUrl: `api/admin/clusters/valuemetrics/taskusers/:lastAvailableTimestamp/:timeframe`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ taskUsers: UniqueTaskUser[] }>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body?.taskUsers ?? []\n }\n\n public static async deleteClustersOfOrg(\n params: DeleteClustersOfOrgRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deleteClustersOfOrg`,\n url: `api/admin/clusters/org/${params.params.orgId}`,\n normalizedUrl: `api/admin/clusters/org/:orgId`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async getUpgradableClusterPlanTypes(\n params: GetUpgradableClusterPlanTypesRequest,\n ): Promise<ClusterPlanTypeDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getUpgradableClusterPlanTypes`,\n url: `api/admin/clusters/clusterplantype/${params.params.sourceClusterPlanTypeId}/upgradable`,\n normalizedUrl: `api/admin/clusters/clusterplantype/:sourceClusterPlanTypeId/upgradable`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<ClusterPlanTypeDto[]>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async updateClustersOfOrgToNewPlanType(\n params: UpdateClustersOfOrgToNewPlanTypeRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.updateClustersOfOrgToNewPlanType`,\n url: `api/admin/clusters/org/${params.params.orgId}/clusterplantype`,\n normalizedUrl: `api/admin/clusters/org/:orgId/clusterplantype`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n headers: params.params.headers,\n body: {\n fromPlanTypeUuid: params.params.sourceClusterPlanTypeId,\n toPlanTypeUuid: params.params.targetClusterPlanTypeId,\n },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async getApiClients(\n params: { orgId: string } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getBulkClusterPlanUpdate`,\n url: `api/admin/apiClients/${params.orgId}`,\n normalizedUrl: `api/apiClients/:orgId`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<any[]>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n /**\n * deleteApiClient deletes an API client of any org. The route needs the\n * `apiClient.delete` console permission and no org membership. `clientUuid`\n * is the `uuid` of the client, not its OAuth `clientId`.\n */\n public static async deleteApiClient(\n params: { orgId: string; clientUuid: string } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deleteApiClient`,\n url: `api/admin/apiClients/${params.orgId}/client/${params.clientUuid}`,\n normalizedUrl: `api/admin/apiClients/:orgId/client/:clientUuid`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async wakeCluster(\n params: { clusterId: string } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getBulkClusterPlanUpdate`,\n url: `api/admin/clusters/${params.clusterId}/wake`,\n normalizedUrl: `api/clusters/:clusterId/wake`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * Every cluster modification, with the clusters they belong to.\n *\n * `clusterUuids` bounds the answer to those clusters. Console reads the\n * whole table without it, and one cluster for each row of the answer, so a\n * reader that asks about a few clusters names them. The ids go in the\n * query of a GET, so they travel in groups of `CLUSTER_UUIDS_PER_READ`:\n * the request line must not grow with the selection, or a large one\n * answers 414. The groups are read one after the other and merged, with\n * each cluster one time, so the caller sees one answer of the usual shape.\n * An empty list reads nothing and answers nothing.\n */\n public static async getAllModifications(\n params: RequestBaseParams & {\n clusterUuids?: readonly string[]\n headers?: {\n 'x-camunda-email'?: string\n }\n },\n ): Promise<ModificationsAnswer | undefined> {\n const { clusterUuids, ...rest } = params\n if (clusterUuids === undefined) {\n return ConsoleAdminService.readModifications(rest)\n }\n if (clusterUuids.length === 0) {\n return { clusters: [], modifications: [] }\n }\n const merged: ModificationsAnswer = { clusters: [], modifications: [] }\n const seenClusters = new Set<string>()\n for (\n let start = 0;\n start < clusterUuids.length;\n start += CLUSTER_UUIDS_PER_READ\n ) {\n const page = await ConsoleAdminService.readModifications(\n rest,\n clusterUuids.slice(start, start + CLUSTER_UUIDS_PER_READ),\n )\n if (!page) {\n continue\n }\n merged.modifications.push(...page.modifications)\n for (const cluster of page.clusters) {\n if (!seenClusters.has(cluster.uuid)) {\n seenClusters.add(cluster.uuid)\n merged.clusters.push(cluster)\n }\n }\n }\n return merged\n }\n\n /** One GET of the modifications, for every cluster or for the ids given. */\n private static async readModifications(\n params: RequestBaseParams & {\n headers?: {\n 'x-camunda-email'?: string\n }\n },\n clusterUuids?: readonly string[],\n ): Promise<ModificationsAnswer | undefined> {\n const query =\n clusterUuids && clusterUuids.length > 0\n ? `?clusterUuids=${clusterUuids.map(encodeURIComponent).join(',')}`\n : ''\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getAllModifications`,\n url: `api/admin/clusters/modifications${query}`,\n normalizedUrl: `api/clusters/modifications`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ModificationsAnswer>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n headers: params.headers,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async createModification(\n params: RequestBaseParams & {\n clusterUuid: string\n headers?: {\n 'x-camunda-email'?: string\n }\n },\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.createModification`,\n url: `api/admin/clusters/modifications`,\n normalizedUrl: `api/clusters/modifications`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n clusterUuid: params.clusterUuid,\n },\n headers: params.headers,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async createModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n description?: string\n url?: string\n planModifications?: Array<{\n key: string\n value: string | number | boolean\n }>\n expiresAt?: Date | null\n headers?: {\n 'x-camunda-email'?: string\n }\n },\n ) {\n const { uuid, description, url, planModifications, expiresAt } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.createModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}`,\n normalizedUrl: `api/clusters/modifications/:uuid`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n description,\n url,\n planModifications,\n expiresAt,\n },\n headers: params.headers,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async claimModification(\n params: RequestBaseParams & { uuid: string },\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.claimModificationConfig`,\n url: `api/admin/clusters/modifications/${params.uuid}/claim`,\n normalizedUrl: `api/clusters/modifications/:uuid/claim`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async dropModification(\n params: RequestBaseParams & { uuid: string },\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.dropModificationConfig`,\n url: `api/admin/clusters/modifications/${params.uuid}/drop`,\n normalizedUrl: `api/clusters/modifications/:uuid/drop`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n public static async archiveModification(\n params: RequestBaseParams & { uuid: string },\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.archiveModificationConfig`,\n url: `api/admin/clusters/modifications/${params.uuid}/archive`,\n normalizedUrl: `api/clusters/modifications/:uuid/archive`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async refineModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n description?: string\n url?: string\n planModifications?: Array<{\n key: string\n value: string | number | boolean\n }>\n expiresAt?: Date | null\n },\n ) {\n const { uuid, configId, description, url, planModifications, expiresAt } =\n params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.refineModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n description,\n url,\n planModifications,\n expiresAt,\n },\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async cloneModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n description: string\n url?: string\n expiresAt?: Date | null\n },\n ) {\n const { uuid, configId } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.cloneModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/clone`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/clone`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n description: params.description,\n url: params.url,\n expiresAt: params.expiresAt,\n },\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async sealModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n },\n ) {\n const { uuid, configId } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.sealModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/seal`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/seal`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async unsealModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n },\n ) {\n const { uuid, configId } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.unsealModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/unseal`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/unseal`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async ackModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n },\n ) {\n const { uuid, configId } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.ackModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/ack`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/ack`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async deleteModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n },\n ) {\n const { uuid, configId } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deleteModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n public static async activateModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n body?: { yoloJustification?: string }\n },\n ) {\n const { uuid, configId, body } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.activateModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/activate`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/activate`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async deactivateModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n skipK8sUpdate?: boolean\n },\n ) {\n const { uuid, configId, skipK8sUpdate } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deactivateModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/deactivate`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/deactivate`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n body: { skipK8sUpdate },\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async updateModificationConfigExpiration(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n expiresAt: Date | null\n description?: string\n },\n ) {\n const { uuid, configId, expiresAt, description } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.updateModificationConfigExpiration`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/expiration`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/expiration`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n expiresAt,\n ...(description !== undefined && { description }),\n },\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getAllClusterBulkOperations(params: RequestBaseParams) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getAllClusterBulkOperations`,\n url: `api/admin/clusters/bulkoperation`,\n normalizedUrl: `api/clusters/bulkoperation`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterBulkOperationDto[]>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getClusterBulkOperation(\n params: { uuid: string } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getClusterBulkOperation`,\n url: `api/admin/clusters/bulkoperation/${params.uuid}`,\n normalizedUrl: `api/clusters/bulkoperation/:uuid`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterBulkOperationDto>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async createClusterBulkOperation(\n params: {\n body: ClusterBulkOperationPostContent\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.createClusterBulkOperation`,\n url: `api/admin/clusters/bulkoperation`,\n normalizedUrl: `api/clusters/bulkoperation`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterBulkOperationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async ackClusterBulkOperation(\n params: {\n uuid: string\n ack: ClusterBulkOperationAck\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.ackClusterBulkOperation`,\n url: `api/admin/clusters/bulkoperation/${params.uuid}/ack`,\n normalizedUrl: `api/clusters/bulkoperation/${params.uuid}/ack`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterBulkOperationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async executeClusterBulkOperation(\n params: {\n uuid: string\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.executeClusterBulkOperation`,\n url: `api/admin/clusters/bulkoperation/${params.uuid}/execute`,\n normalizedUrl: `api/clusters/bulkoperation/${params.uuid}/execute`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterBulkOperationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async deleteClusterBulkOperation(\n params: {\n uuid: string\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.executeClusterBulkOperation`,\n url: `api/admin/clusters/bulkoperation/${params.uuid}`,\n normalizedUrl: `api/clusters/bulkoperation/${params.uuid}`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async getDbCorpses(params: RequestBaseParams): Promise<{\n corpses: Array<{\n clusterId: string\n orgId: string\n name: string\n created: string\n k8sContextUuid?: string\n k8sContext?: string\n }>\n }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getDbCorpses`,\n url: `api/admin/clusters/db-corpses`,\n normalizedUrl: `api/admin/clusters/db-corpses`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n corpses: Array<{\n clusterId: string\n orgId: string\n name: string\n created: string\n k8sContextUuid?: string\n k8sContext?: string\n }>\n }>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getK8sCorpses(params: RequestBaseParams): Promise<{\n corpses: Array<{\n clusterId: string\n orgId: string\n status: string\n k8sContextUuid: string\n k8sContext?: string\n }>\n }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getK8sCorpses`,\n url: `api/admin/clusters/corpses`,\n normalizedUrl: `api/admin/clusters/corpses`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n corpses: Array<{\n clusterId: string\n orgId: string\n status: string\n k8sContextUuid: string\n k8sContext?: string\n }>\n }>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async deleteDbCorpses(params: RequestBaseParams): Promise<{\n deleted: number\n corpses: Array<{\n clusterId: string\n orgId: string\n }>\n }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deleteDbCorpses`,\n url: `api/admin/clusters/db-corpses`,\n normalizedUrl: `api/admin/clusters/db-corpses`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n deleted: number\n corpses: Array<{\n clusterId: string\n orgId: string\n }>\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async deleteK8sCorpses(params: RequestBaseParams): Promise<{\n deleted: number\n corpses: Array<{\n clusterId: string\n orgId: string\n }>\n }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deleteK8sCorpses`,\n url: `api/admin/clusters/corpses`,\n normalizedUrl: `api/admin/clusters/corpses`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n deleted: number\n corpses: Array<{\n clusterId: string\n orgId: string\n }>\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async createLiteLLMSecretsForOrg(\n params: CreateLiteLLMSecretsForOrgRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.createLiteLLMSecretsForOrg`,\n url: `api/admin/clusters/org/${params.params.orgId}/litellm-secrets`,\n normalizedUrl: `api/admin/clusters/org/:orgId/litellm-secrets`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request({\n config: params.config,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async rotateLiteLLMKeySecretsForOrg(\n params: RotateLiteLLMKeySecretsForOrgRequest,\n ): Promise<RotateLiteLLMKeySecretsForOrgResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.rotateLiteLLMKeySecretsForOrg`,\n url: `api/admin/clusters/org/${params.params.orgId}/litellm-secrets/rotate`,\n normalizedUrl: `api/admin/clusters/org/:orgId/litellm-secrets/rotate`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<RotateLiteLLMKeySecretsForOrgResponse>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n /**\n * Re-point the managed LLM connector secrets of every cluster of an org.\n *\n * Console reads the org fresh and writes the API key, the API endpoint and\n * the default model of the upstream that the metadata of the org names. Use\n * it after a move from one upstream to the other. For a rotation on one\n * upstream, use `rotateLiteLLMKeySecretsForOrg`, which writes the key alone.\n */\n public static async repointLlmSecretsForOrg(\n params: RepointLlmSecretsForOrgRequest,\n ): Promise<RepointLlmSecretsForOrgResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.repointLlmSecretsForOrg`,\n url: `api/admin/clusters/org/${params.params.orgId}/litellm-secrets/repoint`,\n normalizedUrl: `api/admin/clusters/org/:orgId/litellm-secrets/repoint`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<RepointLlmSecretsForOrgResponse>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n /**\n * Remove the managed LLM connector secrets of every cluster of an org.\n *\n * Console removes the API key, the API endpoint and the default model\n * secrets, and keeps every other connector secret of the cluster.\n */\n public static async removeLlmSecretsForOrg(\n params: RemoveLlmSecretsForOrgRequest,\n ): Promise<RemoveLlmSecretsForOrgResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.removeLlmSecretsForOrg`,\n url: `api/admin/clusters/org/${params.params.orgId}/litellm-secrets`,\n normalizedUrl: `api/admin/clusters/org/:orgId/litellm-secrets`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<RemoveLlmSecretsForOrgResponse>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getSpecExplainer(\n params: GetSpecExplainerRequest,\n ): Promise<SpecExplainerResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getSpecExplainer`,\n url: `api/admin/clusters/${params.params.clusterId}/spec-explainer`,\n normalizedUrl: `api/admin/clusters/:clusterId/spec-explainer`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<SpecExplainerResponse>({\n ...params,\n base: {\n id: 'console',\n },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n /**\n * Raw Kubernetes CRD state for a cluster (Console Admin debugging). The\n * payload is the opaque live CRD object, so it is returned as `unknown` and\n * rendered verbatim by the caller.\n */\n public static async getCrdState(\n params: GetClusterCrdStateRequest,\n ): Promise<unknown> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getCrdState`,\n url: `api/admin/clusters/${params.params.clusterId}/crd-state`,\n normalizedUrl: `api/admin/clusters/:clusterId/crd-state`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<unknown>({\n ...params,\n base: {\n id: 'console',\n },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getOpenIncidents(\n params: RequestBaseParams,\n ): Promise<{ incidents: OpenIncident[] }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.getOpenIncidents',\n url: 'api/admin/clusters/incidents',\n normalizedUrl: 'api/admin/clusters/incidents',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ incidents: OpenIncident[] }>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getClusterIncidents(\n params: RequestBaseParams & { clusterId: string },\n ): Promise<OpenIncident[]> {\n const url = `api/admin/clusters/${params.clusterId}/incidents`\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.getClusterIncidents',\n url,\n normalizedUrl: 'api/admin/clusters/:clusterId/incidents',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ incidents: OpenIncident[] }>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!.incidents\n }\n\n /**\n * The details of a cluster through the admin surface. The\n * `clusters.canReadAllClusterInfo` permission gates this route.\n *\n * A tool that must read each org uses this route, and not the org-scoped\n * `api/orgs/:orgId/clusters/:clusterId/...` reads. Those reads ask the caller\n * to be a member of the org. For each other org they give an error.\n */\n public static async getClusterDetails(\n params: GetAdminClusterDetailsRequest,\n ): Promise<AdminClusterDetailsDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.getClusterDetails',\n url: `api/admin/clusters/${params.params.clusterId}/details`,\n normalizedUrl: 'api/admin/clusters/:clusterId/details',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n\n const response = await request<AdminClusterDetailsDto>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n\n return response.body!\n }\n}\n"],
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type {\n AlertSubscriptionDto,\n BackupDto,\n BackupScheduleDto,\n ByomClientDto,\n ByomStatus,\n ClusterBulkOperationAck,\n ClusterBulkOperationDto,\n ClusterBulkOperationPostContent,\n ClusterModificationConfigDto,\n ClusterModificationDto,\n ClusterPlanTypeDto,\n ClusterTtlDto,\n ClusterUsageMetadataDto,\n ClusterUsageMetricsData,\n ConsoleClusterDto,\n UniqueTaskUser,\n UpdateClusterTtlBody,\n ValueMetrics,\n ZeebeRebalancingSetting,\n} from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\nimport type { OpenIncident } from '../incident-io/incident-io.service.js'\nimport type { ConsoleClusterClientDto } from './console.cluster-clients.service.js'\nimport type { SecureConnectivityStatusDto } from './console.secure-connectivity.service.js'\n\nexport interface UpdateClusterToNewPlanTypeRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n targetPlanTypeId: string\n attemptClusterPlanUpdate?: boolean\n numberOfAllocatedHwPackages?: number\n keepModification?: boolean\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface SignalSignupRequest extends RequestBaseParams {\n params: {\n orgId: string\n targetPlanTypeId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface UpdateClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetClustersOfOrgRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface CreateLiteLLMSecretsForOrgRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface RotateLiteLLMKeySecretsForOrgRequest\n extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface RotateLiteLLMKeySecretsForOrgResponse {\n clustersChecked: number\n secretsUpdated: number\n failedClusterIds: string[]\n}\n\n/**\n * Request to re-point the managed LLM connector secrets of every cluster of an\n * org at the upstream that the org metadata names now.\n *\n * The rotate route writes the API key alone. This one writes the API endpoint\n * and the default model too, because a move from one upstream to the other\n * changes all three values.\n */\nexport interface RepointLlmSecretsForOrgRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\n/** Same counters as the rotate route. `secretsUpdated` counts clusters. */\nexport interface RepointLlmSecretsForOrgResponse {\n clustersChecked: number\n secretsUpdated: number\n failedClusterIds: string[]\n}\n\n/**\n * Request to remove the managed LLM connector secrets of every cluster of an\n * org. Use it when the org loses its managed LLM key.\n */\nexport interface RemoveLlmSecretsForOrgRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\n/** `secretsRemoved` counts clusters, as `secretsUpdated` does for re-point. */\nexport interface RemoveLlmSecretsForOrgResponse {\n clustersChecked: number\n secretsRemoved: number\n failedClusterIds: string[]\n}\n\nexport type SpecExplainerFieldSource =\n | 'plan'\n | 'generation'\n | 'planType'\n | 'override'\n | 'modification'\n | 'infra'\n | 'computed'\n | 'featureFlag'\n | 'org'\n | 'cluster'\n\nexport interface SpecExplainerFieldAnnotation {\n source: SpecExplainerFieldSource\n sourcePath?: string\n sourceValue?: unknown\n finalValue: unknown\n transforms?: string[]\n overrides?: Array<{\n by: SpecExplainerFieldSource\n originalValue: unknown\n }>\n fallbackChain?: Array<{\n source: SpecExplainerFieldSource\n value: unknown\n used: boolean\n }>\n}\n\nexport interface SpecExplainerResponse {\n spec: Record<string, unknown>\n annotations: Record<string, SpecExplainerFieldAnnotation>\n sources: {\n plan: Record<string, unknown>\n generation: Record<string, unknown>\n planType: Record<string, unknown>\n overrideEnvVars?: Record<string, unknown>\n activeModification?: {\n planModifications: Array<{ key: string; value: unknown }>\n }\n featureFlags?: Record<string, boolean>\n }\n}\n\nexport interface GetSpecExplainerRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n}\n\nexport interface GetClusterCrdStateRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n}\n\nexport interface GetAdminClusterDetailsRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n}\n\n/**\n * `GET api/admin/clusters/:clusterId/details`.\n *\n * Each field holds the same data as the related org-scoped route. But an admin\n * permission gates this route, and two fields are different:\n *\n * - `clients` holds the internal clients too. The org-scoped route keeps them\n * out. Read `internal` on a client to tell them apart.\n * - `secrets` masks each value. The route gives the names of the connector\n * secrets, not the values.\n */\nexport interface AdminClusterDetailsDto {\n clients: ConsoleClusterClientDto[]\n alerts: AlertSubscriptionDto[]\n secrets: Record<string, string>\n backups: BackupDto[]\n backupSchedules: BackupScheduleDto[]\n internalBackups: BackupDto[]\n byomClients: ByomClientDto[]\n byomStatus: ByomStatus | Record<string, never>\n secureConnectivity: SecureConnectivityStatusDto | null\n}\n\nexport interface GetAllClustersRequest extends RequestBaseParams {\n params: {\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetClusterRequest extends RequestBaseParams {\n params: {\n clusterId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetCreatedClusterInstancesRequest extends RequestBaseParams {\n params: {\n range: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetClusterPlanTypeRequest extends RequestBaseParams {\n params: {\n clusterPlanTypeId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetAllClusterPlanTypesRequest extends RequestBaseParams {\n params: {\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetValueMetricsUsageDataRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetValueMetricsUsageDataPerDayRequest\n extends RequestBaseParams {\n params: {\n orgId: string\n /** How many days back from now the read covers. */\n days: number\n }\n}\n\nexport interface GetValueMetricsMetadataRequest extends RequestBaseParams {\n params: {\n orgId: string\n }\n}\n\nexport interface GetValueMetricsRequest extends RequestBaseParams {\n params: {\n orgId: string\n lastAvailableTimestamp: number\n timeframe: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetValueMetricsForAllRequest extends RequestBaseParams {\n params: {\n lastAvailableTimestamp: number\n timeframe: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetTaskUsersRequest extends RequestBaseParams {\n params: {\n orgId: string\n lastAvailableTimestamp: number\n timeframe: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetTaskUsersForAllRequest extends RequestBaseParams {\n params: {\n lastAvailableTimestamp: number\n timeframe: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface DeleteClustersOfOrgRequest extends RequestBaseParams {\n params: {\n orgId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface GetUpgradableClusterPlanTypesRequest\n extends RequestBaseParams {\n params: {\n sourceClusterPlanTypeId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface UpdateClustersOfOrgToNewPlanTypeRequest\n extends RequestBaseParams {\n params: {\n orgId: string\n sourceClusterPlanTypeId: string\n targetClusterPlanTypeId: string\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface UpdateClusterMetricsStartDateRequest\n extends RequestBaseParams {\n params: {\n orgId: string\n startDate: number\n headers: {\n [key: string]: string\n }\n }\n}\n\nexport interface AdminClusterAutoUpdateRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n}\n\nexport interface AdminClusterOptionalTelemetryRequest\n extends RequestBaseParams {\n params: {\n clusterId: string\n }\n body: {\n optionalTelemetryEnabled: boolean\n }\n}\n\nexport interface AdminClusterTtlRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n body: UpdateClusterTtlBody\n}\n\nexport interface AdminClusterNonSpotNodesRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n body: {\n nonSpotNodesEnabled: boolean\n }\n}\n\nexport interface AdminClusterZeebeRebalancingRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n body: ZeebeRebalancingSetting\n}\n\n/** What `GET api/admin/clusters/modifications` answers. */\nexport interface ModificationsAnswer {\n clusters: ConsoleClusterDto[]\n modifications: ClusterModificationDto[]\n}\n\n/**\n * How many cluster ids one GET of the modifications carries in its query.\n *\n * 50 uuids are about 1.9 KB of request line, well under the 8 KB that the\n * ingress and node accept. The bound is on the request, not on the answer.\n */\nexport const CLUSTER_UUIDS_PER_READ = 50\n\nexport class ConsoleAdminService {\n public static async updateClusterToNewPlanType(\n params: UpdateClusterToNewPlanTypeRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.updateClusterToNewPlanType`,\n url: `api/admin/clusters/${params.params.clusterId}/org/${params.params.orgId}/clusterplantype`,\n normalizedUrl: `api/admin/clusters/:clusterId/org/:orgId/clusterplantype`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {\n toPlanTypeUuid: params.params.targetPlanTypeId,\n numberOfAllocatedHwPackages: params.params.numberOfAllocatedHwPackages,\n attemptClusterPlanUpdate: params.params.attemptClusterPlanUpdate,\n keepModification: params.params.keepModification,\n },\n headers: params.params.headers,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async updateClusterMetricsStartDate(\n params: UpdateClusterMetricsStartDateRequest,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.updateClusterMetricsStartDate`,\n url: `api/admin/metrics/clusters/org/${params.params.orgId}/start-date`,\n normalizedUrl: `api/admin/metrics/clusters/org/:orgId/start-date`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ success: boolean }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {\n startDate: params.params.startDate,\n },\n headers: params.params.headers,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async disableClusterAutoUpdate(\n params: AdminClusterAutoUpdateRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.disableClusterAutoUpdate',\n url: `api/admin/clusters/${params.params.clusterId}/autoupdate`,\n normalizedUrl: 'api/admin/clusters/:clusterId/autoupdate',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: { autoUpdate: false },\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async enableClusterAutoUpdate(\n params: AdminClusterAutoUpdateRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.enableClusterAutoUpdate',\n url: `api/admin/clusters/${params.params.clusterId}/autoupdate`,\n normalizedUrl: 'api/admin/clusters/:clusterId/autoupdate',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: { autoUpdate: true },\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * Set optional product telemetry for a cluster. Optional telemetry is\n * Camunda-managed: the customer cluster PATCH does not accept the field, so\n * this admin route is the only writer.\n */\n public static async updateClusterOptionalTelemetry(\n params: AdminClusterOptionalTelemetryRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.updateClusterOptionalTelemetry',\n url: `api/admin/clusters/${params.params.clusterId}/optional-telemetry`,\n normalizedUrl: 'api/admin/clusters/:clusterId/optional-telemetry',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: params.body,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * Extend the TTL of a cluster, or make it unlimited with a reason and a\n * link. Answers the new TTL. The route answers 404 while\n * `console.clusterTtl` is off for the caller, 403 on prod for a cluster\n * that is not internal or whose owner org does not have the Internal sales\n * plan, and 409 when the TTL or the owner changed during the update.\n */\n public static async updateClusterTtl(\n params: AdminClusterTtlRequest,\n ): Promise<ClusterTtlDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.updateClusterTtl',\n url: `api/admin/clusters/${params.params.clusterId}/ttl`,\n normalizedUrl: 'api/admin/clusters/:clusterId/ttl',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterTtlDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n if (!response.ok || !response.body) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * Move a cluster to non-spot nodes, or let it get spot nodes again. The\n * cluster restarts on both directions, because the value goes into the\n * `availabilityClass` of the spec.\n */\n public static async updateClusterNonSpotNodes(\n params: AdminClusterNonSpotNodesRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.updateClusterNonSpotNodes',\n url: `api/admin/clusters/${params.params.clusterId}/non-spot-nodes`,\n normalizedUrl: 'api/admin/clusters/:clusterId/non-spot-nodes',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: params.body,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * Set scheduled Zeebe leader rebalancing for a cluster. The body replaces the\n * stored setting, and `enabled: false` keeps the schedule. The route answers\n * 404 while the flag `console.zeebeRebalancing` is off, and 400 with field\n * messages for a setting that `validateZeebeRebalancing` refuses.\n */\n public static async updateZeebeRebalancing(\n params: AdminClusterZeebeRebalancingRequest,\n ): Promise<ZeebeRebalancingSetting> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.updateZeebeRebalancing',\n url: `api/admin/clusters/${params.params.clusterId}/zeebe-rebalancing`,\n normalizedUrl: 'api/admin/clusters/:clusterId/zeebe-rebalancing',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ZeebeRebalancingSetting>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n if (!response.ok || !response.body) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async signalSignup(params: SignalSignupRequest): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.signalSignup`,\n url: `api/admin/clusters/org/${params.params.orgId}/signup`,\n normalizedUrl: `api/admin/clusters/org/:orgId/signup`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {\n planTypeUuid: params.params.targetPlanTypeId,\n },\n headers: params.params.headers,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async unlinkClusterFromModification(\n params: {\n uuid: string\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.unlinkClusterFromModification`,\n url: `api/admin/clusters/modifications/clusterUnlink/${params.uuid}`,\n normalizedUrl: `api/admin/clusters/modifications/clusterUnlink/:clusterId`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async repairClustersActiveModification(\n params: {\n uuid: string\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.repairClustersActiveModification`,\n\n url: `api/admin/clusters/modifications/clusterRepair/${params.uuid}`,\n normalizedUrl: `api/clusters/modifications/clusterRepair/:clusterId`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async updateClusters(\n params: UpdateClusterRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.updateClusters`,\n url: `api/admin/clusters/org/${params.params.orgId}`,\n normalizedUrl: `api/admin/clusters/org/:orgId`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {},\n headers: params.params.headers,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async getClustersOfOrg(\n params: GetClustersOfOrgRequest,\n ): Promise<any[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getClustersOfOrg`,\n url: `api/orgs/${params.params.orgId}/clusters`,\n normalizedUrl: `api/orgs/:orgId/clusters`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<any[]>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n // Read-only GET against console, so a replay has no side effects. Console\n // rolling a pod answers with envoy's \"upstream connect error or\n // disconnect/reset before headers\" 503, and without this opt-in that blip\n // is reported as our failure \u2014 the same reason `OrgsService` and\n // `NotificationsService` opt in.\n retryTransientErrors: true,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getAllClusters(\n params: GetAllClustersRequest,\n ): Promise<any[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getAllClusters`,\n url: `api/admin/clusters`,\n normalizedUrl: `api/admin/clusters`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<any[]>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n // Same reasoning as `getClustersOfOrg` above, and it matters more here:\n // `cron.cluster-plan-cache-refresh` is the main caller, so one envoy 503\n // during a console rollout left the plan cache unrefreshed for a whole\n // interval.\n retryTransientErrors: true,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getCluster(params: GetClusterRequest): Promise<any> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getCluster`,\n url: `api/admin/clusters/${params.params.clusterId}`,\n normalizedUrl: `api/admin/clusters/:clusterId`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<any>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * All clusters with basic org info (concrete plan/planType/status per cluster),\n * used to enrich bulk-operation cluster sets. Mirrors accounts'\n * `clusters.getAllWithBasicOrgInfo` \u2192 `GET api/admin/clusters/enrichedClusters`.\n */\n public static async getEnrichedClusters(\n params: RequestBaseParams,\n ): Promise<{ clusters: unknown[]; orgs: unknown[] }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getEnrichedClusters`,\n url: `api/admin/clusters/enrichedClusters`,\n normalizedUrl: `api/admin/clusters/enrichedClusters`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ clusters: unknown[]; orgs: unknown[] }>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? { clusters: [], orgs: [] }\n }\n\n public static async getCreatedClusterInstances(\n params: GetCreatedClusterInstancesRequest,\n ): Promise<{ clusters: Array<{ uuid: string; count: number }> }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getCreatedClusterInstances`,\n url: `api/admin/clusters/instances/created?range=${params.params.range}`,\n normalizedUrl: `api/admin/clusters/instances/created?range=:range`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{\n clusters: Array<{ uuid: string; count: number }>\n }>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getClusterPlanType(\n params: GetClusterPlanTypeRequest,\n ): Promise<ClusterPlanTypeDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getClusterPlanType`,\n url: `api/plans/type/${params.params.clusterPlanTypeId}`,\n normalizedUrl: `api/plans/type/:clusterPlanTypeId`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<ClusterPlanTypeDto>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getAllClusterPlanTypes(\n params: GetAllClusterPlanTypesRequest,\n ): Promise<ClusterPlanTypeDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getAllClusterPlanTypes`,\n url: `api/plans/type`,\n normalizedUrl: `api/plans/type`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<ClusterPlanTypeDto[]>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getValueMetricsUsageData(\n params: GetValueMetricsUsageDataRequest,\n ): Promise<ClusterUsageMetricsData[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getValueMetricsUsageData`,\n url: `api/orgs/${params.params.orgId}/clusters/usage/value-metrics`,\n normalizedUrl: `api/orgs/:orgId/clusters/usage/value-metrics`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<ClusterUsageMetricsData[]>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n /**\n * The value metrics that console counted itself, one row for each cluster\n * and day of the last `days` days\n * (`GET api/orgs/:orgId/clusters/usage/value-metrics/:days`).\n *\n * This is the source that HDP replaced for a 2025 organization. The\n * comparison of the two sources reads it on purpose, so it never reads HDP\n * under this name: a comparison of a series with itself shows nothing.\n */\n public static async getValueMetricsUsageDataPerDay(\n params: GetValueMetricsUsageDataPerDayRequest,\n ): Promise<ClusterUsageMetricsData[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getValueMetricsUsageDataPerDay`,\n url: `api/orgs/${params.params.orgId}/clusters/usage/value-metrics/${params.params.days}`,\n normalizedUrl: `api/orgs/:orgId/clusters/usage/value-metrics/:days`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<ClusterUsageMetricsData[]>({\n config: params.config,\n base: {\n id: 'console',\n },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? []\n }\n\n /**\n * The usage metadata of an organization: the unique task users and the\n * deployed models for each billing period\n * (`GET api/orgs/:orgId/clusters/usage/value-metrics-metadata`).\n */\n public static async getValueMetricsMetadata(\n params: GetValueMetricsMetadataRequest,\n ): Promise<ClusterUsageMetadataDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getValueMetricsMetadata`,\n url: `api/orgs/${params.params.orgId}/clusters/usage/value-metrics-metadata`,\n normalizedUrl: `api/orgs/:orgId/clusters/usage/value-metrics-metadata`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ metadata: ClusterUsageMetadataDto[] }>({\n config: params.config,\n base: {\n id: 'console',\n },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body?.metadata ?? []\n }\n\n public static async getValueMetrics(\n params: GetValueMetricsRequest,\n ): Promise<ValueMetrics | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getValueMetrics`,\n url: `api/admin/clusters/org/${params.params.orgId}/valuemetrics/${params.params.lastAvailableTimestamp}/${params.params.timeframe}`,\n normalizedUrl: `api/admin/clusters/org/:orgId/valuemetrics/:lastAvailableTimestamp/:timeframe`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ valueMetrics: ValueMetrics }>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body?.valueMetrics\n }\n\n public static async getValueMetricsForAll(\n params: GetValueMetricsForAllRequest,\n ): Promise<ValueMetrics[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getValueMetricsForAll`,\n url: `api/admin/clusters/valuemetrics/${params.params.lastAvailableTimestamp}/${params.params.timeframe}`,\n normalizedUrl: `api/admin/clusters/valuemetrics/:lastAvailableTimestamp/:timeframe`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ valueMetrics: ValueMetrics[] }>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body?.valueMetrics ?? []\n }\n\n public static async getTaskUsers(\n params: GetTaskUsersRequest,\n ): Promise<UniqueTaskUser[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getTaskUsers`,\n url: `api/admin/clusters/org/${params.params.orgId}/valuemetrics/taskusers/${params.params.lastAvailableTimestamp}/${params.params.timeframe}`,\n normalizedUrl: `api/admin/clusters/org/:orgId/valuemetrics/taskusers/:lastAvailableTimestamp/:timeframe`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ taskUsers: UniqueTaskUser[] }>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body?.taskUsers ?? []\n }\n\n public static async getTaskUsersForAll(\n params: GetTaskUsersForAllRequest,\n ): Promise<UniqueTaskUser[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getTaskUsersForAll`,\n url: `api/admin/clusters/valuemetrics/taskusers/${params.params.lastAvailableTimestamp}/${params.params.timeframe}`,\n normalizedUrl: `api/admin/clusters/valuemetrics/taskusers/:lastAvailableTimestamp/:timeframe`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ taskUsers: UniqueTaskUser[] }>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body?.taskUsers ?? []\n }\n\n public static async deleteClustersOfOrg(\n params: DeleteClustersOfOrgRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deleteClustersOfOrg`,\n url: `api/admin/clusters/org/${params.params.orgId}`,\n normalizedUrl: `api/admin/clusters/org/:orgId`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async getUpgradableClusterPlanTypes(\n params: GetUpgradableClusterPlanTypesRequest,\n ): Promise<ClusterPlanTypeDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getUpgradableClusterPlanTypes`,\n url: `api/admin/clusters/clusterplantype/${params.params.sourceClusterPlanTypeId}/upgradable`,\n normalizedUrl: `api/admin/clusters/clusterplantype/:sourceClusterPlanTypeId/upgradable`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<ClusterPlanTypeDto[]>({\n ...params,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async updateClustersOfOrgToNewPlanType(\n params: UpdateClustersOfOrgToNewPlanTypeRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.updateClustersOfOrgToNewPlanType`,\n url: `api/admin/clusters/org/${params.params.orgId}/clusterplantype`,\n normalizedUrl: `api/admin/clusters/org/:orgId/clusterplantype`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n headers: params.params.headers,\n body: {\n fromPlanTypeUuid: params.params.sourceClusterPlanTypeId,\n toPlanTypeUuid: params.params.targetClusterPlanTypeId,\n },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async getApiClients(\n params: { orgId: string } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getBulkClusterPlanUpdate`,\n url: `api/admin/apiClients/${params.orgId}`,\n normalizedUrl: `api/apiClients/:orgId`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<any[]>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n /**\n * deleteApiClient deletes an API client of any org. The route needs the\n * `apiClient.delete` console permission and no org membership. `clientUuid`\n * is the `uuid` of the client, not its OAuth `clientId`.\n */\n public static async deleteApiClient(\n params: { orgId: string; clientUuid: string } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deleteApiClient`,\n url: `api/admin/apiClients/${params.orgId}/client/${params.clientUuid}`,\n normalizedUrl: `api/admin/apiClients/:orgId/client/:clientUuid`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async wakeCluster(\n params: { clusterId: string } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getBulkClusterPlanUpdate`,\n url: `api/admin/clusters/${params.clusterId}/wake`,\n normalizedUrl: `api/clusters/:clusterId/wake`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * Every cluster modification, with the clusters they belong to.\n *\n * `clusterUuids` bounds the answer to those clusters. Console reads the\n * whole table without it, and one cluster for each row of the answer, so a\n * reader that asks about a few clusters names them. The ids go in the\n * query of a GET, so they travel in groups of `CLUSTER_UUIDS_PER_READ`:\n * the request line must not grow with the selection, or a large one\n * answers 414. The groups are read one after the other and merged, with\n * each cluster one time, so the caller sees one answer of the usual shape.\n * An empty list reads nothing and answers nothing.\n */\n public static async getAllModifications(\n params: RequestBaseParams & {\n clusterUuids?: readonly string[]\n headers?: {\n 'x-camunda-email'?: string\n }\n },\n ): Promise<ModificationsAnswer | undefined> {\n const { clusterUuids, ...rest } = params\n if (clusterUuids === undefined) {\n return ConsoleAdminService.readModifications(rest)\n }\n if (clusterUuids.length === 0) {\n return { clusters: [], modifications: [] }\n }\n const merged: ModificationsAnswer = { clusters: [], modifications: [] }\n const seenClusters = new Set<string>()\n for (\n let start = 0;\n start < clusterUuids.length;\n start += CLUSTER_UUIDS_PER_READ\n ) {\n const page = await ConsoleAdminService.readModifications(\n rest,\n clusterUuids.slice(start, start + CLUSTER_UUIDS_PER_READ),\n )\n if (!page) {\n continue\n }\n merged.modifications.push(...page.modifications)\n for (const cluster of page.clusters) {\n if (!seenClusters.has(cluster.uuid)) {\n seenClusters.add(cluster.uuid)\n merged.clusters.push(cluster)\n }\n }\n }\n return merged\n }\n\n /** One GET of the modifications, for every cluster or for the ids given. */\n private static async readModifications(\n params: RequestBaseParams & {\n headers?: {\n 'x-camunda-email'?: string\n }\n },\n clusterUuids?: readonly string[],\n ): Promise<ModificationsAnswer | undefined> {\n const query =\n clusterUuids && clusterUuids.length > 0\n ? `?clusterUuids=${clusterUuids.map(encodeURIComponent).join(',')}`\n : ''\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getAllModifications`,\n url: `api/admin/clusters/modifications${query}`,\n normalizedUrl: `api/clusters/modifications`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ModificationsAnswer>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n headers: params.headers,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async createModification(\n params: RequestBaseParams & {\n clusterUuid: string\n headers?: {\n 'x-camunda-email'?: string\n }\n },\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.createModification`,\n url: `api/admin/clusters/modifications`,\n normalizedUrl: `api/clusters/modifications`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n clusterUuid: params.clusterUuid,\n },\n headers: params.headers,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async createModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n description?: string\n url?: string\n planModifications?: Array<{\n key: string\n value: string | number | boolean\n }>\n expiresAt?: Date | null\n headers?: {\n 'x-camunda-email'?: string\n }\n },\n ) {\n const { uuid, description, url, planModifications, expiresAt } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.createModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}`,\n normalizedUrl: `api/clusters/modifications/:uuid`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n description,\n url,\n planModifications,\n expiresAt,\n },\n headers: params.headers,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async claimModification(\n params: RequestBaseParams & { uuid: string },\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.claimModificationConfig`,\n url: `api/admin/clusters/modifications/${params.uuid}/claim`,\n normalizedUrl: `api/clusters/modifications/:uuid/claim`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async dropModification(\n params: RequestBaseParams & { uuid: string },\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.dropModificationConfig`,\n url: `api/admin/clusters/modifications/${params.uuid}/drop`,\n normalizedUrl: `api/clusters/modifications/:uuid/drop`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n public static async archiveModification(\n params: RequestBaseParams & { uuid: string },\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.archiveModificationConfig`,\n url: `api/admin/clusters/modifications/${params.uuid}/archive`,\n normalizedUrl: `api/clusters/modifications/:uuid/archive`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async refineModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n description?: string\n url?: string\n planModifications?: Array<{\n key: string\n value: string | number | boolean\n }>\n expiresAt?: Date | null\n },\n ) {\n const { uuid, configId, description, url, planModifications, expiresAt } =\n params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.refineModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n description,\n url,\n planModifications,\n expiresAt,\n },\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async cloneModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n description: string\n url?: string\n expiresAt?: Date | null\n },\n ) {\n const { uuid, configId } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.cloneModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/clone`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/clone`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n description: params.description,\n url: params.url,\n expiresAt: params.expiresAt,\n },\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async sealModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n },\n ) {\n const { uuid, configId } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.sealModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/seal`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/seal`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async unsealModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n },\n ) {\n const { uuid, configId } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.unsealModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/unseal`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/unseal`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async ackModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n },\n ) {\n const { uuid, configId } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.ackModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/ack`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/ack`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async deleteModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n },\n ) {\n const { uuid, configId } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deleteModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n public static async activateModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n body?: { yoloJustification?: string; skipK8sUpdate?: boolean }\n },\n ) {\n const { uuid, configId, body } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.activateModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/activate`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/activate`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n public static async deactivateModificationConfig(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n skipK8sUpdate?: boolean\n },\n ) {\n const { uuid, configId, skipK8sUpdate } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deactivateModificationConfig`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/deactivate`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/deactivate`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n body: { skipK8sUpdate },\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async updateModificationConfigExpiration(\n params: RequestBaseParams & {\n uuid: string\n configId: string\n expiresAt: Date | null\n description?: string\n },\n ) {\n const { uuid, configId, expiresAt, description } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.updateModificationConfigExpiration`,\n url: `api/admin/clusters/modifications/${uuid}/${configId}/expiration`,\n normalizedUrl: `api/clusters/modifications/:uuid/:configId/expiration`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterModificationConfigDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n expiresAt,\n ...(description !== undefined && { description }),\n },\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getAllClusterBulkOperations(params: RequestBaseParams) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getAllClusterBulkOperations`,\n url: `api/admin/clusters/bulkoperation`,\n normalizedUrl: `api/clusters/bulkoperation`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterBulkOperationDto[]>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getClusterBulkOperation(\n params: { uuid: string } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getClusterBulkOperation`,\n url: `api/admin/clusters/bulkoperation/${params.uuid}`,\n normalizedUrl: `api/clusters/bulkoperation/:uuid`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterBulkOperationDto>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async createClusterBulkOperation(\n params: {\n body: ClusterBulkOperationPostContent\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.createClusterBulkOperation`,\n url: `api/admin/clusters/bulkoperation`,\n normalizedUrl: `api/clusters/bulkoperation`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterBulkOperationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async ackClusterBulkOperation(\n params: {\n uuid: string\n ack: ClusterBulkOperationAck\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.ackClusterBulkOperation`,\n url: `api/admin/clusters/bulkoperation/${params.uuid}/ack`,\n normalizedUrl: `api/clusters/bulkoperation/${params.uuid}/ack`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterBulkOperationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async executeClusterBulkOperation(\n params: {\n uuid: string\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.executeClusterBulkOperation`,\n url: `api/admin/clusters/bulkoperation/${params.uuid}/execute`,\n normalizedUrl: `api/clusters/bulkoperation/${params.uuid}/execute`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ClusterBulkOperationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async deleteClusterBulkOperation(\n params: {\n uuid: string\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.executeClusterBulkOperation`,\n url: `api/admin/clusters/bulkoperation/${params.uuid}`,\n normalizedUrl: `api/clusters/bulkoperation/${params.uuid}`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async getDbCorpses(params: RequestBaseParams): Promise<{\n corpses: Array<{\n clusterId: string\n orgId: string\n name: string\n created: string\n k8sContextUuid?: string\n k8sContext?: string\n }>\n }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getDbCorpses`,\n url: `api/admin/clusters/db-corpses`,\n normalizedUrl: `api/admin/clusters/db-corpses`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n corpses: Array<{\n clusterId: string\n orgId: string\n name: string\n created: string\n k8sContextUuid?: string\n k8sContext?: string\n }>\n }>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getK8sCorpses(params: RequestBaseParams): Promise<{\n corpses: Array<{\n clusterId: string\n orgId: string\n status: string\n k8sContextUuid: string\n k8sContext?: string\n }>\n }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getK8sCorpses`,\n url: `api/admin/clusters/corpses`,\n normalizedUrl: `api/admin/clusters/corpses`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n corpses: Array<{\n clusterId: string\n orgId: string\n status: string\n k8sContextUuid: string\n k8sContext?: string\n }>\n }>({\n ...params,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async deleteDbCorpses(params: RequestBaseParams): Promise<{\n deleted: number\n corpses: Array<{\n clusterId: string\n orgId: string\n }>\n }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deleteDbCorpses`,\n url: `api/admin/clusters/db-corpses`,\n normalizedUrl: `api/admin/clusters/db-corpses`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n deleted: number\n corpses: Array<{\n clusterId: string\n orgId: string\n }>\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async deleteK8sCorpses(params: RequestBaseParams): Promise<{\n deleted: number\n corpses: Array<{\n clusterId: string\n orgId: string\n }>\n }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.deleteK8sCorpses`,\n url: `api/admin/clusters/corpses`,\n normalizedUrl: `api/admin/clusters/corpses`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n deleted: number\n corpses: Array<{\n clusterId: string\n orgId: string\n }>\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async createLiteLLMSecretsForOrg(\n params: CreateLiteLLMSecretsForOrgRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.createLiteLLMSecretsForOrg`,\n url: `api/admin/clusters/org/${params.params.orgId}/litellm-secrets`,\n normalizedUrl: `api/admin/clusters/org/:orgId/litellm-secrets`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request({\n config: params.config,\n base: {\n id: 'console',\n },\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async rotateLiteLLMKeySecretsForOrg(\n params: RotateLiteLLMKeySecretsForOrgRequest,\n ): Promise<RotateLiteLLMKeySecretsForOrgResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.rotateLiteLLMKeySecretsForOrg`,\n url: `api/admin/clusters/org/${params.params.orgId}/litellm-secrets/rotate`,\n normalizedUrl: `api/admin/clusters/org/:orgId/litellm-secrets/rotate`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<RotateLiteLLMKeySecretsForOrgResponse>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n /**\n * Re-point the managed LLM connector secrets of every cluster of an org.\n *\n * Console reads the org fresh and writes the API key, the API endpoint and\n * the default model of the upstream that the metadata of the org names. Use\n * it after a move from one upstream to the other. For a rotation on one\n * upstream, use `rotateLiteLLMKeySecretsForOrg`, which writes the key alone.\n */\n public static async repointLlmSecretsForOrg(\n params: RepointLlmSecretsForOrgRequest,\n ): Promise<RepointLlmSecretsForOrgResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.repointLlmSecretsForOrg`,\n url: `api/admin/clusters/org/${params.params.orgId}/litellm-secrets/repoint`,\n normalizedUrl: `api/admin/clusters/org/:orgId/litellm-secrets/repoint`,\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<RepointLlmSecretsForOrgResponse>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n /**\n * Remove the managed LLM connector secrets of every cluster of an org.\n *\n * Console removes the API key, the API endpoint and the default model\n * secrets, and keeps every other connector secret of the cluster.\n */\n public static async removeLlmSecretsForOrg(\n params: RemoveLlmSecretsForOrgRequest,\n ): Promise<RemoveLlmSecretsForOrgResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.removeLlmSecretsForOrg`,\n url: `api/admin/clusters/org/${params.params.orgId}/litellm-secrets`,\n normalizedUrl: `api/admin/clusters/org/:orgId/litellm-secrets`,\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<RemoveLlmSecretsForOrgResponse>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n headers: params.params.headers,\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getSpecExplainer(\n params: GetSpecExplainerRequest,\n ): Promise<SpecExplainerResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getSpecExplainer`,\n url: `api/admin/clusters/${params.params.clusterId}/spec-explainer`,\n normalizedUrl: `api/admin/clusters/:clusterId/spec-explainer`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<SpecExplainerResponse>({\n ...params,\n base: {\n id: 'console',\n },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n /**\n * Raw Kubernetes CRD state for a cluster (Console Admin debugging). The\n * payload is the opaque live CRD object, so it is returned as `unknown` and\n * rendered verbatim by the caller.\n */\n public static async getCrdState(\n params: GetClusterCrdStateRequest,\n ): Promise<unknown> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleAdminService.getCrdState`,\n url: `api/admin/clusters/${params.params.clusterId}/crd-state`,\n normalizedUrl: `api/admin/clusters/:clusterId/crd-state`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<unknown>({\n ...params,\n base: {\n id: 'console',\n },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getOpenIncidents(\n params: RequestBaseParams,\n ): Promise<{ incidents: OpenIncident[] }> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.getOpenIncidents',\n url: 'api/admin/clusters/incidents',\n normalizedUrl: 'api/admin/clusters/incidents',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ incidents: OpenIncident[] }>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!\n }\n\n public static async getClusterIncidents(\n params: RequestBaseParams & { clusterId: string },\n ): Promise<OpenIncident[]> {\n const url = `api/admin/clusters/${params.clusterId}/incidents`\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.getClusterIncidents',\n url,\n normalizedUrl: 'api/admin/clusters/:clusterId/incidents',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n const response = await request<{ incidents: OpenIncident[] }>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body!.incidents\n }\n\n /**\n * The details of a cluster through the admin surface. The\n * `clusters.canReadAllClusterInfo` permission gates this route.\n *\n * A tool that must read each org uses this route, and not the org-scoped\n * `api/orgs/:orgId/clusters/:clusterId/...` reads. Those reads ask the caller\n * to be a member of the org. For each other org they give an error.\n */\n public static async getClusterDetails(\n params: GetAdminClusterDetailsRequest,\n ): Promise<AdminClusterDetailsDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleAdminService.getClusterDetails',\n url: `api/admin/clusters/${params.params.clusterId}/details`,\n normalizedUrl: 'api/admin/clusters/:clusterId/details',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n\n const response = await request<AdminClusterDetailsDto>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n\n return response.body!\n }\n}\n"],
|
|
5
5
|
"mappings": "AA+BA,SAAS,eAAe;AACxB,SAAS,iBAAiB;A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,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAEA,UAAM,WAAW,MAAM,QAAgC;AAAA,MACrD,GAAG;AAAA,MACH,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,MAChB,cAAc;AAAA,IAChB,CAAC;AAED,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI;AAAA,QACR,GAAG,eAAe,OAAO,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AAEA,WAAO,SAAS;AAAA,EAClB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,8 @@ export interface ConsoleChannelDto {
|
|
|
5
5
|
name: string;
|
|
6
6
|
description: string;
|
|
7
7
|
isDefault: boolean;
|
|
8
|
-
|
|
8
|
+
/** Missing on an empty channel. */
|
|
9
|
+
defaultGeneration?: GenerationDto;
|
|
9
10
|
allowedGenerations: GenerationDto[];
|
|
10
11
|
createdBy: string;
|
|
11
12
|
createdByName?: string;
|
|
@@ -20,9 +21,11 @@ export interface CreateConsoleChannelParams extends RequestBaseParams {
|
|
|
20
21
|
name: string;
|
|
21
22
|
description: string;
|
|
22
23
|
isDefault: boolean;
|
|
23
|
-
/** Required
|
|
24
|
-
defaultGenerationId
|
|
24
|
+
/** Required unless `isEmpty`: the route answers 400 when the write carries no default. */
|
|
25
|
+
defaultGenerationId?: string;
|
|
25
26
|
allowedGenerationIds: string[];
|
|
27
|
+
/** Empties the channel. The backend accepts it only with `console.emptyChannels` on. */
|
|
28
|
+
isEmpty?: boolean;
|
|
26
29
|
};
|
|
27
30
|
}
|
|
28
31
|
export interface UpdateConsoleChannelParams extends RequestBaseParams {
|
|
@@ -33,9 +36,11 @@ export interface UpdateConsoleChannelParams extends RequestBaseParams {
|
|
|
33
36
|
name: string;
|
|
34
37
|
description: string;
|
|
35
38
|
isDefault: boolean;
|
|
36
|
-
/** Required
|
|
37
|
-
defaultGenerationId
|
|
39
|
+
/** Required unless `isEmpty`, like on create. */
|
|
40
|
+
defaultGenerationId?: string;
|
|
38
41
|
allowedGenerationIds: string[];
|
|
42
|
+
/** Empties the channel. The backend accepts it only with `console.emptyChannels` on. */
|
|
43
|
+
isEmpty?: boolean;
|
|
39
44
|
};
|
|
40
45
|
}
|
|
41
46
|
export interface DeleteConsoleChannelParams extends RequestBaseParams {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/services/console/console.channel.service.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type { GenerationDto } from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\n\nexport interface ConsoleChannelDto {\n uuid: string\n name: string\n description: string\n isDefault: boolean\n defaultGeneration
|
|
5
|
-
"mappings": "AAWA,SAAS,eAAe;AACxB,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type { GenerationDto } from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\n\nexport interface ConsoleChannelDto {\n uuid: string\n name: string\n description: string\n isDefault: boolean\n /** Missing on an empty channel. */\n defaultGeneration?: GenerationDto\n allowedGenerations: GenerationDto[]\n createdBy: string\n createdByName?: string\n created: Date\n updatedBy: string\n updated: Date\n}\n\nexport interface GetConsoleChannelsParams extends RequestBaseParams {}\n\nexport interface CreateConsoleChannelParams extends RequestBaseParams {\n body: {\n name: string\n description: string\n isDefault: boolean\n /** Required unless `isEmpty`: the route answers 400 when the write carries no default. */\n defaultGenerationId?: string\n allowedGenerationIds: string[]\n /** Empties the channel. The backend accepts it only with `console.emptyChannels` on. */\n isEmpty?: boolean\n }\n}\n\nexport interface UpdateConsoleChannelParams extends RequestBaseParams {\n params: {\n channelUuid: string\n }\n body: {\n name: string\n description: string\n isDefault: boolean\n /** Required unless `isEmpty`, like on create. */\n defaultGenerationId?: string\n allowedGenerationIds: string[]\n /** Empties the channel. The backend accepts it only with `console.emptyChannels` on. */\n isEmpty?: boolean\n }\n}\n\nexport interface DeleteConsoleChannelParams extends RequestBaseParams {\n params: {\n channelUuid: string\n }\n}\n\nexport class ChannelService {\n public static async getAll(\n params: GetConsoleChannelsParams,\n ): Promise<ConsoleChannelDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ChannelService.getAll',\n url: 'api/channels',\n normalizedUrl: 'api/channels',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleChannelDto[]>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n\n return response.body ?? []\n }\n\n public static async create(\n params: CreateConsoleChannelParams,\n ): Promise<ConsoleChannelDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ChannelService.create',\n url: 'api/channels',\n normalizedUrl: 'api/channels',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleChannelDto>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: params.body,\n responseType: 'json',\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n\n return response.body\n }\n\n public static async update(\n params: UpdateConsoleChannelParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ChannelService.update',\n url: `api/channels/${params.params.channelUuid}`,\n normalizedUrl: 'api/channels/:channelUuid',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<void>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: params.body,\n responseType: 'none',\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async delete(\n params: DeleteConsoleChannelParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ChannelService.delete',\n url: `api/channels/${params.params.channelUuid}`,\n normalizedUrl: 'api/channels/:channelUuid',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<void>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAWA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAsDnB,MAAM,eAAe;AAAA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;AAAA,MACnC,GAAG;AAAA,MACH,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,MAChB,cAAc;AAAA,IAChB,CAAC;AAED,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI;AAAA,QACR,GAAG,eAAe,OAAO,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -37,6 +37,8 @@ export interface ConsoleClusterCreationParametersChannel {
|
|
|
37
37
|
uuid?: string;
|
|
38
38
|
};
|
|
39
39
|
allowedGenerations?: ConsoleClusterCreationParametersGeneration[];
|
|
40
|
+
/** True when the channel has no default generation. Sent only with the empty-channels flag. The list can still hold generations that an org keeps. */
|
|
41
|
+
isEmpty?: boolean;
|
|
40
42
|
[key: string]: unknown;
|
|
41
43
|
}
|
|
42
44
|
export interface ConsoleClusterCreationParametersClusterPlanType {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/services/console/console.cluster-parameters.service.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type {\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\n\nexport interface ConsoleClusterCreationParametersRegionBackupRegion {\n id?: string\n uuid?: string\n label?: string\n name?: string\n}\n\nexport interface ConsoleClusterCreationParametersRegionBackup {\n uuid: string\n regions?: ConsoleClusterCreationParametersRegionBackupRegion[]\n /** True when this pairing's operator support is complete enough to fail over. */\n failover?: boolean\n}\n\nexport interface ConsoleClusterCreationParametersRegion {\n uuid: string\n name?: string\n provider?: string\n backups?: ConsoleClusterCreationParametersRegionBackup[]\n}\n\nexport interface ConsoleClusterCreationParametersGenerationVersionInfo {\n zeebe?: string\n [key: string]: unknown\n}\n\nexport interface ConsoleClusterCreationParametersGeneration {\n uuid: string\n name?: string\n classification?: 'channel' | 'existingCluster' | 'orgUnlocked'\n versions?: ConsoleClusterCreationParametersGenerationVersionInfo\n [key: string]: unknown\n}\n\nexport interface ConsoleClusterCreationParametersChannel {\n uuid: string\n name?: string\n description?: string\n isDefault?: boolean\n defaultGeneration?: {\n uuid?: string\n }\n allowedGenerations?: ConsoleClusterCreationParametersGeneration[]\n [key: string]: unknown\n}\n\nexport interface ConsoleClusterCreationParametersClusterPlanType {\n uuid: string\n name?: string\n description?: string\n development?: boolean\n category?: string\n availabilityClass?: string\n activePlan?: {\n uuid?: string\n }\n [key: string]: unknown\n}\n\nexport interface ConsoleClusterCreationParametersUnlockedClusterPlan {\n uuid: string\n name?: string\n}\n\nexport interface ConsoleClusterCreationParametersResponse {\n regions?: ConsoleClusterCreationParametersRegion[]\n channels?: ConsoleClusterCreationParametersChannel[]\n clusterPlanTypes?: ConsoleClusterCreationParametersClusterPlanType[]\n clusterPlanTypesFromSalesPlan?: ConsoleClusterCreationParametersClusterPlanType[]\n /** Only on stages with unlocked cluster plans (not prod). */\n unlockedClusterPlans?: ConsoleClusterCreationParametersUnlockedClusterPlan[]\n /**\n * `true` when a create of this caller takes the TTL fields. Absent\n * otherwise. It holds every guard of the create route: the flag\n * `console.clusterTtl` for a member of the org, and on prod an org with the\n * sales plan INTERNAL.\n */\n clusterTtlEnabled?: boolean\n}\n\nexport interface GetConsoleClusterCreationParametersRequest\n extends RequestBaseParams {\n params: {\n orgId: string\n }\n}\n\nexport class ConsoleClusterParametersService {\n public static async getCreationParameters(\n params: GetConsoleClusterCreationParametersRequest,\n ): Promise<ConsoleClusterCreationParametersResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterParametersService.getCreationParameters',\n url: `api/orgs/${params.params.orgId}/clusters/parameters`,\n normalizedUrl: 'api/orgs/:orgId/clusters/parameters',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleClusterCreationParametersResponse>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n\n if (response.body === undefined) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n\n return response.body\n }\n}\n"],
|
|
5
|
-
"mappings": "AAUA,SAAS,eAAe;AACxB,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type {\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\n\nexport interface ConsoleClusterCreationParametersRegionBackupRegion {\n id?: string\n uuid?: string\n label?: string\n name?: string\n}\n\nexport interface ConsoleClusterCreationParametersRegionBackup {\n uuid: string\n regions?: ConsoleClusterCreationParametersRegionBackupRegion[]\n /** True when this pairing's operator support is complete enough to fail over. */\n failover?: boolean\n}\n\nexport interface ConsoleClusterCreationParametersRegion {\n uuid: string\n name?: string\n provider?: string\n backups?: ConsoleClusterCreationParametersRegionBackup[]\n}\n\nexport interface ConsoleClusterCreationParametersGenerationVersionInfo {\n zeebe?: string\n [key: string]: unknown\n}\n\nexport interface ConsoleClusterCreationParametersGeneration {\n uuid: string\n name?: string\n classification?: 'channel' | 'existingCluster' | 'orgUnlocked'\n versions?: ConsoleClusterCreationParametersGenerationVersionInfo\n [key: string]: unknown\n}\n\nexport interface ConsoleClusterCreationParametersChannel {\n uuid: string\n name?: string\n description?: string\n isDefault?: boolean\n defaultGeneration?: {\n uuid?: string\n }\n allowedGenerations?: ConsoleClusterCreationParametersGeneration[]\n /** True when the channel has no default generation. Sent only with the empty-channels flag. The list can still hold generations that an org keeps. */\n isEmpty?: boolean\n [key: string]: unknown\n}\n\nexport interface ConsoleClusterCreationParametersClusterPlanType {\n uuid: string\n name?: string\n description?: string\n development?: boolean\n category?: string\n availabilityClass?: string\n activePlan?: {\n uuid?: string\n }\n [key: string]: unknown\n}\n\nexport interface ConsoleClusterCreationParametersUnlockedClusterPlan {\n uuid: string\n name?: string\n}\n\nexport interface ConsoleClusterCreationParametersResponse {\n regions?: ConsoleClusterCreationParametersRegion[]\n channels?: ConsoleClusterCreationParametersChannel[]\n clusterPlanTypes?: ConsoleClusterCreationParametersClusterPlanType[]\n clusterPlanTypesFromSalesPlan?: ConsoleClusterCreationParametersClusterPlanType[]\n /** Only on stages with unlocked cluster plans (not prod). */\n unlockedClusterPlans?: ConsoleClusterCreationParametersUnlockedClusterPlan[]\n /**\n * `true` when a create of this caller takes the TTL fields. Absent\n * otherwise. It holds every guard of the create route: the flag\n * `console.clusterTtl` for a member of the org, and on prod an org with the\n * sales plan INTERNAL.\n */\n clusterTtlEnabled?: boolean\n}\n\nexport interface GetConsoleClusterCreationParametersRequest\n extends RequestBaseParams {\n params: {\n orgId: string\n }\n}\n\nexport class ConsoleClusterParametersService {\n public static async getCreationParameters(\n params: GetConsoleClusterCreationParametersRequest,\n ): Promise<ConsoleClusterCreationParametersResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterParametersService.getCreationParameters',\n url: `api/orgs/${params.params.orgId}/clusters/parameters`,\n normalizedUrl: 'api/orgs/:orgId/clusters/parameters',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleClusterCreationParametersResponse>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n\n if (response.body === undefined) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n\n return response.body\n }\n}\n"],
|
|
5
|
+
"mappings": "AAUA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AA2FnB,MAAM,gCAAgC;AAAA,EAC3C,aAAoB,sBAClB,QACmD;AACnD,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,YAAY,OAAO,OAAO,KAAK;AAAA,QACpC,eAAe;AAAA,QACf,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ,EAAE,MAAM,WAAW,MAAM,WAAW;AAAA,IAC9C;AAEA,UAAM,WAAW,MAAM,QAAkD;AAAA,MACvE,GAAG;AAAA,MACH,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,MAChB,cAAc;AAAA,IAChB,CAAC;AAED,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI;AAAA,QACR,GAAG,eAAe,OAAO,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AAEA,QAAI,SAAS,SAAS,QAAW;AAC/B,YAAM,IAAI,MAAM,GAAG,eAAe,OAAO,IAAI,uBAAuB;AAAA,IACtE;AAEA,WAAO,SAAS;AAAA,EAClB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -38,11 +38,15 @@ export interface DryRunPublishReleaseTrainResponse extends DryRunBase {
|
|
|
38
38
|
previousGenerationCleared?: ReleaseTrainGenerationRef;
|
|
39
39
|
nextMinorGenerationUpdated?: ReleaseTrainGenerationRef;
|
|
40
40
|
channelsUpdated: ReleaseTrainChannelChange[];
|
|
41
|
+
/** Names of channels the release emptied. They add no generation. */
|
|
42
|
+
channelsEmptied?: string[];
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
45
|
export interface DryRunRollbackReleaseTrainResponse extends DryRunBase {
|
|
44
46
|
changes: {
|
|
45
47
|
channelsUpdated: ReleaseTrainChannelChange[];
|
|
48
|
+
/** Names of channels the release emptied. They add no generation. */
|
|
49
|
+
channelsEmptied?: string[];
|
|
46
50
|
previousGenerationRestored?: ReleaseTrainGenerationRef;
|
|
47
51
|
nextMinorGenerationRestored?: ReleaseTrainGenerationRef;
|
|
48
52
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/services/console/generation.service.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type {\n DryRunSanityDiff,\n GenerationDto,\n ReleaseTrainAutoUpgradeCandidates,\n ReleaseTrainSanityReport,\n UpgradableGenerationsDto,\n UpgradeReadinessDto,\n ZeebeClusterVersionsDto,\n} from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\n\nexport interface ReleaseTrainGenerationRef {\n uuid: string\n name: string\n}\n\ninterface ReleaseTrainChannelChange {\n channelName: string\n generationAdded: ReleaseTrainGenerationRef\n generationRemoved?: ReleaseTrainGenerationRef\n /** Absent when the release did not manage that channel default. */\n newDefault?: ReleaseTrainGenerationRef\n}\n\ninterface DryRunBase {\n dryRun: true\n /** Sanity rules before and after the change, and the violations that differ. */\n sanity: DryRunSanityDiff\n /**\n * True if a real call with no `overrideSanityErrors` refuses: it adds a\n * sanity violation of severity `error`, or it breaks a rule of the release\n * train.\n */\n wouldRefuse: boolean\n /**\n * The rules of the release train that the change breaks. A real call\n * refuses on each of them, also with `overrideSanityErrors`. A console\n * that is older than control-frontend sends no list, because the two\n * deploy separately.\n */\n refusals?: string[]\n}\n\nexport interface DryRunPublishReleaseTrainResponse extends DryRunBase {\n changes: {\n newGeneration: ReleaseTrainGenerationRef\n previousGeneration: ReleaseTrainGenerationRef & { channels: string[] }\n previousGenerationCleared?: ReleaseTrainGenerationRef\n nextMinorGenerationUpdated?: ReleaseTrainGenerationRef\n channelsUpdated: ReleaseTrainChannelChange[]\n }\n}\n\nexport interface DryRunRollbackReleaseTrainResponse extends DryRunBase {\n changes: {\n channelsUpdated: ReleaseTrainChannelChange[]\n previousGenerationRestored?: ReleaseTrainGenerationRef\n nextMinorGenerationRestored?: ReleaseTrainGenerationRef\n }\n}\n\n/**\n * Version payload accepted by the create/update generation endpoints. Mirrors\n * `ZeebeClusterVersionsDto` but allows the optional component versions to be\n * omitted; the backend normalizes blank optionals to `undefined`.\n *\n * The required set matches what console-backend validates with `checkVersion`\n * (not `checkVersionOptional`): zeebe, elasticSearchOss and\n * elasticSearchCurator. `optimize` is optional \u2014 generations in production\n * hold a blank value for it.\n */\nexport type GenerationVersionsInput = Partial<ZeebeClusterVersionsDto> &\n // `Required`, because `elasticSearchCurator` is optional in\n // `ZeebeClusterVersionsDto` and a plain `Pick` keeps that modifier. The\n // create route refuses a payload without it, thus the type must too.\n Required<\n Pick<\n ZeebeClusterVersionsDto,\n 'zeebe' | 'elasticSearchOss' | 'elasticSearchCurator'\n >\n >\n\nexport interface CreateGenerationParams extends RequestBaseParams {\n body: {\n name: string\n versions: GenerationVersionsInput\n upgradeableFrom?: string[]\n isUnsupportedStarting?: string\n isBespoke?: boolean\n }\n}\n\nexport interface UpdateGenerationParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n name?: string\n /**\n * A PATCH of the mutable versions. A key that the object names changes,\n * a key that it does not name keeps its value on the generation, and an\n * empty string clears an optional one. So send only what you change:\n * a save of the name or the env vars that does not name the image\n * versions cannot write over a change that an approval request made in\n * between, and the request cannot write over this save.\n *\n * Omit the whole object to edit `upgradeableFrom` or `name` alone.\n */\n versions?: Partial<GenerationVersionsInput>\n upgradeableFrom?: string[]\n }\n}\n\nexport interface DeleteGenerationParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n}\n\nexport interface SetGenerationBespokeParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n isBespoke: boolean\n }\n}\n\nexport interface SetGenerationArchivedParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n isArchived: boolean\n }\n}\n\nexport interface ListGenerationsParams extends RequestBaseParams {}\n\nexport class GenerationService {\n public static async list(\n params: ListGenerationsParams,\n ): Promise<GenerationDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.list',\n url: 'api/generations',\n normalizedUrl: 'api/generations',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto[]>({\n ...params,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? []\n }\n\n public static async getGeneration(\n params: { uuid: string } & RequestBaseParams,\n ): Promise<GenerationDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getGeneration`,\n url: `api/generations/${params.uuid}`,\n normalizedUrl: `api/generations/:generationUuid`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getUpgradable(\n params: {\n fromGenerationUuid: string\n clusterId?: string\n } & RequestBaseParams,\n ): Promise<GenerationDto[]> {\n const baseUrl = `api/generations/${params.fromGenerationUuid}/upgradable`\n const url = params.clusterId\n ? `${baseUrl}?clusterId=${encodeURIComponent(params.clusterId)}`\n : baseUrl\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getUpgradable`,\n url,\n normalizedUrl: params.clusterId\n ? `api/generations/:fromGenerationUuid/upgradable?clusterId=:clusterId`\n : `api/generations/:fromGenerationUuid/upgradable`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<GenerationDto[]>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? []\n }\n\n public static async getUpgradableMulti(\n params: {\n fromGenerationUuid: string\n clusterId?: string\n } & RequestBaseParams,\n ): Promise<UpgradableGenerationsDto> {\n const baseUrl = `api/generations/${params.fromGenerationUuid}/upgradable-multi`\n const url = params.clusterId\n ? `${baseUrl}?clusterId=${encodeURIComponent(params.clusterId)}`\n : baseUrl\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getUpgradableMulti`,\n url,\n normalizedUrl: params.clusterId\n ? `api/generations/:fromGenerationUuid/upgradable-multi?clusterId=:clusterId`\n : `api/generations/:fromGenerationUuid/upgradable-multi`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<UpgradableGenerationsDto>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? { preferred: null, options: [] }\n }\n\n public static async upgradeCluster(\n params: {\n generationUuid: string\n clusterId: string\n orgId: string\n tasklistV2Enabled?: boolean\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.upgradeCluster`,\n url: `api/orgs/${params.orgId}/clusters/${params.clusterId}/upgrade/${params.generationUuid}`,\n normalizedUrl: `api/orgs/:orgId/clusters/:clusterId/upgrade/:generationUuid`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<string>({\n config: params.config,\n base: {\n id: 'console',\n },\n body:\n params.tasklistV2Enabled === undefined\n ? undefined\n : { tasklistV2Enabled: params.tasklistV2Enabled },\n responseType: 'text',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * Upgrades a cluster to a generation via the internal/admin route (`PUT\n * api/generations/:generationUuid/upgradecluster/:clusterId`), as opposed\n * to {@link upgradeCluster}'s customer-facing, org-scoped route. This is\n * the endpoint Camunda staff use to upgrade a cluster on a customer's\n * behalf: it is not gated by `orgValidator`/`clusterOwnerValidator`, always\n * records the change as done `byCamunda`, and \u2014 when `yolo` is set \u2014\n * bypasses the generation's `upgradeableFrom` compatibility graph\n * entirely (subject to the caller holding the yolo permission\n * server-side). Mirrors accounts-frontend's\n * `generations.upgradeCluster` model action.\n */\n public static async upgradeClusterAdmin(\n params: {\n generationUuid: string\n clusterId: string\n yolo?: boolean\n /** Skips the upgrade gate for this upgrade. Needs canUpgradeGeneration. */\n ignoreUpgradeGate?: boolean\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.upgradeClusterAdmin',\n url: `api/generations/${params.generationUuid}/upgradecluster/${params.clusterId}`,\n normalizedUrl:\n 'api/generations/:generationUuid/upgradecluster/:clusterId',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: {\n yolo: params.yolo ?? false,\n byCamunda: true,\n ...(params.ignoreUpgradeGate && { ignoreUpgradeGate: true }),\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * The upgrade gate of a cluster, for the customer (PDP-3067). `undefined`\n * when the route answers 404: the stage does not have the flag, so the\n * server enforces no rule.\n */\n public static getUpgradeReadiness(\n params: { orgId: string; clusterId: string } & RequestBaseParams,\n ): Promise<UpgradeReadinessDto | undefined> {\n return GenerationService.readUpgradeReadiness(params, {\n name: 'GenerationService.getUpgradeReadiness',\n url: `api/orgs/${params.orgId}/clusters/${params.clusterId}/upgrade-readiness`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/upgrade-readiness',\n type: 'get',\n })\n }\n\n /** The same as {@link getUpgradeReadiness}, on the admin route of Control. */\n public static getUpgradeReadinessAdmin(\n params: { clusterId: string } & RequestBaseParams,\n ): Promise<UpgradeReadinessDto | undefined> {\n return GenerationService.readUpgradeReadiness(params, {\n name: 'GenerationService.getUpgradeReadinessAdmin',\n url: `api/admin/clusters/${params.clusterId}/upgrade-readiness`,\n normalizedUrl: 'api/admin/clusters/:clusterUuid/upgrade-readiness',\n type: 'get',\n })\n }\n\n private static async readUpgradeReadiness(\n params: RequestBaseParams,\n method: RequestBaseServiceContext['method'],\n ): Promise<UpgradeReadinessDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method,\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<UpgradeReadinessDto>({\n config: params.config,\n base: { id: 'console' },\n url: method.url,\n method: method.type,\n metricsDetails: serviceContext,\n })\n if (response.status === 404) {\n return undefined\n }\n if (!response.ok) {\n throw new HttpError(\n `${method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async setSupported(\n params: {\n generationUuid: string\n unsupportedStartingAt: string | null\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.setSupported`,\n url: `api/generations/${params.generationUuid}/supported`,\n normalizedUrl: `api/generations/:generationUuid/supported`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<any>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {\n unsupportedStartingAt: params.unsupportedStartingAt,\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async createAutoUpdateBulkOperation(\n params: {\n generationUuid: string\n name: string\n reason: string\n eyes: number\n } & RequestBaseParams,\n ) {\n const body = {\n name: params.name,\n reason: params.reason,\n eyes: params.eyes,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.createAutoUpdateBulkOperation`,\n url: `external/generations/${params.generationUuid}/autoupdate`,\n normalizedUrl: `external/generations/:generationUuid/autoupdate`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n uuid: string\n name: string\n clusterCount: number\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async createBulkUpgradeOperation(\n params: {\n fromGenerationUuid: string\n toGenerationUuid: string\n name: string\n reason: string\n eyes: number\n } & RequestBaseParams,\n ) {\n const body = {\n toGenerationUuid: params.toGenerationUuid,\n name: params.name,\n reason: params.reason,\n eyes: params.eyes,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.createBulkUpgradeOperation`,\n url: `external/generations/${params.fromGenerationUuid}/bulkUpgrade`,\n normalizedUrl: `external/generations/:fromGenerationUuid/bulkUpgrade`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n uuid: string\n name: string\n clusterCount: number\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * Replaces a generation's upgrade path via the external API (`PUT\n * external/generations/:generationUuid/upgradepath`). Gated on the\n * M2M-only `m2m.manageGenerationUpgradePath` scope by design, so this is\n * for service-credential callers (e.g. the release-train hack scripts).\n * Interactive/browser callers cannot use it \u2014 they edit the upgrade path\n * through {@link update} against `api/generations/:generationUuid`, the same\n * way accounts-frontend does.\n */\n public static async updateUpgradePath(\n params: {\n generationUuid: string\n upgradeableFrom: string[]\n } & RequestBaseParams,\n ): Promise<\n | {\n name: string\n uuid: string\n upgradeableFrom: Array<{ uuid: string }>\n }\n | undefined\n > {\n const body = {\n upgradeableFrom: params.upgradeableFrom,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.updateUpgradePath`,\n url: `external/generations/${params.generationUuid}/upgradepath`,\n normalizedUrl: `external/generations/:generationUuid/upgradepath`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n name: string\n uuid: string\n upgradeableFrom: Array<{ uuid: string }>\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async publishReleaseTrain(\n params: {\n previousGenerationId: string\n name: string\n releaseType: 'patch' | 'alpha' | 'minor'\n versions?: Partial<ZeebeClusterVersionsDto>\n isUnsupportedStarting?: string\n /** Runs the publish although it adds new errors of the sanity rules. */\n overrideSanityErrors?: boolean\n } & RequestBaseParams,\n ) {\n const {\n previousGenerationId,\n name,\n releaseType,\n versions,\n isUnsupportedStarting,\n overrideSanityErrors,\n } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.publishReleaseTrain',\n url: 'external/release-train/generation',\n normalizedUrl: 'external/release-train/generation',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n generationId: string\n changes: {\n newGeneration: { uuid: string; name: string }\n previousGenerationCleared?: { uuid: string; name: string }\n nextMinorGenerationUpdated?: { uuid: string; name: string }\n channelsUpdated: Array<{\n channelName: string\n generationAdded: { uuid: string; name: string }\n generationRemoved?: { uuid: string; name: string }\n /** Absent when the release did not manage that channel default. */\n newDefault?: { uuid: string; name: string }\n }>\n }\n }>({\n config: params.config,\n base: { id: 'console' },\n body: {\n previousGenerationId,\n name,\n releaseType,\n versions,\n isUnsupportedStarting,\n overrideSanityErrors,\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async rollbackReleaseTrain(\n params: {\n generationId: string\n releaseType: 'patch' | 'alpha' | 'minor'\n replacementGenerationId?: string\n stableReplacementGenerationId?: string\n alphaReplacementGenerationId?: string\n /** Runs the rollback although it adds new errors of the sanity rules. */\n overrideSanityErrors?: boolean\n } & RequestBaseParams,\n ) {\n const {\n generationId,\n releaseType,\n replacementGenerationId,\n stableReplacementGenerationId,\n alphaReplacementGenerationId,\n overrideSanityErrors,\n } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.rollbackReleaseTrain',\n url: 'external/release-train/rollback',\n normalizedUrl: 'external/release-train/rollback',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n rolledBackGenerationId: string\n changes: {\n channelsUpdated: Array<{\n channelName: string\n generationAdded: { uuid: string; name: string }\n generationRemoved?: { uuid: string; name: string }\n newDefault: { uuid: string; name: string }\n }>\n previousGenerationRestored?: { uuid: string; name: string }\n nextMinorGenerationRestored?: { uuid: string; name: string }\n }\n }>({\n config: params.config,\n base: { id: 'console' },\n body: {\n generationId,\n releaseType,\n replacementGenerationId,\n stableReplacementGenerationId,\n alphaReplacementGenerationId,\n overrideSanityErrors,\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async triggerAutoUpgrade(\n params: { generationId: string } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.triggerAutoUpgrade',\n url: `external/release-train/generation/${params.generationId}/auto-upgrade`,\n normalizedUrl:\n 'external/release-train/generation/:generationId/auto-upgrade',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n bulkOperationUuid: string\n clusterCount: number\n }>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /** The clusters that an auto-upgrade to this generation changes now. */\n public static async getAutoUpgradeCandidates(\n params: { params: { generationId: string } } & RequestBaseParams,\n ): Promise<ReleaseTrainAutoUpgradeCandidates> {\n const { generationId } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.getAutoUpgradeCandidates',\n url: `external/release-train/generation/${encodeURIComponent(generationId)}/auto-upgrade-candidates`,\n normalizedUrl:\n 'external/release-train/generation/:generationId/auto-upgrade-candidates',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ReleaseTrainAutoUpgradeCandidates>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n /**\n * Dry run of `publishReleaseTrain`. The backend writes nothing and answers\n * with what a real call would change and how the sanity rules would react.\n */\n public static async dryRunPublishReleaseTrain(\n params: Parameters<typeof GenerationService.publishReleaseTrain>[0],\n ) {\n return GenerationService.postReleaseTrainDryRun<DryRunPublishReleaseTrainResponse>(\n 'GenerationService.dryRunPublishReleaseTrain',\n params.config,\n 'external/release-train/generation',\n 'external/release-train/generation',\n {\n previousGenerationId: params.previousGenerationId,\n name: params.name,\n releaseType: params.releaseType,\n versions: params.versions,\n isUnsupportedStarting: params.isUnsupportedStarting,\n dryRun: true,\n },\n )\n }\n\n /** Dry run of `rollbackReleaseTrain`. Writes nothing. */\n public static async dryRunRollbackReleaseTrain(\n params: Parameters<typeof GenerationService.rollbackReleaseTrain>[0],\n ) {\n return GenerationService.postReleaseTrainDryRun<DryRunRollbackReleaseTrainResponse>(\n 'GenerationService.dryRunRollbackReleaseTrain',\n params.config,\n 'external/release-train/rollback',\n 'external/release-train/rollback',\n {\n generationId: params.generationId,\n releaseType: params.releaseType,\n replacementGenerationId: params.replacementGenerationId,\n stableReplacementGenerationId: params.stableReplacementGenerationId,\n alphaReplacementGenerationId: params.alphaReplacementGenerationId,\n dryRun: true,\n },\n )\n }\n\n private static async postReleaseTrainDryRun<T>(\n methodName: string,\n config: RequestBaseParams['config'],\n url: string,\n normalizedUrl: string,\n body: Record<string, unknown> | undefined,\n ): Promise<T | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: methodName,\n url,\n normalizedUrl,\n type: 'post',\n },\n source: config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<T>({\n config,\n base: { id: 'console' },\n body,\n responseType: 'json',\n url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getReleaseTrainSanity(\n params: RequestBaseParams,\n ): Promise<ReleaseTrainSanityReport> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.getReleaseTrainSanity',\n url: 'external/release-train/sanity-check',\n normalizedUrl: 'external/release-train/sanity-check',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ReleaseTrainSanityReport>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n public static async create(\n params: CreateGenerationParams,\n ): Promise<GenerationDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.create',\n url: 'api/generations',\n normalizedUrl: 'api/generations',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n public static async update(params: UpdateGenerationParams): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.update',\n url: `api/generations/${params.params.generationUuid}`,\n normalizedUrl: 'api/generations/:generationUuid',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async delete(params: DeleteGenerationParams): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.delete',\n url: `api/generations/${params.params.generationUuid}`,\n normalizedUrl: 'api/generations/:generationUuid',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async setBespoke(\n params: SetGenerationBespokeParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.setBespoke',\n url: `api/generations/${params.params.generationUuid}/bespoke`,\n normalizedUrl: 'api/generations/:generationUuid/bespoke',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async setArchived(\n params: SetGenerationArchivedParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.setArchived',\n url: `api/generations/${params.params.generationUuid}/archived`,\n normalizedUrl: 'api/generations/:generationUuid/archived',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n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AAAA,QACN,KAAK,mBAAmB,OAAO,OAAO,cAAc;AAAA,QACpD,eAAe;AAAA,QACf,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ,EAAE,MAAM,WAAW,MAAM,WAAW;AAAA,IAC9C;AACA,UAAM,WAAW,MAAM,QAAc;AAAA,MACnC,QAAQ,OAAO;AAAA,MACf,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB,MAAM,OAAO;AAAA,MACb,cAAc;AAAA,MACd,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,IAClB,CAAC;AACD,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI;AAAA,QACR,GAAG,eAAe,OAAO,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;",
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type {\n DryRunSanityDiff,\n GenerationDto,\n ReleaseTrainAutoUpgradeCandidates,\n ReleaseTrainSanityReport,\n UpgradableGenerationsDto,\n UpgradeReadinessDto,\n ZeebeClusterVersionsDto,\n} from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\n\nexport interface ReleaseTrainGenerationRef {\n uuid: string\n name: string\n}\n\ninterface ReleaseTrainChannelChange {\n channelName: string\n generationAdded: ReleaseTrainGenerationRef\n generationRemoved?: ReleaseTrainGenerationRef\n /** Absent when the release did not manage that channel default. */\n newDefault?: ReleaseTrainGenerationRef\n}\n\ninterface DryRunBase {\n dryRun: true\n /** Sanity rules before and after the change, and the violations that differ. */\n sanity: DryRunSanityDiff\n /**\n * True if a real call with no `overrideSanityErrors` refuses: it adds a\n * sanity violation of severity `error`, or it breaks a rule of the release\n * train.\n */\n wouldRefuse: boolean\n /**\n * The rules of the release train that the change breaks. A real call\n * refuses on each of them, also with `overrideSanityErrors`. A console\n * that is older than control-frontend sends no list, because the two\n * deploy separately.\n */\n refusals?: string[]\n}\n\nexport interface DryRunPublishReleaseTrainResponse extends DryRunBase {\n changes: {\n newGeneration: ReleaseTrainGenerationRef\n previousGeneration: ReleaseTrainGenerationRef & { channels: string[] }\n previousGenerationCleared?: ReleaseTrainGenerationRef\n nextMinorGenerationUpdated?: ReleaseTrainGenerationRef\n channelsUpdated: ReleaseTrainChannelChange[]\n /** Names of channels the release emptied. They add no generation. */\n channelsEmptied?: string[]\n }\n}\n\nexport interface DryRunRollbackReleaseTrainResponse extends DryRunBase {\n changes: {\n channelsUpdated: ReleaseTrainChannelChange[]\n /** Names of channels the release emptied. They add no generation. */\n channelsEmptied?: string[]\n previousGenerationRestored?: ReleaseTrainGenerationRef\n nextMinorGenerationRestored?: ReleaseTrainGenerationRef\n }\n}\n\n/**\n * Version payload accepted by the create/update generation endpoints. Mirrors\n * `ZeebeClusterVersionsDto` but allows the optional component versions to be\n * omitted; the backend normalizes blank optionals to `undefined`.\n *\n * The required set matches what console-backend validates with `checkVersion`\n * (not `checkVersionOptional`): zeebe, elasticSearchOss and\n * elasticSearchCurator. `optimize` is optional \u2014 generations in production\n * hold a blank value for it.\n */\nexport type GenerationVersionsInput = Partial<ZeebeClusterVersionsDto> &\n // `Required`, because `elasticSearchCurator` is optional in\n // `ZeebeClusterVersionsDto` and a plain `Pick` keeps that modifier. The\n // create route refuses a payload without it, thus the type must too.\n Required<\n Pick<\n ZeebeClusterVersionsDto,\n 'zeebe' | 'elasticSearchOss' | 'elasticSearchCurator'\n >\n >\n\nexport interface CreateGenerationParams extends RequestBaseParams {\n body: {\n name: string\n versions: GenerationVersionsInput\n upgradeableFrom?: string[]\n isUnsupportedStarting?: string\n isBespoke?: boolean\n }\n}\n\nexport interface UpdateGenerationParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n name?: string\n /**\n * A PATCH of the mutable versions. A key that the object names changes,\n * a key that it does not name keeps its value on the generation, and an\n * empty string clears an optional one. So send only what you change:\n * a save of the name or the env vars that does not name the image\n * versions cannot write over a change that an approval request made in\n * between, and the request cannot write over this save.\n *\n * Omit the whole object to edit `upgradeableFrom` or `name` alone.\n */\n versions?: Partial<GenerationVersionsInput>\n upgradeableFrom?: string[]\n }\n}\n\nexport interface DeleteGenerationParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n}\n\nexport interface SetGenerationBespokeParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n isBespoke: boolean\n }\n}\n\nexport interface SetGenerationArchivedParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n isArchived: boolean\n }\n}\n\nexport interface ListGenerationsParams extends RequestBaseParams {}\n\nexport class GenerationService {\n public static async list(\n params: ListGenerationsParams,\n ): Promise<GenerationDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.list',\n url: 'api/generations',\n normalizedUrl: 'api/generations',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto[]>({\n ...params,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? []\n }\n\n public static async getGeneration(\n params: { uuid: string } & RequestBaseParams,\n ): Promise<GenerationDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getGeneration`,\n url: `api/generations/${params.uuid}`,\n normalizedUrl: `api/generations/:generationUuid`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getUpgradable(\n params: {\n fromGenerationUuid: string\n clusterId?: string\n } & RequestBaseParams,\n ): Promise<GenerationDto[]> {\n const baseUrl = `api/generations/${params.fromGenerationUuid}/upgradable`\n const url = params.clusterId\n ? `${baseUrl}?clusterId=${encodeURIComponent(params.clusterId)}`\n : baseUrl\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getUpgradable`,\n url,\n normalizedUrl: params.clusterId\n ? `api/generations/:fromGenerationUuid/upgradable?clusterId=:clusterId`\n : `api/generations/:fromGenerationUuid/upgradable`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<GenerationDto[]>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? []\n }\n\n public static async getUpgradableMulti(\n params: {\n fromGenerationUuid: string\n clusterId?: string\n } & RequestBaseParams,\n ): Promise<UpgradableGenerationsDto> {\n const baseUrl = `api/generations/${params.fromGenerationUuid}/upgradable-multi`\n const url = params.clusterId\n ? `${baseUrl}?clusterId=${encodeURIComponent(params.clusterId)}`\n : baseUrl\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getUpgradableMulti`,\n url,\n normalizedUrl: params.clusterId\n ? `api/generations/:fromGenerationUuid/upgradable-multi?clusterId=:clusterId`\n : `api/generations/:fromGenerationUuid/upgradable-multi`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<UpgradableGenerationsDto>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? { preferred: null, options: [] }\n }\n\n public static async upgradeCluster(\n params: {\n generationUuid: string\n clusterId: string\n orgId: string\n tasklistV2Enabled?: boolean\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.upgradeCluster`,\n url: `api/orgs/${params.orgId}/clusters/${params.clusterId}/upgrade/${params.generationUuid}`,\n normalizedUrl: `api/orgs/:orgId/clusters/:clusterId/upgrade/:generationUuid`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<string>({\n config: params.config,\n base: {\n id: 'console',\n },\n body:\n params.tasklistV2Enabled === undefined\n ? undefined\n : { tasklistV2Enabled: params.tasklistV2Enabled },\n responseType: 'text',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * Upgrades a cluster to a generation via the internal/admin route (`PUT\n * api/generations/:generationUuid/upgradecluster/:clusterId`), as opposed\n * to {@link upgradeCluster}'s customer-facing, org-scoped route. This is\n * the endpoint Camunda staff use to upgrade a cluster on a customer's\n * behalf: it is not gated by `orgValidator`/`clusterOwnerValidator`, always\n * records the change as done `byCamunda`, and \u2014 when `yolo` is set \u2014\n * bypasses the generation's `upgradeableFrom` compatibility graph\n * entirely (subject to the caller holding the yolo permission\n * server-side). Mirrors accounts-frontend's\n * `generations.upgradeCluster` model action.\n */\n public static async upgradeClusterAdmin(\n params: {\n generationUuid: string\n clusterId: string\n yolo?: boolean\n /** Skips the upgrade gate for this upgrade. Needs canUpgradeGeneration. */\n ignoreUpgradeGate?: boolean\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.upgradeClusterAdmin',\n url: `api/generations/${params.generationUuid}/upgradecluster/${params.clusterId}`,\n normalizedUrl:\n 'api/generations/:generationUuid/upgradecluster/:clusterId',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: {\n yolo: params.yolo ?? false,\n byCamunda: true,\n ...(params.ignoreUpgradeGate && { ignoreUpgradeGate: true }),\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * The upgrade gate of a cluster, for the customer (PDP-3067). `undefined`\n * when the route answers 404: the stage does not have the flag, so the\n * server enforces no rule.\n */\n public static getUpgradeReadiness(\n params: { orgId: string; clusterId: string } & RequestBaseParams,\n ): Promise<UpgradeReadinessDto | undefined> {\n return GenerationService.readUpgradeReadiness(params, {\n name: 'GenerationService.getUpgradeReadiness',\n url: `api/orgs/${params.orgId}/clusters/${params.clusterId}/upgrade-readiness`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/upgrade-readiness',\n type: 'get',\n })\n }\n\n /** The same as {@link getUpgradeReadiness}, on the admin route of Control. */\n public static getUpgradeReadinessAdmin(\n params: { clusterId: string } & RequestBaseParams,\n ): Promise<UpgradeReadinessDto | undefined> {\n return GenerationService.readUpgradeReadiness(params, {\n name: 'GenerationService.getUpgradeReadinessAdmin',\n url: `api/admin/clusters/${params.clusterId}/upgrade-readiness`,\n normalizedUrl: 'api/admin/clusters/:clusterUuid/upgrade-readiness',\n type: 'get',\n })\n }\n\n private static async readUpgradeReadiness(\n params: RequestBaseParams,\n method: RequestBaseServiceContext['method'],\n ): Promise<UpgradeReadinessDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method,\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<UpgradeReadinessDto>({\n config: params.config,\n base: { id: 'console' },\n url: method.url,\n method: method.type,\n metricsDetails: serviceContext,\n })\n if (response.status === 404) {\n return undefined\n }\n if (!response.ok) {\n throw new HttpError(\n `${method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async setSupported(\n params: {\n generationUuid: string\n unsupportedStartingAt: string | null\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.setSupported`,\n url: `api/generations/${params.generationUuid}/supported`,\n normalizedUrl: `api/generations/:generationUuid/supported`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<any>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {\n unsupportedStartingAt: params.unsupportedStartingAt,\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async createAutoUpdateBulkOperation(\n params: {\n generationUuid: string\n name: string\n reason: string\n eyes: number\n } & RequestBaseParams,\n ) {\n const body = {\n name: params.name,\n reason: params.reason,\n eyes: params.eyes,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.createAutoUpdateBulkOperation`,\n url: `external/generations/${params.generationUuid}/autoupdate`,\n normalizedUrl: `external/generations/:generationUuid/autoupdate`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n uuid: string\n name: string\n clusterCount: number\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async createBulkUpgradeOperation(\n params: {\n fromGenerationUuid: string\n toGenerationUuid: string\n name: string\n reason: string\n eyes: number\n } & RequestBaseParams,\n ) {\n const body = {\n toGenerationUuid: params.toGenerationUuid,\n name: params.name,\n reason: params.reason,\n eyes: params.eyes,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.createBulkUpgradeOperation`,\n url: `external/generations/${params.fromGenerationUuid}/bulkUpgrade`,\n normalizedUrl: `external/generations/:fromGenerationUuid/bulkUpgrade`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n uuid: string\n name: string\n clusterCount: number\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * Replaces a generation's upgrade path via the external API (`PUT\n * external/generations/:generationUuid/upgradepath`). Gated on the\n * M2M-only `m2m.manageGenerationUpgradePath` scope by design, so this is\n * for service-credential callers (e.g. the release-train hack scripts).\n * Interactive/browser callers cannot use it \u2014 they edit the upgrade path\n * through {@link update} against `api/generations/:generationUuid`, the same\n * way accounts-frontend does.\n */\n public static async updateUpgradePath(\n params: {\n generationUuid: string\n upgradeableFrom: string[]\n } & RequestBaseParams,\n ): Promise<\n | {\n name: string\n uuid: string\n upgradeableFrom: Array<{ uuid: string }>\n }\n | undefined\n > {\n const body = {\n upgradeableFrom: params.upgradeableFrom,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.updateUpgradePath`,\n url: `external/generations/${params.generationUuid}/upgradepath`,\n normalizedUrl: `external/generations/:generationUuid/upgradepath`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n name: string\n uuid: string\n upgradeableFrom: Array<{ uuid: string }>\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async publishReleaseTrain(\n params: {\n previousGenerationId: string\n name: string\n releaseType: 'patch' | 'alpha' | 'minor'\n versions?: Partial<ZeebeClusterVersionsDto>\n isUnsupportedStarting?: string\n /** Runs the publish although it adds new errors of the sanity rules. */\n overrideSanityErrors?: boolean\n } & RequestBaseParams,\n ) {\n const {\n previousGenerationId,\n name,\n releaseType,\n versions,\n isUnsupportedStarting,\n overrideSanityErrors,\n } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.publishReleaseTrain',\n url: 'external/release-train/generation',\n normalizedUrl: 'external/release-train/generation',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n generationId: string\n changes: {\n newGeneration: { uuid: string; name: string }\n previousGenerationCleared?: { uuid: string; name: string }\n nextMinorGenerationUpdated?: { uuid: string; name: string }\n channelsUpdated: Array<{\n channelName: string\n generationAdded: { uuid: string; name: string }\n generationRemoved?: { uuid: string; name: string }\n /** Absent when the release did not manage that channel default. */\n newDefault?: { uuid: string; name: string }\n }>\n }\n }>({\n config: params.config,\n base: { id: 'console' },\n body: {\n previousGenerationId,\n name,\n releaseType,\n versions,\n isUnsupportedStarting,\n overrideSanityErrors,\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async rollbackReleaseTrain(\n params: {\n generationId: string\n releaseType: 'patch' | 'alpha' | 'minor'\n replacementGenerationId?: string\n stableReplacementGenerationId?: string\n alphaReplacementGenerationId?: string\n /** Runs the rollback although it adds new errors of the sanity rules. */\n overrideSanityErrors?: boolean\n } & RequestBaseParams,\n ) {\n const {\n generationId,\n releaseType,\n replacementGenerationId,\n stableReplacementGenerationId,\n alphaReplacementGenerationId,\n overrideSanityErrors,\n } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.rollbackReleaseTrain',\n url: 'external/release-train/rollback',\n normalizedUrl: 'external/release-train/rollback',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n rolledBackGenerationId: string\n changes: {\n channelsUpdated: Array<{\n channelName: string\n generationAdded: { uuid: string; name: string }\n generationRemoved?: { uuid: string; name: string }\n newDefault: { uuid: string; name: string }\n }>\n previousGenerationRestored?: { uuid: string; name: string }\n nextMinorGenerationRestored?: { uuid: string; name: string }\n }\n }>({\n config: params.config,\n base: { id: 'console' },\n body: {\n generationId,\n releaseType,\n replacementGenerationId,\n stableReplacementGenerationId,\n alphaReplacementGenerationId,\n overrideSanityErrors,\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async triggerAutoUpgrade(\n params: { generationId: string } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.triggerAutoUpgrade',\n url: `external/release-train/generation/${params.generationId}/auto-upgrade`,\n normalizedUrl:\n 'external/release-train/generation/:generationId/auto-upgrade',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n bulkOperationUuid: string\n clusterCount: number\n }>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /** The clusters that an auto-upgrade to this generation changes now. */\n public static async getAutoUpgradeCandidates(\n params: { params: { generationId: string } } & RequestBaseParams,\n ): Promise<ReleaseTrainAutoUpgradeCandidates> {\n const { generationId } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.getAutoUpgradeCandidates',\n url: `external/release-train/generation/${encodeURIComponent(generationId)}/auto-upgrade-candidates`,\n normalizedUrl:\n 'external/release-train/generation/:generationId/auto-upgrade-candidates',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ReleaseTrainAutoUpgradeCandidates>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n /**\n * Dry run of `publishReleaseTrain`. The backend writes nothing and answers\n * with what a real call would change and how the sanity rules would react.\n */\n public static async dryRunPublishReleaseTrain(\n params: Parameters<typeof GenerationService.publishReleaseTrain>[0],\n ) {\n return GenerationService.postReleaseTrainDryRun<DryRunPublishReleaseTrainResponse>(\n 'GenerationService.dryRunPublishReleaseTrain',\n params.config,\n 'external/release-train/generation',\n 'external/release-train/generation',\n {\n previousGenerationId: params.previousGenerationId,\n name: params.name,\n releaseType: params.releaseType,\n versions: params.versions,\n isUnsupportedStarting: params.isUnsupportedStarting,\n dryRun: true,\n },\n )\n }\n\n /** Dry run of `rollbackReleaseTrain`. Writes nothing. */\n public static async dryRunRollbackReleaseTrain(\n params: Parameters<typeof GenerationService.rollbackReleaseTrain>[0],\n ) {\n return GenerationService.postReleaseTrainDryRun<DryRunRollbackReleaseTrainResponse>(\n 'GenerationService.dryRunRollbackReleaseTrain',\n params.config,\n 'external/release-train/rollback',\n 'external/release-train/rollback',\n {\n generationId: params.generationId,\n releaseType: params.releaseType,\n replacementGenerationId: params.replacementGenerationId,\n stableReplacementGenerationId: params.stableReplacementGenerationId,\n alphaReplacementGenerationId: params.alphaReplacementGenerationId,\n dryRun: true,\n },\n )\n }\n\n private static async postReleaseTrainDryRun<T>(\n methodName: string,\n config: RequestBaseParams['config'],\n url: string,\n normalizedUrl: string,\n body: Record<string, unknown> | undefined,\n ): Promise<T | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: methodName,\n url,\n normalizedUrl,\n type: 'post',\n },\n source: config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<T>({\n config,\n base: { id: 'console' },\n body,\n responseType: 'json',\n url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getReleaseTrainSanity(\n params: RequestBaseParams,\n ): Promise<ReleaseTrainSanityReport> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.getReleaseTrainSanity',\n url: 'external/release-train/sanity-check',\n normalizedUrl: 'external/release-train/sanity-check',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ReleaseTrainSanityReport>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n public static async create(\n params: CreateGenerationParams,\n ): Promise<GenerationDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.create',\n url: 'api/generations',\n normalizedUrl: 'api/generations',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n public static async update(params: UpdateGenerationParams): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.update',\n url: `api/generations/${params.params.generationUuid}`,\n normalizedUrl: 'api/generations/:generationUuid',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async delete(params: DeleteGenerationParams): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.delete',\n url: `api/generations/${params.params.generationUuid}`,\n normalizedUrl: 'api/generations/:generationUuid',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async setBespoke(\n params: SetGenerationBespokeParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.setBespoke',\n url: `api/generations/${params.params.generationUuid}/bespoke`,\n normalizedUrl: 'api/generations/:generationUuid/bespoke',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async setArchived(\n params: SetGenerationArchivedParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.setArchived',\n url: `api/generations/${params.params.generationUuid}/archived`,\n normalizedUrl: 'api/generations/:generationUuid/archived',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAmBA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAsInB,MAAM,kBAAkB;AAAA,EAC7B,aAAoB,KAClB,QAC0B;AAC1B,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK;AAAA,QACL,eAAe;AAAA,QACf,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ,EAAE,MAAM,WAAW,MAAM,WAAW;AAAA,IAC9C;AACA,UAAM,WAAW,MAAM,QAAyB;AAAA,MAC9C,GAAG;AAAA,MACH,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB,cAAc;AAAA,MACd,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,IAClB,CAAC;AACD,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI;AAAA,QACR,GAAG,eAAe,OAAO,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AACA,WAAO,SAAS,QAAQ,CAAC;AAAA,EAC3B;AAAA,EAEA,aAAoB,cAClB,QACoC;AACpC,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,mBAAmB,OAAO,IAAI;AAAA,QACnC,eAAe;AAAA,QACf,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ,EAAE,MAAM,WAAW,MAAM,WAAW;AAAA,IAC9C;AACA,UAAM,WAAW,MAAM,QAAuB;AAAA,MAC5C,QAAQ,OAAO;AAAA,MACf,MAAM;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,cAAc;AAAA,MACd,K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