@camunda/ccma-shared-types 18.10.0 → 18.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tests/types/ClusterPlanTypeAvailabilityClass.type.spec.d.ts +1 -0
- package/dist/constants/custom-generation.const.d.ts +9 -2
- package/dist/constants/custom-generation.const.js +4 -2
- package/dist/constants/custom-generation.const.js.map +2 -2
- package/dist/constants/custom-hardware-sizing.const.d.ts +6 -2
- package/dist/constants/custom-hardware-sizing.const.js +1 -1
- package/dist/constants/custom-hardware-sizing.const.js.map +2 -2
- package/dist/dtos/ApprovalJob.dto.d.ts +2 -0
- package/dist/dtos/ApprovalJob.dto.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -1
- package/dist/index.js.map +2 -2
- package/dist/permissions/accounts.permissions.d.ts +8 -0
- package/dist/permissions/accounts.permissions.js +6 -0
- package/dist/permissions/accounts.permissions.js.map +2 -2
- package/dist/types/ClusterPlanTypeAvailabilityClass.type.d.ts +34 -0
- package/dist/types/ClusterPlanTypeAvailabilityClass.type.js +20 -0
- package/dist/types/ClusterPlanTypeAvailabilityClass.type.js.map +2 -2
- package/dist/types/Roles.d.ts +1 -1
- package/dist/types/Roles.js.map +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Custom generation: a bespoke generation that a Camundi creates for an
|
|
3
3
|
* organization of their own, with no admin permission. The approval use cases
|
|
4
|
-
* `create-custom-generation` and `remove-custom-generation` run on dev
|
|
4
|
+
* `create-custom-generation` and `remove-custom-generation` run on dev and
|
|
5
|
+
* int. On dev anybody signed in can open one. On int the requester needs
|
|
6
|
+
* `accp` (`AccountsPermissions.CUSTOM_PLANS_CREATE`). Prod stays closed.
|
|
5
7
|
*/
|
|
6
|
-
/** The
|
|
8
|
+
/** The stages where custom generations run. */
|
|
7
9
|
export declare const isCustomGenerationStage: (stage: string) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Where anybody signed in can open a custom generation or a custom hardware
|
|
12
|
+
* sizing request. On every other open stage the requester needs `accp`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const isCustomPlansOpenToEveryone: (stage: string) => boolean;
|
|
8
15
|
/**
|
|
9
16
|
* The most custom generations that one Camundi can own. The count is the
|
|
10
17
|
* bespoke generations that the Camundi created and did not delete. A bespoke
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
generationImageErrorMessage,
|
|
7
7
|
isValidGenerationImage
|
|
8
8
|
} from "../utils/versionCheck.utils.js";
|
|
9
|
-
const isCustomGenerationStage = (stage) => stage === "dev";
|
|
9
|
+
const isCustomGenerationStage = (stage) => stage === "dev" || stage === "int";
|
|
10
|
+
const isCustomPlansOpenToEveryone = (stage) => stage === "dev";
|
|
10
11
|
const CUSTOM_GENERATION_MAX_PER_REQUESTER = 50;
|
|
11
12
|
const CUSTOM_GENERATION_MAX_UPGRADEABLE_FROM = 50;
|
|
12
13
|
const CUSTOM_GENERATION_NAME_MIN_LENGTH = 3;
|
|
@@ -62,6 +63,7 @@ export {
|
|
|
62
63
|
CUSTOM_GENERATION_NAME_MAX_LENGTH,
|
|
63
64
|
CUSTOM_GENERATION_NAME_MIN_LENGTH,
|
|
64
65
|
checkNewGenerationVersions,
|
|
65
|
-
isCustomGenerationStage
|
|
66
|
+
isCustomGenerationStage,
|
|
67
|
+
isCustomPlansOpenToEveryone
|
|
66
68
|
};
|
|
67
69
|
//# sourceMappingURL=custom-generation.const.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants/custom-generation.const.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 {\n ImmutableThings,\n MutableThings,\n} from '../types/C8ClusterComponentVersions.type.js'\nimport {\n generationImageErrorMessage,\n isValidGenerationImage,\n} from '../utils/versionCheck.utils.js'\n\n/**\n * Custom generation: a bespoke generation that a Camundi creates for an\n * organization of their own, with no admin permission. The approval use cases\n * `create-custom-generation` and `remove-custom-generation` run on dev
|
|
5
|
-
"mappings": "AAMA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;
|
|
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 {\n ImmutableThings,\n MutableThings,\n} from '../types/C8ClusterComponentVersions.type.js'\nimport {\n generationImageErrorMessage,\n isValidGenerationImage,\n} from '../utils/versionCheck.utils.js'\n\n/**\n * Custom generation: a bespoke generation that a Camundi creates for an\n * organization of their own, with no admin permission. The approval use cases\n * `create-custom-generation` and `remove-custom-generation` run on dev and\n * int. On dev anybody signed in can open one. On int the requester needs\n * `accp` (`AccountsPermissions.CUSTOM_PLANS_CREATE`). Prod stays closed.\n */\n\n/** The stages where custom generations run. */\nexport const isCustomGenerationStage = (stage: string): boolean =>\n stage === 'dev' || stage === 'int'\n\n/**\n * Where anybody signed in can open a custom generation or a custom hardware\n * sizing request. On every other open stage the requester needs `accp`.\n */\nexport const isCustomPlansOpenToEveryone = (stage: string): boolean =>\n stage === 'dev'\n\n/**\n * The most custom generations that one Camundi can own. The count is the\n * bespoke generations that the Camundi created and did not delete. A bespoke\n * generation that the Camundi created in the admin tool counts too.\n */\nexport const CUSTOM_GENERATION_MAX_PER_REQUESTER = 50\n\n/** The most generations that a custom generation can list in `upgradeableFrom`. */\nexport const CUSTOM_GENERATION_MAX_UPGRADEABLE_FROM = 50\n\nexport const CUSTOM_GENERATION_NAME_MIN_LENGTH = 3\nexport const CUSTOM_GENERATION_NAME_MAX_LENGTH = 100\n\n/** Images that every generation must have. */\nconst REQUIRED_IMAGES = ['zeebe', 'elasticSearchCurator', 'elasticSearchOss']\n\n/**\n * Images that a generation can have. `undefined` and an empty text mean no\n * image. Any other value, `null` too, must be a valid image, because\n * `ZeebeClusterVersionsDto` types these fields as text.\n */\nconst OPTIONAL_IMAGES = [\n 'operate',\n 'tasklist',\n 'optimize',\n 'connectorBridge',\n 'zeebeAnalytics',\n]\n\n/** Fields where a blank text means no value. */\nconst BLANK_IS_ABSENT = [\n 'operate',\n 'tasklist',\n 'connectorBridge',\n 'zeebeAnalytics',\n 'elasticSearchCurator',\n]\n\nconst imageProblem = (field: string, value: unknown): string | undefined =>\n typeof value === 'string' && isValidGenerationImage(value)\n ? undefined\n : generationImageErrorMessage(field, value)\n\n/**\n * Returns what is wrong with the versions of a new generation, or an empty\n * list. It is the check of the admin route and of the custom generation\n * request, thus both give the same messages. The admin route throws the first\n * message.\n *\n * It does not change `versions`. A caller that saves the versions must still\n * set the blank optional fields to `undefined`. Here a blank text in one of\n * those fields counts as no value.\n */\nexport function checkNewGenerationVersions(\n versions: Record<string, unknown>,\n): string[] {\n const valueOf = (field: string): unknown => {\n const value = versions[field]\n return BLANK_IS_ABSENT.includes(field) &&\n typeof value === 'string' &&\n value.trim() === ''\n ? undefined\n : value\n }\n\n const problems: string[] = []\n for (const field of REQUIRED_IMAGES) {\n const problem = imageProblem(field, valueOf(field))\n if (problem) {\n problems.push(problem)\n }\n }\n for (const field of OPTIONAL_IMAGES) {\n const value = valueOf(field)\n if (value === undefined || value === '') {\n continue\n }\n const problem = imageProblem(field, value)\n if (problem) {\n problems.push(problem)\n }\n }\n for (const key of Object.keys(versions)) {\n if (!MutableThings.includes(key) && !ImmutableThings.includes(key)) {\n problems.push(`${key} is not a valid thing`)\n }\n }\n return problems\n}\n"],
|
|
5
|
+
"mappings": "AAMA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAWA,MA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ACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Custom hardware sizing: a cluster plan that a Camundi creates for an
|
|
3
3
|
* organization of their own, with no admin permission. The approval use cases
|
|
4
4
|
* `create-custom-hardware-sizing` and `remove-custom-hardware-sizing` run
|
|
5
|
-
* on dev
|
|
5
|
+
* on dev and int, and the limits in this file keep one plan from asking for a
|
|
6
6
|
* machine park.
|
|
7
7
|
*
|
|
8
8
|
* Every cap below is 10 times the largest value in the cluster plans of prod
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
* `G3-M (adapted for Cisco load test)` ask for 10 TB on purpose, and a cap
|
|
12
12
|
* from them would be 100 TB.
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The stages where custom hardware sizing runs. The "open to everyone" rule
|
|
16
|
+
* (dev only, no `accp` needed) is `isCustomPlansOpenToEveryone` in
|
|
17
|
+
* `custom-generation.const.ts`, which gates this feature too.
|
|
18
|
+
*/
|
|
15
19
|
export declare const isCustomHardwareSizingStage: (stage: string) => boolean;
|
|
16
20
|
/**
|
|
17
21
|
* The most plans that one Camundi can own through custom hardware sizing.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { canonicalPlan } from "../utils/elasticsearchPlanPath.utils.js";
|
|
2
|
-
const isCustomHardwareSizingStage = (stage) => stage === "dev";
|
|
2
|
+
const isCustomHardwareSizingStage = (stage) => stage === "dev" || stage === "int";
|
|
3
3
|
const CUSTOM_HARDWARE_SIZING_MAX_PLANS_PER_REQUESTER = 10;
|
|
4
4
|
const CUSTOM_HARDWARE_SIZING_NAME_MIN_LENGTH = 3;
|
|
5
5
|
const CUSTOM_HARDWARE_SIZING_NAME_MAX_LENGTH = 100;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/constants/custom-hardware-sizing.const.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 { canonicalPlan } from '../utils/elasticsearchPlanPath.utils.js'\n\n/**\n * Custom hardware sizing: a cluster plan that a Camundi creates for an\n * organization of their own, with no admin permission. The approval use cases\n * `create-custom-hardware-sizing` and `remove-custom-hardware-sizing` run\n * on dev only, and the limits in this file keep one plan from asking for a\n * machine park.\n *\n * Every cap below is 10 times the largest value in the cluster plans of prod\n * (dump of 2026-10-01, 27 plans). The cap for storage is 10 times the largest\n * value of a plan that is NOT a load test: `Cisco XXL Year 1` and\n * `G3-M (adapted for Cisco load test)` ask for 10 TB on purpose, and a cap\n * from them would be 100 TB.\n */\n\n/** The stage where custom hardware sizing runs. */\nexport const isCustomHardwareSizingStage = (stage: string): boolean =>\n stage === 'dev'\n\n/**\n * The most plans that one Camundi can own through custom hardware sizing.\n *\n * The count is the number of plans the Camundi created. A plan that the\n * Camundi deleted does not count.\n */\nexport const CUSTOM_HARDWARE_SIZING_MAX_PLANS_PER_REQUESTER = 10\n\n/** The shortest and longest name of a custom hardware sizing plan. */\nexport const CUSTOM_HARDWARE_SIZING_NAME_MIN_LENGTH = 3\nexport const CUSTOM_HARDWARE_SIZING_NAME_MAX_LENGTH = 100\n\n/**\n * The longest plan, as JSON text. The largest plan of prod is about 6000\n * characters. The cap stops a request that carries a huge object.\n */\nexport const CUSTOM_HARDWARE_SIZING_MAX_PLAN_JSON_LENGTH = 50_000\n\n/** One cap for a resource of one kind of component. `gi` is gibibytes. */\ninterface ResourceCaps {\n cpu: number\n memoryGi: number\n storageGi: number\n}\n\n/**\n * Caps for the requests and the limits of one component.\n *\n * `other` is every component that is not the Zeebe broker or Elasticsearch:\n * Operate, Tasklist, Optimize, the gateways, Identity and the others. The\n * largest of them in prod is Operate, with 6 CPU and 30 GiB.\n *\n * Prod maximum, before the factor of 10:\n * - broker: 16 CPU, 50 GiB, 500 GiB of storage (no load test)\n * - Elasticsearch: 30 CPU, 100 GiB, 3000 GiB of storage (no load test)\n * - other: 6 CPU, 30 GiB, no storage\n */\nexport const CUSTOM_HARDWARE_SIZING_RESOURCE_CAPS = {\n broker: { cpu: 160, memoryGi: 500, storageGi: 5000 },\n elasticsearch: { cpu: 300, memoryGi: 1000, storageGi: 30_000 },\n other: { cpu: 60, memoryGi: 300, storageGi: 5000 },\n} as const satisfies Record<string, ResourceCaps>\n\n/** Caps for the count fields of a plan. Prod maximum is in the comments. */\nexport const CUSTOM_HARDWARE_SIZING_COUNT_CAPS = {\n // 7\n clusterSize: 70,\n // 50\n partitionsCount: 500,\n // 3\n replicationFactor: 30,\n // 5\n nodesCount: 50,\n // `replicas` of any component. 3.\n replicas: 30,\n} as const\n\n/** `zeebe.broker.storage.autoResizing.increase`. Prod maximum is 18 GiB. */\nexport const CUSTOM_HARDWARE_SIZING_MAX_AUTO_RESIZE_INCREASE_GI = 180\n\n/**\n * The caps over the whole broker set, which the caps for one broker do not\n * give. A plan with 70 brokers of 160 CPU passes every cap above, and it asks\n * for 11200 CPU. The prod maximum is 84 CPU (7 brokers, `Cisco XXL Year 1`),\n * 250 GiB of memory (5 brokers, `GLS HA`) and 2500 GiB of storage (5 brokers,\n * `GLS HA`, no load test).\n */\nexport const CUSTOM_HARDWARE_SIZING_BROKER_TOTAL_CAPS = {\n cpu: 840,\n memoryGi: 2500,\n storageGi: 25_000,\n} as const\n\n/**\n * The same, for the whole Elasticsearch node set. Ten times the prod maximum:\n * 90 CPU and 300 GiB of memory (3 nodes, `GLS HA`), and 10000 GiB of storage\n * (5 nodes, `CCL G3L HA`). The storage of one node is a claim of one volume,\n * so the total is the claim times the number of nodes.\n */\nexport const CUSTOM_HARDWARE_SIZING_ELASTICSEARCH_TOTAL_CAPS = {\n cpu: 900,\n memoryGi: 3000,\n storageGi: 100_000,\n} as const\n\n/**\n * The same, for the pods of one component that has `replicas`, such as\n * Operate or the gateway. Ten times the prod maximum: 12 CPU (the gateway, 3\n * replicas of 4 CPU) and 60 GiB of memory (Operate, 2 replicas of 30 GiB). No\n * component of prod has storage in its pod resources, so the storage total is\n * the cap for one pod, 10 times over. The check counts a storage request of a\n * pod in `resources` against it.\n */\nexport const CUSTOM_HARDWARE_SIZING_REPLICA_SET_TOTAL_CAPS = {\n cpu: 120,\n memoryGi: 600,\n storageGi: 50_000,\n} as const\n\nconst GIBIBYTE = 1024 ** 3\n\nconst QUANTITY_MULTIPLIERS: Record<string, number> = {\n '': 1,\n m: 1e-3,\n k: 1e3,\n M: 1e6,\n G: 1e9,\n T: 1e12,\n P: 1e15,\n Ki: 1024,\n Mi: 1024 ** 2,\n Gi: 1024 ** 3,\n Ti: 1024 ** 4,\n Pi: 1024 ** 5,\n}\n\nconst QUANTITY_PATTERN = /^([0-9]+(?:\\.[0-9]+)?)(m|k|M|G|T|P|Ki|Mi|Gi|Ti|Pi)?$/u\n\n/**\n * Reads a Kubernetes quantity such as `500m`, `2`, `4Gi` or `1G`, and returns\n * its value in base units: cores for a CPU, bytes for memory and storage.\n *\n * Returns `undefined` for a text that this function cannot read, so the\n * caller can refuse it. The exponent form (`1e3`) is not read on purpose.\n */\nexport function parseKubernetesQuantity(value: unknown): number | undefined {\n if (typeof value === 'number') {\n return Number.isFinite(value) && value >= 0 ? value : undefined\n }\n if (typeof value !== 'string') {\n return undefined\n }\n const match = QUANTITY_PATTERN.exec(value)\n if (!match) {\n return undefined\n }\n return Number(match[1]) * (QUANTITY_MULTIPLIERS[match[2] ?? ''] ?? 1)\n}\n\ntype ComponentKind = keyof typeof CUSTOM_HARDWARE_SIZING_RESOURCE_CAPS\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n\nfunction componentOf(path: string[]): ComponentKind {\n if (path[0] === 'zeebe' && path[1] === 'broker') {\n return 'broker'\n }\n if (path[0] === 'elasticsearch') {\n return 'elasticsearch'\n }\n return 'other'\n}\n\nfunction checkNumberCap(\n violations: string[],\n path: string[],\n value: unknown,\n cap: number,\n): void {\n const name = path.join('.')\n const parsed = parseKubernetesQuantity(value)\n if (parsed === undefined) {\n violations.push(`${name} is not a number that can be checked`)\n } else if (parsed > cap) {\n violations.push(`${name} is ${parsed}, and the most is ${cap}`)\n }\n}\n\nfunction checkResource(\n violations: string[],\n path: string[],\n value: unknown,\n kind: 'cpu' | 'memory' | 'storage',\n): void {\n const name = path.join('.')\n const caps = CUSTOM_HARDWARE_SIZING_RESOURCE_CAPS[componentOf(path)]\n const parsed = parseKubernetesQuantity(value)\n if (parsed === undefined) {\n violations.push(`${name} is not a quantity that can be checked`)\n return\n }\n if (kind === 'cpu') {\n if (parsed > caps.cpu) {\n violations.push(`${name} is ${parsed} CPU, and the most is ${caps.cpu}`)\n }\n return\n }\n const cap = kind === 'memory' ? caps.memoryGi : caps.storageGi\n if (parsed / GIBIBYTE > cap) {\n violations.push(`${name} is over ${cap} GiB`)\n }\n}\n\nfunction walk(violations: string[], node: unknown, path: string[]): void {\n if (!isRecord(node)) {\n return\n }\n for (const [key, value] of Object.entries(node)) {\n // The shape check of console treats `null` like an absent key, so this\n // check does too. A `null` has nothing to cap.\n if (value === null || value === undefined) {\n continue\n }\n const next = [...path, key]\n const parent = path.at(-1)\n const grandParent = path.at(-2)\n if (\n Object.hasOwn(CUSTOM_HARDWARE_SIZING_COUNT_CAPS, key) &&\n !isRecord(value)\n ) {\n checkNumberCap(\n violations,\n next,\n value,\n CUSTOM_HARDWARE_SIZING_COUNT_CAPS[\n key as keyof typeof CUSTOM_HARDWARE_SIZING_COUNT_CAPS\n ],\n )\n } else if (\n (parent === 'limits' || parent === 'requests') &&\n grandParent === 'resources' &&\n (key === 'cpu' || key === 'memory' || key === 'storage')\n ) {\n checkResource(violations, next, value, key)\n } else if (\n (parent === 'limits' || parent === 'requests') &&\n grandParent === 'resources'\n ) {\n // Any other resource name (`ephemeral-storage`, a GPU) has no cap.\n violations.push(`${next.join('.')} is not a resource that has a cap`)\n } else if (key === 'persistentStorageCapacity') {\n // The legacy size of the volume. The operator can still read it.\n checkResource(violations, next, value, 'storage')\n } else if (parent === 'autoResizing' && key === 'increase') {\n // Only the step is capped. The disk itself stops at\n // `storage.resources.limits.storage`: `Plan.type.ts` calls it \"the upper\n // limit the pvc autoscaler can scale up to\", and the operator hands it\n // to the autoscaler as the storage limit of the PVC. The caps for that\n // field, for one node and for all nodes together, bound the size that a\n // disk can reach. `threshold` has no effect on that size.\n const parsed = parseKubernetesQuantity(value)\n if (\n parsed === undefined ||\n parsed / GIBIBYTE > CUSTOM_HARDWARE_SIZING_MAX_AUTO_RESIZE_INCREASE_GI\n ) {\n violations.push(\n `${next.join('.')} is not a quantity of at most ${CUSTOM_HARDWARE_SIZING_MAX_AUTO_RESIZE_INCREASE_GI} GiB`,\n )\n }\n } else {\n walk(violations, value, next)\n }\n }\n}\n\nconst larger = (\n block: Record<string, unknown> | undefined,\n key: string,\n): number | undefined => {\n const values = [block?.limits, block?.requests].map((entry) =>\n isRecord(entry) ? parseKubernetesQuantity(entry[key]) : undefined,\n )\n const known = values.filter((value) => value !== undefined)\n return known.length > 0 ? Math.max(...known) : undefined\n}\n\n/**\n * Checks the whole node set of one component against its totals. The caps for\n * one node do not bound `count` nodes together.\n *\n * Kubernetes schedules on `requests`, and a plan can set only `requests`. The\n * total reads the larger of the two, so that neither one skips it. The legacy\n * `persistentStorageCapacity` counts as storage too.\n */\nfunction checkSetTotals(\n violations: string[],\n who: string,\n count: unknown,\n parts: {\n resources: unknown\n storageResources: unknown\n legacyStorage: unknown\n },\n caps: { cpu: number; memoryGi: number; storageGi: number },\n): void {\n const nodes = parseKubernetesQuantity(count)\n if (nodes === undefined) {\n return\n }\n const resources = isRecord(parts.resources) ? parts.resources : undefined\n const storageResources = isRecord(parts.storageResources)\n ? parts.storageResources\n : undefined\n const cpu = larger(resources, 'cpu')\n if (cpu !== undefined && cpu * nodes > caps.cpu) {\n violations.push(`${who} together ask for more than ${caps.cpu} CPU`)\n }\n const memory = larger(resources, 'memory')\n if (memory !== undefined && (memory * nodes) / GIBIBYTE > caps.memoryGi) {\n violations.push(\n `${who} together ask for more than ${caps.memoryGi} GiB of memory`,\n )\n }\n const disks = [\n larger(storageResources, 'storage'),\n parseKubernetesQuantity(parts.legacyStorage),\n ].filter((value) => value !== undefined)\n if (\n disks.length > 0 &&\n (Math.max(...disks) * nodes) / GIBIBYTE > caps.storageGi\n ) {\n violations.push(\n `${who} together ask for more than ${caps.storageGi} GiB of storage`,\n )\n }\n}\n\n/**\n * Walks the plan for every component that has `replicas`, and checks its pods\n * together. The pod resources are in `resources`, or in `backend.resources`.\n * The brokers (`clusterSize`) and Elasticsearch (`nodesCount`) have their own\n * count and their own totals.\n */\nfunction checkReplicaSets(\n violations: string[],\n node: unknown,\n path: string[],\n): void {\n if (!isRecord(node)) {\n return\n }\n if (\n node.replicas !== undefined &&\n node.replicas !== null &&\n !isRecord(node.replicas)\n ) {\n const backend = isRecord(node.backend) ? node.backend : undefined\n const podResources = node.resources ?? backend?.resources\n checkSetTotals(\n violations,\n `the replicas of ${path.join('.') || 'the plan'}`,\n node.replicas,\n {\n resources: podResources,\n // The same block: a pod can ask for storage in its resources too.\n storageResources: podResources,\n legacyStorage: undefined,\n },\n CUSTOM_HARDWARE_SIZING_REPLICA_SET_TOTAL_CAPS,\n )\n }\n for (const [key, value] of Object.entries(node)) {\n checkReplicaSets(violations, value, [...path, key])\n }\n}\n\nfunction checkNodeSetTotals(\n violations: string[],\n plan: Record<string, unknown>,\n): void {\n const zeebe = isRecord(plan.zeebe) ? plan.zeebe : undefined\n const broker = isRecord(zeebe?.broker) ? zeebe.broker : undefined\n if (broker) {\n const storage = isRecord(broker.storage) ? broker.storage : undefined\n checkSetTotals(\n violations,\n 'the brokers',\n broker.clusterSize,\n {\n resources: broker.resources,\n storageResources: storage?.resources,\n legacyStorage: broker.persistentStorageCapacity,\n },\n CUSTOM_HARDWARE_SIZING_BROKER_TOTAL_CAPS,\n )\n }\n checkReplicaSets(violations, plan, [])\n const elasticsearch = isRecord(plan.elasticsearch)\n ? plan.elasticsearch\n : undefined\n if (elasticsearch) {\n const config = isRecord(elasticsearch.config)\n ? elasticsearch.config\n : undefined\n const storage = isRecord(config?.storage) ? config.storage : undefined\n checkSetTotals(\n violations,\n 'the Elasticsearch nodes',\n config?.nodesCount,\n {\n resources: elasticsearch.resources,\n storageResources: storage?.resources,\n legacyStorage: elasticsearch.persistentStorageCapacity,\n },\n CUSTOM_HARDWARE_SIZING_ELASTICSEARCH_TOTAL_CAPS,\n )\n }\n}\n\n/**\n * Checks a cluster plan against the caps of custom hardware sizing.\n *\n * Returns the list of violations, and an empty list when the plan is within\n * the caps. It checks the size only. The shape of the plan is the job of the\n * plan validator of console-backend.\n *\n * A value that this function cannot read is a violation too: a cap that the\n * plan can skip with a strange spelling is no cap.\n */\nexport function checkCustomHardwareSizing(plan: unknown): string[] {\n if (!isRecord(plan)) {\n return ['the plan is not an object']\n }\n if (\n JSON.stringify(plan).length > CUSTOM_HARDWARE_SIZING_MAX_PLAN_JSON_LENGTH\n ) {\n return [\n `the plan is longer than ${CUSTOM_HARDWARE_SIZING_MAX_PLAN_JSON_LENGTH} characters`,\n ]\n }\n // `operate.elasticsearch` is the old place of the Elasticsearch block. The\n // caps for Elasticsearch must read it as one place, so the plan is moved\n // to the canonical form first.\n const canonical = canonicalPlan(plan)\n const violations: string[] = []\n walk(violations, canonical, [])\n checkNodeSetTotals(violations, canonical)\n return violations\n}\n"],
|
|
5
|
-
"mappings": "AAMA,SAAS,qBAAqB;
|
|
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 { canonicalPlan } from '../utils/elasticsearchPlanPath.utils.js'\n\n/**\n * Custom hardware sizing: a cluster plan that a Camundi creates for an\n * organization of their own, with no admin permission. The approval use cases\n * `create-custom-hardware-sizing` and `remove-custom-hardware-sizing` run\n * on dev and int, and the limits in this file keep one plan from asking for a\n * machine park.\n *\n * Every cap below is 10 times the largest value in the cluster plans of prod\n * (dump of 2026-10-01, 27 plans). The cap for storage is 10 times the largest\n * value of a plan that is NOT a load test: `Cisco XXL Year 1` and\n * `G3-M (adapted for Cisco load test)` ask for 10 TB on purpose, and a cap\n * from them would be 100 TB.\n */\n\n/**\n * The stages where custom hardware sizing runs. The \"open to everyone\" rule\n * (dev only, no `accp` needed) is `isCustomPlansOpenToEveryone` in\n * `custom-generation.const.ts`, which gates this feature too.\n */\nexport const isCustomHardwareSizingStage = (stage: string): boolean =>\n stage === 'dev' || stage === 'int'\n\n/**\n * The most plans that one Camundi can own through custom hardware sizing.\n *\n * The count is the number of plans the Camundi created. A plan that the\n * Camundi deleted does not count.\n */\nexport const CUSTOM_HARDWARE_SIZING_MAX_PLANS_PER_REQUESTER = 10\n\n/** The shortest and longest name of a custom hardware sizing plan. */\nexport const CUSTOM_HARDWARE_SIZING_NAME_MIN_LENGTH = 3\nexport const CUSTOM_HARDWARE_SIZING_NAME_MAX_LENGTH = 100\n\n/**\n * The longest plan, as JSON text. The largest plan of prod is about 6000\n * characters. The cap stops a request that carries a huge object.\n */\nexport const CUSTOM_HARDWARE_SIZING_MAX_PLAN_JSON_LENGTH = 50_000\n\n/** One cap for a resource of one kind of component. `gi` is gibibytes. */\ninterface ResourceCaps {\n cpu: number\n memoryGi: number\n storageGi: number\n}\n\n/**\n * Caps for the requests and the limits of one component.\n *\n * `other` is every component that is not the Zeebe broker or Elasticsearch:\n * Operate, Tasklist, Optimize, the gateways, Identity and the others. The\n * largest of them in prod is Operate, with 6 CPU and 30 GiB.\n *\n * Prod maximum, before the factor of 10:\n * - broker: 16 CPU, 50 GiB, 500 GiB of storage (no load test)\n * - Elasticsearch: 30 CPU, 100 GiB, 3000 GiB of storage (no load test)\n * - other: 6 CPU, 30 GiB, no storage\n */\nexport const CUSTOM_HARDWARE_SIZING_RESOURCE_CAPS = {\n broker: { cpu: 160, memoryGi: 500, storageGi: 5000 },\n elasticsearch: { cpu: 300, memoryGi: 1000, storageGi: 30_000 },\n other: { cpu: 60, memoryGi: 300, storageGi: 5000 },\n} as const satisfies Record<string, ResourceCaps>\n\n/** Caps for the count fields of a plan. Prod maximum is in the comments. */\nexport const CUSTOM_HARDWARE_SIZING_COUNT_CAPS = {\n // 7\n clusterSize: 70,\n // 50\n partitionsCount: 500,\n // 3\n replicationFactor: 30,\n // 5\n nodesCount: 50,\n // `replicas` of any component. 3.\n replicas: 30,\n} as const\n\n/** `zeebe.broker.storage.autoResizing.increase`. Prod maximum is 18 GiB. */\nexport const CUSTOM_HARDWARE_SIZING_MAX_AUTO_RESIZE_INCREASE_GI = 180\n\n/**\n * The caps over the whole broker set, which the caps for one broker do not\n * give. A plan with 70 brokers of 160 CPU passes every cap above, and it asks\n * for 11200 CPU. The prod maximum is 84 CPU (7 brokers, `Cisco XXL Year 1`),\n * 250 GiB of memory (5 brokers, `GLS HA`) and 2500 GiB of storage (5 brokers,\n * `GLS HA`, no load test).\n */\nexport const CUSTOM_HARDWARE_SIZING_BROKER_TOTAL_CAPS = {\n cpu: 840,\n memoryGi: 2500,\n storageGi: 25_000,\n} as const\n\n/**\n * The same, for the whole Elasticsearch node set. Ten times the prod maximum:\n * 90 CPU and 300 GiB of memory (3 nodes, `GLS HA`), and 10000 GiB of storage\n * (5 nodes, `CCL G3L HA`). The storage of one node is a claim of one volume,\n * so the total is the claim times the number of nodes.\n */\nexport const CUSTOM_HARDWARE_SIZING_ELASTICSEARCH_TOTAL_CAPS = {\n cpu: 900,\n memoryGi: 3000,\n storageGi: 100_000,\n} as const\n\n/**\n * The same, for the pods of one component that has `replicas`, such as\n * Operate or the gateway. Ten times the prod maximum: 12 CPU (the gateway, 3\n * replicas of 4 CPU) and 60 GiB of memory (Operate, 2 replicas of 30 GiB). No\n * component of prod has storage in its pod resources, so the storage total is\n * the cap for one pod, 10 times over. The check counts a storage request of a\n * pod in `resources` against it.\n */\nexport const CUSTOM_HARDWARE_SIZING_REPLICA_SET_TOTAL_CAPS = {\n cpu: 120,\n memoryGi: 600,\n storageGi: 50_000,\n} as const\n\nconst GIBIBYTE = 1024 ** 3\n\nconst QUANTITY_MULTIPLIERS: Record<string, number> = {\n '': 1,\n m: 1e-3,\n k: 1e3,\n M: 1e6,\n G: 1e9,\n T: 1e12,\n P: 1e15,\n Ki: 1024,\n Mi: 1024 ** 2,\n Gi: 1024 ** 3,\n Ti: 1024 ** 4,\n Pi: 1024 ** 5,\n}\n\nconst QUANTITY_PATTERN = /^([0-9]+(?:\\.[0-9]+)?)(m|k|M|G|T|P|Ki|Mi|Gi|Ti|Pi)?$/u\n\n/**\n * Reads a Kubernetes quantity such as `500m`, `2`, `4Gi` or `1G`, and returns\n * its value in base units: cores for a CPU, bytes for memory and storage.\n *\n * Returns `undefined` for a text that this function cannot read, so the\n * caller can refuse it. The exponent form (`1e3`) is not read on purpose.\n */\nexport function parseKubernetesQuantity(value: unknown): number | undefined {\n if (typeof value === 'number') {\n return Number.isFinite(value) && value >= 0 ? value : undefined\n }\n if (typeof value !== 'string') {\n return undefined\n }\n const match = QUANTITY_PATTERN.exec(value)\n if (!match) {\n return undefined\n }\n return Number(match[1]) * (QUANTITY_MULTIPLIERS[match[2] ?? ''] ?? 1)\n}\n\ntype ComponentKind = keyof typeof CUSTOM_HARDWARE_SIZING_RESOURCE_CAPS\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n\nfunction componentOf(path: string[]): ComponentKind {\n if (path[0] === 'zeebe' && path[1] === 'broker') {\n return 'broker'\n }\n if (path[0] === 'elasticsearch') {\n return 'elasticsearch'\n }\n return 'other'\n}\n\nfunction checkNumberCap(\n violations: string[],\n path: string[],\n value: unknown,\n cap: number,\n): void {\n const name = path.join('.')\n const parsed = parseKubernetesQuantity(value)\n if (parsed === undefined) {\n violations.push(`${name} is not a number that can be checked`)\n } else if (parsed > cap) {\n violations.push(`${name} is ${parsed}, and the most is ${cap}`)\n }\n}\n\nfunction checkResource(\n violations: string[],\n path: string[],\n value: unknown,\n kind: 'cpu' | 'memory' | 'storage',\n): void {\n const name = path.join('.')\n const caps = CUSTOM_HARDWARE_SIZING_RESOURCE_CAPS[componentOf(path)]\n const parsed = parseKubernetesQuantity(value)\n if (parsed === undefined) {\n violations.push(`${name} is not a quantity that can be checked`)\n return\n }\n if (kind === 'cpu') {\n if (parsed > caps.cpu) {\n violations.push(`${name} is ${parsed} CPU, and the most is ${caps.cpu}`)\n }\n return\n }\n const cap = kind === 'memory' ? caps.memoryGi : caps.storageGi\n if (parsed / GIBIBYTE > cap) {\n violations.push(`${name} is over ${cap} GiB`)\n }\n}\n\nfunction walk(violations: string[], node: unknown, path: string[]): void {\n if (!isRecord(node)) {\n return\n }\n for (const [key, value] of Object.entries(node)) {\n // The shape check of console treats `null` like an absent key, so this\n // check does too. A `null` has nothing to cap.\n if (value === null || value === undefined) {\n continue\n }\n const next = [...path, key]\n const parent = path.at(-1)\n const grandParent = path.at(-2)\n if (\n Object.hasOwn(CUSTOM_HARDWARE_SIZING_COUNT_CAPS, key) &&\n !isRecord(value)\n ) {\n checkNumberCap(\n violations,\n next,\n value,\n CUSTOM_HARDWARE_SIZING_COUNT_CAPS[\n key as keyof typeof CUSTOM_HARDWARE_SIZING_COUNT_CAPS\n ],\n )\n } else if (\n (parent === 'limits' || parent === 'requests') &&\n grandParent === 'resources' &&\n (key === 'cpu' || key === 'memory' || key === 'storage')\n ) {\n checkResource(violations, next, value, key)\n } else if (\n (parent === 'limits' || parent === 'requests') &&\n grandParent === 'resources'\n ) {\n // Any other resource name (`ephemeral-storage`, a GPU) has no cap.\n violations.push(`${next.join('.')} is not a resource that has a cap`)\n } else if (key === 'persistentStorageCapacity') {\n // The legacy size of the volume. The operator can still read it.\n checkResource(violations, next, value, 'storage')\n } else if (parent === 'autoResizing' && key === 'increase') {\n // Only the step is capped. The disk itself stops at\n // `storage.resources.limits.storage`: `Plan.type.ts` calls it \"the upper\n // limit the pvc autoscaler can scale up to\", and the operator hands it\n // to the autoscaler as the storage limit of the PVC. The caps for that\n // field, for one node and for all nodes together, bound the size that a\n // disk can reach. `threshold` has no effect on that size.\n const parsed = parseKubernetesQuantity(value)\n if (\n parsed === undefined ||\n parsed / GIBIBYTE > CUSTOM_HARDWARE_SIZING_MAX_AUTO_RESIZE_INCREASE_GI\n ) {\n violations.push(\n `${next.join('.')} is not a quantity of at most ${CUSTOM_HARDWARE_SIZING_MAX_AUTO_RESIZE_INCREASE_GI} GiB`,\n )\n }\n } else {\n walk(violations, value, next)\n }\n }\n}\n\nconst larger = (\n block: Record<string, unknown> | undefined,\n key: string,\n): number | undefined => {\n const values = [block?.limits, block?.requests].map((entry) =>\n isRecord(entry) ? parseKubernetesQuantity(entry[key]) : undefined,\n )\n const known = values.filter((value) => value !== undefined)\n return known.length > 0 ? Math.max(...known) : undefined\n}\n\n/**\n * Checks the whole node set of one component against its totals. The caps for\n * one node do not bound `count` nodes together.\n *\n * Kubernetes schedules on `requests`, and a plan can set only `requests`. The\n * total reads the larger of the two, so that neither one skips it. The legacy\n * `persistentStorageCapacity` counts as storage too.\n */\nfunction checkSetTotals(\n violations: string[],\n who: string,\n count: unknown,\n parts: {\n resources: unknown\n storageResources: unknown\n legacyStorage: unknown\n },\n caps: { cpu: number; memoryGi: number; storageGi: number },\n): void {\n const nodes = parseKubernetesQuantity(count)\n if (nodes === undefined) {\n return\n }\n const resources = isRecord(parts.resources) ? parts.resources : undefined\n const storageResources = isRecord(parts.storageResources)\n ? parts.storageResources\n : undefined\n const cpu = larger(resources, 'cpu')\n if (cpu !== undefined && cpu * nodes > caps.cpu) {\n violations.push(`${who} together ask for more than ${caps.cpu} CPU`)\n }\n const memory = larger(resources, 'memory')\n if (memory !== undefined && (memory * nodes) / GIBIBYTE > caps.memoryGi) {\n violations.push(\n `${who} together ask for more than ${caps.memoryGi} GiB of memory`,\n )\n }\n const disks = [\n larger(storageResources, 'storage'),\n parseKubernetesQuantity(parts.legacyStorage),\n ].filter((value) => value !== undefined)\n if (\n disks.length > 0 &&\n (Math.max(...disks) * nodes) / GIBIBYTE > caps.storageGi\n ) {\n violations.push(\n `${who} together ask for more than ${caps.storageGi} GiB of storage`,\n )\n }\n}\n\n/**\n * Walks the plan for every component that has `replicas`, and checks its pods\n * together. The pod resources are in `resources`, or in `backend.resources`.\n * The brokers (`clusterSize`) and Elasticsearch (`nodesCount`) have their own\n * count and their own totals.\n */\nfunction checkReplicaSets(\n violations: string[],\n node: unknown,\n path: string[],\n): void {\n if (!isRecord(node)) {\n return\n }\n if (\n node.replicas !== undefined &&\n node.replicas !== null &&\n !isRecord(node.replicas)\n ) {\n const backend = isRecord(node.backend) ? node.backend : undefined\n const podResources = node.resources ?? backend?.resources\n checkSetTotals(\n violations,\n `the replicas of ${path.join('.') || 'the plan'}`,\n node.replicas,\n {\n resources: podResources,\n // The same block: a pod can ask for storage in its resources too.\n storageResources: podResources,\n legacyStorage: undefined,\n },\n CUSTOM_HARDWARE_SIZING_REPLICA_SET_TOTAL_CAPS,\n )\n }\n for (const [key, value] of Object.entries(node)) {\n checkReplicaSets(violations, value, [...path, key])\n }\n}\n\nfunction checkNodeSetTotals(\n violations: string[],\n plan: Record<string, unknown>,\n): void {\n const zeebe = isRecord(plan.zeebe) ? plan.zeebe : undefined\n const broker = isRecord(zeebe?.broker) ? zeebe.broker : undefined\n if (broker) {\n const storage = isRecord(broker.storage) ? broker.storage : undefined\n checkSetTotals(\n violations,\n 'the brokers',\n broker.clusterSize,\n {\n resources: broker.resources,\n storageResources: storage?.resources,\n legacyStorage: broker.persistentStorageCapacity,\n },\n CUSTOM_HARDWARE_SIZING_BROKER_TOTAL_CAPS,\n )\n }\n checkReplicaSets(violations, plan, [])\n const elasticsearch = isRecord(plan.elasticsearch)\n ? plan.elasticsearch\n : undefined\n if (elasticsearch) {\n const config = isRecord(elasticsearch.config)\n ? elasticsearch.config\n : undefined\n const storage = isRecord(config?.storage) ? config.storage : undefined\n checkSetTotals(\n violations,\n 'the Elasticsearch nodes',\n config?.nodesCount,\n {\n resources: elasticsearch.resources,\n storageResources: storage?.resources,\n legacyStorage: elasticsearch.persistentStorageCapacity,\n },\n CUSTOM_HARDWARE_SIZING_ELASTICSEARCH_TOTAL_CAPS,\n )\n }\n}\n\n/**\n * Checks a cluster plan against the caps of custom hardware sizing.\n *\n * Returns the list of violations, and an empty list when the plan is within\n * the caps. It checks the size only. The shape of the plan is the job of the\n * plan validator of console-backend.\n *\n * A value that this function cannot read is a violation too: a cap that the\n * plan can skip with a strange spelling is no cap.\n */\nexport function checkCustomHardwareSizing(plan: unknown): string[] {\n if (!isRecord(plan)) {\n return ['the plan is not an object']\n }\n if (\n JSON.stringify(plan).length > CUSTOM_HARDWARE_SIZING_MAX_PLAN_JSON_LENGTH\n ) {\n return [\n `the plan is longer than ${CUSTOM_HARDWARE_SIZING_MAX_PLAN_JSON_LENGTH} characters`,\n ]\n }\n // `operate.elasticsearch` is the old place of the Elasticsearch block. The\n // caps for Elasticsearch must read it as one place, so the plan is moved\n // to the canonical form first.\n const canonical = canonicalPlan(plan)\n const violations: string[] = []\n walk(violations, canonical, [])\n checkNodeSetTotals(violations, canonical)\n return violations\n}\n"],
|
|
5
|
+
"mappings": "AAMA,SAAS,qBAAqB;AAqBvB,MAAM,8BAA8B,CAAC,UAC1C,UAAU,SAAS,UAAU;AAQxB,MAAM,iDAAiD;AAGvD,MAAM,yCAAyC;AAC/C,MAAM,yCAAyC;AAM/C,MAAM,8CAA8C;AAqBpD,MAAM,uCAAuC;AAAA,EAClD,QAAQ,EAAE,KAAK,KAAK,UAAU,KAAK,WAAW,IAAK;AAAA,EACnD,eAAe,EAAE,KAAK,KAAK,UAAU,KAAM,WAAW,IAAO;AAAA,EAC7D,OAAO,EAAE,KAAK,IAAI,UAAU,KAAK,WAAW,IAAK;AACnD;AAGO,MAAM,oCAAoC;AAAA;AAAA,EAE/C,aAAa;AAA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599
599
|
/**
|
|
600
600
|
* A use case with no approval that any signed-in person can open AND run.
|
|
601
|
+
* A use case can still set `createPermission` for a stage (custom plans on
|
|
602
|
+
* int).
|
|
601
603
|
*
|
|
602
604
|
* A request with a floor of zero runs when it is opened, so `canCreate`
|
|
603
605
|
* asks the person to hold `requiredPermission`. This flag lifts that one
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/dtos/ApprovalJob.dto.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\n/**\n * The wire types of the generic approval mechanism.\n *\n * This file holds no logic and no dependency, because three consumers read it:\n * control-backend, control-frontend and cloudbot. The rules that read these\n * types are in `../approvals/policy.js`, and they are pure for the same reason.\n */\n\nimport type { ApprovalIncidentDto } from '../approvals/incident-link.js'\n\n/**\n * Every state that an approval request can hold.\n *\n * A `const` tuple, not an enum, so it is both the union type and the list that\n * validates a status filter at run time.\n *\n * The path of a request: `pending` until it reaches the threshold. Then\n * `executing` (automatic mode) or `approved` (explicit mode, which waits for a\n * person to press the button). `executed` or `failed` after the action ran. A\n * request that never reaches the threshold ends `rejected`, `withdrawn` or\n * `expired`.\n *\n * `scheduled` is a request that the service opened by itself, and that runs\n * at `runAt` with no approval. It does not expire, and nobody can withdraw or\n * reject it. A holder of its permissions can run it before `runAt`.\n */\nexport const APPROVAL_JOB_STATUSES = [\n 'pending',\n 'scheduled',\n 'approved',\n 'executing',\n 'executed',\n 'failed',\n 'rejected',\n 'withdrawn',\n 'expired',\n] as const\n\nexport type ApprovalJobStatus = (typeof APPROVAL_JOB_STATUSES)[number]\n\n/**\n * The states in which the action of a request is still COMING.\n *\n * `pending` waits for approvals, `scheduled` waits for its time, `approved`\n * waits for a person to press the button, and `executing` is running now. Each of them can still change the\n * world, so two requests for one target must not be in these states together.\n * `dedupeKey` reads this set for that reason.\n *\n * `failed` is NOT here, although a person can run a failed request again. A\n * failed request runs only when a person presses the button, and that person\n * sees the row. Blocking a new request on a failed one would also trap the\n * key: `canWithdraw` accepts `pending` alone, so nobody could close it.\n *\n * `executed`, `rejected`, `withdrawn` and `expired` are the end of a request.\n */\nexport const APPROVAL_LIVE_STATUSES = [\n 'pending',\n 'scheduled',\n 'approved',\n 'executing',\n] as const satisfies readonly ApprovalJobStatus[]\n\n/**\n * How many requests one page of the list holds when the caller asks for no\n * number.\n *\n * The list is a work queue that a Camundi reads, so the page is large: a\n * person wants the whole queue and not ten rows at a time. What the number is\n * for is the ceiling below.\n */\nexport const APPROVAL_PAGE_SIZE_DEFAULT = 500\n\n/**\n * The largest page that the service builds, and the largest that a caller may\n * ask for. The API answers 400 above it.\n *\n * The list had no limit at all. One authenticated caller could then make the\n * service read the whole table into memory, serialize it, and do it again, so\n * the cost of a request grew with the age of the service and with nothing that\n * the caller had to pay for. A ceiling turns that into a fixed cost.\n *\n * It is HERE and not only in the service, because the view must know it: a\n * page that asked for more would get a 400 instead of rows.\n */\nexport const APPROVAL_PAGE_SIZE_MAX = 2000\n\n/**\n * The columns that the queue can be ordered by.\n *\n * A NAME and not an SQL expression: the repository maps each one, so a caller\n * can never name a column that this list does not hold. `status` orders by the\n * EFFECTIVE status, because a `pending` row whose time ran out reads as\n * `expired` everywhere else.\n */\nexport const APPROVAL_SORT_FIELDS = [\n 'createdAt',\n 'expiresAt',\n 'status',\n 'type',\n 'createdBy',\n] as const\n\nexport type ApprovalSortField = (typeof APPROVAL_SORT_FIELDS)[number]\n\nexport type ApprovalSortOrder = 'asc' | 'desc'\n\n/** The default order of the queue: the newest request first. */\nexport const APPROVAL_SORT_DEFAULT: {\n sort: ApprovalSortField\n order: ApprovalSortOrder\n} = { sort: 'createdAt', order: 'desc' }\n\n/**\n * The longest reason that a request, a rejection or a withdrawal accepts.\n *\n * ONE number, because three routes of control-backend hold it and three fields\n * of control-frontend must stop there. A field that let a person write more\n * than the schema accepts turns their sentence into a 400 after they wrote it.\n */\nexport const APPROVAL_REASON_MAX_LENGTH = 2000\n\n/**\n * The largest number of approvals that a caller can ask for.\n *\n * A request that asks for 400 approvals can never reach them, so it is a\n * request that only fills the table and expires. The ceiling turns that into a\n * 400 at the moment a person types it. It is HERE because the form of the\n * bulk operation must stop at the same number as the route.\n */\nexport const APPROVAL_ACKS_MAX = 10\n\n/**\n * The longest search text that the list accepts.\n *\n * A search runs `ILIKE` over the payload of every visible row, so the cost of\n * one call follows the length of the text. Nothing a person types to find a\n * request is near this.\n */\nexport const APPROVAL_SEARCH_MAX_LENGTH = 200\n\n/**\n * APPROVAL_TYPE_FILTER_MAX is the most use case types that one `type` filter\n * names. The registry holds fewer, so the ceiling only stops a list with no\n * end. control-backend answers 400 above it.\n */\nexport const APPROVAL_TYPE_FILTER_MAX = 100\n\n/** APPROVAL_TYPE_MAX_LENGTH is the longest type that a `type` filter names. */\nexport const APPROVAL_TYPE_MAX_LENGTH = 200\n\n/**\n * The payload field that names the organization a request acts on.\n *\n * It is a CONVENTION, and this constant is what makes the convention readable\n * from both sides. A use case whose action hits one organization puts the id of\n * that organization in this field, and `GET /api/approvals?orgId=\u2026` then finds\n * the request with no knowledge of the use case. The filter reads this one\n * field of the payload, so it matches the whole id and nothing else. The free\n * text search reads the payload as TEXT, which also matches an id that only\n * appears inside another field, and it cannot answer \"the requests of this\n * organization\".\n *\n * The organization page of control-frontend does NOT read this field. It asks\n * the entity-link filter (`entityType=org`), which reads a row that\n * `relatedEntities` of a use case writes \u2014 see `ApprovalEntityRef`. The summary\n * is separate again: the `org` field of a `summarize` result is what a READER\n * follows.\n */\nexport const APPROVAL_PAYLOAD_ORG_FIELD = 'orgId'\n\n/**\n * How many requests each status and each use case type holds, for the filters\n * of the queue.\n *\n * Every status number answers the SAME question as the list beside it: the\n * counts are built with the visibility rule, the action filter and the search\n * text of the caller, and with the lazy expiry. A count that ignored one of\n * those would send a person to a filter that then shows nothing. `byType` is\n * the exception: see its own note.\n */\nexport interface ApprovalStatusCountsDto {\n /** Every request that matches, whatever its status. */\n all: number\n /** One number for each status. A status with no request is 0, never absent. */\n byStatus: Record<ApprovalJobStatus, number>\n /**\n * One number for each use case type, over every status.\n *\n * It ignores the type filter, so a type facet keeps its number while it is\n * on or off. Every other filter applies. A type with no request has no key,\n * so read a missing key as 0, and read only an own key: a type id such as\n * `__proto__` must not reach the prototype.\n *\n * Optional, because an older control-backend does not send it. Read an\n * absent field as no counts.\n */\n byType?: Record<string, number>\n}\n\n/**\n * What happens when a request reaches its threshold.\n *\n * `auto` runs the action immediately. `explicit` holds the request at\n * `approved` and waits for a person to run it.\n */\nexport type ApprovalExecutionMode = 'auto' | 'explicit'\n\n/**\n * WHERE the action runs. It is a separate question from who starts it.\n *\n * - `inline` runs the action inside the call that started it, and the answer\n * already carries the outcome. Right for one call to another service.\n * - `background` answers as soon as the request is claimed, and the action\n * runs on. It reports into `ApprovalJobDto.progress`, and the row is the\n * only place that holds the progress, so a reload and a second person read\n * the same numbers. A pod that stops loses the run, and the reconciler of\n * control-backend recovers the row.\n *\n * An action over thousands of targets MUST be `background`. `inline` would\n * hold one HTTP request for the whole run, and the ingress, the load balancer\n * and the browser each have their own deadline before it finishes.\n *\n * An `inline` action must not read `context.signal`. The runner trusts the\n * result of an `inline` action that returns after a drain, and it would count\n * a partial run as `executed`. An action that stops between targets is\n * `background`.\n */\nexport type ApprovalActionMode = 'inline' | 'background'\n\n/**\n * A person, as an approval request records them.\n *\n * Both keys are kept. The machine then never has to choose one identity key,\n * which is what split the earlier acknowledgement flows: some held an email and\n * some held a user id, and the two could not be compared.\n */\nexport interface ApprovalActor {\n userId: string\n email: string\n}\n\nexport interface ApprovalAck extends ApprovalActor {\n /** An ISO timestamp. It is in a json column, so it is a string, not a Date. */\n date: string\n}\n\n/**\n * Who asked for an action, and who agreed to it.\n *\n * Every route of `api/admin/approvals` takes this envelope, and control-backend\n * builds it from the request that it runs. The envelope exists because the\n * token cannot carry it: the call is machine to machine, so `sub` holds the id\n * of the Auth0 application and not a person. A service that reads the token\n * alone therefore writes \"control-backend\" into its audit record, which hides\n * the two Camundis that the whole mechanism exists to record.\n *\n * `approvedBy` is a list, because a use case can need more than one approval,\n * and the record must name all of them. It can also be EMPTY: how many\n * approvals an action needs is a number of the use case, and `move-cluster-org`\n * holds zero on purpose. The person in `requestedBy` is never in the list: the\n * four-eyes rule is that the person who asks is not the person who agrees, and\n * control-backend holds that rule.\n *\n * Each person carries both keys of `ApprovalActor`. The email is what a route\n * uses to ask Auth0 about the person, and the user id is what an audit record\n * holds, because every other record of the fleet holds an Auth0 `sub`.\n *\n * CAUTION: The envelope is a CLAIM of the caller, and not proof. A route that\n * acts on it must ask Auth0 again whether `requestedBy` may do the action.\n * That means the permission of the action. For a use case with\n * `openToEveryone`, it means that the person is a Camundi, because no\n * permission runs that action. `api/admin/approvals` in accounts-ng does\n * that. See the note on `M2M_CONTROL_APPROVALS`.\n */\nexport interface ApprovalM2mActor {\n /** The id of the approval request, to join the records of both services. */\n requestId: string\n /** The Camundi who opened the request. */\n requestedBy: ApprovalActor\n /** The Camundis who approved it. Empty when the use case needs none. */\n approvedBy: ApprovalActor[]\n /**\n * The Camundi who ran the request with an approval override grant, in\n * place of the approvals that it still needed. Absent for every other run.\n *\n * control-backend checked the grant, the permissions of this person and\n * `APPROVAL_OVERRIDE_DENYLIST` before the run. A receiver that counts the\n * approvals of an overridable type accepts this person in place of the\n * approvals that are missing, and refuses this field for every other type.\n * This person can be the person in `requestedBy`, because that is what a\n * grant is for. A receiver that refuses the target of an action as an\n * approver refuses this person as well, also when they asked.\n */\n overriddenBy?: ApprovalActor\n}\n\n/**\n * What one value of a summary field is.\n *\n * `text` is what a person reads. `id` is what a link points at, and it is\n * absent when the kind names no entity. The two are separate because the text\n * is a COPY that the request keeps: an organization that gets a new name after\n * the request was opened must still read as the organization that the person\n * chose.\n */\nexport interface ApprovalSummaryValue {\n text: string\n id?: string\n}\n\n/**\n * How a reader must render one field of a summary.\n *\n * `org`, `cluster` and `user` name an entity, so a reader can link to it and\n * can resolve a fresh name. The others are plain: `date` is an ISO timestamp,\n * and `code` is a value that must keep its characters, such as a json fragment.\n */\nexport const APPROVAL_SUMMARY_FIELD_KINDS = [\n 'text',\n 'number',\n 'boolean',\n 'date',\n 'org',\n 'cluster',\n 'user',\n 'code',\n] as const\n\nexport type ApprovalSummaryFieldKind =\n (typeof APPROVAL_SUMMARY_FIELD_KINDS)[number]\n\n/**\n * One labelled field of the payload of a request.\n *\n * This is what makes ONE view able to show EVERY use case. The payload of a\n * request is an object of anything, so a generic view can only print it as\n * json. The use case turns it into labelled fields here, and the view renders\n * a field by its kind: it links an `org`, it formats a `date`, and it lists\n * 300 clusters as 300 links.\n *\n * `values` is always an array. A field that holds one value holds an array of\n * one, so a reader needs no branch for \"one or many\".\n */\nexport interface ApprovalSummaryField {\n label: string\n kind: ApprovalSummaryFieldKind\n values: ApprovalSummaryValue[]\n /**\n * The values that this request replaces, for a field that changes. A view\n * shows them as removed beside `values` as added. A field with no\n * `previous` is not a change.\n */\n previous?: ApprovalSummaryValue[]\n /** The count of `previous`, when the list cut it. Like `total`, for `previous`. */\n previousTotal?: number\n /**\n * How many values the field holds, when `values` holds only the first of\n * them. The list route cuts every field to `APPROVAL_LIST_SUMMARY_VALUES_MAX`\n * values. The detail route sends every value and no `total`.\n */\n total?: number\n}\n\n/**\n * How many values of one summary field a row of the list carries.\n *\n * A bulk operation names up to 3000 clusters in one field. A page of 100 such\n * rows would carry 300,000 values that no row shows. The view shows at most\n * 12 values of a field, so the list stops there, and `total` holds the count.\n */\nexport const APPROVAL_LIST_SUMMARY_VALUES_MAX = 12\n\n/**\n * The kinds of entity that an approval request can concern.\n *\n * These are the entities that a request is findable by: the org and cluster\n * detail pages ask \"which requests touch me\", and the answer reads a row for\n * each entity. It is a subset of `APPROVAL_SUMMARY_FIELD_KINDS` \u2014 the kinds that\n * name an entity \u2014 because only those carry an id that a page can match.\n */\nexport const APPROVAL_ENTITY_TYPES = ['cluster', 'org', 'user'] as const\n\nexport type ApprovalEntityType = (typeof APPROVAL_ENTITY_TYPES)[number]\n\n/**\n * One entity that an approval request concerns.\n *\n * A use case reports these from its payload, and the service writes one row for\n * each into `approval_job_entity`. That row is what makes a request findable by\n * an entity it touches, without a text search over the payload: a cluster-move\n * request names its cluster, its target organization AND its source\n * organization, so it shows on all three detail pages. The `summary` still\n * carries the words a reader sees; this carries only the ids a page matches.\n */\nexport interface ApprovalEntityRef {\n type: ApprovalEntityType\n id: string\n}\n\n/**\n * How long a run may go quiet before a reader calls it stalled.\n *\n * The pod that runs an action writes its progress and renews its lease on one\n * timer, so a healthy run touches the row well inside this window. A row that\n * is `executing` and older than this held a pod that stopped, and the\n * reconciler of control-backend is on its way to it.\n *\n * It lives here, and not in the config of the service, because a READER needs\n * it: the browser must decide what to show without a second call, and a number\n * that only the backend knew would make the two disagree. `ACTION_LEASE_MS` in\n * `config/index.ts` is held below this on purpose.\n */\nexport const APPROVAL_RUN_STALE_MS = 120_000\n\n/**\n * What an action reports while it runs.\n *\n * This is what makes a long action watchable. Every field is in the DATABASE\n * and not in the answer to the call that started the run, so three readers see\n * the same thing: the person who pressed the button, the same person after a\n * reload, and a second person who opens the request.\n *\n * `total` can be 0 while an action counts its targets, and it stays 0 for an\n * action that cannot count them. A reader must then show that it runs, and no\n * percentage.\n */\nexport interface ApprovalProgress {\n /** Targets in total. 0 means the action did not say. */\n total: number\n /** Targets finished, whatever the outcome of each one. */\n done: number\n /** Targets that finished with an error. Part of `done`. */\n failed: number\n /** One short line for a person, such as the step that runs now. */\n note?: string\n /** An ISO timestamp: when the run started. */\n startedAt: string\n /** An ISO timestamp: when the run last wrote anything. */\n updatedAt: string\n}\n\n/** The share of the work that is finished, or `undefined` with no total. */\nexport function progressFraction(\n progress: ApprovalProgress | undefined,\n): number | undefined {\n if (!progress || progress.total <= 0) {\n return undefined\n }\n return Math.min(1, progress.done / progress.total)\n}\n\n/**\n * Reports whether a running request went quiet.\n *\n * True means that the pod which held the run stopped, or lost the row. It does\n * NOT mean that the action failed: the reconciler either runs it again, or it\n * writes `failed` so that a person can. See `APPROVAL_RUN_STALE_MS`.\n */\nexport function isRunStalled(job: ApprovalJobDto, now: Date): boolean {\n if (job.status !== 'executing') {\n return false\n }\n const lastSign = job.progress?.updatedAt ?? job.executingSince\n if (!lastSign) {\n return false\n }\n return now.getTime() - new Date(lastSign).getTime() > APPROVAL_RUN_STALE_MS\n}\n\n/** One approval request, as the API returns it. */\nexport interface ApprovalJobDto {\n id: string\n type: string\n dedupeKey?: string\n payload: Record<string, unknown>\n /**\n * The payload as labelled fields. See `ApprovalSummaryField`.\n *\n * The use case builds it when the request is opened AND every time the\n * request is read, so a field that a later version of the use case adds\n * appears on a request that is already open.\n */\n summary: ApprovalSummaryField[]\n /** Why the person opened the request. Some use cases demand one. */\n reason?: string\n createdBy: ApprovalActor\n acks: ApprovalAck[]\n /**\n * How many approvals THIS request needs.\n *\n * It is on the request and not only on the use case, because the person who\n * opens one can ask for more than the floor of the use case. A bulk\n * operation over 3000 clusters is the same action as one over 3, and it can\n * still deserve a third pair of eyes. `ApprovalUseCaseDto.minAcks` is the\n * floor that a caller cannot go below.\n */\n requiredAcks: number\n /**\n * What a person must hold to approve, reject or run THIS request.\n *\n * It is on the request and not only on the use case, because a payload can\n * raise the guard: a generation update with `yoloForceUpdate` needs the yolo\n * permission on top of the base one, and the same use case without the flag\n * does not. The set is computed ONE time, when the request is opened, so it\n * is also the record of what the request was guarded by.\n *\n * A person needs EVERY permission in the set, not one of them.\n */\n requiredPermissions: string[]\n executionMode: ApprovalExecutionMode\n actionMode: ApprovalActionMode\n status: ApprovalJobStatus\n closedBy?: ApprovalActor\n closedReason?: string\n /** An ISO timestamp. */\n expiresAt: string\n /**\n * An ISO timestamp: when the current run took the request.\n *\n * It is set every time a run starts, so a run that the reconciler starts\n * again moves it. `attempts` says how many runs there were.\n */\n executingSince?: string\n /** How many times a run started. A recovery raises it. */\n attempts: number\n /**\n * What the action reports while it runs. See `ApprovalProgress`.\n *\n * It stays on the row after the run, so the record of a finished run says\n * how many targets it touched and how many refused.\n */\n progress?: ApprovalProgress\n executedAt?: string\n executionError?: string\n /**\n * What the action reported when it ran.\n *\n * The shape belongs to the use case. An action over many targets puts the\n * result of each target here, which is the difference between \"it failed\"\n * and \"it did 2998 of 3000, and these two refused\".\n */\n executionResult?: Record<string, unknown>\n /** An ISO timestamp: when a `scheduled` request runs by itself. */\n runAt?: string\n /**\n * The person who ran this request with an approval override grant, in\n * place of the approvals that it still needed. See `canOverride`.\n */\n overriddenBy?: ApprovalActor\n /**\n * An ISO timestamp: when that person used the override. The run window of\n * an overridden request starts here. See `runWindowEnd`.\n */\n overriddenAt?: string\n /** Why that person used the override. It is necessary. */\n overrideReason?: string\n /**\n * The approval override grant that the override used. A later run needs\n * this grant to be active still. See `canRunOverridden`.\n */\n overrideGrantId?: string\n /**\n * The incident that a person linked to this request, if any. It is a copy\n * of the incident at the time of the link, so a read never calls incident.io.\n */\n incident?: ApprovalIncidentDto\n createdAt: string\n updatedAt: string\n}\n\n/**\n * One approval override grant, as the API returns it.\n *\n * A grant lets one Camundi run a `pending` request of an overridable use case\n * with no approval, until `expiresAt`. A grant is active while `revokedAt` is\n * absent and `expiresAt` is in the future. See `isOverrideGrantActive`.\n */\nexport interface ApprovalOverrideGrantDto {\n id: string\n /** The Auth0 `sub` of the person who holds the grant. */\n userId: string\n email: string\n /** The `grant-approval-override` request that made this grant. */\n grantedByJobId: string\n /** The `revoke-approval-override` request that ends this grant. */\n revokeJobId?: string\n reason: string\n /** An ISO timestamp. */\n createdAt: string\n /** An ISO timestamp. The grant ends here, also when no revoke ran. */\n expiresAt: string\n /** An ISO timestamp: when the revoke request ran. */\n revokedAt?: string\n revokedByJobId?: string\n}\n\n/**\n * What a use case is, as the API reports it.\n *\n * The frontend needs `requiredPermission` to run the same rule as the backend.\n * PR #9301 kept this registry a second time, by hand, in the frontend. A\n * registry that the server owns means a new use case needs no frontend deploy.\n */\nexport interface ApprovalUseCaseDto {\n type: string\n /** A short name for a person to read. */\n label: string\n /** One sentence: what the action does, and what it cannot undo. */\n description: string\n /** The approvals a new request asks for when the caller names no number. */\n defaultAcks: number\n /**\n * The floor. A caller can ask for more approvals, never for fewer.\n *\n * It is a separate number from `defaultAcks` because the two answer\n * different questions: the default is what the form offers, and the floor is\n * what the service refuses to go below.\n */\n minAcks: number\n ttlDays: number\n executionMode: ApprovalExecutionMode\n /** See `ApprovalActionMode`. An action over many targets is `background`. */\n actionMode: ApprovalActionMode\n /**\n * True when a run that was interrupted can start again by itself.\n *\n * It is a promise about the ACTION, and the reconciler reads it. Set it only\n * when the action can run a second time over the same payload and do no harm\n * twice: it must read what the first run already finished, out of\n * `ApprovalJobDto.executionResult`, and skip it.\n *\n * False, the default, is the safe answer. An interrupted run then lands in\n * `failed`, which a person can run again from the detail page, and a person\n * decides whether running it twice is safe.\n */\n resumable: boolean\n /**\n * The permission that every request of this use case needs to approve,\n * reject or run. A payload can add more. See\n * `ApprovalJobDto.requiredPermissions`, which is the effective set.\n *\n * It is also one permission to SEE a request of this use case. A holder of\n * `aara` sees it too, unless the use case sets `restrictedRead`, and the\n * person who opened a request always sees that request (see\n * `canReadUseCase` and `canView`).\n *\n * The one exception to \"or run\" is a use case with `openToEveryone`. It has\n * no approval, so this permission (or `aara`, see `canReadUseCase`) only\n * decides who sees the requests of other people. Any signed-in person can\n * open and run such a request.\n */\n requiredPermission: string\n /**\n * The permission to open a request. Absent means any signed-in Camundi.\n * A list means that any one of its permissions is enough. An empty list\n * opens the request to nobody, so give a list at least one entry.\n *\n * Set it when the pool that can ASK must be as small as the pool that can\n * approve. Leave it absent when the approvals alone are the guard, and the\n * proposal is not. Read it with `createPermissionsOf`.\n */\n createPermission?: string | string[]\n /** True when a request cannot be opened without a reason. */\n reasonRequired: boolean\n /**\n * True when the ACTION needs the email address of the person who asked.\n *\n * A token can carry no address, and the row then stores\n * `UNKNOWN_ACTOR_EMAIL`. An action that sends that placeholder to another\n * service asks it to find a user that does not exist, so the request can\n * only fail \u2014 and it fails at the END, after other people spent their\n * approvals on it. A use case that carries the creator into its call sets\n * this, and `canCreate` then refuses such a caller at the start.\n *\n * `extend-trial` and `send-to-expired-trial` are two: both send the creator\n * to accounts in an `ApprovalM2mActor`, and accounts reads the permissions\n * of that person again before it acts.\n *\n * `move-cluster-org` does NOT set this. Its envelope reaches console, which\n * reads the user id alone and needs no address.\n */\n creatorEmailRequired?: boolean\n /**\n * A use case with no approval that any signed-in person can open AND run.\n *\n * A request with a floor of zero runs when it is opened, so `canCreate`\n * asks the person to hold `requiredPermission`. This flag lifts that one\n * rule, for an action whose run needs no permission of the person. Set it\n * only when two things hold:\n *\n * - Something else bounds how often a person can ask.\n * - The service that runs the action authorizes the person again at its\n * source, so that nobody can change what is not theirs. The action can\n * touch an organization only when that check lets the person change it.\n *\n * `create-personal-organisation`, `convert-trial-to-internal`,\n * `delete-own-test-org` and the two use cases of custom hardware sizing set\n * it. `convert-trial-to-internal` does the second check in one way: accounts\n * reads the role of the person in the organization, and only an OWNER who is\n * a Camundi passes. The two use cases of custom hardware sizing do the second\n * check in three ways:\n *\n * - Creating a plan, and unlinking a plan from one organization, read the\n * role of the person in that organization. Only an OWNER passes.\n * - Linking an existing plan to an organization reads the same role.\n * Only an OWNER passes. The dedupe key is the only bound on how often a\n * person can ask for a link.\n * - Deleting a plan reads no role. Console checks that the person created\n * the plan. Accounts reads the organizations that the person is a member\n * of, in any role, and removes the plan from their lists.\n */\n openToEveryone?: boolean\n /**\n * A use case with no approval that only a service of the fleet opens.\n *\n * The service holds `createPermission`, an m2m permission, and not\n * `requiredPermission`. This flag lets that holder open and thus run a\n * request with a floor of zero. `requiredPermission` then decides only who\n * sees the requests and who can run a failed one again. Without a\n * `createPermission` the flag lifts nothing.\n *\n * `cluster-ttl-deletion` sets it. The request exists for the record: the\n * list, the entity pages and the audit trail show each deletion.\n */\n openedBySystem?: boolean\n /**\n * True when `READ_ALL` (`aara`) alone does not give read access to the\n * requests of this use case. It changes only who READS. The holders of\n * `requiredPermission`, the person who opened a request and an override\n * grantee still read it (see `canView`).\n *\n * Every other use case is readable with `aara`, the baseline read gate of\n * Control. A payload, summary or result can hold data that `aara` does not\n * read anywhere else. Set this flag when that data must stay with the\n * holders of `requiredPermission`, as for the details of an SSO connection.\n */\n restrictedRead?: boolean\n}\n"],
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\n/**\n * The wire types of the generic approval mechanism.\n *\n * This file holds no logic and no dependency, because three consumers read it:\n * control-backend, control-frontend and cloudbot. The rules that read these\n * types are in `../approvals/policy.js`, and they are pure for the same reason.\n */\n\nimport type { ApprovalIncidentDto } from '../approvals/incident-link.js'\n\n/**\n * Every state that an approval request can hold.\n *\n * A `const` tuple, not an enum, so it is both the union type and the list that\n * validates a status filter at run time.\n *\n * The path of a request: `pending` until it reaches the threshold. Then\n * `executing` (automatic mode) or `approved` (explicit mode, which waits for a\n * person to press the button). `executed` or `failed` after the action ran. A\n * request that never reaches the threshold ends `rejected`, `withdrawn` or\n * `expired`.\n *\n * `scheduled` is a request that the service opened by itself, and that runs\n * at `runAt` with no approval. It does not expire, and nobody can withdraw or\n * reject it. A holder of its permissions can run it before `runAt`.\n */\nexport const APPROVAL_JOB_STATUSES = [\n 'pending',\n 'scheduled',\n 'approved',\n 'executing',\n 'executed',\n 'failed',\n 'rejected',\n 'withdrawn',\n 'expired',\n] as const\n\nexport type ApprovalJobStatus = (typeof APPROVAL_JOB_STATUSES)[number]\n\n/**\n * The states in which the action of a request is still COMING.\n *\n * `pending` waits for approvals, `scheduled` waits for its time, `approved`\n * waits for a person to press the button, and `executing` is running now. Each of them can still change the\n * world, so two requests for one target must not be in these states together.\n * `dedupeKey` reads this set for that reason.\n *\n * `failed` is NOT here, although a person can run a failed request again. A\n * failed request runs only when a person presses the button, and that person\n * sees the row. Blocking a new request on a failed one would also trap the\n * key: `canWithdraw` accepts `pending` alone, so nobody could close it.\n *\n * `executed`, `rejected`, `withdrawn` and `expired` are the end of a request.\n */\nexport const APPROVAL_LIVE_STATUSES = [\n 'pending',\n 'scheduled',\n 'approved',\n 'executing',\n] as const satisfies readonly ApprovalJobStatus[]\n\n/**\n * How many requests one page of the list holds when the caller asks for no\n * number.\n *\n * The list is a work queue that a Camundi reads, so the page is large: a\n * person wants the whole queue and not ten rows at a time. What the number is\n * for is the ceiling below.\n */\nexport const APPROVAL_PAGE_SIZE_DEFAULT = 500\n\n/**\n * The largest page that the service builds, and the largest that a caller may\n * ask for. The API answers 400 above it.\n *\n * The list had no limit at all. One authenticated caller could then make the\n * service read the whole table into memory, serialize it, and do it again, so\n * the cost of a request grew with the age of the service and with nothing that\n * the caller had to pay for. A ceiling turns that into a fixed cost.\n *\n * It is HERE and not only in the service, because the view must know it: a\n * page that asked for more would get a 400 instead of rows.\n */\nexport const APPROVAL_PAGE_SIZE_MAX = 2000\n\n/**\n * The columns that the queue can be ordered by.\n *\n * A NAME and not an SQL expression: the repository maps each one, so a caller\n * can never name a column that this list does not hold. `status` orders by the\n * EFFECTIVE status, because a `pending` row whose time ran out reads as\n * `expired` everywhere else.\n */\nexport const APPROVAL_SORT_FIELDS = [\n 'createdAt',\n 'expiresAt',\n 'status',\n 'type',\n 'createdBy',\n] as const\n\nexport type ApprovalSortField = (typeof APPROVAL_SORT_FIELDS)[number]\n\nexport type ApprovalSortOrder = 'asc' | 'desc'\n\n/** The default order of the queue: the newest request first. */\nexport const APPROVAL_SORT_DEFAULT: {\n sort: ApprovalSortField\n order: ApprovalSortOrder\n} = { sort: 'createdAt', order: 'desc' }\n\n/**\n * The longest reason that a request, a rejection or a withdrawal accepts.\n *\n * ONE number, because three routes of control-backend hold it and three fields\n * of control-frontend must stop there. A field that let a person write more\n * than the schema accepts turns their sentence into a 400 after they wrote it.\n */\nexport const APPROVAL_REASON_MAX_LENGTH = 2000\n\n/**\n * The largest number of approvals that a caller can ask for.\n *\n * A request that asks for 400 approvals can never reach them, so it is a\n * request that only fills the table and expires. The ceiling turns that into a\n * 400 at the moment a person types it. It is HERE because the form of the\n * bulk operation must stop at the same number as the route.\n */\nexport const APPROVAL_ACKS_MAX = 10\n\n/**\n * The longest search text that the list accepts.\n *\n * A search runs `ILIKE` over the payload of every visible row, so the cost of\n * one call follows the length of the text. Nothing a person types to find a\n * request is near this.\n */\nexport const APPROVAL_SEARCH_MAX_LENGTH = 200\n\n/**\n * APPROVAL_TYPE_FILTER_MAX is the most use case types that one `type` filter\n * names. The registry holds fewer, so the ceiling only stops a list with no\n * end. control-backend answers 400 above it.\n */\nexport const APPROVAL_TYPE_FILTER_MAX = 100\n\n/** APPROVAL_TYPE_MAX_LENGTH is the longest type that a `type` filter names. */\nexport const APPROVAL_TYPE_MAX_LENGTH = 200\n\n/**\n * The payload field that names the organization a request acts on.\n *\n * It is a CONVENTION, and this constant is what makes the convention readable\n * from both sides. A use case whose action hits one organization puts the id of\n * that organization in this field, and `GET /api/approvals?orgId=\u2026` then finds\n * the request with no knowledge of the use case. The filter reads this one\n * field of the payload, so it matches the whole id and nothing else. The free\n * text search reads the payload as TEXT, which also matches an id that only\n * appears inside another field, and it cannot answer \"the requests of this\n * organization\".\n *\n * The organization page of control-frontend does NOT read this field. It asks\n * the entity-link filter (`entityType=org`), which reads a row that\n * `relatedEntities` of a use case writes \u2014 see `ApprovalEntityRef`. The summary\n * is separate again: the `org` field of a `summarize` result is what a READER\n * follows.\n */\nexport const APPROVAL_PAYLOAD_ORG_FIELD = 'orgId'\n\n/**\n * How many requests each status and each use case type holds, for the filters\n * of the queue.\n *\n * Every status number answers the SAME question as the list beside it: the\n * counts are built with the visibility rule, the action filter and the search\n * text of the caller, and with the lazy expiry. A count that ignored one of\n * those would send a person to a filter that then shows nothing. `byType` is\n * the exception: see its own note.\n */\nexport interface ApprovalStatusCountsDto {\n /** Every request that matches, whatever its status. */\n all: number\n /** One number for each status. A status with no request is 0, never absent. */\n byStatus: Record<ApprovalJobStatus, number>\n /**\n * One number for each use case type, over every status.\n *\n * It ignores the type filter, so a type facet keeps its number while it is\n * on or off. Every other filter applies. A type with no request has no key,\n * so read a missing key as 0, and read only an own key: a type id such as\n * `__proto__` must not reach the prototype.\n *\n * Optional, because an older control-backend does not send it. Read an\n * absent field as no counts.\n */\n byType?: Record<string, number>\n}\n\n/**\n * What happens when a request reaches its threshold.\n *\n * `auto` runs the action immediately. `explicit` holds the request at\n * `approved` and waits for a person to run it.\n */\nexport type ApprovalExecutionMode = 'auto' | 'explicit'\n\n/**\n * WHERE the action runs. It is a separate question from who starts it.\n *\n * - `inline` runs the action inside the call that started it, and the answer\n * already carries the outcome. Right for one call to another service.\n * - `background` answers as soon as the request is claimed, and the action\n * runs on. It reports into `ApprovalJobDto.progress`, and the row is the\n * only place that holds the progress, so a reload and a second person read\n * the same numbers. A pod that stops loses the run, and the reconciler of\n * control-backend recovers the row.\n *\n * An action over thousands of targets MUST be `background`. `inline` would\n * hold one HTTP request for the whole run, and the ingress, the load balancer\n * and the browser each have their own deadline before it finishes.\n *\n * An `inline` action must not read `context.signal`. The runner trusts the\n * result of an `inline` action that returns after a drain, and it would count\n * a partial run as `executed`. An action that stops between targets is\n * `background`.\n */\nexport type ApprovalActionMode = 'inline' | 'background'\n\n/**\n * A person, as an approval request records them.\n *\n * Both keys are kept. The machine then never has to choose one identity key,\n * which is what split the earlier acknowledgement flows: some held an email and\n * some held a user id, and the two could not be compared.\n */\nexport interface ApprovalActor {\n userId: string\n email: string\n}\n\nexport interface ApprovalAck extends ApprovalActor {\n /** An ISO timestamp. It is in a json column, so it is a string, not a Date. */\n date: string\n}\n\n/**\n * Who asked for an action, and who agreed to it.\n *\n * Every route of `api/admin/approvals` takes this envelope, and control-backend\n * builds it from the request that it runs. The envelope exists because the\n * token cannot carry it: the call is machine to machine, so `sub` holds the id\n * of the Auth0 application and not a person. A service that reads the token\n * alone therefore writes \"control-backend\" into its audit record, which hides\n * the two Camundis that the whole mechanism exists to record.\n *\n * `approvedBy` is a list, because a use case can need more than one approval,\n * and the record must name all of them. It can also be EMPTY: how many\n * approvals an action needs is a number of the use case, and `move-cluster-org`\n * holds zero on purpose. The person in `requestedBy` is never in the list: the\n * four-eyes rule is that the person who asks is not the person who agrees, and\n * control-backend holds that rule.\n *\n * Each person carries both keys of `ApprovalActor`. The email is what a route\n * uses to ask Auth0 about the person, and the user id is what an audit record\n * holds, because every other record of the fleet holds an Auth0 `sub`.\n *\n * CAUTION: The envelope is a CLAIM of the caller, and not proof. A route that\n * acts on it must ask Auth0 again whether `requestedBy` may do the action.\n * That means the permission of the action. For a use case with\n * `openToEveryone`, it means that the person is a Camundi, because no\n * permission runs that action. `api/admin/approvals` in accounts-ng does\n * that. See the note on `M2M_CONTROL_APPROVALS`.\n */\nexport interface ApprovalM2mActor {\n /** The id of the approval request, to join the records of both services. */\n requestId: string\n /** The Camundi who opened the request. */\n requestedBy: ApprovalActor\n /** The Camundis who approved it. Empty when the use case needs none. */\n approvedBy: ApprovalActor[]\n /**\n * The Camundi who ran the request with an approval override grant, in\n * place of the approvals that it still needed. Absent for every other run.\n *\n * control-backend checked the grant, the permissions of this person and\n * `APPROVAL_OVERRIDE_DENYLIST` before the run. A receiver that counts the\n * approvals of an overridable type accepts this person in place of the\n * approvals that are missing, and refuses this field for every other type.\n * This person can be the person in `requestedBy`, because that is what a\n * grant is for. A receiver that refuses the target of an action as an\n * approver refuses this person as well, also when they asked.\n */\n overriddenBy?: ApprovalActor\n}\n\n/**\n * What one value of a summary field is.\n *\n * `text` is what a person reads. `id` is what a link points at, and it is\n * absent when the kind names no entity. The two are separate because the text\n * is a COPY that the request keeps: an organization that gets a new name after\n * the request was opened must still read as the organization that the person\n * chose.\n */\nexport interface ApprovalSummaryValue {\n text: string\n id?: string\n}\n\n/**\n * How a reader must render one field of a summary.\n *\n * `org`, `cluster` and `user` name an entity, so a reader can link to it and\n * can resolve a fresh name. The others are plain: `date` is an ISO timestamp,\n * and `code` is a value that must keep its characters, such as a json fragment.\n */\nexport const APPROVAL_SUMMARY_FIELD_KINDS = [\n 'text',\n 'number',\n 'boolean',\n 'date',\n 'org',\n 'cluster',\n 'user',\n 'code',\n] as const\n\nexport type ApprovalSummaryFieldKind =\n (typeof APPROVAL_SUMMARY_FIELD_KINDS)[number]\n\n/**\n * One labelled field of the payload of a request.\n *\n * This is what makes ONE view able to show EVERY use case. The payload of a\n * request is an object of anything, so a generic view can only print it as\n * json. The use case turns it into labelled fields here, and the view renders\n * a field by its kind: it links an `org`, it formats a `date`, and it lists\n * 300 clusters as 300 links.\n *\n * `values` is always an array. A field that holds one value holds an array of\n * one, so a reader needs no branch for \"one or many\".\n */\nexport interface ApprovalSummaryField {\n label: string\n kind: ApprovalSummaryFieldKind\n values: ApprovalSummaryValue[]\n /**\n * The values that this request replaces, for a field that changes. A view\n * shows them as removed beside `values` as added. A field with no\n * `previous` is not a change.\n */\n previous?: ApprovalSummaryValue[]\n /** The count of `previous`, when the list cut it. Like `total`, for `previous`. */\n previousTotal?: number\n /**\n * How many values the field holds, when `values` holds only the first of\n * them. The list route cuts every field to `APPROVAL_LIST_SUMMARY_VALUES_MAX`\n * values. The detail route sends every value and no `total`.\n */\n total?: number\n}\n\n/**\n * How many values of one summary field a row of the list carries.\n *\n * A bulk operation names up to 3000 clusters in one field. A page of 100 such\n * rows would carry 300,000 values that no row shows. The view shows at most\n * 12 values of a field, so the list stops there, and `total` holds the count.\n */\nexport const APPROVAL_LIST_SUMMARY_VALUES_MAX = 12\n\n/**\n * The kinds of entity that an approval request can concern.\n *\n * These are the entities that a request is findable by: the org and cluster\n * detail pages ask \"which requests touch me\", and the answer reads a row for\n * each entity. It is a subset of `APPROVAL_SUMMARY_FIELD_KINDS` \u2014 the kinds that\n * name an entity \u2014 because only those carry an id that a page can match.\n */\nexport const APPROVAL_ENTITY_TYPES = ['cluster', 'org', 'user'] as const\n\nexport type ApprovalEntityType = (typeof APPROVAL_ENTITY_TYPES)[number]\n\n/**\n * One entity that an approval request concerns.\n *\n * A use case reports these from its payload, and the service writes one row for\n * each into `approval_job_entity`. That row is what makes a request findable by\n * an entity it touches, without a text search over the payload: a cluster-move\n * request names its cluster, its target organization AND its source\n * organization, so it shows on all three detail pages. The `summary` still\n * carries the words a reader sees; this carries only the ids a page matches.\n */\nexport interface ApprovalEntityRef {\n type: ApprovalEntityType\n id: string\n}\n\n/**\n * How long a run may go quiet before a reader calls it stalled.\n *\n * The pod that runs an action writes its progress and renews its lease on one\n * timer, so a healthy run touches the row well inside this window. A row that\n * is `executing` and older than this held a pod that stopped, and the\n * reconciler of control-backend is on its way to it.\n *\n * It lives here, and not in the config of the service, because a READER needs\n * it: the browser must decide what to show without a second call, and a number\n * that only the backend knew would make the two disagree. `ACTION_LEASE_MS` in\n * `config/index.ts` is held below this on purpose.\n */\nexport const APPROVAL_RUN_STALE_MS = 120_000\n\n/**\n * What an action reports while it runs.\n *\n * This is what makes a long action watchable. Every field is in the DATABASE\n * and not in the answer to the call that started the run, so three readers see\n * the same thing: the person who pressed the button, the same person after a\n * reload, and a second person who opens the request.\n *\n * `total` can be 0 while an action counts its targets, and it stays 0 for an\n * action that cannot count them. A reader must then show that it runs, and no\n * percentage.\n */\nexport interface ApprovalProgress {\n /** Targets in total. 0 means the action did not say. */\n total: number\n /** Targets finished, whatever the outcome of each one. */\n done: number\n /** Targets that finished with an error. Part of `done`. */\n failed: number\n /** One short line for a person, such as the step that runs now. */\n note?: string\n /** An ISO timestamp: when the run started. */\n startedAt: string\n /** An ISO timestamp: when the run last wrote anything. */\n updatedAt: string\n}\n\n/** The share of the work that is finished, or `undefined` with no total. */\nexport function progressFraction(\n progress: ApprovalProgress | undefined,\n): number | undefined {\n if (!progress || progress.total <= 0) {\n return undefined\n }\n return Math.min(1, progress.done / progress.total)\n}\n\n/**\n * Reports whether a running request went quiet.\n *\n * True means that the pod which held the run stopped, or lost the row. It does\n * NOT mean that the action failed: the reconciler either runs it again, or it\n * writes `failed` so that a person can. See `APPROVAL_RUN_STALE_MS`.\n */\nexport function isRunStalled(job: ApprovalJobDto, now: Date): boolean {\n if (job.status !== 'executing') {\n return false\n }\n const lastSign = job.progress?.updatedAt ?? job.executingSince\n if (!lastSign) {\n return false\n }\n return now.getTime() - new Date(lastSign).getTime() > APPROVAL_RUN_STALE_MS\n}\n\n/** One approval request, as the API returns it. */\nexport interface ApprovalJobDto {\n id: string\n type: string\n dedupeKey?: string\n payload: Record<string, unknown>\n /**\n * The payload as labelled fields. See `ApprovalSummaryField`.\n *\n * The use case builds it when the request is opened AND every time the\n * request is read, so a field that a later version of the use case adds\n * appears on a request that is already open.\n */\n summary: ApprovalSummaryField[]\n /** Why the person opened the request. Some use cases demand one. */\n reason?: string\n createdBy: ApprovalActor\n acks: ApprovalAck[]\n /**\n * How many approvals THIS request needs.\n *\n * It is on the request and not only on the use case, because the person who\n * opens one can ask for more than the floor of the use case. A bulk\n * operation over 3000 clusters is the same action as one over 3, and it can\n * still deserve a third pair of eyes. `ApprovalUseCaseDto.minAcks` is the\n * floor that a caller cannot go below.\n */\n requiredAcks: number\n /**\n * What a person must hold to approve, reject or run THIS request.\n *\n * It is on the request and not only on the use case, because a payload can\n * raise the guard: a generation update with `yoloForceUpdate` needs the yolo\n * permission on top of the base one, and the same use case without the flag\n * does not. The set is computed ONE time, when the request is opened, so it\n * is also the record of what the request was guarded by.\n *\n * A person needs EVERY permission in the set, not one of them.\n */\n requiredPermissions: string[]\n executionMode: ApprovalExecutionMode\n actionMode: ApprovalActionMode\n status: ApprovalJobStatus\n closedBy?: ApprovalActor\n closedReason?: string\n /** An ISO timestamp. */\n expiresAt: string\n /**\n * An ISO timestamp: when the current run took the request.\n *\n * It is set every time a run starts, so a run that the reconciler starts\n * again moves it. `attempts` says how many runs there were.\n */\n executingSince?: string\n /** How many times a run started. A recovery raises it. */\n attempts: number\n /**\n * What the action reports while it runs. See `ApprovalProgress`.\n *\n * It stays on the row after the run, so the record of a finished run says\n * how many targets it touched and how many refused.\n */\n progress?: ApprovalProgress\n executedAt?: string\n executionError?: string\n /**\n * What the action reported when it ran.\n *\n * The shape belongs to the use case. An action over many targets puts the\n * result of each target here, which is the difference between \"it failed\"\n * and \"it did 2998 of 3000, and these two refused\".\n */\n executionResult?: Record<string, unknown>\n /** An ISO timestamp: when a `scheduled` request runs by itself. */\n runAt?: string\n /**\n * The person who ran this request with an approval override grant, in\n * place of the approvals that it still needed. See `canOverride`.\n */\n overriddenBy?: ApprovalActor\n /**\n * An ISO timestamp: when that person used the override. The run window of\n * an overridden request starts here. See `runWindowEnd`.\n */\n overriddenAt?: string\n /** Why that person used the override. It is necessary. */\n overrideReason?: string\n /**\n * The approval override grant that the override used. A later run needs\n * this grant to be active still. See `canRunOverridden`.\n */\n overrideGrantId?: string\n /**\n * The incident that a person linked to this request, if any. It is a copy\n * of the incident at the time of the link, so a read never calls incident.io.\n */\n incident?: ApprovalIncidentDto\n createdAt: string\n updatedAt: string\n}\n\n/**\n * One approval override grant, as the API returns it.\n *\n * A grant lets one Camundi run a `pending` request of an overridable use case\n * with no approval, until `expiresAt`. A grant is active while `revokedAt` is\n * absent and `expiresAt` is in the future. See `isOverrideGrantActive`.\n */\nexport interface ApprovalOverrideGrantDto {\n id: string\n /** The Auth0 `sub` of the person who holds the grant. */\n userId: string\n email: string\n /** The `grant-approval-override` request that made this grant. */\n grantedByJobId: string\n /** The `revoke-approval-override` request that ends this grant. */\n revokeJobId?: string\n reason: string\n /** An ISO timestamp. */\n createdAt: string\n /** An ISO timestamp. The grant ends here, also when no revoke ran. */\n expiresAt: string\n /** An ISO timestamp: when the revoke request ran. */\n revokedAt?: string\n revokedByJobId?: string\n}\n\n/**\n * What a use case is, as the API reports it.\n *\n * The frontend needs `requiredPermission` to run the same rule as the backend.\n * PR #9301 kept this registry a second time, by hand, in the frontend. A\n * registry that the server owns means a new use case needs no frontend deploy.\n */\nexport interface ApprovalUseCaseDto {\n type: string\n /** A short name for a person to read. */\n label: string\n /** One sentence: what the action does, and what it cannot undo. */\n description: string\n /** The approvals a new request asks for when the caller names no number. */\n defaultAcks: number\n /**\n * The floor. A caller can ask for more approvals, never for fewer.\n *\n * It is a separate number from `defaultAcks` because the two answer\n * different questions: the default is what the form offers, and the floor is\n * what the service refuses to go below.\n */\n minAcks: number\n ttlDays: number\n executionMode: ApprovalExecutionMode\n /** See `ApprovalActionMode`. An action over many targets is `background`. */\n actionMode: ApprovalActionMode\n /**\n * True when a run that was interrupted can start again by itself.\n *\n * It is a promise about the ACTION, and the reconciler reads it. Set it only\n * when the action can run a second time over the same payload and do no harm\n * twice: it must read what the first run already finished, out of\n * `ApprovalJobDto.executionResult`, and skip it.\n *\n * False, the default, is the safe answer. An interrupted run then lands in\n * `failed`, which a person can run again from the detail page, and a person\n * decides whether running it twice is safe.\n */\n resumable: boolean\n /**\n * The permission that every request of this use case needs to approve,\n * reject or run. A payload can add more. See\n * `ApprovalJobDto.requiredPermissions`, which is the effective set.\n *\n * It is also one permission to SEE a request of this use case. A holder of\n * `aara` sees it too, unless the use case sets `restrictedRead`, and the\n * person who opened a request always sees that request (see\n * `canReadUseCase` and `canView`).\n *\n * The one exception to \"or run\" is a use case with `openToEveryone`. It has\n * no approval, so this permission (or `aara`, see `canReadUseCase`) only\n * decides who sees the requests of other people. Any signed-in person can\n * open and run such a request.\n */\n requiredPermission: string\n /**\n * The permission to open a request. Absent means any signed-in Camundi.\n * A list means that any one of its permissions is enough. An empty list\n * opens the request to nobody, so give a list at least one entry.\n *\n * Set it when the pool that can ASK must be as small as the pool that can\n * approve. Leave it absent when the approvals alone are the guard, and the\n * proposal is not. Read it with `createPermissionsOf`.\n */\n createPermission?: string | string[]\n /** True when a request cannot be opened without a reason. */\n reasonRequired: boolean\n /**\n * True when the ACTION needs the email address of the person who asked.\n *\n * A token can carry no address, and the row then stores\n * `UNKNOWN_ACTOR_EMAIL`. An action that sends that placeholder to another\n * service asks it to find a user that does not exist, so the request can\n * only fail \u2014 and it fails at the END, after other people spent their\n * approvals on it. A use case that carries the creator into its call sets\n * this, and `canCreate` then refuses such a caller at the start.\n *\n * `extend-trial` and `send-to-expired-trial` are two: both send the creator\n * to accounts in an `ApprovalM2mActor`, and accounts reads the permissions\n * of that person again before it acts.\n *\n * `move-cluster-org` does NOT set this. Its envelope reaches console, which\n * reads the user id alone and needs no address.\n */\n creatorEmailRequired?: boolean\n /**\n * A use case with no approval that any signed-in person can open AND run.\n * A use case can still set `createPermission` for a stage (custom plans on\n * int).\n *\n * A request with a floor of zero runs when it is opened, so `canCreate`\n * asks the person to hold `requiredPermission`. This flag lifts that one\n * rule, for an action whose run needs no permission of the person. Set it\n * only when two things hold:\n *\n * - Something else bounds how often a person can ask.\n * - The service that runs the action authorizes the person again at its\n * source, so that nobody can change what is not theirs. The action can\n * touch an organization only when that check lets the person change it.\n *\n * `create-personal-organisation`, `convert-trial-to-internal`,\n * `delete-own-test-org` and the two use cases of custom hardware sizing set\n * it. `convert-trial-to-internal` does the second check in one way: accounts\n * reads the role of the person in the organization, and only an OWNER who is\n * a Camundi passes. The two use cases of custom hardware sizing do the second\n * check in three ways:\n *\n * - Creating a plan, and unlinking a plan from one organization, read the\n * role of the person in that organization. Only an OWNER passes.\n * - Linking an existing plan to an organization reads the same role.\n * Only an OWNER passes. The dedupe key is the only bound on how often a\n * person can ask for a link.\n * - Deleting a plan reads no role. Console checks that the person created\n * the plan. Accounts reads the organizations that the person is a member\n * of, in any role, and removes the plan from their lists.\n */\n openToEveryone?: boolean\n /**\n * A use case with no approval that only a service of the fleet opens.\n *\n * The service holds `createPermission`, an m2m permission, and not\n * `requiredPermission`. This flag lets that holder open and thus run a\n * request with a floor of zero. `requiredPermission` then decides only who\n * sees the requests and who can run a failed one again. Without a\n * `createPermission` the flag lifts nothing.\n *\n * `cluster-ttl-deletion` sets it. The request exists for the record: the\n * list, the entity pages and the audit trail show each deletion.\n */\n openedBySystem?: boolean\n /**\n * True when `READ_ALL` (`aara`) alone does not give read access to the\n * requests of this use case. It changes only who READS. The holders of\n * `requiredPermission`, the person who opened a request and an override\n * grantee still read it (see `canView`).\n *\n * Every other use case is readable with `aara`, the baseline read gate of\n * Control. A payload, summary or result can hold data that `aara` does not\n * read anywhere else. Set this flag when that data must stay with the\n * holders of `requiredPermission`, as for the details of an SSO connection.\n */\n restrictedRead?: boolean\n}\n"],
|
|
5
5
|
"mappings": "AAgCO,MAAM,wBAAwB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAmBO,MAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAUO,MAAM,6BAA6B;AAcnC,MAAM,yBAAyB;AAU/B,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAOO,MAAM,wBAGT,EAAE,MAAM,aAAa,OAAO,OAAO;AAShC,MAAM,6BAA6B;AAUnC,MAAM,oBAAoB;AAS1B,MAAM,6BAA6B;AAOnC,MAAM,2BAA2B;AAGjC,MAAM,2BAA2B;AAoBjC,MAAM,6BAA6B;AAqJnC,MAAM,+BAA+B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA4CO,MAAM,mCAAmC;AAUzC,MAAM,wBAAwB,CAAC,WAAW,OAAO,MAAM;AAgCvD,MAAM,wBAAwB;AA8B9B,SAAS,iBACd,UACoB;AACpB,MAAI,CAAC,YAAY,SAAS,SAAS,GAAG;AACpC,WAAO;AAAA,EACT;AACA,SAAO,KAAK,IAAI,GAAG,SAAS,OAAO,SAAS,KAAK;AACnD;AASO,SAAS,aAAa,KAAqB,KAAoB;AACpE,MAAI,IAAI,WAAW,aAAa;AAC9B,WAAO;AAAA,EACT;AACA,QAAM,WAAW,IAAI,UAAU,aAAa,IAAI;AAChD,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,EACT;AACA,SAAO,IAAI,QAAQ,IAAI,IAAI,KAAK,QAAQ,EAAE,QAAQ,IAAI;AACxD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ACTIVITY_RETENTION_CHOICES, ACTIVITY_RETENTION_DEFAULT_MONTHS, ACTIVITY_RETENTION_KEEP_FOREVER, ACTIVITY_RETENTION_MAX_MONTHS, ACTIVITY_RETENTION_NOT_SET, ACTIVITY_RETENTION_SYNC_CHUNK, type ActivityRetentionMonths, activityRetentionCutoff, activityRetentionLabel, isActivityRetentionMonths, isLimitedActivityRetention, } from './constants/activity-retention.const.js';
|
|
2
|
-
export { CUSTOM_GENERATION_MAX_PER_REQUESTER, CUSTOM_GENERATION_MAX_UPGRADEABLE_FROM, CUSTOM_GENERATION_NAME_MAX_LENGTH, CUSTOM_GENERATION_NAME_MIN_LENGTH, checkNewGenerationVersions, isCustomGenerationStage, } from './constants/custom-generation.const.js';
|
|
2
|
+
export { CUSTOM_GENERATION_MAX_PER_REQUESTER, CUSTOM_GENERATION_MAX_UPGRADEABLE_FROM, CUSTOM_GENERATION_NAME_MAX_LENGTH, CUSTOM_GENERATION_NAME_MIN_LENGTH, checkNewGenerationVersions, isCustomGenerationStage, isCustomPlansOpenToEveryone, } from './constants/custom-generation.const.js';
|
|
3
3
|
export { CUSTOM_HARDWARE_SIZING_BROKER_TOTAL_CAPS, CUSTOM_HARDWARE_SIZING_COUNT_CAPS, CUSTOM_HARDWARE_SIZING_ELASTICSEARCH_TOTAL_CAPS, CUSTOM_HARDWARE_SIZING_MAX_AUTO_RESIZE_INCREASE_GI, CUSTOM_HARDWARE_SIZING_MAX_PLAN_JSON_LENGTH, CUSTOM_HARDWARE_SIZING_MAX_PLANS_PER_REQUESTER, CUSTOM_HARDWARE_SIZING_NAME_MAX_LENGTH, CUSTOM_HARDWARE_SIZING_NAME_MIN_LENGTH, CUSTOM_HARDWARE_SIZING_REPLICA_SET_TOTAL_CAPS, CUSTOM_HARDWARE_SIZING_RESOURCE_CAPS, checkCustomHardwareSizing, isCustomHardwareSizingStage, parseKubernetesQuantity, } from './constants/custom-hardware-sizing.const.js';
|
|
4
4
|
export { APPROVAL_ENTRY_HEADER, CAMUNDI_APPROVAL_FLOW_FLAG, DIRECT_ROUTE_LOCK_HEADERS, DIRECT_ROUTE_LOCKED, directRouteLockHeaders, ERROR_CODE_HEADER, } from './constants/direct-route-lock.const.js';
|
|
5
5
|
export { DAY, HOUR, MINUTE, SECOND, WEEK } from './constants/duration.const.js';
|
|
@@ -151,7 +151,7 @@ export type { ClusterBulkOperationAck, ClusterBulkOperationClusterDto, ClusterBu
|
|
|
151
151
|
export type { ClusterModificationConfigDto, ClusterModificationDto, } from './types/ClusterModification.type.js';
|
|
152
152
|
export { CLUSTER_PLAN_FIELDS, type ClusterPlanFieldSpec, type ClusterPlanFieldTree, isClusterPlanFieldSpec, } from './types/ClusterPlanFields.type.js';
|
|
153
153
|
export type { ClusterPlanModificationAck, ClusterPlanModificationConfig, ClusterPlanModificationDto, } from './types/ClusterPlanModification.type.js';
|
|
154
|
-
export { ClusterPlanTypeAvailabilityClass, hasNoAvailabilityClass, sortByAvailabilityClasses, } from './types/ClusterPlanTypeAvailabilityClass.type.js';
|
|
154
|
+
export { ClusterPlanTypeAvailabilityClass, type EffectiveAvailabilityClass, getEffectiveAvailabilityClass, hasNoAvailabilityClass, sortByAvailabilityClasses, } from './types/ClusterPlanTypeAvailabilityClass.type.js';
|
|
155
155
|
export { ClusterPlanTypeCategory, hasAvailabilityClass, sortByClusterPlanTypeCategory, } from './types/ClusterPlanTypeCategory.type.js';
|
|
156
156
|
export type { ClusterPlanTypesToConfig } from './types/ClusterPlanTypesToConfig.type.js';
|
|
157
157
|
export type { ClusterPlanTypesToReserved } from './types/ClusterPlanTypesToReserved.type.js';
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,8 @@ import {
|
|
|
16
16
|
CUSTOM_GENERATION_NAME_MAX_LENGTH,
|
|
17
17
|
CUSTOM_GENERATION_NAME_MIN_LENGTH,
|
|
18
18
|
checkNewGenerationVersions,
|
|
19
|
-
isCustomGenerationStage
|
|
19
|
+
isCustomGenerationStage,
|
|
20
|
+
isCustomPlansOpenToEveryone
|
|
20
21
|
} from "./constants/custom-generation.const.js";
|
|
21
22
|
import {
|
|
22
23
|
CUSTOM_HARDWARE_SIZING_BROKER_TOTAL_CAPS,
|
|
@@ -548,6 +549,7 @@ import {
|
|
|
548
549
|
} from "./types/ClusterPlanFields.type.js";
|
|
549
550
|
import {
|
|
550
551
|
ClusterPlanTypeAvailabilityClass,
|
|
552
|
+
getEffectiveAvailabilityClass,
|
|
551
553
|
hasNoAvailabilityClass,
|
|
552
554
|
sortByAvailabilityClasses
|
|
553
555
|
} from "./types/ClusterPlanTypeAvailabilityClass.type.js";
|
|
@@ -1201,6 +1203,7 @@ export {
|
|
|
1201
1203
|
getCloudProviderRank,
|
|
1202
1204
|
getCurrentEnterpriseTerm,
|
|
1203
1205
|
getDisplayedSalesPlan,
|
|
1206
|
+
getEffectiveAvailabilityClass,
|
|
1204
1207
|
getFulfilledPromises,
|
|
1205
1208
|
getGatewayPropertyHint,
|
|
1206
1209
|
getGatewayPropertyPath,
|
|
@@ -1239,6 +1242,7 @@ export {
|
|
|
1239
1242
|
isClusterTtlStage,
|
|
1240
1243
|
isCustomGenerationStage,
|
|
1241
1244
|
isCustomHardwareSizingStage,
|
|
1245
|
+
isCustomPlansOpenToEveryone,
|
|
1242
1246
|
isDnsSubdomain,
|
|
1243
1247
|
isEncryptionKeyStatusReason,
|
|
1244
1248
|
isEncryptionStatus,
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.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\n// ============================================================================\n// Constants (runtime values)\n// ============================================================================\n\nexport {\n ACTIVITY_RETENTION_CHOICES,\n ACTIVITY_RETENTION_DEFAULT_MONTHS,\n ACTIVITY_RETENTION_KEEP_FOREVER,\n ACTIVITY_RETENTION_MAX_MONTHS,\n ACTIVITY_RETENTION_NOT_SET,\n ACTIVITY_RETENTION_SYNC_CHUNK,\n type ActivityRetentionMonths,\n activityRetentionCutoff,\n activityRetentionLabel,\n isActivityRetentionMonths,\n isLimitedActivityRetention,\n} from './constants/activity-retention.const.js'\nexport {\n CUSTOM_GENERATION_MAX_PER_REQUESTER,\n CUSTOM_GENERATION_MAX_UPGRADEABLE_FROM,\n CUSTOM_GENERATION_NAME_MAX_LENGTH,\n CUSTOM_GENERATION_NAME_MIN_LENGTH,\n checkNewGenerationVersions,\n isCustomGenerationStage,\n} from './constants/custom-generation.const.js'\nexport {\n CUSTOM_HARDWARE_SIZING_BROKER_TOTAL_CAPS,\n CUSTOM_HARDWARE_SIZING_COUNT_CAPS,\n CUSTOM_HARDWARE_SIZING_ELASTICSEARCH_TOTAL_CAPS,\n CUSTOM_HARDWARE_SIZING_MAX_AUTO_RESIZE_INCREASE_GI,\n CUSTOM_HARDWARE_SIZING_MAX_PLAN_JSON_LENGTH,\n CUSTOM_HARDWARE_SIZING_MAX_PLANS_PER_REQUESTER,\n CUSTOM_HARDWARE_SIZING_NAME_MAX_LENGTH,\n CUSTOM_HARDWARE_SIZING_NAME_MIN_LENGTH,\n CUSTOM_HARDWARE_SIZING_REPLICA_SET_TOTAL_CAPS,\n CUSTOM_HARDWARE_SIZING_RESOURCE_CAPS,\n checkCustomHardwareSizing,\n isCustomHardwareSizingStage,\n parseKubernetesQuantity,\n} from './constants/custom-hardware-sizing.const.js'\nexport {\n APPROVAL_ENTRY_HEADER,\n CAMUNDI_APPROVAL_FLOW_FLAG,\n DIRECT_ROUTE_LOCK_HEADERS,\n DIRECT_ROUTE_LOCKED,\n directRouteLockHeaders,\n ERROR_CODE_HEADER,\n} from './constants/direct-route-lock.const.js'\nexport { DAY, HOUR, MINUTE, SECOND, WEEK } from './constants/duration.const.js'\nexport type { Stage } from './constants/misc.const.js'\nexport {\n CAMUNDA_CLAIMS_NAMESPACE,\n CONSOLE_API_USER_ID,\n countBulkOperationAcks,\n FEATURE_FLAG_SALES_PLANS_LABEL,\n FIRSTNAME_LASTNAME_MAX_LENGTH,\n HOTBACKUP_MIN_CREATE_PERIOD,\n MAX_HARDWARE_PACKAGE_COUNT,\n MAX_LENGTH_CLUSTER_NAME,\n MIGRATION_BACKUP_ID_LABEL_PREFIX,\n MINIMUM_EYEPAIRS,\n MINIMUM_EYEPAIRS_BY_BULK_OPERATION_TYPE,\n minimumBulkOperationAcks,\n minimumBulkOperationEyes,\n missingBulkOperationAcks,\n NAMES_OF_ENTERPRISE_SALESPLANS_WITH_SLEEPING_CLUSTERS,\n requiredBulkOperationAcks,\n SECRETS_MAX_LENGTH,\n STARTING_PRICE_PER_MONTH_IN_EURO,\n TEMPORARY_CLUSTER_NAME,\n UNKNOWN_ACTOR_EMAIL,\n} from './constants/misc.const.js'\nexport {\n getGatewayPropertyHint,\n getGatewayPropertyPath,\n isAffectedByStreamlinedDeployment,\n isPre89AffectedPath,\n PRE89_AFFECTED_PATHS,\n PRE89_AFFECTED_PROPERTY_PREFIXES,\n PRE89_GATEWAY_PROPERTY_PATHS,\n PRE89_GATEWAY_RESOURCE_PREFIXES,\n} from './constants/pre89EnvVarMapping.const.js'\nexport { PRIVATE_LINK_REGIONS } from './constants/privateLinkRegions.const.js'\nexport { SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT } from './constants/secureConnectivity.const.js'\nexport { isSelfServiceClusterModificationStage } from './constants/self-service-cluster-modification.const.js'\nexport { SIGNUP_ERROR_MESSAGE_PREPROD_RESTRICTED } from './constants/signup.const.js'\nexport type {\n TrialExtensionSurveyAnswer,\n TrialExtensionSurveyQuestion,\n} from './constants/trialExtensionSurvey.const.js'\nexport { TRIAL_EXTENSION_SURVEY_QUESTIONS } from './constants/trialExtensionSurvey.const.js'\nexport { TSUGA_BASE_URL } from './constants/tsuga.const.js'\nexport {\n V2_BODY_IDS_MAX,\n V2_FILTER_IDS_MAX,\n V2_MAX_PAGE_LIMIT,\n} from './constants/v2-list.const.js'\nexport {\n ADMIN_APP_RENAME_MIN_VERSION,\n APP_INTEGRATIONS_89_STREAM_CONNECTOR_BRIDGE_MIN_VERSION,\n APP_INTEGRATIONS_89_STREAM_MINOR,\n APP_INTEGRATIONS_89_STREAM_ZEEBE_MIN_VERSION,\n APP_INTEGRATIONS_MIN_VERSION,\n AUDIT_LOG_TAB_MIN_VERSION,\n AUTHORIZATION_TOGGLE_MIN_VERSION,\n AWS_ONLY_GENERATION_MIN_VERSION,\n BUSINESS_ID_UNIQUENESS_MIN_VERSION,\n BYOIDP_MIN_VERSION,\n CLUSTER_SECRETS_LABEL_MIN_VERSION,\n CLUSTER_STATISTICS_CONFIG_MIN_VERSION,\n CONNECTOR_MANAGEMENT_METRICS_MIN_VERSION,\n CONNECTOR_SECRET_SYNC_MIN_VERSION,\n CONNECTORS_MANAGEMENT_LINK_MIN_VERSION,\n ENFORCE_GROUPS_TASKLIST_V2_HIDDEN_MIN_VERSION,\n ENFORCE_GROUPS_TOGGLE_MIN_VERSION,\n GATEWAY_SPEC_8_9_MIN_VERSION,\n HOT_BACKUP_MIN_VERSION,\n IDENTITY_AUTHORIZATION_MIN_VERSION,\n IDENTITY_AUTHORIZATION_NOTICE_MAX_VERSION,\n IDENTITY_MANAGEMENT_MIN_VERSION,\n INTERNAL_CONNECTORS_MANAGEMENT_MIN_VERSION,\n JOB_DASHBOARD_MIN_VERSION,\n LINE_8_9_MIN_VERSION,\n LINE_8_10_MIN_VERSION,\n MCP_MIN_VERSION,\n MULTI_TENANCY_TOGGLE_MIN_VERSION,\n NEW_CLUSTER_ROLES_MIN_VERSION,\n OPTIMIZE_DEFAULT_ON_MIN_VERSION,\n OPTIMIZE_FILTERING_MIN_VERSION,\n OPTIONAL_TELEMETRY_MIN_VERSION,\n RESOURCE_BASED_AUTHORIZATIONS_MIN_VERSION,\n REST_API_URL_TRANSFORM_MIN_VERSION,\n REST_API_V2_MIN_VERSION,\n RESUME_ALPHA_MIN_VERSION,\n SECRET_SOURCE_MIN_VERSION,\n SECRETS_FILTER_MODE_8_6_MIN_VERSION,\n SECRETS_FILTER_MODE_8_7_MIN_VERSION,\n SECRETS_FILTER_MODE_8_8_MIN_VERSION,\n SECRETS_FILTER_MODE_8_9_MIN_VERSION,\n SECRETS_FILTER_MODE_8_10_MIN_VERSION,\n SESSION_CONFIG_MIN_VERSION,\n SWAGGER_MIN_VERSION,\n SWAGGER_URL_8_9_MIN_VERSION,\n TASKLIST_MODE_TOGGLE_MIN_VERSION,\n TASKLIST_UPGRADE_BANNER_MIN_VERSION,\n TASKLIST_V2_AUTO_ENABLE_FROM_MINOR,\n TASKLIST_V2_AUTO_ENABLE_TO_MINOR,\n TASKLIST_V2_DEFAULT_ON_MIN_VERSION,\n TASKLIST_V2_SETTING_MAX_VERSION,\n TASKLIST_V2_UPGRADE_MIN_VERSION,\n TASKLIST_V2_UPGRADE_TARGET_MIN_VERSION,\n UPGRADE_READINESS_MIN_VERSION,\n ZEEBE_REST_URL_MIN_VERSION,\n} from './constants/version-gates.const.js'\n\n// ============================================================================\n// DTOs - Types (interfaces and type aliases)\n// ============================================================================\n\n// Agent tokens - the read-only machine credentials of ccmacli. control-backend\n// stores them, and token-issuer, console-backend and accounts-ng read the\n// same claim and permission sets.\nexport type {\n AgentAccess,\n AgentClaim,\n AgentGrantCreated,\n AgentGrantRefusal,\n AgentGrantRefusalReason,\n AgentStatusResponse,\n AgentToken,\n AgentTokenAdmin,\n AgentTokenCreated,\n AgentTokenExpiryDays,\n AgentTokenKind,\n AgentTokenStatus,\n AgentVerifyResponse,\n CreateAgentGrantDto,\n CreateAgentTokenDto,\n ExtendAgentTokenDto,\n RedeemAgentGrantDto,\n} from './agent-tokens/agent-tokens.js'\nexport {\n AGENT_CLAIM,\n AGENT_CLIENT_ID_PREFIX,\n AGENT_ERROR,\n AGENT_GRANT_TTL_MS,\n AGENT_GRANTS_PER_HOUR_MAX,\n AGENT_READ_PERMISSIONS,\n AGENT_SLACK_CHANNEL_PATTERN,\n AGENT_SLACK_GRANTS_FEATURE_FLAG,\n AGENT_TOKEN_EXPIRY_DAYS,\n AGENT_TOKEN_NAME_MAX,\n AGENT_TOKEN_STATUSES,\n AGENT_TOKENS_ACTIVE_MAX,\n AGENT_TOKENS_FEATURE_FLAG,\n agentReadPermissionUnion,\n parseAgentClaim,\n} from './agent-tokens/agent-tokens.js'\n// Annotations - the notes and the tags that a Camundi attaches to a fleet\n// entity. The wire types and the rules are pure and browser-safe, so\n// control-backend and control-frontend run the same code.\nexport type {\n AnnotationActorView,\n AnnotationDecision,\n AnnotationDenialCode,\n} from './annotations/policy.js'\nexport {\n ANNOTATION_DENIAL_MESSAGES,\n canEditNote,\n canRemove,\n checkNoteBody,\n checkTagName,\n checkTagReason,\n isAuthor,\n} from './annotations/policy.js'\nexport {\n isWhiteGlove,\n isWhiteGloveName,\n WHITE_GLOVE_TAG,\n WHITE_GLOVE_WARNING,\n whiteGloveAnnotation,\n} from './annotations/white-glove.js'\nexport type {\n ApprovalRule,\n StageDependentApprovalType,\n} from './approvals/approval-rules.js'\nexport {\n APPROVAL_RULES,\n approvalsOfRule,\n approvalsRequiredFor,\n PREPROD_UNLOCK_PERMANENT_ACKS,\n} from './approvals/approval-rules.js'\nexport type {\n ChangePlanTypeRetentionLimitsResult,\n ClusterPlanTypeLimitsDto,\n PlanTypeRetentionLimitKey,\n} from './approvals/change-plan-type-retention-limits.js'\nexport {\n isRetentionLimitInBounds,\n PLAN_TYPE_RETENTION_LIMIT_KEY_LIST,\n PLAN_TYPE_RETENTION_LIMIT_KEYS,\n retentionLimitsOf,\n sameRetentionLimits,\n} from './approvals/change-plan-type-retention-limits.js'\nexport type {\n ClusterBulkClusterResultDto,\n ClusterBulkFinalStatus,\n ClusterBulkGenerationUpdateSettings,\n ClusterBulkOperationPayloadDto,\n ClusterBulkOperationRule,\n ClusterBulkPlanTypeUpdateSettings,\n ClusterBulkPlanUpdateSettings,\n ClusterBulkSettingsByType,\n ClusterBulkSleepWakeupSettings,\n ClusterBulkStepRequestDto,\n ClusterBulkStepResultDto,\n ClusterBulkTargetDto,\n ClusterPlanPathsRequestDto,\n ClusterPlanPathsResultDto,\n} from './approvals/cluster-bulk-operation.js'\nexport {\n CLUSTER_BULK_OPERATION_CLUSTER_NAME_MAX_LENGTH,\n CLUSTER_BULK_OPERATION_MAX_CLUSTERS,\n CLUSTER_BULK_OPERATION_NAME_MAX_LENGTH,\n CLUSTER_BULK_OPERATION_RULES,\n CLUSTER_BULK_OPERATION_TYPES,\n CLUSTER_BULK_SLEEPING_CLUSTER_DELAY_MS,\n clusterBulkOperationTypeOf,\n clusterBulkParameterOf,\n clusterBulkRequiredPermissions,\n clusterBulkResultOf,\n isClusterBulkSpecificPlan,\n isClusterBulkYolo,\n} from './approvals/cluster-bulk-operation.js'\nexport type {\n ClusterCorpseDto,\n ClusterCorpseKind,\n ClusterCorpsesDto,\n DeleteClusterCorpseResult,\n} from './approvals/delete-cluster-corpses.js'\nexport {\n CLUSTER_CORPSE_KINDS,\n CLUSTER_CORPSE_MIN_AGE_MS,\n DELETE_CLUSTER_CORPSES_MAX,\n} from './approvals/delete-cluster-corpses.js'\nexport {\n DNS_SUBDOMAIN_MAX_LENGTH,\n isDnsSubdomain,\n} from './approvals/dns-subdomain.js'\nexport type { EditGenerationResult } from './approvals/edit-generation.js'\nexport {\n EDIT_GENERATION_ENV_VARS_MAX_LENGTH,\n EDIT_GENERATION_EXPECTED_MAX_LENGTH,\n EDIT_GENERATION_NAME_MAX_LENGTH,\n} from './approvals/edit-generation.js'\nexport type { ApprovalExpectedChange } from './approvals/expected-value.js'\nexport {\n isSameApprovalValue,\n staleApprovalKeys,\n} from './approvals/expected-value.js'\nexport type {\n ClusterPlanTypeClusterDto,\n ClusterPlanTypeClustersDto,\n ForceDeleteClusterPlanTypeStepResult,\n} from './approvals/force-delete-cluster-plan-type.js'\nexport { FORCE_DELETE_CLUSTER_PLAN_TYPE_MAX_CLUSTERS } from './approvals/force-delete-cluster-plan-type.js'\nexport type {\n ApprovalIncidentDto,\n ApprovalIncidentLinkRequest,\n} from './approvals/incident-link.js'\nexport {\n APPROVAL_INCIDENT_FILTER_ANY,\n APPROVAL_INCIDENT_ID_MAX_LENGTH,\n APPROVAL_INCIDENT_NAME_MAX_LENGTH,\n APPROVAL_INCIDENT_PERMALINK_MAX_LENGTH,\n APPROVAL_INCIDENT_REFERENCE_MAX_LENGTH,\n APPROVAL_INCIDENTS_FLAG,\n isIncidentIoPermalink,\n} from './approvals/incident-link.js'\nexport type {\n OrgBulkDeletionFinalStatus,\n OrgBulkDeletionOrgDto,\n OrgBulkDeletionOrgResultDto,\n OrgBulkDeletionPayloadDto,\n OrgSalesPlanTypesRequest,\n OrgSalesPlanTypesResult,\n} from './approvals/org-bulk-deletion.js'\nexport {\n ORG_BULK_DELETION_FLAG,\n ORG_BULK_DELETION_MAX_ORGS,\n ORG_BULK_DELETION_NAME_MAX_LENGTH,\n ORG_TRIAL_ENDED_DURING_DELETION_MESSAGE,\n orgBulkResultOf,\n} from './approvals/org-bulk-deletion.js'\nexport type {\n ApprovalActorView,\n ApprovalDecision,\n ApprovalDenialCode,\n} from './approvals/policy.js'\nexport {\n approvalPermissionCheck,\n canAcknowledge,\n canCreate,\n canExecute,\n canOverride,\n canReadUseCase,\n canReject,\n canRunOverridden,\n canView,\n canWithdraw,\n createPermissionsOf,\n EXECUTE_WINDOW_DAYS,\n effectiveStatus,\n hasActorEmail,\n hasEveryPermission,\n hasFailedRun,\n isExpired,\n isOverrideGrantActive,\n isRunWindowClosed,\n isSameActor,\n isSameActorEmail,\n needsReason,\n OVERRIDE_GRANT_ENDED_MESSAGE,\n opensWithOwnApproval,\n overrideGranteeOf,\n remainingAcks,\n requiredPermissionsOf,\n resolveRequiredAcks,\n runWindowEnd,\n} from './approvals/policy.js'\nexport type {\n ReleaseTrainAutoUpgradeCandidates,\n ReleaseTrainPublishPayload,\n ReleaseTrainRollbackPayload,\n} from './approvals/release-train.js'\nexport type { SsoConnectionStrategy } from './approvals/sso-connection-fields.js'\nexport {\n countSsoMetadataKeys,\n SSO_CONNECTION_MAX_METADATA_KEYS,\n SSO_CONNECTION_STRATEGY_FIELDS,\n ssoSettingsKeysOfOtherStrategy,\n} from './approvals/sso-connection-fields.js'\nexport type { ApprovalUseCaseType } from './approvals/use-cases.const.js'\nexport {\n APPROVAL_EMAIL_MAX_LENGTH,\n APPROVAL_EMAIL_PATTERN,\n APPROVAL_OVERRIDE_DEFAULT_HOURS,\n APPROVAL_OVERRIDE_DENYLIST,\n APPROVAL_OVERRIDE_MAX_HOURS,\n APPROVAL_USE_CASE_TYPES,\n ENTERPRISE_ONBOARDING_METRIC_MAX,\n ENTERPRISE_ONBOARDING_NAME_MAX_LENGTH,\n ENTERPRISE_ONBOARDING_RESERVATION_MAX,\n ENTERPRISE_ONBOARDING_SFDC_ID_MAX_LENGTH,\n ENTERPRISE_ONBOARDING_TERM_MAX_MONTHS,\n ENTERPRISE_ONBOARDING_TERM_MIN_MONTHS,\n EXTEND_TRIAL_MAX_DAYS,\n EXTEND_TRIAL_MIN_DAYS,\n enterpriseContractChangePermissions,\n GENERATION_VERSION_VALUE_MAX_LENGTH,\n GENERATION_VERSIONS_MAX_GENERATIONS,\n isApprovalOverridable,\n isCalendarDay,\n isLlmSpendBelowTopUpThreshold,\n LLM_BUDGET_TOP_UP_THRESHOLD,\n ORG_LIMIT_TEXT_MAX_LENGTH,\n ORG_RESERVATION_MAX,\n PERSONAL_ORGANIZATION_MAX_PER_REQUESTER,\n PERSONAL_ORGANIZATION_NAME_MAX_LENGTH,\n PERSONAL_ORGANIZATION_NAME_MIN_LENGTH,\n PLATFORM_ROLE_CHANGE_MAX_ROLES,\n PREPROD_UNLOCK_DEFAULT_DAYS,\n PREPROD_UNLOCK_MAX_DAYS,\n PURGE_USERS_MAX_USERS,\n PURGE_USERS_REQUIRED_PERMISSIONS,\n REMOVE_ORG_MEMBER_FLAG,\n REMOVE_ORG_MEMBER_REQUIRED_PERMISSIONS,\n SIGNUP_SPAM_PATTERN_MAX_LENGTH,\n SIGNUP_SPAM_PATTERNS_MAX_FIELDS,\n SIGNUP_SPAM_PATTERNS_MAX_PER_FIELD,\n USER_METADATA_EXPECTED_MAX_LENGTH,\n USER_METADATA_MAX_LENGTH,\n} from './approvals/use-cases.const.js'\n// The chart query of a dashboard tile (catalogue, language, result).\nexport {\n CHART_DAY_GRAIN_MAX_DAYS,\n CHART_FILTER_MAX_LENGTH,\n CHART_GRAIN_DEFAULT,\n CHART_GRAINS,\n CHART_ID_MAX_LENGTH,\n CHART_METRICS,\n CHART_OTHER_SERIES_KEY,\n CHART_QUERY_MAX_LENGTH,\n CHART_TOP_DEFAULT,\n CHART_TOP_MAX,\n CHART_UNKNOWN_SERIES_KEY,\n CHART_WINDOW_AMOUNT_MAX,\n CHART_WINDOW_DEFAULT,\n CHART_WINDOW_UNITS,\n type ChartDimensionSpec,\n type ChartGrain,\n type ChartMetricSpec,\n type ChartPoint,\n type ChartQueryCheck,\n ChartQueryError,\n type ChartQueryErrorKind,\n type ChartQueryOptions,\n type ChartResult,\n type ChartSeries,\n type ChartSpec,\n type ChartUnit,\n type ChartWindow,\n type ChartWindowUnit,\n chartBucketStart,\n chartToday,\n chartWindowRange,\n findChartDimension,\n findChartMetric,\n formatChartSpec,\n isChartQueryError,\n parseChartQuery,\n readChartSpec,\n validateChartSpec,\n} from './charts/index.js'\n// Dashboards - the tiles of a dashboard hold filters and never data. The\n// wire types and the placement rules are pure, so control-backend and\n// control-frontend run the same code.\nexport {\n DASHBOARD_TILE_DEFAULT_SIZE,\n dashboardDefinitionBytes,\n dashboardDefinitionFits,\n dashboardTileDefaultSize,\n emptyDashboardDefinition,\n isSafeDashboardLink,\n placeNewTile,\n placeNewTiles,\n tilesOverlap,\n toStoredDashboardDefinition,\n upgradeDashboardDefinition,\n} from './dashboards/definition.js'\nexport type { ActiveUsersDto } from './dtos/ActiveUsers.dto.js'\nexport type {\n ALERT_SUBSCRIPTION_REPORT_TYPES,\n ALERT_SUBSCRIPTION_TYPES,\n AlertSubscriptionDto,\n AlertSubscriptionEntryDto,\n AlertSubscriptionWebhookAuth,\n CheckFailedReason,\n} from './dtos/AlertSubscription.dto.js'\n// DTOs - Values (constants)\nexport {\n FORBIDDEN_HOSTNAMES_FOR_WEBHOOK_ALERTS,\n HMAC_HEADER_POSITION,\n HMAC_SUPPORTED_ALGORITHM,\n} from './dtos/AlertSubscription.dto.js'\nexport type {\n AnnotationActor,\n AnnotationDto,\n AnnotationEntityKind,\n AnnotationKind,\n AnnotationLookupDto,\n AnnotationLookupEntryDto,\n AnnotationTagDto,\n EntityAnnotationsDto,\n} from './dtos/Annotation.dto.js'\nexport {\n ANNOTATION_BODY_MAX,\n ANNOTATION_ENTITY_KIND_LABELS,\n ANNOTATION_ENTITY_KINDS,\n ANNOTATION_ENTITY_MAX,\n ANNOTATION_KINDS,\n ANNOTATION_LOOKUP_MAX_ENTITIES,\n ANNOTATION_LOOKUP_TAGS_MAX,\n ANNOTATION_PAGE_SIZE_DEFAULT,\n ANNOTATION_PAGE_SIZE_MAX,\n ANNOTATION_REASON_MAX,\n ANNOTATION_SEARCH_MAX_LENGTH,\n ANNOTATION_TAG_NAME_MAX,\n normalizeTagName,\n} from './dtos/Annotation.dto.js'\nexport type { ApiClientStatsDto } from './dtos/ApiClientStats.dto.js'\n// Approvals - the wire types, and the rules that read them. Both are pure and\n// browser-safe, so control-backend, control-frontend and cloudbot run the same\n// code and cannot disagree.\nexport type {\n ApprovalAck,\n ApprovalActionMode,\n ApprovalActor,\n ApprovalEntityRef,\n ApprovalEntityType,\n ApprovalExecutionMode,\n ApprovalJobDto,\n ApprovalJobStatus,\n ApprovalM2mActor,\n ApprovalOverrideGrantDto,\n ApprovalProgress,\n ApprovalSortField,\n ApprovalSortOrder,\n ApprovalStatusCountsDto,\n ApprovalSummaryField,\n ApprovalSummaryFieldKind,\n ApprovalSummaryValue,\n ApprovalUseCaseDto,\n} from './dtos/ApprovalJob.dto.js'\nexport {\n APPROVAL_ACKS_MAX,\n APPROVAL_ENTITY_TYPES,\n APPROVAL_JOB_STATUSES,\n APPROVAL_LIST_SUMMARY_VALUES_MAX,\n APPROVAL_LIVE_STATUSES,\n APPROVAL_PAGE_SIZE_DEFAULT,\n APPROVAL_PAGE_SIZE_MAX,\n APPROVAL_PAYLOAD_ORG_FIELD,\n APPROVAL_REASON_MAX_LENGTH,\n APPROVAL_RUN_STALE_MS,\n APPROVAL_SEARCH_MAX_LENGTH,\n APPROVAL_SORT_DEFAULT,\n APPROVAL_SORT_FIELDS,\n APPROVAL_SUMMARY_FIELD_KINDS,\n APPROVAL_TYPE_FILTER_MAX,\n APPROVAL_TYPE_MAX_LENGTH,\n isRunStalled,\n progressFraction,\n} from './dtos/ApprovalJob.dto.js'\nexport type {\n ApprovalOrganizationNameResult,\n ApprovalSummaryNamesRequest,\n ApprovalSummaryNamesResult,\n} from './dtos/ApprovalSummaryNames.dto.js'\nexport type { AuditDto } from './dtos/Audit.dto.js'\nexport type { Auth0ResourceServerDto } from './dtos/Auth0ResourceServer.dto.js'\nexport type { BackupDto } from './dtos/Backup.dto.js'\nexport type { BackupScheduleDto } from './dtos/BackupSchedule.dto.js'\nexport type { ByomClientDto, ByomStatus } from './dtos/ByomClient.dto.js'\nexport type {\n ClusterCreationDefaultField,\n ClusterCreationDefaultKey,\n ClusterCreationDefaults,\n} from './dtos/ClusterCreationDefaults.dto.js'\nexport { CLUSTER_CREATION_DEFAULT_FIELDS } from './dtos/ClusterCreationDefaults.dto.js'\nexport type {\n ClusterDeferredSpecChange,\n DeferredSpecChangeType,\n} from './dtos/ClusterDeferredSpecChange.dto.js'\nexport type { ClusterIpWhitelistDto } from './dtos/ClusterIpWhitelist.dto.js'\nexport type {\n MoveClusterOwnerResult,\n MoveClusterWarnings,\n} from './dtos/ClusterOwnerMove.dto.js'\nexport type { ClusterPlanDto } from './dtos/ClusterPlan.dto.js'\nexport type { ClusterPlanTypeDto } from './dtos/ClusterPlanType.dto.js'\nexport type {\n ChangeClusterPlanTypeResult,\n ClusterModificationConfigRef,\n ClusterPlanTypeChangeRefusal,\n ClusterPlanTypeStateDto,\n} from './dtos/ClusterPlanTypeChange.dto.js'\nexport {\n CLUSTER_PLAN_TYPE_CHANGE_REFUSALS,\n clusterPlanTypeChangeRefusalOf,\n} from './dtos/ClusterPlanTypeChange.dto.js'\nexport type {\n ClusterSpecChange,\n ClusterSpecChangeActor,\n ClusterSpecHistory,\n} from './dtos/ClusterSpecHistory.dto.js'\nexport type {\n CommonClusterDto,\n ExternalIdpConfig,\n OptimizeFilteringConfig,\n OptimizeFilteringIncludeExclude,\n OptimizeFilteringPatch,\n SecretsFilterMode,\n ZeebeRebalancingSetting,\n} from './dtos/CommonCluster.dto.js'\nexport type { ConsoleClusterDto } from './dtos/ConsoleCluster.dto.js'\nexport type {\n ClusterActivityBucket,\n ClusterActivityTile,\n ClusterActivityV2Dto,\n ClusterActivityV2Response,\n ClusterByClientV2Dto,\n ClusterDatacenterOptionV2Dto,\n ClusterDetailV2Dto,\n ClusterFacetsV2Dto,\n ClusterListItemV2Dto,\n ClusterLiveStateV2Dto,\n ClusterLiveStateV2Entry,\n ClusterModificationState,\n ClusterParameterOptionV2Dto,\n ClusterParametersV2Dto,\n ClusterTtlFilter,\n ControlResolvedPermissions,\n ControlSessionDto,\n ControlSessionUser,\n CursorPage,\n CursorParams,\n ListClustersV2Params,\n ListOrganizationsV2Params,\n ListOrgMembersV2Params,\n OrgDetailV2Dto,\n OrgListItemV2Dto,\n OrgMemberV2Dto,\n OrgSummaryV2Dto,\n} from './dtos/ControlV2.dto.js'\nexport { CLUSTER_MODIFICATION_STATES } from './dtos/ControlV2.dto.js'\nexport type {\n DashboardActor,\n DashboardAnnotationsQuery,\n DashboardAnnotationsTile,\n DashboardAnnotationsTileV1,\n DashboardCatalogue,\n DashboardCatalogueChartMetric,\n DashboardCatalogueSearchField,\n DashboardChartQuery,\n DashboardChartRender,\n DashboardChartTile,\n DashboardChartTileV3,\n DashboardClusterCard,\n DashboardClusterDetailQuery,\n DashboardClusterDetailTile,\n DashboardClusterDetailTileV2,\n DashboardDefinition,\n DashboardDefinitionV1,\n DashboardDefinitionV2,\n DashboardDefinitionV3,\n DashboardDto,\n DashboardFleetQuery,\n DashboardFleetQueryTile,\n DashboardFleetQueryTileV1,\n DashboardHeadingTile,\n DashboardHeadingTileV2,\n DashboardLinkTile,\n DashboardLinkTileV2,\n DashboardListDto,\n DashboardNewTile,\n DashboardNoteTile,\n DashboardNoteTileV2,\n DashboardOrgCard,\n DashboardOrgDetailQuery,\n DashboardOrgDetailTile,\n DashboardOrgDetailTileV2,\n DashboardSummaryDto,\n DashboardTile,\n DashboardTileKind,\n DashboardTileLayout,\n DashboardTileV1,\n DashboardTileV2,\n DashboardTileV3,\n StoredDashboardDefinition,\n} from './dtos/Dashboard.dto.js'\nexport {\n DASHBOARD_CHART_RENDERS,\n DASHBOARD_CLUSTER_CARDS,\n DASHBOARD_DEFINITION_BYTES_MAX,\n DASHBOARD_DEFINITION_VERSION,\n DASHBOARD_ENTITY_ID_MAX,\n DASHBOARD_GRID_COLUMNS,\n DASHBOARD_GRID_ROWS_MAX,\n DASHBOARD_LINK_URL_MAX,\n DASHBOARD_NOTE_MAX,\n DASHBOARD_ORG_CARDS,\n DASHBOARD_PAGE_SIZE_DEFAULT,\n DASHBOARD_PAGE_SIZE_MAX,\n DASHBOARD_TILE_KINDS,\n DASHBOARD_TILE_ROWS_MAX,\n DASHBOARD_TILES_MAX,\n DASHBOARD_TITLE_MAX,\n} from './dtos/Dashboard.dto.js'\nexport type { EarlyAccessFeatureDto } from './dtos/EarlyAccessFeature.dto.js'\nexport type {\n CamundaWebApp,\n CamundaWebAppWithZeebe,\n ExternalClickwrapConfigDto,\n ExternalClusterDto,\n ExternalOrganizationDto,\n} from './dtos/ExternalWebapp.dto.js'\nexport type {\n CreateFeatureFlagDto,\n FeatureFlagAnswer,\n FeatureFlagDto,\n FeatureFlagKind,\n FeatureFlagListDto,\n UpdateFeatureFlagDto,\n} from './dtos/FeatureFlags.dto.js'\nexport {\n FEATURE_FLAG_KINDS,\n KILL_SWITCH_KEY_SUFFIX,\n killSwitchProblem,\n killSwitchStateText,\n} from './dtos/FeatureFlags.dto.js'\nexport type {\n FleetStatRowDto,\n FleetStatsPageDto,\n} from './dtos/FleetStats.dto.js'\nexport type {\n ClusterGenerationStateDto,\n ForceGenerationUpgradeResult,\n} from './dtos/ForceGenerationUpgrade.dto.js'\n// Functions\nexport {\n activeGenerations,\n compareGenerationNamesNewestFirst,\n type GenerationDto,\n type GenerationWithClusterCountDto,\n sortGenerationBySemverOfZeebe,\n type UpgradableGenerationsDto,\n} from './dtos/Generations.dto.js'\nexport type { ChangeGenerationVersionsResult } from './dtos/GenerationVersionsChange.dto.js'\n// Namespace (type-only - contains only interfaces)\nexport type { Hdp } from './dtos/Hdp.dto.js'\nexport type {\n K8sBackupConfig,\n K8sConfig,\n K8sConfigLegacyFormat,\n K8sContext,\n K8sContextDto,\n} from './dtos/K8sContext.dto.js'\nexport type {\n CreateLeafletRequest,\n LeafletDto,\n LeafletSummaryDto,\n UpdateLeafletRequest,\n} from './dtos/Leaflet.dto.js'\nexport type {\n M2mTokenCountDto,\n M2mTokenCountsDto,\n} from './dtos/M2mTokenCount.dto.js'\nexport type { MetaDto } from './dtos/Meta.dto.js'\nexport type {\n AutoJoinAssignment,\n LicensingModelType,\n LlmProviderName,\n OrganizationDto,\n OrganizationMetadata,\n OrgOwner,\n OrgWithNameAndSalesPlan,\n} from './dtos/Organization.dto.js'\nexport {\n LICENSING_MODEL_DISPLAY_NAMES,\n VALID_LICENSING_MODELS,\n} from './dtos/Organization.dto.js'\nexport type { OrganizationMemberDto } from './dtos/OrganizationMember.dto.js'\nexport type { OrganizationToSalesPlanDto } from './dtos/OrganizationToSalesPlan.dto.js'\nexport type {\n PermissionHolderDto,\n PermissionHoldersDto,\n} from './dtos/PermissionHolders.dto.js'\nexport { isRecommendationAddress } from './dtos/PermissionHolders.dto.js'\nexport type {\n DryRunSanityDiff,\n ReleaseTrainPreview,\n ReleaseTrainSanityReport,\n SanityFix,\n SanityRuleInfo,\n SanitySeverity,\n SanityViolation,\n} from './dtos/ReleaseTrainSanity.dto.js'\nexport type {\n ResearchLoginAssignedDto,\n ResearchLoginDto,\n ResearchLoginState,\n} from './dtos/ResearchLogin.dto.js'\nexport type { RestoreDto, RestoreState } from './dtos/Restore.dto.js'\n// SalesPlan.dto - Types\nexport type {\n ClusterLimits,\n ConsumptionDataItem,\n Limits,\n SalesPlanDto,\n SalesPlanMetadata,\n} from './dtos/SalesPlan.dto.js'\n// SalesPlan.dto - Values (constants and functions)\nexport {\n allClusterBasedLimits,\n allSalesPlanLimits,\n clusterPlanWhiteListIds,\n deprecatedLimit,\n generationWhiteListIds,\n isLimitKeyEnabled,\n isLimitOfferedOnStage,\n isUnlockedClusterPlansStage,\n MAX_CLUSTER_CLIENTS_DEFAULT,\n MAX_CLUSTER_CLIENTS_DEV,\n RETENTION_LIMIT_DEFAULT,\n RETENTION_LIMIT_MAXIMUM,\n RETENTION_LIMIT_MINIMUM,\n unusedClusterBasedLimits,\n unusedSalesPlanLimits,\n} from './dtos/SalesPlan.dto.js'\nexport type { SecureConnectivityDto } from './dtos/SecureConnectivity.dto.js'\nexport type { SignupDto } from './dtos/Signup.dto.js'\nexport type {\n StorybookConfig,\n StorybookConfigBackup,\n StorybookConfigChannel,\n StorybookConfigDatacenter,\n StorybookConfigGeneration,\n} from './dtos/StorybookConfig.dto.js'\nexport type { SystemAuditDto } from './dtos/SystemAudit.dto.js'\nexport type {\n UpgradeReadinessDto,\n UpgradeReadinessSource,\n UpgradeReadinessState,\n} from './dtos/UpgradeReadiness.dto.js'\n// UsageAlert.dto - Types\nexport type { UsageAlertDto } from './dtos/UsageAlert.dto.js'\n// UsageAlert.dto - Values (enum and constants)\nexport {\n UsageAlertInitValues,\n UsageAlertMetric,\n UsageAlertThresholdLimits,\n} from './dtos/UsageAlert.dto.js'\nexport type { UserMetaDataDto } from './dtos/UserMetaData.dto.js'\n// Lucene-style table search (parser + AST \u2192 SQL compiler + field registries).\nexport {\n type AndNode,\n CLUSTER_DEFAULT_SEARCH_FIELDS,\n CLUSTER_SEARCH_FIELDS,\n CLUSTER_TTL_SEARCH_FIELDS,\n type CompileContext,\n type CompiledQuery,\n clusterSearchFieldsForStage,\n compileQuery,\n type FieldBinding,\n findSearchField,\n idSetPredicate,\n isLuceneQueryError,\n joinIdSet,\n LuceneQueryError,\n likeArgument,\n type NotNode,\n ORG_DEFAULT_SEARCH_FIELDS,\n ORGANIZATION_SEARCH_FIELDS,\n type OrNode,\n parseLuceneQuery,\n type QueryNode,\n type RangeNode,\n type SearchFieldCapability,\n type SearchFieldSpec,\n type SearchFieldType,\n type SearchTermOperator,\n type SqlDialect,\n type TermNode,\n} from './search/index.js'\nexport { upgradeGateReason } from './utils/upgradeGateReason.utils.js'\n\n// ============================================================================\n// Enums (runtime values)\n// ============================================================================\n\nexport {\n AlertSubscriptionReportType,\n AlertSubscriptionType,\n} from './enums/AlertSubscription.enum.js'\nexport { AuditEntity, AuditEntityAttribute } from './enums/AuditEntity.enum.js'\nexport { AuditService } from './enums/AuditService.enum.js'\nexport { BackupStatus } from './enums/BackupStatus.enum.js'\nexport {\n ClusterBulkOperationStatus,\n ClusterBulkOperationType,\n} from './enums/ClusterBulkOperation.enum.js'\nexport { ClusterClientPermission } from './enums/ClusterClientPermissions.enum.js'\nexport { ClusterEncryptionKey } from './enums/ClusterEncryptionKey.enum.js'\nexport { ClusterStatus } from './enums/ClusterStatus.enum.js'\nexport { ConsoleAPIClientPermission } from './enums/ConsoleApiClientPermission.enum.js'\nexport { ErrorType } from './enums/ErrorType.enum.js'\nexport type {\n AssignableOrganizationRoleType,\n OrganizationRoleType,\n UnassignableOrganizationRoleType,\n} from './enums/OrganizationRole.enum.js'\nexport {\n AssignableOrganizationRole,\n LegacyHeldOrganizationRole,\n OrganizationRole,\n UnassignableOrganizationRole,\n} from './enums/OrganizationRole.enum.js'\nexport { SseEntity, SseType } from './enums/Sse.enum.js'\nexport {\n SystemAuditEntity,\n SystemAuditEntityAttribute,\n} from './enums/SystemAuditEntity.enum.js'\n\n// ============================================================================\n// Permissions - Namespaces (runtime values)\n// ============================================================================\n\nexport { AccountsPermissions } from './permissions/accounts.permissions.js'\nexport { AlertDistributorPermissions } from './permissions/alert-distributor.permissions.js'\nexport { AuditLoggerPermissions } from './permissions/auditlogger.permissions.js'\nexport {\n accountsUserFeaturesFromPermissions,\n consoleUserFeaturesFromPermissions,\n sessionHasPermission,\n sessionPermissionKeysFor,\n} from './permissions/combo.js'\nexport { ConsolePermissions } from './permissions/console.permissions.js'\nexport { NotificationPermissions } from './permissions/notification.permissions.js'\n// profile.permissions - Types\nexport type { OnboardConfig } from './permissions/profile.permissions.js'\n// profile.permissions - Values (constants)\n// NOTE: the `allowed` email lists (CLOUD_TEAM_EMAILS, SRE_TEAM_EMAILS, etc.)\n// intentionally live in the private `@camunda-cloud/shared-backend` package\n// instead of here, since this package is published publicly to npm.\nexport { PROFILES } from './permissions/profile.permissions.js'\nexport {\n ALL_PERMISSIONS_AT_AUTH0,\n expandRolesToPermissions,\n} from './permissions/roleExpansion.utils.js'\n\n// ============================================================================\n// Types - Type-only exports (interfaces and type aliases)\n// ============================================================================\n\nexport type { AuditData } from './types/AuditData.type.js'\n// AutoSleep.type - Types\nexport type {\n ActivitySleepEligibilityOptions,\n SleepCronEligibilityOptions,\n} from './types/AutoSleep.type.js'\n// AutoSleep.type - Values (constants and functions)\nexport {\n INTERNAL_LOW_HARDWARE_PLAN_NAME,\n isActivitySleepEligible,\n isClusterTagEligibleForSleepCron,\n isSalesPlanEligibleForSleepCron,\n isSleepCronEligible,\n SLEEP_CRON_ELIGIBLE_TAGS,\n} from './types/AutoSleep.type.js'\nexport type {\n BotContext,\n BotOptions,\n BotRequest,\n GetUserDetailsResponse,\n ListRolesForUserResponse,\n UpdateUserRolesRequest,\n UpdateUserRolesResponse,\n UserContext,\n UserDetails,\n} from './types/Bot.types.js'\n// BulkOperation.type - Types\nexport type {\n BulkClusterDeletionContent,\n BulkClusterDeletionItem,\n BulkClusterGenerationUpdateItem,\n BulkClusterPlanTypeUpdateContent,\n BulkClusterPlanTypeUpdateItem,\n BulkClusterPlanUpdateContent,\n BulkClusterPlanUpdateItem,\n BulkGenerationUpdateContent,\n GenericBulkClusterOperationContent,\n GenericBulkOperationContent,\n GenericClusterBulkOperationItem,\n} from './types/BulkOperation.type.js'\n// BulkOperation.type - Functions (type guards)\nexport {\n isBulkClusterDeletionItem,\n isBulkClusterPlanTypeUpdateItem,\n isBulkClusterPlanUpdateItem,\n isIsBulkClusterGenerationUpdateIten,\n} from './types/BulkOperation.type.js'\n// C8ClusterComponentVersions.type - Types\nexport type {\n GenerationEnvVarsDto,\n GenerationEnvVarsKey,\n GenerationImageVersionsDto,\n ImmutableZeebeClusterVersionsDto,\n MutableZeebeClusterVersionsDto,\n ZeebeClusterVersionsDto,\n} from './types/C8ClusterComponentVersions.type.js'\n// C8ClusterComponentVersions.type - Values (constants)\nexport {\n AllThings,\n GENERATION_ENV_VARS_KEYS,\n GENERATION_IMAGE_VERSION_KEYS,\n ImmutableThings,\n MutableThings,\n} from './types/C8ClusterComponentVersions.type.js'\n// CamundaClusterLabels.type - Types\nexport type {\n CamundaClusterStage,\n CamundaClusterStageLabel,\n ClusterLabels,\n} from './types/CamundaClusterLabels.type.js'\n// CamundaClusterLabels.type - Values (constants)\nexport {\n ALLOWED_CAMUNDA_LABELS,\n StageClusterLabels,\n} from './types/CamundaClusterLabels.type.js'\n// Chargebee.type - Types\nexport type { SubscriptionItem } from './types/Chargebee.type.js'\n// Chargebee.type - Values (enums)\nexport { ConsumptionData, ConsumptionDataType } from './types/Chargebee.type.js'\n// ClusterBulkOperation.type - Types\nexport type {\n ClusterBulkOperationAck,\n ClusterBulkOperationClusterDto,\n ClusterBulkOperationContent,\n ClusterBulkOperationDto,\n ClusterBulkOperationGenerationUpdateParameter,\n ClusterBulkOperationParameter,\n ClusterBulkOperationPlanTypeUpdateParameter,\n ClusterBulkOperationPlanUpdateParameter,\n ClusterBulkOperationPostContent,\n ClusterSleepWakeupParameter,\n} from './types/ClusterBulkOperation.type.js'\nexport type {\n ClusterModificationConfigDto,\n ClusterModificationDto,\n} from './types/ClusterModification.type.js'\n// ClusterPlanFields.type - Values (field spec and type guard)\nexport {\n CLUSTER_PLAN_FIELDS,\n type ClusterPlanFieldSpec,\n type ClusterPlanFieldTree,\n isClusterPlanFieldSpec,\n} from './types/ClusterPlanFields.type.js'\nexport type {\n ClusterPlanModificationAck,\n ClusterPlanModificationConfig,\n ClusterPlanModificationDto,\n} from './types/ClusterPlanModification.type.js'\n// ClusterPlanTypeAvailabilityClass.type - Values (enum and function)\nexport {\n ClusterPlanTypeAvailabilityClass,\n hasNoAvailabilityClass,\n sortByAvailabilityClasses,\n} from './types/ClusterPlanTypeAvailabilityClass.type.js'\n// ClusterPlanTypeCategory.type - Values (enum and functions)\nexport {\n ClusterPlanTypeCategory,\n hasAvailabilityClass,\n sortByClusterPlanTypeCategory,\n} from './types/ClusterPlanTypeCategory.type.js'\nexport type { ClusterPlanTypesToConfig } from './types/ClusterPlanTypesToConfig.type.js'\nexport type { ClusterPlanTypesToReserved } from './types/ClusterPlanTypesToReserved.type.js'\nexport type {\n ClusterTtlDeletionPayload,\n ClusterTtlDeletionResult,\n ClusterTtlDto,\n ClusterTtlDuration,\n ClusterTtlOption,\n ClusterTtlUnlimited,\n UpdateClusterTtlBody,\n} from './types/ClusterTtl.type.js'\nexport {\n CLUSTER_TTL_BACKFILL_REASON,\n CLUSTER_TTL_DURATION_MS,\n CLUSTER_TTL_DURATIONS,\n CLUSTER_TTL_FEATURE_FLAG,\n CLUSTER_TTL_OPTIONS,\n CLUSTER_TTL_UNLIMITED_LINK_MAX_LENGTH,\n CLUSTER_TTL_UNLIMITED_REASON_MAX_LENGTH,\n clusterTtlExpiresAt,\n DEFAULT_CLUSTER_TTL_OPTION,\n extendClusterTtl,\n isClusterTtlDuration,\n isClusterTtlOption,\n isClusterTtlStage,\n isHttpUrl,\n isPastClusterTtl,\n validateClusterTtlUnlimited,\n} from './types/ClusterTtl.type.js'\nexport type {\n ClusterUsageDataRequest,\n ClusterUsageMetadataDto,\n ClusterUsageMetricsAddRequestByMetricHeap,\n ClusterUsageMetricsData,\n ClusterUsageMetricsFilter,\n ClusterUsageOrgStartDate,\n} from './types/ClusterUsageMetrics.type.js'\nexport type { EnterpriseIncludingValueMetrics } from './types/EnterpriseIncludingValueMetrics.type.js'\nexport type {\n HdpTenantUsageBreakdown,\n HdpTenantUsagePerClusterPoint,\n HdpTenantUsagePoint,\n} from './types/HdpTenantUsage.type.js'\n// hdp.types - Types (interfaces)\nexport type {\n AlertSubscription as HdpAlertSubscription,\n ByomClient as HdpByomClient,\n Channel as HdpChannel,\n Cluster as HdpCluster,\n ClusterBackup as HdpClusterBackup,\n ClusterBackupSchedule as HdpClusterBackupSchedule,\n ClusterBulkOperation as HdpClusterBulkOperation,\n ClusterClient as HdpClusterClient,\n ClusterModification as HdpClusterModification,\n ClusterPlan as HdpClusterPlan,\n ClusterPlanType as HdpClusterPlanType,\n ConnectorSecret as HdpConnectorSecret,\n ConsoleApiClient as HdpConsoleApiClient,\n Datacenter as HdpDatacenter,\n Generation as HdpGeneration,\n HdpBackendChangeEvent,\n HdpClusterModificationConfig,\n HdpDisk,\n HdpDiskUsageDataPoint,\n HdpEntity,\n HdpPrometheusDataCapacityDataPoint,\n Invite as HdpInvite,\n Organization as HdpOrganization,\n SecureConnectivity as HdpSecureConnectivity,\n SystemAudit as HdpSystemAudit,\n TelemetryData as HdpTelemetryData,\n UsageAlert as HdpUsageAlert,\n User as HdpUser,\n UserLogin as HdpUserLogin,\n} from './types/hdp.types.js'\n// hdp.types - Values (enums)\nexport {\n AlertSubscriptionReportType as HdpAlertSubscriptionReportType,\n AlertSubscriptionType as HdpAlertSubscriptionType,\n HDP_DISKS,\n} from './types/hdp.types.js'\n// notification.type - Types\nexport type {\n GlobalNotification,\n NotificationDto,\n NotificationMeta,\n NotificationOptions,\n NotificationPermission,\n NotificationSource,\n NotificationState,\n NotificationType,\n OrgNotification,\n UserNotification,\n UserOrgNotification,\n} from './types/notification.type.js'\n// notification.type - Values (enums and constants)\nexport {\n NotificationPermissionValues,\n NotificationSourceEnum,\n NotificationStateEnum,\n NotificationTypeEnum,\n} from './types/notification.type.js'\n// OrganizationPermission.type - Types\nexport type {\n CreateReadUpdateDelete,\n OrganizationPermissions,\n} from './types/OrganizationPermission.type.js'\n// OrganizationPermission.type - Values (constants)\nexport {\n OrganizationPermissionsDescriptions,\n PermissionsForOrganizationRole,\n} from './types/OrganizationPermission.type.js'\nexport {\n getPreprodClusterTtlHours,\n isPastPreprodClusterTtl,\n isPreprodClusterTtlStage,\n parseNumericLimit,\n} from './types/PreprodClusterTtl.type.js'\n// Roles.js - Types\nexport type {\n AccountRoles,\n ConsoleRoles,\n ModelerRoles,\n Roles,\n} from './types/Roles.js'\n// Roles.js - Values (constants)\nexport { SAFE_ROLES } from './types/Roles.js'\n// SalesPlanType.type - Types\nexport type {\n DisplayedSalesPlan,\n RevisitedSalesPlanName,\n} from './types/SalesPlanType.type.js'\n// SalesPlanType.type - Values (enums and functions)\nexport {\n AnalyticsSalesPlanType,\n getAnalyticsSalesPlanFromOrgSalesPlan,\n getDisplayedSalesPlan,\n getRevisitedSalesPlanName,\n OPTIMIZE_DISABLED_PLAN_TYPES,\n SalesPlanType,\n USAGE_SALES_PLAN_TYPES,\n} from './types/SalesPlanType.type.js'\n// SpamDetection.type - Types\nexport type { SpamDetectionPatterns } from './types/SpamDetection.type.js'\n// SpamDetection.type - Values (constants)\nexport { TEERGRUBE_PATTERNS } from './types/SpamDetection.type.js'\nexport type {\n AlertSubscriptionSseEvent,\n BackupSseEvent,\n ClusterClientSseEvent,\n ClusterSseEvent,\n ConnectorSecretsSseEvent,\n ConsoleApiClientSseEvent,\n ConsoleSseEvent,\n MonitoringSseEvent,\n SecureConnectivitySseEvent,\n SseClusterPayload,\n SseMonitoringPayload,\n SseSecureConnectivityPayload,\n} from './types/SseEvent.type.js'\n// Namespace (type-only - contains only interfaces)\nexport type { AccountsStats } from './types/Stats.types.js'\n// Survey.type - Types\nexport type { Persona, SurveyDto } from './types/Survey.type.js'\n// Survey.type - Values (enum)\nexport { FeedbackType } from './types/Survey.type.js'\n// SuspendStrategy.type - Types\nexport type {\n GetSuspendStrategyOptions,\n SuspendStrategy,\n} from './types/SuspendStrategy.type.js'\n// SuspendStrategy.type - Values (function)\nexport { getSuspendStrategy } from './types/SuspendStrategy.type.js'\nexport type { SystemAuditData } from './types/SystemAuditData.type.js'\n\n// Namespace (runtime value)\nexport { Telemetry } from './types/Telemetry.type.js'\n\n// TrialManagement.types - Types\nexport type {\n ExtensionListItem,\n ExtensionListResponse,\n OrgTrialDetail,\n TrialExtensionSource,\n TrialManagementStats,\n} from './types/TrialManagement.types.js'\n\n// User.type - Types\nexport type {\n AccountsData,\n AppMetadata,\n BasicUser,\n BlockedFor,\n Identity,\n OrgMembership,\n User,\n UserMetadata,\n UserRequest,\n} from './types/User.type.js'\n\n// User.type - Values (enum)\nexport { UserMetadataEvent } from './types/User.type.js'\n\nexport type {\n UniqueTaskUser,\n ValueMetrics,\n ValueMetricsPerYearMonth,\n} from './types/ValueMetrics.type.js'\n\n// ============================================================================\n// Utils - Classes (runtime values)\n// ============================================================================\n\nexport {\n CLOUD_PROVIDER_ORDER,\n getCloudProviderLabel,\n getCloudProviderRank,\n} from './utils/cloudProvider.utils.js'\nexport {\n type ConnectivityStatus,\n deriveConnectivityMessage,\n deriveConnectivityStatus,\n} from './utils/connectivityStatus.utils.js'\nexport type {\n CronScheduleValidationFailure,\n CronScheduleValidationResult,\n CronScheduleValidationSuccess,\n} from './utils/cronSchedule.utils.js'\nexport {\n BACKUP_SCHEDULE_MIN_INTERVAL_MINUTES,\n validateCronSchedule,\n} from './utils/cronSchedule.utils.js'\nexport {\n canonicalPlan,\n canonicalPlanKey,\n canonicalPlanModifications,\n} from './utils/elasticsearchPlanPath.utils.js'\nexport {\n deriveEncryptionKeyStatus,\n type EncryptionKey,\n type EncryptionKeyStatus,\n type EncryptionKeyStatusReason,\n isEncryptionKeyStatusReason,\n needsKeyOwnerAction,\n} from './utils/encryptionKeyStatus.utils.js'\nexport {\n deriveEncryptionStatus,\n type EncryptionStatus,\n isEncryptionStatus,\n} from './utils/encryptionStatus.utils.js'\n// enterprise-connection.utils - Types\nexport type { EnterpriseConnectionOrganizationAssignment } from './utils/enterprise-connection.utils.js'\n// enterprise-connection.utils - Values (functions)\nexport {\n enterpriseConnectionMetadataToOrganizationAssignments,\n organizationAssignmentsToEnterpriseConnectionMetadata,\n} from './utils/enterprise-connection.utils.js'\nexport {\n addMonthsClamped,\n DEFAULT_ENTERPRISE_DURATION_IN_MONTHS,\n diffInWholeMonths,\n type EnterpriseTermWindow,\n getCurrentEnterpriseTerm,\n peakWithinTerm,\n toUtcDayStartMs,\n} from './utils/enterpriseTerm.utils.js'\nexport type { EnvVarEntry } from './utils/envVars.js'\nexport { parseEnvVars, serializeEnvVars } from './utils/envVars.js'\nexport {\n deriveFailoverKeyPolicyPrincipals,\n type FailoverKeyPolicyPrincipals,\n} from './utils/failoverKeyPolicy.utils.js'\nexport { flattenObject, unflattenObject } from './utils/flatten.utils.js'\nexport type {\n JvmOptionsModificationKey,\n ParsedJvmOption,\n} from './utils/jvmOptions.js'\nexport {\n addsEnvVarsOverrideValue,\n isJvmOptionsModificationKey,\n isUnderJvmSpec,\n isValidJvmOptionsPlanValue,\n JVM_OPTION_MAX_LENGTH,\n JVM_OPTION_PATTERN,\n JVM_OPTIONS_MAX_ITEMS,\n JVM_OPTIONS_MODIFICATION_KEYS,\n JVM_OPTIONS_TARGETS,\n joinJvmOptions,\n jvmOptionsOfPlanValue,\n parseJvmOption,\n requiresEnvVarsOverride,\n splitJvmOptions,\n validateJvmOptions,\n validateJvmOptionsPlanValue,\n validateJvmOptionsValue,\n} from './utils/jvmOptions.js'\nexport {\n KMS_ARN,\n KMS_MRK_ARN,\n type KmsArnValidationError,\n type ParsedKmsArn,\n parseKmsArn,\n validateKmsArnForRegion,\n} from './utils/kmsArn.utils.js'\nexport { validateLabels } from './utils/labelValidator.utils.js'\nexport {\n isMigrationLabel,\n type MigrationLabelField,\n migrationLabelPrefix,\n} from './utils/migrationLabel.utils.js'\nexport { ObjectMergeUtils } from './utils/objectMerge.utils.js'\nexport { getAtPath } from './utils/objectPath.utils.js'\nexport {\n computeOrgStartDate,\n type OrgStartDateInput,\n} from './utils/orgStartDate.utils.js'\nexport {\n getPermissionsByRoles,\n getUserPermissionsForOrg,\n} from './utils/orgs/OrgHelper.js'\nexport {\n REDACTED_LLM_KEY,\n redactLlmSecrets,\n redactOrgLlmSecrets,\n} from './utils/orgs/redactLlmSecrets.utils.js'\n\n// PasswordPolicy - Types\nexport type {\n PasswordPolicyRequest,\n PasswordPolicyResult,\n} from './utils/PasswordPolicy.js'\n\n// PasswordPolicy - Values (constants and function)\nexport {\n MAXLENGTH as PASSWORD_POLICY_MAXLENGTH,\n MINLENGTH as PASSWORD_POLICY_MINLENGTH,\n passwordPolicyCheck,\n} from './utils/PasswordPolicy.js'\nexport { isQaUserEmail, qaUserEmail } from './utils/qa-user.utils.js'\nexport {\n deriveSecondaryStorageStatus,\n type SecondaryStorageStatus,\n} from './utils/secondaryStorageStatus.utils.js'\nexport {\n allSettledResultsCounts,\n getFulfilledPromises,\n getRejectedPromises,\n getSettledSummary,\n} from './utils/settledPromises.util.js'\nexport {\n isValidAwsArn,\n isValidCIDR,\n isValidCIDRList,\n isValidClientName,\n isValidHostname,\n isValidPrivateLinkRegion,\n normalizeCIDRList,\n} from './utils/string-validation.utils.js'\nexport {\n extractCamundaUserEmail,\n guessName,\n isCamundaUserId,\n} from './utils/user.utils.js'\n\n// versionCheck.utils - Values (enum and function)\nexport {\n checkVersion,\n generationImageErrorMessage,\n isAppIntegrationsVersionSupported,\n isGenerationResumable,\n isSecretsFilterModeConfigurable,\n isValidGenerationImage,\n normalizeGenerationVersion,\n stripSecfixPostfix,\n VersionCheckOperator,\n} from './utils/versionCheck.utils.js'\nexport type { ZeebeRebalancingValidationErrors } from './utils/zeebeRebalancing.utils.js'\nexport {\n validateZeebeRebalancing,\n ZEEBE_REBALANCING_FEATURE_FLAG,\n} from './utils/zeebeRebalancing.utils.js'\n\n// ============================================================================\n// Config - Configuration files and types\n// ============================================================================\n\nexport { default as CAMUNDI_PERMISSION_RULES } from './config/camundi-permission-rules.js'\nexport type { CamundiPermissionRules } from './config/camundi-permission-rules.types.js'\n\nexport {\n augmentCamundiPermissions,\n getApplicableRolesForEmployee,\n HIBOB_CACHE_KEY,\n HIBOB_CACHE_NAMESPACE,\n isManager,\n} from './utils/camundiPermissionAugmenter.utils.js'\n"],
|
|
5
|
-
"mappings": "AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiBP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAMP,SAAS,mDAAmD;AAK5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAMA;AAAA,EASA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAWP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAWP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAyBP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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AAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAMP,SAAoB,WAAXC,gBAA2C;AAGpD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
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\n// ============================================================================\n// Constants (runtime values)\n// ============================================================================\n\nexport {\n ACTIVITY_RETENTION_CHOICES,\n ACTIVITY_RETENTION_DEFAULT_MONTHS,\n ACTIVITY_RETENTION_KEEP_FOREVER,\n ACTIVITY_RETENTION_MAX_MONTHS,\n ACTIVITY_RETENTION_NOT_SET,\n ACTIVITY_RETENTION_SYNC_CHUNK,\n type ActivityRetentionMonths,\n activityRetentionCutoff,\n activityRetentionLabel,\n isActivityRetentionMonths,\n isLimitedActivityRetention,\n} from './constants/activity-retention.const.js'\nexport {\n CUSTOM_GENERATION_MAX_PER_REQUESTER,\n CUSTOM_GENERATION_MAX_UPGRADEABLE_FROM,\n CUSTOM_GENERATION_NAME_MAX_LENGTH,\n CUSTOM_GENERATION_NAME_MIN_LENGTH,\n checkNewGenerationVersions,\n isCustomGenerationStage,\n isCustomPlansOpenToEveryone,\n} from './constants/custom-generation.const.js'\nexport {\n CUSTOM_HARDWARE_SIZING_BROKER_TOTAL_CAPS,\n CUSTOM_HARDWARE_SIZING_COUNT_CAPS,\n CUSTOM_HARDWARE_SIZING_ELASTICSEARCH_TOTAL_CAPS,\n CUSTOM_HARDWARE_SIZING_MAX_AUTO_RESIZE_INCREASE_GI,\n CUSTOM_HARDWARE_SIZING_MAX_PLAN_JSON_LENGTH,\n CUSTOM_HARDWARE_SIZING_MAX_PLANS_PER_REQUESTER,\n CUSTOM_HARDWARE_SIZING_NAME_MAX_LENGTH,\n CUSTOM_HARDWARE_SIZING_NAME_MIN_LENGTH,\n CUSTOM_HARDWARE_SIZING_REPLICA_SET_TOTAL_CAPS,\n CUSTOM_HARDWARE_SIZING_RESOURCE_CAPS,\n checkCustomHardwareSizing,\n isCustomHardwareSizingStage,\n parseKubernetesQuantity,\n} from './constants/custom-hardware-sizing.const.js'\nexport {\n APPROVAL_ENTRY_HEADER,\n CAMUNDI_APPROVAL_FLOW_FLAG,\n DIRECT_ROUTE_LOCK_HEADERS,\n DIRECT_ROUTE_LOCKED,\n directRouteLockHeaders,\n ERROR_CODE_HEADER,\n} from './constants/direct-route-lock.const.js'\nexport { DAY, HOUR, MINUTE, SECOND, WEEK } from './constants/duration.const.js'\nexport type { Stage } from './constants/misc.const.js'\nexport {\n CAMUNDA_CLAIMS_NAMESPACE,\n CONSOLE_API_USER_ID,\n countBulkOperationAcks,\n FEATURE_FLAG_SALES_PLANS_LABEL,\n FIRSTNAME_LASTNAME_MAX_LENGTH,\n HOTBACKUP_MIN_CREATE_PERIOD,\n MAX_HARDWARE_PACKAGE_COUNT,\n MAX_LENGTH_CLUSTER_NAME,\n MIGRATION_BACKUP_ID_LABEL_PREFIX,\n MINIMUM_EYEPAIRS,\n MINIMUM_EYEPAIRS_BY_BULK_OPERATION_TYPE,\n minimumBulkOperationAcks,\n minimumBulkOperationEyes,\n missingBulkOperationAcks,\n NAMES_OF_ENTERPRISE_SALESPLANS_WITH_SLEEPING_CLUSTERS,\n requiredBulkOperationAcks,\n SECRETS_MAX_LENGTH,\n STARTING_PRICE_PER_MONTH_IN_EURO,\n TEMPORARY_CLUSTER_NAME,\n UNKNOWN_ACTOR_EMAIL,\n} from './constants/misc.const.js'\nexport {\n getGatewayPropertyHint,\n getGatewayPropertyPath,\n isAffectedByStreamlinedDeployment,\n isPre89AffectedPath,\n PRE89_AFFECTED_PATHS,\n PRE89_AFFECTED_PROPERTY_PREFIXES,\n PRE89_GATEWAY_PROPERTY_PATHS,\n PRE89_GATEWAY_RESOURCE_PREFIXES,\n} from './constants/pre89EnvVarMapping.const.js'\nexport { PRIVATE_LINK_REGIONS } from './constants/privateLinkRegions.const.js'\nexport { SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT } from './constants/secureConnectivity.const.js'\nexport { isSelfServiceClusterModificationStage } from './constants/self-service-cluster-modification.const.js'\nexport { SIGNUP_ERROR_MESSAGE_PREPROD_RESTRICTED } from './constants/signup.const.js'\nexport type {\n TrialExtensionSurveyAnswer,\n TrialExtensionSurveyQuestion,\n} from './constants/trialExtensionSurvey.const.js'\nexport { TRIAL_EXTENSION_SURVEY_QUESTIONS } from './constants/trialExtensionSurvey.const.js'\nexport { TSUGA_BASE_URL } from './constants/tsuga.const.js'\nexport {\n V2_BODY_IDS_MAX,\n V2_FILTER_IDS_MAX,\n V2_MAX_PAGE_LIMIT,\n} from './constants/v2-list.const.js'\nexport {\n ADMIN_APP_RENAME_MIN_VERSION,\n APP_INTEGRATIONS_89_STREAM_CONNECTOR_BRIDGE_MIN_VERSION,\n APP_INTEGRATIONS_89_STREAM_MINOR,\n APP_INTEGRATIONS_89_STREAM_ZEEBE_MIN_VERSION,\n APP_INTEGRATIONS_MIN_VERSION,\n AUDIT_LOG_TAB_MIN_VERSION,\n AUTHORIZATION_TOGGLE_MIN_VERSION,\n AWS_ONLY_GENERATION_MIN_VERSION,\n BUSINESS_ID_UNIQUENESS_MIN_VERSION,\n BYOIDP_MIN_VERSION,\n CLUSTER_SECRETS_LABEL_MIN_VERSION,\n CLUSTER_STATISTICS_CONFIG_MIN_VERSION,\n CONNECTOR_MANAGEMENT_METRICS_MIN_VERSION,\n CONNECTOR_SECRET_SYNC_MIN_VERSION,\n CONNECTORS_MANAGEMENT_LINK_MIN_VERSION,\n ENFORCE_GROUPS_TASKLIST_V2_HIDDEN_MIN_VERSION,\n ENFORCE_GROUPS_TOGGLE_MIN_VERSION,\n GATEWAY_SPEC_8_9_MIN_VERSION,\n HOT_BACKUP_MIN_VERSION,\n IDENTITY_AUTHORIZATION_MIN_VERSION,\n IDENTITY_AUTHORIZATION_NOTICE_MAX_VERSION,\n IDENTITY_MANAGEMENT_MIN_VERSION,\n INTERNAL_CONNECTORS_MANAGEMENT_MIN_VERSION,\n JOB_DASHBOARD_MIN_VERSION,\n LINE_8_9_MIN_VERSION,\n LINE_8_10_MIN_VERSION,\n MCP_MIN_VERSION,\n MULTI_TENANCY_TOGGLE_MIN_VERSION,\n NEW_CLUSTER_ROLES_MIN_VERSION,\n OPTIMIZE_DEFAULT_ON_MIN_VERSION,\n OPTIMIZE_FILTERING_MIN_VERSION,\n OPTIONAL_TELEMETRY_MIN_VERSION,\n RESOURCE_BASED_AUTHORIZATIONS_MIN_VERSION,\n REST_API_URL_TRANSFORM_MIN_VERSION,\n REST_API_V2_MIN_VERSION,\n RESUME_ALPHA_MIN_VERSION,\n SECRET_SOURCE_MIN_VERSION,\n SECRETS_FILTER_MODE_8_6_MIN_VERSION,\n SECRETS_FILTER_MODE_8_7_MIN_VERSION,\n SECRETS_FILTER_MODE_8_8_MIN_VERSION,\n SECRETS_FILTER_MODE_8_9_MIN_VERSION,\n SECRETS_FILTER_MODE_8_10_MIN_VERSION,\n SESSION_CONFIG_MIN_VERSION,\n SWAGGER_MIN_VERSION,\n SWAGGER_URL_8_9_MIN_VERSION,\n TASKLIST_MODE_TOGGLE_MIN_VERSION,\n TASKLIST_UPGRADE_BANNER_MIN_VERSION,\n TASKLIST_V2_AUTO_ENABLE_FROM_MINOR,\n TASKLIST_V2_AUTO_ENABLE_TO_MINOR,\n TASKLIST_V2_DEFAULT_ON_MIN_VERSION,\n TASKLIST_V2_SETTING_MAX_VERSION,\n TASKLIST_V2_UPGRADE_MIN_VERSION,\n TASKLIST_V2_UPGRADE_TARGET_MIN_VERSION,\n UPGRADE_READINESS_MIN_VERSION,\n ZEEBE_REST_URL_MIN_VERSION,\n} from './constants/version-gates.const.js'\n\n// ============================================================================\n// DTOs - Types (interfaces and type aliases)\n// ============================================================================\n\n// Agent tokens - the read-only machine credentials of ccmacli. control-backend\n// stores them, and token-issuer, console-backend and accounts-ng read the\n// same claim and permission sets.\nexport type {\n AgentAccess,\n AgentClaim,\n AgentGrantCreated,\n AgentGrantRefusal,\n AgentGrantRefusalReason,\n AgentStatusResponse,\n AgentToken,\n AgentTokenAdmin,\n AgentTokenCreated,\n AgentTokenExpiryDays,\n AgentTokenKind,\n AgentTokenStatus,\n AgentVerifyResponse,\n CreateAgentGrantDto,\n CreateAgentTokenDto,\n ExtendAgentTokenDto,\n RedeemAgentGrantDto,\n} from './agent-tokens/agent-tokens.js'\nexport {\n AGENT_CLAIM,\n AGENT_CLIENT_ID_PREFIX,\n AGENT_ERROR,\n AGENT_GRANT_TTL_MS,\n AGENT_GRANTS_PER_HOUR_MAX,\n AGENT_READ_PERMISSIONS,\n AGENT_SLACK_CHANNEL_PATTERN,\n AGENT_SLACK_GRANTS_FEATURE_FLAG,\n AGENT_TOKEN_EXPIRY_DAYS,\n AGENT_TOKEN_NAME_MAX,\n AGENT_TOKEN_STATUSES,\n AGENT_TOKENS_ACTIVE_MAX,\n AGENT_TOKENS_FEATURE_FLAG,\n agentReadPermissionUnion,\n parseAgentClaim,\n} from './agent-tokens/agent-tokens.js'\n// Annotations - the notes and the tags that a Camundi attaches to a fleet\n// entity. The wire types and the rules are pure and browser-safe, so\n// control-backend and control-frontend run the same code.\nexport type {\n AnnotationActorView,\n AnnotationDecision,\n AnnotationDenialCode,\n} from './annotations/policy.js'\nexport {\n ANNOTATION_DENIAL_MESSAGES,\n canEditNote,\n canRemove,\n checkNoteBody,\n checkTagName,\n checkTagReason,\n isAuthor,\n} from './annotations/policy.js'\nexport {\n isWhiteGlove,\n isWhiteGloveName,\n WHITE_GLOVE_TAG,\n WHITE_GLOVE_WARNING,\n whiteGloveAnnotation,\n} from './annotations/white-glove.js'\nexport type {\n ApprovalRule,\n StageDependentApprovalType,\n} from './approvals/approval-rules.js'\nexport {\n APPROVAL_RULES,\n approvalsOfRule,\n approvalsRequiredFor,\n PREPROD_UNLOCK_PERMANENT_ACKS,\n} from './approvals/approval-rules.js'\nexport type {\n ChangePlanTypeRetentionLimitsResult,\n ClusterPlanTypeLimitsDto,\n PlanTypeRetentionLimitKey,\n} from './approvals/change-plan-type-retention-limits.js'\nexport {\n isRetentionLimitInBounds,\n PLAN_TYPE_RETENTION_LIMIT_KEY_LIST,\n PLAN_TYPE_RETENTION_LIMIT_KEYS,\n retentionLimitsOf,\n sameRetentionLimits,\n} from './approvals/change-plan-type-retention-limits.js'\nexport type {\n ClusterBulkClusterResultDto,\n ClusterBulkFinalStatus,\n ClusterBulkGenerationUpdateSettings,\n ClusterBulkOperationPayloadDto,\n ClusterBulkOperationRule,\n ClusterBulkPlanTypeUpdateSettings,\n ClusterBulkPlanUpdateSettings,\n ClusterBulkSettingsByType,\n ClusterBulkSleepWakeupSettings,\n ClusterBulkStepRequestDto,\n ClusterBulkStepResultDto,\n ClusterBulkTargetDto,\n ClusterPlanPathsRequestDto,\n ClusterPlanPathsResultDto,\n} from './approvals/cluster-bulk-operation.js'\nexport {\n CLUSTER_BULK_OPERATION_CLUSTER_NAME_MAX_LENGTH,\n CLUSTER_BULK_OPERATION_MAX_CLUSTERS,\n CLUSTER_BULK_OPERATION_NAME_MAX_LENGTH,\n CLUSTER_BULK_OPERATION_RULES,\n CLUSTER_BULK_OPERATION_TYPES,\n CLUSTER_BULK_SLEEPING_CLUSTER_DELAY_MS,\n clusterBulkOperationTypeOf,\n clusterBulkParameterOf,\n clusterBulkRequiredPermissions,\n clusterBulkResultOf,\n isClusterBulkSpecificPlan,\n isClusterBulkYolo,\n} from './approvals/cluster-bulk-operation.js'\nexport type {\n ClusterCorpseDto,\n ClusterCorpseKind,\n ClusterCorpsesDto,\n DeleteClusterCorpseResult,\n} from './approvals/delete-cluster-corpses.js'\nexport {\n CLUSTER_CORPSE_KINDS,\n CLUSTER_CORPSE_MIN_AGE_MS,\n DELETE_CLUSTER_CORPSES_MAX,\n} from './approvals/delete-cluster-corpses.js'\nexport {\n DNS_SUBDOMAIN_MAX_LENGTH,\n isDnsSubdomain,\n} from './approvals/dns-subdomain.js'\nexport type { EditGenerationResult } from './approvals/edit-generation.js'\nexport {\n EDIT_GENERATION_ENV_VARS_MAX_LENGTH,\n EDIT_GENERATION_EXPECTED_MAX_LENGTH,\n EDIT_GENERATION_NAME_MAX_LENGTH,\n} from './approvals/edit-generation.js'\nexport type { ApprovalExpectedChange } from './approvals/expected-value.js'\nexport {\n isSameApprovalValue,\n staleApprovalKeys,\n} from './approvals/expected-value.js'\nexport type {\n ClusterPlanTypeClusterDto,\n ClusterPlanTypeClustersDto,\n ForceDeleteClusterPlanTypeStepResult,\n} from './approvals/force-delete-cluster-plan-type.js'\nexport { FORCE_DELETE_CLUSTER_PLAN_TYPE_MAX_CLUSTERS } from './approvals/force-delete-cluster-plan-type.js'\nexport type {\n ApprovalIncidentDto,\n ApprovalIncidentLinkRequest,\n} from './approvals/incident-link.js'\nexport {\n APPROVAL_INCIDENT_FILTER_ANY,\n APPROVAL_INCIDENT_ID_MAX_LENGTH,\n APPROVAL_INCIDENT_NAME_MAX_LENGTH,\n APPROVAL_INCIDENT_PERMALINK_MAX_LENGTH,\n APPROVAL_INCIDENT_REFERENCE_MAX_LENGTH,\n APPROVAL_INCIDENTS_FLAG,\n isIncidentIoPermalink,\n} from './approvals/incident-link.js'\nexport type {\n OrgBulkDeletionFinalStatus,\n OrgBulkDeletionOrgDto,\n OrgBulkDeletionOrgResultDto,\n OrgBulkDeletionPayloadDto,\n OrgSalesPlanTypesRequest,\n OrgSalesPlanTypesResult,\n} from './approvals/org-bulk-deletion.js'\nexport {\n ORG_BULK_DELETION_FLAG,\n ORG_BULK_DELETION_MAX_ORGS,\n ORG_BULK_DELETION_NAME_MAX_LENGTH,\n ORG_TRIAL_ENDED_DURING_DELETION_MESSAGE,\n orgBulkResultOf,\n} from './approvals/org-bulk-deletion.js'\nexport type {\n ApprovalActorView,\n ApprovalDecision,\n ApprovalDenialCode,\n} from './approvals/policy.js'\nexport {\n approvalPermissionCheck,\n canAcknowledge,\n canCreate,\n canExecute,\n canOverride,\n canReadUseCase,\n canReject,\n canRunOverridden,\n canView,\n canWithdraw,\n createPermissionsOf,\n EXECUTE_WINDOW_DAYS,\n effectiveStatus,\n hasActorEmail,\n hasEveryPermission,\n hasFailedRun,\n isExpired,\n isOverrideGrantActive,\n isRunWindowClosed,\n isSameActor,\n isSameActorEmail,\n needsReason,\n OVERRIDE_GRANT_ENDED_MESSAGE,\n opensWithOwnApproval,\n overrideGranteeOf,\n remainingAcks,\n requiredPermissionsOf,\n resolveRequiredAcks,\n runWindowEnd,\n} from './approvals/policy.js'\nexport type {\n ReleaseTrainAutoUpgradeCandidates,\n ReleaseTrainPublishPayload,\n ReleaseTrainRollbackPayload,\n} from './approvals/release-train.js'\nexport type { SsoConnectionStrategy } from './approvals/sso-connection-fields.js'\nexport {\n countSsoMetadataKeys,\n SSO_CONNECTION_MAX_METADATA_KEYS,\n SSO_CONNECTION_STRATEGY_FIELDS,\n ssoSettingsKeysOfOtherStrategy,\n} from './approvals/sso-connection-fields.js'\nexport type { ApprovalUseCaseType } from './approvals/use-cases.const.js'\nexport {\n APPROVAL_EMAIL_MAX_LENGTH,\n APPROVAL_EMAIL_PATTERN,\n APPROVAL_OVERRIDE_DEFAULT_HOURS,\n APPROVAL_OVERRIDE_DENYLIST,\n APPROVAL_OVERRIDE_MAX_HOURS,\n APPROVAL_USE_CASE_TYPES,\n ENTERPRISE_ONBOARDING_METRIC_MAX,\n ENTERPRISE_ONBOARDING_NAME_MAX_LENGTH,\n ENTERPRISE_ONBOARDING_RESERVATION_MAX,\n ENTERPRISE_ONBOARDING_SFDC_ID_MAX_LENGTH,\n ENTERPRISE_ONBOARDING_TERM_MAX_MONTHS,\n ENTERPRISE_ONBOARDING_TERM_MIN_MONTHS,\n EXTEND_TRIAL_MAX_DAYS,\n EXTEND_TRIAL_MIN_DAYS,\n enterpriseContractChangePermissions,\n GENERATION_VERSION_VALUE_MAX_LENGTH,\n GENERATION_VERSIONS_MAX_GENERATIONS,\n isApprovalOverridable,\n isCalendarDay,\n isLlmSpendBelowTopUpThreshold,\n LLM_BUDGET_TOP_UP_THRESHOLD,\n ORG_LIMIT_TEXT_MAX_LENGTH,\n ORG_RESERVATION_MAX,\n PERSONAL_ORGANIZATION_MAX_PER_REQUESTER,\n PERSONAL_ORGANIZATION_NAME_MAX_LENGTH,\n PERSONAL_ORGANIZATION_NAME_MIN_LENGTH,\n PLATFORM_ROLE_CHANGE_MAX_ROLES,\n PREPROD_UNLOCK_DEFAULT_DAYS,\n PREPROD_UNLOCK_MAX_DAYS,\n PURGE_USERS_MAX_USERS,\n PURGE_USERS_REQUIRED_PERMISSIONS,\n REMOVE_ORG_MEMBER_FLAG,\n REMOVE_ORG_MEMBER_REQUIRED_PERMISSIONS,\n SIGNUP_SPAM_PATTERN_MAX_LENGTH,\n SIGNUP_SPAM_PATTERNS_MAX_FIELDS,\n SIGNUP_SPAM_PATTERNS_MAX_PER_FIELD,\n USER_METADATA_EXPECTED_MAX_LENGTH,\n USER_METADATA_MAX_LENGTH,\n} from './approvals/use-cases.const.js'\n// The chart query of a dashboard tile (catalogue, language, result).\nexport {\n CHART_DAY_GRAIN_MAX_DAYS,\n CHART_FILTER_MAX_LENGTH,\n CHART_GRAIN_DEFAULT,\n CHART_GRAINS,\n CHART_ID_MAX_LENGTH,\n CHART_METRICS,\n CHART_OTHER_SERIES_KEY,\n CHART_QUERY_MAX_LENGTH,\n CHART_TOP_DEFAULT,\n CHART_TOP_MAX,\n CHART_UNKNOWN_SERIES_KEY,\n CHART_WINDOW_AMOUNT_MAX,\n CHART_WINDOW_DEFAULT,\n CHART_WINDOW_UNITS,\n type ChartDimensionSpec,\n type ChartGrain,\n type ChartMetricSpec,\n type ChartPoint,\n type ChartQueryCheck,\n ChartQueryError,\n type ChartQueryErrorKind,\n type ChartQueryOptions,\n type ChartResult,\n type ChartSeries,\n type ChartSpec,\n type ChartUnit,\n type ChartWindow,\n type ChartWindowUnit,\n chartBucketStart,\n chartToday,\n chartWindowRange,\n findChartDimension,\n findChartMetric,\n formatChartSpec,\n isChartQueryError,\n parseChartQuery,\n readChartSpec,\n validateChartSpec,\n} from './charts/index.js'\n// Dashboards - the tiles of a dashboard hold filters and never data. The\n// wire types and the placement rules are pure, so control-backend and\n// control-frontend run the same code.\nexport {\n DASHBOARD_TILE_DEFAULT_SIZE,\n dashboardDefinitionBytes,\n dashboardDefinitionFits,\n dashboardTileDefaultSize,\n emptyDashboardDefinition,\n isSafeDashboardLink,\n placeNewTile,\n placeNewTiles,\n tilesOverlap,\n toStoredDashboardDefinition,\n upgradeDashboardDefinition,\n} from './dashboards/definition.js'\nexport type { ActiveUsersDto } from './dtos/ActiveUsers.dto.js'\nexport type {\n ALERT_SUBSCRIPTION_REPORT_TYPES,\n ALERT_SUBSCRIPTION_TYPES,\n AlertSubscriptionDto,\n AlertSubscriptionEntryDto,\n AlertSubscriptionWebhookAuth,\n CheckFailedReason,\n} from './dtos/AlertSubscription.dto.js'\n// DTOs - Values (constants)\nexport {\n FORBIDDEN_HOSTNAMES_FOR_WEBHOOK_ALERTS,\n HMAC_HEADER_POSITION,\n HMAC_SUPPORTED_ALGORITHM,\n} from './dtos/AlertSubscription.dto.js'\nexport type {\n AnnotationActor,\n AnnotationDto,\n AnnotationEntityKind,\n AnnotationKind,\n AnnotationLookupDto,\n AnnotationLookupEntryDto,\n AnnotationTagDto,\n EntityAnnotationsDto,\n} from './dtos/Annotation.dto.js'\nexport {\n ANNOTATION_BODY_MAX,\n ANNOTATION_ENTITY_KIND_LABELS,\n ANNOTATION_ENTITY_KINDS,\n ANNOTATION_ENTITY_MAX,\n ANNOTATION_KINDS,\n ANNOTATION_LOOKUP_MAX_ENTITIES,\n ANNOTATION_LOOKUP_TAGS_MAX,\n ANNOTATION_PAGE_SIZE_DEFAULT,\n ANNOTATION_PAGE_SIZE_MAX,\n ANNOTATION_REASON_MAX,\n ANNOTATION_SEARCH_MAX_LENGTH,\n ANNOTATION_TAG_NAME_MAX,\n normalizeTagName,\n} from './dtos/Annotation.dto.js'\nexport type { ApiClientStatsDto } from './dtos/ApiClientStats.dto.js'\n// Approvals - the wire types, and the rules that read them. Both are pure and\n// browser-safe, so control-backend, control-frontend and cloudbot run the same\n// code and cannot disagree.\nexport type {\n ApprovalAck,\n ApprovalActionMode,\n ApprovalActor,\n ApprovalEntityRef,\n ApprovalEntityType,\n ApprovalExecutionMode,\n ApprovalJobDto,\n ApprovalJobStatus,\n ApprovalM2mActor,\n ApprovalOverrideGrantDto,\n ApprovalProgress,\n ApprovalSortField,\n ApprovalSortOrder,\n ApprovalStatusCountsDto,\n ApprovalSummaryField,\n ApprovalSummaryFieldKind,\n ApprovalSummaryValue,\n ApprovalUseCaseDto,\n} from './dtos/ApprovalJob.dto.js'\nexport {\n APPROVAL_ACKS_MAX,\n APPROVAL_ENTITY_TYPES,\n APPROVAL_JOB_STATUSES,\n APPROVAL_LIST_SUMMARY_VALUES_MAX,\n APPROVAL_LIVE_STATUSES,\n APPROVAL_PAGE_SIZE_DEFAULT,\n APPROVAL_PAGE_SIZE_MAX,\n APPROVAL_PAYLOAD_ORG_FIELD,\n APPROVAL_REASON_MAX_LENGTH,\n APPROVAL_RUN_STALE_MS,\n APPROVAL_SEARCH_MAX_LENGTH,\n APPROVAL_SORT_DEFAULT,\n APPROVAL_SORT_FIELDS,\n APPROVAL_SUMMARY_FIELD_KINDS,\n APPROVAL_TYPE_FILTER_MAX,\n APPROVAL_TYPE_MAX_LENGTH,\n isRunStalled,\n progressFraction,\n} from './dtos/ApprovalJob.dto.js'\nexport type {\n ApprovalOrganizationNameResult,\n ApprovalSummaryNamesRequest,\n ApprovalSummaryNamesResult,\n} from './dtos/ApprovalSummaryNames.dto.js'\nexport type { AuditDto } from './dtos/Audit.dto.js'\nexport type { Auth0ResourceServerDto } from './dtos/Auth0ResourceServer.dto.js'\nexport type { BackupDto } from './dtos/Backup.dto.js'\nexport type { BackupScheduleDto } from './dtos/BackupSchedule.dto.js'\nexport type { ByomClientDto, ByomStatus } from './dtos/ByomClient.dto.js'\nexport type {\n ClusterCreationDefaultField,\n ClusterCreationDefaultKey,\n ClusterCreationDefaults,\n} from './dtos/ClusterCreationDefaults.dto.js'\nexport { CLUSTER_CREATION_DEFAULT_FIELDS } from './dtos/ClusterCreationDefaults.dto.js'\nexport type {\n ClusterDeferredSpecChange,\n DeferredSpecChangeType,\n} from './dtos/ClusterDeferredSpecChange.dto.js'\nexport type { ClusterIpWhitelistDto } from './dtos/ClusterIpWhitelist.dto.js'\nexport type {\n MoveClusterOwnerResult,\n MoveClusterWarnings,\n} from './dtos/ClusterOwnerMove.dto.js'\nexport type { ClusterPlanDto } from './dtos/ClusterPlan.dto.js'\nexport type { ClusterPlanTypeDto } from './dtos/ClusterPlanType.dto.js'\nexport type {\n ChangeClusterPlanTypeResult,\n ClusterModificationConfigRef,\n ClusterPlanTypeChangeRefusal,\n ClusterPlanTypeStateDto,\n} from './dtos/ClusterPlanTypeChange.dto.js'\nexport {\n CLUSTER_PLAN_TYPE_CHANGE_REFUSALS,\n clusterPlanTypeChangeRefusalOf,\n} from './dtos/ClusterPlanTypeChange.dto.js'\nexport type {\n ClusterSpecChange,\n ClusterSpecChangeActor,\n ClusterSpecHistory,\n} from './dtos/ClusterSpecHistory.dto.js'\nexport type {\n CommonClusterDto,\n ExternalIdpConfig,\n OptimizeFilteringConfig,\n OptimizeFilteringIncludeExclude,\n OptimizeFilteringPatch,\n SecretsFilterMode,\n ZeebeRebalancingSetting,\n} from './dtos/CommonCluster.dto.js'\nexport type { ConsoleClusterDto } from './dtos/ConsoleCluster.dto.js'\nexport type {\n ClusterActivityBucket,\n ClusterActivityTile,\n ClusterActivityV2Dto,\n ClusterActivityV2Response,\n ClusterByClientV2Dto,\n ClusterDatacenterOptionV2Dto,\n ClusterDetailV2Dto,\n ClusterFacetsV2Dto,\n ClusterListItemV2Dto,\n ClusterLiveStateV2Dto,\n ClusterLiveStateV2Entry,\n ClusterModificationState,\n ClusterParameterOptionV2Dto,\n ClusterParametersV2Dto,\n ClusterTtlFilter,\n ControlResolvedPermissions,\n ControlSessionDto,\n ControlSessionUser,\n CursorPage,\n CursorParams,\n ListClustersV2Params,\n ListOrganizationsV2Params,\n ListOrgMembersV2Params,\n OrgDetailV2Dto,\n OrgListItemV2Dto,\n OrgMemberV2Dto,\n OrgSummaryV2Dto,\n} from './dtos/ControlV2.dto.js'\nexport { CLUSTER_MODIFICATION_STATES } from './dtos/ControlV2.dto.js'\nexport type {\n DashboardActor,\n DashboardAnnotationsQuery,\n DashboardAnnotationsTile,\n DashboardAnnotationsTileV1,\n DashboardCatalogue,\n DashboardCatalogueChartMetric,\n DashboardCatalogueSearchField,\n DashboardChartQuery,\n DashboardChartRender,\n DashboardChartTile,\n DashboardChartTileV3,\n DashboardClusterCard,\n DashboardClusterDetailQuery,\n DashboardClusterDetailTile,\n DashboardClusterDetailTileV2,\n DashboardDefinition,\n DashboardDefinitionV1,\n DashboardDefinitionV2,\n DashboardDefinitionV3,\n DashboardDto,\n DashboardFleetQuery,\n DashboardFleetQueryTile,\n DashboardFleetQueryTileV1,\n DashboardHeadingTile,\n DashboardHeadingTileV2,\n DashboardLinkTile,\n DashboardLinkTileV2,\n DashboardListDto,\n DashboardNewTile,\n DashboardNoteTile,\n DashboardNoteTileV2,\n DashboardOrgCard,\n DashboardOrgDetailQuery,\n DashboardOrgDetailTile,\n DashboardOrgDetailTileV2,\n DashboardSummaryDto,\n DashboardTile,\n DashboardTileKind,\n DashboardTileLayout,\n DashboardTileV1,\n DashboardTileV2,\n DashboardTileV3,\n StoredDashboardDefinition,\n} from './dtos/Dashboard.dto.js'\nexport {\n DASHBOARD_CHART_RENDERS,\n DASHBOARD_CLUSTER_CARDS,\n DASHBOARD_DEFINITION_BYTES_MAX,\n DASHBOARD_DEFINITION_VERSION,\n DASHBOARD_ENTITY_ID_MAX,\n DASHBOARD_GRID_COLUMNS,\n DASHBOARD_GRID_ROWS_MAX,\n DASHBOARD_LINK_URL_MAX,\n DASHBOARD_NOTE_MAX,\n DASHBOARD_ORG_CARDS,\n DASHBOARD_PAGE_SIZE_DEFAULT,\n DASHBOARD_PAGE_SIZE_MAX,\n DASHBOARD_TILE_KINDS,\n DASHBOARD_TILE_ROWS_MAX,\n DASHBOARD_TILES_MAX,\n DASHBOARD_TITLE_MAX,\n} from './dtos/Dashboard.dto.js'\nexport type { EarlyAccessFeatureDto } from './dtos/EarlyAccessFeature.dto.js'\nexport type {\n CamundaWebApp,\n CamundaWebAppWithZeebe,\n ExternalClickwrapConfigDto,\n ExternalClusterDto,\n ExternalOrganizationDto,\n} from './dtos/ExternalWebapp.dto.js'\nexport type {\n CreateFeatureFlagDto,\n FeatureFlagAnswer,\n FeatureFlagDto,\n FeatureFlagKind,\n FeatureFlagListDto,\n UpdateFeatureFlagDto,\n} from './dtos/FeatureFlags.dto.js'\nexport {\n FEATURE_FLAG_KINDS,\n KILL_SWITCH_KEY_SUFFIX,\n killSwitchProblem,\n killSwitchStateText,\n} from './dtos/FeatureFlags.dto.js'\nexport type {\n FleetStatRowDto,\n FleetStatsPageDto,\n} from './dtos/FleetStats.dto.js'\nexport type {\n ClusterGenerationStateDto,\n ForceGenerationUpgradeResult,\n} from './dtos/ForceGenerationUpgrade.dto.js'\n// Functions\nexport {\n activeGenerations,\n compareGenerationNamesNewestFirst,\n type GenerationDto,\n type GenerationWithClusterCountDto,\n sortGenerationBySemverOfZeebe,\n type UpgradableGenerationsDto,\n} from './dtos/Generations.dto.js'\nexport type { ChangeGenerationVersionsResult } from './dtos/GenerationVersionsChange.dto.js'\n// Namespace (type-only - contains only interfaces)\nexport type { Hdp } from './dtos/Hdp.dto.js'\nexport type {\n K8sBackupConfig,\n K8sConfig,\n K8sConfigLegacyFormat,\n K8sContext,\n K8sContextDto,\n} from './dtos/K8sContext.dto.js'\nexport type {\n CreateLeafletRequest,\n LeafletDto,\n LeafletSummaryDto,\n UpdateLeafletRequest,\n} from './dtos/Leaflet.dto.js'\nexport type {\n M2mTokenCountDto,\n M2mTokenCountsDto,\n} from './dtos/M2mTokenCount.dto.js'\nexport type { MetaDto } from './dtos/Meta.dto.js'\nexport type {\n AutoJoinAssignment,\n LicensingModelType,\n LlmProviderName,\n OrganizationDto,\n OrganizationMetadata,\n OrgOwner,\n OrgWithNameAndSalesPlan,\n} from './dtos/Organization.dto.js'\nexport {\n LICENSING_MODEL_DISPLAY_NAMES,\n VALID_LICENSING_MODELS,\n} from './dtos/Organization.dto.js'\nexport type { OrganizationMemberDto } from './dtos/OrganizationMember.dto.js'\nexport type { OrganizationToSalesPlanDto } from './dtos/OrganizationToSalesPlan.dto.js'\nexport type {\n PermissionHolderDto,\n PermissionHoldersDto,\n} from './dtos/PermissionHolders.dto.js'\nexport { isRecommendationAddress } from './dtos/PermissionHolders.dto.js'\nexport type {\n DryRunSanityDiff,\n ReleaseTrainPreview,\n ReleaseTrainSanityReport,\n SanityFix,\n SanityRuleInfo,\n SanitySeverity,\n SanityViolation,\n} from './dtos/ReleaseTrainSanity.dto.js'\nexport type {\n ResearchLoginAssignedDto,\n ResearchLoginDto,\n ResearchLoginState,\n} from './dtos/ResearchLogin.dto.js'\nexport type { RestoreDto, RestoreState } from './dtos/Restore.dto.js'\n// SalesPlan.dto - Types\nexport type {\n ClusterLimits,\n ConsumptionDataItem,\n Limits,\n SalesPlanDto,\n SalesPlanMetadata,\n} from './dtos/SalesPlan.dto.js'\n// SalesPlan.dto - Values (constants and functions)\nexport {\n allClusterBasedLimits,\n allSalesPlanLimits,\n clusterPlanWhiteListIds,\n deprecatedLimit,\n generationWhiteListIds,\n isLimitKeyEnabled,\n isLimitOfferedOnStage,\n isUnlockedClusterPlansStage,\n MAX_CLUSTER_CLIENTS_DEFAULT,\n MAX_CLUSTER_CLIENTS_DEV,\n RETENTION_LIMIT_DEFAULT,\n RETENTION_LIMIT_MAXIMUM,\n RETENTION_LIMIT_MINIMUM,\n unusedClusterBasedLimits,\n unusedSalesPlanLimits,\n} from './dtos/SalesPlan.dto.js'\nexport type { SecureConnectivityDto } from './dtos/SecureConnectivity.dto.js'\nexport type { SignupDto } from './dtos/Signup.dto.js'\nexport type {\n StorybookConfig,\n StorybookConfigBackup,\n StorybookConfigChannel,\n StorybookConfigDatacenter,\n StorybookConfigGeneration,\n} from './dtos/StorybookConfig.dto.js'\nexport type { SystemAuditDto } from './dtos/SystemAudit.dto.js'\nexport type {\n UpgradeReadinessDto,\n UpgradeReadinessSource,\n UpgradeReadinessState,\n} from './dtos/UpgradeReadiness.dto.js'\n// UsageAlert.dto - Types\nexport type { UsageAlertDto } from './dtos/UsageAlert.dto.js'\n// UsageAlert.dto - Values (enum and constants)\nexport {\n UsageAlertInitValues,\n UsageAlertMetric,\n UsageAlertThresholdLimits,\n} from './dtos/UsageAlert.dto.js'\nexport type { UserMetaDataDto } from './dtos/UserMetaData.dto.js'\n// Lucene-style table search (parser + AST \u2192 SQL compiler + field registries).\nexport {\n type AndNode,\n CLUSTER_DEFAULT_SEARCH_FIELDS,\n CLUSTER_SEARCH_FIELDS,\n CLUSTER_TTL_SEARCH_FIELDS,\n type CompileContext,\n type CompiledQuery,\n clusterSearchFieldsForStage,\n compileQuery,\n type FieldBinding,\n findSearchField,\n idSetPredicate,\n isLuceneQueryError,\n joinIdSet,\n LuceneQueryError,\n likeArgument,\n type NotNode,\n ORG_DEFAULT_SEARCH_FIELDS,\n ORGANIZATION_SEARCH_FIELDS,\n type OrNode,\n parseLuceneQuery,\n type QueryNode,\n type RangeNode,\n type SearchFieldCapability,\n type SearchFieldSpec,\n type SearchFieldType,\n type SearchTermOperator,\n type SqlDialect,\n type TermNode,\n} from './search/index.js'\nexport { upgradeGateReason } from './utils/upgradeGateReason.utils.js'\n\n// ============================================================================\n// Enums (runtime values)\n// ============================================================================\n\nexport {\n AlertSubscriptionReportType,\n AlertSubscriptionType,\n} from './enums/AlertSubscription.enum.js'\nexport { AuditEntity, AuditEntityAttribute } from './enums/AuditEntity.enum.js'\nexport { AuditService } from './enums/AuditService.enum.js'\nexport { BackupStatus } from './enums/BackupStatus.enum.js'\nexport {\n ClusterBulkOperationStatus,\n ClusterBulkOperationType,\n} from './enums/ClusterBulkOperation.enum.js'\nexport { ClusterClientPermission } from './enums/ClusterClientPermissions.enum.js'\nexport { ClusterEncryptionKey } from './enums/ClusterEncryptionKey.enum.js'\nexport { ClusterStatus } from './enums/ClusterStatus.enum.js'\nexport { ConsoleAPIClientPermission } from './enums/ConsoleApiClientPermission.enum.js'\nexport { ErrorType } from './enums/ErrorType.enum.js'\nexport type {\n AssignableOrganizationRoleType,\n OrganizationRoleType,\n UnassignableOrganizationRoleType,\n} from './enums/OrganizationRole.enum.js'\nexport {\n AssignableOrganizationRole,\n LegacyHeldOrganizationRole,\n OrganizationRole,\n UnassignableOrganizationRole,\n} from './enums/OrganizationRole.enum.js'\nexport { SseEntity, SseType } from './enums/Sse.enum.js'\nexport {\n SystemAuditEntity,\n SystemAuditEntityAttribute,\n} from './enums/SystemAuditEntity.enum.js'\n\n// ============================================================================\n// Permissions - Namespaces (runtime values)\n// ============================================================================\n\nexport { AccountsPermissions } from './permissions/accounts.permissions.js'\nexport { AlertDistributorPermissions } from './permissions/alert-distributor.permissions.js'\nexport { AuditLoggerPermissions } from './permissions/auditlogger.permissions.js'\nexport {\n accountsUserFeaturesFromPermissions,\n consoleUserFeaturesFromPermissions,\n sessionHasPermission,\n sessionPermissionKeysFor,\n} from './permissions/combo.js'\nexport { ConsolePermissions } from './permissions/console.permissions.js'\nexport { NotificationPermissions } from './permissions/notification.permissions.js'\n// profile.permissions - Types\nexport type { OnboardConfig } from './permissions/profile.permissions.js'\n// profile.permissions - Values (constants)\n// NOTE: the `allowed` email lists (CLOUD_TEAM_EMAILS, SRE_TEAM_EMAILS, etc.)\n// intentionally live in the private `@camunda-cloud/shared-backend` package\n// instead of here, since this package is published publicly to npm.\nexport { PROFILES } from './permissions/profile.permissions.js'\nexport {\n ALL_PERMISSIONS_AT_AUTH0,\n expandRolesToPermissions,\n} from './permissions/roleExpansion.utils.js'\n\n// ============================================================================\n// Types - Type-only exports (interfaces and type aliases)\n// ============================================================================\n\nexport type { AuditData } from './types/AuditData.type.js'\n// AutoSleep.type - Types\nexport type {\n ActivitySleepEligibilityOptions,\n SleepCronEligibilityOptions,\n} from './types/AutoSleep.type.js'\n// AutoSleep.type - Values (constants and functions)\nexport {\n INTERNAL_LOW_HARDWARE_PLAN_NAME,\n isActivitySleepEligible,\n isClusterTagEligibleForSleepCron,\n isSalesPlanEligibleForSleepCron,\n isSleepCronEligible,\n SLEEP_CRON_ELIGIBLE_TAGS,\n} from './types/AutoSleep.type.js'\nexport type {\n BotContext,\n BotOptions,\n BotRequest,\n GetUserDetailsResponse,\n ListRolesForUserResponse,\n UpdateUserRolesRequest,\n UpdateUserRolesResponse,\n UserContext,\n UserDetails,\n} from './types/Bot.types.js'\n// BulkOperation.type - Types\nexport type {\n BulkClusterDeletionContent,\n BulkClusterDeletionItem,\n BulkClusterGenerationUpdateItem,\n BulkClusterPlanTypeUpdateContent,\n BulkClusterPlanTypeUpdateItem,\n BulkClusterPlanUpdateContent,\n BulkClusterPlanUpdateItem,\n BulkGenerationUpdateContent,\n GenericBulkClusterOperationContent,\n GenericBulkOperationContent,\n GenericClusterBulkOperationItem,\n} from './types/BulkOperation.type.js'\n// BulkOperation.type - Functions (type guards)\nexport {\n isBulkClusterDeletionItem,\n isBulkClusterPlanTypeUpdateItem,\n isBulkClusterPlanUpdateItem,\n isIsBulkClusterGenerationUpdateIten,\n} from './types/BulkOperation.type.js'\n// C8ClusterComponentVersions.type - Types\nexport type {\n GenerationEnvVarsDto,\n GenerationEnvVarsKey,\n GenerationImageVersionsDto,\n ImmutableZeebeClusterVersionsDto,\n MutableZeebeClusterVersionsDto,\n ZeebeClusterVersionsDto,\n} from './types/C8ClusterComponentVersions.type.js'\n// C8ClusterComponentVersions.type - Values (constants)\nexport {\n AllThings,\n GENERATION_ENV_VARS_KEYS,\n GENERATION_IMAGE_VERSION_KEYS,\n ImmutableThings,\n MutableThings,\n} from './types/C8ClusterComponentVersions.type.js'\n// CamundaClusterLabels.type - Types\nexport type {\n CamundaClusterStage,\n CamundaClusterStageLabel,\n ClusterLabels,\n} from './types/CamundaClusterLabels.type.js'\n// CamundaClusterLabels.type - Values (constants)\nexport {\n ALLOWED_CAMUNDA_LABELS,\n StageClusterLabels,\n} from './types/CamundaClusterLabels.type.js'\n// Chargebee.type - Types\nexport type { SubscriptionItem } from './types/Chargebee.type.js'\n// Chargebee.type - Values (enums)\nexport { ConsumptionData, ConsumptionDataType } from './types/Chargebee.type.js'\n// ClusterBulkOperation.type - Types\nexport type {\n ClusterBulkOperationAck,\n ClusterBulkOperationClusterDto,\n ClusterBulkOperationContent,\n ClusterBulkOperationDto,\n ClusterBulkOperationGenerationUpdateParameter,\n ClusterBulkOperationParameter,\n ClusterBulkOperationPlanTypeUpdateParameter,\n ClusterBulkOperationPlanUpdateParameter,\n ClusterBulkOperationPostContent,\n ClusterSleepWakeupParameter,\n} from './types/ClusterBulkOperation.type.js'\nexport type {\n ClusterModificationConfigDto,\n ClusterModificationDto,\n} from './types/ClusterModification.type.js'\n// ClusterPlanFields.type - Values (field spec and type guard)\nexport {\n CLUSTER_PLAN_FIELDS,\n type ClusterPlanFieldSpec,\n type ClusterPlanFieldTree,\n isClusterPlanFieldSpec,\n} from './types/ClusterPlanFields.type.js'\nexport type {\n ClusterPlanModificationAck,\n ClusterPlanModificationConfig,\n ClusterPlanModificationDto,\n} from './types/ClusterPlanModification.type.js'\n// ClusterPlanTypeAvailabilityClass.type - Values (enum and function)\nexport {\n ClusterPlanTypeAvailabilityClass,\n type EffectiveAvailabilityClass,\n getEffectiveAvailabilityClass,\n hasNoAvailabilityClass,\n sortByAvailabilityClasses,\n} from './types/ClusterPlanTypeAvailabilityClass.type.js'\n// ClusterPlanTypeCategory.type - Values (enum and functions)\nexport {\n ClusterPlanTypeCategory,\n hasAvailabilityClass,\n sortByClusterPlanTypeCategory,\n} from './types/ClusterPlanTypeCategory.type.js'\nexport type { ClusterPlanTypesToConfig } from './types/ClusterPlanTypesToConfig.type.js'\nexport type { ClusterPlanTypesToReserved } from './types/ClusterPlanTypesToReserved.type.js'\nexport type {\n ClusterTtlDeletionPayload,\n ClusterTtlDeletionResult,\n ClusterTtlDto,\n ClusterTtlDuration,\n ClusterTtlOption,\n ClusterTtlUnlimited,\n UpdateClusterTtlBody,\n} from './types/ClusterTtl.type.js'\nexport {\n CLUSTER_TTL_BACKFILL_REASON,\n CLUSTER_TTL_DURATION_MS,\n CLUSTER_TTL_DURATIONS,\n CLUSTER_TTL_FEATURE_FLAG,\n CLUSTER_TTL_OPTIONS,\n CLUSTER_TTL_UNLIMITED_LINK_MAX_LENGTH,\n CLUSTER_TTL_UNLIMITED_REASON_MAX_LENGTH,\n clusterTtlExpiresAt,\n DEFAULT_CLUSTER_TTL_OPTION,\n extendClusterTtl,\n isClusterTtlDuration,\n isClusterTtlOption,\n isClusterTtlStage,\n isHttpUrl,\n isPastClusterTtl,\n validateClusterTtlUnlimited,\n} from './types/ClusterTtl.type.js'\nexport type {\n ClusterUsageDataRequest,\n ClusterUsageMetadataDto,\n ClusterUsageMetricsAddRequestByMetricHeap,\n ClusterUsageMetricsData,\n ClusterUsageMetricsFilter,\n ClusterUsageOrgStartDate,\n} from './types/ClusterUsageMetrics.type.js'\nexport type { EnterpriseIncludingValueMetrics } from './types/EnterpriseIncludingValueMetrics.type.js'\nexport type {\n HdpTenantUsageBreakdown,\n HdpTenantUsagePerClusterPoint,\n HdpTenantUsagePoint,\n} from './types/HdpTenantUsage.type.js'\n// hdp.types - Types (interfaces)\nexport type {\n AlertSubscription as HdpAlertSubscription,\n ByomClient as HdpByomClient,\n Channel as HdpChannel,\n Cluster as HdpCluster,\n ClusterBackup as HdpClusterBackup,\n ClusterBackupSchedule as HdpClusterBackupSchedule,\n ClusterBulkOperation as HdpClusterBulkOperation,\n ClusterClient as HdpClusterClient,\n ClusterModification as HdpClusterModification,\n ClusterPlan as HdpClusterPlan,\n ClusterPlanType as HdpClusterPlanType,\n ConnectorSecret as HdpConnectorSecret,\n ConsoleApiClient as HdpConsoleApiClient,\n Datacenter as HdpDatacenter,\n Generation as HdpGeneration,\n HdpBackendChangeEvent,\n HdpClusterModificationConfig,\n HdpDisk,\n HdpDiskUsageDataPoint,\n HdpEntity,\n HdpPrometheusDataCapacityDataPoint,\n Invite as HdpInvite,\n Organization as HdpOrganization,\n SecureConnectivity as HdpSecureConnectivity,\n SystemAudit as HdpSystemAudit,\n TelemetryData as HdpTelemetryData,\n UsageAlert as HdpUsageAlert,\n User as HdpUser,\n UserLogin as HdpUserLogin,\n} from './types/hdp.types.js'\n// hdp.types - Values (enums)\nexport {\n AlertSubscriptionReportType as HdpAlertSubscriptionReportType,\n AlertSubscriptionType as HdpAlertSubscriptionType,\n HDP_DISKS,\n} from './types/hdp.types.js'\n// notification.type - Types\nexport type {\n GlobalNotification,\n NotificationDto,\n NotificationMeta,\n NotificationOptions,\n NotificationPermission,\n NotificationSource,\n NotificationState,\n NotificationType,\n OrgNotification,\n UserNotification,\n UserOrgNotification,\n} from './types/notification.type.js'\n// notification.type - Values (enums and constants)\nexport {\n NotificationPermissionValues,\n NotificationSourceEnum,\n NotificationStateEnum,\n NotificationTypeEnum,\n} from './types/notification.type.js'\n// OrganizationPermission.type - Types\nexport type {\n CreateReadUpdateDelete,\n OrganizationPermissions,\n} from './types/OrganizationPermission.type.js'\n// OrganizationPermission.type - Values (constants)\nexport {\n OrganizationPermissionsDescriptions,\n PermissionsForOrganizationRole,\n} from './types/OrganizationPermission.type.js'\nexport {\n getPreprodClusterTtlHours,\n isPastPreprodClusterTtl,\n isPreprodClusterTtlStage,\n parseNumericLimit,\n} from './types/PreprodClusterTtl.type.js'\n// Roles.js - Types\nexport type {\n AccountRoles,\n ConsoleRoles,\n ModelerRoles,\n Roles,\n} from './types/Roles.js'\n// Roles.js - Values (constants)\nexport { SAFE_ROLES } from './types/Roles.js'\n// SalesPlanType.type - Types\nexport type {\n DisplayedSalesPlan,\n RevisitedSalesPlanName,\n} from './types/SalesPlanType.type.js'\n// SalesPlanType.type - Values (enums and functions)\nexport {\n AnalyticsSalesPlanType,\n getAnalyticsSalesPlanFromOrgSalesPlan,\n getDisplayedSalesPlan,\n getRevisitedSalesPlanName,\n OPTIMIZE_DISABLED_PLAN_TYPES,\n SalesPlanType,\n USAGE_SALES_PLAN_TYPES,\n} from './types/SalesPlanType.type.js'\n// SpamDetection.type - Types\nexport type { SpamDetectionPatterns } from './types/SpamDetection.type.js'\n// SpamDetection.type - Values (constants)\nexport { TEERGRUBE_PATTERNS } from './types/SpamDetection.type.js'\nexport type {\n AlertSubscriptionSseEvent,\n BackupSseEvent,\n ClusterClientSseEvent,\n ClusterSseEvent,\n ConnectorSecretsSseEvent,\n ConsoleApiClientSseEvent,\n ConsoleSseEvent,\n MonitoringSseEvent,\n SecureConnectivitySseEvent,\n SseClusterPayload,\n SseMonitoringPayload,\n SseSecureConnectivityPayload,\n} from './types/SseEvent.type.js'\n// Namespace (type-only - contains only interfaces)\nexport type { AccountsStats } from './types/Stats.types.js'\n// Survey.type - Types\nexport type { Persona, SurveyDto } from './types/Survey.type.js'\n// Survey.type - Values (enum)\nexport { FeedbackType } from './types/Survey.type.js'\n// SuspendStrategy.type - Types\nexport type {\n GetSuspendStrategyOptions,\n SuspendStrategy,\n} from './types/SuspendStrategy.type.js'\n// SuspendStrategy.type - Values (function)\nexport { getSuspendStrategy } from './types/SuspendStrategy.type.js'\nexport type { SystemAuditData } from './types/SystemAuditData.type.js'\n\n// Namespace (runtime value)\nexport { Telemetry } from './types/Telemetry.type.js'\n\n// TrialManagement.types - Types\nexport type {\n ExtensionListItem,\n ExtensionListResponse,\n OrgTrialDetail,\n TrialExtensionSource,\n TrialManagementStats,\n} from './types/TrialManagement.types.js'\n\n// User.type - Types\nexport type {\n AccountsData,\n AppMetadata,\n BasicUser,\n BlockedFor,\n Identity,\n OrgMembership,\n User,\n UserMetadata,\n UserRequest,\n} from './types/User.type.js'\n\n// User.type - Values (enum)\nexport { UserMetadataEvent } from './types/User.type.js'\n\nexport type {\n UniqueTaskUser,\n ValueMetrics,\n ValueMetricsPerYearMonth,\n} from './types/ValueMetrics.type.js'\n\n// ============================================================================\n// Utils - Classes (runtime values)\n// ============================================================================\n\nexport {\n CLOUD_PROVIDER_ORDER,\n getCloudProviderLabel,\n getCloudProviderRank,\n} from './utils/cloudProvider.utils.js'\nexport {\n type ConnectivityStatus,\n deriveConnectivityMessage,\n deriveConnectivityStatus,\n} from './utils/connectivityStatus.utils.js'\nexport type {\n CronScheduleValidationFailure,\n CronScheduleValidationResult,\n CronScheduleValidationSuccess,\n} from './utils/cronSchedule.utils.js'\nexport {\n BACKUP_SCHEDULE_MIN_INTERVAL_MINUTES,\n validateCronSchedule,\n} from './utils/cronSchedule.utils.js'\nexport {\n canonicalPlan,\n canonicalPlanKey,\n canonicalPlanModifications,\n} from './utils/elasticsearchPlanPath.utils.js'\nexport {\n deriveEncryptionKeyStatus,\n type EncryptionKey,\n type EncryptionKeyStatus,\n type EncryptionKeyStatusReason,\n isEncryptionKeyStatusReason,\n needsKeyOwnerAction,\n} from './utils/encryptionKeyStatus.utils.js'\nexport {\n deriveEncryptionStatus,\n type EncryptionStatus,\n isEncryptionStatus,\n} from './utils/encryptionStatus.utils.js'\n// enterprise-connection.utils - Types\nexport type { EnterpriseConnectionOrganizationAssignment } from './utils/enterprise-connection.utils.js'\n// enterprise-connection.utils - Values (functions)\nexport {\n enterpriseConnectionMetadataToOrganizationAssignments,\n organizationAssignmentsToEnterpriseConnectionMetadata,\n} from './utils/enterprise-connection.utils.js'\nexport {\n addMonthsClamped,\n DEFAULT_ENTERPRISE_DURATION_IN_MONTHS,\n diffInWholeMonths,\n type EnterpriseTermWindow,\n getCurrentEnterpriseTerm,\n peakWithinTerm,\n toUtcDayStartMs,\n} from './utils/enterpriseTerm.utils.js'\nexport type { EnvVarEntry } from './utils/envVars.js'\nexport { parseEnvVars, serializeEnvVars } from './utils/envVars.js'\nexport {\n deriveFailoverKeyPolicyPrincipals,\n type FailoverKeyPolicyPrincipals,\n} from './utils/failoverKeyPolicy.utils.js'\nexport { flattenObject, unflattenObject } from './utils/flatten.utils.js'\nexport type {\n JvmOptionsModificationKey,\n ParsedJvmOption,\n} from './utils/jvmOptions.js'\nexport {\n addsEnvVarsOverrideValue,\n isJvmOptionsModificationKey,\n isUnderJvmSpec,\n isValidJvmOptionsPlanValue,\n JVM_OPTION_MAX_LENGTH,\n JVM_OPTION_PATTERN,\n JVM_OPTIONS_MAX_ITEMS,\n JVM_OPTIONS_MODIFICATION_KEYS,\n JVM_OPTIONS_TARGETS,\n joinJvmOptions,\n jvmOptionsOfPlanValue,\n parseJvmOption,\n requiresEnvVarsOverride,\n splitJvmOptions,\n validateJvmOptions,\n validateJvmOptionsPlanValue,\n validateJvmOptionsValue,\n} from './utils/jvmOptions.js'\nexport {\n KMS_ARN,\n KMS_MRK_ARN,\n type KmsArnValidationError,\n type ParsedKmsArn,\n parseKmsArn,\n validateKmsArnForRegion,\n} from './utils/kmsArn.utils.js'\nexport { validateLabels } from './utils/labelValidator.utils.js'\nexport {\n isMigrationLabel,\n type MigrationLabelField,\n migrationLabelPrefix,\n} from './utils/migrationLabel.utils.js'\nexport { ObjectMergeUtils } from './utils/objectMerge.utils.js'\nexport { getAtPath } from './utils/objectPath.utils.js'\nexport {\n computeOrgStartDate,\n type OrgStartDateInput,\n} from './utils/orgStartDate.utils.js'\nexport {\n getPermissionsByRoles,\n getUserPermissionsForOrg,\n} from './utils/orgs/OrgHelper.js'\nexport {\n REDACTED_LLM_KEY,\n redactLlmSecrets,\n redactOrgLlmSecrets,\n} from './utils/orgs/redactLlmSecrets.utils.js'\n\n// PasswordPolicy - Types\nexport type {\n PasswordPolicyRequest,\n PasswordPolicyResult,\n} from './utils/PasswordPolicy.js'\n\n// PasswordPolicy - Values (constants and function)\nexport {\n MAXLENGTH as PASSWORD_POLICY_MAXLENGTH,\n MINLENGTH as PASSWORD_POLICY_MINLENGTH,\n passwordPolicyCheck,\n} from './utils/PasswordPolicy.js'\nexport { isQaUserEmail, qaUserEmail } from './utils/qa-user.utils.js'\nexport {\n deriveSecondaryStorageStatus,\n type SecondaryStorageStatus,\n} from './utils/secondaryStorageStatus.utils.js'\nexport {\n allSettledResultsCounts,\n getFulfilledPromises,\n getRejectedPromises,\n getSettledSummary,\n} from './utils/settledPromises.util.js'\nexport {\n isValidAwsArn,\n isValidCIDR,\n isValidCIDRList,\n isValidClientName,\n isValidHostname,\n isValidPrivateLinkRegion,\n normalizeCIDRList,\n} from './utils/string-validation.utils.js'\nexport {\n extractCamundaUserEmail,\n guessName,\n isCamundaUserId,\n} from './utils/user.utils.js'\n\n// versionCheck.utils - Values (enum and function)\nexport {\n checkVersion,\n generationImageErrorMessage,\n isAppIntegrationsVersionSupported,\n isGenerationResumable,\n isSecretsFilterModeConfigurable,\n isValidGenerationImage,\n normalizeGenerationVersion,\n stripSecfixPostfix,\n VersionCheckOperator,\n} from './utils/versionCheck.utils.js'\nexport type { ZeebeRebalancingValidationErrors } from './utils/zeebeRebalancing.utils.js'\nexport {\n validateZeebeRebalancing,\n ZEEBE_REBALANCING_FEATURE_FLAG,\n} from './utils/zeebeRebalancing.utils.js'\n\n// ============================================================================\n// Config - Configuration files and types\n// ============================================================================\n\nexport { default as CAMUNDI_PERMISSION_RULES } from './config/camundi-permission-rules.js'\nexport type { CamundiPermissionRules } from './config/camundi-permission-rules.types.js'\n\nexport {\n augmentCamundiPermissions,\n getApplicableRolesForEmployee,\n HIBOB_CACHE_KEY,\n HIBOB_CACHE_NAMESPACE,\n isManager,\n} from './utils/camundiPermissionAugmenter.utils.js'\n"],
|
|
5
|
+
"mappings": "AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,KAAK,MAAM,QAAQ,QAAQ,YAAY;AAEhD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,4BAA4B;AACrC,SAAS,iDAAiD;AAC1D,SAAS,6CAA6C;AACtD,SAAS,+CAA+C;AAKxD,SAAS,wCAAwC;AACjD,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA4BP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiBP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAMP,SAAS,mDAAmD;AAK5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EA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/C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EAEA;AAAA,OACK;AACP,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AASP;AAAA,EACe;AAAA,EACA;AAAA,EACb;AAAA,OACK;AACP,SAAS,eAAe,mBAAmB;AAC3C;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAMP,SAAoB,WAAXC,gBAA2C;AAGpD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
6
|
"names": ["AlertSubscriptionReportType", "AlertSubscriptionType", "default"]
|
|
7
7
|
}
|
|
@@ -33,6 +33,14 @@ export declare namespace AccountsPermissions {
|
|
|
33
33
|
const SUPPORT_AGENT_SEE_ORG_MEMBERSHIPS = "asas";
|
|
34
34
|
const SUPPORT_AGENT_ADD_TO_ORG = "asaa";
|
|
35
35
|
const MODIFY_CLUSTER_PLAN_TYPE_RESERVATIONS = "acpm";
|
|
36
|
+
/**
|
|
37
|
+
* May open a custom generation or custom hardware sizing request on int in
|
|
38
|
+
* Camunda Control. On dev anybody signed in can open one, and prod refuses
|
|
39
|
+
* them. No Camundi permission rule grants the role
|
|
40
|
+
* `accounts:customPlansCreator`: a person assigns it at Auth0, one Camundi
|
|
41
|
+
* at a time.
|
|
42
|
+
*/
|
|
43
|
+
const CUSTOM_PLANS_CREATE = "accp";
|
|
36
44
|
const M2M_SALESPLAN_GET = "amsg";
|
|
37
45
|
const M2M_SALESPLAN_SWITCH = "amss";
|
|
38
46
|
const M2M_ORG_LIST = "amol";
|
|
@@ -27,6 +27,7 @@ var AccountsPermissions;
|
|
|
27
27
|
AccountsPermissions2.SUPPORT_AGENT_SEE_ORG_MEMBERSHIPS = "asas";
|
|
28
28
|
AccountsPermissions2.SUPPORT_AGENT_ADD_TO_ORG = "asaa";
|
|
29
29
|
AccountsPermissions2.MODIFY_CLUSTER_PLAN_TYPE_RESERVATIONS = "acpm";
|
|
30
|
+
AccountsPermissions2.CUSTOM_PLANS_CREATE = "accp";
|
|
30
31
|
AccountsPermissions2.M2M_SALESPLAN_GET = "amsg";
|
|
31
32
|
AccountsPermissions2.M2M_SALESPLAN_SWITCH = "amss";
|
|
32
33
|
AccountsPermissions2.M2M_ORG_LIST = "amol";
|
|
@@ -647,6 +648,11 @@ var AccountsPermissions;
|
|
|
647
648
|
// thus the role gets a permission of its own.
|
|
648
649
|
initialRoles: ["accounts:admin"]
|
|
649
650
|
},
|
|
651
|
+
{
|
|
652
|
+
value: AccountsPermissions2.CUSTOM_PLANS_CREATE,
|
|
653
|
+
description: "may create and remove custom generations and custom hardware sizing on int in Camunda Control",
|
|
654
|
+
initialRoles: ["accounts:admin", "accounts:customPlansCreator"]
|
|
655
|
+
},
|
|
650
656
|
{
|
|
651
657
|
value: AccountsPermissions2.ADMIN_FEATURE_FLAGS_REQUEST,
|
|
652
658
|
description: "may request a feature flag change on int and prod in Camunda Control",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/permissions/accounts.permissions.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 { Roles } from '../types/Roles.js'\n\nexport namespace AccountsPermissions {\n export const READ_ALL = 'aara'\n export const CREATE_ORG = 'aaco'\n export const CHANGE_ORG_NAME = 'aacn'\n export const DELETE_ORG = 'aado'\n export const RESET_TOKEN_VERIFICATION = 'aart'\n export const DELETE_USER = 'aadu'\n export const DELETE_NOT_ACTIVATED_USER = 'aadn'\n export const ADD_TO_ORG = 'aaao'\n export const REMOVE_FROM_ORG = 'aaro'\n /**\n * May open and approve a request of Camunda Control that removes an org\n * member, an owner included, and that can name a new owner. The request\n * needs a second Camundi, so this goes to a wider group than\n * `REMOVE_FROM_ORG`, which acts with no approval.\n */\n export const REMOVE_FROM_ORG_WITH_APPROVAL = 'aarw'\n export const SET_DEFAULT_ORG = 'aasd'\n export const CANCEL_INVITE = 'aaci'\n export const CHANGE_ROLE = 'aacr'\n export const CHANGE_SAFE_ROLE = 'aacs'\n // The org roles of a member of any organization. `CHANGE_ROLE` and\n // `CHANGE_SAFE_ROLE` are for the platform roles.\n export const CHANGE_ORG_MEMBER_ROLE = 'aacm'\n export const EXTEND_TRIAL = 'aaet'\n export const INVALIDATE_TOKEN = 'aait'\n export const SALES_PLAN_CREATE = 'asc'\n export const SALES_PLAN_MODIFY = 'asm'\n export const SALES_PLAN_FORCE_MODIFY = 'asfm'\n export const SALES_PLAN_SWITCH = 'ass'\n export const SALES_PLAN_DELETE = 'asd'\n export const SALES_PLAN_DELETE_AS_GOD = 'asdg'\n export const SUPPORT_AGENT_REMOVE_AGENTS_FROM_ORG = 'asar'\n export const SUPPORT_AGENT_SEE_ORG_MEMBERSHIPS = 'asas'\n export const SUPPORT_AGENT_ADD_TO_ORG = 'asaa'\n export const MODIFY_CLUSTER_PLAN_TYPE_RESERVATIONS = 'acpm'\n export const M2M_SALESPLAN_GET = 'amsg'\n export const M2M_SALESPLAN_SWITCH = 'amss'\n // The reads of the daily fleet statistics of control-backend. Each one opens\n // one GET route only. `aara` also opens writes, so a machine does not get it.\n export const M2M_ORG_LIST = 'amol'\n export const M2M_FLEET_HOSTING_COST_GET = 'amhc'\n export const M2M_ACTIVE_USERS_GET = 'amau'\n\n // The routes of `api/admin/approvals` read `ConsolePermissions.M2M_CONTROL_APPROVALS`,\n // the one m2m permission of control-backend for accounts and console.\n\n export const ENTERPRISE_ORG_CONVERT = 'aeoc'\n\n export const ENTERPRISE_ORG_MODIFY = 'aeom'\n\n export const ENTERPRISE_ORG_MODIFY_START_DATE = 'aeos'\n\n export const TRIAL_TO_IN_NEGOTIATION_CONVERT = 'atin'\n\n export const EXTERNAL_M2M_GET_ORG_MEMBERS = 'amog'\n export const EXTERNAL_M2M_SEARCH_ORGS = 'amos'\n export const EXTERNAL_M2M_QA_ORG_CREATE = 'amqc'\n export const EXTERNAL_M2M_OFFBOARD_CAMUNDI = 'amoc'\n\n export const ORG_MAY_CHANGE_LIMITS = 'alc'\n export const ORG_MAY_CHANGE_GENERATION_WHITELIST = 'algw'\n export const ORG_CANCEL_PAID = 'aacp'\n\n export const ADMIN_SQL = 'aasq'\n\n export const ADMIN_AUTH0_CONNECTIONS_CREATE = 'aa0c'\n export const ADMIN_AUTH0_CONNECTIONS_READ = 'aa0r'\n export const ADMIN_AUTH0_CONNECTIONS_UPDATE = 'aa0u'\n export const ADMIN_AUTH0_CONNECTIONS_DELETE = 'aa0d'\n export const UNBLOCK_USER = 'aaub'\n\n export const ADMIN_CHANGE_EMAIL = 'aace'\n export const ADMIN_CHANGE_USER_NAME = 'aacu'\n\n export const BOT = 'abot'\n\n // OBACHT: NOT THIS ONE\n export const MODELER_DELETE_USER = 'mdu'\n\n export const GOD_CRON = 'gcr'\n export const GOD_SIGNUP_SPAM_PATTERNS = 'gsp'\n export const PREPROD_SIGNUP_RULES = 'pps'\n export const GOD_PURGE_USERS = 'gpu'\n export const GOD_UPDATE_USER_METADATA = 'gum'\n\n export const ADMIN_EARLY_ACCESS_FEATURES_READ = 'aaer'\n export const ADMIN_EARLY_ACCESS_FEATURES_CREATE = 'aaec'\n export const ADMIN_EARLY_ACCESS_FEATURES_DELETE = 'aaed'\n export const ADMIN_EARLY_ACCESS_FEATURES_UPDATE = 'aaeu'\n export const PDF_WATERMARK_READ = 'awmr'\n export const PDF_WATERMARK_WRITE = 'awmw'\n export const ROLE_SUPPORT_AGENT = 'support:agent'\n export const FORCE_SALES_PLAN_ON_ORG = 'aafs'\n\n /**\n * May create, edit and delete a feature flag on the page of Camunda Control.\n *\n * A row of the table of control-backend is the value of the flag on its\n * stage, and no approval stands in front of a write. Reading the rows takes\n * `READ_ALL`. Do not reuse `acfo`: it still exists at Auth0 with the meaning\n * of the reverted override design.\n */\n export const ADMIN_FEATURE_FLAGS_WRITE = 'aafw'\n\n /**\n * May open a `change-feature-flag`, `disable-feature-flag` or\n * `engage-kill-switch` request on int and prod in Camunda Control. It does\n * not approve the request: approval needs `ADMIN_FEATURE_FLAGS_WRITE`, which\n * also opens one. On dev anybody signed in can open a `change-feature-flag`\n * request. A `disable-feature-flag` or `engage-kill-switch` request runs at\n * once there, and needs `aafw`.\n */\n export const ADMIN_FEATURE_FLAGS_REQUEST = 'aafr'\n\n /**\n * May create, list, rotate and revoke OWN agent tokens in Camunda Control.\n *\n * An agent token reads with the permissions of its creator, cut to the\n * read set of each backend. A creator without `READ_ALL` thus makes a token\n * that can read nothing in control-backend, so this permission goes to the\n * same roles.\n */\n export const CONTROL_AGENT_TOKENS_MANAGE_OWN = 'aato'\n\n /** May list every agent token of the stage, and revoke any of them. */\n export const CONTROL_AGENT_TOKENS_ADMIN = 'aata'\n\n export interface Features {\n admin: {\n readAll: boolean\n createOrg: boolean\n changeOrgName: boolean\n deleteOrg: boolean\n resetTokenVerification: boolean\n deleteUser: boolean\n deleteNotActivatedUser: boolean\n addToOrg: boolean\n removeFromOrg: boolean\n setDefaultOrg: boolean\n cancelInvite: boolean\n changeRole: boolean\n addSafeRole: boolean\n changeOrgMemberRole: boolean\n deleteClusters: boolean\n extendTrial: boolean\n invalidateToken: boolean\n cancelPaid: boolean\n searchForOrgs: boolean\n readAudit: boolean\n modifyClusterPlanTypeReservations: boolean\n mayChangeOrgLimits: boolean\n mayChangeGenerationWhiteList: boolean\n sql: boolean\n modelerDeleteUser: boolean\n unblockUser: boolean\n god: {\n triggerCrons: boolean\n forceSalesPlanOnOrg: boolean\n changeSignupSpamPatterns: boolean\n changePreprodSignupRules: boolean\n purgeUsers: boolean\n updateUserMetadata: boolean\n }\n bot: boolean\n changeEmail: boolean\n changeUserName: boolean\n }\n salesPlan: {\n create: boolean\n modify: boolean\n forceModify: boolean\n switch: boolean\n delete: boolean\n godDelete: boolean\n }\n enterprise: {\n org: {\n convert: boolean\n modify: boolean\n modifyStartDate: boolean\n }\n }\n trial: {\n convertToInNegotiation: boolean\n }\n supportAgent: {\n removeAgentsFromOrg: boolean\n seeOrgMemberships: boolean\n addAgentsToOrg: boolean\n }\n m2m: {\n salesplan: {\n get: boolean\n switch: boolean\n }\n\n /** `GET /api/organizations`. See `M2M_ORG_LIST`. */\n orgList: boolean\n /** `GET /api/hdp/hosting-cost`. See `M2M_FLEET_HOSTING_COST_GET`. */\n fleetHostingCost: boolean\n /** `GET /api/logs/active-users`. See `M2M_ACTIVE_USERS_GET`. */\n activeUsers: boolean\n fetchMigrationData: boolean\n /** Every route of `api/admin/approvals`. See `M2M_CONTROL_APPROVALS`. */\n approvals: boolean\n }\n externalM2m: {\n org: {\n members: {\n get: boolean\n }\n search: boolean\n }\n qa: {\n org: {\n create: boolean\n }\n }\n offboarding: {\n camundi: boolean\n }\n }\n auth0: {\n connections: {\n create: boolean\n read: boolean\n update: boolean\n delete: boolean\n }\n }\n notifications: {\n global: {\n read: boolean\n delete: boolean\n create: boolean\n }\n }\n earlyAccessFeatures: {\n read: boolean\n create: boolean\n delete: boolean\n update: boolean\n }\n pdfWatermark: {\n read: boolean\n write: boolean\n }\n featureFlags: {\n write: boolean\n request: boolean\n }\n agentTokens: {\n manageOwn: boolean\n admin: boolean\n }\n }\n\n export function createEmptyFeatures(): Features {\n return {\n admin: {\n readAll: false,\n createOrg: false,\n changeOrgName: false,\n deleteOrg: false,\n resetTokenVerification: false,\n deleteUser: false,\n deleteNotActivatedUser: false,\n addToOrg: false,\n removeFromOrg: false,\n setDefaultOrg: false,\n cancelInvite: false,\n changeRole: false,\n addSafeRole: false,\n changeOrgMemberRole: false,\n deleteClusters: false,\n extendTrial: false,\n invalidateToken: false,\n cancelPaid: false,\n searchForOrgs: false,\n readAudit: false,\n modifyClusterPlanTypeReservations: false,\n mayChangeOrgLimits: false,\n mayChangeGenerationWhiteList: false,\n sql: false,\n modelerDeleteUser: false,\n unblockUser: false,\n god: {\n triggerCrons: false,\n forceSalesPlanOnOrg: false,\n changeSignupSpamPatterns: false,\n changePreprodSignupRules: false,\n purgeUsers: false,\n updateUserMetadata: false,\n },\n bot: false,\n changeEmail: false,\n changeUserName: false,\n },\n salesPlan: {\n create: false,\n modify: false,\n forceModify: false,\n switch: false,\n delete: false,\n godDelete: false,\n },\n enterprise: {\n org: { convert: false, modify: false, modifyStartDate: false },\n },\n trial: {\n convertToInNegotiation: false,\n },\n supportAgent: {\n removeAgentsFromOrg: false,\n seeOrgMemberships: false,\n addAgentsToOrg: false,\n },\n m2m: {\n salesplan: {\n get: false,\n switch: false,\n },\n orgList: false,\n fleetHostingCost: false,\n activeUsers: false,\n fetchMigrationData: false,\n approvals: false,\n },\n externalM2m: {\n org: {\n members: {\n get: false,\n },\n search: false,\n },\n // eslint-disable-next-line id-length\n qa: {\n org: {\n create: false,\n },\n },\n offboarding: {\n camundi: false,\n },\n },\n auth0: {\n connections: {\n create: false,\n read: false,\n update: false,\n delete: false,\n },\n },\n notifications: {\n global: {\n read: false,\n delete: false,\n create: false,\n },\n },\n earlyAccessFeatures: {\n read: false,\n create: false,\n delete: false,\n update: false,\n },\n pdfWatermark: {\n read: false,\n write: false,\n },\n featureFlags: {\n write: false,\n request: false,\n },\n agentTokens: {\n manageOwn: false,\n admin: false,\n },\n }\n }\n\n /**\n * The roles that hold `READ_ALL`. `CONTROL_AGENT_TOKENS_MANAGE_OWN` goes to\n * the same roles, so the two lists cannot drift.\n */\n const READ_ALL_INITIAL_ROLES: Roles[] = [\n 'accounts:read',\n 'accounts:onboard',\n 'accounts:orgCreator',\n 'accounts:admin',\n 'accounts:editSalesPlans',\n 'console:admin',\n 'console:admin:readonly',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:trialExtender',\n 'accounts:limitExtender',\n 'accounts:enterpriseAdmin',\n 'accounts:enterpriseOffboarding',\n 'console:C8ReleaseManager',\n 'console:C8UpdateEnforcer',\n 'accounts:addSafeRoles',\n 'accounts:consultingManager',\n 'accounts:earlyAccessEditor',\n ]\n\n export const PermissionsAtAuth0: Array<{\n value: string\n description: string\n initialRoles: Roles[]\n }> = [\n {\n value: READ_ALL,\n description: 'read access to all orgs and users',\n initialRoles: READ_ALL_INITIAL_ROLES,\n },\n {\n value: CREATE_ORG,\n description: 'can create organisations',\n initialRoles: [\n 'accounts:onboard',\n 'accounts:orgCreator',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: CHANGE_ORG_NAME,\n description: 'can change name of organisations',\n initialRoles: [\n 'accounts:admin',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:onboard',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: DELETE_ORG,\n description: 'can delete organisations',\n initialRoles: ['accounts:admin'],\n },\n {\n value: RESET_TOKEN_VERIFICATION,\n description: 'can reset a verification token of a pending user',\n initialRoles: [\n 'accounts:onboard',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: DELETE_USER,\n description: 'can delete users',\n initialRoles: ['accounts:god'],\n },\n {\n value: DELETE_NOT_ACTIVATED_USER,\n description: 'can delete users that are not activated yet',\n initialRoles: [\n 'accounts:onboard',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: ADD_TO_ORG,\n description: 'can add someone to an org',\n initialRoles: [\n 'accounts:onboard',\n 'accounts:orgCreator',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n 'supersupport:agent',\n ],\n },\n {\n value: REMOVE_FROM_ORG,\n description: 'can remove someone from an org',\n initialRoles: [\n 'accounts:admin',\n 'supersupport:agent',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: REMOVE_FROM_ORG_WITH_APPROVAL,\n description:\n 'may open and approve a request that removes an org member, an owner included',\n // The Camundi permission rules give `accounts:orgMemberRemover` to CS.\n initialRoles: ['accounts:admin', 'accounts:orgMemberRemover'],\n },\n {\n value: SET_DEFAULT_ORG,\n description: 'can set an org as default for any user',\n initialRoles: [\n 'support:agent',\n 'supersupport:agent',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n 'accounts:onboard',\n ],\n },\n {\n value: CANCEL_INVITE,\n description: 'can cancelpending invites',\n initialRoles: [\n 'accounts:admin',\n 'accounts:onboard',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: CHANGE_ROLE,\n description: 'can change the role of a user',\n // `CHANGE_ROLE` reaches every platform role, also `accounts:admin`, so\n // only `accounts:admin` holds it.\n initialRoles: ['accounts:admin'],\n },\n {\n value: EXTEND_TRIAL,\n description: 'can extend the trial period of an organization',\n initialRoles: [\n 'accounts:admin',\n 'accounts:onboard',\n 'accounts:trialExtender',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: INVALIDATE_TOKEN,\n description: 'can invalidate tokens in TokenIssuer',\n initialRoles: ['accounts:admin'],\n },\n {\n value: SALES_PLAN_CREATE,\n description: 'can create a SalesPlan',\n initialRoles: ['accounts:admin'],\n },\n {\n value: SALES_PLAN_MODIFY,\n description: 'can modify a SalesPlan',\n initialRoles: ['accounts:admin', 'accounts:editSalesPlans'],\n },\n {\n value: SALES_PLAN_FORCE_MODIFY,\n description:\n 'can force modify a SalesPlan without caring about the orgs actual reservations/cluster usage',\n initialRoles: [],\n },\n {\n value: SALES_PLAN_SWITCH,\n description: 'can switch an organization to another SalesPlan',\n initialRoles: [\n 'accounts:admin',\n 'accounts:enterpriseOffboarding',\n 'accounts:consultingManager',\n ],\n },\n {\n value: SALES_PLAN_DELETE,\n description:\n 'can delete a SalesPlan if it is not used by any Organization',\n initialRoles: ['accounts:admin'],\n },\n\n {\n value: SALES_PLAN_DELETE_AS_GOD,\n description: `can delete salesplans even if there is no replacement salesplan for this type. use with great caution`,\n initialRoles: [],\n },\n {\n value: SUPPORT_AGENT_REMOVE_AGENTS_FROM_ORG,\n description: 'can remove support agents from organizations',\n initialRoles: ['support:agent', 'supersupport:agent'],\n },\n {\n value: SUPPORT_AGENT_SEE_ORG_MEMBERSHIPS,\n description: 'can see all org memberships of support agents',\n initialRoles: ['support:agent', 'supersupport:agent'],\n },\n {\n value: SUPPORT_AGENT_ADD_TO_ORG,\n description: 'can add users as support agent to an organization',\n initialRoles: ['support:agent', 'supersupport:agent'],\n },\n {\n value: MODIFY_CLUSTER_PLAN_TYPE_RESERVATIONS,\n description: 'can modify cluster plan type reservations of an org',\n initialRoles: [],\n },\n {\n value: M2M_SALESPLAN_GET,\n description: 'm2m can get salesplans',\n initialRoles: [],\n },\n {\n value: M2M_SALESPLAN_SWITCH,\n description: 'm2m can switch salesplans',\n initialRoles: [],\n },\n {\n value: M2M_ORG_LIST,\n description: 'm2m can list all orgs (GET /api/organizations)',\n initialRoles: [],\n },\n {\n value: M2M_FLEET_HOSTING_COST_GET,\n description:\n 'm2m can read the hosting cost of all clusters (GET /api/hdp/hosting-cost)',\n initialRoles: [],\n },\n {\n value: M2M_ACTIVE_USERS_GET,\n description:\n 'm2m can read the count of active users (GET /api/logs/active-users)',\n initialRoles: [],\n },\n {\n value: ENTERPRISE_ORG_CONVERT,\n description: 'can convert orgs to enterprise plans',\n initialRoles: [\n 'accounts:admin',\n 'accounts:onboard',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: ENTERPRISE_ORG_MODIFY,\n description:\n 'can modify value metrics and contract duration of enterprise orgs',\n initialRoles: [\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n 'accounts:enterpriseOffboarding',\n ],\n },\n {\n value: ENTERPRISE_ORG_MODIFY_START_DATE,\n description: 'can modify start date of enterprise orgs',\n initialRoles: [\n 'accounts:god',\n 'accounts:enterpriseOffboarding',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: TRIAL_TO_IN_NEGOTIATION_CONVERT,\n description: 'can convert trial orgs to in-negotiation plans',\n initialRoles: ['accounts:admin', 'accounts:enterpriseAdmin'],\n },\n {\n value: EXTERNAL_M2M_GET_ORG_MEMBERS,\n description: 'external m2m can get all members of all orgs',\n initialRoles: [],\n },\n {\n value: EXTERNAL_M2M_QA_ORG_CREATE,\n description:\n 'external m2m can create orgs, initially add users to org and assign sales plan',\n initialRoles: [],\n },\n {\n value: EXTERNAL_M2M_OFFBOARD_CAMUNDI,\n description:\n 'external m2m can trigger offboarding process for Camunda employees',\n initialRoles: ['accounts:god'],\n },\n {\n value: EXTERNAL_M2M_SEARCH_ORGS,\n description: 'external m2m can search organizations',\n initialRoles: [],\n },\n {\n value: ORG_MAY_CHANGE_LIMITS,\n description: 'may change limits of an organization',\n initialRoles: [\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n 'accounts:limitExtender',\n ],\n },\n {\n value: ORG_MAY_CHANGE_GENERATION_WHITELIST,\n description: 'may change the generation whitelist of an organization',\n initialRoles: ['accounts:admin', 'accounts:clusterUpdates'],\n },\n {\n value: ORG_CANCEL_PAID,\n description: 'may terminate a running paid organisation',\n initialRoles: ['accounts:admin', 'accounts:enterpriseOffboarding'],\n },\n {\n value: ADMIN_SQL,\n description: 'may query the DB',\n initialRoles: ['accounts:god'],\n },\n {\n value: ADMIN_AUTH0_CONNECTIONS_READ,\n description: 'may read connections from auth0',\n initialRoles: [\n 'accounts:read',\n 'accounts:orgCreator',\n 'support:agent',\n 'supersupport:agent',\n ],\n },\n {\n value: ADMIN_AUTH0_CONNECTIONS_CREATE,\n description: 'may create new connections at auth0',\n initialRoles: ['accounts:connections:create', 'accounts:god'],\n },\n {\n value: ADMIN_AUTH0_CONNECTIONS_UPDATE,\n description: 'may update connections at auth0',\n initialRoles: ['accounts:connections:update', 'accounts:god'],\n },\n {\n value: ADMIN_AUTH0_CONNECTIONS_DELETE,\n description: 'may delete connections at auth0',\n initialRoles: ['accounts:connections:delete', 'accounts:god'],\n },\n {\n value: MODELER_DELETE_USER,\n description: 'can delete a user within the modeler',\n initialRoles: ['modeler:admin'],\n },\n {\n value: UNBLOCK_USER,\n description: 'can unblock a user',\n initialRoles: ['accounts:admin'],\n },\n {\n value: GOD_CRON,\n description: 'can run cron jobs',\n initialRoles: ['consoleTeam'],\n },\n {\n value: GOD_SIGNUP_SPAM_PATTERNS,\n description: 'can read and change signup spam patterns',\n initialRoles: ['consoleTeam', 'accounts:god'],\n },\n {\n value: PREPROD_SIGNUP_RULES,\n description:\n 'can unlock signup on dev and int, and approve such a request',\n // The Camundi permission rules give `accounts:preprodSignupUnlocker`\n // to Engineering.\n initialRoles: ['accounts:preprodSignupUnlocker'],\n },\n {\n value: GOD_PURGE_USERS,\n description: 'can purge user records based on create date / name pattern',\n initialRoles: ['consoleTeam', 'accounts:god'],\n },\n {\n value: GOD_UPDATE_USER_METADATA,\n description: 'can update auth0 user_metadata and app_metadata',\n initialRoles: ['accounts:god'],\n },\n {\n value: FORCE_SALES_PLAN_ON_ORG,\n description: 'can force a sales plan on an org',\n initialRoles: ['consoleTeam'],\n },\n {\n value: CHANGE_SAFE_ROLE,\n description: 'Can assign/unassign safe roles',\n initialRoles: [\n 'accounts:addSafeRoles',\n 'accounts:consultingManager',\n 'accounts:enterpriseAdmin',\n 'accounts:onboard',\n 'supersupport:agent',\n ],\n },\n {\n value: CHANGE_ORG_MEMBER_ROLE,\n description: 'can change the org roles of a member of any organization',\n initialRoles: [\n 'accounts:admin',\n 'accounts:onboard',\n 'accounts:enterpriseAdmin',\n 'supersupport:agent',\n ],\n },\n {\n value: BOT,\n description: 'Can execute bot commands',\n initialRoles: [],\n },\n {\n value: ADMIN_EARLY_ACCESS_FEATURES_READ,\n description: 'may read Alpha Features',\n initialRoles: [\n 'accounts:read',\n 'accounts:orgCreator',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:admin',\n 'accounts:earlyAccessEditor',\n ],\n },\n {\n value: ADMIN_EARLY_ACCESS_FEATURES_CREATE,\n description: 'may create new Alpha Features',\n initialRoles: [\n 'accounts:admin',\n 'accounts:god',\n 'accounts:earlyAccessEditor',\n ],\n },\n {\n value: ADMIN_EARLY_ACCESS_FEATURES_DELETE,\n description: 'may delete Alpha Features',\n initialRoles: [\n 'accounts:admin',\n 'accounts:god',\n 'accounts:earlyAccessEditor',\n ],\n },\n {\n value: ADMIN_EARLY_ACCESS_FEATURES_UPDATE,\n description: 'may delete Alpha Features',\n initialRoles: [\n 'accounts:admin',\n 'accounts:god',\n 'accounts:earlyAccessEditor',\n ],\n },\n {\n value: PDF_WATERMARK_READ,\n description: 'may read PDF watermark projects and the audit log',\n initialRoles: [\n 'accounts:pdfWatermarkReader',\n 'accounts:pdfWatermarkWriter',\n ],\n },\n {\n value: PDF_WATERMARK_WRITE,\n description: 'may create, update and delete PDF watermark projects',\n initialRoles: ['accounts:pdfWatermarkWriter'],\n },\n {\n value: ADMIN_FEATURE_FLAGS_WRITE,\n description:\n 'may create, edit and delete a feature flag in Camunda Control',\n // `accounts:admin` is a ROLE, and control-backend checks permissions,\n // thus the role gets a permission of its own.\n initialRoles: ['accounts:admin'],\n },\n {\n value: ADMIN_FEATURE_FLAGS_REQUEST,\n description:\n 'may request a feature flag change on int and prod in Camunda Control',\n // The Camundi permission rules give `accounts:featureFlagRequester` to\n // the Engineering division and the Products department. `accounts:admin`\n // approves the request, and must also open one.\n initialRoles: ['accounts:admin', 'accounts:featureFlagRequester'],\n },\n {\n value: CONTROL_AGENT_TOKENS_MANAGE_OWN,\n description:\n 'may create, rotate and revoke own read-only agent tokens in Camunda Control',\n initialRoles: READ_ALL_INITIAL_ROLES,\n },\n {\n value: CONTROL_AGENT_TOKENS_ADMIN,\n description:\n 'may list every agent token in Camunda Control, and revoke any of them',\n initialRoles: ['accounts:admin'],\n },\n {\n value: ADMIN_CHANGE_EMAIL,\n description: 'can change the email of an user',\n initialRoles: ['accounts:admin'],\n },\n {\n value: ADMIN_CHANGE_USER_NAME,\n description: 'can change the name of an user',\n initialRoles: ['accounts:admin'],\n },\n ]\n}\n"],
|
|
5
|
-
"mappings": "AAQO,IAAU;AAAA,CAAV,CAAUA,yBAAV;AACE,EAAMA,qBAAA,WAAW;AACjB,EAAMA,qBAAA,aAAa;AACnB,EAAMA,qBAAA,kBAAkB;AACxB,EAAMA,qBAAA,aAAa;AACnB,EAAMA,qBAAA,2BAA2B;AACjC,EAAMA,qBAAA,cAAc;AACpB,EAAMA,qBAAA,4BAA4B;AAClC,EAAMA,qBAAA,aAAa;AACnB,EAAMA,qBAAA,kBAAkB;AAOxB,EAAMA,qBAAA,gCAAgC;AACtC,EAAMA,qBAAA,kBAAkB;AACxB,EAAMA,qBAAA,gBAAgB;AACtB,EAAMA,qBAAA,cAAc;AACpB,EAAMA,qBAAA,mBAAmB;AAGzB,EAAMA,qBAAA,yBAAyB;AAC/B,EAAMA,qBAAA,eAAe;AACrB,EAAMA,qBAAA,mBAAmB;AACzB,EAAMA,qBAAA,oBAAoB;AAC1B,EAAMA,qBAAA,oBAAoB;AAC1B,EAAMA,qBAAA,0BAA0B;AAChC,EAAMA,qBAAA,oBAAoB;AAC1B,EAAMA,qBAAA,oB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OA,qBAAA;AAAA,MACP,aAAa;AAAA,MACb,cAAc,CAAC,gBAAgB;AAAA,IACjC;AAAA,IACA;AAAA,MACE,OAAOA,qBAAA;AAAA,MACP,aAAa;AAAA,MACb,cAAc,CAAC,gBAAgB;AAAA,IACjC;AAAA,EACF;AAAA,GAt3Be;",
|
|
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 { Roles } from '../types/Roles.js'\n\nexport namespace AccountsPermissions {\n export const READ_ALL = 'aara'\n export const CREATE_ORG = 'aaco'\n export const CHANGE_ORG_NAME = 'aacn'\n export const DELETE_ORG = 'aado'\n export const RESET_TOKEN_VERIFICATION = 'aart'\n export const DELETE_USER = 'aadu'\n export const DELETE_NOT_ACTIVATED_USER = 'aadn'\n export const ADD_TO_ORG = 'aaao'\n export const REMOVE_FROM_ORG = 'aaro'\n /**\n * May open and approve a request of Camunda Control that removes an org\n * member, an owner included, and that can name a new owner. The request\n * needs a second Camundi, so this goes to a wider group than\n * `REMOVE_FROM_ORG`, which acts with no approval.\n */\n export const REMOVE_FROM_ORG_WITH_APPROVAL = 'aarw'\n export const SET_DEFAULT_ORG = 'aasd'\n export const CANCEL_INVITE = 'aaci'\n export const CHANGE_ROLE = 'aacr'\n export const CHANGE_SAFE_ROLE = 'aacs'\n // The org roles of a member of any organization. `CHANGE_ROLE` and\n // `CHANGE_SAFE_ROLE` are for the platform roles.\n export const CHANGE_ORG_MEMBER_ROLE = 'aacm'\n export const EXTEND_TRIAL = 'aaet'\n export const INVALIDATE_TOKEN = 'aait'\n export const SALES_PLAN_CREATE = 'asc'\n export const SALES_PLAN_MODIFY = 'asm'\n export const SALES_PLAN_FORCE_MODIFY = 'asfm'\n export const SALES_PLAN_SWITCH = 'ass'\n export const SALES_PLAN_DELETE = 'asd'\n export const SALES_PLAN_DELETE_AS_GOD = 'asdg'\n export const SUPPORT_AGENT_REMOVE_AGENTS_FROM_ORG = 'asar'\n export const SUPPORT_AGENT_SEE_ORG_MEMBERSHIPS = 'asas'\n export const SUPPORT_AGENT_ADD_TO_ORG = 'asaa'\n export const MODIFY_CLUSTER_PLAN_TYPE_RESERVATIONS = 'acpm'\n /**\n * May open a custom generation or custom hardware sizing request on int in\n * Camunda Control. On dev anybody signed in can open one, and prod refuses\n * them. No Camundi permission rule grants the role\n * `accounts:customPlansCreator`: a person assigns it at Auth0, one Camundi\n * at a time.\n */\n export const CUSTOM_PLANS_CREATE = 'accp'\n export const M2M_SALESPLAN_GET = 'amsg'\n export const M2M_SALESPLAN_SWITCH = 'amss'\n // The reads of the daily fleet statistics of control-backend. Each one opens\n // one GET route only. `aara` also opens writes, so a machine does not get it.\n export const M2M_ORG_LIST = 'amol'\n export const M2M_FLEET_HOSTING_COST_GET = 'amhc'\n export const M2M_ACTIVE_USERS_GET = 'amau'\n\n // The routes of `api/admin/approvals` read `ConsolePermissions.M2M_CONTROL_APPROVALS`,\n // the one m2m permission of control-backend for accounts and console.\n\n export const ENTERPRISE_ORG_CONVERT = 'aeoc'\n\n export const ENTERPRISE_ORG_MODIFY = 'aeom'\n\n export const ENTERPRISE_ORG_MODIFY_START_DATE = 'aeos'\n\n export const TRIAL_TO_IN_NEGOTIATION_CONVERT = 'atin'\n\n export const EXTERNAL_M2M_GET_ORG_MEMBERS = 'amog'\n export const EXTERNAL_M2M_SEARCH_ORGS = 'amos'\n export const EXTERNAL_M2M_QA_ORG_CREATE = 'amqc'\n export const EXTERNAL_M2M_OFFBOARD_CAMUNDI = 'amoc'\n\n export const ORG_MAY_CHANGE_LIMITS = 'alc'\n export const ORG_MAY_CHANGE_GENERATION_WHITELIST = 'algw'\n export const ORG_CANCEL_PAID = 'aacp'\n\n export const ADMIN_SQL = 'aasq'\n\n export const ADMIN_AUTH0_CONNECTIONS_CREATE = 'aa0c'\n export const ADMIN_AUTH0_CONNECTIONS_READ = 'aa0r'\n export const ADMIN_AUTH0_CONNECTIONS_UPDATE = 'aa0u'\n export const ADMIN_AUTH0_CONNECTIONS_DELETE = 'aa0d'\n export const UNBLOCK_USER = 'aaub'\n\n export const ADMIN_CHANGE_EMAIL = 'aace'\n export const ADMIN_CHANGE_USER_NAME = 'aacu'\n\n export const BOT = 'abot'\n\n // OBACHT: NOT THIS ONE\n export const MODELER_DELETE_USER = 'mdu'\n\n export const GOD_CRON = 'gcr'\n export const GOD_SIGNUP_SPAM_PATTERNS = 'gsp'\n export const PREPROD_SIGNUP_RULES = 'pps'\n export const GOD_PURGE_USERS = 'gpu'\n export const GOD_UPDATE_USER_METADATA = 'gum'\n\n export const ADMIN_EARLY_ACCESS_FEATURES_READ = 'aaer'\n export const ADMIN_EARLY_ACCESS_FEATURES_CREATE = 'aaec'\n export const ADMIN_EARLY_ACCESS_FEATURES_DELETE = 'aaed'\n export const ADMIN_EARLY_ACCESS_FEATURES_UPDATE = 'aaeu'\n export const PDF_WATERMARK_READ = 'awmr'\n export const PDF_WATERMARK_WRITE = 'awmw'\n export const ROLE_SUPPORT_AGENT = 'support:agent'\n export const FORCE_SALES_PLAN_ON_ORG = 'aafs'\n\n /**\n * May create, edit and delete a feature flag on the page of Camunda Control.\n *\n * A row of the table of control-backend is the value of the flag on its\n * stage, and no approval stands in front of a write. Reading the rows takes\n * `READ_ALL`. Do not reuse `acfo`: it still exists at Auth0 with the meaning\n * of the reverted override design.\n */\n export const ADMIN_FEATURE_FLAGS_WRITE = 'aafw'\n\n /**\n * May open a `change-feature-flag`, `disable-feature-flag` or\n * `engage-kill-switch` request on int and prod in Camunda Control. It does\n * not approve the request: approval needs `ADMIN_FEATURE_FLAGS_WRITE`, which\n * also opens one. On dev anybody signed in can open a `change-feature-flag`\n * request. A `disable-feature-flag` or `engage-kill-switch` request runs at\n * once there, and needs `aafw`.\n */\n export const ADMIN_FEATURE_FLAGS_REQUEST = 'aafr'\n\n /**\n * May create, list, rotate and revoke OWN agent tokens in Camunda Control.\n *\n * An agent token reads with the permissions of its creator, cut to the\n * read set of each backend. A creator without `READ_ALL` thus makes a token\n * that can read nothing in control-backend, so this permission goes to the\n * same roles.\n */\n export const CONTROL_AGENT_TOKENS_MANAGE_OWN = 'aato'\n\n /** May list every agent token of the stage, and revoke any of them. */\n export const CONTROL_AGENT_TOKENS_ADMIN = 'aata'\n\n export interface Features {\n admin: {\n readAll: boolean\n createOrg: boolean\n changeOrgName: boolean\n deleteOrg: boolean\n resetTokenVerification: boolean\n deleteUser: boolean\n deleteNotActivatedUser: boolean\n addToOrg: boolean\n removeFromOrg: boolean\n setDefaultOrg: boolean\n cancelInvite: boolean\n changeRole: boolean\n addSafeRole: boolean\n changeOrgMemberRole: boolean\n deleteClusters: boolean\n extendTrial: boolean\n invalidateToken: boolean\n cancelPaid: boolean\n searchForOrgs: boolean\n readAudit: boolean\n modifyClusterPlanTypeReservations: boolean\n mayChangeOrgLimits: boolean\n mayChangeGenerationWhiteList: boolean\n sql: boolean\n modelerDeleteUser: boolean\n unblockUser: boolean\n god: {\n triggerCrons: boolean\n forceSalesPlanOnOrg: boolean\n changeSignupSpamPatterns: boolean\n changePreprodSignupRules: boolean\n purgeUsers: boolean\n updateUserMetadata: boolean\n }\n bot: boolean\n changeEmail: boolean\n changeUserName: boolean\n }\n salesPlan: {\n create: boolean\n modify: boolean\n forceModify: boolean\n switch: boolean\n delete: boolean\n godDelete: boolean\n }\n enterprise: {\n org: {\n convert: boolean\n modify: boolean\n modifyStartDate: boolean\n }\n }\n trial: {\n convertToInNegotiation: boolean\n }\n supportAgent: {\n removeAgentsFromOrg: boolean\n seeOrgMemberships: boolean\n addAgentsToOrg: boolean\n }\n m2m: {\n salesplan: {\n get: boolean\n switch: boolean\n }\n\n /** `GET /api/organizations`. See `M2M_ORG_LIST`. */\n orgList: boolean\n /** `GET /api/hdp/hosting-cost`. See `M2M_FLEET_HOSTING_COST_GET`. */\n fleetHostingCost: boolean\n /** `GET /api/logs/active-users`. See `M2M_ACTIVE_USERS_GET`. */\n activeUsers: boolean\n fetchMigrationData: boolean\n /** Every route of `api/admin/approvals`. See `M2M_CONTROL_APPROVALS`. */\n approvals: boolean\n }\n externalM2m: {\n org: {\n members: {\n get: boolean\n }\n search: boolean\n }\n qa: {\n org: {\n create: boolean\n }\n }\n offboarding: {\n camundi: boolean\n }\n }\n auth0: {\n connections: {\n create: boolean\n read: boolean\n update: boolean\n delete: boolean\n }\n }\n notifications: {\n global: {\n read: boolean\n delete: boolean\n create: boolean\n }\n }\n earlyAccessFeatures: {\n read: boolean\n create: boolean\n delete: boolean\n update: boolean\n }\n pdfWatermark: {\n read: boolean\n write: boolean\n }\n featureFlags: {\n write: boolean\n request: boolean\n }\n agentTokens: {\n manageOwn: boolean\n admin: boolean\n }\n }\n\n export function createEmptyFeatures(): Features {\n return {\n admin: {\n readAll: false,\n createOrg: false,\n changeOrgName: false,\n deleteOrg: false,\n resetTokenVerification: false,\n deleteUser: false,\n deleteNotActivatedUser: false,\n addToOrg: false,\n removeFromOrg: false,\n setDefaultOrg: false,\n cancelInvite: false,\n changeRole: false,\n addSafeRole: false,\n changeOrgMemberRole: false,\n deleteClusters: false,\n extendTrial: false,\n invalidateToken: false,\n cancelPaid: false,\n searchForOrgs: false,\n readAudit: false,\n modifyClusterPlanTypeReservations: false,\n mayChangeOrgLimits: false,\n mayChangeGenerationWhiteList: false,\n sql: false,\n modelerDeleteUser: false,\n unblockUser: false,\n god: {\n triggerCrons: false,\n forceSalesPlanOnOrg: false,\n changeSignupSpamPatterns: false,\n changePreprodSignupRules: false,\n purgeUsers: false,\n updateUserMetadata: false,\n },\n bot: false,\n changeEmail: false,\n changeUserName: false,\n },\n salesPlan: {\n create: false,\n modify: false,\n forceModify: false,\n switch: false,\n delete: false,\n godDelete: false,\n },\n enterprise: {\n org: { convert: false, modify: false, modifyStartDate: false },\n },\n trial: {\n convertToInNegotiation: false,\n },\n supportAgent: {\n removeAgentsFromOrg: false,\n seeOrgMemberships: false,\n addAgentsToOrg: false,\n },\n m2m: {\n salesplan: {\n get: false,\n switch: false,\n },\n orgList: false,\n fleetHostingCost: false,\n activeUsers: false,\n fetchMigrationData: false,\n approvals: false,\n },\n externalM2m: {\n org: {\n members: {\n get: false,\n },\n search: false,\n },\n // eslint-disable-next-line id-length\n qa: {\n org: {\n create: false,\n },\n },\n offboarding: {\n camundi: false,\n },\n },\n auth0: {\n connections: {\n create: false,\n read: false,\n update: false,\n delete: false,\n },\n },\n notifications: {\n global: {\n read: false,\n delete: false,\n create: false,\n },\n },\n earlyAccessFeatures: {\n read: false,\n create: false,\n delete: false,\n update: false,\n },\n pdfWatermark: {\n read: false,\n write: false,\n },\n featureFlags: {\n write: false,\n request: false,\n },\n agentTokens: {\n manageOwn: false,\n admin: false,\n },\n }\n }\n\n /**\n * The roles that hold `READ_ALL`. `CONTROL_AGENT_TOKENS_MANAGE_OWN` goes to\n * the same roles, so the two lists cannot drift.\n */\n const READ_ALL_INITIAL_ROLES: Roles[] = [\n 'accounts:read',\n 'accounts:onboard',\n 'accounts:orgCreator',\n 'accounts:admin',\n 'accounts:editSalesPlans',\n 'console:admin',\n 'console:admin:readonly',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:trialExtender',\n 'accounts:limitExtender',\n 'accounts:enterpriseAdmin',\n 'accounts:enterpriseOffboarding',\n 'console:C8ReleaseManager',\n 'console:C8UpdateEnforcer',\n 'accounts:addSafeRoles',\n 'accounts:consultingManager',\n 'accounts:earlyAccessEditor',\n ]\n\n export const PermissionsAtAuth0: Array<{\n value: string\n description: string\n initialRoles: Roles[]\n }> = [\n {\n value: READ_ALL,\n description: 'read access to all orgs and users',\n initialRoles: READ_ALL_INITIAL_ROLES,\n },\n {\n value: CREATE_ORG,\n description: 'can create organisations',\n initialRoles: [\n 'accounts:onboard',\n 'accounts:orgCreator',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: CHANGE_ORG_NAME,\n description: 'can change name of organisations',\n initialRoles: [\n 'accounts:admin',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:onboard',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: DELETE_ORG,\n description: 'can delete organisations',\n initialRoles: ['accounts:admin'],\n },\n {\n value: RESET_TOKEN_VERIFICATION,\n description: 'can reset a verification token of a pending user',\n initialRoles: [\n 'accounts:onboard',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: DELETE_USER,\n description: 'can delete users',\n initialRoles: ['accounts:god'],\n },\n {\n value: DELETE_NOT_ACTIVATED_USER,\n description: 'can delete users that are not activated yet',\n initialRoles: [\n 'accounts:onboard',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: ADD_TO_ORG,\n description: 'can add someone to an org',\n initialRoles: [\n 'accounts:onboard',\n 'accounts:orgCreator',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n 'supersupport:agent',\n ],\n },\n {\n value: REMOVE_FROM_ORG,\n description: 'can remove someone from an org',\n initialRoles: [\n 'accounts:admin',\n 'supersupport:agent',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: REMOVE_FROM_ORG_WITH_APPROVAL,\n description:\n 'may open and approve a request that removes an org member, an owner included',\n // The Camundi permission rules give `accounts:orgMemberRemover` to CS.\n initialRoles: ['accounts:admin', 'accounts:orgMemberRemover'],\n },\n {\n value: SET_DEFAULT_ORG,\n description: 'can set an org as default for any user',\n initialRoles: [\n 'support:agent',\n 'supersupport:agent',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n 'accounts:onboard',\n ],\n },\n {\n value: CANCEL_INVITE,\n description: 'can cancelpending invites',\n initialRoles: [\n 'accounts:admin',\n 'accounts:onboard',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: CHANGE_ROLE,\n description: 'can change the role of a user',\n // `CHANGE_ROLE` reaches every platform role, also `accounts:admin`, so\n // only `accounts:admin` holds it.\n initialRoles: ['accounts:admin'],\n },\n {\n value: EXTEND_TRIAL,\n description: 'can extend the trial period of an organization',\n initialRoles: [\n 'accounts:admin',\n 'accounts:onboard',\n 'accounts:trialExtender',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: INVALIDATE_TOKEN,\n description: 'can invalidate tokens in TokenIssuer',\n initialRoles: ['accounts:admin'],\n },\n {\n value: SALES_PLAN_CREATE,\n description: 'can create a SalesPlan',\n initialRoles: ['accounts:admin'],\n },\n {\n value: SALES_PLAN_MODIFY,\n description: 'can modify a SalesPlan',\n initialRoles: ['accounts:admin', 'accounts:editSalesPlans'],\n },\n {\n value: SALES_PLAN_FORCE_MODIFY,\n description:\n 'can force modify a SalesPlan without caring about the orgs actual reservations/cluster usage',\n initialRoles: [],\n },\n {\n value: SALES_PLAN_SWITCH,\n description: 'can switch an organization to another SalesPlan',\n initialRoles: [\n 'accounts:admin',\n 'accounts:enterpriseOffboarding',\n 'accounts:consultingManager',\n ],\n },\n {\n value: SALES_PLAN_DELETE,\n description:\n 'can delete a SalesPlan if it is not used by any Organization',\n initialRoles: ['accounts:admin'],\n },\n\n {\n value: SALES_PLAN_DELETE_AS_GOD,\n description: `can delete salesplans even if there is no replacement salesplan for this type. use with great caution`,\n initialRoles: [],\n },\n {\n value: SUPPORT_AGENT_REMOVE_AGENTS_FROM_ORG,\n description: 'can remove support agents from organizations',\n initialRoles: ['support:agent', 'supersupport:agent'],\n },\n {\n value: SUPPORT_AGENT_SEE_ORG_MEMBERSHIPS,\n description: 'can see all org memberships of support agents',\n initialRoles: ['support:agent', 'supersupport:agent'],\n },\n {\n value: SUPPORT_AGENT_ADD_TO_ORG,\n description: 'can add users as support agent to an organization',\n initialRoles: ['support:agent', 'supersupport:agent'],\n },\n {\n value: MODIFY_CLUSTER_PLAN_TYPE_RESERVATIONS,\n description: 'can modify cluster plan type reservations of an org',\n initialRoles: [],\n },\n {\n value: M2M_SALESPLAN_GET,\n description: 'm2m can get salesplans',\n initialRoles: [],\n },\n {\n value: M2M_SALESPLAN_SWITCH,\n description: 'm2m can switch salesplans',\n initialRoles: [],\n },\n {\n value: M2M_ORG_LIST,\n description: 'm2m can list all orgs (GET /api/organizations)',\n initialRoles: [],\n },\n {\n value: M2M_FLEET_HOSTING_COST_GET,\n description:\n 'm2m can read the hosting cost of all clusters (GET /api/hdp/hosting-cost)',\n initialRoles: [],\n },\n {\n value: M2M_ACTIVE_USERS_GET,\n description:\n 'm2m can read the count of active users (GET /api/logs/active-users)',\n initialRoles: [],\n },\n {\n value: ENTERPRISE_ORG_CONVERT,\n description: 'can convert orgs to enterprise plans',\n initialRoles: [\n 'accounts:admin',\n 'accounts:onboard',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: ENTERPRISE_ORG_MODIFY,\n description:\n 'can modify value metrics and contract duration of enterprise orgs',\n initialRoles: [\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n 'accounts:enterpriseOffboarding',\n ],\n },\n {\n value: ENTERPRISE_ORG_MODIFY_START_DATE,\n description: 'can modify start date of enterprise orgs',\n initialRoles: [\n 'accounts:god',\n 'accounts:enterpriseOffboarding',\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: TRIAL_TO_IN_NEGOTIATION_CONVERT,\n description: 'can convert trial orgs to in-negotiation plans',\n initialRoles: ['accounts:admin', 'accounts:enterpriseAdmin'],\n },\n {\n value: EXTERNAL_M2M_GET_ORG_MEMBERS,\n description: 'external m2m can get all members of all orgs',\n initialRoles: [],\n },\n {\n value: EXTERNAL_M2M_QA_ORG_CREATE,\n description:\n 'external m2m can create orgs, initially add users to org and assign sales plan',\n initialRoles: [],\n },\n {\n value: EXTERNAL_M2M_OFFBOARD_CAMUNDI,\n description:\n 'external m2m can trigger offboarding process for Camunda employees',\n initialRoles: ['accounts:god'],\n },\n {\n value: EXTERNAL_M2M_SEARCH_ORGS,\n description: 'external m2m can search organizations',\n initialRoles: [],\n },\n {\n value: ORG_MAY_CHANGE_LIMITS,\n description: 'may change limits of an organization',\n initialRoles: [\n 'accounts:admin',\n 'accounts:enterpriseAdmin',\n 'accounts:limitExtender',\n ],\n },\n {\n value: ORG_MAY_CHANGE_GENERATION_WHITELIST,\n description: 'may change the generation whitelist of an organization',\n initialRoles: ['accounts:admin', 'accounts:clusterUpdates'],\n },\n {\n value: ORG_CANCEL_PAID,\n description: 'may terminate a running paid organisation',\n initialRoles: ['accounts:admin', 'accounts:enterpriseOffboarding'],\n },\n {\n value: ADMIN_SQL,\n description: 'may query the DB',\n initialRoles: ['accounts:god'],\n },\n {\n value: ADMIN_AUTH0_CONNECTIONS_READ,\n description: 'may read connections from auth0',\n initialRoles: [\n 'accounts:read',\n 'accounts:orgCreator',\n 'support:agent',\n 'supersupport:agent',\n ],\n },\n {\n value: ADMIN_AUTH0_CONNECTIONS_CREATE,\n description: 'may create new connections at auth0',\n initialRoles: ['accounts:connections:create', 'accounts:god'],\n },\n {\n value: ADMIN_AUTH0_CONNECTIONS_UPDATE,\n description: 'may update connections at auth0',\n initialRoles: ['accounts:connections:update', 'accounts:god'],\n },\n {\n value: ADMIN_AUTH0_CONNECTIONS_DELETE,\n description: 'may delete connections at auth0',\n initialRoles: ['accounts:connections:delete', 'accounts:god'],\n },\n {\n value: MODELER_DELETE_USER,\n description: 'can delete a user within the modeler',\n initialRoles: ['modeler:admin'],\n },\n {\n value: UNBLOCK_USER,\n description: 'can unblock a user',\n initialRoles: ['accounts:admin'],\n },\n {\n value: GOD_CRON,\n description: 'can run cron jobs',\n initialRoles: ['consoleTeam'],\n },\n {\n value: GOD_SIGNUP_SPAM_PATTERNS,\n description: 'can read and change signup spam patterns',\n initialRoles: ['consoleTeam', 'accounts:god'],\n },\n {\n value: PREPROD_SIGNUP_RULES,\n description:\n 'can unlock signup on dev and int, and approve such a request',\n // The Camundi permission rules give `accounts:preprodSignupUnlocker`\n // to Engineering.\n initialRoles: ['accounts:preprodSignupUnlocker'],\n },\n {\n value: GOD_PURGE_USERS,\n description: 'can purge user records based on create date / name pattern',\n initialRoles: ['consoleTeam', 'accounts:god'],\n },\n {\n value: GOD_UPDATE_USER_METADATA,\n description: 'can update auth0 user_metadata and app_metadata',\n initialRoles: ['accounts:god'],\n },\n {\n value: FORCE_SALES_PLAN_ON_ORG,\n description: 'can force a sales plan on an org',\n initialRoles: ['consoleTeam'],\n },\n {\n value: CHANGE_SAFE_ROLE,\n description: 'Can assign/unassign safe roles',\n initialRoles: [\n 'accounts:addSafeRoles',\n 'accounts:consultingManager',\n 'accounts:enterpriseAdmin',\n 'accounts:onboard',\n 'supersupport:agent',\n ],\n },\n {\n value: CHANGE_ORG_MEMBER_ROLE,\n description: 'can change the org roles of a member of any organization',\n initialRoles: [\n 'accounts:admin',\n 'accounts:onboard',\n 'accounts:enterpriseAdmin',\n 'supersupport:agent',\n ],\n },\n {\n value: BOT,\n description: 'Can execute bot commands',\n initialRoles: [],\n },\n {\n value: ADMIN_EARLY_ACCESS_FEATURES_READ,\n description: 'may read Alpha Features',\n initialRoles: [\n 'accounts:read',\n 'accounts:orgCreator',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:admin',\n 'accounts:earlyAccessEditor',\n ],\n },\n {\n value: ADMIN_EARLY_ACCESS_FEATURES_CREATE,\n description: 'may create new Alpha Features',\n initialRoles: [\n 'accounts:admin',\n 'accounts:god',\n 'accounts:earlyAccessEditor',\n ],\n },\n {\n value: ADMIN_EARLY_ACCESS_FEATURES_DELETE,\n description: 'may delete Alpha Features',\n initialRoles: [\n 'accounts:admin',\n 'accounts:god',\n 'accounts:earlyAccessEditor',\n ],\n },\n {\n value: ADMIN_EARLY_ACCESS_FEATURES_UPDATE,\n description: 'may delete Alpha Features',\n initialRoles: [\n 'accounts:admin',\n 'accounts:god',\n 'accounts:earlyAccessEditor',\n ],\n },\n {\n value: PDF_WATERMARK_READ,\n description: 'may read PDF watermark projects and the audit log',\n initialRoles: [\n 'accounts:pdfWatermarkReader',\n 'accounts:pdfWatermarkWriter',\n ],\n },\n {\n value: PDF_WATERMARK_WRITE,\n description: 'may create, update and delete PDF watermark projects',\n initialRoles: ['accounts:pdfWatermarkWriter'],\n },\n {\n value: ADMIN_FEATURE_FLAGS_WRITE,\n description:\n 'may create, edit and delete a feature flag in Camunda Control',\n // `accounts:admin` is a ROLE, and control-backend checks permissions,\n // thus the role gets a permission of its own.\n initialRoles: ['accounts:admin'],\n },\n {\n value: CUSTOM_PLANS_CREATE,\n description:\n 'may create and remove custom generations and custom hardware sizing on int in Camunda Control',\n initialRoles: ['accounts:admin', 'accounts:customPlansCreator'],\n },\n {\n value: ADMIN_FEATURE_FLAGS_REQUEST,\n description:\n 'may request a feature flag change on int and prod in Camunda Control',\n // The Camundi permission rules give `accounts:featureFlagRequester` to\n // the Engineering division and the Products department. `accounts:admin`\n // approves the request, and must also open one.\n initialRoles: ['accounts:admin', 'accounts:featureFlagRequester'],\n },\n {\n value: CONTROL_AGENT_TOKENS_MANAGE_OWN,\n description:\n 'may create, rotate and revoke own read-only agent tokens in Camunda Control',\n initialRoles: READ_ALL_INITIAL_ROLES,\n },\n {\n value: CONTROL_AGENT_TOKENS_ADMIN,\n description:\n 'may list every agent token in Camunda Control, and revoke any of them',\n initialRoles: ['accounts:admin'],\n },\n {\n value: ADMIN_CHANGE_EMAIL,\n description: 'can change the email of an user',\n initialRoles: ['accounts:admin'],\n },\n {\n value: ADMIN_CHANGE_USER_NAME,\n description: 'can change the name of an user',\n initialRoles: ['accounts:admin'],\n },\n ]\n}\n"],
|
|
5
|
+
"mappings": "AAQO,IAAU;AAAA,CAAV,CAAUA,yBAAV;AACE,EAAMA,qBAAA,WAAW;AACjB,EAAMA,qBAAA,aAAa;AACnB,EAAMA,qBAAA,kBAAkB;AACxB,EAAMA,qBAAA,aAAa;AACnB,EAAMA,qBAAA,2BAA2B;AACjC,EAAMA,qBAAA,cAAc;AACpB,EAAMA,qBAAA,4BAA4B;AAClC,EAAMA,qBAAA,aAAa;AACnB,EAAMA,qBAAA,kBAAkB;AAOxB,EAAMA,qBAAA,gCAAgC;AACtC,EAAMA,qBAAA,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c,CAAC,gBAAgB;AAAA,IACjC;AAAA,IACA;AAAA,MACE,OAAOA,qBAAA;AAAA,MACP,aACE;AAAA,MACF,cAAc,CAAC,kBAAkB,6BAA6B;AAAA,IAChE;AAAA,IACA;AAAA,MACE,OAAOA,qBAAA;AAAA,MACP,aACE;AAAA;AAAA;AAAA;AAAA,MAIF,cAAc,CAAC,kBAAkB,+BAA+B;AAAA,IAClE;AAAA,IACA;AAAA,MACE,OAAOA,qBAAA;AAAA,MACP,aACE;AAAA,MACF,cAAc;AAAA,IAChB;AAAA,IACA;AAAA,MACE,OAAOA,qBAAA;AAAA,MACP,aACE;AAAA,MACF,cAAc,CAAC,gBAAgB;AAAA,IACjC;AAAA,IACA;AAAA,MACE,OAAOA,qBAAA;AAAA,MACP,aAAa;AAAA,MACb,cAAc,CAAC,gBAAgB;AAAA,IACjC;AAAA,IACA;AAAA,MACE,OAAOA,qBAAA;AAAA,MACP,aAAa;AAAA,MACb,cAAc,CAAC,gBAAgB;AAAA,IACjC;AAAA,EACF;AAAA,GAp4Be;",
|
|
6
6
|
"names": ["AccountsPermissions"]
|
|
7
7
|
}
|
|
@@ -15,4 +15,38 @@ export declare enum ClusterPlanTypeAvailabilityClass {
|
|
|
15
15
|
* two predicates let Control offer a switch that the spec then ignores.
|
|
16
16
|
*/
|
|
17
17
|
export declare function hasNoAvailabilityClass(availabilityClass: ClusterPlanTypeAvailabilityClass | string | undefined): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The class that a cluster gets, and where it comes from.
|
|
20
|
+
*
|
|
21
|
+
* - `planType`: the plan type sets a class. It has priority.
|
|
22
|
+
* - `nonSpotOverride`: the plan type sets none and the per-cluster non-spot
|
|
23
|
+
* switch is on. The class is Advanced.
|
|
24
|
+
* - `nonSpotOverrideOff`: the plan type sets none and the switch is explicitly
|
|
25
|
+
* off. There is no class. The writer of the CR still has to remove an
|
|
26
|
+
* Advanced that the switch wrote before.
|
|
27
|
+
* - `none`: the plan type sets none and nobody used the switch. There is no
|
|
28
|
+
* class and the CR stays as it is.
|
|
29
|
+
*/
|
|
30
|
+
export type EffectiveAvailabilityClass = {
|
|
31
|
+
availabilityClass: ClusterPlanTypeAvailabilityClass;
|
|
32
|
+
source: 'planType' | 'nonSpotOverride';
|
|
33
|
+
} | {
|
|
34
|
+
availabilityClass: undefined;
|
|
35
|
+
source: 'nonSpotOverrideOff' | 'none';
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* The rule for the class of a cluster. The ZeebeCluster spec
|
|
39
|
+
* (`K8sSpecUtils.getAvailabilityClass`) and the Plan card of Control both call
|
|
40
|
+
* it, so that Control shows the class that the spec sends. For `none` the spec
|
|
41
|
+
* sends no class, and the CR keeps the class that it already has (for
|
|
42
|
+
* example from an earlier plan type).
|
|
43
|
+
*
|
|
44
|
+
* `nonSpotNodesEnabled` is `cluster.externalMetadata?.nonSpotNodesEnabled`.
|
|
45
|
+
* Its three states stay apart: `true`, an explicit `false` and `undefined`
|
|
46
|
+
* (never set).
|
|
47
|
+
*/
|
|
48
|
+
export declare function getEffectiveAvailabilityClass(options: {
|
|
49
|
+
planTypeAvailabilityClass: ClusterPlanTypeAvailabilityClass | string | undefined;
|
|
50
|
+
nonSpotNodesEnabled: boolean | undefined;
|
|
51
|
+
}): EffectiveAvailabilityClass;
|
|
18
52
|
export declare function sortByAvailabilityClasses(a: ClusterPlanTypeAvailabilityClass, b: ClusterPlanTypeAvailabilityClass): number;
|
|
@@ -8,6 +8,25 @@ var ClusterPlanTypeAvailabilityClass = /* @__PURE__ */ ((ClusterPlanTypeAvailabi
|
|
|
8
8
|
function hasNoAvailabilityClass(availabilityClass) {
|
|
9
9
|
return availabilityClass === void 0 || availabilityClass === "unset" /* UNSET */;
|
|
10
10
|
}
|
|
11
|
+
function getEffectiveAvailabilityClass(options) {
|
|
12
|
+
const { planTypeAvailabilityClass, nonSpotNodesEnabled } = options;
|
|
13
|
+
if (!hasNoAvailabilityClass(planTypeAvailabilityClass)) {
|
|
14
|
+
return {
|
|
15
|
+
availabilityClass: planTypeAvailabilityClass,
|
|
16
|
+
source: "planType"
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (nonSpotNodesEnabled === true) {
|
|
20
|
+
return {
|
|
21
|
+
availabilityClass: "Advanced" /* ADVANCED */,
|
|
22
|
+
source: "nonSpotOverride"
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
availabilityClass: void 0,
|
|
27
|
+
source: nonSpotNodesEnabled === false ? "nonSpotOverrideOff" : "none"
|
|
28
|
+
};
|
|
29
|
+
}
|
|
11
30
|
function sortByAvailabilityClasses(a, b) {
|
|
12
31
|
const availabilityClasses = [
|
|
13
32
|
"Basic" /* BASIC */,
|
|
@@ -19,6 +38,7 @@ function sortByAvailabilityClasses(a, b) {
|
|
|
19
38
|
}
|
|
20
39
|
export {
|
|
21
40
|
ClusterPlanTypeAvailabilityClass,
|
|
41
|
+
getEffectiveAvailabilityClass,
|
|
22
42
|
hasNoAvailabilityClass,
|
|
23
43
|
sortByAvailabilityClasses
|
|
24
44
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types/ClusterPlanTypeAvailabilityClass.type.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\n// eslint-disable-next-line no-shadow\nexport enum ClusterPlanTypeAvailabilityClass {\n UNSET = 'unset', // used for old plans that don't have an availability class\n BASIC = 'Basic',\n STANDARD = 'Standard',\n ADVANCED = 'Advanced',\n}\n\n/**\n * True while the plan type sets no availability class, thus the per-cluster\n * non-spot override decides where the cluster runs.\n *\n * `undefined` and `UNSET` are the same answer. The column of the plan type is\n * `NOT NULL DEFAULT 'unset'`, so the entity gives `UNSET`, but\n * `ClusterPlanTypeDto` types the field optional and a reader of the DTO can\n * get `undefined`. One predicate keeps the spec and the Control gate in step:\n * two predicates let Control offer a switch that the spec then ignores.\n */\nexport function hasNoAvailabilityClass(\n availabilityClass: ClusterPlanTypeAvailabilityClass | string | undefined,\n): boolean {\n return (\n availabilityClass === undefined ||\n availabilityClass === ClusterPlanTypeAvailabilityClass.UNSET\n )\n}\n\nexport function sortByAvailabilityClasses(\n a: ClusterPlanTypeAvailabilityClass,\n b: ClusterPlanTypeAvailabilityClass,\n): number {\n const availabilityClasses = [\n ClusterPlanTypeAvailabilityClass.BASIC,\n ClusterPlanTypeAvailabilityClass.STANDARD,\n ClusterPlanTypeAvailabilityClass.ADVANCED,\n ClusterPlanTypeAvailabilityClass.UNSET,\n ]\n\n return availabilityClasses.indexOf(a) - availabilityClasses.indexOf(b)\n}\n"],
|
|
5
|
-
"mappings": "AAOO,IAAK,mCAAL,kBAAKA,sCAAL;AACL,EAAAA,kCAAA,WAAQ;AACR,EAAAA,kCAAA,WAAQ;AACR,EAAAA,kCAAA,cAAW;AACX,EAAAA,kCAAA,cAAW;AAJD,SAAAA;AAAA,GAAA;AAiBL,SAAS,uBACd,mBACS;AACT,SACE,sBAAsB,UACtB,sBAAsB;AAE1B;AAEO,SAAS,0BACd,GACA,GACQ;AACR,QAAM,sBAAsB;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SAAO,oBAAoB,QAAQ,CAAC,IAAI,oBAAoB,QAAQ,CAAC;AACvE;",
|
|
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\n// eslint-disable-next-line no-shadow\nexport enum ClusterPlanTypeAvailabilityClass {\n UNSET = 'unset', // used for old plans that don't have an availability class\n BASIC = 'Basic',\n STANDARD = 'Standard',\n ADVANCED = 'Advanced',\n}\n\n/**\n * True while the plan type sets no availability class, thus the per-cluster\n * non-spot override decides where the cluster runs.\n *\n * `undefined` and `UNSET` are the same answer. The column of the plan type is\n * `NOT NULL DEFAULT 'unset'`, so the entity gives `UNSET`, but\n * `ClusterPlanTypeDto` types the field optional and a reader of the DTO can\n * get `undefined`. One predicate keeps the spec and the Control gate in step:\n * two predicates let Control offer a switch that the spec then ignores.\n */\nexport function hasNoAvailabilityClass(\n availabilityClass: ClusterPlanTypeAvailabilityClass | string | undefined,\n): boolean {\n return (\n availabilityClass === undefined ||\n availabilityClass === ClusterPlanTypeAvailabilityClass.UNSET\n )\n}\n\n/**\n * The class that a cluster gets, and where it comes from.\n *\n * - `planType`: the plan type sets a class. It has priority.\n * - `nonSpotOverride`: the plan type sets none and the per-cluster non-spot\n * switch is on. The class is Advanced.\n * - `nonSpotOverrideOff`: the plan type sets none and the switch is explicitly\n * off. There is no class. The writer of the CR still has to remove an\n * Advanced that the switch wrote before.\n * - `none`: the plan type sets none and nobody used the switch. There is no\n * class and the CR stays as it is.\n */\nexport type EffectiveAvailabilityClass =\n | {\n availabilityClass: ClusterPlanTypeAvailabilityClass\n source: 'planType' | 'nonSpotOverride'\n }\n | {\n availabilityClass: undefined\n source: 'nonSpotOverrideOff' | 'none'\n }\n\n/**\n * The rule for the class of a cluster. The ZeebeCluster spec\n * (`K8sSpecUtils.getAvailabilityClass`) and the Plan card of Control both call\n * it, so that Control shows the class that the spec sends. For `none` the spec\n * sends no class, and the CR keeps the class that it already has (for\n * example from an earlier plan type).\n *\n * `nonSpotNodesEnabled` is `cluster.externalMetadata?.nonSpotNodesEnabled`.\n * Its three states stay apart: `true`, an explicit `false` and `undefined`\n * (never set).\n */\nexport function getEffectiveAvailabilityClass(options: {\n planTypeAvailabilityClass:\n | ClusterPlanTypeAvailabilityClass\n | string\n | undefined\n nonSpotNodesEnabled: boolean | undefined\n}): EffectiveAvailabilityClass {\n const { planTypeAvailabilityClass, nonSpotNodesEnabled } = options\n if (!hasNoAvailabilityClass(planTypeAvailabilityClass)) {\n return {\n availabilityClass:\n planTypeAvailabilityClass as ClusterPlanTypeAvailabilityClass,\n source: 'planType',\n }\n }\n if (nonSpotNodesEnabled === true) {\n return {\n availabilityClass: ClusterPlanTypeAvailabilityClass.ADVANCED,\n source: 'nonSpotOverride',\n }\n }\n return {\n availabilityClass: undefined,\n source: nonSpotNodesEnabled === false ? 'nonSpotOverrideOff' : 'none',\n }\n}\n\nexport function sortByAvailabilityClasses(\n a: ClusterPlanTypeAvailabilityClass,\n b: ClusterPlanTypeAvailabilityClass,\n): number {\n const availabilityClasses = [\n ClusterPlanTypeAvailabilityClass.BASIC,\n ClusterPlanTypeAvailabilityClass.STANDARD,\n ClusterPlanTypeAvailabilityClass.ADVANCED,\n ClusterPlanTypeAvailabilityClass.UNSET,\n ]\n\n return availabilityClasses.indexOf(a) - availabilityClasses.indexOf(b)\n}\n"],
|
|
5
|
+
"mappings": "AAOO,IAAK,mCAAL,kBAAKA,sCAAL;AACL,EAAAA,kCAAA,WAAQ;AACR,EAAAA,kCAAA,WAAQ;AACR,EAAAA,kCAAA,cAAW;AACX,EAAAA,kCAAA,cAAW;AAJD,SAAAA;AAAA,GAAA;AAiBL,SAAS,uBACd,mBACS;AACT,SACE,sBAAsB,UACtB,sBAAsB;AAE1B;AAmCO,SAAS,8BAA8B,SAMf;AAC7B,QAAM,EAAE,2BAA2B,oBAAoB,IAAI;AAC3D,MAAI,CAAC,uBAAuB,yBAAyB,GAAG;AACtD,WAAO;AAAA,MACL,mBACE;AAAA,MACF,QAAQ;AAAA,IACV;AAAA,EACF;AACA,MAAI,wBAAwB,MAAM;AAChC,WAAO;AAAA,MACL,mBAAmB;AAAA,MACnB,QAAQ;AAAA,IACV;AAAA,EACF;AACA,SAAO;AAAA,IACL,mBAAmB;AAAA,IACnB,QAAQ,wBAAwB,QAAQ,uBAAuB;AAAA,EACjE;AACF;AAEO,SAAS,0BACd,GACA,GACQ;AACR,QAAM,sBAAsB;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SAAO,oBAAoB,QAAQ,CAAC,IAAI,oBAAoB,QAAQ,CAAC;AACvE;",
|
|
6
6
|
"names": ["ClusterPlanTypeAvailabilityClass"]
|
|
7
7
|
}
|
package/dist/types/Roles.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type AccountRoles = 'accounts:read' | 'accounts:onboard' | 'accounts:orgCreator' | 'accounts:enterpriseAdmin' | 'accounts:enterpriseOffboarding' | 'accounts:admin' | 'accounts:god' | 'accounts:editSalesPlans' | 'support:agent' | 'supersupport:agent' | 'accounts:trialExtender' | 'accounts:limitExtender' | 'accounts:connections:create' | 'accounts:connections:update' | 'accounts:connections:delete' | 'accounts:clusterUpdates' | 'accounts:notifications:global' | 'accounts:addSafeRoles' | 'accounts:consultingManager' | 'accounts:earlyAccessEditor' | 'accounts:pdfWatermarkReader' | 'accounts:pdfWatermarkWriter' | 'accounts:orgMemberRemover' | 'accounts:featureFlagRequester' | 'accounts:preprodSignupUnlocker';
|
|
1
|
+
export type AccountRoles = 'accounts:read' | 'accounts:onboard' | 'accounts:orgCreator' | 'accounts:enterpriseAdmin' | 'accounts:enterpriseOffboarding' | 'accounts:admin' | 'accounts:god' | 'accounts:editSalesPlans' | 'support:agent' | 'supersupport:agent' | 'accounts:trialExtender' | 'accounts:limitExtender' | 'accounts:connections:create' | 'accounts:connections:update' | 'accounts:connections:delete' | 'accounts:clusterUpdates' | 'accounts:notifications:global' | 'accounts:addSafeRoles' | 'accounts:consultingManager' | 'accounts:earlyAccessEditor' | 'accounts:pdfWatermarkReader' | 'accounts:pdfWatermarkWriter' | 'accounts:orgMemberRemover' | 'accounts:featureFlagRequester' | 'accounts:customPlansCreator' | 'accounts:preprodSignupUnlocker';
|
|
2
2
|
export type ConsoleRoles = 'console:admin' | 'betatester:true' | 'console:admin:readonly' | 'console:god' | 'consoleTeam' | 'console:operationsEngineer' | 'console:C8ReleaseManager' | 'console:C8UpdateEnforcer' | 'console:clusterPlanManager' | 'console:optionalTelemetryManager' | 'console:clusterMover';
|
|
3
3
|
export type ModelerRoles = 'modeler:admin';
|
|
4
4
|
export type Roles = AccountRoles | ConsoleRoles | ModelerRoles;
|
package/dist/types/Roles.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types/Roles.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\nexport type AccountRoles =\n | 'accounts:read'\n | 'accounts:onboard'\n | 'accounts:orgCreator'\n | 'accounts:enterpriseAdmin'\n | 'accounts:enterpriseOffboarding'\n | 'accounts:admin'\n | 'accounts:god'\n | 'accounts:editSalesPlans'\n | 'support:agent'\n | 'supersupport:agent'\n | 'accounts:trialExtender'\n | 'accounts:limitExtender'\n | 'accounts:connections:create'\n | 'accounts:connections:update'\n | 'accounts:connections:delete'\n | 'accounts:clusterUpdates'\n | 'accounts:notifications:global'\n | 'accounts:addSafeRoles'\n | 'accounts:consultingManager'\n | 'accounts:earlyAccessEditor'\n | 'accounts:pdfWatermarkReader'\n | 'accounts:pdfWatermarkWriter'\n | 'accounts:orgMemberRemover'\n | 'accounts:featureFlagRequester'\n | 'accounts:preprodSignupUnlocker'\nexport type ConsoleRoles =\n | 'console:admin'\n | 'betatester:true'\n | 'console:admin:readonly'\n | 'console:god'\n | 'consoleTeam'\n | 'console:operationsEngineer'\n | 'console:C8ReleaseManager'\n | 'console:C8UpdateEnforcer'\n | 'console:clusterPlanManager'\n | 'console:optionalTelemetryManager'\n | 'console:clusterMover'\nexport type ModelerRoles = 'modeler:admin'\nexport type Roles = AccountRoles | ConsoleRoles | ModelerRoles\nexport const SAFE_ROLES: Roles[] = [\n 'accounts:read',\n 'console:admin:readonly',\n 'accounts:trialExtender',\n]\n"],
|
|
5
|
-
"mappings": "
|
|
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\nexport type AccountRoles =\n | 'accounts:read'\n | 'accounts:onboard'\n | 'accounts:orgCreator'\n | 'accounts:enterpriseAdmin'\n | 'accounts:enterpriseOffboarding'\n | 'accounts:admin'\n | 'accounts:god'\n | 'accounts:editSalesPlans'\n | 'support:agent'\n | 'supersupport:agent'\n | 'accounts:trialExtender'\n | 'accounts:limitExtender'\n | 'accounts:connections:create'\n | 'accounts:connections:update'\n | 'accounts:connections:delete'\n | 'accounts:clusterUpdates'\n | 'accounts:notifications:global'\n | 'accounts:addSafeRoles'\n | 'accounts:consultingManager'\n | 'accounts:earlyAccessEditor'\n | 'accounts:pdfWatermarkReader'\n | 'accounts:pdfWatermarkWriter'\n | 'accounts:orgMemberRemover'\n | 'accounts:featureFlagRequester'\n | 'accounts:customPlansCreator'\n | 'accounts:preprodSignupUnlocker'\nexport type ConsoleRoles =\n | 'console:admin'\n | 'betatester:true'\n | 'console:admin:readonly'\n | 'console:god'\n | 'consoleTeam'\n | 'console:operationsEngineer'\n | 'console:C8ReleaseManager'\n | 'console:C8UpdateEnforcer'\n | 'console:clusterPlanManager'\n | 'console:optionalTelemetryManager'\n | 'console:clusterMover'\nexport type ModelerRoles = 'modeler:admin'\nexport type Roles = AccountRoles | ConsoleRoles | ModelerRoles\nexport const SAFE_ROLES: Roles[] = [\n 'accounts:read',\n 'console:admin:readonly',\n 'accounts:trialExtender',\n]\n"],
|
|
5
|
+
"mappings": "AA+CO,MAAM,aAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED