@camunda/ccma-api 13.5.0 → 13.7.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.
@@ -0,0 +1,48 @@
1
+ import type { ResearchLoginAssignedDto, ResearchLoginDto } from '@camunda/ccma-shared-types';
2
+ import type { RequestBaseParams } from '../../types/general.types.js';
3
+ /**
4
+ * The admin routes of the login broker `research-login-rs` (#11873).
5
+ *
6
+ * The broker has no row in the base URL table: control-backend reads its URL
7
+ * from `RESEARCH_LOGIN_URL`, so each call gets `baseUrl`. The call carries the
8
+ * token of the Camundi, and the broker checks the permission itself.
9
+ *
10
+ * `assign` answers a one-time PIN and link. It reads the answer as text and
11
+ * parses it here: the request layer logs the text of an answer that it cannot
12
+ * parse as JSON, and a PIN must never reach a log.
13
+ */
14
+ interface BrokerParams extends RequestBaseParams {
15
+ params: {
16
+ /** The URL of the broker, with no path. */
17
+ baseUrl: string;
18
+ /** The bearer token of the caller. It goes to the broker as it is. */
19
+ token: string;
20
+ };
21
+ }
22
+ export interface CreateResearchBrokerLoginsRequest extends BrokerParams {
23
+ params: BrokerParams['params'] & {
24
+ count: number;
25
+ };
26
+ }
27
+ export interface AssignResearchBrokerLoginRequest extends BrokerParams {
28
+ params: BrokerParams['params'] & {
29
+ login: string;
30
+ session: string;
31
+ };
32
+ }
33
+ export interface InvalidateResearchBrokerLoginRequest extends BrokerParams {
34
+ params: BrokerParams['params'] & {
35
+ login: string;
36
+ };
37
+ }
38
+ export declare class ResearchLoginBrokerService {
39
+ /** Every login, oldest first. It never holds a PIN. */
40
+ static list(input: BrokerParams): Promise<ResearchLoginDto[]>;
41
+ /** Makes `count` free logins and answers their emails. */
42
+ static create(input: CreateResearchBrokerLoginsRequest): Promise<string[]>;
43
+ /** Gives a free login to a named session. The answer holds the PIN once. */
44
+ static assign(input: AssignResearchBrokerLoginRequest): Promise<ResearchLoginAssignedDto>;
45
+ /** Ends the test of a login for good. */
46
+ static invalidate(input: InvalidateResearchBrokerLoginRequest): Promise<void>;
47
+ }
48
+ export {};
@@ -0,0 +1,136 @@
1
+ import { request } from "../../utils/api.js";
2
+ import { HttpError } from "../../utils/errors.js";
3
+ function joinUrl(baseUrl, path) {
4
+ let end = baseUrl.length;
5
+ while (end > 0 && baseUrl[end - 1] === "/") end -= 1;
6
+ return `${baseUrl.slice(0, end)}/${path}`;
7
+ }
8
+ async function send(input, name, path, normalizedPath, method, options) {
9
+ const { baseUrl, token } = input.params;
10
+ const response = await request({
11
+ // The token of the caller must reach the broker: a config with `auth`
12
+ // would replace it with the token of this service.
13
+ config: { ...input.config, auth: void 0 },
14
+ // A login is an email: only the template reaches a log.
15
+ url: joinUrl(baseUrl, path),
16
+ logUrl: normalizedPath,
17
+ method,
18
+ headers: { Authorization: `Bearer ${token}` },
19
+ body: options.body,
20
+ // A body can hold a session name: log its keys, not its values.
21
+ redactBody: true,
22
+ // A refusal can quote a login or a PIN: the log gets the status only.
23
+ redactResponse: true,
24
+ // No retry of a 429: a retry would outlast the timeout of the caller.
25
+ retry: { attempts: 1, remaining: 0 },
26
+ responseType: options.responseType,
27
+ metricsDetails: {
28
+ method: {
29
+ name,
30
+ url: normalizedPath,
31
+ normalizedUrl: normalizedPath,
32
+ type: method
33
+ },
34
+ source: input.config.metrics?.source || "unset",
35
+ target: { name: "research-login", type: "internal" }
36
+ }
37
+ });
38
+ if (!response.ok) {
39
+ throw new HttpError(
40
+ `${name}: ${response.status} ${response.statusText}`,
41
+ response.status,
42
+ response.statusText
43
+ );
44
+ }
45
+ return response.body;
46
+ }
47
+ const isRecord = (value) => typeof value === "object" && Boolean(value) && !Array.isArray(value);
48
+ const isText = (value) => typeof value === "string";
49
+ const isNumber = (value) => typeof value === "number" && Number.isFinite(value);
50
+ const WIRE_NULL = JSON.parse("null");
51
+ const isLoginEntry = (entry) => {
52
+ if (!isRecord(entry)) {
53
+ return false;
54
+ }
55
+ const { session } = entry;
56
+ const sessionOk = (
57
+ // No session is `undefined` or the JSON null that the broker writes.
58
+ // `false`, `0` and `""` are not "no session": they fail the check.
59
+ session === void 0 || session === WIRE_NULL || isRecord(session) && isText(session.name) && isText(session.assignedBy) && isNumber(session.assignedAt) && isNumber(session.expiresAt)
60
+ );
61
+ return isText(entry.login) && ["free", "assigned", "invalidated"].includes(entry.state) && isNumber(entry.createdAt) && sessionOk;
62
+ };
63
+ const isAssigned = (value) => isRecord(value) && isText(value.login) && isText(value.pin) && isText(value.link) && isNumber(value.expiresAt);
64
+ const MALFORMED = "ResearchLoginBrokerService: the answer has an unexpected shape";
65
+ class ResearchLoginBrokerService {
66
+ /** Every login, oldest first. It never holds a PIN. */
67
+ static async list(input) {
68
+ const logins = await send(
69
+ input,
70
+ "ResearchLoginBrokerService.list",
71
+ "api/research-logins",
72
+ "api/research-logins",
73
+ "get",
74
+ { responseType: "json" }
75
+ );
76
+ if (!Array.isArray(logins) || !logins.every(isLoginEntry)) {
77
+ throw new HttpError(MALFORMED, 502, "Bad Gateway");
78
+ }
79
+ return logins.map((entry) => ({
80
+ ...entry,
81
+ session: entry.session ?? void 0
82
+ }));
83
+ }
84
+ /** Makes `count` free logins and answers their emails. */
85
+ static async create(input) {
86
+ const emails = await send(
87
+ input,
88
+ "ResearchLoginBrokerService.create",
89
+ "api/research-logins",
90
+ "api/research-logins",
91
+ "post",
92
+ { body: { count: input.params.count }, responseType: "json" }
93
+ );
94
+ if (!Array.isArray(emails) || !emails.every(isText)) {
95
+ throw new HttpError(MALFORMED, 502, "Bad Gateway");
96
+ }
97
+ return emails;
98
+ }
99
+ /** Gives a free login to a named session. The answer holds the PIN once. */
100
+ static async assign(input) {
101
+ const { login, session } = input.params;
102
+ const text = await send(
103
+ input,
104
+ "ResearchLoginBrokerService.assign",
105
+ `api/research-logins/${encodeURIComponent(login)}/assign`,
106
+ "api/research-logins/:login/assign",
107
+ "post",
108
+ { body: { session }, responseType: "text" }
109
+ );
110
+ let parsed;
111
+ try {
112
+ parsed = JSON.parse(text);
113
+ } catch {
114
+ throw new HttpError(MALFORMED, 502, "Bad Gateway");
115
+ }
116
+ if (!isAssigned(parsed)) {
117
+ throw new HttpError(MALFORMED, 502, "Bad Gateway");
118
+ }
119
+ return parsed;
120
+ }
121
+ /** Ends the test of a login for good. */
122
+ static async invalidate(input) {
123
+ await send(
124
+ input,
125
+ "ResearchLoginBrokerService.invalidate",
126
+ `api/research-logins/${encodeURIComponent(input.params.login)}/invalidate`,
127
+ "api/research-logins/:login/invalidate",
128
+ "post",
129
+ { responseType: "none" }
130
+ );
131
+ }
132
+ }
133
+ export {
134
+ ResearchLoginBrokerService
135
+ };
136
+ //# sourceMappingURL=research-login.broker.service.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/services/research-login/research-login.broker.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 ResearchLoginAssignedDto,\n ResearchLoginDto,\n} from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseMethodType,\n RequestBaseParams,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\n\n/**\n * The admin routes of the login broker `research-login-rs` (#11873).\n *\n * The broker has no row in the base URL table: control-backend reads its URL\n * from `RESEARCH_LOGIN_URL`, so each call gets `baseUrl`. The call carries the\n * token of the Camundi, and the broker checks the permission itself.\n *\n * `assign` answers a one-time PIN and link. It reads the answer as text and\n * parses it here: the request layer logs the text of an answer that it cannot\n * parse as JSON, and a PIN must never reach a log.\n */\n\ninterface BrokerParams extends RequestBaseParams {\n params: {\n /** The URL of the broker, with no path. */\n baseUrl: string\n /** The bearer token of the caller. It goes to the broker as it is. */\n token: string\n }\n}\n\nexport interface CreateResearchBrokerLoginsRequest extends BrokerParams {\n params: BrokerParams['params'] & { count: number }\n}\n\nexport interface AssignResearchBrokerLoginRequest extends BrokerParams {\n params: BrokerParams['params'] & { login: string; session: string }\n}\n\nexport interface InvalidateResearchBrokerLoginRequest extends BrokerParams {\n params: BrokerParams['params'] & { login: string }\n}\n\n/** The base URL and the path with one slash between them. */\nfunction joinUrl(baseUrl: string, path: string): string {\n // No regex: CodeQL reports `/\\/+$/` as a possible slow match.\n let end = baseUrl.length\n while (end > 0 && baseUrl[end - 1] === '/') end -= 1\n return `${baseUrl.slice(0, end)}/${path}`\n}\n\nasync function send(\n input: BrokerParams,\n name: string,\n path: string,\n normalizedPath: string,\n method: RequestBaseMethodType,\n options: { body?: object; responseType: 'json' | 'text' | 'none' },\n): Promise<unknown> {\n const { baseUrl, token } = input.params\n const response = await request<unknown>({\n // The token of the caller must reach the broker: a config with `auth`\n // would replace it with the token of this service.\n config: { ...input.config, auth: undefined },\n // A login is an email: only the template reaches a log.\n url: joinUrl(baseUrl, path),\n logUrl: normalizedPath,\n method,\n headers: { Authorization: `Bearer ${token}` },\n body: options.body,\n // A body can hold a session name: log its keys, not its values.\n redactBody: true,\n // A refusal can quote a login or a PIN: the log gets the status only.\n redactResponse: true,\n // No retry of a 429: a retry would outlast the timeout of the caller.\n retry: { attempts: 1, remaining: 0 },\n responseType: options.responseType,\n metricsDetails: {\n method: {\n name,\n url: normalizedPath,\n normalizedUrl: normalizedPath,\n type: method,\n },\n source: input.config.metrics?.source || 'unset',\n target: { name: 'research-login', type: 'internal' },\n },\n })\n if (!response.ok) {\n throw new HttpError(\n `${name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n}\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && Boolean(value) && !Array.isArray(value)\nconst isText = (value: unknown): value is string => typeof value === 'string'\nconst isNumber = (value: unknown): value is number =>\n typeof value === 'number' && Number.isFinite(value)\n\n// The broker writes a JSON null for \"no session\". The repo bans a `null`\n// literal, so the one wire null is parsed once here.\nconst WIRE_NULL: unknown = JSON.parse('null')\n\nconst isLoginEntry = (entry: unknown): boolean => {\n if (!isRecord(entry)) {\n return false\n }\n const { session } = entry\n const sessionOk =\n // No session is `undefined` or the JSON null that the broker writes.\n // `false`, `0` and `\"\"` are not \"no session\": they fail the check.\n session === undefined ||\n session === WIRE_NULL ||\n (isRecord(session) &&\n isText(session.name) &&\n isText(session.assignedBy) &&\n isNumber(session.assignedAt) &&\n isNumber(session.expiresAt))\n return (\n isText(entry.login) &&\n ['free', 'assigned', 'invalidated'].includes(entry.state as string) &&\n isNumber(entry.createdAt) &&\n sessionOk\n )\n}\n\nconst isAssigned = (value: unknown): value is ResearchLoginAssignedDto =>\n isRecord(value) &&\n isText(value.login) &&\n isText(value.pin) &&\n isText(value.link) &&\n isNumber(value.expiresAt)\n\n/** The message of a 200 answer that has not the expected shape. */\nconst MALFORMED =\n 'ResearchLoginBrokerService: the answer has an unexpected shape'\n\nexport class ResearchLoginBrokerService {\n /** Every login, oldest first. It never holds a PIN. */\n public static async list(input: BrokerParams): Promise<ResearchLoginDto[]> {\n const logins = (await send(\n input,\n 'ResearchLoginBrokerService.list',\n 'api/research-logins',\n 'api/research-logins',\n 'get',\n { responseType: 'json' },\n )) as (Omit<ResearchLoginDto, 'session'> & { session?: unknown })[]\n if (!Array.isArray(logins) || !logins.every(isLoginEntry)) {\n throw new HttpError(MALFORMED, 502, 'Bad Gateway')\n }\n // The broker writes `null` for a login with no session.\n return logins.map((entry) => ({\n ...entry,\n session: entry.session ?? undefined,\n })) as ResearchLoginDto[]\n }\n\n /** Makes `count` free logins and answers their emails. */\n public static async create(\n input: CreateResearchBrokerLoginsRequest,\n ): Promise<string[]> {\n const emails = await send(\n input,\n 'ResearchLoginBrokerService.create',\n 'api/research-logins',\n 'api/research-logins',\n 'post',\n { body: { count: input.params.count }, responseType: 'json' },\n )\n if (!Array.isArray(emails) || !emails.every(isText)) {\n throw new HttpError(MALFORMED, 502, 'Bad Gateway')\n }\n return emails as string[]\n }\n\n /** Gives a free login to a named session. The answer holds the PIN once. */\n public static async assign(\n input: AssignResearchBrokerLoginRequest,\n ): Promise<ResearchLoginAssignedDto> {\n const { login, session } = input.params\n const text = await send(\n input,\n 'ResearchLoginBrokerService.assign',\n `api/research-logins/${encodeURIComponent(login)}/assign`,\n 'api/research-logins/:login/assign',\n 'post',\n { body: { session }, responseType: 'text' },\n )\n let parsed: unknown\n try {\n parsed = JSON.parse(text as string)\n } catch {\n // Node quotes a part of the text in a parse error: the text holds the\n // PIN, so the error gets a fixed message.\n throw new HttpError(MALFORMED, 502, 'Bad Gateway')\n }\n if (!isAssigned(parsed)) {\n throw new HttpError(MALFORMED, 502, 'Bad Gateway')\n }\n return parsed\n }\n\n /** Ends the test of a login for good. */\n public static async invalidate(\n input: InvalidateResearchBrokerLoginRequest,\n ): Promise<void> {\n await send(\n input,\n 'ResearchLoginBrokerService.invalidate',\n `api/research-logins/${encodeURIComponent(input.params.login)}/invalidate`,\n 'api/research-logins/:login/invalidate',\n 'post',\n { responseType: 'none' },\n )\n }\n}\n"],
5
+ "mappings": "AAcA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAoC1B,SAAS,QAAQ,SAAiB,MAAsB;AAEtD,MAAI,MAAM,QAAQ;AAClB,SAAO,MAAM,KAAK,QAAQ,MAAM,CAAC,MAAM,IAAK,QAAO;AACnD,SAAO,GAAG,QAAQ,MAAM,GAAG,GAAG,CAAC,IAAI,IAAI;AACzC;AAEA,eAAe,KACb,OACA,MACA,MACA,gBACA,QACA,SACkB;AAClB,QAAM,EAAE,SAAS,MAAM,IAAI,MAAM;AACjC,QAAM,WAAW,MAAM,QAAiB;AAAA;AAAA;AAAA,IAGtC,QAAQ,EAAE,GAAG,MAAM,QAAQ,MAAM,OAAU;AAAA;AAAA,IAE3C,KAAK,QAAQ,SAAS,IAAI;AAAA,IAC1B,QAAQ;AAAA,IACR;AAAA,IACA,SAAS,EAAE,eAAe,UAAU,KAAK,GAAG;AAAA,IAC5C,MAAM,QAAQ;AAAA;AAAA,IAEd,YAAY;AAAA;AA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AAW,KAAK,aAAa;AAAA,IACnD;AACA,QAAI,CAAC,WAAW,MAAM,GAAG;AACvB,YAAM,IAAI,UAAU,WAAW,KAAK,aAAa;AAAA,IACnD;AACA,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,aAAoB,WAClB,OACe;AACf,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA,uBAAuB,mBAAmB,MAAM,OAAO,KAAK,CAAC;AAAA,MAC7D;AAAA,MACA;AAAA,MACA,EAAE,cAAc,OAAO;AAAA,IACzB;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -41,6 +41,12 @@ export interface RequestPayload extends RequestBaseParams {
41
41
  * env vars of a generation or an email in a lookup.
42
42
  */
43
43
  redactBody?: boolean;
44
+ /**
45
+ * Opt-in: a failed answer keeps the status text of the server and the
46
+ * request does not read or log the body of the answer. Use it for a service
47
+ * whose refusal can quote a secret, such as a PIN.
48
+ */
49
+ redactResponse?: boolean;
44
50
  /**
45
51
  * The URL that the log lines show in place of `url`. Use it when the path holds a value
46
52
  * that must not go to the logs, such as an email or a token. The request uses `url`.
package/dist/utils/api.js CHANGED
@@ -388,7 +388,11 @@ async function request(payload) {
388
388
  } else {
389
389
  let statusText = fetchResponse.statusText;
390
390
  try {
391
- statusText = await fetchResponse.text();
391
+ if (payload.redactResponse) {
392
+ await fetchResponse.body?.cancel();
393
+ } else {
394
+ statusText = await fetchResponse.text();
395
+ }
392
396
  } catch (_error) {
393
397
  }
394
398
  if (statusText.length > MAX_ERROR_BODY_LENGTH) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/api.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 RequestBaseCustomMetricsDetailsType,\n RequestBaseMethodType,\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../types/general.types.js'\nimport { getEnvParam, type ServiceName } from './environments.js'\nimport { frontendCache } from './frontendCache.js'\n\nexport interface RequestPayload extends RequestBaseParams {\n base?: {\n id: ServiceName\n }\n url: string\n method: RequestBaseMethodType\n headers?: { [key: string]: string }\n type?: 'json' | 'text' | 'form' | 'none'\n responseType?: 'json' | 'text' | 'blob' | 'none'\n retry?: {\n attempts: number\n remaining: number\n }\n /**\n * Opt-in: retry transient gateway failures (502/503/504 and network/fetch\n * errors) with backoff, mirroring the 429 retry. Retried attempts emit a\n * `transient-retry` metric instead of `error`, so a healed blip (e.g. an\n * envoy connection reset during a pod restart) doesn't count toward the\n * internal error-rate alert. Only enable for idempotent-safe calls \u2014 a\n * retried POST may execute twice.\n */\n retryTransientErrors?: boolean\n transientRetry?: {\n attempts: number\n remaining: number\n }\n /**\n * Opt-in: log a failure with no HTTP status (timeout, connection reset) at\n * `warn` instead of `error`. Use it for third-party sites that we cannot\n * fix. The `error` metric and the response stay the same.\n */\n warnOnNoStatus?: boolean\n /**\n * Opt-in: a log line of this request names the top-level keys of the body\n * and masks every value, and it drops the query of the URL. Use it for a\n * body or a query that holds text with no fixed key to mask, such as the\n * env vars of a generation or an email in a lookup.\n */\n redactBody?: boolean\n /**\n * The URL that the log lines show in place of `url`. Use it when the path holds a value\n * that must not go to the logs, such as an email or a token. The request uses `url`.\n */\n logUrl?: string\n /**\n * Opt-in: with the type `json`, send the body when it is not undefined. Without it, a falsy\n * body (`null`, `0`, `false`, `\"\"`) is not sent.\n */\n bodyWhenGiven?: boolean\n body?: any\n metricsDetails: RequestBaseServiceContext\n}\n\n/**\n * Carries an error of `onFailedResponse` past the catch of `request`, which\n * would otherwise turn it into a fetch error.\n */\nclass FailedResponseHookError extends Error {\n constructor(readonly hookError: unknown) {\n super('onFailedResponse failed')\n }\n}\n\nconst TRANSIENT_RETRY_STATUS = [502, 503, 504]\n/**\n * Cap on the error body kept as `statusText`. It ends up in the thrown error's\n * message, the log line, and the `ccma.errors` payload, and some upstreams\n * (LiteLLM, GCP load balancers) answer failures with a full HTML page \u2014 one\n * such response is kilobytes of markup standing in for a reason phrase. The\n * head is what carries the actual reason.\n */\nconst MAX_ERROR_BODY_LENGTH = 500\n/** Appended in place of what was cut, and counted against the cap above. */\nconst ERROR_BODY_TRUNCATION_MARKER = '\u2026 [truncated]'\nconst MAX_TRANSIENT_RETRIES = 3\n\nexport interface Response<T> {\n body?: T\n status: number\n statusText?: string\n ok: boolean\n meta: {\n duration: number\n }\n}\n\nfunction sendMetrics(\n payload: RequestPayload,\n type: RequestBaseCustomMetricsDetailsType,\n options?: {\n duration?: number\n statusCode?: string\n error?: string\n },\n) {\n if (payload.config.metrics) {\n if (payload.config.metrics.types.includes(type)) {\n let durationBucket: string | undefined\n if (options?.duration) {\n if (options.duration < 100) {\n durationBucket = '0 | <100ms'\n } else if (options.duration < 200) {\n durationBucket = '1 | <200ms'\n } else if (options.duration < 500) {\n durationBucket = '2 | <500ms'\n } else if (options.duration < 1000) {\n durationBucket = '3 | <1s'\n } else {\n durationBucket = '4 | >=1s'\n }\n }\n\n // only add normalized errors as labels\n let error = 'other'\n if (options?.error) {\n try {\n const errorMessage = options.error\n if (errorMessage.startsWith('<!DOCTYPE html>')) {\n error = 'html-response'\n } else if (errorMessage.includes('UND_ERR_CONNECT_TIMEOUT')) {\n error = 'connect-timeout'\n }\n } catch (_error) {\n // ignore it\n }\n } else {\n error = 'unset'\n }\n\n const metrics: RequestBaseServiceContext = {\n ...payload.metricsDetails,\n eventType: type,\n durationBucket,\n statusCode: options?.statusCode,\n error,\n }\n try {\n payload.config.metrics.callback(metrics)\n } catch (metricsCallbackError) {\n log(payload, 'debug', `Failed to send metrics`, {\n error: metricsCallbackError,\n metrics,\n })\n }\n }\n }\n}\n\nexport function log(\n payload: RequestPayload,\n type: 'debug' | 'info' | 'warn' | 'error',\n message: string,\n additionalData?: any,\n) {\n if (payload.config.logger) {\n const messageParts: string[] = []\n messageParts.push(payload.metricsDetails?.method?.name)\n messageParts.push(\n `${payload.metricsDetails?.target?.name} (${payload.metricsDetails?.target?.type})`,\n )\n messageParts.push(message)\n let body: any\n if (payload.body) {\n body = JSON.parse(JSON.stringify(payload.body))\n // A string has no keys to mask, and writing to its index throws.\n if (payload.redactBody && typeof body !== 'object') {\n body = '********'\n } else {\n for (const key of Object.keys(body)) {\n if (\n payload.redactBody ||\n key.toLowerCase().includes('password') ||\n key.toLowerCase().includes('secret') ||\n key.toLowerCase().includes('token')\n ) {\n body[key] = '********'\n }\n }\n }\n }\n\n const withoutQuery = (value: string) =>\n payload.redactBody ? value.split('?')[0] : value\n\n const shownUrl = payload.logUrl ?? payload.url\n let fullUrl = 'unset'\n\n if (payload.base) {\n try {\n const base = getEnvParam(payload.base.id, payload.config)\n fullUrl = withoutQuery(base ? `${base}/${shownUrl}` : shownUrl)\n } catch (_error) {\n fullUrl = `failed to get base url for ${payload.base.id}`\n }\n }\n\n let url = withoutQuery(`${shownUrl}`.toLowerCase())\n if (url.includes('secret') || url.includes('password')) {\n url = url.split('?')[0]\n }\n\n const context =\n payload.redactBody && payload.metricsDetails?.method\n ? {\n ...payload.metricsDetails,\n method: {\n ...payload.metricsDetails.method,\n url: withoutQuery(payload.metricsDetails.method.url),\n },\n }\n : payload.metricsDetails\n\n const data = {\n base: payload.base,\n method: payload.method,\n url,\n fullUrl,\n retry: payload.retry,\n body,\n context,\n ...additionalData,\n }\n // `warn` is optional on the logger, so fall back to `error` and lose no log\n const { logger } = payload.config\n const fullMessage = messageParts.join(' > ')\n if (type === 'warn') {\n if (logger.warn) {\n logger.warn(fullMessage, { data })\n } else {\n logger.error(fullMessage, { data })\n }\n } else {\n logger[type](fullMessage, { data })\n }\n }\n}\n\nfunction rateLimitWaitingTime(attempt: number): number {\n const noise = Math.random() * 100\n const waitingTime = 2 ** attempt * 1000 + noise\n return Math.floor(waitingTime)\n}\n\nfunction transientRetryWaitingTime(attempt: number): number {\n const noise = Math.random() * 100\n // 500ms, 1s, 2s (+jitter) \u2014 bounded so a fire-and-forget call heals fast.\n return Math.floor(2 ** attempt * 250 + noise)\n}\n\nfunction canRetryTransient(payload: RequestPayload): boolean {\n if (!payload.retryTransientErrors) {\n return false\n }\n const remaining = payload.transientRetry?.remaining ?? MAX_TRANSIENT_RETRIES\n return remaining > 0\n}\n\nasync function scheduleTransientRetry(payload: RequestPayload): Promise<void> {\n const attempts = payload.transientRetry?.attempts ?? 1\n const remaining = payload.transientRetry?.remaining ?? MAX_TRANSIENT_RETRIES\n const waitingTime = transientRetryWaitingTime(attempts)\n log(\n payload,\n 'debug',\n `transient error, attempt ${attempts}, remaining ${remaining}, waiting ${waitingTime}ms`,\n )\n await new Promise((resolve) => {\n setTimeout(resolve, waitingTime)\n })\n // eslint-disable-next-line require-atomic-updates\n payload.transientRetry = {\n attempts: attempts + 1,\n remaining: remaining - 1,\n }\n}\n\nexport async function request<T>(\n payload: RequestPayload,\n): Promise<Response<T>> {\n log(payload, 'debug', 'starting request')\n sendMetrics(payload, 'request')\n // configure frontend cache if enabled (browser only)\n try {\n if (payload.config.frontendCaching?.enabled) {\n frontendCache.configure(payload.config.frontendCaching)\n }\n } catch (_cacheConfigError) {\n // ignore configuration errors silently\n }\n let token\n if (payload.config.auth) {\n token = await payload.config.auth.getToken()\n }\n // Dynamic (e.g. correlation) headers first, then explicit per-request headers\n // override them, then auth/content-type below take final precedence.\n //\n // Correlation headers (traceparent, x-cc-session-id) identify our internal\n // request/session, so they must only ever reach Camunda-owned systems. Every\n // third-party target is marked `type: 'external'`, so we gate on that here:\n // external targets never receive dynamic headers even if the caller's config\n // sets getDynamicHeaders. This makes propagation safe-by-default and removes\n // the footgun of a shared config that is used for both internal and\n // third-party calls (e.g. BASIC_API_CONFIG \u2192 token-issuer vs Slack).\n let dynamicHeaders: Record<string, string> = {}\n if (payload.metricsDetails?.target?.type !== 'external') {\n try {\n dynamicHeaders = payload.config.getDynamicHeaders?.() ?? {}\n } catch (_error) {\n // never let header evaluation break a request\n }\n }\n const headers: { [key: string]: string } = {\n ...dynamicHeaders,\n ...(payload.headers ?? {}),\n }\n if (token) {\n headers.Authorization = `Bearer ${token}`\n }\n const type = payload.type ?? 'json'\n let body\n if (type) {\n switch (type) {\n case 'json': {\n headers['Content-Type'] = 'application/json'\n const given = payload.bodyWhenGiven\n ? payload.body !== undefined\n : Boolean(payload.body)\n body = given ? JSON.stringify(payload.body) : undefined\n break\n }\n case 'text':\n headers['Content-Type'] = 'text/plain'\n body = payload.body ? JSON.stringify(payload.body) : undefined\n break\n case 'form':\n if (payload.body) {\n const formData = new URLSearchParams()\n Object.keys(payload.body).forEach((key) => {\n formData.append(key, payload.body[key])\n })\n body = formData\n }\n break\n }\n }\n let base\n if (payload.base) {\n try {\n base = getEnvParam(payload.base.id, payload.config)\n } catch (error) {\n log(payload, 'error', `Failed to get base url for ${payload.base.id}`, {\n error,\n })\n throw error\n }\n }\n const url = base ? `${base}/${payload.url}` : payload.url\n\n // Attempt cache read for GET requests (stale-while-revalidate when callback supplied)\n let serveCachedAndReturnAfterNetwork = false\n if (payload.method === 'get' && payload.config.frontendCaching?.enabled) {\n try {\n const cached = await frontendCache.get<T>('get', url)\n if (cached) {\n const fresh = frontendCache.isFresh(cached)\n if (payload.onCachedResponse) {\n payload.onCachedResponse(cached.payload, { fresh, source: 'cache' })\n if (!fresh) {\n log(payload, 'debug', 'cache stale, refreshing in background')\n serveCachedAndReturnAfterNetwork = true\n } else {\n log(payload, 'debug', 'cache fresh, returning early')\n sendMetrics(payload, 'success', { duration: 0, statusCode: '200' })\n return {\n // eslint-disable-next-line id-length\n ok: true,\n status: 200,\n statusText: 'cached',\n body: cached.payload,\n meta: { duration: 0 },\n }\n }\n } else if (fresh) {\n // no callback but fresh -> return directly\n log(payload, 'debug', 'cache hit, returning cached response')\n sendMetrics(payload, 'success', { duration: 0, statusCode: '200' })\n return {\n // eslint-disable-next-line id-length\n ok: true,\n status: 200,\n statusText: 'cached',\n body: cached.payload,\n meta: { duration: 0 },\n }\n } else {\n log(payload, 'debug', 'cache stale, proceeding with network request')\n }\n }\n } catch (_cacheGetError) {\n // ignore cache errors\n }\n }\n const start = performance.now()\n const proxyAgent = payload.config.proxyAgent ?? {}\n try {\n const fetchResponse = await fetch(url, {\n signal: payload.config.timeout\n ? AbortSignal.timeout(payload.config.timeout)\n : undefined,\n method: payload.method.toUpperCase(),\n headers,\n body,\n ...proxyAgent,\n })\n const end = performance.now()\n const duration = end - start\n\n if ([429].includes(fetchResponse.status)) {\n // rate limiting, retry\n log(payload, 'info', 'rate limited', { durationMs: Math.floor(duration) })\n sendMetrics(payload, 'rate-limit-retry', {\n duration,\n statusCode: String(fetchResponse.status),\n })\n const remaining = payload.retry?.remaining ?? 8\n const attempts = payload.retry?.attempts ?? 1\n if (remaining > 0) {\n let waitingTime = rateLimitWaitingTime(attempts)\n if (fetchResponse.headers.has('x-ratelimit-reset')) {\n const rateLimitHeader = fetchResponse.headers.get('x-ratelimit-reset')\n log(\n payload,\n 'debug',\n `rate limited, found x-ratelimit-reset header: ${rateLimitHeader}`,\n )\n const rateLimitHeaderNumber = Number(rateLimitHeader)\n if (Number.isNaN(rateLimitHeaderNumber)) {\n waitingTime = Date.parse(rateLimitHeader ?? '0') - Date.now()\n } else {\n waitingTime = rateLimitHeaderNumber - Date.now()\n }\n }\n if (waitingTime < 0 || waitingTime > 180000) {\n waitingTime = rateLimitWaitingTime(attempts)\n }\n log(\n payload,\n 'debug',\n `rate limited, attempt ${attempts}, remaining ${remaining}, waiting ${waitingTime}ms`,\n )\n await new Promise((resolve) => {\n setTimeout(resolve, waitingTime)\n })\n // eslint-disable-next-line require-atomic-updates\n payload.retry = {\n attempts: attempts + 1,\n remaining: remaining - 1,\n }\n return request(payload)\n }\n log(payload, 'debug', `rate limited, no more retries`, {\n durationMs: Math.floor(duration),\n })\n }\n\n const response: Response<T> = {\n // eslint-disable-next-line id-length\n ok: fetchResponse.ok,\n status: fetchResponse.status,\n statusText: fetchResponse.statusText,\n meta: {\n duration,\n },\n }\n\n const responseType = payload.responseType ?? type\n\n if (response.ok) {\n log(payload, 'debug', `request successful in ${Math.floor(duration)}ms`, {\n baseUrl: base,\n durationMs: Math.floor(duration),\n })\n sendMetrics(payload, 'success', {\n duration,\n statusCode: String(fetchResponse.status),\n })\n switch (responseType) {\n case 'json':\n try {\n response.body = await fetchResponse.json()\n } catch (_error) {\n log(\n payload,\n 'debug',\n `Failed to parse json body. Returning empty object.`,\n {\n baseUrl: base,\n },\n )\n response.body = {} as T\n try {\n const responseBodyText = await fetchResponse.text()\n log(payload, 'debug', `Response body text`, {\n baseUrl: base,\n responseBodyText,\n status: fetchResponse.status,\n })\n } catch (textError) {\n // this is fine\n log(payload, 'debug', `Failed to parse response body text.`, {\n baseUrl: base,\n status: fetchResponse.status,\n error: textError,\n })\n }\n }\n break\n case 'text':\n response.body = (await fetchResponse.text()) as T\n break\n case 'blob':\n // Binary payloads (file downloads). Not cached.\n response.body = (await fetchResponse.blob()) as T\n break\n default:\n response.body = (await fetchResponse.text()) as T\n }\n // store in cache after parsing\n if (\n payload.method === 'get' &&\n payload.config.frontendCaching?.enabled &&\n response.body !== undefined &&\n responseType !== 'blob'\n ) {\n try {\n await frontendCache.set('get', url, response.body as any)\n log(payload, 'debug', 'cache store successful')\n } catch (_cacheSetError) {\n // ignore cache set error\n }\n }\n } else {\n let statusText = fetchResponse.statusText\n try {\n statusText = await fetchResponse.text()\n } catch (_error) {\n // this is fine\n }\n if (statusText.length > MAX_ERROR_BODY_LENGTH) {\n // The marker is part of the budget, so the stored value never exceeds\n // MAX_ERROR_BODY_LENGTH \u2014 appending it after slicing to the full cap\n // would put the result over the bound the constant advertises.\n statusText = `${statusText.slice(\n 0,\n MAX_ERROR_BODY_LENGTH - ERROR_BODY_TRUNCATION_MARKER.length,\n )}${ERROR_BODY_TRUNCATION_MARKER}`\n }\n response.statusText = statusText\n log(\n payload,\n 'debug',\n `request failed with status ${response.status}: ${statusText}`,\n {\n baseUrl: base,\n durationMs: Math.floor(duration),\n },\n )\n\n // Transient gateway failure (e.g. envoy \"connection termination\" 503\n // during a pod restart). When opted in, retry with backoff and record it\n // as `transient-retry` rather than `error`, so a healed blip stays off\n // the internal error-rate alert.\n if (\n TRANSIENT_RETRY_STATUS.includes(response.status) &&\n canRetryTransient(payload)\n ) {\n sendMetrics(payload, 'transient-retry', {\n duration,\n statusCode: String(fetchResponse.status),\n error: statusText,\n })\n await scheduleTransientRetry(payload)\n return request(payload)\n }\n\n // Special Handling for dedicated target systems to not count special status codes as errors\n // eslint-disable-next-line no-shadow\n let type: RequestBaseCustomMetricsDetailsType = 'error'\n const noErrorStatusCodes: number[] = []\n switch (payload.metricsDetails.target.name) {\n case 'auth0':\n noErrorStatusCodes.push(...[400, 404, 409])\n break\n case 'accounts':\n case 'console':\n noErrorStatusCodes.push(...[404, 409])\n if (payload.metricsDetails.method.name === 'createTemporaryCluster') {\n // case: cannot create temporary cluster\n noErrorStatusCodes.push(...[400, 403, 412])\n }\n if (\n [\n 'ConsoleM2MService.verifyZeebeClient',\n 'ConsoleM2MService.verifyApiClient',\n ].includes(payload.metricsDetails.method.name)\n ) {\n // case: api/zeebe client credentials are invalid\n noErrorStatusCodes.push(...[401])\n }\n if (\n payload.metricsDetails.method.name ===\n 'OrgsService.createAndReturnSocialLoginUser'\n ) {\n noErrorStatusCodes.push(\n ...[\n // onboard user, user already has an org\n 400,\n // existing extSSO-connection\n 412,\n ],\n )\n }\n break\n case 'control':\n if (\n payload.metricsDetails.method.name ===\n 'ControlAgentClientsInternalService.verify'\n ) {\n // case: the credentials of an agent client are invalid\n noErrorStatusCodes.push(401)\n }\n if (\n payload.metricsDetails.method.name ===\n 'ControlAgentClientsInternalService.redeemGrant'\n ) {\n // case: the grant code is wrong, used or expired\n noErrorStatusCodes.push(401)\n }\n if (\n payload.metricsDetails.method.name ===\n 'ControlAgentGrantsInternalService.create'\n ) {\n // case: control-backend refuses the grant\n noErrorStatusCodes.push(409)\n }\n break\n }\n\n const methodName = payload.metricsDetails.method.name\n if (methodName.startsWith('CcmaOpenApiService.send.')) {\n // case: the agent sent a wrong request, or the token cannot call the operation\n if (response.status >= 400 && response.status < 500) {\n noErrorStatusCodes.push(response.status)\n }\n }\n if (methodName === 'CcmaOpenApiService.getDocument') {\n // case: the agent token expired or its binding was revoked\n noErrorStatusCodes.push(401)\n if (payload.metricsDetails.target.name === 'console') {\n // case: the console document needs admin.readAll, and the reader has no such permission\n noErrorStatusCodes.push(403)\n }\n }\n\n if (noErrorStatusCodes.includes(response.status)) {\n type = 'success'\n }\n\n sendMetrics(payload, type, {\n duration,\n statusCode: String(fetchResponse.status),\n error: statusText,\n })\n\n if (payload.config.onFailedResponse) {\n try {\n await payload.config.onFailedResponse({\n method: payload.method,\n baseId: payload.base?.id,\n url: payload.url,\n status: fetchResponse.status,\n headers: fetchResponse.headers,\n body: statusText,\n requestBody: payload.body,\n })\n } catch (hookError) {\n throw new FailedResponseHookError(hookError)\n }\n }\n }\n if (serveCachedAndReturnAfterNetwork && response.ok) {\n // when we served stale via callback earlier, we now also return the fresh response\n log(payload, 'debug', 'stale cache updated, returning new data')\n }\n return response\n } catch (error: any) {\n if (error instanceof FailedResponseHookError) {\n throw error.hookError\n }\n const duration = performance.now() - start\n let errorMessage: string | undefined\n if (error?.cause?.code) {\n errorMessage = error?.cause?.code\n } else if (error?.message) {\n errorMessage = error?.message\n }\n // Network/fetch error with no HTTP status (e.g. connection reset, timeout).\n // Retry-on-opt-in before treating it as an error (see else branch above).\n if (canRetryTransient(payload)) {\n log(payload, 'debug', `request failed with no status, retrying`, {\n baseUrl: base,\n error,\n durationMs: Math.floor(duration),\n })\n sendMetrics(payload, 'transient-retry', {\n statusCode: 'fetch-error',\n duration,\n error: errorMessage,\n })\n await scheduleTransientRetry(payload)\n return request(payload)\n }\n log(\n payload,\n payload.warnOnNoStatus ? 'warn' : 'error',\n `request failed with no status`,\n {\n baseUrl: base,\n error,\n durationMs: Math.floor(duration),\n },\n )\n sendMetrics(payload, 'error', {\n statusCode: 'fetch-error',\n duration,\n error: errorMessage,\n })\n const response: Response<T> = {\n // eslint-disable-next-line id-length\n ok: false,\n status: 500,\n statusText: 'fetch error',\n meta: {\n duration,\n },\n }\n return response\n }\n}\n"],
5
- "mappings": "AAYA,SAAS,mBAAqC;AAC9C,SAAS,qBAAqB;AA2D9B,MAAM,gCAAgC,MAAM;AAAA,EAC1C,YAAqB,WAAoB;AACvC,UAAM,yBAAyB;AADZ;AAAA,EAErB;AACF;AAEA,MAAM,yBAAyB,CAAC,KAAK,KAAK,GAAG;AAQ7C,MAAM,wBAAwB;AAE9B,MAAM,+BAA+B;AACrC,MAAM,wBAAwB;AAY9B,SAAS,YACP,SACA,MACA,SAKA;AACA,MAAI,QAAQ,OAAO,SAAS;AAC1B,QAAI,QAAQ,OAAO,QAAQ,MAAM,SAAS,IAAI,GAAG;AAC/C,UAAI;AACJ,UAAI,SAAS,UAAU;AACrB,YAAI,QAAQ,WAAW,KAAK;AAC1B,2BAAiB;AAAA,QACnB,WAAW,QAAQ,WAAW,KAAK;AACjC,2BAAiB;AAAA,QACnB,WAAW,QAAQ,WAAW,KAAK;AACjC,2BAAiB;AAAA,QACnB,WAAW,QAAQ,WAAW,KAAM;AAClC,2BAAiB;AAAA,QACnB,OAAO;AACL,2BAAiB;AAAA,QACnB;AAAA,MACF;AAGA,UAAI,QAAQ;AACZ,UAAI,SAAS,OAAO;AAClB,YAAI;AACF,gBAAM,eAAe,QAAQ;AAC7B,cAAI,aAAa,WAAW,iBAAiB,GAAG;AAC9C,oBAAQ;AAAA,UACV,WAAW,aAAa,SAAS,yBAAyB,GAAG;AAC3D,oBAAQ;AAAA,UACV;AAAA,QACF,SAAS,QAAQ;AAAA,QAEjB;AAAA,MACF,OAAO;AACL,gBAAQ;AAAA,MACV;AAEA,YAAM,UAAqC;AAAA,QACzC,GAAG,QAAQ;AAAA,QACX,WAAW;AAAA,QACX;AAAA,QACA,YAAY,SAAS;AAAA,QACrB;AAAA,MACF;AACA,UAAI;AACF,gBAAQ,OAAO,Q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,YAAM,MAAM;AAAA,IACd;AACA,UAAM,WAAW,YAAY,IAAI,IAAI;AACrC,QAAI;AACJ,QAAI,OAAO,OAAO,MAAM;AACtB,qBAAe,OAAO,OAAO;AAAA,IAC/B,WAAW,OAAO,SAAS;AACzB,qBAAe,OAAO;AAAA,IACxB;AAGA,QAAI,kBAAkB,OAAO,GAAG;AAC9B,UAAI,SAAS,SAAS,2CAA2C;AAAA,QAC/D,SAAS;AAAA,QACT;AAAA,QACA,YAAY,KAAK,MAAM,QAAQ;AAAA,MACjC,CAAC;AACD,kBAAY,SAAS,mBAAmB;AAAA,QACtC,YAAY;AAAA,QACZ;AAAA,QACA,OAAO;AAAA,MACT,CAAC;AACD,YAAM,uBAAuB,OAAO;AACpC,aAAO,QAAQ,OAAO;AAAA,IACxB;AACA;AAAA,MACE;AAAA,MACA,QAAQ,iBAAiB,SAAS;AAAA,MAClC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT;AAAA,QACA,YAAY,KAAK,MAAM,QAAQ;AAAA,MACjC;AAAA,IACF;AACA,gBAAY,SAAS,SAAS;AAAA,MAC5B,YAAY;AAAA,MACZ;AAAA,MACA,OAAO;AAAA,IACT,CAAC;AACD,UAAM,WAAwB;AAAA;AAAA,MAE5B,IAAI;AAAA,MACJ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,MAAM;AAAA,QACJ;AAAA,MACF;AAAA,IACF;AACA,WAAO;AAAA,EACT;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 RequestBaseCustomMetricsDetailsType,\n RequestBaseMethodType,\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../types/general.types.js'\nimport { getEnvParam, type ServiceName } from './environments.js'\nimport { frontendCache } from './frontendCache.js'\n\nexport interface RequestPayload extends RequestBaseParams {\n base?: {\n id: ServiceName\n }\n url: string\n method: RequestBaseMethodType\n headers?: { [key: string]: string }\n type?: 'json' | 'text' | 'form' | 'none'\n responseType?: 'json' | 'text' | 'blob' | 'none'\n retry?: {\n attempts: number\n remaining: number\n }\n /**\n * Opt-in: retry transient gateway failures (502/503/504 and network/fetch\n * errors) with backoff, mirroring the 429 retry. Retried attempts emit a\n * `transient-retry` metric instead of `error`, so a healed blip (e.g. an\n * envoy connection reset during a pod restart) doesn't count toward the\n * internal error-rate alert. Only enable for idempotent-safe calls \u2014 a\n * retried POST may execute twice.\n */\n retryTransientErrors?: boolean\n transientRetry?: {\n attempts: number\n remaining: number\n }\n /**\n * Opt-in: log a failure with no HTTP status (timeout, connection reset) at\n * `warn` instead of `error`. Use it for third-party sites that we cannot\n * fix. The `error` metric and the response stay the same.\n */\n warnOnNoStatus?: boolean\n /**\n * Opt-in: a log line of this request names the top-level keys of the body\n * and masks every value, and it drops the query of the URL. Use it for a\n * body or a query that holds text with no fixed key to mask, such as the\n * env vars of a generation or an email in a lookup.\n */\n redactBody?: boolean\n /**\n * Opt-in: a failed answer keeps the status text of the server and the\n * request does not read or log the body of the answer. Use it for a service\n * whose refusal can quote a secret, such as a PIN.\n */\n redactResponse?: boolean\n /**\n * The URL that the log lines show in place of `url`. Use it when the path holds a value\n * that must not go to the logs, such as an email or a token. The request uses `url`.\n */\n logUrl?: string\n /**\n * Opt-in: with the type `json`, send the body when it is not undefined. Without it, a falsy\n * body (`null`, `0`, `false`, `\"\"`) is not sent.\n */\n bodyWhenGiven?: boolean\n body?: any\n metricsDetails: RequestBaseServiceContext\n}\n\n/**\n * Carries an error of `onFailedResponse` past the catch of `request`, which\n * would otherwise turn it into a fetch error.\n */\nclass FailedResponseHookError extends Error {\n constructor(readonly hookError: unknown) {\n super('onFailedResponse failed')\n }\n}\n\nconst TRANSIENT_RETRY_STATUS = [502, 503, 504]\n/**\n * Cap on the error body kept as `statusText`. It ends up in the thrown error's\n * message, the log line, and the `ccma.errors` payload, and some upstreams\n * (LiteLLM, GCP load balancers) answer failures with a full HTML page \u2014 one\n * such response is kilobytes of markup standing in for a reason phrase. The\n * head is what carries the actual reason.\n */\nconst MAX_ERROR_BODY_LENGTH = 500\n/** Appended in place of what was cut, and counted against the cap above. */\nconst ERROR_BODY_TRUNCATION_MARKER = '\u2026 [truncated]'\nconst MAX_TRANSIENT_RETRIES = 3\n\nexport interface Response<T> {\n body?: T\n status: number\n statusText?: string\n ok: boolean\n meta: {\n duration: number\n }\n}\n\nfunction sendMetrics(\n payload: RequestPayload,\n type: RequestBaseCustomMetricsDetailsType,\n options?: {\n duration?: number\n statusCode?: string\n error?: string\n },\n) {\n if (payload.config.metrics) {\n if (payload.config.metrics.types.includes(type)) {\n let durationBucket: string | undefined\n if (options?.duration) {\n if (options.duration < 100) {\n durationBucket = '0 | <100ms'\n } else if (options.duration < 200) {\n durationBucket = '1 | <200ms'\n } else if (options.duration < 500) {\n durationBucket = '2 | <500ms'\n } else if (options.duration < 1000) {\n durationBucket = '3 | <1s'\n } else {\n durationBucket = '4 | >=1s'\n }\n }\n\n // only add normalized errors as labels\n let error = 'other'\n if (options?.error) {\n try {\n const errorMessage = options.error\n if (errorMessage.startsWith('<!DOCTYPE html>')) {\n error = 'html-response'\n } else if (errorMessage.includes('UND_ERR_CONNECT_TIMEOUT')) {\n error = 'connect-timeout'\n }\n } catch (_error) {\n // ignore it\n }\n } else {\n error = 'unset'\n }\n\n const metrics: RequestBaseServiceContext = {\n ...payload.metricsDetails,\n eventType: type,\n durationBucket,\n statusCode: options?.statusCode,\n error,\n }\n try {\n payload.config.metrics.callback(metrics)\n } catch (metricsCallbackError) {\n log(payload, 'debug', `Failed to send metrics`, {\n error: metricsCallbackError,\n metrics,\n })\n }\n }\n }\n}\n\nexport function log(\n payload: RequestPayload,\n type: 'debug' | 'info' | 'warn' | 'error',\n message: string,\n additionalData?: any,\n) {\n if (payload.config.logger) {\n const messageParts: string[] = []\n messageParts.push(payload.metricsDetails?.method?.name)\n messageParts.push(\n `${payload.metricsDetails?.target?.name} (${payload.metricsDetails?.target?.type})`,\n )\n messageParts.push(message)\n let body: any\n if (payload.body) {\n body = JSON.parse(JSON.stringify(payload.body))\n // A string has no keys to mask, and writing to its index throws.\n if (payload.redactBody && typeof body !== 'object') {\n body = '********'\n } else {\n for (const key of Object.keys(body)) {\n if (\n payload.redactBody ||\n key.toLowerCase().includes('password') ||\n key.toLowerCase().includes('secret') ||\n key.toLowerCase().includes('token')\n ) {\n body[key] = '********'\n }\n }\n }\n }\n\n const withoutQuery = (value: string) =>\n payload.redactBody ? value.split('?')[0] : value\n\n const shownUrl = payload.logUrl ?? payload.url\n let fullUrl = 'unset'\n\n if (payload.base) {\n try {\n const base = getEnvParam(payload.base.id, payload.config)\n fullUrl = withoutQuery(base ? `${base}/${shownUrl}` : shownUrl)\n } catch (_error) {\n fullUrl = `failed to get base url for ${payload.base.id}`\n }\n }\n\n let url = withoutQuery(`${shownUrl}`.toLowerCase())\n if (url.includes('secret') || url.includes('password')) {\n url = url.split('?')[0]\n }\n\n const context =\n payload.redactBody && payload.metricsDetails?.method\n ? {\n ...payload.metricsDetails,\n method: {\n ...payload.metricsDetails.method,\n url: withoutQuery(payload.metricsDetails.method.url),\n },\n }\n : payload.metricsDetails\n\n const data = {\n base: payload.base,\n method: payload.method,\n url,\n fullUrl,\n retry: payload.retry,\n body,\n context,\n ...additionalData,\n }\n // `warn` is optional on the logger, so fall back to `error` and lose no log\n const { logger } = payload.config\n const fullMessage = messageParts.join(' > ')\n if (type === 'warn') {\n if (logger.warn) {\n logger.warn(fullMessage, { data })\n } else {\n logger.error(fullMessage, { data })\n }\n } else {\n logger[type](fullMessage, { data })\n }\n }\n}\n\nfunction rateLimitWaitingTime(attempt: number): number {\n const noise = Math.random() * 100\n const waitingTime = 2 ** attempt * 1000 + noise\n return Math.floor(waitingTime)\n}\n\nfunction transientRetryWaitingTime(attempt: number): number {\n const noise = Math.random() * 100\n // 500ms, 1s, 2s (+jitter) \u2014 bounded so a fire-and-forget call heals fast.\n return Math.floor(2 ** attempt * 250 + noise)\n}\n\nfunction canRetryTransient(payload: RequestPayload): boolean {\n if (!payload.retryTransientErrors) {\n return false\n }\n const remaining = payload.transientRetry?.remaining ?? MAX_TRANSIENT_RETRIES\n return remaining > 0\n}\n\nasync function scheduleTransientRetry(payload: RequestPayload): Promise<void> {\n const attempts = payload.transientRetry?.attempts ?? 1\n const remaining = payload.transientRetry?.remaining ?? MAX_TRANSIENT_RETRIES\n const waitingTime = transientRetryWaitingTime(attempts)\n log(\n payload,\n 'debug',\n `transient error, attempt ${attempts}, remaining ${remaining}, waiting ${waitingTime}ms`,\n )\n await new Promise((resolve) => {\n setTimeout(resolve, waitingTime)\n })\n // eslint-disable-next-line require-atomic-updates\n payload.transientRetry = {\n attempts: attempts + 1,\n remaining: remaining - 1,\n }\n}\n\nexport async function request<T>(\n payload: RequestPayload,\n): Promise<Response<T>> {\n log(payload, 'debug', 'starting request')\n sendMetrics(payload, 'request')\n // configure frontend cache if enabled (browser only)\n try {\n if (payload.config.frontendCaching?.enabled) {\n frontendCache.configure(payload.config.frontendCaching)\n }\n } catch (_cacheConfigError) {\n // ignore configuration errors silently\n }\n let token\n if (payload.config.auth) {\n token = await payload.config.auth.getToken()\n }\n // Dynamic (e.g. correlation) headers first, then explicit per-request headers\n // override them, then auth/content-type below take final precedence.\n //\n // Correlation headers (traceparent, x-cc-session-id) identify our internal\n // request/session, so they must only ever reach Camunda-owned systems. Every\n // third-party target is marked `type: 'external'`, so we gate on that here:\n // external targets never receive dynamic headers even if the caller's config\n // sets getDynamicHeaders. This makes propagation safe-by-default and removes\n // the footgun of a shared config that is used for both internal and\n // third-party calls (e.g. BASIC_API_CONFIG \u2192 token-issuer vs Slack).\n let dynamicHeaders: Record<string, string> = {}\n if (payload.metricsDetails?.target?.type !== 'external') {\n try {\n dynamicHeaders = payload.config.getDynamicHeaders?.() ?? {}\n } catch (_error) {\n // never let header evaluation break a request\n }\n }\n const headers: { [key: string]: string } = {\n ...dynamicHeaders,\n ...(payload.headers ?? {}),\n }\n if (token) {\n headers.Authorization = `Bearer ${token}`\n }\n const type = payload.type ?? 'json'\n let body\n if (type) {\n switch (type) {\n case 'json': {\n headers['Content-Type'] = 'application/json'\n const given = payload.bodyWhenGiven\n ? payload.body !== undefined\n : Boolean(payload.body)\n body = given ? JSON.stringify(payload.body) : undefined\n break\n }\n case 'text':\n headers['Content-Type'] = 'text/plain'\n body = payload.body ? JSON.stringify(payload.body) : undefined\n break\n case 'form':\n if (payload.body) {\n const formData = new URLSearchParams()\n Object.keys(payload.body).forEach((key) => {\n formData.append(key, payload.body[key])\n })\n body = formData\n }\n break\n }\n }\n let base\n if (payload.base) {\n try {\n base = getEnvParam(payload.base.id, payload.config)\n } catch (error) {\n log(payload, 'error', `Failed to get base url for ${payload.base.id}`, {\n error,\n })\n throw error\n }\n }\n const url = base ? `${base}/${payload.url}` : payload.url\n\n // Attempt cache read for GET requests (stale-while-revalidate when callback supplied)\n let serveCachedAndReturnAfterNetwork = false\n if (payload.method === 'get' && payload.config.frontendCaching?.enabled) {\n try {\n const cached = await frontendCache.get<T>('get', url)\n if (cached) {\n const fresh = frontendCache.isFresh(cached)\n if (payload.onCachedResponse) {\n payload.onCachedResponse(cached.payload, { fresh, source: 'cache' })\n if (!fresh) {\n log(payload, 'debug', 'cache stale, refreshing in background')\n serveCachedAndReturnAfterNetwork = true\n } else {\n log(payload, 'debug', 'cache fresh, returning early')\n sendMetrics(payload, 'success', { duration: 0, statusCode: '200' })\n return {\n // eslint-disable-next-line id-length\n ok: true,\n status: 200,\n statusText: 'cached',\n body: cached.payload,\n meta: { duration: 0 },\n }\n }\n } else if (fresh) {\n // no callback but fresh -> return directly\n log(payload, 'debug', 'cache hit, returning cached response')\n sendMetrics(payload, 'success', { duration: 0, statusCode: '200' })\n return {\n // eslint-disable-next-line id-length\n ok: true,\n status: 200,\n statusText: 'cached',\n body: cached.payload,\n meta: { duration: 0 },\n }\n } else {\n log(payload, 'debug', 'cache stale, proceeding with network request')\n }\n }\n } catch (_cacheGetError) {\n // ignore cache errors\n }\n }\n const start = performance.now()\n const proxyAgent = payload.config.proxyAgent ?? {}\n try {\n const fetchResponse = await fetch(url, {\n signal: payload.config.timeout\n ? AbortSignal.timeout(payload.config.timeout)\n : undefined,\n method: payload.method.toUpperCase(),\n headers,\n body,\n ...proxyAgent,\n })\n const end = performance.now()\n const duration = end - start\n\n if ([429].includes(fetchResponse.status)) {\n // rate limiting, retry\n log(payload, 'info', 'rate limited', { durationMs: Math.floor(duration) })\n sendMetrics(payload, 'rate-limit-retry', {\n duration,\n statusCode: String(fetchResponse.status),\n })\n const remaining = payload.retry?.remaining ?? 8\n const attempts = payload.retry?.attempts ?? 1\n if (remaining > 0) {\n let waitingTime = rateLimitWaitingTime(attempts)\n if (fetchResponse.headers.has('x-ratelimit-reset')) {\n const rateLimitHeader = fetchResponse.headers.get('x-ratelimit-reset')\n log(\n payload,\n 'debug',\n `rate limited, found x-ratelimit-reset header: ${rateLimitHeader}`,\n )\n const rateLimitHeaderNumber = Number(rateLimitHeader)\n if (Number.isNaN(rateLimitHeaderNumber)) {\n waitingTime = Date.parse(rateLimitHeader ?? '0') - Date.now()\n } else {\n waitingTime = rateLimitHeaderNumber - Date.now()\n }\n }\n if (waitingTime < 0 || waitingTime > 180000) {\n waitingTime = rateLimitWaitingTime(attempts)\n }\n log(\n payload,\n 'debug',\n `rate limited, attempt ${attempts}, remaining ${remaining}, waiting ${waitingTime}ms`,\n )\n await new Promise((resolve) => {\n setTimeout(resolve, waitingTime)\n })\n // eslint-disable-next-line require-atomic-updates\n payload.retry = {\n attempts: attempts + 1,\n remaining: remaining - 1,\n }\n return request(payload)\n }\n log(payload, 'debug', `rate limited, no more retries`, {\n durationMs: Math.floor(duration),\n })\n }\n\n const response: Response<T> = {\n // eslint-disable-next-line id-length\n ok: fetchResponse.ok,\n status: fetchResponse.status,\n statusText: fetchResponse.statusText,\n meta: {\n duration,\n },\n }\n\n const responseType = payload.responseType ?? type\n\n if (response.ok) {\n log(payload, 'debug', `request successful in ${Math.floor(duration)}ms`, {\n baseUrl: base,\n durationMs: Math.floor(duration),\n })\n sendMetrics(payload, 'success', {\n duration,\n statusCode: String(fetchResponse.status),\n })\n switch (responseType) {\n case 'json':\n try {\n response.body = await fetchResponse.json()\n } catch (_error) {\n log(\n payload,\n 'debug',\n `Failed to parse json body. Returning empty object.`,\n {\n baseUrl: base,\n },\n )\n response.body = {} as T\n try {\n const responseBodyText = await fetchResponse.text()\n log(payload, 'debug', `Response body text`, {\n baseUrl: base,\n responseBodyText,\n status: fetchResponse.status,\n })\n } catch (textError) {\n // this is fine\n log(payload, 'debug', `Failed to parse response body text.`, {\n baseUrl: base,\n status: fetchResponse.status,\n error: textError,\n })\n }\n }\n break\n case 'text':\n response.body = (await fetchResponse.text()) as T\n break\n case 'blob':\n // Binary payloads (file downloads). Not cached.\n response.body = (await fetchResponse.blob()) as T\n break\n default:\n response.body = (await fetchResponse.text()) as T\n }\n // store in cache after parsing\n if (\n payload.method === 'get' &&\n payload.config.frontendCaching?.enabled &&\n response.body !== undefined &&\n responseType !== 'blob'\n ) {\n try {\n await frontendCache.set('get', url, response.body as any)\n log(payload, 'debug', 'cache store successful')\n } catch (_cacheSetError) {\n // ignore cache set error\n }\n }\n } else {\n let statusText = fetchResponse.statusText\n try {\n if (payload.redactResponse) {\n // Not read, but released: an unread body holds its connection.\n await fetchResponse.body?.cancel()\n } else {\n statusText = await fetchResponse.text()\n }\n } catch (_error) {\n // this is fine\n }\n if (statusText.length > MAX_ERROR_BODY_LENGTH) {\n // The marker is part of the budget, so the stored value never exceeds\n // MAX_ERROR_BODY_LENGTH \u2014 appending it after slicing to the full cap\n // would put the result over the bound the constant advertises.\n statusText = `${statusText.slice(\n 0,\n MAX_ERROR_BODY_LENGTH - ERROR_BODY_TRUNCATION_MARKER.length,\n )}${ERROR_BODY_TRUNCATION_MARKER}`\n }\n response.statusText = statusText\n log(\n payload,\n 'debug',\n `request failed with status ${response.status}: ${statusText}`,\n {\n baseUrl: base,\n durationMs: Math.floor(duration),\n },\n )\n\n // Transient gateway failure (e.g. envoy \"connection termination\" 503\n // during a pod restart). When opted in, retry with backoff and record it\n // as `transient-retry` rather than `error`, so a healed blip stays off\n // the internal error-rate alert.\n if (\n TRANSIENT_RETRY_STATUS.includes(response.status) &&\n canRetryTransient(payload)\n ) {\n sendMetrics(payload, 'transient-retry', {\n duration,\n statusCode: String(fetchResponse.status),\n error: statusText,\n })\n await scheduleTransientRetry(payload)\n return request(payload)\n }\n\n // Special Handling for dedicated target systems to not count special status codes as errors\n // eslint-disable-next-line no-shadow\n let type: RequestBaseCustomMetricsDetailsType = 'error'\n const noErrorStatusCodes: number[] = []\n switch (payload.metricsDetails.target.name) {\n case 'auth0':\n noErrorStatusCodes.push(...[400, 404, 409])\n break\n case 'accounts':\n case 'console':\n noErrorStatusCodes.push(...[404, 409])\n if (payload.metricsDetails.method.name === 'createTemporaryCluster') {\n // case: cannot create temporary cluster\n noErrorStatusCodes.push(...[400, 403, 412])\n }\n if (\n [\n 'ConsoleM2MService.verifyZeebeClient',\n 'ConsoleM2MService.verifyApiClient',\n ].includes(payload.metricsDetails.method.name)\n ) {\n // case: api/zeebe client credentials are invalid\n noErrorStatusCodes.push(...[401])\n }\n if (\n payload.metricsDetails.method.name ===\n 'OrgsService.createAndReturnSocialLoginUser'\n ) {\n noErrorStatusCodes.push(\n ...[\n // onboard user, user already has an org\n 400,\n // existing extSSO-connection\n 412,\n ],\n )\n }\n break\n case 'control':\n if (\n payload.metricsDetails.method.name ===\n 'ControlAgentClientsInternalService.verify'\n ) {\n // case: the credentials of an agent client are invalid\n noErrorStatusCodes.push(401)\n }\n if (\n payload.metricsDetails.method.name ===\n 'ControlAgentClientsInternalService.redeemGrant'\n ) {\n // case: the grant code is wrong, used or expired\n noErrorStatusCodes.push(401)\n }\n if (\n payload.metricsDetails.method.name ===\n 'ControlAgentGrantsInternalService.create'\n ) {\n // case: control-backend refuses the grant\n noErrorStatusCodes.push(409)\n }\n break\n }\n\n const methodName = payload.metricsDetails.method.name\n if (methodName.startsWith('CcmaOpenApiService.send.')) {\n // case: the agent sent a wrong request, or the token cannot call the operation\n if (response.status >= 400 && response.status < 500) {\n noErrorStatusCodes.push(response.status)\n }\n }\n if (methodName === 'CcmaOpenApiService.getDocument') {\n // case: the agent token expired or its binding was revoked\n noErrorStatusCodes.push(401)\n if (payload.metricsDetails.target.name === 'console') {\n // case: the console document needs admin.readAll, and the reader has no such permission\n noErrorStatusCodes.push(403)\n }\n }\n\n if (noErrorStatusCodes.includes(response.status)) {\n type = 'success'\n }\n\n sendMetrics(payload, type, {\n duration,\n statusCode: String(fetchResponse.status),\n error: statusText,\n })\n\n if (payload.config.onFailedResponse) {\n try {\n await payload.config.onFailedResponse({\n method: payload.method,\n baseId: payload.base?.id,\n url: payload.url,\n status: fetchResponse.status,\n headers: fetchResponse.headers,\n body: statusText,\n requestBody: payload.body,\n })\n } catch (hookError) {\n throw new FailedResponseHookError(hookError)\n }\n }\n }\n if (serveCachedAndReturnAfterNetwork && response.ok) {\n // when we served stale via callback earlier, we now also return the fresh response\n log(payload, 'debug', 'stale cache updated, returning new data')\n }\n return response\n } catch (error: any) {\n if (error instanceof FailedResponseHookError) {\n throw error.hookError\n }\n const duration = performance.now() - start\n let errorMessage: string | undefined\n if (error?.cause?.code) {\n errorMessage = error?.cause?.code\n } else if (error?.message) {\n errorMessage = error?.message\n }\n // Network/fetch error with no HTTP status (e.g. connection reset, timeout).\n // Retry-on-opt-in before treating it as an error (see else branch above).\n if (canRetryTransient(payload)) {\n log(payload, 'debug', `request failed with no status, retrying`, {\n baseUrl: base,\n error,\n durationMs: Math.floor(duration),\n })\n sendMetrics(payload, 'transient-retry', {\n statusCode: 'fetch-error',\n duration,\n error: errorMessage,\n })\n await scheduleTransientRetry(payload)\n return request(payload)\n }\n log(\n payload,\n payload.warnOnNoStatus ? 'warn' : 'error',\n `request failed with no status`,\n {\n baseUrl: base,\n error,\n durationMs: Math.floor(duration),\n },\n )\n sendMetrics(payload, 'error', {\n statusCode: 'fetch-error',\n duration,\n error: errorMessage,\n })\n const response: Response<T> = {\n // eslint-disable-next-line id-length\n ok: false,\n status: 500,\n statusText: 'fetch error',\n meta: {\n duration,\n },\n }\n return response\n }\n}\n"],
5
+ "mappings": "AAYA,SAAS,mBAAqC;AAC9C,SAAS,qBAAqB;AAiE9B,MAAM,gCAAgC,MAAM;AAAA,EAC1C,YAAqB,WAAoB;AACvC,UAAM,yBAAyB;AADZ;AAAA,EAErB;AACF;AAEA,MAAM,yBAAyB,CAAC,KAAK,KAAK,GAAG;AAQ7C,MAAM,wBAAwB;AAE9B,MAAM,+BAA+B;AACrC,MAAM,wBAAwB;AAY9B,SAAS,YACP,SACA,MACA,SAKA;AACA,MAAI,QAAQ,OAAO,SAAS;AAC1B,QAAI,QAAQ,OAAO,QAAQ,MAAM,SAAS,IAAI,GAAG;AAC/C,UAAI;AACJ,UAAI,SAAS,UAAU;AACrB,YAAI,QAAQ,WAAW,KAAK;AAC1B,2BAAiB;AAAA,QACnB,WAAW,QAAQ,WAAW,KAAK;AACjC,2BAAiB;AAAA,QACnB,WAAW,QAAQ,WAAW,KAAK;AACjC,2BAAiB;AAAA,QACnB,WAAW,QAAQ,WAAW,KAAM;AAClC,2BAAiB;AAAA,QACnB,OAAO;AACL,2BAAiB;AAAA,QACnB;AAAA,MACF;AAGA,UAAI,QAAQ;AACZ,UAAI,SAAS,OAAO;AAClB,YAAI;AACF,gBAAM,eAAe,QAAQ;AAC7B,cAAI,aAAa,WAAW,iBAAiB,GAAG;AAC9C,oBAAQ;AAAA,UACV,WAAW,aAAa,SAAS,yBAAyB,GAAG;AAC3D,oBAAQ;AAAA,UACV;AAAA,QACF,SAAS,QAAQ;AAAA,QAEjB;AAAA,MACF,OAAO;AACL,gBAAQ;AAAA,MACV;AAEA,YAAM,UAAqC;AAAA,QACzC,GAAG,QAAQ;AAAA,QACX,WAAW;AAAA,QACX;AAAA,QACA,YAAY,SA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AACA,QAAI,oCAAoC,SAAS,IAAI;AAEnD,UAAI,SAAS,SAAS,yCAAyC;AAAA,IACjE;AACA,WAAO;AAAA,EACT,SAAS,OAAY;AACnB,QAAI,iBAAiB,yBAAyB;AAC5C,YAAM,MAAM;AAAA,IACd;AACA,UAAM,WAAW,YAAY,IAAI,IAAI;AACrC,QAAI;AACJ,QAAI,OAAO,OAAO,MAAM;AACtB,qBAAe,OAAO,OAAO;AAAA,IAC/B,WAAW,OAAO,SAAS;AACzB,qBAAe,OAAO;AAAA,IACxB;AAGA,QAAI,kBAAkB,OAAO,GAAG;AAC9B,UAAI,SAAS,SAAS,2CAA2C;AAAA,QAC/D,SAAS;AAAA,QACT;AAAA,QACA,YAAY,KAAK,MAAM,QAAQ;AAAA,MACjC,CAAC;AACD,kBAAY,SAAS,mBAAmB;AAAA,QACtC,YAAY;AAAA,QACZ;AAAA,QACA,OAAO;AAAA,MACT,CAAC;AACD,YAAM,uBAAuB,OAAO;AACpC,aAAO,QAAQ,OAAO;AAAA,IACxB;AACA;AAAA,MACE;AAAA,MACA,QAAQ,iBAAiB,SAAS;AAAA,MAClC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT;AAAA,QACA,YAAY,KAAK,MAAM,QAAQ;AAAA,MACjC;AAAA,IACF;AACA,gBAAY,SAAS,SAAS;AAAA,MAC5B,YAAY;AAAA,MACZ;AAAA,MACA,OAAO;AAAA,IACT,CAAC;AACD,UAAM,WAAwB;AAAA;AAAA,MAE5B,IAAI;AAAA,MACJ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,MAAM;AAAA,QACJ;AAAA,MACF;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;",
6
6
  "names": ["type"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-api",
3
- "version": "13.5.0",
3
+ "version": "13.7.0",
4
4
  "description": "Centralized API service layer for Camunda Cloud Management Apps",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
@@ -41,7 +41,7 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "@camunda/ccma-shared-types": "18.8.0"
44
+ "@camunda/ccma-shared-types": "18.10.0"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "node esbuild.mjs && tsc --emitDeclarationOnly --outDir dist",