@camunda/ccma-shared-types 10.12.1 → 10.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tests/utils/objectPath.utils.spec.d.ts +1 -0
- package/dist/approvals/approval-rules.d.ts +3 -0
- package/dist/approvals/approval-rules.js +1 -0
- package/dist/approvals/approval-rules.js.map +2 -2
- package/dist/approvals/use-cases.const.d.ts +7 -0
- package/dist/approvals/use-cases.const.js +7 -1
- package/dist/approvals/use-cases.const.js.map +2 -2
- package/dist/config/camundi-permission-rules.js +8 -1
- package/dist/config/camundi-permission-rules.js.map +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +10 -0
- package/dist/index.js.map +2 -2
- package/dist/permissions/accounts.permissions.d.ts +7 -0
- package/dist/permissions/accounts.permissions.js +7 -0
- package/dist/permissions/accounts.permissions.js.map +2 -2
- package/dist/types/ClusterPlanFields.type.d.ts +3 -1
- package/dist/types/ClusterPlanFields.type.js +19 -0
- package/dist/types/ClusterPlanFields.type.js.map +2 -2
- package/dist/types/Roles.d.ts +1 -1
- package/dist/types/Roles.js.map +2 -2
- package/dist/utils/jvmOptions.d.ts +20 -0
- package/dist/utils/jvmOptions.js +24 -0
- package/dist/utils/jvmOptions.js.map +2 -2
- package/dist/utils/objectPath.utils.d.ts +6 -0
- package/dist/utils/objectPath.utils.js +10 -0
- package/dist/utils/objectPath.utils.js.map +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -32,6 +32,7 @@ const APPROVAL_RULES = {
|
|
|
32
32
|
[T.changePlatformRoles]: { prod: 2 },
|
|
33
33
|
[T.changeUserEmail]: { prod: 2 },
|
|
34
34
|
[T.deleteUser]: { prod: 2 },
|
|
35
|
+
[T.removeOrgMember]: { prod: 2 },
|
|
35
36
|
[T.purgeUsers]: { prod: 2 },
|
|
36
37
|
[T.updateUserMetadata]: { prod: 2 },
|
|
37
38
|
[T.deleteOrganization]: { prod: 2 },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/approvals/approval-rules.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 { Stage } from '../constants/misc.const.js'\nimport {\n type ApprovalUseCaseType,\n APPROVAL_USE_CASE_TYPES as T,\n} from './use-cases.const.js'\n\n/**\n * The approvals of one type of request.\n *\n * The count is the number of approvals from holders of the run permissions of\n * the request (`requiredPermissions`). The opener counts too: when the opener\n * holds every run permission, the request gets the approval of the opener\n * when it is created. The opener cannot approve the request by hand\n * (`canAcknowledge`).\n */\nexport interface ApprovalRule {\n /** The approvals on prod. */\n prod: number\n /** The approvals on dev, int and local. When it is not set, `prod` applies. */\n testStages?: number\n}\n\n/**\n * How many approvals each type of request needs. This table is the one source\n * of that number, for control-backend, control-frontend, and the routes of\n * accounts and console that run an approved action.\n *\n * - **0**: no approval. Only a holder, or a person whom the use case opens the\n * request to, can open it.\n * - **1**: a holder does the action alone. The request of a holder runs when\n * it is created. The request of a person who is not a holder waits for one\n * holder.\n * - **2**: four eyes. The request of a holder waits for one other holder. The\n * request of a person who is not a holder waits for two holders.\n * - **3**: six eyes on prod.\n *\n * Before #10483 a use case counted only the approvals of people other than\n * the opener. Thus an old count and a count of this table are not the same\n * unit.\n */\nexport const APPROVAL_RULES = {\n // No approval. A use case that is open to every Camundi, or that only a\n // system opens.\n [T.clusterTtlDeletion]: { prod: 0 },\n [T.createPersonalOrganisation]: { prod: 0 },\n [T.createCustomHardwareSizing]: { prod: 0 },\n [T.removeCustomHardwareSizing]: { prod: 0 },\n [T.createCustomGeneration]: { prod: 0 },\n [T.removeCustomGeneration]: { prod: 0 },\n [T.selfServiceClusterModification]: { prod: 0 },\n // Only the run of a grant opens it, as the system, and it runs by itself at\n // the end of the grant. Ending a grant takes power away.\n [T.revokeApprovalOverride]: { prod: 0 },\n\n // A holder does it alone. Before #10483 a holder did these actions in\n // accounts-frontend or console-frontend with no second person.\n [T.extendTrial]: { prod: 1 },\n [T.changeOrgLimits]: { prod: 1 },\n [T.llmBudgetTopUp]: { prod: 1 },\n [T.changeSalesPlan]: { prod: 1 },\n [T.requestInNegotiation]: { prod: 1 },\n [T.onboardToEnterprise]: { prod: 1 },\n [T.automatedEnterpriseOnboarding]: { prod: 1 },\n [T.changeClusterPlanType]: { prod: 1 },\n [T.deleteInternalBackup]: { prod: 1 },\n [T.releaseTrainPublish]: { prod: 1 },\n [T.releaseTrainRollback]: { prod: 1 },\n\n // Four eyes. The action removes data or access, changes a person, moves a\n // cluster to another customer, or restarts every cluster of a generation.\n [T.changePlatformRoles]: { prod: 2 },\n [T.changeUserEmail]: { prod: 2 },\n [T.deleteUser]: { prod: 2 },\n [T.purgeUsers]: { prod: 2 },\n [T.updateUserMetadata]: { prod: 2 },\n [T.deleteOrganization]: { prod: 2 },\n [T.sendToExpiredTrial]: { prod: 2 },\n [T.deleteSsoConnection]: { prod: 2 },\n [T.deleteApiClient]: { prod: 2 },\n [T.moveClusterOrg]: { prod: 2 },\n [T.editGeneration]: { prod: 2 },\n [T.changeGenerationVersions]: { prod: 2 },\n\n // One decision changes many clusters. A deletion cannot be undone, so it\n // needs six eyes on prod. On the test stages, the opener runs every other\n // type alone: the console team rolls out generations there with no second\n // person.\n [T.clusterBulkGenerationUpdate]: { prod: 2, testStages: 1 },\n [T.clusterBulkPlanUpdate]: { prod: 2, testStages: 1 },\n [T.clusterBulkPlanTypeUpdate]: { prod: 2, testStages: 1 },\n [T.clusterBulkSleepWakeup]: { prod: 2, testStages: 1 },\n [T.clusterBulkSpecUpdate]: { prod: 2, testStages: 1 },\n [T.clusterBulkDeletion]: { prod: 3, testStages: 2 },\n [T.deleteClusterCorpses]: { prod: 3, testStages: 2 },\n [T.forceDeleteClusterPlanType]: { prod: 3, testStages: 2 },\n // A shorter retention limit deletes the old data of every cluster of the\n // plan type.\n [T.changePlanTypeRetentionLimits]: { prod: 3, testStages: 2 },\n\n // A flag of prod turns a feature on or off for every customer.\n [T.changeFeatureFlag]: { prod: 3, testStages: 2 },\n\n // A grant lets one Camundi run many requests with no second person. The\n // opener and one other holder, on every stage. The grantee approves\n // neither by hand nor when they open it, thus a grant for oneself needs\n // two other holders. The console team has three people, so a third\n // approval would block a grant for oneself.\n [T.grantApprovalOverride]: { prod: 2 },\n} as const satisfies Record<ApprovalUseCaseType, ApprovalRule>\n\n/** The types whose count on the test stages is not the count on prod. */\nexport type StageDependentApprovalType = {\n [K in ApprovalUseCaseType]: (typeof APPROVAL_RULES)[K] extends {\n testStages: number\n }\n ? K\n : never\n}[ApprovalUseCaseType]\n\n/** The approvals that a request of `type` needs on `stage`. */\nexport function approvalsRequiredFor(\n type: ApprovalUseCaseType,\n stage: Stage,\n): number {\n const rule: ApprovalRule = APPROVAL_RULES[type]\n return stage === 'prod' ? rule.prod : (rule.testStages ?? rule.prod)\n}\n"],
|
|
5
|
-
"mappings": "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",
|
|
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 { Stage } from '../constants/misc.const.js'\nimport {\n type ApprovalUseCaseType,\n APPROVAL_USE_CASE_TYPES as T,\n} from './use-cases.const.js'\n\n/**\n * The approvals of one type of request.\n *\n * The count is the number of approvals from holders of the run permissions of\n * the request (`requiredPermissions`). The opener counts too: when the opener\n * holds every run permission, the request gets the approval of the opener\n * when it is created. The opener cannot approve the request by hand\n * (`canAcknowledge`).\n */\nexport interface ApprovalRule {\n /** The approvals on prod. */\n prod: number\n /** The approvals on dev, int and local. When it is not set, `prod` applies. */\n testStages?: number\n}\n\n/**\n * How many approvals each type of request needs. This table is the one source\n * of that number, for control-backend, control-frontend, and the routes of\n * accounts and console that run an approved action.\n *\n * - **0**: no approval. Only a holder, or a person whom the use case opens the\n * request to, can open it.\n * - **1**: a holder does the action alone. The request of a holder runs when\n * it is created. The request of a person who is not a holder waits for one\n * holder.\n * - **2**: four eyes. The request of a holder waits for one other holder. The\n * request of a person who is not a holder waits for two holders.\n * - **3**: six eyes on prod.\n *\n * Before #10483 a use case counted only the approvals of people other than\n * the opener. Thus an old count and a count of this table are not the same\n * unit.\n */\nexport const APPROVAL_RULES = {\n // No approval. A use case that is open to every Camundi, or that only a\n // system opens.\n [T.clusterTtlDeletion]: { prod: 0 },\n [T.createPersonalOrganisation]: { prod: 0 },\n [T.createCustomHardwareSizing]: { prod: 0 },\n [T.removeCustomHardwareSizing]: { prod: 0 },\n [T.createCustomGeneration]: { prod: 0 },\n [T.removeCustomGeneration]: { prod: 0 },\n [T.selfServiceClusterModification]: { prod: 0 },\n // Only the run of a grant opens it, as the system, and it runs by itself at\n // the end of the grant. Ending a grant takes power away.\n [T.revokeApprovalOverride]: { prod: 0 },\n\n // A holder does it alone. Before #10483 a holder did these actions in\n // accounts-frontend or console-frontend with no second person.\n [T.extendTrial]: { prod: 1 },\n [T.changeOrgLimits]: { prod: 1 },\n [T.llmBudgetTopUp]: { prod: 1 },\n [T.changeSalesPlan]: { prod: 1 },\n [T.requestInNegotiation]: { prod: 1 },\n [T.onboardToEnterprise]: { prod: 1 },\n [T.automatedEnterpriseOnboarding]: { prod: 1 },\n [T.changeClusterPlanType]: { prod: 1 },\n [T.deleteInternalBackup]: { prod: 1 },\n [T.releaseTrainPublish]: { prod: 1 },\n [T.releaseTrainRollback]: { prod: 1 },\n\n // Four eyes. The action removes data or access, changes a person, moves a\n // cluster to another customer, or restarts every cluster of a generation.\n [T.changePlatformRoles]: { prod: 2 },\n [T.changeUserEmail]: { prod: 2 },\n [T.deleteUser]: { prod: 2 },\n [T.removeOrgMember]: { prod: 2 },\n [T.purgeUsers]: { prod: 2 },\n [T.updateUserMetadata]: { prod: 2 },\n [T.deleteOrganization]: { prod: 2 },\n [T.sendToExpiredTrial]: { prod: 2 },\n [T.deleteSsoConnection]: { prod: 2 },\n [T.deleteApiClient]: { prod: 2 },\n [T.moveClusterOrg]: { prod: 2 },\n [T.editGeneration]: { prod: 2 },\n [T.changeGenerationVersions]: { prod: 2 },\n\n // One decision changes many clusters. A deletion cannot be undone, so it\n // needs six eyes on prod. On the test stages, the opener runs every other\n // type alone: the console team rolls out generations there with no second\n // person.\n [T.clusterBulkGenerationUpdate]: { prod: 2, testStages: 1 },\n [T.clusterBulkPlanUpdate]: { prod: 2, testStages: 1 },\n [T.clusterBulkPlanTypeUpdate]: { prod: 2, testStages: 1 },\n [T.clusterBulkSleepWakeup]: { prod: 2, testStages: 1 },\n [T.clusterBulkSpecUpdate]: { prod: 2, testStages: 1 },\n [T.clusterBulkDeletion]: { prod: 3, testStages: 2 },\n [T.deleteClusterCorpses]: { prod: 3, testStages: 2 },\n [T.forceDeleteClusterPlanType]: { prod: 3, testStages: 2 },\n // A shorter retention limit deletes the old data of every cluster of the\n // plan type.\n [T.changePlanTypeRetentionLimits]: { prod: 3, testStages: 2 },\n\n // A flag of prod turns a feature on or off for every customer.\n [T.changeFeatureFlag]: { prod: 3, testStages: 2 },\n\n // A grant lets one Camundi run many requests with no second person. The\n // opener and one other holder, on every stage. The grantee approves\n // neither by hand nor when they open it, thus a grant for oneself needs\n // two other holders. The console team has three people, so a third\n // approval would block a grant for oneself.\n [T.grantApprovalOverride]: { prod: 2 },\n} as const satisfies Record<ApprovalUseCaseType, ApprovalRule>\n\n/** The types whose count on the test stages is not the count on prod. */\nexport type StageDependentApprovalType = {\n [K in ApprovalUseCaseType]: (typeof APPROVAL_RULES)[K] extends {\n testStages: number\n }\n ? K\n : never\n}[ApprovalUseCaseType]\n\n/** The approvals that a request of `type` needs on `stage`. */\nexport function approvalsRequiredFor(\n type: ApprovalUseCaseType,\n stage: Stage,\n): number {\n const rule: ApprovalRule = APPROVAL_RULES[type]\n return stage === 'prod' ? rule.prod : (rule.testStages ?? rule.prod)\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,6 +30,7 @@ export declare const APPROVAL_USE_CASE_TYPES: {
|
|
|
30
30
|
readonly changeSalesPlan: "change-sales-plan";
|
|
31
31
|
readonly llmBudgetTopUp: "llm-budget-top-up";
|
|
32
32
|
readonly requestInNegotiation: "request-in-negotiation";
|
|
33
|
+
readonly removeOrgMember: "remove-org-member";
|
|
33
34
|
readonly deleteOrganization: "delete-organization";
|
|
34
35
|
readonly deleteUser: "delete-user";
|
|
35
36
|
readonly changeUserEmail: "change-user-email";
|
|
@@ -160,6 +161,12 @@ export declare const PURGE_USERS_MAX_USERS = 1000;
|
|
|
160
161
|
* it to `canCreate`, so the button and the server never disagree.
|
|
161
162
|
*/
|
|
162
163
|
export declare const PURGE_USERS_REQUIRED_PERMISSIONS: readonly string[];
|
|
164
|
+
/**
|
|
165
|
+
* What a person must hold to open or to approve a remove-org-member request,
|
|
166
|
+
* with or without a new owner. CS holds it through the Camundi permission
|
|
167
|
+
* rules. Accounts checks the same list for the person who asked.
|
|
168
|
+
*/
|
|
169
|
+
export declare const REMOVE_ORG_MEMBER_REQUIRED_PERMISSIONS: readonly string[];
|
|
163
170
|
/**
|
|
164
171
|
* The largest metadata object that one update-user-metadata request writes,
|
|
165
172
|
* in characters of its JSON text.
|
|
@@ -20,6 +20,7 @@ const APPROVAL_USE_CASE_TYPES = {
|
|
|
20
20
|
changeSalesPlan: "change-sales-plan",
|
|
21
21
|
llmBudgetTopUp: "llm-budget-top-up",
|
|
22
22
|
requestInNegotiation: "request-in-negotiation",
|
|
23
|
+
removeOrgMember: "remove-org-member",
|
|
23
24
|
// The third group, behind `control.camundiApprovalFlow`.
|
|
24
25
|
deleteOrganization: "delete-organization",
|
|
25
26
|
deleteUser: "delete-user",
|
|
@@ -111,7 +112,8 @@ const APPROVAL_OVERRIDE_DENYLIST = [
|
|
|
111
112
|
APPROVAL_USE_CASE_TYPES.deleteSsoConnection,
|
|
112
113
|
APPROVAL_USE_CASE_TYPES.changeUserEmail,
|
|
113
114
|
APPROVAL_USE_CASE_TYPES.deleteInternalBackup,
|
|
114
|
-
APPROVAL_USE_CASE_TYPES.deleteApiClient
|
|
115
|
+
APPROVAL_USE_CASE_TYPES.deleteApiClient,
|
|
116
|
+
APPROVAL_USE_CASE_TYPES.removeOrgMember
|
|
115
117
|
];
|
|
116
118
|
const isApprovalOverridable = (type) => !APPROVAL_OVERRIDE_DENYLIST.includes(type);
|
|
117
119
|
const PERSONAL_ORGANIZATION_MAX_PER_REQUESTER = 10;
|
|
@@ -128,6 +130,9 @@ const PURGE_USERS_REQUIRED_PERMISSIONS = [
|
|
|
128
130
|
AccountsPermissions.GOD_PURGE_USERS,
|
|
129
131
|
AccountsPermissions.DELETE_USER
|
|
130
132
|
];
|
|
133
|
+
const REMOVE_ORG_MEMBER_REQUIRED_PERMISSIONS = [
|
|
134
|
+
AccountsPermissions.REMOVE_FROM_ORG_WITH_APPROVAL
|
|
135
|
+
];
|
|
131
136
|
const USER_METADATA_MAX_LENGTH = 16e3;
|
|
132
137
|
const USER_METADATA_EXPECTED_MAX_LENGTH = 5e5;
|
|
133
138
|
const ENTERPRISE_ONBOARDING_NAME_MAX_LENGTH = 50;
|
|
@@ -169,6 +174,7 @@ export {
|
|
|
169
174
|
PLATFORM_ROLE_CHANGE_MAX_ROLES,
|
|
170
175
|
PURGE_USERS_MAX_USERS,
|
|
171
176
|
PURGE_USERS_REQUIRED_PERMISSIONS,
|
|
177
|
+
REMOVE_ORG_MEMBER_REQUIRED_PERMISSIONS,
|
|
172
178
|
USER_METADATA_EXPECTED_MAX_LENGTH,
|
|
173
179
|
USER_METADATA_MAX_LENGTH,
|
|
174
180
|
isApprovalOverridable,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/approvals/use-cases.const.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport { AccountsPermissions } from '../permissions/accounts.permissions.js'\n\n/**\n * The names and the value ranges of the registered use cases.\n *\n * control-backend owns the registry, and a frontend reads it at run time\n * (`GET /api/approvals/use-cases`). Two things cannot wait for that answer:\n *\n * - **The identifier**, because a caller must NAME a use case to find it in the\n * registry, and to open a request of it.\n * - **The range of a payload field**, because a form holds the value before any\n * call goes out.\n *\n * Both live here, so the schema of the service and the form of the browser can\n * never hold different numbers.\n */\n\n/** The identifier of each use case, on the wire and in the table. */\nexport const APPROVAL_USE_CASE_TYPES = {\n sendToExpiredTrial: 'send-to-expired-trial',\n extendTrial: 'extend-trial',\n moveClusterOrg: 'move-cluster-org',\n // One use case for each type of a cluster bulk operation. The types need\n // different permissions and different approval counts, and a use case holds\n // one of each. See `cluster-bulk-operation.ts` beside this file.\n clusterBulkGenerationUpdate: 'cluster-bulk-generation-update',\n clusterBulkPlanUpdate: 'cluster-bulk-plan-update',\n clusterBulkPlanTypeUpdate: 'cluster-bulk-plan-type-update',\n clusterBulkSleepWakeup: 'cluster-bulk-sleep-wakeup',\n clusterBulkDeletion: 'cluster-bulk-deletion',\n clusterBulkSpecUpdate: 'cluster-bulk-spec-update',\n // The second group, behind `control.camundiApprovalFlow`.\n changePlatformRoles: 'change-platform-roles',\n deleteInternalBackup: 'delete-internal-backup',\n changeOrgLimits: 'change-org-limits',\n deleteSsoConnection: 'delete-sso-connection',\n changeSalesPlan: 'change-sales-plan',\n llmBudgetTopUp: 'llm-budget-top-up',\n requestInNegotiation: 'request-in-negotiation',\n // The third group, behind `control.camundiApprovalFlow`.\n deleteOrganization: 'delete-organization',\n deleteUser: 'delete-user',\n changeUserEmail: 'change-user-email',\n purgeUsers: 'purge-users',\n updateUserMetadata: 'update-user-metadata',\n // A change of the feature flag table, on a stage where\n // `isFeatureFlagApprovalRequired` is true.\n changeFeatureFlag: 'change-feature-flag',\n // The publish and the rollback of a release-train generation. See\n // `release-train.ts` beside this file.\n releaseTrainPublish: 'release-train-publish',\n releaseTrainRollback: 'release-train-rollback',\n // Open to every Camundi, and it needs no approval on any stage.\n createPersonalOrganisation: 'create-personal-organisation',\n // Open to every Camundi, runs on dev only, and needs no approval. The two\n // use cases of custom hardware sizing.\n createCustomHardwareSizing: 'create-custom-hardware-sizing',\n removeCustomHardwareSizing: 'remove-custom-hardware-sizing',\n // The mutable versions of one or more generations, behind\n // `control.camundiApprovalFlow`. Console restarts every cluster of\n // each generation, which is why the write needs a second Camundi.\n changeGenerationVersions: 'change-generation-versions',\n // The name and the env vars of one generation, behind\n // `control.camundiApprovalFlow`. Console sends a new spec to every cluster of\n // the generation, which is why the write needs a second Camundi.\n editGeneration: 'edit-generation',\n // A new enterprise customer: a production and a development organization\n // in one step, behind `control.camundiApprovalFlow`. See\n // `automated-enterprise-onboarding.ts` in control-backend.\n automatedEnterpriseOnboarding: 'automated-enterprise-onboarding',\n // Open to every Camundi, runs on dev only, and needs no approval. The two\n // use cases of custom generations.\n createCustomGeneration: 'create-custom-generation',\n removeCustomGeneration: 'remove-custom-generation',\n // Open to org owners, runs on dev only, and needs no approval. It applies\n // or deactivates a cluster modification config of one cluster.\n selfServiceClusterModification: 'self-service-cluster-modification',\n // The enterprise onboarding of one organization, behind\n // `control.camundiApprovalFlow`: the contract, the plan type of\n // each cluster, and the reservations, in one request.\n onboardToEnterprise: 'onboard-to-enterprise',\n // The plan type and the hardware packages of ONE cluster, behind\n // `control.camundiApprovalFlow`. The bulk plan type update beside it also\n // checks the reservations and moves the cluster plan, but each cluster\n // keeps its packages there. This one can change the packages, and it has a\n // stale guard. See `change-cluster-plan-type.ts` in control-backend.\n changeClusterPlanType: 'change-cluster-plan-type',\n // The deletion of one cluster whose TTL ran out. Only the delete cron of\n // console-backend opens it, and it needs no approval. It is a record of the\n // deletion. See `cluster-ttl-deletion.ts` in control-backend.\n clusterTtlDeletion: 'cluster-ttl-deletion',\n // The deletion of the DB corpses or of the Kubernetes corpses that console\n // finds, behind `control.camundiApprovalFlow`. See\n // `delete-cluster-corpses.ts` in control-backend.\n deleteClusterCorpses: 'delete-cluster-corpses',\n // The force delete of a cluster plan type and of every cluster on it,\n // behind `control.camundiApprovalFlow`. See\n // `force-delete-cluster-plan-type.ts` in control-backend.\n forceDeleteClusterPlanType: 'force-delete-cluster-plan-type',\n // A change of the data retention limits of a cluster plan type, which\n // console sends to every cluster of the type. Behind\n // `control.camundiApprovalFlow`. See\n // `change-plan-type-retention-limits.ts` in control-backend.\n changePlanTypeRetentionLimits: 'change-plan-type-retention-limits',\n // The deletion of one Console API client of an organization. See\n // `delete-api-client.ts` in control-backend.\n deleteApiClient: 'delete-api-client',\n // A time-limited grant that lets one Camundi run a pending request with no\n // approval, and the scheduled request that ends it. Behind\n // `control.approvalOverride`. See `approval-override.ts` in control-backend.\n grantApprovalOverride: 'grant-approval-override',\n revokeApprovalOverride: 'revoke-approval-override',\n} as const\n\n/** The longest approval override grant, in hours: 14 days. */\nexport const APPROVAL_OVERRIDE_MAX_HOURS = 14 * 24\n\n/** The duration that the form of control-frontend offers first: one day. */\nexport const APPROVAL_OVERRIDE_DEFAULT_HOURS = 24\n\n/**\n * The use cases that an approval override grant can NOT run.\n *\n * Every other use case is overridable. These change who holds a permission,\n * the override mechanism itself, the feature flags of a stage, the address\n * that a person signs in with, or delete customer data, a backup, a sign-in\n * path, or a whole fleet of clusters. None of them is an emergency that one\n * Camundi must fix alone.\n *\n * The list fails open: a use case that is not here IS overridable. Thus a new\n * use case that deletes or that changes access must be added here. Its route\n * in accounts-backend or console-backend then refuses `overriddenBy` by\n * itself: `approvalActorSchemaFor` of their `AdminApprovalsRouter.ts` reads\n * this list.\n */\nexport const APPROVAL_OVERRIDE_DENYLIST: readonly string[] = [\n APPROVAL_USE_CASE_TYPES.changePlatformRoles,\n APPROVAL_USE_CASE_TYPES.grantApprovalOverride,\n APPROVAL_USE_CASE_TYPES.revokeApprovalOverride,\n APPROVAL_USE_CASE_TYPES.changeFeatureFlag,\n APPROVAL_USE_CASE_TYPES.purgeUsers,\n APPROVAL_USE_CASE_TYPES.deleteUser,\n APPROVAL_USE_CASE_TYPES.deleteOrganization,\n APPROVAL_USE_CASE_TYPES.clusterBulkDeletion,\n APPROVAL_USE_CASE_TYPES.forceDeleteClusterPlanType,\n APPROVAL_USE_CASE_TYPES.releaseTrainPublish,\n APPROVAL_USE_CASE_TYPES.releaseTrainRollback,\n APPROVAL_USE_CASE_TYPES.deleteSsoConnection,\n APPROVAL_USE_CASE_TYPES.changeUserEmail,\n APPROVAL_USE_CASE_TYPES.deleteInternalBackup,\n APPROVAL_USE_CASE_TYPES.deleteApiClient,\n]\n\n/** isApprovalOverridable reports whether a grant can run a request of this type. */\nexport const isApprovalOverridable = (type: string): boolean =>\n !APPROVAL_OVERRIDE_DENYLIST.includes(type)\n\n/**\n * The most personal organizations that one Camundi can request.\n *\n * The request runs with no approval, so this cap is the only guard against a\n * loop that creates organizations without end. It counts the requests that a\n * Camundi opened, and a person who needs more asks a Camundi who holds\n * `AccountsPermissions.CREATE_ORG`.\n */\nexport const PERSONAL_ORGANIZATION_MAX_PER_REQUESTER = 10\n\n/** The shortest and longest name of a personal organization. */\nexport const PERSONAL_ORGANIZATION_NAME_MIN_LENGTH = 3\nexport const PERSONAL_ORGANIZATION_NAME_MAX_LENGTH = 100\n\nexport type ApprovalUseCaseType =\n (typeof APPROVAL_USE_CASE_TYPES)[keyof typeof APPROVAL_USE_CASE_TYPES]\n\n/**\n * The shortest extension that accounts-backend accepts.\n *\n * `POST /:orgId/extendtrial` refuses a date that is less than 14 days away\n * when the body carries `onBehalfOf`, and it measures those 14 days when the\n * CALL arrives. The floor here is 15 and not 14, for two reasons:\n *\n * - The two clocks are not the same instant. Accounts builds its own \"14 days\n * from now\" a few milliseconds after control-backend builds the date, so a\n * date of exactly 14 days is already in the past for the comparison.\n * - Accounts counts with `setDate`, which is calendar arithmetic. A change of\n * the daylight saving time moves its limit by an hour.\n */\nexport const EXTEND_TRIAL_MIN_DAYS = 15\n\n/**\n * The longest extension that accounts-backend accepts.\n *\n * The same route refuses a date more than 62 days away. 61 keeps the same\n * margin as the floor above.\n */\nexport const EXTEND_TRIAL_MAX_DAYS = 61\n\n/**\n * The most roles that one change-platform-roles request adds, or removes.\n *\n * The form of control-frontend offers every platform role, and a person who\n * gives a Camundi a new position rarely changes more than a few. A request with\n * more roles than this is a request that nobody reads before they approve it.\n */\nexport const PLATFORM_ROLE_CHANGE_MAX_ROLES = 10\n\n/**\n * The longest text value that one change-org-limits request writes.\n *\n * A text limit holds a short value, such as a list of regions. The bound keeps\n * a request readable for the person who approves it.\n */\nexport const ORG_LIMIT_TEXT_MAX_LENGTH = 2000\n\n/**\n * LLM_BUDGET_TOP_UP_THRESHOLD is the share of the budget that the spend of a\n * managed LLM key must reach before a top-up is the normal case.\n *\n * A request below it is still possible, but the person who asks must confirm\n * it, and the request says so to the approver. Accounts refuses a top-up\n * below it that does not carry that confirmation.\n */\nexport const LLM_BUDGET_TOP_UP_THRESHOLD = 0.9\n\n/**\n * isLlmSpendBelowTopUpThreshold reports whether a top-up of a managed LLM key\n * needs the explicit confirmation of `LLM_BUDGET_TOP_UP_THRESHOLD`.\n */\nexport const isLlmSpendBelowTopUpThreshold = (\n spend: number,\n maxBudget: number,\n): boolean => spend < maxBudget * LLM_BUDGET_TOP_UP_THRESHOLD\n\n/**\n * The most users that one purge-users request deletes.\n *\n * The God Mode purge deletes one user after the other, and Auth0 limits how\n * fast that goes. A list longer than this is also a list that no approver\n * reads before they agree.\n */\nexport const PURGE_USERS_MAX_USERS = 1000\n\n/**\n * What a person must hold to open or to approve a purge-users request.\n *\n * The purge route of accounts, `DELETE /api/users/:userId/purge`, needs both\n * of the caller. The approval route of accounts checks both of the person who\n * asked, when control-backend sends `purge: true`. The use case of\n * control-backend returns this list from `permissionsFor`, and the form passes\n * it to `canCreate`, so the button and the server never disagree.\n */\nexport const PURGE_USERS_REQUIRED_PERMISSIONS: readonly string[] = [\n AccountsPermissions.GOD_PURGE_USERS,\n AccountsPermissions.DELETE_USER,\n]\n\n/**\n * The largest metadata object that one update-user-metadata request writes,\n * in characters of its JSON text.\n *\n * This is a bound of the product, and not the limit of Auth0, which is far\n * larger. The approvers read the whole object before they agree, and an\n * object that is longer than this is an object that nobody reads.\n */\nexport const USER_METADATA_MAX_LENGTH = 16_000\n\n/**\n * The largest metadata object that a request carries as the object that the\n * person who asked READ.\n *\n * It is larger than `USER_METADATA_MAX_LENGTH`, so a user whose metadata grew\n * past that bound can still get an edit that makes it smaller. It still has a\n * bound, because the request keeps the copy in its row.\n */\nexport const USER_METADATA_EXPECTED_MAX_LENGTH = 500_000\n\n/**\n * The bounds of an automated-enterprise-onboarding request.\n *\n * The accounts wizard holds the first four, and the schema of control-backend\n * and the form of control-frontend read them here, so the form never sends\n * what the service refuses.\n */\nexport const ENTERPRISE_ONBOARDING_NAME_MAX_LENGTH = 50\nexport const ENTERPRISE_ONBOARDING_SFDC_ID_MAX_LENGTH = 50\nexport const ENTERPRISE_ONBOARDING_TERM_MIN_MONTHS = 1\nexport const ENTERPRISE_ONBOARDING_TERM_MAX_MONTHS = 60\n/** The most of one value metric that a contract includes. */\nexport const ENTERPRISE_ONBOARDING_METRIC_MAX = 1_000_000_000_000\n/**\n * The most clusters of one plan type that an onboarding reserves: the cap of\n * the accounts wizard. Accounts checks the limit of the plan only when it\n * reserves, after it created the two organizations, so the request must not\n * carry a count that the plan refuses.\n */\nexport const ENTERPRISE_ONBOARDING_RESERVATION_MAX = 20\n\n/**\n * Whether a string is a calendar day, `YYYY-MM-DD`, that exists.\n *\n * The shape alone is not enough: `Date` rolls `2026-02-30` to March 2 with\n * no error, and `2026-13-45` becomes an invalid date that a database refuses\n * only at the write. A request carries the day for days before it runs, so\n * the check is at the open, and in the form.\n */\nexport const isCalendarDay = (value: string): boolean =>\n /^\\d{4}-\\d{2}-\\d{2}$/.test(value) &&\n !Number.isNaN(Date.parse(value)) &&\n new Date(value).toISOString().startsWith(value)\n\n/** The longest email address that a change-user-email request carries. */\nexport const APPROVAL_EMAIL_MAX_LENGTH = 320\n\n/**\n * The email addresses that a change-user-email request accepts.\n *\n * It is the email pattern of zod 4.6. The pattern is here, so the schema of\n * control-backend and the form of control-frontend accept the same addresses,\n * and a form never sends an address that the service refuses.\n */\nexport const APPROVAL_EMAIL_PATTERN =\n // biome-ignore lint/complexity/noUselessEscapeInRegex: the same source as zod, character for character\n /^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/\n\n/**\n * The most generations that one change-generation-versions request changes.\n *\n * Each generation restarts every cluster on it. A request over more\n * generations than this is a request that no approver reads to the end.\n *\n * The two bounds of this use case also keep a request under the body limit\n * of control-backend (1 MiB, `server-options.ts` of the shared Fastify\n * layer): 20 generations, each with the expected value of the 2 image\n * versions of 2000 characters, is 80 000 characters before the rest of the\n * payload.\n */\nexport const GENERATION_VERSIONS_MAX_GENERATIONS = 20\n\n/**\n * The longest value of one mutable version of a generation.\n *\n * An image reference is short, and only the two image versions go through\n * the use case (`GENERATION_IMAGE_VERSION_KEYS`). The bound keeps a request\n * readable for the approver. See `GENERATION_VERSIONS_MAX_GENERATIONS` for\n * the sum.\n */\nexport const GENERATION_VERSION_VALUE_MAX_LENGTH = 2000\n"],
|
|
5
|
-
"mappings": "AAMA,SAAS,2BAA2B;AAkB7B,MAAM,0BAA0B;AAAA,EACrC,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,gBAAgB;AAAA;AAAA;AAAA;AAAA,EAIhB,6BAA6B;AAAA,EAC7B,uBAAuB;AAAA,EACvB,2BAA2B;AAAA,EAC3B,wBAAwB;AAAA,EACxB,qBAAqB;AAAA,EACrB,uBAAuB;AAAA;AAAA,EAEvB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,sBAAsB;AAAA;AAAA,
|
|
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 '../permissions/accounts.permissions.js'\n\n/**\n * The names and the value ranges of the registered use cases.\n *\n * control-backend owns the registry, and a frontend reads it at run time\n * (`GET /api/approvals/use-cases`). Two things cannot wait for that answer:\n *\n * - **The identifier**, because a caller must NAME a use case to find it in the\n * registry, and to open a request of it.\n * - **The range of a payload field**, because a form holds the value before any\n * call goes out.\n *\n * Both live here, so the schema of the service and the form of the browser can\n * never hold different numbers.\n */\n\n/** The identifier of each use case, on the wire and in the table. */\nexport const APPROVAL_USE_CASE_TYPES = {\n sendToExpiredTrial: 'send-to-expired-trial',\n extendTrial: 'extend-trial',\n moveClusterOrg: 'move-cluster-org',\n // One use case for each type of a cluster bulk operation. The types need\n // different permissions and different approval counts, and a use case holds\n // one of each. See `cluster-bulk-operation.ts` beside this file.\n clusterBulkGenerationUpdate: 'cluster-bulk-generation-update',\n clusterBulkPlanUpdate: 'cluster-bulk-plan-update',\n clusterBulkPlanTypeUpdate: 'cluster-bulk-plan-type-update',\n clusterBulkSleepWakeup: 'cluster-bulk-sleep-wakeup',\n clusterBulkDeletion: 'cluster-bulk-deletion',\n clusterBulkSpecUpdate: 'cluster-bulk-spec-update',\n // The second group, behind `control.camundiApprovalFlow`.\n changePlatformRoles: 'change-platform-roles',\n deleteInternalBackup: 'delete-internal-backup',\n changeOrgLimits: 'change-org-limits',\n deleteSsoConnection: 'delete-sso-connection',\n changeSalesPlan: 'change-sales-plan',\n llmBudgetTopUp: 'llm-budget-top-up',\n requestInNegotiation: 'request-in-negotiation',\n removeOrgMember: 'remove-org-member',\n // The third group, behind `control.camundiApprovalFlow`.\n deleteOrganization: 'delete-organization',\n deleteUser: 'delete-user',\n changeUserEmail: 'change-user-email',\n purgeUsers: 'purge-users',\n updateUserMetadata: 'update-user-metadata',\n // A change of the feature flag table, on a stage where\n // `isFeatureFlagApprovalRequired` is true.\n changeFeatureFlag: 'change-feature-flag',\n // The publish and the rollback of a release-train generation. See\n // `release-train.ts` beside this file.\n releaseTrainPublish: 'release-train-publish',\n releaseTrainRollback: 'release-train-rollback',\n // Open to every Camundi, and it needs no approval on any stage.\n createPersonalOrganisation: 'create-personal-organisation',\n // Open to every Camundi, runs on dev only, and needs no approval. The two\n // use cases of custom hardware sizing.\n createCustomHardwareSizing: 'create-custom-hardware-sizing',\n removeCustomHardwareSizing: 'remove-custom-hardware-sizing',\n // The mutable versions of one or more generations, behind\n // `control.camundiApprovalFlow`. Console restarts every cluster of\n // each generation, which is why the write needs a second Camundi.\n changeGenerationVersions: 'change-generation-versions',\n // The name and the env vars of one generation, behind\n // `control.camundiApprovalFlow`. Console sends a new spec to every cluster of\n // the generation, which is why the write needs a second Camundi.\n editGeneration: 'edit-generation',\n // A new enterprise customer: a production and a development organization\n // in one step, behind `control.camundiApprovalFlow`. See\n // `automated-enterprise-onboarding.ts` in control-backend.\n automatedEnterpriseOnboarding: 'automated-enterprise-onboarding',\n // Open to every Camundi, runs on dev only, and needs no approval. The two\n // use cases of custom generations.\n createCustomGeneration: 'create-custom-generation',\n removeCustomGeneration: 'remove-custom-generation',\n // Open to org owners, runs on dev only, and needs no approval. It applies\n // or deactivates a cluster modification config of one cluster.\n selfServiceClusterModification: 'self-service-cluster-modification',\n // The enterprise onboarding of one organization, behind\n // `control.camundiApprovalFlow`: the contract, the plan type of\n // each cluster, and the reservations, in one request.\n onboardToEnterprise: 'onboard-to-enterprise',\n // The plan type and the hardware packages of ONE cluster, behind\n // `control.camundiApprovalFlow`. The bulk plan type update beside it also\n // checks the reservations and moves the cluster plan, but each cluster\n // keeps its packages there. This one can change the packages, and it has a\n // stale guard. See `change-cluster-plan-type.ts` in control-backend.\n changeClusterPlanType: 'change-cluster-plan-type',\n // The deletion of one cluster whose TTL ran out. Only the delete cron of\n // console-backend opens it, and it needs no approval. It is a record of the\n // deletion. See `cluster-ttl-deletion.ts` in control-backend.\n clusterTtlDeletion: 'cluster-ttl-deletion',\n // The deletion of the DB corpses or of the Kubernetes corpses that console\n // finds, behind `control.camundiApprovalFlow`. See\n // `delete-cluster-corpses.ts` in control-backend.\n deleteClusterCorpses: 'delete-cluster-corpses',\n // The force delete of a cluster plan type and of every cluster on it,\n // behind `control.camundiApprovalFlow`. See\n // `force-delete-cluster-plan-type.ts` in control-backend.\n forceDeleteClusterPlanType: 'force-delete-cluster-plan-type',\n // A change of the data retention limits of a cluster plan type, which\n // console sends to every cluster of the type. Behind\n // `control.camundiApprovalFlow`. See\n // `change-plan-type-retention-limits.ts` in control-backend.\n changePlanTypeRetentionLimits: 'change-plan-type-retention-limits',\n // The deletion of one Console API client of an organization. See\n // `delete-api-client.ts` in control-backend.\n deleteApiClient: 'delete-api-client',\n // A time-limited grant that lets one Camundi run a pending request with no\n // approval, and the scheduled request that ends it. Behind\n // `control.approvalOverride`. See `approval-override.ts` in control-backend.\n grantApprovalOverride: 'grant-approval-override',\n revokeApprovalOverride: 'revoke-approval-override',\n} as const\n\n/** The longest approval override grant, in hours: 14 days. */\nexport const APPROVAL_OVERRIDE_MAX_HOURS = 14 * 24\n\n/** The duration that the form of control-frontend offers first: one day. */\nexport const APPROVAL_OVERRIDE_DEFAULT_HOURS = 24\n\n/**\n * The use cases that an approval override grant can NOT run.\n *\n * Every other use case is overridable. These change who holds a permission,\n * the override mechanism itself, the feature flags of a stage, the address\n * that a person signs in with, or delete customer data, a backup, a sign-in\n * path, or a whole fleet of clusters. None of them is an emergency that one\n * Camundi must fix alone.\n *\n * The list fails open: a use case that is not here IS overridable. Thus a new\n * use case that deletes or that changes access must be added here. Its route\n * in accounts-backend or console-backend then refuses `overriddenBy` by\n * itself: `approvalActorSchemaFor` of their `AdminApprovalsRouter.ts` reads\n * this list.\n */\nexport const APPROVAL_OVERRIDE_DENYLIST: readonly string[] = [\n APPROVAL_USE_CASE_TYPES.changePlatformRoles,\n APPROVAL_USE_CASE_TYPES.grantApprovalOverride,\n APPROVAL_USE_CASE_TYPES.revokeApprovalOverride,\n APPROVAL_USE_CASE_TYPES.changeFeatureFlag,\n APPROVAL_USE_CASE_TYPES.purgeUsers,\n APPROVAL_USE_CASE_TYPES.deleteUser,\n APPROVAL_USE_CASE_TYPES.deleteOrganization,\n APPROVAL_USE_CASE_TYPES.clusterBulkDeletion,\n APPROVAL_USE_CASE_TYPES.forceDeleteClusterPlanType,\n APPROVAL_USE_CASE_TYPES.releaseTrainPublish,\n APPROVAL_USE_CASE_TYPES.releaseTrainRollback,\n APPROVAL_USE_CASE_TYPES.deleteSsoConnection,\n APPROVAL_USE_CASE_TYPES.changeUserEmail,\n APPROVAL_USE_CASE_TYPES.deleteInternalBackup,\n APPROVAL_USE_CASE_TYPES.deleteApiClient,\n APPROVAL_USE_CASE_TYPES.removeOrgMember,\n]\n\n/** isApprovalOverridable reports whether a grant can run a request of this type. */\nexport const isApprovalOverridable = (type: string): boolean =>\n !APPROVAL_OVERRIDE_DENYLIST.includes(type)\n\n/**\n * The most personal organizations that one Camundi can request.\n *\n * The request runs with no approval, so this cap is the only guard against a\n * loop that creates organizations without end. It counts the requests that a\n * Camundi opened, and a person who needs more asks a Camundi who holds\n * `AccountsPermissions.CREATE_ORG`.\n */\nexport const PERSONAL_ORGANIZATION_MAX_PER_REQUESTER = 10\n\n/** The shortest and longest name of a personal organization. */\nexport const PERSONAL_ORGANIZATION_NAME_MIN_LENGTH = 3\nexport const PERSONAL_ORGANIZATION_NAME_MAX_LENGTH = 100\n\nexport type ApprovalUseCaseType =\n (typeof APPROVAL_USE_CASE_TYPES)[keyof typeof APPROVAL_USE_CASE_TYPES]\n\n/**\n * The shortest extension that accounts-backend accepts.\n *\n * `POST /:orgId/extendtrial` refuses a date that is less than 14 days away\n * when the body carries `onBehalfOf`, and it measures those 14 days when the\n * CALL arrives. The floor here is 15 and not 14, for two reasons:\n *\n * - The two clocks are not the same instant. Accounts builds its own \"14 days\n * from now\" a few milliseconds after control-backend builds the date, so a\n * date of exactly 14 days is already in the past for the comparison.\n * - Accounts counts with `setDate`, which is calendar arithmetic. A change of\n * the daylight saving time moves its limit by an hour.\n */\nexport const EXTEND_TRIAL_MIN_DAYS = 15\n\n/**\n * The longest extension that accounts-backend accepts.\n *\n * The same route refuses a date more than 62 days away. 61 keeps the same\n * margin as the floor above.\n */\nexport const EXTEND_TRIAL_MAX_DAYS = 61\n\n/**\n * The most roles that one change-platform-roles request adds, or removes.\n *\n * The form of control-frontend offers every platform role, and a person who\n * gives a Camundi a new position rarely changes more than a few. A request with\n * more roles than this is a request that nobody reads before they approve it.\n */\nexport const PLATFORM_ROLE_CHANGE_MAX_ROLES = 10\n\n/**\n * The longest text value that one change-org-limits request writes.\n *\n * A text limit holds a short value, such as a list of regions. The bound keeps\n * a request readable for the person who approves it.\n */\nexport const ORG_LIMIT_TEXT_MAX_LENGTH = 2000\n\n/**\n * LLM_BUDGET_TOP_UP_THRESHOLD is the share of the budget that the spend of a\n * managed LLM key must reach before a top-up is the normal case.\n *\n * A request below it is still possible, but the person who asks must confirm\n * it, and the request says so to the approver. Accounts refuses a top-up\n * below it that does not carry that confirmation.\n */\nexport const LLM_BUDGET_TOP_UP_THRESHOLD = 0.9\n\n/**\n * isLlmSpendBelowTopUpThreshold reports whether a top-up of a managed LLM key\n * needs the explicit confirmation of `LLM_BUDGET_TOP_UP_THRESHOLD`.\n */\nexport const isLlmSpendBelowTopUpThreshold = (\n spend: number,\n maxBudget: number,\n): boolean => spend < maxBudget * LLM_BUDGET_TOP_UP_THRESHOLD\n\n/**\n * The most users that one purge-users request deletes.\n *\n * The God Mode purge deletes one user after the other, and Auth0 limits how\n * fast that goes. A list longer than this is also a list that no approver\n * reads before they agree.\n */\nexport const PURGE_USERS_MAX_USERS = 1000\n\n/**\n * What a person must hold to open or to approve a purge-users request.\n *\n * The purge route of accounts, `DELETE /api/users/:userId/purge`, needs both\n * of the caller. The approval route of accounts checks both of the person who\n * asked, when control-backend sends `purge: true`. The use case of\n * control-backend returns this list from `permissionsFor`, and the form passes\n * it to `canCreate`, so the button and the server never disagree.\n */\nexport const PURGE_USERS_REQUIRED_PERMISSIONS: readonly string[] = [\n AccountsPermissions.GOD_PURGE_USERS,\n AccountsPermissions.DELETE_USER,\n]\n\n/**\n * What a person must hold to open or to approve a remove-org-member request,\n * with or without a new owner. CS holds it through the Camundi permission\n * rules. Accounts checks the same list for the person who asked.\n */\nexport const REMOVE_ORG_MEMBER_REQUIRED_PERMISSIONS: readonly string[] = [\n AccountsPermissions.REMOVE_FROM_ORG_WITH_APPROVAL,\n]\n\n/**\n * The largest metadata object that one update-user-metadata request writes,\n * in characters of its JSON text.\n *\n * This is a bound of the product, and not the limit of Auth0, which is far\n * larger. The approvers read the whole object before they agree, and an\n * object that is longer than this is an object that nobody reads.\n */\nexport const USER_METADATA_MAX_LENGTH = 16_000\n\n/**\n * The largest metadata object that a request carries as the object that the\n * person who asked READ.\n *\n * It is larger than `USER_METADATA_MAX_LENGTH`, so a user whose metadata grew\n * past that bound can still get an edit that makes it smaller. It still has a\n * bound, because the request keeps the copy in its row.\n */\nexport const USER_METADATA_EXPECTED_MAX_LENGTH = 500_000\n\n/**\n * The bounds of an automated-enterprise-onboarding request.\n *\n * The accounts wizard holds the first four, and the schema of control-backend\n * and the form of control-frontend read them here, so the form never sends\n * what the service refuses.\n */\nexport const ENTERPRISE_ONBOARDING_NAME_MAX_LENGTH = 50\nexport const ENTERPRISE_ONBOARDING_SFDC_ID_MAX_LENGTH = 50\nexport const ENTERPRISE_ONBOARDING_TERM_MIN_MONTHS = 1\nexport const ENTERPRISE_ONBOARDING_TERM_MAX_MONTHS = 60\n/** The most of one value metric that a contract includes. */\nexport const ENTERPRISE_ONBOARDING_METRIC_MAX = 1_000_000_000_000\n/**\n * The most clusters of one plan type that an onboarding reserves: the cap of\n * the accounts wizard. Accounts checks the limit of the plan only when it\n * reserves, after it created the two organizations, so the request must not\n * carry a count that the plan refuses.\n */\nexport const ENTERPRISE_ONBOARDING_RESERVATION_MAX = 20\n\n/**\n * Whether a string is a calendar day, `YYYY-MM-DD`, that exists.\n *\n * The shape alone is not enough: `Date` rolls `2026-02-30` to March 2 with\n * no error, and `2026-13-45` becomes an invalid date that a database refuses\n * only at the write. A request carries the day for days before it runs, so\n * the check is at the open, and in the form.\n */\nexport const isCalendarDay = (value: string): boolean =>\n /^\\d{4}-\\d{2}-\\d{2}$/.test(value) &&\n !Number.isNaN(Date.parse(value)) &&\n new Date(value).toISOString().startsWith(value)\n\n/** The longest email address that a change-user-email request carries. */\nexport const APPROVAL_EMAIL_MAX_LENGTH = 320\n\n/**\n * The email addresses that a change-user-email request accepts.\n *\n * It is the email pattern of zod 4.6. The pattern is here, so the schema of\n * control-backend and the form of control-frontend accept the same addresses,\n * and a form never sends an address that the service refuses.\n */\nexport const APPROVAL_EMAIL_PATTERN =\n // biome-ignore lint/complexity/noUselessEscapeInRegex: the same source as zod, character for character\n /^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/\n\n/**\n * The most generations that one change-generation-versions request changes.\n *\n * Each generation restarts every cluster on it. A request over more\n * generations than this is a request that no approver reads to the end.\n *\n * The two bounds of this use case also keep a request under the body limit\n * of control-backend (1 MiB, `server-options.ts` of the shared Fastify\n * layer): 20 generations, each with the expected value of the 2 image\n * versions of 2000 characters, is 80 000 characters before the rest of the\n * payload.\n */\nexport const GENERATION_VERSIONS_MAX_GENERATIONS = 20\n\n/**\n * The longest value of one mutable version of a generation.\n *\n * An image reference is short, and only the two image versions go through\n * the use case (`GENERATION_IMAGE_VERSION_KEYS`). The bound keeps a request\n * readable for the approver. See `GENERATION_VERSIONS_MAX_GENERATIONS` for\n * the sum.\n */\nexport const GENERATION_VERSION_VALUE_MAX_LENGTH = 2000\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
const CONFIG = {
|
|
2
2
|
departmentRules: {
|
|
3
|
-
|
|
3
|
+
// CS opens and approves the requests that remove an org member, an
|
|
4
|
+
// owner included, for example when a customer hands an organization to a
|
|
5
|
+
// new owner. Each request needs a second Camundi.
|
|
6
|
+
"205882305": [
|
|
7
|
+
"accounts:read",
|
|
8
|
+
"accounts:trialExtender",
|
|
9
|
+
"accounts:orgMemberRemover"
|
|
10
|
+
],
|
|
4
11
|
// CS
|
|
5
12
|
Marketing: ["accounts:read", "accounts:trialExtender"],
|
|
6
13
|
"205882307": ["accounts:read", "accounts:trialExtender"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/config/camundi-permission-rules.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 { CamundiPermissionRules } from './camundi-permission-rules.types.js'\n\nconst CONFIG: CamundiPermissionRules = {\n departmentRules: {\n '205882305': ['accounts:read'
|
|
5
|
-
"mappings": "AAQA,MAAM,SAAiC;AAAA,EACrC,iBAAiB;AAAA,
|
|
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 { CamundiPermissionRules } from './camundi-permission-rules.types.js'\n\nconst CONFIG: CamundiPermissionRules = {\n departmentRules: {\n // CS opens and approves the requests that remove an org member, an\n // owner included, for example when a customer hands an organization to a\n // new owner. Each request needs a second Camundi.\n '205882305': [\n 'accounts:read',\n 'accounts:trialExtender',\n 'accounts:orgMemberRemover',\n ], // CS\n Marketing: ['accounts:read', 'accounts:trialExtender'],\n '205882307': ['accounts:read', 'accounts:trialExtender'], // revops\n Products: ['console:admin:readonly', 'accounts:read'],\n Executive: ['accounts:read'],\n '259633605': ['accounts:read', 'accounts:trialExtender'], // Sales\n },\n divisionRules: {\n Engineering: ['console:admin:readonly'],\n '259633608': [\n 'accounts:connections:create',\n 'accounts:connections:update',\n 'support:agent',\n ], // Support\n '259633611': [\n 'accounts:trialExtender',\n 'accounts:limitExtender',\n 'support:agent',\n ], // Pre-Sales as per https://confluence.camunda.com/spaces/HAN/pages/168660217/Adjust+C8+SaaS+permissions+and+sales+plan#AdjustC8SaaSpermissionsandsalesplan-DetailsperRole\n // Professional Services holds 36 people, the consultants. Six of them\n // sit in the Education subdivision. They train customers and do not\n // work on customer clusters.\n //\n // The augmenter can only ADD a role, so no rule here can EXCLUDE\n // Education from this grant. The other 30 consultants carry no\n // subdivision at all, so a subdivision rule cannot name them either.\n //\n // This grant covers the whole division on purpose. A rule that keys on\n // the ABSENCE of a subdivision id is more fragile than one that keys on\n // a present id, and two comments in this file already record a\n // subdivision id that a HiBob restructure broke without warning.\n //\n // If the 30 consultants without a subdivision get one of their own one\n // day, move this grant down to that subdivision and remove this rule.\n // Education would then stop inheriting the grant, because the division\n // no longer carries it and the subdivision rule never named Education.\n '266189454': ['console:clusterMover'], // Professional Services\n // Enterprise Success holds the CSMs and the TAMs. A customer who has\n // privacy concerns asks them to switch optional telemetry off, thus they\n // carry that capability. HiBob marks no TAM, thus the division is the\n // smallest group that holds all of them. The CSMs and TAMs also move a\n // cluster to another org for a customer, thus they carry\n // `console:clusterMover` too.\n '266229124': ['console:optionalTelemetryManager', 'console:clusterMover'], // Enterprise Success\n },\n subdivisionRules: {\n // The console team is the \"Control plane\" subdivision. The id was\n // `256909487` until a HiBob restructure, and the augmenter matches a\n // subdivision exactly and stays quiet on a miss, thus the rule granted\n // nothing to anybody and nobody saw it.\n '267516827': ['accounts:admin', 'console:admin', 'consoleTeam'], // Control plane\n 'Engineering Management': [\n 'accounts:addSafeRoles',\n 'accounts:orgCreator',\n 'console:C8ReleaseManager',\n ], // Engineering Management\n // Same story: the id `258049291` is gone. The subdivision carries the name\n // `Controller` now, and a name is a valid key \u2014 `Engineering Management`\n // above is one too.\n Controller: ['console:clusterPlanManager', 'console:operationsEngineer'],\n },\n}\nexport default CONFIG\n"],
|
|
5
|
+
"mappings": "AAQA,MAAM,SAAiC;AAAA,EACrC,iBAAiB;AAAA;AAAA;AAAA;AAAA,IAIf,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA,IACA,WAAW,CAAC,iBAAiB,wBAAwB;AAAA,IACrD,aAAa,CAAC,iBAAiB,wBAAwB;AAAA;AAAA,IACvD,UAAU,CAAC,0BAA0B,eAAe;AAAA,IACpD,WAAW,CAAC,eAAe;AAAA,IAC3B,aAAa,CAAC,iBAAiB,wBAAwB;AAAA;AAAA,EACzD;AAAA,EACA,eAAe;AAAA,IACb,aAAa,CAAC,wBAAwB;AAAA,IACtC,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA,IACA,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAkBA,aAAa,CAAC,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOpC,aAAa,CAAC,oCAAoC,sBAAsB;AAAA;AAAA,EAC1E;AAAA,EACA,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA,IAKhB,aAAa,CAAC,kBAAkB,iBAAiB,aAAa;AAAA;AAAA,IAC9D,0BAA0B;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAY,CAAC,8BAA8B,4BAA4B;AAAA,EACzE;AACF;AACA,IAAO,mCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export type { ApprovalActorView, ApprovalDecision, ApprovalDenialCode, } from '.
|
|
|
35
35
|
export { approvalPermissionCheck, canAcknowledge, canCreate, canExecute, canOverride, canReject, canRunOverridden, canView, canWithdraw, EXECUTE_WINDOW_DAYS, effectiveStatus, hasActorEmail, hasEveryPermission, hasFailedRun, isExpired, isOverrideGrantActive, isRunWindowClosed, isSameActor, isSameActorEmail, needsReason, OVERRIDE_GRANT_ENDED_MESSAGE, opensWithOwnApproval, overrideGranteeOf, remainingAcks, requiredPermissionsOf, resolveRequiredAcks, runWindowEnd, } from './approvals/policy.js';
|
|
36
36
|
export type { ReleaseTrainAutoUpgradeCandidates, ReleaseTrainPublishPayload, ReleaseTrainRollbackPayload, } from './approvals/release-train.js';
|
|
37
37
|
export type { ApprovalUseCaseType } from './approvals/use-cases.const.js';
|
|
38
|
-
export { APPROVAL_EMAIL_MAX_LENGTH, APPROVAL_EMAIL_PATTERN, APPROVAL_OVERRIDE_DEFAULT_HOURS, APPROVAL_OVERRIDE_DENYLIST, APPROVAL_OVERRIDE_MAX_HOURS, APPROVAL_USE_CASE_TYPES, ENTERPRISE_ONBOARDING_METRIC_MAX, ENTERPRISE_ONBOARDING_NAME_MAX_LENGTH, ENTERPRISE_ONBOARDING_RESERVATION_MAX, ENTERPRISE_ONBOARDING_SFDC_ID_MAX_LENGTH, ENTERPRISE_ONBOARDING_TERM_MAX_MONTHS, ENTERPRISE_ONBOARDING_TERM_MIN_MONTHS, EXTEND_TRIAL_MAX_DAYS, EXTEND_TRIAL_MIN_DAYS, GENERATION_VERSION_VALUE_MAX_LENGTH, GENERATION_VERSIONS_MAX_GENERATIONS, isApprovalOverridable, isCalendarDay, isLlmSpendBelowTopUpThreshold, LLM_BUDGET_TOP_UP_THRESHOLD, ORG_LIMIT_TEXT_MAX_LENGTH, PERSONAL_ORGANIZATION_MAX_PER_REQUESTER, PERSONAL_ORGANIZATION_NAME_MAX_LENGTH, PERSONAL_ORGANIZATION_NAME_MIN_LENGTH, PLATFORM_ROLE_CHANGE_MAX_ROLES, PURGE_USERS_MAX_USERS, PURGE_USERS_REQUIRED_PERMISSIONS, USER_METADATA_EXPECTED_MAX_LENGTH, USER_METADATA_MAX_LENGTH, } from './approvals/use-cases.const.js';
|
|
38
|
+
export { APPROVAL_EMAIL_MAX_LENGTH, APPROVAL_EMAIL_PATTERN, APPROVAL_OVERRIDE_DEFAULT_HOURS, APPROVAL_OVERRIDE_DENYLIST, APPROVAL_OVERRIDE_MAX_HOURS, APPROVAL_USE_CASE_TYPES, ENTERPRISE_ONBOARDING_METRIC_MAX, ENTERPRISE_ONBOARDING_NAME_MAX_LENGTH, ENTERPRISE_ONBOARDING_RESERVATION_MAX, ENTERPRISE_ONBOARDING_SFDC_ID_MAX_LENGTH, ENTERPRISE_ONBOARDING_TERM_MAX_MONTHS, ENTERPRISE_ONBOARDING_TERM_MIN_MONTHS, EXTEND_TRIAL_MAX_DAYS, EXTEND_TRIAL_MIN_DAYS, GENERATION_VERSION_VALUE_MAX_LENGTH, GENERATION_VERSIONS_MAX_GENERATIONS, isApprovalOverridable, isCalendarDay, isLlmSpendBelowTopUpThreshold, LLM_BUDGET_TOP_UP_THRESHOLD, ORG_LIMIT_TEXT_MAX_LENGTH, PERSONAL_ORGANIZATION_MAX_PER_REQUESTER, PERSONAL_ORGANIZATION_NAME_MAX_LENGTH, PERSONAL_ORGANIZATION_NAME_MIN_LENGTH, PLATFORM_ROLE_CHANGE_MAX_ROLES, PURGE_USERS_MAX_USERS, PURGE_USERS_REQUIRED_PERMISSIONS, REMOVE_ORG_MEMBER_REQUIRED_PERMISSIONS, USER_METADATA_EXPECTED_MAX_LENGTH, USER_METADATA_MAX_LENGTH, } from './approvals/use-cases.const.js';
|
|
39
39
|
export { CHART_DAY_GRAIN_MAX_DAYS, CHART_FILTER_MAX_LENGTH, CHART_GRAIN_DEFAULT, CHART_GRAINS, CHART_ID_MAX_LENGTH, CHART_METRICS, CHART_OTHER_SERIES_KEY, CHART_QUERY_MAX_LENGTH, CHART_TOP_DEFAULT, CHART_TOP_MAX, CHART_UNKNOWN_SERIES_KEY, CHART_WINDOW_AMOUNT_MAX, CHART_WINDOW_DEFAULT, CHART_WINDOW_UNITS, type ChartDimensionSpec, type ChartGrain, type ChartMetricSpec, type ChartPoint, type ChartQueryCheck, ChartQueryError, type ChartQueryErrorKind, type ChartQueryOptions, type ChartResult, type ChartSeries, type ChartSpec, type ChartUnit, type ChartWindow, type ChartWindowUnit, chartBucketStart, chartToday, chartWindowRange, findChartDimension, findChartMetric, formatChartSpec, isChartQueryError, parseChartQuery, readChartSpec, validateChartSpec, } from './charts/index.js';
|
|
40
40
|
export { DASHBOARD_TILE_DEFAULT_SIZE, dashboardDefinitionBytes, dashboardDefinitionFits, dashboardTileDefaultSize, emptyDashboardDefinition, isSafeDashboardLink, placeNewTile, placeNewTiles, tilesOverlap, toStoredDashboardDefinition, upgradeDashboardDefinition, } from './dashboards/definition.js';
|
|
41
41
|
export type { ALERT_SUBSCRIPTION_REPORT_TYPES, ALERT_SUBSCRIPTION_TYPES, AlertSubscriptionDto, AlertSubscriptionEntryDto, AlertSubscriptionWebhookAuth, CheckFailedReason, } from './dtos/AlertSubscription.dto.js';
|
|
@@ -180,10 +180,11 @@ export type { EnvVarEntry } from './utils/envVars.js';
|
|
|
180
180
|
export { parseEnvVars, serializeEnvVars } from './utils/envVars.js';
|
|
181
181
|
export { deriveFailoverKeyPolicyPrincipals, type FailoverKeyPolicyPrincipals, } from './utils/failoverKeyPolicy.utils.js';
|
|
182
182
|
export type { JvmOptionsModificationKey, ParsedJvmOption, } from './utils/jvmOptions.js';
|
|
183
|
-
export { addsEnvVarsOverrideValue, isJvmOptionsModificationKey, isUnderJvmSpec, JVM_OPTION_MAX_LENGTH, JVM_OPTION_PATTERN, JVM_OPTIONS_MAX_ITEMS, JVM_OPTIONS_MODIFICATION_KEYS, JVM_OPTIONS_TARGETS, joinJvmOptions, parseJvmOption, requiresEnvVarsOverride, splitJvmOptions, validateJvmOptions, validateJvmOptionsValue, } from './utils/jvmOptions.js';
|
|
183
|
+
export { addsEnvVarsOverrideValue, isJvmOptionsModificationKey, isUnderJvmSpec, isValidJvmOptionsPlanValue, JVM_OPTION_MAX_LENGTH, JVM_OPTION_PATTERN, JVM_OPTIONS_MAX_ITEMS, JVM_OPTIONS_MODIFICATION_KEYS, JVM_OPTIONS_TARGETS, joinJvmOptions, jvmOptionsOfPlanValue, parseJvmOption, requiresEnvVarsOverride, splitJvmOptions, validateJvmOptions, validateJvmOptionsPlanValue, validateJvmOptionsValue, } from './utils/jvmOptions.js';
|
|
184
184
|
export { KMS_ARN, KMS_MRK_ARN, type KmsArnValidationError, type ParsedKmsArn, parseKmsArn, validateKmsArnForRegion, } from './utils/kmsArn.utils.js';
|
|
185
185
|
export { validateLabels } from './utils/labelValidator.utils.js';
|
|
186
186
|
export { ObjectMergeUtils } from './utils/objectMerge.utils.js';
|
|
187
|
+
export { getAtPath } from './utils/objectPath.utils.js';
|
|
187
188
|
export { computeOrgStartDate, type OrgStartDateInput, } from './utils/orgStartDate.utils.js';
|
|
188
189
|
export { getPermissionsByRoles, getUserPermissionsForOrg, } from './utils/orgs/OrgHelper.js';
|
|
189
190
|
export type { PasswordPolicyRequest, PasswordPolicyResult, } from './utils/PasswordPolicy.js';
|
package/dist/index.js
CHANGED
|
@@ -251,6 +251,7 @@ import {
|
|
|
251
251
|
PLATFORM_ROLE_CHANGE_MAX_ROLES,
|
|
252
252
|
PURGE_USERS_MAX_USERS,
|
|
253
253
|
PURGE_USERS_REQUIRED_PERMISSIONS,
|
|
254
|
+
REMOVE_ORG_MEMBER_REQUIRED_PERMISSIONS,
|
|
254
255
|
USER_METADATA_EXPECTED_MAX_LENGTH,
|
|
255
256
|
USER_METADATA_MAX_LENGTH
|
|
256
257
|
} from "./approvals/use-cases.const.js";
|
|
@@ -584,16 +585,19 @@ import {
|
|
|
584
585
|
addsEnvVarsOverrideValue,
|
|
585
586
|
isJvmOptionsModificationKey,
|
|
586
587
|
isUnderJvmSpec,
|
|
588
|
+
isValidJvmOptionsPlanValue,
|
|
587
589
|
JVM_OPTION_MAX_LENGTH,
|
|
588
590
|
JVM_OPTION_PATTERN,
|
|
589
591
|
JVM_OPTIONS_MAX_ITEMS,
|
|
590
592
|
JVM_OPTIONS_MODIFICATION_KEYS,
|
|
591
593
|
JVM_OPTIONS_TARGETS,
|
|
592
594
|
joinJvmOptions,
|
|
595
|
+
jvmOptionsOfPlanValue,
|
|
593
596
|
parseJvmOption,
|
|
594
597
|
requiresEnvVarsOverride,
|
|
595
598
|
splitJvmOptions,
|
|
596
599
|
validateJvmOptions,
|
|
600
|
+
validateJvmOptionsPlanValue,
|
|
597
601
|
validateJvmOptionsValue
|
|
598
602
|
} from "./utils/jvmOptions.js";
|
|
599
603
|
import {
|
|
@@ -604,6 +608,7 @@ import {
|
|
|
604
608
|
} from "./utils/kmsArn.utils.js";
|
|
605
609
|
import { validateLabels } from "./utils/labelValidator.utils.js";
|
|
606
610
|
import { ObjectMergeUtils } from "./utils/objectMerge.utils.js";
|
|
611
|
+
import { getAtPath } from "./utils/objectPath.utils.js";
|
|
607
612
|
import {
|
|
608
613
|
computeOrgStartDate
|
|
609
614
|
} from "./utils/orgStartDate.utils.js";
|
|
@@ -934,6 +939,7 @@ export {
|
|
|
934
939
|
PURGE_USERS_MAX_USERS,
|
|
935
940
|
PURGE_USERS_REQUIRED_PERMISSIONS,
|
|
936
941
|
PermissionsForOrganizationRole,
|
|
942
|
+
REMOVE_ORG_MEMBER_REQUIRED_PERMISSIONS,
|
|
937
943
|
RESOURCE_BASED_AUTHORIZATIONS_MIN_VERSION,
|
|
938
944
|
REST_API_URL_TRANSFORM_MIN_VERSION,
|
|
939
945
|
REST_API_V2_MIN_VERSION,
|
|
@@ -1062,6 +1068,7 @@ export {
|
|
|
1062
1068
|
generationWhiteListIds,
|
|
1063
1069
|
getAnalyticsSalesPlanFromOrgSalesPlan,
|
|
1064
1070
|
getApplicableRolesForEmployee,
|
|
1071
|
+
getAtPath,
|
|
1065
1072
|
getCloudProviderLabel,
|
|
1066
1073
|
getCloudProviderRank,
|
|
1067
1074
|
getCurrentEnterpriseTerm,
|
|
@@ -1139,9 +1146,11 @@ export {
|
|
|
1139
1146
|
isValidClientName,
|
|
1140
1147
|
isValidGenerationImage,
|
|
1141
1148
|
isValidHostname,
|
|
1149
|
+
isValidJvmOptionsPlanValue,
|
|
1142
1150
|
isValidPrivateLinkRegion,
|
|
1143
1151
|
joinIdSet,
|
|
1144
1152
|
joinJvmOptions,
|
|
1153
|
+
jvmOptionsOfPlanValue,
|
|
1145
1154
|
likeArgument,
|
|
1146
1155
|
minimumBulkOperationAcks,
|
|
1147
1156
|
minimumBulkOperationEyes,
|
|
@@ -1196,6 +1205,7 @@ export {
|
|
|
1196
1205
|
validateClusterTtlUnlimited,
|
|
1197
1206
|
validateCronSchedule,
|
|
1198
1207
|
validateJvmOptions,
|
|
1208
|
+
validateJvmOptionsPlanValue,
|
|
1199
1209
|
validateJvmOptionsValue,
|
|
1200
1210
|
validateKmsArnForRegion,
|
|
1201
1211
|
validateLabels,
|