/** * Utilities for parsing Google Firestore REST API document fields * into plain JavaScript values. */ type FirestoreValue = { stringValue: string; } | { integerValue: string; } | { doubleValue: number; } | { booleanValue: boolean; } | { timestampValue: string; } | { nullValue: null; } | { mapValue: { fields?: Record; }; } | { arrayValue: { values?: FirestoreValue[]; }; }; export type { FirestoreValue }; export type FirestoreFields = Record; /** Extract a string from a Firestore field. */ export declare function getString(fields: FirestoreFields, key: string): string | null; /** Extract a number from a Firestore field (handles both integerValue and doubleValue). */ export declare function getNumber(fields: FirestoreFields, key: string): number | null; /** Extract a boolean from a Firestore field. */ export declare function getBoolean(fields: FirestoreFields, key: string): boolean | null; /** Extract a Date from a Firestore timestamp field. */ export declare function getTimestamp(fields: FirestoreFields, key: string): Date | null; /** Extract nested map fields from a Firestore field. */ export declare function getMapFields(fields: FirestoreFields, key: string): FirestoreFields | null; /** Extract an array of values from a Firestore field. */ export declare function getArray(fields: FirestoreFields, key: string): FirestoreValue[] | null; /** Extract string values from an array field. */ export declare function getStringArray(fields: FirestoreFields, key: string): string[] | null; //# sourceMappingURL=firestore.d.ts.map