@camunda/ccma-shared-types 5.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/_tests/approvals/dns-subdomain.spec.d.ts +1 -0
  2. package/dist/_tests/approvals/expected-value.spec.d.ts +1 -0
  3. package/dist/_tests/charts/chart-query.spec.d.ts +1 -0
  4. package/dist/_tests/constants/customer-hardware-sizing.const.spec.d.ts +1 -0
  5. package/dist/_tests/dashboards/definition.spec.d.ts +1 -0
  6. package/dist/_tests/dtos/ClusterPlanWhiteList.spec.d.ts +1 -0
  7. package/dist/_tests/utils/elasticsearchPlanPath.utils.spec.d.ts +1 -0
  8. package/dist/_tests/utils/upgradeGateReason.utils.spec.d.ts +1 -0
  9. package/dist/approvals/dns-subdomain.d.ts +12 -0
  10. package/dist/approvals/dns-subdomain.js +16 -0
  11. package/dist/approvals/dns-subdomain.js.map +7 -0
  12. package/dist/approvals/expected-value.d.ts +33 -0
  13. package/dist/approvals/expected-value.js +26 -0
  14. package/dist/approvals/expected-value.js.map +7 -0
  15. package/dist/approvals/policy.js +1 -1
  16. package/dist/approvals/policy.js.map +2 -2
  17. package/dist/approvals/use-cases.const.d.ts +96 -0
  18. package/dist/approvals/use-cases.const.js +59 -2
  19. package/dist/approvals/use-cases.const.js.map +2 -2
  20. package/dist/charts/chart-metrics.d.ts +35 -0
  21. package/dist/charts/chart-metrics.js +188 -0
  22. package/dist/charts/chart-metrics.js.map +7 -0
  23. package/dist/charts/chart-query.d.ts +55 -0
  24. package/dist/charts/chart-query.js +376 -0
  25. package/dist/charts/chart-query.js.map +7 -0
  26. package/dist/charts/chart-spec.d.ts +103 -0
  27. package/dist/charts/chart-spec.js +79 -0
  28. package/dist/charts/chart-spec.js.map +7 -0
  29. package/dist/charts/index.d.ts +3 -0
  30. package/dist/charts/index.js +59 -0
  31. package/dist/charts/index.js.map +7 -0
  32. package/dist/constants/customer-hardware-sizing.const.d.ts +124 -0
  33. package/dist/constants/customer-hardware-sizing.const.js +266 -0
  34. package/dist/constants/customer-hardware-sizing.const.js.map +7 -0
  35. package/dist/constants/version-gates.const.d.ts +12 -0
  36. package/dist/constants/version-gates.const.js +2 -0
  37. package/dist/constants/version-gates.const.js.map +2 -2
  38. package/dist/dashboards/definition.d.ts +86 -0
  39. package/dist/dashboards/definition.js +137 -0
  40. package/dist/dashboards/definition.js.map +7 -0
  41. package/dist/dtos/Annotation.dto.d.ts +1 -1
  42. package/dist/dtos/Annotation.dto.js +10 -2
  43. package/dist/dtos/Annotation.dto.js.map +2 -2
  44. package/dist/dtos/ApprovalJob.dto.d.ts +33 -3
  45. package/dist/dtos/ApprovalJob.dto.js.map +2 -2
  46. package/dist/dtos/ClusterPlanTypeChange.dto.d.ts +23 -0
  47. package/dist/dtos/ClusterPlanTypeChange.dto.js +1 -0
  48. package/dist/dtos/ClusterPlanTypeChange.dto.js.map +7 -0
  49. package/dist/dtos/CommonCluster.dto.d.ts +5 -0
  50. package/dist/dtos/ControlV2.dto.d.ts +17 -0
  51. package/dist/dtos/Dashboard.dto.d.ts +336 -0
  52. package/dist/dtos/Dashboard.dto.js +70 -0
  53. package/dist/dtos/Dashboard.dto.js.map +7 -0
  54. package/dist/dtos/EarlyAccessFeature.dto.d.ts +1 -0
  55. package/dist/dtos/FeatureFlags.dto.d.ts +96 -54
  56. package/dist/dtos/Hdp.dto.d.ts +5 -88
  57. package/dist/dtos/Organization.dto.d.ts +21 -0
  58. package/dist/dtos/Organization.dto.js.map +1 -1
  59. package/dist/dtos/SalesPlan.dto.d.ts +18 -0
  60. package/dist/dtos/SalesPlan.dto.js +18 -0
  61. package/dist/dtos/SalesPlan.dto.js.map +2 -2
  62. package/dist/dtos/UpgradeReadiness.dto.d.ts +32 -0
  63. package/dist/dtos/UpgradeReadiness.dto.js +1 -0
  64. package/dist/dtos/UpgradeReadiness.dto.js.map +7 -0
  65. package/dist/enums/SystemAuditEntity.enum.d.ts +5 -2
  66. package/dist/enums/SystemAuditEntity.enum.js +3 -0
  67. package/dist/enums/SystemAuditEntity.enum.js.map +2 -2
  68. package/dist/index.d.ts +18 -5
  69. package/dist/index.js +192 -1
  70. package/dist/index.js.map +2 -2
  71. package/dist/permissions/accounts.permissions.d.ts +12 -0
  72. package/dist/permissions/accounts.permissions.js +11 -0
  73. package/dist/permissions/accounts.permissions.js.map +2 -2
  74. package/dist/permissions/combo.js +5 -0
  75. package/dist/permissions/combo.js.map +2 -2
  76. package/dist/search/compiler.d.ts +20 -0
  77. package/dist/search/compiler.js +48 -11
  78. package/dist/search/compiler.js.map +2 -2
  79. package/dist/search/index.d.ts +1 -1
  80. package/dist/search/index.js.map +2 -2
  81. package/dist/search/organization-search-fields.d.ts +5 -2
  82. package/dist/search/organization-search-fields.js +9 -1
  83. package/dist/search/organization-search-fields.js.map +2 -2
  84. package/dist/search/parser.d.ts +3 -0
  85. package/dist/search/parser.js +3 -1
  86. package/dist/search/parser.js.map +2 -2
  87. package/dist/types/ClusterBulkOperation.type.d.ts +14 -0
  88. package/dist/types/ClusterPlanFields.type.js +74 -74
  89. package/dist/types/ClusterPlanFields.type.js.map +2 -2
  90. package/dist/utils/elasticsearchPlanPath.utils.d.ts +20 -0
  91. package/dist/utils/elasticsearchPlanPath.utils.js +32 -0
  92. package/dist/utils/elasticsearchPlanPath.utils.js.map +7 -0
  93. package/dist/utils/qa-user.utils.d.ts +14 -0
  94. package/dist/utils/qa-user.utils.js +14 -0
  95. package/dist/utils/qa-user.utils.js.map +7 -0
  96. package/dist/utils/qa-user.utils.spec.d.ts +1 -0
  97. package/dist/utils/upgradeGateReason.utils.d.ts +8 -0
  98. package/dist/utils/upgradeGateReason.utils.js +23 -0
  99. package/dist/utils/upgradeGateReason.utils.js.map +7 -0
  100. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The email of a user that the QA route of accounts-backend creates
3
+ * (`POST /external/qa/organizations`). The route builds the email with this
4
+ * function, and every reader that must find a QA user calls
5
+ * `isQaUserEmail`. Thus the two cannot drift.
6
+ */
7
+ export declare function qaUserEmail(userId: string): string;
8
+ /**
9
+ * True when the email belongs to a user from an automated QA run. A token has
10
+ * no QA claim, but it carries the email, thus the email is the marker. The id
11
+ * in the email must be a UUID, so a person with the address
12
+ * `qa-user-admin@ultrawombat.com` is no QA user.
13
+ */
14
+ export declare function isQaUserEmail(email: string | undefined): boolean;
@@ -0,0 +1,14 @@
1
+ const QA_USER_EMAIL_PREFIX = "qa-user-";
2
+ const QA_USER_EMAIL_DOMAIN = "@ultrawombat.com";
3
+ const QA_USER_EMAIL_PATTERN = /^qa-user-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}@ultrawombat\.com$/;
4
+ function qaUserEmail(userId) {
5
+ return `${QA_USER_EMAIL_PREFIX}${userId}${QA_USER_EMAIL_DOMAIN}`;
6
+ }
7
+ function isQaUserEmail(email) {
8
+ return email !== void 0 && QA_USER_EMAIL_PATTERN.test(email.toLowerCase());
9
+ }
10
+ export {
11
+ isQaUserEmail,
12
+ qaUserEmail
13
+ };
14
+ //# sourceMappingURL=qa-user.utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/qa-user.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\nconst QA_USER_EMAIL_PREFIX = 'qa-user-'\nconst QA_USER_EMAIL_DOMAIN = '@ultrawombat.com'\n\n// The QA route builds the id with `uuidv4()`: five groups of hex digits.\nconst QA_USER_EMAIL_PATTERN =\n /^qa-user-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}@ultrawombat\\.com$/\n\n/**\n * The email of a user that the QA route of accounts-backend creates\n * (`POST /external/qa/organizations`). The route builds the email with this\n * function, and every reader that must find a QA user calls\n * `isQaUserEmail`. Thus the two cannot drift.\n */\nexport function qaUserEmail(userId: string): string {\n return `${QA_USER_EMAIL_PREFIX}${userId}${QA_USER_EMAIL_DOMAIN}`\n}\n\n/**\n * True when the email belongs to a user from an automated QA run. A token has\n * no QA claim, but it carries the email, thus the email is the marker. The id\n * in the email must be a UUID, so a person with the address\n * `qa-user-admin@ultrawombat.com` is no QA user.\n */\nexport function isQaUserEmail(email: string | undefined): boolean {\n return email !== undefined && QA_USER_EMAIL_PATTERN.test(email.toLowerCase())\n}\n"],
5
+ "mappings": "AAMA,MAAM,uBAAuB;AAC7B,MAAM,uBAAuB;AAG7B,MAAM,wBACJ;AAQK,SAAS,YAAY,QAAwB;AAClD,SAAO,GAAG,oBAAoB,GAAG,MAAM,GAAG,oBAAoB;AAChE;AAQO,SAAS,cAAc,OAAoC;AAChE,SAAO,UAAU,UAAa,sBAAsB,KAAK,MAAM,YAAY,CAAC;AAC9E;",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { UpgradeReadinessDto } from '../dtos/UpgradeReadiness.dto.js';
2
+ /**
3
+ * The text for a blocked upgrade gate (PDP-3067). It names the next step.
4
+ * console-backend sends it as the message of the 409 and of a skipped
5
+ * cluster in a bulk run, and Control shows it on the cluster page, so the
6
+ * three always agree.
7
+ */
8
+ export declare function upgradeGateReason(gate: UpgradeReadinessDto): string;
@@ -0,0 +1,23 @@
1
+ function upgradeGateReason(gate) {
2
+ if (gate.gracePeriod) {
3
+ const hours = gate.gracePeriod.hoursRemaining;
4
+ return `The cluster got a new minor version recently. Try the upgrade again in about ${hours} ${hours === 1 ? "hour" : "hours"}.`;
5
+ }
6
+ switch (gate.readiness?.source) {
7
+ case "suspended":
8
+ return "The cluster is suspended and cannot report its migration state. Resume the cluster, then try the upgrade again.";
9
+ case "updating":
10
+ return "The cluster still rolls out its last upgrade. Try the upgrade again when the cluster is healthy.";
11
+ case "timeout":
12
+ case "error":
13
+ return "The cluster did not answer the upgrade readiness check. Try the upgrade again later.";
14
+ case "unsupported":
15
+ return "Console cannot reach the upgrade readiness check of this cluster. Try the upgrade again later.";
16
+ default:
17
+ return gate.readiness?.verdict === "notReady" ? "The cluster still completes the migrations of its last upgrade. Try the upgrade again later." : "The cluster could not read its own migration state. Try the upgrade again later.";
18
+ }
19
+ }
20
+ export {
21
+ upgradeGateReason
22
+ };
23
+ //# sourceMappingURL=upgradeGateReason.utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/upgradeGateReason.utils.ts"],
4
+ "sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type { UpgradeReadinessDto } from '../dtos/UpgradeReadiness.dto.js'\n\n/**\n * The text for a blocked upgrade gate (PDP-3067). It names the next step.\n * console-backend sends it as the message of the 409 and of a skipped\n * cluster in a bulk run, and Control shows it on the cluster page, so the\n * three always agree.\n */\nexport function upgradeGateReason(gate: UpgradeReadinessDto): string {\n if (gate.gracePeriod) {\n // The hours, not the end time: the wait is 24 hours, or half an hour on\n // dev, and a raw ISO time is hard to read in a 409.\n const hours = gate.gracePeriod.hoursRemaining\n return `The cluster got a new minor version recently. Try the upgrade again in about ${hours} ${hours === 1 ? 'hour' : 'hours'}.`\n }\n switch (gate.readiness?.source) {\n case 'suspended':\n return 'The cluster is suspended and cannot report its migration state. Resume the cluster, then try the upgrade again.'\n case 'updating':\n return 'The cluster still rolls out its last upgrade. Try the upgrade again when the cluster is healthy.'\n case 'timeout':\n case 'error':\n return 'The cluster did not answer the upgrade readiness check. Try the upgrade again later.'\n case 'unsupported':\n return 'Console cannot reach the upgrade readiness check of this cluster. Try the upgrade again later.'\n default:\n return gate.readiness?.verdict === 'notReady'\n ? 'The cluster still completes the migrations of its last upgrade. Try the upgrade again later.'\n : 'The cluster could not read its own migration state. Try the upgrade again later.'\n }\n}\n"],
5
+ "mappings": "AAcO,SAAS,kBAAkB,MAAmC;AACnE,MAAI,KAAK,aAAa;AAGpB,UAAM,QAAQ,KAAK,YAAY;AAC/B,WAAO,gFAAgF,KAAK,IAAI,UAAU,IAAI,SAAS,OAAO;AAAA,EAChI;AACA,UAAQ,KAAK,WAAW,QAAQ;AAAA,IAC9B,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO,KAAK,WAAW,YAAY,aAC/B,iGACA;AAAA,EACR;AACF;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-shared-types",
3
- "version": "5.0.0",
3
+ "version": "7.0.0",
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"