import { EntityManager } from "typeorm"; import { IsolationLevel } from "typeorm/driver/types/IsolationLevel"; export declare abstract class TransactionBaseService { protected readonly __container__: any; protected readonly __configModule__?: Record | undefined; protected readonly __moduleDeclaration__?: Record | undefined; protected manager_: EntityManager; protected transactionManager_: EntityManager | undefined; protected get activeManager_(): EntityManager; protected constructor(__container__: any, __configModule__?: Record | undefined, __moduleDeclaration__?: Record | undefined); withTransaction(transactionManager?: EntityManager): this; protected shouldRetryTransaction_(err: { code: string; } | Record): boolean; /** * Wraps some work within a transactional block. If the service already has * a transaction manager attached this will be reused, otherwise a new * transaction manager is created. * @param work - the transactional work to be done * @param isolationOrErrorHandler - the isolation level to be used for the work. * @param maybeErrorHandlerOrDontFail Potential error handler * @return the result of the transactional work */ protected atomicPhase_(work: (transactionManager: EntityManager) => Promise, isolationOrErrorHandler?: IsolationLevel | ((error: TError) => Promise), maybeErrorHandlerOrDontFail?: (error: TError) => Promise): Promise; }