evtstore
Version:
Event Sourcing with Node.JS
25 lines (24 loc) • 691 B
TypeScript
import { Sql } from 'postgres';
import { Event, Provider, ErrorCallback } from '../src/types';
export type Bookmark = {
bookmark: string;
position: number;
};
export type MigrateOptions = {
sql: Sql<any>;
events?: string;
bookmarks?: string;
};
export type MigrateClientOptions = Omit<MigrateOptions, 'client'> & {
client: Sql<any>;
};
export type Options = {
limit?: number;
onError?: ErrorCallback;
sql: Sql<any>;
bookmarks: string;
events: string;
};
export declare function createProvider<E extends Event>(opts: Options): Provider<E>;
/** Migrate using a PG.Pool object */
export declare function migrate(opts: MigrateOptions): Promise<void>;