import { CreateManyOptions, CreateManyResult, StorageRegistry } from ".."; import { StorageBackend, CreateSingleOptions, FindSingleOptions, FindManyOptions, CountOptions, UpdateManyOptions, UpdateSingleOptions, DeleteManyOptions, DeleteSingleOptions, CreateSingleResult, DeleteSingleResult, DeleteManyResult, UpdateSingleResult, UpdateManyResult, } from './backend' export interface StorageCollection { createObject(object, options?: CreateSingleOptions): Promise rawCreateObjects(objects, options?: CreateManyOptions): Promise findOneObject(query, options?: FindSingleOptions): Promise findObject(query, options?: FindSingleOptions): Promise findObjects(query, options?: FindManyOptions): Promise> findAllObjects(query, options?: FindManyOptions): Promise> countObjects(query, options?: CountOptions): Promise updateOneObject(object, updates, options?: UpdateSingleOptions): Promise updateObjects(query, updates, options?: UpdateManyOptions): Promise deleteOneObject(object, options?: DeleteSingleOptions): Promise deleteObjects(query, options?: DeleteManyOptions): Promise } export interface StorageCollectionMap { [name: string]: StorageCollection } export default interface StorageManagerInterface { registry: StorageRegistry backend: StorageBackend finishInitialization(): Promise collection(collectionName: string): StorageCollection operation(operationName: string, ...args): Promise }