import { BatchJob } from "../models"; import { BatchJobService } from "../services"; import { CreateBatchJobInput } from "../types/batch-job"; import { TransactionBaseService } from "./transaction-base-service"; export interface IBatchJobStrategy extends TransactionBaseService { /** * Method for preparing a batch job for processing */ prepareBatchJobForProcessing(batchJobEntity: CreateBatchJobInput, req: Express.Request): Promise; /** * Method for pre-processing a batch job */ preProcessBatchJob(batchJobId: string): Promise; /** * Method does the actual processing of the job. Should report back on the progress of the operation. */ processJob(batchJobId: string): Promise; /** * Builds and returns a template file that can be downloaded and filled in */ buildTemplate(): Promise; } export declare abstract class AbstractBatchJobStrategy extends TransactionBaseService implements IBatchJobStrategy { static identifier: string; static batchType: string; protected abstract batchJobService_: BatchJobService; prepareBatchJobForProcessing(batchJob: CreateBatchJobInput, req: Express.Request): Promise; preProcessBatchJob(batchJobId: string): Promise; abstract processJob(batchJobId: string): Promise; abstract buildTemplate(): Promise; protected shouldRetryOnProcessingError(batchJob: BatchJob, err: unknown): Promise; protected handleProcessingError(batchJobId: string, err: unknown, result: T): Promise; } export declare function isBatchJobStrategy(object: unknown): object is IBatchJobStrategy;