## API Report File for "@firebase/firestore-lite" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts import { EmulatorMockTokenOptions } from '@firebase/util'; import { FirebaseApp } from '@firebase/app'; import { FirebaseError } from '@firebase/util'; import { LogLevelString as LogLevel } from '@firebase/logger'; // @public export function addDoc( reference: CollectionReference, data: WithFieldValue ): Promise>; // @public export type AddPrefixToKeys< Prefix extends string, T extends Record > = { [K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? PartialWithFieldValue> | FieldValue : T[K]; }; // @public export class AggregateField { readonly aggregateType: AggregateType; readonly type = 'AggregateField'; /* Excluded from this release type: __constructor */ } // @public export function aggregateFieldEqual( left: AggregateField, right: AggregateField ): boolean; // @public export type AggregateFieldType = | ReturnType | ReturnType | ReturnType; // @public export class AggregateQuerySnapshot< AggregateSpecType extends AggregateSpec, AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData > { data(): AggregateSpecData; readonly query: Query; readonly type = 'AggregateQuerySnapshot'; /* Excluded from this release type: _fieldsProto */ } // @public export function aggregateQuerySnapshotEqual< AggregateSpecType extends AggregateSpec, AppModelType, DbModelType extends DocumentData >( left: AggregateQuerySnapshot, right: AggregateQuerySnapshot ): boolean; // @public export interface AggregateSpec { // (undocumented) [field: string]: AggregateFieldType; } // @public export type AggregateSpecData = { [P in keyof T]: T[P] extends AggregateField ? U : never; }; // @public export type AggregateType = 'count' | 'avg' | 'sum'; // @public export function and( ...queryConstraints: QueryFilterConstraint[] ): QueryCompositeFilterConstraint; // @public export function arrayRemove(...elements: unknown[]): FieldValue; // @public export function arrayUnion(...elements: unknown[]): FieldValue; // @public export function average( field: string | FieldPath ): AggregateField; // @public export class BsonObjectId { constructor(value: string); isEqual(other: BsonObjectId): boolean; // (undocumented) readonly value: string; } // @public export class BsonTimestamp { constructor(seconds: number, increment: number); // (undocumented) readonly increment: number; isEqual(other: BsonTimestamp): boolean; // (undocumented) readonly seconds: number; } // @public export class Bytes { get data(): Uint8Array; static fromBase64String(base64: string, subtype?: number): Bytes; static fromJSON(json: object): Bytes; static fromUint8Array(array: Uint8Array, subtype?: number): Bytes; isEqual(other: Bytes): boolean; // (undocumented) readonly subtype: number; toBase64(): string; toJSON(): object; toString(): string; toUint8Array(): Uint8Array; } // @public export type ChildTypes = T extends Record ? | { [K in keyof T & string]: ChildTypes; }[keyof T & string] | T : T; // @public export type ChildUpdateFields = V extends Record< string, unknown > ? AddPrefixToKeys> : never; // @public export function collection( firestore: Firestore, path: string, ...pathSegments: string[] ): CollectionReference; // @public export function collection< AppModelType, DbModelType extends DocumentData >( reference: CollectionReference, path: string, ...pathSegments: string[] ): CollectionReference; // @public export function collection< AppModelType, DbModelType extends DocumentData >( reference: DocumentReference, path: string, ...pathSegments: string[] ): CollectionReference; // @public export function collectionGroup( firestore: Firestore, collectionId: string ): Query; // @public export class CollectionReference< AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData > extends Query { get id(): string; get parent(): DocumentReference | null; get path(): string; readonly type = 'collection'; withConverter< NewAppModelType, NewDbModelType extends DocumentData = DocumentData >( converter: FirestoreDataConverter ): CollectionReference; withConverter( converter: null ): CollectionReference; } // @public export function connectFirestoreEmulator( firestore: Firestore, host: string, port: number, options?: { mockUserToken?: EmulatorMockTokenOptions | string; } ): void; // @public export function count(): AggregateField; // @public export class Decimal128Value { constructor(value: string); isEqual(other: Decimal128Value): boolean; // (undocumented) readonly stringValue: string; toJSON(): object; } // @public export function deleteDoc< AppModelType, DbModelType extends DocumentData >(reference: DocumentReference): Promise; // @public export function deleteField(): FieldValue; // @public export function doc( firestore: Firestore, path: string, ...pathSegments: string[] ): DocumentReference; // @public export function doc( reference: CollectionReference, path?: string, ...pathSegments: string[] ): DocumentReference; // @public export function doc( reference: DocumentReference, path: string, ...pathSegments: string[] ): DocumentReference; // @public export interface DocumentData { [field: string]: any; } // @public export function documentId(): FieldPath; // @public export class DocumentReference< AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData > { readonly converter: FirestoreDataConverter | null; readonly firestore: Firestore; static fromJSON(firestore: Firestore, json: object): DocumentReference; static fromJSON< NewAppModelType = DocumentData, NewDbModelType extends DocumentData = DocumentData >( firestore: Firestore, json: object, converter: FirestoreDataConverter ): DocumentReference; get id(): string; get parent(): CollectionReference; get path(): string; toJSON(): object; readonly type = 'document'; withConverter< NewAppModelType, NewDbModelType extends DocumentData = DocumentData >( converter: FirestoreDataConverter ): DocumentReference; withConverter(converter: null): DocumentReference; } // @public export class DocumentSnapshot< AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData > { protected constructor(); data(): AppModelType | undefined; exists(): this is QueryDocumentSnapshot; get(fieldPath: string | FieldPath): any; get id(): string; get ref(): DocumentReference; } export { EmulatorMockTokenOptions } // @public export function endAt( snapshot: DocumentSnapshot ): QueryEndAtConstraint; // @public export function endAt(...fieldValues: unknown[]): QueryEndAtConstraint; // @public export function endBefore< AppModelType, DbModelType extends DocumentData >(snapshot: DocumentSnapshot): QueryEndAtConstraint; // @public export function endBefore( ...fieldValues: unknown[] ): QueryEndAtConstraint; // @public export class FieldPath { constructor(...fieldNames: string[]); isEqual(other: FieldPath): boolean; } // @public export abstract class FieldValue { abstract isEqual(other: FieldValue): boolean; } // @public export class Firestore { get app(): FirebaseApp; toJSON(): object; type: 'firestore-lite' | 'firestore'; } // @public export interface FirestoreDataConverter< AppModelType, DbModelType extends DocumentData = DocumentData > { fromFirestore( snapshot: QueryDocumentSnapshot ): AppModelType; toFirestore( modelObject: WithFieldValue ): WithFieldValue; toFirestore( modelObject: PartialWithFieldValue, options: SetOptions ): PartialWithFieldValue; } // @public export class FirestoreError extends FirebaseError { readonly code: FirestoreErrorCode; readonly message: string; readonly stack?: string; } // @public export type FirestoreErrorCode = | 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated'; // @public export class GeoPoint { constructor(latitude: number, longitude: number); static fromJSON(json: object): GeoPoint; isEqual(other: GeoPoint): boolean; get latitude(): number; get longitude(): number; toJSON(): { latitude: number; longitude: number; type: string; }; } // @public export function getAggregate< AggregateSpecType extends AggregateSpec, AppModelType, DbModelType extends DocumentData >( query: Query, aggregateSpec: AggregateSpecType ): Promise< AggregateQuerySnapshot >; // @public export function getCount< AppModelType, DbModelType extends DocumentData >( query: Query ): Promise< AggregateQuerySnapshot< { count: AggregateField; }, AppModelType, DbModelType > >; // @public export function getDoc( reference: DocumentReference ): Promise>; // @public export function getDocs( query: Query ): Promise>; // @public export function getFirestore(): Firestore; // @public export function getFirestore(app: FirebaseApp): Firestore; // @beta export function getFirestore(databaseId: string): Firestore; // @beta export function getFirestore( app: FirebaseApp, databaseId: string ): Firestore; // @public export function increment(n: number): FieldValue; // @public export function initializeFirestore( app: FirebaseApp, settings: Settings ): Firestore; // @beta export function initializeFirestore( app: FirebaseApp, settings: Settings, databaseId?: string ): Firestore; // @public export class Int32Value { constructor(value: number); isEqual(other: Int32Value): boolean; // (undocumented) readonly value: number; } // @public export function limit(limit: number): QueryLimitConstraint; // @public export function limitToLast(limit: number): QueryLimitConstraint; export { LogLevel } // @public export function maximum(n: number): FieldValue; // @public export class MaxKey { // (undocumented) static instance(): MaxKey; readonly type = 'MaxKey'; } // @public export function minimum(n: number): FieldValue; // @public export class MinKey { // (undocumented) static instance(): MinKey; readonly type = 'MinKey'; } // @public export type NestedUpdateFields> = UnionToIntersection< { [K in keyof T & string]: string extends K ? never : ChildUpdateFields; }[keyof T & string] >; // @public export function or( ...queryConstraints: QueryFilterConstraint[] ): QueryCompositeFilterConstraint; // @public export function orderBy( fieldPath: string | FieldPath, directionStr?: OrderByDirection ): QueryOrderByConstraint; // @public export type OrderByDirection = 'desc' | 'asc'; // @public export type PartialWithFieldValue = | Partial | (T extends Primitive ? T : T extends {} ? { [K in keyof T]?: PartialWithFieldValue | FieldValue; } : never); // @public export type Primitive = string | number | boolean | undefined | null; // @public export class Query< AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData > { protected constructor(); readonly converter: FirestoreDataConverter | null; readonly firestore: Firestore; readonly type: 'query' | 'collection'; withConverter(converter: null): Query; withConverter< NewAppModelType, NewDbModelType extends DocumentData = DocumentData >( converter: FirestoreDataConverter ): Query; } // @public export function query( query: Query, compositeFilter: QueryCompositeFilterConstraint, ...queryConstraints: QueryNonFilterConstraint[] ): Query; // @public export function query( query: Query, ...queryConstraints: QueryConstraint[] ): Query; // @public export class QueryCompositeFilterConstraint { readonly type: 'or' | 'and'; /* Excluded from this release type: __constructor */ } // @public export abstract class QueryConstraint { abstract readonly type: QueryConstraintType; } // @public export type QueryConstraintType = | 'where' | 'orderBy' | 'limit' | 'limitToLast' | 'startAt' | 'startAfter' | 'endAt' | 'endBefore'; // @public export class QueryDocumentSnapshot< AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData > extends DocumentSnapshot { // @override data(): AppModelType; } // @public export class QueryEndAtConstraint extends QueryConstraint { readonly type: 'endBefore' | 'endAt'; /* Excluded from this release type: __constructor */ } // @public export function queryEqual< AppModelType, DbModelType extends DocumentData >( left: Query, right: Query ): boolean; // @public export class QueryFieldFilterConstraint extends QueryConstraint { readonly type = 'where'; /* Excluded from this release type: __constructor */ } // @public export type QueryFilterConstraint = | QueryFieldFilterConstraint | QueryCompositeFilterConstraint; // @public export class QueryLimitConstraint extends QueryConstraint { readonly type: 'limit' | 'limitToLast'; /* Excluded from this release type: __constructor */ } // @public export type QueryNonFilterConstraint = | QueryOrderByConstraint | QueryLimitConstraint | QueryStartAtConstraint | QueryEndAtConstraint; // @public export class QueryOrderByConstraint extends QueryConstraint { readonly type = 'orderBy'; /* Excluded from this release type: __constructor */ } // @public export class QuerySnapshot< AppModelType = DocumentData, DbModelType extends DocumentData = DocumentData > { get docs(): Array>; get empty(): boolean; forEach( callback: ( result: QueryDocumentSnapshot ) => void, thisArg?: unknown ): void; readonly query: Query; get size(): number; } // @public export class QueryStartAtConstraint extends QueryConstraint { readonly type: 'startAt' | 'startAfter'; /* Excluded from this release type: __constructor */ } // @public export function refEqual< AppModelType, DbModelType extends DocumentData >( left: | DocumentReference | CollectionReference, right: | DocumentReference | CollectionReference ): boolean; // @public export class RegexValue { constructor(pattern: string, options: string); isEqual(other: RegexValue): boolean; // (undocumented) readonly options: string; // (undocumented) readonly pattern: string; } // @public export function runTransaction( firestore: Firestore, updateFunction: (transaction: Transaction) => Promise, options?: TransactionOptions ): Promise; // @public export function serverTimestamp(): FieldValue; // @public export function setDoc( reference: DocumentReference, data: WithFieldValue ): Promise; // @public export function setDoc( reference: DocumentReference, data: PartialWithFieldValue, options: SetOptions ): Promise; // @public export function setLogLevel(logLevel: LogLevel): void; // @public export type SetOptions = | { readonly merge?: boolean; } | { readonly mergeFields?: Array; }; // @public export interface Settings { grpcFlowControlWindow?: number; host?: string; ignoreUndefinedProperties?: boolean; ssl?: boolean; /* Excluded from this release type: _customHeaders */ } // @public export function snapshotEqual< AppModelType, DbModelType extends DocumentData >( left: | DocumentSnapshot | QuerySnapshot, right: | DocumentSnapshot | QuerySnapshot ): boolean; // @public export function startAfter< AppModelType, DbModelType extends DocumentData >( snapshot: DocumentSnapshot ): QueryStartAtConstraint; // @public export function startAfter( ...fieldValues: unknown[] ): QueryStartAtConstraint; // @public export function startAt( snapshot: DocumentSnapshot ): QueryStartAtConstraint; // @public export function startAt( ...fieldValues: unknown[] ): QueryStartAtConstraint; // @public export function sum(field: string | FieldPath): AggregateField; // @public export function terminate(firestore: Firestore): Promise; // @public export class Timestamp { constructor( seconds: number, nanoseconds: number ); static fromDate(date: Date): Timestamp; static fromInstant(instant: Temporal.Instant): Timestamp; static fromJSON(json: object): Timestamp; static fromMillis(milliseconds: number): Timestamp; isEqual(other: Timestamp): boolean; readonly nanoseconds: number; static now(): Timestamp; readonly seconds: number; toDate(): Date; toInstant(): Temporal.Instant; toJSON(): { seconds: number; nanoseconds: number; type: string; }; toMillis(): number; toString(): string; valueOf(): string; } // @public export class Transaction { delete( documentRef: DocumentReference ): this; get( documentRef: DocumentReference ): Promise>; set( documentRef: DocumentReference, data: WithFieldValue ): this; set( documentRef: DocumentReference, data: PartialWithFieldValue, options: SetOptions ): this; update( documentRef: DocumentReference, data: UpdateData ): this; update( documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[] ): this; } // @public export interface TransactionOptions { readonly maxAttempts?: number; } // @public export type UnionToIntersection = ( U extends unknown ? (k: U) => void : never ) extends (k: infer I) => void ? I : never; // @public export type UpdateData = T extends Primitive ? T : T extends {} ? { [K in keyof T]?: string extends K ? PartialWithFieldValue> | FieldValue : UpdateData | FieldValue; } & NestedUpdateFields : Partial; // @public export function updateDoc< AppModelType, DbModelType extends DocumentData >( reference: DocumentReference, data: UpdateData ): Promise; // @public export function updateDoc< AppModelType, DbModelType extends DocumentData >( reference: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[] ): Promise; // @public export function vector(values?: number[]): VectorValue; // @public export class VectorValue { /* Excluded from this release type: __constructor */ static fromJSON(json: object): VectorValue; isEqual(other: VectorValue): boolean; toArray(): number[]; toJSON(): object; } // @public export function where( fieldPath: string | FieldPath, opStr: WhereFilterOp, value: unknown ): QueryFieldFilterConstraint; // @public export type WhereFilterOp = | '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in'; // @public export type WithFieldValue = | T | (T extends Primitive ? T : T extends {} ? { [K in keyof T]: WithFieldValue | FieldValue; } : never); // @public export class WriteBatch { commit(): Promise; delete( documentRef: DocumentReference ): WriteBatch; set( documentRef: DocumentReference, data: WithFieldValue ): WriteBatch; set( documentRef: DocumentReference, data: PartialWithFieldValue, options: SetOptions ): WriteBatch; update( documentRef: DocumentReference, data: UpdateData ): WriteBatch; update( documentRef: DocumentReference, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[] ): WriteBatch; } // @public export function writeBatch(firestore: Firestore): WriteBatch; ```