import type { DocumentData, SetOptions, TransactionOptions } from './firestore.js'; import { AggregateField, AggregateQuerySnapshot, CollectionReference, DocumentReference, DocumentSnapshot, Firestore, Query, QuerySnapshot, Transaction, WriteBatch } from './firestore.js'; import { FieldPath } from './field-path.js'; import { Filter } from './filter.js'; import { FieldValue } from './field-value.js'; import type { OrderDirection, WhereOp } from './rest/query-encoding.js'; export type Unsubscribe = () => void; export type QueryConstraint = { _apply(query: Query): Query; }; export type QueryFilterConstraint = QueryConstraint & { _asFilter(): Filter; }; export declare function doc(parent: Firestore | CollectionReference | DocumentReference, ...pathSegments: string[]): DocumentReference; export declare function collection(parent: Firestore | DocumentReference | CollectionReference, ...pathSegments: string[]): CollectionReference; export declare function getDoc(ref: DocumentReference): Promise>; export declare function getDocs(query: Query): Promise>; export declare function getCountFromServer(query: Query): Promise; export declare function getAggregateFromServer(query: Query, aggregations: Record): Promise; export declare function setDoc(ref: DocumentReference, data: T, options?: SetOptions): Promise; export declare function addDoc(ref: CollectionReference, data: T): Promise>; export declare function updateDoc(ref: DocumentReference, data: Record): Promise; export declare function updateDoc(ref: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise; export declare function deleteDoc(ref: DocumentReference): Promise; export declare function writeBatch(firestore: Firestore): WriteBatch; export declare function runTransaction(firestore: Firestore, updateFn: (tx: Transaction) => Promise, options?: TransactionOptions): Promise; export declare function query(base: Query, ...constraints: Array>): Query; export declare function where(fieldPath: string | FieldPath, op: WhereOp, value: unknown): QueryFilterConstraint; export declare function or(...filters: Array>): QueryFilterConstraint; export declare function and(...filters: Array>): QueryFilterConstraint; export declare function orderBy(fieldPath: string | FieldPath, direction?: OrderDirection): QueryConstraint; export declare function limit(n: number): QueryConstraint; export declare function limitToLast(n: number): QueryConstraint; export declare function startAt(snapshot: DocumentSnapshot): QueryConstraint; export declare function startAt(...fieldValues: unknown[]): QueryConstraint; export declare function startAfter(snapshot: DocumentSnapshot): QueryConstraint; export declare function startAfter(...fieldValues: unknown[]): QueryConstraint; export declare function endAt(snapshot: DocumentSnapshot): QueryConstraint; export declare function endAt(...fieldValues: unknown[]): QueryConstraint; export declare function endBefore(snapshot: DocumentSnapshot): QueryConstraint; export declare function endBefore(...fieldValues: unknown[]): QueryConstraint; export declare function documentId(): FieldPath; export declare function count(): AggregateField; export declare function sum(fieldPath: string | FieldPath): AggregateField; export declare function average(fieldPath: string | FieldPath): AggregateField; export declare function serverTimestamp(): FieldValue; export declare function deleteField(): FieldValue; export declare function arrayUnion(...elements: unknown[]): FieldValue; export declare function arrayRemove(...elements: unknown[]): FieldValue; export declare function increment(n: number): FieldValue; export declare function onSnapshot(ref: DocumentReference, onNext: (snapshot: DocumentSnapshot) => void, onError?: (error: unknown) => void): Unsubscribe; export declare function onSnapshot(query: Query, onNext: (snapshot: QuerySnapshot) => void, onError?: (error: unknown) => void): Unsubscribe; //# sourceMappingURL=modular.d.ts.map