import { ApplicationConfiguration } from './configuration'; import { QueueEntity } from './queue-entity'; import { CreateTransactionPayload } from './protos/types/transaction'; export declare const TRANSACTION_EVENTS: { STARTED: symbol; FINISHED: symbol; CANCELLED: symbol; }; export interface TransactionMetadata { [key: string]: any; } export declare class Transaction extends QueueEntity { parent: Transaction; name: string; trackingKey: string; developerKey: string; metadata: TransactionMetadata; startedAt: Date; finishedAt: Date; cancelledAt: Date; private config; get isFinished(): boolean; get isCancelled(): boolean; constructor(name: string, config: ApplicationConfiguration); start(): Transaction; finish(): Transaction; cancel(): this; withDeveloperKey(developerKey: string): Transaction; withMetadata(metadata: TransactionMetadata): Transaction; fromTransaction(transaction: Transaction): Transaction; toMessage(): CreateTransactionPayload; }