import { HasId, OmitId, Encodable, Decodable, OptionalIdStorable, Storable, PartialStorable, QueryKey, DocumentSnapshot, WhereFilterOp, OrderByDirection, QuerySnapshot, CollectionReference, DocumentReference } from './types'; import { Context } from './context'; import { Query } from './query'; export declare class Collection> { context: Context; collectionRef: CollectionReference; private converter; constructor({ context, path, encode, decode }: { context: Context; path: string; encode?: Encodable; decode?: Decodable; }); toObject(documentSnapshot: DocumentSnapshot): T; docRef(id?: string): DocumentReference; fetch(id: string): Promise; fetchAll(): Promise; add(obj: OptionalIdStorable): Promise; set(obj: Storable): Promise; addOrSet(obj: OptionalIdStorable): Promise; update(obj: PartialStorable): Promise; delete(id: string): Promise; bulkAdd(objects: Array>): Promise; bulkSet(objects: Array>): Promise; bulkDelete(docIds: string[]): Promise; where(fieldPath: QueryKey, opStr: WhereFilterOp, value: any): Query; orderBy(fieldPath: QueryKey, directionStr?: OrderByDirection): Query; limit(limit: number): Query; onSnapshot(callback: (querySnapshot: QuerySnapshot, toObject: (documentSnapshot: DocumentSnapshot) => T) => void): () => void; }