@getanthill/datastore
Version:
Event-Sourced Datastore
23 lines (22 loc) • 884 B
TypeScript
import type { MongoDbConnector } from '@getanthill/mongodb-connector';
import type { GenericType, ModelConfig, ModelSchema, Reducer, Services } from '../typings';
export type ModelDefinition = MongoDbConnector.ModelDefinition;
export interface Options {
CORRELATION_FIELD?: string;
CREATED_AT_FIELD?: string;
CURRENT_HASH_FIELD?: string;
PREVIOUS_HASH_FIELD?: string;
NONCE_FIELD?: string;
EVENTS_COLLECTION_NAME?: string;
SNAPSHOTS_COLLECTION_NAME?: string;
WITH_GLOBAL_VERSION?: boolean;
WITH_BLOCKCHAIN_HASH?: boolean;
BLOCKCHAIN_HASH_DIFFICULTY?: number;
BLOCKCHAIN_HASH_GENESIS?: string;
SCHEMA: ModelSchema;
ORIGINAL_SCHEMA: ModelSchema;
MODEL_CONFIG: ModelConfig;
services: Services;
}
declare const _default: (definition: ModelDefinition, reducer: Reducer, options: Options) => GenericType;
export default _default;