import { Model } from "./Model"; import { StorageAdapter } from "./storage"; import { ModelJsonSchema } from "./ModelSchema"; import { DataStoreConfig } from "./DataStoreConfig"; import { ModelReplicationConfig } from "./replication/api/ReplicationConfig"; /** * Custom implementation */ export interface CustomEngines { /** * Custom storage adapter. * By default DataStore will use IndexedDB that might not be available in every environment. * If you wish to override adapter you can supply it here */ storeAdapter?: StorageAdapter; } /** * ____ Offix DataStore ___ * Client side storage with efficient querying capabilities * and GraphQL replication engine. */ export declare class DataStore { private storage; private replicator?; private config; private models; constructor(config: DataStoreConfig, engines?: CustomEngines); /** * Initialize specific model using it's schema. * * @param schema - model schema containing fields and other details used to persist data * @param replicationConfig optional override for replication configuration for this particular model */ setupModel(schema: ModelJsonSchema, replicationConfig?: ModelReplicationConfig): Model; /** * Initialize datastore */ init(): void; /** * Start fetch replication for the entire datastore * */ startReplication(): void; /** * Stop replication for the entire datastore * */ stopReplication(): void; /** * Expose the Datastore network indicator to * the client. */ getNetworkIndicator(): import("./replication/network/NetworkIndicator").NetworkIndicator | undefined; }