@camunda/ccma-api 5.10.0 → 5.11.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.
@@ -396,7 +396,8 @@ class GenerationService {
396
396
  name,
397
397
  releaseType,
398
398
  versions,
399
- isUnsupportedStarting
399
+ isUnsupportedStarting,
400
+ overrideSanityErrors
400
401
  } = params;
401
402
  const serviceContext = {
402
403
  method: {
@@ -416,7 +417,8 @@ class GenerationService {
416
417
  name,
417
418
  releaseType,
418
419
  versions,
419
- isUnsupportedStarting
420
+ isUnsupportedStarting,
421
+ overrideSanityErrors
420
422
  },
421
423
  responseType: "json",
422
424
  url: serviceContext.method.url,
@@ -438,7 +440,8 @@ class GenerationService {
438
440
  releaseType,
439
441
  replacementGenerationId,
440
442
  stableReplacementGenerationId,
441
- alphaReplacementGenerationId
443
+ alphaReplacementGenerationId,
444
+ overrideSanityErrors
442
445
  } = params;
443
446
  const serviceContext = {
444
447
  method: {
@@ -458,7 +461,8 @@ class GenerationService {
458
461
  releaseType,
459
462
  replacementGenerationId,
460
463
  stableReplacementGenerationId,
461
- alphaReplacementGenerationId
464
+ alphaReplacementGenerationId,
465
+ overrideSanityErrors
462
466
  },
463
467
  responseType: "json",
464
468
  url: serviceContext.method.url,
@@ -502,6 +506,39 @@ class GenerationService {
502
506
  }
503
507
  return response.body;
504
508
  }
509
+ /** The clusters that an auto-upgrade to this generation changes now. */
510
+ static async getAutoUpgradeCandidates(params) {
511
+ const { generationId } = params.params;
512
+ const serviceContext = {
513
+ method: {
514
+ name: "GenerationService.getAutoUpgradeCandidates",
515
+ url: `external/release-train/generation/${encodeURIComponent(generationId)}/auto-upgrade-candidates`,
516
+ normalizedUrl: "external/release-train/generation/:generationId/auto-upgrade-candidates",
517
+ type: "get"
518
+ },
519
+ source: params.config.metrics?.source || "unset",
520
+ target: { name: "console", type: "internal" }
521
+ };
522
+ const response = await request({
523
+ config: params.config,
524
+ base: { id: "console" },
525
+ responseType: "json",
526
+ url: serviceContext.method.url,
527
+ method: serviceContext.method.type,
528
+ metricsDetails: serviceContext
529
+ });
530
+ if (!response.ok) {
531
+ throw new HttpError(
532
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
533
+ response.status,
534
+ response.statusText
535
+ );
536
+ }
537
+ if (!response.body) {
538
+ throw new Error(`${serviceContext.method.name}: Empty response body`);
539
+ }
540
+ return response.body;
541
+ }
505
542
  /**
506
543
  * Dry run of `publishReleaseTrain`. The backend writes nothing and answers
507
544
  * with what a real call would change and how the sanity rules would react.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/services/console/generation.service.ts"],
4
- "sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type {\n DryRunSanityDiff,\n GenerationDto,\n ReleaseTrainSanityReport,\n UpgradableGenerationsDto,\n UpgradeReadinessDto,\n ZeebeClusterVersionsDto,\n} from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\n\nexport interface ReleaseTrainGenerationRef {\n uuid: string\n name: string\n}\n\ninterface ReleaseTrainChannelChange {\n channelName: string\n generationAdded: ReleaseTrainGenerationRef\n generationRemoved?: ReleaseTrainGenerationRef\n /** Absent when the release did not manage that channel default. */\n newDefault?: ReleaseTrainGenerationRef\n}\n\ninterface DryRunBase {\n dryRun: true\n /** Sanity rules before and after the change, and the violations that differ. */\n sanity: DryRunSanityDiff\n /** True if a real call would add a sanity violation of severity `error`. */\n wouldRefuse: boolean\n}\n\nexport interface DryRunPublishReleaseTrainResponse extends DryRunBase {\n changes: {\n newGeneration: ReleaseTrainGenerationRef\n previousGeneration: ReleaseTrainGenerationRef & { channels: string[] }\n previousGenerationCleared?: ReleaseTrainGenerationRef\n nextMinorGenerationUpdated?: ReleaseTrainGenerationRef\n channelsUpdated: ReleaseTrainChannelChange[]\n }\n}\n\nexport interface DryRunRollbackReleaseTrainResponse extends DryRunBase {\n changes: {\n channelsUpdated: ReleaseTrainChannelChange[]\n previousGenerationRestored?: ReleaseTrainGenerationRef\n nextMinorGenerationRestored?: ReleaseTrainGenerationRef\n }\n}\n\nexport interface DryRunAutoUpgradeResponse {\n dryRun: true\n toGeneration: ReleaseTrainGenerationRef\n /** Generations whose clusters the bulk operation would move. */\n fromGenerations: ReleaseTrainGenerationRef[]\n /** Number of clusters the bulk operation would queue. */\n clusterCount: number\n}\n\n/**\n * Version payload accepted by the create/update generation endpoints. Mirrors\n * `ZeebeClusterVersionsDto` but allows the optional component versions to be\n * omitted; the backend normalizes blank optionals to `undefined`.\n *\n * The required set matches what console-backend validates with `checkVersion`\n * (not `checkVersionOptional`): zeebe, elasticSearchOss and\n * elasticSearchCurator. `optimize` is optional \u2014 generations in production\n * hold a blank value for it.\n */\nexport type GenerationVersionsInput = Partial<ZeebeClusterVersionsDto> &\n // `Required`, because `elasticSearchCurator` is optional in\n // `ZeebeClusterVersionsDto` and a plain `Pick` keeps that modifier. The\n // create route refuses a payload without it, thus the type must too.\n Required<\n Pick<\n ZeebeClusterVersionsDto,\n 'zeebe' | 'elasticSearchOss' | 'elasticSearchCurator'\n >\n >\n\nexport interface CreateGenerationParams extends RequestBaseParams {\n body: {\n name: string\n versions: GenerationVersionsInput\n upgradeableFrom?: string[]\n isUnsupportedStarting?: string\n isBespoke?: boolean\n }\n}\n\nexport interface UpdateGenerationParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n name?: string\n /**\n * A PATCH of the mutable versions. A key that the object names changes,\n * a key that it does not name keeps its value on the generation, and an\n * empty string clears an optional one. So send only what you change:\n * a save of the name or the env vars that does not name the image\n * versions cannot write over a change that an approval request made in\n * between, and the request cannot write over this save.\n *\n * Omit the whole object to edit `upgradeableFrom` or `name` alone.\n */\n versions?: Partial<GenerationVersionsInput>\n upgradeableFrom?: string[]\n }\n}\n\nexport interface DeleteGenerationParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n}\n\nexport interface SetGenerationBespokeParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n isBespoke: boolean\n }\n}\n\nexport interface SetGenerationArchivedParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n isArchived: boolean\n }\n}\n\nexport interface ListGenerationsParams extends RequestBaseParams {}\n\nexport class GenerationService {\n public static async list(\n params: ListGenerationsParams,\n ): Promise<GenerationDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.list',\n url: 'api/generations',\n normalizedUrl: 'api/generations',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto[]>({\n ...params,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? []\n }\n\n public static async getGeneration(\n params: { uuid: string } & RequestBaseParams,\n ): Promise<GenerationDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getGeneration`,\n url: `api/generations/${params.uuid}`,\n normalizedUrl: `api/generations/:generationUuid`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getUpgradable(\n params: {\n fromGenerationUuid: string\n clusterId?: string\n } & RequestBaseParams,\n ): Promise<GenerationDto[]> {\n const baseUrl = `api/generations/${params.fromGenerationUuid}/upgradable`\n const url = params.clusterId\n ? `${baseUrl}?clusterId=${encodeURIComponent(params.clusterId)}`\n : baseUrl\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getUpgradable`,\n url,\n normalizedUrl: params.clusterId\n ? `api/generations/:fromGenerationUuid/upgradable?clusterId=:clusterId`\n : `api/generations/:fromGenerationUuid/upgradable`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<GenerationDto[]>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? []\n }\n\n public static async getUpgradableMulti(\n params: {\n fromGenerationUuid: string\n clusterId?: string\n } & RequestBaseParams,\n ): Promise<UpgradableGenerationsDto> {\n const baseUrl = `api/generations/${params.fromGenerationUuid}/upgradable-multi`\n const url = params.clusterId\n ? `${baseUrl}?clusterId=${encodeURIComponent(params.clusterId)}`\n : baseUrl\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getUpgradableMulti`,\n url,\n normalizedUrl: params.clusterId\n ? `api/generations/:fromGenerationUuid/upgradable-multi?clusterId=:clusterId`\n : `api/generations/:fromGenerationUuid/upgradable-multi`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<UpgradableGenerationsDto>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? { preferred: null, options: [] }\n }\n\n public static async upgradeCluster(\n params: {\n generationUuid: string\n clusterId: string\n orgId: string\n tasklistV2Enabled?: boolean\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.upgradeCluster`,\n url: `api/orgs/${params.orgId}/clusters/${params.clusterId}/upgrade/${params.generationUuid}`,\n normalizedUrl: `api/orgs/:orgId/clusters/:clusterId/upgrade/:generationUuid`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<string>({\n config: params.config,\n base: {\n id: 'console',\n },\n body:\n params.tasklistV2Enabled === undefined\n ? undefined\n : { tasklistV2Enabled: params.tasklistV2Enabled },\n responseType: 'text',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * Upgrades a cluster to a generation via the internal/admin route (`PUT\n * api/generations/:generationUuid/upgradecluster/:clusterId`), as opposed\n * to {@link upgradeCluster}'s customer-facing, org-scoped route. This is\n * the endpoint Camunda staff use to upgrade a cluster on a customer's\n * behalf: it is not gated by `orgValidator`/`clusterOwnerValidator`, always\n * records the change as done `byCamunda`, and \u2014 when `yolo` is set \u2014\n * bypasses the generation's `upgradeableFrom` compatibility graph\n * entirely (subject to the caller holding the yolo permission\n * server-side). Mirrors accounts-frontend's\n * `generations.upgradeCluster` model action.\n */\n public static async upgradeClusterAdmin(\n params: {\n generationUuid: string\n clusterId: string\n yolo?: boolean\n /** Skips the upgrade gate for this upgrade. Needs canUpgradeGeneration. */\n ignoreUpgradeGate?: boolean\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.upgradeClusterAdmin',\n url: `api/generations/${params.generationUuid}/upgradecluster/${params.clusterId}`,\n normalizedUrl:\n 'api/generations/:generationUuid/upgradecluster/:clusterId',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: {\n yolo: params.yolo ?? false,\n byCamunda: true,\n ...(params.ignoreUpgradeGate && { ignoreUpgradeGate: true }),\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * The upgrade gate of a cluster, for the customer (PDP-3067). `undefined`\n * when the route answers 404: the stage does not have the flag, so the\n * server enforces no rule.\n */\n public static getUpgradeReadiness(\n params: { orgId: string; clusterId: string } & RequestBaseParams,\n ): Promise<UpgradeReadinessDto | undefined> {\n return GenerationService.readUpgradeReadiness(params, {\n name: 'GenerationService.getUpgradeReadiness',\n url: `api/orgs/${params.orgId}/clusters/${params.clusterId}/upgrade-readiness`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/upgrade-readiness',\n type: 'get',\n })\n }\n\n /** The same as {@link getUpgradeReadiness}, on the admin route of Control. */\n public static getUpgradeReadinessAdmin(\n params: { clusterId: string } & RequestBaseParams,\n ): Promise<UpgradeReadinessDto | undefined> {\n return GenerationService.readUpgradeReadiness(params, {\n name: 'GenerationService.getUpgradeReadinessAdmin',\n url: `api/admin/clusters/${params.clusterId}/upgrade-readiness`,\n normalizedUrl: 'api/admin/clusters/:clusterUuid/upgrade-readiness',\n type: 'get',\n })\n }\n\n private static async readUpgradeReadiness(\n params: RequestBaseParams,\n method: RequestBaseServiceContext['method'],\n ): Promise<UpgradeReadinessDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method,\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<UpgradeReadinessDto>({\n config: params.config,\n base: { id: 'console' },\n url: method.url,\n method: method.type,\n metricsDetails: serviceContext,\n })\n if (response.status === 404) {\n return undefined\n }\n if (!response.ok) {\n throw new HttpError(\n `${method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async setSupported(\n params: {\n generationUuid: string\n unsupportedStartingAt: string | null\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.setSupported`,\n url: `api/generations/${params.generationUuid}/supported`,\n normalizedUrl: `api/generations/:generationUuid/supported`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<any>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {\n unsupportedStartingAt: params.unsupportedStartingAt,\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async createAutoUpdateBulkOperation(\n params: {\n generationUuid: string\n name: string\n reason: string\n eyes: number\n } & RequestBaseParams,\n ) {\n const body = {\n name: params.name,\n reason: params.reason,\n eyes: params.eyes,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.createAutoUpdateBulkOperation`,\n url: `external/generations/${params.generationUuid}/autoupdate`,\n normalizedUrl: `external/generations/:generationUuid/autoupdate`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n uuid: string\n name: string\n clusterCount: number\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async createBulkUpgradeOperation(\n params: {\n fromGenerationUuid: string\n toGenerationUuid: string\n name: string\n reason: string\n eyes: number\n } & RequestBaseParams,\n ) {\n const body = {\n toGenerationUuid: params.toGenerationUuid,\n name: params.name,\n reason: params.reason,\n eyes: params.eyes,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.createBulkUpgradeOperation`,\n url: `external/generations/${params.fromGenerationUuid}/bulkUpgrade`,\n normalizedUrl: `external/generations/:fromGenerationUuid/bulkUpgrade`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n uuid: string\n name: string\n clusterCount: number\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * Replaces a generation's upgrade path via the external API (`PUT\n * external/generations/:generationUuid/upgradepath`). Gated on the\n * M2M-only `m2m.manageGenerationUpgradePath` scope by design, so this is\n * for service-credential callers (e.g. the release-train hack scripts).\n * Interactive/browser callers cannot use it \u2014 they edit the upgrade path\n * through {@link update} against `api/generations/:generationUuid`, the same\n * way accounts-frontend does.\n */\n public static async updateUpgradePath(\n params: {\n generationUuid: string\n upgradeableFrom: string[]\n } & RequestBaseParams,\n ): Promise<\n | {\n name: string\n uuid: string\n upgradeableFrom: Array<{ uuid: string }>\n }\n | undefined\n > {\n const body = {\n upgradeableFrom: params.upgradeableFrom,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.updateUpgradePath`,\n url: `external/generations/${params.generationUuid}/upgradepath`,\n normalizedUrl: `external/generations/:generationUuid/upgradepath`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n name: string\n uuid: string\n upgradeableFrom: Array<{ uuid: string }>\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async publishReleaseTrain(\n params: {\n previousGenerationId: string\n name: string\n releaseType: 'patch' | 'alpha' | 'minor'\n versions?: Partial<ZeebeClusterVersionsDto>\n isUnsupportedStarting?: string\n } & RequestBaseParams,\n ) {\n const {\n previousGenerationId,\n name,\n releaseType,\n versions,\n isUnsupportedStarting,\n } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.publishReleaseTrain',\n url: 'external/release-train/generation',\n normalizedUrl: 'external/release-train/generation',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n generationId: string\n changes: {\n newGeneration: { uuid: string; name: string }\n previousGenerationCleared?: { uuid: string; name: string }\n nextMinorGenerationUpdated?: { uuid: string; name: string }\n channelsUpdated: Array<{\n channelName: string\n generationAdded: { uuid: string; name: string }\n generationRemoved?: { uuid: string; name: string }\n /** Absent when the release did not manage that channel default. */\n newDefault?: { uuid: string; name: string }\n }>\n }\n }>({\n config: params.config,\n base: { id: 'console' },\n body: {\n previousGenerationId,\n name,\n releaseType,\n versions,\n isUnsupportedStarting,\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async rollbackReleaseTrain(\n params: {\n generationId: string\n releaseType: 'patch' | 'alpha' | 'minor'\n replacementGenerationId?: string\n stableReplacementGenerationId?: string\n alphaReplacementGenerationId?: string\n } & RequestBaseParams,\n ) {\n const {\n generationId,\n releaseType,\n replacementGenerationId,\n stableReplacementGenerationId,\n alphaReplacementGenerationId,\n } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.rollbackReleaseTrain',\n url: 'external/release-train/rollback',\n normalizedUrl: 'external/release-train/rollback',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n rolledBackGenerationId: string\n changes: {\n channelsUpdated: Array<{\n channelName: string\n generationAdded: { uuid: string; name: string }\n generationRemoved?: { uuid: string; name: string }\n newDefault: { uuid: string; name: string }\n }>\n previousGenerationRestored?: { uuid: string; name: string }\n nextMinorGenerationRestored?: { uuid: string; name: string }\n }\n }>({\n config: params.config,\n base: { id: 'console' },\n body: {\n generationId,\n releaseType,\n replacementGenerationId,\n stableReplacementGenerationId,\n alphaReplacementGenerationId,\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async triggerAutoUpgrade(\n params: { generationId: string } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.triggerAutoUpgrade',\n url: `external/release-train/generation/${params.generationId}/auto-upgrade`,\n normalizedUrl:\n 'external/release-train/generation/:generationId/auto-upgrade',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n bulkOperationUuid: string\n clusterCount: number\n }>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * Dry run of `publishReleaseTrain`. The backend writes nothing and answers\n * with what a real call would change and how the sanity rules would react.\n */\n public static async dryRunPublishReleaseTrain(\n params: Parameters<typeof GenerationService.publishReleaseTrain>[0],\n ) {\n return GenerationService.postReleaseTrainDryRun<DryRunPublishReleaseTrainResponse>(\n 'GenerationService.dryRunPublishReleaseTrain',\n params.config,\n 'external/release-train/generation',\n 'external/release-train/generation',\n {\n previousGenerationId: params.previousGenerationId,\n name: params.name,\n releaseType: params.releaseType,\n versions: params.versions,\n isUnsupportedStarting: params.isUnsupportedStarting,\n dryRun: true,\n },\n )\n }\n\n /** Dry run of `rollbackReleaseTrain`. Writes nothing. */\n public static async dryRunRollbackReleaseTrain(\n params: Parameters<typeof GenerationService.rollbackReleaseTrain>[0],\n ) {\n return GenerationService.postReleaseTrainDryRun<DryRunRollbackReleaseTrainResponse>(\n 'GenerationService.dryRunRollbackReleaseTrain',\n params.config,\n 'external/release-train/rollback',\n 'external/release-train/rollback',\n {\n generationId: params.generationId,\n releaseType: params.releaseType,\n replacementGenerationId: params.replacementGenerationId,\n stableReplacementGenerationId: params.stableReplacementGenerationId,\n alphaReplacementGenerationId: params.alphaReplacementGenerationId,\n dryRun: true,\n },\n )\n }\n\n /** Dry run of `triggerAutoUpgrade`. Creates no bulk operation. */\n public static async dryRunAutoUpgrade(\n params: Parameters<typeof GenerationService.triggerAutoUpgrade>[0],\n ) {\n return GenerationService.postReleaseTrainDryRun<DryRunAutoUpgradeResponse>(\n 'GenerationService.dryRunAutoUpgrade',\n params.config,\n `external/release-train/generation/${params.generationId}/auto-upgrade?dryRun=true`,\n 'external/release-train/generation/:generationId/auto-upgrade',\n undefined,\n )\n }\n\n private static async postReleaseTrainDryRun<T>(\n methodName: string,\n config: RequestBaseParams['config'],\n url: string,\n normalizedUrl: string,\n body: Record<string, unknown> | undefined,\n ): Promise<T | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: methodName,\n url,\n normalizedUrl,\n type: 'post',\n },\n source: config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<T>({\n config,\n base: { id: 'console' },\n body,\n responseType: 'json',\n url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getReleaseTrainSanity(\n params: RequestBaseParams,\n ): Promise<ReleaseTrainSanityReport> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.getReleaseTrainSanity',\n url: 'external/release-train/sanity-check',\n normalizedUrl: 'external/release-train/sanity-check',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ReleaseTrainSanityReport>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n public static async create(\n params: CreateGenerationParams,\n ): Promise<GenerationDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.create',\n url: 'api/generations',\n normalizedUrl: 'api/generations',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n public static async update(params: UpdateGenerationParams): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.update',\n url: `api/generations/${params.params.generationUuid}`,\n normalizedUrl: 'api/generations/:generationUuid',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async delete(params: DeleteGenerationParams): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.delete',\n url: `api/generations/${params.params.generationUuid}`,\n normalizedUrl: 'api/generations/:generationUuid',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async setBespoke(\n params: SetGenerationBespokeParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.setBespoke',\n url: `api/generations/${params.params.generationUuid}/bespoke`,\n normalizedUrl: 'api/generations/:generationUuid/bespoke',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async setArchived(\n params: SetGenerationArchivedParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.setArchived',\n url: `api/generations/${params.params.generationUuid}/archived`,\n normalizedUrl: 'api/generations/:generationUuid/archived',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n}\n"],
5
- "mappings": "AAkBA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAgInB,MAAM,kBAAkB;AAAA,EAC7B,aAAoB,KAClB,QAC0B;AAC1B,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK;AAAA,QACL,eAAe;AAAA,QACf,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ,EAAE,MAAM,WAAW,MAAM,WAAW;AAAA,IAC9C;AACA,UAAM,WAAW,MAAM,QAAyB;AAAA,MAC9C,GAAG;AAAA,MACH,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB,cAAc;AAAA,MACd,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,IAClB,CAAC;AACD,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI;AAAA,QACR,GAAG,eAAe,OAAO,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AACA,WAAO,SAAS,QAAQ,CAAC;AAAA,EAC3B;AAAA,EAEA,aAAoB,cA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AAAA,MACtB,MAAM,OAAO;AAAA,MACb,cAAc;AAAA,MACd,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,IAClB,CAAC;AACD,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI;AAAA,QACR,GAAG,eAAe,OAAO,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nimport type {\n DryRunSanityDiff,\n GenerationDto,\n ReleaseTrainAutoUpgradeCandidates,\n ReleaseTrainSanityReport,\n UpgradableGenerationsDto,\n UpgradeReadinessDto,\n ZeebeClusterVersionsDto,\n} from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\n\nexport interface ReleaseTrainGenerationRef {\n uuid: string\n name: string\n}\n\ninterface ReleaseTrainChannelChange {\n channelName: string\n generationAdded: ReleaseTrainGenerationRef\n generationRemoved?: ReleaseTrainGenerationRef\n /** Absent when the release did not manage that channel default. */\n newDefault?: ReleaseTrainGenerationRef\n}\n\ninterface DryRunBase {\n dryRun: true\n /** Sanity rules before and after the change, and the violations that differ. */\n sanity: DryRunSanityDiff\n /**\n * True if a real call with no `overrideSanityErrors` refuses: it adds a\n * sanity violation of severity `error`, or it breaks a rule of the release\n * train.\n */\n wouldRefuse: boolean\n}\n\nexport interface DryRunPublishReleaseTrainResponse extends DryRunBase {\n changes: {\n newGeneration: ReleaseTrainGenerationRef\n previousGeneration: ReleaseTrainGenerationRef & { channels: string[] }\n previousGenerationCleared?: ReleaseTrainGenerationRef\n nextMinorGenerationUpdated?: ReleaseTrainGenerationRef\n channelsUpdated: ReleaseTrainChannelChange[]\n }\n}\n\nexport interface DryRunRollbackReleaseTrainResponse extends DryRunBase {\n changes: {\n channelsUpdated: ReleaseTrainChannelChange[]\n previousGenerationRestored?: ReleaseTrainGenerationRef\n nextMinorGenerationRestored?: ReleaseTrainGenerationRef\n }\n}\n\nexport interface DryRunAutoUpgradeResponse {\n dryRun: true\n toGeneration: ReleaseTrainGenerationRef\n /** Generations whose clusters the bulk operation would move. */\n fromGenerations: ReleaseTrainGenerationRef[]\n /** Number of clusters the bulk operation would queue. */\n clusterCount: number\n}\n\n/**\n * Version payload accepted by the create/update generation endpoints. Mirrors\n * `ZeebeClusterVersionsDto` but allows the optional component versions to be\n * omitted; the backend normalizes blank optionals to `undefined`.\n *\n * The required set matches what console-backend validates with `checkVersion`\n * (not `checkVersionOptional`): zeebe, elasticSearchOss and\n * elasticSearchCurator. `optimize` is optional \u2014 generations in production\n * hold a blank value for it.\n */\nexport type GenerationVersionsInput = Partial<ZeebeClusterVersionsDto> &\n // `Required`, because `elasticSearchCurator` is optional in\n // `ZeebeClusterVersionsDto` and a plain `Pick` keeps that modifier. The\n // create route refuses a payload without it, thus the type must too.\n Required<\n Pick<\n ZeebeClusterVersionsDto,\n 'zeebe' | 'elasticSearchOss' | 'elasticSearchCurator'\n >\n >\n\nexport interface CreateGenerationParams extends RequestBaseParams {\n body: {\n name: string\n versions: GenerationVersionsInput\n upgradeableFrom?: string[]\n isUnsupportedStarting?: string\n isBespoke?: boolean\n }\n}\n\nexport interface UpdateGenerationParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n name?: string\n /**\n * A PATCH of the mutable versions. A key that the object names changes,\n * a key that it does not name keeps its value on the generation, and an\n * empty string clears an optional one. So send only what you change:\n * a save of the name or the env vars that does not name the image\n * versions cannot write over a change that an approval request made in\n * between, and the request cannot write over this save.\n *\n * Omit the whole object to edit `upgradeableFrom` or `name` alone.\n */\n versions?: Partial<GenerationVersionsInput>\n upgradeableFrom?: string[]\n }\n}\n\nexport interface DeleteGenerationParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n}\n\nexport interface SetGenerationBespokeParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n isBespoke: boolean\n }\n}\n\nexport interface SetGenerationArchivedParams extends RequestBaseParams {\n params: {\n generationUuid: string\n }\n body: {\n isArchived: boolean\n }\n}\n\nexport interface ListGenerationsParams extends RequestBaseParams {}\n\nexport class GenerationService {\n public static async list(\n params: ListGenerationsParams,\n ): Promise<GenerationDto[]> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.list',\n url: 'api/generations',\n normalizedUrl: 'api/generations',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto[]>({\n ...params,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? []\n }\n\n public static async getGeneration(\n params: { uuid: string } & RequestBaseParams,\n ): Promise<GenerationDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getGeneration`,\n url: `api/generations/${params.uuid}`,\n normalizedUrl: `api/generations/:generationUuid`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getUpgradable(\n params: {\n fromGenerationUuid: string\n clusterId?: string\n } & RequestBaseParams,\n ): Promise<GenerationDto[]> {\n const baseUrl = `api/generations/${params.fromGenerationUuid}/upgradable`\n const url = params.clusterId\n ? `${baseUrl}?clusterId=${encodeURIComponent(params.clusterId)}`\n : baseUrl\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getUpgradable`,\n url,\n normalizedUrl: params.clusterId\n ? `api/generations/:fromGenerationUuid/upgradable?clusterId=:clusterId`\n : `api/generations/:fromGenerationUuid/upgradable`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<GenerationDto[]>({\n config: params.config,\n base: {\n id: 'console',\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? []\n }\n\n public static async getUpgradableMulti(\n params: {\n fromGenerationUuid: string\n clusterId?: string\n } & RequestBaseParams,\n ): Promise<UpgradableGenerationsDto> {\n const baseUrl = `api/generations/${params.fromGenerationUuid}/upgradable-multi`\n const url = params.clusterId\n ? `${baseUrl}?clusterId=${encodeURIComponent(params.clusterId)}`\n : baseUrl\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.getUpgradableMulti`,\n url,\n normalizedUrl: params.clusterId\n ? `api/generations/:fromGenerationUuid/upgradable-multi?clusterId=:clusterId`\n : `api/generations/:fromGenerationUuid/upgradable-multi`,\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<UpgradableGenerationsDto>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body ?? { preferred: null, options: [] }\n }\n\n public static async upgradeCluster(\n params: {\n generationUuid: string\n clusterId: string\n orgId: string\n tasklistV2Enabled?: boolean\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.upgradeCluster`,\n url: `api/orgs/${params.orgId}/clusters/${params.clusterId}/upgrade/${params.generationUuid}`,\n normalizedUrl: `api/orgs/:orgId/clusters/:clusterId/upgrade/:generationUuid`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<string>({\n config: params.config,\n base: {\n id: 'console',\n },\n body:\n params.tasklistV2Enabled === undefined\n ? undefined\n : { tasklistV2Enabled: params.tasklistV2Enabled },\n responseType: 'text',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * Upgrades a cluster to a generation via the internal/admin route (`PUT\n * api/generations/:generationUuid/upgradecluster/:clusterId`), as opposed\n * to {@link upgradeCluster}'s customer-facing, org-scoped route. This is\n * the endpoint Camunda staff use to upgrade a cluster on a customer's\n * behalf: it is not gated by `orgValidator`/`clusterOwnerValidator`, always\n * records the change as done `byCamunda`, and \u2014 when `yolo` is set \u2014\n * bypasses the generation's `upgradeableFrom` compatibility graph\n * entirely (subject to the caller holding the yolo permission\n * server-side). Mirrors accounts-frontend's\n * `generations.upgradeCluster` model action.\n */\n public static async upgradeClusterAdmin(\n params: {\n generationUuid: string\n clusterId: string\n yolo?: boolean\n /** Skips the upgrade gate for this upgrade. Needs canUpgradeGeneration. */\n ignoreUpgradeGate?: boolean\n } & RequestBaseParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.upgradeClusterAdmin',\n url: `api/generations/${params.generationUuid}/upgradecluster/${params.clusterId}`,\n normalizedUrl:\n 'api/generations/:generationUuid/upgradecluster/:clusterId',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: {\n yolo: params.yolo ?? false,\n byCamunda: true,\n ...(params.ignoreUpgradeGate && { ignoreUpgradeGate: true }),\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n /**\n * The upgrade gate of a cluster, for the customer (PDP-3067). `undefined`\n * when the route answers 404: the stage does not have the flag, so the\n * server enforces no rule.\n */\n public static getUpgradeReadiness(\n params: { orgId: string; clusterId: string } & RequestBaseParams,\n ): Promise<UpgradeReadinessDto | undefined> {\n return GenerationService.readUpgradeReadiness(params, {\n name: 'GenerationService.getUpgradeReadiness',\n url: `api/orgs/${params.orgId}/clusters/${params.clusterId}/upgrade-readiness`,\n normalizedUrl: 'api/orgs/:orgId/clusters/:clusterId/upgrade-readiness',\n type: 'get',\n })\n }\n\n /** The same as {@link getUpgradeReadiness}, on the admin route of Control. */\n public static getUpgradeReadinessAdmin(\n params: { clusterId: string } & RequestBaseParams,\n ): Promise<UpgradeReadinessDto | undefined> {\n return GenerationService.readUpgradeReadiness(params, {\n name: 'GenerationService.getUpgradeReadinessAdmin',\n url: `api/admin/clusters/${params.clusterId}/upgrade-readiness`,\n normalizedUrl: 'api/admin/clusters/:clusterUuid/upgrade-readiness',\n type: 'get',\n })\n }\n\n private static async readUpgradeReadiness(\n params: RequestBaseParams,\n method: RequestBaseServiceContext['method'],\n ): Promise<UpgradeReadinessDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method,\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<UpgradeReadinessDto>({\n config: params.config,\n base: { id: 'console' },\n url: method.url,\n method: method.type,\n metricsDetails: serviceContext,\n })\n if (response.status === 404) {\n return undefined\n }\n if (!response.ok) {\n throw new HttpError(\n `${method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async setSupported(\n params: {\n generationUuid: string\n unsupportedStartingAt: string | null\n } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.setSupported`,\n url: `api/generations/${params.generationUuid}/supported`,\n normalizedUrl: `api/generations/:generationUuid/supported`,\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<any>({\n config: params.config,\n base: {\n id: 'console',\n },\n body: {\n unsupportedStartingAt: params.unsupportedStartingAt,\n },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async createAutoUpdateBulkOperation(\n params: {\n generationUuid: string\n name: string\n reason: string\n eyes: number\n } & RequestBaseParams,\n ) {\n const body = {\n name: params.name,\n reason: params.reason,\n eyes: params.eyes,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.createAutoUpdateBulkOperation`,\n url: `external/generations/${params.generationUuid}/autoupdate`,\n normalizedUrl: `external/generations/:generationUuid/autoupdate`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n uuid: string\n name: string\n clusterCount: number\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async createBulkUpgradeOperation(\n params: {\n fromGenerationUuid: string\n toGenerationUuid: string\n name: string\n reason: string\n eyes: number\n } & RequestBaseParams,\n ) {\n const body = {\n toGenerationUuid: params.toGenerationUuid,\n name: params.name,\n reason: params.reason,\n eyes: params.eyes,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.createBulkUpgradeOperation`,\n url: `external/generations/${params.fromGenerationUuid}/bulkUpgrade`,\n normalizedUrl: `external/generations/:fromGenerationUuid/bulkUpgrade`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n uuid: string\n name: string\n clusterCount: number\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /**\n * Replaces a generation's upgrade path via the external API (`PUT\n * external/generations/:generationUuid/upgradepath`). Gated on the\n * M2M-only `m2m.manageGenerationUpgradePath` scope by design, so this is\n * for service-credential callers (e.g. the release-train hack scripts).\n * Interactive/browser callers cannot use it \u2014 they edit the upgrade path\n * through {@link update} against `api/generations/:generationUuid`, the same\n * way accounts-frontend does.\n */\n public static async updateUpgradePath(\n params: {\n generationUuid: string\n upgradeableFrom: string[]\n } & RequestBaseParams,\n ): Promise<\n | {\n name: string\n uuid: string\n upgradeableFrom: Array<{ uuid: string }>\n }\n | undefined\n > {\n const body = {\n upgradeableFrom: params.upgradeableFrom,\n }\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: `GenerationService.updateUpgradePath`,\n url: `external/generations/${params.generationUuid}/upgradepath`,\n normalizedUrl: `external/generations/:generationUuid/upgradepath`,\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n name: string\n uuid: string\n upgradeableFrom: Array<{ uuid: string }>\n }>({\n config: params.config,\n base: {\n id: 'console',\n },\n body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async publishReleaseTrain(\n params: {\n previousGenerationId: string\n name: string\n releaseType: 'patch' | 'alpha' | 'minor'\n versions?: Partial<ZeebeClusterVersionsDto>\n isUnsupportedStarting?: string\n /** Runs the publish although it adds new errors of the sanity rules. */\n overrideSanityErrors?: boolean\n } & RequestBaseParams,\n ) {\n const {\n previousGenerationId,\n name,\n releaseType,\n versions,\n isUnsupportedStarting,\n overrideSanityErrors,\n } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.publishReleaseTrain',\n url: 'external/release-train/generation',\n normalizedUrl: 'external/release-train/generation',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n generationId: string\n changes: {\n newGeneration: { uuid: string; name: string }\n previousGenerationCleared?: { uuid: string; name: string }\n nextMinorGenerationUpdated?: { uuid: string; name: string }\n channelsUpdated: Array<{\n channelName: string\n generationAdded: { uuid: string; name: string }\n generationRemoved?: { uuid: string; name: string }\n /** Absent when the release did not manage that channel default. */\n newDefault?: { uuid: string; name: string }\n }>\n }\n }>({\n config: params.config,\n base: { id: 'console' },\n body: {\n previousGenerationId,\n name,\n releaseType,\n versions,\n isUnsupportedStarting,\n overrideSanityErrors,\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async rollbackReleaseTrain(\n params: {\n generationId: string\n releaseType: 'patch' | 'alpha' | 'minor'\n replacementGenerationId?: string\n stableReplacementGenerationId?: string\n alphaReplacementGenerationId?: string\n /** Runs the rollback although it adds new errors of the sanity rules. */\n overrideSanityErrors?: boolean\n } & RequestBaseParams,\n ) {\n const {\n generationId,\n releaseType,\n replacementGenerationId,\n stableReplacementGenerationId,\n alphaReplacementGenerationId,\n overrideSanityErrors,\n } = params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.rollbackReleaseTrain',\n url: 'external/release-train/rollback',\n normalizedUrl: 'external/release-train/rollback',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n rolledBackGenerationId: string\n changes: {\n channelsUpdated: Array<{\n channelName: string\n generationAdded: { uuid: string; name: string }\n generationRemoved?: { uuid: string; name: string }\n newDefault: { uuid: string; name: string }\n }>\n previousGenerationRestored?: { uuid: string; name: string }\n nextMinorGenerationRestored?: { uuid: string; name: string }\n }\n }>({\n config: params.config,\n base: { id: 'console' },\n body: {\n generationId,\n releaseType,\n replacementGenerationId,\n stableReplacementGenerationId,\n alphaReplacementGenerationId,\n overrideSanityErrors,\n },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async triggerAutoUpgrade(\n params: { generationId: string } & RequestBaseParams,\n ) {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.triggerAutoUpgrade',\n url: `external/release-train/generation/${params.generationId}/auto-upgrade`,\n normalizedUrl:\n 'external/release-train/generation/:generationId/auto-upgrade',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<{\n bulkOperationUuid: string\n clusterCount: number\n }>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n /** The clusters that an auto-upgrade to this generation changes now. */\n public static async getAutoUpgradeCandidates(\n params: { params: { generationId: string } } & RequestBaseParams,\n ): Promise<ReleaseTrainAutoUpgradeCandidates> {\n const { generationId } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.getAutoUpgradeCandidates',\n url: `external/release-train/generation/${encodeURIComponent(generationId)}/auto-upgrade-candidates`,\n normalizedUrl:\n 'external/release-train/generation/:generationId/auto-upgrade-candidates',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ReleaseTrainAutoUpgradeCandidates>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n /**\n * Dry run of `publishReleaseTrain`. The backend writes nothing and answers\n * with what a real call would change and how the sanity rules would react.\n */\n public static async dryRunPublishReleaseTrain(\n params: Parameters<typeof GenerationService.publishReleaseTrain>[0],\n ) {\n return GenerationService.postReleaseTrainDryRun<DryRunPublishReleaseTrainResponse>(\n 'GenerationService.dryRunPublishReleaseTrain',\n params.config,\n 'external/release-train/generation',\n 'external/release-train/generation',\n {\n previousGenerationId: params.previousGenerationId,\n name: params.name,\n releaseType: params.releaseType,\n versions: params.versions,\n isUnsupportedStarting: params.isUnsupportedStarting,\n dryRun: true,\n },\n )\n }\n\n /** Dry run of `rollbackReleaseTrain`. Writes nothing. */\n public static async dryRunRollbackReleaseTrain(\n params: Parameters<typeof GenerationService.rollbackReleaseTrain>[0],\n ) {\n return GenerationService.postReleaseTrainDryRun<DryRunRollbackReleaseTrainResponse>(\n 'GenerationService.dryRunRollbackReleaseTrain',\n params.config,\n 'external/release-train/rollback',\n 'external/release-train/rollback',\n {\n generationId: params.generationId,\n releaseType: params.releaseType,\n replacementGenerationId: params.replacementGenerationId,\n stableReplacementGenerationId: params.stableReplacementGenerationId,\n alphaReplacementGenerationId: params.alphaReplacementGenerationId,\n dryRun: true,\n },\n )\n }\n\n /** Dry run of `triggerAutoUpgrade`. Creates no bulk operation. */\n public static async dryRunAutoUpgrade(\n params: Parameters<typeof GenerationService.triggerAutoUpgrade>[0],\n ) {\n return GenerationService.postReleaseTrainDryRun<DryRunAutoUpgradeResponse>(\n 'GenerationService.dryRunAutoUpgrade',\n params.config,\n `external/release-train/generation/${params.generationId}/auto-upgrade?dryRun=true`,\n 'external/release-train/generation/:generationId/auto-upgrade',\n undefined,\n )\n }\n\n private static async postReleaseTrainDryRun<T>(\n methodName: string,\n config: RequestBaseParams['config'],\n url: string,\n normalizedUrl: string,\n body: Record<string, unknown> | undefined,\n ): Promise<T | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: methodName,\n url,\n normalizedUrl,\n type: 'post',\n },\n source: config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<T>({\n config,\n base: { id: 'console' },\n body,\n responseType: 'json',\n url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n return response.body\n }\n\n public static async getReleaseTrainSanity(\n params: RequestBaseParams,\n ): Promise<ReleaseTrainSanityReport> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.getReleaseTrainSanity',\n url: 'external/release-train/sanity-check',\n normalizedUrl: 'external/release-train/sanity-check',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<ReleaseTrainSanityReport>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n public static async create(\n params: CreateGenerationParams,\n ): Promise<GenerationDto | undefined> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.create',\n url: 'api/generations',\n normalizedUrl: 'api/generations',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<GenerationDto>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'json',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n if (!response.body) {\n throw new Error(`${serviceContext.method.name}: Empty response body`)\n }\n return response.body\n }\n\n public static async update(params: UpdateGenerationParams): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.update',\n url: `api/generations/${params.params.generationUuid}`,\n normalizedUrl: 'api/generations/:generationUuid',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async delete(params: DeleteGenerationParams): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.delete',\n url: `api/generations/${params.params.generationUuid}`,\n normalizedUrl: 'api/generations/:generationUuid',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async setBespoke(\n params: SetGenerationBespokeParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.setBespoke',\n url: `api/generations/${params.params.generationUuid}/bespoke`,\n normalizedUrl: 'api/generations/:generationUuid/bespoke',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n }\n\n public static async setArchived(\n params: SetGenerationArchivedParams,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'GenerationService.setArchived',\n url: `api/generations/${params.params.generationUuid}/archived`,\n normalizedUrl: 'api/generations/:generationUuid/archived',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n const response = await request<void>({\n config: params.config,\n base: { id: 'console' },\n body: params.body,\n responseType: 'none',\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n })\n if (!response.ok) {\n throw new HttpError(\n `${serviceContext.method.name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,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,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EAEA,aAAoB,YAClB,QACe;AACf,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,mBAAmB,OAAO,OAAO,cAAc;AAAA,QACpD,eAAe;AAAA,QACf,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ,EAAE,MAAM,WAAW,MAAM,WAAW;AAAA,IAC9C;AACA,UAAM,WAAW,MAAM,QAAc;AAAA,MACnC,QAAQ,OAAO;AAAA,MACf,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB,MAAM,OAAO;AAAA,MACb,cAAc;AAAA,MACd,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,IAClB,CAAC;AACD,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI;AAAA,QACR,GAAG,eAAe,OAAO,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,QACxE,SAAS;AAAA,QACT,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { ApprovalEntityType, ApprovalJobDto, ApprovalJobStatus, ApprovalSortField, ApprovalSortOrder, ApprovalStatusCountsDto, ApprovalUseCaseDto, ClusterBulkOperationPayloadDto, ClusterBulkOperationType, ClusterPlanModificationConfig, ClusterTtlDeletionPayload, EnterpriseIncludingValueMetrics, GenerationImageVersionsDto, LicensingModelType } from '@camunda/ccma-shared-types';
1
+ import type { ApprovalEntityType, ApprovalJobDto, ApprovalJobStatus, ApprovalSortField, ApprovalSortOrder, ApprovalStatusCountsDto, ApprovalUseCaseDto, ClusterBulkOperationPayloadDto, ClusterBulkOperationType, ClusterPlanModificationConfig, ClusterTtlDeletionPayload, EnterpriseIncludingValueMetrics, GenerationImageVersionsDto, LicensingModelType, ReleaseTrainPublishPayload, ReleaseTrainRollbackPayload } from '@camunda/ccma-shared-types';
2
2
  import type { RequestBaseParams } from '../../types/general.types.js';
3
3
  export interface ApprovalPageDto {
4
4
  approvals: ApprovalJobDto[];
@@ -785,6 +785,19 @@ export declare class ControlApprovalsService {
785
785
  approval: ApprovalJobDto;
786
786
  created: boolean;
787
787
  }>;
788
+ /**
789
+ * Opens a release-train publish request. The caller sends no `preview`:
790
+ * control-backend reads it from console when the request opens.
791
+ */
792
+ static createReleaseTrainPublish(params: CreateApprovalRequest<Omit<ReleaseTrainPublishPayload, 'preview'>>): Promise<{
793
+ approval: ApprovalJobDto;
794
+ created: boolean;
795
+ }>;
796
+ /** Opens a release-train rollback request. The caller sends no `preview`. */
797
+ static createReleaseTrainRollback(params: CreateApprovalRequest<Omit<ReleaseTrainRollbackPayload, 'preview'>>): Promise<{
798
+ approval: ApprovalJobDto;
799
+ created: boolean;
800
+ }>;
788
801
  /** Adds the approval of the caller. The last one can run the action. */
789
802
  static acknowledge(params: ApprovalIdRequest): Promise<ApprovalJobDto>;
790
803
  /** Closes a request without running the action. The reason is necessary. */
@@ -373,6 +373,25 @@ class ControlApprovalsService {
373
373
  "api/approvals/change-feature-flag"
374
374
  );
375
375
  }
376
+ /**
377
+ * Opens a release-train publish request. The caller sends no `preview`:
378
+ * control-backend reads it from console when the request opens.
379
+ */
380
+ static async createReleaseTrainPublish(params) {
381
+ return ControlApprovalsService.create(
382
+ params,
383
+ "createReleaseTrainPublish",
384
+ "api/approvals/release-train-publish"
385
+ );
386
+ }
387
+ /** Opens a release-train rollback request. The caller sends no `preview`. */
388
+ static async createReleaseTrainRollback(params) {
389
+ return ControlApprovalsService.create(
390
+ params,
391
+ "createReleaseTrainRollback",
392
+ "api/approvals/release-train-rollback"
393
+ );
394
+ }
376
395
  /** Adds the approval of the caller. The last one can run the action. */
377
396
  static async acknowledge(params) {
378
397
  return ControlApprovalsService.readOne(