@camunda/ccma-shared-types 9.2.0 → 10.0.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/dtos/ApprovalJob.dto.d.ts +28 -6
- package/dist/dtos/ApprovalJob.dto.js +4 -0
- package/dist/dtos/ApprovalJob.dto.js.map +2 -2
- package/dist/dtos/CommonCluster.dto.d.ts +2 -0
- package/dist/dtos/UpgradeReadiness.dto.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +2 -2
- package/dist/permissions/combo.js +0 -3
- package/dist/permissions/combo.js.map +2 -2
- package/dist/permissions/console.permissions.d.ts +0 -2
- package/dist/permissions/console.permissions.js +0 -7
- package/dist/permissions/console.permissions.js.map +2 -2
- package/dist/utils/upgradeGateReason.utils.js +2 -1
- package/dist/utils/upgradeGateReason.utils.js.map +2 -2
- package/package.json +1 -1
|
@@ -98,6 +98,14 @@ export declare const APPROVAL_ACKS_MAX = 10;
|
|
|
98
98
|
* request is near this.
|
|
99
99
|
*/
|
|
100
100
|
export declare const APPROVAL_SEARCH_MAX_LENGTH = 200;
|
|
101
|
+
/**
|
|
102
|
+
* APPROVAL_TYPE_FILTER_MAX is the most use case types that one `type` filter
|
|
103
|
+
* names. The registry holds fewer, so the ceiling only stops a list with no
|
|
104
|
+
* end. control-backend answers 400 above it.
|
|
105
|
+
*/
|
|
106
|
+
export declare const APPROVAL_TYPE_FILTER_MAX = 100;
|
|
107
|
+
/** APPROVAL_TYPE_MAX_LENGTH is the longest type that a `type` filter names. */
|
|
108
|
+
export declare const APPROVAL_TYPE_MAX_LENGTH = 200;
|
|
101
109
|
/**
|
|
102
110
|
* The payload field that names the organization a request acts on.
|
|
103
111
|
*
|
|
@@ -118,18 +126,32 @@ export declare const APPROVAL_SEARCH_MAX_LENGTH = 200;
|
|
|
118
126
|
*/
|
|
119
127
|
export declare const APPROVAL_PAYLOAD_ORG_FIELD = "orgId";
|
|
120
128
|
/**
|
|
121
|
-
* How many requests each status holds, for the filters
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
129
|
+
* How many requests each status and each use case type holds, for the filters
|
|
130
|
+
* of the queue.
|
|
131
|
+
*
|
|
132
|
+
* Every status number answers the SAME question as the list beside it: the
|
|
133
|
+
* counts are built with the visibility rule, the action filter and the search
|
|
134
|
+
* text of the caller, and with the lazy expiry. A count that ignored one of
|
|
135
|
+
* those would send a person to a filter that then shows nothing. `byType` is
|
|
136
|
+
* the exception: see its own note.
|
|
127
137
|
*/
|
|
128
138
|
export interface ApprovalStatusCountsDto {
|
|
129
139
|
/** Every request that matches, whatever its status. */
|
|
130
140
|
all: number;
|
|
131
141
|
/** One number for each status. A status with no request is 0, never absent. */
|
|
132
142
|
byStatus: Record<ApprovalJobStatus, number>;
|
|
143
|
+
/**
|
|
144
|
+
* One number for each use case type, over every status.
|
|
145
|
+
*
|
|
146
|
+
* It ignores the type filter, so a type facet keeps its number while it is
|
|
147
|
+
* on or off. Every other filter applies. A type with no request has no key,
|
|
148
|
+
* so read a missing key as 0, and read only an own key: a type id such as
|
|
149
|
+
* `__proto__` must not reach the prototype.
|
|
150
|
+
*
|
|
151
|
+
* Optional, because an older control-backend does not send it. Read an
|
|
152
|
+
* absent field as no counts.
|
|
153
|
+
*/
|
|
154
|
+
byType?: Record<string, number>;
|
|
133
155
|
}
|
|
134
156
|
/**
|
|
135
157
|
* What happens when a request reaches its threshold.
|
|
@@ -26,6 +26,8 @@ const APPROVAL_SORT_DEFAULT = { sort: "createdAt", order: "desc" };
|
|
|
26
26
|
const APPROVAL_REASON_MAX_LENGTH = 2e3;
|
|
27
27
|
const APPROVAL_ACKS_MAX = 10;
|
|
28
28
|
const APPROVAL_SEARCH_MAX_LENGTH = 200;
|
|
29
|
+
const APPROVAL_TYPE_FILTER_MAX = 100;
|
|
30
|
+
const APPROVAL_TYPE_MAX_LENGTH = 200;
|
|
29
31
|
const APPROVAL_PAYLOAD_ORG_FIELD = "orgId";
|
|
30
32
|
const APPROVAL_SUMMARY_FIELD_KINDS = [
|
|
31
33
|
"text",
|
|
@@ -71,6 +73,8 @@ export {
|
|
|
71
73
|
APPROVAL_SORT_DEFAULT,
|
|
72
74
|
APPROVAL_SORT_FIELDS,
|
|
73
75
|
APPROVAL_SUMMARY_FIELD_KINDS,
|
|
76
|
+
APPROVAL_TYPE_FILTER_MAX,
|
|
77
|
+
APPROVAL_TYPE_MAX_LENGTH,
|
|
74
78
|
isRunStalled,
|
|
75
79
|
progressFraction
|
|
76
80
|
};
|
|
@@ -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\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 */\nexport const APPROVAL_JOB_STATUSES = [\n 'pending',\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, `approved` waits for a person to press the\n * 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 '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 * 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 holds, for the filters of the queue.\n *\n * Every number answers the SAME question as the list beside it: the counts are\n * built with the visibility rule, the action filter and the search text of the\n * caller, and with the lazy expiry. A count that ignored one of those would\n * send a person to a filter that then shows nothing.\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\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-backend 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\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 createdAt: string\n updatedAt: 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 the permission to SEE a request of this use case, because a\n * person who cannot act on one has no reason to read it. The person who\n * opened a request always sees that request.\n *\n * The one exception to \"or run\" is a use case with `openToEveryone`. It has\n * no approval, so this permission only decides who sees the requests of\n * other people. Any signed-in person can 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 *\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.\n */\n createPermission?: 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` and the two use cases of custom hardware\n * sizing set it. The two use cases of custom hardware sizing do the second\n * check in two 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 * - 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"],
|
|
5
|
-
"mappings": "AA0BO,MAAM,wBAAwB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAmBO,MAAM,yBAAyB;AAAA,EACpC;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;
|
|
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\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 */\nexport const APPROVAL_JOB_STATUSES = [\n 'pending',\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, `approved` waits for a person to press the\n * 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 '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-backend 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\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 createdAt: string\n updatedAt: 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 the permission to SEE a request of this use case, because a\n * person who cannot act on one has no reason to read it. The person who\n * opened a request always sees that request.\n *\n * The one exception to \"or run\" is a use case with `openToEveryone`. It has\n * no approval, so this permission only decides who sees the requests of\n * other people. Any signed-in person can 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 *\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.\n */\n createPermission?: 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` and the two use cases of custom hardware\n * sizing set it. The two use cases of custom hardware sizing do the second\n * check in two 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 * - 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"],
|
|
5
|
+
"mappings": "AA0BO,MAAM,wBAAwB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAmBO,MAAM,yBAAyB;AAAA,EACpC;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;AAwInC,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
|
}
|
|
@@ -110,6 +110,8 @@ export interface CommonClusterDto {
|
|
|
110
110
|
lastTransitionTime?: string;
|
|
111
111
|
}>;
|
|
112
112
|
updateClusterStatus?: {
|
|
113
|
+
/** The operator sets `Done` when the rollout is finished. */
|
|
114
|
+
updateState?: string;
|
|
113
115
|
currentGeneration?: {
|
|
114
116
|
uuid?: string;
|
|
115
117
|
name?: string;
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* - `unsupported`: Console knows no readiness URL for the cluster.
|
|
7
7
|
* - `suspended`: the cluster sleeps and cannot answer. Resume it first.
|
|
8
8
|
* - `updating`: the cluster still rolls out its last upgrade.
|
|
9
|
+
* - `rolloutUnknown`: the status of the rollout is missing or unreadable.
|
|
9
10
|
*/
|
|
10
|
-
export type UpgradeReadinessSource = 'cluster' | 'cache' | 'timeout' | 'error' | 'unsupported' | 'suspended' | 'updating';
|
|
11
|
+
export type UpgradeReadinessSource = 'cluster' | 'cache' | 'timeout' | 'error' | 'unsupported' | 'suspended' | 'updating' | 'rolloutUnknown';
|
|
11
12
|
export interface UpgradeReadinessState {
|
|
12
13
|
verdict: 'ready' | 'notReady' | 'unknown';
|
|
13
14
|
checkedAtIso: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export { FORBIDDEN_HOSTNAMES_FOR_WEBHOOK_ALERTS, HMAC_HEADER_POSITION, HMAC_SUPP
|
|
|
30
30
|
export type { AnnotationActor, AnnotationDto, AnnotationEntityKind, AnnotationKind, AnnotationLookupDto, AnnotationLookupEntryDto, AnnotationTagDto, EntityAnnotationsDto, } from './dtos/Annotation.dto.js';
|
|
31
31
|
export { ANNOTATION_BODY_MAX, ANNOTATION_ENTITY_KIND_LABELS, ANNOTATION_ENTITY_KINDS, ANNOTATION_ENTITY_MAX, ANNOTATION_KINDS, ANNOTATION_LOOKUP_MAX_ENTITIES, ANNOTATION_LOOKUP_TAGS_MAX, ANNOTATION_PAGE_SIZE_DEFAULT, ANNOTATION_PAGE_SIZE_MAX, ANNOTATION_SEARCH_MAX_LENGTH, ANNOTATION_TAG_NAME_MAX, normalizeTagName, } from './dtos/Annotation.dto.js';
|
|
32
32
|
export type { ApprovalAck, ApprovalActionMode, ApprovalActor, ApprovalEntityRef, ApprovalEntityType, ApprovalExecutionMode, ApprovalJobDto, ApprovalJobStatus, ApprovalM2mActor, ApprovalProgress, ApprovalSortField, ApprovalSortOrder, ApprovalStatusCountsDto, ApprovalSummaryField, ApprovalSummaryFieldKind, ApprovalSummaryValue, ApprovalUseCaseDto, } from './dtos/ApprovalJob.dto.js';
|
|
33
|
-
export { APPROVAL_ACKS_MAX, APPROVAL_ENTITY_TYPES, APPROVAL_JOB_STATUSES, APPROVAL_LIST_SUMMARY_VALUES_MAX, APPROVAL_LIVE_STATUSES, APPROVAL_PAGE_SIZE_DEFAULT, APPROVAL_PAGE_SIZE_MAX, APPROVAL_PAYLOAD_ORG_FIELD, APPROVAL_REASON_MAX_LENGTH, APPROVAL_RUN_STALE_MS, APPROVAL_SEARCH_MAX_LENGTH, APPROVAL_SORT_DEFAULT, APPROVAL_SORT_FIELDS, APPROVAL_SUMMARY_FIELD_KINDS, isRunStalled, progressFraction, } from './dtos/ApprovalJob.dto.js';
|
|
33
|
+
export { APPROVAL_ACKS_MAX, APPROVAL_ENTITY_TYPES, APPROVAL_JOB_STATUSES, APPROVAL_LIST_SUMMARY_VALUES_MAX, APPROVAL_LIVE_STATUSES, APPROVAL_PAGE_SIZE_DEFAULT, APPROVAL_PAGE_SIZE_MAX, APPROVAL_PAYLOAD_ORG_FIELD, APPROVAL_REASON_MAX_LENGTH, APPROVAL_RUN_STALE_MS, APPROVAL_SEARCH_MAX_LENGTH, APPROVAL_SORT_DEFAULT, APPROVAL_SORT_FIELDS, APPROVAL_SUMMARY_FIELD_KINDS, APPROVAL_TYPE_FILTER_MAX, APPROVAL_TYPE_MAX_LENGTH, isRunStalled, progressFraction, } from './dtos/ApprovalJob.dto.js';
|
|
34
34
|
export type { AuditDto } from './dtos/Audit.dto.js';
|
|
35
35
|
export type { Auth0ResourceServerDto } from './dtos/Auth0ResourceServer.dto.js';
|
|
36
36
|
export type { BackupDto } from './dtos/Backup.dto.js';
|
package/dist/index.js
CHANGED
|
@@ -268,6 +268,8 @@ import {
|
|
|
268
268
|
APPROVAL_SORT_DEFAULT,
|
|
269
269
|
APPROVAL_SORT_FIELDS,
|
|
270
270
|
APPROVAL_SUMMARY_FIELD_KINDS,
|
|
271
|
+
APPROVAL_TYPE_FILTER_MAX,
|
|
272
|
+
APPROVAL_TYPE_MAX_LENGTH,
|
|
271
273
|
isRunStalled,
|
|
272
274
|
progressFraction
|
|
273
275
|
} from "./dtos/ApprovalJob.dto.js";
|
|
@@ -626,6 +628,8 @@ export {
|
|
|
626
628
|
APPROVAL_SORT_DEFAULT,
|
|
627
629
|
APPROVAL_SORT_FIELDS,
|
|
628
630
|
APPROVAL_SUMMARY_FIELD_KINDS,
|
|
631
|
+
APPROVAL_TYPE_FILTER_MAX,
|
|
632
|
+
APPROVAL_TYPE_MAX_LENGTH,
|
|
629
633
|
APPROVAL_USE_CASE_TYPES,
|
|
630
634
|
APP_INTEGRATIONS_89_STREAM_CONNECTOR_BRIDGE_MIN_VERSION,
|
|
631
635
|
APP_INTEGRATIONS_89_STREAM_MINOR,
|
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 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 { 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 FIRSTNAME_LASTNAME_MAX_LENGTH,\n HOTBACKUP_MIN_CREATE_PERIOD,\n INT_MINIMUM_BULK_OPERATION_ACKS,\n MAX_HARDWARE_PACKAGE_COUNT,\n MAX_LENGTH_CLUSTER_NAME,\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 type {\n TrialExtensionSurveyAnswer,\n TrialExtensionSurveyQuestion,\n} from './constants/trialExtensionSurvey.const.js'\nexport { TRIAL_EXTENSION_SURVEY_QUESTIONS } from './constants/trialExtensionSurvey.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// 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 isAuthor,\n} from './annotations/policy.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} 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_MIN_ACKS,\n CLUSTER_BULK_OPERATION_NAME_MAX_LENGTH,\n CLUSTER_BULK_OPERATION_RULES,\n CLUSTER_BULK_OPERATION_TEST_STAGE_MIN_ACKS,\n CLUSTER_BULK_OPERATION_TYPES,\n CLUSTER_BULK_SLEEPING_CLUSTER_DELAY_MS,\n clusterBulkOperationTypeOf,\n clusterBulkParameterOf,\n clusterBulkRequiredPermissions,\n clusterBulkResultOf,\n isClusterBulkYolo,\n} from './approvals/cluster-bulk-operation.js'\nexport {\n DNS_SUBDOMAIN_MAX_LENGTH,\n isDnsSubdomain,\n} from './approvals/dns-subdomain.js'\nexport type { ApprovalExpectedChange } from './approvals/expected-value.js'\nexport {\n isSameApprovalValue,\n staleApprovalKeys,\n} from './approvals/expected-value.js'\nexport type {\n ApprovalActorView,\n ApprovalDecision,\n ApprovalDenialCode,\n} from './approvals/policy.js'\nexport {\n approvalPermissionCheck,\n canAcknowledge,\n canCreate,\n canExecute,\n canReject,\n canView,\n canWithdraw,\n effectiveStatus,\n hasActorEmail,\n hasEveryPermission,\n isExpired,\n isSameActor,\n isSameActorEmail,\n remainingAcks,\n requiredPermissionsOf,\n resolveRequiredAcks,\n} from './approvals/policy.js'\nexport type {\n ReleaseTrainAutoUpgradeCandidates,\n ReleaseTrainPublishPayload,\n ReleaseTrainRollbackPayload,\n} from './approvals/release-train.js'\nexport type { ApprovalUseCaseType } from './approvals/use-cases.const.js'\nexport {\n APPROVAL_EMAIL_MAX_LENGTH,\n APPROVAL_EMAIL_PATTERN,\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 FEATURE_FLAG_MIN_ACKS_PROD,\n GENERATION_VERSION_VALUE_MAX_LENGTH,\n GENERATION_VERSIONS_MAX_GENERATIONS,\n isCalendarDay,\n ORG_LIMIT_TEXT_MAX_LENGTH,\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 PURGE_USERS_MAX_USERS,\n PURGE_USERS_REQUIRED_PERMISSIONS,\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 {\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_SEARCH_MAX_LENGTH,\n ANNOTATION_TAG_NAME_MAX,\n normalizeTagName,\n} from './dtos/Annotation.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 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 isRunStalled,\n progressFraction,\n} from './dtos/ApprovalJob.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} 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 FeatureFlagListDto,\n UpdateFeatureFlagDto,\n} from './dtos/FeatureFlags.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 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 DryRunSanityDiff,\n ReleaseTrainPreview,\n ReleaseTrainSanityReport,\n SanityFix,\n SanityRuleInfo,\n SanitySeverity,\n SanityViolation,\n} from './dtos/ReleaseTrainSanity.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 GenerationImageVersionsDto,\n ImmutableZeebeClusterVersionsDto,\n MutableZeebeClusterVersionsDto,\n ZeebeClusterVersionsDto,\n} from './types/C8ClusterComponentVersions.type.js'\n// C8ClusterComponentVersions.type - Values (constants)\nexport {\n AllThings,\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'\n// Dashboard.types - Types\nexport type {\n DashboardConfig,\n DashboardMappingItem,\n DashboardMappingTarget,\n DashboardResultPrimitive,\n DashboardResultRow,\n EngineeringOperationsDashboardResponse,\n} from './types/Dashboard.types.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 Audit as HdpAudit,\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 HdpEntity,\n HdpPrometheusDataCapacityDataPoint,\n Invite as HdpInvite,\n LlmSpend as HdpLlmSpend,\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} 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} from './utils/elasticsearchPlanPath.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 type {\n JvmOptionsModificationKey,\n ParsedJvmOption,\n} from './utils/jvmOptions.js'\nexport {\n addsEnvVarsOverrideValue,\n isJvmOptionsModificationKey,\n isUnderJvmSpec,\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 parseJvmOption,\n requiresEnvVarsOverride,\n splitJvmOptions,\n validateJvmOptions,\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 { ObjectMergeUtils } from './utils/objectMerge.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'\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'\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,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,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,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;AAKtD,SAAS,wCAAwC;AACjD;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;AAcP;AAAA,EACE;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,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;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,OACK;AAOP;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;AA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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,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACjC;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;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;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 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 { 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 FIRSTNAME_LASTNAME_MAX_LENGTH,\n HOTBACKUP_MIN_CREATE_PERIOD,\n INT_MINIMUM_BULK_OPERATION_ACKS,\n MAX_HARDWARE_PACKAGE_COUNT,\n MAX_LENGTH_CLUSTER_NAME,\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 type {\n TrialExtensionSurveyAnswer,\n TrialExtensionSurveyQuestion,\n} from './constants/trialExtensionSurvey.const.js'\nexport { TRIAL_EXTENSION_SURVEY_QUESTIONS } from './constants/trialExtensionSurvey.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// 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 isAuthor,\n} from './annotations/policy.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} 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_MIN_ACKS,\n CLUSTER_BULK_OPERATION_NAME_MAX_LENGTH,\n CLUSTER_BULK_OPERATION_RULES,\n CLUSTER_BULK_OPERATION_TEST_STAGE_MIN_ACKS,\n CLUSTER_BULK_OPERATION_TYPES,\n CLUSTER_BULK_SLEEPING_CLUSTER_DELAY_MS,\n clusterBulkOperationTypeOf,\n clusterBulkParameterOf,\n clusterBulkRequiredPermissions,\n clusterBulkResultOf,\n isClusterBulkYolo,\n} from './approvals/cluster-bulk-operation.js'\nexport {\n DNS_SUBDOMAIN_MAX_LENGTH,\n isDnsSubdomain,\n} from './approvals/dns-subdomain.js'\nexport type { ApprovalExpectedChange } from './approvals/expected-value.js'\nexport {\n isSameApprovalValue,\n staleApprovalKeys,\n} from './approvals/expected-value.js'\nexport type {\n ApprovalActorView,\n ApprovalDecision,\n ApprovalDenialCode,\n} from './approvals/policy.js'\nexport {\n approvalPermissionCheck,\n canAcknowledge,\n canCreate,\n canExecute,\n canReject,\n canView,\n canWithdraw,\n effectiveStatus,\n hasActorEmail,\n hasEveryPermission,\n isExpired,\n isSameActor,\n isSameActorEmail,\n remainingAcks,\n requiredPermissionsOf,\n resolveRequiredAcks,\n} from './approvals/policy.js'\nexport type {\n ReleaseTrainAutoUpgradeCandidates,\n ReleaseTrainPublishPayload,\n ReleaseTrainRollbackPayload,\n} from './approvals/release-train.js'\nexport type { ApprovalUseCaseType } from './approvals/use-cases.const.js'\nexport {\n APPROVAL_EMAIL_MAX_LENGTH,\n APPROVAL_EMAIL_PATTERN,\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 FEATURE_FLAG_MIN_ACKS_PROD,\n GENERATION_VERSION_VALUE_MAX_LENGTH,\n GENERATION_VERSIONS_MAX_GENERATIONS,\n isCalendarDay,\n ORG_LIMIT_TEXT_MAX_LENGTH,\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 PURGE_USERS_MAX_USERS,\n PURGE_USERS_REQUIRED_PERMISSIONS,\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 {\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_SEARCH_MAX_LENGTH,\n ANNOTATION_TAG_NAME_MAX,\n normalizeTagName,\n} from './dtos/Annotation.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 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 { 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} 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 FeatureFlagListDto,\n UpdateFeatureFlagDto,\n} from './dtos/FeatureFlags.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 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 DryRunSanityDiff,\n ReleaseTrainPreview,\n ReleaseTrainSanityReport,\n SanityFix,\n SanityRuleInfo,\n SanitySeverity,\n SanityViolation,\n} from './dtos/ReleaseTrainSanity.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 GenerationImageVersionsDto,\n ImmutableZeebeClusterVersionsDto,\n MutableZeebeClusterVersionsDto,\n ZeebeClusterVersionsDto,\n} from './types/C8ClusterComponentVersions.type.js'\n// C8ClusterComponentVersions.type - Values (constants)\nexport {\n AllThings,\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'\n// Dashboard.types - Types\nexport type {\n DashboardConfig,\n DashboardMappingItem,\n DashboardMappingTarget,\n DashboardResultPrimitive,\n DashboardResultRow,\n EngineeringOperationsDashboardResponse,\n} from './types/Dashboard.types.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 Audit as HdpAudit,\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 HdpEntity,\n HdpPrometheusDataCapacityDataPoint,\n Invite as HdpInvite,\n LlmSpend as HdpLlmSpend,\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} 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} from './utils/elasticsearchPlanPath.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 type {\n JvmOptionsModificationKey,\n ParsedJvmOption,\n} from './utils/jvmOptions.js'\nexport {\n addsEnvVarsOverrideValue,\n isJvmOptionsModificationKey,\n isUnderJvmSpec,\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 parseJvmOption,\n requiresEnvVarsOverride,\n splitJvmOptions,\n validateJvmOptions,\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 { ObjectMergeUtils } from './utils/objectMerge.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'\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'\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,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,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,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;AAKtD,SAAS,wCAAwC;AACjD;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;AAcP;AAAA,EACE;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,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;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,OACK;AAOP;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,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,E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wBAAwB;AACjC;AAAA,EACE;AAAA,OAEK;AACP;AAAA,EACE;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;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
|
}
|
|
@@ -281,9 +281,6 @@ function consoleUserFeaturesFromPermissions(permissions) {
|
|
|
281
281
|
)
|
|
282
282
|
},
|
|
283
283
|
migrate: permissions.includes(ConsolePermissions.CLUSTER_PLAN_MIGRATE),
|
|
284
|
-
deleteAllClustersOfPlan: permissions.includes(
|
|
285
|
-
ConsolePermissions.CLUSTER_PLAN_CAN_DELETE_ALL_CLUSTERS_OF_PLAN
|
|
286
|
-
),
|
|
287
284
|
modify: permissions.includes(ConsolePermissions.CLUSTER_PLAN_CAN_MODIFY)
|
|
288
285
|
},
|
|
289
286
|
features: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/permissions/combo.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 { AccountsPermissions } from './accounts.permissions.js'\nimport { AuditLoggerPermissions } from './auditlogger.permissions.js'\nimport { ConsolePermissions } from './console.permissions.js'\nimport { NotificationPermissions } from './notification.permissions.js'\n\nexport function accountsUserFeaturesFromPermissions(permissions: string[]) {\n const newFeatures: AccountsPermissions.Features = {\n admin: {\n readAll: permissions.includes(AccountsPermissions.READ_ALL),\n createOrg: permissions.includes(AccountsPermissions.CREATE_ORG),\n changeOrgName: permissions.includes(AccountsPermissions.CHANGE_ORG_NAME),\n\n deleteOrg: permissions.includes(AccountsPermissions.DELETE_ORG),\n resetTokenVerification: permissions.includes(\n AccountsPermissions.RESET_TOKEN_VERIFICATION,\n ),\n deleteUser: permissions.includes(AccountsPermissions.DELETE_USER),\n deleteNotActivatedUser: permissions.includes(\n AccountsPermissions.DELETE_NOT_ACTIVATED_USER,\n ),\n addToOrg: permissions.includes(AccountsPermissions.ADD_TO_ORG),\n removeFromOrg: permissions.includes(AccountsPermissions.REMOVE_FROM_ORG),\n setDefaultOrg: permissions.includes(AccountsPermissions.SET_DEFAULT_ORG),\n cancelInvite: permissions.includes(AccountsPermissions.CANCEL_INVITE),\n changeRole: permissions.includes(AccountsPermissions.CHANGE_ROLE),\n addSafeRole: permissions.includes(AccountsPermissions.CHANGE_SAFE_ROLE),\n changeOrgMemberRole: permissions.includes(\n AccountsPermissions.CHANGE_ORG_MEMBER_ROLE,\n ),\n deleteClusters: permissions.includes(\n ConsolePermissions.CLUSTERS_DELETE_CLUSTER,\n ),\n extendTrial: permissions.includes(AccountsPermissions.EXTEND_TRIAL),\n invalidateToken: permissions.includes(\n AccountsPermissions.INVALIDATE_TOKEN,\n ),\n cancelPaid: permissions.includes(AccountsPermissions.ORG_CANCEL_PAID),\n searchForOrgs: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_SEE_ALL,\n ),\n readAudit: permissions.includes(AuditLoggerPermissions.READ),\n modifyClusterPlanTypeReservations: permissions.includes(\n AccountsPermissions.MODIFY_CLUSTER_PLAN_TYPE_RESERVATIONS,\n ),\n mayChangeOrgLimits: permissions.includes(\n AccountsPermissions.ORG_MAY_CHANGE_LIMITS,\n ),\n mayChangeGenerationWhiteList: permissions.includes(\n AccountsPermissions.ORG_MAY_CHANGE_GENERATION_WHITELIST,\n ),\n sql: permissions.includes(AccountsPermissions.ADMIN_SQL),\n modelerDeleteUser: permissions.includes(\n AccountsPermissions.MODELER_DELETE_USER,\n ),\n unblockUser: permissions.includes(AccountsPermissions.UNBLOCK_USER),\n god: {\n triggerCrons: permissions.includes(AccountsPermissions.GOD_CRON),\n forceSalesPlanOnOrg: permissions.includes(\n AccountsPermissions.FORCE_SALES_PLAN_ON_ORG,\n ),\n changeSignupSpamPatterns: permissions.includes(\n AccountsPermissions.GOD_SIGNUP_SPAM_PATTERNS,\n ),\n purgeUsers: permissions.includes(AccountsPermissions.GOD_PURGE_USERS),\n updateUserMetadata: permissions.includes(\n AccountsPermissions.GOD_UPDATE_USER_METADATA,\n ),\n },\n bot: permissions.includes(AccountsPermissions.BOT),\n changeEmail: permissions.includes(AccountsPermissions.ADMIN_CHANGE_EMAIL),\n changeUserName: permissions.includes(\n AccountsPermissions.ADMIN_CHANGE_USER_NAME,\n ),\n },\n salesPlan: {\n create: permissions.includes(AccountsPermissions.SALES_PLAN_CREATE),\n modify: permissions.includes(AccountsPermissions.SALES_PLAN_MODIFY),\n forceModify: permissions.includes(\n AccountsPermissions.SALES_PLAN_FORCE_MODIFY,\n ),\n switch: permissions.includes(AccountsPermissions.SALES_PLAN_SWITCH),\n delete: permissions.includes(AccountsPermissions.SALES_PLAN_DELETE),\n godDelete: permissions.includes(\n AccountsPermissions.SALES_PLAN_DELETE_AS_GOD,\n ),\n },\n enterprise: {\n org: {\n convert: permissions.includes(\n AccountsPermissions.ENTERPRISE_ORG_CONVERT,\n ),\n modify: permissions.includes(AccountsPermissions.ENTERPRISE_ORG_MODIFY),\n modifyStartDate: permissions.includes(\n AccountsPermissions.ENTERPRISE_ORG_MODIFY_START_DATE,\n ),\n },\n },\n trial: {\n convertToInNegotiation: permissions.includes(\n AccountsPermissions.TRIAL_TO_IN_NEGOTIATION_CONVERT,\n ),\n },\n supportAgent: {\n removeAgentsFromOrg: permissions.includes(\n AccountsPermissions.SUPPORT_AGENT_REMOVE_AGENTS_FROM_ORG,\n ),\n seeOrgMemberships: permissions.includes(\n AccountsPermissions.SUPPORT_AGENT_SEE_ORG_MEMBERSHIPS,\n ),\n addAgentsToOrg: permissions.includes(\n AccountsPermissions.SUPPORT_AGENT_ADD_TO_ORG,\n ),\n },\n m2m: {\n salesplan: {\n get: permissions.includes(AccountsPermissions.M2M_SALESPLAN_GET),\n switch: permissions.includes(AccountsPermissions.M2M_SALESPLAN_SWITCH),\n },\n fetchMigrationData: permissions.includes(\n ConsolePermissions.M2M_FETCH_MIGRATION_DATA,\n ),\n approvals: permissions.includes(ConsolePermissions.M2M_CONTROL_APPROVALS),\n },\n externalM2m: {\n org: {\n members: {\n get: permissions.includes(\n AccountsPermissions.EXTERNAL_M2M_GET_ORG_MEMBERS,\n ),\n },\n search: permissions.includes(\n AccountsPermissions.EXTERNAL_M2M_SEARCH_ORGS,\n ),\n },\n // eslint-disable-next-line id-length\n qa: {\n org: {\n create: permissions.includes(\n AccountsPermissions.EXTERNAL_M2M_QA_ORG_CREATE,\n ),\n },\n },\n offboarding: {\n camundi: permissions.includes(\n AccountsPermissions.EXTERNAL_M2M_OFFBOARD_CAMUNDI,\n ),\n },\n },\n auth0: {\n connections: {\n create: permissions.includes(\n AccountsPermissions.ADMIN_AUTH0_CONNECTIONS_CREATE,\n ),\n read: permissions.includes(\n AccountsPermissions.ADMIN_AUTH0_CONNECTIONS_READ,\n ),\n update: permissions.includes(\n AccountsPermissions.ADMIN_AUTH0_CONNECTIONS_UPDATE,\n ),\n delete: permissions.includes(\n AccountsPermissions.ADMIN_AUTH0_CONNECTIONS_DELETE,\n ),\n },\n },\n notifications: {\n global: {\n read: permissions.includes(NotificationPermissions.READ_GLOBAL),\n delete: permissions.includes(NotificationPermissions.DELETE_GLOBAL),\n create: permissions.includes(NotificationPermissions.CREATE_GLOBAL),\n },\n },\n earlyAccessFeatures: {\n read: permissions.includes(\n AccountsPermissions.ADMIN_EARLY_ACCESS_FEATURES_READ,\n ),\n create: permissions.includes(\n AccountsPermissions.ADMIN_EARLY_ACCESS_FEATURES_CREATE,\n ),\n delete: permissions.includes(\n AccountsPermissions.ADMIN_EARLY_ACCESS_FEATURES_DELETE,\n ),\n update: permissions.includes(\n AccountsPermissions.ADMIN_EARLY_ACCESS_FEATURES_UPDATE,\n ),\n },\n pdfWatermark: {\n read: permissions.includes(AccountsPermissions.PDF_WATERMARK_READ),\n write: permissions.includes(AccountsPermissions.PDF_WATERMARK_WRITE),\n },\n featureFlags: {\n write: permissions.includes(\n AccountsPermissions.ADMIN_FEATURE_FLAGS_WRITE,\n ),\n },\n }\n return newFeatures\n}\n\nexport function consoleUserFeaturesFromPermissions(permissions: string[]) {\n const newFeatures: ConsolePermissions.Features = {\n apiClient: {\n read: permissions.includes(ConsolePermissions.APICLIENT_READ),\n delete: permissions.includes(ConsolePermissions.APICLIENT_DELETE),\n },\n multiCluster: {\n admin: permissions.includes(ConsolePermissions.MULTICLUSTER_ADMIN),\n },\n multiGen: {\n admin: {\n see: permissions.includes(\n ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN_SEE,\n ),\n modify: permissions.includes(\n ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN,\n ),\n patchExistingChannel: permissions.includes(\n ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN_PATCH_EXISTING_CHANNEL,\n ),\n migrate: permissions.includes(\n ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN_MIGRATE,\n ),\n deleteAllClustersOfGeneration: permissions.includes(\n ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN_DELETE_ALL_CLUSTERS,\n ),\n },\n releaseTrain: {\n publish: permissions.includes(ConsolePermissions.RELEASE_TRAIN_PUBLISH),\n },\n },\n clusters: {\n canReadAllClusterInfo: permissions.includes(\n ConsolePermissions.CLUSTERS_READALLCLUSTERINFO,\n ),\n canDeleteAllClusters: permissions.includes(\n ConsolePermissions.CLUSTERS_DELETE_CLUSTER,\n ),\n canMoveToOtherOrg: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_MOVE_TO_OTHER_ORG,\n ),\n createOnBehalf: permissions.includes(\n ConsolePermissions.CLUSTER_CREATE_ON_BEHALF,\n ),\n canSendToSleep: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_SEND_TO_SLEEP,\n ),\n canCreateInternalBackup: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_CREATE_INTERNAL_BACKUP,\n ),\n canUpdateClusterPlanType: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_UPDATE_CLUSTERPLANTYPE,\n ),\n canOverrideEnvVars: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_OVERRIDE_ENV_VARS,\n ),\n canCreateModificationConfig: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_CREATE_MODIFICATION_CONFIG,\n ),\n canUpgradeGeneration: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_UPDATE_GENERATION,\n ),\n canUpgradeGenerationYolo: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_UPDATE_GENERATION_YOLO,\n ),\n canUpdateOptionalTelemetry: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_UPDATE_OPTIONAL_TELEMETRY,\n ),\n },\n clusterPlan: {\n seeAll: permissions.includes(ConsolePermissions.CLUSTER_PLAN_SEE_ALL),\n create: permissions.includes(ConsolePermissions.CLUSTER_PLAN_CREATE),\n delete: permissions.includes(ConsolePermissions.CLUSTER_PLAN_DELETE),\n type: {\n create: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_TYPE_CREATE,\n ),\n modify: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_TYPE_MODIFY,\n ),\n delete: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_TYPE_DELETE,\n ),\n forceDelete: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_TYPE_FORCE_DELETE,\n ),\n },\n migrate: permissions.includes(ConsolePermissions.CLUSTER_PLAN_MIGRATE),\n deleteAllClustersOfPlan: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_CAN_DELETE_ALL_CLUSTERS_OF_PLAN,\n ),\n modify: permissions.includes(ConsolePermissions.CLUSTER_PLAN_CAN_MODIFY),\n },\n features: {\n newHome: permissions.includes(ConsolePermissions.FEATURE_NEW_HOME),\n templatePicker: permissions.includes(\n ConsolePermissions.FEATURE_TEMPLATE_PICKER,\n ),\n userSettings: permissions.includes(ConsolePermissions.USER_SETTINGS),\n debug: permissions.includes(ConsolePermissions.DEBUG),\n },\n m2m: {\n updateCrd: permissions.includes(ConsolePermissions.M2M_UPDATE_CRD),\n signup: permissions.includes(ConsolePermissions.M2M_SIGNUP),\n triggerAlert: permissions.includes(ConsolePermissions.M2M_TRIGGER_ALERT),\n deleteOrgClusters: permissions.includes(\n ConsolePermissions.M2M_DELETE_ORG_CLUSTERS,\n ),\n updateOrgClusters: permissions.includes(\n ConsolePermissions.M2M_UPDATE_ORG_CLUSTERS,\n ),\n addUsageMetrics: permissions.includes(\n ConsolePermissions.M2M_ADD_CLUSTER_USAGE_METRICS,\n ),\n sendSseEvent: permissions.includes(ConsolePermissions.M2M_SEND_SSE_EVENT),\n external: {\n internalClient: permissions.includes(\n ConsolePermissions.M2M_EXTERNAL_INTERNAL_CLIENT,\n ),\n },\n fetchMigrationData: permissions.includes(\n ConsolePermissions.M2M_FETCH_MIGRATION_DATA,\n ),\n manageGenerationUpgradePath: permissions.includes(\n ConsolePermissions.M2M_MANAGE_GENERATION_UPGRADE_PATH,\n ),\n approvals: permissions.includes(ConsolePermissions.M2M_CONTROL_APPROVALS),\n },\n }\n return newFeatures\n}\n\n/**\n * Flattens a feature tree into the dotted keys of the Control session.\n *\n * `buildSession` in accounts-backend writes the session with exactly this\n * shape, under the prefixes `` (accounts), `console` and `notifications`.\n */\nfunction flattenFeatureBooleans(\n value: unknown,\n prefix = '',\n): Record<string, boolean> {\n const out: Record<string, boolean> = {}\n if (!value || typeof value !== 'object') {\n return out\n }\n for (const [key, entry] of Object.entries(value as Record<string, unknown>)) {\n const flatKey = prefix ? `${prefix}.${key}` : key\n if (typeof entry === 'boolean') {\n out[flatKey] = entry\n } else if (entry && typeof entry === 'object') {\n Object.assign(out, flattenFeatureBooleans(entry, flatKey))\n }\n }\n return out\n}\n\n/**\n * The session keys that ONE raw Auth0 permission turns on.\n *\n * The Control session holds a flat record of feature booleans, such as\n * `admin.extendTrial` and `console.clusters.canUpgradeGenerationYolo`. An\n * approval use case names the raw Auth0 short code instead, such as `aaet`,\n * because that is what the token carries and what a backend compares.\n *\n * This function bridges the two, and it bridges them by RUNNING the same\n * mappers that build the session. A hand-written table of code to key would be\n * a third copy of the permission model, and a code that gained a key would\n * silently stop gating anything in the browser.\n *\n * It answers an array, because one code can turn on more than one key. An\n * unknown code answers an empty array, and the caller decides what that means.\n *\n * The answer is CACHED, because the work is three feature trees and a flatten\n * of each one. `ApprovalActorView.has` of the browser runs this, and the rules\n * call `has` for every row of the queue: a page of 2000 requests turned one\n * cheap question into thousands of tree builds. The answer of a code never\n * changes inside one bundle, so the cache needs no invalidation, and the keys\n * are the permission codes of the use cases, which is a short list.\n *\n * The answer is `readonly`, and frozen, because every caller of one code gets\n * the SAME array: a caller that sorted or pushed in place would change what\n * the next reader of that code sees.\n */\nconst keysByPermissionCode = new Map<string, readonly string[]>()\n\nexport function sessionPermissionKeysFor(\n permissionCode: string,\n): readonly string[] {\n const cached = keysByPermissionCode.get(permissionCode)\n if (cached) {\n return cached\n }\n const answer = Object.freeze(buildSessionPermissionKeys(permissionCode))\n keysByPermissionCode.set(permissionCode, answer)\n return answer\n}\n\nfunction buildSessionPermissionKeys(permissionCode: string): string[] {\n const trees: [unknown, string][] = [\n [accountsUserFeaturesFromPermissions([permissionCode]), ''],\n [consoleUserFeaturesFromPermissions([permissionCode]), 'console'],\n [\n NotificationPermissions.userFeaturesFromPermissions([permissionCode]),\n 'notifications',\n ],\n ]\n const keys: string[] = []\n for (const [tree, prefix] of trees) {\n for (const [key, on] of Object.entries(\n flattenFeatureBooleans(tree, prefix),\n )) {\n if (on) {\n keys.push(key)\n }\n }\n }\n return keys\n}\n\n/**\n * Reports whether a Control session holds one raw Auth0 permission.\n *\n * It is what `ApprovalActorView.has` runs in the browser. An unknown code\n * answers false: a permission that nothing maps is a permission that nobody\n * holds, and the alternative would open a button that the backend refuses.\n */\nexport function sessionHasPermission(\n sessionPermissions: Record<string, boolean>,\n permissionCode: string,\n): boolean {\n return sessionPermissionKeysFor(permissionCode).some(\n (key) => sessionPermissions[key] === true,\n )\n}\n"],
|
|
5
|
-
"mappings": "AAMA,SAAS,2BAA2B;AACpC,SAAS,8BAA8B;AACvC,SAAS,0BAA0B;AACnC,SAAS,+BAA+B;AAEjC,SAAS,oCAAoC,aAAuB;AACzE,QAAM,cAA4C;AAAA,IAChD,OAAO;AAAA,MACL,SAAS,YAAY,SAAS,oBAAoB,QAAQ;AAAA,MAC1D,WAAW,YAAY,SAAS,oBAAoB,UAAU;AAAA,MAC9D,eAAe,YAAY,SAAS,oBAAoB,eAAe;AAAA,MAEvE,WAAW,YAAY,SAAS,oBAAoB,UAAU;AAAA,MAC9D,wBAAwB,YAAY;AAAA,QAClC,oBAAoB;AAAA,MACtB;AAAA,MACA,YAAY,YAAY,SAAS,oBAAoB,WAAW;AAAA,MAChE,wBAAwB,YAAY;AAAA,QAClC,oBAAoB;AAAA,MACtB;AAAA,MACA,UAAU,YAAY,SAAS,oBAAoB,UAAU;AAAA,MAC7D,eAAe,YAAY,SAAS,oBAAoB,eAAe;AAAA,MACvE,eAAe,YAAY,SAAS,oBAAoB,eAAe;AAAA,MACvE,cAAc,YAAY,SAAS,oBAAoB,aAAa;AAAA,MACpE,YAAY,YAA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MACrB;AAAA,MACA,0BAA0B,YAAY;AAAA,QACpC,mBAAmB;AAAA,MACrB;AAAA,MACA,4BAA4B,YAAY;AAAA,QACtC,mBAAmB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,aAAa;AAAA,MACX,QAAQ,YAAY,SAAS,mBAAmB,oBAAoB;AAAA,MACpE,QAAQ,YAAY,SAAS,mBAAmB,mBAAmB;AAAA,MACnE,QAAQ,YAAY,SAAS,mBAAmB,mBAAmB;AAAA,MACnE,MAAM;AAAA,QACJ,QAAQ,YAAY;AAAA,UAClB,mBAAmB;AAAA,QACrB;AAAA,QACA,QAAQ,YAAY;AAAA,UAClB,mBAAmB;AAAA,QACrB;AAAA,QACA,QAAQ,YAAY;AAAA,UAClB,mBAAmB;AAAA,QACrB;AAAA,QACA,aAAa,YAAY;AAAA,UACvB,mBAAmB;AAAA,QACrB;AAAA,MACF;AAAA,MACA,SAAS,YAAY,SAAS,mBAAmB,oBAAoB;AAAA,MACrE,
|
|
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 { AccountsPermissions } from './accounts.permissions.js'\nimport { AuditLoggerPermissions } from './auditlogger.permissions.js'\nimport { ConsolePermissions } from './console.permissions.js'\nimport { NotificationPermissions } from './notification.permissions.js'\n\nexport function accountsUserFeaturesFromPermissions(permissions: string[]) {\n const newFeatures: AccountsPermissions.Features = {\n admin: {\n readAll: permissions.includes(AccountsPermissions.READ_ALL),\n createOrg: permissions.includes(AccountsPermissions.CREATE_ORG),\n changeOrgName: permissions.includes(AccountsPermissions.CHANGE_ORG_NAME),\n\n deleteOrg: permissions.includes(AccountsPermissions.DELETE_ORG),\n resetTokenVerification: permissions.includes(\n AccountsPermissions.RESET_TOKEN_VERIFICATION,\n ),\n deleteUser: permissions.includes(AccountsPermissions.DELETE_USER),\n deleteNotActivatedUser: permissions.includes(\n AccountsPermissions.DELETE_NOT_ACTIVATED_USER,\n ),\n addToOrg: permissions.includes(AccountsPermissions.ADD_TO_ORG),\n removeFromOrg: permissions.includes(AccountsPermissions.REMOVE_FROM_ORG),\n setDefaultOrg: permissions.includes(AccountsPermissions.SET_DEFAULT_ORG),\n cancelInvite: permissions.includes(AccountsPermissions.CANCEL_INVITE),\n changeRole: permissions.includes(AccountsPermissions.CHANGE_ROLE),\n addSafeRole: permissions.includes(AccountsPermissions.CHANGE_SAFE_ROLE),\n changeOrgMemberRole: permissions.includes(\n AccountsPermissions.CHANGE_ORG_MEMBER_ROLE,\n ),\n deleteClusters: permissions.includes(\n ConsolePermissions.CLUSTERS_DELETE_CLUSTER,\n ),\n extendTrial: permissions.includes(AccountsPermissions.EXTEND_TRIAL),\n invalidateToken: permissions.includes(\n AccountsPermissions.INVALIDATE_TOKEN,\n ),\n cancelPaid: permissions.includes(AccountsPermissions.ORG_CANCEL_PAID),\n searchForOrgs: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_SEE_ALL,\n ),\n readAudit: permissions.includes(AuditLoggerPermissions.READ),\n modifyClusterPlanTypeReservations: permissions.includes(\n AccountsPermissions.MODIFY_CLUSTER_PLAN_TYPE_RESERVATIONS,\n ),\n mayChangeOrgLimits: permissions.includes(\n AccountsPermissions.ORG_MAY_CHANGE_LIMITS,\n ),\n mayChangeGenerationWhiteList: permissions.includes(\n AccountsPermissions.ORG_MAY_CHANGE_GENERATION_WHITELIST,\n ),\n sql: permissions.includes(AccountsPermissions.ADMIN_SQL),\n modelerDeleteUser: permissions.includes(\n AccountsPermissions.MODELER_DELETE_USER,\n ),\n unblockUser: permissions.includes(AccountsPermissions.UNBLOCK_USER),\n god: {\n triggerCrons: permissions.includes(AccountsPermissions.GOD_CRON),\n forceSalesPlanOnOrg: permissions.includes(\n AccountsPermissions.FORCE_SALES_PLAN_ON_ORG,\n ),\n changeSignupSpamPatterns: permissions.includes(\n AccountsPermissions.GOD_SIGNUP_SPAM_PATTERNS,\n ),\n purgeUsers: permissions.includes(AccountsPermissions.GOD_PURGE_USERS),\n updateUserMetadata: permissions.includes(\n AccountsPermissions.GOD_UPDATE_USER_METADATA,\n ),\n },\n bot: permissions.includes(AccountsPermissions.BOT),\n changeEmail: permissions.includes(AccountsPermissions.ADMIN_CHANGE_EMAIL),\n changeUserName: permissions.includes(\n AccountsPermissions.ADMIN_CHANGE_USER_NAME,\n ),\n },\n salesPlan: {\n create: permissions.includes(AccountsPermissions.SALES_PLAN_CREATE),\n modify: permissions.includes(AccountsPermissions.SALES_PLAN_MODIFY),\n forceModify: permissions.includes(\n AccountsPermissions.SALES_PLAN_FORCE_MODIFY,\n ),\n switch: permissions.includes(AccountsPermissions.SALES_PLAN_SWITCH),\n delete: permissions.includes(AccountsPermissions.SALES_PLAN_DELETE),\n godDelete: permissions.includes(\n AccountsPermissions.SALES_PLAN_DELETE_AS_GOD,\n ),\n },\n enterprise: {\n org: {\n convert: permissions.includes(\n AccountsPermissions.ENTERPRISE_ORG_CONVERT,\n ),\n modify: permissions.includes(AccountsPermissions.ENTERPRISE_ORG_MODIFY),\n modifyStartDate: permissions.includes(\n AccountsPermissions.ENTERPRISE_ORG_MODIFY_START_DATE,\n ),\n },\n },\n trial: {\n convertToInNegotiation: permissions.includes(\n AccountsPermissions.TRIAL_TO_IN_NEGOTIATION_CONVERT,\n ),\n },\n supportAgent: {\n removeAgentsFromOrg: permissions.includes(\n AccountsPermissions.SUPPORT_AGENT_REMOVE_AGENTS_FROM_ORG,\n ),\n seeOrgMemberships: permissions.includes(\n AccountsPermissions.SUPPORT_AGENT_SEE_ORG_MEMBERSHIPS,\n ),\n addAgentsToOrg: permissions.includes(\n AccountsPermissions.SUPPORT_AGENT_ADD_TO_ORG,\n ),\n },\n m2m: {\n salesplan: {\n get: permissions.includes(AccountsPermissions.M2M_SALESPLAN_GET),\n switch: permissions.includes(AccountsPermissions.M2M_SALESPLAN_SWITCH),\n },\n fetchMigrationData: permissions.includes(\n ConsolePermissions.M2M_FETCH_MIGRATION_DATA,\n ),\n approvals: permissions.includes(ConsolePermissions.M2M_CONTROL_APPROVALS),\n },\n externalM2m: {\n org: {\n members: {\n get: permissions.includes(\n AccountsPermissions.EXTERNAL_M2M_GET_ORG_MEMBERS,\n ),\n },\n search: permissions.includes(\n AccountsPermissions.EXTERNAL_M2M_SEARCH_ORGS,\n ),\n },\n // eslint-disable-next-line id-length\n qa: {\n org: {\n create: permissions.includes(\n AccountsPermissions.EXTERNAL_M2M_QA_ORG_CREATE,\n ),\n },\n },\n offboarding: {\n camundi: permissions.includes(\n AccountsPermissions.EXTERNAL_M2M_OFFBOARD_CAMUNDI,\n ),\n },\n },\n auth0: {\n connections: {\n create: permissions.includes(\n AccountsPermissions.ADMIN_AUTH0_CONNECTIONS_CREATE,\n ),\n read: permissions.includes(\n AccountsPermissions.ADMIN_AUTH0_CONNECTIONS_READ,\n ),\n update: permissions.includes(\n AccountsPermissions.ADMIN_AUTH0_CONNECTIONS_UPDATE,\n ),\n delete: permissions.includes(\n AccountsPermissions.ADMIN_AUTH0_CONNECTIONS_DELETE,\n ),\n },\n },\n notifications: {\n global: {\n read: permissions.includes(NotificationPermissions.READ_GLOBAL),\n delete: permissions.includes(NotificationPermissions.DELETE_GLOBAL),\n create: permissions.includes(NotificationPermissions.CREATE_GLOBAL),\n },\n },\n earlyAccessFeatures: {\n read: permissions.includes(\n AccountsPermissions.ADMIN_EARLY_ACCESS_FEATURES_READ,\n ),\n create: permissions.includes(\n AccountsPermissions.ADMIN_EARLY_ACCESS_FEATURES_CREATE,\n ),\n delete: permissions.includes(\n AccountsPermissions.ADMIN_EARLY_ACCESS_FEATURES_DELETE,\n ),\n update: permissions.includes(\n AccountsPermissions.ADMIN_EARLY_ACCESS_FEATURES_UPDATE,\n ),\n },\n pdfWatermark: {\n read: permissions.includes(AccountsPermissions.PDF_WATERMARK_READ),\n write: permissions.includes(AccountsPermissions.PDF_WATERMARK_WRITE),\n },\n featureFlags: {\n write: permissions.includes(\n AccountsPermissions.ADMIN_FEATURE_FLAGS_WRITE,\n ),\n },\n }\n return newFeatures\n}\n\nexport function consoleUserFeaturesFromPermissions(permissions: string[]) {\n const newFeatures: ConsolePermissions.Features = {\n apiClient: {\n read: permissions.includes(ConsolePermissions.APICLIENT_READ),\n delete: permissions.includes(ConsolePermissions.APICLIENT_DELETE),\n },\n multiCluster: {\n admin: permissions.includes(ConsolePermissions.MULTICLUSTER_ADMIN),\n },\n multiGen: {\n admin: {\n see: permissions.includes(\n ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN_SEE,\n ),\n modify: permissions.includes(\n ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN,\n ),\n patchExistingChannel: permissions.includes(\n ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN_PATCH_EXISTING_CHANNEL,\n ),\n migrate: permissions.includes(\n ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN_MIGRATE,\n ),\n deleteAllClustersOfGeneration: permissions.includes(\n ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN_DELETE_ALL_CLUSTERS,\n ),\n },\n releaseTrain: {\n publish: permissions.includes(ConsolePermissions.RELEASE_TRAIN_PUBLISH),\n },\n },\n clusters: {\n canReadAllClusterInfo: permissions.includes(\n ConsolePermissions.CLUSTERS_READALLCLUSTERINFO,\n ),\n canDeleteAllClusters: permissions.includes(\n ConsolePermissions.CLUSTERS_DELETE_CLUSTER,\n ),\n canMoveToOtherOrg: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_MOVE_TO_OTHER_ORG,\n ),\n createOnBehalf: permissions.includes(\n ConsolePermissions.CLUSTER_CREATE_ON_BEHALF,\n ),\n canSendToSleep: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_SEND_TO_SLEEP,\n ),\n canCreateInternalBackup: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_CREATE_INTERNAL_BACKUP,\n ),\n canUpdateClusterPlanType: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_UPDATE_CLUSTERPLANTYPE,\n ),\n canOverrideEnvVars: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_OVERRIDE_ENV_VARS,\n ),\n canCreateModificationConfig: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_CREATE_MODIFICATION_CONFIG,\n ),\n canUpgradeGeneration: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_UPDATE_GENERATION,\n ),\n canUpgradeGenerationYolo: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_UPDATE_GENERATION_YOLO,\n ),\n canUpdateOptionalTelemetry: permissions.includes(\n ConsolePermissions.CLUSTERS_CAN_UPDATE_OPTIONAL_TELEMETRY,\n ),\n },\n clusterPlan: {\n seeAll: permissions.includes(ConsolePermissions.CLUSTER_PLAN_SEE_ALL),\n create: permissions.includes(ConsolePermissions.CLUSTER_PLAN_CREATE),\n delete: permissions.includes(ConsolePermissions.CLUSTER_PLAN_DELETE),\n type: {\n create: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_TYPE_CREATE,\n ),\n modify: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_TYPE_MODIFY,\n ),\n delete: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_TYPE_DELETE,\n ),\n forceDelete: permissions.includes(\n ConsolePermissions.CLUSTER_PLAN_TYPE_FORCE_DELETE,\n ),\n },\n migrate: permissions.includes(ConsolePermissions.CLUSTER_PLAN_MIGRATE),\n modify: permissions.includes(ConsolePermissions.CLUSTER_PLAN_CAN_MODIFY),\n },\n features: {\n newHome: permissions.includes(ConsolePermissions.FEATURE_NEW_HOME),\n templatePicker: permissions.includes(\n ConsolePermissions.FEATURE_TEMPLATE_PICKER,\n ),\n userSettings: permissions.includes(ConsolePermissions.USER_SETTINGS),\n debug: permissions.includes(ConsolePermissions.DEBUG),\n },\n m2m: {\n updateCrd: permissions.includes(ConsolePermissions.M2M_UPDATE_CRD),\n signup: permissions.includes(ConsolePermissions.M2M_SIGNUP),\n triggerAlert: permissions.includes(ConsolePermissions.M2M_TRIGGER_ALERT),\n deleteOrgClusters: permissions.includes(\n ConsolePermissions.M2M_DELETE_ORG_CLUSTERS,\n ),\n updateOrgClusters: permissions.includes(\n ConsolePermissions.M2M_UPDATE_ORG_CLUSTERS,\n ),\n addUsageMetrics: permissions.includes(\n ConsolePermissions.M2M_ADD_CLUSTER_USAGE_METRICS,\n ),\n sendSseEvent: permissions.includes(ConsolePermissions.M2M_SEND_SSE_EVENT),\n external: {\n internalClient: permissions.includes(\n ConsolePermissions.M2M_EXTERNAL_INTERNAL_CLIENT,\n ),\n },\n fetchMigrationData: permissions.includes(\n ConsolePermissions.M2M_FETCH_MIGRATION_DATA,\n ),\n manageGenerationUpgradePath: permissions.includes(\n ConsolePermissions.M2M_MANAGE_GENERATION_UPGRADE_PATH,\n ),\n approvals: permissions.includes(ConsolePermissions.M2M_CONTROL_APPROVALS),\n },\n }\n return newFeatures\n}\n\n/**\n * Flattens a feature tree into the dotted keys of the Control session.\n *\n * `buildSession` in accounts-backend writes the session with exactly this\n * shape, under the prefixes `` (accounts), `console` and `notifications`.\n */\nfunction flattenFeatureBooleans(\n value: unknown,\n prefix = '',\n): Record<string, boolean> {\n const out: Record<string, boolean> = {}\n if (!value || typeof value !== 'object') {\n return out\n }\n for (const [key, entry] of Object.entries(value as Record<string, unknown>)) {\n const flatKey = prefix ? `${prefix}.${key}` : key\n if (typeof entry === 'boolean') {\n out[flatKey] = entry\n } else if (entry && typeof entry === 'object') {\n Object.assign(out, flattenFeatureBooleans(entry, flatKey))\n }\n }\n return out\n}\n\n/**\n * The session keys that ONE raw Auth0 permission turns on.\n *\n * The Control session holds a flat record of feature booleans, such as\n * `admin.extendTrial` and `console.clusters.canUpgradeGenerationYolo`. An\n * approval use case names the raw Auth0 short code instead, such as `aaet`,\n * because that is what the token carries and what a backend compares.\n *\n * This function bridges the two, and it bridges them by RUNNING the same\n * mappers that build the session. A hand-written table of code to key would be\n * a third copy of the permission model, and a code that gained a key would\n * silently stop gating anything in the browser.\n *\n * It answers an array, because one code can turn on more than one key. An\n * unknown code answers an empty array, and the caller decides what that means.\n *\n * The answer is CACHED, because the work is three feature trees and a flatten\n * of each one. `ApprovalActorView.has` of the browser runs this, and the rules\n * call `has` for every row of the queue: a page of 2000 requests turned one\n * cheap question into thousands of tree builds. The answer of a code never\n * changes inside one bundle, so the cache needs no invalidation, and the keys\n * are the permission codes of the use cases, which is a short list.\n *\n * The answer is `readonly`, and frozen, because every caller of one code gets\n * the SAME array: a caller that sorted or pushed in place would change what\n * the next reader of that code sees.\n */\nconst keysByPermissionCode = new Map<string, readonly string[]>()\n\nexport function sessionPermissionKeysFor(\n permissionCode: string,\n): readonly string[] {\n const cached = keysByPermissionCode.get(permissionCode)\n if (cached) {\n return cached\n }\n const answer = Object.freeze(buildSessionPermissionKeys(permissionCode))\n keysByPermissionCode.set(permissionCode, answer)\n return answer\n}\n\nfunction buildSessionPermissionKeys(permissionCode: string): string[] {\n const trees: [unknown, string][] = [\n [accountsUserFeaturesFromPermissions([permissionCode]), ''],\n [consoleUserFeaturesFromPermissions([permissionCode]), 'console'],\n [\n NotificationPermissions.userFeaturesFromPermissions([permissionCode]),\n 'notifications',\n ],\n ]\n const keys: string[] = []\n for (const [tree, prefix] of trees) {\n for (const [key, on] of Object.entries(\n flattenFeatureBooleans(tree, prefix),\n )) {\n if (on) {\n keys.push(key)\n }\n }\n }\n return keys\n}\n\n/**\n * Reports whether a Control session holds one raw Auth0 permission.\n *\n * It is what `ApprovalActorView.has` runs in the browser. An unknown code\n * answers false: a permission that nothing maps is a permission that nobody\n * holds, and the alternative would open a button that the backend refuses.\n */\nexport function sessionHasPermission(\n sessionPermissions: Record<string, boolean>,\n permissionCode: string,\n): boolean {\n return sessionPermissionKeysFor(permissionCode).some(\n (key) => sessionPermissions[key] === true,\n )\n}\n"],
|
|
5
|
+
"mappings": "AAMA,SAAS,2BAA2B;AACpC,SAAS,8BAA8B;AACvC,SAAS,0BAA0B;AACnC,SAAS,+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,IACjB,WAAW,SAAS,OAAO,UAAU,UAAU;AAC7C,aAAO,OAAO,KAAK,uBAAuB,OAAO,OAAO,CAAC;AAAA,IAC3D;AAAA,EACF;AACA,SAAO;AACT;AA6BA,MAAM,uBAAuB,oBAAI,IAA+B;AAEzD,SAAS,yBACd,gBACmB;AACnB,QAAM,SAAS,qBAAqB,IAAI,cAAc;AACtD,MAAI,QAAQ;AACV,WAAO;AAAA,EACT;AACA,QAAM,SAAS,OAAO,OAAO,2BAA2B,cAAc,CAAC;AACvE,uBAAqB,IAAI,gBAAgB,MAAM;AAC/C,SAAO;AACT;AAEA,SAAS,2BAA2B,gBAAkC;AACpE,QAAM,QAA6B;AAAA,IACjC,CAAC,oCAAoC,CAAC,cAAc,CAAC,GAAG,EAAE;AAAA,IAC1D,CAAC,mCAAmC,CAAC,cAAc,CAAC,GAAG,SAAS;AAAA,IAChE;AAAA,MACE,wBAAwB,4BAA4B,CAAC,cAAc,CAAC;AAAA,MACpE;AAAA,IACF;AAAA,EACF;AACA,QAAM,OAAiB,CAAC;AACxB,aAAW,CAAC,MAAM,MAAM,KAAK,OAAO;AAClC,eAAW,CAAC,KAAK,EAAE,KAAK,OAAO;AAAA,MAC7B,uBAAuB,MAAM,MAAM;AAAA,IACrC,GAAG;AACD,UAAI,IAAI;AACN,aAAK,KAAK,GAAG;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AASO,SAAS,qBACd,oBACA,gBACS;AACT,SAAO,yBAAyB,cAAc,EAAE;AAAA,IAC9C,CAAC,QAAQ,mBAAmB,GAAG,MAAM;AAAA,EACvC;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -25,7 +25,6 @@ export declare namespace ConsolePermissions {
|
|
|
25
25
|
const CLUSTER_PLAN_TYPE_DELETE = "cptd";
|
|
26
26
|
const CLUSTER_PLAN_TYPE_FORCE_DELETE = "cptfd";
|
|
27
27
|
const CLUSTER_PLAN_MIGRATE = "ccpm";
|
|
28
|
-
const CLUSTER_PLAN_CAN_DELETE_ALL_CLUSTERS_OF_PLAN = "ccpda";
|
|
29
28
|
const CLUSTER_PLAN_CAN_MODIFY = "ccpmo";
|
|
30
29
|
const M2M_UPDATE_CRD = "cmuc";
|
|
31
30
|
const M2M_SIGNUP = "cms";
|
|
@@ -130,7 +129,6 @@ export declare namespace ConsolePermissions {
|
|
|
130
129
|
forceDelete: boolean;
|
|
131
130
|
};
|
|
132
131
|
migrate: boolean;
|
|
133
|
-
deleteAllClustersOfPlan: boolean;
|
|
134
132
|
modify: boolean;
|
|
135
133
|
};
|
|
136
134
|
features: {
|
|
@@ -29,7 +29,6 @@ var ConsolePermissions;
|
|
|
29
29
|
ConsolePermissions2.CLUSTER_PLAN_TYPE_DELETE = "cptd";
|
|
30
30
|
ConsolePermissions2.CLUSTER_PLAN_TYPE_FORCE_DELETE = "cptfd";
|
|
31
31
|
ConsolePermissions2.CLUSTER_PLAN_MIGRATE = "ccpm";
|
|
32
|
-
ConsolePermissions2.CLUSTER_PLAN_CAN_DELETE_ALL_CLUSTERS_OF_PLAN = "ccpda";
|
|
33
32
|
ConsolePermissions2.CLUSTER_PLAN_CAN_MODIFY = "ccpmo";
|
|
34
33
|
ConsolePermissions2.M2M_UPDATE_CRD = "cmuc";
|
|
35
34
|
ConsolePermissions2.M2M_SIGNUP = "cms";
|
|
@@ -99,7 +98,6 @@ var ConsolePermissions;
|
|
|
99
98
|
forceDelete: false
|
|
100
99
|
},
|
|
101
100
|
migrate: false,
|
|
102
|
-
deleteAllClustersOfPlan: false,
|
|
103
101
|
modify: false
|
|
104
102
|
},
|
|
105
103
|
features: {
|
|
@@ -257,11 +255,6 @@ var ConsolePermissions;
|
|
|
257
255
|
description: "can migrate Clusters from one plan to another",
|
|
258
256
|
initialRoles: ["console:admin"]
|
|
259
257
|
},
|
|
260
|
-
{
|
|
261
|
-
value: ConsolePermissions2.CLUSTER_PLAN_CAN_DELETE_ALL_CLUSTERS_OF_PLAN,
|
|
262
|
-
description: "can delete all clusters of a plan",
|
|
263
|
-
initialRoles: ["console:admin"]
|
|
264
|
-
},
|
|
265
258
|
{
|
|
266
259
|
value: ConsolePermissions2.CLUSTER_CREATE_ON_BEHALF,
|
|
267
260
|
description: "enables accounts to create clusters on signup (not a user permission)",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/permissions/console.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 ConsolePermissions {\n export const MULTICLUSTER_ADMIN = 'cmca'\n\n export const CHANNELS_AND_GENERATIONS_ADMIN_DELETE_ALL_CLUSTERS = 'cmgda'\n export const CHANNELS_AND_GENERATIONS_ADMIN_SEE = 'cmgas'\n export const CHANNELS_AND_GENERATIONS_ADMIN = 'cmga'\n export const CHANNELS_AND_GENERATIONS_ADMIN_PATCH_EXISTING_CHANNEL = 'cmgap'\n export const CHANNELS_AND_GENERATIONS_ADMIN_MIGRATE = 'cmgam'\n export const CHANNELS_AND_GENERATIONS_MIGRATE = 'cmgm'\n export const ALL_CHANNELS_AND_GENERATIONS: string[] = [\n CHANNELS_AND_GENERATIONS_ADMIN_SEE,\n CHANNELS_AND_GENERATIONS_ADMIN,\n CHANNELS_AND_GENERATIONS_ADMIN_MIGRATE,\n ]\n export const CLUSTERS_READALLCLUSTERINFO = 'ccrai'\n export const CLUSTERS_DELETE_CLUSTER = 'ccda'\n export const CLUSTERS_CAN_MOVE_TO_OTHER_ORG = 'ccmoo'\n export const CLUSTERS_CAN_SEND_TO_SLEEP = 'ccsts'\n export const CLUSTERS_CAN_CREATE_INTERNAL_BACKUP = 'cccib'\n export const CLUSTERS_CAN_UPDATE_CLUSTERPLANTYPE = 'ccucp'\n export const CLUSTERS_CAN_UPDATE_GENERATION = 'ccug'\n export const CLUSTERS_CAN_UPDATE_GENERATION_YOLO = 'ccugy'\n export const CLUSTERS_CAN_UPDATE_OPTIONAL_TELEMETRY = 'ccuot'\n\n export const CLUSTER_PLAN_SEE_ALL = 'ccpa'\n export const CLUSTER_PLAN_CREATE = 'ccpc'\n export const CLUSTER_PLAN_DELETE = 'ccpd'\n\n export const CLUSTER_PLAN_TYPE_CREATE = 'cptc'\n export const CLUSTER_PLAN_TYPE_MODIFY = 'cptm'\n export const CLUSTER_PLAN_TYPE_DELETE = 'cptd'\n export const CLUSTER_PLAN_TYPE_FORCE_DELETE = 'cptfd'\n\n export const CLUSTER_PLAN_MIGRATE = 'ccpm'\n export const CLUSTER_PLAN_CAN_DELETE_ALL_CLUSTERS_OF_PLAN = 'ccpda'\n export const CLUSTER_PLAN_CAN_MODIFY = 'ccpmo'\n\n export const M2M_UPDATE_CRD = 'cmuc'\n export const M2M_SIGNUP = 'cms'\n export const M2M_TRIGGER_ALERT = 'cmta'\n export const M2M_DELETE_ORG_CLUSTERS = 'cmdoc'\n export const M2M_UPDATE_ORG_CLUSTERS = 'cmuoc'\n export const M2M_ADD_CLUSTER_USAGE_METRICS = 'cmacm'\n export const M2M_SEND_SSE_EVENT = 'cmsse'\n export const M2M_EXTERNAL_INTERNAL_CLIENT = 'cmeic'\n export const M2M_FETCH_MIGRATION_DATA = 'cmfmd'\n export const M2M_MANAGE_GENERATION_UPGRADE_PATH = 'cmmgup'\n\n /**\n * The one m2m permission of control-backend. It opens every route of\n * `api/admin/approvals` in accounts-backend and in console-backend, which\n * control-backend calls when a four-eyes request has the approvals that it\n * needs.\n *\n * One permission for all of them, by a decision of the team: one grant at\n * Auth0 for the whole approval surface of control-backend. A route that\n * reads it runs an action that people already approved, so the permission\n * goes to the m2m application of control-backend and to no other client.\n *\n * It is NOT the permission that a Camundi needs. A person needs the\n * permission of the action, such as `CLUSTERS_CAN_MOVE_TO_OTHER_ORG`, and\n * control-backend asks for that one before it accepts an approval.\n */\n export const M2M_CONTROL_APPROVALS = 'ctam'\n /**\n * Lets the delete cron of console-backend open a `cluster-ttl-deletion`\n * request in control-backend. That request needs no approval, so the\n * permission goes to the m2m application of console-backend and to no other\n * client.\n */\n export const M2M_CLUSTER_TTL_DELETION = 'cmctd'\n /**\n * Stands in for the permission of EVERY approval use case of\n * control-backend, for a person who tests the approval flow.\n *\n * A holder can open, approve, reject and run each use case, including one\n * that a later change adds, with no grant of its own permission. The four-eyes\n * rule still holds: nobody approves their own request.\n *\n * It is a permission of a PERSON. No machine route reads it, because a token\n * that a Camundi can get must not run an action with no approval. It goes to\n * no role at Auth0: a person with access to the tenant grants it by hand, and\n * only on a stage where the approval flow is under test.\n */\n export const APPROVALS_ALL_USE_CASES = 'caauc'\n export const CLUSTER_CREATE_ON_BEHALF = 'cccob'\n export const FEATURE_NEW_HOME = 'cfnh'\n export const FEATURE_TEMPLATE_PICKER = 'cftp'\n export const USER_SETTINGS = 'cus'\n export const CLUSTERS_CAN_OVERRIDE_ENV_VARS = 'ccoev'\n export const CLUSTERS_CAN_CREATE_MODIFICATION_CONFIG = 'ccccmc'\n\n export const DEBUG = 'cdbg'\n export const GOD_TRIGGER_CRONS = 'gtc'\n\n export const RELEASE_TRAIN_PUBLISH = 'crtp'\n\n export const APICLIENT_READ = 'capr'\n export const APICLIENT_DELETE = 'capd'\n\n export interface Features {\n apiClient: {\n read: boolean\n delete: boolean\n }\n multiCluster: {\n admin: boolean\n }\n multiGen: {\n admin: {\n see: boolean\n modify: boolean\n patchExistingChannel: boolean\n migrate: boolean\n deleteAllClustersOfGeneration: boolean\n }\n releaseTrain: {\n publish: boolean\n }\n }\n clusters: {\n canReadAllClusterInfo: boolean\n canDeleteAllClusters: boolean\n canMoveToOtherOrg: boolean\n createOnBehalf: boolean\n canSendToSleep: boolean\n canCreateInternalBackup: boolean\n canUpdateClusterPlanType: boolean\n canOverrideEnvVars: boolean\n canCreateModificationConfig: boolean\n canUpgradeGeneration: boolean\n canUpgradeGenerationYolo: boolean\n canUpdateOptionalTelemetry: boolean\n }\n clusterPlan: {\n seeAll: boolean\n create: boolean\n delete: boolean\n type: {\n create: boolean\n modify: boolean\n delete: boolean\n forceDelete: boolean\n }\n migrate: boolean\n deleteAllClustersOfPlan: boolean\n modify: boolean\n }\n features: {\n newHome: boolean\n templatePicker: boolean\n userSettings: boolean\n debug: boolean\n }\n m2m: {\n updateCrd: boolean\n signup: boolean\n triggerAlert: boolean\n deleteOrgClusters: boolean\n updateOrgClusters: boolean\n addUsageMetrics: boolean\n sendSseEvent: boolean\n external: {\n internalClient: boolean\n }\n fetchMigrationData: boolean\n manageGenerationUpgradePath: boolean\n /** Every route of `api/admin/approvals`. See `M2M_CONTROL_APPROVALS`. */\n approvals: boolean\n }\n }\n\n export function createEmptyFeatures(): Features {\n return {\n apiClient: {\n read: false,\n delete: false,\n },\n multiCluster: { admin: false },\n multiGen: {\n admin: {\n migrate: false,\n modify: false,\n patchExistingChannel: false,\n see: false,\n deleteAllClustersOfGeneration: false,\n },\n releaseTrain: {\n publish: false,\n },\n },\n clusters: {\n canReadAllClusterInfo: false,\n canDeleteAllClusters: false,\n canMoveToOtherOrg: false,\n createOnBehalf: false,\n canSendToSleep: false,\n canCreateInternalBackup: false,\n canUpdateClusterPlanType: false,\n canOverrideEnvVars: false,\n canCreateModificationConfig: false,\n canUpgradeGeneration: false,\n canUpgradeGenerationYolo: false,\n canUpdateOptionalTelemetry: false,\n },\n clusterPlan: {\n seeAll: false,\n create: false,\n delete: false,\n type: {\n create: false,\n modify: false,\n delete: false,\n forceDelete: false,\n },\n migrate: false,\n deleteAllClustersOfPlan: false,\n modify: false,\n },\n features: {\n newHome: false,\n templatePicker: false,\n userSettings: false,\n debug: false,\n },\n m2m: {\n updateCrd: false,\n signup: false,\n triggerAlert: false,\n deleteOrgClusters: false,\n updateOrgClusters: false,\n addUsageMetrics: false,\n sendSseEvent: false,\n external: {\n internalClient: false,\n },\n fetchMigrationData: false,\n manageGenerationUpgradePath: false,\n approvals: false,\n },\n }\n }\n\n export const PermissionsAtAuth0: Array<{\n value: string\n description: string\n initialRoles: Roles[]\n }> = [\n {\n value: MULTICLUSTER_ADMIN,\n description: 'can create and delete k8s clusters',\n initialRoles: ['console:admin'],\n },\n {\n value: CHANNELS_AND_GENERATIONS_ADMIN_SEE,\n description: 'can go to the admin section for MultiGen, but no touch!',\n initialRoles: [\n 'console:admin',\n 'console:admin:readonly',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:clusterUpdates',\n 'console:C8ReleaseManager',\n 'console:C8UpdateEnforcer',\n ],\n },\n {\n value: CHANNELS_AND_GENERATIONS_ADMIN,\n description: 'can create channels, generations and combine them',\n initialRoles: ['console:admin', 'console:C8ReleaseManager'],\n },\n {\n value: CHANNELS_AND_GENERATIONS_ADMIN_PATCH_EXISTING_CHANNEL,\n description: 'can modify existing channels and combine them',\n initialRoles: [\n 'console:admin',\n 'accounts:clusterUpdates',\n 'console:C8ReleaseManager',\n ],\n },\n {\n value: CHANNELS_AND_GENERATIONS_ADMIN_MIGRATE,\n description:\n 'can migrate clusters of generations to supported other generations',\n initialRoles: ['console:admin', 'console:C8UpdateEnforcer'],\n },\n {\n value: CHANNELS_AND_GENERATIONS_ADMIN_DELETE_ALL_CLUSTERS,\n description: 'can delete all clusters of a generation',\n initialRoles: ['console:admin'],\n },\n {\n value: CHANNELS_AND_GENERATIONS_MIGRATE,\n description:\n 'can migrate owned clusters of generations to supported other generations',\n initialRoles: [],\n },\n {\n value: CLUSTERS_READALLCLUSTERINFO,\n description: 'can read clusterInfo for all clusters',\n initialRoles: [\n 'accounts:read',\n 'accounts:onboard',\n 'accounts:orgCreator',\n 'accounts:admin',\n 'accounts:editSalesPlans',\n 'console:admin:readonly',\n 'support:agent',\n 'supersupport:agent',\n 'console:admin',\n 'accounts:trialExtender',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: CLUSTERS_DELETE_CLUSTER,\n description: 'can delete clusters in all orgs',\n initialRoles: ['accounts:admin'],\n },\n {\n value: CLUSTERS_CAN_MOVE_TO_OTHER_ORG,\n description: 'can move a cluster to another org the user is part of',\n // CSMs, TAMs and consultants move a cluster to another org for a\n // customer, thus the capability goes to `console:clusterMover`. The\n // population that holds the role lives in the Camundi permission\n // rules, not in the name of the role.\n initialRoles: ['console:admin', 'console:clusterMover'],\n },\n {\n value: CLUSTER_PLAN_SEE_ALL,\n description: 'can see all ClusterPlans',\n initialRoles: [\n 'console:admin',\n 'accounts:read',\n 'accounts:orgCreator',\n 'accounts:admin',\n 'console:admin:readonly',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:onboard',\n 'accounts:editSalesPlans',\n 'accounts:trialExtender',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: CLUSTER_PLAN_CREATE,\n description: 'can create ClusterPlans',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_DELETE,\n description: 'can delete ClusterPlans',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_TYPE_CREATE,\n description: 'can create ClusterPlanTypes',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_TYPE_DELETE,\n description: 'can delete ClusterPlanTypes',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_TYPE_FORCE_DELETE,\n description: 'can delete ClusterPlanTypes',\n initialRoles: ['console:god'],\n },\n {\n value: CLUSTER_PLAN_TYPE_MODIFY,\n description: 'can modify ClusterPlanTypes',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_MIGRATE,\n description: 'can migrate Clusters from one plan to another',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_CAN_DELETE_ALL_CLUSTERS_OF_PLAN,\n description: 'can delete all clusters of a plan',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_CREATE_ON_BEHALF,\n description:\n 'enables accounts to create clusters on signup (not a user permission)',\n initialRoles: [],\n },\n {\n value: M2M_SIGNUP,\n description: 'allows to signal to Console new user signups',\n initialRoles: [],\n },\n { value: M2M_UPDATE_CRD, description: 'may update crds', initialRoles: [] },\n {\n value: M2M_TRIGGER_ALERT,\n description: 'allows Infra and Operate to trigger alerts',\n initialRoles: [],\n },\n {\n value: M2M_DELETE_ORG_CLUSTERS,\n description:\n 'allows trigger console to delete all clusters of an Organization',\n initialRoles: [],\n },\n {\n value: M2M_UPDATE_ORG_CLUSTERS,\n description: 'allows to update clusters of an Organization',\n initialRoles: [],\n },\n {\n value: M2M_ADD_CLUSTER_USAGE_METRICS,\n description: 'allows to trigger update of value metrics',\n initialRoles: [],\n },\n {\n value: M2M_SEND_SSE_EVENT,\n description: 'allows to trigger SSE events',\n initialRoles: [],\n },\n {\n value: M2M_EXTERNAL_INTERNAL_CLIENT,\n description: 'allows to fetch internal clients',\n initialRoles: [],\n },\n // `initialRoles` is empty, and it must stay empty. A machine client holds\n // a grant on its Auth0 application, and never a role. An entry here with a\n // role would give the permission to every person in that role.\n {\n value: M2M_CONTROL_APPROVALS,\n description:\n 'm2m can run the approved actions of control-backend in accounts and console',\n initialRoles: [],\n },\n // No role: a machine holds a grant on its application. See the note above.\n {\n value: M2M_CLUSTER_TTL_DELETION,\n description:\n 'm2m can open the request of control-backend that deletes a cluster whose TTL ran out',\n initialRoles: [],\n },\n // No role, on purpose. This permission opens every approval use case, so\n // a person with access to the tenant grants it by hand, for testing.\n {\n value: APPROVALS_ALL_USE_CASES,\n description:\n 'can open, approve, reject and run every approval use case of Control (for testing)',\n initialRoles: [],\n },\n {\n value: M2M_FETCH_MIGRATION_DATA,\n description: 'allows to fetch migration data',\n initialRoles: [],\n },\n {\n value: M2M_MANAGE_GENERATION_UPGRADE_PATH,\n description:\n 'allows to manage upgrade paths for generations via external API',\n initialRoles: [],\n },\n {\n value: FEATURE_NEW_HOME,\n description: 'allows users to see new home',\n initialRoles: ['console:admin'],\n },\n {\n value: USER_SETTINGS,\n description: 'allows users to see user settings',\n initialRoles: ['console:admin', 'betatester:true'],\n },\n {\n value: FEATURE_TEMPLATE_PICKER,\n description: 'allows users to see template picker',\n initialRoles: ['console:admin', 'betatester:true'],\n },\n {\n value: CLUSTERS_CAN_SEND_TO_SLEEP,\n description: 'may send a cluster to sleep and wake up',\n initialRoles: [\n 'console:admin',\n 'accounts:admin',\n 'console:operationsEngineer',\n ],\n },\n {\n value: CLUSTERS_CAN_CREATE_INTERNAL_BACKUP,\n description: 'may create and delete internal (incident) backups',\n initialRoles: ['console:admin', 'console:operationsEngineer'],\n },\n {\n value: DEBUG,\n description: 'can see additional debugging tools',\n initialRoles: ['console:admin:readonly', 'console:admin'],\n },\n {\n value: CLUSTERS_CAN_OVERRIDE_ENV_VARS,\n description:\n 'can set Env Vars on cluster level that override all ClusterPlan Env Vars',\n initialRoles: ['console:admin', 'console:operationsEngineer'],\n },\n {\n value: CLUSTERS_CAN_CREATE_MODIFICATION_CONFIG,\n description: 'can create cluster modification configs',\n initialRoles: ['console:admin', 'console:operationsEngineer'],\n },\n {\n value: CLUSTERS_CAN_UPDATE_CLUSTERPLANTYPE,\n description: 'can update clusterplantype of a running cluster',\n initialRoles: [\n 'console:admin',\n 'accounts:onboard',\n 'console:operationsEngineer',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: CLUSTERS_CAN_UPDATE_GENERATION,\n description: 'can update generation of a running cluster',\n initialRoles: [\n 'console:admin',\n 'accounts:clusterUpdates',\n 'console:C8ReleaseManager',\n ],\n },\n {\n value: CLUSTERS_CAN_UPDATE_GENERATION_YOLO,\n description:\n 'can update generation of a running cluster even if the generation is not reachable',\n initialRoles: ['console:god'],\n },\n {\n value: CLUSTERS_CAN_UPDATE_OPTIONAL_TELEMETRY,\n description:\n 'can enable or disable optional product telemetry for a cluster',\n // A customer asks their CSM or TAM to switch the category off, thus the\n // capability goes to `console:optionalTelemetryManager`. The population\n // that holds the role lives in the Camundi permission rules, not in the\n // name of the role. The console team keeps the permission, to help when\n // a change does not take effect.\n initialRoles: ['console:admin', 'console:optionalTelemetryManager'],\n },\n {\n value: CLUSTER_PLAN_CAN_MODIFY,\n description: 'can trigger modifications of a clusterplan',\n initialRoles: ['console:admin', 'console:clusterPlanManager'],\n },\n {\n value: RELEASE_TRAIN_PUBLISH,\n description: 'can publish new generations via the release train endpoint',\n initialRoles: ['console:admin', 'console:C8ReleaseManager'],\n },\n {\n value: APICLIENT_READ,\n description: 'can read API Clients Names of Organizations',\n initialRoles: ['accounts:read', 'accounts:orgCreator'],\n },\n {\n value: APICLIENT_DELETE,\n description: 'can read API Clients Names of Organizations',\n initialRoles: ['accounts:god'],\n },\n ]\n}\n"],
|
|
5
|
-
"mappings": "AAQO,IAAU;AAAA,CAAV,CAAUA,wBAAV;AACE,EAAMA,oBAAA,qBAAqB;AAE3B,EAAMA,oBAAA,qDAAqD;AAC3D,EAAMA,oBAAA,qCAAqC;AAC3C,EAAMA,oBAAA,iCAAiC;AACvC,EAAMA,oBAAA,wDAAwD;AAC9D,EAAMA,oBAAA,yCAAyC;AAC/C,EAAMA,oBAAA,mCAAmC;AACzC,EAAMA,oBAAA,+BAAyC;AAAA,IACpDA,oBAAA;AAAA,IACAA,oBAAA;AAAA,IACAA,oBAAA;AAAA,EACF;AACO,EAAMA,oBAAA,8BAA8B;AACpC,EAAMA,oBAAA,0BAA0B;AAChC,EAAMA,oBAAA,iCAAiC;AACvC,EAAMA,oBAAA,6BAA6B;AACnC,EAAMA,oBAAA,sCAAsC;AAC5C,EAAMA,oBAAA,sCAAsC;AAC5C,EAAMA,oBAAA,iCAAiC;AACvC,EAAMA,oBAAA,sCAAsC;AAC5C,EAAMA,oBAAA,yCAAyC;AAE/C,EAAMA,oBAAA,uBAAuB;AAC7B,EAAMA,oBAAA,sBAAsB;AAC5B,EAAMA,oBAAA,sBAAsB;AAE5B,EAAMA,oBAAA,2BAA2B;AACjC,EAAMA,oBAAA,2BAA2B;AACjC,EAAMA,oBAAA,2BAA2B;AACjC,EAAMA,oBAAA,iCAAiC;AAEvC,EAAMA,oBAAA,uBAAuB;AAC7B,EAAMA,oBAAA
|
|
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 ConsolePermissions {\n export const MULTICLUSTER_ADMIN = 'cmca'\n\n export const CHANNELS_AND_GENERATIONS_ADMIN_DELETE_ALL_CLUSTERS = 'cmgda'\n export const CHANNELS_AND_GENERATIONS_ADMIN_SEE = 'cmgas'\n export const CHANNELS_AND_GENERATIONS_ADMIN = 'cmga'\n export const CHANNELS_AND_GENERATIONS_ADMIN_PATCH_EXISTING_CHANNEL = 'cmgap'\n export const CHANNELS_AND_GENERATIONS_ADMIN_MIGRATE = 'cmgam'\n export const CHANNELS_AND_GENERATIONS_MIGRATE = 'cmgm'\n export const ALL_CHANNELS_AND_GENERATIONS: string[] = [\n CHANNELS_AND_GENERATIONS_ADMIN_SEE,\n CHANNELS_AND_GENERATIONS_ADMIN,\n CHANNELS_AND_GENERATIONS_ADMIN_MIGRATE,\n ]\n export const CLUSTERS_READALLCLUSTERINFO = 'ccrai'\n export const CLUSTERS_DELETE_CLUSTER = 'ccda'\n export const CLUSTERS_CAN_MOVE_TO_OTHER_ORG = 'ccmoo'\n export const CLUSTERS_CAN_SEND_TO_SLEEP = 'ccsts'\n export const CLUSTERS_CAN_CREATE_INTERNAL_BACKUP = 'cccib'\n export const CLUSTERS_CAN_UPDATE_CLUSTERPLANTYPE = 'ccucp'\n export const CLUSTERS_CAN_UPDATE_GENERATION = 'ccug'\n export const CLUSTERS_CAN_UPDATE_GENERATION_YOLO = 'ccugy'\n export const CLUSTERS_CAN_UPDATE_OPTIONAL_TELEMETRY = 'ccuot'\n\n export const CLUSTER_PLAN_SEE_ALL = 'ccpa'\n export const CLUSTER_PLAN_CREATE = 'ccpc'\n export const CLUSTER_PLAN_DELETE = 'ccpd'\n\n export const CLUSTER_PLAN_TYPE_CREATE = 'cptc'\n export const CLUSTER_PLAN_TYPE_MODIFY = 'cptm'\n export const CLUSTER_PLAN_TYPE_DELETE = 'cptd'\n export const CLUSTER_PLAN_TYPE_FORCE_DELETE = 'cptfd'\n\n export const CLUSTER_PLAN_MIGRATE = 'ccpm'\n export const CLUSTER_PLAN_CAN_MODIFY = 'ccpmo'\n\n export const M2M_UPDATE_CRD = 'cmuc'\n export const M2M_SIGNUP = 'cms'\n export const M2M_TRIGGER_ALERT = 'cmta'\n export const M2M_DELETE_ORG_CLUSTERS = 'cmdoc'\n export const M2M_UPDATE_ORG_CLUSTERS = 'cmuoc'\n export const M2M_ADD_CLUSTER_USAGE_METRICS = 'cmacm'\n export const M2M_SEND_SSE_EVENT = 'cmsse'\n export const M2M_EXTERNAL_INTERNAL_CLIENT = 'cmeic'\n export const M2M_FETCH_MIGRATION_DATA = 'cmfmd'\n export const M2M_MANAGE_GENERATION_UPGRADE_PATH = 'cmmgup'\n\n /**\n * The one m2m permission of control-backend. It opens every route of\n * `api/admin/approvals` in accounts-backend and in console-backend, which\n * control-backend calls when a four-eyes request has the approvals that it\n * needs.\n *\n * One permission for all of them, by a decision of the team: one grant at\n * Auth0 for the whole approval surface of control-backend. A route that\n * reads it runs an action that people already approved, so the permission\n * goes to the m2m application of control-backend and to no other client.\n *\n * It is NOT the permission that a Camundi needs. A person needs the\n * permission of the action, such as `CLUSTERS_CAN_MOVE_TO_OTHER_ORG`, and\n * control-backend asks for that one before it accepts an approval.\n */\n export const M2M_CONTROL_APPROVALS = 'ctam'\n /**\n * Lets the delete cron of console-backend open a `cluster-ttl-deletion`\n * request in control-backend. That request needs no approval, so the\n * permission goes to the m2m application of console-backend and to no other\n * client.\n */\n export const M2M_CLUSTER_TTL_DELETION = 'cmctd'\n /**\n * Stands in for the permission of EVERY approval use case of\n * control-backend, for a person who tests the approval flow.\n *\n * A holder can open, approve, reject and run each use case, including one\n * that a later change adds, with no grant of its own permission. The four-eyes\n * rule still holds: nobody approves their own request.\n *\n * It is a permission of a PERSON. No machine route reads it, because a token\n * that a Camundi can get must not run an action with no approval. It goes to\n * no role at Auth0: a person with access to the tenant grants it by hand, and\n * only on a stage where the approval flow is under test.\n */\n export const APPROVALS_ALL_USE_CASES = 'caauc'\n export const CLUSTER_CREATE_ON_BEHALF = 'cccob'\n export const FEATURE_NEW_HOME = 'cfnh'\n export const FEATURE_TEMPLATE_PICKER = 'cftp'\n export const USER_SETTINGS = 'cus'\n export const CLUSTERS_CAN_OVERRIDE_ENV_VARS = 'ccoev'\n export const CLUSTERS_CAN_CREATE_MODIFICATION_CONFIG = 'ccccmc'\n\n export const DEBUG = 'cdbg'\n export const GOD_TRIGGER_CRONS = 'gtc'\n\n export const RELEASE_TRAIN_PUBLISH = 'crtp'\n\n export const APICLIENT_READ = 'capr'\n export const APICLIENT_DELETE = 'capd'\n\n export interface Features {\n apiClient: {\n read: boolean\n delete: boolean\n }\n multiCluster: {\n admin: boolean\n }\n multiGen: {\n admin: {\n see: boolean\n modify: boolean\n patchExistingChannel: boolean\n migrate: boolean\n deleteAllClustersOfGeneration: boolean\n }\n releaseTrain: {\n publish: boolean\n }\n }\n clusters: {\n canReadAllClusterInfo: boolean\n canDeleteAllClusters: boolean\n canMoveToOtherOrg: boolean\n createOnBehalf: boolean\n canSendToSleep: boolean\n canCreateInternalBackup: boolean\n canUpdateClusterPlanType: boolean\n canOverrideEnvVars: boolean\n canCreateModificationConfig: boolean\n canUpgradeGeneration: boolean\n canUpgradeGenerationYolo: boolean\n canUpdateOptionalTelemetry: boolean\n }\n clusterPlan: {\n seeAll: boolean\n create: boolean\n delete: boolean\n type: {\n create: boolean\n modify: boolean\n delete: boolean\n forceDelete: boolean\n }\n migrate: boolean\n modify: boolean\n }\n features: {\n newHome: boolean\n templatePicker: boolean\n userSettings: boolean\n debug: boolean\n }\n m2m: {\n updateCrd: boolean\n signup: boolean\n triggerAlert: boolean\n deleteOrgClusters: boolean\n updateOrgClusters: boolean\n addUsageMetrics: boolean\n sendSseEvent: boolean\n external: {\n internalClient: boolean\n }\n fetchMigrationData: boolean\n manageGenerationUpgradePath: boolean\n /** Every route of `api/admin/approvals`. See `M2M_CONTROL_APPROVALS`. */\n approvals: boolean\n }\n }\n\n export function createEmptyFeatures(): Features {\n return {\n apiClient: {\n read: false,\n delete: false,\n },\n multiCluster: { admin: false },\n multiGen: {\n admin: {\n migrate: false,\n modify: false,\n patchExistingChannel: false,\n see: false,\n deleteAllClustersOfGeneration: false,\n },\n releaseTrain: {\n publish: false,\n },\n },\n clusters: {\n canReadAllClusterInfo: false,\n canDeleteAllClusters: false,\n canMoveToOtherOrg: false,\n createOnBehalf: false,\n canSendToSleep: false,\n canCreateInternalBackup: false,\n canUpdateClusterPlanType: false,\n canOverrideEnvVars: false,\n canCreateModificationConfig: false,\n canUpgradeGeneration: false,\n canUpgradeGenerationYolo: false,\n canUpdateOptionalTelemetry: false,\n },\n clusterPlan: {\n seeAll: false,\n create: false,\n delete: false,\n type: {\n create: false,\n modify: false,\n delete: false,\n forceDelete: false,\n },\n migrate: false,\n modify: false,\n },\n features: {\n newHome: false,\n templatePicker: false,\n userSettings: false,\n debug: false,\n },\n m2m: {\n updateCrd: false,\n signup: false,\n triggerAlert: false,\n deleteOrgClusters: false,\n updateOrgClusters: false,\n addUsageMetrics: false,\n sendSseEvent: false,\n external: {\n internalClient: false,\n },\n fetchMigrationData: false,\n manageGenerationUpgradePath: false,\n approvals: false,\n },\n }\n }\n\n export const PermissionsAtAuth0: Array<{\n value: string\n description: string\n initialRoles: Roles[]\n }> = [\n {\n value: MULTICLUSTER_ADMIN,\n description: 'can create and delete k8s clusters',\n initialRoles: ['console:admin'],\n },\n {\n value: CHANNELS_AND_GENERATIONS_ADMIN_SEE,\n description: 'can go to the admin section for MultiGen, but no touch!',\n initialRoles: [\n 'console:admin',\n 'console:admin:readonly',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:clusterUpdates',\n 'console:C8ReleaseManager',\n 'console:C8UpdateEnforcer',\n ],\n },\n {\n value: CHANNELS_AND_GENERATIONS_ADMIN,\n description: 'can create channels, generations and combine them',\n initialRoles: ['console:admin', 'console:C8ReleaseManager'],\n },\n {\n value: CHANNELS_AND_GENERATIONS_ADMIN_PATCH_EXISTING_CHANNEL,\n description: 'can modify existing channels and combine them',\n initialRoles: [\n 'console:admin',\n 'accounts:clusterUpdates',\n 'console:C8ReleaseManager',\n ],\n },\n {\n value: CHANNELS_AND_GENERATIONS_ADMIN_MIGRATE,\n description:\n 'can migrate clusters of generations to supported other generations',\n initialRoles: ['console:admin', 'console:C8UpdateEnforcer'],\n },\n {\n value: CHANNELS_AND_GENERATIONS_ADMIN_DELETE_ALL_CLUSTERS,\n description: 'can delete all clusters of a generation',\n initialRoles: ['console:admin'],\n },\n {\n value: CHANNELS_AND_GENERATIONS_MIGRATE,\n description:\n 'can migrate owned clusters of generations to supported other generations',\n initialRoles: [],\n },\n {\n value: CLUSTERS_READALLCLUSTERINFO,\n description: 'can read clusterInfo for all clusters',\n initialRoles: [\n 'accounts:read',\n 'accounts:onboard',\n 'accounts:orgCreator',\n 'accounts:admin',\n 'accounts:editSalesPlans',\n 'console:admin:readonly',\n 'support:agent',\n 'supersupport:agent',\n 'console:admin',\n 'accounts:trialExtender',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: CLUSTERS_DELETE_CLUSTER,\n description: 'can delete clusters in all orgs',\n initialRoles: ['accounts:admin'],\n },\n {\n value: CLUSTERS_CAN_MOVE_TO_OTHER_ORG,\n description: 'can move a cluster to another org the user is part of',\n // CSMs, TAMs and consultants move a cluster to another org for a\n // customer, thus the capability goes to `console:clusterMover`. The\n // population that holds the role lives in the Camundi permission\n // rules, not in the name of the role.\n initialRoles: ['console:admin', 'console:clusterMover'],\n },\n {\n value: CLUSTER_PLAN_SEE_ALL,\n description: 'can see all ClusterPlans',\n initialRoles: [\n 'console:admin',\n 'accounts:read',\n 'accounts:orgCreator',\n 'accounts:admin',\n 'console:admin:readonly',\n 'support:agent',\n 'supersupport:agent',\n 'accounts:onboard',\n 'accounts:editSalesPlans',\n 'accounts:trialExtender',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: CLUSTER_PLAN_CREATE,\n description: 'can create ClusterPlans',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_DELETE,\n description: 'can delete ClusterPlans',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_TYPE_CREATE,\n description: 'can create ClusterPlanTypes',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_TYPE_DELETE,\n description: 'can delete ClusterPlanTypes',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_TYPE_FORCE_DELETE,\n description: 'can delete ClusterPlanTypes',\n initialRoles: ['console:god'],\n },\n {\n value: CLUSTER_PLAN_TYPE_MODIFY,\n description: 'can modify ClusterPlanTypes',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_PLAN_MIGRATE,\n description: 'can migrate Clusters from one plan to another',\n initialRoles: ['console:admin'],\n },\n {\n value: CLUSTER_CREATE_ON_BEHALF,\n description:\n 'enables accounts to create clusters on signup (not a user permission)',\n initialRoles: [],\n },\n {\n value: M2M_SIGNUP,\n description: 'allows to signal to Console new user signups',\n initialRoles: [],\n },\n { value: M2M_UPDATE_CRD, description: 'may update crds', initialRoles: [] },\n {\n value: M2M_TRIGGER_ALERT,\n description: 'allows Infra and Operate to trigger alerts',\n initialRoles: [],\n },\n {\n value: M2M_DELETE_ORG_CLUSTERS,\n description:\n 'allows trigger console to delete all clusters of an Organization',\n initialRoles: [],\n },\n {\n value: M2M_UPDATE_ORG_CLUSTERS,\n description: 'allows to update clusters of an Organization',\n initialRoles: [],\n },\n {\n value: M2M_ADD_CLUSTER_USAGE_METRICS,\n description: 'allows to trigger update of value metrics',\n initialRoles: [],\n },\n {\n value: M2M_SEND_SSE_EVENT,\n description: 'allows to trigger SSE events',\n initialRoles: [],\n },\n {\n value: M2M_EXTERNAL_INTERNAL_CLIENT,\n description: 'allows to fetch internal clients',\n initialRoles: [],\n },\n // `initialRoles` is empty, and it must stay empty. A machine client holds\n // a grant on its Auth0 application, and never a role. An entry here with a\n // role would give the permission to every person in that role.\n {\n value: M2M_CONTROL_APPROVALS,\n description:\n 'm2m can run the approved actions of control-backend in accounts and console',\n initialRoles: [],\n },\n // No role: a machine holds a grant on its application. See the note above.\n {\n value: M2M_CLUSTER_TTL_DELETION,\n description:\n 'm2m can open the request of control-backend that deletes a cluster whose TTL ran out',\n initialRoles: [],\n },\n // No role, on purpose. This permission opens every approval use case, so\n // a person with access to the tenant grants it by hand, for testing.\n {\n value: APPROVALS_ALL_USE_CASES,\n description:\n 'can open, approve, reject and run every approval use case of Control (for testing)',\n initialRoles: [],\n },\n {\n value: M2M_FETCH_MIGRATION_DATA,\n description: 'allows to fetch migration data',\n initialRoles: [],\n },\n {\n value: M2M_MANAGE_GENERATION_UPGRADE_PATH,\n description:\n 'allows to manage upgrade paths for generations via external API',\n initialRoles: [],\n },\n {\n value: FEATURE_NEW_HOME,\n description: 'allows users to see new home',\n initialRoles: ['console:admin'],\n },\n {\n value: USER_SETTINGS,\n description: 'allows users to see user settings',\n initialRoles: ['console:admin', 'betatester:true'],\n },\n {\n value: FEATURE_TEMPLATE_PICKER,\n description: 'allows users to see template picker',\n initialRoles: ['console:admin', 'betatester:true'],\n },\n {\n value: CLUSTERS_CAN_SEND_TO_SLEEP,\n description: 'may send a cluster to sleep and wake up',\n initialRoles: [\n 'console:admin',\n 'accounts:admin',\n 'console:operationsEngineer',\n ],\n },\n {\n value: CLUSTERS_CAN_CREATE_INTERNAL_BACKUP,\n description: 'may create and delete internal (incident) backups',\n initialRoles: ['console:admin', 'console:operationsEngineer'],\n },\n {\n value: DEBUG,\n description: 'can see additional debugging tools',\n initialRoles: ['console:admin:readonly', 'console:admin'],\n },\n {\n value: CLUSTERS_CAN_OVERRIDE_ENV_VARS,\n description:\n 'can set Env Vars on cluster level that override all ClusterPlan Env Vars',\n initialRoles: ['console:admin', 'console:operationsEngineer'],\n },\n {\n value: CLUSTERS_CAN_CREATE_MODIFICATION_CONFIG,\n description: 'can create cluster modification configs',\n initialRoles: ['console:admin', 'console:operationsEngineer'],\n },\n {\n value: CLUSTERS_CAN_UPDATE_CLUSTERPLANTYPE,\n description: 'can update clusterplantype of a running cluster',\n initialRoles: [\n 'console:admin',\n 'accounts:onboard',\n 'console:operationsEngineer',\n 'accounts:enterpriseAdmin',\n ],\n },\n {\n value: CLUSTERS_CAN_UPDATE_GENERATION,\n description: 'can update generation of a running cluster',\n initialRoles: [\n 'console:admin',\n 'accounts:clusterUpdates',\n 'console:C8ReleaseManager',\n ],\n },\n {\n value: CLUSTERS_CAN_UPDATE_GENERATION_YOLO,\n description:\n 'can update generation of a running cluster even if the generation is not reachable',\n initialRoles: ['console:god'],\n },\n {\n value: CLUSTERS_CAN_UPDATE_OPTIONAL_TELEMETRY,\n description:\n 'can enable or disable optional product telemetry for a cluster',\n // A customer asks their CSM or TAM to switch the category off, thus the\n // capability goes to `console:optionalTelemetryManager`. The population\n // that holds the role lives in the Camundi permission rules, not in the\n // name of the role. The console team keeps the permission, to help when\n // a change does not take effect.\n initialRoles: ['console:admin', 'console:optionalTelemetryManager'],\n },\n {\n value: CLUSTER_PLAN_CAN_MODIFY,\n description: 'can trigger modifications of a clusterplan',\n initialRoles: ['console:admin', 'console:clusterPlanManager'],\n },\n {\n value: RELEASE_TRAIN_PUBLISH,\n description: 'can publish new generations via the release train endpoint',\n initialRoles: ['console:admin', 'console:C8ReleaseManager'],\n },\n {\n value: APICLIENT_READ,\n description: 'can read API Clients Names of Organizations',\n initialRoles: ['accounts:read', 'accounts:orgCreator'],\n },\n {\n value: APICLIENT_DELETE,\n description: 'can read API Clients Names of Organizations',\n initialRoles: ['accounts:god'],\n },\n ]\n}\n"],
|
|
5
|
+
"mappings": "AAQO,IAAU;AAAA,CAAV,CAAUA,wBAAV;AACE,EAAMA,oBAAA,qBAAqB;AAE3B,EAAMA,o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,iBAAiB,kCAAkC;AAAA,IACpE;AAAA,IACA;AAAA,MACE,OAAOA,oBAAA;AAAA,MACP,aAAa;AAAA,MACb,cAAc,CAAC,iBAAiB,4BAA4B;AAAA,IAC9D;AAAA,IACA;AAAA,MACE,OAAOA,oBAAA;AAAA,MACP,aAAa;AAAA,MACb,cAAc,CAAC,iBAAiB,0BAA0B;AAAA,IAC5D;AAAA,IACA;AAAA,MACE,OAAOA,oBAAA;AAAA,MACP,aAAa;AAAA,MACb,cAAc,CAAC,iBAAiB,qBAAqB;AAAA,IACvD;AAAA,IACA;AAAA,MACE,OAAOA,oBAAA;AAAA,MACP,aAAa;AAAA,MACb,cAAc,CAAC,cAAc;AAAA,IAC/B;AAAA,EACF;AAAA,GA5iBe;",
|
|
6
6
|
"names": ["ConsolePermissions"]
|
|
7
7
|
}
|
|
@@ -7,7 +7,8 @@ function upgradeGateReason(gate) {
|
|
|
7
7
|
case "suspended":
|
|
8
8
|
return "The cluster is suspended and cannot report its migration state. Resume the cluster, then try the upgrade again.";
|
|
9
9
|
case "updating":
|
|
10
|
-
|
|
10
|
+
case "rolloutUnknown":
|
|
11
|
+
return "The cluster is not ready for this upgrade yet. Try again in a few minutes.";
|
|
11
12
|
case "timeout":
|
|
12
13
|
case "error":
|
|
13
14
|
return "The cluster did not answer the upgrade readiness check. Try the upgrade again later.";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/upgradeGateReason.utils.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 { UpgradeReadinessDto } from '../dtos/UpgradeReadiness.dto.js'\n\n/**\n * The text for a blocked upgrade gate (PDP-3067). It names the next step.\n * console-backend sends it as the message of the 409 and of a skipped\n * cluster in a bulk run, and Control shows it on the cluster page, so the\n * three always agree.\n */\nexport function upgradeGateReason(gate: UpgradeReadinessDto): string {\n if (gate.gracePeriod) {\n // The hours, not the end time: the wait is 24 hours, or half an hour on\n // dev, and a raw ISO time is hard to read in a 409.\n const hours = gate.gracePeriod.hoursRemaining\n return `The cluster got a new minor version recently. Try the upgrade again in about ${hours} ${hours === 1 ? 'hour' : 'hours'}.`\n }\n switch (gate.readiness?.source) {\n case 'suspended':\n return 'The cluster is suspended and cannot report its migration state. Resume the cluster, then try the upgrade again.'\n case 'updating':\n return 'The cluster
|
|
5
|
-
"mappings": "AAcO,SAAS,kBAAkB,MAAmC;AACnE,MAAI,KAAK,aAAa;AAGpB,UAAM,QAAQ,KAAK,YAAY;AAC/B,WAAO,gFAAgF,KAAK,IAAI,UAAU,IAAI,SAAS,OAAO;AAAA,EAChI;AACA,UAAQ,KAAK,WAAW,QAAQ;AAAA,IAC9B,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO,KAAK,WAAW,YAAY,aAC/B,iGACA;AAAA,EACR;AACF;",
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type { UpgradeReadinessDto } from '../dtos/UpgradeReadiness.dto.js'\n\n/**\n * The text for a blocked upgrade gate (PDP-3067). It names the next step.\n * console-backend sends it as the message of the 409 and of a skipped\n * cluster in a bulk run, and Control shows it on the cluster page, so the\n * three always agree.\n */\nexport function upgradeGateReason(gate: UpgradeReadinessDto): string {\n if (gate.gracePeriod) {\n // The hours, not the end time: the wait is 24 hours, or half an hour on\n // dev, and a raw ISO time is hard to read in a 409.\n const hours = gate.gracePeriod.hoursRemaining\n return `The cluster got a new minor version recently. Try the upgrade again in about ${hours} ${hours === 1 ? 'hour' : 'hours'}.`\n }\n switch (gate.readiness?.source) {\n case 'suspended':\n return 'The cluster is suspended and cannot report its migration state. Resume the cluster, then try the upgrade again.'\n case 'updating':\n case 'rolloutUnknown':\n return 'The cluster is not ready for this upgrade yet. Try again in a few minutes.'\n case 'timeout':\n case 'error':\n return 'The cluster did not answer the upgrade readiness check. Try the upgrade again later.'\n case 'unsupported':\n return 'Console cannot reach the upgrade readiness check of this cluster. Try the upgrade again later.'\n default:\n return gate.readiness?.verdict === 'notReady'\n ? 'The cluster still completes the migrations of its last upgrade. Try the upgrade again later.'\n : 'The cluster could not read its own migration state. Try the upgrade again later.'\n }\n}\n"],
|
|
5
|
+
"mappings": "AAcO,SAAS,kBAAkB,MAAmC;AACnE,MAAI,KAAK,aAAa;AAGpB,UAAM,QAAQ,KAAK,YAAY;AAC/B,WAAO,gFAAgF,KAAK,IAAI,UAAU,IAAI,SAAS,OAAO;AAAA,EAChI;AACA,UAAQ,KAAK,WAAW,QAAQ;AAAA,IAC9B,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO,KAAK,WAAW,YAAY,aAC/B,iGACA;AAAA,EACR;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED