import { ConfigService } from '@nestjs/config'; import { DataSyncCommandSfnEvent, StepFunctionStateInput } from '../command-events/data-sync.sfn.event'; import { S3Service } from '../data-store'; import { CommandModel, CommandModuleOptions, DetailKey } from '../interfaces'; import { SnsService } from '../queue'; import { StepFunctionService } from '../step-func/step-function.service'; import { CommandService } from './command.service'; import { DataService } from './data.service'; import { HistoryService } from './history.service'; export declare class CommandEventHandler { private readonly options; private readonly commandService; private readonly dataService; private readonly historyService; private readonly s3Service; private readonly snsService; private readonly config; private readonly sfnService; private readonly logger; private readonly alarmTopicArn; constructor(options: CommandModuleOptions, commandService: CommandService, dataService: DataService, historyService: HistoryService, s3Service: S3Service, snsService: SnsService, config: ConfigService, sfnService: StepFunctionService); execute(event: DataSyncCommandSfnEvent): Promise; protected handleStepState(event: DataSyncCommandSfnEvent): Promise; protected waitConfirmToken(event: DataSyncCommandSfnEvent): Promise; /** * Retry wrapper around commandService.getItem for the cross-execution * predecessor-status check in waitConfirmToken. Bounded and short — * smooths a single transient DDB failure; does not wait out an outage. */ protected getItemWithRetry(key: DetailKey, options: { consistentRead: boolean; }, maxAttempts: number, baseDelayMs: number): Promise; /** * Bounded retry with exponential backoff (baseDelayMs * 2^(attempt - 1)), * rethrowing the last error once every attempt is exhausted. Shared by both * sides of the version handshake so the pull path (waitConfirmToken) and the * push path (checkNextToken) tolerate transient DynamoDB failures equally. */ protected withRetry(fn: () => Promise, maxAttempts: number, baseDelayMs: number): Promise; protected checkVersion(event: DataSyncCommandSfnEvent): Promise; protected setTtlCommand(event: DataSyncCommandSfnEvent): Promise; protected historyCopy(event: DataSyncCommandSfnEvent): Promise; protected transformData(event: DataSyncCommandSfnEvent): Promise; protected syncData(event: DataSyncCommandSfnEvent): Promise; protected checkNextToken(event: DataSyncCommandSfnEvent): Promise; protected handleResumeExecutionError(event: DataSyncCommandSfnEvent, e: unknown, options: { benignNames: ReadonlySet; logContext: string; alarmPayload: Record; }): Promise; /** * Best-effort alarm publish — SNS failure must not fail the SFN step * (e.g. after updateTaskToken already succeeded). */ protected publishAlarmSafely(event: DataSyncCommandSfnEvent, errorDetails: any): Promise; protected publishAlarm(event: DataSyncCommandSfnEvent, errorDetails: any): Promise; }