@camunda/ccma-shared-types 10.11.0 → 10.12.1

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.
@@ -131,7 +131,7 @@ const CHART_METRICS = [
131
131
  {
132
132
  id: "hostingCost",
133
133
  label: "Hosting cost",
134
- description: "The loaded hosting cost of the clusters, in US dollars, from the cloud bill. The sum over each bucket. The bill holds every stage.",
134
+ description: "The total gross hosting cost of the clusters that HDP tracks, in US dollars, before AWS credits. The sum over each bucket. The table holds every stage.",
135
135
  unit: "usd",
136
136
  dimensions: [CLUSTER_DIMENSION, ORG_DIMENSION, ORG_NAME_DIMENSION],
137
137
  filters: [ORG_ID_FILTER, CLUSTER_ID_FILTER],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/charts/chart-metrics.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 { SearchFieldSpec } from '../search/fields.js'\nimport type { ChartGrain, ChartUnit } from './chart-spec.js'\n\n// ============================================================================\n// The metric catalogue of the chart tiles, without SQL.\n//\n// The frontend reads it for autocomplete, help and validation as you type.\n// accounts-backend pairs each entry with its SQL (`hdp-data.charts.controller`),\n// and a test there makes sure that the two have the same ids.\n// ============================================================================\n\nexport interface ChartDimensionSpec {\n /** As typed after `by`. */\n id: string\n label: string\n description: string\n}\n\nexport interface ChartMetricSpec {\n /** As typed at the start of a query. */\n id: string\n label: string\n description: string\n unit: ChartUnit\n dimensions: readonly ChartDimensionSpec[]\n /** The fields that `where` can use. */\n filters: readonly SearchFieldSpec[]\n grains: readonly ChartGrain[]\n /** The longest window, in days. */\n maxWindowDays: number\n /**\n * How one number comes from a chart, for the `stat` render: first over the\n * series of a bucket, then over the buckets of the window. A counter sums\n * both. A gauge must not: a sum of daily load percentages means nothing.\n */\n stat: { series: 'sum' | 'mean'; window: 'sum' | 'max' | 'mean' }\n}\n\nconst CLUSTER_DIMENSION: ChartDimensionSpec = {\n id: 'cluster',\n label: 'Cluster',\n description: 'The cluster id.',\n}\n\nconst ORG_DIMENSION: ChartDimensionSpec = {\n id: 'org',\n label: 'Organization',\n description: 'The organization id.',\n}\n\n/**\n * The name of the organization of the cluster. It comes from the clusters\n * table of HDP, which holds the prod clusters only, so on another stage every\n * series is `(unknown)`.\n */\nconst ORG_NAME_DIMENSION: ChartDimensionSpec = {\n id: 'orgName',\n label: 'Organization name',\n description:\n 'The name of the organization of the cluster. Prod clusters only: on other stages it is (unknown).',\n}\n\nconst ORG_ID_FILTER: SearchFieldSpec = {\n field: 'orgId',\n label: 'Organization id',\n description: 'Exact organization id.',\n type: 'string',\n capabilities: ['match'],\n example: 'orgId:3f2c\u2026',\n}\n\nconst CLUSTER_ID_FILTER: SearchFieldSpec = {\n field: 'clusterId',\n label: 'Cluster id',\n description: 'Exact cluster id.',\n type: 'string',\n capabilities: ['match'],\n example: 'clusterId:9a1b\u2026',\n}\n\nconst VALUE_METRIC_DIMENSIONS: readonly ChartDimensionSpec[] = [\n CLUSTER_DIMENSION,\n ORG_DIMENSION,\n ORG_NAME_DIMENSION,\n {\n id: 'salesPlan',\n label: 'Sales plan',\n description: 'The sales plan of the organization on that day.',\n },\n {\n id: 'env',\n label: 'Environment',\n description: 'Production or development cluster.',\n },\n]\n\nconst VALUE_METRIC_FILTERS: readonly SearchFieldSpec[] = [\n ORG_ID_FILTER,\n CLUSTER_ID_FILTER,\n {\n field: 'salesPlan',\n label: 'Sales plan',\n description: 'Sales plan name, case-insensitive. Use * as a wildcard.',\n type: 'string',\n capabilities: ['match'],\n example: 'salesPlan:enterprise*',\n },\n {\n field: 'env',\n label: 'Environment',\n description: 'Production or development cluster.',\n type: 'enum',\n capabilities: ['match'],\n enumValues: ['production', 'development'],\n example: 'env:production',\n },\n]\n\nconst ALL_GRAINS: readonly ChartGrain[] = ['day', 'week', 'month']\nconst VALUE_METRIC_GRAINS = ALL_GRAINS\n\n/**\n * About one year, for a metric on a large table: the cluster gauges, which\n * are scraped about once a minute, and the change events of every backend\n * and stage. `over 12m every month` starts on the 1st of a month and reads up\n * to 396 days, so the limit holds that query.\n */\nconst LARGE_TABLE_MAX_WINDOW_DAYS = 400\n\n/** A gauge of the clusters, from the Prometheus metrics in HDP. */\nconst gaugeMetric = (\n id: string,\n label: string,\n unit: ChartMetricSpec['unit'],\n stat: ChartMetricSpec['stat'],\n description: string,\n): ChartMetricSpec => ({\n id,\n label,\n description,\n unit,\n dimensions: [CLUSTER_DIMENSION, ORG_DIMENSION, ORG_NAME_DIMENSION],\n filters: [ORG_ID_FILTER, CLUSTER_ID_FILTER],\n grains: ALL_GRAINS,\n maxWindowDays: LARGE_TABLE_MAX_WINDOW_DAYS,\n stat,\n})\n\n/**\n * About two years. The table holds one row for each cluster, day and metric.\n * `over 24m every month` starts on the 1st of a month and reads up to 761\n * days, so the limit holds that query.\n */\nconst VALUE_METRIC_MAX_WINDOW_DAYS = 762\n\nconst valueMetric = (\n id: string,\n label: string,\n description: string,\n): ChartMetricSpec => ({\n id,\n label,\n description,\n unit: 'count',\n dimensions: VALUE_METRIC_DIMENSIONS,\n filters: VALUE_METRIC_FILTERS,\n grains: VALUE_METRIC_GRAINS,\n maxWindowDays: VALUE_METRIC_MAX_WINDOW_DAYS,\n stat: { series: 'sum', window: 'sum' },\n})\n\nexport const CHART_METRICS: readonly ChartMetricSpec[] = [\n valueMetric(\n 'processInstances',\n 'Process instances',\n 'Process instances that started, from the HDP value metrics. The sum over each bucket.',\n ),\n valueMetric(\n 'decisionInstances',\n 'Decision instances',\n 'Decision instances that ran, from the HDP value metrics. The sum over each bucket.',\n ),\n valueMetric(\n 'taskUsers',\n 'Task users',\n 'Task users, from the HDP value metrics. The sum of the daily values over each bucket, as on the Value metrics tab.',\n ),\n gaugeMetric(\n 'activeTenants',\n 'Active tenants',\n 'count',\n { series: 'sum', window: 'max' },\n 'Active tenants: the peak of each cluster on a day, summed over the clusters. A week or a month shows its highest day. The table holds every stage.',\n ),\n gaugeMetric(\n 'clusterLoad',\n 'Cluster load',\n 'percent',\n { series: 'mean', window: 'mean' },\n 'The load of a cluster, in percent: the mean of a day, then the mean over the clusters and the days of a bucket. The table holds every stage.',\n ),\n gaugeMetric(\n 'diskUsedBytes',\n 'Elasticsearch disk used',\n 'bytes',\n { series: 'sum', window: 'max' },\n 'The used Elasticsearch disk: the peak of each cluster on a day, summed over the clusters. A week or a month shows its highest day. The table holds every stage.',\n ),\n {\n id: 'hostingCost',\n label: 'Hosting cost',\n description:\n 'The loaded hosting cost of the clusters, in US dollars, from the cloud bill. The sum over each bucket. The bill holds every stage.',\n unit: 'usd',\n dimensions: [CLUSTER_DIMENSION, ORG_DIMENSION, ORG_NAME_DIMENSION],\n filters: [ORG_ID_FILTER, CLUSTER_ID_FILTER],\n grains: ALL_GRAINS,\n maxWindowDays: VALUE_METRIC_MAX_WINDOW_DAYS,\n stat: { series: 'sum', window: 'sum' },\n },\n {\n id: 'changeEvents',\n label: 'Change events',\n description:\n 'The change events that the backends of this stage sent to HDP: one for each insert, update or delete of an entity. The count over each bucket.',\n unit: 'count',\n dimensions: [\n { id: 'entity', label: 'Entity', description: 'For example cluster.' },\n {\n id: 'operation',\n label: 'Operation',\n description: 'insert, update or delete.',\n },\n ],\n filters: [\n {\n field: 'entity',\n label: 'Entity',\n description: 'The entity, case-insensitive. Use * as a wildcard.',\n type: 'string',\n capabilities: ['match'],\n example: 'entity:cluster',\n },\n {\n field: 'operation',\n label: 'Operation',\n description: 'The operation.',\n type: 'enum',\n capabilities: ['match'],\n enumValues: ['insert', 'update', 'delete'],\n example: 'operation:delete',\n },\n ],\n grains: ALL_GRAINS,\n maxWindowDays: LARGE_TABLE_MAX_WINDOW_DAYS,\n stat: { series: 'sum', window: 'sum' },\n },\n]\n\n/** Case-insensitive. */\nexport const findChartMetric = (\n id: string,\n metrics: readonly ChartMetricSpec[] = CHART_METRICS,\n): ChartMetricSpec | undefined =>\n metrics.find((metric) => metric.id.toLowerCase() === id.toLowerCase())\n\n/** Case-insensitive. */\nexport const findChartDimension = (\n metric: ChartMetricSpec,\n id: string,\n): ChartDimensionSpec | undefined =>\n metric.dimensions.find(\n (dimension) => dimension.id.toLowerCase() === id.toLowerCase(),\n )\n"],
4
+ "sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type { SearchFieldSpec } from '../search/fields.js'\nimport type { ChartGrain, ChartUnit } from './chart-spec.js'\n\n// ============================================================================\n// The metric catalogue of the chart tiles, without SQL.\n//\n// The frontend reads it for autocomplete, help and validation as you type.\n// accounts-backend pairs each entry with its SQL (`hdp-data.charts.controller`),\n// and a test there makes sure that the two have the same ids.\n// ============================================================================\n\nexport interface ChartDimensionSpec {\n /** As typed after `by`. */\n id: string\n label: string\n description: string\n}\n\nexport interface ChartMetricSpec {\n /** As typed at the start of a query. */\n id: string\n label: string\n description: string\n unit: ChartUnit\n dimensions: readonly ChartDimensionSpec[]\n /** The fields that `where` can use. */\n filters: readonly SearchFieldSpec[]\n grains: readonly ChartGrain[]\n /** The longest window, in days. */\n maxWindowDays: number\n /**\n * How one number comes from a chart, for the `stat` render: first over the\n * series of a bucket, then over the buckets of the window. A counter sums\n * both. A gauge must not: a sum of daily load percentages means nothing.\n */\n stat: { series: 'sum' | 'mean'; window: 'sum' | 'max' | 'mean' }\n}\n\nconst CLUSTER_DIMENSION: ChartDimensionSpec = {\n id: 'cluster',\n label: 'Cluster',\n description: 'The cluster id.',\n}\n\nconst ORG_DIMENSION: ChartDimensionSpec = {\n id: 'org',\n label: 'Organization',\n description: 'The organization id.',\n}\n\n/**\n * The name of the organization of the cluster. It comes from the clusters\n * table of HDP, which holds the prod clusters only, so on another stage every\n * series is `(unknown)`.\n */\nconst ORG_NAME_DIMENSION: ChartDimensionSpec = {\n id: 'orgName',\n label: 'Organization name',\n description:\n 'The name of the organization of the cluster. Prod clusters only: on other stages it is (unknown).',\n}\n\nconst ORG_ID_FILTER: SearchFieldSpec = {\n field: 'orgId',\n label: 'Organization id',\n description: 'Exact organization id.',\n type: 'string',\n capabilities: ['match'],\n example: 'orgId:3f2c\u2026',\n}\n\nconst CLUSTER_ID_FILTER: SearchFieldSpec = {\n field: 'clusterId',\n label: 'Cluster id',\n description: 'Exact cluster id.',\n type: 'string',\n capabilities: ['match'],\n example: 'clusterId:9a1b\u2026',\n}\n\nconst VALUE_METRIC_DIMENSIONS: readonly ChartDimensionSpec[] = [\n CLUSTER_DIMENSION,\n ORG_DIMENSION,\n ORG_NAME_DIMENSION,\n {\n id: 'salesPlan',\n label: 'Sales plan',\n description: 'The sales plan of the organization on that day.',\n },\n {\n id: 'env',\n label: 'Environment',\n description: 'Production or development cluster.',\n },\n]\n\nconst VALUE_METRIC_FILTERS: readonly SearchFieldSpec[] = [\n ORG_ID_FILTER,\n CLUSTER_ID_FILTER,\n {\n field: 'salesPlan',\n label: 'Sales plan',\n description: 'Sales plan name, case-insensitive. Use * as a wildcard.',\n type: 'string',\n capabilities: ['match'],\n example: 'salesPlan:enterprise*',\n },\n {\n field: 'env',\n label: 'Environment',\n description: 'Production or development cluster.',\n type: 'enum',\n capabilities: ['match'],\n enumValues: ['production', 'development'],\n example: 'env:production',\n },\n]\n\nconst ALL_GRAINS: readonly ChartGrain[] = ['day', 'week', 'month']\nconst VALUE_METRIC_GRAINS = ALL_GRAINS\n\n/**\n * About one year, for a metric on a large table: the cluster gauges, which\n * are scraped about once a minute, and the change events of every backend\n * and stage. `over 12m every month` starts on the 1st of a month and reads up\n * to 396 days, so the limit holds that query.\n */\nconst LARGE_TABLE_MAX_WINDOW_DAYS = 400\n\n/** A gauge of the clusters, from the Prometheus metrics in HDP. */\nconst gaugeMetric = (\n id: string,\n label: string,\n unit: ChartMetricSpec['unit'],\n stat: ChartMetricSpec['stat'],\n description: string,\n): ChartMetricSpec => ({\n id,\n label,\n description,\n unit,\n dimensions: [CLUSTER_DIMENSION, ORG_DIMENSION, ORG_NAME_DIMENSION],\n filters: [ORG_ID_FILTER, CLUSTER_ID_FILTER],\n grains: ALL_GRAINS,\n maxWindowDays: LARGE_TABLE_MAX_WINDOW_DAYS,\n stat,\n})\n\n/**\n * About two years. The table holds one row for each cluster, day and metric.\n * `over 24m every month` starts on the 1st of a month and reads up to 761\n * days, so the limit holds that query.\n */\nconst VALUE_METRIC_MAX_WINDOW_DAYS = 762\n\nconst valueMetric = (\n id: string,\n label: string,\n description: string,\n): ChartMetricSpec => ({\n id,\n label,\n description,\n unit: 'count',\n dimensions: VALUE_METRIC_DIMENSIONS,\n filters: VALUE_METRIC_FILTERS,\n grains: VALUE_METRIC_GRAINS,\n maxWindowDays: VALUE_METRIC_MAX_WINDOW_DAYS,\n stat: { series: 'sum', window: 'sum' },\n})\n\nexport const CHART_METRICS: readonly ChartMetricSpec[] = [\n valueMetric(\n 'processInstances',\n 'Process instances',\n 'Process instances that started, from the HDP value metrics. The sum over each bucket.',\n ),\n valueMetric(\n 'decisionInstances',\n 'Decision instances',\n 'Decision instances that ran, from the HDP value metrics. The sum over each bucket.',\n ),\n valueMetric(\n 'taskUsers',\n 'Task users',\n 'Task users, from the HDP value metrics. The sum of the daily values over each bucket, as on the Value metrics tab.',\n ),\n gaugeMetric(\n 'activeTenants',\n 'Active tenants',\n 'count',\n { series: 'sum', window: 'max' },\n 'Active tenants: the peak of each cluster on a day, summed over the clusters. A week or a month shows its highest day. The table holds every stage.',\n ),\n gaugeMetric(\n 'clusterLoad',\n 'Cluster load',\n 'percent',\n { series: 'mean', window: 'mean' },\n 'The load of a cluster, in percent: the mean of a day, then the mean over the clusters and the days of a bucket. The table holds every stage.',\n ),\n gaugeMetric(\n 'diskUsedBytes',\n 'Elasticsearch disk used',\n 'bytes',\n { series: 'sum', window: 'max' },\n 'The used Elasticsearch disk: the peak of each cluster on a day, summed over the clusters. A week or a month shows its highest day. The table holds every stage.',\n ),\n {\n id: 'hostingCost',\n label: 'Hosting cost',\n description:\n 'The total gross hosting cost of the clusters that HDP tracks, in US dollars, before AWS credits. The sum over each bucket. The table holds every stage.',\n unit: 'usd',\n dimensions: [CLUSTER_DIMENSION, ORG_DIMENSION, ORG_NAME_DIMENSION],\n filters: [ORG_ID_FILTER, CLUSTER_ID_FILTER],\n grains: ALL_GRAINS,\n maxWindowDays: VALUE_METRIC_MAX_WINDOW_DAYS,\n stat: { series: 'sum', window: 'sum' },\n },\n {\n id: 'changeEvents',\n label: 'Change events',\n description:\n 'The change events that the backends of this stage sent to HDP: one for each insert, update or delete of an entity. The count over each bucket.',\n unit: 'count',\n dimensions: [\n { id: 'entity', label: 'Entity', description: 'For example cluster.' },\n {\n id: 'operation',\n label: 'Operation',\n description: 'insert, update or delete.',\n },\n ],\n filters: [\n {\n field: 'entity',\n label: 'Entity',\n description: 'The entity, case-insensitive. Use * as a wildcard.',\n type: 'string',\n capabilities: ['match'],\n example: 'entity:cluster',\n },\n {\n field: 'operation',\n label: 'Operation',\n description: 'The operation.',\n type: 'enum',\n capabilities: ['match'],\n enumValues: ['insert', 'update', 'delete'],\n example: 'operation:delete',\n },\n ],\n grains: ALL_GRAINS,\n maxWindowDays: LARGE_TABLE_MAX_WINDOW_DAYS,\n stat: { series: 'sum', window: 'sum' },\n },\n]\n\n/** Case-insensitive. */\nexport const findChartMetric = (\n id: string,\n metrics: readonly ChartMetricSpec[] = CHART_METRICS,\n): ChartMetricSpec | undefined =>\n metrics.find((metric) => metric.id.toLowerCase() === id.toLowerCase())\n\n/** Case-insensitive. */\nexport const findChartDimension = (\n metric: ChartMetricSpec,\n id: string,\n): ChartDimensionSpec | undefined =>\n metric.dimensions.find(\n (dimension) => dimension.id.toLowerCase() === id.toLowerCase(),\n )\n"],
5
5
  "mappings": "AA4CA,MAAM,oBAAwC;AAAA,EAC5C,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,aAAa;AACf;AA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,UAAU,aAAa,uBAAuB;AAAA,MACrE;AAAA,QACE,IAAI;AAAA,QACJ,OAAO;AAAA,QACP,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,QACE,OAAO;AAAA,QACP,OAAO;AAAA,QACP,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc,CAAC,OAAO;AAAA,QACtB,SAAS;AAAA,MACX;AAAA,MACA;AAAA,QACE,OAAO;AAAA,QACP,OAAO;AAAA,QACP,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc,CAAC,OAAO;AAAA,QACtB,YAAY,CAAC,UAAU,UAAU,QAAQ;AAAA,QACzC,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,MAAM,EAAE,QAAQ,OAAO,QAAQ,MAAM;AAAA,EACvC;AACF;AAGO,MAAM,kBAAkB,CAC7B,IACA,UAAsC,kBAEtC,QAAQ,KAAK,CAAC,WAAW,OAAO,GAAG,YAAY,MAAM,GAAG,YAAY,CAAC;AAGhE,MAAM,qBAAqB,CAChC,QACA,OAEA,OAAO,WAAW;AAAA,EAChB,CAAC,cAAc,UAAU,GAAG,YAAY,MAAM,GAAG,YAAY;AAC/D;",
6
6
  "names": []
7
7
  }
@@ -65,10 +65,9 @@ export declare namespace Hdp {
65
65
  * prior window is days `windowDays` through `2 * windowDays - 1` back.
66
66
  * Each window holds exactly `windowDays` days, with no gap and no overlap.
67
67
  *
68
- * `hostingCostUsd` is the loaded cost: the cluster's direct spend plus its
69
- * share of shared infrastructure. It is what the cluster actually cost, not
70
- * `raw_cost`, the pre-allocation figure that only reconciles to the cloud
71
- * bill.
68
+ * `hostingCostUsd` is the total gross cost that HDP tracks: the cluster's
69
+ * direct spend plus its share of shared infrastructure and of tooling. It is
70
+ * what the cluster actually cost, before AWS credits.
72
71
  */
73
72
  interface ClusterHostingCost {
74
73
  clusterId: string;
@@ -76,7 +75,7 @@ export declare namespace Hdp {
76
75
  windowDays: number;
77
76
  hostingCostUsd: number;
78
77
  /**
79
- * The loaded cost of the `windowDays`-day window immediately before this
78
+ * The hosting cost of the `windowDays`-day window immediately before this
80
79
  * one — days `windowDays` through `2 * windowDays - 1` back from the
81
80
  * anchor day (day 0), with no gap and no overlap against the current
82
81
  * window. Absent when
@@ -96,17 +95,17 @@ export declare namespace Hdp {
96
95
  */
97
96
  trend?: 'up' | 'down' | 'flat';
98
97
  }
99
- /** The loaded cost of one cluster over the fleet cost window. */
98
+ /** The hosting cost of one cluster over the fleet cost window. */
100
99
  interface FleetHostingCostRow {
101
100
  clusterId: string;
102
101
  hostingCostUsd: number;
103
102
  }
104
103
  /**
105
- * The loaded hosting cost of every cluster that HDP holds inside the
104
+ * The hosting cost of every cluster that HDP holds inside the
106
105
  * window, for the whole fleet. Each row is the same number as
107
106
  * `ClusterHostingCost.hostingCostUsd` gives for that cluster: same table,
108
- * same `loaded_cost` column, same window that ends at the table-wide anchor
109
- * day.
107
+ * same `total_gross_cost` column, same window that ends at the table-wide
108
+ * anchor day.
110
109
  *
111
110
  * HDP keeps the rows of clusters that no longer exist, thus the reader
112
111
  * matches these rows against its own cluster list. A cluster with no row
@@ -26,6 +26,8 @@ export interface Cluster {
26
26
  primaryConfigured: boolean;
27
27
  secondaryConfigured: boolean;
28
28
  };
29
+ /** Number of hardware packages allocated to the cluster. */
30
+ numberOfAllocatedHwPackages?: number;
29
31
  }
30
32
  export interface ClusterBackup {
31
33
  clusterId: string;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/types/hdp.types.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 { Limits } from '../dtos/SalesPlan.dto.js'\nimport type { UsageAlertMetric } from '../dtos/UsageAlert.dto.js'\nimport type { ClusterClientPermission } from '../enums/ClusterClientPermissions.enum.js'\nimport type { ConsoleAPIClientPermission } from '../enums/ConsoleApiClientPermission.enum.js'\nimport type { OrganizationRole } from '../enums/OrganizationRole.enum.js'\nimport type { DisplayedSalesPlan, SalesPlanType } from './SalesPlanType.type.js'\n\nexport interface Cluster {\n uuid: string\n name: string\n clusterPlanType: ClusterPlanType\n clusterPlan: ClusterPlan\n generation: Generation\n channel: Channel\n datacenter?: Datacenter // is not fetched eagerly, if we do not have it we just gonna omit it\n amountOfIpWhitelistRules: number\n ownerUuid: string\n created: Date\n autoUpdate: boolean\n mcpEnabled?: boolean\n businessIdUniquenessEnabled?: boolean\n optimizeEnabled?: boolean\n tags?: string[]\n sleeping?: boolean\n activeModifications: boolean\n encryptionKeysSet?: {\n primaryConfigured: boolean\n secondaryConfigured: boolean\n }\n}\nexport interface ClusterBackup {\n clusterId: string\n backupId?: string\n}\n\nexport interface ClusterModification {\n uuid: string\n clusterUuid: string\n owner: string\n createdAt?: Date\n archivedAt?: Date\n}\n\nexport interface ClusterModificationConfig {\n uuid: string\n clusterUuid: string\n modificationUuid: string\n creator: string\n description: string\n url?: string\n createdAt?: Date\n sealedAt?: Date\n activatedAt?: Date\n replacedBy?: string\n deactivatedAt?: Date\n deactivatedBy?: string | null\n expiresAt?: Date | null\n expiredNotifiedAt?: Date | null\n yoloJustification?: string\n}\n\n/**\n * HDP-specific interface for ClusterModificationConfig.\n * Used for Holy Data Platform integration - keeps Date objects for timestamp fields.\n */\nexport interface HdpClusterModificationConfig {\n uuid: string\n clusterUuid: string\n modificationUuid: string\n creator: string\n description: string\n url?: string\n createdAt?: Date\n sealedAt?: Date\n activatedAt?: Date\n replacedBy?: string\n deactivatedAt?: Date\n deactivatedBy?: string | null\n expiresAt?: Date | null\n expiredNotifiedAt?: Date | null\n}\n\nexport interface ClusterBackupSchedule {\n clusterId: string\n schedule?: string\n}\n\nexport interface ClusterPlanType {\n uuid: string\n name: string\n availabilityClass: string\n isDevelopment: boolean\n}\n\nexport interface ClusterPlan {\n uuid: string\n name: string\n}\n\nexport interface Datacenter {\n uuid: string\n name: string\n}\nexport interface Generation {\n uuid: string\n name: string\n}\nexport interface Channel {\n uuid: string\n name: string\n}\n\n// eslint-disable-next-line no-shadow\nexport enum AlertSubscriptionType {\n ProcessAlert = 'ProcessAlert',\n}\n\n// eslint-disable-next-line no-shadow\nexport enum AlertSubscriptionReportType {\n Email = 'Email',\n Webhook = 'Webhook',\n}\nexport interface AlertSubscription {\n uuid: string\n clusterUuid?: string\n target: string // userIdOrWebhook\n reportType: AlertSubscriptionReportType\n type: AlertSubscriptionType\n}\n\nexport interface ConsoleApiClient {\n uuid: string\n name: string\n organizationUuid: string\n permissions: ConsoleAPIClientPermission[]\n}\n\nexport interface ConnectorSecret {\n clusterUuid: string\n amountOfSecrets: number\n}\n\nexport interface ByomClient {\n uuid: string\n clusterUuid?: string\n username: string\n}\n\nexport interface SecureConnectivity {\n clusterUuid: string\n allowedRegions: string[]\n allowedPrincipals: string[]\n}\n\nexport interface ClusterClient {\n uuid: string\n name: string\n clusterUuid?: string\n clientId: string\n permissions: ClusterClientPermission[]\n}\n\nexport interface Organization {\n uuid: string\n name: string\n salesplan?: {\n type: SalesPlanType // might be undefined when in limbo\n displayedType?: DisplayedSalesPlan // might be undefined when in limbo\n uuid: string // might be undefined when in limbo\n name: string // might be undefined when in limbo\n expireDate?: Date\n }\n reservations?: {\n [key: string]: number\n }\n earlyAccessFeatures?: string[]\n justOptedForTheBetaTerms?: boolean\n salesForceProjectId?: string\n awsOnly?: boolean\n limits?: Limits\n}\n\nexport interface User {\n name: string\n email: string\n userId: string\n orgMemberships?: Array<{ orgUuid: string; roles: OrganizationRole[] }> // can be undefined which means: no new info ;)\n}\n\nexport interface UserLogin {\n userId: string\n}\n\nexport interface Invite {\n email: string\n orgUuid: string\n roles: OrganizationRole[]\n}\n\nexport interface UsageAlert {\n orgId: string\n metric: UsageAlertMetric\n threshold: number\n enabled: boolean\n triggered: boolean\n}\n\nexport interface Audit {\n service: string\n orgId: string\n timestamp: number\n audit: string\n auditType: 'c' | 'r' | 'u' | 'd'\n entity: string\n entityId: string\n userId: string\n entityAttribute?: string\n entityAttributeValueFrom?: string\n entityAttributeValueTo?: string\n parentEntity?: string\n parentEntityId?: string\n}\n\nexport interface SystemAudit {\n service: string\n timestamp: number\n audit: string\n auditType: 'c' | 'r' | 'u' | 'd'\n entity: string\n entityId: string\n userId: string\n entityAttribute?: string | null\n entityAttributeValueFrom?: string | null\n entityAttributeValueTo?: string | null\n orgId?: string | null\n clusterId?: string | null\n}\n\nexport interface TelemetryData {\n customerId: string\n installationId: string\n entities: Array<{ id: string; type: string }>\n key: string\n value: string | number | boolean\n tags?: Record<string, string>\n timestampFrom: number\n timestampTo?: number\n}\n\nexport interface ClusterBulkOperation {\n uuid: string\n name: string\n reason: string\n eyes: number\n clusterUuids: string[]\n type: string\n created: Date\n updated?: Date\n executedAt?: Date\n createdBy: string\n}\n\nexport interface LlmSpend {\n orgId: string\n salesPlanType: SalesPlanType\n spend: number\n maxBudget: number\n}\n\nexport type HdpEntity =\n | 'cluster'\n | 'clusterBackup'\n | 'clusterBackupSchedule'\n | 'clusterRestore'\n | 'datacenter'\n | 'generation'\n | 'channel'\n | 'clusterPlan'\n | 'clusterPlanType'\n | 'alertSubscription'\n | 'consoleApiClient'\n | 'connectorSecret'\n | 'byomClient'\n | 'secureConnectivity'\n | 'clusterClient'\n | 'organization'\n | 'user'\n | 'invite'\n | 'usageAlert'\n | 'audit'\n | 'systemAudit'\n | 'telemetry'\n | 'userlogin'\n | 'clusterBulkOperation'\n | 'clusterModification'\n | 'clusterModificationConfig'\n | 'llmSpend'\n\n/**\n * The cluster disks that the disk-usage route of accounts-backend accepts.\n * HDP does not ingest the Zeebe gauge yet, so a Zeebe read returns no rows.\n */\nexport const HDP_DISKS = ['elasticsearch', 'zeebe'] as const\nexport type HdpDisk = (typeof HDP_DISKS)[number]\n\nexport interface HdpPrometheusDataCapacityDataPoint {\n clusterId?: string\n ts: number\n avg: number\n min: number\n max: number\n}\n\nexport interface HdpBackendChangeEvent {\n ts: number\n data: {\n stage: string\n entity: string\n operation: string\n data: any\n }\n}\n"],
5
- "mappings": "AAuHO,IAAK,wBAAL,kBAAKA,2BAAL;AACL,EAAAA,uBAAA,kBAAe;AADL,SAAAA;AAAA,GAAA;AAKL,IAAK,8BAAL,kBAAKC,iCAAL;AACL,EAAAA,6BAAA,WAAQ;AACR,EAAAA,6BAAA,aAAU;AAFA,SAAAA;AAAA,GAAA;AAwLL,MAAM,YAAY,CAAC,iBAAiB,OAAO;",
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 { Limits } from '../dtos/SalesPlan.dto.js'\nimport type { UsageAlertMetric } from '../dtos/UsageAlert.dto.js'\nimport type { ClusterClientPermission } from '../enums/ClusterClientPermissions.enum.js'\nimport type { ConsoleAPIClientPermission } from '../enums/ConsoleApiClientPermission.enum.js'\nimport type { OrganizationRole } from '../enums/OrganizationRole.enum.js'\nimport type { DisplayedSalesPlan, SalesPlanType } from './SalesPlanType.type.js'\n\nexport interface Cluster {\n uuid: string\n name: string\n clusterPlanType: ClusterPlanType\n clusterPlan: ClusterPlan\n generation: Generation\n channel: Channel\n datacenter?: Datacenter // is not fetched eagerly, if we do not have it we just gonna omit it\n amountOfIpWhitelistRules: number\n ownerUuid: string\n created: Date\n autoUpdate: boolean\n mcpEnabled?: boolean\n businessIdUniquenessEnabled?: boolean\n optimizeEnabled?: boolean\n tags?: string[]\n sleeping?: boolean\n activeModifications: boolean\n encryptionKeysSet?: {\n primaryConfigured: boolean\n secondaryConfigured: boolean\n }\n /** Number of hardware packages allocated to the cluster. */\n numberOfAllocatedHwPackages?: number\n}\nexport interface ClusterBackup {\n clusterId: string\n backupId?: string\n}\n\nexport interface ClusterModification {\n uuid: string\n clusterUuid: string\n owner: string\n createdAt?: Date\n archivedAt?: Date\n}\n\nexport interface ClusterModificationConfig {\n uuid: string\n clusterUuid: string\n modificationUuid: string\n creator: string\n description: string\n url?: string\n createdAt?: Date\n sealedAt?: Date\n activatedAt?: Date\n replacedBy?: string\n deactivatedAt?: Date\n deactivatedBy?: string | null\n expiresAt?: Date | null\n expiredNotifiedAt?: Date | null\n yoloJustification?: string\n}\n\n/**\n * HDP-specific interface for ClusterModificationConfig.\n * Used for Holy Data Platform integration - keeps Date objects for timestamp fields.\n */\nexport interface HdpClusterModificationConfig {\n uuid: string\n clusterUuid: string\n modificationUuid: string\n creator: string\n description: string\n url?: string\n createdAt?: Date\n sealedAt?: Date\n activatedAt?: Date\n replacedBy?: string\n deactivatedAt?: Date\n deactivatedBy?: string | null\n expiresAt?: Date | null\n expiredNotifiedAt?: Date | null\n}\n\nexport interface ClusterBackupSchedule {\n clusterId: string\n schedule?: string\n}\n\nexport interface ClusterPlanType {\n uuid: string\n name: string\n availabilityClass: string\n isDevelopment: boolean\n}\n\nexport interface ClusterPlan {\n uuid: string\n name: string\n}\n\nexport interface Datacenter {\n uuid: string\n name: string\n}\nexport interface Generation {\n uuid: string\n name: string\n}\nexport interface Channel {\n uuid: string\n name: string\n}\n\n// eslint-disable-next-line no-shadow\nexport enum AlertSubscriptionType {\n ProcessAlert = 'ProcessAlert',\n}\n\n// eslint-disable-next-line no-shadow\nexport enum AlertSubscriptionReportType {\n Email = 'Email',\n Webhook = 'Webhook',\n}\nexport interface AlertSubscription {\n uuid: string\n clusterUuid?: string\n target: string // userIdOrWebhook\n reportType: AlertSubscriptionReportType\n type: AlertSubscriptionType\n}\n\nexport interface ConsoleApiClient {\n uuid: string\n name: string\n organizationUuid: string\n permissions: ConsoleAPIClientPermission[]\n}\n\nexport interface ConnectorSecret {\n clusterUuid: string\n amountOfSecrets: number\n}\n\nexport interface ByomClient {\n uuid: string\n clusterUuid?: string\n username: string\n}\n\nexport interface SecureConnectivity {\n clusterUuid: string\n allowedRegions: string[]\n allowedPrincipals: string[]\n}\n\nexport interface ClusterClient {\n uuid: string\n name: string\n clusterUuid?: string\n clientId: string\n permissions: ClusterClientPermission[]\n}\n\nexport interface Organization {\n uuid: string\n name: string\n salesplan?: {\n type: SalesPlanType // might be undefined when in limbo\n displayedType?: DisplayedSalesPlan // might be undefined when in limbo\n uuid: string // might be undefined when in limbo\n name: string // might be undefined when in limbo\n expireDate?: Date\n }\n reservations?: {\n [key: string]: number\n }\n earlyAccessFeatures?: string[]\n justOptedForTheBetaTerms?: boolean\n salesForceProjectId?: string\n awsOnly?: boolean\n limits?: Limits\n}\n\nexport interface User {\n name: string\n email: string\n userId: string\n orgMemberships?: Array<{ orgUuid: string; roles: OrganizationRole[] }> // can be undefined which means: no new info ;)\n}\n\nexport interface UserLogin {\n userId: string\n}\n\nexport interface Invite {\n email: string\n orgUuid: string\n roles: OrganizationRole[]\n}\n\nexport interface UsageAlert {\n orgId: string\n metric: UsageAlertMetric\n threshold: number\n enabled: boolean\n triggered: boolean\n}\n\nexport interface Audit {\n service: string\n orgId: string\n timestamp: number\n audit: string\n auditType: 'c' | 'r' | 'u' | 'd'\n entity: string\n entityId: string\n userId: string\n entityAttribute?: string\n entityAttributeValueFrom?: string\n entityAttributeValueTo?: string\n parentEntity?: string\n parentEntityId?: string\n}\n\nexport interface SystemAudit {\n service: string\n timestamp: number\n audit: string\n auditType: 'c' | 'r' | 'u' | 'd'\n entity: string\n entityId: string\n userId: string\n entityAttribute?: string | null\n entityAttributeValueFrom?: string | null\n entityAttributeValueTo?: string | null\n orgId?: string | null\n clusterId?: string | null\n}\n\nexport interface TelemetryData {\n customerId: string\n installationId: string\n entities: Array<{ id: string; type: string }>\n key: string\n value: string | number | boolean\n tags?: Record<string, string>\n timestampFrom: number\n timestampTo?: number\n}\n\nexport interface ClusterBulkOperation {\n uuid: string\n name: string\n reason: string\n eyes: number\n clusterUuids: string[]\n type: string\n created: Date\n updated?: Date\n executedAt?: Date\n createdBy: string\n}\n\nexport interface LlmSpend {\n orgId: string\n salesPlanType: SalesPlanType\n spend: number\n maxBudget: number\n}\n\nexport type HdpEntity =\n | 'cluster'\n | 'clusterBackup'\n | 'clusterBackupSchedule'\n | 'clusterRestore'\n | 'datacenter'\n | 'generation'\n | 'channel'\n | 'clusterPlan'\n | 'clusterPlanType'\n | 'alertSubscription'\n | 'consoleApiClient'\n | 'connectorSecret'\n | 'byomClient'\n | 'secureConnectivity'\n | 'clusterClient'\n | 'organization'\n | 'user'\n | 'invite'\n | 'usageAlert'\n | 'audit'\n | 'systemAudit'\n | 'telemetry'\n | 'userlogin'\n | 'clusterBulkOperation'\n | 'clusterModification'\n | 'clusterModificationConfig'\n | 'llmSpend'\n\n/**\n * The cluster disks that the disk-usage route of accounts-backend accepts.\n * HDP does not ingest the Zeebe gauge yet, so a Zeebe read returns no rows.\n */\nexport const HDP_DISKS = ['elasticsearch', 'zeebe'] as const\nexport type HdpDisk = (typeof HDP_DISKS)[number]\n\nexport interface HdpPrometheusDataCapacityDataPoint {\n clusterId?: string\n ts: number\n avg: number\n min: number\n max: number\n}\n\nexport interface HdpBackendChangeEvent {\n ts: number\n data: {\n stage: string\n entity: string\n operation: string\n data: any\n }\n}\n"],
5
+ "mappings": "AAyHO,IAAK,wBAAL,kBAAKA,2BAAL;AACL,EAAAA,uBAAA,kBAAe;AADL,SAAAA;AAAA,GAAA;AAKL,IAAK,8BAAL,kBAAKC,iCAAL;AACL,EAAAA,6BAAA,WAAQ;AACR,EAAAA,6BAAA,aAAU;AAFA,SAAAA;AAAA,GAAA;AAwLL,MAAM,YAAY,CAAC,iBAAiB,OAAO;",
6
6
  "names": ["AlertSubscriptionType", "AlertSubscriptionReportType"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-shared-types",
3
- "version": "10.11.0",
3
+ "version": "10.12.1",
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"