UNPKG

@unchainedshop/core-events

Version:

This package defines the event module which ensures the emitted events are written to the database as an Event History and offers a core module to search for events.

10 lines 406 B
import { mongodb } from '@unchainedshop/mongodb'; import { TimestampFields } from '@unchainedshop/mongodb'; export type Event = { _id?: string; type: string; context?: Record<string, unknown>; payload?: Record<string, unknown>; } & TimestampFields; export declare const EventsCollection: (db: mongodb.Db) => Promise<mongodb.Collection<Event>>; //# sourceMappingURL=EventsCollection.d.ts.map