UNPKG

@elsikora/nestjs-crud-automator

Version:

A library for automating the creation of CRUD operations in NestJS.

24 lines (23 loc) 1.23 kB
import { IApiFunctionTransaction } from '../../../../interface/class/api/function'; import { IApiSubscriberFunctionTransactionContext } from '../../../../interface/class/api/subscriber/function'; import { TApiFunctionTransactionEvent, TApiFunctionTransactionOwner, TApiFunctionTransactionTraceType } from '../../../../type/class/api/function/transaction'; export declare class ApiFunctionTransactionRegistry { private readonly EVENTS; private eventSnapshot?; private readonly TRANSACTION; constructor(id: string, owner: TApiFunctionTransactionOwner); beginEvent(options: { action?: string; entityName: string; functionType: TApiFunctionTransactionTraceType; isSubscriberObservable: boolean; methodName: string; }): number; createContext(matchedEvents: ReadonlyArray<TApiFunctionTransactionEvent>): IApiSubscriberFunctionTransactionContext; failEvent(sequence: number, error: unknown): void; getEvents(): ReadonlyArray<TApiFunctionTransactionEvent>; getObservableEvents(): ReadonlyArray<TApiFunctionTransactionEvent>; getTransaction(): Readonly<IApiFunctionTransaction>; succeedEvent(sequence: number): void; private getPendingEvent; }