@camunda/ccma-api 5.15.0 → 5.16.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 +2 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +2 -2
- package/dist/services/control/control.agent-tokens.service.d.ts +66 -0
- package/dist/services/control/control.agent-tokens.service.js +134 -0
- package/dist/services/control/control.agent-tokens.service.js.map +7 -0
- package/dist/services/control/control.agent-tokens.service.spec.d.ts +1 -0
- package/dist/utils/api.js +5 -0
- package/dist/utils/api.js.map +2 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -100,6 +100,8 @@ export { type ActivateSecureConnectivityParams, ConsoleSecureConnectivityService
|
|
|
100
100
|
export { type GetStorybookConfigParams, StorybookConfigService, } from './services/console/console.storybook-config.service.js';
|
|
101
101
|
export { ConsoleValueMetricsService } from './services/console/console.valuemetrics.service.js';
|
|
102
102
|
export { type CreateGenerationParams, type DeleteGenerationParams, type DryRunPublishReleaseTrainResponse, type DryRunRollbackReleaseTrainResponse, GenerationService, type GenerationVersionsInput, type ListGenerationsParams, type ReleaseTrainGenerationRef, type SetGenerationArchivedParams, type SetGenerationBespokeParams, type UpdateGenerationParams, } from './services/console/generation.service.js';
|
|
103
|
+
export type { AgentTokenUuidRequest, CreateAgentTokenRequest, ListAllAgentTokensRequest, VerifyAgentClientRequest, } from './services/control/control.agent-tokens.service.js';
|
|
104
|
+
export { ControlAgentClientsInternalService, ControlAgentTokensService, } from './services/control/control.agent-tokens.service.js';
|
|
103
105
|
export type { AddAnnotationNoteRequest, AddAnnotationTagRequest, AnnotationIdRequest, AnnotationPageDto, AnnotationPageInfoDto, AnnotationTagPageDto, AnnotationTargetDto, EditAnnotationNoteRequest, GetEntityAnnotationsRequest, ListAnnotationTagsRequest, LookupAnnotationsRequest, SearchAnnotationsRequest, } from './services/control/control.annotations.service.js';
|
|
104
106
|
export { ControlAnnotationsService } from './services/control/control.annotations.service.js';
|
|
105
107
|
export type { ApprovalFacetParams, ApprovalIdRequest, ApprovalPageDto, AutomatedEnterpriseOnboardingPayloadDto, ChangeClusterPlanTypePayloadDto, ChangeFeatureFlagPayloadDto, ChangeGenerationVersionsPayloadDto, ChangeGenerationVersionsTargetDto, ChangeOrgLimitsPayloadDto, ChangePlatformRolesPayloadDto, ChangeSalesPlanPayloadDto, ChangeUserEmailPayloadDto, CountApprovalsRequest, CreateApprovalRequest, CreateClusterTtlDeletionRequest, CreateCustomGenerationPayloadDto, CreateCustomHardwareSizingPayloadDto, CreatePersonalOrganisationPayloadDto, CreatePersonalOrganisationRequest, CustomHardwareSizingRequest, DeleteInternalBackupPayloadDto, DeleteOrganizationPayloadDto, DeleteSsoConnectionPayloadDto, DeleteUserPayloadDto, ExtendTrialPayloadDto, FeatureFlagValuesDto, ForceDeleteClusterPlanTypePayloadDto, LinkCustomGenerationPayloadDto, LinkCustomHardwareSizingPayloadDto, ListApprovalsRequest, MoveClusterOrgPayloadDto, OnboardToEnterpriseClusterDto, OnboardToEnterprisePayloadDto, PurgeUsersPayloadDto, RejectApprovalRequest, RemoveCustomGenerationPayloadDto, RemoveCustomHardwareSizingPayloadDto, SelfServiceApprovalRequest, SelfServiceClusterModificationPayloadDto, SendToExpiredTrialPayloadDto, UpdateUserMetadataPayloadDto, WithdrawApprovalRequest, } from './services/control/control.approvals.service.js';
|
package/dist/index.js
CHANGED
|
@@ -97,6 +97,10 @@ import { ConsoleValueMetricsService } from "./services/console/console.valuemetr
|
|
|
97
97
|
import {
|
|
98
98
|
GenerationService
|
|
99
99
|
} from "./services/console/generation.service.js";
|
|
100
|
+
import {
|
|
101
|
+
ControlAgentClientsInternalService,
|
|
102
|
+
ControlAgentTokensService
|
|
103
|
+
} from "./services/control/control.agent-tokens.service.js";
|
|
100
104
|
import { ControlAnnotationsService } from "./services/control/control.annotations.service.js";
|
|
101
105
|
import { ControlApprovalsService } from "./services/control/control.approvals.service.js";
|
|
102
106
|
import { ControlDashboardsService } from "./services/control/control.dashboards.service.js";
|
|
@@ -189,6 +193,8 @@ export {
|
|
|
189
193
|
ConsoleM2MService,
|
|
190
194
|
ConsoleSecureConnectivityService,
|
|
191
195
|
ConsoleValueMetricsService,
|
|
196
|
+
ControlAgentClientsInternalService,
|
|
197
|
+
ControlAgentTokensService,
|
|
192
198
|
ControlAnnotationsService,
|
|
193
199
|
ControlApprovalsService,
|
|
194
200
|
ControlDashboardsService,
|
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 ChangeGenerationLinkThroughApprovalRequest,\n ChangeGenerationLinkThroughApprovalResult,\n ChangeOrgLimitThroughApprovalRequest,\n ChangePlatformRolesThroughApprovalRequest,\n ChangePlatformRolesThroughApprovalResult,\n ChangeSalesPlanThroughApprovalRequest,\n ChangeUserEmailThroughApprovalRequest,\n CheckOrgOwnerRequest,\n CreatePersonalOrganizationThroughApprovalRequest,\n CreatePersonalOrganizationThroughApprovalResult,\n DeleteOrganizationThroughApprovalRequest,\n DeleteOrganizationThroughApprovalResult,\n DeleteSsoConnectionThroughApprovalRequest,\n DeleteSsoConnectionThroughApprovalResult,\n DeleteUserThroughApprovalRequest,\n DeleteUserThroughApprovalResult,\n ExtendTrialThroughApprovalRequest,\n OnboardToEnterpriseClusterMapping,\n OnboardToEnterpriseContract,\n OnboardToEnterpriseThroughApprovalRequest,\n OrgLimitValue,\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 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 GetAuditRequest,\n GetClusterAuditRequest,\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'\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 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 ChangeClusterPlanTypeThroughApprovalRequest,\n ChangeGenerationVersionsThroughApprovalRequest,\n CheckCustomClusterPlanRemovalRequest,\n CheckCustomGenerationRemovalRequest,\n CreateCustomClusterPlanThroughApprovalRequest,\n CreateCustomGenerationThroughApprovalRequest,\n CustomClusterPlanThroughApprovalResult,\n CustomGenerationThroughApprovalResult,\n DeactivateSelfServiceModificationRequest,\n DeleteClusterOfPlanTypeThroughApprovalRequest,\n DeleteClusterPastTtlThroughApprovalRequest,\n DeleteClusterPlanTypeThroughApprovalRequest,\n DeleteCustomClusterPlanThroughApprovalRequest,\n DeleteCustomGenerationThroughApprovalRequest,\n DeleteInternalBackupThroughApprovalRequest,\n MoveClusterOwnerThroughApprovalRequest,\n PreviewReleaseTrainPublishRequest,\n PreviewReleaseTrainRollbackRequest,\n PublishReleaseTrainThroughApprovalRequest,\n PublishReleaseTrainThroughApprovalResult,\n ReadClusterPlanTypeClustersRequest,\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'\n\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 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 ChangeFeatureFlagPayloadDto,\n ChangeGenerationVersionsPayloadDto,\n ChangeGenerationVersionsTargetDto,\n ChangeOrgLimitsPayloadDto,\n ChangePlatformRolesPayloadDto,\n ChangeSalesPlanPayloadDto,\n ChangeUserEmailPayloadDto,\n CountApprovalsRequest,\n CreateApprovalRequest,\n CreateClusterTtlDeletionRequest,\n CreateCustomGenerationPayloadDto,\n CreateCustomHardwareSizingPayloadDto,\n CreatePersonalOrganisationPayloadDto,\n CreatePersonalOrganisationRequest,\n CustomHardwareSizingRequest,\n DeleteInternalBackupPayloadDto,\n DeleteOrganizationPayloadDto,\n DeleteSsoConnectionPayloadDto,\n DeleteUserPayloadDto,\n ExtendTrialPayloadDto,\n FeatureFlagValuesDto,\n ForceDeleteClusterPlanTypePayloadDto,\n LinkCustomGenerationPayloadDto,\n LinkCustomHardwareSizingPayloadDto,\n ListApprovalsRequest,\n MoveClusterOrgPayloadDto,\n OnboardToEnterpriseClusterDto,\n OnboardToEnterprisePayloadDto,\n PurgeUsersPayloadDto,\n RejectApprovalRequest,\n RemoveCustomGenerationPayloadDto,\n RemoveCustomHardwareSizingPayloadDto,\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 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 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'\nexport type { MixpanelSetGroupPropertiesOnceRequest } from './services/mixpanel/mixpanel.service.js'\n// mixpanel services\nexport { MixpanelService } from './services/mixpanel/mixpanel.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'\nexport type {\n JwksRequest,\n JwksResponse,\n} from './services/token-issuer/token-issuer.jwks.service.js'\n// token-issuer services\nexport { TokenIssuerJwksService } from './services/token-issuer/token-issuer.jwks.service.js'\nexport type {\n WordpressGetCardsRequest,\n WordpressGetHelpCenterConfigRequest,\n WordpressGetSurveyConfigRequest,\n} from './services/wordpress/wordpress.service.js'\n// wordpress services\nexport { WordpressService } from './services/wordpress/wordpress.service.js'\n\n// types\nexport type {\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;AAkClC,SAAS,mCAAmC;AAC5C,SAAS,0BAA0B;AAMnC,SAAS,wBAAwB;AA6BjC,SAAS,w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AyB;AAClC;AAAA,EAEE;AAAA,OAKK;AACP;AAAA,EAEE;AAAA,OACK;AACP,SAAS,kCAAkC;AAE3C;AAAA,EAKE;AAAA,OAOK;AAeP,SAAS,iCAAiC;AA8C1C,SAAS,+BAA+B;AAUxC,SAAS,gCAAgC;AAOzC,SAAS,kCAAkC;AAK3C,SAAS,8BAA8B;AAOvC,SAAS,+BAA+B;AAKxC,SAAS,8BAA8B;AAUvC,SAAS,oCAAoC;AAY7C,SAAS,qBAAqB;AAM9B,SAAS,oBAAoB;AAQ7B,SAAS,yBAAyB;AASlC;AAAA,EACgB;AAAA,EACF;AAAA,EACG;AAAA,EACf;AAAA,EACgB;AAAA,EACG;AAAA,OACd;AASP,SAAS,sBAAsB;AAM/B,SAAS,yBAAyB;AAwBlC,SAAS,sBAAsB;AAG/B,SAAS,oBAAoB;AAG7B,SAAS,uBAAuB;AAQhC,SAAS,4BAA4B;AAiBrC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAYP,SAAS,oBAAoB;AAM7B,SAAS,4BAA4B;AAGrC,SAAS,wBAAwB;AAOjC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAMP,SAAS,8BAA8B;AAOvC,SAAS,wBAAwB;AAiBjC;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 ChangeGenerationLinkThroughApprovalRequest,\n ChangeGenerationLinkThroughApprovalResult,\n ChangeOrgLimitThroughApprovalRequest,\n ChangePlatformRolesThroughApprovalRequest,\n ChangePlatformRolesThroughApprovalResult,\n ChangeSalesPlanThroughApprovalRequest,\n ChangeUserEmailThroughApprovalRequest,\n CheckOrgOwnerRequest,\n CreatePersonalOrganizationThroughApprovalRequest,\n CreatePersonalOrganizationThroughApprovalResult,\n DeleteOrganizationThroughApprovalRequest,\n DeleteOrganizationThroughApprovalResult,\n DeleteSsoConnectionThroughApprovalRequest,\n DeleteSsoConnectionThroughApprovalResult,\n DeleteUserThroughApprovalRequest,\n DeleteUserThroughApprovalResult,\n ExtendTrialThroughApprovalRequest,\n OnboardToEnterpriseClusterMapping,\n OnboardToEnterpriseContract,\n OnboardToEnterpriseThroughApprovalRequest,\n OrgLimitValue,\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 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 GetAuditRequest,\n GetClusterAuditRequest,\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'\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 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 ChangeClusterPlanTypeThroughApprovalRequest,\n ChangeGenerationVersionsThroughApprovalRequest,\n CheckCustomClusterPlanRemovalRequest,\n CheckCustomGenerationRemovalRequest,\n CreateCustomClusterPlanThroughApprovalRequest,\n CreateCustomGenerationThroughApprovalRequest,\n CustomClusterPlanThroughApprovalResult,\n CustomGenerationThroughApprovalResult,\n DeactivateSelfServiceModificationRequest,\n DeleteClusterOfPlanTypeThroughApprovalRequest,\n DeleteClusterPastTtlThroughApprovalRequest,\n DeleteClusterPlanTypeThroughApprovalRequest,\n DeleteCustomClusterPlanThroughApprovalRequest,\n DeleteCustomGenerationThroughApprovalRequest,\n DeleteInternalBackupThroughApprovalRequest,\n MoveClusterOwnerThroughApprovalRequest,\n PreviewReleaseTrainPublishRequest,\n PreviewReleaseTrainRollbackRequest,\n PublishReleaseTrainThroughApprovalRequest,\n PublishReleaseTrainThroughApprovalResult,\n ReadClusterPlanTypeClustersRequest,\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'\n\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'\n// control-backend \u2014 the read-only agent tokens of ccmacli\nexport type {\n AgentTokenUuidRequest,\n CreateAgentTokenRequest,\n ListAllAgentTokensRequest,\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 ChangeFeatureFlagPayloadDto,\n ChangeGenerationVersionsPayloadDto,\n ChangeGenerationVersionsTargetDto,\n ChangeOrgLimitsPayloadDto,\n ChangePlatformRolesPayloadDto,\n ChangeSalesPlanPayloadDto,\n ChangeUserEmailPayloadDto,\n CountApprovalsRequest,\n CreateApprovalRequest,\n CreateClusterTtlDeletionRequest,\n CreateCustomGenerationPayloadDto,\n CreateCustomHardwareSizingPayloadDto,\n CreatePersonalOrganisationPayloadDto,\n CreatePersonalOrganisationRequest,\n CustomHardwareSizingRequest,\n DeleteInternalBackupPayloadDto,\n DeleteOrganizationPayloadDto,\n DeleteSsoConnectionPayloadDto,\n DeleteUserPayloadDto,\n ExtendTrialPayloadDto,\n FeatureFlagValuesDto,\n ForceDeleteClusterPlanTypePayloadDto,\n LinkCustomGenerationPayloadDto,\n LinkCustomHardwareSizingPayloadDto,\n ListApprovalsRequest,\n MoveClusterOrgPayloadDto,\n OnboardToEnterpriseClusterDto,\n OnboardToEnterprisePayloadDto,\n PurgeUsersPayloadDto,\n RejectApprovalRequest,\n RemoveCustomGenerationPayloadDto,\n RemoveCustomHardwareSizingPayloadDto,\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 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 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'\nexport type { MixpanelSetGroupPropertiesOnceRequest } from './services/mixpanel/mixpanel.service.js'\n// mixpanel services\nexport { MixpanelService } from './services/mixpanel/mixpanel.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'\nexport type {\n JwksRequest,\n JwksResponse,\n} from './services/token-issuer/token-issuer.jwks.service.js'\n// token-issuer services\nexport { TokenIssuerJwksService } from './services/token-issuer/token-issuer.jwks.service.js'\nexport type {\n WordpressGetCardsRequest,\n WordpressGetHelpCenterConfigRequest,\n WordpressGetSurveyConfigRequest,\n} from './services/wordpress/wordpress.service.js'\n// wordpress services\nexport { WordpressService } from './services/wordpress/wordpress.service.js'\n\n// types\nexport type {\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;AAkClC,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;AAwC3C,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;AAMv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AA,OACd;AASP,SAAS,sBAAsB;AAM/B,SAAS,yBAAyB;AAwBlC,SAAS,sBAAsB;AAG/B,SAAS,oBAAoB;AAG7B,SAAS,uBAAuB;AAQhC,SAAS,4BAA4B;AAiBrC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAYP,SAAS,oBAAoB;AAM7B,SAAS,4BAA4B;AAGrC,SAAS,wBAAwB;AAOjC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAMP,SAAS,8BAA8B;AAOvC,SAAS,wBAAwB;AAiBjC;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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { AgentStatusResponse, AgentToken, AgentTokenAdmin, AgentTokenCreated, AgentTokenExpiryDays, AgentTokenStatus, AgentVerifyResponse } from '@camunda/ccma-shared-types';
|
|
2
|
+
import type { RequestBaseParams } from '../../types/general.types.js';
|
|
3
|
+
export interface CreateAgentTokenRequest extends RequestBaseParams {
|
|
4
|
+
params: {
|
|
5
|
+
name: string;
|
|
6
|
+
expiresInDays: AgentTokenExpiryDays;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export interface ListAllAgentTokensRequest extends RequestBaseParams {
|
|
10
|
+
params?: {
|
|
11
|
+
status?: Exclude<AgentTokenStatus, 'inactive'>;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface AgentTokenUuidRequest extends RequestBaseParams {
|
|
15
|
+
params: {
|
|
16
|
+
uuid: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface VerifyAgentClientRequest extends RequestBaseParams {
|
|
20
|
+
params: {
|
|
21
|
+
clientId: string;
|
|
22
|
+
clientSecret: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export declare class ControlAgentTokensService {
|
|
26
|
+
/**
|
|
27
|
+
* Creates an agent token of the caller. The answer is the only place that
|
|
28
|
+
* holds the secret. 404 while the flag `control.agentTokens` is off.
|
|
29
|
+
*/
|
|
30
|
+
static create(params: CreateAgentTokenRequest): Promise<AgentTokenCreated>;
|
|
31
|
+
/** The tokens that the caller created, newest first. */
|
|
32
|
+
static listOwn(params: RequestBaseParams): Promise<{
|
|
33
|
+
items: AgentToken[];
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* The newest 500 tokens of the stage that match `status`. Needs
|
|
37
|
+
* `agentTokens.admin`.
|
|
38
|
+
*/
|
|
39
|
+
static listAll(params: ListAllAgentTokensRequest): Promise<{
|
|
40
|
+
items: AgentTokenAdmin[];
|
|
41
|
+
}>;
|
|
42
|
+
/** A new secret for an own, active token. 404 while the flag is off. */
|
|
43
|
+
static rotate(params: AgentTokenUuidRequest): Promise<AgentTokenCreated>;
|
|
44
|
+
/** Revokes an own token, or any token with `agentTokens.admin`. */
|
|
45
|
+
static revoke(params: AgentTokenUuidRequest): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export declare class ControlAgentClientsInternalService {
|
|
48
|
+
/**
|
|
49
|
+
* Checks the credentials of an agent client. It needs no token: do not
|
|
50
|
+
* set `config.auth`. A 401 means that the credentials are not valid, for
|
|
51
|
+
* any reason, and it does not count as an error in the metrics.
|
|
52
|
+
*
|
|
53
|
+
* A 429 is NOT tried again. token-issuer calls this inside a token request,
|
|
54
|
+
* and `request` would otherwise wait and try up to 8 times.
|
|
55
|
+
*/
|
|
56
|
+
static verify(params: VerifyAgentClientRequest): Promise<AgentVerifyResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Whether an agent client is active, and its read permissions. It needs a
|
|
59
|
+
* machine token for `camunda-cloud-audience` that holds `ctas`. An unknown
|
|
60
|
+
* uuid answers `active: false`.
|
|
61
|
+
*
|
|
62
|
+
* A 429 is NOT tried again, for the reason of `verify`: the caller holds
|
|
63
|
+
* an agent request open, and it has a deadline of its own.
|
|
64
|
+
*/
|
|
65
|
+
static status(params: AgentTokenUuidRequest): Promise<AgentStatusResponse>;
|
|
66
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { request } from "../../utils/api.js";
|
|
2
|
+
import { HttpError } from "../../utils/errors.js";
|
|
3
|
+
const BASE = { id: "control" };
|
|
4
|
+
async function send(params, name, url, normalizedUrl, method, body, retry) {
|
|
5
|
+
const serviceContext = {
|
|
6
|
+
method: { name, url, normalizedUrl, type: method },
|
|
7
|
+
source: params.config.metrics?.source || "unset",
|
|
8
|
+
target: { name: "control", type: "internal" }
|
|
9
|
+
};
|
|
10
|
+
const response = await request({
|
|
11
|
+
...params,
|
|
12
|
+
config: params.config,
|
|
13
|
+
base: BASE,
|
|
14
|
+
url,
|
|
15
|
+
method,
|
|
16
|
+
metricsDetails: serviceContext,
|
|
17
|
+
body,
|
|
18
|
+
retry
|
|
19
|
+
});
|
|
20
|
+
if (!response.ok) {
|
|
21
|
+
throw new HttpError(
|
|
22
|
+
`${name}: ${response.status} ${response.statusText}`,
|
|
23
|
+
response.status,
|
|
24
|
+
response.statusText
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
return response.body;
|
|
28
|
+
}
|
|
29
|
+
class ControlAgentTokensService {
|
|
30
|
+
/**
|
|
31
|
+
* Creates an agent token of the caller. The answer is the only place that
|
|
32
|
+
* holds the secret. 404 while the flag `control.agentTokens` is off.
|
|
33
|
+
*/
|
|
34
|
+
static async create(params) {
|
|
35
|
+
return send(
|
|
36
|
+
params,
|
|
37
|
+
"ControlAgentTokensService.create",
|
|
38
|
+
"api/agent-tokens",
|
|
39
|
+
"api/agent-tokens",
|
|
40
|
+
"post",
|
|
41
|
+
params.params
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
/** The tokens that the caller created, newest first. */
|
|
45
|
+
static async listOwn(params) {
|
|
46
|
+
return send(
|
|
47
|
+
params,
|
|
48
|
+
"ControlAgentTokensService.listOwn",
|
|
49
|
+
"api/agent-tokens",
|
|
50
|
+
"api/agent-tokens",
|
|
51
|
+
"get"
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The newest 500 tokens of the stage that match `status`. Needs
|
|
56
|
+
* `agentTokens.admin`.
|
|
57
|
+
*/
|
|
58
|
+
static async listAll(params) {
|
|
59
|
+
const status = params.params?.status;
|
|
60
|
+
const query = status ? `?status=${encodeURIComponent(status)}` : "";
|
|
61
|
+
return send(
|
|
62
|
+
params,
|
|
63
|
+
"ControlAgentTokensService.listAll",
|
|
64
|
+
`api/agent-tokens/all${query}`,
|
|
65
|
+
"api/agent-tokens/all",
|
|
66
|
+
"get"
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
/** A new secret for an own, active token. 404 while the flag is off. */
|
|
70
|
+
static async rotate(params) {
|
|
71
|
+
return send(
|
|
72
|
+
params,
|
|
73
|
+
"ControlAgentTokensService.rotate",
|
|
74
|
+
`api/agent-tokens/${encodeURIComponent(params.params.uuid)}/rotate`,
|
|
75
|
+
"api/agent-tokens/:uuid/rotate",
|
|
76
|
+
"post"
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
/** Revokes an own token, or any token with `agentTokens.admin`. */
|
|
80
|
+
static async revoke(params) {
|
|
81
|
+
await send(
|
|
82
|
+
params,
|
|
83
|
+
"ControlAgentTokensService.revoke",
|
|
84
|
+
`api/agent-tokens/${encodeURIComponent(params.params.uuid)}`,
|
|
85
|
+
"api/agent-tokens/:uuid",
|
|
86
|
+
"delete"
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
class ControlAgentClientsInternalService {
|
|
91
|
+
/**
|
|
92
|
+
* Checks the credentials of an agent client. It needs no token: do not
|
|
93
|
+
* set `config.auth`. A 401 means that the credentials are not valid, for
|
|
94
|
+
* any reason, and it does not count as an error in the metrics.
|
|
95
|
+
*
|
|
96
|
+
* A 429 is NOT tried again. token-issuer calls this inside a token request,
|
|
97
|
+
* and `request` would otherwise wait and try up to 8 times.
|
|
98
|
+
*/
|
|
99
|
+
static async verify(params) {
|
|
100
|
+
return send(
|
|
101
|
+
params,
|
|
102
|
+
"ControlAgentClientsInternalService.verify",
|
|
103
|
+
"internal/agent-clients/verify",
|
|
104
|
+
"internal/agent-clients/verify",
|
|
105
|
+
"post",
|
|
106
|
+
params.params,
|
|
107
|
+
{ attempts: 1, remaining: 0 }
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Whether an agent client is active, and its read permissions. It needs a
|
|
112
|
+
* machine token for `camunda-cloud-audience` that holds `ctas`. An unknown
|
|
113
|
+
* uuid answers `active: false`.
|
|
114
|
+
*
|
|
115
|
+
* A 429 is NOT tried again, for the reason of `verify`: the caller holds
|
|
116
|
+
* an agent request open, and it has a deadline of its own.
|
|
117
|
+
*/
|
|
118
|
+
static async status(params) {
|
|
119
|
+
return send(
|
|
120
|
+
params,
|
|
121
|
+
"ControlAgentClientsInternalService.status",
|
|
122
|
+
`internal/agent-clients/${encodeURIComponent(params.params.uuid)}/status`,
|
|
123
|
+
"internal/agent-clients/:uuid/status",
|
|
124
|
+
"get",
|
|
125
|
+
void 0,
|
|
126
|
+
{ attempts: 1, remaining: 0 }
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
export {
|
|
131
|
+
ControlAgentClientsInternalService,
|
|
132
|
+
ControlAgentTokensService
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=control.agent-tokens.service.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/services/control/control.agent-tokens.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 AgentStatusResponse,\n AgentToken,\n AgentTokenAdmin,\n AgentTokenCreated,\n AgentTokenExpiryDays,\n AgentTokenStatus,\n AgentVerifyResponse,\n} from '@camunda/ccma-shared-types'\nimport type {\n RequestBaseMethodType,\n RequestBaseParams,\n} from '../../types/general.types.js'\nimport { request } from '../../utils/api.js'\nimport { HttpError } from '../../utils/errors.js'\n\n/**\n * The agent tokens of ccmacli in control-backend.\n *\n * `ControlAgentTokensService` is for a Camundi, with the user token of\n * control-frontend. `ControlAgentClientsInternalService` is for the machine\n * callers: token-issuer verifies credentials, and console-backend and\n * accounts-backend read the status of a client.\n */\n\nconst BASE = { id: 'control' } as const\n\nexport interface CreateAgentTokenRequest extends RequestBaseParams {\n params: { name: string; expiresInDays: AgentTokenExpiryDays }\n}\n\nexport interface ListAllAgentTokensRequest extends RequestBaseParams {\n params?: { status?: Exclude<AgentTokenStatus, 'inactive'> }\n}\n\nexport interface AgentTokenUuidRequest extends RequestBaseParams {\n params: { uuid: string }\n}\n\nexport interface VerifyAgentClientRequest extends RequestBaseParams {\n params: { clientId: string; clientSecret: string }\n}\n\nasync function send<TResponse>(\n params: RequestBaseParams,\n name: string,\n url: string,\n normalizedUrl: string,\n method: RequestBaseMethodType,\n body?: object,\n retry?: { attempts: number; remaining: number },\n): Promise<TResponse> {\n const serviceContext = {\n method: { name, url, normalizedUrl, type: method },\n source: params.config.metrics?.source || 'unset',\n target: { name: 'control', type: 'internal' as const },\n }\n const response = await request<TResponse>({\n ...params,\n config: params.config,\n base: BASE,\n url,\n method,\n metricsDetails: serviceContext,\n body,\n retry,\n })\n if (!response.ok) {\n throw new HttpError(\n `${name}: ${response.status} ${response.statusText}`,\n response.status,\n response.statusText,\n )\n }\n // `revoke` answers 204 with no body, and its caller reads nothing.\n return response.body as TResponse\n}\n\nexport class ControlAgentTokensService {\n /**\n * Creates an agent token of the caller. The answer is the only place that\n * holds the secret. 404 while the flag `control.agentTokens` is off.\n */\n public static async create(\n params: CreateAgentTokenRequest,\n ): Promise<AgentTokenCreated> {\n return send<AgentTokenCreated>(\n params,\n 'ControlAgentTokensService.create',\n 'api/agent-tokens',\n 'api/agent-tokens',\n 'post',\n params.params,\n )\n }\n\n /** The tokens that the caller created, newest first. */\n public static async listOwn(\n params: RequestBaseParams,\n ): Promise<{ items: AgentToken[] }> {\n return send<{ items: AgentToken[] }>(\n params,\n 'ControlAgentTokensService.listOwn',\n 'api/agent-tokens',\n 'api/agent-tokens',\n 'get',\n )\n }\n\n /**\n * The newest 500 tokens of the stage that match `status`. Needs\n * `agentTokens.admin`.\n */\n public static async listAll(\n params: ListAllAgentTokensRequest,\n ): Promise<{ items: AgentTokenAdmin[] }> {\n const status = params.params?.status\n const query = status ? `?status=${encodeURIComponent(status)}` : ''\n return send<{ items: AgentTokenAdmin[] }>(\n params,\n 'ControlAgentTokensService.listAll',\n `api/agent-tokens/all${query}`,\n 'api/agent-tokens/all',\n 'get',\n )\n }\n\n /** A new secret for an own, active token. 404 while the flag is off. */\n public static async rotate(\n params: AgentTokenUuidRequest,\n ): Promise<AgentTokenCreated> {\n return send<AgentTokenCreated>(\n params,\n 'ControlAgentTokensService.rotate',\n `api/agent-tokens/${encodeURIComponent(params.params.uuid)}/rotate`,\n 'api/agent-tokens/:uuid/rotate',\n 'post',\n )\n }\n\n /** Revokes an own token, or any token with `agentTokens.admin`. */\n public static async revoke(params: AgentTokenUuidRequest): Promise<void> {\n await send<undefined>(\n params,\n 'ControlAgentTokensService.revoke',\n `api/agent-tokens/${encodeURIComponent(params.params.uuid)}`,\n 'api/agent-tokens/:uuid',\n 'delete',\n )\n }\n}\n\nexport class ControlAgentClientsInternalService {\n /**\n * Checks the credentials of an agent client. It needs no token: do not\n * set `config.auth`. A 401 means that the credentials are not valid, for\n * any reason, and it does not count as an error in the metrics.\n *\n * A 429 is NOT tried again. token-issuer calls this inside a token request,\n * and `request` would otherwise wait and try up to 8 times.\n */\n public static async verify(\n params: VerifyAgentClientRequest,\n ): Promise<AgentVerifyResponse> {\n return send<AgentVerifyResponse>(\n params,\n 'ControlAgentClientsInternalService.verify',\n 'internal/agent-clients/verify',\n 'internal/agent-clients/verify',\n 'post',\n params.params,\n { attempts: 1, remaining: 0 },\n )\n }\n\n /**\n * Whether an agent client is active, and its read permissions. It needs a\n * machine token for `camunda-cloud-audience` that holds `ctas`. An unknown\n * uuid answers `active: false`.\n *\n * A 429 is NOT tried again, for the reason of `verify`: the caller holds\n * an agent request open, and it has a deadline of its own.\n */\n public static async status(\n params: AgentTokenUuidRequest,\n ): Promise<AgentStatusResponse> {\n return send<AgentStatusResponse>(\n params,\n 'ControlAgentClientsInternalService.status',\n `internal/agent-clients/${encodeURIComponent(params.params.uuid)}/status`,\n 'internal/agent-clients/:uuid/status',\n 'get',\n undefined,\n { attempts: 1, remaining: 0 },\n )\n }\n}\n"],
|
|
5
|
+
"mappings": "AAmBA,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAW1B,MAAM,OAAO,EAAE,IAAI,UAAU;AAkB7B,eAAe,KACb,QACA,MACA,KACA,eACA,QACA,MACA,OACoB;AACpB,QAAM,iBAAiB;AAAA,IACrB,QAAQ,EAAE,MAAM,KAAK,eAAe,MAAM,OAAO;AAAA,IACjD,QAAQ,OAAO,OAAO,SAAS,UAAU;AAAA,IACzC,QAAQ,EAAE,MAAM,WAAW,MAAM,WAAoB;AAAA,EACvD;AACA,QAAM,WAAW,MAAM,QAAmB;AAAA,IACxC,GAAG;AAAA,IACH,QAAQ,OAAO;AAAA,IACf,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,EACF,CAAC;AACD,MAAI,CAAC,SAAS,IAAI;AAChB,UAAM,IAAI;AAAA,MACR,GAAG,IAAI,KAAK,SAAS,MAAM,IAAI,SAAS,UAAU;AAAA,MAClD,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,EACF;AAEA,SAA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aAAoB,OAClB,QAC8B;AAC9B,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,0BAA0B,mBAAmB,OAAO,OAAO,IAAI,CAAC;AAAA,MAChE;AAAA,MACA;AAAA,MACA;AAAA,MACA,EAAE,UAAU,GAAG,WAAW,EAAE;AAAA,IAC9B;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/utils/api.js
CHANGED
|
@@ -449,6 +449,11 @@ async function request(payload) {
|
|
|
449
449
|
);
|
|
450
450
|
}
|
|
451
451
|
break;
|
|
452
|
+
case "control":
|
|
453
|
+
if (payload.metricsDetails.method.name === "ControlAgentClientsInternalService.verify") {
|
|
454
|
+
noErrorStatusCodes.push(401);
|
|
455
|
+
}
|
|
456
|
+
break;
|
|
452
457
|
}
|
|
453
458
|
if (noErrorStatusCodes.includes(response.status)) {
|
|
454
459
|
type2 = "success";
|
package/dist/utils/api.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/api.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 RequestBaseCustomMetricsDetailsType,\n RequestBaseMethodType,\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../types/general.types.js'\nimport { getEnvParam, type ServiceName } from './environments.js'\nimport { frontendCache } from './frontendCache.js'\n\nexport interface RequestPayload extends RequestBaseParams {\n base?: {\n id: ServiceName\n }\n url: string\n method: RequestBaseMethodType\n headers?: { [key: string]: string }\n type?: 'json' | 'text' | 'form' | 'none'\n responseType?: 'json' | 'text' | 'blob' | 'none'\n retry?: {\n attempts: number\n remaining: number\n }\n /**\n * Opt-in: retry transient gateway failures (502/503/504 and network/fetch\n * errors) with backoff, mirroring the 429 retry. Retried attempts emit a\n * `transient-retry` metric instead of `error`, so a healed blip (e.g. an\n * envoy connection reset during a pod restart) doesn't count toward the\n * internal error-rate alert. Only enable for idempotent-safe calls \u2014 a\n * retried POST may execute twice.\n */\n retryTransientErrors?: boolean\n transientRetry?: {\n attempts: number\n remaining: number\n }\n /**\n * Opt-in: log a failure with no HTTP status (timeout, connection reset) at\n * `warn` instead of `error`. Use it for third-party sites that we cannot\n * fix. The `error` metric and the response stay the same.\n */\n warnOnNoStatus?: boolean\n body?: any\n metricsDetails: RequestBaseServiceContext\n}\n\nconst TRANSIENT_RETRY_STATUS = [502, 503, 504]\n/**\n * Cap on the error body kept as `statusText`. It ends up in the thrown error's\n * message, the log line, and the `ccma.errors` payload, and some upstreams\n * (LiteLLM, GCP load balancers) answer failures with a full HTML page \u2014 one\n * such response is kilobytes of markup standing in for a reason phrase. The\n * head is what carries the actual reason.\n */\nconst MAX_ERROR_BODY_LENGTH = 500\n/** Appended in place of what was cut, and counted against the cap above. */\nconst ERROR_BODY_TRUNCATION_MARKER = '\u2026 [truncated]'\nconst MAX_TRANSIENT_RETRIES = 3\n\nlet sendToAccountsNg: () => boolean = () => false\n\n/**\n * Sends the requests to accounts with the header `x-ccma-backend: next` while\n * `isOn` answers true. The gateway then routes them to accounts-ng (spec\n * `docs/specs/accounts-ng.md`, section 9). A frontend sets it to read the flag\n * `accounts.ngBackend`. A backend never sets it: the gateway weights move the\n * calls of the backends.\n */\nexport const setAccountsNgBackend = (isOn: () => boolean): void => {\n sendToAccountsNg = isOn\n}\n\n/**\n * The header that sends a request to accounts-ng, or none. A frontend helper\n * that calls `fetch` for accounts itself adds it too.\n */\nexport const accountsNgHeaders = (): Record<string, string> => {\n try {\n return sendToAccountsNg() ? { 'x-ccma-backend': 'next' } : {}\n } catch (_error) {\n // never let a flag read break a request\n return {}\n }\n}\n\n/**\n * True for an absolute URL on the accounts host of the stage. Many callers\n * send such a URL with no `base`.\n */\nfunction isAccountsUrl(payload: RequestPayload): boolean {\n if (payload.base) {\n return false\n }\n try {\n const accounts = getEnvParam('accounts', payload.config)\n return payload.url === accounts || payload.url.startsWith(`${accounts}/`)\n } catch (_error) {\n return false\n }\n}\n\nexport interface Response<T> {\n body?: T\n status: number\n statusText?: string\n ok: boolean\n meta: {\n duration: number\n }\n}\n\nfunction sendMetrics(\n payload: RequestPayload,\n type: RequestBaseCustomMetricsDetailsType,\n options?: {\n duration?: number\n statusCode?: string\n error?: string\n },\n) {\n if (payload.config.metrics) {\n if (payload.config.metrics.types.includes(type)) {\n let durationBucket: string | undefined\n if (options?.duration) {\n if (options.duration < 100) {\n durationBucket = '0 | <100ms'\n } else if (options.duration < 200) {\n durationBucket = '1 | <200ms'\n } else if (options.duration < 500) {\n durationBucket = '2 | <500ms'\n } else if (options.duration < 1000) {\n durationBucket = '3 | <1s'\n } else {\n durationBucket = '4 | >=1s'\n }\n }\n\n // only add normalized errors as labels\n let error = 'other'\n if (options?.error) {\n try {\n const errorMessage = options.error\n if (errorMessage.startsWith('<!DOCTYPE html>')) {\n error = 'html-response'\n } else if (errorMessage.includes('UND_ERR_CONNECT_TIMEOUT')) {\n error = 'connect-timeout'\n }\n } catch (_error) {\n // ignore it\n }\n } else {\n error = 'unset'\n }\n\n const metrics: RequestBaseServiceContext = {\n ...payload.metricsDetails,\n eventType: type,\n durationBucket,\n statusCode: options?.statusCode,\n error,\n }\n try {\n payload.config.metrics.callback(metrics)\n } catch (metricsCallbackError) {\n log(payload, 'debug', `Failed to send metrics`, {\n error: metricsCallbackError,\n metrics,\n })\n }\n }\n }\n}\n\nexport function log(\n payload: RequestPayload,\n type: 'debug' | 'info' | 'warn' | 'error',\n message: string,\n additionalData?: any,\n) {\n if (payload.config.logger) {\n const messageParts: string[] = []\n messageParts.push(payload.metricsDetails?.method?.name)\n messageParts.push(\n `${payload.metricsDetails?.target?.name} (${payload.metricsDetails?.target?.type})`,\n )\n messageParts.push(message)\n let body: any\n if (payload.body) {\n body = JSON.parse(JSON.stringify(payload.body))\n for (const key of Object.keys(body)) {\n if (\n key.toLowerCase().includes('password') ||\n key.toLowerCase().includes('secret') ||\n key.toLowerCase().includes('token')\n ) {\n body[key] = '********'\n }\n }\n }\n\n let fullUrl = 'unset'\n\n if (payload.base) {\n try {\n const base = getEnvParam(payload.base.id, payload.config)\n fullUrl = base ? `${base}/${payload.url}` : payload.url\n } catch (_error) {\n fullUrl = `failed to get base url for ${payload.base.id}`\n }\n }\n\n let url = `${payload.url}`.toLowerCase()\n if (url.includes('secret') || url.includes('password')) {\n url = url.split('?')[0]\n }\n\n const data = {\n base: payload.base,\n method: payload.method,\n url,\n fullUrl,\n retry: payload.retry,\n body,\n context: payload.metricsDetails,\n ...additionalData,\n }\n // `warn` is optional on the logger, so fall back to `error` and lose no log\n const { logger } = payload.config\n const fullMessage = messageParts.join(' > ')\n if (type === 'warn') {\n if (logger.warn) {\n logger.warn(fullMessage, { data })\n } else {\n logger.error(fullMessage, { data })\n }\n } else {\n logger[type](fullMessage, { data })\n }\n }\n}\n\nfunction rateLimitWaitingTime(attempt: number): number {\n const noise = Math.random() * 100\n const waitingTime = 2 ** attempt * 1000 + noise\n return Math.floor(waitingTime)\n}\n\nfunction transientRetryWaitingTime(attempt: number): number {\n const noise = Math.random() * 100\n // 500ms, 1s, 2s (+jitter) \u2014 bounded so a fire-and-forget call heals fast.\n return Math.floor(2 ** attempt * 250 + noise)\n}\n\nfunction canRetryTransient(payload: RequestPayload): boolean {\n if (!payload.retryTransientErrors) {\n return false\n }\n const remaining = payload.transientRetry?.remaining ?? MAX_TRANSIENT_RETRIES\n return remaining > 0\n}\n\nasync function scheduleTransientRetry(payload: RequestPayload): Promise<void> {\n const attempts = payload.transientRetry?.attempts ?? 1\n const remaining = payload.transientRetry?.remaining ?? MAX_TRANSIENT_RETRIES\n const waitingTime = transientRetryWaitingTime(attempts)\n log(\n payload,\n 'debug',\n `transient error, attempt ${attempts}, remaining ${remaining}, waiting ${waitingTime}ms`,\n )\n await new Promise((resolve) => {\n setTimeout(resolve, waitingTime)\n })\n // eslint-disable-next-line require-atomic-updates\n payload.transientRetry = {\n attempts: attempts + 1,\n remaining: remaining - 1,\n }\n}\n\nexport async function request<T>(\n payload: RequestPayload,\n): Promise<Response<T>> {\n log(payload, 'debug', 'starting request')\n sendMetrics(payload, 'request')\n // configure frontend cache if enabled (browser only)\n try {\n if (payload.config.frontendCaching?.enabled) {\n frontendCache.configure(payload.config.frontendCaching)\n }\n } catch (_cacheConfigError) {\n // ignore configuration errors silently\n }\n let token\n if (payload.config.auth) {\n token = await payload.config.auth.getToken()\n }\n // Dynamic (e.g. correlation) headers first, then explicit per-request headers\n // override them, then auth/content-type below take final precedence.\n //\n // Correlation headers (traceparent, x-cc-session-id) identify our internal\n // request/session, so they must only ever reach Camunda-owned systems. Every\n // third-party target is marked `type: 'external'`, so we gate on that here:\n // external targets never receive dynamic headers even if the caller's config\n // sets getDynamicHeaders. This makes propagation safe-by-default and removes\n // the footgun of a shared config that is used for both internal and\n // third-party calls (e.g. BASIC_API_CONFIG \u2192 token-issuer vs Slack).\n let dynamicHeaders: Record<string, string> = {}\n if (payload.metricsDetails?.target?.type !== 'external') {\n try {\n dynamicHeaders = payload.config.getDynamicHeaders?.() ?? {}\n } catch (_error) {\n // never let header evaluation break a request\n }\n }\n const headers: { [key: string]: string } = {\n ...dynamicHeaders,\n ...(payload.headers ?? {}),\n }\n if (token) {\n headers.Authorization = `Bearer ${token}`\n }\n if (payload.base?.id === 'accounts' || isAccountsUrl(payload)) {\n Object.assign(headers, accountsNgHeaders())\n }\n const type = payload.type ?? 'json'\n let body\n if (type) {\n switch (type) {\n case 'json':\n headers['Content-Type'] = 'application/json'\n body = payload.body ? JSON.stringify(payload.body) : undefined\n break\n case 'text':\n headers['Content-Type'] = 'text/plain'\n body = payload.body ? JSON.stringify(payload.body) : undefined\n break\n case 'form':\n if (payload.body) {\n const formData = new URLSearchParams()\n Object.keys(payload.body).forEach((key) => {\n formData.append(key, payload.body[key])\n })\n body = formData\n }\n break\n }\n }\n let base\n if (payload.base) {\n try {\n base = getEnvParam(payload.base.id, payload.config)\n } catch (error) {\n log(payload, 'error', `Failed to get base url for ${payload.base.id}`, {\n error,\n })\n throw error\n }\n }\n const url = base ? `${base}/${payload.url}` : payload.url\n\n // Attempt cache read for GET requests (stale-while-revalidate when callback supplied)\n let serveCachedAndReturnAfterNetwork = false\n if (payload.method === 'get' && payload.config.frontendCaching?.enabled) {\n try {\n const cached = await frontendCache.get<T>('get', url)\n if (cached) {\n const fresh = frontendCache.isFresh(cached)\n if (payload.onCachedResponse) {\n payload.onCachedResponse(cached.payload, { fresh, source: 'cache' })\n if (!fresh) {\n log(payload, 'debug', 'cache stale, refreshing in background')\n serveCachedAndReturnAfterNetwork = true\n } else {\n log(payload, 'debug', 'cache fresh, returning early')\n sendMetrics(payload, 'success', { duration: 0, statusCode: '200' })\n return {\n // eslint-disable-next-line id-length\n ok: true,\n status: 200,\n statusText: 'cached',\n body: cached.payload,\n meta: { duration: 0 },\n }\n }\n } else if (fresh) {\n // no callback but fresh -> return directly\n log(payload, 'debug', 'cache hit, returning cached response')\n sendMetrics(payload, 'success', { duration: 0, statusCode: '200' })\n return {\n // eslint-disable-next-line id-length\n ok: true,\n status: 200,\n statusText: 'cached',\n body: cached.payload,\n meta: { duration: 0 },\n }\n } else {\n log(payload, 'debug', 'cache stale, proceeding with network request')\n }\n }\n } catch (_cacheGetError) {\n // ignore cache errors\n }\n }\n const start = performance.now()\n const proxyAgent = payload.config.proxyAgent ?? {}\n try {\n const fetchResponse = await fetch(url, {\n signal: payload.config.timeout\n ? AbortSignal.timeout(payload.config.timeout)\n : undefined,\n method: payload.method.toUpperCase(),\n headers,\n body,\n ...proxyAgent,\n })\n const end = performance.now()\n const duration = end - start\n\n if ([429].includes(fetchResponse.status)) {\n // rate limiting, retry\n log(payload, 'info', 'rate limited', { durationMs: Math.floor(duration) })\n sendMetrics(payload, 'rate-limit-retry', {\n duration,\n statusCode: String(fetchResponse.status),\n })\n const remaining = payload.retry?.remaining ?? 8\n const attempts = payload.retry?.attempts ?? 1\n if (remaining > 0) {\n let waitingTime = rateLimitWaitingTime(attempts)\n if (fetchResponse.headers.has('x-ratelimit-reset')) {\n const rateLimitHeader = fetchResponse.headers.get('x-ratelimit-reset')\n log(\n payload,\n 'debug',\n `rate limited, found x-ratelimit-reset header: ${rateLimitHeader}`,\n )\n const rateLimitHeaderNumber = Number(rateLimitHeader)\n if (Number.isNaN(rateLimitHeaderNumber)) {\n waitingTime = Date.parse(rateLimitHeader ?? '0') - Date.now()\n } else {\n waitingTime = rateLimitHeaderNumber - Date.now()\n }\n }\n if (waitingTime < 0 || waitingTime > 180000) {\n waitingTime = rateLimitWaitingTime(attempts)\n }\n log(\n payload,\n 'debug',\n `rate limited, attempt ${attempts}, remaining ${remaining}, waiting ${waitingTime}ms`,\n )\n await new Promise((resolve) => {\n setTimeout(resolve, waitingTime)\n })\n // eslint-disable-next-line require-atomic-updates\n payload.retry = {\n attempts: attempts + 1,\n remaining: remaining - 1,\n }\n return request(payload)\n }\n log(payload, 'debug', `rate limited, no more retries`, {\n durationMs: Math.floor(duration),\n })\n }\n\n const response: Response<T> = {\n // eslint-disable-next-line id-length\n ok: fetchResponse.ok,\n status: fetchResponse.status,\n statusText: fetchResponse.statusText,\n meta: {\n duration,\n },\n }\n\n const responseType = payload.responseType ?? type\n\n if (response.ok) {\n log(payload, 'debug', `request successful in ${Math.floor(duration)}ms`, {\n baseUrl: base,\n durationMs: Math.floor(duration),\n })\n sendMetrics(payload, 'success', {\n duration,\n statusCode: String(fetchResponse.status),\n })\n switch (responseType) {\n case 'json':\n try {\n response.body = await fetchResponse.json()\n } catch (_error) {\n log(\n payload,\n 'debug',\n `Failed to parse json body. Returning empty object.`,\n {\n baseUrl: base,\n },\n )\n response.body = {} as T\n try {\n const responseBodyText = await fetchResponse.text()\n log(payload, 'debug', `Response body text`, {\n baseUrl: base,\n responseBodyText,\n status: fetchResponse.status,\n })\n } catch (textError) {\n // this is fine\n log(payload, 'debug', `Failed to parse response body text.`, {\n baseUrl: base,\n status: fetchResponse.status,\n error: textError,\n })\n }\n }\n break\n case 'text':\n response.body = (await fetchResponse.text()) as T\n break\n case 'blob':\n // Binary payloads (file downloads, e.g. database dumps). Not cached.\n response.body = (await fetchResponse.blob()) as T\n break\n default:\n response.body = (await fetchResponse.text()) as T\n }\n // store in cache after parsing\n if (\n payload.method === 'get' &&\n payload.config.frontendCaching?.enabled &&\n response.body !== undefined &&\n responseType !== 'blob'\n ) {\n try {\n await frontendCache.set('get', url, response.body as any)\n log(payload, 'debug', 'cache store successful')\n } catch (_cacheSetError) {\n // ignore cache set error\n }\n }\n } else {\n let statusText = fetchResponse.statusText\n try {\n statusText = await fetchResponse.text()\n } catch (_error) {\n // this is fine\n }\n if (statusText.length > MAX_ERROR_BODY_LENGTH) {\n // The marker is part of the budget, so the stored value never exceeds\n // MAX_ERROR_BODY_LENGTH \u2014 appending it after slicing to the full cap\n // would put the result over the bound the constant advertises.\n statusText = `${statusText.slice(\n 0,\n MAX_ERROR_BODY_LENGTH - ERROR_BODY_TRUNCATION_MARKER.length,\n )}${ERROR_BODY_TRUNCATION_MARKER}`\n }\n response.statusText = statusText\n log(\n payload,\n 'debug',\n `request failed with status ${response.status}: ${statusText}`,\n {\n baseUrl: base,\n durationMs: Math.floor(duration),\n },\n )\n\n // Transient gateway failure (e.g. envoy \"connection termination\" 503\n // during a pod restart). When opted in, retry with backoff and record it\n // as `transient-retry` rather than `error`, so a healed blip stays off\n // the internal error-rate alert.\n if (\n TRANSIENT_RETRY_STATUS.includes(response.status) &&\n canRetryTransient(payload)\n ) {\n sendMetrics(payload, 'transient-retry', {\n duration,\n statusCode: String(fetchResponse.status),\n error: statusText,\n })\n await scheduleTransientRetry(payload)\n return request(payload)\n }\n\n // Special Handling for dedicated target systems to not count special status codes as errors\n // eslint-disable-next-line no-shadow\n let type: RequestBaseCustomMetricsDetailsType = 'error'\n const noErrorStatusCodes: number[] = []\n switch (payload.metricsDetails.target.name) {\n case 'auth0':\n noErrorStatusCodes.push(...[400, 404, 409])\n break\n case 'accounts':\n case 'console':\n noErrorStatusCodes.push(...[404, 409])\n if (payload.metricsDetails.method.name === 'createTemporaryCluster') {\n // case: cannot create temporary cluster\n noErrorStatusCodes.push(...[400, 403, 412])\n }\n if (\n [\n 'ConsoleM2MService.verifyZeebeClient',\n 'ConsoleM2MService.verifyApiClient',\n ].includes(payload.metricsDetails.method.name)\n ) {\n // case: api/zeebe client credentials are invalid\n noErrorStatusCodes.push(...[401])\n }\n if (\n payload.metricsDetails.method.name ===\n 'OrgsService.createAndReturnSocialLoginUser'\n ) {\n noErrorStatusCodes.push(\n ...[\n // onboard user, user already has an org\n 400,\n // existing extSSO-connection\n 412,\n ],\n )\n }\n break\n }\n\n if (noErrorStatusCodes.includes(response.status)) {\n type = 'success'\n }\n\n sendMetrics(payload, type, {\n duration,\n statusCode: String(fetchResponse.status),\n error: statusText,\n })\n }\n if (serveCachedAndReturnAfterNetwork && response.ok) {\n // when we served stale via callback earlier, we now also return the fresh response\n log(payload, 'debug', 'stale cache updated, returning new data')\n }\n return response\n } catch (error: any) {\n const duration = performance.now() - start\n let errorMessage: string | undefined\n if (error?.cause?.code) {\n errorMessage = error?.cause?.code\n } else if (error?.message) {\n errorMessage = error?.message\n }\n // Network/fetch error with no HTTP status (e.g. connection reset, timeout).\n // Retry-on-opt-in before treating it as an error (see else branch above).\n if (canRetryTransient(payload)) {\n log(payload, 'debug', `request failed with no status, retrying`, {\n baseUrl: base,\n error,\n durationMs: Math.floor(duration),\n })\n sendMetrics(payload, 'transient-retry', {\n statusCode: 'fetch-error',\n duration,\n error: errorMessage,\n })\n await scheduleTransientRetry(payload)\n return request(payload)\n }\n log(\n payload,\n payload.warnOnNoStatus ? 'warn' : 'error',\n `request failed with no status`,\n {\n baseUrl: base,\n error,\n durationMs: Math.floor(duration),\n },\n )\n sendMetrics(payload, 'error', {\n statusCode: 'fetch-error',\n duration,\n error: errorMessage,\n })\n const response: Response<T> = {\n // eslint-disable-next-line id-length\n ok: false,\n status: 500,\n statusText: 'fetch error',\n meta: {\n duration,\n },\n }\n return response\n }\n}\n"],
|
|
5
|
-
"mappings": "AAYA,SAAS,mBAAqC;AAC9C,SAAS,qBAAqB;AAsC9B,MAAM,yBAAyB,CAAC,KAAK,KAAK,GAAG;AAQ7C,MAAM,wBAAwB;AAE9B,MAAM,+BAA+B;AACrC,MAAM,wBAAwB;AAE9B,IAAI,mBAAkC,MAAM;AASrC,MAAM,uBAAuB,CAAC,SAA8B;AACjE,qBAAmB;AACrB;AAMO,MAAM,oBAAoB,MAA8B;AAC7D,MAAI;AACF,WAAO,iBAAiB,IAAI,EAAE,kBAAkB,OAAO,IAAI,CAAC;AAAA,EAC9D,SAAS,QAAQ;AAEf,WAAO,CAAC;AAAA,EACV;AACF;AAMA,SAAS,cAAc,SAAkC;AACvD,MAAI,QAAQ,MAAM;AAChB,WAAO;AAAA,EACT;AACA,MAAI;AACF,UAAM,WAAW,YAAY,YAAY,QAAQ,MAAM;AACvD,WAAO,QAAQ,QAAQ,YAAY,QAAQ,IAAI,WAAW,GAAG,QAAQ,GAAG;AAAA,EAC1E,SAAS,QAAQ;AACf,WAAO;AAAA,EACT;AACF;AAYA,SAAS,YACP,SACA,MACA,SAKA;AACA,MAAI,QAAQ,OAAO,SAAS;AAC1B,QAAI,QAAQ,OAAO,QAAQ,MAAM,SAAS,IAAI,GAAG;AAC/C,UAAI;AACJ,UAAI,SAAS,UAAU;AACrB,YAAI,QAAQ,WAAW,KAAK;AAC1B,2BAAiB;AAAA,QACnB,WAAW,QAAQ,WAAW,KAAK;AACjC,2BAAiB;AAAA,QACnB,WAAW,QAAQ,WAAW,KAAK;AACjC,2BAAiB;AAAA,QACnB,WAAW,QAAQ,WAAW,KAAM;AAClC,2BAAiB;AAAA,QACnB,OAAO;AACL,2BAAiB;AAAA,QACnB;AAAA,MACF;AAGA,UAAI,QAAQ;AACZ,UAAI,SA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AAAA,QAAO;AAAA,MACT;AAEA,kBAAY,SAASA,OAAM;AAAA,QACzB;AAAA,QACA,YAAY,OAAO,cAAc,MAAM;AAAA,QACvC,OAAO;AAAA,MACT,CAAC;AAAA,IACH;AACA,QAAI,oCAAoC,SAAS,IAAI;AAEnD,UAAI,SAAS,SAAS,yCAAyC;AAAA,IACjE;AACA,WAAO;AAAA,EACT,SAAS,OAAY;AACnB,UAAM,WAAW,YAAY,IAAI,IAAI;AACrC,QAAI;AACJ,QAAI,OAAO,OAAO,MAAM;AACtB,qBAAe,OAAO,OAAO;AAAA,IAC/B,WAAW,OAAO,SAAS;AACzB,qBAAe,OAAO;AAAA,IACxB;AAGA,QAAI,kBAAkB,OAAO,GAAG;AAC9B,UAAI,SAAS,SAAS,2CAA2C;AAAA,QAC/D,SAAS;AAAA,QACT;AAAA,QACA,YAAY,KAAK,MAAM,QAAQ;AAAA,MACjC,CAAC;AACD,kBAAY,SAAS,mBAAmB;AAAA,QACtC,YAAY;AAAA,QACZ;AAAA,QACA,OAAO;AAAA,MACT,CAAC;AACD,YAAM,uBAAuB,OAAO;AACpC,aAAO,QAAQ,OAAO;AAAA,IACxB;AACA;AAAA,MACE;AAAA,MACA,QAAQ,iBAAiB,SAAS;AAAA,MAClC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT;AAAA,QACA,YAAY,KAAK,MAAM,QAAQ;AAAA,MACjC;AAAA,IACF;AACA,gBAAY,SAAS,SAAS;AAAA,MAC5B,YAAY;AAAA,MACZ;AAAA,MACA,OAAO;AAAA,IACT,CAAC;AACD,UAAM,WAAwB;AAAA;AAAA,MAE5B,IAAI;AAAA,MACJ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,MAAM;AAAA,QACJ;AAAA,MACF;AAAA,IACF;AACA,WAAO;AAAA,EACT;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 RequestBaseCustomMetricsDetailsType,\n RequestBaseMethodType,\n RequestBaseParams,\n RequestBaseServiceContext,\n} from '../types/general.types.js'\nimport { getEnvParam, type ServiceName } from './environments.js'\nimport { frontendCache } from './frontendCache.js'\n\nexport interface RequestPayload extends RequestBaseParams {\n base?: {\n id: ServiceName\n }\n url: string\n method: RequestBaseMethodType\n headers?: { [key: string]: string }\n type?: 'json' | 'text' | 'form' | 'none'\n responseType?: 'json' | 'text' | 'blob' | 'none'\n retry?: {\n attempts: number\n remaining: number\n }\n /**\n * Opt-in: retry transient gateway failures (502/503/504 and network/fetch\n * errors) with backoff, mirroring the 429 retry. Retried attempts emit a\n * `transient-retry` metric instead of `error`, so a healed blip (e.g. an\n * envoy connection reset during a pod restart) doesn't count toward the\n * internal error-rate alert. Only enable for idempotent-safe calls \u2014 a\n * retried POST may execute twice.\n */\n retryTransientErrors?: boolean\n transientRetry?: {\n attempts: number\n remaining: number\n }\n /**\n * Opt-in: log a failure with no HTTP status (timeout, connection reset) at\n * `warn` instead of `error`. Use it for third-party sites that we cannot\n * fix. The `error` metric and the response stay the same.\n */\n warnOnNoStatus?: boolean\n body?: any\n metricsDetails: RequestBaseServiceContext\n}\n\nconst TRANSIENT_RETRY_STATUS = [502, 503, 504]\n/**\n * Cap on the error body kept as `statusText`. It ends up in the thrown error's\n * message, the log line, and the `ccma.errors` payload, and some upstreams\n * (LiteLLM, GCP load balancers) answer failures with a full HTML page \u2014 one\n * such response is kilobytes of markup standing in for a reason phrase. The\n * head is what carries the actual reason.\n */\nconst MAX_ERROR_BODY_LENGTH = 500\n/** Appended in place of what was cut, and counted against the cap above. */\nconst ERROR_BODY_TRUNCATION_MARKER = '\u2026 [truncated]'\nconst MAX_TRANSIENT_RETRIES = 3\n\nlet sendToAccountsNg: () => boolean = () => false\n\n/**\n * Sends the requests to accounts with the header `x-ccma-backend: next` while\n * `isOn` answers true. The gateway then routes them to accounts-ng (spec\n * `docs/specs/accounts-ng.md`, section 9). A frontend sets it to read the flag\n * `accounts.ngBackend`. A backend never sets it: the gateway weights move the\n * calls of the backends.\n */\nexport const setAccountsNgBackend = (isOn: () => boolean): void => {\n sendToAccountsNg = isOn\n}\n\n/**\n * The header that sends a request to accounts-ng, or none. A frontend helper\n * that calls `fetch` for accounts itself adds it too.\n */\nexport const accountsNgHeaders = (): Record<string, string> => {\n try {\n return sendToAccountsNg() ? { 'x-ccma-backend': 'next' } : {}\n } catch (_error) {\n // never let a flag read break a request\n return {}\n }\n}\n\n/**\n * True for an absolute URL on the accounts host of the stage. Many callers\n * send such a URL with no `base`.\n */\nfunction isAccountsUrl(payload: RequestPayload): boolean {\n if (payload.base) {\n return false\n }\n try {\n const accounts = getEnvParam('accounts', payload.config)\n return payload.url === accounts || payload.url.startsWith(`${accounts}/`)\n } catch (_error) {\n return false\n }\n}\n\nexport interface Response<T> {\n body?: T\n status: number\n statusText?: string\n ok: boolean\n meta: {\n duration: number\n }\n}\n\nfunction sendMetrics(\n payload: RequestPayload,\n type: RequestBaseCustomMetricsDetailsType,\n options?: {\n duration?: number\n statusCode?: string\n error?: string\n },\n) {\n if (payload.config.metrics) {\n if (payload.config.metrics.types.includes(type)) {\n let durationBucket: string | undefined\n if (options?.duration) {\n if (options.duration < 100) {\n durationBucket = '0 | <100ms'\n } else if (options.duration < 200) {\n durationBucket = '1 | <200ms'\n } else if (options.duration < 500) {\n durationBucket = '2 | <500ms'\n } else if (options.duration < 1000) {\n durationBucket = '3 | <1s'\n } else {\n durationBucket = '4 | >=1s'\n }\n }\n\n // only add normalized errors as labels\n let error = 'other'\n if (options?.error) {\n try {\n const errorMessage = options.error\n if (errorMessage.startsWith('<!DOCTYPE html>')) {\n error = 'html-response'\n } else if (errorMessage.includes('UND_ERR_CONNECT_TIMEOUT')) {\n error = 'connect-timeout'\n }\n } catch (_error) {\n // ignore it\n }\n } else {\n error = 'unset'\n }\n\n const metrics: RequestBaseServiceContext = {\n ...payload.metricsDetails,\n eventType: type,\n durationBucket,\n statusCode: options?.statusCode,\n error,\n }\n try {\n payload.config.metrics.callback(metrics)\n } catch (metricsCallbackError) {\n log(payload, 'debug', `Failed to send metrics`, {\n error: metricsCallbackError,\n metrics,\n })\n }\n }\n }\n}\n\nexport function log(\n payload: RequestPayload,\n type: 'debug' | 'info' | 'warn' | 'error',\n message: string,\n additionalData?: any,\n) {\n if (payload.config.logger) {\n const messageParts: string[] = []\n messageParts.push(payload.metricsDetails?.method?.name)\n messageParts.push(\n `${payload.metricsDetails?.target?.name} (${payload.metricsDetails?.target?.type})`,\n )\n messageParts.push(message)\n let body: any\n if (payload.body) {\n body = JSON.parse(JSON.stringify(payload.body))\n for (const key of Object.keys(body)) {\n if (\n key.toLowerCase().includes('password') ||\n key.toLowerCase().includes('secret') ||\n key.toLowerCase().includes('token')\n ) {\n body[key] = '********'\n }\n }\n }\n\n let fullUrl = 'unset'\n\n if (payload.base) {\n try {\n const base = getEnvParam(payload.base.id, payload.config)\n fullUrl = base ? `${base}/${payload.url}` : payload.url\n } catch (_error) {\n fullUrl = `failed to get base url for ${payload.base.id}`\n }\n }\n\n let url = `${payload.url}`.toLowerCase()\n if (url.includes('secret') || url.includes('password')) {\n url = url.split('?')[0]\n }\n\n const data = {\n base: payload.base,\n method: payload.method,\n url,\n fullUrl,\n retry: payload.retry,\n body,\n context: payload.metricsDetails,\n ...additionalData,\n }\n // `warn` is optional on the logger, so fall back to `error` and lose no log\n const { logger } = payload.config\n const fullMessage = messageParts.join(' > ')\n if (type === 'warn') {\n if (logger.warn) {\n logger.warn(fullMessage, { data })\n } else {\n logger.error(fullMessage, { data })\n }\n } else {\n logger[type](fullMessage, { data })\n }\n }\n}\n\nfunction rateLimitWaitingTime(attempt: number): number {\n const noise = Math.random() * 100\n const waitingTime = 2 ** attempt * 1000 + noise\n return Math.floor(waitingTime)\n}\n\nfunction transientRetryWaitingTime(attempt: number): number {\n const noise = Math.random() * 100\n // 500ms, 1s, 2s (+jitter) \u2014 bounded so a fire-and-forget call heals fast.\n return Math.floor(2 ** attempt * 250 + noise)\n}\n\nfunction canRetryTransient(payload: RequestPayload): boolean {\n if (!payload.retryTransientErrors) {\n return false\n }\n const remaining = payload.transientRetry?.remaining ?? MAX_TRANSIENT_RETRIES\n return remaining > 0\n}\n\nasync function scheduleTransientRetry(payload: RequestPayload): Promise<void> {\n const attempts = payload.transientRetry?.attempts ?? 1\n const remaining = payload.transientRetry?.remaining ?? MAX_TRANSIENT_RETRIES\n const waitingTime = transientRetryWaitingTime(attempts)\n log(\n payload,\n 'debug',\n `transient error, attempt ${attempts}, remaining ${remaining}, waiting ${waitingTime}ms`,\n )\n await new Promise((resolve) => {\n setTimeout(resolve, waitingTime)\n })\n // eslint-disable-next-line require-atomic-updates\n payload.transientRetry = {\n attempts: attempts + 1,\n remaining: remaining - 1,\n }\n}\n\nexport async function request<T>(\n payload: RequestPayload,\n): Promise<Response<T>> {\n log(payload, 'debug', 'starting request')\n sendMetrics(payload, 'request')\n // configure frontend cache if enabled (browser only)\n try {\n if (payload.config.frontendCaching?.enabled) {\n frontendCache.configure(payload.config.frontendCaching)\n }\n } catch (_cacheConfigError) {\n // ignore configuration errors silently\n }\n let token\n if (payload.config.auth) {\n token = await payload.config.auth.getToken()\n }\n // Dynamic (e.g. correlation) headers first, then explicit per-request headers\n // override them, then auth/content-type below take final precedence.\n //\n // Correlation headers (traceparent, x-cc-session-id) identify our internal\n // request/session, so they must only ever reach Camunda-owned systems. Every\n // third-party target is marked `type: 'external'`, so we gate on that here:\n // external targets never receive dynamic headers even if the caller's config\n // sets getDynamicHeaders. This makes propagation safe-by-default and removes\n // the footgun of a shared config that is used for both internal and\n // third-party calls (e.g. BASIC_API_CONFIG \u2192 token-issuer vs Slack).\n let dynamicHeaders: Record<string, string> = {}\n if (payload.metricsDetails?.target?.type !== 'external') {\n try {\n dynamicHeaders = payload.config.getDynamicHeaders?.() ?? {}\n } catch (_error) {\n // never let header evaluation break a request\n }\n }\n const headers: { [key: string]: string } = {\n ...dynamicHeaders,\n ...(payload.headers ?? {}),\n }\n if (token) {\n headers.Authorization = `Bearer ${token}`\n }\n if (payload.base?.id === 'accounts' || isAccountsUrl(payload)) {\n Object.assign(headers, accountsNgHeaders())\n }\n const type = payload.type ?? 'json'\n let body\n if (type) {\n switch (type) {\n case 'json':\n headers['Content-Type'] = 'application/json'\n body = payload.body ? JSON.stringify(payload.body) : undefined\n break\n case 'text':\n headers['Content-Type'] = 'text/plain'\n body = payload.body ? JSON.stringify(payload.body) : undefined\n break\n case 'form':\n if (payload.body) {\n const formData = new URLSearchParams()\n Object.keys(payload.body).forEach((key) => {\n formData.append(key, payload.body[key])\n })\n body = formData\n }\n break\n }\n }\n let base\n if (payload.base) {\n try {\n base = getEnvParam(payload.base.id, payload.config)\n } catch (error) {\n log(payload, 'error', `Failed to get base url for ${payload.base.id}`, {\n error,\n })\n throw error\n }\n }\n const url = base ? `${base}/${payload.url}` : payload.url\n\n // Attempt cache read for GET requests (stale-while-revalidate when callback supplied)\n let serveCachedAndReturnAfterNetwork = false\n if (payload.method === 'get' && payload.config.frontendCaching?.enabled) {\n try {\n const cached = await frontendCache.get<T>('get', url)\n if (cached) {\n const fresh = frontendCache.isFresh(cached)\n if (payload.onCachedResponse) {\n payload.onCachedResponse(cached.payload, { fresh, source: 'cache' })\n if (!fresh) {\n log(payload, 'debug', 'cache stale, refreshing in background')\n serveCachedAndReturnAfterNetwork = true\n } else {\n log(payload, 'debug', 'cache fresh, returning early')\n sendMetrics(payload, 'success', { duration: 0, statusCode: '200' })\n return {\n // eslint-disable-next-line id-length\n ok: true,\n status: 200,\n statusText: 'cached',\n body: cached.payload,\n meta: { duration: 0 },\n }\n }\n } else if (fresh) {\n // no callback but fresh -> return directly\n log(payload, 'debug', 'cache hit, returning cached response')\n sendMetrics(payload, 'success', { duration: 0, statusCode: '200' })\n return {\n // eslint-disable-next-line id-length\n ok: true,\n status: 200,\n statusText: 'cached',\n body: cached.payload,\n meta: { duration: 0 },\n }\n } else {\n log(payload, 'debug', 'cache stale, proceeding with network request')\n }\n }\n } catch (_cacheGetError) {\n // ignore cache errors\n }\n }\n const start = performance.now()\n const proxyAgent = payload.config.proxyAgent ?? {}\n try {\n const fetchResponse = await fetch(url, {\n signal: payload.config.timeout\n ? AbortSignal.timeout(payload.config.timeout)\n : undefined,\n method: payload.method.toUpperCase(),\n headers,\n body,\n ...proxyAgent,\n })\n const end = performance.now()\n const duration = end - start\n\n if ([429].includes(fetchResponse.status)) {\n // rate limiting, retry\n log(payload, 'info', 'rate limited', { durationMs: Math.floor(duration) })\n sendMetrics(payload, 'rate-limit-retry', {\n duration,\n statusCode: String(fetchResponse.status),\n })\n const remaining = payload.retry?.remaining ?? 8\n const attempts = payload.retry?.attempts ?? 1\n if (remaining > 0) {\n let waitingTime = rateLimitWaitingTime(attempts)\n if (fetchResponse.headers.has('x-ratelimit-reset')) {\n const rateLimitHeader = fetchResponse.headers.get('x-ratelimit-reset')\n log(\n payload,\n 'debug',\n `rate limited, found x-ratelimit-reset header: ${rateLimitHeader}`,\n )\n const rateLimitHeaderNumber = Number(rateLimitHeader)\n if (Number.isNaN(rateLimitHeaderNumber)) {\n waitingTime = Date.parse(rateLimitHeader ?? '0') - Date.now()\n } else {\n waitingTime = rateLimitHeaderNumber - Date.now()\n }\n }\n if (waitingTime < 0 || waitingTime > 180000) {\n waitingTime = rateLimitWaitingTime(attempts)\n }\n log(\n payload,\n 'debug',\n `rate limited, attempt ${attempts}, remaining ${remaining}, waiting ${waitingTime}ms`,\n )\n await new Promise((resolve) => {\n setTimeout(resolve, waitingTime)\n })\n // eslint-disable-next-line require-atomic-updates\n payload.retry = {\n attempts: attempts + 1,\n remaining: remaining - 1,\n }\n return request(payload)\n }\n log(payload, 'debug', `rate limited, no more retries`, {\n durationMs: Math.floor(duration),\n })\n }\n\n const response: Response<T> = {\n // eslint-disable-next-line id-length\n ok: fetchResponse.ok,\n status: fetchResponse.status,\n statusText: fetchResponse.statusText,\n meta: {\n duration,\n },\n }\n\n const responseType = payload.responseType ?? type\n\n if (response.ok) {\n log(payload, 'debug', `request successful in ${Math.floor(duration)}ms`, {\n baseUrl: base,\n durationMs: Math.floor(duration),\n })\n sendMetrics(payload, 'success', {\n duration,\n statusCode: String(fetchResponse.status),\n })\n switch (responseType) {\n case 'json':\n try {\n response.body = await fetchResponse.json()\n } catch (_error) {\n log(\n payload,\n 'debug',\n `Failed to parse json body. Returning empty object.`,\n {\n baseUrl: base,\n },\n )\n response.body = {} as T\n try {\n const responseBodyText = await fetchResponse.text()\n log(payload, 'debug', `Response body text`, {\n baseUrl: base,\n responseBodyText,\n status: fetchResponse.status,\n })\n } catch (textError) {\n // this is fine\n log(payload, 'debug', `Failed to parse response body text.`, {\n baseUrl: base,\n status: fetchResponse.status,\n error: textError,\n })\n }\n }\n break\n case 'text':\n response.body = (await fetchResponse.text()) as T\n break\n case 'blob':\n // Binary payloads (file downloads, e.g. database dumps). Not cached.\n response.body = (await fetchResponse.blob()) as T\n break\n default:\n response.body = (await fetchResponse.text()) as T\n }\n // store in cache after parsing\n if (\n payload.method === 'get' &&\n payload.config.frontendCaching?.enabled &&\n response.body !== undefined &&\n responseType !== 'blob'\n ) {\n try {\n await frontendCache.set('get', url, response.body as any)\n log(payload, 'debug', 'cache store successful')\n } catch (_cacheSetError) {\n // ignore cache set error\n }\n }\n } else {\n let statusText = fetchResponse.statusText\n try {\n statusText = await fetchResponse.text()\n } catch (_error) {\n // this is fine\n }\n if (statusText.length > MAX_ERROR_BODY_LENGTH) {\n // The marker is part of the budget, so the stored value never exceeds\n // MAX_ERROR_BODY_LENGTH \u2014 appending it after slicing to the full cap\n // would put the result over the bound the constant advertises.\n statusText = `${statusText.slice(\n 0,\n MAX_ERROR_BODY_LENGTH - ERROR_BODY_TRUNCATION_MARKER.length,\n )}${ERROR_BODY_TRUNCATION_MARKER}`\n }\n response.statusText = statusText\n log(\n payload,\n 'debug',\n `request failed with status ${response.status}: ${statusText}`,\n {\n baseUrl: base,\n durationMs: Math.floor(duration),\n },\n )\n\n // Transient gateway failure (e.g. envoy \"connection termination\" 503\n // during a pod restart). When opted in, retry with backoff and record it\n // as `transient-retry` rather than `error`, so a healed blip stays off\n // the internal error-rate alert.\n if (\n TRANSIENT_RETRY_STATUS.includes(response.status) &&\n canRetryTransient(payload)\n ) {\n sendMetrics(payload, 'transient-retry', {\n duration,\n statusCode: String(fetchResponse.status),\n error: statusText,\n })\n await scheduleTransientRetry(payload)\n return request(payload)\n }\n\n // Special Handling for dedicated target systems to not count special status codes as errors\n // eslint-disable-next-line no-shadow\n let type: RequestBaseCustomMetricsDetailsType = 'error'\n const noErrorStatusCodes: number[] = []\n switch (payload.metricsDetails.target.name) {\n case 'auth0':\n noErrorStatusCodes.push(...[400, 404, 409])\n break\n case 'accounts':\n case 'console':\n noErrorStatusCodes.push(...[404, 409])\n if (payload.metricsDetails.method.name === 'createTemporaryCluster') {\n // case: cannot create temporary cluster\n noErrorStatusCodes.push(...[400, 403, 412])\n }\n if (\n [\n 'ConsoleM2MService.verifyZeebeClient',\n 'ConsoleM2MService.verifyApiClient',\n ].includes(payload.metricsDetails.method.name)\n ) {\n // case: api/zeebe client credentials are invalid\n noErrorStatusCodes.push(...[401])\n }\n if (\n payload.metricsDetails.method.name ===\n 'OrgsService.createAndReturnSocialLoginUser'\n ) {\n noErrorStatusCodes.push(\n ...[\n // onboard user, user already has an org\n 400,\n // existing extSSO-connection\n 412,\n ],\n )\n }\n break\n case 'control':\n if (\n payload.metricsDetails.method.name ===\n 'ControlAgentClientsInternalService.verify'\n ) {\n // case: the credentials of an agent client are invalid\n noErrorStatusCodes.push(401)\n }\n break\n }\n\n if (noErrorStatusCodes.includes(response.status)) {\n type = 'success'\n }\n\n sendMetrics(payload, type, {\n duration,\n statusCode: String(fetchResponse.status),\n error: statusText,\n })\n }\n if (serveCachedAndReturnAfterNetwork && response.ok) {\n // when we served stale via callback earlier, we now also return the fresh response\n log(payload, 'debug', 'stale cache updated, returning new data')\n }\n return response\n } catch (error: any) {\n const duration = performance.now() - start\n let errorMessage: string | undefined\n if (error?.cause?.code) {\n errorMessage = error?.cause?.code\n } else if (error?.message) {\n errorMessage = error?.message\n }\n // Network/fetch error with no HTTP status (e.g. connection reset, timeout).\n // Retry-on-opt-in before treating it as an error (see else branch above).\n if (canRetryTransient(payload)) {\n log(payload, 'debug', `request failed with no status, retrying`, {\n baseUrl: base,\n error,\n durationMs: Math.floor(duration),\n })\n sendMetrics(payload, 'transient-retry', {\n statusCode: 'fetch-error',\n duration,\n error: errorMessage,\n })\n await scheduleTransientRetry(payload)\n return request(payload)\n }\n log(\n payload,\n payload.warnOnNoStatus ? 'warn' : 'error',\n `request failed with no status`,\n {\n baseUrl: base,\n error,\n durationMs: Math.floor(duration),\n },\n )\n sendMetrics(payload, 'error', {\n statusCode: 'fetch-error',\n duration,\n error: errorMessage,\n })\n const response: Response<T> = {\n // eslint-disable-next-line id-length\n ok: false,\n status: 500,\n statusText: 'fetch error',\n meta: {\n duration,\n },\n }\n return response\n }\n}\n"],
|
|
5
|
+
"mappings": "AAYA,SAAS,mBAAqC;AAC9C,SAAS,qBAAqB;AAsC9B,MAAM,yBAAyB,CAAC,KAAK,KAAK,GAAG;AAQ7C,MAAM,wBAAwB;AAE9B,MAAM,+BAA+B;AACrC,MAAM,wBAAwB;AAE9B,IAAI,mBAAkC,MAAM;AASrC,MAAM,uBAAuB,CAAC,SAA8B;AACjE,qBAAmB;AACrB;AAMO,MAAM,oBAAoB,MAA8B;AAC7D,MAAI;AACF,WAAO,iBAAiB,IAAI,EAAE,kBAAkB,OAAO,IAAI,CAAC;AAAA,EAC9D,SAAS,QAAQ;AAEf,WAAO,CAAC;AAAA,EACV;AACF;AAMA,SAAS,cAAc,SAAkC;AACvD,MAAI,QAAQ,MAAM;AAChB,WAAO;AAAA,EACT;AACA,MAAI;AACF,UAAM,WAAW,YAAY,YAAY,QAAQ,MAAM;AACvD,WAAO,QAAQ,QAAQ,YAAY,QAAQ,IAAI,WAAW,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AY;AAAA,QACZ;AAAA,QACA,OAAO;AAAA,MACT,CAAC;AACD,YAAM,uBAAuB,OAAO;AACpC,aAAO,QAAQ,OAAO;AAAA,IACxB;AACA;AAAA,MACE;AAAA,MACA,QAAQ,iBAAiB,SAAS;AAAA,MAClC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT;AAAA,QACA,YAAY,KAAK,MAAM,QAAQ;AAAA,MACjC;AAAA,IACF;AACA,gBAAY,SAAS,SAAS;AAAA,MAC5B,YAAY;AAAA,MACZ;AAAA,MACA,OAAO;AAAA,IACT,CAAC;AACD,UAAM,WAAwB;AAAA;AAAA,MAE5B,IAAI;AAAA,MACJ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,MAAM;AAAA,QACJ;AAAA,MACF;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": ["type"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/ccma-api",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.16.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": "10.
|
|
44
|
+
"@camunda/ccma-shared-types": "10.3.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "node esbuild.mjs && tsc --emitDeclarationOnly --outDir dist",
|