@camunda/ccma-api 11.1.0 → 12.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/index.d.ts +6 -1
  2. package/dist/index.js +20 -0
  3. package/dist/index.js.map +2 -2
  4. package/dist/services/accounts/hdp.service.d.ts +0 -12
  5. package/dist/services/accounts/hdp.service.js +0 -32
  6. package/dist/services/accounts/hdp.service.js.map +2 -2
  7. package/dist/services/console/console.cli.actions.service.d.ts +47 -0
  8. package/dist/services/console/console.cli.actions.service.js +115 -0
  9. package/dist/services/console/console.cli.actions.service.js.map +7 -0
  10. package/dist/services/console/console.cli.actions.service.spec.d.ts +1 -0
  11. package/dist/services/console/console.cli.cluster.service.d.ts +94 -0
  12. package/dist/services/console/console.cli.cluster.service.js +53 -0
  13. package/dist/services/console/console.cli.cluster.service.js.map +7 -0
  14. package/dist/services/console/console.cli.cluster.service.spec.d.ts +1 -0
  15. package/dist/services/console/console.cli.extras.service.d.ts +119 -0
  16. package/dist/services/console/console.cli.extras.service.js +169 -0
  17. package/dist/services/console/console.cli.extras.service.js.map +7 -0
  18. package/dist/services/console/console.cli.extras.service.spec.d.ts +1 -0
  19. package/dist/services/console/console.cli.org.service.d.ts +53 -0
  20. package/dist/services/console/console.cli.org.service.js +60 -0
  21. package/dist/services/console/console.cli.org.service.js.map +7 -0
  22. package/dist/services/console/console.cli.org.service.spec.d.ts +1 -0
  23. package/dist/services/console/console.cli.resources.service.d.ts +136 -0
  24. package/dist/services/console/console.cli.resources.service.js +218 -0
  25. package/dist/services/console/console.cli.resources.service.js.map +7 -0
  26. package/dist/services/console/console.cli.resources.service.spec.d.ts +1 -0
  27. package/package.json +2 -2
@@ -0,0 +1,115 @@
1
+ import { request } from "../../utils/api.js";
2
+ import { HttpError } from "../../utils/errors.js";
3
+ const CLUSTERS = "cli/v1/orgs/:orgId/clusters";
4
+ class ConsoleCliActionsService {
5
+ static async call(params, name, path, type, responseType) {
6
+ const { orgId, clusterId } = params.params;
7
+ const template = `${CLUSTERS}${clusterId === void 0 ? "" : "/:clusterId"}${path}`;
8
+ const url = template.replace(":orgId", () => encodeURIComponent(orgId)).replace(":clusterId", () => encodeURIComponent(clusterId ?? ""));
9
+ const serviceContext = {
10
+ method: {
11
+ name: `ConsoleCliActionsService.${name}`,
12
+ url: template,
13
+ normalizedUrl: template,
14
+ type
15
+ },
16
+ source: params.config.metrics?.source || "unset",
17
+ target: { name: "console", type: "internal" }
18
+ };
19
+ const response = await request({
20
+ ...params,
21
+ base: { id: "console" },
22
+ url,
23
+ logUrl: template,
24
+ method: type,
25
+ metricsDetails: serviceContext,
26
+ body: params.body,
27
+ responseType
28
+ });
29
+ if (!response.ok || responseType === "json" && response.body === void 0) {
30
+ throw new HttpError(
31
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
32
+ response.status,
33
+ response.statusText
34
+ );
35
+ }
36
+ return response.body;
37
+ }
38
+ static createCluster(params) {
39
+ return ConsoleCliActionsService.call(
40
+ params,
41
+ "createCluster",
42
+ "",
43
+ "post",
44
+ "json"
45
+ );
46
+ }
47
+ static deleteCluster(params) {
48
+ return ConsoleCliActionsService.call(
49
+ params,
50
+ "deleteCluster",
51
+ "",
52
+ "delete",
53
+ "none"
54
+ );
55
+ }
56
+ static suspendCluster(params) {
57
+ return ConsoleCliActionsService.call(
58
+ params,
59
+ "suspendCluster",
60
+ "/suspend",
61
+ "post",
62
+ "none"
63
+ );
64
+ }
65
+ static wakeCluster(params) {
66
+ return ConsoleCliActionsService.call(
67
+ params,
68
+ "wakeCluster",
69
+ "/wake",
70
+ "post",
71
+ "none"
72
+ );
73
+ }
74
+ static duplicateCluster(params) {
75
+ return ConsoleCliActionsService.call(
76
+ params,
77
+ "duplicateCluster",
78
+ "/duplicate",
79
+ "post",
80
+ "json"
81
+ );
82
+ }
83
+ static failoverCluster(params) {
84
+ return ConsoleCliActionsService.call(
85
+ params,
86
+ "failoverCluster",
87
+ "/failover",
88
+ "post",
89
+ "json"
90
+ );
91
+ }
92
+ /** The secret is masked in the log lines of the request. */
93
+ static setExternalIdpSecret(params) {
94
+ return ConsoleCliActionsService.call(
95
+ { ...params, redactBody: true },
96
+ "setExternalIdpSecret",
97
+ "/external-idp/secret",
98
+ "put",
99
+ "none"
100
+ );
101
+ }
102
+ static deleteExternalIdp(params) {
103
+ return ConsoleCliActionsService.call(
104
+ params,
105
+ "deleteExternalIdp",
106
+ "/external-idp",
107
+ "delete",
108
+ "none"
109
+ );
110
+ }
111
+ }
112
+ export {
113
+ ConsoleCliActionsService
114
+ };
115
+ //# sourceMappingURL=console.cli.actions.service.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/services/console/console.cli.actions.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'\nimport type { ConsoleCliClusterParams } from './console.cli.service.js'\nimport type {\n CreateConsoleClusterRequest,\n DuplicateConsoleClusterRequest,\n DuplicateConsoleClusterResponse,\n FailoverConsoleClusterRequest,\n FailoverConsoleClusterResult,\n UpdateExternalIdpSecretRequest,\n} from './console.cluster.service.js'\n\n/**\n * The body of a create of `/cli/v1`: the body of the internal create, with\n * `regionId` in place of `k8sContextId`.\n */\nexport type ConsoleCliCreateClusterBody = Omit<\n CreateConsoleClusterRequest['body'],\n 'k8sContextId'\n> & { regionId: string }\n\nexport interface ConsoleCliCreateClusterParams extends RequestBaseParams {\n params: { orgId: string }\n body: ConsoleCliCreateClusterBody\n}\n\n/** The cluster that `/cli/v1` returns. c4 reads only its id. */\nexport interface ConsoleCliCreatedCluster {\n id: string\n}\n\nexport interface ConsoleCliDuplicateClusterParams\n extends ConsoleCliClusterParams {\n body: ConsoleCliCreateClusterBody &\n Pick<DuplicateConsoleClusterRequest['body'], 'replaceSource'>\n}\n\nexport interface ConsoleCliFailoverClusterParams\n extends ConsoleCliClusterParams {\n body: FailoverConsoleClusterRequest['body']\n}\n\nexport interface ConsoleCliSetExternalIdpSecretParams\n extends ConsoleCliClusterParams {\n body: UpdateExternalIdpSecretRequest['body']\n}\n\nconst CLUSTERS = 'cli/v1/orgs/:orgId/clusters'\n\n/**\n * The cluster actions of the `/cli/v1` routes of console-backend: create,\n * delete, suspend, wake, duplicate, failover and the OIDC provider. c4 calls\n * them in place of `ConsoleClusterService` while the flag `console.c4CliApi`\n * is on (#11623).\n */\nexport class ConsoleCliActionsService {\n private static async call<T>(\n params: RequestBaseParams & {\n params: { orgId: string; clusterId?: string }\n body?: unknown\n redactBody?: boolean\n },\n name: string,\n path: string,\n type: 'post' | 'put' | 'delete',\n responseType: 'json' | 'none',\n ): Promise<T> {\n const { orgId, clusterId } = params.params\n const template = `${CLUSTERS}${clusterId === undefined ? '' : '/:clusterId'}${path}`\n const url = template\n .replace(':orgId', () => encodeURIComponent(orgId))\n .replace(':clusterId', () => encodeURIComponent(clusterId ?? ''))\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleCliActionsService.${name}`,\n url: template,\n normalizedUrl: template,\n type,\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<T>({\n ...params,\n base: { id: 'console' },\n url,\n logUrl: template,\n method: type,\n metricsDetails: serviceContext,\n body: params.body,\n responseType,\n })\n\n if (\n !response.ok ||\n (responseType === 'json' && response.body === undefined)\n ) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body as T\n }\n\n public static createCluster(\n params: ConsoleCliCreateClusterParams,\n ): Promise<ConsoleCliCreatedCluster> {\n return ConsoleCliActionsService.call(\n params,\n 'createCluster',\n '',\n 'post',\n 'json',\n )\n }\n\n public static deleteCluster(params: ConsoleCliClusterParams): Promise<void> {\n return ConsoleCliActionsService.call(\n params,\n 'deleteCluster',\n '',\n 'delete',\n 'none',\n )\n }\n\n public static suspendCluster(params: ConsoleCliClusterParams): Promise<void> {\n return ConsoleCliActionsService.call(\n params,\n 'suspendCluster',\n '/suspend',\n 'post',\n 'none',\n )\n }\n\n public static wakeCluster(params: ConsoleCliClusterParams): Promise<void> {\n return ConsoleCliActionsService.call(\n params,\n 'wakeCluster',\n '/wake',\n 'post',\n 'none',\n )\n }\n\n public static duplicateCluster(\n params: ConsoleCliDuplicateClusterParams,\n ): Promise<DuplicateConsoleClusterResponse> {\n return ConsoleCliActionsService.call(\n params,\n 'duplicateCluster',\n '/duplicate',\n 'post',\n 'json',\n )\n }\n\n public static failoverCluster(\n params: ConsoleCliFailoverClusterParams,\n ): Promise<FailoverConsoleClusterResult> {\n return ConsoleCliActionsService.call(\n params,\n 'failoverCluster',\n '/failover',\n 'post',\n 'json',\n )\n }\n\n /** The secret is masked in the log lines of the request. */\n public static setExternalIdpSecret(\n params: ConsoleCliSetExternalIdpSecretParams,\n ): Promise<void> {\n return ConsoleCliActionsService.call(\n { ...params, redactBody: true },\n 'setExternalIdpSecret',\n '/external-idp/secret',\n 'put',\n 'none',\n )\n }\n\n public static deleteExternalIdp(\n params: ConsoleCliClusterParams,\n ): Promise<void> {\n return ConsoleCliActionsService.call(\n params,\n 'deleteExternalIdp',\n '/external-idp',\n 'delete',\n 'none',\n )\n }\n}\n"],
5
+ "mappings": "AAUA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AA8C1B,MAAM,WAAW;AAQV,MAAM,yBAAyB;AAAA,EACpC,aAAqB,KACnB,QAKA,MACA,MACA,MACA,cACY;AACZ,UAAM,EAAE,OAAO,UAAU,IAAI,OAAO;AACpC,UAAM,WAAW,GAAG,QAAQ,GAAG,cAAc,SAAY,KAAK,aAAa,GAAG,IAAI;AAClF,UAAM,MAAM,SACT,Q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ACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,OAAc,iBACZ,QAC0C;AAC1C,WAAO,yBAAyB;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,OAAc,gBACZ,QACuC;AACvC,WAAO,yBAAyB;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,OAAc,qBACZ,QACe;AACf,WAAO,yBAAyB;AAAA,MAC9B,EAAE,GAAG,QAAQ,YAAY,KAAK;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,OAAc,kBACZ,QACe;AACf,WAAO,yBAAyB;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,94 @@
1
+ import type { ExternalIdpConfig, OptimizeFilteringConfig, SecretsFilterMode } from '@camunda/ccma-shared-types';
2
+ import type { RequestBaseParams } from '../../types/general.types.js';
3
+ import type { ConsoleCliClusterParams } from './console.cli.service.js';
4
+ import type { UpdateClusterRequest } from './console.cluster.service.js';
5
+ /** A reference of `/cli/v1`: an id and a name. */
6
+ export interface ConsoleCliRef {
7
+ id: string;
8
+ name: string;
9
+ }
10
+ /**
11
+ * The settings of a cluster that `/cli/v1` returns. `PATCH` takes the same
12
+ * names (`ConsoleCliClusterUpdate`).
13
+ */
14
+ export interface ConsoleCliClusterSettings {
15
+ labels?: {
16
+ camunda?: string[];
17
+ custom?: string[];
18
+ };
19
+ autoUpdate?: boolean;
20
+ rba?: boolean;
21
+ identityBackendChecksEnabled?: boolean;
22
+ enforceGroups?: boolean;
23
+ playMode?: boolean;
24
+ mcpEnabled?: boolean;
25
+ swagger?: boolean;
26
+ secretsFilterMode?: SecretsFilterMode;
27
+ tasklistV2Enabled?: boolean;
28
+ optimizeEnabled?: boolean;
29
+ businessIdUniquenessEnabled?: boolean;
30
+ appIntegrationsEnabled?: boolean;
31
+ multiTenancyEnabled?: boolean;
32
+ sessionMaxInactiveIntervalMinutes?: number;
33
+ sessionHeartbeatEnabled?: boolean;
34
+ externalIdpEnabled?: boolean;
35
+ /** The client secret is never part of it. */
36
+ externalIdpConfig?: ExternalIdpConfig;
37
+ auditLogEnabled?: boolean;
38
+ auditLogUserCategories?: string[];
39
+ auditLogClientCategories?: string[];
40
+ optimizeFiltering?: OptimizeFilteringConfig;
41
+ numberOfAllocatedHwPackages?: number;
42
+ encryption?: string;
43
+ primaryEncryptionKeyId?: string;
44
+ secondaryEncryptionKeyId?: string;
45
+ }
46
+ /** The cluster shape of `packages/shared-route-schemas/src/console/cli.ts`. */
47
+ export interface ConsoleCliCluster extends ConsoleCliClusterSettings {
48
+ id: string;
49
+ name: string;
50
+ description?: string;
51
+ status: string;
52
+ /** The raw `ready` value of console-backend. */
53
+ statusDetail?: string;
54
+ generation: ConsoleCliRef & {
55
+ versions?: Record<string, string>;
56
+ };
57
+ channel: ConsoleCliRef;
58
+ region: ConsoleCliRef;
59
+ planType: ConsoleCliRef;
60
+ createdAt: string;
61
+ urls: {
62
+ zeebeGrpc?: string;
63
+ zeebeRest?: string;
64
+ operate?: string;
65
+ tasklist?: string;
66
+ optimize?: string;
67
+ connectors?: string;
68
+ identity?: string;
69
+ };
70
+ }
71
+ /**
72
+ * The body of `PATCH`: the body of the internal `PATCH`, with the same names
73
+ * and the same checks.
74
+ */
75
+ export type ConsoleCliClusterUpdate = UpdateClusterRequest['body'];
76
+ export interface UpdateConsoleCliClusterParams extends ConsoleCliClusterParams {
77
+ body: ConsoleCliClusterUpdate;
78
+ }
79
+ export interface ConsoleCliOrgParams extends RequestBaseParams {
80
+ params: {
81
+ orgId: string;
82
+ };
83
+ }
84
+ /**
85
+ * The cluster routes of `/cli/v1`. c4 calls them in place of the internal
86
+ * cluster routes while `console.c4CliApi` is on (#11623).
87
+ */
88
+ export declare class ConsoleCliClusterService {
89
+ private static call;
90
+ static getCluster(params: ConsoleCliClusterParams): Promise<ConsoleCliCluster>;
91
+ static getClusters(params: ConsoleCliOrgParams): Promise<ConsoleCliCluster[]>;
92
+ /** Returns the cluster after the change. */
93
+ static updateCluster(params: UpdateConsoleCliClusterParams): Promise<ConsoleCliCluster>;
94
+ }
@@ -0,0 +1,53 @@
1
+ import { request } from "../../utils/api.js";
2
+ import { HttpError } from "../../utils/errors.js";
3
+ const ORG_TEMPLATE = "cli/v1/orgs/:orgId/clusters";
4
+ const CLUSTER_TEMPLATE = `${ORG_TEMPLATE}/:clusterId`;
5
+ class ConsoleCliClusterService {
6
+ static async call(params, name, type) {
7
+ const { orgId, clusterId } = params.params;
8
+ const template = clusterId === void 0 ? ORG_TEMPLATE : CLUSTER_TEMPLATE;
9
+ const url = clusterId === void 0 ? `cli/v1/orgs/${encodeURIComponent(orgId)}/clusters` : `cli/v1/orgs/${encodeURIComponent(orgId)}/clusters/${encodeURIComponent(clusterId)}`;
10
+ const serviceContext = {
11
+ method: {
12
+ name: `ConsoleCliClusterService.${name}`,
13
+ url: template,
14
+ normalizedUrl: template,
15
+ type
16
+ },
17
+ source: params.config.metrics?.source || "unset",
18
+ target: { name: "console", type: "internal" }
19
+ };
20
+ const response = await request({
21
+ ...params,
22
+ base: { id: "console" },
23
+ url,
24
+ logUrl: template,
25
+ method: serviceContext.method.type,
26
+ metricsDetails: serviceContext,
27
+ body: params.body,
28
+ responseType: "json"
29
+ });
30
+ if (!response.ok || response.body === void 0) {
31
+ throw new HttpError(
32
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
33
+ response.status,
34
+ response.statusText
35
+ );
36
+ }
37
+ return response.body;
38
+ }
39
+ static getCluster(params) {
40
+ return ConsoleCliClusterService.call(params, "getCluster", "get");
41
+ }
42
+ static getClusters(params) {
43
+ return ConsoleCliClusterService.call(params, "getClusters", "get");
44
+ }
45
+ /** Returns the cluster after the change. */
46
+ static updateCluster(params) {
47
+ return ConsoleCliClusterService.call(params, "updateCluster", "patch");
48
+ }
49
+ }
50
+ export {
51
+ ConsoleCliClusterService
52
+ };
53
+ //# sourceMappingURL=console.cli.cluster.service.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/services/console/console.cli.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 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'\nimport type { ConsoleCliClusterParams } from './console.cli.service.js'\nimport type { UpdateClusterRequest } from './console.cluster.service.js'\n\n/** A reference of `/cli/v1`: an id and a name. */\nexport interface ConsoleCliRef {\n id: string\n name: string\n}\n\n/**\n * The settings of a cluster that `/cli/v1` returns. `PATCH` takes the same\n * names (`ConsoleCliClusterUpdate`).\n */\nexport interface ConsoleCliClusterSettings {\n labels?: { camunda?: string[]; custom?: string[] }\n autoUpdate?: boolean\n rba?: boolean\n identityBackendChecksEnabled?: boolean\n enforceGroups?: boolean\n playMode?: boolean\n mcpEnabled?: boolean\n swagger?: boolean\n secretsFilterMode?: SecretsFilterMode\n tasklistV2Enabled?: boolean\n optimizeEnabled?: boolean\n businessIdUniquenessEnabled?: boolean\n appIntegrationsEnabled?: boolean\n multiTenancyEnabled?: boolean\n sessionMaxInactiveIntervalMinutes?: number\n sessionHeartbeatEnabled?: boolean\n externalIdpEnabled?: boolean\n /** The client secret is never part of it. */\n externalIdpConfig?: ExternalIdpConfig\n auditLogEnabled?: boolean\n auditLogUserCategories?: string[]\n auditLogClientCategories?: string[]\n optimizeFiltering?: OptimizeFilteringConfig\n numberOfAllocatedHwPackages?: number\n encryption?: string\n primaryEncryptionKeyId?: string\n secondaryEncryptionKeyId?: string\n}\n\n/** The cluster shape of `packages/shared-route-schemas/src/console/cli.ts`. */\nexport interface ConsoleCliCluster extends ConsoleCliClusterSettings {\n id: string\n name: string\n description?: string\n status: string\n /** The raw `ready` value of console-backend. */\n statusDetail?: string\n generation: ConsoleCliRef & { versions?: Record<string, string> }\n channel: ConsoleCliRef\n region: ConsoleCliRef\n planType: ConsoleCliRef\n createdAt: string\n urls: {\n zeebeGrpc?: string\n zeebeRest?: string\n operate?: string\n tasklist?: string\n optimize?: string\n connectors?: string\n identity?: string\n }\n}\n\n/**\n * The body of `PATCH`: the body of the internal `PATCH`, with the same names\n * and the same checks.\n */\nexport type ConsoleCliClusterUpdate = UpdateClusterRequest['body']\n\nexport interface UpdateConsoleCliClusterParams extends ConsoleCliClusterParams {\n body: ConsoleCliClusterUpdate\n}\n\nexport interface ConsoleCliOrgParams extends RequestBaseParams {\n params: { orgId: string }\n}\n\nconst ORG_TEMPLATE = 'cli/v1/orgs/:orgId/clusters'\nconst CLUSTER_TEMPLATE = `${ORG_TEMPLATE}/:clusterId`\n\n/**\n * The cluster routes of `/cli/v1`. c4 calls them in place of the internal\n * cluster routes while `console.c4CliApi` is on (#11623).\n */\nexport class ConsoleCliClusterService {\n private static async call<T>(\n params: RequestBaseParams & {\n params: { orgId: string; clusterId?: string }\n body?: unknown\n },\n name: string,\n type: 'get' | 'patch',\n ): Promise<T> {\n const { orgId, clusterId } = params.params\n const template = clusterId === undefined ? ORG_TEMPLATE : CLUSTER_TEMPLATE\n const url =\n clusterId === undefined\n ? `cli/v1/orgs/${encodeURIComponent(orgId)}/clusters`\n : `cli/v1/orgs/${encodeURIComponent(orgId)}/clusters/${encodeURIComponent(clusterId)}`\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `ConsoleCliClusterService.${name}`,\n url: template,\n normalizedUrl: template,\n type,\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<T>({\n ...params,\n base: { id: 'console' },\n url,\n logUrl: template,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n body: params.body,\n responseType: 'json',\n })\n\n if (!response.ok || response.body === undefined) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static getCluster(\n params: ConsoleCliClusterParams,\n ): Promise<ConsoleCliCluster> {\n return ConsoleCliClusterService.call(params, 'getCluster', 'get')\n }\n\n public static getClusters(\n params: ConsoleCliOrgParams,\n ): Promise<ConsoleCliCluster[]> {\n return ConsoleCliClusterService.call(params, 'getClusters', 'get')\n }\n\n /** Returns the cluster after the change. */\n public static updateCluster(\n params: UpdateConsoleCliClusterParams,\n ): Promise<ConsoleCliCluster> {\n return ConsoleCliClusterService.call(params, 'updateCluster', 'patch')\n }\n}\n"],
5
+ "mappings": "AAeA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAkF1B,MAAM,eAAe;AACrB,MAAM,mBAAmB,GAAG,YAAY;AAMjC,MAAM,yBAAyB;AAAA,EACpC,aAAqB,KACnB,QAIA,MACA,MACY;AACZ,UAAM,EAAE,OAAO,UAAU,IAAI,OAAO;AACpC,UAAM,WAAW,cAAc,SAAY,eAAe;AAC1D,UAAM,MACJ,cAAc,SACV,eAAe,mBAAmB,KAAK,CAAC,cACxC,eAAe,mBAAmB,KAAK,CAAC,aAAa,mBAAmB,SAAS,CAAC;AACxF,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM,4BAA4B,IAAI;AAAA,QACtC,KAAK;AAAA,QACL,eAAe;AAAA,QACf;AAAA,MACF;AAAA,MACA,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ,EAAE,MAAM,WAAW,MAAM,WAAW;AAAA,IAC9C;AAEA,UAAM,WAAW,MAAM,QAAW;AAAA,MAChC,GAAG;AAAA,MACH,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB;AAAA,MACA,QAAQ;AAAA,MACR,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,MAChB,MAAM,OAAO;AAAA,MACb,cAAc;AAAA,IAChB,CAAC;AAED,QAAI,CAAC,SAAS,MAAM,SAAS,SAAS,QAAW;AAC/C,YAAM,IAAI;AAAA,QACR,GAAG,eAAe,OAAO,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AACA,WAAO,SAAS;AAAA,EAClB;AAAA,EAEA,OAAc,WACZ,QAC4B;AAC5B,WAAO,yBAAyB,KAAK,QAAQ,cAAc,KAAK;AAAA,EAClE;AAAA,EAEA,OAAc,YACZ,QAC8B;AAC9B,WAAO,yBAAyB,KAAK,QAAQ,eAAe,KAAK;AAAA,EACnE;AAAA;AAAA,EAGA,OAAc,cACZ,QAC4B;AAC5B,WAAO,yBAAyB,KAAK,QAAQ,iBAAiB,OAAO;AAAA,EACvE;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,119 @@
1
+ import type { RequestBaseParams } from '../../types/general.types.js';
2
+ import type { ConsoleCliClusterParams } from './console.cli.service.js';
3
+ /** The shapes of `packages/shared-route-schemas/src/console/cli-extras.ts`. */
4
+ export interface ConsoleCliSecureConnectivity {
5
+ /**
6
+ * False when the cluster has no secure connectivity. Then the lists are
7
+ * empty.
8
+ */
9
+ active: boolean;
10
+ allowedRegions: string[];
11
+ allowedPrincipals: string[];
12
+ endpoint?: {
13
+ region?: string;
14
+ serviceName?: string;
15
+ type?: string;
16
+ privateDnsName?: string;
17
+ };
18
+ endpointConnectionCount?: number;
19
+ endpointConnections: {
20
+ endpointId: string;
21
+ state: string;
22
+ owner?: string;
23
+ createdAt?: string;
24
+ }[];
25
+ conditions: {
26
+ type: string;
27
+ status: string;
28
+ reason?: string;
29
+ message?: string;
30
+ lastTransitionTime?: string;
31
+ }[];
32
+ }
33
+ export interface ConsoleCliSetSecureConnectivity {
34
+ allowedRegions: string[];
35
+ allowedPrincipals: string[];
36
+ }
37
+ /** A monitoring client. A list never holds a password. */
38
+ export interface ConsoleCliMonitoringClient {
39
+ id: string;
40
+ username: string;
41
+ createdAt?: string;
42
+ lastUsedAt?: string;
43
+ createdBy?: string;
44
+ }
45
+ /** The answer of a create or a rotate. The password is not shown again. */
46
+ export interface ConsoleCliCreatedMonitoringClient extends ConsoleCliMonitoringClient {
47
+ password: string;
48
+ }
49
+ export interface ConsoleCliMonitoring {
50
+ /** False when monitoring is not activated on the cluster. */
51
+ active: boolean;
52
+ metricsEndpoint?: {
53
+ path: string;
54
+ scheme: string;
55
+ target: string;
56
+ };
57
+ conditions: Record<string, unknown>[];
58
+ clients: ConsoleCliMonitoringClient[];
59
+ }
60
+ export interface ConsoleCliValueMetric {
61
+ clusterId?: string;
62
+ startDate: string;
63
+ monthsSinceStart?: number;
64
+ year?: number;
65
+ month?: number;
66
+ day?: number;
67
+ processInstances: number;
68
+ decisionInstances: number;
69
+ taskUsers: number;
70
+ generalUsers?: number;
71
+ deployedModels?: number;
72
+ }
73
+ export interface ConsoleCliOrgParams extends RequestBaseParams {
74
+ params: {
75
+ orgId: string;
76
+ };
77
+ }
78
+ export interface SetConsoleCliSecureConnectivityParams extends ConsoleCliClusterParams {
79
+ body: ConsoleCliSetSecureConnectivity;
80
+ }
81
+ export interface CreateConsoleCliMonitoringClientParams extends ConsoleCliClusterParams {
82
+ body: {
83
+ username: string;
84
+ };
85
+ }
86
+ export interface ConsoleCliMonitoringClientParams extends RequestBaseParams {
87
+ params: {
88
+ orgId: string;
89
+ clusterId: string;
90
+ clientId: string;
91
+ };
92
+ }
93
+ export interface GetConsoleCliDailyValueMetricsParams extends ConsoleCliOrgParams {
94
+ /** The number of days back from now, 1 to 3660. */
95
+ days: number;
96
+ }
97
+ /**
98
+ * The `/cli/v1` routes of console-backend for secure connectivity, external
99
+ * monitoring and value metrics. c4 calls them in place of the internal
100
+ * routes while the flag `console.c4CliApi` is on (#11623). They answer 404
101
+ * while `shared.cliApi` is off.
102
+ */
103
+ export declare class ConsoleCliExtrasService {
104
+ private static call;
105
+ /** For a route that answers with no body (201 or 204). */
106
+ private static send;
107
+ static getSecureConnectivity(params: ConsoleCliClusterParams): Promise<ConsoleCliSecureConnectivity>;
108
+ static activateSecureConnectivity(params: SetConsoleCliSecureConnectivityParams): Promise<void>;
109
+ static setSecureConnectivity(params: SetConsoleCliSecureConnectivityParams): Promise<void>;
110
+ static deactivateSecureConnectivity(params: ConsoleCliClusterParams): Promise<void>;
111
+ static getMonitoring(params: ConsoleCliClusterParams): Promise<ConsoleCliMonitoring>;
112
+ static activateMonitoring(params: ConsoleCliClusterParams): Promise<void>;
113
+ static deactivateMonitoring(params: ConsoleCliClusterParams): Promise<void>;
114
+ static createMonitoringClient(params: CreateConsoleCliMonitoringClientParams): Promise<ConsoleCliCreatedMonitoringClient>;
115
+ static rotateMonitoringClientPassword(params: ConsoleCliMonitoringClientParams): Promise<ConsoleCliCreatedMonitoringClient>;
116
+ static deleteMonitoringClient(params: ConsoleCliMonitoringClientParams): Promise<void>;
117
+ static getValueMetrics(params: ConsoleCliOrgParams): Promise<ConsoleCliValueMetric[]>;
118
+ static getDailyValueMetrics({ days, ...params }: GetConsoleCliDailyValueMetricsParams): Promise<ConsoleCliValueMetric[]>;
119
+ }
@@ -0,0 +1,169 @@
1
+ import { request } from "../../utils/api.js";
2
+ import { HttpError } from "../../utils/errors.js";
3
+ const fill = (template, params) => template.replace(
4
+ /:(\w+)/g,
5
+ (_, key) => encodeURIComponent(params[key] ?? "")
6
+ );
7
+ const context = (params, name, path, type) => ({
8
+ method: {
9
+ name: `ConsoleCliExtrasService.${name}`,
10
+ url: path,
11
+ normalizedUrl: path,
12
+ type
13
+ },
14
+ source: params.config.metrics?.source || "unset",
15
+ target: { name: "console", type: "internal" }
16
+ });
17
+ const CLUSTER = "orgs/:orgId/clusters/:clusterId";
18
+ const SECURE_CONNECTIVITY = `${CLUSTER}/secure-connectivity`;
19
+ const MONITORING = `${CLUSTER}/monitoring`;
20
+ class ConsoleCliExtrasService {
21
+ static async call(params, name, template, type, query = "") {
22
+ const path = `cli/v1/${template}`;
23
+ const serviceContext = context(params, name, path, type);
24
+ const response = await request({
25
+ ...params,
26
+ base: { id: "console" },
27
+ url: `${fill(path, params.params)}${query}`,
28
+ logUrl: path,
29
+ method: type,
30
+ metricsDetails: serviceContext,
31
+ body: params.body,
32
+ responseType: "json"
33
+ });
34
+ if (!response.ok || response.body === void 0) {
35
+ throw new HttpError(
36
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
37
+ response.status,
38
+ response.statusText
39
+ );
40
+ }
41
+ return response.body;
42
+ }
43
+ /** For a route that answers with no body (201 or 204). */
44
+ static async send(params, name, template, type) {
45
+ const path = `cli/v1/${template}`;
46
+ const serviceContext = context(params, name, path, type);
47
+ const response = await request({
48
+ ...params,
49
+ base: { id: "console" },
50
+ url: fill(path, params.params),
51
+ logUrl: path,
52
+ method: type,
53
+ metricsDetails: serviceContext,
54
+ body: params.body,
55
+ responseType: "none"
56
+ });
57
+ if (!response.ok) {
58
+ throw new HttpError(
59
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
60
+ response.status,
61
+ response.statusText
62
+ );
63
+ }
64
+ }
65
+ static getSecureConnectivity(params) {
66
+ return ConsoleCliExtrasService.call(
67
+ params,
68
+ "getSecureConnectivity",
69
+ SECURE_CONNECTIVITY,
70
+ "get"
71
+ );
72
+ }
73
+ static activateSecureConnectivity(params) {
74
+ return ConsoleCliExtrasService.send(
75
+ params,
76
+ "activateSecureConnectivity",
77
+ SECURE_CONNECTIVITY,
78
+ "post"
79
+ );
80
+ }
81
+ static setSecureConnectivity(params) {
82
+ return ConsoleCliExtrasService.send(
83
+ params,
84
+ "setSecureConnectivity",
85
+ SECURE_CONNECTIVITY,
86
+ "put"
87
+ );
88
+ }
89
+ static deactivateSecureConnectivity(params) {
90
+ return ConsoleCliExtrasService.send(
91
+ params,
92
+ "deactivateSecureConnectivity",
93
+ SECURE_CONNECTIVITY,
94
+ "delete"
95
+ );
96
+ }
97
+ static getMonitoring(params) {
98
+ return ConsoleCliExtrasService.call(
99
+ params,
100
+ "getMonitoring",
101
+ MONITORING,
102
+ "get"
103
+ );
104
+ }
105
+ static activateMonitoring(params) {
106
+ return ConsoleCliExtrasService.send(
107
+ params,
108
+ "activateMonitoring",
109
+ MONITORING,
110
+ "post"
111
+ );
112
+ }
113
+ static deactivateMonitoring(params) {
114
+ return ConsoleCliExtrasService.send(
115
+ params,
116
+ "deactivateMonitoring",
117
+ MONITORING,
118
+ "delete"
119
+ );
120
+ }
121
+ static createMonitoringClient(params) {
122
+ return ConsoleCliExtrasService.call(
123
+ params,
124
+ "createMonitoringClient",
125
+ `${MONITORING}/clients`,
126
+ "post"
127
+ );
128
+ }
129
+ static rotateMonitoringClientPassword(params) {
130
+ return ConsoleCliExtrasService.call(
131
+ params,
132
+ "rotateMonitoringClientPassword",
133
+ `${MONITORING}/clients/:clientId/rotate`,
134
+ "post"
135
+ );
136
+ }
137
+ static deleteMonitoringClient(params) {
138
+ return ConsoleCliExtrasService.send(
139
+ params,
140
+ "deleteMonitoringClient",
141
+ `${MONITORING}/clients/:clientId`,
142
+ "delete"
143
+ );
144
+ }
145
+ static getValueMetrics(params) {
146
+ return ConsoleCliExtrasService.call(
147
+ params,
148
+ "getValueMetrics",
149
+ "orgs/:orgId/value-metrics",
150
+ "get"
151
+ );
152
+ }
153
+ static getDailyValueMetrics({
154
+ days,
155
+ ...params
156
+ }) {
157
+ return ConsoleCliExtrasService.call(
158
+ params,
159
+ "getDailyValueMetrics",
160
+ "orgs/:orgId/value-metrics/daily",
161
+ "get",
162
+ `?days=${days}`
163
+ );
164
+ }
165
+ }
166
+ export {
167
+ ConsoleCliExtrasService
168
+ };
169
+ //# sourceMappingURL=console.cli.extras.service.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/services/console/console.cli.extras.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 RequestBaseMethodType,\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\nimport type { ConsoleCliClusterParams } from './console.cli.service.js'\n\n/** The shapes of `packages/shared-route-schemas/src/console/cli-extras.ts`. */\nexport interface ConsoleCliSecureConnectivity {\n /**\n * False when the cluster has no secure connectivity. Then the lists are\n * empty.\n */\n active: boolean\n allowedRegions: string[]\n allowedPrincipals: string[]\n endpoint?: {\n region?: string\n serviceName?: string\n type?: string\n privateDnsName?: string\n }\n endpointConnectionCount?: number\n endpointConnections: {\n endpointId: string\n state: string\n owner?: string\n createdAt?: string\n }[]\n conditions: {\n type: string\n status: string\n reason?: string\n message?: string\n lastTransitionTime?: string\n }[]\n}\n\nexport interface ConsoleCliSetSecureConnectivity {\n allowedRegions: string[]\n allowedPrincipals: string[]\n}\n\n/** A monitoring client. A list never holds a password. */\nexport interface ConsoleCliMonitoringClient {\n id: string\n username: string\n createdAt?: string\n lastUsedAt?: string\n createdBy?: string\n}\n\n/** The answer of a create or a rotate. The password is not shown again. */\nexport interface ConsoleCliCreatedMonitoringClient\n extends ConsoleCliMonitoringClient {\n password: string\n}\n\nexport interface ConsoleCliMonitoring {\n /** False when monitoring is not activated on the cluster. */\n active: boolean\n metricsEndpoint?: { path: string; scheme: string; target: string }\n conditions: Record<string, unknown>[]\n clients: ConsoleCliMonitoringClient[]\n}\n\nexport interface ConsoleCliValueMetric {\n clusterId?: string\n startDate: string\n monthsSinceStart?: number\n year?: number\n month?: number\n day?: number\n processInstances: number\n decisionInstances: number\n taskUsers: number\n generalUsers?: number\n deployedModels?: number\n}\n\nexport interface ConsoleCliOrgParams extends RequestBaseParams {\n params: { orgId: string }\n}\n\nexport interface SetConsoleCliSecureConnectivityParams\n extends ConsoleCliClusterParams {\n body: ConsoleCliSetSecureConnectivity\n}\n\nexport interface CreateConsoleCliMonitoringClientParams\n extends ConsoleCliClusterParams {\n body: { username: string }\n}\n\nexport interface ConsoleCliMonitoringClientParams extends RequestBaseParams {\n params: { orgId: string; clusterId: string; clientId: string }\n}\n\nexport interface GetConsoleCliDailyValueMetricsParams\n extends ConsoleCliOrgParams {\n /** The number of days back from now, 1 to 3660. */\n days: number\n}\n\ntype Params = RequestBaseParams & {\n params: Record<string, string>\n body?: unknown\n}\n\n/**\n * Fills the `:name` parts of a template with the params. The template goes\n * to the logs and the metrics, so that ids never appear there.\n */\nconst fill = (template: string, params: Record<string, string>) =>\n template.replace(/:(\\w+)/g, (_, key: string) =>\n encodeURIComponent(params[key] ?? ''),\n )\n\nconst context = (\n params: Params,\n name: string,\n path: string,\n type: RequestBaseMethodType,\n): RequestBaseServiceContext => ({\n method: {\n name: `ConsoleCliExtrasService.${name}`,\n url: path,\n normalizedUrl: path,\n type,\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n})\n\nconst CLUSTER = 'orgs/:orgId/clusters/:clusterId'\nconst SECURE_CONNECTIVITY = `${CLUSTER}/secure-connectivity`\nconst MONITORING = `${CLUSTER}/monitoring`\n\n/**\n * The `/cli/v1` routes of console-backend for secure connectivity, external\n * monitoring and value metrics. c4 calls them in place of the internal\n * routes while the flag `console.c4CliApi` is on (#11623). They answer 404\n * while `shared.cliApi` is off.\n */\nexport class ConsoleCliExtrasService {\n private static async call<T>(\n params: Params,\n name: string,\n template: string,\n type: RequestBaseMethodType,\n query = '',\n ): Promise<T> {\n const path = `cli/v1/${template}`\n const serviceContext = context(params, name, path, type)\n\n const response = await request<T>({\n ...params,\n base: { id: 'console' },\n url: `${fill(path, params.params)}${query}`,\n logUrl: path,\n method: type,\n metricsDetails: serviceContext,\n body: params.body,\n responseType: 'json',\n })\n\n if (!response.ok || response.body === undefined) {\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 /** For a route that answers with no body (201 or 204). */\n private static async send(\n params: Params,\n name: string,\n template: string,\n type: RequestBaseMethodType,\n ): Promise<void> {\n const path = `cli/v1/${template}`\n const serviceContext = context(params, name, path, type)\n\n const response = await request({\n ...params,\n base: { id: 'console' },\n url: fill(path, params.params),\n logUrl: path,\n 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 getSecureConnectivity(\n params: ConsoleCliClusterParams,\n ): Promise<ConsoleCliSecureConnectivity> {\n return ConsoleCliExtrasService.call(\n params,\n 'getSecureConnectivity',\n SECURE_CONNECTIVITY,\n 'get',\n )\n }\n\n public static activateSecureConnectivity(\n params: SetConsoleCliSecureConnectivityParams,\n ): Promise<void> {\n return ConsoleCliExtrasService.send(\n params,\n 'activateSecureConnectivity',\n SECURE_CONNECTIVITY,\n 'post',\n )\n }\n\n public static setSecureConnectivity(\n params: SetConsoleCliSecureConnectivityParams,\n ): Promise<void> {\n return ConsoleCliExtrasService.send(\n params,\n 'setSecureConnectivity',\n SECURE_CONNECTIVITY,\n 'put',\n )\n }\n\n public static deactivateSecureConnectivity(\n params: ConsoleCliClusterParams,\n ): Promise<void> {\n return ConsoleCliExtrasService.send(\n params,\n 'deactivateSecureConnectivity',\n SECURE_CONNECTIVITY,\n 'delete',\n )\n }\n\n public static getMonitoring(\n params: ConsoleCliClusterParams,\n ): Promise<ConsoleCliMonitoring> {\n return ConsoleCliExtrasService.call(\n params,\n 'getMonitoring',\n MONITORING,\n 'get',\n )\n }\n\n public static activateMonitoring(\n params: ConsoleCliClusterParams,\n ): Promise<void> {\n return ConsoleCliExtrasService.send(\n params,\n 'activateMonitoring',\n MONITORING,\n 'post',\n )\n }\n\n public static deactivateMonitoring(\n params: ConsoleCliClusterParams,\n ): Promise<void> {\n return ConsoleCliExtrasService.send(\n params,\n 'deactivateMonitoring',\n MONITORING,\n 'delete',\n )\n }\n\n public static createMonitoringClient(\n params: CreateConsoleCliMonitoringClientParams,\n ): Promise<ConsoleCliCreatedMonitoringClient> {\n return ConsoleCliExtrasService.call(\n params,\n 'createMonitoringClient',\n `${MONITORING}/clients`,\n 'post',\n )\n }\n\n public static rotateMonitoringClientPassword(\n params: ConsoleCliMonitoringClientParams,\n ): Promise<ConsoleCliCreatedMonitoringClient> {\n return ConsoleCliExtrasService.call(\n params,\n 'rotateMonitoringClientPassword',\n `${MONITORING}/clients/:clientId/rotate`,\n 'post',\n )\n }\n\n public static deleteMonitoringClient(\n params: ConsoleCliMonitoringClientParams,\n ): Promise<void> {\n return ConsoleCliExtrasService.send(\n params,\n 'deleteMonitoringClient',\n `${MONITORING}/clients/:clientId`,\n 'delete',\n )\n }\n\n public static getValueMetrics(\n params: ConsoleCliOrgParams,\n ): Promise<ConsoleCliValueMetric[]> {\n return ConsoleCliExtrasService.call(\n params,\n 'getValueMetrics',\n 'orgs/:orgId/value-metrics',\n 'get',\n )\n }\n\n public static getDailyValueMetrics({\n days,\n ...params\n }: GetConsoleCliDailyValueMetricsParams): Promise<ConsoleCliValueMetric[]> {\n return ConsoleCliExtrasService.call(\n params,\n 'getDailyValueMetrics',\n 'orgs/:orgId/value-metrics/daily',\n 'get',\n `?days=${days}`,\n )\n }\n}\n"],
5
+ "mappings": "AAWA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AA6G1B,MAAM,OAAO,CAAC,UAAkB,WAC9B,SAAS;AAAA,EAAQ;AAAA,EAAW,CAAC,GAAG,QAC9B,mBAAmB,OAAO,GAAG,KAAK,EAAE;AACtC;AAEF,MAAM,UAAU,CACd,QACA,MACA,MACA,UAC+B;AAAA,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