import type { DocumentData, PartialWithFieldValue, SetOptions, WithFieldValue, } from '@google-cloud/firestore'; export interface CommonFirestoreConverter< AppModelType, DbModelType = DocumentData, > { toFirestore( modelObject: WithFieldValue ): WithFieldValue; toFirestore( modelObject: PartialWithFieldValue, options: SetOptions ): PartialWithFieldValue; fromFirestore(snapshot: {id: string; data(): DbModelType}): AppModelType; }