@camunda/ccma-api 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/index.d.ts +15 -4
  2. package/dist/index.js +12 -0
  3. package/dist/index.js.map +2 -2
  4. package/dist/services/accounts/approvals.m2m.service.d.ts +33 -0
  5. package/dist/services/accounts/approvals.m2m.service.js +64 -0
  6. package/dist/services/accounts/approvals.m2m.service.js.map +7 -0
  7. package/dist/services/accounts/hdp.service.d.ts +28 -0
  8. package/dist/services/accounts/hdp.service.js +40 -0
  9. package/dist/services/accounts/hdp.service.js.map +2 -2
  10. package/dist/services/accounts/orgs.service.d.ts +6 -2
  11. package/dist/services/accounts/orgs.service.js +6 -2
  12. package/dist/services/accounts/orgs.service.js.map +2 -2
  13. package/dist/services/console/console.admin.service.d.ts +40 -2
  14. package/dist/services/console/console.admin.service.js +39 -0
  15. package/dist/services/console/console.admin.service.js.map +2 -2
  16. package/dist/services/console/console.approvals.m2m.service.d.ts +47 -0
  17. package/dist/services/console/console.approvals.m2m.service.js +105 -0
  18. package/dist/services/console/console.approvals.m2m.service.js.map +7 -0
  19. package/dist/services/console/console.channel.service.d.ts +4 -2
  20. package/dist/services/console/console.channel.service.js.map +2 -2
  21. package/dist/services/console/console.cluster-clients.service.d.ts +6 -0
  22. package/dist/services/console/console.cluster-clients.service.js.map +2 -2
  23. package/dist/services/console/console.cluster.service.d.ts +15 -7
  24. package/dist/services/console/console.cluster.service.js +43 -6
  25. package/dist/services/console/console.cluster.service.js.map +2 -2
  26. package/dist/services/console/console.cluster.service.spec.d.ts +1 -0
  27. package/dist/services/console/console.cluster.v2.service.d.ts +11 -3
  28. package/dist/services/console/console.cluster.v2.service.js +37 -2
  29. package/dist/services/console/console.cluster.v2.service.js.map +2 -2
  30. package/dist/services/console/generation.service.d.ts +15 -1
  31. package/dist/services/console/generation.service.js +28 -0
  32. package/dist/services/console/generation.service.js.map +2 -2
  33. package/dist/services/control/control.annotations.service.d.ts +149 -0
  34. package/dist/services/control/control.annotations.service.js +193 -0
  35. package/dist/services/control/control.annotations.service.js.map +7 -0
  36. package/dist/services/control/control.approvals.service.d.ts +231 -0
  37. package/dist/services/control/control.approvals.service.js +333 -0
  38. package/dist/services/control/control.approvals.service.js.map +7 -0
  39. package/dist/services/control/control.feature-flags.service.d.ts +13 -0
  40. package/dist/services/control/control.feature-flags.service.js +52 -0
  41. package/dist/services/control/control.feature-flags.service.js.map +7 -0
  42. package/dist/services/control/control.platform.service.d.ts +24 -0
  43. package/dist/services/control/control.platform.service.js +36 -0
  44. package/dist/services/control/control.platform.service.js.map +7 -0
  45. package/dist/utils/environments.d.ts +1 -1
  46. package/dist/utils/environments.js +11 -0
  47. package/dist/utils/environments.js.map +2 -2
  48. package/package.json +2 -2
@@ -0,0 +1,47 @@
1
+ import type { ApprovalM2mActor, ClusterBulkStepRequestDto, ClusterBulkStepResultDto, MoveClusterOwnerResult } from '@camunda/ccma-shared-types';
2
+ import type { RequestBaseParams } from '../../types/general.types.js';
3
+ /**
4
+ * The route of `api/admin/approvals` in console-backend.
5
+ *
6
+ * The twin of `AccountsApprovalsM2MService`. Read the note there.
7
+ */
8
+ export interface MoveClusterOwnerThroughApprovalRequest extends RequestBaseParams {
9
+ params: {
10
+ clusterId: string;
11
+ };
12
+ body: {
13
+ actor: ApprovalM2mActor;
14
+ ownerId: string;
15
+ };
16
+ }
17
+ export interface RunClusterBulkStepThroughApprovalRequest extends RequestBaseParams {
18
+ params: {
19
+ clusterId: string;
20
+ };
21
+ body: ClusterBulkStepRequestDto & {
22
+ actor: ApprovalM2mActor;
23
+ };
24
+ }
25
+ export interface AnnounceClusterBulkPlanUpdateRequest extends RequestBaseParams {
26
+ body: {
27
+ actor: ApprovalM2mActor;
28
+ toPlanUuid: string;
29
+ doneCount: number;
30
+ };
31
+ }
32
+ export declare class ConsoleApprovalsM2MService {
33
+ static moveClusterOwner(params: MoveClusterOwnerThroughApprovalRequest): Promise<MoveClusterOwnerResult>;
34
+ /**
35
+ * Runs one step of a cluster bulk operation on one cluster.
36
+ *
37
+ * Every outcome of the STEP answers 200, including a cluster that refused.
38
+ * A thrown `HttpError` says that the CALL failed, and the caller then
39
+ * leaves the cluster to run again.
40
+ */
41
+ static runClusterBulkStep(params: RunClusterBulkStepThroughApprovalRequest): Promise<ClusterBulkStepResultDto>;
42
+ /**
43
+ * Posts the Slack message that ends an approved bulk plan update. The bulk
44
+ * operation of console-backend posts the same message after its run.
45
+ */
46
+ static announceClusterBulkPlanUpdate(params: AnnounceClusterBulkPlanUpdateRequest): Promise<void>;
47
+ }
@@ -0,0 +1,105 @@
1
+ import { request } from "../../utils/api.js";
2
+ import { HttpError } from "../../utils/errors.js";
3
+ class ConsoleApprovalsM2MService {
4
+ static async moveClusterOwner(params) {
5
+ const serviceContext = {
6
+ method: {
7
+ name: "ConsoleApprovalsM2MService.moveClusterOwner",
8
+ url: `api/admin/approvals/clusters/${params.params.clusterId}/owner`,
9
+ normalizedUrl: "api/admin/approvals/clusters/:clusterId/owner",
10
+ type: "put"
11
+ },
12
+ source: params.config.metrics?.source || "unset",
13
+ target: { name: "console", type: "internal" }
14
+ };
15
+ const response = await request({
16
+ config: params.config,
17
+ base: { id: "console" },
18
+ url: serviceContext.method.url,
19
+ method: serviceContext.method.type,
20
+ metricsDetails: serviceContext,
21
+ responseType: "json",
22
+ body: params.body
23
+ });
24
+ if (!response.ok) {
25
+ throw new HttpError(
26
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
27
+ response.status,
28
+ response.statusText
29
+ );
30
+ }
31
+ return response.body;
32
+ }
33
+ /**
34
+ * Runs one step of a cluster bulk operation on one cluster.
35
+ *
36
+ * Every outcome of the STEP answers 200, including a cluster that refused.
37
+ * A thrown `HttpError` says that the CALL failed, and the caller then
38
+ * leaves the cluster to run again.
39
+ */
40
+ static async runClusterBulkStep(params) {
41
+ const serviceContext = {
42
+ method: {
43
+ name: "ConsoleApprovalsM2MService.runClusterBulkStep",
44
+ url: `api/admin/approvals/clusters/${params.params.clusterId}/bulk-step`,
45
+ normalizedUrl: "api/admin/approvals/clusters/:clusterId/bulk-step",
46
+ type: "post"
47
+ },
48
+ source: params.config.metrics?.source || "unset",
49
+ target: { name: "console", type: "internal" }
50
+ };
51
+ const response = await request({
52
+ config: params.config,
53
+ base: { id: "console" },
54
+ url: serviceContext.method.url,
55
+ method: serviceContext.method.type,
56
+ metricsDetails: serviceContext,
57
+ responseType: "json",
58
+ body: params.body
59
+ });
60
+ if (!response.ok || !response.body) {
61
+ throw new HttpError(
62
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
63
+ response.status,
64
+ response.statusText
65
+ );
66
+ }
67
+ return response.body;
68
+ }
69
+ /**
70
+ * Posts the Slack message that ends an approved bulk plan update. The bulk
71
+ * operation of console-backend posts the same message after its run.
72
+ */
73
+ static async announceClusterBulkPlanUpdate(params) {
74
+ const serviceContext = {
75
+ method: {
76
+ name: "ConsoleApprovalsM2MService.announceClusterBulkPlanUpdate",
77
+ url: "api/admin/approvals/cluster-bulk/plan-update-announcement",
78
+ normalizedUrl: "api/admin/approvals/cluster-bulk/plan-update-announcement",
79
+ type: "post"
80
+ },
81
+ source: params.config.metrics?.source || "unset",
82
+ target: { name: "console", type: "internal" }
83
+ };
84
+ const response = await request({
85
+ config: params.config,
86
+ base: { id: "console" },
87
+ url: serviceContext.method.url,
88
+ method: serviceContext.method.type,
89
+ metricsDetails: serviceContext,
90
+ responseType: "none",
91
+ body: params.body
92
+ });
93
+ if (!response.ok) {
94
+ throw new HttpError(
95
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
96
+ response.status,
97
+ response.statusText
98
+ );
99
+ }
100
+ }
101
+ }
102
+ export {
103
+ ConsoleApprovalsM2MService
104
+ };
105
+ //# sourceMappingURL=console.approvals.m2m.service.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/services/console/console.approvals.m2m.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 ApprovalM2mActor,\n ClusterBulkStepRequestDto,\n ClusterBulkStepResultDto,\n MoveClusterOwnerResult,\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\n/**\n * The route of `api/admin/approvals` in console-backend.\n *\n * The twin of `AccountsApprovalsM2MService`. Read the note there.\n */\n\nexport interface MoveClusterOwnerThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: {\n actor: ApprovalM2mActor\n ownerId: string\n }\n}\n\nexport interface RunClusterBulkStepThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: ClusterBulkStepRequestDto & { actor: ApprovalM2mActor }\n}\n\nexport interface AnnounceClusterBulkPlanUpdateRequest\n extends RequestBaseParams {\n body: {\n actor: ApprovalM2mActor\n toPlanUuid: string\n doneCount: number\n }\n}\n\nexport class ConsoleApprovalsM2MService {\n public static async moveClusterOwner(\n params: MoveClusterOwnerThroughApprovalRequest,\n ): Promise<MoveClusterOwnerResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.moveClusterOwner',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/owner`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/owner',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<MoveClusterOwnerResult>({\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\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 // This route is new, so there is no older backend that answers 204 with no\n // body for the same-owner case. `ConsoleClusterService.moveClusterOwner`\n // carries that case, and this one does not need it.\n return response.body!\n }\n\n /**\n * Runs one step of a cluster bulk operation on one cluster.\n *\n * Every outcome of the STEP answers 200, including a cluster that refused.\n * A thrown `HttpError` says that the CALL failed, and the caller then\n * leaves the cluster to run again.\n */\n public static async runClusterBulkStep(\n params: RunClusterBulkStepThroughApprovalRequest,\n ): Promise<ClusterBulkStepResultDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.runClusterBulkStep',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/bulk-step`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/bulk-step',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterBulkStepResultDto>({\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\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 * Posts the Slack message that ends an approved bulk plan update. The bulk\n * operation of console-backend posts the same message after its run.\n */\n public static async announceClusterBulkPlanUpdate(\n params: AnnounceClusterBulkPlanUpdateRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.announceClusterBulkPlanUpdate',\n url: 'api/admin/approvals/cluster-bulk/plan-update-announcement',\n normalizedUrl:\n 'api/admin/approvals/cluster-bulk/plan-update-announcement',\n type: 'post',\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 url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: params.body,\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": "AAgBA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAgCnB,MAAM,2BAA2B;AAAA,EACtC,aAAoB,iBAClB,QACiC;AACjC,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,gCAAgC,OAAO,OAAO,SAAS;AAAA,QAC5D,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,QAAgC;AAAA,MACrD,QAAQ,OAAO;AAAA,MACf,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,MAChB,cAAc;AAAA,MACd,MAAM,OAAO;AAAA,IACf,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;AAKA,WAAO,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,aAAoB,mBAClB,QACmC;AACnC,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,gCAAgC,OAAO,OAAO,SAAS;AAAA,QAC5D,eAAe;AAAA,QACf,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ,EAAE,MAAM,W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oleChannelParams extends RequestBaseParams {
20
20
  name: string;
21
21
  description: string;
22
22
  isDefault: boolean;
23
- defaultGenerationId?: string;
23
+ /** Required: the route answers 400 when the write carries no default. */
24
+ defaultGenerationId: string;
24
25
  allowedGenerationIds: string[];
25
26
  };
26
27
  }
@@ -32,7 +33,8 @@ export interface UpdateConsoleChannelParams extends RequestBaseParams {
32
33
  name: string;
33
34
  description: string;
34
35
  isDefault: boolean;
35
- defaultGenerationId?: string;
36
+ /** Required, like on create: a write with no default is refused. */
37
+ defaultGenerationId: string;
36
38
  allowedGenerationIds: string[];
37
39
  };
38
40
  }
@@ -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: 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 defaultGenerationId?: string\n allowedGenerationIds: string[]\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 defaultGenerationId?: string\n allowedGenerationIds: string[]\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;AA+CnB,MAAM,eAAe;AAAA,EAC1B,aAAoB,OAClB,QAC8B;AAC9B,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;AAEA,UAAM,WAAW,MAAM,QAA6B;AAAA,MAClD,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,WA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AQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,MAChB,MAAM,OAAO;AAAA,MACb,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;AAAA,EAEA,aAAoB,OAClB,QACe;AACf,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,gBAAgB,OAAO,OAAO,WAAW;AAAA,QAC9C,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,QAAc;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;",
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: 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: the route answers 400 when the write carries no default. */\n defaultGenerationId: string\n allowedGenerationIds: string[]\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, like on create: a write with no default is refused. */\n defaultGenerationId: string\n allowedGenerationIds: string[]\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;AAiDnB,MAAM,eAAe;AAAA,EAC1B,aAAoB,OAClB,QAC8B;AAC9B,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM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AAA,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
  }
@@ -7,6 +7,12 @@ export interface ConsoleClusterClientDto {
7
7
  created?: string;
8
8
  lastUsed?: string;
9
9
  createdBy?: string;
10
+ /** The user id of `createdBy`, as a name. `userNameAugmenter` adds it. */
11
+ createdByName?: string;
12
+ /**
13
+ * True for a client that Camunda made, and not the customer. Only the admin
14
+ * read gives these clients.
15
+ */
10
16
  internal?: boolean;
11
17
  }
12
18
  export interface GetConsoleClusterClientsParams extends RequestBaseParams {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/services/console/console.cluster-clients.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 ConsoleClusterClientDto {\n uuid: string\n clientId: string\n name: string\n permissions: string[]\n created?: string\n lastUsed?: string\n createdBy?: string\n internal?: boolean\n}\n\nexport interface GetConsoleClusterClientsParams extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport interface CreateConsoleClusterClientParams extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n body: {\n clientName: string\n permissions: string[]\n }\n}\n\nexport interface CreateConsoleClusterClientResponse {\n uuid: string\n clientId: string\n clientSecret: string\n}\n\nexport interface UpdateConsoleClusterClientParams extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n clientId: string\n }\n body: {\n clientName: string\n }\n}\n\nexport interface RotateConsoleClusterClientSecretParams\n extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n /** The `uuid` of the client, not its public `clientId`. */\n clientUuid: string\n }\n}\n\nexport interface RotateConsoleClusterClientSecretResponse {\n uuid: string\n clientId: string\n /** The new secret. Console shows it one time. */\n clientSecret: string\n}\n\nexport interface DeleteConsoleClusterClientParams extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n clientId: string\n }\n}\n\nexport class ConsoleClusterClientsService {\n public static async getAll(\n params: GetConsoleClusterClientsParams,\n ): Promise<ConsoleClusterClientDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterClientsService.getAll',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/clients`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/clients',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleClusterClientDto[]>({\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: CreateConsoleClusterClientParams,\n ): Promise<CreateConsoleClusterClientResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterClientsService.create',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/clients`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/clients',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<CreateConsoleClusterClientResponse>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n clientName: params.body.clientName,\n permissions: params.body.permissions,\n },\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 update(\n params: UpdateConsoleClusterClientParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterClientsService.update',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/clients/${params.params.clientId}`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/clients/:clientId',\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 ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: { clientName: params.body.clientName },\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 /**\n * Gives the client a new secret. The response holds the new secret one\n * time, as the response of {@link create} does.\n */\n public static async rotateSecret(\n params: RotateConsoleClusterClientSecretParams,\n ): Promise<RotateConsoleClusterClientSecretResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterClientsService.rotateSecret',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/clients/${params.params.clientUuid}/rotate`,\n normalizedUrl:\n 'api/orgs/:orgId/clusters/:clusterId/clients/:clientUuid/rotate',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<RotateConsoleClusterClientSecretResponse>({\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 delete(\n params: DeleteConsoleClusterClientParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterClientsService.delete',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/clients/${params.params.clientId}`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/clients/:clientId',\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": "AAUA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAyEnB,MAAM,6BAA6B;AAAA,EACxC,aAAoB,OAClB,QACoC;AACpC,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,YAAY,OAAO,OAAO,KAAK,aAAa,OAAO,OAAO,SAAS;AAAA,QACxE,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,QAAmC;AAAA,MACxD,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,eA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,SAAS;AAAA,EAClB;AAAA,EAEA,aAAoB,OAClB,QACe;AACf,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,YAAY,OAAO,OAAO,KAAK,aAAa,OAAO,OAAO,SAAS,YAAY,OAAO,OAAO,QAAQ;AAAA,QAC1G,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,QAAc;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;",
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 ConsoleClusterClientDto {\n uuid: string\n clientId: string\n name: string\n permissions: string[]\n created?: string\n lastUsed?: string\n createdBy?: string\n /** The user id of `createdBy`, as a name. `userNameAugmenter` adds it. */\n createdByName?: string\n /**\n * True for a client that Camunda made, and not the customer. Only the admin\n * read gives these clients.\n */\n internal?: boolean\n}\n\nexport interface GetConsoleClusterClientsParams extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport interface CreateConsoleClusterClientParams extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n body: {\n clientName: string\n permissions: string[]\n }\n}\n\nexport interface CreateConsoleClusterClientResponse {\n uuid: string\n clientId: string\n clientSecret: string\n}\n\nexport interface UpdateConsoleClusterClientParams extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n clientId: string\n }\n body: {\n clientName: string\n }\n}\n\nexport interface RotateConsoleClusterClientSecretParams\n extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n /** The `uuid` of the client, not its public `clientId`. */\n clientUuid: string\n }\n}\n\nexport interface RotateConsoleClusterClientSecretResponse {\n uuid: string\n clientId: string\n /** The new secret. Console shows it one time. */\n clientSecret: string\n}\n\nexport interface DeleteConsoleClusterClientParams extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n clientId: string\n }\n}\n\nexport class ConsoleClusterClientsService {\n public static async getAll(\n params: GetConsoleClusterClientsParams,\n ): Promise<ConsoleClusterClientDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterClientsService.getAll',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/clients`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/clients',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleClusterClientDto[]>({\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: CreateConsoleClusterClientParams,\n ): Promise<CreateConsoleClusterClientResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterClientsService.create',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/clients`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/clients',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<CreateConsoleClusterClientResponse>({\n ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: {\n clientName: params.body.clientName,\n permissions: params.body.permissions,\n },\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 update(\n params: UpdateConsoleClusterClientParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterClientsService.update',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/clients/${params.params.clientId}`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/clients/:clientId',\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 ...params,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: { clientName: params.body.clientName },\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 /**\n * Gives the client a new secret. The response holds the new secret one\n * time, as the response of {@link create} does.\n */\n public static async rotateSecret(\n params: RotateConsoleClusterClientSecretParams,\n ): Promise<RotateConsoleClusterClientSecretResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterClientsService.rotateSecret',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/clients/${params.params.clientUuid}/rotate`,\n normalizedUrl:\n 'api/orgs/:orgId/clusters/:clusterId/clients/:clientUuid/rotate',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<RotateConsoleClusterClientSecretResponse>({\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 delete(\n params: DeleteConsoleClusterClientParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterClientsService.delete',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/clients/${params.params.clientId}`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/clients/:clientId',\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": "AAUA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AA+EnB,MAAM,6BAA6B;AAAA,EACxC,aAAoB,OAClB,QACoC;AACpC,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,YAAY,OAAO,OAAO,KAAK,aAAa,OAAO,OAAO,SAAS;AAAA,QACxE,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,QAAmC;AAAA,MACxD,GAAG;AAAA,MACH,MAAM,EAAE,IAAI,UAAU;AAAA,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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;AAAA,EAEA,aAAoB,OAClB,QACe;AACf,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,YAAY,OAAO,OAAO,KAAK,aAAa,OAAO,OAAO,SAAS,YAAY,OAAO,OAAO,QAAQ;AAAA,QAC1G,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,QAAc;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
  }
@@ -1,4 +1,4 @@
1
- import type { ClusterLabels, ConsoleClusterDto, ExternalIdpConfig, OptimizeFilteringConfig, SecretsFilterMode } from '@camunda/ccma-shared-types';
1
+ import type { ClusterLabels, ConsoleClusterDto, ExternalIdpConfig, MoveClusterOwnerResult, OptimizeFilteringConfig, SecretsFilterMode } from '@camunda/ccma-shared-types';
2
2
  import type { RequestBaseParams } from '../../types/general.types.js';
3
3
  export interface GetConsoleClustersRequest extends RequestBaseParams {
4
4
  params: {
@@ -165,6 +165,11 @@ export interface MoveClusterOwnerRequest extends RequestBaseParams {
165
165
  ownerId: string;
166
166
  };
167
167
  }
168
+ export interface GetAdminClusterRequest extends RequestBaseParams {
169
+ params: {
170
+ clusterId: string;
171
+ };
172
+ }
168
173
  export interface FailoverConsoleClusterRequest extends RequestBaseParams {
169
174
  params: {
170
175
  orgId: string;
@@ -216,13 +221,16 @@ export declare class ConsoleClusterService {
216
221
  static updateExternalIdpSecret(params: UpdateExternalIdpSecretRequest): Promise<void>;
217
222
  static deleteExternalIdp(params: DeleteExternalIdpRequest): Promise<void>;
218
223
  /**
219
- * Not currently used by control-frontend. This service was introduced for
220
- * accounts-frontend's "Move to other org" action; the control-frontend parity
221
- * review (2026-08-25) decided not to port that UI. Kept deliberately — the
222
- * console endpoint remains routed and may be reused by a future
223
- * cluster-transfer flow.
224
+ * Reads one cluster by its id alone, on the admin route.
225
+ *
226
+ * The org-scoped `getCluster` needs the owning organization, which is the very
227
+ * thing a caller that only holds a cluster id does not know. This admin route
228
+ * (`api/admin/clusters/:clusterId`) resolves the cluster without it, so a
229
+ * caller can read `ownerId` — the current owning organization. It needs
230
+ * `clusters.canReadAllClusterInfo` on the backend.
224
231
  */
225
- static moveClusterOwner(params: MoveClusterOwnerRequest): Promise<void>;
232
+ static getAdminCluster(params: GetAdminClusterRequest): Promise<ConsoleClusterDto>;
233
+ static moveClusterOwner(params: MoveClusterOwnerRequest): Promise<MoveClusterOwnerResult | undefined>;
226
234
  static failoverCluster(params: FailoverConsoleClusterRequest): Promise<FailoverConsoleClusterResult>;
227
235
  static deleteCluster(params: DeleteConsoleClusterRequest): Promise<void>;
228
236
  }
@@ -339,12 +339,45 @@ class ConsoleClusterService {
339
339
  }
340
340
  }
341
341
  /**
342
- * Not currently used by control-frontend. This service was introduced for
343
- * accounts-frontend's "Move to other org" action; the control-frontend parity
344
- * review (2026-08-25) decided not to port that UI. Kept deliberately — the
345
- * console endpoint remains routed and may be reused by a future
346
- * cluster-transfer flow.
342
+ * Reads one cluster by its id alone, on the admin route.
343
+ *
344
+ * The org-scoped `getCluster` needs the owning organization, which is the very
345
+ * thing a caller that only holds a cluster id does not know. This admin route
346
+ * (`api/admin/clusters/:clusterId`) resolves the cluster without it, so a
347
+ * caller can read `ownerId` — the current owning organization. It needs
348
+ * `clusters.canReadAllClusterInfo` on the backend.
347
349
  */
350
+ static async getAdminCluster(params) {
351
+ const serviceContext = {
352
+ method: {
353
+ name: "ConsoleClusterService.getAdminCluster",
354
+ url: `api/admin/clusters/${params.params.clusterId}`,
355
+ normalizedUrl: "api/admin/clusters/:clusterId",
356
+ type: "get"
357
+ },
358
+ source: params.config.metrics?.source || "unset",
359
+ target: { name: "console", type: "internal" }
360
+ };
361
+ const response = await request({
362
+ ...params,
363
+ base: { id: "console" },
364
+ url: serviceContext.method.url,
365
+ method: serviceContext.method.type,
366
+ metricsDetails: serviceContext,
367
+ responseType: "json"
368
+ });
369
+ if (!response.ok) {
370
+ throw new HttpError(
371
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
372
+ response.status,
373
+ response.statusText
374
+ );
375
+ }
376
+ if (!response.body) {
377
+ throw new Error(`${serviceContext.method.name}: Empty response body`);
378
+ }
379
+ return response.body;
380
+ }
348
381
  static async moveClusterOwner(params) {
349
382
  const serviceContext = {
350
383
  method: {
@@ -362,7 +395,7 @@ class ConsoleClusterService {
362
395
  url: serviceContext.method.url,
363
396
  method: serviceContext.method.type,
364
397
  metricsDetails: serviceContext,
365
- responseType: "none",
398
+ responseType: "json",
366
399
  body: params.body
367
400
  });
368
401
  if (!response.ok) {
@@ -372,6 +405,10 @@ class ConsoleClusterService {
372
405
  response.statusText
373
406
  );
374
407
  }
408
+ if (response.status === 204) {
409
+ return void 0;
410
+ }
411
+ return response.body;
375
412
  }
376
413
  static async failoverCluster(params) {
377
414
  const serviceContext = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/services/console/console.cluster.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 ClusterLabels,\n ConsoleClusterDto,\n ExternalIdpConfig,\n OptimizeFilteringConfig,\n SecretsFilterMode,\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 GetConsoleClustersRequest extends RequestBaseParams {\n params: {\n orgId: string\n }\n}\n\nexport interface CreateConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n }\n body: {\n name: string\n planTypeId: string\n channelId: string\n generationId: string\n k8sContextId: string\n autoUpdate?: boolean\n stageLabel?: string\n backupRegionId?: string\n encryption?: string\n numberOfAllocatedHwPackages?: number\n tasklistV2Enabled?: boolean\n identityBackendChecksEnabled?: boolean\n description?: string\n }\n}\n\nexport interface CreateConsoleClusterResponse {\n clusterId: string\n}\n\n/**\n * The body of a duplicate is the body of a create: the fields that the customer\n * selects again for the new cluster. Every other setting of the source cluster\n * comes from console-backend.\n */\nexport interface DuplicateConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n body: CreateConsoleClusterRequest['body'] & {\n /**\n * Deletes the source cluster once the new cluster exists. An org that holds\n * one reservation can duplicate a cluster only this way. It needs the\n * permission to delete a cluster.\n */\n replaceSource?: boolean\n }\n}\n\n/** The result of one carry-over step of a duplicate. */\nexport type ConsoleClusterCarryOverResult = 'ok' | 'skipped' | { error: string }\n\nexport interface DuplicateConsoleClusterResponse {\n clusterId: string\n /**\n * False when `replaceSource` was asked for and the source cluster is still\n * there: either a carry-over step failed, which stops the delete, or the\n * delete itself failed. The new cluster exists either way, thus the caller\n * must tell the customer to delete the source cluster by hand.\n */\n sourceDeleted?: boolean\n /**\n * A step that failed does not fail the duplicate: the new cluster exists\n * either way. Thus the caller must show the steps that did not complete.\n */\n carryOver: {\n clusterClients: ConsoleClusterCarryOverResult\n connectorSecrets: ConsoleClusterCarryOverResult\n alerts: ConsoleClusterCarryOverResult\n byom: ConsoleClusterCarryOverResult\n byoidp: ConsoleClusterCarryOverResult\n backupSchedule: ConsoleClusterCarryOverResult\n }\n}\n\nexport interface WakeConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport interface SuspendConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport interface ProxyOrchestrationClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n region: string\n app: 'tasklist' | 'optimize' | 'operate' | 'zeebe' | 'identity'\n route?: string\n headers: {\n [key: string]: string\n }\n }\n body?: unknown\n method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'\n}\n\nexport interface UpdateClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n body: {\n name?: string\n description?: string\n labels?: ClusterLabels\n primaryEncryptionKeyId?: string\n secondaryEncryptionKeyId?: string\n numberOfAllocatedHwPackages?: number\n mcpEnabled?: boolean\n playMode?: boolean\n swagger?: boolean\n tasklistV2Enabled?: boolean\n optimizeEnabled?: boolean\n autoUpdate?: boolean\n enforceGroups?: boolean\n rba?: boolean\n identityBackendChecksEnabled?: boolean\n multiTenancyEnabled?: boolean\n sessionMaxInactiveIntervalMinutes?: number\n sessionHeartbeatEnabled?: boolean\n // BYOIDP Phase 1 (#3190). Secret is sent via updateExternalIdpSecret, not here.\n externalIdpEnabled?: boolean\n externalIdpConfig?: ExternalIdpConfig\n businessIdUniquenessEnabled?: boolean\n appIntegrationsEnabled?: boolean\n secretsFilterMode?: SecretsFilterMode\n auditLogEnabled?: boolean | null\n auditLogUserCategories?: string[] | null\n auditLogClientCategories?: string[] | null\n /** null deactivates filtering; otherwise the full config replaces what's stored. */\n optimizeFiltering?: OptimizeFilteringConfig | null\n }\n}\n\n// BYOIDP Phase 1 (#3190): write the OIDC client secret. Separate from updateCluster \u2014\n// the value never travels through the cluster PATCH/DB/CR path.\nexport interface UpdateExternalIdpSecretRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n body: {\n name: string\n clientSecret: string\n }\n}\n\n// BYOIDP (#9864): remove the whole external-IdP setup \u2014 config, CR entry, and\n// delivered secret. Distinct from the enable/disable toggle, which keeps the config.\nexport interface DeleteExternalIdpRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport interface GetConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport interface MoveClusterOwnerRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n body: {\n ownerId: string\n }\n}\n\nexport interface FailoverConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n body: {\n /** Backups to clone into the failover cluster (one or more). */\n backupIds: string[]\n /** The single backup to restore from immediately; must be one of `backupIds`. */\n restoreBackupId: string\n }\n}\n\nexport interface FailoverConsoleClusterResult {\n newClusterId: string\n results: {\n backupClone: 'ok' | { error: string }\n restore: 'ok' | { error: string }\n }\n}\n\nexport interface DeleteConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport class ConsoleClusterService {\n public static async getClusters(\n params: GetConsoleClustersRequest,\n ): Promise<ConsoleClusterDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.getClusters',\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: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleClusterDto[]>({\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 createCluster(\n params: CreateConsoleClusterRequest,\n ): Promise<CreateConsoleClusterResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.createCluster',\n url: `api/orgs/${params.params.orgId}/clusters`,\n normalizedUrl: 'api/orgs/:orgId/clusters',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<CreateConsoleClusterResponse>({\n ...params,\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\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 duplicateCluster(\n params: DuplicateConsoleClusterRequest,\n ): Promise<DuplicateConsoleClusterResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.duplicateCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/duplicate`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/duplicate',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<DuplicateConsoleClusterResponse>({\n ...params,\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\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 getCluster(\n params: GetConsoleClusterRequest,\n ): Promise<ConsoleClusterDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.getCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleClusterDto>({\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) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n\n return response.body\n }\n\n public static async suspendCluster(\n params: SuspendConsoleClusterRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.suspendCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/suspend`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/suspend',\n type: 'post',\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 public static async wakeCluster(\n params: WakeConsoleClusterRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.wakeCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/wake`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/wake',\n type: 'post',\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 /**\n * Proxy request to orchestration cluster application\n * @param params - Request parameters including clusterId, region, app, and optional route\n * @returns Response from the orchestration cluster\n */\n public static async proxyOrchestrationCluster<TResponse = unknown>(\n params: ProxyOrchestrationClusterRequest,\n ): Promise<TResponse> {\n const method = params.method || 'GET'\n const route = params.params.route || ''\n\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleClusterService.proxyOrchestrationCluster`,\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/oc`,\n normalizedUrl: `api/orgs/:orgId/clusters/:clusterId/oc`,\n type: method.toLowerCase() as\n | 'get'\n | 'post'\n | 'put'\n | 'patch'\n | 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n\n // Construct request body with _cluster metadata and body payload\n const requestBody = {\n _cluster: {\n region: params.params.region,\n app: params.params.app,\n route,\n },\n body: params.body,\n }\n\n const response = await request<TResponse>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: requestBody,\n headers: params.params.headers,\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\n if (response.body === undefined) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n\n return response.body\n }\n\n /**\n * Update cluster properties\n * @param params - Request parameters including orgId, clusterId, and properties to update\n * @returns void\n */\n public static async updateCluster(\n params: UpdateClusterRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.updateCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: params.body,\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 // BYOIDP Phase 1 (#3190). Call BEFORE updateCluster enables the provider so the CR\n // never references a not-yet-written Secret (fail-closed ordering, design \u00A73).\n public static async updateExternalIdpSecret(\n params: UpdateExternalIdpSecretRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.updateExternalIdpSecret',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/external-idp/secret`,\n normalizedUrl:\n 'api/orgs/:orgId/clusters/:clusterId/external-idp/secret',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: params.body,\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 // BYOIDP (#9864). Clears the config, the CR entry, and the delivered secret in\n // one call. The backend owns the order \u2014 see the route in ClusterRouter.ts.\n public static async deleteExternalIdp(\n params: DeleteExternalIdpRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.deleteExternalIdp',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/external-idp`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/external-idp',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\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 /**\n * Not currently used by control-frontend. This service was introduced for\n * accounts-frontend's \"Move to other org\" action; the control-frontend parity\n * review (2026-08-25) decided not to port that UI. Kept deliberately \u2014 the\n * console endpoint remains routed and may be reused by a future\n * cluster-transfer flow.\n */\n public static async moveClusterOwner(\n params: MoveClusterOwnerRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.moveClusterOwner',\n url: `api/admin/clusters/${params.params.clusterId}/owner`,\n normalizedUrl: 'api/admin/clusters/:clusterId/owner',\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 ...params,\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\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 failoverCluster(\n params: FailoverConsoleClusterRequest,\n ): Promise<FailoverConsoleClusterResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.failoverCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/failover`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/failover',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<FailoverConsoleClusterResult>({\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 return response.body!\n }\n\n public static async deleteCluster(\n params: DeleteConsoleClusterRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.deleteCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId',\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": "AAiBA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAoNnB,MAAM,sBAAsB;AAAA,EACjC,aAAoB,YAClB,QAC8B;AAC9B,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,QAA6B;AAAA,MAClD,GAAG;AAAA,MACH,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,MAChB,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KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,MAChB,MAAM,OAAO;AAAA,MACb,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;AAAA,EAEA,aAAoB,cAClB,QACe;AACf,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,YAAY,OAAO,OAAO,KAAK,aAAa,OAAO,OAAO,SAAS;AAAA,QACxE,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,QAAc;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;",
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 ClusterLabels,\n ConsoleClusterDto,\n ExternalIdpConfig,\n MoveClusterOwnerResult,\n OptimizeFilteringConfig,\n SecretsFilterMode,\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 GetConsoleClustersRequest extends RequestBaseParams {\n params: {\n orgId: string\n }\n}\n\nexport interface CreateConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n }\n body: {\n name: string\n planTypeId: string\n channelId: string\n generationId: string\n k8sContextId: string\n autoUpdate?: boolean\n stageLabel?: string\n backupRegionId?: string\n encryption?: string\n numberOfAllocatedHwPackages?: number\n tasklistV2Enabled?: boolean\n identityBackendChecksEnabled?: boolean\n description?: string\n }\n}\n\nexport interface CreateConsoleClusterResponse {\n clusterId: string\n}\n\n/**\n * The body of a duplicate is the body of a create: the fields that the customer\n * selects again for the new cluster. Every other setting of the source cluster\n * comes from console-backend.\n */\nexport interface DuplicateConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n body: CreateConsoleClusterRequest['body'] & {\n /**\n * Deletes the source cluster once the new cluster exists. An org that holds\n * one reservation can duplicate a cluster only this way. It needs the\n * permission to delete a cluster.\n */\n replaceSource?: boolean\n }\n}\n\n/** The result of one carry-over step of a duplicate. */\nexport type ConsoleClusterCarryOverResult = 'ok' | 'skipped' | { error: string }\n\nexport interface DuplicateConsoleClusterResponse {\n clusterId: string\n /**\n * False when `replaceSource` was asked for and the source cluster is still\n * there: either a carry-over step failed, which stops the delete, or the\n * delete itself failed. The new cluster exists either way, thus the caller\n * must tell the customer to delete the source cluster by hand.\n */\n sourceDeleted?: boolean\n /**\n * A step that failed does not fail the duplicate: the new cluster exists\n * either way. Thus the caller must show the steps that did not complete.\n */\n carryOver: {\n clusterClients: ConsoleClusterCarryOverResult\n connectorSecrets: ConsoleClusterCarryOverResult\n alerts: ConsoleClusterCarryOverResult\n byom: ConsoleClusterCarryOverResult\n byoidp: ConsoleClusterCarryOverResult\n backupSchedule: ConsoleClusterCarryOverResult\n }\n}\n\nexport interface WakeConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport interface SuspendConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport interface ProxyOrchestrationClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n region: string\n app: 'tasklist' | 'optimize' | 'operate' | 'zeebe' | 'identity'\n route?: string\n headers: {\n [key: string]: string\n }\n }\n body?: unknown\n method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'\n}\n\nexport interface UpdateClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n body: {\n name?: string\n description?: string\n labels?: ClusterLabels\n primaryEncryptionKeyId?: string\n secondaryEncryptionKeyId?: string\n numberOfAllocatedHwPackages?: number\n mcpEnabled?: boolean\n playMode?: boolean\n swagger?: boolean\n tasklistV2Enabled?: boolean\n optimizeEnabled?: boolean\n autoUpdate?: boolean\n enforceGroups?: boolean\n rba?: boolean\n identityBackendChecksEnabled?: boolean\n multiTenancyEnabled?: boolean\n sessionMaxInactiveIntervalMinutes?: number\n sessionHeartbeatEnabled?: boolean\n // BYOIDP Phase 1 (#3190). Secret is sent via updateExternalIdpSecret, not here.\n externalIdpEnabled?: boolean\n externalIdpConfig?: ExternalIdpConfig\n businessIdUniquenessEnabled?: boolean\n appIntegrationsEnabled?: boolean\n secretsFilterMode?: SecretsFilterMode\n auditLogEnabled?: boolean | null\n auditLogUserCategories?: string[] | null\n auditLogClientCategories?: string[] | null\n /** null deactivates filtering; otherwise the full config replaces what's stored. */\n optimizeFiltering?: OptimizeFilteringConfig | null\n }\n}\n\n// BYOIDP Phase 1 (#3190): write the OIDC client secret. Separate from updateCluster \u2014\n// the value never travels through the cluster PATCH/DB/CR path.\nexport interface UpdateExternalIdpSecretRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n body: {\n name: string\n clientSecret: string\n }\n}\n\n// BYOIDP (#9864): remove the whole external-IdP setup \u2014 config, CR entry, and\n// delivered secret. Distinct from the enable/disable toggle, which keeps the config.\nexport interface DeleteExternalIdpRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport interface GetConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport interface MoveClusterOwnerRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n body: {\n ownerId: string\n }\n}\n\nexport interface GetAdminClusterRequest extends RequestBaseParams {\n params: {\n clusterId: string\n }\n}\n\nexport interface FailoverConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n body: {\n /** Backups to clone into the failover cluster (one or more). */\n backupIds: string[]\n /** The single backup to restore from immediately; must be one of `backupIds`. */\n restoreBackupId: string\n }\n}\n\nexport interface FailoverConsoleClusterResult {\n newClusterId: string\n results: {\n backupClone: 'ok' | { error: string }\n restore: 'ok' | { error: string }\n }\n}\n\nexport interface DeleteConsoleClusterRequest extends RequestBaseParams {\n params: {\n orgId: string\n clusterId: string\n }\n}\n\nexport class ConsoleClusterService {\n public static async getClusters(\n params: GetConsoleClustersRequest,\n ): Promise<ConsoleClusterDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.getClusters',\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: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleClusterDto[]>({\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 createCluster(\n params: CreateConsoleClusterRequest,\n ): Promise<CreateConsoleClusterResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.createCluster',\n url: `api/orgs/${params.params.orgId}/clusters`,\n normalizedUrl: 'api/orgs/:orgId/clusters',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<CreateConsoleClusterResponse>({\n ...params,\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\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 duplicateCluster(\n params: DuplicateConsoleClusterRequest,\n ): Promise<DuplicateConsoleClusterResponse> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.duplicateCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/duplicate`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/duplicate',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<DuplicateConsoleClusterResponse>({\n ...params,\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\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 getCluster(\n params: GetConsoleClusterRequest,\n ): Promise<ConsoleClusterDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.getCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleClusterDto>({\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) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n\n return response.body\n }\n\n public static async suspendCluster(\n params: SuspendConsoleClusterRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.suspendCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/suspend`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/suspend',\n type: 'post',\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 public static async wakeCluster(\n params: WakeConsoleClusterRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.wakeCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/wake`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/wake',\n type: 'post',\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 /**\n * Proxy request to orchestration cluster application\n * @param params - Request parameters including clusterId, region, app, and optional route\n * @returns Response from the orchestration cluster\n */\n public static async proxyOrchestrationCluster<TResponse = unknown>(\n params: ProxyOrchestrationClusterRequest,\n ): Promise<TResponse> {\n const method = params.method || 'GET'\n const route = params.params.route || ''\n\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleClusterService.proxyOrchestrationCluster`,\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/oc`,\n normalizedUrl: `api/orgs/:orgId/clusters/:clusterId/oc`,\n type: method.toLowerCase() as\n | 'get'\n | 'post'\n | 'put'\n | 'patch'\n | 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n\n // Construct request body with _cluster metadata and body payload\n const requestBody = {\n _cluster: {\n region: params.params.region,\n app: params.params.app,\n route,\n },\n body: params.body,\n }\n\n const response = await request<TResponse>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: requestBody,\n headers: params.params.headers,\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\n if (response.body === undefined) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n\n return response.body\n }\n\n /**\n * Update cluster properties\n * @param params - Request parameters including orgId, clusterId, and properties to update\n * @returns void\n */\n public static async updateCluster(\n params: UpdateClusterRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.updateCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: params.body,\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 // BYOIDP Phase 1 (#3190). Call BEFORE updateCluster enables the provider so the CR\n // never references a not-yet-written Secret (fail-closed ordering, design \u00A73).\n public static async updateExternalIdpSecret(\n params: UpdateExternalIdpSecretRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.updateExternalIdpSecret',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/external-idp/secret`,\n normalizedUrl:\n 'api/orgs/:orgId/clusters/:clusterId/external-idp/secret',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: params.body,\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 // BYOIDP (#9864). Clears the config, the CR entry, and the delivered secret in\n // one call. The backend owns the order \u2014 see the route in ClusterRouter.ts.\n public static async deleteExternalIdp(\n params: DeleteExternalIdpRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.deleteExternalIdp',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/external-idp`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/external-idp',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: {\n name: 'console',\n type: 'internal',\n },\n }\n\n const response = await request<void>({\n config: params.config,\n base: {\n id: 'console',\n },\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 /**\n * Reads one cluster by its id alone, on the admin route.\n *\n * The org-scoped `getCluster` needs the owning organization, which is the very\n * thing a caller that only holds a cluster id does not know. This admin route\n * (`api/admin/clusters/:clusterId`) resolves the cluster without it, so a\n * caller can read `ownerId` \u2014 the current owning organization. It needs\n * `clusters.canReadAllClusterInfo` on the backend.\n */\n public static async getAdminCluster(\n params: GetAdminClusterRequest,\n ): Promise<ConsoleClusterDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.getAdminCluster',\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: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ConsoleClusterDto>({\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) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n\n return response.body\n }\n\n public static async moveClusterOwner(\n params: MoveClusterOwnerRequest,\n ): Promise<MoveClusterOwnerResult | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.moveClusterOwner',\n url: `api/admin/clusters/${params.params.clusterId}/owner`,\n normalizedUrl: 'api/admin/clusters/:clusterId/owner',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<MoveClusterOwnerResult>({\n ...params,\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\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 // The current backend answers 200 with `ownerUnchanged: true` for the\n // no-op case (the owner does not change). An older backend, still live\n // during a rollout, answers 204 with no body for that same case.\n // `request()` still parses an empty body as `{}` for a 'json' response\n // type, so the 204 case needs its own check.\n if (response.status === 204) {\n return undefined\n }\n\n return response.body\n }\n\n public static async failoverCluster(\n params: FailoverConsoleClusterRequest,\n ): Promise<FailoverConsoleClusterResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.failoverCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}/failover`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/failover',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<FailoverConsoleClusterResult>({\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 return response.body!\n }\n\n public static async deleteCluster(\n params: DeleteConsoleClusterRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleClusterService.deleteCluster',\n url: `api/orgs/${params.params.orgId}/clusters/${params.params.clusterId}`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId',\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": "AAkBA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AA0NnB,MAAM,sBAAsB;AAAA,EACjC,aAAoB,YAClB,QAC8B;AAC9B,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,QAA6B;AAAA,MAClD,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,QAAQ,CAAC;AAAA,EAC3B;AAAA,EAEA,aAAoB,cAClB,QACuC;AACvC,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,QAAsC;AAAA,MAC3D,GAAG;AAAA,MACH,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