@@ -68,9 +68,11 @@ export function average(field: string | FieldPath): AggregateField<number | null
6868// @public
6969export class Bytes {
7070 static fromBase64String(base64 : string ): Bytes ;
71+ static fromJSON(json : object ): Bytes ;
7172 static fromUint8Array(array : Uint8Array ): Bytes ;
7273 isEqual(other : Bytes ): boolean ;
7374 toBase64(): string ;
75+ toJSON(): object ;
7476 toString(): string ;
7577 toUint8Array(): Uint8Array ;
7678}
@@ -161,9 +163,12 @@ export function documentId(): FieldPath;
161163export class DocumentReference <AppModelType = DocumentData , DbModelType extends DocumentData = DocumentData > {
162164 readonly converter: FirestoreDataConverter <AppModelType , DbModelType > | null ;
163165 readonly firestore: Firestore ;
166+ static fromJSON(firestore : Firestore , json : object ): DocumentReference ;
167+ static fromJSON<NewAppModelType = DocumentData , NewDbModelType extends DocumentData = DocumentData >(firestore : Firestore , json : object , converter : FirestoreDataConverter <NewAppModelType , NewDbModelType >): DocumentReference <NewAppModelType , NewDbModelType >;
164168 get id(): string ;
165169 get parent(): CollectionReference <AppModelType , DbModelType >;
166170 get path(): string ;
171+ toJSON(): object ;
167172 readonly type = " document" ;
168173 withConverter<NewAppModelType , NewDbModelType extends DocumentData = DocumentData >(converter : FirestoreDataConverter <NewAppModelType , NewDbModelType >): DocumentReference <NewAppModelType , NewDbModelType >;
169174 withConverter(converter : null ): DocumentReference <DocumentData , DocumentData >;
@@ -178,8 +183,15 @@ export class DocumentSnapshot<AppModelType = DocumentData, DbModelType extends D
178183 get id(): string ;
179184 readonly metadata: SnapshotMetadata ;
180185 get ref(): DocumentReference <AppModelType , DbModelType >;
186+ toJSON(): object ;
181187}
182188
189+ // @public
190+ export function documentSnapshotFromJSON(db : Firestore , json : object ): DocumentSnapshot ;
191+
192+ // @public
193+ export function documentSnapshotFromJSON<AppModelType , DbModelType extends DocumentData = DocumentData >(db : Firestore , json : object , converter : FirestoreDataConverter <AppModelType , DbModelType >): DocumentSnapshot <AppModelType , DbModelType >;
194+
183195export { EmulatorMockTokenOptions }
184196
185197// @public @deprecated
@@ -264,12 +276,14 @@ export interface FirestoreSettings {
264276// @public
265277export class GeoPoint {
266278 constructor (latitude : number , longitude : number );
279+ static fromJSON(json : object ): GeoPoint ;
267280 isEqual(other : GeoPoint ): boolean ;
268281 get latitude(): number ;
269282 get longitude(): number ;
270283 toJSON(): {
271284 latitude: number ;
272285 longitude: number ;
286+ type: string ;
273287 };
274288}
275289
@@ -459,6 +473,46 @@ export function onSnapshot<AppModelType, DbModelType extends DocumentData>(query
459473// @public
460474export function onSnapshot<AppModelType , DbModelType extends DocumentData >(query : Query <AppModelType , DbModelType >, options : SnapshotListenOptions , onNext : (snapshot : QuerySnapshot <AppModelType , DbModelType >) => void , onError ? : (error : FirestoreError ) => void , onCompletion ? : () => void ): Unsubscribe ;
461475
476+ // @public
477+ export function onSnapshotResume<AppModelType , DbModelType extends DocumentData >(firestore : Firestore , snapshotJson : object , onNext : (snapshot : QuerySnapshot <AppModelType , DbModelType >) => void , onError ? : (error : FirestoreError ) => void , onCompletion ? : () => void , converter ? : FirestoreDataConverter <DbModelType >): Unsubscribe ;
478+
479+ // @public
480+ export function onSnapshotResume<AppModelType , DbModelType extends DocumentData >(firestore : Firestore , snapshotJson : object , onNext : (snapshot : DocumentSnapshot <AppModelType , DbModelType >) => void , onError ? : (error : FirestoreError ) => void , onCompletion ? : () => void , converter ? : FirestoreDataConverter <DbModelType >): Unsubscribe ;
481+
482+ // @public
483+ export function onSnapshotResume<AppModelType , DbModelType extends DocumentData >(firestore : Firestore , snapshotJson : object , options : SnapshotListenOptions , onNext : (snapshot : QuerySnapshot <AppModelType , DbModelType >) => void , onError ? : (error : FirestoreError ) => void , onCompletion ? : () => void , converter ? : FirestoreDataConverter <DbModelType >): Unsubscribe ;
484+
485+ // @public
486+ export function onSnapshotResume<AppModelType , DbModelType extends DocumentData >(firestore : Firestore , snapshotJson : object , options : SnapshotListenOptions , onNext : (snapshot : DocumentSnapshot <AppModelType , DbModelType >) => void , onError ? : (error : FirestoreError ) => void , onCompletion ? : () => void , converter ? : FirestoreDataConverter <DbModelType >): Unsubscribe ;
487+
488+ // @public
489+ export function onSnapshotResume<AppModelType , DbModelType extends DocumentData >(firestore : Firestore , snapshotJson : object , observer : {
490+ next: (snapshot : QuerySnapshot <AppModelType , DbModelType >) => void ;
491+ error? : (error : FirestoreError ) => void ;
492+ complete? : () => void ;
493+ }, converter ? : FirestoreDataConverter <DbModelType >): Unsubscribe ;
494+
495+ // @public
496+ export function onSnapshotResume<AppModelType , DbModelType extends DocumentData >(firestore : Firestore , snapshotJson : object , observer : {
497+ next: (snapshot : DocumentSnapshot <AppModelType , DbModelType >) => void ;
498+ error? : (error : FirestoreError ) => void ;
499+ complete? : () => void ;
500+ }, converter ? : FirestoreDataConverter <DbModelType >): Unsubscribe ;
501+
502+ // @public
503+ export function onSnapshotResume<AppModelType , DbModelType extends DocumentData >(firestore : Firestore , snapshotJson : object , options : SnapshotListenOptions , observer : {
504+ next: (snapshot : QuerySnapshot <AppModelType , DbModelType >) => void ;
505+ error? : (error : FirestoreError ) => void ;
506+ complete? : () => void ;
507+ }, converter ? : FirestoreDataConverter <DbModelType >): Unsubscribe ;
508+
509+ // @public
510+ export function onSnapshotResume<AppModelType , DbModelType extends DocumentData >(firestore : Firestore , snapshotJson : object , options : SnapshotListenOptions , observer : {
511+ next: (snapshot : DocumentSnapshot <AppModelType , DbModelType >) => void ;
512+ error? : (error : FirestoreError ) => void ;
513+ complete? : () => void ;
514+ }, converter ? : FirestoreDataConverter <DbModelType >): Unsubscribe ;
515+
462516// @public
463517export function onSnapshotsInSync(firestore : Firestore , observer : {
464518 next? : (value : void ) => void ;
@@ -610,8 +664,15 @@ export class QuerySnapshot<AppModelType = DocumentData, DbModelType extends Docu
610664 readonly metadata: SnapshotMetadata ;
611665 readonly query: Query <AppModelType , DbModelType >;
612666 get size(): number ;
667+ toJSON(): object ;
613668}
614669
670+ // @public
671+ export function querySnapshotFromJSON(db : Firestore , json : object ): QuerySnapshot ;
672+
673+ // @public
674+ export function querySnapshotFromJSON<AppModelType , DbModelType extends DocumentData = DocumentData >(db : Firestore , json : object , converter : FirestoreDataConverter <AppModelType , DbModelType >): QuerySnapshot <AppModelType , DbModelType >;
675+
615676// @public
616677export class QueryStartAtConstraint extends QueryConstraint {
617678 readonly type: ' startAt' | ' startAfter' ;
@@ -696,6 +757,7 @@ export class Timestamp {
696757 seconds : number ,
697758 nanoseconds : number );
698759 static fromDate(date : Date ): Timestamp ;
760+ static fromJSON(json : object ): Timestamp ;
699761 static fromMillis(milliseconds : number ): Timestamp ;
700762 isEqual(other : Timestamp ): boolean ;
701763 readonly nanoseconds: number ;
@@ -705,6 +767,7 @@ export class Timestamp {
705767 toJSON(): {
706768 seconds: number ;
707769 nanoseconds: number ;
770+ type: string ;
708771 };
709772 toMillis(): number ;
710773 toString(): string ;
@@ -751,8 +814,10 @@ export function vector(values?: number[]): VectorValue;
751814// @public
752815export class VectorValue {
753816 /* Excluded from this release type: __constructor */
817+ static fromJSON(json : object ): VectorValue ;
754818 isEqual(other : VectorValue ): boolean ;
755819 toArray(): number [];
820+ toJSON(): object ;
756821}
757822
758823// @public
0 commit comments