/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { ICollection, IDb, IDbFactory } from "@fluidframework/server-services-core"; /** * @internal */ export declare class TestCollection implements ICollection { collection: any[]; constructor(collection: any[]); aggregate(pipeline: any, options?: any): Promise; find(query: any, sort: any): Promise; findAll(): Promise; findOne(query: any): Promise; update(filter: any, set: any, addToSet: any): Promise; updateMany(filter: any, set: any, addToSet: any): Promise; upsert(filter: any, set: any, addToSet: any): Promise; insertOne(value: any): Promise; findOrCreate(query: any, value: any): Promise<{ value: any; existing: boolean; }>; findAndUpdate(query: any, value: any): Promise<{ value: any; existing: boolean; }>; insertMany(values: any[], ordered: boolean): Promise; deleteOne(filter: any): Promise; deleteMany(filter: any): Promise; distinct(key: any, filter: any): Promise; createIndex(index: any, unique: boolean): Promise; private insertOneInternal; private removeOneInternal; private findOneInternal; private findInternal; } /** * @internal */ export declare class TestDb implements IDb { private collections; private readonly emitter; constructor(collections: { [key: string]: any[]; }); close(): Promise; on(event: string, listener: (...args: any[]) => void): void; collection(name: string): ICollection; dropCollection(name: string): Promise; } /** * @alpha */ export interface ITestDbFactory extends IDbFactory { readonly testDatabase: IDb; } /** * @internal */ export declare class TestDbFactory implements ITestDbFactory { readonly testDatabase: IDb; constructor(collections: { [key: string]: any[]; }); connect(): Promise; } //# sourceMappingURL=testCollection.d.ts.map