@camunda/ccma-shared-types 0.0.3 → 0.0.4
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/constants/secureConnectivity.const.d.ts +1 -0
- package/dist/constants/secureConnectivity.const.js +5 -0
- package/dist/constants/secureConnectivity.const.js.map +7 -0
- package/dist/dtos/AlertSubscription.dto.d.ts +1 -0
- package/dist/dtos/AlertSubscription.dto.js.map +2 -2
- package/dist/dtos/Organization.dto.d.ts +3 -0
- package/dist/dtos/Organization.dto.js +7 -0
- package/dist/dtos/Organization.dto.js.map +3 -3
- package/dist/enums/AuditEntity.enum.d.ts +3 -2
- package/dist/enums/AuditEntity.enum.js +2 -1
- package/dist/enums/AuditEntity.enum.js.map +2 -2
- package/dist/enums/ErrorType.enum.d.ts +1 -0
- package/dist/enums/ErrorType.enum.js +1 -0
- package/dist/enums/ErrorType.enum.js.map +2 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +9 -1
- package/dist/index.js.map +2 -2
- package/dist/types/ConsoleSelfManaged.type.d.ts +0 -1
- package/dist/types/ConsoleSelfManaged.type.js.map +2 -2
- package/dist/utils/string-validation.utils.d.ts +2 -0
- package/dist/utils/string-validation.utils.js +60 -1
- package/dist/utils/string-validation.utils.js.map +2 -2
- package/dist/utils/versionCheck.utils.js +19 -4
- package/dist/utils/versionCheck.utils.js.map +2 -2
- package/package.json +1 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT = 10;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/constants/secureConnectivity.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\nexport const SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT = 10\n"],
|
|
5
|
+
"mappings": "AAMO,MAAM,4CAA4C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/dtos/AlertSubscription.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\nimport type {\n AlertSubscriptionReportType,\n AlertSubscriptionType,\n} from '../enums/AlertSubscription.enum.js'\n\nexport interface AlertSubscriptionDto {\n uuid: string\n userIdOrWebhook: string\n type: AlertSubscriptionType\n report: AlertSubscriptionReportType\n createdBy: string\n createdByName: string\n created: Date\n updatedBy: string\n updatedByName: string\n updated: Date\n lastTimeTriggered?: Date\n numberOfTimesTriggered: number\n}\n\nexport interface AlertSubscriptionEntryDto {\n errorMessage?: string\n errorType?: string\n flowNodeId?: string\n jobKey?: string\n creationTime?: string\n processInstanceId?: string\n processName?: string\n processVersion?: number\n bpmnProcessId?: string\n}\n\nexport const HMAC_SUPPORTED_ALGORITHM = 'sha256'\nexport const HMAC_HEADER_POSITION = 'X-Camunda-Signature-256'\n\nexport const FORBIDDEN_HOSTNAMES_FOR_WEBHOOK_ALERTS = [\n 'https://camunda.com',\n 'https://console.cloud.camunda.io',\n 'https://accounts.cloud.camunda.io',\n 'https://console.camunda.io',\n 'https://accounts.camunda.io',\n 'https://console.ultrawombat.com',\n 'https://console.cloud.ultrawombat.com',\n 'https://accounts.cloud.ultrawombat.com',\n 'https://accounts.ultrawombat.com',\n 'https://console.cloud.dev.ultrawombat.com',\n 'https://console.dev.ultrawombat.com',\n 'https://accounts.cloud.dev.ultrawombat.com',\n]\n\nexport type ALERT_SUBSCRIPTION_TYPES =\n | 'ClusterAlert'\n | 'ProcessAlert'\n | 'AllAlerts'\nexport type ALERT_SUBSCRIPTION_REPORT_TYPES = 'Email' | 'Webhook'\n\nexport interface AlertSubscriptionWebhookAuth {\n hmac?: {\n secret: string\n }\n}\n\nexport type CheckFailedReason =\n | 'urlEmpty'\n | 'urlNoHead'\n | 'generatedHmacNotAccepted'\n | 'urlBad'\n | 'urlPrivate'\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type {\n AlertSubscriptionReportType,\n AlertSubscriptionType,\n} from '../enums/AlertSubscription.enum.js'\n\nexport interface AlertSubscriptionDto {\n uuid: string\n userIdOrWebhook: string\n type: AlertSubscriptionType\n report: AlertSubscriptionReportType\n webhookAuth?: AlertSubscriptionWebhookAuth\n createdBy: string\n createdByName: string\n created: Date\n updatedBy: string\n updatedByName: string\n updated: Date\n lastTimeTriggered?: Date\n numberOfTimesTriggered: number\n}\n\nexport interface AlertSubscriptionEntryDto {\n errorMessage?: string\n errorType?: string\n flowNodeId?: string\n jobKey?: string\n creationTime?: string\n processInstanceId?: string\n processName?: string\n processVersion?: number\n bpmnProcessId?: string\n}\n\nexport const HMAC_SUPPORTED_ALGORITHM = 'sha256'\nexport const HMAC_HEADER_POSITION = 'X-Camunda-Signature-256'\n\nexport const FORBIDDEN_HOSTNAMES_FOR_WEBHOOK_ALERTS = [\n 'https://camunda.com',\n 'https://console.cloud.camunda.io',\n 'https://accounts.cloud.camunda.io',\n 'https://console.camunda.io',\n 'https://accounts.camunda.io',\n 'https://console.ultrawombat.com',\n 'https://console.cloud.ultrawombat.com',\n 'https://accounts.cloud.ultrawombat.com',\n 'https://accounts.ultrawombat.com',\n 'https://console.cloud.dev.ultrawombat.com',\n 'https://console.dev.ultrawombat.com',\n 'https://accounts.cloud.dev.ultrawombat.com',\n]\n\nexport type ALERT_SUBSCRIPTION_TYPES =\n | 'ClusterAlert'\n | 'ProcessAlert'\n | 'AllAlerts'\nexport type ALERT_SUBSCRIPTION_REPORT_TYPES = 'Email' | 'Webhook'\n\nexport interface AlertSubscriptionWebhookAuth {\n hmac?: {\n secret: string\n }\n}\n\nexport type CheckFailedReason =\n | 'urlEmpty'\n | 'urlNoHead'\n | 'generatedHmacNotAccepted'\n | 'urlBad'\n | 'urlPrivate'\n"],
|
|
5
|
+
"mappings": "AAuCO,MAAM,2BAA2B;AACjC,MAAM,uBAAuB;AAE7B,MAAM,yCAAyC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { OrganizationPermissions } from '../types/OrganizationPermission.type.js';
|
|
2
2
|
import type { SalesPlanType } from '../types/SalesPlanType.type.js';
|
|
3
3
|
import type { OrganizationToSalesPlanDto } from './OrganizationToSalesPlan.dto.js';
|
|
4
|
+
export type LicensingModelType = 'legacy' | '2025';
|
|
5
|
+
export declare const VALID_LICENSING_MODELS: readonly LicensingModelType[];
|
|
4
6
|
export interface OrganizationMetadata {
|
|
5
7
|
clickedRequestPaidPlan?: boolean;
|
|
6
8
|
salesForceId?: string;
|
|
7
9
|
enterpriseDevOnly?: boolean;
|
|
8
10
|
awsOnly?: boolean;
|
|
11
|
+
licensingModel?: LicensingModelType;
|
|
9
12
|
autoJoin?: AutoJoinAssignment;
|
|
10
13
|
llm?: {
|
|
11
14
|
tenantKey: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../src/dtos/Organization.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\nimport type { OrganizationPermissions } from '../types/OrganizationPermission.type.js'\nimport type { SalesPlanType } from '../types/SalesPlanType.type.js'\nimport type { OrganizationToSalesPlanDto } from './OrganizationToSalesPlan.dto.js'\n\nexport type LicensingModelType = 'legacy' | '2025'\n\nexport const VALID_LICENSING_MODELS: readonly LicensingModelType[] = [\n 'legacy',\n '2025',\n] as const\n\nexport interface OrganizationMetadata {\n clickedRequestPaidPlan?: boolean\n salesForceId?: string\n enterpriseDevOnly?: boolean\n awsOnly?: boolean\n licensingModel?: LicensingModelType\n autoJoin?: AutoJoinAssignment\n llm?: {\n tenantKey: string\n teamId: string\n created: number\n }\n}\n\nexport interface AutoJoinAssignment {\n departments: Array<{ hibobId: string; roles: string[] }>\n divisions: Array<{ hibobId: string; roles: string[] }>\n subdivisions: Array<{ hibobId: string; roles: string[] }>\n}\nexport interface OrganizationDto {\n uuid: string\n name: string\n organizationToSalesPlan?: OrganizationToSalesPlanDto\n permissions?: OrganizationPermissions\n metadata?: OrganizationMetadata\n created: Date\n internal: boolean\n}\n\nexport interface OrgOwner {\n owner: string\n email: string\n first: string\n last: string\n}\n\nexport interface OrgWithNameAndSalesPlan {\n uuid: string\n name: string | undefined\n salesPlanName: string | undefined\n salesPlanUuid: string | undefined\n salesPlanType: SalesPlanType | undefined\n}\n"],
|
|
5
|
+
"mappings": "AAYO,MAAM,yBAAwD;AAAA,EACnE;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ export declare enum AuditEntity {
|
|
|
3
3
|
CLIENT = "Client",
|
|
4
4
|
ALERT_SUBSCRIPTION = "Alert Subscription",
|
|
5
5
|
API_CLIENT = "API Client",
|
|
6
|
-
SECURE_CONNECTIVITY_CRD = "
|
|
6
|
+
SECURE_CONNECTIVITY_CRD = "Private networking",
|
|
7
7
|
BYOM_CLIENT = "External Monitoring Client",
|
|
8
8
|
BYOM_CRD = "External Monitoring",
|
|
9
9
|
INVITATION = "Invitation",
|
|
@@ -16,7 +16,8 @@ export declare enum AuditEntity {
|
|
|
16
16
|
USAGE_ALERT = "Usage Alert",
|
|
17
17
|
ACCEPT_BETA_TERMS = "Accept Alpha terms",
|
|
18
18
|
TOGGLE_BETA_FEATURE = "Toggle Alpha feature",
|
|
19
|
-
CONNECTOR_SECRET = "Connector Secret"
|
|
19
|
+
CONNECTOR_SECRET = "Connector Secret",
|
|
20
|
+
CLUSTER_MODIFICATION = "Cluster Modification"
|
|
20
21
|
}
|
|
21
22
|
export declare enum AuditEntityAttribute {
|
|
22
23
|
CLUSTER_CLUSTER_PLAN = "ClusterPlan",
|
|
@@ -3,7 +3,7 @@ var AuditEntity = /* @__PURE__ */ ((AuditEntity2) => {
|
|
|
3
3
|
AuditEntity2["CLIENT"] = "Client";
|
|
4
4
|
AuditEntity2["ALERT_SUBSCRIPTION"] = "Alert Subscription";
|
|
5
5
|
AuditEntity2["API_CLIENT"] = "API Client";
|
|
6
|
-
AuditEntity2["SECURE_CONNECTIVITY_CRD"] = "
|
|
6
|
+
AuditEntity2["SECURE_CONNECTIVITY_CRD"] = "Private networking";
|
|
7
7
|
AuditEntity2["BYOM_CLIENT"] = "External Monitoring Client";
|
|
8
8
|
AuditEntity2["BYOM_CRD"] = "External Monitoring";
|
|
9
9
|
AuditEntity2["INVITATION"] = "Invitation";
|
|
@@ -17,6 +17,7 @@ var AuditEntity = /* @__PURE__ */ ((AuditEntity2) => {
|
|
|
17
17
|
AuditEntity2["ACCEPT_BETA_TERMS"] = "Accept Alpha terms";
|
|
18
18
|
AuditEntity2["TOGGLE_BETA_FEATURE"] = "Toggle Alpha feature";
|
|
19
19
|
AuditEntity2["CONNECTOR_SECRET"] = "Connector Secret";
|
|
20
|
+
AuditEntity2["CLUSTER_MODIFICATION"] = "Cluster Modification";
|
|
20
21
|
return AuditEntity2;
|
|
21
22
|
})(AuditEntity || {});
|
|
22
23
|
var AuditEntityAttribute = /* @__PURE__ */ ((AuditEntityAttribute2) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/enums/AuditEntity.enum.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\n/* eslint-disable no-shadow */\nexport enum AuditEntity {\n CLUSTER = 'Cluster',\n CLIENT = 'Client',\n ALERT_SUBSCRIPTION = 'Alert Subscription',\n API_CLIENT = 'API Client',\n SECURE_CONNECTIVITY_CRD = '
|
|
5
|
-
"mappings": "AAOO,IAAK,cAAL,kBAAKA,iBAAL;AACL,EAAAA,aAAA,aAAU;AACV,EAAAA,aAAA,YAAS;AACT,EAAAA,aAAA,wBAAqB;AACrB,EAAAA,aAAA,gBAAa;AACb,EAAAA,aAAA,6BAA0B;AAC1B,EAAAA,aAAA,iBAAc;AACd,EAAAA,aAAA,cAAW;AACX,EAAAA,aAAA,gBAAa;AACb,EAAAA,aAAA,YAAS;AACT,EAAAA,aAAA,kBAAe;AACf,EAAAA,aAAA,gBAAa;AACb,EAAAA,aAAA,kBAAe;AACf,EAAAA,aAAA,gBAAa;AACb,EAAAA,aAAA,aAAU;AACV,EAAAA,aAAA,iBAAc;AACd,EAAAA,aAAA,uBAAoB;AACpB,EAAAA,aAAA,yBAAsB;AACtB,EAAAA,aAAA,sBAAmB;
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\n/* eslint-disable no-shadow */\nexport enum AuditEntity {\n CLUSTER = 'Cluster',\n CLIENT = 'Client',\n ALERT_SUBSCRIPTION = 'Alert Subscription',\n API_CLIENT = 'API Client',\n SECURE_CONNECTIVITY_CRD = 'Private networking',\n BYOM_CLIENT = 'External Monitoring Client',\n BYOM_CRD = 'External Monitoring',\n INVITATION = 'Invitation',\n MEMBER = 'Member',\n ORGANIZATION = 'Organization',\n SALES_PLAN = 'SalesPlan',\n CLUSTER_PLAN = 'ClusterPlan',\n GENERATION = 'Generation',\n BILLING = 'Billing',\n USAGE_ALERT = 'Usage Alert',\n ACCEPT_BETA_TERMS = 'Accept Alpha terms',\n TOGGLE_BETA_FEATURE = 'Toggle Alpha feature',\n CONNECTOR_SECRET = 'Connector Secret',\n CLUSTER_MODIFICATION = 'Cluster Modification',\n}\n\nexport enum AuditEntityAttribute {\n CLUSTER_CLUSTER_PLAN = 'ClusterPlan',\n CLUSTER_GENERATION = 'Generation',\n CLUSTER_NAME = 'Name',\n CLUSTER_RBA = 'Resource Based Authorizations',\n CLUSTER_ENFORCE_GROUPS = 'Enforce Group Management',\n CLUSTER_PLAYMODE = 'Cluster Play Mode',\n CLUSTER_MCP_ENABLED = 'MCP Support',\n CLUSTER_SWAGGER = 'Cluster Swagger',\n CLUSTER_BUSINESS_ID_UNIQUENESS = 'Business ID Uniqueness',\n CLUSTER_ENABLE_LOW_LATENCY = 'Enable low latency',\n CLUSTER_AUTOUPDATE = 'Auto Update',\n CLUSTER_OWNER = 'Owner',\n CLUSTER_STATUS = 'Status',\n CLUSTER_TASKLIST_V2_ENABLED = 'Taklist V2 Enabled',\n CLUSTER_AUDIT_LOG = 'Audit Log',\n INVITATION_ROLE = 'Role',\n ORGANIZATION_NAME = 'Name',\n SALES_PLAN = 'Plan',\n BILLING_RESERVATION = 'Reservation',\n BILLING_GENERAL_USERS = 'GeneralUsers', // paid cc legaly - only kept for audit logs compatibility\n MEMBER_ROLE = 'Role',\n USAGE_ALERT_THRESHOLD = 'Threshold',\n USAGE_ALERT_STATUS = 'Status',\n CLUSTER_AUDIT_LOGS = 'Audit Logging',\n LLM_BUDGET = 'LLM Budget',\n LLM_KEY_BLOCKED = 'LLM Key Blocked',\n}\n"],
|
|
5
|
+
"mappings": "AAOO,IAAK,cAAL,kBAAKA,iBAAL;AACL,EAAAA,aAAA,aAAU;AACV,EAAAA,aAAA,YAAS;AACT,EAAAA,aAAA,wBAAqB;AACrB,EAAAA,aAAA,gBAAa;AACb,EAAAA,aAAA,6BAA0B;AAC1B,EAAAA,aAAA,iBAAc;AACd,EAAAA,aAAA,cAAW;AACX,EAAAA,aAAA,gBAAa;AACb,EAAAA,aAAA,YAAS;AACT,EAAAA,aAAA,kBAAe;AACf,EAAAA,aAAA,gBAAa;AACb,EAAAA,aAAA,kBAAe;AACf,EAAAA,aAAA,gBAAa;AACb,EAAAA,aAAA,aAAU;AACV,EAAAA,aAAA,iBAAc;AACd,EAAAA,aAAA,uBAAoB;AACpB,EAAAA,aAAA,yBAAsB;AACtB,EAAAA,aAAA,sBAAmB;AACnB,EAAAA,aAAA,0BAAuB;AAnBb,SAAAA;AAAA,GAAA;AAsBL,IAAK,uBAAL,kBAAKC,0BAAL;AACL,EAAAA,sBAAA,0BAAuB;AACvB,EAAAA,sBAAA,wBAAqB;AACrB,EAAAA,sBAAA,kBAAe;AACf,EAAAA,sBAAA,iBAAc;AACd,EAAAA,sBAAA,4BAAyB;AACzB,EAAAA,sBAAA,sBAAmB;AACnB,EAAAA,sBAAA,yBAAsB;AACtB,EAAAA,sBAAA,qBAAkB;AAClB,EAAAA,sBAAA,oCAAiC;AACjC,EAAAA,sBAAA,gCAA6B;AAC7B,EAAAA,sBAAA,wBAAqB;AACrB,EAAAA,sBAAA,mBAAgB;AAChB,EAAAA,sBAAA,oBAAiB;AACjB,EAAAA,sBAAA,iCAA8B;AAC9B,EAAAA,sBAAA,uBAAoB;AACpB,EAAAA,sBAAA,qBAAkB;AAClB,EAAAA,sBAAA,uBAAoB;AACpB,EAAAA,sBAAA,gBAAa;AACb,EAAAA,sBAAA,yBAAsB;AACtB,EAAAA,sBAAA,2BAAwB;AACxB,EAAAA,sBAAA,iBAAc;AACd,EAAAA,sBAAA,2BAAwB;AACxB,EAAAA,sBAAA,wBAAqB;AACrB,EAAAA,sBAAA,wBAAqB;AACrB,EAAAA,sBAAA,gBAAa;AACb,EAAAA,sBAAA,qBAAkB;AA1BR,SAAAA;AAAA,GAAA;",
|
|
6
6
|
"names": ["AuditEntity", "AuditEntityAttribute"]
|
|
7
7
|
}
|
|
@@ -5,6 +5,7 @@ var ErrorType = /* @__PURE__ */ ((ErrorType2) => {
|
|
|
5
5
|
ErrorType2[ErrorType2["NotFound"] = 404] = "NotFound";
|
|
6
6
|
ErrorType2[ErrorType2["Conflict"] = 409] = "Conflict";
|
|
7
7
|
ErrorType2[ErrorType2["PreconditionFailed"] = 412] = "PreconditionFailed";
|
|
8
|
+
ErrorType2[ErrorType2["IAmATeapot"] = 418] = "IAmATeapot";
|
|
8
9
|
ErrorType2[ErrorType2["TooManyRequests"] = 429] = "TooManyRequests";
|
|
9
10
|
ErrorType2[ErrorType2["Internal"] = 500] = "Internal";
|
|
10
11
|
ErrorType2[ErrorType2["NotImplemented"] = 501] = "NotImplemented";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/enums/ErrorType.enum.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\n// eslint-disable-next-line no-shadow\nexport enum ErrorType {\n BadRequest = 400,\n Unauthorized = 401,\n Forbidden = 403,\n NotFound = 404,\n Conflict = 409,\n PreconditionFailed = 412,\n TooManyRequests = 429,\n Internal = 500,\n NotImplemented = 501,\n ServiceUnavailable = 503,\n}\n"],
|
|
5
|
-
"mappings": "AAOO,IAAK,YAAL,kBAAKA,eAAL;AACL,EAAAA,sBAAA,gBAAa,OAAb;AACA,EAAAA,sBAAA,kBAAe,OAAf;AACA,EAAAA,sBAAA,eAAY,OAAZ;AACA,EAAAA,sBAAA,cAAW,OAAX;AACA,EAAAA,sBAAA,cAAW,OAAX;AACA,EAAAA,sBAAA,wBAAqB,OAArB;AACA,EAAAA,sBAAA,qBAAkB,OAAlB;AACA,EAAAA,sBAAA,cAAW,OAAX;AACA,EAAAA,sBAAA,oBAAiB,OAAjB;AACA,EAAAA,sBAAA,wBAAqB,OAArB;
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\n// eslint-disable-next-line no-shadow\nexport enum ErrorType {\n BadRequest = 400,\n Unauthorized = 401,\n Forbidden = 403,\n NotFound = 404,\n Conflict = 409,\n PreconditionFailed = 412,\n IAmATeapot = 418,\n TooManyRequests = 429,\n Internal = 500,\n NotImplemented = 501,\n ServiceUnavailable = 503,\n}\n"],
|
|
5
|
+
"mappings": "AAOO,IAAK,YAAL,kBAAKA,eAAL;AACL,EAAAA,sBAAA,gBAAa,OAAb;AACA,EAAAA,sBAAA,kBAAe,OAAf;AACA,EAAAA,sBAAA,eAAY,OAAZ;AACA,EAAAA,sBAAA,cAAW,OAAX;AACA,EAAAA,sBAAA,cAAW,OAAX;AACA,EAAAA,sBAAA,wBAAqB,OAArB;AACA,EAAAA,sBAAA,gBAAa,OAAb;AACA,EAAAA,sBAAA,qBAAkB,OAAlB;AACA,EAAAA,sBAAA,cAAW,OAAX;AACA,EAAAA,sBAAA,oBAAiB,OAAjB;AACA,EAAAA,sBAAA,wBAAqB,OAArB;AAXU,SAAAA;AAAA,GAAA;",
|
|
6
6
|
"names": ["ErrorType"]
|
|
7
7
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type { Stage } from './constants/misc.const.js';
|
|
|
3
3
|
export { CONSOLE_API_USER_ID, FIRSTNAME_LASTNAME_MAX_LENGTH, HOTBACKUP_MIN_CREATE_PERIOD, MAX_HARDWARE_PACKAGE_COUNT, MAX_LENGTH_CLUSTER_NAME, MINIMUM_EYEPAIRS, NAMES_OF_ENTERPRISE_SALESPLANS_WITH_SLEEPING_CLUSTERS, SECRETS_MAX_LENGTH, SENTRY, STARTING_PRICE_PER_MONTH_IN_EURO, TEMPORARY_CLUSTER_NAME, } from './constants/misc.const.js';
|
|
4
4
|
export { getGatewayPropertyHint, getGatewayPropertyPath, isAffectedByStreamlinedDeployment, isPre89AffectedPath, PRE89_AFFECTED_PATHS, PRE89_AFFECTED_PROPERTY_PREFIXES, PRE89_GATEWAY_PROPERTY_PATHS, PRE89_GATEWAY_RESOURCE_PREFIXES, } from './constants/pre89EnvVarMapping.const.js';
|
|
5
5
|
export { PRIVATE_LINK_REGIONS } from './constants/privateLinkRegions.const.js';
|
|
6
|
+
export { SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT } from './constants/secureConnectivity.const.js';
|
|
6
7
|
export type { ALERT_SUBSCRIPTION_REPORT_TYPES, ALERT_SUBSCRIPTION_TYPES, AlertSubscriptionDto, AlertSubscriptionEntryDto, AlertSubscriptionWebhookAuth, CheckFailedReason, } from './dtos/AlertSubscription.dto.js';
|
|
7
8
|
export { FORBIDDEN_HOSTNAMES_FOR_WEBHOOK_ALERTS, HMAC_HEADER_POSITION, HMAC_SUPPORTED_ALGORITHM, } from './dtos/AlertSubscription.dto.js';
|
|
8
9
|
export type { AuditDto } from './dtos/Audit.dto.js';
|
|
@@ -20,7 +21,8 @@ export { type GenerationDto, type GenerationWithClusterCountDto, sortGenerationB
|
|
|
20
21
|
export type { Hdp } from './dtos/Hdp.dto.js';
|
|
21
22
|
export type { K8sConfig, K8sConfigLegacyFormat, K8sContext, K8sContextDto, } from './dtos/K8sContext.dto.js';
|
|
22
23
|
export type { MetaDto } from './dtos/Meta.dto.js';
|
|
23
|
-
export type { AutoJoinAssignment, OrganizationDto, OrganizationMetadata, OrgOwner, OrgWithNameAndSalesPlan, } from './dtos/Organization.dto.js';
|
|
24
|
+
export type { AutoJoinAssignment, LicensingModelType, OrganizationDto, OrganizationMetadata, OrgOwner, OrgWithNameAndSalesPlan, } from './dtos/Organization.dto.js';
|
|
25
|
+
export { VALID_LICENSING_MODELS } from './dtos/Organization.dto.js';
|
|
24
26
|
export type { OrganizationMemberDto } from './dtos/OrganizationMember.dto.js';
|
|
25
27
|
export type { OrganizationToSalesPlanDto } from './dtos/OrganizationToSalesPlan.dto.js';
|
|
26
28
|
export type { ClusterLimits, ConsumptionDataItem, Limits, SalesPlanDto, SalesPlanMetadata, } from './dtos/SalesPlan.dto.js';
|
|
@@ -105,7 +107,7 @@ export { getPermissionsByRoles, getUserPermissionsForOrg, } from './utils/orgs/O
|
|
|
105
107
|
export type { PasswordPolicyRequest, PasswordPolicyResult, } from './utils/PasswordPolicy.js';
|
|
106
108
|
export { MAXLENGTH as PASSWORD_POLICY_MAXLENGTH, MINLENGTH as PASSWORD_POLICY_MINLENGTH, passwordPolicyCheck, } from './utils/PasswordPolicy.js';
|
|
107
109
|
export { allSettledResultsCounts, getFulfilledPromises, getRejectedPromises, getSettledSummary, } from './utils/settledPromises.util.js';
|
|
108
|
-
export { isValidCIDR, isValidCIDRList, isValidClientName, isValidHostname, } from './utils/string-validation.utils.js';
|
|
110
|
+
export { isValidAwsArn, isValidCIDR, isValidCIDRList, isValidClientName, isValidHostname, isValidPrivateLinkRegion, } from './utils/string-validation.utils.js';
|
|
109
111
|
export { extractCamundaUserEmail, guessName, isCamundaUserId, } from './utils/user.utils.js';
|
|
110
112
|
export { checkVersion, VersionCheckOperator, } from './utils/versionCheck.utils.js';
|
|
111
113
|
export { default as CAMUNDI_PERMISSION_RULES } from './config/camundi-permission-rules.js';
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
PRE89_GATEWAY_RESOURCE_PREFIXES
|
|
24
24
|
} from "./constants/pre89EnvVarMapping.const.js";
|
|
25
25
|
import { PRIVATE_LINK_REGIONS } from "./constants/privateLinkRegions.const.js";
|
|
26
|
+
import { SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT } from "./constants/secureConnectivity.const.js";
|
|
26
27
|
import {
|
|
27
28
|
FORBIDDEN_HOSTNAMES_FOR_WEBHOOK_ALERTS,
|
|
28
29
|
HMAC_HEADER_POSITION,
|
|
@@ -31,6 +32,7 @@ import {
|
|
|
31
32
|
import {
|
|
32
33
|
sortGenerationBySemverOfZeebe
|
|
33
34
|
} from "./dtos/Generations.dto.js";
|
|
35
|
+
import { VALID_LICENSING_MODELS } from "./dtos/Organization.dto.js";
|
|
34
36
|
import {
|
|
35
37
|
allClusterBasedLimits,
|
|
36
38
|
allSalesPlanLimits,
|
|
@@ -164,10 +166,12 @@ import {
|
|
|
164
166
|
getSettledSummary
|
|
165
167
|
} from "./utils/settledPromises.util.js";
|
|
166
168
|
import {
|
|
169
|
+
isValidAwsArn,
|
|
167
170
|
isValidCIDR,
|
|
168
171
|
isValidCIDRList,
|
|
169
172
|
isValidClientName,
|
|
170
|
-
isValidHostname
|
|
173
|
+
isValidHostname,
|
|
174
|
+
isValidPrivateLinkRegion
|
|
171
175
|
} from "./utils/string-validation.utils.js";
|
|
172
176
|
import {
|
|
173
177
|
extractCamundaUserEmail,
|
|
@@ -259,6 +263,7 @@ export {
|
|
|
259
263
|
SAFE_ROLES,
|
|
260
264
|
SECOND,
|
|
261
265
|
SECRETS_MAX_LENGTH,
|
|
266
|
+
SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT,
|
|
262
267
|
SENTRY,
|
|
263
268
|
SRE_TEAM_EMAILS,
|
|
264
269
|
STARTING_PRICE_PER_MONTH_IN_EURO,
|
|
@@ -275,6 +280,7 @@ export {
|
|
|
275
280
|
UsageAlertMetric,
|
|
276
281
|
UsageAlertThresholdLimits,
|
|
277
282
|
UserMetadataEvent,
|
|
283
|
+
VALID_LICENSING_MODELS,
|
|
278
284
|
VersionCheckOperator,
|
|
279
285
|
WEEK,
|
|
280
286
|
accountsUserFeaturesFromPermissions,
|
|
@@ -310,10 +316,12 @@ export {
|
|
|
310
316
|
isIsBulkClusterGenerationUpdateIten,
|
|
311
317
|
isManager,
|
|
312
318
|
isPre89AffectedPath,
|
|
319
|
+
isValidAwsArn,
|
|
313
320
|
isValidCIDR,
|
|
314
321
|
isValidCIDRList,
|
|
315
322
|
isValidClientName,
|
|
316
323
|
isValidHostname,
|
|
324
|
+
isValidPrivateLinkRegion,
|
|
317
325
|
organizationAssignmentsToEnterpriseConnectionMetadata,
|
|
318
326
|
passwordPolicyCheck,
|
|
319
327
|
sortByAvailabilityClasses,
|
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 { DAY, HOUR, MINUTE, SECOND, WEEK } from './constants/duration.const.js'\nexport type { Stage } from './constants/misc.const.js'\nexport {\n CONSOLE_API_USER_ID,\n FIRSTNAME_LASTNAME_MAX_LENGTH,\n HOTBACKUP_MIN_CREATE_PERIOD,\n MAX_HARDWARE_PACKAGE_COUNT,\n MAX_LENGTH_CLUSTER_NAME,\n MINIMUM_EYEPAIRS,\n NAMES_OF_ENTERPRISE_SALESPLANS_WITH_SLEEPING_CLUSTERS,\n SECRETS_MAX_LENGTH,\n SENTRY,\n STARTING_PRICE_PER_MONTH_IN_EURO,\n TEMPORARY_CLUSTER_NAME,\n} from './constants/misc.const.js'\n\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'\n\nexport { PRIVATE_LINK_REGIONS } from './constants/privateLinkRegions.const.js'\n\n// ============================================================================\n// DTOs - Types (interfaces and type aliases)\n// ============================================================================\n\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\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'\n\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 { ClusterIpWhitelistDto } from './dtos/ClusterIpWhitelist.dto.js'\nexport type { ClusterPlanDto } from './dtos/ClusterPlan.dto.js'\nexport type { ClusterPlanTypeDto } from './dtos/ClusterPlanType.dto.js'\nexport type { CommonClusterDto } from './dtos/CommonCluster.dto.js'\nexport type { ConsoleClusterDto } from './dtos/ConsoleCluster.dto.js'\nexport type { EarlyAccessFeatureDto } from './dtos/EarlyAccessFeature.dto.js'\n// Functions\nexport {\n type GenerationDto,\n type GenerationWithClusterCountDto,\n sortGenerationBySemverOfZeebe,\n} from './dtos/Generations.dto.js'\n// Namespace (type-only - contains only interfaces)\nexport type { Hdp } from './dtos/Hdp.dto.js'\nexport type {\n K8sConfig,\n K8sConfigLegacyFormat,\n K8sContext,\n K8sContextDto,\n} from './dtos/K8sContext.dto.js'\nexport type { MetaDto } from './dtos/Meta.dto.js'\nexport type {\n AutoJoinAssignment,\n OrganizationDto,\n OrganizationMetadata,\n OrgOwner,\n OrgWithNameAndSalesPlan,\n} from './dtos/Organization.dto.js'\nexport type { OrganizationMemberDto } from './dtos/OrganizationMember.dto.js'\nexport type { OrganizationToSalesPlanDto } from './dtos/OrganizationToSalesPlan.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 deprecatedLimit,\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'\n\nexport type { SignupDto } from './dtos/Signup.dto.js'\n\n// UsageAlert.dto - Types\nexport type { UsageAlertDto } from './dtos/UsageAlert.dto.js'\n\n// UsageAlert.dto - Values (enum and constants)\nexport {\n UsageAlertInitValues,\n UsageAlertMetric,\n UsageAlertThresholdLimits,\n} from './dtos/UsageAlert.dto.js'\n\nexport type { UserMetaDataDto } from './dtos/UserMetaData.dto.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 OrganizationRole,\n UnassignableOrganizationRole,\n} from './enums/OrganizationRole.enum.js'\nexport { SseEntity, SseType } from './enums/Sse.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} 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)\nexport {\n C8_ENGINEERING_MANAGERS_EMAILS,\n CLOUD_TEAM_EMAILS,\n CONSULTING_MANAGER_EMAILS,\n CSM_MANAGER_EMAIL,\n PLATFORM_SM_EMAILS,\n PROFILES,\n SRE_TEAM_EMAILS,\n SUPPORT_MANAGERS_EMAILS,\n} from './permissions/profile.permissions.js'\nexport { expandRolesToPermissions } 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'\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 ImmutableZeebeClusterVersionsDto,\n MutableZeebeClusterVersionsDto,\n ZeebeClusterVersionsDto,\n} from './types/C8ClusterComponentVersions.type.js'\n// C8ClusterComponentVersions.type - Values (constants)\nexport {\n AllThings,\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'\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 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 ClusterUsageDataRequest,\n ClusterUsageMetricsAddRequestByMetricHeap,\n ClusterUsageMetricsData,\n ClusterUsageMetricsFilter,\n ClusterUsageOrgStartDate,\n} from './types/ClusterUsageMetrics.type.js'\n// Namespace with runtime values (consts, functions, enums)\nexport { ConsoleSM } from './types/ConsoleSelfManaged.type.js'\n// Namespace (type-only - contains only interfaces)\nexport type { ConsoleSMAdminApi } from './types/ConsoleSelfManagedAdminApi.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'\n// hdp.types - Types (interfaces)\nexport type {\n AlertSubscription as HdpAlertSubscription,\n Audit as HdpAudit,\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 HdpEntity,\n HdpPrometheusDataCapacityDataPoint,\n Invite as HdpInvite,\n LlmSpend as HdpLlmSpend,\n Organization as HdpOrganization,\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} 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'\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 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\n// Namespace (type-only - contains only interfaces)\nexport type { AccountsStats } from './types/Stats.types.js'\n\n// Survey.type - Types\nexport type { Persona, SurveyDto } from './types/Survey.type.js'\n\n// Survey.type - Values (enum)\nexport { FeedbackType } from './types/Survey.type.js'\n\n// SuspendStrategy.type - Types\nexport type {\n GetSuspendStrategyOptions,\n SuspendStrategy,\n} from './types/SuspendStrategy.type.js'\n\n// SuspendStrategy.type - Values (function)\nexport { getSuspendStrategy } from './types/SuspendStrategy.type.js'\n\n// Namespace (runtime value)\nexport { Telemetry } from './types/Telemetry.type.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 { ConsoleSelfManagedUtils } from './utils/console-sm.utils.js'\n\n// enterprise-connection.utils - Types\nexport type { EnterpriseConnectionOrganizationAssignment } from './utils/enterprise-connection.utils.js'\n\n// enterprise-connection.utils - Values (functions)\nexport {\n enterpriseConnectionMetadataToOrganizationAssignments,\n organizationAssignmentsToEnterpriseConnectionMetadata,\n} from './utils/enterprise-connection.utils.js'\n\nexport { validateLabels } from './utils/labelValidator.utils.js'\nexport { ObjectMergeUtils } from './utils/objectMerge.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'\n\nexport {\n allSettledResultsCounts,\n getFulfilledPromises,\n getRejectedPromises,\n getSettledSummary,\n} from './utils/settledPromises.util.js'\n\nexport {\n isValidCIDR,\n isValidCIDRList,\n isValidClientName,\n isValidHostname,\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 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 isManager,\n} from './utils/camundiPermissionAugmenter.utils.js'\n"],
|
|
5
|
-
"mappings": "AAUA,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,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,4BAA4B;
|
|
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 { DAY, HOUR, MINUTE, SECOND, WEEK } from './constants/duration.const.js'\nexport type { Stage } from './constants/misc.const.js'\nexport {\n CONSOLE_API_USER_ID,\n FIRSTNAME_LASTNAME_MAX_LENGTH,\n HOTBACKUP_MIN_CREATE_PERIOD,\n MAX_HARDWARE_PACKAGE_COUNT,\n MAX_LENGTH_CLUSTER_NAME,\n MINIMUM_EYEPAIRS,\n NAMES_OF_ENTERPRISE_SALESPLANS_WITH_SLEEPING_CLUSTERS,\n SECRETS_MAX_LENGTH,\n SENTRY,\n STARTING_PRICE_PER_MONTH_IN_EURO,\n TEMPORARY_CLUSTER_NAME,\n} from './constants/misc.const.js'\n\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'\n\nexport { PRIVATE_LINK_REGIONS } from './constants/privateLinkRegions.const.js'\nexport { SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT } from './constants/secureConnectivity.const.js'\n\n// ============================================================================\n// DTOs - Types (interfaces and type aliases)\n// ============================================================================\n\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\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'\n\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 { ClusterIpWhitelistDto } from './dtos/ClusterIpWhitelist.dto.js'\nexport type { ClusterPlanDto } from './dtos/ClusterPlan.dto.js'\nexport type { ClusterPlanTypeDto } from './dtos/ClusterPlanType.dto.js'\nexport type { CommonClusterDto } from './dtos/CommonCluster.dto.js'\nexport type { ConsoleClusterDto } from './dtos/ConsoleCluster.dto.js'\nexport type { EarlyAccessFeatureDto } from './dtos/EarlyAccessFeature.dto.js'\n// Functions\nexport {\n type GenerationDto,\n type GenerationWithClusterCountDto,\n sortGenerationBySemverOfZeebe,\n} from './dtos/Generations.dto.js'\n// Namespace (type-only - contains only interfaces)\nexport type { Hdp } from './dtos/Hdp.dto.js'\nexport type {\n K8sConfig,\n K8sConfigLegacyFormat,\n K8sContext,\n K8sContextDto,\n} from './dtos/K8sContext.dto.js'\nexport type { MetaDto } from './dtos/Meta.dto.js'\nexport type {\n AutoJoinAssignment,\n LicensingModelType,\n OrganizationDto,\n OrganizationMetadata,\n OrgOwner,\n OrgWithNameAndSalesPlan,\n} from './dtos/Organization.dto.js'\nexport { VALID_LICENSING_MODELS } from './dtos/Organization.dto.js'\nexport type { OrganizationMemberDto } from './dtos/OrganizationMember.dto.js'\nexport type { OrganizationToSalesPlanDto } from './dtos/OrganizationToSalesPlan.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 deprecatedLimit,\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'\n\nexport type { SignupDto } from './dtos/Signup.dto.js'\n\n// UsageAlert.dto - Types\nexport type { UsageAlertDto } from './dtos/UsageAlert.dto.js'\n\n// UsageAlert.dto - Values (enum and constants)\nexport {\n UsageAlertInitValues,\n UsageAlertMetric,\n UsageAlertThresholdLimits,\n} from './dtos/UsageAlert.dto.js'\n\nexport type { UserMetaDataDto } from './dtos/UserMetaData.dto.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 OrganizationRole,\n UnassignableOrganizationRole,\n} from './enums/OrganizationRole.enum.js'\nexport { SseEntity, SseType } from './enums/Sse.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} 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)\nexport {\n C8_ENGINEERING_MANAGERS_EMAILS,\n CLOUD_TEAM_EMAILS,\n CONSULTING_MANAGER_EMAILS,\n CSM_MANAGER_EMAIL,\n PLATFORM_SM_EMAILS,\n PROFILES,\n SRE_TEAM_EMAILS,\n SUPPORT_MANAGERS_EMAILS,\n} from './permissions/profile.permissions.js'\nexport { expandRolesToPermissions } 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'\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 ImmutableZeebeClusterVersionsDto,\n MutableZeebeClusterVersionsDto,\n ZeebeClusterVersionsDto,\n} from './types/C8ClusterComponentVersions.type.js'\n// C8ClusterComponentVersions.type - Values (constants)\nexport {\n AllThings,\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'\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 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 ClusterUsageDataRequest,\n ClusterUsageMetricsAddRequestByMetricHeap,\n ClusterUsageMetricsData,\n ClusterUsageMetricsFilter,\n ClusterUsageOrgStartDate,\n} from './types/ClusterUsageMetrics.type.js'\n// Namespace with runtime values (consts, functions, enums)\nexport { ConsoleSM } from './types/ConsoleSelfManaged.type.js'\n// Namespace (type-only - contains only interfaces)\nexport type { ConsoleSMAdminApi } from './types/ConsoleSelfManagedAdminApi.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'\n// hdp.types - Types (interfaces)\nexport type {\n AlertSubscription as HdpAlertSubscription,\n Audit as HdpAudit,\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 HdpEntity,\n HdpPrometheusDataCapacityDataPoint,\n Invite as HdpInvite,\n LlmSpend as HdpLlmSpend,\n Organization as HdpOrganization,\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} 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'\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 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\n// Namespace (type-only - contains only interfaces)\nexport type { AccountsStats } from './types/Stats.types.js'\n\n// Survey.type - Types\nexport type { Persona, SurveyDto } from './types/Survey.type.js'\n\n// Survey.type - Values (enum)\nexport { FeedbackType } from './types/Survey.type.js'\n\n// SuspendStrategy.type - Types\nexport type {\n GetSuspendStrategyOptions,\n SuspendStrategy,\n} from './types/SuspendStrategy.type.js'\n\n// SuspendStrategy.type - Values (function)\nexport { getSuspendStrategy } from './types/SuspendStrategy.type.js'\n\n// Namespace (runtime value)\nexport { Telemetry } from './types/Telemetry.type.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 { ConsoleSelfManagedUtils } from './utils/console-sm.utils.js'\n\n// enterprise-connection.utils - Types\nexport type { EnterpriseConnectionOrganizationAssignment } from './utils/enterprise-connection.utils.js'\n\n// enterprise-connection.utils - Values (functions)\nexport {\n enterpriseConnectionMetadataToOrganizationAssignments,\n organizationAssignmentsToEnterpriseConnectionMetadata,\n} from './utils/enterprise-connection.utils.js'\n\nexport { validateLabels } from './utils/labelValidator.utils.js'\nexport { ObjectMergeUtils } from './utils/objectMerge.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'\n\nexport {\n allSettledResultsCounts,\n getFulfilledPromises,\n getRejectedPromises,\n getSettledSummary,\n} from './utils/settledPromises.util.js'\n\nexport {\n isValidAwsArn,\n isValidCIDR,\n isValidCIDRList,\n isValidClientName,\n isValidHostname,\n isValidPrivateLinkRegion,\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 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 isManager,\n} from './utils/camundiPermissionAugmenter.utils.js'\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["AlertSubscriptionReportType", "AlertSubscriptionType", "default"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types/ConsoleSelfManaged.type.ts"],
|
|
4
|
-
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nexport namespace ConsoleSM {\n export const CONFIG_UNSET = 'unset'\n export type Status = 'healthy' | 'unhealthy' | 'unknown'\n\n export type AppType =\n | 'zeebe-broker'\n | 'zeebe-gateway'\n | 'operate'\n | 'tasklist'\n | 'optimize'\n | 'modeler'\n | 'console'\n | 'identity'\n | 'connectors'\n | 'orchestration'\n | 'orchestrationIdentity'\n | 'unknown'\n\n export function NameByAppType(appType: AppType): string {\n switch (appType) {\n case 'zeebe-broker':\n return 'Zeebe'\n case 'zeebe-gateway':\n return 'Zeebe Gateway'\n case 'operate':\n return 'Operate'\n case 'tasklist':\n return 'Tasklist'\n case 'optimize':\n return 'Optimize'\n case 'modeler':\n return 'Modeler'\n case 'console':\n return 'Console'\n case 'identity':\n return 'Identity'\n case 'connectors':\n return 'Connectors'\n case 'orchestration':\n return 'Orchestration'\n case 'orchestrationIdentity':\n return 'Identity'\n default:\n return 'Unknown'\n }\n }\n\n export type ClusterType = 'automation' | 'management'\n\n export interface App {\n type: AppType\n id: string\n status: Status\n url: string\n urls?: {\n grpc: string\n http: string\n }\n generation: string\n readiness?: string\n metrics?: string\n }\n\n export interface CamundaLicense {\n validLicense: boolean\n licenseType: string\n isCommercial?: boolean\n expiresAt?: string\n }\n\n export interface DiscoveredCluster {\n license: CamundaLicense\n clusterId: string\n clusterName: string\n version: string\n properties?: Record<string, string>\n }\n\n export interface Cluster {\n /**\n * Unique identifier of the cluster\n */\n uuid: string\n /**\n * Name of the cluster\n */\n name: string\n /**\n * Tags of the cluster, example: dev, stage, prod\n */\n tags?: string[]\n /**\n * Custom properties of the cluster\n */\n customProperties?: Array<{\n description?: string\n links?: Array<{\n name?: string\n url?: string\n }>\n }>\n /**\n * Namespace the cluster is running in.\n */\n namespace: string\n /**\n * Indicates if a cluster is healthy or not\n */\n status: Status\n /**\n * This is the current version of the running cluster\n */\n generation: string\n /**\n * We're distinguishing between automation and management clusters. Management clusters include applications that act globally in an installed context, like Console or Modeler. Automation clusters are the Zeebe clusters including applications like Operate, Tasklist and Optimize.\n */\n type: ClusterType\n /**\n * The list of applications running in the cluster\n */\n apps: App[]\n /**\n * audit events of the cluster\n */\n audit?: Array<{\n ts: number\n }>\n /**\n * Custom properties added by the discovery process.\n */\n discoveredClusterProperties?: Record<string, string>\n /**\n * The cluster license information\n */\n license?: CamundaLicense\n }\n\n export type TelemetryState = 'disabled' | 'online' | 'download'\n export type LicanseState = 'disabled' | 'valid' | 'invalid'\n\n export interface AppConfig {\n auth: {\n clientId: string\n audience: string\n issuer: string\n type: string\n disabled: boolean\n redirectTrailingSlash: boolean\n redirectUrl: string\n resource?: string\n }\n customerContext: {\n customerId: string\n installationId: string\n telemetry: TelemetryState\n license: LicanseState\n isCommercial: boolean\n expiresAt: number | undefined\n discoveryModeEnabled: boolean\n
|
|
5
|
-
"mappings": "AAMO,IAAU;AAAA,CAAV,CAAUA,eAAV;AACE,EAAMA,WAAA,eAAe;AAiBrB,WAAS,cAAc,SAA0B;AACtD,YAAQ,SAAS;AAAA,MACf,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT;AACE,eAAO;AAAA,IACX;AAAA,EACF;AA3BO,EAAAA,WAAS;
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nexport namespace ConsoleSM {\n export const CONFIG_UNSET = 'unset'\n export type Status = 'healthy' | 'unhealthy' | 'unknown'\n\n export type AppType =\n | 'zeebe-broker'\n | 'zeebe-gateway'\n | 'operate'\n | 'tasklist'\n | 'optimize'\n | 'modeler'\n | 'console'\n | 'identity'\n | 'connectors'\n | 'orchestration'\n | 'orchestrationIdentity'\n | 'unknown'\n\n export function NameByAppType(appType: AppType): string {\n switch (appType) {\n case 'zeebe-broker':\n return 'Zeebe'\n case 'zeebe-gateway':\n return 'Zeebe Gateway'\n case 'operate':\n return 'Operate'\n case 'tasklist':\n return 'Tasklist'\n case 'optimize':\n return 'Optimize'\n case 'modeler':\n return 'Modeler'\n case 'console':\n return 'Console'\n case 'identity':\n return 'Identity'\n case 'connectors':\n return 'Connectors'\n case 'orchestration':\n return 'Orchestration'\n case 'orchestrationIdentity':\n return 'Identity'\n default:\n return 'Unknown'\n }\n }\n\n export type ClusterType = 'automation' | 'management'\n\n export interface App {\n type: AppType\n id: string\n status: Status\n url: string\n urls?: {\n grpc: string\n http: string\n }\n generation: string\n readiness?: string\n metrics?: string\n }\n\n export interface CamundaLicense {\n validLicense: boolean\n licenseType: string\n isCommercial?: boolean\n expiresAt?: string\n }\n\n export interface DiscoveredCluster {\n license: CamundaLicense\n clusterId: string\n clusterName: string\n version: string\n properties?: Record<string, string>\n }\n\n export interface Cluster {\n /**\n * Unique identifier of the cluster\n */\n uuid: string\n /**\n * Name of the cluster\n */\n name: string\n /**\n * Tags of the cluster, example: dev, stage, prod\n */\n tags?: string[]\n /**\n * Custom properties of the cluster\n */\n customProperties?: Array<{\n description?: string\n links?: Array<{\n name?: string\n url?: string\n }>\n }>\n /**\n * Namespace the cluster is running in.\n */\n namespace: string\n /**\n * Indicates if a cluster is healthy or not\n */\n status: Status\n /**\n * This is the current version of the running cluster\n */\n generation: string\n /**\n * We're distinguishing between automation and management clusters. Management clusters include applications that act globally in an installed context, like Console or Modeler. Automation clusters are the Zeebe clusters including applications like Operate, Tasklist and Optimize.\n */\n type: ClusterType\n /**\n * The list of applications running in the cluster\n */\n apps: App[]\n /**\n * audit events of the cluster\n */\n audit?: Array<{\n ts: number\n }>\n /**\n * Custom properties added by the discovery process.\n */\n discoveredClusterProperties?: Record<string, string>\n /**\n * The cluster license information\n */\n license?: CamundaLicense\n }\n\n export type TelemetryState = 'disabled' | 'online' | 'download'\n export type LicanseState = 'disabled' | 'valid' | 'invalid'\n\n export interface AppConfig {\n auth: {\n clientId: string\n audience: string\n issuer: string\n type: string\n disabled: boolean\n redirectTrailingSlash: boolean\n redirectUrl: string\n resource?: string\n }\n customerContext: {\n customerId: string\n installationId: string\n telemetry: TelemetryState\n license: LicanseState\n isCommercial: boolean\n expiresAt: number | undefined\n discoveryModeEnabled: boolean\n }\n fatalErrors: FatalError[]\n }\n\n export interface UsageMetrics {\n total: number\n }\n\n export interface UsageMetricsInstances extends UsageMetrics {}\n\n export interface UsageMetricsTaskUsers extends UsageMetrics {\n assignees: string[]\n }\n\n export interface UsageMetricsForCluster {\n id: string\n processInstances: UsageMetricsInstances\n decisionInstances: UsageMetricsInstances\n taskUsers: UsageMetricsTaskUsers\n activeTenants?: UsageMetricsInstances\n }\n\n // CONFIG PARAMS\n\n export interface ConfigParams {\n csm_context_path: string\n }\n\n // SSE\n\n export interface SendEventOptions<T> {\n type: 'status' | 'keepalive' | 'cluster-update'\n payload: T\n }\n\n export interface SseKeepAlivePayload {\n keepAlive: boolean\n }\n\n // Fatal Errors\n\n export type FatalErrorType =\n | 'configmap-not-found'\n | 'api-token-unauthorized'\n | 'api-token-unset'\n | 'customer-context-unset'\n | 'automation-clusters-unset'\n | 'management-cluster-unset'\n | 'jwks-not-reachable'\n | 'backend-error'\n | 'auth-config-incomplete'\n | 'mobx-error'\n\n export const FataErrorDescriptions: Record<\n FatalErrorType,\n { message: string; fatal: boolean }\n > = {\n 'configmap-not-found': {\n message: 'Failed to read file with configmap data',\n fatal: true,\n },\n 'api-token-unset': {\n message: 'Telemetry API token not set',\n fatal: false,\n },\n 'api-token-unauthorized': {\n message: 'Telemetry API token unauthorized',\n fatal: false,\n },\n 'customer-context-unset': {\n message: 'Customer Id or Installation Id not set',\n fatal: false,\n },\n 'automation-clusters-unset': {\n message: 'No automation clusters found',\n fatal: false,\n },\n 'management-cluster-unset': {\n message: 'No management cluster found',\n fatal: false,\n },\n 'jwks-not-reachable': {\n message: 'JWKS for authentication is not reachable',\n fatal: true,\n },\n 'backend-error': {\n message: 'Backend error',\n fatal: true,\n },\n 'auth-config-incomplete': {\n message:\n 'Auth Config incomplete. Please make sure to set all required values.',\n fatal: true,\n },\n 'mobx-error': {\n message: 'Something went wrong with object assignments.',\n fatal: false,\n },\n }\n\n export interface FatalError {\n type: FatalErrorType\n message: string\n ts: number\n fatal: boolean\n count: number\n }\n\n // DEBUG\n\n export interface DebugData {\n configmap: string\n configmapOverride?: string\n envvars: Array<{ key: string; value: string }>\n }\n\n // ///////////////////////////////////////////////////////////////////////////7\n // HEALTH CHECK\n\n export namespace Health {\n // eslint-disable-next-line no-shadow\n export enum EndpointSource {\n CONFIG_OR_ENV = 'Extra Values or Environment Variables',\n CONFIGMAP = 'ConfigMap',\n }\n\n // eslint-disable-next-line no-shadow\n export enum TEAM {\n UNSET = 'U',\n CONSOLE = 'C',\n DISTRIBUTION = 'D',\n }\n\n interface BaseContext {\n type: 'endpoint' | 'configuration'\n team: TEAM\n }\n\n export interface Endpoint extends BaseContext {\n type: 'endpoint'\n name: string\n url: string\n source: EndpointSource\n method?: 'post'\n ignore?: boolean\n }\n\n export interface Configuration extends BaseContext {\n type: 'configuration'\n source: string\n }\n\n export type Context = Endpoint | Configuration\n\n export interface Result {\n problemIdentitfied: boolean\n message: string\n context: Context\n ts?: number\n }\n\n export interface HealthCheck {\n ts: number\n results: Result[]\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AAMO,IAAU;AAAA,CAAV,CAAUA,eAAV;AACE,EAAMA,WAAA,eAAe;AAiBrB,WAAS,cAAc,SAA0B;AACtD,YAAQ,SAAS;AAAA,MACf,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT;AACE,eAAO;AAAA,IACX;AAAA,EACF;AA3BO,EAAAA,WAAS;AAkMT,EAAMA,WAAA,wBAGT;AAAA,IACF,uBAAuB;AAAA,MACrB,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,mBAAmB;AAAA,MACjB,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,0BAA0B;AAAA,MACxB,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,0BAA0B;AAAA,MACxB,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,6BAA6B;AAAA,MAC3B,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,4BAA4B;AAAA,MAC1B,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,sBAAsB;AAAA,MACpB,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA,0BAA0B;AAAA,MACxB,SACE;AAAA,MACF,OAAO;AAAA,IACT;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,EACF;AAqBO,MAAU;AAAV,IAAUC,YAAV;AAEE,QAAK;AAAL,MAAKC,oBAAL;AACL,MAAAA,gBAAA,mBAAgB;AAChB,MAAAA,gBAAA,eAAY;AAAA,OAFF,iBAAAD,QAAA,mBAAAA,QAAA;AAML,QAAK;AAAL,MAAKE,UAAL;AACL,MAAAA,MAAA,WAAQ;AACR,MAAAA,MAAA,aAAU;AACV,MAAAA,MAAA,kBAAe;AAAA,OAHL,OAAAF,QAAA,SAAAA,QAAA;AAAA,KARG,SAAAD,WAAA,WAAAA,WAAA;AAAA,GAtRF;",
|
|
6
6
|
"names": ["ConsoleSM", "Health", "EndpointSource", "TEAM"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare function isValidHostname(value: string): boolean;
|
|
2
|
+
export declare function isValidAwsArn(value: string): boolean;
|
|
3
|
+
export declare function isValidPrivateLinkRegion(value: string): boolean;
|
|
2
4
|
/**
|
|
3
5
|
* Validates that a client name contains only allowed characters:
|
|
4
6
|
* letters, digits, dashes, and underscores.
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
import { PRIVATE_LINK_REGIONS } from "../constants/privateLinkRegions.const.js";
|
|
2
|
+
const AWS_ARN_PARTITIONS = /* @__PURE__ */ new Set(["aws", "aws-cn", "aws-us-gov"]);
|
|
3
|
+
function isAlphaNumericOrDash(value) {
|
|
4
|
+
for (const char of value) {
|
|
5
|
+
const isLowercaseLetter = char >= "a" && char <= "z";
|
|
6
|
+
const isUppercaseLetter = char >= "A" && char <= "Z";
|
|
7
|
+
const isDigit = char >= "0" && char <= "9";
|
|
8
|
+
if (!isLowercaseLetter && !isUppercaseLetter && !isDigit && char !== "-") {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
function isDigitsOnly(value) {
|
|
15
|
+
for (const char of value) {
|
|
16
|
+
if (char < "0" || char > "9") {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
1
22
|
function isValidHostname(value) {
|
|
2
23
|
if (typeof value !== "string") {
|
|
3
24
|
return false;
|
|
@@ -20,6 +41,42 @@ function isValidHostname(value) {
|
|
|
20
41
|
});
|
|
21
42
|
return isValid;
|
|
22
43
|
}
|
|
44
|
+
function isValidAwsArn(value) {
|
|
45
|
+
if (typeof value !== "string") {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
if (value.length === 0 || value.includes("*")) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
const segments = value.split(":");
|
|
52
|
+
if (segments.length < 6) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
const [prefix, partition, service, region, accountId, ...resourceParts] = segments;
|
|
56
|
+
const resource = resourceParts.join(":");
|
|
57
|
+
if (prefix !== "arn" || !AWS_ARN_PARTITIONS.has(partition)) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
if (!service || !isAlphaNumericOrDash(service)) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
if (service === "iam" && accountId.length === 0) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
if (region && !isAlphaNumericOrDash(region)) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
if (accountId && (!isDigitsOnly(accountId) || accountId.length !== 12)) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
return resource.length > 0;
|
|
73
|
+
}
|
|
74
|
+
function isValidPrivateLinkRegion(value) {
|
|
75
|
+
if (typeof value !== "string") {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
return PRIVATE_LINK_REGIONS.includes(value);
|
|
79
|
+
}
|
|
23
80
|
const CLIENT_NAME_REGEX = /^[a-zA-Z0-9_-]+$/u;
|
|
24
81
|
function isValidClientName(name) {
|
|
25
82
|
if (typeof name !== "string") {
|
|
@@ -86,9 +143,11 @@ function isValidCIDRList(cidrList) {
|
|
|
86
143
|
return entries.every((entry) => isValidCIDR(entry));
|
|
87
144
|
}
|
|
88
145
|
export {
|
|
146
|
+
isValidAwsArn,
|
|
89
147
|
isValidCIDR,
|
|
90
148
|
isValidCIDRList,
|
|
91
149
|
isValidClientName,
|
|
92
|
-
isValidHostname
|
|
150
|
+
isValidHostname,
|
|
151
|
+
isValidPrivateLinkRegion
|
|
93
152
|
};
|
|
94
153
|
//# sourceMappingURL=string-validation.utils.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/string-validation.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\nexport function isValidHostname(value: string) {\n if (typeof value !== 'string') {\n return false\n }\n\n const validHostnameChars = /^[a-zA-Z0-9-.]{1,253}\\.?$/gu\n if (!validHostnameChars.test(value)) {\n return false\n }\n\n if (value.endsWith('.')) {\n // eslint-disable-next-line no-param-reassign\n value = value.slice(0, value.length - 1)\n }\n\n if (value.length > 253) {\n return false\n }\n\n const labels = value.split('.')\n\n const isValid = labels.every((label) => {\n // eslint-disable-next-line prefer-named-capture-group\n const validLabelChars = /^([a-zA-Z0-9-]+)$/gu\n\n const validLabel =\n validLabelChars.test(label) &&\n label.length < 64 &&\n !label.startsWith('-') &&\n !label.endsWith('-')\n\n return validLabel\n })\n\n return isValid\n}\n\n/**\n * Regular expression to validate client names.\n * Allows only letters (a-z, A-Z), digits (0-9), dashes (-), and underscores (_).\n * This matches the frontend validation in console-frontend/src/models/validation/input.ts\n */\nconst CLIENT_NAME_REGEX = /^[a-zA-Z0-9_-]+$/u\n\n/**\n * Validates that a client name contains only allowed characters:\n * letters, digits, dashes, and underscores.\n *\n * @param name - The client name to validate\n * @returns true if the name is valid, false otherwise\n */\nexport function isValidClientName(name: string): boolean {\n if (typeof name !== 'string') {\n return false\n }\n\n if (name.trim().length === 0) {\n return false\n }\n\n return CLIENT_NAME_REGEX.test(name)\n}\n\n/**\n * Validates a single IPv4 address or CIDR notation.\n *\n * Valid examples:\n * - 192.168.1.1\n * - 10.0.0.0/8\n * - 0.0.0.0/0\n * - 255.255.255.255/32\n *\n * Invalid examples:\n * - 999.999.999.999 (octets must be 0-255)\n * - 1.2.3.4/55 (prefix must be 0-32)\n * - 256.1.1.1 (octets must be 0-255)\n * - 1.2.3 (must have 4 octets)\n *\n * @param cidr - The IPv4 address or CIDR notation to validate\n * @returns true if the CIDR is valid, false otherwise\n */\nexport function isValidCIDR(cidr: string): boolean {\n if (typeof cidr !== 'string') {\n return false\n }\n\n const trimmed = cidr.trim()\n\n if (trimmed.length === 0) {\n return false\n }\n\n // Split IP and prefix\n const parts = trimmed.split('/')\n\n // Must have either IP only or IP/prefix\n if (parts.length > 2) {\n return false\n }\n\n const ip = parts[0]\n const prefix = parts[1]\n\n // Validate IP address\n const octets = ip.split('.')\n\n // Must have exactly 4 octets\n if (octets.length !== 4) {\n return false\n }\n\n // Validate each octet\n for (const octet of octets) {\n // Check if it's a valid number\n if (!/^\\d+$/u.test(octet)) {\n return false\n }\n\n const num = parseInt(octet, 10)\n\n // Octet must be 0-255\n if (num < 0 || num > 255) {\n return false\n }\n\n // Leading zeros are not allowed (except for \"0\" itself)\n if (octet.length > 1 && octet.startsWith('0')) {\n return false\n }\n }\n\n // If prefix is present, validate it\n if (prefix !== undefined) {\n if (!/^\\d+$/u.test(prefix)) {\n return false\n }\n\n const prefixNum = parseInt(prefix, 10)\n\n // Prefix must be 0-32 for IPv4\n if (prefixNum < 0 || prefixNum > 32) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * Validates a comma-separated list of IPv4 addresses and/or CIDR notations.\n *\n * Valid examples:\n * - \"192.168.1.1\"\n * - \"192.168.1.1,10.0.0.0/8\"\n * - \"192.168.1.1, 10.0.0.0/8\" (spaces are trimmed)\n *\n * Invalid examples:\n * - \"192.168.1.1,999.999.999.999\" (second entry is invalid)\n * - \"1.2.3.4/55\" (prefix is invalid)\n *\n * @param cidrList - A comma-separated list of IPv4 addresses or CIDR notations\n * @returns true if all entries in the list are valid, false otherwise\n */\nexport function isValidCIDRList(cidrList: string): boolean {\n if (typeof cidrList !== 'string') {\n return false\n }\n\n const trimmed = cidrList.trim()\n\n if (trimmed.length === 0) {\n return false\n }\n\n const entries = trimmed.split(',')\n\n // At least one entry must be present\n if (entries.length === 0) {\n return false\n }\n\n // All entries must be valid CIDRs\n return entries.every((entry) => isValidCIDR(entry))\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport { PRIVATE_LINK_REGIONS } from '../constants/privateLinkRegions.const.js'\n\nconst AWS_ARN_PARTITIONS = new Set(['aws', 'aws-cn', 'aws-us-gov'])\n\nfunction isAlphaNumericOrDash(value: string): boolean {\n for (const char of value) {\n const isLowercaseLetter = char >= 'a' && char <= 'z'\n const isUppercaseLetter = char >= 'A' && char <= 'Z'\n const isDigit = char >= '0' && char <= '9'\n\n if (!isLowercaseLetter && !isUppercaseLetter && !isDigit && char !== '-') {\n return false\n }\n }\n\n return true\n}\n\nfunction isDigitsOnly(value: string): boolean {\n for (const char of value) {\n if (char < '0' || char > '9') {\n return false\n }\n }\n\n return true\n}\n\nexport function isValidHostname(value: string) {\n if (typeof value !== 'string') {\n return false\n }\n\n const validHostnameChars = /^[a-zA-Z0-9-.]{1,253}\\.?$/gu\n if (!validHostnameChars.test(value)) {\n return false\n }\n\n if (value.endsWith('.')) {\n // eslint-disable-next-line no-param-reassign\n value = value.slice(0, value.length - 1)\n }\n\n if (value.length > 253) {\n return false\n }\n\n const labels = value.split('.')\n\n const isValid = labels.every((label) => {\n // eslint-disable-next-line prefer-named-capture-group\n const validLabelChars = /^([a-zA-Z0-9-]+)$/gu\n\n const validLabel =\n validLabelChars.test(label) &&\n label.length < 64 &&\n !label.startsWith('-') &&\n !label.endsWith('-')\n\n return validLabel\n })\n\n return isValid\n}\n\nexport function isValidAwsArn(value: string): boolean {\n if (typeof value !== 'string') {\n return false\n }\n\n if (value.length === 0 || value.includes('*')) {\n return false\n }\n\n const segments = value.split(':')\n\n if (segments.length < 6) {\n return false\n }\n\n const [prefix, partition, service, region, accountId, ...resourceParts] =\n segments\n const resource = resourceParts.join(':')\n\n if (prefix !== 'arn' || !AWS_ARN_PARTITIONS.has(partition)) {\n return false\n }\n\n if (!service || !isAlphaNumericOrDash(service)) {\n return false\n }\n\n if (service === 'iam' && accountId.length === 0) {\n return false\n }\n\n if (region && !isAlphaNumericOrDash(region)) {\n return false\n }\n\n if (accountId && (!isDigitsOnly(accountId) || accountId.length !== 12)) {\n return false\n }\n\n return resource.length > 0\n}\n\nexport function isValidPrivateLinkRegion(value: string): boolean {\n if (typeof value !== 'string') {\n return false\n }\n\n return PRIVATE_LINK_REGIONS.includes(value)\n}\n\n/**\n * Regular expression to validate client names.\n * Allows only letters (a-z, A-Z), digits (0-9), dashes (-), and underscores (_).\n * This matches the frontend validation in console-frontend/src/models/validation/input.ts\n */\nconst CLIENT_NAME_REGEX = /^[a-zA-Z0-9_-]+$/u\n\n/**\n * Validates that a client name contains only allowed characters:\n * letters, digits, dashes, and underscores.\n *\n * @param name - The client name to validate\n * @returns true if the name is valid, false otherwise\n */\nexport function isValidClientName(name: string): boolean {\n if (typeof name !== 'string') {\n return false\n }\n\n if (name.trim().length === 0) {\n return false\n }\n\n return CLIENT_NAME_REGEX.test(name)\n}\n\n/**\n * Validates a single IPv4 address or CIDR notation.\n *\n * Valid examples:\n * - 192.168.1.1\n * - 10.0.0.0/8\n * - 0.0.0.0/0\n * - 255.255.255.255/32\n *\n * Invalid examples:\n * - 999.999.999.999 (octets must be 0-255)\n * - 1.2.3.4/55 (prefix must be 0-32)\n * - 256.1.1.1 (octets must be 0-255)\n * - 1.2.3 (must have 4 octets)\n *\n * @param cidr - The IPv4 address or CIDR notation to validate\n * @returns true if the CIDR is valid, false otherwise\n */\nexport function isValidCIDR(cidr: string): boolean {\n if (typeof cidr !== 'string') {\n return false\n }\n\n const trimmed = cidr.trim()\n\n if (trimmed.length === 0) {\n return false\n }\n\n // Split IP and prefix\n const parts = trimmed.split('/')\n\n // Must have either IP only or IP/prefix\n if (parts.length > 2) {\n return false\n }\n\n const ip = parts[0]\n const prefix = parts[1]\n\n // Validate IP address\n const octets = ip.split('.')\n\n // Must have exactly 4 octets\n if (octets.length !== 4) {\n return false\n }\n\n // Validate each octet\n for (const octet of octets) {\n // Check if it's a valid number\n if (!/^\\d+$/u.test(octet)) {\n return false\n }\n\n const num = parseInt(octet, 10)\n\n // Octet must be 0-255\n if (num < 0 || num > 255) {\n return false\n }\n\n // Leading zeros are not allowed (except for \"0\" itself)\n if (octet.length > 1 && octet.startsWith('0')) {\n return false\n }\n }\n\n // If prefix is present, validate it\n if (prefix !== undefined) {\n if (!/^\\d+$/u.test(prefix)) {\n return false\n }\n\n const prefixNum = parseInt(prefix, 10)\n\n // Prefix must be 0-32 for IPv4\n if (prefixNum < 0 || prefixNum > 32) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * Validates a comma-separated list of IPv4 addresses and/or CIDR notations.\n *\n * Valid examples:\n * - \"192.168.1.1\"\n * - \"192.168.1.1,10.0.0.0/8\"\n * - \"192.168.1.1, 10.0.0.0/8\" (spaces are trimmed)\n *\n * Invalid examples:\n * - \"192.168.1.1,999.999.999.999\" (second entry is invalid)\n * - \"1.2.3.4/55\" (prefix is invalid)\n *\n * @param cidrList - A comma-separated list of IPv4 addresses or CIDR notations\n * @returns true if all entries in the list are valid, false otherwise\n */\nexport function isValidCIDRList(cidrList: string): boolean {\n if (typeof cidrList !== 'string') {\n return false\n }\n\n const trimmed = cidrList.trim()\n\n if (trimmed.length === 0) {\n return false\n }\n\n const entries = trimmed.split(',')\n\n // At least one entry must be present\n if (entries.length === 0) {\n return false\n }\n\n // All entries must be valid CIDRs\n return entries.every((entry) => isValidCIDR(entry))\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -9,7 +9,22 @@ var VersionCheckOperator = /* @__PURE__ */ ((VersionCheckOperator2) => {
|
|
|
9
9
|
return VersionCheckOperator2;
|
|
10
10
|
})(VersionCheckOperator || {});
|
|
11
11
|
const checkVersion = (params) => {
|
|
12
|
-
if (
|
|
12
|
+
if (params.versionToCompareTo === "SNAPSHOT") {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
let versionToCompareTo = params.versionToCompareTo;
|
|
16
|
+
if (versionToCompareTo.endsWith("-SNAPSHOT")) {
|
|
17
|
+
versionToCompareTo = versionToCompareTo.replace("-SNAPSHOT", "");
|
|
18
|
+
const parts = versionToCompareTo.split(".");
|
|
19
|
+
if (parts.length === 1) {
|
|
20
|
+
versionToCompareTo = `${parts[0]}.0.0`;
|
|
21
|
+
} else if (parts.length === 2) {
|
|
22
|
+
versionToCompareTo = `${parts[0]}.${parts[1]}.0`;
|
|
23
|
+
} else if (parts.length === 3) {
|
|
24
|
+
versionToCompareTo = `${parts[0]}.${parts[1]}.${parts[2]}`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (!semver.valid(versionToCompareTo)) {
|
|
13
28
|
throw new Error("Invalid version to compare to");
|
|
14
29
|
}
|
|
15
30
|
let version = "";
|
|
@@ -37,10 +52,10 @@ const checkVersion = (params) => {
|
|
|
37
52
|
}
|
|
38
53
|
}
|
|
39
54
|
let parsedVersionToCompareTo = "";
|
|
40
|
-
if (semver.valid(
|
|
41
|
-
parsedVersionToCompareTo =
|
|
55
|
+
if (semver.valid(versionToCompareTo ?? "")) {
|
|
56
|
+
parsedVersionToCompareTo = versionToCompareTo ?? "";
|
|
42
57
|
} else {
|
|
43
|
-
const versionSplit =
|
|
58
|
+
const versionSplit = versionToCompareTo?.split(":") ?? [];
|
|
44
59
|
if (versionSplit.length > 1) {
|
|
45
60
|
parsedVersionToCompareTo = versionSplit[1];
|
|
46
61
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/versionCheck.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 * as semver from 'semver'\n\n// eslint-disable-next-line no-shadow\nexport enum VersionCheckOperator {\n LessThan,\n LessThanOrEqual,\n GreaterThan,\n GreaterThanOrEqual,\n SameMajor,\n SameMinor,\n}\n\nexport const checkVersion = (params: {\n possiblyVersionOrDockerPath?: string\n trueForSnapshot: boolean\n operator: VersionCheckOperator\n versionToCompareTo: string\n trueOnInvalidVersion?: boolean\n}) => {\n if (!semver.valid(
|
|
5
|
-
"mappings": "AAMA,YAAY,YAAY;AAGjB,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,4CAAA;AACA,EAAAA,4CAAA;AACA,EAAAA,4CAAA;AACA,EAAAA,4CAAA;AACA,EAAAA,4CAAA;AACA,EAAAA,4CAAA;AANU,SAAAA;AAAA,GAAA;AASL,MAAM,eAAe,CAAC,WAMvB;
|
|
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 * as semver from 'semver'\n\n// eslint-disable-next-line no-shadow\nexport enum VersionCheckOperator {\n LessThan,\n LessThanOrEqual,\n GreaterThan,\n GreaterThanOrEqual,\n SameMajor,\n SameMinor,\n}\n\nexport const checkVersion = (params: {\n possiblyVersionOrDockerPath?: string\n trueForSnapshot: boolean\n operator: VersionCheckOperator\n versionToCompareTo: string\n trueOnInvalidVersion?: boolean\n}) => {\n // quick exit: if the versionToCompareTo is\n // - `SNAPSHOT` there is not a lot we can compare here to, so we return false directly\n // - ends with `-SNAPSHOT` we ignore the `-SNAPSHOT` part for the comparison, guess a good matching semver compliant version and try to move on with the generated one in the code\n if (params.versionToCompareTo === 'SNAPSHOT') {\n return false\n }\n let versionToCompareTo = params.versionToCompareTo\n if (versionToCompareTo.endsWith('-SNAPSHOT')) {\n versionToCompareTo = versionToCompareTo.replace('-SNAPSHOT', '')\n const parts = versionToCompareTo.split('.')\n if (parts.length === 1) {\n versionToCompareTo = `${parts[0]}.0.0`\n } else if (parts.length === 2) {\n versionToCompareTo = `${parts[0]}.${parts[1]}.0`\n } else if (parts.length === 3) {\n versionToCompareTo = `${parts[0]}.${parts[1]}.${parts[2]}`\n }\n }\n if (!semver.valid(versionToCompareTo)) {\n throw new Error('Invalid version to compare to')\n }\n let version: string = ''\n if (semver.valid(params.possiblyVersionOrDockerPath ?? '')) {\n version = params.possiblyVersionOrDockerPath ?? ''\n } else {\n const versionSplit = params.possiblyVersionOrDockerPath?.split(':') ?? []\n if (versionSplit.length > 1) {\n version = versionSplit[1]\n }\n }\n if (params.trueForSnapshot && version.includes('SNAPSHOT')) {\n if (version === 'SNAPSHOT') {\n return true\n }\n version = version.replace('-SNAPSHOT', '')\n if (version.split('.').length === 1) {\n version = `${version}.99.99`\n }\n if (version.split('.').length === 2) {\n version = `${version}.99`\n }\n if (version.split('.').length === 3) {\n version = `${version.split('.')[0]}.${version.split('.')[1]}.99`\n }\n }\n\n let parsedVersionToCompareTo: string = ''\n if (semver.valid(versionToCompareTo ?? '')) {\n parsedVersionToCompareTo = versionToCompareTo ?? ''\n } else {\n const versionSplit = versionToCompareTo?.split(':') ?? []\n if (versionSplit.length > 1) {\n parsedVersionToCompareTo = versionSplit[1]\n }\n }\n if (params.trueForSnapshot && parsedVersionToCompareTo === 'SNAPSHOT') {\n return true\n }\n\n if (!semver.valid(version)) {\n return !!params.trueOnInvalidVersion\n }\n\n switch (params.operator) {\n case VersionCheckOperator.LessThan:\n return semver.lt(version, parsedVersionToCompareTo)\n case VersionCheckOperator.LessThanOrEqual:\n return semver.lte(version, parsedVersionToCompareTo)\n case VersionCheckOperator.GreaterThan:\n return semver.gt(version, parsedVersionToCompareTo)\n case VersionCheckOperator.GreaterThanOrEqual:\n return semver.gte(version, parsedVersionToCompareTo)\n case VersionCheckOperator.SameMajor:\n return semver.major(version) === semver.major(parsedVersionToCompareTo)\n case VersionCheckOperator.SameMinor:\n return (\n semver.major(version) === semver.major(parsedVersionToCompareTo) &&\n semver.minor(version) === semver.minor(parsedVersionToCompareTo)\n )\n default:\n return false\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["VersionCheckOperator"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/ccma-shared-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Shared TypeScript types for Camunda Cloud Management Apps",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
|
|
@@ -15,10 +15,6 @@
|
|
|
15
15
|
"type": "module",
|
|
16
16
|
"main": "dist/index.js",
|
|
17
17
|
"types": "dist/index.d.ts",
|
|
18
|
-
"browser": {
|
|
19
|
-
"./dist/index.js": "./src/index.ts",
|
|
20
|
-
"./dist/index.d.ts": "./src/index.ts"
|
|
21
|
-
},
|
|
22
18
|
"files": [
|
|
23
19
|
"dist"
|
|
24
20
|
],
|