UNPKG

@buildable/messages

Version:

A fully managed messaging service that lets you easily exchange event data across any app or resource.

74 lines (73 loc) 1.58 kB
export declare type Event = { _id: string; key: string; eventName: string; environment: string; payload: any; query?: any; headers?: any; createdAt: number; state: string; history: HistoryRecord[]; ttl: number; v: number; ownership: { buildableId: string; userId: string; clientId: string; }; processing: { hasTransactions: boolean | null; totalTransactions: number | null; hasFutureTransactions: boolean; isCompleted: boolean; }; }; export declare type Transaction = { _id: string; key: string; txn: string; event: { _id: string; eventName: string; }; createdAt: number; ttl: number; state: string; history: HistoryRecord[]; startedAt: number; txKey: string; endedAt?: number; input: string; }; export declare type HistoryRecord = { enterState: string; exitState: string; timestamp: number; updatedBy: string; }; export declare type OnOptions = { platform?: string; label?: string; txKey?: string; since?: number; }; export declare type TransactionInput = { payload?: any; headers?: any; query?: any; event?: Event; }; export declare type ListenerIdInfo = { eventName: string; txKey: string; platform: string; label: string; }; export declare type OnHandler = (props: TransactionInput) => Promise<any>; export declare type DeRegisterInfo = { eventName?: string; txKey?: string; platform?: string; label?: string; };