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: any, options?: CreateSingleOptions): Promise; rawCreateObjects(objects: any, options?: CreateManyOptions): Promise; findOneObject(query: any, options?: FindSingleOptions): Promise; findObject(query: any, options?: FindSingleOptions): Promise; findObjects(query: any, options?: FindManyOptions): Promise>; findAllObjects(query: any, options?: FindManyOptions): Promise>; countObjects(query: any, options?: CountOptions): Promise; updateOneObject(object: any, updates: any, options?: UpdateSingleOptions): Promise; updateObjects(query: any, updates: any, options?: UpdateManyOptions): Promise; deleteOneObject(object: any, options?: DeleteSingleOptions): Promise; deleteObjects(query: any, 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: any[]): Promise; }