import { TransactionContext } from '../bank/types'; import { CommandsService } from '../command/commands.service'; import { Command } from '../command/types'; import { EntriesService } from '../entry/entries.service'; import { Entry } from '../entry/types'; import { IntentEntity } from '../intent/entities/intent.entity'; import { IntentsService } from '../intent/intents.service'; import { BankJobData } from '../job/bank-job-data'; import { IScheduler } from '../scheduler/scheduler.service'; /** * Error thrown by processor when trying to create the * context for the transaction. */ export declare class TransactionContextError extends Error { suspend: boolean; suspend_time: number; /** * Time to suspend the job in case of error loading context. * This is only used when the error is a known connection error, * for other errors the job is failed instead of suspended. */ constructor(message: string, suspend?: boolean, suspend_time?: number); } export declare class TransactionContextFactory { protected commands: CommandsService; protected entries: EntriesService; protected intents: IntentsService; protected scheduler: IScheduler; constructor(commands: CommandsService, entries: EntriesService, intents: IntentsService, scheduler: IScheduler); createContext(job: BankJobData): Promise; protected createFirstPhaseContext(job: BankJobData): Promise; protected createSecondPhaseContext(job: BankJobData): Promise; protected fetchCommand(job: BankJobData): Promise; protected fetchEntry(job: BankJobData): Promise; protected fetchIntent(entry: Entry, job: BankJobData): Promise; protected fetchPrepareJob(job: BankJobData): Promise; }