@mbc-cqrs-serverless/core
Version:
CQRS and event base core
33 lines (32 loc) • 2.11 kB
TypeScript
import { ConfigService } from '@nestjs/config';
import { DataSyncCommandSfnEvent, StepFunctionStateInput } from '../command-events/data-sync.sfn.event';
import { S3Service } from '../data-store';
import { CommandModuleOptions } 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<StepFunctionStateInput | StepFunctionStateInput[]>;
protected handleStepState(event: DataSyncCommandSfnEvent): Promise<StepFunctionStateInput | StepFunctionStateInput[]>;
protected waitConfirmToken(event: DataSyncCommandSfnEvent): Promise<StepFunctionStateInput>;
protected checkVersion(event: DataSyncCommandSfnEvent): Promise<StepFunctionStateInput>;
protected setTtlCommand(event: DataSyncCommandSfnEvent): Promise<StepFunctionStateInput>;
protected historyCopy(event: DataSyncCommandSfnEvent): Promise<StepFunctionStateInput>;
protected transformData(event: DataSyncCommandSfnEvent): Promise<StepFunctionStateInput[]>;
protected syncData(event: DataSyncCommandSfnEvent): Promise<StepFunctionStateInput>;
protected checkNextToken(event: DataSyncCommandSfnEvent): Promise<StepFunctionStateInput>;
protected publishAlarm(event: DataSyncCommandSfnEvent, errorDetails: any): Promise<void>;
}