@mbc-cqrs-serverless/import
Version:
22 lines (21 loc) • 955 B
TypeScript
import { IEventHandler } from '@mbc-cqrs-serverless/core';
import { ImportService } from '../import.service';
import { ZipImportSfnEvent } from './zip-import.sfn.event';
export declare class ZipImportSfnEventHandler implements IEventHandler<ZipImportSfnEvent> {
private readonly importService;
private readonly logger;
constructor(importService: ImportService);
execute(event: ZipImportSfnEvent): Promise<any>;
/**
* Handles the trigger_single_csv_and_wait state from the orchestrator.
* It extracts the tableName from the filename and starts a new CSV import job,
* passing along the taskToken so the orchestrator can be notified upon completion.
*/
private triggerSingleCsvJob;
/**
* Handles the final state of the orchestrator.
* It aggregates the results from all processed CSV files and sets the final
* status on the original ZIP_MASTER_JOB.
*/
private finalizeZipMasterJob;
}