UNPKG

@fabric-es/fabric-cqrs

Version:

Hyperledger Fabric middleware for event sourcing and cqrs pattern

36 lines (35 loc) 984 B
import { BaseEntity } from '.'; export interface EntityType<TEntity extends BaseEntity> { new (...args: any[]): TEntity; parentName?: string; entityName: string; } export declare enum Lifecycle { NORMAL = 0, BEGIN = 1, END = 2 } export declare type BaseEvent = { readonly type?: string; readonly lifeCycle?: Lifecycle; payload?: any; }; export declare const TRACK_EVENT = "PrivateDataTracked"; export declare const TRACK_FIELD = "_privateData"; export declare const TRACK_FIELD_S = "privateData"; export declare const ORGAN_FIELD = "_organization"; export declare const TS_FIELD = "_ts"; export declare const CREATOR_FIELD = "_creator"; export declare const CREATED_FIELD = "_created"; export declare type Commit = { id: string; entityName: string; version?: number; commitId?: string; entityId?: string; mspId?: string; events?: BaseEvent[]; hash?: string; eventsString?: string; signedRequest?: string; };