@camunda/ccma-shared-types 7.9.0 → 7.9.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.
|
@@ -288,11 +288,13 @@ export interface ListClustersV2Params extends CursorParams {
|
|
|
288
288
|
* by the DB-backed columns behind these list columns (the values are the
|
|
289
289
|
* frontend column `key`s, mapped to SQL expressions in the controller):
|
|
290
290
|
* `orgName` (owner id), `autoUpdate`, `planName`, `planTypeName`, `generation`,
|
|
291
|
-
* `channel`, `stageTag` (the single `camunda` label)
|
|
292
|
-
*
|
|
293
|
-
*
|
|
291
|
+
* `channel`, `stageTag` (the single `camunda` label), `ttlExpiresAt` (a
|
|
292
|
+
* cluster with no expiry is last in both directions; a reader who may not
|
|
293
|
+
* see the TTL gets the default sort). `status`/`region` are intentionally
|
|
294
|
+
* excluded — they're computed from live K8s state / context config, not SQL
|
|
295
|
+
* columns.
|
|
294
296
|
*/
|
|
295
|
-
sort?: 'name' | 'created' | 'orgName' | 'autoUpdate' | 'planName' | 'planTypeName' | 'generation' | 'channel' | 'stageTag';
|
|
297
|
+
sort?: 'name' | 'created' | 'orgName' | 'autoUpdate' | 'planName' | 'planTypeName' | 'generation' | 'channel' | 'stageTag' | 'ttlExpiresAt';
|
|
296
298
|
order?: 'asc' | 'desc';
|
|
297
299
|
filter?: {
|
|
298
300
|
status?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/dtos/ControlV2.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 { CamundaClusterStage } from '../types/CamundaClusterLabels.type.js'\nimport type { ClusterPlanTypesToReserved } from '../types/ClusterPlanTypesToReserved.type.js'\nimport type { ClusterTtlDto } from '../types/ClusterTtl.type.js'\nimport type { SalesPlanType } from '../types/SalesPlanType.type.js'\nimport type { LicensingModelType } from './Organization.dto.js'\n\n// ============================================================================\n// Control (v2) API contract\n//\n// Purpose-built, list-optimized DTOs for the new Control frontend, served by the\n// `/v2` routers on accounts-backend and console-backend. Cursor-paginated, and\n// pre-shaped server-side so the client does no normalization. See\n// copilot/CONTROL_FRONTEND_SPEC.md \u00A710.\n// ============================================================================\n\n/** Generic cursor-paginated response. `nextCursor === null` on the last page. */\nexport interface CursorPage<T> {\n items: T[]\n nextCursor: string | null\n}\n\n/** Cursor pagination query params shared by all v2 list endpoints. */\nexport interface CursorParams {\n cursor?: string\n limit?: number\n}\n\n// ---- Session (GET /v2/session) -------------------------------------------\n\nexport interface ControlSessionUser {\n id: string\n email: string\n name: string\n}\n\n/**\n * Flat map of resolved capability flags for the signed-in user, computed\n * server-side from the existing JWT-claim + Auth0-metadata model (kept as-is,\n * spec Q12). The shell uses these to gate navigation; the backend flattens its\n * `Features` object into the subset the nav needs.\n */\nexport type ControlResolvedPermissions = Record<string, boolean>\n\nexport interface OrgSummaryV2Dto {\n id: string\n name: string\n role: string\n clusterCount: number\n}\n\nexport interface ControlSessionDto {\n user: ControlSessionUser\n permissions: ControlResolvedPermissions\n organizations: OrgSummaryV2Dto[]\n}\n\n// ---- Organizations (GET /v2/organizations) -------------------------------\n\nexport interface OrgListItemV2Dto {\n id: string\n name: string\n /** ISO-8601; part of the cursor key. */\n created: string\n internal: boolean\n salesPlanType?: SalesPlanType\n /** Concrete plan name (`SalesPlan.name`), distinct from the tier `salesPlanType`. */\n salesPlanName?: string\n salesForceId?: string\n /** ISO-8601 end of the trial, when the org is or was on a trial plan. */\n trialExpiresAt?: string\n /**\n * Persisted trial state: `true` when the trial ran out, `false` while it\n * runs. Absent when the org is not on a trial plan or the state is not set.\n */\n trialExpired?: boolean\n /** Org metadata flag: the org can only create clusters on AWS. */\n awsOnly?: boolean\n /** Org metadata flag: enterprise plan limited to development use. */\n enterpriseDevOnly?: boolean\n /** Org metadata: which licensing model prices the org. */\n licensingModel?: LicensingModelType\n /**\n * The cluster plan types the org reserved, by plan type uuid, with the\n * count. Absent when the org has no sales plan, and also when it has one\n * that holds no reserved map (the column is nullable). The export of\n * reservations and clusters of the Organizations page reads it.\n */\n clusterPlanTypesToReserved?: ClusterPlanTypesToReserved\n}\n\nexport interface ListOrganizationsV2Params extends CursorParams {\n q?: string\n /**\n * Lucene-style query over the org fields (see `ORGANIZATION_SEARCH_FIELDS`).\n * ANDed with `q`/`filter` server-side; a bare term behaves like `q`.\n */\n query?: string\n sort?: 'name' | 'created' | 'internal' | 'salesPlanType' | 'salesPlanName'\n order?: 'asc' | 'desc'\n filter?: {\n internal?: boolean\n /** Sales plan tiers (`SalesPlanType`); multi-select, matched with `IN (...)`. */\n salesPlanTypes?: SalesPlanType[]\n /**\n * Concrete plan names (`SalesPlan.name`, distinct from the tier); backs the\n * \"Sales plan name\" filter. Multi-select, matched with `IN (...)`.\n */\n salesPlanNames?: string[]\n /** ISO-8601 lower bound on `created` (age-bucket filters). */\n createdAfter?: string\n /** ISO-8601 upper bound on `created` (age-bucket filters). */\n createdBefore?: string\n /**\n * Restrict to these org uuids. Backs cross-backend lookups (e.g. org by\n * cluster name / client id: resolve owner ids on console, then filter\n * here \u2014 spec \u00A714.1 L).\n */\n ids?: string[]\n /**\n * Only organizations that can create clusters on AWS alone (true), or\n * every other organization (false). Reads `metadata.awsOnly`; an\n * organization with no value counts as not AWS-only, as the accounts\n * tool reads it.\n */\n awsOnly?: boolean\n /**\n * Only organizations that hold a reservation above zero for one of\n * these cluster plan type uuids. Reads\n * `organizationToSalesPlan.clusterPlanTypesToReserved`.\n */\n reservedPlanTypeIds?: string[]\n }\n}\n\nexport interface OrgDetailV2Dto extends OrgListItemV2Dto {\n /** Full detail fields are added as the detail page is built (Phase 3). */\n metadata?: Record<string, unknown>\n}\n\nexport interface OrgMemberV2Dto {\n userId: string\n email: string\n name?: string\n roles: string[]\n status: 'active' | 'invited'\n /** ISO-8601. */\n invitedAt?: string\n /** ISO-8601. */\n joinedAt?: string\n}\n\nexport interface ListOrgMembersV2Params extends CursorParams {\n q?: string\n}\n\n// ---- Clusters (GET /v2/clusters) -----------------------------------------\n\nexport interface ClusterListItemV2Dto {\n id: string\n name: string\n orgId: string\n orgName: string\n /** Normalized server-side; augmented on the fly from the K8s watcher (\u00A79.4 B1). */\n status: string\n /**\n * The `metadata.generation` of the ZeebeCluster CR, from the K8s watcher at\n * the time of the read, as in `ClusterLiveStateV2Entry`. A row thus carries\n * the baseline that a poll of `GET /v2/clusters/live-state` compares with.\n * Absent when the watcher does not know the cluster, or on an older\n * console-backend.\n */\n specGeneration?: number\n /**\n * Cluster environment stage (dev/test/stage/prod), from the single `camunda`\n * label. Absent when the cluster has no camunda label or more than one, so a\n * surface can only trust it when it is set \u2014 the same guard the cluster\n * detail page and accounts use.\n */\n stageTag?: CamundaClusterStage\n /** Plan type name (`ClusterPlanType.name`). Backs the \"Plan type\" column. */\n planTypeName: string\n /**\n * Plan type uuid (`ClusterPlanType.uuid`). The key that the org reserved map\n * (`clusterPlanTypesToReserved`) uses, so the Control org \"Reservations\" tab\n * can group clusters by plan type to compute the used count.\n */\n planTypeId?: string\n /**\n * Hardware-package count for the cluster (advanced offering). One cluster can\n * use more than one package, so the used-reservation total sums this value\n * across the org's clusters. Undefined when the source value is unknown; the\n * client then counts the cluster as one package.\n */\n numberOfAllocatedHwPackages?: number\n /** Concrete plan name (`ClusterPlan.name`). Backs the \"Plan\" column. */\n planName?: string\n /**\n * Concrete plan uuid (`ClusterPlan.uuid`). Names are not unique, so this is\n * the key to compare a cluster with a target plan.\n */\n planId?: string\n /** Generation name, for display. Group and filter by `generationId`. */\n generation: string\n /** Generation uuid. Names are not unique, so this is the grouping key. */\n generationId?: string\n region: string\n /** Display-only; not a sort/filter key (\u00A79.4 B2). */\n load?: number\n updateAvailable: boolean\n /** Auto-update setting (distinct from `updateAvailable`). */\n autoUpdate: boolean\n /** Release channel name, when the cluster is on one. */\n channel?: string\n /** ISO-8601; part of the cursor key. */\n created: string\n /**\n * User id of the creator, e.g. `samlp|Okta|jane.doe@camunda.com`. Absent\n * when a background flow created the cluster, for an old cluster that has\n * no record of its creator, or on an older console-backend. Also absent\n * for a caller without `canReadAllClusterInfo`: the org clusters route\n * serves members of the org too (see `canReadClusterCreator`).\n */\n createdBy?: string\n /**\n * ISO-8601 instant of the last suspend. Absent when the cluster is awake:\n * `Cluster.wakeUp()` clears the column, thus this is the time since the last\n * suspend and not the total time that the cluster was asleep.\n */\n suspendedAt?: string\n /** The \"Authorizations\" toggle of cluster create. */\n identityBackendChecksEnabled?: boolean\n multiTenancyEnabled?: boolean\n /** BYOIDP. */\n externalIdpEnabled?: boolean\n /** Session idle timeout. */\n sessionMaxInactiveIntervalMinutes?: number\n sessionHeartbeatEnabled?: boolean\n /** BYOK: `encryption` is `External`. The key can still be missing. */\n byokEnabled?: boolean\n /** The cluster has at least one external monitoring (BYOM) client. */\n externalMonitoringEnabled?: boolean\n /** The cluster has a `secure_connectivity` row (AWS PrivateLink). */\n privateConnectivityEnabled?: boolean\n /**\n * The cluster TTL. Absent where `CommonClusterDto.ttl` is absent for the\n * same reader: on every stage other than dev and int, prod included. Also\n * absent for a member of the org on the org clusters route, and on an older\n * console-backend.\n */\n ttl?: ClusterTtlDto\n}\n\n/** Detail extends the list shape; richer fields are added in Phase 3. */\nexport type ClusterDetailV2Dto = ClusterListItemV2Dto\n\n/**\n * How much work a cluster did, inside the 30-day activity window.\n *\n * `idle` and `unknown` are different facts and must stay apart. `idle` is\n * evidence that the cluster did no work. `unknown` is the absence of\n * evidence: on the dev stage most clusters have no row at all.\n *\n * The source is the Holistic Data Platform (HDP), which holds one row per\n * cluster, per day, per value metric. The window is 30 days, thus a bucket\n * for \"did work, but more than 30 days ago\" is not possible.\n */\nexport type ClusterActivityBucket =\n /** Work inside the 30-day window. */\n | 'active'\n /** Rows exist inside the window. All values are zero. */\n | 'idle'\n /** No row at all inside the window. */\n | 'unknown'\n\n/** Quick-filter tiles on the clusters list. */\nexport type ClusterActivityTile =\n | 'all'\n | 'active'\n | 'idle'\n | 'unknown'\n /** More than 90 days old, and not active. */\n | 'old-idle'\n /** No more than 30 days old, with no work and no data. */\n | 'new-idle'\n\nexport interface ClusterActivityV2Dto {\n clusterId: string\n /**\n * ISO-8601 instant of the last UTC day with work. HDP buckets by day, thus\n * the time part is always midnight. Absent when the cluster did no work\n * inside the window.\n */\n lastActiveAt?: string\n processInstances30d: number\n bucket: ClusterActivityBucket\n}\n\nexport interface ClusterActivityV2Response {\n /**\n * One entry per live cluster that has an HDP row inside the window. A\n * cluster in the `unknown` bucket has no entry, because the bucket means\n * that no row exists.\n */\n items: ClusterActivityV2Dto[]\n /** Fleet-wide tile counts. The server joins `cluster.created` for the age tiles. */\n counts: Record<ClusterActivityTile, number>\n /** ISO-8601 instant when the server assembled this response. */\n fetchedAt: string\n /** The number of days that the window covers. */\n windowDays: number\n}\n\n/** The modification state of a cluster, as the Clusters list filters it. */\nexport const CLUSTER_MODIFICATION_STATES = [\n 'active',\n 'planned',\n 'archived',\n 'none',\n] as const\nexport type ClusterModificationState =\n (typeof CLUSTER_MODIFICATION_STATES)[number]\n\nexport interface ListClustersV2Params extends CursorParams {\n q?: string\n /**\n * Lucene-style query over the cluster fields (see `CLUSTER_SEARCH_FIELDS`).\n * ANDed with `q`/`filter` server-side; a bare term behaves like `q`.\n */\n query?: string\n /**\n * Server-side sort key. Beyond `name`/`created`, the clusters list also sorts\n * by the DB-backed columns behind these list columns (the values are the\n * frontend column `key`s, mapped to SQL expressions in the controller):\n * `orgName` (owner id), `autoUpdate`, `planName`, `planTypeName`, `generation`,\n * `channel`, `stageTag` (the single `camunda` label). `status`/`region` are\n * intentionally excluded \u2014 they're computed from live K8s state / context\n * config, not SQL columns.\n */\n sort?:\n | 'name'\n | 'created'\n | 'orgName'\n | 'autoUpdate'\n | 'planName'\n | 'planTypeName'\n | 'generation'\n | 'channel'\n | 'stageTag'\n order?: 'asc' | 'desc'\n filter?: {\n status?: string\n /**\n * Cluster plan TYPE name (maps to `planType.name`; legacy single-value\n * param, still used by the plan-type detail page's cluster-distribution\n * read \u2014 kept alongside `planTypeNames` rather than replaced).\n */\n plan?: string\n /**\n * Restrict to these plan TYPE names (`planType.name`); the Control\n * clusters list's multi-select \"Plan type\" filter.\n */\n planTypeNames?: string[]\n /**\n * Restrict to these concrete plan names (`plan.name`, the `ClusterPlan`\n * entity \u2014 NOT the plan type); backs the Control clusters list's \"Plan\"\n * filter, whose dropdown is sourced from `ClusterPlan` via\n * `/clusters/parameters`. Corrected in #9325 (second pass): a prior fix\n * on this branch mistakenly repointed this at `planType.name` to match a\n * dropdown that was, at the time, wrongly sourced from `ClusterPlanType`\n * \u2014 but the dropdown was the actual bug. Both the dropdown and this query\n * now consistently reference `ClusterPlan`. Distinct from `planTypeNames`\n * above, which is the separate \"Plan type\" filter over `ClusterPlanType`.\n */\n planNames?: string[]\n /**\n * Restrict to these generation uuids (`generation.uuid`). Never by name:\n * a generation name is not unique, so one name can match two generations.\n */\n generationIds?: string[]\n /** Restrict to these cloud providers (resolved via the k8s-context config). */\n providers?: string[]\n /** Exact k8s context uuid. */\n k8sContext?: string\n /**\n * Restrict to these k8s context (datacenter) uuids; the Control clusters\n * list's multi-select \"Datacenter\" filter, which matches the context\n * identity, mirroring the accounts clusters list's \"Filter by Datacenter\".\n */\n k8sContexts?: string[]\n orgId?: string\n /** Restrict to these owner org uuids (cross-backend sales-plan filters). */\n orgIds?: string[]\n /** Restrict to these cluster uuids (prefilter-by-id). */\n ids?: string[]\n /** Restrict to clusters that these user ids created (`cluster.createdBy`). */\n createdBy?: string[]\n /** Auto-update on/off. */\n autoUpdate?: boolean\n /** Internal (Camunda-owned) clusters only / excluded. */\n internal?: boolean\n /** Only clusters with (true) / without (false) an active modification. */\n hasActiveModification?: boolean\n /**\n * Only clusters whose plan is (true) / is not (false) the active plan of\n * their plan type. The accounts clusters list calls it \"on most recent\n * ClusterPlan\"; a cluster that is not is one a plan update would move.\n */\n onActivePlan?: boolean\n /**\n * Only clusters whose generation is (true) / is not (false) unsupported\n * now: `isUnsupportedStarting` is set and in the past.\n */\n unsupportedGeneration?: boolean\n /**\n * Only clusters with (true) / without (false) the legacy environment\n * variable override of the cluster row (`overrideEnvVars`). Modification\n * configs replaced it; a cluster that still has one needs a look.\n */\n legacyEnvVars?: boolean\n /**\n * Restrict to clusters in one of these modification states. `active` is\n * an active config, `planned` a modification with no active config that\n * is not archived, `archived` only archived modifications, `none` no\n * modification at all. The states are exclusive, so several select the\n * union.\n */\n modificationStates?: ClusterModificationState[]\n /** Only clusters with (true) / without (false) the flag of the same name. */\n byokEnabled?: boolean\n externalMonitoringEnabled?: boolean\n privateConnectivityEnabled?: boolean\n /**\n * Zeebe minor-version prefix match on the generation's versions (e.g.\n * \"8.7\" matches zeebe 8.7.x).\n */\n minorVersion?: string\n /** Restrict to these release channel names. */\n channels?: string[]\n /**\n * ISO-8601 lower bound on `created` (e.g. \"created in the last 7 days\").\n * Inclusive: a cluster created at this instant matches.\n */\n createdAfter?: string\n /**\n * ISO-8601 upper bound on `created`. Pairs with `createdAfter` for the\n * age axis. Exclusive: a cluster created at this instant does not match.\n */\n createdBefore?: string\n /**\n * ISO-8601 upper bound on `suspendedAt`, thus \"asleep since at least N\n * days\". Exclusive, as `createdBefore` is. A cluster that is awake never\n * matches: `Cluster.wakeUp()` clears the column.\n *\n * The bound is the time since the last suspend. A cluster that woke up for\n * one minute and then slept again starts from zero, thus this filter finds\n * the clusters that nobody touched, not the clusters that did no work.\n */\n suspendedBefore?: string\n /**\n * ISO-8601 lower bound on `suspendedAt`, thus \"asleep for not more than N\n * days\". Inclusive, as `createdAfter` is. It makes the suspension-age\n * range together with `suspendedBefore`.\n *\n * A cluster that is awake never matches, for the same reason as\n * `suspendedBefore`.\n */\n suspendedAfter?: string\n /**\n * Restrict to these activity buckets. The controller resolves the buckets\n * to a cluster id set from the cached HDP activity map, the same way\n * `filter.status` resolves K8s state to a cluster id set.\n */\n activity?: ClusterActivityBucket[]\n /**\n * `expiring` keeps the clusters whose TTL has an expiry, `unlimited` the\n * clusters whose TTL is unlimited.\n */\n ttl?: ClusterTtlFilter\n /**\n * ISO-8601 upper bound on the TTL expiry. Exclusive, as `createdBefore`\n * is. A cluster with an unlimited TTL never matches.\n */\n ttlExpiresBefore?: string\n }\n}\n\n/** ClusterTtlFilter is the value of `ListClustersV2Params.filter.ttl`. */\nexport type ClusterTtlFilter = 'expiring' | 'unlimited'\n\nexport interface ClusterParameterOptionV2Dto {\n id: string\n name: string\n}\n\n/**\n * A datacenter (k8s context) option for the clusters list's \"Datacenter\" filter.\n * `id` is the context uuid (matched by `filter.k8sContexts`); `region`/`provider`\n * come from the context config and let the dropdown be grouped by provider and\n * show the region, mirroring the accounts clusters list.\n */\nexport interface ClusterDatacenterOptionV2Dto\n extends ClusterParameterOptionV2Dto {\n region?: string\n provider?: string\n}\n\nexport interface ClusterParametersV2Dto {\n plans: ClusterParameterOptionV2Dto[]\n generations: ClusterParameterOptionV2Dto[]\n datacenters: ClusterDatacenterOptionV2Dto[]\n}\n\n/**\n * One cluster in the watcher memory of console-backend: `[id, status,\n * specGeneration]`. `status` is lowercase, as in `ClusterListItemV2Dto`.\n * `specGeneration` is the `metadata.generation` of the ZeebeCluster CR.\n * Kubernetes increments it on each change of the spec, for example a new\n * generation or a new plan. It is `0` when the CR does not give one.\n */\nexport type ClusterLiveStateV2Entry = [\n id: string,\n status: string,\n specGeneration: number,\n]\n\n/**\n * The whole fleet as the watcher sees it (GET /v2/clusters/live-state). The\n * route reads memory only, never the database, thus a client can poll it every\n * second. The entries are sorted by id, thus two equal states give the same\n * body and the same ETag, also on two pods. A pod that is late gives a\n * different body until it gets the same watch events.\n */\nexport interface ClusterLiveStateV2Dto {\n items: ClusterLiveStateV2Entry[]\n}\n\n/**\n * Aggregated cluster distribution counts (GET /v2/clusters/facets), backing\n * the list page's distribution charts and quick-filter tiles without a\n * client-side full-table scan (spec \u00A714.0 hybrid model). SQL-backed facets\n * (generation/planType/channel/autoUpdate) come from GROUP BYs; status and\n * provider are aggregated in-app from the K8s watcher / context config.\n */\nexport interface ClusterFacetsV2Dto {\n total: number\n status: Record<string, number>\n /** Keyed by generation uuid, not name: names are not unique. */\n generation: Record<string, number>\n planType: Record<string, number>\n channel: Record<string, number>\n provider: Record<string, number>\n autoUpdate: { on: number; off: number }\n /** Clusters with an active (non-archived) modification. */\n activeModifications: number\n /**\n * Keyed by the user id of the creator. Only Camundi ids (see\n * `isCamundaUserId`): the \"Created by\" filter lists Camundis, and the id of\n * a customer does not belong in a fleet-wide facet. Absent on an older\n * console-backend.\n */\n createdBy?: Record<string, number>\n}\n\n/** Cluster/owner resolution for a Zeebe client id (cross-backend org search). */\nexport interface ClusterByClientV2Dto {\n clusterId: string\n orgId: string\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 { CamundaClusterStage } from '../types/CamundaClusterLabels.type.js'\nimport type { ClusterPlanTypesToReserved } from '../types/ClusterPlanTypesToReserved.type.js'\nimport type { ClusterTtlDto } from '../types/ClusterTtl.type.js'\nimport type { SalesPlanType } from '../types/SalesPlanType.type.js'\nimport type { LicensingModelType } from './Organization.dto.js'\n\n// ============================================================================\n// Control (v2) API contract\n//\n// Purpose-built, list-optimized DTOs for the new Control frontend, served by the\n// `/v2` routers on accounts-backend and console-backend. Cursor-paginated, and\n// pre-shaped server-side so the client does no normalization. See\n// copilot/CONTROL_FRONTEND_SPEC.md \u00A710.\n// ============================================================================\n\n/** Generic cursor-paginated response. `nextCursor === null` on the last page. */\nexport interface CursorPage<T> {\n items: T[]\n nextCursor: string | null\n}\n\n/** Cursor pagination query params shared by all v2 list endpoints. */\nexport interface CursorParams {\n cursor?: string\n limit?: number\n}\n\n// ---- Session (GET /v2/session) -------------------------------------------\n\nexport interface ControlSessionUser {\n id: string\n email: string\n name: string\n}\n\n/**\n * Flat map of resolved capability flags for the signed-in user, computed\n * server-side from the existing JWT-claim + Auth0-metadata model (kept as-is,\n * spec Q12). The shell uses these to gate navigation; the backend flattens its\n * `Features` object into the subset the nav needs.\n */\nexport type ControlResolvedPermissions = Record<string, boolean>\n\nexport interface OrgSummaryV2Dto {\n id: string\n name: string\n role: string\n clusterCount: number\n}\n\nexport interface ControlSessionDto {\n user: ControlSessionUser\n permissions: ControlResolvedPermissions\n organizations: OrgSummaryV2Dto[]\n}\n\n// ---- Organizations (GET /v2/organizations) -------------------------------\n\nexport interface OrgListItemV2Dto {\n id: string\n name: string\n /** ISO-8601; part of the cursor key. */\n created: string\n internal: boolean\n salesPlanType?: SalesPlanType\n /** Concrete plan name (`SalesPlan.name`), distinct from the tier `salesPlanType`. */\n salesPlanName?: string\n salesForceId?: string\n /** ISO-8601 end of the trial, when the org is or was on a trial plan. */\n trialExpiresAt?: string\n /**\n * Persisted trial state: `true` when the trial ran out, `false` while it\n * runs. Absent when the org is not on a trial plan or the state is not set.\n */\n trialExpired?: boolean\n /** Org metadata flag: the org can only create clusters on AWS. */\n awsOnly?: boolean\n /** Org metadata flag: enterprise plan limited to development use. */\n enterpriseDevOnly?: boolean\n /** Org metadata: which licensing model prices the org. */\n licensingModel?: LicensingModelType\n /**\n * The cluster plan types the org reserved, by plan type uuid, with the\n * count. Absent when the org has no sales plan, and also when it has one\n * that holds no reserved map (the column is nullable). The export of\n * reservations and clusters of the Organizations page reads it.\n */\n clusterPlanTypesToReserved?: ClusterPlanTypesToReserved\n}\n\nexport interface ListOrganizationsV2Params extends CursorParams {\n q?: string\n /**\n * Lucene-style query over the org fields (see `ORGANIZATION_SEARCH_FIELDS`).\n * ANDed with `q`/`filter` server-side; a bare term behaves like `q`.\n */\n query?: string\n sort?: 'name' | 'created' | 'internal' | 'salesPlanType' | 'salesPlanName'\n order?: 'asc' | 'desc'\n filter?: {\n internal?: boolean\n /** Sales plan tiers (`SalesPlanType`); multi-select, matched with `IN (...)`. */\n salesPlanTypes?: SalesPlanType[]\n /**\n * Concrete plan names (`SalesPlan.name`, distinct from the tier); backs the\n * \"Sales plan name\" filter. Multi-select, matched with `IN (...)`.\n */\n salesPlanNames?: string[]\n /** ISO-8601 lower bound on `created` (age-bucket filters). */\n createdAfter?: string\n /** ISO-8601 upper bound on `created` (age-bucket filters). */\n createdBefore?: string\n /**\n * Restrict to these org uuids. Backs cross-backend lookups (e.g. org by\n * cluster name / client id: resolve owner ids on console, then filter\n * here \u2014 spec \u00A714.1 L).\n */\n ids?: string[]\n /**\n * Only organizations that can create clusters on AWS alone (true), or\n * every other organization (false). Reads `metadata.awsOnly`; an\n * organization with no value counts as not AWS-only, as the accounts\n * tool reads it.\n */\n awsOnly?: boolean\n /**\n * Only organizations that hold a reservation above zero for one of\n * these cluster plan type uuids. Reads\n * `organizationToSalesPlan.clusterPlanTypesToReserved`.\n */\n reservedPlanTypeIds?: string[]\n }\n}\n\nexport interface OrgDetailV2Dto extends OrgListItemV2Dto {\n /** Full detail fields are added as the detail page is built (Phase 3). */\n metadata?: Record<string, unknown>\n}\n\nexport interface OrgMemberV2Dto {\n userId: string\n email: string\n name?: string\n roles: string[]\n status: 'active' | 'invited'\n /** ISO-8601. */\n invitedAt?: string\n /** ISO-8601. */\n joinedAt?: string\n}\n\nexport interface ListOrgMembersV2Params extends CursorParams {\n q?: string\n}\n\n// ---- Clusters (GET /v2/clusters) -----------------------------------------\n\nexport interface ClusterListItemV2Dto {\n id: string\n name: string\n orgId: string\n orgName: string\n /** Normalized server-side; augmented on the fly from the K8s watcher (\u00A79.4 B1). */\n status: string\n /**\n * The `metadata.generation` of the ZeebeCluster CR, from the K8s watcher at\n * the time of the read, as in `ClusterLiveStateV2Entry`. A row thus carries\n * the baseline that a poll of `GET /v2/clusters/live-state` compares with.\n * Absent when the watcher does not know the cluster, or on an older\n * console-backend.\n */\n specGeneration?: number\n /**\n * Cluster environment stage (dev/test/stage/prod), from the single `camunda`\n * label. Absent when the cluster has no camunda label or more than one, so a\n * surface can only trust it when it is set \u2014 the same guard the cluster\n * detail page and accounts use.\n */\n stageTag?: CamundaClusterStage\n /** Plan type name (`ClusterPlanType.name`). Backs the \"Plan type\" column. */\n planTypeName: string\n /**\n * Plan type uuid (`ClusterPlanType.uuid`). The key that the org reserved map\n * (`clusterPlanTypesToReserved`) uses, so the Control org \"Reservations\" tab\n * can group clusters by plan type to compute the used count.\n */\n planTypeId?: string\n /**\n * Hardware-package count for the cluster (advanced offering). One cluster can\n * use more than one package, so the used-reservation total sums this value\n * across the org's clusters. Undefined when the source value is unknown; the\n * client then counts the cluster as one package.\n */\n numberOfAllocatedHwPackages?: number\n /** Concrete plan name (`ClusterPlan.name`). Backs the \"Plan\" column. */\n planName?: string\n /**\n * Concrete plan uuid (`ClusterPlan.uuid`). Names are not unique, so this is\n * the key to compare a cluster with a target plan.\n */\n planId?: string\n /** Generation name, for display. Group and filter by `generationId`. */\n generation: string\n /** Generation uuid. Names are not unique, so this is the grouping key. */\n generationId?: string\n region: string\n /** Display-only; not a sort/filter key (\u00A79.4 B2). */\n load?: number\n updateAvailable: boolean\n /** Auto-update setting (distinct from `updateAvailable`). */\n autoUpdate: boolean\n /** Release channel name, when the cluster is on one. */\n channel?: string\n /** ISO-8601; part of the cursor key. */\n created: string\n /**\n * User id of the creator, e.g. `samlp|Okta|jane.doe@camunda.com`. Absent\n * when a background flow created the cluster, for an old cluster that has\n * no record of its creator, or on an older console-backend. Also absent\n * for a caller without `canReadAllClusterInfo`: the org clusters route\n * serves members of the org too (see `canReadClusterCreator`).\n */\n createdBy?: string\n /**\n * ISO-8601 instant of the last suspend. Absent when the cluster is awake:\n * `Cluster.wakeUp()` clears the column, thus this is the time since the last\n * suspend and not the total time that the cluster was asleep.\n */\n suspendedAt?: string\n /** The \"Authorizations\" toggle of cluster create. */\n identityBackendChecksEnabled?: boolean\n multiTenancyEnabled?: boolean\n /** BYOIDP. */\n externalIdpEnabled?: boolean\n /** Session idle timeout. */\n sessionMaxInactiveIntervalMinutes?: number\n sessionHeartbeatEnabled?: boolean\n /** BYOK: `encryption` is `External`. The key can still be missing. */\n byokEnabled?: boolean\n /** The cluster has at least one external monitoring (BYOM) client. */\n externalMonitoringEnabled?: boolean\n /** The cluster has a `secure_connectivity` row (AWS PrivateLink). */\n privateConnectivityEnabled?: boolean\n /**\n * The cluster TTL. Absent where `CommonClusterDto.ttl` is absent for the\n * same reader: on every stage other than dev and int, prod included. Also\n * absent for a member of the org on the org clusters route, and on an older\n * console-backend.\n */\n ttl?: ClusterTtlDto\n}\n\n/** Detail extends the list shape; richer fields are added in Phase 3. */\nexport type ClusterDetailV2Dto = ClusterListItemV2Dto\n\n/**\n * How much work a cluster did, inside the 30-day activity window.\n *\n * `idle` and `unknown` are different facts and must stay apart. `idle` is\n * evidence that the cluster did no work. `unknown` is the absence of\n * evidence: on the dev stage most clusters have no row at all.\n *\n * The source is the Holistic Data Platform (HDP), which holds one row per\n * cluster, per day, per value metric. The window is 30 days, thus a bucket\n * for \"did work, but more than 30 days ago\" is not possible.\n */\nexport type ClusterActivityBucket =\n /** Work inside the 30-day window. */\n | 'active'\n /** Rows exist inside the window. All values are zero. */\n | 'idle'\n /** No row at all inside the window. */\n | 'unknown'\n\n/** Quick-filter tiles on the clusters list. */\nexport type ClusterActivityTile =\n | 'all'\n | 'active'\n | 'idle'\n | 'unknown'\n /** More than 90 days old, and not active. */\n | 'old-idle'\n /** No more than 30 days old, with no work and no data. */\n | 'new-idle'\n\nexport interface ClusterActivityV2Dto {\n clusterId: string\n /**\n * ISO-8601 instant of the last UTC day with work. HDP buckets by day, thus\n * the time part is always midnight. Absent when the cluster did no work\n * inside the window.\n */\n lastActiveAt?: string\n processInstances30d: number\n bucket: ClusterActivityBucket\n}\n\nexport interface ClusterActivityV2Response {\n /**\n * One entry per live cluster that has an HDP row inside the window. A\n * cluster in the `unknown` bucket has no entry, because the bucket means\n * that no row exists.\n */\n items: ClusterActivityV2Dto[]\n /** Fleet-wide tile counts. The server joins `cluster.created` for the age tiles. */\n counts: Record<ClusterActivityTile, number>\n /** ISO-8601 instant when the server assembled this response. */\n fetchedAt: string\n /** The number of days that the window covers. */\n windowDays: number\n}\n\n/** The modification state of a cluster, as the Clusters list filters it. */\nexport const CLUSTER_MODIFICATION_STATES = [\n 'active',\n 'planned',\n 'archived',\n 'none',\n] as const\nexport type ClusterModificationState =\n (typeof CLUSTER_MODIFICATION_STATES)[number]\n\nexport interface ListClustersV2Params extends CursorParams {\n q?: string\n /**\n * Lucene-style query over the cluster fields (see `CLUSTER_SEARCH_FIELDS`).\n * ANDed with `q`/`filter` server-side; a bare term behaves like `q`.\n */\n query?: string\n /**\n * Server-side sort key. Beyond `name`/`created`, the clusters list also sorts\n * by the DB-backed columns behind these list columns (the values are the\n * frontend column `key`s, mapped to SQL expressions in the controller):\n * `orgName` (owner id), `autoUpdate`, `planName`, `planTypeName`, `generation`,\n * `channel`, `stageTag` (the single `camunda` label), `ttlExpiresAt` (a\n * cluster with no expiry is last in both directions; a reader who may not\n * see the TTL gets the default sort). `status`/`region` are intentionally\n * excluded \u2014 they're computed from live K8s state / context config, not SQL\n * columns.\n */\n sort?:\n | 'name'\n | 'created'\n | 'orgName'\n | 'autoUpdate'\n | 'planName'\n | 'planTypeName'\n | 'generation'\n | 'channel'\n | 'stageTag'\n | 'ttlExpiresAt'\n order?: 'asc' | 'desc'\n filter?: {\n status?: string\n /**\n * Cluster plan TYPE name (maps to `planType.name`; legacy single-value\n * param, still used by the plan-type detail page's cluster-distribution\n * read \u2014 kept alongside `planTypeNames` rather than replaced).\n */\n plan?: string\n /**\n * Restrict to these plan TYPE names (`planType.name`); the Control\n * clusters list's multi-select \"Plan type\" filter.\n */\n planTypeNames?: string[]\n /**\n * Restrict to these concrete plan names (`plan.name`, the `ClusterPlan`\n * entity \u2014 NOT the plan type); backs the Control clusters list's \"Plan\"\n * filter, whose dropdown is sourced from `ClusterPlan` via\n * `/clusters/parameters`. Corrected in #9325 (second pass): a prior fix\n * on this branch mistakenly repointed this at `planType.name` to match a\n * dropdown that was, at the time, wrongly sourced from `ClusterPlanType`\n * \u2014 but the dropdown was the actual bug. Both the dropdown and this query\n * now consistently reference `ClusterPlan`. Distinct from `planTypeNames`\n * above, which is the separate \"Plan type\" filter over `ClusterPlanType`.\n */\n planNames?: string[]\n /**\n * Restrict to these generation uuids (`generation.uuid`). Never by name:\n * a generation name is not unique, so one name can match two generations.\n */\n generationIds?: string[]\n /** Restrict to these cloud providers (resolved via the k8s-context config). */\n providers?: string[]\n /** Exact k8s context uuid. */\n k8sContext?: string\n /**\n * Restrict to these k8s context (datacenter) uuids; the Control clusters\n * list's multi-select \"Datacenter\" filter, which matches the context\n * identity, mirroring the accounts clusters list's \"Filter by Datacenter\".\n */\n k8sContexts?: string[]\n orgId?: string\n /** Restrict to these owner org uuids (cross-backend sales-plan filters). */\n orgIds?: string[]\n /** Restrict to these cluster uuids (prefilter-by-id). */\n ids?: string[]\n /** Restrict to clusters that these user ids created (`cluster.createdBy`). */\n createdBy?: string[]\n /** Auto-update on/off. */\n autoUpdate?: boolean\n /** Internal (Camunda-owned) clusters only / excluded. */\n internal?: boolean\n /** Only clusters with (true) / without (false) an active modification. */\n hasActiveModification?: boolean\n /**\n * Only clusters whose plan is (true) / is not (false) the active plan of\n * their plan type. The accounts clusters list calls it \"on most recent\n * ClusterPlan\"; a cluster that is not is one a plan update would move.\n */\n onActivePlan?: boolean\n /**\n * Only clusters whose generation is (true) / is not (false) unsupported\n * now: `isUnsupportedStarting` is set and in the past.\n */\n unsupportedGeneration?: boolean\n /**\n * Only clusters with (true) / without (false) the legacy environment\n * variable override of the cluster row (`overrideEnvVars`). Modification\n * configs replaced it; a cluster that still has one needs a look.\n */\n legacyEnvVars?: boolean\n /**\n * Restrict to clusters in one of these modification states. `active` is\n * an active config, `planned` a modification with no active config that\n * is not archived, `archived` only archived modifications, `none` no\n * modification at all. The states are exclusive, so several select the\n * union.\n */\n modificationStates?: ClusterModificationState[]\n /** Only clusters with (true) / without (false) the flag of the same name. */\n byokEnabled?: boolean\n externalMonitoringEnabled?: boolean\n privateConnectivityEnabled?: boolean\n /**\n * Zeebe minor-version prefix match on the generation's versions (e.g.\n * \"8.7\" matches zeebe 8.7.x).\n */\n minorVersion?: string\n /** Restrict to these release channel names. */\n channels?: string[]\n /**\n * ISO-8601 lower bound on `created` (e.g. \"created in the last 7 days\").\n * Inclusive: a cluster created at this instant matches.\n */\n createdAfter?: string\n /**\n * ISO-8601 upper bound on `created`. Pairs with `createdAfter` for the\n * age axis. Exclusive: a cluster created at this instant does not match.\n */\n createdBefore?: string\n /**\n * ISO-8601 upper bound on `suspendedAt`, thus \"asleep since at least N\n * days\". Exclusive, as `createdBefore` is. A cluster that is awake never\n * matches: `Cluster.wakeUp()` clears the column.\n *\n * The bound is the time since the last suspend. A cluster that woke up for\n * one minute and then slept again starts from zero, thus this filter finds\n * the clusters that nobody touched, not the clusters that did no work.\n */\n suspendedBefore?: string\n /**\n * ISO-8601 lower bound on `suspendedAt`, thus \"asleep for not more than N\n * days\". Inclusive, as `createdAfter` is. It makes the suspension-age\n * range together with `suspendedBefore`.\n *\n * A cluster that is awake never matches, for the same reason as\n * `suspendedBefore`.\n */\n suspendedAfter?: string\n /**\n * Restrict to these activity buckets. The controller resolves the buckets\n * to a cluster id set from the cached HDP activity map, the same way\n * `filter.status` resolves K8s state to a cluster id set.\n */\n activity?: ClusterActivityBucket[]\n /**\n * `expiring` keeps the clusters whose TTL has an expiry, `unlimited` the\n * clusters whose TTL is unlimited.\n */\n ttl?: ClusterTtlFilter\n /**\n * ISO-8601 upper bound on the TTL expiry. Exclusive, as `createdBefore`\n * is. A cluster with an unlimited TTL never matches.\n */\n ttlExpiresBefore?: string\n }\n}\n\n/** ClusterTtlFilter is the value of `ListClustersV2Params.filter.ttl`. */\nexport type ClusterTtlFilter = 'expiring' | 'unlimited'\n\nexport interface ClusterParameterOptionV2Dto {\n id: string\n name: string\n}\n\n/**\n * A datacenter (k8s context) option for the clusters list's \"Datacenter\" filter.\n * `id` is the context uuid (matched by `filter.k8sContexts`); `region`/`provider`\n * come from the context config and let the dropdown be grouped by provider and\n * show the region, mirroring the accounts clusters list.\n */\nexport interface ClusterDatacenterOptionV2Dto\n extends ClusterParameterOptionV2Dto {\n region?: string\n provider?: string\n}\n\nexport interface ClusterParametersV2Dto {\n plans: ClusterParameterOptionV2Dto[]\n generations: ClusterParameterOptionV2Dto[]\n datacenters: ClusterDatacenterOptionV2Dto[]\n}\n\n/**\n * One cluster in the watcher memory of console-backend: `[id, status,\n * specGeneration]`. `status` is lowercase, as in `ClusterListItemV2Dto`.\n * `specGeneration` is the `metadata.generation` of the ZeebeCluster CR.\n * Kubernetes increments it on each change of the spec, for example a new\n * generation or a new plan. It is `0` when the CR does not give one.\n */\nexport type ClusterLiveStateV2Entry = [\n id: string,\n status: string,\n specGeneration: number,\n]\n\n/**\n * The whole fleet as the watcher sees it (GET /v2/clusters/live-state). The\n * route reads memory only, never the database, thus a client can poll it every\n * second. The entries are sorted by id, thus two equal states give the same\n * body and the same ETag, also on two pods. A pod that is late gives a\n * different body until it gets the same watch events.\n */\nexport interface ClusterLiveStateV2Dto {\n items: ClusterLiveStateV2Entry[]\n}\n\n/**\n * Aggregated cluster distribution counts (GET /v2/clusters/facets), backing\n * the list page's distribution charts and quick-filter tiles without a\n * client-side full-table scan (spec \u00A714.0 hybrid model). SQL-backed facets\n * (generation/planType/channel/autoUpdate) come from GROUP BYs; status and\n * provider are aggregated in-app from the K8s watcher / context config.\n */\nexport interface ClusterFacetsV2Dto {\n total: number\n status: Record<string, number>\n /** Keyed by generation uuid, not name: names are not unique. */\n generation: Record<string, number>\n planType: Record<string, number>\n channel: Record<string, number>\n provider: Record<string, number>\n autoUpdate: { on: number; off: number }\n /** Clusters with an active (non-archived) modification. */\n activeModifications: number\n /**\n * Keyed by the user id of the creator. Only Camundi ids (see\n * `isCamundaUserId`): the \"Created by\" filter lists Camundis, and the id of\n * a customer does not belong in a fleet-wide facet. Absent on an older\n * console-backend.\n */\n createdBy?: Record<string, number>\n}\n\n/** Cluster/owner resolution for a Zeebe client id (cross-backend org search). */\nexport interface ClusterByClientV2Dto {\n clusterId: string\n orgId: string\n}\n"],
|
|
5
5
|
"mappings": "AA+TO,MAAM,8BAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED