@camunda/ccma-api 7.5.0 → 7.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -70,7 +70,7 @@ export type { AdminClusterAutoUpdateRequest, AdminClusterDetailsDto, AdminCluste
70
70
  export { ConsoleAdminService } from './services/console/console.admin.service.js';
71
71
  export { type CheckConsoleAlertParams, type CheckConsoleAlertResponse, ConsoleAlertsService, type CreateConsoleAlertParams, type DeleteConsoleAlertParams, type GetConsoleAlertsParams, type UpdateConsoleAlertParams, } from './services/console/console.alerts.service.js';
72
72
  export { type ConsoleApiClientDto, ConsoleApiClientsService, type CreateConsoleApiClientParams, type CreateConsoleApiClientResponse, type DeleteConsoleApiClientParams, type GetConsoleApiClientsParams, type UpdateConsoleApiClientParams, } from './services/console/console.api-clients.service.js';
73
- export type { AnnounceClusterBulkPlanUpdateRequest, ApplySelfServiceModificationRequest, ApprovalApiClientDto, ChangeClusterPlanTypeThroughApprovalRequest, ChangeGenerationVersionsThroughApprovalRequest, ChangePlanTypeRetentionLimitsThroughApprovalRequest, CheckCustomClusterPlanRemovalRequest, CheckCustomGenerationRemovalRequest, CreateCustomClusterPlanThroughApprovalRequest, CreateCustomGenerationThroughApprovalRequest, CustomClusterPlanThroughApprovalResult, CustomGenerationThroughApprovalResult, DeactivateSelfServiceModificationRequest, DeleteApiClientThroughApprovalRequest, DeleteClusterCorpseThroughApprovalRequest, DeleteClusterOfPlanTypeThroughApprovalRequest, DeleteClusterPastTtlThroughApprovalRequest, DeleteClusterPlanTypeThroughApprovalRequest, DeleteCustomClusterPlanThroughApprovalRequest, DeleteCustomGenerationThroughApprovalRequest, DeleteInternalBackupThroughApprovalRequest, EditGenerationThroughApprovalRequest, MoveClusterOwnerThroughApprovalRequest, PreviewReleaseTrainPublishRequest, PreviewReleaseTrainRollbackRequest, PublishReleaseTrainThroughApprovalRequest, PublishReleaseTrainThroughApprovalResult, ReadApiClientThroughApprovalRequest, ReadClusterCorpsesRequest, ReadClusterPlanTypeClustersRequest, ReadClusterPlanTypeLimitsRequest, ReadClusterPlanTypeStateRequest, ReleaseTrainPublishRequest, ReleaseTrainRollbackRequest, RollbackReleaseTrainThroughApprovalRequest, RollbackReleaseTrainThroughApprovalResult, RunClusterBulkStepThroughApprovalRequest, } from './services/console/console.approvals.m2m.service.js';
73
+ export type { AnnounceClusterBulkPlanUpdateRequest, ApplySelfServiceModificationRequest, ApprovalApiClientDto, ChangeClusterPlanTypeThroughApprovalRequest, ChangeGenerationVersionsThroughApprovalRequest, ChangePlanTypeRetentionLimitsThroughApprovalRequest, CheckCustomClusterPlanRemovalRequest, CheckCustomGenerationRemovalRequest, CreateCustomClusterPlanThroughApprovalRequest, CreateCustomGenerationThroughApprovalRequest, CustomClusterPlanThroughApprovalResult, CustomGenerationThroughApprovalResult, DeactivateSelfServiceModificationRequest, DeleteApiClientThroughApprovalRequest, DeleteClusterCorpseThroughApprovalRequest, DeleteClusterOfPlanTypeThroughApprovalRequest, DeleteClusterPastTtlThroughApprovalRequest, DeleteClusterPlanTypeThroughApprovalRequest, DeleteCustomClusterPlanThroughApprovalRequest, DeleteCustomGenerationThroughApprovalRequest, DeleteInternalBackupThroughApprovalRequest, EditGenerationThroughApprovalRequest, ForceGenerationUpgradeThroughApprovalRequest, MoveClusterOwnerThroughApprovalRequest, PreviewReleaseTrainPublishRequest, PreviewReleaseTrainRollbackRequest, PublishReleaseTrainThroughApprovalRequest, PublishReleaseTrainThroughApprovalResult, ReadApiClientThroughApprovalRequest, ReadClusterCorpsesRequest, ReadClusterGenerationStateRequest, ReadClusterPlanTypeClustersRequest, ReadClusterPlanTypeLimitsRequest, ReadClusterPlanTypeStateRequest, ReleaseTrainPublishRequest, ReleaseTrainRollbackRequest, RollbackReleaseTrainThroughApprovalRequest, RollbackReleaseTrainThroughApprovalResult, RunClusterBulkStepThroughApprovalRequest, } from './services/console/console.approvals.m2m.service.js';
74
74
  export { ConsoleApprovalsM2MService } from './services/console/console.approvals.m2m.service.js';
75
75
  export { ConsoleBackupScheduleService, type GetConsoleBackupScheduleParams, type UpdateConsoleBackupScheduleParams, } from './services/console/console.backup-schedule.service.js';
76
76
  export { ConsoleByokScriptsService, type GetConsoleByokKmsPolicyParams, type GetConsoleByokScriptParams, } from './services/console/console.byok-scripts.service.js';
@@ -107,7 +107,7 @@ export type { AgentTokenUuidRequest, CreateAgentTokenRequest, ExtendAgentTokenRe
107
107
  export { ControlAgentClientsInternalService, ControlAgentTokensService, } from './services/control/control.agent-tokens.service.js';
108
108
  export type { AddAnnotationNoteRequest, AddAnnotationTagRequest, AnnotationIdRequest, AnnotationPageDto, AnnotationPageInfoDto, AnnotationTagPageDto, AnnotationTargetDto, EditAnnotationNoteRequest, GetEntityAnnotationsRequest, ListAnnotationTagsRequest, LookupAnnotationsRequest, SearchAnnotationsRequest, } from './services/control/control.annotations.service.js';
109
109
  export { ControlAnnotationsService } from './services/control/control.annotations.service.js';
110
- export type { ApprovalFacetParams, ApprovalIdRequest, ApprovalPageDto, AutomatedEnterpriseOnboardingPayloadDto, ChangeClusterPlanTypePayloadDto, ChangeEnterpriseContractPayloadDto, ChangeFeatureFlagPayloadDto, ChangeGenerationVersionsPayloadDto, ChangeGenerationVersionsTargetDto, ChangeLicensingModelPayloadDto, ChangeOrgLimitsPayloadDto, ChangePlanTypeRetentionLimitsPayloadDto, ChangePlatformRolesPayloadDto, ChangeSalesPlanPayloadDto, ChangeUserEmailPayloadDto, CountApprovalsRequest, CreateApprovalRequest, CreateClusterTtlDeletionRequest, CreateCustomGenerationPayloadDto, CreateCustomHardwareSizingPayloadDto, CreateExtendTrialRequest, CreatePersonalOrganisationPayloadDto, CreatePersonalOrganisationRequest, CustomHardwareSizingRequest, DeleteApiClientPayloadDto, DeleteClusterCorpsesPayloadDto, DeleteInternalBackupPayloadDto, DeleteManagedLlmTenantPayloadDto, DeleteOrganizationPayloadDto, DeleteSsoConnectionPayloadDto, DeleteUserPayloadDto, DisableFeatureFlagPayloadDto, EditGenerationPayloadDto, EnterpriseContractTermsDto, ExtendTrialPayloadDto, FeatureFlagValuesDto, ForceDeleteClusterPlanTypePayloadDto, GrantApprovalOverridePayloadDto, LinkCustomGenerationPayloadDto, LinkCustomHardwareSizingPayloadDto, ListApprovalsRequest, LlmBudgetTopUpPayloadDto, MoveClusterOrgPayloadDto, OnboardToEnterpriseClusterDto, OnboardToEnterprisePayloadDto, OverrideApprovalRequest, PurgeUsersPayloadDto, RejectApprovalRequest, RemoveCustomGenerationPayloadDto, RemoveCustomHardwareSizingPayloadDto, RemoveOrgMemberPayloadDto, RequestInNegotiationPayloadDto, SelfServiceApprovalRequest, SelfServiceClusterModificationPayloadDto, SendToExpiredTrialPayloadDto, UpdateUserMetadataPayloadDto, WithdrawApprovalRequest, } from './services/control/control.approvals.service.js';
110
+ export type { ApprovalFacetParams, ApprovalIdRequest, ApprovalPageDto, AutomatedEnterpriseOnboardingPayloadDto, ChangeClusterPlanTypePayloadDto, ChangeEnterpriseContractPayloadDto, ChangeFeatureFlagPayloadDto, ChangeGenerationVersionsPayloadDto, ChangeGenerationVersionsTargetDto, ChangeLicensingModelPayloadDto, ChangeOrgLimitsPayloadDto, ChangePlanTypeRetentionLimitsPayloadDto, ChangePlatformRolesPayloadDto, ChangeSalesPlanPayloadDto, ChangeUserEmailPayloadDto, CountApprovalsRequest, CreateApprovalRequest, CreateClusterTtlDeletionRequest, CreateCustomGenerationPayloadDto, CreateCustomHardwareSizingPayloadDto, CreateExtendTrialRequest, CreatePersonalOrganisationPayloadDto, CreatePersonalOrganisationRequest, CustomHardwareSizingRequest, DeleteApiClientPayloadDto, DeleteClusterCorpsesPayloadDto, DeleteInternalBackupPayloadDto, DeleteManagedLlmTenantPayloadDto, DeleteOrganizationPayloadDto, DeleteSsoConnectionPayloadDto, DeleteUserPayloadDto, DisableFeatureFlagPayloadDto, EditGenerationPayloadDto, EnterpriseContractTermsDto, ExtendTrialPayloadDto, FeatureFlagValuesDto, ForceDeleteClusterPlanTypePayloadDto, ForceGenerationUpgradePayloadDto, GrantApprovalOverridePayloadDto, LinkCustomGenerationPayloadDto, LinkCustomHardwareSizingPayloadDto, ListApprovalsRequest, LlmBudgetTopUpPayloadDto, MoveClusterOrgPayloadDto, OnboardToEnterpriseClusterDto, OnboardToEnterprisePayloadDto, OverrideApprovalRequest, PurgeUsersPayloadDto, RejectApprovalRequest, RemoveCustomGenerationPayloadDto, RemoveCustomHardwareSizingPayloadDto, RemoveOrgMemberPayloadDto, RequestInNegotiationPayloadDto, SelfServiceApprovalRequest, SelfServiceClusterModificationPayloadDto, SendToExpiredTrialPayloadDto, UpdateUserMetadataPayloadDto, WithdrawApprovalRequest, } from './services/control/control.approvals.service.js';
111
111
  export { ControlApprovalsService } from './services/control/control.approvals.service.js';
112
112
  export type { AddDashboardTileRequest, CheckChartQueryRequest, CreateDashboardRequest, DashboardIdRequest, ListDashboardsRequest, UpdateDashboardRequest, } from './services/control/control.dashboards.service.js';
113
113
  export { ControlDashboardsService } from './services/control/control.dashboards.service.js';
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nexport type {\n GetDataExportRequest,\n GetDataExportResponse,\n} from './services/accounts/accounts.data-export.service.js'\n// accounts services\nexport { AccountsDataExportService } from './services/accounts/accounts.data-export.service.js'\nexport type { GetValueMetricsPerDayParams } from './services/accounts/accounts.valuemetrics.service.js'\nexport type {\n DownloadDatabaseDumpParams,\n TriggerValueMetricsCronParams,\n} from './services/accounts/admin-tools.service.js'\nexport { AdminToolsService } from './services/accounts/admin-tools.service.js'\nexport type {\n AutomatedEnterpriseOnboardingThroughApprovalRequest,\n ChangeClusterPlanLinkThroughApprovalRequest,\n ChangeClusterPlanLinkThroughApprovalResult,\n ChangeEnterpriseContractThroughApprovalRequest,\n ChangeGenerationLinkThroughApprovalRequest,\n ChangeGenerationLinkThroughApprovalResult,\n ChangeLicensingModelThroughApprovalRequest,\n ChangeOrgLimitThroughApprovalRequest,\n ChangePlatformRolesThroughApprovalRequest,\n ChangePlatformRolesThroughApprovalResult,\n ChangeSalesPlanThroughApprovalRequest,\n ChangeUserEmailThroughApprovalRequest,\n CheckOrgOwnerRequest,\n CreatePersonalOrganizationThroughApprovalRequest,\n CreatePersonalOrganizationThroughApprovalResult,\n DeleteManagedLlmTenantThroughApprovalRequest,\n DeleteManagedLlmTenantThroughApprovalResult,\n DeleteOrganizationThroughApprovalRequest,\n DeleteOrganizationThroughApprovalResult,\n DeleteSsoConnectionThroughApprovalRequest,\n DeleteSsoConnectionThroughApprovalResult,\n DeleteUserThroughApprovalRequest,\n DeleteUserThroughApprovalResult,\n EnterpriseContractTerms,\n ExtendTrialThroughApprovalRequest,\n LlmBudgetTopUpThroughApprovalRequest,\n LlmBudgetTopUpThroughApprovalResult,\n OnboardToEnterpriseClusterMapping,\n OnboardToEnterpriseContract,\n OnboardToEnterpriseThroughApprovalRequest,\n OrgLimitValue,\n RemoveOrgMemberNamedUser,\n RemoveOrgMemberThroughApprovalRequest,\n RemoveOrgMemberThroughApprovalResult,\n RequestInNegotiationThroughApprovalRequest,\n SendToExpiredTrialThroughApprovalRequest,\n UnlinkClusterPlanFromMemberOrganizationsRequest,\n UnlinkClusterPlanFromMemberOrganizationsResult,\n UnlinkGenerationFromMemberOrganizationsRequest,\n UnlinkGenerationFromMemberOrganizationsResult,\n UpdateReservationsThroughApprovalRequest,\n UpdateUserMetadataThroughApprovalRequest,\n} from './services/accounts/approvals.m2m.service.js'\nexport { AccountsApprovalsM2MService } from './services/accounts/approvals.m2m.service.js'\nexport { AccountsBotService } from './services/accounts/bot.service.js'\nexport type {\n BugReportRequest,\n BugReportRequestBody,\n BugReportResponse,\n} from './services/accounts/bug-report.service.js'\nexport { BugReportService } from './services/accounts/bug-report.service.js'\nexport type {\n CancelMatchParams,\n CancelMatchResponse,\n GameInfo,\n GetGameInfoParams,\n GetHighscoresParams,\n GetHighscoresResponse,\n GetMatchStateParams,\n GetOrganizationalGroupsParams,\n GetOrganizationalGroupsResponse,\n GetRunningMatchesParams,\n GetRunningMatchesResponse,\n HighscoreEntry,\n InitiateMatchParams,\n InitiateMatchResponse,\n JoinMatchParams,\n JoinMatchResponse,\n Match,\n Player,\n PlayerAnswer,\n Question,\n QuestionChoice,\n SlackProfile,\n StartMatchParams,\n StartMatchResponse,\n SubmitAnswerParams,\n SubmitAnswerResponse,\n} from './services/accounts/challenge.service.js'\nexport { ChallengeService } from './services/accounts/challenge.service.js'\nexport type {\n AzureConnectionPayload,\n Connection,\n ConnectionPayload,\n ConnectionUserDto,\n ConnectionWriteStrategy,\n CreateConnectionParams,\n DeleteConnectionParams,\n GetConnectionParams,\n GetConnectionsParams,\n SamlConnectionPayload,\n UpdateConnectionParams,\n} from './services/accounts/connections.service.js'\nexport { ConnectionsService } from './services/accounts/connections.service.js'\nexport type { GetEngineeringOperationsDashboardRequest } from './services/accounts/dashboards.service.js'\nexport { DashboardsService } from './services/accounts/dashboards.service.js'\nexport type {\n CreateEarlyAccessFeatureParams,\n DeleteEarlyAccessFeatureParams,\n EarlyAccessFeatureActivationDto,\n EarlyAccessFeatureDto,\n EarlyAccessFeatureOrgDto,\n EarlyAccessFeatureSalesPlanConfigDto,\n GetEarlyAccessFeatureOrgsParams,\n GetEarlyAccessFeaturesForOrgParams,\n SetEarlyAccessFeatureActivationParams,\n UpdateEarlyAccessFeatureParams,\n} from './services/accounts/early-access-features.service.js'\nexport { EarlyAccessFeaturesService } from './services/accounts/early-access-features.service.js'\nexport { GenericCacheService } from './services/accounts/genericCache.service.js'\nexport type {\n GetActiveOrgsRequest,\n GetActiveOrgsResponse,\n GetBackendChangeEventsRequest,\n GetClusterActivityRequest,\n GetClusterCapacityRequest,\n GetClusterDiskUsageParams,\n GetClusterDiskUsageRequest,\n GetClusterHostingCostRequest,\n GetClusterHostingCostResponse,\n GetLlmUsageRequest,\n GetTenantUsageRequest,\n GetUsageMetricsRequest,\n GetUsageMetricsResponse,\n LlmUsageEntry,\n QueryChartRequest,\n} from './services/accounts/hdp.service.js'\nexport { HdpService } from './services/accounts/hdp.service.js'\nexport {\n type InviteDto,\n InvitesService,\n type SearchInvitesRequest,\n} from './services/accounts/invites.service.js'\nexport type { GetM2mTokenCountsRequest } from './services/accounts/logs.service.js'\nexport { AccountsLogsService } from './services/accounts/logs.service.js'\nexport type {\n OffboardCamundiRequest,\n OffboardCamundiResponse,\n} from './services/accounts/offboarding.service.js'\nexport { OffboardingService } from './services/accounts/offboarding.service.js'\nexport type {\n AssignNewOwnerParams,\n AssignNewOwnerResponse,\n CancelOrganizationInviteParams,\n GetOrganizationMembersParams,\n LeaveOrganizationParams,\n OrganizationMemberDto,\n OrganizationMemberInviteDto,\n RemoveUserFromOrganizationParams,\n ResendOrganizationInviteParams,\n UpdateOrganizationMemberRolesParams,\n} from './services/accounts/organization-members.service.js'\nexport { OrganizationMembersService } from './services/accounts/organization-members.service.js'\nexport type {\n AutomatedEnterpriseOnboardingRequest,\n AutomatedEnterpriseOnboardingResult,\n AwsOnlyRequest,\n BlockLiteLLMParams,\n ChangeSalesPlanRequest,\n CheckUserExistsForInviteRequest,\n CheckUserExistsForInviteResponse,\n ConvertTrialToInNegotiationRequest,\n DeleteOrganizationRequest,\n EnterpriseDevOnlyRequest,\n ExtendTrialRequest,\n GetLLMUsageInfoParams,\n GetQueuedOperationsParams,\n GetSubscriptionDetailsParams,\n GetSubscriptionDetailsResponse,\n GetSubscriptionItemsParams,\n IncreaseLLMBudgetParams,\n IncreaseLLMBudgetResponse,\n LicensingModelRequest,\n LLMUsageInfoResponse,\n OnboardLiteLLMParams,\n OrgClusterDefaultsRequest,\n OrgClusterDefaultsResponse,\n OrgInfo,\n QueuedOperationDto,\n RenameOrganizationRequest,\n ResetTrialExtensionsRequest,\n SelfExtendTrialRequest,\n SendInviteRequest,\n SetBetaTermsAcceptedRequest,\n SetLimitRequest,\n UnblockLiteLLMParams,\n UpdateActivityRetentionRequest,\n UpdateActivityRetentionResponse,\n UpdateOrgClusterDefaultsRequest,\n UpdateOrgLimitAsMemberRequest,\n UpdateOrgLimitAsMemberResponse,\n UpdateSuppressDropDisksRequest,\n UpdateSuppressDropDisksResponse,\n} from './services/accounts/orgs.service.js'\nexport { OrgsService } from './services/accounts/orgs.service.js'\nexport type {\n GetControlSessionRequest,\n GetOrganizationV2Request,\n ListOrganizationsV2Request,\n ListOrgMembersV2Request,\n} from './services/accounts/orgs.v2.service.js'\nexport { OrgsV2Service } from './services/accounts/orgs.v2.service.js'\nexport type {\n CreatePdfWatermarkProjectParams,\n PdfWatermarkAuditEntryDto,\n PdfWatermarkPasswordParams,\n PdfWatermarkProjectDto,\n PdfWatermarkProjectIdParams,\n RecordPdfWatermarkAuditParams,\n SetPdfWatermarkPdfParams,\n UpdatePdfWatermarkProjectParams,\n} from './services/accounts/pdf-watermark.service.js'\nexport { PdfWatermarkService } from './services/accounts/pdf-watermark.service.js'\nexport type {\n FleetQueuedOperationDto,\n ListQueuedOperationsParams,\n QueuedOperationStatus,\n QueuedOperationsResponse,\n QueueHealthDto,\n} from './services/accounts/queued-operations.service.js'\nexport { QueuedOperationsService } from './services/accounts/queued-operations.service.js'\nexport type {\n GetReleaseTrainParams,\n ReleaseTrainInfoDto,\n} from './services/accounts/release-train.service.js'\nexport {\n KNOWN_RELEASE_TRAINS,\n ReleaseTrainService,\n} from './services/accounts/release-train.service.js'\nexport type {\n CreateSalesPlanRequest,\n DeleteSalesPlanRequest,\n GetSalesPlansRequest,\n UpdateSalesPlanMetadataRequest,\n UpdateSalesPlanRequest,\n UpdateSalesPlanReservationsRequest,\n} from './services/accounts/salesplan.service.js'\nexport { SalesPlanService } from './services/accounts/salesplan.service.js'\nexport { SpamDetectionService } from './services/accounts/spam-detection.service.js'\nexport type { GetStatsParams } from './services/accounts/stats.service.js'\nexport { StatsService } from './services/accounts/stats.service.js'\nexport type { PostTracesRequest } from './services/accounts/telemetry-ingest.service.js'\nexport { TelemetryIngestService } from './services/accounts/telemetry-ingest.service.js'\nexport type {\n InvalidateTokenByClientParams,\n InvalidateTokenParams,\n} from './services/accounts/token-issuer.service.js'\nexport { TokenIssuerService } from './services/accounts/token-issuer.service.js'\nexport type {\n GetOrgTrialDetailParams,\n GetTrialManagementOrgsParams,\n GetTrialManagementParams,\n} from './services/accounts/trial-management.service.js'\nexport { TrialManagementService } from './services/accounts/trial-management.service.js'\nexport type {\n CreateUsageAlertParams,\n GetUsageAlertsParams,\n PatchUsageAlertParams,\n} from './services/accounts/usage-alerts.service.js'\nexport { UsageAlertsService } from './services/accounts/usage-alerts.service.js'\nexport type {\n AddUserToOrganizationRequest,\n ChangeUserEmailRequest,\n ChangeUserNameRequest,\n DeleteMeRequest,\n PurgeUserResult,\n RemoveStaleOrganizationRequest,\n RemoveUserFromOrganizationRequest,\n SearchParams,\n SetDefaultOrgRequest,\n SimpleSearchParams,\n UpdateUserRoleRequest,\n UserIdRequest,\n} from './services/accounts/users.service.js'\nexport { UsersService } from './services/accounts/users.service.js'\nexport type {\n CreateAlertSubscription,\n DeleteAlertSubscription,\n GetAlertSubscriptions,\n UpdateAlertSubscription,\n} from './services/alerts/alerts.service.js'\n// alerts services\nexport { AlertsService } from './services/alerts/alerts.service.js'\nexport type {\n AddAnalyticBridgeRequest,\n AddClusterAnalyticBridgeRequest,\n} from './services/analytic-bridge/analytic-bridge.service.js'\n// analytic-bridge services\nexport { AnalyticBridgeService } from './services/analytic-bridge/analytic-bridge.service.js'\nexport type {\n AskBackendBaseParams,\n AskBackendGetOrgClustersParams,\n AskBackendOrgParams,\n AskBackendRunQueryParams,\n AskBackendSearchOrgsParams,\n OrgClusterRow,\n OrgDetail,\n OrgMemberInfo,\n OrgOwnerInfo,\n OrgSummary,\n} from './services/ask-backend/ask-backend.service.js'\n// ask-backend service\nexport { AskBackendService } from './services/ask-backend/ask-backend.service.js'\nexport type {\n AddAuditRequest,\n DeleteStaleActivityRetentionRequest,\n GetAuditRequest,\n GetClusterAuditRequest,\n UpsertActivityRetentionChunkRequest,\n} from './services/audit-logger/audit-logger.service.js'\n// audit-logger services\nexport { AuditLoggerService } from './services/audit-logger/audit-logger.service.js'\nexport type {\n AddSystemAuditRequest,\n GetSystemAuditRequest,\n} from './services/audit-logger/audit-logger.system.service.js'\nexport { SystemAuditLoggerService } from './services/audit-logger/audit-logger.system.service.js'\nexport type { Auth0Request } from './services/auth0/auth0.service.js'\n// auth0 services\nexport { Auth0Service } from './services/auth0/auth0.service.js'\n// the OpenAPI documents of control-backend and accounts-ng, for the !ccmacli command of CloudBot\nexport {\n CcmaOpenApiService,\n type CcmaOpenApiServiceName,\n type CcmaOperationResponse,\n type GetCcmaOpenApiDocumentRequest,\n type SendCcmaOperationRequest,\n} from './services/ccma/ccma.openapi.service.js'\nexport type { CommBridgeClientRequest } from './services/comm-bridge/comm-bridge.service.js'\n// comm-bridge services\nexport { CommBridgeService } from './services/comm-bridge/comm-bridge.service.js'\nexport type {\n AdminClusterAutoUpdateRequest,\n AdminClusterDetailsDto,\n AdminClusterNonSpotNodesRequest,\n AdminClusterOptionalTelemetryRequest,\n AdminClusterTtlRequest,\n AdminClusterZeebeRebalancingRequest,\n CreateLiteLLMSecretsForOrgRequest,\n GetAdminClusterDetailsRequest,\n GetClusterCrdStateRequest,\n GetClusterRequest,\n GetSpecExplainerRequest,\n GetValueMetricsMetadataRequest,\n GetValueMetricsUsageDataPerDayRequest,\n ModificationsAnswer,\n RemoveLlmSecretsForOrgRequest,\n RemoveLlmSecretsForOrgResponse,\n RepointLlmSecretsForOrgRequest,\n RepointLlmSecretsForOrgResponse,\n RotateLiteLLMKeySecretsForOrgRequest,\n RotateLiteLLMKeySecretsForOrgResponse,\n SignalSignupRequest,\n SpecExplainerFieldAnnotation,\n SpecExplainerFieldSource,\n SpecExplainerResponse,\n UpdateClusterMetricsStartDateRequest,\n UpdateClusterToNewPlanTypeRequest,\n} from './services/console/console.admin.service.js'\n// console services\nexport { ConsoleAdminService } from './services/console/console.admin.service.js'\nexport {\n type CheckConsoleAlertParams,\n type CheckConsoleAlertResponse,\n ConsoleAlertsService,\n type CreateConsoleAlertParams,\n type DeleteConsoleAlertParams,\n type GetConsoleAlertsParams,\n type UpdateConsoleAlertParams,\n} from './services/console/console.alerts.service.js'\nexport {\n type ConsoleApiClientDto,\n ConsoleApiClientsService,\n type CreateConsoleApiClientParams,\n type CreateConsoleApiClientResponse,\n type DeleteConsoleApiClientParams,\n type GetConsoleApiClientsParams,\n type UpdateConsoleApiClientParams,\n} from './services/console/console.api-clients.service.js'\nexport type {\n AnnounceClusterBulkPlanUpdateRequest,\n ApplySelfServiceModificationRequest,\n ApprovalApiClientDto,\n ChangeClusterPlanTypeThroughApprovalRequest,\n ChangeGenerationVersionsThroughApprovalRequest,\n ChangePlanTypeRetentionLimitsThroughApprovalRequest,\n CheckCustomClusterPlanRemovalRequest,\n CheckCustomGenerationRemovalRequest,\n CreateCustomClusterPlanThroughApprovalRequest,\n CreateCustomGenerationThroughApprovalRequest,\n CustomClusterPlanThroughApprovalResult,\n CustomGenerationThroughApprovalResult,\n DeactivateSelfServiceModificationRequest,\n DeleteApiClientThroughApprovalRequest,\n DeleteClusterCorpseThroughApprovalRequest,\n DeleteClusterOfPlanTypeThroughApprovalRequest,\n DeleteClusterPastTtlThroughApprovalRequest,\n DeleteClusterPlanTypeThroughApprovalRequest,\n DeleteCustomClusterPlanThroughApprovalRequest,\n DeleteCustomGenerationThroughApprovalRequest,\n DeleteInternalBackupThroughApprovalRequest,\n EditGenerationThroughApprovalRequest,\n MoveClusterOwnerThroughApprovalRequest,\n PreviewReleaseTrainPublishRequest,\n PreviewReleaseTrainRollbackRequest,\n PublishReleaseTrainThroughApprovalRequest,\n PublishReleaseTrainThroughApprovalResult,\n ReadApiClientThroughApprovalRequest,\n ReadClusterCorpsesRequest,\n ReadClusterPlanTypeClustersRequest,\n ReadClusterPlanTypeLimitsRequest,\n ReadClusterPlanTypeStateRequest,\n ReleaseTrainPublishRequest,\n ReleaseTrainRollbackRequest,\n RollbackReleaseTrainThroughApprovalRequest,\n RollbackReleaseTrainThroughApprovalResult,\n RunClusterBulkStepThroughApprovalRequest,\n} from './services/console/console.approvals.m2m.service.js'\nexport { ConsoleApprovalsM2MService } from './services/console/console.approvals.m2m.service.js'\nexport {\n ConsoleBackupScheduleService,\n type GetConsoleBackupScheduleParams,\n type UpdateConsoleBackupScheduleParams,\n} from './services/console/console.backup-schedule.service.js'\nexport {\n ConsoleByokScriptsService,\n type GetConsoleByokKmsPolicyParams,\n type GetConsoleByokScriptParams,\n} from './services/console/console.byok-scripts.service.js'\nexport {\n type ActivateConsoleByomMonitoringParams,\n type ByomMonitoringClientsResponseDto,\n type ByomMonitoringClientWithPasswordDto,\n ConsoleByomMonitoringService,\n type CreateConsoleByomMonitoringClientParams,\n type DeactivateConsoleByomMonitoringParams,\n type DeleteConsoleByomMonitoringClientParams,\n type GetConsoleByomMonitoringClientsParams,\n type RotateConsoleByomMonitoringClientPasswordParams,\n} from './services/console/console.byom-monitoring.service.js'\nexport {\n ChannelService,\n type ConsoleChannelDto,\n type CreateConsoleChannelParams,\n type DeleteConsoleChannelParams,\n type GetConsoleChannelsParams,\n type UpdateConsoleChannelParams,\n} from './services/console/console.channel.service.js'\nexport type {\n ConsoleClusterCarryOverResult,\n CreateConsoleClusterRequest,\n CreateConsoleClusterResponse,\n DeleteConsoleClusterRequest,\n DeleteExternalIdpRequest,\n DuplicateConsoleClusterRequest,\n DuplicateConsoleClusterResponse,\n FailoverConsoleClusterRequest,\n FailoverConsoleClusterResult,\n GetAdminClusterRequest,\n GetConsoleClusterRequest,\n GetConsoleClustersRequest,\n MoveClusterOwnerRequest,\n ProxyOrchestrationClusterRequest,\n SuspendConsoleClusterRequest,\n UpdateClusterRequest,\n UpdateExternalIdpSecretRequest,\n WakeConsoleClusterRequest,\n} from './services/console/console.cluster.service.js'\nexport { ConsoleClusterService } from './services/console/console.cluster.service.js'\nexport type {\n GetClusterParametersV2Request,\n GetClusterV2Request,\n ListClustersV2Request,\n ListOrgClustersV2Request,\n} from './services/console/console.cluster.v2.service.js'\nexport { ConsoleClusterV2Service } from './services/console/console.cluster.v2.service.js'\nexport {\n type ConsoleClusterClientDto,\n ConsoleClusterClientsService,\n type CreateConsoleClusterClientParams,\n type CreateConsoleClusterClientResponse,\n type DeleteConsoleClusterClientParams,\n type GetConsoleClusterClientsParams,\n type RotateConsoleClusterClientSecretParams,\n type RotateConsoleClusterClientSecretResponse,\n type UpdateConsoleClusterClientParams,\n} from './services/console/console.cluster-clients.service.js'\nexport {\n type ConsoleClusterCreationParametersChannel,\n type ConsoleClusterCreationParametersClusterPlanType,\n type ConsoleClusterCreationParametersGeneration,\n type ConsoleClusterCreationParametersRegion,\n type ConsoleClusterCreationParametersRegionBackup,\n type ConsoleClusterCreationParametersRegionBackupRegion,\n type ConsoleClusterCreationParametersResponse,\n type ConsoleClusterCreationParametersUnlockedClusterPlan,\n ConsoleClusterParametersService,\n type GetConsoleClusterCreationParametersRequest,\n} from './services/console/console.cluster-parameters.service.js'\nexport { ConsoleClusterBulkOperationService } from './services/console/console.clusterBulkOperation.service.js'\nexport { ClusterPlanModificationService } from './services/console/console.clusterplan.modification.service.js'\nexport type {\n CreateClusterPlanParams,\n DeleteClusterPlanParams,\n UpdateMigratableFromParams,\n UpdatePerformanceExpectationsParams,\n} from './services/console/console.clusterplan.service.js'\nexport { ClusterPlanService } from './services/console/console.clusterplan.service.js'\nexport {\n ClusterPlanTypeService,\n type CreateClusterPlanTypeParams,\n type DeleteClusterPlanTypeParams,\n type GetClusterPlanTypesParams,\n type SetClusterPlanTypeLimitsParams,\n type UpdateClusterPlanTypeParams,\n} from './services/console/console.clusterplantype.service.js'\nexport {\n ConsoleConnectorSecretsService,\n type DeleteConsoleConnectorSecretParams,\n type GetConsoleConnectorSecretsParams,\n type PutConsoleConnectorSecretParams,\n} from './services/console/console.connector-secrets.service.js'\nexport type {\n ConsoleCustomMetricsRequest,\n ConsoleCustomMetricsResponse,\n} from './services/console/console.custommetrics.service.js'\nexport { ConsoleCustomMetricsService } from './services/console/console.custommetrics.service.js'\nexport {\n ConsoleHotBackupsService,\n type CreateConsoleHotBackupParams,\n type CreateConsoleInternalBackupParams,\n type DeleteConsoleHotBackupParams,\n type DeleteConsoleInternalBackupParams,\n type GetConsoleHotBackupsParams,\n type GetConsoleInternalBackupsParams,\n type RestoreConsoleHotBackupParams,\n type RetryConsoleHotBackupParams,\n} from './services/console/console.hotbackups.service.js'\nexport {\n ConsoleIpWhitelistService,\n type IpWhitelistEntryDto,\n type UpdateConsoleIpWhitelistParams,\n} from './services/console/console.ip-whitelist.service.js'\nexport type {\n SaaSJobsBaseParams,\n SaaSJobsErrorsParams,\n SaaSJobsGlobalParams,\n SaaSJobsOverviewParams,\n SaaSJobsTimeSeriesParams,\n SaaSJobsWorkersParams,\n} from './services/console/console.jobs.saas.service.js'\nexport { SaaSJobsService } from './services/console/console.jobs.saas.service.js'\nexport {\n type GetK8sContextsParams,\n K8sContextService,\n} from './services/console/console.k8scontext.service.js'\nexport type {\n VerifyApiClientCredentialsResponse,\n VerifyClientCredentialsRequest,\n VerifyZeebeClientCredentialsResponse,\n} from './services/console/console.m2m.service.js'\nexport { ConsoleM2MService } from './services/console/console.m2m.service.js'\nexport {\n type ActivateSecureConnectivityParams,\n ConsoleSecureConnectivityService,\n type DeactivateSecureConnectivityParams,\n type GetSecureConnectivityStatusParams,\n type SecureConnectivityStatusDto,\n type UpdateSecureConnectivityParams,\n} from './services/console/console.secure-connectivity.service.js'\nexport {\n type GetStorybookConfigParams,\n StorybookConfigService,\n} from './services/console/console.storybook-config.service.js'\nexport { ConsoleValueMetricsService } from './services/console/console.valuemetrics.service.js'\nexport {\n type CreateGenerationParams,\n type DeleteGenerationParams,\n type DryRunPublishReleaseTrainResponse,\n type DryRunRollbackReleaseTrainResponse,\n GenerationService,\n type GenerationVersionsInput,\n type ListGenerationsParams,\n type ReleaseTrainGenerationRef,\n type SetGenerationArchivedParams,\n type SetGenerationBespokeParams,\n type UpdateGenerationParams,\n} from './services/console/generation.service.js'\nexport type {\n CreateAgentGrantRequest,\n CreateAgentGrantResult,\n} from './services/control/control.agent-grants.service.js'\nexport { ControlAgentGrantsInternalService } from './services/control/control.agent-grants.service.js'\n// control-backend \u2014 the read-only agent tokens of ccmacli\nexport type {\n AgentTokenUuidRequest,\n CreateAgentTokenRequest,\n ExtendAgentTokenRequest,\n ListAllAgentTokensRequest,\n RedeemAgentGrantRequest,\n VerifyAgentClientRequest,\n} from './services/control/control.agent-tokens.service.js'\nexport {\n ControlAgentClientsInternalService,\n ControlAgentTokensService,\n} from './services/control/control.agent-tokens.service.js'\nexport type {\n AddAnnotationNoteRequest,\n AddAnnotationTagRequest,\n AnnotationIdRequest,\n AnnotationPageDto,\n AnnotationPageInfoDto,\n AnnotationTagPageDto,\n AnnotationTargetDto,\n EditAnnotationNoteRequest,\n GetEntityAnnotationsRequest,\n ListAnnotationTagsRequest,\n LookupAnnotationsRequest,\n SearchAnnotationsRequest,\n} from './services/control/control.annotations.service.js'\nexport { ControlAnnotationsService } from './services/control/control.annotations.service.js'\n// control-backend \u2014 the four-eyes approval surface\nexport type {\n ApprovalFacetParams,\n ApprovalIdRequest,\n ApprovalPageDto,\n AutomatedEnterpriseOnboardingPayloadDto,\n ChangeClusterPlanTypePayloadDto,\n ChangeEnterpriseContractPayloadDto,\n ChangeFeatureFlagPayloadDto,\n ChangeGenerationVersionsPayloadDto,\n ChangeGenerationVersionsTargetDto,\n ChangeLicensingModelPayloadDto,\n ChangeOrgLimitsPayloadDto,\n ChangePlanTypeRetentionLimitsPayloadDto,\n ChangePlatformRolesPayloadDto,\n ChangeSalesPlanPayloadDto,\n ChangeUserEmailPayloadDto,\n CountApprovalsRequest,\n CreateApprovalRequest,\n CreateClusterTtlDeletionRequest,\n CreateCustomGenerationPayloadDto,\n CreateCustomHardwareSizingPayloadDto,\n CreateExtendTrialRequest,\n CreatePersonalOrganisationPayloadDto,\n CreatePersonalOrganisationRequest,\n CustomHardwareSizingRequest,\n DeleteApiClientPayloadDto,\n DeleteClusterCorpsesPayloadDto,\n DeleteInternalBackupPayloadDto,\n DeleteManagedLlmTenantPayloadDto,\n DeleteOrganizationPayloadDto,\n DeleteSsoConnectionPayloadDto,\n DeleteUserPayloadDto,\n DisableFeatureFlagPayloadDto,\n EditGenerationPayloadDto,\n EnterpriseContractTermsDto,\n ExtendTrialPayloadDto,\n FeatureFlagValuesDto,\n ForceDeleteClusterPlanTypePayloadDto,\n GrantApprovalOverridePayloadDto,\n LinkCustomGenerationPayloadDto,\n LinkCustomHardwareSizingPayloadDto,\n ListApprovalsRequest,\n LlmBudgetTopUpPayloadDto,\n MoveClusterOrgPayloadDto,\n OnboardToEnterpriseClusterDto,\n OnboardToEnterprisePayloadDto,\n OverrideApprovalRequest,\n PurgeUsersPayloadDto,\n RejectApprovalRequest,\n RemoveCustomGenerationPayloadDto,\n RemoveCustomHardwareSizingPayloadDto,\n RemoveOrgMemberPayloadDto,\n RequestInNegotiationPayloadDto,\n SelfServiceApprovalRequest,\n SelfServiceClusterModificationPayloadDto,\n SendToExpiredTrialPayloadDto,\n UpdateUserMetadataPayloadDto,\n WithdrawApprovalRequest,\n} from './services/control/control.approvals.service.js'\nexport { ControlApprovalsService } from './services/control/control.approvals.service.js'\n// control-backend \u2014 the dashboards, whose tiles hold filters and never data\nexport type {\n AddDashboardTileRequest,\n CheckChartQueryRequest,\n CreateDashboardRequest,\n DashboardIdRequest,\n ListDashboardsRequest,\n UpdateDashboardRequest,\n} from './services/control/control.dashboards.service.js'\nexport { ControlDashboardsService } from './services/control/control.dashboards.service.js'\nexport type {\n CreateFeatureFlagRequest,\n EvaluateFeatureFlagsRequest,\n FeatureFlagIdRequest,\n UpdateFeatureFlagRequest,\n} from './services/control/control.feature-flags.service.js'\nexport { ControlFeatureFlagsService } from './services/control/control.feature-flags.service.js'\nexport type {\n ControlInfoDto,\n ControlWhoamiDto,\n} from './services/control/control.platform.service.js'\nexport { ControlPlatformService } from './services/control/control.platform.service.js'\n// external services (CORS-enabled webapp navigation surface)\nexport type {\n GetFeatureFlagsParams,\n UpdateUserThemeParams,\n UserThemePreference,\n} from './services/external/external.accounts.service.js'\nexport { ExternalAccountsService } from './services/external/external.accounts.service.js'\nexport type {\n GetOrgClustersParams,\n SetOrgClusterSleepParams,\n StreamOrgEventsParams,\n} from './services/external/external.console.service.js'\nexport { ExternalConsoleService } from './services/external/external.console.service.js'\nexport type {\n DismissAllNotificationsParams,\n GetUserNotificationsParams,\n MarkManyNotificationsReadParams,\n SetNotificationStateParams,\n StreamUserNotificationsParams,\n TrackNotificationEventParams,\n UserNotificationAnalyticsEvent,\n} from './services/external/external.notifications.service.js'\nexport { ExternalNotificationsService } from './services/external/external.notifications.service.js'\nexport type {\n GithubCommitComparison,\n GithubCompareCommitsRequest,\n GithubContentItem,\n GithubGenerateReleaseNotesRequest,\n GithubGetRawFileRequest,\n GithubListDirectoryContentRequest,\n GithubListMajorMinorReleasesRequest,\n GithubListReleasesRequest,\n GithubRelease,\n} from './services/github/github.service.js'\n// github services\nexport { GithubService } from './services/github/github.service.js'\nexport type {\n GleanSearchRequest,\n GleanSearchResult,\n} from './services/glean/glean.service.js'\n// glean services\nexport { GleanService } from './services/glean/glean.service.js'\nexport type {\n HelpCenterCardResponse,\n HelpCenterConfigResponse,\n HelpCenterGetCardsRequest,\n HelpCenterGetConfigRequest,\n} from './services/helpcenter/helpcenter.service.js'\n// helpcenter services\nexport { HelpCenterService } from './services/helpcenter/helpcenter.service.js'\nexport type {\n HibobEmployee,\n HibobGetAllUsersRequest,\n HibobReportsTo,\n HibobSearchRequest,\n HibobSearchResponse,\n} from './services/hibob/hibob.service.js'\n// hibob services\nexport {\n DEPARTMENT as HIBOB_DEPARTMENT_PATH,\n DIVISION as HIBOB_DIVISION_PATH,\n DIVISION_ID as HIBOB_DIVISION_ID,\n HibobService,\n SUB_DIVISION as HIBOB_SUB_DIVISION_PATH,\n SUB_DIVISION_ID as HIBOB_SUB_DIVISION_ID,\n} from './services/hibob/hibob.service.js'\nexport type {\n HubspotChangeContactPropertiesRequest,\n HubspotSubmission,\n HubspotSubmitRequest,\n HubspotTokenRequest,\n HubspotTokenResponse,\n} from './services/hubspot/hubspot.service.js'\n// hubspot services\nexport { HubspotService } from './services/hubspot/hubspot.service.js'\nexport type {\n IncidentIoGetOpenIncidentsRequest,\n OpenIncident,\n} from './services/incident-io/incident-io.service.js'\n// incident.io services\nexport { IncidentIoService } from './services/incident-io/incident-io.service.js'\n// litellm services\nexport type {\n BlockKeyRequest,\n BlockKeyResponse,\n CreateTeamRequest,\n CreateTeamResponse,\n DeleteKeyRequest,\n DeleteKeyResponse,\n DeleteTeamRequest,\n DeleteTeamResponse,\n GenerateKeyRequest,\n GenerateKeyResponse,\n GetKeyInfoRequest,\n GetKeyInfoResponse,\n RegenerateKeyRequest,\n RegenerateKeyResponse,\n UnblockKeyRequest,\n UnblockKeyResponse,\n UpdateKeyBudgetRequest,\n UpdateKeyBudgetResponse,\n UpdateTeamBudgetRequest,\n UpdateTeamBudgetResponse,\n} from './services/litellm/litellm.service.js'\nexport { LiteLLMService } from './services/litellm/litellm.service.js'\nexport type { LoginPayload } from './services/login/login.service.js'\n// login services\nexport { LoginService } from './services/login/login.service.js'\n// notifications services\nexport type {\n CreateGlobalNotificationParams,\n CreateNotificationBySalesPlanParams,\n DeleteGlobalNotificationParams,\n UpdateNotificationParams,\n} from './services/notifications/notifications.service.js'\nexport { NotificationsService } from './services/notifications/notifications.service.js'\n// openrouter services\nexport type {\n CreateOpenRouterKeyRequest,\n CreateOpenRouterKeyResponse,\n DeleteOpenRouterKeyRequest,\n DeleteOpenRouterKeyResponse,\n GetOpenRouterKeyRequest,\n GetOpenRouterKeyResponse,\n GetOpenRouterWorkspaceRequest,\n GetOpenRouterWorkspaceResponse,\n ListOpenRouterKeysRequest,\n ListOpenRouterKeysResponse,\n OpenRouterKeyData,\n UpdateOpenRouterKeyRequest,\n UpdateOpenRouterKeyResponse,\n} from './services/openrouter/openrouter.service.js'\nexport {\n OPENROUTER_KEY_PAGE_SIZE,\n OpenRouterService,\n} from './services/openrouter/openrouter.service.js'\nexport type {\n IncomingWebhookData,\n IncomingWebhookRequest,\n SlackChatPostMessageParams,\n SlackChatPostMessageResponse,\n SlackConversationsInviteParams,\n SlackConversationsInviteResponse,\n SlackLookupUserByEmailParams,\n SlackLookupUserByEmailResponse,\n} from './services/slack/slack.service.js'\n// slack services\nexport { SlackService } from './services/slack/slack.service.js'\nexport type {\n SendBlockKitMessageParams,\n SendBlockKitMessageResponse,\n SlackBlock,\n} from './services/slack/slack-blockkit.service.js'\nexport { SlackBlockKitService } from './services/slack/slack-blockkit.service.js'\nexport type { TelemetryPostRequest } from './services/telemetry/telemetry.service.js'\n// telemetry services\nexport { TelemetryService } from './services/telemetry/telemetry.service.js'\nexport type {\n ThanosQueryRequest,\n ThanosQueryResponse,\n ThanosQueryResult,\n} from './services/thanos/thanos.service.js'\n// thanos services\nexport {\n ThanosApiEndpoint,\n ThanosService,\n} from './services/thanos/thanos.service.js'\n// token-issuer services\nexport {\n type AgentGrantToken,\n type RedeemAgentGrantTokenRequest,\n TokenIssuerGrantService,\n} from './services/token-issuer/token-issuer.grant.service.js'\nexport type {\n JwksRequest,\n JwksResponse,\n} from './services/token-issuer/token-issuer.jwks.service.js'\nexport { TokenIssuerJwksService } from './services/token-issuer/token-issuer.jwks.service.js'\nexport type {\n WordpressGetCardsRequest,\n WordpressGetHelpCenterConfigRequest,\n} from './services/wordpress/wordpress.service.js'\n// wordpress services\nexport { WordpressService } from './services/wordpress/wordpress.service.js'\n\n// types\nexport type {\n FailedResponseDetails,\n RequestBaseCustomMetrics,\n RequestBaseCustomMetricsDetailsType,\n RequestBaseMethodType,\n RequestBaseParams,\n RequestBaseParamsAuth,\n RequestBaseParamsConfig,\n RequestBaseParamsEnvOverride,\n RequestBaseParamsLogger,\n RequestBaseServiceContext,\n Stage,\n} from './types/general.types.js'\nexport type { RequestPayload, Response } from './utils/api.js'\n// utils\nexport {\n accountsNgHeaders,\n request,\n setAccountsNgBackend,\n} from './utils/api.js'\nexport { CustomMetricsCCMA } from './utils/ccma-metrics.js'\nexport type { ServiceAudience, ServiceName } from './utils/environments.js'\nexport { HttpError } from './utils/errors.js'\nexport type {\n SseConnection,\n SseConnectionOptions,\n SseConnectionState,\n SseMessage,\n} from './utils/sse.js'\nexport { connectSse } from './utils/sse.js'\n\nexport {\n correlationHeaders,\n generateTraceparent,\n getSessionId,\n sessionHeaders,\n setTraceparentProvider,\n traceparentHeaders,\n} from './utils/traceparent.js'\n"],
5
- "mappings": "AAWA,SAAS,iCAAiC;AAM1C,SAAS,yBAAyB;AA6ClC,SAAS,mCAAmC;AAC5C,SAAS,0BAA0B;AAMnC,SAAS,wBAAwB;AA6BjC,SAAS,wBAAwB;AAcjC,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAalC,SAAS,kCAAkC;AAC3C,SAAS,2BAA2B;AAkBpC,SAAS,kBAAkB;AAC3B;AAAA,EAEE;AAAA,OAEK;AAEP,SAAS,2BAA2B;AAKpC,SAAS,0BAA0B;AAanC,SAAS,kCAAkC;AA0C3C,SAAS,mBAAmB;AAO5B,SAAS,qBAAqB;AAW9B,SAAS,2BAA2B;AAQpC,SAAS,+BAA+B;AAKxC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AASP,SAAS,wBAAwB;AACjC,SAAS,4BAA4B;AAErC,SAAS,oBAAoB;AAE7B,SAAS,8BAA8B;AAKvC,SAAS,0BAA0B;AAMnC,SAAS,8BAA8B;AAMvC,SAAS,0BAA0B;AAenC,SAAS,oBAAoB;AAQ7B,SAAS,qBAAqB;AAM9B,SAAS,6BAA6B;AActC,SAAS,yBAAyB;AASlC,SAAS,0BAA0B;AAKnC,SAAS,gCAAgC;AAGzC,SAAS,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,4BAA4B;AAiBrC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAYP,SAAS,oBAAoB;AAM7B,SAAS,4BAA4B;AAGrC,SAAS,wBAAwB;AAOjC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EAGE;AAAA,OACK;AAKP,SAAS,8BAA8B;AAMvC,SAAS,wBAAwB;AAkBjC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,yBAAyB;AAElC,SAAS,iBAAiB;AAO1B,SAAS,kBAAkB;AAE3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
4
+ "sourcesContent": ["/*\n * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH\n * under one or more contributor license agreements. Licensed under a commercial license.\n * You may not use this file except in compliance with the commercial license.\n */\n\nexport type {\n GetDataExportRequest,\n GetDataExportResponse,\n} from './services/accounts/accounts.data-export.service.js'\n// accounts services\nexport { AccountsDataExportService } from './services/accounts/accounts.data-export.service.js'\nexport type { GetValueMetricsPerDayParams } from './services/accounts/accounts.valuemetrics.service.js'\nexport type {\n DownloadDatabaseDumpParams,\n TriggerValueMetricsCronParams,\n} from './services/accounts/admin-tools.service.js'\nexport { AdminToolsService } from './services/accounts/admin-tools.service.js'\nexport type {\n AutomatedEnterpriseOnboardingThroughApprovalRequest,\n ChangeClusterPlanLinkThroughApprovalRequest,\n ChangeClusterPlanLinkThroughApprovalResult,\n ChangeEnterpriseContractThroughApprovalRequest,\n ChangeGenerationLinkThroughApprovalRequest,\n ChangeGenerationLinkThroughApprovalResult,\n ChangeLicensingModelThroughApprovalRequest,\n ChangeOrgLimitThroughApprovalRequest,\n ChangePlatformRolesThroughApprovalRequest,\n ChangePlatformRolesThroughApprovalResult,\n ChangeSalesPlanThroughApprovalRequest,\n ChangeUserEmailThroughApprovalRequest,\n CheckOrgOwnerRequest,\n CreatePersonalOrganizationThroughApprovalRequest,\n CreatePersonalOrganizationThroughApprovalResult,\n DeleteManagedLlmTenantThroughApprovalRequest,\n DeleteManagedLlmTenantThroughApprovalResult,\n DeleteOrganizationThroughApprovalRequest,\n DeleteOrganizationThroughApprovalResult,\n DeleteSsoConnectionThroughApprovalRequest,\n DeleteSsoConnectionThroughApprovalResult,\n DeleteUserThroughApprovalRequest,\n DeleteUserThroughApprovalResult,\n EnterpriseContractTerms,\n ExtendTrialThroughApprovalRequest,\n LlmBudgetTopUpThroughApprovalRequest,\n LlmBudgetTopUpThroughApprovalResult,\n OnboardToEnterpriseClusterMapping,\n OnboardToEnterpriseContract,\n OnboardToEnterpriseThroughApprovalRequest,\n OrgLimitValue,\n RemoveOrgMemberNamedUser,\n RemoveOrgMemberThroughApprovalRequest,\n RemoveOrgMemberThroughApprovalResult,\n RequestInNegotiationThroughApprovalRequest,\n SendToExpiredTrialThroughApprovalRequest,\n UnlinkClusterPlanFromMemberOrganizationsRequest,\n UnlinkClusterPlanFromMemberOrganizationsResult,\n UnlinkGenerationFromMemberOrganizationsRequest,\n UnlinkGenerationFromMemberOrganizationsResult,\n UpdateReservationsThroughApprovalRequest,\n UpdateUserMetadataThroughApprovalRequest,\n} from './services/accounts/approvals.m2m.service.js'\nexport { AccountsApprovalsM2MService } from './services/accounts/approvals.m2m.service.js'\nexport { AccountsBotService } from './services/accounts/bot.service.js'\nexport type {\n BugReportRequest,\n BugReportRequestBody,\n BugReportResponse,\n} from './services/accounts/bug-report.service.js'\nexport { BugReportService } from './services/accounts/bug-report.service.js'\nexport type {\n CancelMatchParams,\n CancelMatchResponse,\n GameInfo,\n GetGameInfoParams,\n GetHighscoresParams,\n GetHighscoresResponse,\n GetMatchStateParams,\n GetOrganizationalGroupsParams,\n GetOrganizationalGroupsResponse,\n GetRunningMatchesParams,\n GetRunningMatchesResponse,\n HighscoreEntry,\n InitiateMatchParams,\n InitiateMatchResponse,\n JoinMatchParams,\n JoinMatchResponse,\n Match,\n Player,\n PlayerAnswer,\n Question,\n QuestionChoice,\n SlackProfile,\n StartMatchParams,\n StartMatchResponse,\n SubmitAnswerParams,\n SubmitAnswerResponse,\n} from './services/accounts/challenge.service.js'\nexport { ChallengeService } from './services/accounts/challenge.service.js'\nexport type {\n AzureConnectionPayload,\n Connection,\n ConnectionPayload,\n ConnectionUserDto,\n ConnectionWriteStrategy,\n CreateConnectionParams,\n DeleteConnectionParams,\n GetConnectionParams,\n GetConnectionsParams,\n SamlConnectionPayload,\n UpdateConnectionParams,\n} from './services/accounts/connections.service.js'\nexport { ConnectionsService } from './services/accounts/connections.service.js'\nexport type { GetEngineeringOperationsDashboardRequest } from './services/accounts/dashboards.service.js'\nexport { DashboardsService } from './services/accounts/dashboards.service.js'\nexport type {\n CreateEarlyAccessFeatureParams,\n DeleteEarlyAccessFeatureParams,\n EarlyAccessFeatureActivationDto,\n EarlyAccessFeatureDto,\n EarlyAccessFeatureOrgDto,\n EarlyAccessFeatureSalesPlanConfigDto,\n GetEarlyAccessFeatureOrgsParams,\n GetEarlyAccessFeaturesForOrgParams,\n SetEarlyAccessFeatureActivationParams,\n UpdateEarlyAccessFeatureParams,\n} from './services/accounts/early-access-features.service.js'\nexport { EarlyAccessFeaturesService } from './services/accounts/early-access-features.service.js'\nexport { GenericCacheService } from './services/accounts/genericCache.service.js'\nexport type {\n GetActiveOrgsRequest,\n GetActiveOrgsResponse,\n GetBackendChangeEventsRequest,\n GetClusterActivityRequest,\n GetClusterCapacityRequest,\n GetClusterDiskUsageParams,\n GetClusterDiskUsageRequest,\n GetClusterHostingCostRequest,\n GetClusterHostingCostResponse,\n GetLlmUsageRequest,\n GetTenantUsageRequest,\n GetUsageMetricsRequest,\n GetUsageMetricsResponse,\n LlmUsageEntry,\n QueryChartRequest,\n} from './services/accounts/hdp.service.js'\nexport { HdpService } from './services/accounts/hdp.service.js'\nexport {\n type InviteDto,\n InvitesService,\n type SearchInvitesRequest,\n} from './services/accounts/invites.service.js'\nexport type { GetM2mTokenCountsRequest } from './services/accounts/logs.service.js'\nexport { AccountsLogsService } from './services/accounts/logs.service.js'\nexport type {\n OffboardCamundiRequest,\n OffboardCamundiResponse,\n} from './services/accounts/offboarding.service.js'\nexport { OffboardingService } from './services/accounts/offboarding.service.js'\nexport type {\n AssignNewOwnerParams,\n AssignNewOwnerResponse,\n CancelOrganizationInviteParams,\n GetOrganizationMembersParams,\n LeaveOrganizationParams,\n OrganizationMemberDto,\n OrganizationMemberInviteDto,\n RemoveUserFromOrganizationParams,\n ResendOrganizationInviteParams,\n UpdateOrganizationMemberRolesParams,\n} from './services/accounts/organization-members.service.js'\nexport { OrganizationMembersService } from './services/accounts/organization-members.service.js'\nexport type {\n AutomatedEnterpriseOnboardingRequest,\n AutomatedEnterpriseOnboardingResult,\n AwsOnlyRequest,\n BlockLiteLLMParams,\n ChangeSalesPlanRequest,\n CheckUserExistsForInviteRequest,\n CheckUserExistsForInviteResponse,\n ConvertTrialToInNegotiationRequest,\n DeleteOrganizationRequest,\n EnterpriseDevOnlyRequest,\n ExtendTrialRequest,\n GetLLMUsageInfoParams,\n GetQueuedOperationsParams,\n GetSubscriptionDetailsParams,\n GetSubscriptionDetailsResponse,\n GetSubscriptionItemsParams,\n IncreaseLLMBudgetParams,\n IncreaseLLMBudgetResponse,\n LicensingModelRequest,\n LLMUsageInfoResponse,\n OnboardLiteLLMParams,\n OrgClusterDefaultsRequest,\n OrgClusterDefaultsResponse,\n OrgInfo,\n QueuedOperationDto,\n RenameOrganizationRequest,\n ResetTrialExtensionsRequest,\n SelfExtendTrialRequest,\n SendInviteRequest,\n SetBetaTermsAcceptedRequest,\n SetLimitRequest,\n UnblockLiteLLMParams,\n UpdateActivityRetentionRequest,\n UpdateActivityRetentionResponse,\n UpdateOrgClusterDefaultsRequest,\n UpdateOrgLimitAsMemberRequest,\n UpdateOrgLimitAsMemberResponse,\n UpdateSuppressDropDisksRequest,\n UpdateSuppressDropDisksResponse,\n} from './services/accounts/orgs.service.js'\nexport { OrgsService } from './services/accounts/orgs.service.js'\nexport type {\n GetControlSessionRequest,\n GetOrganizationV2Request,\n ListOrganizationsV2Request,\n ListOrgMembersV2Request,\n} from './services/accounts/orgs.v2.service.js'\nexport { OrgsV2Service } from './services/accounts/orgs.v2.service.js'\nexport type {\n CreatePdfWatermarkProjectParams,\n PdfWatermarkAuditEntryDto,\n PdfWatermarkPasswordParams,\n PdfWatermarkProjectDto,\n PdfWatermarkProjectIdParams,\n RecordPdfWatermarkAuditParams,\n SetPdfWatermarkPdfParams,\n UpdatePdfWatermarkProjectParams,\n} from './services/accounts/pdf-watermark.service.js'\nexport { PdfWatermarkService } from './services/accounts/pdf-watermark.service.js'\nexport type {\n FleetQueuedOperationDto,\n ListQueuedOperationsParams,\n QueuedOperationStatus,\n QueuedOperationsResponse,\n QueueHealthDto,\n} from './services/accounts/queued-operations.service.js'\nexport { QueuedOperationsService } from './services/accounts/queued-operations.service.js'\nexport type {\n GetReleaseTrainParams,\n ReleaseTrainInfoDto,\n} from './services/accounts/release-train.service.js'\nexport {\n KNOWN_RELEASE_TRAINS,\n ReleaseTrainService,\n} from './services/accounts/release-train.service.js'\nexport type {\n CreateSalesPlanRequest,\n DeleteSalesPlanRequest,\n GetSalesPlansRequest,\n UpdateSalesPlanMetadataRequest,\n UpdateSalesPlanRequest,\n UpdateSalesPlanReservationsRequest,\n} from './services/accounts/salesplan.service.js'\nexport { SalesPlanService } from './services/accounts/salesplan.service.js'\nexport { SpamDetectionService } from './services/accounts/spam-detection.service.js'\nexport type { GetStatsParams } from './services/accounts/stats.service.js'\nexport { StatsService } from './services/accounts/stats.service.js'\nexport type { PostTracesRequest } from './services/accounts/telemetry-ingest.service.js'\nexport { TelemetryIngestService } from './services/accounts/telemetry-ingest.service.js'\nexport type {\n InvalidateTokenByClientParams,\n InvalidateTokenParams,\n} from './services/accounts/token-issuer.service.js'\nexport { TokenIssuerService } from './services/accounts/token-issuer.service.js'\nexport type {\n GetOrgTrialDetailParams,\n GetTrialManagementOrgsParams,\n GetTrialManagementParams,\n} from './services/accounts/trial-management.service.js'\nexport { TrialManagementService } from './services/accounts/trial-management.service.js'\nexport type {\n CreateUsageAlertParams,\n GetUsageAlertsParams,\n PatchUsageAlertParams,\n} from './services/accounts/usage-alerts.service.js'\nexport { UsageAlertsService } from './services/accounts/usage-alerts.service.js'\nexport type {\n AddUserToOrganizationRequest,\n ChangeUserEmailRequest,\n ChangeUserNameRequest,\n DeleteMeRequest,\n PurgeUserResult,\n RemoveStaleOrganizationRequest,\n RemoveUserFromOrganizationRequest,\n SearchParams,\n SetDefaultOrgRequest,\n SimpleSearchParams,\n UpdateUserRoleRequest,\n UserIdRequest,\n} from './services/accounts/users.service.js'\nexport { UsersService } from './services/accounts/users.service.js'\nexport type {\n CreateAlertSubscription,\n DeleteAlertSubscription,\n GetAlertSubscriptions,\n UpdateAlertSubscription,\n} from './services/alerts/alerts.service.js'\n// alerts services\nexport { AlertsService } from './services/alerts/alerts.service.js'\nexport type {\n AddAnalyticBridgeRequest,\n AddClusterAnalyticBridgeRequest,\n} from './services/analytic-bridge/analytic-bridge.service.js'\n// analytic-bridge services\nexport { AnalyticBridgeService } from './services/analytic-bridge/analytic-bridge.service.js'\nexport type {\n AskBackendBaseParams,\n AskBackendGetOrgClustersParams,\n AskBackendOrgParams,\n AskBackendRunQueryParams,\n AskBackendSearchOrgsParams,\n OrgClusterRow,\n OrgDetail,\n OrgMemberInfo,\n OrgOwnerInfo,\n OrgSummary,\n} from './services/ask-backend/ask-backend.service.js'\n// ask-backend service\nexport { AskBackendService } from './services/ask-backend/ask-backend.service.js'\nexport type {\n AddAuditRequest,\n DeleteStaleActivityRetentionRequest,\n GetAuditRequest,\n GetClusterAuditRequest,\n UpsertActivityRetentionChunkRequest,\n} from './services/audit-logger/audit-logger.service.js'\n// audit-logger services\nexport { AuditLoggerService } from './services/audit-logger/audit-logger.service.js'\nexport type {\n AddSystemAuditRequest,\n GetSystemAuditRequest,\n} from './services/audit-logger/audit-logger.system.service.js'\nexport { SystemAuditLoggerService } from './services/audit-logger/audit-logger.system.service.js'\nexport type { Auth0Request } from './services/auth0/auth0.service.js'\n// auth0 services\nexport { Auth0Service } from './services/auth0/auth0.service.js'\n// the OpenAPI documents of control-backend and accounts-ng, for the !ccmacli command of CloudBot\nexport {\n CcmaOpenApiService,\n type CcmaOpenApiServiceName,\n type CcmaOperationResponse,\n type GetCcmaOpenApiDocumentRequest,\n type SendCcmaOperationRequest,\n} from './services/ccma/ccma.openapi.service.js'\nexport type { CommBridgeClientRequest } from './services/comm-bridge/comm-bridge.service.js'\n// comm-bridge services\nexport { CommBridgeService } from './services/comm-bridge/comm-bridge.service.js'\nexport type {\n AdminClusterAutoUpdateRequest,\n AdminClusterDetailsDto,\n AdminClusterNonSpotNodesRequest,\n AdminClusterOptionalTelemetryRequest,\n AdminClusterTtlRequest,\n AdminClusterZeebeRebalancingRequest,\n CreateLiteLLMSecretsForOrgRequest,\n GetAdminClusterDetailsRequest,\n GetClusterCrdStateRequest,\n GetClusterRequest,\n GetSpecExplainerRequest,\n GetValueMetricsMetadataRequest,\n GetValueMetricsUsageDataPerDayRequest,\n ModificationsAnswer,\n RemoveLlmSecretsForOrgRequest,\n RemoveLlmSecretsForOrgResponse,\n RepointLlmSecretsForOrgRequest,\n RepointLlmSecretsForOrgResponse,\n RotateLiteLLMKeySecretsForOrgRequest,\n RotateLiteLLMKeySecretsForOrgResponse,\n SignalSignupRequest,\n SpecExplainerFieldAnnotation,\n SpecExplainerFieldSource,\n SpecExplainerResponse,\n UpdateClusterMetricsStartDateRequest,\n UpdateClusterToNewPlanTypeRequest,\n} from './services/console/console.admin.service.js'\n// console services\nexport { ConsoleAdminService } from './services/console/console.admin.service.js'\nexport {\n type CheckConsoleAlertParams,\n type CheckConsoleAlertResponse,\n ConsoleAlertsService,\n type CreateConsoleAlertParams,\n type DeleteConsoleAlertParams,\n type GetConsoleAlertsParams,\n type UpdateConsoleAlertParams,\n} from './services/console/console.alerts.service.js'\nexport {\n type ConsoleApiClientDto,\n ConsoleApiClientsService,\n type CreateConsoleApiClientParams,\n type CreateConsoleApiClientResponse,\n type DeleteConsoleApiClientParams,\n type GetConsoleApiClientsParams,\n type UpdateConsoleApiClientParams,\n} from './services/console/console.api-clients.service.js'\nexport type {\n AnnounceClusterBulkPlanUpdateRequest,\n ApplySelfServiceModificationRequest,\n ApprovalApiClientDto,\n ChangeClusterPlanTypeThroughApprovalRequest,\n ChangeGenerationVersionsThroughApprovalRequest,\n ChangePlanTypeRetentionLimitsThroughApprovalRequest,\n CheckCustomClusterPlanRemovalRequest,\n CheckCustomGenerationRemovalRequest,\n CreateCustomClusterPlanThroughApprovalRequest,\n CreateCustomGenerationThroughApprovalRequest,\n CustomClusterPlanThroughApprovalResult,\n CustomGenerationThroughApprovalResult,\n DeactivateSelfServiceModificationRequest,\n DeleteApiClientThroughApprovalRequest,\n DeleteClusterCorpseThroughApprovalRequest,\n DeleteClusterOfPlanTypeThroughApprovalRequest,\n DeleteClusterPastTtlThroughApprovalRequest,\n DeleteClusterPlanTypeThroughApprovalRequest,\n DeleteCustomClusterPlanThroughApprovalRequest,\n DeleteCustomGenerationThroughApprovalRequest,\n DeleteInternalBackupThroughApprovalRequest,\n EditGenerationThroughApprovalRequest,\n ForceGenerationUpgradeThroughApprovalRequest,\n MoveClusterOwnerThroughApprovalRequest,\n PreviewReleaseTrainPublishRequest,\n PreviewReleaseTrainRollbackRequest,\n PublishReleaseTrainThroughApprovalRequest,\n PublishReleaseTrainThroughApprovalResult,\n ReadApiClientThroughApprovalRequest,\n ReadClusterCorpsesRequest,\n ReadClusterGenerationStateRequest,\n ReadClusterPlanTypeClustersRequest,\n ReadClusterPlanTypeLimitsRequest,\n ReadClusterPlanTypeStateRequest,\n ReleaseTrainPublishRequest,\n ReleaseTrainRollbackRequest,\n RollbackReleaseTrainThroughApprovalRequest,\n RollbackReleaseTrainThroughApprovalResult,\n RunClusterBulkStepThroughApprovalRequest,\n} from './services/console/console.approvals.m2m.service.js'\nexport { ConsoleApprovalsM2MService } from './services/console/console.approvals.m2m.service.js'\nexport {\n ConsoleBackupScheduleService,\n type GetConsoleBackupScheduleParams,\n type UpdateConsoleBackupScheduleParams,\n} from './services/console/console.backup-schedule.service.js'\nexport {\n ConsoleByokScriptsService,\n type GetConsoleByokKmsPolicyParams,\n type GetConsoleByokScriptParams,\n} from './services/console/console.byok-scripts.service.js'\nexport {\n type ActivateConsoleByomMonitoringParams,\n type ByomMonitoringClientsResponseDto,\n type ByomMonitoringClientWithPasswordDto,\n ConsoleByomMonitoringService,\n type CreateConsoleByomMonitoringClientParams,\n type DeactivateConsoleByomMonitoringParams,\n type DeleteConsoleByomMonitoringClientParams,\n type GetConsoleByomMonitoringClientsParams,\n type RotateConsoleByomMonitoringClientPasswordParams,\n} from './services/console/console.byom-monitoring.service.js'\nexport {\n ChannelService,\n type ConsoleChannelDto,\n type CreateConsoleChannelParams,\n type DeleteConsoleChannelParams,\n type GetConsoleChannelsParams,\n type UpdateConsoleChannelParams,\n} from './services/console/console.channel.service.js'\nexport type {\n ConsoleClusterCarryOverResult,\n CreateConsoleClusterRequest,\n CreateConsoleClusterResponse,\n DeleteConsoleClusterRequest,\n DeleteExternalIdpRequest,\n DuplicateConsoleClusterRequest,\n DuplicateConsoleClusterResponse,\n FailoverConsoleClusterRequest,\n FailoverConsoleClusterResult,\n GetAdminClusterRequest,\n GetConsoleClusterRequest,\n GetConsoleClustersRequest,\n MoveClusterOwnerRequest,\n ProxyOrchestrationClusterRequest,\n SuspendConsoleClusterRequest,\n UpdateClusterRequest,\n UpdateExternalIdpSecretRequest,\n WakeConsoleClusterRequest,\n} from './services/console/console.cluster.service.js'\nexport { ConsoleClusterService } from './services/console/console.cluster.service.js'\nexport type {\n GetClusterParametersV2Request,\n GetClusterV2Request,\n ListClustersV2Request,\n ListOrgClustersV2Request,\n} from './services/console/console.cluster.v2.service.js'\nexport { ConsoleClusterV2Service } from './services/console/console.cluster.v2.service.js'\nexport {\n type ConsoleClusterClientDto,\n ConsoleClusterClientsService,\n type CreateConsoleClusterClientParams,\n type CreateConsoleClusterClientResponse,\n type DeleteConsoleClusterClientParams,\n type GetConsoleClusterClientsParams,\n type RotateConsoleClusterClientSecretParams,\n type RotateConsoleClusterClientSecretResponse,\n type UpdateConsoleClusterClientParams,\n} from './services/console/console.cluster-clients.service.js'\nexport {\n type ConsoleClusterCreationParametersChannel,\n type ConsoleClusterCreationParametersClusterPlanType,\n type ConsoleClusterCreationParametersGeneration,\n type ConsoleClusterCreationParametersRegion,\n type ConsoleClusterCreationParametersRegionBackup,\n type ConsoleClusterCreationParametersRegionBackupRegion,\n type ConsoleClusterCreationParametersResponse,\n type ConsoleClusterCreationParametersUnlockedClusterPlan,\n ConsoleClusterParametersService,\n type GetConsoleClusterCreationParametersRequest,\n} from './services/console/console.cluster-parameters.service.js'\nexport { ConsoleClusterBulkOperationService } from './services/console/console.clusterBulkOperation.service.js'\nexport { ClusterPlanModificationService } from './services/console/console.clusterplan.modification.service.js'\nexport type {\n CreateClusterPlanParams,\n DeleteClusterPlanParams,\n UpdateMigratableFromParams,\n UpdatePerformanceExpectationsParams,\n} from './services/console/console.clusterplan.service.js'\nexport { ClusterPlanService } from './services/console/console.clusterplan.service.js'\nexport {\n ClusterPlanTypeService,\n type CreateClusterPlanTypeParams,\n type DeleteClusterPlanTypeParams,\n type GetClusterPlanTypesParams,\n type SetClusterPlanTypeLimitsParams,\n type UpdateClusterPlanTypeParams,\n} from './services/console/console.clusterplantype.service.js'\nexport {\n ConsoleConnectorSecretsService,\n type DeleteConsoleConnectorSecretParams,\n type GetConsoleConnectorSecretsParams,\n type PutConsoleConnectorSecretParams,\n} from './services/console/console.connector-secrets.service.js'\nexport type {\n ConsoleCustomMetricsRequest,\n ConsoleCustomMetricsResponse,\n} from './services/console/console.custommetrics.service.js'\nexport { ConsoleCustomMetricsService } from './services/console/console.custommetrics.service.js'\nexport {\n ConsoleHotBackupsService,\n type CreateConsoleHotBackupParams,\n type CreateConsoleInternalBackupParams,\n type DeleteConsoleHotBackupParams,\n type DeleteConsoleInternalBackupParams,\n type GetConsoleHotBackupsParams,\n type GetConsoleInternalBackupsParams,\n type RestoreConsoleHotBackupParams,\n type RetryConsoleHotBackupParams,\n} from './services/console/console.hotbackups.service.js'\nexport {\n ConsoleIpWhitelistService,\n type IpWhitelistEntryDto,\n type UpdateConsoleIpWhitelistParams,\n} from './services/console/console.ip-whitelist.service.js'\nexport type {\n SaaSJobsBaseParams,\n SaaSJobsErrorsParams,\n SaaSJobsGlobalParams,\n SaaSJobsOverviewParams,\n SaaSJobsTimeSeriesParams,\n SaaSJobsWorkersParams,\n} from './services/console/console.jobs.saas.service.js'\nexport { SaaSJobsService } from './services/console/console.jobs.saas.service.js'\nexport {\n type GetK8sContextsParams,\n K8sContextService,\n} from './services/console/console.k8scontext.service.js'\nexport type {\n VerifyApiClientCredentialsResponse,\n VerifyClientCredentialsRequest,\n VerifyZeebeClientCredentialsResponse,\n} from './services/console/console.m2m.service.js'\nexport { ConsoleM2MService } from './services/console/console.m2m.service.js'\nexport {\n type ActivateSecureConnectivityParams,\n ConsoleSecureConnectivityService,\n type DeactivateSecureConnectivityParams,\n type GetSecureConnectivityStatusParams,\n type SecureConnectivityStatusDto,\n type UpdateSecureConnectivityParams,\n} from './services/console/console.secure-connectivity.service.js'\nexport {\n type GetStorybookConfigParams,\n StorybookConfigService,\n} from './services/console/console.storybook-config.service.js'\nexport { ConsoleValueMetricsService } from './services/console/console.valuemetrics.service.js'\nexport {\n type CreateGenerationParams,\n type DeleteGenerationParams,\n type DryRunPublishReleaseTrainResponse,\n type DryRunRollbackReleaseTrainResponse,\n GenerationService,\n type GenerationVersionsInput,\n type ListGenerationsParams,\n type ReleaseTrainGenerationRef,\n type SetGenerationArchivedParams,\n type SetGenerationBespokeParams,\n type UpdateGenerationParams,\n} from './services/console/generation.service.js'\nexport type {\n CreateAgentGrantRequest,\n CreateAgentGrantResult,\n} from './services/control/control.agent-grants.service.js'\nexport { ControlAgentGrantsInternalService } from './services/control/control.agent-grants.service.js'\n// control-backend \u2014 the read-only agent tokens of ccmacli\nexport type {\n AgentTokenUuidRequest,\n CreateAgentTokenRequest,\n ExtendAgentTokenRequest,\n ListAllAgentTokensRequest,\n RedeemAgentGrantRequest,\n VerifyAgentClientRequest,\n} from './services/control/control.agent-tokens.service.js'\nexport {\n ControlAgentClientsInternalService,\n ControlAgentTokensService,\n} from './services/control/control.agent-tokens.service.js'\nexport type {\n AddAnnotationNoteRequest,\n AddAnnotationTagRequest,\n AnnotationIdRequest,\n AnnotationPageDto,\n AnnotationPageInfoDto,\n AnnotationTagPageDto,\n AnnotationTargetDto,\n EditAnnotationNoteRequest,\n GetEntityAnnotationsRequest,\n ListAnnotationTagsRequest,\n LookupAnnotationsRequest,\n SearchAnnotationsRequest,\n} from './services/control/control.annotations.service.js'\nexport { ControlAnnotationsService } from './services/control/control.annotations.service.js'\n// control-backend \u2014 the four-eyes approval surface\nexport type {\n ApprovalFacetParams,\n ApprovalIdRequest,\n ApprovalPageDto,\n AutomatedEnterpriseOnboardingPayloadDto,\n ChangeClusterPlanTypePayloadDto,\n ChangeEnterpriseContractPayloadDto,\n ChangeFeatureFlagPayloadDto,\n ChangeGenerationVersionsPayloadDto,\n ChangeGenerationVersionsTargetDto,\n ChangeLicensingModelPayloadDto,\n ChangeOrgLimitsPayloadDto,\n ChangePlanTypeRetentionLimitsPayloadDto,\n ChangePlatformRolesPayloadDto,\n ChangeSalesPlanPayloadDto,\n ChangeUserEmailPayloadDto,\n CountApprovalsRequest,\n CreateApprovalRequest,\n CreateClusterTtlDeletionRequest,\n CreateCustomGenerationPayloadDto,\n CreateCustomHardwareSizingPayloadDto,\n CreateExtendTrialRequest,\n CreatePersonalOrganisationPayloadDto,\n CreatePersonalOrganisationRequest,\n CustomHardwareSizingRequest,\n DeleteApiClientPayloadDto,\n DeleteClusterCorpsesPayloadDto,\n DeleteInternalBackupPayloadDto,\n DeleteManagedLlmTenantPayloadDto,\n DeleteOrganizationPayloadDto,\n DeleteSsoConnectionPayloadDto,\n DeleteUserPayloadDto,\n DisableFeatureFlagPayloadDto,\n EditGenerationPayloadDto,\n EnterpriseContractTermsDto,\n ExtendTrialPayloadDto,\n FeatureFlagValuesDto,\n ForceDeleteClusterPlanTypePayloadDto,\n ForceGenerationUpgradePayloadDto,\n GrantApprovalOverridePayloadDto,\n LinkCustomGenerationPayloadDto,\n LinkCustomHardwareSizingPayloadDto,\n ListApprovalsRequest,\n LlmBudgetTopUpPayloadDto,\n MoveClusterOrgPayloadDto,\n OnboardToEnterpriseClusterDto,\n OnboardToEnterprisePayloadDto,\n OverrideApprovalRequest,\n PurgeUsersPayloadDto,\n RejectApprovalRequest,\n RemoveCustomGenerationPayloadDto,\n RemoveCustomHardwareSizingPayloadDto,\n RemoveOrgMemberPayloadDto,\n RequestInNegotiationPayloadDto,\n SelfServiceApprovalRequest,\n SelfServiceClusterModificationPayloadDto,\n SendToExpiredTrialPayloadDto,\n UpdateUserMetadataPayloadDto,\n WithdrawApprovalRequest,\n} from './services/control/control.approvals.service.js'\nexport { ControlApprovalsService } from './services/control/control.approvals.service.js'\n// control-backend \u2014 the dashboards, whose tiles hold filters and never data\nexport type {\n AddDashboardTileRequest,\n CheckChartQueryRequest,\n CreateDashboardRequest,\n DashboardIdRequest,\n ListDashboardsRequest,\n UpdateDashboardRequest,\n} from './services/control/control.dashboards.service.js'\nexport { ControlDashboardsService } from './services/control/control.dashboards.service.js'\nexport type {\n CreateFeatureFlagRequest,\n EvaluateFeatureFlagsRequest,\n FeatureFlagIdRequest,\n UpdateFeatureFlagRequest,\n} from './services/control/control.feature-flags.service.js'\nexport { ControlFeatureFlagsService } from './services/control/control.feature-flags.service.js'\nexport type {\n ControlInfoDto,\n ControlWhoamiDto,\n} from './services/control/control.platform.service.js'\nexport { ControlPlatformService } from './services/control/control.platform.service.js'\n// external services (CORS-enabled webapp navigation surface)\nexport type {\n GetFeatureFlagsParams,\n UpdateUserThemeParams,\n UserThemePreference,\n} from './services/external/external.accounts.service.js'\nexport { ExternalAccountsService } from './services/external/external.accounts.service.js'\nexport type {\n GetOrgClustersParams,\n SetOrgClusterSleepParams,\n StreamOrgEventsParams,\n} from './services/external/external.console.service.js'\nexport { ExternalConsoleService } from './services/external/external.console.service.js'\nexport type {\n DismissAllNotificationsParams,\n GetUserNotificationsParams,\n MarkManyNotificationsReadParams,\n SetNotificationStateParams,\n StreamUserNotificationsParams,\n TrackNotificationEventParams,\n UserNotificationAnalyticsEvent,\n} from './services/external/external.notifications.service.js'\nexport { ExternalNotificationsService } from './services/external/external.notifications.service.js'\nexport type {\n GithubCommitComparison,\n GithubCompareCommitsRequest,\n GithubContentItem,\n GithubGenerateReleaseNotesRequest,\n GithubGetRawFileRequest,\n GithubListDirectoryContentRequest,\n GithubListMajorMinorReleasesRequest,\n GithubListReleasesRequest,\n GithubRelease,\n} from './services/github/github.service.js'\n// github services\nexport { GithubService } from './services/github/github.service.js'\nexport type {\n GleanSearchRequest,\n GleanSearchResult,\n} from './services/glean/glean.service.js'\n// glean services\nexport { GleanService } from './services/glean/glean.service.js'\nexport type {\n HelpCenterCardResponse,\n HelpCenterConfigResponse,\n HelpCenterGetCardsRequest,\n HelpCenterGetConfigRequest,\n} from './services/helpcenter/helpcenter.service.js'\n// helpcenter services\nexport { HelpCenterService } from './services/helpcenter/helpcenter.service.js'\nexport type {\n HibobEmployee,\n HibobGetAllUsersRequest,\n HibobReportsTo,\n HibobSearchRequest,\n HibobSearchResponse,\n} from './services/hibob/hibob.service.js'\n// hibob services\nexport {\n DEPARTMENT as HIBOB_DEPARTMENT_PATH,\n DIVISION as HIBOB_DIVISION_PATH,\n DIVISION_ID as HIBOB_DIVISION_ID,\n HibobService,\n SUB_DIVISION as HIBOB_SUB_DIVISION_PATH,\n SUB_DIVISION_ID as HIBOB_SUB_DIVISION_ID,\n} from './services/hibob/hibob.service.js'\nexport type {\n HubspotChangeContactPropertiesRequest,\n HubspotSubmission,\n HubspotSubmitRequest,\n HubspotTokenRequest,\n HubspotTokenResponse,\n} from './services/hubspot/hubspot.service.js'\n// hubspot services\nexport { HubspotService } from './services/hubspot/hubspot.service.js'\nexport type {\n IncidentIoGetOpenIncidentsRequest,\n OpenIncident,\n} from './services/incident-io/incident-io.service.js'\n// incident.io services\nexport { IncidentIoService } from './services/incident-io/incident-io.service.js'\n// litellm services\nexport type {\n BlockKeyRequest,\n BlockKeyResponse,\n CreateTeamRequest,\n CreateTeamResponse,\n DeleteKeyRequest,\n DeleteKeyResponse,\n DeleteTeamRequest,\n DeleteTeamResponse,\n GenerateKeyRequest,\n GenerateKeyResponse,\n GetKeyInfoRequest,\n GetKeyInfoResponse,\n RegenerateKeyRequest,\n RegenerateKeyResponse,\n UnblockKeyRequest,\n UnblockKeyResponse,\n UpdateKeyBudgetRequest,\n UpdateKeyBudgetResponse,\n UpdateTeamBudgetRequest,\n UpdateTeamBudgetResponse,\n} from './services/litellm/litellm.service.js'\nexport { LiteLLMService } from './services/litellm/litellm.service.js'\nexport type { LoginPayload } from './services/login/login.service.js'\n// login services\nexport { LoginService } from './services/login/login.service.js'\n// notifications services\nexport type {\n CreateGlobalNotificationParams,\n CreateNotificationBySalesPlanParams,\n DeleteGlobalNotificationParams,\n UpdateNotificationParams,\n} from './services/notifications/notifications.service.js'\nexport { NotificationsService } from './services/notifications/notifications.service.js'\n// openrouter services\nexport type {\n CreateOpenRouterKeyRequest,\n CreateOpenRouterKeyResponse,\n DeleteOpenRouterKeyRequest,\n DeleteOpenRouterKeyResponse,\n GetOpenRouterKeyRequest,\n GetOpenRouterKeyResponse,\n GetOpenRouterWorkspaceRequest,\n GetOpenRouterWorkspaceResponse,\n ListOpenRouterKeysRequest,\n ListOpenRouterKeysResponse,\n OpenRouterKeyData,\n UpdateOpenRouterKeyRequest,\n UpdateOpenRouterKeyResponse,\n} from './services/openrouter/openrouter.service.js'\nexport {\n OPENROUTER_KEY_PAGE_SIZE,\n OpenRouterService,\n} from './services/openrouter/openrouter.service.js'\nexport type {\n IncomingWebhookData,\n IncomingWebhookRequest,\n SlackChatPostMessageParams,\n SlackChatPostMessageResponse,\n SlackConversationsInviteParams,\n SlackConversationsInviteResponse,\n SlackLookupUserByEmailParams,\n SlackLookupUserByEmailResponse,\n} from './services/slack/slack.service.js'\n// slack services\nexport { SlackService } from './services/slack/slack.service.js'\nexport type {\n SendBlockKitMessageParams,\n SendBlockKitMessageResponse,\n SlackBlock,\n} from './services/slack/slack-blockkit.service.js'\nexport { SlackBlockKitService } from './services/slack/slack-blockkit.service.js'\nexport type { TelemetryPostRequest } from './services/telemetry/telemetry.service.js'\n// telemetry services\nexport { TelemetryService } from './services/telemetry/telemetry.service.js'\nexport type {\n ThanosQueryRequest,\n ThanosQueryResponse,\n ThanosQueryResult,\n} from './services/thanos/thanos.service.js'\n// thanos services\nexport {\n ThanosApiEndpoint,\n ThanosService,\n} from './services/thanos/thanos.service.js'\n// token-issuer services\nexport {\n type AgentGrantToken,\n type RedeemAgentGrantTokenRequest,\n TokenIssuerGrantService,\n} from './services/token-issuer/token-issuer.grant.service.js'\nexport type {\n JwksRequest,\n JwksResponse,\n} from './services/token-issuer/token-issuer.jwks.service.js'\nexport { TokenIssuerJwksService } from './services/token-issuer/token-issuer.jwks.service.js'\nexport type {\n WordpressGetCardsRequest,\n WordpressGetHelpCenterConfigRequest,\n} from './services/wordpress/wordpress.service.js'\n// wordpress services\nexport { WordpressService } from './services/wordpress/wordpress.service.js'\n\n// types\nexport type {\n FailedResponseDetails,\n RequestBaseCustomMetrics,\n RequestBaseCustomMetricsDetailsType,\n RequestBaseMethodType,\n RequestBaseParams,\n RequestBaseParamsAuth,\n RequestBaseParamsConfig,\n RequestBaseParamsEnvOverride,\n RequestBaseParamsLogger,\n RequestBaseServiceContext,\n Stage,\n} from './types/general.types.js'\nexport type { RequestPayload, Response } from './utils/api.js'\n// utils\nexport {\n accountsNgHeaders,\n request,\n setAccountsNgBackend,\n} from './utils/api.js'\nexport { CustomMetricsCCMA } from './utils/ccma-metrics.js'\nexport type { ServiceAudience, ServiceName } from './utils/environments.js'\nexport { HttpError } from './utils/errors.js'\nexport type {\n SseConnection,\n SseConnectionOptions,\n SseConnectionState,\n SseMessage,\n} from './utils/sse.js'\nexport { connectSse } from './utils/sse.js'\n\nexport {\n correlationHeaders,\n generateTraceparent,\n getSessionId,\n sessionHeaders,\n setTraceparentProvider,\n traceparentHeaders,\n} from './utils/traceparent.js'\n"],
5
+ "mappings": "AAWA,SAAS,iCAAiC;AAM1C,SAAS,yBAAyB;AA6ClC,SAAS,mCAAmC;AAC5C,SAAS,0BAA0B;AAMnC,SAAS,wBAAwB;AA6BjC,SAAS,wBAAwB;AAcjC,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAalC,SAAS,kCAAkC;AAC3C,SAAS,2BAA2B;AAkBpC,SAAS,kBAAkB;AAC3B;AAAA,EAEE;AAAA,OAEK;AAEP,SAAS,2BAA2B;AAKpC,SAAS,0BAA0B;AAanC,SAAS,kCAAkC;AA0C3C,SAAS,mBAAmB;AAO5B,SAAS,qBAAqB;AAW9B,SAAS,2BAA2B;AAQpC,SAAS,+BAA+B;AAKxC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AASP,SAAS,wBAAwB;AACjC,SAAS,4BAA4B;AAErC,SAAS,oBAAoB;AAE7B,SAAS,8BAA8B;AAKvC,SAAS,0BAA0B;AAMnC,SAAS,8BAA8B;AAMvC,SAAS,0BAA0B;AAenC,SAAS,oBAAoB;AAQ7B,SAAS,qBAAqB;AAM9B,SAAS,6BAA6B;AActC,SAAS,yBAAyB;AASlC,SAAS,0BAA0B;AAKnC,SAAS,gCAAgC;AAGzC,SAAS,oBAAoB;AAE7B;AAAA,EACE;AAAA,OAKK;AAGP,SAAS,yBAAyB;AA8BlC,SAAS,2BAA2B;AACpC;AAAA,EAGE;AAAA,OAKK;AACP;AAAA,EAEE;AAAA,OAMK;AA0CP,SAAS,kCAAkC;AAC3C;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EAIE;AAAA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E;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,yBAAyB;AAElC,SAAS,iBAAiB;AAO1B,SAAS,kBAAkB;AAE3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { ApprovalM2mActor, ApprovalSummaryNamesRequest, ApprovalSummaryNamesResult, BackupDto, ChangeClusterPlanTypeResult, ChangeGenerationVersionsResult, ChangePlanTypeRetentionLimitsResult, ClusterBulkStepRequestDto, ClusterBulkStepResultDto, ClusterCorpseKind, ClusterCorpsesDto, ClusterLimits, ClusterModificationConfigDto, ClusterPlanModificationConfig, ClusterPlanTypeClustersDto, ClusterPlanTypeLimitsDto, ClusterPlanTypeStateDto, ClusterTtlDeletionResult, DeleteClusterCorpseResult, EditGenerationResult, ForceDeleteClusterPlanTypeStepResult, GenerationEnvVarsDto, GenerationImageVersionsDto, MoveClusterOwnerResult, ReleaseTrainPreview, ReleaseTrainPublishPayload, ReleaseTrainRollbackPayload } from '@camunda/ccma-shared-types';
1
+ import type { ApprovalM2mActor, ApprovalSummaryNamesRequest, ApprovalSummaryNamesResult, BackupDto, ChangeClusterPlanTypeResult, ChangeGenerationVersionsResult, ChangePlanTypeRetentionLimitsResult, ClusterBulkStepRequestDto, ClusterBulkStepResultDto, ClusterCorpseKind, ClusterCorpsesDto, ClusterGenerationStateDto, ClusterLimits, ClusterModificationConfigDto, ClusterPlanModificationConfig, ClusterPlanTypeClustersDto, ClusterPlanTypeLimitsDto, ClusterPlanTypeStateDto, ClusterTtlDeletionResult, DeleteClusterCorpseResult, EditGenerationResult, ForceDeleteClusterPlanTypeStepResult, ForceGenerationUpgradeResult, GenerationEnvVarsDto, GenerationImageVersionsDto, MoveClusterOwnerResult, ReleaseTrainPreview, ReleaseTrainPublishPayload, ReleaseTrainRollbackPayload } from '@camunda/ccma-shared-types';
2
2
  import type { RequestBaseParams, RequestBaseParamsConfig } from '../../types/general.types.js';
3
3
  import type { GenerationService } from './generation.service.js';
4
4
  /**
@@ -112,6 +112,11 @@ export interface ChangePlanTypeRetentionLimitsThroughApprovalRequest extends Req
112
112
  expectedLimits: ClusterLimits;
113
113
  };
114
114
  }
115
+ export interface ReadClusterGenerationStateRequest extends RequestBaseParams {
116
+ params: {
117
+ clusterId: string;
118
+ };
119
+ }
115
120
  export interface ReadClusterPlanTypeStateRequest extends RequestBaseParams {
116
121
  params: {
117
122
  clusterId: string;
@@ -190,6 +195,24 @@ export interface DeleteInternalBackupThroughApprovalRequest extends RequestBaseP
190
195
  actor: ApprovalM2mActor;
191
196
  };
192
197
  }
198
+ export interface ForceGenerationUpgradeThroughApprovalRequest extends RequestBaseParams {
199
+ params: {
200
+ clusterId: string;
201
+ };
202
+ body: {
203
+ actor: ApprovalM2mActor;
204
+ toGenerationUuid: string;
205
+ /**
206
+ * The generation of the cluster when the request was opened. Console
207
+ * answers 412 when the cluster runs another one now.
208
+ */
209
+ expectedGenerationUuid: string;
210
+ /** Ignore the upgrade graph. */
211
+ yolo: boolean;
212
+ /** Ignore the upgrade gate. */
213
+ ignoreUpgradeGate: boolean;
214
+ };
215
+ }
193
216
  export interface DeleteApiClientThroughApprovalRequest extends RequestBaseParams {
194
217
  /** `clientUuid` is the `uuid` of the client, not its OAuth `clientId`. */
195
218
  params: {
@@ -341,6 +364,13 @@ export interface DeactivateSelfServiceModificationRequest extends RequestBasePar
341
364
  }
342
365
  export declare class ConsoleApprovalsM2MService {
343
366
  static moveClusterOwner(params: MoveClusterOwnerThroughApprovalRequest): Promise<MoveClusterOwnerResult>;
367
+ /**
368
+ * The organization and the generation of one cluster, for the check of a
369
+ * forced generation upgrade before the request opens. The route reads the
370
+ * approvals grant, so control-backend needs no read grant of the admin
371
+ * routes. See `ClusterGenerationStateDto`.
372
+ */
373
+ static readClusterGenerationState(params: ReadClusterGenerationStateRequest): Promise<ClusterGenerationStateDto>;
344
374
  /**
345
375
  * The cluster as a plan type change reads it: the fields of the stale
346
376
  * guard of `changeClusterPlanType`, for a comparison before a request
@@ -395,6 +425,14 @@ export declare class ConsoleApprovalsM2MService {
395
425
  * operation of console-backend posts the same message after its run.
396
426
  */
397
427
  static announceClusterBulkPlanUpdate(params: AnnounceClusterBulkPlanUpdateRequest): Promise<void>;
428
+ /**
429
+ * Upgrades the generation of one cluster with `yolo`, past the upgrade
430
+ * gate, or both. Console answers 412 when the cluster left the expected
431
+ * generation, 409 when the upgrade gate blocks the upgrade, and 503 while
432
+ * generation updates are blocked, while a lock of the cluster stays taken,
433
+ * or while Redis does not answer.
434
+ */
435
+ static forceGenerationUpgrade(params: ForceGenerationUpgradeThroughApprovalRequest): Promise<ForceGenerationUpgradeResult>;
398
436
  /** Deletes an internal (incident) backup of a cluster. It cannot be undone. */
399
437
  static deleteInternalBackup(params: DeleteInternalBackupThroughApprovalRequest): Promise<BackupDto>;
400
438
  /**
@@ -30,6 +30,40 @@ class ConsoleApprovalsM2MService {
30
30
  }
31
31
  return response.body;
32
32
  }
33
+ /**
34
+ * The organization and the generation of one cluster, for the check of a
35
+ * forced generation upgrade before the request opens. The route reads the
36
+ * approvals grant, so control-backend needs no read grant of the admin
37
+ * routes. See `ClusterGenerationStateDto`.
38
+ */
39
+ static async readClusterGenerationState(params) {
40
+ const serviceContext = {
41
+ method: {
42
+ name: "ConsoleApprovalsM2MService.readClusterGenerationState",
43
+ url: `api/admin/approvals/clusters/${params.params.clusterId}/generation-state`,
44
+ normalizedUrl: "api/admin/approvals/clusters/:clusterId/generation-state",
45
+ type: "get"
46
+ },
47
+ source: params.config.metrics?.source || "unset",
48
+ target: { name: "console", type: "internal" }
49
+ };
50
+ const response = await request({
51
+ config: params.config,
52
+ base: { id: "console" },
53
+ url: serviceContext.method.url,
54
+ method: serviceContext.method.type,
55
+ metricsDetails: serviceContext,
56
+ responseType: "json"
57
+ });
58
+ if (!response.ok || !response.body) {
59
+ throw new HttpError(
60
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
61
+ response.status,
62
+ response.statusText
63
+ );
64
+ }
65
+ return response.body;
66
+ }
33
67
  /**
34
68
  * The cluster as a plan type change reads it: the fields of the stale
35
69
  * guard of `changeClusterPlanType`, for a comparison before a request
@@ -255,6 +289,43 @@ class ConsoleApprovalsM2MService {
255
289
  );
256
290
  }
257
291
  }
292
+ /**
293
+ * Upgrades the generation of one cluster with `yolo`, past the upgrade
294
+ * gate, or both. Console answers 412 when the cluster left the expected
295
+ * generation, 409 when the upgrade gate blocks the upgrade, and 503 while
296
+ * generation updates are blocked, while a lock of the cluster stays taken,
297
+ * or while Redis does not answer.
298
+ */
299
+ static async forceGenerationUpgrade(params) {
300
+ const { clusterId } = params.params;
301
+ const serviceContext = {
302
+ method: {
303
+ name: "ConsoleApprovalsM2MService.forceGenerationUpgrade",
304
+ url: `api/admin/approvals/clusters/${clusterId}/generation`,
305
+ normalizedUrl: "api/admin/approvals/clusters/:clusterId/generation",
306
+ type: "put"
307
+ },
308
+ source: params.config.metrics?.source || "unset",
309
+ target: { name: "console", type: "internal" }
310
+ };
311
+ const response = await request({
312
+ config: params.config,
313
+ base: { id: "console" },
314
+ url: serviceContext.method.url,
315
+ method: serviceContext.method.type,
316
+ metricsDetails: serviceContext,
317
+ responseType: "json",
318
+ body: params.body
319
+ });
320
+ if (!response.ok) {
321
+ throw new HttpError(
322
+ `${serviceContext.method.name}: ${response.status} ${response.statusText}`,
323
+ response.status,
324
+ response.statusText
325
+ );
326
+ }
327
+ return response.body;
328
+ }
258
329
  /** Deletes an internal (incident) backup of a cluster. It cannot be undone. */
259
330
  static async deleteInternalBackup(params) {
260
331
  const { clusterId, backupName } = params.params;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/services/console/console.approvals.m2m.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 ApprovalM2mActor,\n ApprovalSummaryNamesRequest,\n ApprovalSummaryNamesResult,\n BackupDto,\n ChangeClusterPlanTypeResult,\n ChangeGenerationVersionsResult,\n ChangePlanTypeRetentionLimitsResult,\n ClusterBulkStepRequestDto,\n ClusterBulkStepResultDto,\n ClusterCorpseKind,\n ClusterCorpsesDto,\n ClusterLimits,\n ClusterModificationConfigDto,\n ClusterPlanModificationConfig,\n ClusterPlanTypeClustersDto,\n ClusterPlanTypeLimitsDto,\n ClusterPlanTypeStateDto,\n ClusterTtlDeletionResult,\n DeleteClusterCorpseResult,\n EditGenerationResult,\n ForceDeleteClusterPlanTypeStepResult,\n GenerationEnvVarsDto,\n GenerationImageVersionsDto,\n MoveClusterOwnerResult,\n ReleaseTrainPreview,\n ReleaseTrainPublishPayload,\n ReleaseTrainRollbackPayload,\n} from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseParams,\n RequestBaseParamsConfig,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\nimport type { GenerationService } from './generation.service.js'\n\n/**\n * The route of `api/admin/approvals` in console-backend.\n *\n * The twin of `AccountsApprovalsM2MService`. Read the note there.\n */\n\nexport interface MoveClusterOwnerThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: {\n actor: ApprovalM2mActor\n ownerId: string\n }\n}\n\nexport interface ChangeClusterPlanTypeThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: {\n actor: ApprovalM2mActor\n /** The organization that owns the cluster. Console refuses another one. */\n orgId: string\n toPlanTypeUuid: string\n numberOfAllocatedHwPackages: number\n /**\n * The plan type that the person who asked READ. Console compares it with\n * the plan type of the cluster when the action runs, and changes nothing\n * when the two differ.\n */\n expectedPlanTypeUuid: string\n /** The packages the person READ, 1 for a cluster that holds none. */\n expectedNumberOfAllocatedHwPackages: number\n /** The plan the cluster ran when the person read it. */\n expectedClusterPlanUuid: string\n /** The active modification config the person read, absent for none. */\n expectedActiveModificationConfigUuid?: string\n /** The active plan of the new plan type the person read. */\n expectedTargetPlanUuid: string\n /** Whether the cluster plan moves to that plan, as the person read it. */\n expectedClusterPlanUpdate: boolean\n /**\n * Whether the active modification config stays on the cluster. Absent\n * reads as false: the change removes it.\n */\n keepModification?: boolean\n }\n}\n\nexport interface ReadClusterCorpsesRequest extends RequestBaseParams {\n params: { kind: ClusterCorpseKind }\n}\n\nexport interface DeleteClusterCorpseThroughApprovalRequest\n extends RequestBaseParams {\n params: { kind: ClusterCorpseKind; clusterId: string }\n body: {\n actor: ApprovalM2mActor\n /** The context of a `k8s` corpse, where console deletes the resource. */\n k8sContextUuid?: string\n /** The uid of the resource of a `k8s` corpse. See `ClusterCorpseDto.resourceUid`. */\n resourceUid?: string\n }\n}\n\nexport interface ReadClusterPlanTypeClustersRequest extends RequestBaseParams {\n params: { planTypeId: string }\n}\n\nexport interface DeleteClusterOfPlanTypeThroughApprovalRequest\n extends RequestBaseParams {\n params: { planTypeId: string; clusterId: string }\n body: { actor: ApprovalM2mActor }\n}\n\nexport interface DeleteClusterPlanTypeThroughApprovalRequest\n extends RequestBaseParams {\n params: { planTypeId: string }\n body: { actor: ApprovalM2mActor }\n}\n\nexport interface ReadClusterPlanTypeLimitsRequest extends RequestBaseParams {\n params: { planTypeId: string }\n}\n\nexport interface ChangePlanTypeRetentionLimitsThroughApprovalRequest\n extends RequestBaseParams {\n params: { planTypeId: string }\n body: {\n actor: ApprovalM2mActor\n /**\n * The new retention limits. They replace the limits of the plan type as\n * a whole, so a key that is absent goes back to its default.\n */\n limits: ClusterLimits\n /**\n * The limits that the person who asked READ. Console compares them with\n * the plan type when the action runs. When the plan type holds neither\n * these limits nor `limits`, console changes nothing and answers 409.\n */\n expectedLimits: ClusterLimits\n }\n}\n\nexport interface ReadClusterPlanTypeStateRequest extends RequestBaseParams {\n params: { clusterId: string }\n query: {\n /** The organization that owns the cluster. Console refuses another one. */\n orgId: string\n /** The plan type of the question: its active plan is in the answer. */\n toPlanTypeUuid: string\n }\n}\n\nexport interface ChangeGenerationVersionsThroughApprovalRequest\n extends RequestBaseParams {\n params: { generationId: string }\n body: {\n actor: ApprovalM2mActor\n /**\n * The image versions to write. A key that is absent keeps its value.\n * An empty string clears an optional one. The env var fields are not\n * accepted: see `GENERATION_IMAGE_VERSION_KEYS`.\n */\n versions: GenerationImageVersionsDto\n /**\n * The values that the person who asked READ, one for each key of\n * `versions`. Console compares them with the generation when the action\n * runs, and changes nothing when one differs.\n */\n expectedVersions: GenerationImageVersionsDto\n }\n}\n\nexport interface EditGenerationThroughApprovalRequest\n extends RequestBaseParams {\n params: { generationId: string }\n body: {\n actor: ApprovalM2mActor\n /** The new name. Absent keeps the name. */\n name?: string\n /** The name that the person who asked READ. Necessary with `name`. */\n expectedName?: string\n /**\n * The env var text to write, by key. A key that is absent keeps its\n * value. An empty string clears the field.\n */\n envVars: GenerationEnvVarsDto\n /**\n * The text that the person who asked READ, one for each key of\n * `envVars`. Console compares it with the generation when the action\n * runs, and changes nothing when one differs.\n */\n expectedEnvVars: GenerationEnvVarsDto\n }\n}\n\nexport interface RunClusterBulkStepThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: ClusterBulkStepRequestDto & { actor: ApprovalM2mActor }\n}\n\nexport interface AnnounceClusterBulkPlanUpdateRequest\n extends RequestBaseParams {\n body: {\n actor: ApprovalM2mActor\n toPlanUuid: string\n doneCount: number\n }\n}\n\nexport interface DeleteInternalBackupThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string; backupName: string }\n body: { actor: ApprovalM2mActor }\n}\n\nexport interface DeleteApiClientThroughApprovalRequest\n extends RequestBaseParams {\n /** `clientUuid` is the `uuid` of the client, not its OAuth `clientId`. */\n params: { orgId: string; clientUuid: string }\n body: { actor: ApprovalM2mActor }\n}\n\nexport interface ReadApiClientThroughApprovalRequest extends RequestBaseParams {\n /** `clientUuid` is the `uuid` of the client, not its OAuth `clientId`. */\n params: { orgId: string; clientUuid: string }\n}\n\n/** The names of a Console API client, as console holds them. */\nexport interface ApprovalApiClientDto {\n uuid: string\n name: string\n /** The OAuth client id, which the customer knows. */\n clientId: string\n}\n\nexport interface DeleteClusterPastTtlThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: {\n actor: ApprovalM2mActor\n /** The owner that the request names. Console keeps a cluster with another. */\n orgId: string\n }\n}\n\nexport interface CreateCustomClusterPlanThroughApprovalRequest\n extends RequestBaseParams {\n body: {\n actor: ApprovalM2mActor\n clusterPlanId: string\n name: string\n plan: Record<string, unknown>\n }\n}\n\nexport interface CheckCustomClusterPlanRemovalRequest\n extends RequestBaseParams {\n params: { clusterPlanId: string }\n body: { actor: ApprovalM2mActor; forDelete: boolean }\n}\n\nexport interface DeleteCustomClusterPlanThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterPlanId: string }\n body: { actor: ApprovalM2mActor }\n}\n\n/** The publish and rollback requests carry no `preview`. Console reads it. */\nexport type ReleaseTrainPublishRequest = Omit<\n ReleaseTrainPublishPayload,\n 'preview'\n>\nexport type ReleaseTrainRollbackRequest = Omit<\n ReleaseTrainRollbackPayload,\n 'preview'\n>\n\n/** The answer of `GenerationService.publishReleaseTrain`. */\nexport type PublishReleaseTrainThroughApprovalResult = NonNullable<\n Awaited<ReturnType<typeof GenerationService.publishReleaseTrain>>\n>\n\n/** The answer of `GenerationService.rollbackReleaseTrain`. */\nexport type RollbackReleaseTrainThroughApprovalResult = NonNullable<\n Awaited<ReturnType<typeof GenerationService.rollbackReleaseTrain>>\n>\n\nexport interface PreviewReleaseTrainPublishRequest extends RequestBaseParams {\n body: { request: ReleaseTrainPublishRequest }\n}\n\nexport interface PublishReleaseTrainThroughApprovalRequest\n extends RequestBaseParams {\n body: { actor: ApprovalM2mActor; request: ReleaseTrainPublishRequest }\n}\n\nexport interface PreviewReleaseTrainRollbackRequest extends RequestBaseParams {\n body: { request: ReleaseTrainRollbackRequest }\n}\n\nexport interface RollbackReleaseTrainThroughApprovalRequest\n extends RequestBaseParams {\n body: { actor: ApprovalM2mActor; request: ReleaseTrainRollbackRequest }\n}\n\n/** What console answers for a custom cluster plan call. */\nexport interface CustomClusterPlanThroughApprovalResult {\n clusterPlanId: string\n}\n\nexport interface CreateCustomGenerationThroughApprovalRequest\n extends RequestBaseParams {\n body: {\n actor: ApprovalM2mActor\n generationId: string\n name: string\n versions: Record<string, string>\n upgradeableFrom?: string[]\n }\n}\n\nexport interface CheckCustomGenerationRemovalRequest extends RequestBaseParams {\n params: { generationId: string }\n body: { actor: ApprovalM2mActor; forDelete: boolean }\n}\n\nexport interface DeleteCustomGenerationThroughApprovalRequest\n extends RequestBaseParams {\n params: { generationId: string }\n body: { actor: ApprovalM2mActor }\n}\n\n/** What console answers for a custom generation call. */\nexport interface CustomGenerationThroughApprovalResult {\n generationId: string\n}\n\nexport interface ApplySelfServiceModificationRequest extends RequestBaseParams {\n params: { clusterUuid: string }\n body: {\n actor: ApprovalM2mActor\n /** The organization that owns the cluster. Console refuses another one. */\n orgId: string\n description: string\n planModifications: ClusterPlanModificationConfig[]\n /**\n * An ISO date, today to 30 days ahead. With no date, the config does not\n * expire.\n */\n expiresAt?: string\n }\n}\n\nexport interface DeactivateSelfServiceModificationRequest\n extends RequestBaseParams {\n params: { clusterUuid: string }\n body: {\n actor: ApprovalM2mActor\n orgId: string\n configId: string\n }\n}\n\nexport class ConsoleApprovalsM2MService {\n public static async moveClusterOwner(\n params: MoveClusterOwnerThroughApprovalRequest,\n ): Promise<MoveClusterOwnerResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.moveClusterOwner',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/owner`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/owner',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<MoveClusterOwnerResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\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 // This route is new, so there is no older backend that answers 204 with no\n // body for the same-owner case. `ConsoleClusterService.moveClusterOwner`\n // carries that case, and this one does not need it.\n return response.body!\n }\n\n /**\n * The cluster as a plan type change reads it: the fields of the stale\n * guard of `changeClusterPlanType`, for a comparison before a request\n * opens. See `ClusterPlanTypeStateDto`.\n */\n public static async readClusterPlanTypeState(\n params: ReadClusterPlanTypeStateRequest,\n ): Promise<ClusterPlanTypeStateDto> {\n const query = new URLSearchParams({\n orgId: params.query.orgId,\n toPlanTypeUuid: params.query.toPlanTypeUuid,\n })\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readClusterPlanTypeState',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/plan-type-state?${query.toString()}`,\n normalizedUrl:\n 'api/admin/approvals/clusters/:clusterId/plan-type-state',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterPlanTypeStateDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * Changes the mutable versions of one generation, and restarts its clusters.\n *\n * Console answers 409 when a value that the request expected is not the\n * value of the generation any more.\n */\n public static async changeGenerationVersions(\n params: ChangeGenerationVersionsThroughApprovalRequest,\n ): Promise<ChangeGenerationVersionsResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.changeGenerationVersions',\n url: `api/admin/approvals/generations/${params.params.generationId}/versions`,\n normalizedUrl: 'api/admin/approvals/generations/:generationId/versions',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ChangeGenerationVersionsResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n\n if (!response.ok || !response.body) {\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 * Changes the name and the env vars of one generation, and sends the new\n * spec to its clusters.\n *\n * Console answers 409 when a value that the request expected is not the\n * value of the generation any more, and is not the requested value either.\n * When the generation already holds the requested value, console writes\n * nothing, sends the spec again and answers `reapplied: true`. The body\n * holds env var text, so no log line of this call carries a value of the\n * body.\n */\n public static async editGeneration(\n params: EditGenerationThroughApprovalRequest,\n ): Promise<EditGenerationResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.editGeneration',\n url: `api/admin/approvals/generations/${params.params.generationId}/edit`,\n normalizedUrl: 'api/admin/approvals/generations/:generationId/edit',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<EditGenerationResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n redactBody: true,\n body: params.body,\n })\n\n if (!response.ok || !response.body) {\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 * Changes the plan type and the hardware packages of one cluster.\n *\n * Console checks the reservations of the organization, and it moves the\n * cluster plan to the active plan of the new type when that plan is\n * migratable from the plan of the cluster. It answers 409 when one of the\n * `expected\u2026` fields of the body differs at the run: the plan type, the\n * hardware packages, the cluster plan or the active modification config\n * of the cluster, or the active plan of the new type. A cluster that runs\n * no plan and a type that has no active plan meet that guard too, because\n * both fields of the body are required. It answers 400 when the request\n * changes nothing, when the new type is retired, when its active plan is\n * neither the plan of the cluster nor migratable from it, or when the\n * organization has no free reservation.\n */\n public static async changeClusterPlanType(\n params: ChangeClusterPlanTypeThroughApprovalRequest,\n ): Promise<ChangeClusterPlanTypeResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.changeClusterPlanType',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/plan-type`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/plan-type',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ChangeClusterPlanTypeResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n\n if (!response.ok || !response.body) {\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 * Runs one step of a cluster bulk operation on one cluster.\n *\n * Every outcome of the STEP answers 200, including a cluster that refused.\n * A thrown `HttpError` says that the CALL failed, and the caller then\n * leaves the cluster to run again.\n */\n public static async runClusterBulkStep(\n params: RunClusterBulkStepThroughApprovalRequest,\n ): Promise<ClusterBulkStepResultDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.runClusterBulkStep',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/bulk-step`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/bulk-step',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterBulkStepResultDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n\n if (!response.ok || !response.body) {\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 * Posts the Slack message that ends an approved bulk plan update. The bulk\n * operation of console-backend posts the same message after its run.\n */\n public static async announceClusterBulkPlanUpdate(\n params: AnnounceClusterBulkPlanUpdateRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.announceClusterBulkPlanUpdate',\n url: 'api/admin/approvals/cluster-bulk/plan-update-announcement',\n normalizedUrl:\n 'api/admin/approvals/cluster-bulk/plan-update-announcement',\n type: 'post',\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 url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: params.body,\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 /** Deletes an internal (incident) backup of a cluster. It cannot be undone. */\n public static async deleteInternalBackup(\n params: DeleteInternalBackupThroughApprovalRequest,\n ): Promise<BackupDto> {\n const { clusterId, backupName } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.deleteInternalBackup',\n url: `api/admin/approvals/clusters/${clusterId}/internal-backups/${encodeURIComponent(backupName)}`,\n normalizedUrl:\n 'api/admin/approvals/clusters/:clusterId/internal-backups/:backupName',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<BackupDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\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 * Deletes a Console API client of an organization. Console answers 404 for\n * a client that is gone, and 403 for a client of another organization.\n */\n public static async deleteApiClient(\n params: DeleteApiClientThroughApprovalRequest,\n ): Promise<void> {\n const { orgId, clientUuid } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.deleteApiClient',\n url: `api/admin/approvals/orgs/${orgId}/api-clients/${clientUuid}`,\n normalizedUrl:\n 'api/admin/approvals/orgs/:orgId/api-clients/:clientUuid',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: params.body,\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 * Deletes a cluster whose TTL ran out. Console tests the TTL and the owner\n * again first, and answers `kept` when the cluster stays.\n */\n public static async deleteClusterPastTtl(\n params: DeleteClusterPastTtlThroughApprovalRequest,\n ): Promise<ClusterTtlDeletionResult> {\n const { clusterId } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.deleteClusterPastTtl',\n url: `api/admin/approvals/clusters/${clusterId}/ttl-expiry`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/ttl-expiry',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterTtlDeletionResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\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 /** Creates a cluster plan for a Camundi, with the uuid that the caller gives. */\n public static async createCustomClusterPlan(\n params: CreateCustomClusterPlanThroughApprovalRequest,\n ): Promise<CustomClusterPlanThroughApprovalResult> {\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomClusterPlanThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.createCustomClusterPlan',\n url: 'api/admin/approvals/cluster-plans',\n normalizedUrl: 'api/admin/approvals/cluster-plans',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /**\n * Asks whether a Camundi may remove a plan. Console answers 403 for a plan\n * of another person, and 409 for a plan that a cluster uses.\n */\n public static async checkCustomClusterPlanRemoval(\n params: CheckCustomClusterPlanRemovalRequest,\n ): Promise<CustomClusterPlanThroughApprovalResult> {\n const { clusterPlanId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomClusterPlanThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.checkCustomClusterPlanRemoval',\n url: `api/admin/approvals/cluster-plans/${clusterPlanId}/removal-check`,\n normalizedUrl:\n 'api/admin/approvals/cluster-plans/:clusterPlanId/removal-check',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /** Deletes a cluster plan that the Camundi created. It cannot be undone. */\n public static async deleteCustomClusterPlan(\n params: DeleteCustomClusterPlanThroughApprovalRequest,\n ): Promise<CustomClusterPlanThroughApprovalResult> {\n const { clusterPlanId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomClusterPlanThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deleteCustomClusterPlan',\n url: `api/admin/approvals/cluster-plans/${clusterPlanId}`,\n normalizedUrl: 'api/admin/approvals/cluster-plans/:clusterPlanId',\n type: 'delete',\n body: params.body,\n },\n )\n }\n\n /** Creates a bespoke generation for a Camundi, with the uuid that the caller gives. */\n public static async createCustomGeneration(\n params: CreateCustomGenerationThroughApprovalRequest,\n ): Promise<CustomGenerationThroughApprovalResult> {\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomGenerationThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.createCustomGeneration',\n url: 'api/admin/approvals/generations',\n normalizedUrl: 'api/admin/approvals/generations',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /**\n * Asks whether a Camundi may remove a generation. Console answers 404 for a\n * generation of another person, or a generation that is not bespoke, and 409\n * for a delete that it refuses. A bespoke generation that the Camundi\n * created in the admin tool counts as theirs.\n */\n public static async checkCustomGenerationRemoval(\n params: CheckCustomGenerationRemovalRequest,\n ): Promise<CustomGenerationThroughApprovalResult> {\n const { generationId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomGenerationThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.checkCustomGenerationRemoval',\n url: `api/admin/approvals/generations/${generationId}/removal-check`,\n normalizedUrl:\n 'api/admin/approvals/generations/:generationId/removal-check',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /** Deletes a custom generation that the Camundi created. It cannot be undone. */\n public static async deleteCustomGeneration(\n params: DeleteCustomGenerationThroughApprovalRequest,\n ): Promise<CustomGenerationThroughApprovalResult> {\n const { generationId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomGenerationThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deleteCustomGeneration',\n url: `api/admin/approvals/generations/${generationId}`,\n normalizedUrl: 'api/admin/approvals/generations/:generationId',\n type: 'delete',\n body: params.body,\n },\n )\n }\n\n /**\n * Reads the names that console holds for clusters and generations, and the\n * number of clusters that run each generation. It changes nothing.\n *\n * It is a POST because a bulk operation names up to 3000 clusters.\n */\n public static async readSummaryNames(params: {\n config: RequestBaseParamsConfig\n body: ApprovalSummaryNamesRequest\n }): Promise<ApprovalSummaryNamesResult> {\n return ConsoleApprovalsM2MService.callApprovalRoute<ApprovalSummaryNamesResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.readSummaryNames',\n url: 'api/admin/approvals/summary-names',\n normalizedUrl: 'api/admin/approvals/summary-names',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /**\n * The names of a Console API client of an organization, for a\n * delete-api-client request when it opens. Console answers 404 for a client\n * that is not in the organization, and 403 when the caller lacks the\n * permission.\n */\n public static async readApiClient(\n params: ReadApiClientThroughApprovalRequest,\n ): Promise<ApprovalApiClientDto> {\n const { orgId, clientUuid } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readApiClient',\n url: `api/admin/approvals/orgs/${orgId}/api-clients/${clientUuid}`,\n normalizedUrl:\n 'api/admin/approvals/orgs/:orgId/api-clients/:clientUuid',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ApprovalApiClientDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * The corpses of one kind now, for the request that deletes them. Console\n * reads them from its watch of Kubernetes and from its rows, as the\n * \"Corpses\" tab does.\n */\n public static async readClusterCorpses(\n params: ReadClusterCorpsesRequest,\n ): Promise<ClusterCorpsesDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readClusterCorpses',\n url: `api/admin/approvals/cluster-corpses/${params.params.kind}`,\n normalizedUrl: 'api/admin/approvals/cluster-corpses/:kind',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterCorpsesDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * Deletes one corpse of a request. It cannot be undone.\n *\n * Console reads the live source again first, and deletes nothing when the\n * cluster is not a corpse any more (`not-a-corpse`) or when there is nothing\n * to delete (`gone`). It throws when it cannot read the live source.\n */\n public static async deleteClusterCorpse(\n params: DeleteClusterCorpseThroughApprovalRequest,\n ): Promise<DeleteClusterCorpseResult> {\n const { kind, clusterId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<DeleteClusterCorpseResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deleteClusterCorpse',\n url: `api/admin/approvals/cluster-corpses/${kind}/${clusterId}`,\n normalizedUrl: 'api/admin/approvals/cluster-corpses/:kind/:clusterId',\n type: 'delete',\n body: params.body,\n },\n )\n }\n\n /**\n * The clusters of a plan type now, for the request that force deletes it.\n * Console answers 404 when the plan type does not exist.\n */\n public static async readClusterPlanTypeClusters(\n params: ReadClusterPlanTypeClustersRequest,\n ): Promise<ClusterPlanTypeClustersDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readClusterPlanTypeClusters',\n url: `api/admin/approvals/cluster-plan-types/${params.params.planTypeId}/clusters`,\n normalizedUrl:\n 'api/admin/approvals/cluster-plan-types/:planTypeId/clusters',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterPlanTypeClustersDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * The retention limits of a plan type now, and the number of its clusters.\n * Console answers 404 when the plan type does not exist.\n */\n public static async readClusterPlanTypeLimits(\n params: ReadClusterPlanTypeLimitsRequest,\n ): Promise<ClusterPlanTypeLimitsDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readClusterPlanTypeLimits',\n url: `api/admin/approvals/cluster-plan-types/${params.params.planTypeId}/limits`,\n normalizedUrl:\n 'api/admin/approvals/cluster-plan-types/:planTypeId/limits',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterPlanTypeLimitsDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * Changes the retention limits of a plan type, and sends the new spec to\n * every cluster of the type.\n *\n * Console answers 409 when the limits of the plan type are not the\n * expected limits and not the new limits, and 404 when the plan type does\n * not exist.\n */\n public static async changePlanTypeRetentionLimits(\n params: ChangePlanTypeRetentionLimitsThroughApprovalRequest,\n ): Promise<ChangePlanTypeRetentionLimitsResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.changePlanTypeRetentionLimits',\n url: `api/admin/approvals/cluster-plan-types/${params.params.planTypeId}/limits`,\n normalizedUrl:\n 'api/admin/approvals/cluster-plan-types/:planTypeId/limits',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ChangePlanTypeRetentionLimitsResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n\n if (!response.ok || !response.body) {\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 * Deletes one cluster of a plan type, for a force delete request. It cannot\n * be undone. Console answers `gone` for a cluster that does not exist or\n * that is on another plan type now, and deletes nothing then.\n */\n public static async deleteClusterOfPlanType(\n params: DeleteClusterOfPlanTypeThroughApprovalRequest,\n ): Promise<ForceDeleteClusterPlanTypeStepResult> {\n const { planTypeId, clusterId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<ForceDeleteClusterPlanTypeStepResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deleteClusterOfPlanType',\n url: `api/admin/approvals/cluster-plan-types/${planTypeId}/clusters/${clusterId}`,\n normalizedUrl:\n 'api/admin/approvals/cluster-plan-types/:planTypeId/clusters/:clusterId',\n type: 'delete',\n body: params.body,\n },\n )\n }\n\n /**\n * Deletes a plan type that no cluster uses, for a force delete request. It\n * cannot be undone. Console answers 409 while a cluster still uses the\n * type, and `gone` when the type does not exist.\n */\n public static async deleteClusterPlanType(\n params: DeleteClusterPlanTypeThroughApprovalRequest,\n ): Promise<ForceDeleteClusterPlanTypeStepResult> {\n const { planTypeId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<ForceDeleteClusterPlanTypeStepResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deleteClusterPlanType',\n url: `api/admin/approvals/cluster-plan-types/${planTypeId}`,\n normalizedUrl: 'api/admin/approvals/cluster-plan-types/:planTypeId',\n type: 'delete',\n body: params.body,\n },\n )\n }\n\n /** Reads what a publish would change. It changes nothing. */\n public static async previewReleaseTrainPublish(\n params: PreviewReleaseTrainPublishRequest,\n ): Promise<ReleaseTrainPreview> {\n return ConsoleApprovalsM2MService.callApprovalRoute<ReleaseTrainPreview>({\n config: params.config,\n name: 'ConsoleApprovalsM2MService.previewReleaseTrainPublish',\n url: 'api/admin/approvals/release-train/publish/preview',\n normalizedUrl: 'api/admin/approvals/release-train/publish/preview',\n type: 'post',\n body: params.body,\n })\n }\n\n /** Publishes a release train generation. */\n public static async publishReleaseTrain(\n params: PublishReleaseTrainThroughApprovalRequest,\n ): Promise<PublishReleaseTrainThroughApprovalResult> {\n return ConsoleApprovalsM2MService.callApprovalRoute<PublishReleaseTrainThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.publishReleaseTrain',\n url: 'api/admin/approvals/release-train/publish',\n normalizedUrl: 'api/admin/approvals/release-train/publish',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /** Reads what a rollback would change. It changes nothing. */\n public static async previewReleaseTrainRollback(\n params: PreviewReleaseTrainRollbackRequest,\n ): Promise<ReleaseTrainPreview> {\n return ConsoleApprovalsM2MService.callApprovalRoute<ReleaseTrainPreview>({\n config: params.config,\n name: 'ConsoleApprovalsM2MService.previewReleaseTrainRollback',\n url: 'api/admin/approvals/release-train/rollback/preview',\n normalizedUrl: 'api/admin/approvals/release-train/rollback/preview',\n type: 'post',\n body: params.body,\n })\n }\n\n /** Rolls back a release train generation. */\n public static async rollbackReleaseTrain(\n params: RollbackReleaseTrainThroughApprovalRequest,\n ): Promise<RollbackReleaseTrainThroughApprovalResult> {\n return ConsoleApprovalsM2MService.callApprovalRoute<RollbackReleaseTrainThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.rollbackReleaseTrain',\n url: 'api/admin/approvals/release-train/rollback',\n normalizedUrl: 'api/admin/approvals/release-train/rollback',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /**\n * Applies a cluster modification for the owner of the cluster, with no\n * approval. Console answers the new config.\n */\n public static async applySelfServiceModification(\n params: ApplySelfServiceModificationRequest,\n ): Promise<ClusterModificationConfigDto> {\n const { clusterUuid } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<ClusterModificationConfigDto>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.applySelfServiceModification',\n url: `api/admin/approvals/clusters/${clusterUuid}/self-service-modification`,\n normalizedUrl:\n 'api/admin/approvals/clusters/:clusterUuid/self-service-modification',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /** Deactivates the active config of a cluster for its owner. */\n public static async deactivateSelfServiceModification(\n params: DeactivateSelfServiceModificationRequest,\n ): Promise<ClusterModificationConfigDto> {\n const { clusterUuid } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<ClusterModificationConfigDto>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deactivateSelfServiceModification',\n url: `api/admin/approvals/clusters/${clusterUuid}/self-service-modification/deactivate`,\n normalizedUrl:\n 'api/admin/approvals/clusters/:clusterUuid/self-service-modification/deactivate',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n private static async callApprovalRoute<T>(args: {\n config: RequestBaseParams['config']\n name: string\n url: string\n normalizedUrl: string\n type: 'post' | 'delete'\n body: unknown\n }): Promise<T> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: args.name,\n url: args.url,\n normalizedUrl: args.normalizedUrl,\n type: args.type,\n },\n source: args.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<T>({\n config: args.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: args.body,\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"],
5
- "mappings": "AAwCA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAwUnB,MAAM,2BAA2B;AAAA,EACtC,aAAoB,iBAClB,QACiC;AACjC,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,gCAAgC,OAAO,OAAO,SAAS;AAAA,QAC5D,eAAe;AAAA,QACf,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAO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eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,MAChB,cAAc;AAAA,MACd,MAAM,KAAK;AAAA,IACb,CAAC;AAED,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;AAAA,EAClB;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 ApprovalM2mActor,\n ApprovalSummaryNamesRequest,\n ApprovalSummaryNamesResult,\n BackupDto,\n ChangeClusterPlanTypeResult,\n ChangeGenerationVersionsResult,\n ChangePlanTypeRetentionLimitsResult,\n ClusterBulkStepRequestDto,\n ClusterBulkStepResultDto,\n ClusterCorpseKind,\n ClusterCorpsesDto,\n ClusterGenerationStateDto,\n ClusterLimits,\n ClusterModificationConfigDto,\n ClusterPlanModificationConfig,\n ClusterPlanTypeClustersDto,\n ClusterPlanTypeLimitsDto,\n ClusterPlanTypeStateDto,\n ClusterTtlDeletionResult,\n DeleteClusterCorpseResult,\n EditGenerationResult,\n ForceDeleteClusterPlanTypeStepResult,\n ForceGenerationUpgradeResult,\n GenerationEnvVarsDto,\n GenerationImageVersionsDto,\n MoveClusterOwnerResult,\n ReleaseTrainPreview,\n ReleaseTrainPublishPayload,\n ReleaseTrainRollbackPayload,\n} from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseParams,\n RequestBaseParamsConfig,\n RequestBaseServiceContext,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\nimport type { GenerationService } from './generation.service.js'\n\n/**\n * The route of `api/admin/approvals` in console-backend.\n *\n * The twin of `AccountsApprovalsM2MService`. Read the note there.\n */\n\nexport interface MoveClusterOwnerThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: {\n actor: ApprovalM2mActor\n ownerId: string\n }\n}\n\nexport interface ChangeClusterPlanTypeThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: {\n actor: ApprovalM2mActor\n /** The organization that owns the cluster. Console refuses another one. */\n orgId: string\n toPlanTypeUuid: string\n numberOfAllocatedHwPackages: number\n /**\n * The plan type that the person who asked READ. Console compares it with\n * the plan type of the cluster when the action runs, and changes nothing\n * when the two differ.\n */\n expectedPlanTypeUuid: string\n /** The packages the person READ, 1 for a cluster that holds none. */\n expectedNumberOfAllocatedHwPackages: number\n /** The plan the cluster ran when the person read it. */\n expectedClusterPlanUuid: string\n /** The active modification config the person read, absent for none. */\n expectedActiveModificationConfigUuid?: string\n /** The active plan of the new plan type the person read. */\n expectedTargetPlanUuid: string\n /** Whether the cluster plan moves to that plan, as the person read it. */\n expectedClusterPlanUpdate: boolean\n /**\n * Whether the active modification config stays on the cluster. Absent\n * reads as false: the change removes it.\n */\n keepModification?: boolean\n }\n}\n\nexport interface ReadClusterCorpsesRequest extends RequestBaseParams {\n params: { kind: ClusterCorpseKind }\n}\n\nexport interface DeleteClusterCorpseThroughApprovalRequest\n extends RequestBaseParams {\n params: { kind: ClusterCorpseKind; clusterId: string }\n body: {\n actor: ApprovalM2mActor\n /** The context of a `k8s` corpse, where console deletes the resource. */\n k8sContextUuid?: string\n /** The uid of the resource of a `k8s` corpse. See `ClusterCorpseDto.resourceUid`. */\n resourceUid?: string\n }\n}\n\nexport interface ReadClusterPlanTypeClustersRequest extends RequestBaseParams {\n params: { planTypeId: string }\n}\n\nexport interface DeleteClusterOfPlanTypeThroughApprovalRequest\n extends RequestBaseParams {\n params: { planTypeId: string; clusterId: string }\n body: { actor: ApprovalM2mActor }\n}\n\nexport interface DeleteClusterPlanTypeThroughApprovalRequest\n extends RequestBaseParams {\n params: { planTypeId: string }\n body: { actor: ApprovalM2mActor }\n}\n\nexport interface ReadClusterPlanTypeLimitsRequest extends RequestBaseParams {\n params: { planTypeId: string }\n}\n\nexport interface ChangePlanTypeRetentionLimitsThroughApprovalRequest\n extends RequestBaseParams {\n params: { planTypeId: string }\n body: {\n actor: ApprovalM2mActor\n /**\n * The new retention limits. They replace the limits of the plan type as\n * a whole, so a key that is absent goes back to its default.\n */\n limits: ClusterLimits\n /**\n * The limits that the person who asked READ. Console compares them with\n * the plan type when the action runs. When the plan type holds neither\n * these limits nor `limits`, console changes nothing and answers 409.\n */\n expectedLimits: ClusterLimits\n }\n}\n\nexport interface ReadClusterGenerationStateRequest extends RequestBaseParams {\n params: { clusterId: string }\n}\n\nexport interface ReadClusterPlanTypeStateRequest extends RequestBaseParams {\n params: { clusterId: string }\n query: {\n /** The organization that owns the cluster. Console refuses another one. */\n orgId: string\n /** The plan type of the question: its active plan is in the answer. */\n toPlanTypeUuid: string\n }\n}\n\nexport interface ChangeGenerationVersionsThroughApprovalRequest\n extends RequestBaseParams {\n params: { generationId: string }\n body: {\n actor: ApprovalM2mActor\n /**\n * The image versions to write. A key that is absent keeps its value.\n * An empty string clears an optional one. The env var fields are not\n * accepted: see `GENERATION_IMAGE_VERSION_KEYS`.\n */\n versions: GenerationImageVersionsDto\n /**\n * The values that the person who asked READ, one for each key of\n * `versions`. Console compares them with the generation when the action\n * runs, and changes nothing when one differs.\n */\n expectedVersions: GenerationImageVersionsDto\n }\n}\n\nexport interface EditGenerationThroughApprovalRequest\n extends RequestBaseParams {\n params: { generationId: string }\n body: {\n actor: ApprovalM2mActor\n /** The new name. Absent keeps the name. */\n name?: string\n /** The name that the person who asked READ. Necessary with `name`. */\n expectedName?: string\n /**\n * The env var text to write, by key. A key that is absent keeps its\n * value. An empty string clears the field.\n */\n envVars: GenerationEnvVarsDto\n /**\n * The text that the person who asked READ, one for each key of\n * `envVars`. Console compares it with the generation when the action\n * runs, and changes nothing when one differs.\n */\n expectedEnvVars: GenerationEnvVarsDto\n }\n}\n\nexport interface RunClusterBulkStepThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: ClusterBulkStepRequestDto & { actor: ApprovalM2mActor }\n}\n\nexport interface AnnounceClusterBulkPlanUpdateRequest\n extends RequestBaseParams {\n body: {\n actor: ApprovalM2mActor\n toPlanUuid: string\n doneCount: number\n }\n}\n\nexport interface DeleteInternalBackupThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string; backupName: string }\n body: { actor: ApprovalM2mActor }\n}\n\nexport interface ForceGenerationUpgradeThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: {\n actor: ApprovalM2mActor\n toGenerationUuid: string\n /**\n * The generation of the cluster when the request was opened. Console\n * answers 412 when the cluster runs another one now.\n */\n expectedGenerationUuid: string\n /** Ignore the upgrade graph. */\n yolo: boolean\n /** Ignore the upgrade gate. */\n ignoreUpgradeGate: boolean\n }\n}\n\nexport interface DeleteApiClientThroughApprovalRequest\n extends RequestBaseParams {\n /** `clientUuid` is the `uuid` of the client, not its OAuth `clientId`. */\n params: { orgId: string; clientUuid: string }\n body: { actor: ApprovalM2mActor }\n}\n\nexport interface ReadApiClientThroughApprovalRequest extends RequestBaseParams {\n /** `clientUuid` is the `uuid` of the client, not its OAuth `clientId`. */\n params: { orgId: string; clientUuid: string }\n}\n\n/** The names of a Console API client, as console holds them. */\nexport interface ApprovalApiClientDto {\n uuid: string\n name: string\n /** The OAuth client id, which the customer knows. */\n clientId: string\n}\n\nexport interface DeleteClusterPastTtlThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterId: string }\n body: {\n actor: ApprovalM2mActor\n /** The owner that the request names. Console keeps a cluster with another. */\n orgId: string\n }\n}\n\nexport interface CreateCustomClusterPlanThroughApprovalRequest\n extends RequestBaseParams {\n body: {\n actor: ApprovalM2mActor\n clusterPlanId: string\n name: string\n plan: Record<string, unknown>\n }\n}\n\nexport interface CheckCustomClusterPlanRemovalRequest\n extends RequestBaseParams {\n params: { clusterPlanId: string }\n body: { actor: ApprovalM2mActor; forDelete: boolean }\n}\n\nexport interface DeleteCustomClusterPlanThroughApprovalRequest\n extends RequestBaseParams {\n params: { clusterPlanId: string }\n body: { actor: ApprovalM2mActor }\n}\n\n/** The publish and rollback requests carry no `preview`. Console reads it. */\nexport type ReleaseTrainPublishRequest = Omit<\n ReleaseTrainPublishPayload,\n 'preview'\n>\nexport type ReleaseTrainRollbackRequest = Omit<\n ReleaseTrainRollbackPayload,\n 'preview'\n>\n\n/** The answer of `GenerationService.publishReleaseTrain`. */\nexport type PublishReleaseTrainThroughApprovalResult = NonNullable<\n Awaited<ReturnType<typeof GenerationService.publishReleaseTrain>>\n>\n\n/** The answer of `GenerationService.rollbackReleaseTrain`. */\nexport type RollbackReleaseTrainThroughApprovalResult = NonNullable<\n Awaited<ReturnType<typeof GenerationService.rollbackReleaseTrain>>\n>\n\nexport interface PreviewReleaseTrainPublishRequest extends RequestBaseParams {\n body: { request: ReleaseTrainPublishRequest }\n}\n\nexport interface PublishReleaseTrainThroughApprovalRequest\n extends RequestBaseParams {\n body: { actor: ApprovalM2mActor; request: ReleaseTrainPublishRequest }\n}\n\nexport interface PreviewReleaseTrainRollbackRequest extends RequestBaseParams {\n body: { request: ReleaseTrainRollbackRequest }\n}\n\nexport interface RollbackReleaseTrainThroughApprovalRequest\n extends RequestBaseParams {\n body: { actor: ApprovalM2mActor; request: ReleaseTrainRollbackRequest }\n}\n\n/** What console answers for a custom cluster plan call. */\nexport interface CustomClusterPlanThroughApprovalResult {\n clusterPlanId: string\n}\n\nexport interface CreateCustomGenerationThroughApprovalRequest\n extends RequestBaseParams {\n body: {\n actor: ApprovalM2mActor\n generationId: string\n name: string\n versions: Record<string, string>\n upgradeableFrom?: string[]\n }\n}\n\nexport interface CheckCustomGenerationRemovalRequest extends RequestBaseParams {\n params: { generationId: string }\n body: { actor: ApprovalM2mActor; forDelete: boolean }\n}\n\nexport interface DeleteCustomGenerationThroughApprovalRequest\n extends RequestBaseParams {\n params: { generationId: string }\n body: { actor: ApprovalM2mActor }\n}\n\n/** What console answers for a custom generation call. */\nexport interface CustomGenerationThroughApprovalResult {\n generationId: string\n}\n\nexport interface ApplySelfServiceModificationRequest extends RequestBaseParams {\n params: { clusterUuid: string }\n body: {\n actor: ApprovalM2mActor\n /** The organization that owns the cluster. Console refuses another one. */\n orgId: string\n description: string\n planModifications: ClusterPlanModificationConfig[]\n /**\n * An ISO date, today to 30 days ahead. With no date, the config does not\n * expire.\n */\n expiresAt?: string\n }\n}\n\nexport interface DeactivateSelfServiceModificationRequest\n extends RequestBaseParams {\n params: { clusterUuid: string }\n body: {\n actor: ApprovalM2mActor\n orgId: string\n configId: string\n }\n}\n\nexport class ConsoleApprovalsM2MService {\n public static async moveClusterOwner(\n params: MoveClusterOwnerThroughApprovalRequest,\n ): Promise<MoveClusterOwnerResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.moveClusterOwner',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/owner`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/owner',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<MoveClusterOwnerResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\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 // This route is new, so there is no older backend that answers 204 with no\n // body for the same-owner case. `ConsoleClusterService.moveClusterOwner`\n // carries that case, and this one does not need it.\n return response.body!\n }\n\n /**\n * The organization and the generation of one cluster, for the check of a\n * forced generation upgrade before the request opens. The route reads the\n * approvals grant, so control-backend needs no read grant of the admin\n * routes. See `ClusterGenerationStateDto`.\n */\n public static async readClusterGenerationState(\n params: ReadClusterGenerationStateRequest,\n ): Promise<ClusterGenerationStateDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readClusterGenerationState',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/generation-state`,\n normalizedUrl:\n 'api/admin/approvals/clusters/:clusterId/generation-state',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterGenerationStateDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * The cluster as a plan type change reads it: the fields of the stale\n * guard of `changeClusterPlanType`, for a comparison before a request\n * opens. See `ClusterPlanTypeStateDto`.\n */\n public static async readClusterPlanTypeState(\n params: ReadClusterPlanTypeStateRequest,\n ): Promise<ClusterPlanTypeStateDto> {\n const query = new URLSearchParams({\n orgId: params.query.orgId,\n toPlanTypeUuid: params.query.toPlanTypeUuid,\n })\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readClusterPlanTypeState',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/plan-type-state?${query.toString()}`,\n normalizedUrl:\n 'api/admin/approvals/clusters/:clusterId/plan-type-state',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterPlanTypeStateDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * Changes the mutable versions of one generation, and restarts its clusters.\n *\n * Console answers 409 when a value that the request expected is not the\n * value of the generation any more.\n */\n public static async changeGenerationVersions(\n params: ChangeGenerationVersionsThroughApprovalRequest,\n ): Promise<ChangeGenerationVersionsResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.changeGenerationVersions',\n url: `api/admin/approvals/generations/${params.params.generationId}/versions`,\n normalizedUrl: 'api/admin/approvals/generations/:generationId/versions',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ChangeGenerationVersionsResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n\n if (!response.ok || !response.body) {\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 * Changes the name and the env vars of one generation, and sends the new\n * spec to its clusters.\n *\n * Console answers 409 when a value that the request expected is not the\n * value of the generation any more, and is not the requested value either.\n * When the generation already holds the requested value, console writes\n * nothing, sends the spec again and answers `reapplied: true`. The body\n * holds env var text, so no log line of this call carries a value of the\n * body.\n */\n public static async editGeneration(\n params: EditGenerationThroughApprovalRequest,\n ): Promise<EditGenerationResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.editGeneration',\n url: `api/admin/approvals/generations/${params.params.generationId}/edit`,\n normalizedUrl: 'api/admin/approvals/generations/:generationId/edit',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<EditGenerationResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n redactBody: true,\n body: params.body,\n })\n\n if (!response.ok || !response.body) {\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 * Changes the plan type and the hardware packages of one cluster.\n *\n * Console checks the reservations of the organization, and it moves the\n * cluster plan to the active plan of the new type when that plan is\n * migratable from the plan of the cluster. It answers 409 when one of the\n * `expected\u2026` fields of the body differs at the run: the plan type, the\n * hardware packages, the cluster plan or the active modification config\n * of the cluster, or the active plan of the new type. A cluster that runs\n * no plan and a type that has no active plan meet that guard too, because\n * both fields of the body are required. It answers 400 when the request\n * changes nothing, when the new type is retired, when its active plan is\n * neither the plan of the cluster nor migratable from it, or when the\n * organization has no free reservation.\n */\n public static async changeClusterPlanType(\n params: ChangeClusterPlanTypeThroughApprovalRequest,\n ): Promise<ChangeClusterPlanTypeResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.changeClusterPlanType',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/plan-type`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/plan-type',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ChangeClusterPlanTypeResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n\n if (!response.ok || !response.body) {\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 * Runs one step of a cluster bulk operation on one cluster.\n *\n * Every outcome of the STEP answers 200, including a cluster that refused.\n * A thrown `HttpError` says that the CALL failed, and the caller then\n * leaves the cluster to run again.\n */\n public static async runClusterBulkStep(\n params: RunClusterBulkStepThroughApprovalRequest,\n ): Promise<ClusterBulkStepResultDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.runClusterBulkStep',\n url: `api/admin/approvals/clusters/${params.params.clusterId}/bulk-step`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/bulk-step',\n type: 'post',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterBulkStepResultDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n\n if (!response.ok || !response.body) {\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 * Posts the Slack message that ends an approved bulk plan update. The bulk\n * operation of console-backend posts the same message after its run.\n */\n public static async announceClusterBulkPlanUpdate(\n params: AnnounceClusterBulkPlanUpdateRequest,\n ): Promise<void> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.announceClusterBulkPlanUpdate',\n url: 'api/admin/approvals/cluster-bulk/plan-update-announcement',\n normalizedUrl:\n 'api/admin/approvals/cluster-bulk/plan-update-announcement',\n type: 'post',\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 url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: params.body,\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 the generation of one cluster with `yolo`, past the upgrade\n * gate, or both. Console answers 412 when the cluster left the expected\n * generation, 409 when the upgrade gate blocks the upgrade, and 503 while\n * generation updates are blocked, while a lock of the cluster stays taken,\n * or while Redis does not answer.\n */\n public static async forceGenerationUpgrade(\n params: ForceGenerationUpgradeThroughApprovalRequest,\n ): Promise<ForceGenerationUpgradeResult> {\n const { clusterId } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.forceGenerationUpgrade',\n url: `api/admin/approvals/clusters/${clusterId}/generation`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/generation',\n type: 'put',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ForceGenerationUpgradeResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\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 /** Deletes an internal (incident) backup of a cluster. It cannot be undone. */\n public static async deleteInternalBackup(\n params: DeleteInternalBackupThroughApprovalRequest,\n ): Promise<BackupDto> {\n const { clusterId, backupName } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.deleteInternalBackup',\n url: `api/admin/approvals/clusters/${clusterId}/internal-backups/${encodeURIComponent(backupName)}`,\n normalizedUrl:\n 'api/admin/approvals/clusters/:clusterId/internal-backups/:backupName',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<BackupDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\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 * Deletes a Console API client of an organization. Console answers 404 for\n * a client that is gone, and 403 for a client of another organization.\n */\n public static async deleteApiClient(\n params: DeleteApiClientThroughApprovalRequest,\n ): Promise<void> {\n const { orgId, clientUuid } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.deleteApiClient',\n url: `api/admin/approvals/orgs/${orgId}/api-clients/${clientUuid}`,\n normalizedUrl:\n 'api/admin/approvals/orgs/:orgId/api-clients/:clientUuid',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'none',\n body: params.body,\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 * Deletes a cluster whose TTL ran out. Console tests the TTL and the owner\n * again first, and answers `kept` when the cluster stays.\n */\n public static async deleteClusterPastTtl(\n params: DeleteClusterPastTtlThroughApprovalRequest,\n ): Promise<ClusterTtlDeletionResult> {\n const { clusterId } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.deleteClusterPastTtl',\n url: `api/admin/approvals/clusters/${clusterId}/ttl-expiry`,\n normalizedUrl: 'api/admin/approvals/clusters/:clusterId/ttl-expiry',\n type: 'delete',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterTtlDeletionResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\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 /** Creates a cluster plan for a Camundi, with the uuid that the caller gives. */\n public static async createCustomClusterPlan(\n params: CreateCustomClusterPlanThroughApprovalRequest,\n ): Promise<CustomClusterPlanThroughApprovalResult> {\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomClusterPlanThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.createCustomClusterPlan',\n url: 'api/admin/approvals/cluster-plans',\n normalizedUrl: 'api/admin/approvals/cluster-plans',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /**\n * Asks whether a Camundi may remove a plan. Console answers 403 for a plan\n * of another person, and 409 for a plan that a cluster uses.\n */\n public static async checkCustomClusterPlanRemoval(\n params: CheckCustomClusterPlanRemovalRequest,\n ): Promise<CustomClusterPlanThroughApprovalResult> {\n const { clusterPlanId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomClusterPlanThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.checkCustomClusterPlanRemoval',\n url: `api/admin/approvals/cluster-plans/${clusterPlanId}/removal-check`,\n normalizedUrl:\n 'api/admin/approvals/cluster-plans/:clusterPlanId/removal-check',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /** Deletes a cluster plan that the Camundi created. It cannot be undone. */\n public static async deleteCustomClusterPlan(\n params: DeleteCustomClusterPlanThroughApprovalRequest,\n ): Promise<CustomClusterPlanThroughApprovalResult> {\n const { clusterPlanId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomClusterPlanThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deleteCustomClusterPlan',\n url: `api/admin/approvals/cluster-plans/${clusterPlanId}`,\n normalizedUrl: 'api/admin/approvals/cluster-plans/:clusterPlanId',\n type: 'delete',\n body: params.body,\n },\n )\n }\n\n /** Creates a bespoke generation for a Camundi, with the uuid that the caller gives. */\n public static async createCustomGeneration(\n params: CreateCustomGenerationThroughApprovalRequest,\n ): Promise<CustomGenerationThroughApprovalResult> {\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomGenerationThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.createCustomGeneration',\n url: 'api/admin/approvals/generations',\n normalizedUrl: 'api/admin/approvals/generations',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /**\n * Asks whether a Camundi may remove a generation. Console answers 404 for a\n * generation of another person, or a generation that is not bespoke, and 409\n * for a delete that it refuses. A bespoke generation that the Camundi\n * created in the admin tool counts as theirs.\n */\n public static async checkCustomGenerationRemoval(\n params: CheckCustomGenerationRemovalRequest,\n ): Promise<CustomGenerationThroughApprovalResult> {\n const { generationId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomGenerationThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.checkCustomGenerationRemoval',\n url: `api/admin/approvals/generations/${generationId}/removal-check`,\n normalizedUrl:\n 'api/admin/approvals/generations/:generationId/removal-check',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /** Deletes a custom generation that the Camundi created. It cannot be undone. */\n public static async deleteCustomGeneration(\n params: DeleteCustomGenerationThroughApprovalRequest,\n ): Promise<CustomGenerationThroughApprovalResult> {\n const { generationId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<CustomGenerationThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deleteCustomGeneration',\n url: `api/admin/approvals/generations/${generationId}`,\n normalizedUrl: 'api/admin/approvals/generations/:generationId',\n type: 'delete',\n body: params.body,\n },\n )\n }\n\n /**\n * Reads the names that console holds for clusters and generations, and the\n * number of clusters that run each generation. It changes nothing.\n *\n * It is a POST because a bulk operation names up to 3000 clusters.\n */\n public static async readSummaryNames(params: {\n config: RequestBaseParamsConfig\n body: ApprovalSummaryNamesRequest\n }): Promise<ApprovalSummaryNamesResult> {\n return ConsoleApprovalsM2MService.callApprovalRoute<ApprovalSummaryNamesResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.readSummaryNames',\n url: 'api/admin/approvals/summary-names',\n normalizedUrl: 'api/admin/approvals/summary-names',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /**\n * The names of a Console API client of an organization, for a\n * delete-api-client request when it opens. Console answers 404 for a client\n * that is not in the organization, and 403 when the caller lacks the\n * permission.\n */\n public static async readApiClient(\n params: ReadApiClientThroughApprovalRequest,\n ): Promise<ApprovalApiClientDto> {\n const { orgId, clientUuid } = params.params\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readApiClient',\n url: `api/admin/approvals/orgs/${orgId}/api-clients/${clientUuid}`,\n normalizedUrl:\n 'api/admin/approvals/orgs/:orgId/api-clients/:clientUuid',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ApprovalApiClientDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * The corpses of one kind now, for the request that deletes them. Console\n * reads them from its watch of Kubernetes and from its rows, as the\n * \"Corpses\" tab does.\n */\n public static async readClusterCorpses(\n params: ReadClusterCorpsesRequest,\n ): Promise<ClusterCorpsesDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readClusterCorpses',\n url: `api/admin/approvals/cluster-corpses/${params.params.kind}`,\n normalizedUrl: 'api/admin/approvals/cluster-corpses/:kind',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterCorpsesDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * Deletes one corpse of a request. It cannot be undone.\n *\n * Console reads the live source again first, and deletes nothing when the\n * cluster is not a corpse any more (`not-a-corpse`) or when there is nothing\n * to delete (`gone`). It throws when it cannot read the live source.\n */\n public static async deleteClusterCorpse(\n params: DeleteClusterCorpseThroughApprovalRequest,\n ): Promise<DeleteClusterCorpseResult> {\n const { kind, clusterId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<DeleteClusterCorpseResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deleteClusterCorpse',\n url: `api/admin/approvals/cluster-corpses/${kind}/${clusterId}`,\n normalizedUrl: 'api/admin/approvals/cluster-corpses/:kind/:clusterId',\n type: 'delete',\n body: params.body,\n },\n )\n }\n\n /**\n * The clusters of a plan type now, for the request that force deletes it.\n * Console answers 404 when the plan type does not exist.\n */\n public static async readClusterPlanTypeClusters(\n params: ReadClusterPlanTypeClustersRequest,\n ): Promise<ClusterPlanTypeClustersDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readClusterPlanTypeClusters',\n url: `api/admin/approvals/cluster-plan-types/${params.params.planTypeId}/clusters`,\n normalizedUrl:\n 'api/admin/approvals/cluster-plan-types/:planTypeId/clusters',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterPlanTypeClustersDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * The retention limits of a plan type now, and the number of its clusters.\n * Console answers 404 when the plan type does not exist.\n */\n public static async readClusterPlanTypeLimits(\n params: ReadClusterPlanTypeLimitsRequest,\n ): Promise<ClusterPlanTypeLimitsDto> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.readClusterPlanTypeLimits',\n url: `api/admin/approvals/cluster-plan-types/${params.params.planTypeId}/limits`,\n normalizedUrl:\n 'api/admin/approvals/cluster-plan-types/:planTypeId/limits',\n type: 'get',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ClusterPlanTypeLimitsDto>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n })\n\n if (!response.ok || !response.body) {\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 * Changes the retention limits of a plan type, and sends the new spec to\n * every cluster of the type.\n *\n * Console answers 409 when the limits of the plan type are not the\n * expected limits and not the new limits, and 404 when the plan type does\n * not exist.\n */\n public static async changePlanTypeRetentionLimits(\n params: ChangePlanTypeRetentionLimitsThroughApprovalRequest,\n ): Promise<ChangePlanTypeRetentionLimitsResult> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: 'ConsoleApprovalsM2MService.changePlanTypeRetentionLimits',\n url: `api/admin/approvals/cluster-plan-types/${params.params.planTypeId}/limits`,\n normalizedUrl:\n 'api/admin/approvals/cluster-plan-types/:planTypeId/limits',\n type: 'patch',\n },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<ChangePlanTypeRetentionLimitsResult>({\n config: params.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: params.body,\n })\n\n if (!response.ok || !response.body) {\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 * Deletes one cluster of a plan type, for a force delete request. It cannot\n * be undone. Console answers `gone` for a cluster that does not exist or\n * that is on another plan type now, and deletes nothing then.\n */\n public static async deleteClusterOfPlanType(\n params: DeleteClusterOfPlanTypeThroughApprovalRequest,\n ): Promise<ForceDeleteClusterPlanTypeStepResult> {\n const { planTypeId, clusterId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<ForceDeleteClusterPlanTypeStepResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deleteClusterOfPlanType',\n url: `api/admin/approvals/cluster-plan-types/${planTypeId}/clusters/${clusterId}`,\n normalizedUrl:\n 'api/admin/approvals/cluster-plan-types/:planTypeId/clusters/:clusterId',\n type: 'delete',\n body: params.body,\n },\n )\n }\n\n /**\n * Deletes a plan type that no cluster uses, for a force delete request. It\n * cannot be undone. Console answers 409 while a cluster still uses the\n * type, and `gone` when the type does not exist.\n */\n public static async deleteClusterPlanType(\n params: DeleteClusterPlanTypeThroughApprovalRequest,\n ): Promise<ForceDeleteClusterPlanTypeStepResult> {\n const { planTypeId } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<ForceDeleteClusterPlanTypeStepResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deleteClusterPlanType',\n url: `api/admin/approvals/cluster-plan-types/${planTypeId}`,\n normalizedUrl: 'api/admin/approvals/cluster-plan-types/:planTypeId',\n type: 'delete',\n body: params.body,\n },\n )\n }\n\n /** Reads what a publish would change. It changes nothing. */\n public static async previewReleaseTrainPublish(\n params: PreviewReleaseTrainPublishRequest,\n ): Promise<ReleaseTrainPreview> {\n return ConsoleApprovalsM2MService.callApprovalRoute<ReleaseTrainPreview>({\n config: params.config,\n name: 'ConsoleApprovalsM2MService.previewReleaseTrainPublish',\n url: 'api/admin/approvals/release-train/publish/preview',\n normalizedUrl: 'api/admin/approvals/release-train/publish/preview',\n type: 'post',\n body: params.body,\n })\n }\n\n /** Publishes a release train generation. */\n public static async publishReleaseTrain(\n params: PublishReleaseTrainThroughApprovalRequest,\n ): Promise<PublishReleaseTrainThroughApprovalResult> {\n return ConsoleApprovalsM2MService.callApprovalRoute<PublishReleaseTrainThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.publishReleaseTrain',\n url: 'api/admin/approvals/release-train/publish',\n normalizedUrl: 'api/admin/approvals/release-train/publish',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /** Reads what a rollback would change. It changes nothing. */\n public static async previewReleaseTrainRollback(\n params: PreviewReleaseTrainRollbackRequest,\n ): Promise<ReleaseTrainPreview> {\n return ConsoleApprovalsM2MService.callApprovalRoute<ReleaseTrainPreview>({\n config: params.config,\n name: 'ConsoleApprovalsM2MService.previewReleaseTrainRollback',\n url: 'api/admin/approvals/release-train/rollback/preview',\n normalizedUrl: 'api/admin/approvals/release-train/rollback/preview',\n type: 'post',\n body: params.body,\n })\n }\n\n /** Rolls back a release train generation. */\n public static async rollbackReleaseTrain(\n params: RollbackReleaseTrainThroughApprovalRequest,\n ): Promise<RollbackReleaseTrainThroughApprovalResult> {\n return ConsoleApprovalsM2MService.callApprovalRoute<RollbackReleaseTrainThroughApprovalResult>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.rollbackReleaseTrain',\n url: 'api/admin/approvals/release-train/rollback',\n normalizedUrl: 'api/admin/approvals/release-train/rollback',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /**\n * Applies a cluster modification for the owner of the cluster, with no\n * approval. Console answers the new config.\n */\n public static async applySelfServiceModification(\n params: ApplySelfServiceModificationRequest,\n ): Promise<ClusterModificationConfigDto> {\n const { clusterUuid } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<ClusterModificationConfigDto>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.applySelfServiceModification',\n url: `api/admin/approvals/clusters/${clusterUuid}/self-service-modification`,\n normalizedUrl:\n 'api/admin/approvals/clusters/:clusterUuid/self-service-modification',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n /** Deactivates the active config of a cluster for its owner. */\n public static async deactivateSelfServiceModification(\n params: DeactivateSelfServiceModificationRequest,\n ): Promise<ClusterModificationConfigDto> {\n const { clusterUuid } = params.params\n return ConsoleApprovalsM2MService.callApprovalRoute<ClusterModificationConfigDto>(\n {\n config: params.config,\n name: 'ConsoleApprovalsM2MService.deactivateSelfServiceModification',\n url: `api/admin/approvals/clusters/${clusterUuid}/self-service-modification/deactivate`,\n normalizedUrl:\n 'api/admin/approvals/clusters/:clusterUuid/self-service-modification/deactivate',\n type: 'post',\n body: params.body,\n },\n )\n }\n\n private static async callApprovalRoute<T>(args: {\n config: RequestBaseParams['config']\n name: string\n url: string\n normalizedUrl: string\n type: 'post' | 'delete'\n body: unknown\n }): Promise<T> {\n const serviceContext: RequestBaseServiceContext = {\n method: {\n name: args.name,\n url: args.url,\n normalizedUrl: args.normalizedUrl,\n type: args.type,\n },\n source: args.config.metrics?.source || 'unset',\n target: { name: 'console', type: 'internal' },\n }\n\n const response = await request<T>({\n config: args.config,\n base: { id: 'console' },\n url: serviceContext.method.url,\n method: serviceContext.method.type,\n metricsDetails: serviceContext,\n responseType: 'json',\n body: args.body,\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"],
5
+ "mappings": "AA0CA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AA8VnB,MAAM,2BAA2B;AAAA,EACtC,aAAoB,iBAClB,QACiC;AACjC,UAAM,iBAA4C;AAAA,MAChD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK,gCAAgC,OAAO,OAAO,SAAS;AAAA,QAC5D,eAAe;AAAA,QACf,MAAM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,MACzC,QAAQ,EAAE,MAAM,WAAW,MAAM,WAAW;AAAA,IAC9C;AAEA,UAAM,WAAW,MAAM,QAAgC;AAAA,MACrD,QAAQ,OAAO;AAAA,MACf,MAAM,EAAE,IAAI,UAAU;AAAA,MACtB,KAAK,eAAe,OAAO;AAAA,MAC3B,QAAQ,eAAe,OAAO;AAAA,MAC9B,gBAAgB;AAAA,MAChB,cAAc;AAAA,MACd,MAAM,OAAO;AAAA,IACf,CAAC;AAED,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI;AAAA,QACR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MACd,MAAM,KAAK;AAAA,IACb,CAAC;AAED,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;AAAA,EAClB;AACF;",
6
6
  "names": []
7
7
  }
@@ -770,6 +770,28 @@ export interface DeleteInternalBackupPayloadDto {
770
770
  /** A copy of the Slack link of the incident, for the approver to read. */
771
771
  incidentLink?: string;
772
772
  }
773
+ /** See `forceGenerationUpgradePayloadSchema` in control-backend. */
774
+ export interface ForceGenerationUpgradePayloadDto {
775
+ clusterId: string;
776
+ /** A copy, so a list shows a name that a person knows. Nothing reads it. */
777
+ clusterName?: string;
778
+ /** The organization of the cluster. Control reads it for the request page. */
779
+ orgId?: string;
780
+ toGenerationUuid: string;
781
+ /** A copy, so the approver reads a name. Nothing reads it. */
782
+ toGenerationName?: string;
783
+ /** The generation of the cluster when the person opened the request. */
784
+ expectedGenerationUuid: string;
785
+ /** A copy, so the approver reads a name. Nothing reads it. */
786
+ expectedGenerationName?: string;
787
+ /**
788
+ * Ignore the upgrade graph. Needs
789
+ * `console.clusters.canUpgradeGenerationYolo`.
790
+ */
791
+ yolo: boolean;
792
+ /** Ignore the upgrade gate. */
793
+ ignoreUpgradeGate: boolean;
794
+ }
773
795
  /** See `deleteApiClientPayloadSchema` in control-backend. */
774
796
  export interface DeleteApiClientPayloadDto {
775
797
  orgId: string;
@@ -847,6 +869,18 @@ export declare class ControlApprovalsService {
847
869
  approval: ApprovalJobDto;
848
870
  created: boolean;
849
871
  }>;
872
+ /**
873
+ * Opens a force-generation-upgrade request: a generation upgrade of one
874
+ * cluster with `yolo`, past the upgrade gate, or both.
875
+ *
876
+ * Opening one needs `console.clusters.canUpgradeGeneration`, and with `yolo`
877
+ * also `console.clusters.canUpgradeGenerationYolo`. A 200 means that a
878
+ * request for the same cluster is already open.
879
+ */
880
+ static createForceGenerationUpgrade(params: CreateApprovalRequest<ForceGenerationUpgradePayloadDto>): Promise<{
881
+ approval: ApprovalJobDto;
882
+ created: boolean;
883
+ }>;
850
884
  /**
851
885
  * Opens a delete-api-client request.
852
886
  *
@@ -187,6 +187,21 @@ class ControlApprovalsService {
187
187
  "api/approvals/delete-internal-backup"
188
188
  );
189
189
  }
190
+ /**
191
+ * Opens a force-generation-upgrade request: a generation upgrade of one
192
+ * cluster with `yolo`, past the upgrade gate, or both.
193
+ *
194
+ * Opening one needs `console.clusters.canUpgradeGeneration`, and with `yolo`
195
+ * also `console.clusters.canUpgradeGenerationYolo`. A 200 means that a
196
+ * request for the same cluster is already open.
197
+ */
198
+ static async createForceGenerationUpgrade(params) {
199
+ return ControlApprovalsService.create(
200
+ params,
201
+ "createForceGenerationUpgrade",
202
+ "api/approvals/force-generation-upgrade"
203
+ );
204
+ }
190
205
  /**
191
206
  * Opens a delete-api-client request.
192
207
  *
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/services/control/control.approvals.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 ActivityRetentionMonths,\n ApprovalEntityType,\n ApprovalJobDto,\n ApprovalJobStatus,\n ApprovalOverrideGrantDto,\n ApprovalSortField,\n ApprovalSortOrder,\n ApprovalStatusCountsDto,\n ApprovalUseCaseDto,\n ClusterBulkOperationPayloadDto,\n ClusterBulkOperationType,\n ClusterCorpseKind,\n ClusterLimits,\n ClusterPlanModificationConfig,\n ClusterTtlDeletionPayload,\n EnterpriseIncludingValueMetrics,\n GenerationEnvVarsDto,\n GenerationImageVersionsDto,\n LicensingModelType,\n ReleaseTrainPublishPayload,\n ReleaseTrainRollbackPayload,\n} from '@camunda/ccma-shared-types'\nimport { CLUSTER_BULK_OPERATION_RULES } 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\n/**\n * The four-eyes approval surface of control-backend.\n *\n * One service for the whole mechanism, and not one for each use case. The\n * generic routes (list, read, approve, reject, withdraw, run) carry no\n * knowledge of a use case, which is what lets one view in control-frontend\n * show every privileged action. Only the create calls are per use case,\n * because a payload can be validated only for the use case it belongs to.\n *\n * A use case that walks its own rollout behind a flag answers 404 on its\n * create route while that flag is off.\n */\n\nconst BASE = { id: 'control' } as const\n\nexport interface ApprovalPageDto {\n approvals: ApprovalJobDto[]\n page: {\n limit: number\n offset: number\n /** True when the next page holds more. Never read the length instead. */\n hasMore: boolean\n }\n}\n\n/**\n * What narrows the queue. The list and the counts read the same fields.\n *\n * `entityType` and `entityId` are ONE filter, not two. control-backend answers\n * 400 for one without the other, so the type carries both or neither.\n */\nexport type ApprovalFacetParams = {\n /** One use case type, or more. A request matches when its type is any of them. */\n type?: string | readonly string[]\n /**\n * One organization, matched whole against `orgId` of the payload.\n *\n * It reads only the payload, so `entityType`/`entityId` is wider. That filter\n * reads the entity link, so it finds a request that touches the organization\n * through another field. The organization page of control-frontend asks the\n * entity-link filter, not this one. `orgId` is also not `q`: the free text\n * reads the whole payload as text.\n */\n orgId?: string\n /**\n * Free text. control-backend matches it in the reason, the person who\n * opened the request, the action and its label, and the payload that the\n * summary shows.\n */\n q?: string\n /**\n * The queue of one person: what they opened, or what waits for them.\n *\n * `actionable` is the rule of the Approve button asked in SQL \u2014 pending,\n * opened by somebody else, not approved by this person yet, and guarded by\n * permissions that they hold.\n */\n mine?: 'created' | 'actionable'\n} & (\n | {\n /**\n * The kind of entity a request must touch. Read with `entityId`.\n *\n * It reads the entity link of control-backend, so it is wider and truer\n * than `orgId`: a cluster-move request answers for its source\n * organization, its target organization AND the cluster. The organization\n * and cluster detail pages of control-frontend ask this.\n */\n entityType: ApprovalEntityType\n /** The id of the entity a request must touch. Read with `entityType`. */\n entityId: string\n }\n | { entityType?: never; entityId?: never }\n)\n\nexport interface ListApprovalsRequest extends RequestBaseParams {\n params?: ApprovalFacetParams & {\n status?: ApprovalJobStatus\n /**\n * An ISO 8601 instant. Only the requests that changed at or after it: the\n * last write of the request, or the run of its action. A control-backend\n * from before this parameter ignores it and answers every request.\n */\n updatedSince?: string\n sort?: ApprovalSortField\n order?: ApprovalSortOrder\n limit?: number\n offset?: number\n }\n}\n\nexport interface CountApprovalsRequest extends RequestBaseParams {\n params?: ApprovalFacetParams\n}\n\nexport interface ApprovalIdRequest extends RequestBaseParams {\n params: { id: string }\n}\n\nexport interface RejectApprovalRequest extends RequestBaseParams {\n params: { id: string; reason: string }\n}\n\n/** A withdrawal says why, or says nothing. The reason is not demanded. */\nexport interface WithdrawApprovalRequest extends RequestBaseParams {\n params: { id: string; reason?: string }\n}\n\n/** The envelope that every create route of every use case shares. */\nexport interface CreateApprovalRequest<TPayload> extends RequestBaseParams {\n params: {\n payload: TPayload\n reason?: string\n /** More approvals than the floor of the use case. Never fewer. */\n requiredAcks?: number\n }\n}\n\n/** An override needs a reason, which goes to the audit trail. */\nexport interface OverrideApprovalRequest extends RequestBaseParams {\n params: { id: string; reason: string }\n}\n\nexport interface GrantApprovalOverridePayloadDto {\n /** The Camundi who gets the grant. It can be the person who asks. */\n granteeEmail: string\n /** At most `APPROVAL_OVERRIDE_MAX_HOURS`, counted from the run. */\n durationHours: number\n}\n\nexport interface SendToExpiredTrialPayloadDto {\n orgId: string\n orgName?: string\n}\n\nexport interface CreatePersonalOrganisationPayloadDto {\n /** 3 to 100 characters, after the spaces at both ends are cut. */\n name: string\n}\n\n/**\n * The create call of `create-personal-organisation`.\n *\n * It has no `requiredAcks`: the request needs no approval, and the route\n * answers 400 to a body that names the field.\n */\nexport interface CreatePersonalOrganisationRequest extends RequestBaseParams {\n params: {\n payload: CreatePersonalOrganisationPayloadDto\n reason?: string\n }\n}\n\n/** The create call of `extend-trial`. It has no `requiredAcks`. */\nexport interface CreateExtendTrialRequest extends RequestBaseParams {\n params: {\n payload: ExtendTrialPayloadDto\n reason?: string\n }\n}\n\n/** The create call of `cluster-ttl-deletion`. It has no `requiredAcks`. */\nexport interface CreateClusterTtlDeletionRequest extends RequestBaseParams {\n params: {\n payload: ClusterTtlDeletionPayload\n reason?: string\n }\n}\n\nexport interface CreateCustomHardwareSizingPayloadDto {\n /** The organization that gets the plan. The requester must own it. */\n orgId: string\n /** 3 to 100 characters, after the spaces at both ends are cut. */\n name: string\n /** The cluster plan, in the same format as the plan route of the admin tool. */\n plan: Record<string, unknown>\n clusterPlanId?: never\n}\n\n/** An existing cluster plan. Nothing is created: it is added to the list of the organization. */\nexport interface LinkCustomHardwareSizingPayloadDto {\n /** The organization that gets the plan. The requester must own it. */\n orgId: string\n clusterPlanId: string\n name?: never\n plan?: never\n}\n\n/**\n * `unlink` removes the plan from one organization that the requester owns.\n * `delete` removes it from every organization of the requester, and deletes it.\n */\nexport type RemoveCustomHardwareSizingPayloadDto =\n | { mode: 'unlink'; clusterPlanId: string; orgId: string }\n | { mode: 'delete'; clusterPlanId: string }\n\nexport interface CreateCustomGenerationPayloadDto {\n /** The organization that gets the generation. The requester must own it. */\n orgId: string\n /** 3 to 100 characters, after the spaces at both ends are cut. */\n name: string\n /** The images and env vars, in the format of the generation route of the admin tool. */\n versions: Record<string, string>\n /** Generations whose clusters can upgrade to this one. */\n upgradeableFrom?: string[]\n generationId?: never\n}\n\n/** An existing generation. Nothing is created: it is added to the list of the organization. */\nexport interface LinkCustomGenerationPayloadDto {\n /** The organization that gets the generation. The requester must own it. */\n orgId: string\n generationId: string\n name?: never\n versions?: never\n upgradeableFrom?: never\n}\n\n/**\n * `unlink` removes the generation from one organization that the requester\n * owns. `delete` removes it from every organization of the requester, and\n * deletes it.\n */\nexport type RemoveCustomGenerationPayloadDto =\n | { mode: 'unlink'; generationId: string; orgId: string }\n | { mode: 'delete'; generationId: string }\n\n/**\n * `apply` applies a new config to a cluster of an organization that the\n * requester owns, and the new config replaces the active config. `deactivate`\n * deactivates the active config `configId`.\n */\nexport type SelfServiceClusterModificationPayloadDto =\n | {\n mode: 'apply'\n orgId: string\n clusterUuid: string\n /** 1 to 500 characters. */\n description: string\n /** At least one entry. */\n planModifications: ClusterPlanModificationConfig[]\n /** An ISO datetime with an offset, for example `toISOString()`. */\n expiresAt?: string\n }\n | { mode: 'deactivate'; orgId: string; clusterUuid: string; configId: string }\n\n/**\n * The call of a self-service use case: custom hardware sizing and custom\n * generations. Like `CreatePersonalOrganisationRequest`, it has no\n * `requiredAcks`.\n */\nexport interface SelfServiceApprovalRequest<TPayload>\n extends RequestBaseParams {\n params: {\n payload: TPayload\n reason?: string\n }\n}\n\n/** @deprecated Use `SelfServiceApprovalRequest`. */\nexport type CustomHardwareSizingRequest<TPayload> =\n SelfServiceApprovalRequest<TPayload>\n\nexport interface ExtendTrialPayloadDto {\n orgId: string\n orgName?: string\n /**\n * Days of trial counted from the moment the action RUNS.\n *\n * Never a date. Accounts holds the new expiry inside a window that it\n * measures when the call arrives, and under approvals that is days after the\n * person chose the value. See `use-cases/extend-trial.ts` in\n * control-backend.\n */\n days: number\n}\n\nexport interface MoveClusterOrgPayloadDto {\n clusterId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n clusterName?: string\n targetOrgId: string\n /** A copy, for the same reason as `clusterName`. */\n targetOrgName?: string\n // The SOURCE organization is not here on purpose. control-backend resolves it\n // server-side from the cluster's current owner, so a caller cannot attach the\n // request to an organization the cluster never belonged to.\n}\n\nexport interface ChangePlatformRolesPayloadDto {\n userId: string\n /** A copy, so a list shows a person and not an Auth0 id. Nothing reads it. */\n userEmail?: string\n /**\n * A CHANGE, and never the whole set. Accounts applies it over the roles that\n * the user holds when the action RUNS, so a role change that somebody else\n * made while the request waited stays.\n */\n rolesToAdd: string[]\n rolesToRemove: string[]\n}\n\nexport interface ChangeOrgLimitsPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /** One key of `allSalesPlanLimits()`. One limit for each request. */\n limitKey: string\n /**\n * The override that the person who asked READ. Absent for \"not set\".\n *\n * Accounts compares it with the override that it holds when the action\n * runs, and writes nothing when the two differ. See `staleApprovalKeys`.\n */\n expected?: string | number | boolean\n /** The new override. `null` clears it, and the default of the plan applies. */\n value: string | number | boolean | null\n}\n\n/**\n * The terms of an enterprise contract that a change-enterprise-contract\n * request writes. A field that is absent stays as it is.\n */\nexport interface EnterpriseContractTermsDto {\n contractDurationInMonths?: number\n /** The start of the contract, as `YYYY-MM-DD`. */\n startDate?: string\n valueMetrics?: {\n processInstances?: number\n decisionInstances?: number\n taskUsers?: number\n tenants?: number\n }\n}\n\nexport interface ChangeEnterpriseContractPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /** The new values. It holds at least one field. */\n change: EnterpriseContractTermsDto\n /**\n * The values that the person who asked READ, for the fields of `change`.\n * Absent for \"not set\". Accounts compares them with the values that it\n * holds when the action runs, and writes nothing when one differs.\n */\n expected: EnterpriseContractTermsDto\n}\n\nexport interface DeleteManagedLlmTenantPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /**\n * The `metadata.llm.created` of the tenant that the person who asked READ,\n * in epoch milliseconds. Accounts compares it when the action runs, and\n * deletes nothing when the organization has another tenant.\n */\n tenantCreatedAt: number\n}\n\nexport interface LlmBudgetTopUpPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /**\n * The budget that the person who asked READ. Accounts compares it with the\n * budget when the action runs, and changes nothing when the two differ.\n */\n expectedBudget: number\n /** The spend that the person who asked read. The approver reads it. */\n spend: number\n /**\n * True when the person who asked confirmed a top-up with the spend below\n * `LLM_BUDGET_TOP_UP_THRESHOLD`. Without it, such a request fails when it\n * runs.\n */\n belowThreshold: boolean\n}\n\n/** One generation of a change-generation-versions request. */\nexport interface ChangeGenerationVersionsTargetDto {\n id: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n name?: string\n /**\n * A copy of the cluster count when the request was opened, for the\n * approver. Absent when the browser could not read it.\n */\n clusterCount?: number\n /**\n * The values that the person who asked READ, one for each key of\n * `versions`. Console changes nothing on this generation when one differs\n * at the run.\n */\n expectedVersions: GenerationImageVersionsDto\n}\n\n/**\n * The payload of a delete-cluster-corpses request, as a browser sends it.\n * control-backend reads the corpses of the kind from console and stores them\n * with the request, as the set that the approvers read.\n */\nexport interface DeleteClusterCorpsesPayloadDto {\n kind: ClusterCorpseKind\n}\n\nexport interface ChangeGenerationVersionsPayloadDto {\n generations: ChangeGenerationVersionsTargetDto[]\n /**\n * The image versions to write on every generation. Only the keys that\n * change are here. An empty string clears an optional one. No env var\n * field is here (see `GENERATION_ENV_VARS_KEYS`).\n */\n versions: GenerationImageVersionsDto\n}\n\n/**\n * The payload of an edit-generation request: the new name and env vars of\n * ONE generation, and the values that the person who asked READ.\n */\nexport interface EditGenerationPayloadDto {\n generationId: string\n /** The name that the person who asked READ. The stale guard of `name`. */\n expectedName: string\n /** The new name. Absent keeps the name. */\n name?: string\n /**\n * The env var text to write. Only the keys that change are here. An empty\n * string clears a field.\n */\n envVars: GenerationEnvVarsDto\n /** The text that the person who asked READ, one for each key of `envVars`. */\n expectedEnvVars: GenerationEnvVarsDto\n /**\n * A copy of the cluster count when the request was opened, for the\n * approver. Absent when the browser could not read it.\n */\n clusterCount?: number\n}\n\n/**\n * The payload of a force-delete-cluster-plan-type request, as a browser\n * sends it. control-backend reads the clusters of the type from console and\n * stores them with the request, as the set that the approvers read.\n */\nexport interface ForceDeleteClusterPlanTypePayloadDto {\n planTypeId: string\n}\n\n/**\n * The payload of a change-plan-type-retention-limits request, as a browser\n * sends it. control-backend reads the name of the plan type and the number\n * of its clusters from console and stores them with the request.\n */\nexport interface ChangePlanTypeRetentionLimitsPayloadDto {\n planTypeId: string\n /**\n * The new retention limits. They replace the limits of the plan type as a\n * whole, so a key that is absent goes back to its default.\n */\n limits: ClusterLimits\n /**\n * The limits of the plan type that the person READ. The request fails when\n * the plan type has other limits at create or at the run.\n */\n expectedLimits: ClusterLimits\n}\n\n/**\n * The payload of an automated-enterprise-onboarding request: the fields of\n * the accounts wizard \"New Enterprise Onboarding\".\n */\nexport interface AutomatedEnterpriseOnboardingPayloadDto {\n /** The prefix of the two organization names. */\n orgName: string\n sfdcId: string\n awsOnly: boolean\n renewalTermInMonths: number\n licensingModel: 'legacy' | '2025'\n /** The start of the subscription, `YYYY-MM-DD`. */\n startDate: string\n valueMetrics: {\n processInstances: number\n decisionInstances: number\n taskUsers: number\n tenants: number\n }\n reservations: {\n basic: number\n standard: number\n advanced: number\n }\n /** The person who becomes the owner of both organizations. */\n ownerEmail: string\n /** Months of activity history. Accounts sets 60 when this is missing. */\n activityRetentionMonths?: ActivityRetentionMonths\n}\n\n/** One cluster of the organization and the plan type it moves to. */\nexport interface OnboardToEnterpriseClusterDto {\n clusterId: string\n /** A copy, so the approver reads a name. Nothing reads it. */\n clusterName?: string\n planTypeId: string\n /** A copy of the name of the plan type, for the approver to read. */\n planTypeName?: string\n numberOfAllocatedHwPackages?: number\n keepModification: boolean\n}\n\nexport interface OnboardToEnterprisePayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n salesPlanId: string\n /** A copy of the name of the new plan, for the approver to read. */\n salesPlanName?: string\n /**\n * The plan that the person who asked READ. Accounts compares it with the\n * plan that it holds when the action runs, and switches nothing when the\n * two differ. An organization with no plan cannot be onboarded this way.\n */\n expectedSalesPlanId: string\n expectedSalesPlanName?: string\n contract: {\n /** The renewal term, in months. */\n duration: number\n includedValueMetrics: EnterpriseIncludingValueMetrics\n /** `YYYY-MM-DD`. */\n enterPriseStartDate: string\n enterpriseDevOnly: boolean\n awsOnly: boolean\n licensingModel: LicensingModelType\n salesForceId?: string\n /** Months of activity history. Control-backend sets 60 when this is missing. */\n activityRetentionMonths?: ActivityRetentionMonths\n }\n /** One entry for each cluster of the organization. Empty for none. */\n clusters: OnboardToEnterpriseClusterDto[]\n /** The reservations after the switch, by plan type uuid. */\n reservations: Record<string, number>\n /** The names of the plan types of `reservations`, for the approver. */\n reservationNames?: Record<string, string>\n}\n\nexport interface ChangeClusterPlanTypePayloadDto {\n clusterId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n clusterName?: string\n /** The organization that owns the cluster. Console refuses another one. */\n orgId: string\n /** A copy, for the same reason as `clusterName`. */\n orgName?: string\n toPlanTypeUuid: string\n /** A copy of the name of the new plan type, for the approver to read. */\n toPlanTypeName?: string\n /**\n * The hardware packages of the cluster after the change, 1 at least.\n *\n * Always sent, also for a plan type with no availability class, where it is\n * 1. Console checks the reservations of the organization only when the\n * packages are in the call, and the check is the point of this use case.\n */\n numberOfAllocatedHwPackages: number\n /**\n * The plan type that the person who asked READ.\n *\n * Console compares it with the plan type of the cluster when the action\n * runs, and changes nothing when the two differ.\n */\n expectedPlanTypeUuid: string\n /** A copy of the name of the current plan type, for the approver to read. */\n expectedPlanTypeName?: string\n /**\n * The hardware packages that the person who asked READ, 1 for a cluster\n * that holds none. The same stale guard as `expectedPlanTypeUuid`.\n */\n expectedNumberOfAllocatedHwPackages: number\n /**\n * The cluster plan that the person who asked READ. Console decides the\n * plan move from it, so it is part of the stale guard too, and Console\n * refuses a cluster that runs none, so a request needs one.\n */\n expectedClusterPlanUuid: string\n /** A copy of the name of that plan, for the approver to read. */\n expectedClusterPlanName?: string\n /**\n * The active modification config that the person who asked READ, absent\n * when the cluster has none. The change removes it, and an approver must\n * read which one goes.\n */\n expectedActiveModificationConfigUuid?: string\n /**\n * The active plan of the NEW plan type that the person who asked READ. The\n * cluster moves to it, so a plan that a Camundi changed on the type while\n * the request waited fails the guard, and Console refuses a type that has\n * none, so a request needs one.\n */\n expectedTargetPlanUuid: string\n /** A copy of the name of that plan, for the approver to read. */\n expectedTargetPlanName?: string\n /**\n * Whether the cluster plan moves to the active plan of the new type, as\n * the dialog read it. The list of migratable plans can change while the\n * request waits, and a verdict that moved changes whether the cluster\n * restarts, so Console refuses a request whose verdict moved.\n */\n expectedClusterPlanUpdate: boolean\n /**\n * Whether the active modification config of the cluster stays after the\n * change. Absent reads as false: the change removes it, and the approver\n * reads which one goes. The dialog shows what the config changes, so the\n * person who asks can choose.\n */\n keepModification?: boolean\n}\n\nexport interface RequestInNegotiationPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /** The in-negotiation plan to move to. */\n salesPlanId: string\n /** A copy of the name of the new plan, for the approver to read. */\n salesPlanName?: string\n /**\n * The trial plan that the person who asked READ. Accounts switches nothing\n * when the plan differs when the action runs.\n */\n expectedSalesPlanId: string\n /** A copy of the name of the current plan, for the approver to read. */\n expectedSalesPlanName?: string\n}\n\nexport interface ChangeLicensingModelPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /** The new licensing model. */\n licensingModel: LicensingModelType\n /**\n * The model that the person who asked READ. Absent for \"no model set\".\n * Accounts writes nothing when the model differs when the action runs.\n */\n expected?: LicensingModelType\n}\n\nexport interface ChangeSalesPlanPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n salesPlanId: string\n /** A copy of the name of the new plan, for the approver to read. */\n salesPlanName?: string\n /**\n * The plan that the person who asked READ. Absent for \"no plan\".\n *\n * Accounts compares it with the plan that it holds when the action runs,\n * and switches nothing when the two differ.\n */\n expectedSalesPlanId?: string\n /** A copy of the name of the current plan, for the approver to read. */\n expectedSalesPlanName?: string\n /** Skips the validation of the switch. The approver sees it. */\n force: boolean\n}\n\n/** Every value of a flag row that a person can change. */\nexport interface FeatureFlagValuesDto {\n description: string\n enabled: boolean\n orgIds: string[]\n emailDomains: string[]\n /** The team that owns the flag. A create needs it. An older row has none. */\n owner?: string\n /** `YYYY-MM-DD`, the day after which the flag is late. */\n expiresAt?: string\n /**\n * The issue that tracks the flag. A create and an edit need it. An older\n * row has none.\n */\n issueUrl?: string\n}\n\n/**\n * One change of the feature flag table: the action, and the whole row that it\n * asks for.\n *\n * An edit and a delete carry the row that the person who asked READ, as\n * `expected`. The action writes nothing when the row changed in the meantime.\n * `key` of an edit and a delete is a copy for the approver, and the action\n * compares it too.\n */\nexport type ChangeFeatureFlagPayloadDto =\n | {\n action: 'create'\n key: string\n value: FeatureFlagValuesDto & { owner: string; issueUrl: string }\n }\n | {\n action: 'update'\n id: string\n key: string\n expected: FeatureFlagValuesDto\n value: FeatureFlagValuesDto & { issueUrl: string }\n }\n | {\n action: 'delete'\n id: string\n key: string\n expected: FeatureFlagValuesDto\n }\n\n/**\n * Turns a flag that is on for everybody off. `expected` is the row that the\n * person READ. The action writes nothing when the row changed in the meantime.\n */\nexport interface DisableFeatureFlagPayloadDto {\n id: string\n key: string\n expected: FeatureFlagValuesDto\n}\n\nexport interface DeleteSsoConnectionPayloadDto {\n strategy: 'waad' | 'samlp'\n connectionId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n connectionName?: string\n /**\n * The organizations that the connection serves, as copies for the approver.\n * The request is findable on the page of each one.\n */\n orgIds?: string[]\n}\n\nexport interface DeleteOrganizationPayloadDto {\n orgId: string\n /**\n * The name that the approvers read. Accounts refuses the deletion when the\n * organization has another name when the action runs.\n */\n orgName: string\n}\n\nexport interface DeleteUserPayloadDto {\n userId: string\n /**\n * The address that the approvers read. Accounts refuses the deletion when\n * the user has another address when the action runs.\n */\n userEmail: string\n}\n\nexport interface RemoveOrgMemberPayloadDto {\n orgId: string\n userId: string\n /**\n * The address that the approvers read. Accounts refuses the removal when\n * the member has another address when the action runs.\n */\n userEmail: string\n /**\n * A member of the organization who becomes an owner before the removal.\n * Accounts refuses it with another address, as for `userEmail`.\n */\n newOwner?: { userId: string; userEmail: string }\n /** The member gets no email about the removal. */\n suppressEmail?: boolean\n}\n\nexport interface ChangeUserEmailPayloadDto {\n userId: string\n /**\n * The address that the person who asked READ. Accounts compares it with\n * the address that the user has when the action runs, and changes nothing\n * when the two differ.\n */\n expectedEmail: string\n newEmail: string\n}\n\nexport interface PurgeUsersPayloadDto {\n /**\n * The users to delete, at most `PURGE_USERS_MAX_USERS`. The address is a\n * copy for the approver, and accounts refuses a user whose address is not\n * that copy. A list that came from a file of ids carries none.\n */\n users: { userId: string; email?: string }[]\n}\n\nexport interface UpdateUserMetadataPayloadDto {\n userId: string\n /** A copy, so a list shows a person and not an Auth0 id. Nothing reads it. */\n userEmail?: string\n /** `app` writes `app_metadata`, `user` writes `user_metadata`. */\n kind: 'app' | 'user'\n /**\n * The metadata that the person who asked READ. Absent for \"not set\".\n * Accounts writes nothing when it holds another value when the action runs.\n */\n expected?: Record<string, unknown>\n metadata: Record<string, unknown>\n}\n\nexport interface DeleteInternalBackupPayloadDto {\n clusterId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n clusterName?: string\n backupName: string\n /** A copy of the Slack link of the incident, for the approver to read. */\n incidentLink?: string\n}\n\n/** See `deleteApiClientPayloadSchema` in control-backend. */\nexport interface DeleteApiClientPayloadDto {\n orgId: string\n /** The `uuid` of the client, not its OAuth `clientId`. */\n clientUuid: string\n}\n\n/**\n * The query string of a read, with the fields that carry no value dropped.\n *\n * An empty value is not the same as an absent one: `q=` would reach the schema\n * of control-backend, which holds the text at one character and answers 400.\n * A list goes as one comma list, which is the form control-backend reads for\n * `type`. An empty list is dropped like an empty text.\n */\nfunction querySuffix(params: object = {}): string {\n const query = new URLSearchParams()\n for (const [key, raw] of Object.entries(params)) {\n const value = Array.isArray(raw) ? raw.join(',') : raw\n if (value !== undefined && value !== '') {\n query.set(key, String(value))\n }\n }\n return query.size > 0 ? `?${query.toString()}` : ''\n}\n\nfunction contextFor(\n name: string,\n url: string,\n normalizedUrl: string,\n type: 'get' | 'post',\n source: string,\n): RequestBaseServiceContext {\n return {\n method: {\n name: `ControlApprovalsService.${name}`,\n url,\n normalizedUrl,\n type,\n },\n source,\n target: { name: 'control', type: 'internal' },\n }\n}\n\nexport class ControlApprovalsService {\n /**\n * The registered privileged actions, with the rules that guard each one.\n *\n * A frontend reads this to run the same policy as the service, so it never\n * holds a copy of the registry. A new use case then needs no frontend\n * deploy.\n */\n public static async listUseCases(\n params: RequestBaseParams,\n ): Promise<ApprovalUseCaseDto[]> {\n const serviceContext = contextFor(\n 'listUseCases',\n 'api/approvals/use-cases',\n 'api/approvals/use-cases',\n 'get',\n params.config.metrics?.source || 'unset',\n )\n const response = await request<{ useCases: ApprovalUseCaseDto[] }>({\n config: params.config,\n base: BASE,\n url: serviceContext.method.url,\n method: 'get',\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!.useCases\n }\n\n /**\n * One page of the requests that the caller can read.\n *\n * It is not the whole table: control-backend hides a request whose use case\n * the caller cannot act on, unless the caller opened it.\n */\n public static async list(\n params: ListApprovalsRequest,\n ): Promise<ApprovalPageDto> {\n const suffix = querySuffix(params.params)\n const serviceContext = contextFor(\n 'list',\n `api/approvals${suffix}`,\n 'api/approvals',\n 'get',\n params.config.metrics?.source || 'unset',\n )\n const response = await request<ApprovalPageDto>({\n config: params.config,\n base: BASE,\n url: serviceContext.method.url,\n method: 'get',\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 * How many requests each status holds, for the status filters of a queue.\n *\n * It is the same question as `list` without the status, so a filter that\n * shows a number never opens an empty page.\n */\n public static async counts(\n params: CountApprovalsRequest,\n ): Promise<ApprovalStatusCountsDto> {\n const suffix = querySuffix(params.params)\n const serviceContext = contextFor(\n 'counts',\n `api/approvals/counts${suffix}`,\n 'api/approvals/counts',\n 'get',\n params.config.metrics?.source || 'unset',\n )\n const response = await request<{ counts: ApprovalStatusCountsDto }>({\n config: params.config,\n base: BASE,\n url: serviceContext.method.url,\n method: 'get',\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!.counts\n }\n\n public static async get(params: ApprovalIdRequest): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'get',\n `api/approvals/${params.params.id}`,\n 'api/approvals/:id',\n 'get',\n )\n }\n\n /**\n * What a create route answers, plus whether it opened a NEW request.\n *\n * The route answers 201 for a fresh request and 200 for the one already\n * open for the same target \u2014 `create` deduplicates. A caller that must\n * tell the two apart (a floor-of-one use case, where 200 is the ordinary\n * path and not a failure) reads `created`.\n */\n public static async createMoveClusterOrg(\n params: CreateApprovalRequest<MoveClusterOrgPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createMoveClusterOrg',\n 'api/approvals/move-cluster-org',\n )\n }\n\n /**\n * Opens a cluster bulk operation of one type.\n *\n * Each type is its own use case with its own route, because each one has\n * its own permission. The floor of approvals depends on the stage: 2 on\n * prod and 1 on dev, int and local, and 3 and 2 for a deletion. The\n * route is `api/approvals/<use case>`, as for every other use case. A 200\n * means that the same operation over the same clusters is already open.\n */\n public static async createClusterBulkOperation<\n T extends ClusterBulkOperationType,\n >(\n type: T,\n params: CreateApprovalRequest<ClusterBulkOperationPayloadDto<T>>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n const useCase = CLUSTER_BULK_OPERATION_RULES[type].useCase\n return ControlApprovalsService.create(\n params,\n 'createClusterBulkOperation',\n `api/approvals/${useCase}`,\n )\n }\n\n /**\n * Opens a change-platform-roles request.\n *\n * Opening one needs `accounts:admin:changeRole`, the same permission that\n * approving needs, and the reason is necessary. A 200 means that a request\n * for the same user is already open.\n */\n public static async createChangePlatformRoles(\n params: CreateApprovalRequest<ChangePlatformRolesPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangePlatformRoles',\n 'api/approvals/change-platform-roles',\n )\n }\n\n /**\n * Opens a delete-internal-backup request.\n *\n * Opening one needs `console:clusters:canCreateInternalBackup`, the same\n * permission that approving needs. A 200 means that a request for the same\n * backup is already open.\n */\n public static async createDeleteInternalBackup(\n params: CreateApprovalRequest<DeleteInternalBackupPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteInternalBackup',\n 'api/approvals/delete-internal-backup',\n )\n }\n\n /**\n * Opens a delete-api-client request.\n *\n * Opening one needs `console:apiClient:delete`, the same permission that\n * approving needs. A 200 means that a request for the same client is\n * already open.\n */\n public static async createDeleteApiClient(\n params: CreateApprovalRequest<DeleteApiClientPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteApiClient',\n 'api/approvals/delete-api-client',\n )\n }\n\n /**\n * Opens a change-org-limits request.\n *\n * Opening one needs `accounts:admin:mayChangeOrgLimits`, the same\n * permission that approving needs. A 200 means that a request for the same\n * limit of the same organization is already open.\n */\n public static async createChangeOrgLimits(\n params: CreateApprovalRequest<ChangeOrgLimitsPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeOrgLimits',\n 'api/approvals/change-org-limits',\n )\n }\n\n /**\n * Opens a change-enterprise-contract request.\n *\n * Opening one needs `aeom` (`enterprise.org.modify`), the same permission\n * that approving needs, and also `aeos` (`enterprise.org.modifyStartDate`)\n * for a new start date. A 200 means that a request for the same\n * organization is already open.\n */\n public static async createChangeEnterpriseContract(\n params: CreateApprovalRequest<ChangeEnterpriseContractPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeEnterpriseContract',\n 'api/approvals/change-enterprise-contract',\n )\n }\n\n /**\n * Opens a llm-budget-top-up request.\n *\n * Opening one needs `accounts:admin:mayChangeOrgLimits`, the same\n * permission that approving needs. A 200 means that a request for the same\n * organization is already open.\n */\n public static async createLlmBudgetTopUp(\n params: CreateApprovalRequest<LlmBudgetTopUpPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createLlmBudgetTopUp',\n 'api/approvals/llm-budget-top-up',\n )\n }\n\n /**\n * Opens a delete-managed-llm-tenant request.\n *\n * Opening one needs `accounts:admin:mayChangeOrgLimits`, the same\n * permission that approving needs. A 200 means that a request for the same\n * organization is already open.\n */\n public static async createDeleteManagedLlmTenant(\n params: CreateApprovalRequest<DeleteManagedLlmTenantPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteManagedLlmTenant',\n 'api/approvals/delete-managed-llm-tenant',\n )\n }\n\n /**\n * Opens a delete-sso-connection request.\n *\n * Opening one needs `AccountsPermissions.ADMIN_AUTH0_CONNECTIONS_DELETE`, the same\n * permission that approving needs. A 200 means that a request for the same\n * connection is already open.\n */\n public static async createDeleteSsoConnection(\n params: CreateApprovalRequest<DeleteSsoConnectionPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteSsoConnection',\n 'api/approvals/delete-sso-connection',\n )\n }\n\n /**\n * Opens an onboard-to-enterprise request.\n *\n * Opening one needs `AccountsPermissions.ENTERPRISE_ORG_CONVERT`, the same\n * permission that approving needs. A 200 means that a request for the same\n * organization is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createOnboardToEnterprise(\n params: CreateApprovalRequest<OnboardToEnterprisePayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createOnboardToEnterprise',\n 'api/approvals/onboard-to-enterprise',\n )\n }\n\n /**\n * Opens a change-sales-plan request.\n *\n * Opening one needs `AccountsPermissions.SALES_PLAN_SWITCH`, the same\n * permission that approving needs. A 200 means that a request for the same\n * organization is already open.\n */\n public static async createChangeSalesPlan(\n params: CreateApprovalRequest<ChangeSalesPlanPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeSalesPlan',\n 'api/approvals/change-sales-plan',\n )\n }\n\n /**\n * Opens a request to move a trial organization to an in-negotiation plan.\n *\n * Opening one needs `AccountsPermissions.READ_ALL`.\n * A holder of `SALES_PLAN_SWITCH` approves it, and the last approval runs\n * it.\n */\n public static async createRequestInNegotiation(\n params: CreateApprovalRequest<RequestInNegotiationPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createRequestInNegotiation',\n 'api/approvals/request-in-negotiation',\n )\n }\n\n /**\n * Opens a change-licensing-model request.\n *\n * Opening one needs `aeoc` (`enterprise.org.convert`), the same permission\n * that approving needs. A 200 means that a request for the same\n * organization is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createChangeLicensingModel(\n params: CreateApprovalRequest<ChangeLicensingModelPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeLicensingModel',\n 'api/approvals/change-licensing-model',\n )\n }\n\n /**\n * Opens a change-generation-versions request.\n *\n * Opening one needs `ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN`,\n * the same permission that approving needs. A 200 means that a request\n * over the same generations is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createChangeGenerationVersions(\n params: CreateApprovalRequest<ChangeGenerationVersionsPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeGenerationVersions',\n 'api/approvals/change-generation-versions',\n )\n }\n\n /**\n * Opens an edit-generation request.\n *\n * Opening one needs `ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN`,\n * the same permission that approving needs. A 200 means that a request\n * over the same generation is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createEditGeneration(\n params: CreateApprovalRequest<EditGenerationPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createEditGeneration',\n 'api/approvals/edit-generation',\n // The payload holds env var text.\n { redactBody: true },\n )\n }\n\n /**\n * Opens a delete-cluster-corpses request.\n *\n * Opening one needs `ConsolePermissions.CLUSTERS_DELETE_CLUSTER`, the same\n * permission that approving needs. A 200 means that a request for the same\n * kind is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off, 409 when console has no corpse\n * that a request can take, and 412 when console does not answer its\n * corpses.\n */\n public static async createDeleteClusterCorpses(\n params: CreateApprovalRequest<DeleteClusterCorpsesPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteClusterCorpses',\n 'api/approvals/delete-cluster-corpses',\n )\n }\n\n /**\n * Opens a force-delete-cluster-plan-type request.\n *\n * Opening one needs `ConsolePermissions.CLUSTER_PLAN_TYPE_FORCE_DELETE`,\n * the same permission that approving needs. A 200 means that a request for\n * the same plan type is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off or when console does not know\n * the plan type, 409 when no cluster uses the type or more than the cap do,\n * and 412 when console does not answer its clusters.\n */\n public static async createForceDeleteClusterPlanType(\n params: CreateApprovalRequest<ForceDeleteClusterPlanTypePayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createForceDeleteClusterPlanType',\n 'api/approvals/force-delete-cluster-plan-type',\n )\n }\n\n /**\n * Opens a change-plan-type-retention-limits request.\n *\n * Opening one needs `ConsolePermissions.CLUSTER_PLAN_TYPE_MODIFY`, the same\n * permission that approving needs. A 200 means that a request for the same\n * plan type is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off or when console does not know the\n * plan type, 400 when a new limit is out of bounds or the request removes\n * the unified data retention of the plan type, 409 when the limits of the\n * plan type are not the expected limits or are the new limits already, and\n * 412 when the answer of console does not hold a name, the limits and a\n * number of clusters.\n */\n public static async createChangePlanTypeRetentionLimits(\n params: CreateApprovalRequest<ChangePlanTypeRetentionLimitsPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangePlanTypeRetentionLimits',\n 'api/approvals/change-plan-type-retention-limits',\n )\n }\n\n /**\n * Opens an automated-enterprise-onboarding request.\n *\n * Opening one needs `AccountsPermissions.ENTERPRISE_ORG_CONVERT`, the same\n * permission that approving needs. A 200 means that a request with the\n * same organization name is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createAutomatedEnterpriseOnboarding(\n params: CreateApprovalRequest<AutomatedEnterpriseOnboardingPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createAutomatedEnterpriseOnboarding',\n 'api/approvals/automated-enterprise-onboarding',\n )\n }\n\n /**\n * Opens a change-cluster-plan-type request.\n *\n * Opening one needs `ConsolePermissions.CLUSTERS_CAN_UPDATE_CLUSTERPLANTYPE`,\n * the same permission that approving needs. A 200 means that a request for\n * the same cluster is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createChangeClusterPlanType(\n params: CreateApprovalRequest<ChangeClusterPlanTypePayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeClusterPlanType',\n 'api/approvals/change-cluster-plan-type',\n )\n }\n\n /**\n * Opens a delete-organization request.\n *\n * Opening one needs `AccountsPermissions.DELETE_ORG`, the same permission\n * that approving needs. A 200 means that a request for the same\n * organization is already open.\n */\n public static async createDeleteOrganization(\n params: CreateApprovalRequest<DeleteOrganizationPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteOrganization',\n 'api/approvals/delete-organization',\n )\n }\n\n /**\n * Opens a delete-user request.\n *\n * Opening one needs `AccountsPermissions.DELETE_USER`, the same permission\n * that approving needs. A 200 means that a request for the same user is\n * already open.\n */\n public static async createDeleteUser(\n params: CreateApprovalRequest<DeleteUserPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteUser',\n 'api/approvals/delete-user',\n )\n }\n\n /**\n * Opens a remove-org-member request.\n *\n * Opening one needs `AccountsPermissions.REMOVE_FROM_ORG_WITH_APPROVAL`,\n * with or without a new owner. The same permission approves it. A 200 means that a request for the same member is already\n * open.\n */\n public static async createRemoveOrgMember(\n params: CreateApprovalRequest<RemoveOrgMemberPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createRemoveOrgMember',\n 'api/approvals/remove-org-member',\n )\n }\n\n /**\n * Opens a change-user-email request.\n *\n * Opening one needs `AccountsPermissions.ADMIN_CHANGE_EMAIL`, the same\n * permission that approving needs. A 200 means that a request for the same\n * user is already open.\n */\n public static async createChangeUserEmail(\n params: CreateApprovalRequest<ChangeUserEmailPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeUserEmail',\n 'api/approvals/change-user-email',\n )\n }\n\n /**\n * Opens a purge-users request.\n *\n * Opening one needs `AccountsPermissions.GOD_PURGE_USERS` and\n * `AccountsPermissions.DELETE_USER`, the same permissions that approving\n * needs. A 200 means that a request for the same set of users is already\n * open.\n */\n public static async createPurgeUsers(\n params: CreateApprovalRequest<PurgeUsersPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createPurgeUsers',\n 'api/approvals/purge-users',\n )\n }\n\n /**\n * Opens an update-user-metadata request.\n *\n * Opening one needs `AccountsPermissions.GOD_UPDATE_USER_METADATA`, the\n * same permission that approving needs. A 200 means that a request for the\n * same user and the same kind of metadata is already open.\n */\n public static async createUpdateUserMetadata(\n params: CreateApprovalRequest<UpdateUserMetadataPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createUpdateUserMetadata',\n 'api/approvals/update-user-metadata',\n )\n }\n\n /**\n * Opens a change-feature-flag request.\n *\n * On int and prod, opening one needs `aafr` or `aafw`, and approving one\n * needs `aafw`.\n * On dev anybody signed in can open one. A 200 means that a request for the\n * same flag is already open. On int and prod this is the only way to change\n * a flag.\n */\n public static async createChangeFeatureFlag(\n params: CreateApprovalRequest<ChangeFeatureFlagPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeFeatureFlag',\n 'api/approvals/change-feature-flag',\n )\n }\n\n /**\n * Opens a disable-feature-flag request: a flag that is on for everybody goes\n * off. It needs fewer approvals than a change-feature-flag request.\n */\n public static async createDisableFeatureFlag(\n params: CreateApprovalRequest<DisableFeatureFlagPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDisableFeatureFlag',\n 'api/approvals/disable-feature-flag',\n )\n }\n\n /**\n * Opens a release-train publish request. The caller sends no `preview`:\n * control-backend reads it from console when the request opens.\n */\n public static async createReleaseTrainPublish(\n params: CreateApprovalRequest<Omit<ReleaseTrainPublishPayload, 'preview'>>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createReleaseTrainPublish',\n 'api/approvals/release-train-publish',\n )\n }\n\n /** Opens a release-train rollback request. The caller sends no `preview`. */\n public static async createReleaseTrainRollback(\n params: CreateApprovalRequest<Omit<ReleaseTrainRollbackPayload, 'preview'>>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createReleaseTrainRollback',\n 'api/approvals/release-train-rollback',\n )\n }\n\n /** Adds the approval of the caller. The last one can run the action. */\n public static async acknowledge(\n params: ApprovalIdRequest,\n ): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'acknowledge',\n `api/approvals/${params.params.id}/ack`,\n 'api/approvals/:id/ack',\n 'post',\n )\n }\n\n /** Closes a request without running the action. The reason is necessary. */\n public static async reject(\n params: RejectApprovalRequest,\n ): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'reject',\n `api/approvals/${params.params.id}/reject`,\n 'api/approvals/:id/reject',\n 'post',\n { reason: params.params.reason },\n )\n }\n\n /**\n * Takes back a request. Only the person who opened it can.\n *\n * The reason is optional, and it lands in the same field that a rejection\n * writes. The creator cannot reject their own request, so this is where they\n * say why they closed it.\n */\n public static async withdraw(\n params: WithdrawApprovalRequest,\n ): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'withdraw',\n `api/approvals/${params.params.id}/withdraw`,\n 'api/approvals/:id/withdraw',\n 'post',\n params.params.reason ? { reason: params.params.reason } : undefined,\n )\n }\n\n /**\n * Runs a request that holds its approvals.\n *\n * Only a use case in the explicit mode needs this. An action that throws\n * leaves the request `failed`, and this call still answers 200 with it, so\n * read `status` and `executionError` of the answer.\n */\n public static async execute(\n params: ApprovalIdRequest,\n ): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'execute',\n `api/approvals/${params.params.id}/execute`,\n 'api/approvals/:id/execute',\n 'post',\n )\n }\n\n /**\n * Runs a `pending` request with the approval override grant of the caller,\n * in place of the approvals that it still needs. control-backend answers\n * 404 while `control.approvalOverride` is off.\n */\n public static async override(\n params: OverrideApprovalRequest,\n ): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'override',\n `api/approvals/${params.params.id}/override`,\n 'api/approvals/:id/override',\n 'post',\n { reason: params.params.reason },\n )\n }\n\n /**\n * Opens a grant-approval-override request. Opening one needs\n * `accounts:admin:changeRole`, and it needs two approvals. A 200 means\n * that a request for the same grantee is already open.\n */\n public static async createGrantApprovalOverride(\n params: CreateApprovalRequest<GrantApprovalOverridePayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createGrantApprovalOverride',\n 'api/approvals/grant-approval-override',\n )\n }\n\n /**\n * The approval override grant of the caller that is active now, or\n * `undefined`. control-backend answers 404 while `control.approvalOverride`\n * is off.\n */\n public static async getMyOverrideGrant(\n params: RequestBaseParams,\n ): Promise<ApprovalOverrideGrantDto | undefined> {\n const serviceContext = contextFor(\n 'getMyOverrideGrant',\n 'api/approvals/override-grants/me',\n 'api/approvals/override-grants/me',\n 'get',\n params.config.metrics?.source || 'unset',\n )\n const response = await request<{ grant?: ApprovalOverrideGrantDto }>({\n config: params.config,\n base: BASE,\n url: serviceContext.method.url,\n method: 'get',\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?.grant\n }\n\n /** Opens a send-to-expired-trial request. Any signed-in Camundi can. */\n public static async createSendToExpiredTrial(\n params: CreateApprovalRequest<SendToExpiredTrialPayloadDto>,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createSendToExpiredTrial',\n 'api/approvals/send-to-expired-trial',\n )\n return approval\n }\n\n /**\n * Opens an extend-trial request.\n *\n * Opening one needs `accounts:admin:extendTrial`. The opener gives the one\n * approval, so no reason is necessary and the answer already holds the\n * outcome.\n */\n public static async createExtendTrial(\n params: CreateExtendTrialRequest,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createExtendTrial',\n 'api/approvals/extend-trial',\n )\n return approval\n }\n\n /**\n * Opens a create-personal-organisation request. Any signed-in Camundi can.\n *\n * The request needs no approval, so the answer already holds the outcome,\n * and the route answers 404 while `control.personalOrganisation` is off.\n */\n public static async createPersonalOrganisation(\n params: CreatePersonalOrganisationRequest,\n ): Promise<ApprovalJobDto> {\n // The route answers 429 for the cap, and the cap does not go away. `request`\n // tries a 429 up to 8 times with growing waits, so a person at the cap\n // would wait minutes for the message. A rate limit of the service is a\n // retry that the person can press.\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createPersonalOrganisation',\n 'api/approvals/create-personal-organisation',\n { retryRateLimit: false },\n )\n return approval\n }\n\n /**\n * Opens a cluster-ttl-deletion request. Only the delete cron of\n * console-backend can, with an m2m token that holds `cmctd`.\n *\n * The request needs no approval, so the answer already holds the outcome.\n * For a cluster with a live request, the answer is that request.\n */\n public static async createClusterTtlDeletion(\n params: CreateClusterTtlDeletionRequest,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createClusterTtlDeletion',\n 'api/approvals/cluster-ttl-deletion',\n )\n return approval\n }\n\n /**\n * Opens a create-custom-hardware-sizing request. Any signed-in Camundi\n * can. It runs on dev only, needs no approval, and the route answers 403\n * on every other stage.\n */\n public static async createCustomHardwareSizing(\n params: SelfServiceApprovalRequest<\n CreateCustomHardwareSizingPayloadDto | LinkCustomHardwareSizingPayloadDto\n >,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createCustomHardwareSizing',\n 'api/approvals/create-custom-hardware-sizing',\n )\n return approval\n }\n\n /** Opens a remove-custom-hardware-sizing request. See the one above. */\n public static async removeCustomHardwareSizing(\n params: SelfServiceApprovalRequest<RemoveCustomHardwareSizingPayloadDto>,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'removeCustomHardwareSizing',\n 'api/approvals/remove-custom-hardware-sizing',\n )\n return approval\n }\n\n /** Opens a create-custom-generation request. Dev only, no approval. */\n public static async createCustomGeneration(\n params: SelfServiceApprovalRequest<\n CreateCustomGenerationPayloadDto | LinkCustomGenerationPayloadDto\n >,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createCustomGeneration',\n 'api/approvals/create-custom-generation',\n )\n return approval\n }\n\n /** Opens a remove-custom-generation request. See the one above. */\n public static async removeCustomGeneration(\n params: SelfServiceApprovalRequest<RemoveCustomGenerationPayloadDto>,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'removeCustomGeneration',\n 'api/approvals/remove-custom-generation',\n )\n return approval\n }\n\n /**\n * Opens a self-service-cluster-modification request. Any signed-in Camundi\n * can, and accounts then checks that the Camundi owns the organization. It\n * runs on dev only and needs no approval, so the answer holds the outcome.\n * A 200 means that the same request of this person still runs.\n */\n public static async createSelfServiceClusterModification(\n params: SelfServiceApprovalRequest<SelfServiceClusterModificationPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createSelfServiceClusterModification',\n 'api/approvals/self-service-cluster-modification',\n )\n }\n\n /**\n * The shared half of every call that answers one request.\n *\n * Six routes answer `{ approval }` and differ only in the verb and the path.\n * One private helper keeps the metrics context, the status check and the\n * unwrapping in one place.\n */\n private static async readOne(\n params: RequestBaseParams,\n name: string,\n url: string,\n normalizedUrl: string,\n method: 'get' | 'post',\n body?: Record<string, unknown>,\n ): Promise<ApprovalJobDto> {\n const serviceContext = contextFor(\n name,\n url,\n normalizedUrl,\n method,\n params.config.metrics?.source || 'unset',\n )\n const response = await request<{ approval: ApprovalJobDto }>({\n config: params.config,\n base: BASE,\n url,\n method,\n metricsDetails: serviceContext,\n body,\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!.approval\n }\n\n /**\n * The shared half of every create route. See `approvalRequestBody`.\n *\n * The route answers 201 for a fresh request and 200 for the one already\n * open for the same target (`create` deduplicates). `created` carries that\n * difference. `createSendToExpiredTrial` and `createExtendTrial` do not\n * need it, so they read `approval` alone off this result.\n */\n private static async create<TPayload>(\n params: CreateApprovalRequest<TPayload>,\n name: string,\n url: string,\n options: {\n /** False sends the call once, also when the answer is a 429. */\n retryRateLimit?: boolean\n /** True masks every value of the body in the log lines. */\n redactBody?: boolean\n } = {},\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n const serviceContext = contextFor(\n name,\n url,\n url,\n 'post',\n params.config.metrics?.source || 'unset',\n )\n const response = await request<{ approval: ApprovalJobDto }>({\n config: params.config,\n base: BASE,\n url,\n method: 'post',\n metricsDetails: serviceContext,\n ...(options.retryRateLimit === false\n ? { retry: { attempts: 1, remaining: 0 } }\n : {}),\n redactBody: options.redactBody,\n body: {\n payload: params.params.payload,\n // control-backend accepts no reason, but it refuses an empty one\n // (`min(1)`). A dialog sends the text of its textarea, so a blank\n // text must leave the field out.\n reason: params.params.reason?.trim() ? params.params.reason : undefined,\n requiredAcks: params.params.requiredAcks,\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 {\n approval: response.body!.approval,\n created: response.status === 201,\n }\n }\n}\n"],
5
- "mappings": "AA6BA,SAAS,oCAAoC;AAK7C,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAe1B,MAAM,OAAO,EAAE,IAAI,UAAU;AAgzB7B,SAAS,YAAY,SAAiB,CAAC,GAAW;AAChD,QAAM,QAAQ,IAAI,gBAAgB;AAClC,aAAW,CAAC,KAAK,GAAG,KAAK,OAAO,QAAQ,MAAM,GAAG;AAC/C,UAAM,QAAQ,MAAM,QAAQ,GAAG,IAAI,IAAI,KAAK,GAAG,IAAI;AACnD,QAAI,UAAU,UAAa,UAAU,IAAI;AACvC,YAAM,IAAI,KAAK,OAAO,KAAK,CAAC;AAAA,IAC9B;AAAA,EACF;AACA,S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AAS,UAAU;AAAA,IACnC;AACA,UAAM,WAAW,MAAM,QAAsC;AAAA,MAC3D,QAAQ,OAAO;AAAA,MACf,MAAM;AAAA,MACN;AAAA,MACA,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,GAAI,QAAQ,mBAAmB,QAC3B,EAAE,OAAO,EAAE,UAAU,GAAG,WAAW,EAAE,EAAE,IACvC,CAAC;AAAA,MACL,YAAY,QAAQ;AAAA,MACpB,MAAM;AAAA,QACJ,SAAS,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA,QAIvB,QAAQ,OAAO,OAAO,QAAQ,KAAK,IAAI,OAAO,OAAO,SAAS;AAAA,QAC9D,cAAc,OAAO,OAAO;AAAA,MAC9B;AAAA,IACF,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;AAAA,MACL,UAAU,SAAS,KAAM;AAAA,MACzB,SAAS,SAAS,WAAW;AAAA,IAC/B;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 ActivityRetentionMonths,\n ApprovalEntityType,\n ApprovalJobDto,\n ApprovalJobStatus,\n ApprovalOverrideGrantDto,\n ApprovalSortField,\n ApprovalSortOrder,\n ApprovalStatusCountsDto,\n ApprovalUseCaseDto,\n ClusterBulkOperationPayloadDto,\n ClusterBulkOperationType,\n ClusterCorpseKind,\n ClusterLimits,\n ClusterPlanModificationConfig,\n ClusterTtlDeletionPayload,\n EnterpriseIncludingValueMetrics,\n GenerationEnvVarsDto,\n GenerationImageVersionsDto,\n LicensingModelType,\n ReleaseTrainPublishPayload,\n ReleaseTrainRollbackPayload,\n} from '@camunda/ccma-shared-types'\nimport { CLUSTER_BULK_OPERATION_RULES } 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\n/**\n * The four-eyes approval surface of control-backend.\n *\n * One service for the whole mechanism, and not one for each use case. The\n * generic routes (list, read, approve, reject, withdraw, run) carry no\n * knowledge of a use case, which is what lets one view in control-frontend\n * show every privileged action. Only the create calls are per use case,\n * because a payload can be validated only for the use case it belongs to.\n *\n * A use case that walks its own rollout behind a flag answers 404 on its\n * create route while that flag is off.\n */\n\nconst BASE = { id: 'control' } as const\n\nexport interface ApprovalPageDto {\n approvals: ApprovalJobDto[]\n page: {\n limit: number\n offset: number\n /** True when the next page holds more. Never read the length instead. */\n hasMore: boolean\n }\n}\n\n/**\n * What narrows the queue. The list and the counts read the same fields.\n *\n * `entityType` and `entityId` are ONE filter, not two. control-backend answers\n * 400 for one without the other, so the type carries both or neither.\n */\nexport type ApprovalFacetParams = {\n /** One use case type, or more. A request matches when its type is any of them. */\n type?: string | readonly string[]\n /**\n * One organization, matched whole against `orgId` of the payload.\n *\n * It reads only the payload, so `entityType`/`entityId` is wider. That filter\n * reads the entity link, so it finds a request that touches the organization\n * through another field. The organization page of control-frontend asks the\n * entity-link filter, not this one. `orgId` is also not `q`: the free text\n * reads the whole payload as text.\n */\n orgId?: string\n /**\n * Free text. control-backend matches it in the reason, the person who\n * opened the request, the action and its label, and the payload that the\n * summary shows.\n */\n q?: string\n /**\n * The queue of one person: what they opened, or what waits for them.\n *\n * `actionable` is the rule of the Approve button asked in SQL \u2014 pending,\n * opened by somebody else, not approved by this person yet, and guarded by\n * permissions that they hold.\n */\n mine?: 'created' | 'actionable'\n} & (\n | {\n /**\n * The kind of entity a request must touch. Read with `entityId`.\n *\n * It reads the entity link of control-backend, so it is wider and truer\n * than `orgId`: a cluster-move request answers for its source\n * organization, its target organization AND the cluster. The organization\n * and cluster detail pages of control-frontend ask this.\n */\n entityType: ApprovalEntityType\n /** The id of the entity a request must touch. Read with `entityType`. */\n entityId: string\n }\n | { entityType?: never; entityId?: never }\n)\n\nexport interface ListApprovalsRequest extends RequestBaseParams {\n params?: ApprovalFacetParams & {\n status?: ApprovalJobStatus\n /**\n * An ISO 8601 instant. Only the requests that changed at or after it: the\n * last write of the request, or the run of its action. A control-backend\n * from before this parameter ignores it and answers every request.\n */\n updatedSince?: string\n sort?: ApprovalSortField\n order?: ApprovalSortOrder\n limit?: number\n offset?: number\n }\n}\n\nexport interface CountApprovalsRequest extends RequestBaseParams {\n params?: ApprovalFacetParams\n}\n\nexport interface ApprovalIdRequest extends RequestBaseParams {\n params: { id: string }\n}\n\nexport interface RejectApprovalRequest extends RequestBaseParams {\n params: { id: string; reason: string }\n}\n\n/** A withdrawal says why, or says nothing. The reason is not demanded. */\nexport interface WithdrawApprovalRequest extends RequestBaseParams {\n params: { id: string; reason?: string }\n}\n\n/** The envelope that every create route of every use case shares. */\nexport interface CreateApprovalRequest<TPayload> extends RequestBaseParams {\n params: {\n payload: TPayload\n reason?: string\n /** More approvals than the floor of the use case. Never fewer. */\n requiredAcks?: number\n }\n}\n\n/** An override needs a reason, which goes to the audit trail. */\nexport interface OverrideApprovalRequest extends RequestBaseParams {\n params: { id: string; reason: string }\n}\n\nexport interface GrantApprovalOverridePayloadDto {\n /** The Camundi who gets the grant. It can be the person who asks. */\n granteeEmail: string\n /** At most `APPROVAL_OVERRIDE_MAX_HOURS`, counted from the run. */\n durationHours: number\n}\n\nexport interface SendToExpiredTrialPayloadDto {\n orgId: string\n orgName?: string\n}\n\nexport interface CreatePersonalOrganisationPayloadDto {\n /** 3 to 100 characters, after the spaces at both ends are cut. */\n name: string\n}\n\n/**\n * The create call of `create-personal-organisation`.\n *\n * It has no `requiredAcks`: the request needs no approval, and the route\n * answers 400 to a body that names the field.\n */\nexport interface CreatePersonalOrganisationRequest extends RequestBaseParams {\n params: {\n payload: CreatePersonalOrganisationPayloadDto\n reason?: string\n }\n}\n\n/** The create call of `extend-trial`. It has no `requiredAcks`. */\nexport interface CreateExtendTrialRequest extends RequestBaseParams {\n params: {\n payload: ExtendTrialPayloadDto\n reason?: string\n }\n}\n\n/** The create call of `cluster-ttl-deletion`. It has no `requiredAcks`. */\nexport interface CreateClusterTtlDeletionRequest extends RequestBaseParams {\n params: {\n payload: ClusterTtlDeletionPayload\n reason?: string\n }\n}\n\nexport interface CreateCustomHardwareSizingPayloadDto {\n /** The organization that gets the plan. The requester must own it. */\n orgId: string\n /** 3 to 100 characters, after the spaces at both ends are cut. */\n name: string\n /** The cluster plan, in the same format as the plan route of the admin tool. */\n plan: Record<string, unknown>\n clusterPlanId?: never\n}\n\n/** An existing cluster plan. Nothing is created: it is added to the list of the organization. */\nexport interface LinkCustomHardwareSizingPayloadDto {\n /** The organization that gets the plan. The requester must own it. */\n orgId: string\n clusterPlanId: string\n name?: never\n plan?: never\n}\n\n/**\n * `unlink` removes the plan from one organization that the requester owns.\n * `delete` removes it from every organization of the requester, and deletes it.\n */\nexport type RemoveCustomHardwareSizingPayloadDto =\n | { mode: 'unlink'; clusterPlanId: string; orgId: string }\n | { mode: 'delete'; clusterPlanId: string }\n\nexport interface CreateCustomGenerationPayloadDto {\n /** The organization that gets the generation. The requester must own it. */\n orgId: string\n /** 3 to 100 characters, after the spaces at both ends are cut. */\n name: string\n /** The images and env vars, in the format of the generation route of the admin tool. */\n versions: Record<string, string>\n /** Generations whose clusters can upgrade to this one. */\n upgradeableFrom?: string[]\n generationId?: never\n}\n\n/** An existing generation. Nothing is created: it is added to the list of the organization. */\nexport interface LinkCustomGenerationPayloadDto {\n /** The organization that gets the generation. The requester must own it. */\n orgId: string\n generationId: string\n name?: never\n versions?: never\n upgradeableFrom?: never\n}\n\n/**\n * `unlink` removes the generation from one organization that the requester\n * owns. `delete` removes it from every organization of the requester, and\n * deletes it.\n */\nexport type RemoveCustomGenerationPayloadDto =\n | { mode: 'unlink'; generationId: string; orgId: string }\n | { mode: 'delete'; generationId: string }\n\n/**\n * `apply` applies a new config to a cluster of an organization that the\n * requester owns, and the new config replaces the active config. `deactivate`\n * deactivates the active config `configId`.\n */\nexport type SelfServiceClusterModificationPayloadDto =\n | {\n mode: 'apply'\n orgId: string\n clusterUuid: string\n /** 1 to 500 characters. */\n description: string\n /** At least one entry. */\n planModifications: ClusterPlanModificationConfig[]\n /** An ISO datetime with an offset, for example `toISOString()`. */\n expiresAt?: string\n }\n | { mode: 'deactivate'; orgId: string; clusterUuid: string; configId: string }\n\n/**\n * The call of a self-service use case: custom hardware sizing and custom\n * generations. Like `CreatePersonalOrganisationRequest`, it has no\n * `requiredAcks`.\n */\nexport interface SelfServiceApprovalRequest<TPayload>\n extends RequestBaseParams {\n params: {\n payload: TPayload\n reason?: string\n }\n}\n\n/** @deprecated Use `SelfServiceApprovalRequest`. */\nexport type CustomHardwareSizingRequest<TPayload> =\n SelfServiceApprovalRequest<TPayload>\n\nexport interface ExtendTrialPayloadDto {\n orgId: string\n orgName?: string\n /**\n * Days of trial counted from the moment the action RUNS.\n *\n * Never a date. Accounts holds the new expiry inside a window that it\n * measures when the call arrives, and under approvals that is days after the\n * person chose the value. See `use-cases/extend-trial.ts` in\n * control-backend.\n */\n days: number\n}\n\nexport interface MoveClusterOrgPayloadDto {\n clusterId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n clusterName?: string\n targetOrgId: string\n /** A copy, for the same reason as `clusterName`. */\n targetOrgName?: string\n // The SOURCE organization is not here on purpose. control-backend resolves it\n // server-side from the cluster's current owner, so a caller cannot attach the\n // request to an organization the cluster never belonged to.\n}\n\nexport interface ChangePlatformRolesPayloadDto {\n userId: string\n /** A copy, so a list shows a person and not an Auth0 id. Nothing reads it. */\n userEmail?: string\n /**\n * A CHANGE, and never the whole set. Accounts applies it over the roles that\n * the user holds when the action RUNS, so a role change that somebody else\n * made while the request waited stays.\n */\n rolesToAdd: string[]\n rolesToRemove: string[]\n}\n\nexport interface ChangeOrgLimitsPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /** One key of `allSalesPlanLimits()`. One limit for each request. */\n limitKey: string\n /**\n * The override that the person who asked READ. Absent for \"not set\".\n *\n * Accounts compares it with the override that it holds when the action\n * runs, and writes nothing when the two differ. See `staleApprovalKeys`.\n */\n expected?: string | number | boolean\n /** The new override. `null` clears it, and the default of the plan applies. */\n value: string | number | boolean | null\n}\n\n/**\n * The terms of an enterprise contract that a change-enterprise-contract\n * request writes. A field that is absent stays as it is.\n */\nexport interface EnterpriseContractTermsDto {\n contractDurationInMonths?: number\n /** The start of the contract, as `YYYY-MM-DD`. */\n startDate?: string\n valueMetrics?: {\n processInstances?: number\n decisionInstances?: number\n taskUsers?: number\n tenants?: number\n }\n}\n\nexport interface ChangeEnterpriseContractPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /** The new values. It holds at least one field. */\n change: EnterpriseContractTermsDto\n /**\n * The values that the person who asked READ, for the fields of `change`.\n * Absent for \"not set\". Accounts compares them with the values that it\n * holds when the action runs, and writes nothing when one differs.\n */\n expected: EnterpriseContractTermsDto\n}\n\nexport interface DeleteManagedLlmTenantPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /**\n * The `metadata.llm.created` of the tenant that the person who asked READ,\n * in epoch milliseconds. Accounts compares it when the action runs, and\n * deletes nothing when the organization has another tenant.\n */\n tenantCreatedAt: number\n}\n\nexport interface LlmBudgetTopUpPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /**\n * The budget that the person who asked READ. Accounts compares it with the\n * budget when the action runs, and changes nothing when the two differ.\n */\n expectedBudget: number\n /** The spend that the person who asked read. The approver reads it. */\n spend: number\n /**\n * True when the person who asked confirmed a top-up with the spend below\n * `LLM_BUDGET_TOP_UP_THRESHOLD`. Without it, such a request fails when it\n * runs.\n */\n belowThreshold: boolean\n}\n\n/** One generation of a change-generation-versions request. */\nexport interface ChangeGenerationVersionsTargetDto {\n id: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n name?: string\n /**\n * A copy of the cluster count when the request was opened, for the\n * approver. Absent when the browser could not read it.\n */\n clusterCount?: number\n /**\n * The values that the person who asked READ, one for each key of\n * `versions`. Console changes nothing on this generation when one differs\n * at the run.\n */\n expectedVersions: GenerationImageVersionsDto\n}\n\n/**\n * The payload of a delete-cluster-corpses request, as a browser sends it.\n * control-backend reads the corpses of the kind from console and stores them\n * with the request, as the set that the approvers read.\n */\nexport interface DeleteClusterCorpsesPayloadDto {\n kind: ClusterCorpseKind\n}\n\nexport interface ChangeGenerationVersionsPayloadDto {\n generations: ChangeGenerationVersionsTargetDto[]\n /**\n * The image versions to write on every generation. Only the keys that\n * change are here. An empty string clears an optional one. No env var\n * field is here (see `GENERATION_ENV_VARS_KEYS`).\n */\n versions: GenerationImageVersionsDto\n}\n\n/**\n * The payload of an edit-generation request: the new name and env vars of\n * ONE generation, and the values that the person who asked READ.\n */\nexport interface EditGenerationPayloadDto {\n generationId: string\n /** The name that the person who asked READ. The stale guard of `name`. */\n expectedName: string\n /** The new name. Absent keeps the name. */\n name?: string\n /**\n * The env var text to write. Only the keys that change are here. An empty\n * string clears a field.\n */\n envVars: GenerationEnvVarsDto\n /** The text that the person who asked READ, one for each key of `envVars`. */\n expectedEnvVars: GenerationEnvVarsDto\n /**\n * A copy of the cluster count when the request was opened, for the\n * approver. Absent when the browser could not read it.\n */\n clusterCount?: number\n}\n\n/**\n * The payload of a force-delete-cluster-plan-type request, as a browser\n * sends it. control-backend reads the clusters of the type from console and\n * stores them with the request, as the set that the approvers read.\n */\nexport interface ForceDeleteClusterPlanTypePayloadDto {\n planTypeId: string\n}\n\n/**\n * The payload of a change-plan-type-retention-limits request, as a browser\n * sends it. control-backend reads the name of the plan type and the number\n * of its clusters from console and stores them with the request.\n */\nexport interface ChangePlanTypeRetentionLimitsPayloadDto {\n planTypeId: string\n /**\n * The new retention limits. They replace the limits of the plan type as a\n * whole, so a key that is absent goes back to its default.\n */\n limits: ClusterLimits\n /**\n * The limits of the plan type that the person READ. The request fails when\n * the plan type has other limits at create or at the run.\n */\n expectedLimits: ClusterLimits\n}\n\n/**\n * The payload of an automated-enterprise-onboarding request: the fields of\n * the accounts wizard \"New Enterprise Onboarding\".\n */\nexport interface AutomatedEnterpriseOnboardingPayloadDto {\n /** The prefix of the two organization names. */\n orgName: string\n sfdcId: string\n awsOnly: boolean\n renewalTermInMonths: number\n licensingModel: 'legacy' | '2025'\n /** The start of the subscription, `YYYY-MM-DD`. */\n startDate: string\n valueMetrics: {\n processInstances: number\n decisionInstances: number\n taskUsers: number\n tenants: number\n }\n reservations: {\n basic: number\n standard: number\n advanced: number\n }\n /** The person who becomes the owner of both organizations. */\n ownerEmail: string\n /** Months of activity history. Accounts sets 60 when this is missing. */\n activityRetentionMonths?: ActivityRetentionMonths\n}\n\n/** One cluster of the organization and the plan type it moves to. */\nexport interface OnboardToEnterpriseClusterDto {\n clusterId: string\n /** A copy, so the approver reads a name. Nothing reads it. */\n clusterName?: string\n planTypeId: string\n /** A copy of the name of the plan type, for the approver to read. */\n planTypeName?: string\n numberOfAllocatedHwPackages?: number\n keepModification: boolean\n}\n\nexport interface OnboardToEnterprisePayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n salesPlanId: string\n /** A copy of the name of the new plan, for the approver to read. */\n salesPlanName?: string\n /**\n * The plan that the person who asked READ. Accounts compares it with the\n * plan that it holds when the action runs, and switches nothing when the\n * two differ. An organization with no plan cannot be onboarded this way.\n */\n expectedSalesPlanId: string\n expectedSalesPlanName?: string\n contract: {\n /** The renewal term, in months. */\n duration: number\n includedValueMetrics: EnterpriseIncludingValueMetrics\n /** `YYYY-MM-DD`. */\n enterPriseStartDate: string\n enterpriseDevOnly: boolean\n awsOnly: boolean\n licensingModel: LicensingModelType\n salesForceId?: string\n /** Months of activity history. Control-backend sets 60 when this is missing. */\n activityRetentionMonths?: ActivityRetentionMonths\n }\n /** One entry for each cluster of the organization. Empty for none. */\n clusters: OnboardToEnterpriseClusterDto[]\n /** The reservations after the switch, by plan type uuid. */\n reservations: Record<string, number>\n /** The names of the plan types of `reservations`, for the approver. */\n reservationNames?: Record<string, string>\n}\n\nexport interface ChangeClusterPlanTypePayloadDto {\n clusterId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n clusterName?: string\n /** The organization that owns the cluster. Console refuses another one. */\n orgId: string\n /** A copy, for the same reason as `clusterName`. */\n orgName?: string\n toPlanTypeUuid: string\n /** A copy of the name of the new plan type, for the approver to read. */\n toPlanTypeName?: string\n /**\n * The hardware packages of the cluster after the change, 1 at least.\n *\n * Always sent, also for a plan type with no availability class, where it is\n * 1. Console checks the reservations of the organization only when the\n * packages are in the call, and the check is the point of this use case.\n */\n numberOfAllocatedHwPackages: number\n /**\n * The plan type that the person who asked READ.\n *\n * Console compares it with the plan type of the cluster when the action\n * runs, and changes nothing when the two differ.\n */\n expectedPlanTypeUuid: string\n /** A copy of the name of the current plan type, for the approver to read. */\n expectedPlanTypeName?: string\n /**\n * The hardware packages that the person who asked READ, 1 for a cluster\n * that holds none. The same stale guard as `expectedPlanTypeUuid`.\n */\n expectedNumberOfAllocatedHwPackages: number\n /**\n * The cluster plan that the person who asked READ. Console decides the\n * plan move from it, so it is part of the stale guard too, and Console\n * refuses a cluster that runs none, so a request needs one.\n */\n expectedClusterPlanUuid: string\n /** A copy of the name of that plan, for the approver to read. */\n expectedClusterPlanName?: string\n /**\n * The active modification config that the person who asked READ, absent\n * when the cluster has none. The change removes it, and an approver must\n * read which one goes.\n */\n expectedActiveModificationConfigUuid?: string\n /**\n * The active plan of the NEW plan type that the person who asked READ. The\n * cluster moves to it, so a plan that a Camundi changed on the type while\n * the request waited fails the guard, and Console refuses a type that has\n * none, so a request needs one.\n */\n expectedTargetPlanUuid: string\n /** A copy of the name of that plan, for the approver to read. */\n expectedTargetPlanName?: string\n /**\n * Whether the cluster plan moves to the active plan of the new type, as\n * the dialog read it. The list of migratable plans can change while the\n * request waits, and a verdict that moved changes whether the cluster\n * restarts, so Console refuses a request whose verdict moved.\n */\n expectedClusterPlanUpdate: boolean\n /**\n * Whether the active modification config of the cluster stays after the\n * change. Absent reads as false: the change removes it, and the approver\n * reads which one goes. The dialog shows what the config changes, so the\n * person who asks can choose.\n */\n keepModification?: boolean\n}\n\nexport interface RequestInNegotiationPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /** The in-negotiation plan to move to. */\n salesPlanId: string\n /** A copy of the name of the new plan, for the approver to read. */\n salesPlanName?: string\n /**\n * The trial plan that the person who asked READ. Accounts switches nothing\n * when the plan differs when the action runs.\n */\n expectedSalesPlanId: string\n /** A copy of the name of the current plan, for the approver to read. */\n expectedSalesPlanName?: string\n}\n\nexport interface ChangeLicensingModelPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n /** The new licensing model. */\n licensingModel: LicensingModelType\n /**\n * The model that the person who asked READ. Absent for \"no model set\".\n * Accounts writes nothing when the model differs when the action runs.\n */\n expected?: LicensingModelType\n}\n\nexport interface ChangeSalesPlanPayloadDto {\n orgId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n orgName?: string\n salesPlanId: string\n /** A copy of the name of the new plan, for the approver to read. */\n salesPlanName?: string\n /**\n * The plan that the person who asked READ. Absent for \"no plan\".\n *\n * Accounts compares it with the plan that it holds when the action runs,\n * and switches nothing when the two differ.\n */\n expectedSalesPlanId?: string\n /** A copy of the name of the current plan, for the approver to read. */\n expectedSalesPlanName?: string\n /** Skips the validation of the switch. The approver sees it. */\n force: boolean\n}\n\n/** Every value of a flag row that a person can change. */\nexport interface FeatureFlagValuesDto {\n description: string\n enabled: boolean\n orgIds: string[]\n emailDomains: string[]\n /** The team that owns the flag. A create needs it. An older row has none. */\n owner?: string\n /** `YYYY-MM-DD`, the day after which the flag is late. */\n expiresAt?: string\n /**\n * The issue that tracks the flag. A create and an edit need it. An older\n * row has none.\n */\n issueUrl?: string\n}\n\n/**\n * One change of the feature flag table: the action, and the whole row that it\n * asks for.\n *\n * An edit and a delete carry the row that the person who asked READ, as\n * `expected`. The action writes nothing when the row changed in the meantime.\n * `key` of an edit and a delete is a copy for the approver, and the action\n * compares it too.\n */\nexport type ChangeFeatureFlagPayloadDto =\n | {\n action: 'create'\n key: string\n value: FeatureFlagValuesDto & { owner: string; issueUrl: string }\n }\n | {\n action: 'update'\n id: string\n key: string\n expected: FeatureFlagValuesDto\n value: FeatureFlagValuesDto & { issueUrl: string }\n }\n | {\n action: 'delete'\n id: string\n key: string\n expected: FeatureFlagValuesDto\n }\n\n/**\n * Turns a flag that is on for everybody off. `expected` is the row that the\n * person READ. The action writes nothing when the row changed in the meantime.\n */\nexport interface DisableFeatureFlagPayloadDto {\n id: string\n key: string\n expected: FeatureFlagValuesDto\n}\n\nexport interface DeleteSsoConnectionPayloadDto {\n strategy: 'waad' | 'samlp'\n connectionId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n connectionName?: string\n /**\n * The organizations that the connection serves, as copies for the approver.\n * The request is findable on the page of each one.\n */\n orgIds?: string[]\n}\n\nexport interface DeleteOrganizationPayloadDto {\n orgId: string\n /**\n * The name that the approvers read. Accounts refuses the deletion when the\n * organization has another name when the action runs.\n */\n orgName: string\n}\n\nexport interface DeleteUserPayloadDto {\n userId: string\n /**\n * The address that the approvers read. Accounts refuses the deletion when\n * the user has another address when the action runs.\n */\n userEmail: string\n}\n\nexport interface RemoveOrgMemberPayloadDto {\n orgId: string\n userId: string\n /**\n * The address that the approvers read. Accounts refuses the removal when\n * the member has another address when the action runs.\n */\n userEmail: string\n /**\n * A member of the organization who becomes an owner before the removal.\n * Accounts refuses it with another address, as for `userEmail`.\n */\n newOwner?: { userId: string; userEmail: string }\n /** The member gets no email about the removal. */\n suppressEmail?: boolean\n}\n\nexport interface ChangeUserEmailPayloadDto {\n userId: string\n /**\n * The address that the person who asked READ. Accounts compares it with\n * the address that the user has when the action runs, and changes nothing\n * when the two differ.\n */\n expectedEmail: string\n newEmail: string\n}\n\nexport interface PurgeUsersPayloadDto {\n /**\n * The users to delete, at most `PURGE_USERS_MAX_USERS`. The address is a\n * copy for the approver, and accounts refuses a user whose address is not\n * that copy. A list that came from a file of ids carries none.\n */\n users: { userId: string; email?: string }[]\n}\n\nexport interface UpdateUserMetadataPayloadDto {\n userId: string\n /** A copy, so a list shows a person and not an Auth0 id. Nothing reads it. */\n userEmail?: string\n /** `app` writes `app_metadata`, `user` writes `user_metadata`. */\n kind: 'app' | 'user'\n /**\n * The metadata that the person who asked READ. Absent for \"not set\".\n * Accounts writes nothing when it holds another value when the action runs.\n */\n expected?: Record<string, unknown>\n metadata: Record<string, unknown>\n}\n\nexport interface DeleteInternalBackupPayloadDto {\n clusterId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n clusterName?: string\n backupName: string\n /** A copy of the Slack link of the incident, for the approver to read. */\n incidentLink?: string\n}\n\n/** See `forceGenerationUpgradePayloadSchema` in control-backend. */\nexport interface ForceGenerationUpgradePayloadDto {\n clusterId: string\n /** A copy, so a list shows a name that a person knows. Nothing reads it. */\n clusterName?: string\n /** The organization of the cluster. Control reads it for the request page. */\n orgId?: string\n toGenerationUuid: string\n /** A copy, so the approver reads a name. Nothing reads it. */\n toGenerationName?: string\n /** The generation of the cluster when the person opened the request. */\n expectedGenerationUuid: string\n /** A copy, so the approver reads a name. Nothing reads it. */\n expectedGenerationName?: string\n /**\n * Ignore the upgrade graph. Needs\n * `console.clusters.canUpgradeGenerationYolo`.\n */\n yolo: boolean\n /** Ignore the upgrade gate. */\n ignoreUpgradeGate: boolean\n}\n\n/** See `deleteApiClientPayloadSchema` in control-backend. */\nexport interface DeleteApiClientPayloadDto {\n orgId: string\n /** The `uuid` of the client, not its OAuth `clientId`. */\n clientUuid: string\n}\n\n/**\n * The query string of a read, with the fields that carry no value dropped.\n *\n * An empty value is not the same as an absent one: `q=` would reach the schema\n * of control-backend, which holds the text at one character and answers 400.\n * A list goes as one comma list, which is the form control-backend reads for\n * `type`. An empty list is dropped like an empty text.\n */\nfunction querySuffix(params: object = {}): string {\n const query = new URLSearchParams()\n for (const [key, raw] of Object.entries(params)) {\n const value = Array.isArray(raw) ? raw.join(',') : raw\n if (value !== undefined && value !== '') {\n query.set(key, String(value))\n }\n }\n return query.size > 0 ? `?${query.toString()}` : ''\n}\n\nfunction contextFor(\n name: string,\n url: string,\n normalizedUrl: string,\n type: 'get' | 'post',\n source: string,\n): RequestBaseServiceContext {\n return {\n method: {\n name: `ControlApprovalsService.${name}`,\n url,\n normalizedUrl,\n type,\n },\n source,\n target: { name: 'control', type: 'internal' },\n }\n}\n\nexport class ControlApprovalsService {\n /**\n * The registered privileged actions, with the rules that guard each one.\n *\n * A frontend reads this to run the same policy as the service, so it never\n * holds a copy of the registry. A new use case then needs no frontend\n * deploy.\n */\n public static async listUseCases(\n params: RequestBaseParams,\n ): Promise<ApprovalUseCaseDto[]> {\n const serviceContext = contextFor(\n 'listUseCases',\n 'api/approvals/use-cases',\n 'api/approvals/use-cases',\n 'get',\n params.config.metrics?.source || 'unset',\n )\n const response = await request<{ useCases: ApprovalUseCaseDto[] }>({\n config: params.config,\n base: BASE,\n url: serviceContext.method.url,\n method: 'get',\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!.useCases\n }\n\n /**\n * One page of the requests that the caller can read.\n *\n * It is not the whole table: control-backend hides a request whose use case\n * the caller cannot act on, unless the caller opened it.\n */\n public static async list(\n params: ListApprovalsRequest,\n ): Promise<ApprovalPageDto> {\n const suffix = querySuffix(params.params)\n const serviceContext = contextFor(\n 'list',\n `api/approvals${suffix}`,\n 'api/approvals',\n 'get',\n params.config.metrics?.source || 'unset',\n )\n const response = await request<ApprovalPageDto>({\n config: params.config,\n base: BASE,\n url: serviceContext.method.url,\n method: 'get',\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 * How many requests each status holds, for the status filters of a queue.\n *\n * It is the same question as `list` without the status, so a filter that\n * shows a number never opens an empty page.\n */\n public static async counts(\n params: CountApprovalsRequest,\n ): Promise<ApprovalStatusCountsDto> {\n const suffix = querySuffix(params.params)\n const serviceContext = contextFor(\n 'counts',\n `api/approvals/counts${suffix}`,\n 'api/approvals/counts',\n 'get',\n params.config.metrics?.source || 'unset',\n )\n const response = await request<{ counts: ApprovalStatusCountsDto }>({\n config: params.config,\n base: BASE,\n url: serviceContext.method.url,\n method: 'get',\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!.counts\n }\n\n public static async get(params: ApprovalIdRequest): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'get',\n `api/approvals/${params.params.id}`,\n 'api/approvals/:id',\n 'get',\n )\n }\n\n /**\n * What a create route answers, plus whether it opened a NEW request.\n *\n * The route answers 201 for a fresh request and 200 for the one already\n * open for the same target \u2014 `create` deduplicates. A caller that must\n * tell the two apart (a floor-of-one use case, where 200 is the ordinary\n * path and not a failure) reads `created`.\n */\n public static async createMoveClusterOrg(\n params: CreateApprovalRequest<MoveClusterOrgPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createMoveClusterOrg',\n 'api/approvals/move-cluster-org',\n )\n }\n\n /**\n * Opens a cluster bulk operation of one type.\n *\n * Each type is its own use case with its own route, because each one has\n * its own permission. The floor of approvals depends on the stage: 2 on\n * prod and 1 on dev, int and local, and 3 and 2 for a deletion. The\n * route is `api/approvals/<use case>`, as for every other use case. A 200\n * means that the same operation over the same clusters is already open.\n */\n public static async createClusterBulkOperation<\n T extends ClusterBulkOperationType,\n >(\n type: T,\n params: CreateApprovalRequest<ClusterBulkOperationPayloadDto<T>>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n const useCase = CLUSTER_BULK_OPERATION_RULES[type].useCase\n return ControlApprovalsService.create(\n params,\n 'createClusterBulkOperation',\n `api/approvals/${useCase}`,\n )\n }\n\n /**\n * Opens a change-platform-roles request.\n *\n * Opening one needs `accounts:admin:changeRole`, the same permission that\n * approving needs, and the reason is necessary. A 200 means that a request\n * for the same user is already open.\n */\n public static async createChangePlatformRoles(\n params: CreateApprovalRequest<ChangePlatformRolesPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangePlatformRoles',\n 'api/approvals/change-platform-roles',\n )\n }\n\n /**\n * Opens a delete-internal-backup request.\n *\n * Opening one needs `console:clusters:canCreateInternalBackup`, the same\n * permission that approving needs. A 200 means that a request for the same\n * backup is already open.\n */\n public static async createDeleteInternalBackup(\n params: CreateApprovalRequest<DeleteInternalBackupPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteInternalBackup',\n 'api/approvals/delete-internal-backup',\n )\n }\n\n /**\n * Opens a force-generation-upgrade request: a generation upgrade of one\n * cluster with `yolo`, past the upgrade gate, or both.\n *\n * Opening one needs `console.clusters.canUpgradeGeneration`, and with `yolo`\n * also `console.clusters.canUpgradeGenerationYolo`. A 200 means that a\n * request for the same cluster is already open.\n */\n public static async createForceGenerationUpgrade(\n params: CreateApprovalRequest<ForceGenerationUpgradePayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createForceGenerationUpgrade',\n 'api/approvals/force-generation-upgrade',\n )\n }\n\n /**\n * Opens a delete-api-client request.\n *\n * Opening one needs `console:apiClient:delete`, the same permission that\n * approving needs. A 200 means that a request for the same client is\n * already open.\n */\n public static async createDeleteApiClient(\n params: CreateApprovalRequest<DeleteApiClientPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteApiClient',\n 'api/approvals/delete-api-client',\n )\n }\n\n /**\n * Opens a change-org-limits request.\n *\n * Opening one needs `accounts:admin:mayChangeOrgLimits`, the same\n * permission that approving needs. A 200 means that a request for the same\n * limit of the same organization is already open.\n */\n public static async createChangeOrgLimits(\n params: CreateApprovalRequest<ChangeOrgLimitsPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeOrgLimits',\n 'api/approvals/change-org-limits',\n )\n }\n\n /**\n * Opens a change-enterprise-contract request.\n *\n * Opening one needs `aeom` (`enterprise.org.modify`), the same permission\n * that approving needs, and also `aeos` (`enterprise.org.modifyStartDate`)\n * for a new start date. A 200 means that a request for the same\n * organization is already open.\n */\n public static async createChangeEnterpriseContract(\n params: CreateApprovalRequest<ChangeEnterpriseContractPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeEnterpriseContract',\n 'api/approvals/change-enterprise-contract',\n )\n }\n\n /**\n * Opens a llm-budget-top-up request.\n *\n * Opening one needs `accounts:admin:mayChangeOrgLimits`, the same\n * permission that approving needs. A 200 means that a request for the same\n * organization is already open.\n */\n public static async createLlmBudgetTopUp(\n params: CreateApprovalRequest<LlmBudgetTopUpPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createLlmBudgetTopUp',\n 'api/approvals/llm-budget-top-up',\n )\n }\n\n /**\n * Opens a delete-managed-llm-tenant request.\n *\n * Opening one needs `accounts:admin:mayChangeOrgLimits`, the same\n * permission that approving needs. A 200 means that a request for the same\n * organization is already open.\n */\n public static async createDeleteManagedLlmTenant(\n params: CreateApprovalRequest<DeleteManagedLlmTenantPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteManagedLlmTenant',\n 'api/approvals/delete-managed-llm-tenant',\n )\n }\n\n /**\n * Opens a delete-sso-connection request.\n *\n * Opening one needs `AccountsPermissions.ADMIN_AUTH0_CONNECTIONS_DELETE`, the same\n * permission that approving needs. A 200 means that a request for the same\n * connection is already open.\n */\n public static async createDeleteSsoConnection(\n params: CreateApprovalRequest<DeleteSsoConnectionPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteSsoConnection',\n 'api/approvals/delete-sso-connection',\n )\n }\n\n /**\n * Opens an onboard-to-enterprise request.\n *\n * Opening one needs `AccountsPermissions.ENTERPRISE_ORG_CONVERT`, the same\n * permission that approving needs. A 200 means that a request for the same\n * organization is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createOnboardToEnterprise(\n params: CreateApprovalRequest<OnboardToEnterprisePayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createOnboardToEnterprise',\n 'api/approvals/onboard-to-enterprise',\n )\n }\n\n /**\n * Opens a change-sales-plan request.\n *\n * Opening one needs `AccountsPermissions.SALES_PLAN_SWITCH`, the same\n * permission that approving needs. A 200 means that a request for the same\n * organization is already open.\n */\n public static async createChangeSalesPlan(\n params: CreateApprovalRequest<ChangeSalesPlanPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeSalesPlan',\n 'api/approvals/change-sales-plan',\n )\n }\n\n /**\n * Opens a request to move a trial organization to an in-negotiation plan.\n *\n * Opening one needs `AccountsPermissions.READ_ALL`.\n * A holder of `SALES_PLAN_SWITCH` approves it, and the last approval runs\n * it.\n */\n public static async createRequestInNegotiation(\n params: CreateApprovalRequest<RequestInNegotiationPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createRequestInNegotiation',\n 'api/approvals/request-in-negotiation',\n )\n }\n\n /**\n * Opens a change-licensing-model request.\n *\n * Opening one needs `aeoc` (`enterprise.org.convert`), the same permission\n * that approving needs. A 200 means that a request for the same\n * organization is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createChangeLicensingModel(\n params: CreateApprovalRequest<ChangeLicensingModelPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeLicensingModel',\n 'api/approvals/change-licensing-model',\n )\n }\n\n /**\n * Opens a change-generation-versions request.\n *\n * Opening one needs `ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN`,\n * the same permission that approving needs. A 200 means that a request\n * over the same generations is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createChangeGenerationVersions(\n params: CreateApprovalRequest<ChangeGenerationVersionsPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeGenerationVersions',\n 'api/approvals/change-generation-versions',\n )\n }\n\n /**\n * Opens an edit-generation request.\n *\n * Opening one needs `ConsolePermissions.CHANNELS_AND_GENERATIONS_ADMIN`,\n * the same permission that approving needs. A 200 means that a request\n * over the same generation is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createEditGeneration(\n params: CreateApprovalRequest<EditGenerationPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createEditGeneration',\n 'api/approvals/edit-generation',\n // The payload holds env var text.\n { redactBody: true },\n )\n }\n\n /**\n * Opens a delete-cluster-corpses request.\n *\n * Opening one needs `ConsolePermissions.CLUSTERS_DELETE_CLUSTER`, the same\n * permission that approving needs. A 200 means that a request for the same\n * kind is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off, 409 when console has no corpse\n * that a request can take, and 412 when console does not answer its\n * corpses.\n */\n public static async createDeleteClusterCorpses(\n params: CreateApprovalRequest<DeleteClusterCorpsesPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteClusterCorpses',\n 'api/approvals/delete-cluster-corpses',\n )\n }\n\n /**\n * Opens a force-delete-cluster-plan-type request.\n *\n * Opening one needs `ConsolePermissions.CLUSTER_PLAN_TYPE_FORCE_DELETE`,\n * the same permission that approving needs. A 200 means that a request for\n * the same plan type is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off or when console does not know\n * the plan type, 409 when no cluster uses the type or more than the cap do,\n * and 412 when console does not answer its clusters.\n */\n public static async createForceDeleteClusterPlanType(\n params: CreateApprovalRequest<ForceDeleteClusterPlanTypePayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createForceDeleteClusterPlanType',\n 'api/approvals/force-delete-cluster-plan-type',\n )\n }\n\n /**\n * Opens a change-plan-type-retention-limits request.\n *\n * Opening one needs `ConsolePermissions.CLUSTER_PLAN_TYPE_MODIFY`, the same\n * permission that approving needs. A 200 means that a request for the same\n * plan type is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off or when console does not know the\n * plan type, 400 when a new limit is out of bounds or the request removes\n * the unified data retention of the plan type, 409 when the limits of the\n * plan type are not the expected limits or are the new limits already, and\n * 412 when the answer of console does not hold a name, the limits and a\n * number of clusters.\n */\n public static async createChangePlanTypeRetentionLimits(\n params: CreateApprovalRequest<ChangePlanTypeRetentionLimitsPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangePlanTypeRetentionLimits',\n 'api/approvals/change-plan-type-retention-limits',\n )\n }\n\n /**\n * Opens an automated-enterprise-onboarding request.\n *\n * Opening one needs `AccountsPermissions.ENTERPRISE_ORG_CONVERT`, the same\n * permission that approving needs. A 200 means that a request with the\n * same organization name is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createAutomatedEnterpriseOnboarding(\n params: CreateApprovalRequest<AutomatedEnterpriseOnboardingPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createAutomatedEnterpriseOnboarding',\n 'api/approvals/automated-enterprise-onboarding',\n )\n }\n\n /**\n * Opens a change-cluster-plan-type request.\n *\n * Opening one needs `ConsolePermissions.CLUSTERS_CAN_UPDATE_CLUSTERPLANTYPE`,\n * the same permission that approving needs. A 200 means that a request for\n * the same cluster is already open. The route answers 404 while\n * `control.camundiApprovalFlow` is off.\n */\n public static async createChangeClusterPlanType(\n params: CreateApprovalRequest<ChangeClusterPlanTypePayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeClusterPlanType',\n 'api/approvals/change-cluster-plan-type',\n )\n }\n\n /**\n * Opens a delete-organization request.\n *\n * Opening one needs `AccountsPermissions.DELETE_ORG`, the same permission\n * that approving needs. A 200 means that a request for the same\n * organization is already open.\n */\n public static async createDeleteOrganization(\n params: CreateApprovalRequest<DeleteOrganizationPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteOrganization',\n 'api/approvals/delete-organization',\n )\n }\n\n /**\n * Opens a delete-user request.\n *\n * Opening one needs `AccountsPermissions.DELETE_USER`, the same permission\n * that approving needs. A 200 means that a request for the same user is\n * already open.\n */\n public static async createDeleteUser(\n params: CreateApprovalRequest<DeleteUserPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDeleteUser',\n 'api/approvals/delete-user',\n )\n }\n\n /**\n * Opens a remove-org-member request.\n *\n * Opening one needs `AccountsPermissions.REMOVE_FROM_ORG_WITH_APPROVAL`,\n * with or without a new owner. The same permission approves it. A 200 means that a request for the same member is already\n * open.\n */\n public static async createRemoveOrgMember(\n params: CreateApprovalRequest<RemoveOrgMemberPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createRemoveOrgMember',\n 'api/approvals/remove-org-member',\n )\n }\n\n /**\n * Opens a change-user-email request.\n *\n * Opening one needs `AccountsPermissions.ADMIN_CHANGE_EMAIL`, the same\n * permission that approving needs. A 200 means that a request for the same\n * user is already open.\n */\n public static async createChangeUserEmail(\n params: CreateApprovalRequest<ChangeUserEmailPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeUserEmail',\n 'api/approvals/change-user-email',\n )\n }\n\n /**\n * Opens a purge-users request.\n *\n * Opening one needs `AccountsPermissions.GOD_PURGE_USERS` and\n * `AccountsPermissions.DELETE_USER`, the same permissions that approving\n * needs. A 200 means that a request for the same set of users is already\n * open.\n */\n public static async createPurgeUsers(\n params: CreateApprovalRequest<PurgeUsersPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createPurgeUsers',\n 'api/approvals/purge-users',\n )\n }\n\n /**\n * Opens an update-user-metadata request.\n *\n * Opening one needs `AccountsPermissions.GOD_UPDATE_USER_METADATA`, the\n * same permission that approving needs. A 200 means that a request for the\n * same user and the same kind of metadata is already open.\n */\n public static async createUpdateUserMetadata(\n params: CreateApprovalRequest<UpdateUserMetadataPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createUpdateUserMetadata',\n 'api/approvals/update-user-metadata',\n )\n }\n\n /**\n * Opens a change-feature-flag request.\n *\n * On int and prod, opening one needs `aafr` or `aafw`, and approving one\n * needs `aafw`.\n * On dev anybody signed in can open one. A 200 means that a request for the\n * same flag is already open. On int and prod this is the only way to change\n * a flag.\n */\n public static async createChangeFeatureFlag(\n params: CreateApprovalRequest<ChangeFeatureFlagPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createChangeFeatureFlag',\n 'api/approvals/change-feature-flag',\n )\n }\n\n /**\n * Opens a disable-feature-flag request: a flag that is on for everybody goes\n * off. It needs fewer approvals than a change-feature-flag request.\n */\n public static async createDisableFeatureFlag(\n params: CreateApprovalRequest<DisableFeatureFlagPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createDisableFeatureFlag',\n 'api/approvals/disable-feature-flag',\n )\n }\n\n /**\n * Opens a release-train publish request. The caller sends no `preview`:\n * control-backend reads it from console when the request opens.\n */\n public static async createReleaseTrainPublish(\n params: CreateApprovalRequest<Omit<ReleaseTrainPublishPayload, 'preview'>>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createReleaseTrainPublish',\n 'api/approvals/release-train-publish',\n )\n }\n\n /** Opens a release-train rollback request. The caller sends no `preview`. */\n public static async createReleaseTrainRollback(\n params: CreateApprovalRequest<Omit<ReleaseTrainRollbackPayload, 'preview'>>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createReleaseTrainRollback',\n 'api/approvals/release-train-rollback',\n )\n }\n\n /** Adds the approval of the caller. The last one can run the action. */\n public static async acknowledge(\n params: ApprovalIdRequest,\n ): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'acknowledge',\n `api/approvals/${params.params.id}/ack`,\n 'api/approvals/:id/ack',\n 'post',\n )\n }\n\n /** Closes a request without running the action. The reason is necessary. */\n public static async reject(\n params: RejectApprovalRequest,\n ): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'reject',\n `api/approvals/${params.params.id}/reject`,\n 'api/approvals/:id/reject',\n 'post',\n { reason: params.params.reason },\n )\n }\n\n /**\n * Takes back a request. Only the person who opened it can.\n *\n * The reason is optional, and it lands in the same field that a rejection\n * writes. The creator cannot reject their own request, so this is where they\n * say why they closed it.\n */\n public static async withdraw(\n params: WithdrawApprovalRequest,\n ): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'withdraw',\n `api/approvals/${params.params.id}/withdraw`,\n 'api/approvals/:id/withdraw',\n 'post',\n params.params.reason ? { reason: params.params.reason } : undefined,\n )\n }\n\n /**\n * Runs a request that holds its approvals.\n *\n * Only a use case in the explicit mode needs this. An action that throws\n * leaves the request `failed`, and this call still answers 200 with it, so\n * read `status` and `executionError` of the answer.\n */\n public static async execute(\n params: ApprovalIdRequest,\n ): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'execute',\n `api/approvals/${params.params.id}/execute`,\n 'api/approvals/:id/execute',\n 'post',\n )\n }\n\n /**\n * Runs a `pending` request with the approval override grant of the caller,\n * in place of the approvals that it still needs. control-backend answers\n * 404 while `control.approvalOverride` is off.\n */\n public static async override(\n params: OverrideApprovalRequest,\n ): Promise<ApprovalJobDto> {\n return ControlApprovalsService.readOne(\n params,\n 'override',\n `api/approvals/${params.params.id}/override`,\n 'api/approvals/:id/override',\n 'post',\n { reason: params.params.reason },\n )\n }\n\n /**\n * Opens a grant-approval-override request. Opening one needs\n * `accounts:admin:changeRole`, and it needs two approvals. A 200 means\n * that a request for the same grantee is already open.\n */\n public static async createGrantApprovalOverride(\n params: CreateApprovalRequest<GrantApprovalOverridePayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createGrantApprovalOverride',\n 'api/approvals/grant-approval-override',\n )\n }\n\n /**\n * The approval override grant of the caller that is active now, or\n * `undefined`. control-backend answers 404 while `control.approvalOverride`\n * is off.\n */\n public static async getMyOverrideGrant(\n params: RequestBaseParams,\n ): Promise<ApprovalOverrideGrantDto | undefined> {\n const serviceContext = contextFor(\n 'getMyOverrideGrant',\n 'api/approvals/override-grants/me',\n 'api/approvals/override-grants/me',\n 'get',\n params.config.metrics?.source || 'unset',\n )\n const response = await request<{ grant?: ApprovalOverrideGrantDto }>({\n config: params.config,\n base: BASE,\n url: serviceContext.method.url,\n method: 'get',\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?.grant\n }\n\n /** Opens a send-to-expired-trial request. Any signed-in Camundi can. */\n public static async createSendToExpiredTrial(\n params: CreateApprovalRequest<SendToExpiredTrialPayloadDto>,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createSendToExpiredTrial',\n 'api/approvals/send-to-expired-trial',\n )\n return approval\n }\n\n /**\n * Opens an extend-trial request.\n *\n * Opening one needs `accounts:admin:extendTrial`. The opener gives the one\n * approval, so no reason is necessary and the answer already holds the\n * outcome.\n */\n public static async createExtendTrial(\n params: CreateExtendTrialRequest,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createExtendTrial',\n 'api/approvals/extend-trial',\n )\n return approval\n }\n\n /**\n * Opens a create-personal-organisation request. Any signed-in Camundi can.\n *\n * The request needs no approval, so the answer already holds the outcome,\n * and the route answers 404 while `control.personalOrganisation` is off.\n */\n public static async createPersonalOrganisation(\n params: CreatePersonalOrganisationRequest,\n ): Promise<ApprovalJobDto> {\n // The route answers 429 for the cap, and the cap does not go away. `request`\n // tries a 429 up to 8 times with growing waits, so a person at the cap\n // would wait minutes for the message. A rate limit of the service is a\n // retry that the person can press.\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createPersonalOrganisation',\n 'api/approvals/create-personal-organisation',\n { retryRateLimit: false },\n )\n return approval\n }\n\n /**\n * Opens a cluster-ttl-deletion request. Only the delete cron of\n * console-backend can, with an m2m token that holds `cmctd`.\n *\n * The request needs no approval, so the answer already holds the outcome.\n * For a cluster with a live request, the answer is that request.\n */\n public static async createClusterTtlDeletion(\n params: CreateClusterTtlDeletionRequest,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createClusterTtlDeletion',\n 'api/approvals/cluster-ttl-deletion',\n )\n return approval\n }\n\n /**\n * Opens a create-custom-hardware-sizing request. Any signed-in Camundi\n * can. It runs on dev only, needs no approval, and the route answers 403\n * on every other stage.\n */\n public static async createCustomHardwareSizing(\n params: SelfServiceApprovalRequest<\n CreateCustomHardwareSizingPayloadDto | LinkCustomHardwareSizingPayloadDto\n >,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createCustomHardwareSizing',\n 'api/approvals/create-custom-hardware-sizing',\n )\n return approval\n }\n\n /** Opens a remove-custom-hardware-sizing request. See the one above. */\n public static async removeCustomHardwareSizing(\n params: SelfServiceApprovalRequest<RemoveCustomHardwareSizingPayloadDto>,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'removeCustomHardwareSizing',\n 'api/approvals/remove-custom-hardware-sizing',\n )\n return approval\n }\n\n /** Opens a create-custom-generation request. Dev only, no approval. */\n public static async createCustomGeneration(\n params: SelfServiceApprovalRequest<\n CreateCustomGenerationPayloadDto | LinkCustomGenerationPayloadDto\n >,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'createCustomGeneration',\n 'api/approvals/create-custom-generation',\n )\n return approval\n }\n\n /** Opens a remove-custom-generation request. See the one above. */\n public static async removeCustomGeneration(\n params: SelfServiceApprovalRequest<RemoveCustomGenerationPayloadDto>,\n ): Promise<ApprovalJobDto> {\n const { approval } = await ControlApprovalsService.create(\n params,\n 'removeCustomGeneration',\n 'api/approvals/remove-custom-generation',\n )\n return approval\n }\n\n /**\n * Opens a self-service-cluster-modification request. Any signed-in Camundi\n * can, and accounts then checks that the Camundi owns the organization. It\n * runs on dev only and needs no approval, so the answer holds the outcome.\n * A 200 means that the same request of this person still runs.\n */\n public static async createSelfServiceClusterModification(\n params: SelfServiceApprovalRequest<SelfServiceClusterModificationPayloadDto>,\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n return ControlApprovalsService.create(\n params,\n 'createSelfServiceClusterModification',\n 'api/approvals/self-service-cluster-modification',\n )\n }\n\n /**\n * The shared half of every call that answers one request.\n *\n * Six routes answer `{ approval }` and differ only in the verb and the path.\n * One private helper keeps the metrics context, the status check and the\n * unwrapping in one place.\n */\n private static async readOne(\n params: RequestBaseParams,\n name: string,\n url: string,\n normalizedUrl: string,\n method: 'get' | 'post',\n body?: Record<string, unknown>,\n ): Promise<ApprovalJobDto> {\n const serviceContext = contextFor(\n name,\n url,\n normalizedUrl,\n method,\n params.config.metrics?.source || 'unset',\n )\n const response = await request<{ approval: ApprovalJobDto }>({\n config: params.config,\n base: BASE,\n url,\n method,\n metricsDetails: serviceContext,\n body,\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!.approval\n }\n\n /**\n * The shared half of every create route. See `approvalRequestBody`.\n *\n * The route answers 201 for a fresh request and 200 for the one already\n * open for the same target (`create` deduplicates). `created` carries that\n * difference. `createSendToExpiredTrial` and `createExtendTrial` do not\n * need it, so they read `approval` alone off this result.\n */\n private static async create<TPayload>(\n params: CreateApprovalRequest<TPayload>,\n name: string,\n url: string,\n options: {\n /** False sends the call once, also when the answer is a 429. */\n retryRateLimit?: boolean\n /** True masks every value of the body in the log lines. */\n redactBody?: boolean\n } = {},\n ): Promise<{ approval: ApprovalJobDto; created: boolean }> {\n const serviceContext = contextFor(\n name,\n url,\n url,\n 'post',\n params.config.metrics?.source || 'unset',\n )\n const response = await request<{ approval: ApprovalJobDto }>({\n config: params.config,\n base: BASE,\n url,\n method: 'post',\n metricsDetails: serviceContext,\n ...(options.retryRateLimit === false\n ? { retry: { attempts: 1, remaining: 0 } }\n : {}),\n redactBody: options.redactBody,\n body: {\n payload: params.params.payload,\n // control-backend accepts no reason, but it refuses an empty one\n // (`min(1)`). A dialog sends the text of its textarea, so a blank\n // text must leave the field out.\n reason: params.params.reason?.trim() ? params.params.reason : undefined,\n requiredAcks: params.params.requiredAcks,\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 {\n approval: response.body!.approval,\n created: response.status === 201,\n }\n }\n}\n"],
5
+ "mappings": "AA6BA,SAAS,oCAAoC;AAK7C,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAe1B,MAAM,OAAO,EAAE,IAAI,UAAU;AAu0B7B,SAAS,YAAY,SAAiB,CAAC,GAAW;AAChD,QAAM,QAAQ,IAAI,gBAAgB;AAClC,aAAW,CAAC,KAAK,GAAG,KAAK,OAAO,QAAQ,MAAM,GAAG;AAC/C,UAAM,QAAQ,MAAM,QAAQ,GAAG,IAAI,IAAI,KAAK,GAAG,IAAI;AACnD,QAAI,UAAU,UAAa,UAAU,IAAI;AACvC,YAAM,IAAI,KAAK,OAAO,KAAK,CAAC;AAAA,IAC9B;AAAA,EACF;AACA,SAAO,MAAM,OAAO,IAAI,IAAI,MAAM,SAAS,CAAC,KAAK;AACnD;AAEA,SAAS,WACP,MACA,KACA,eACA,MACA,QAC2B;AAC3B,SAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM,2BAA2B,IAAI;AAAA,MACrC;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA,QAAQ,EAAE,MAAM,WAAW,MAAM,WAAW;AAAA,EAC9C;AACF;AAEO,MAAM,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQnC,aAAoB,aAClB,QAC+B;AAC/B,UAAM,iBAAiB;AAAA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MACL,YAAY,QAAQ;AAAA,MACpB,MAAM;AAAA,QACJ,SAAS,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA,QAIvB,QAAQ,OAAO,OAAO,QAAQ,KAAK,IAAI,OAAO,OAAO,SAAS;AAAA,QAC9D,cAAc,OAAO,OAAO;AAAA,MAC9B;AAAA,IACF,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;AAAA,MACL,UAAU,SAAS,KAAM;AAAA,MACzB,SAAS,SAAS,WAAW;AAAA,IAC/B;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-api",
3
- "version": "7.5.0",
3
+ "version": "7.6.0",
4
4
  "description": "Centralized API service layer for Camunda Cloud Management Apps",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
@@ -41,7 +41,7 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "@camunda/ccma-shared-types": "12.6.0"
44
+ "@camunda/ccma-shared-types": "12.7.0"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "node esbuild.mjs && tsc --emitDeclarationOnly --outDir dist",