UNPKG

evtstore

Version:

Event Sourcing with Node.JS

20 lines (19 loc) 597 B
import { Knex as knex } from 'knex'; import { Event, Provider, ErrorCallback } from '../src/types'; export type Bookmark = { bookmark: string; position: number; }; export type MigrateOptions = { client: knex; events?: string; bookmarks?: string; }; export type Options = { limit?: number; onError?: ErrorCallback; bookmarks: () => knex.QueryBuilder<any, any>; events: () => knex.QueryBuilder<any, any>; }; export declare function createProvider<E extends Event>(opts: Options): Provider<E>; export declare function migrate(opts: MigrateOptions): Promise<void>;