import firebase from 'firebase/app'; import { Omit, Optional } from 'utility-types'; export declare type HasId = { id: string; }; export declare type HasIdObject = { id: string; [key: string]: any; }; export declare type Storable = { [P in keyof T]: P extends 'id' ? T[P] : T[P] | firebase.firestore.FieldValue; }; export declare type OptionalIdStorable = Optional, 'id'>; export declare type PartialStorable = Partial> & HasId; declare type HasSameKeyObject = { [P in keyof T]: any; }; export declare type QueryKey = { [K in keyof T]: K; }[keyof T] | firebase.firestore.FieldPath; export declare type OmitId = Omit; export declare type Encodable = (obj: OptionalIdStorable) => Storable; export declare type Decodable = (doc: HasSameKeyObject & HasId) => T; export import Firestore = firebase.firestore.Firestore; export import DocumentReference = firebase.firestore.DocumentReference; export import CollectionReference = firebase.firestore.CollectionReference; export import DocumentSnapshot = firebase.firestore.DocumentSnapshot; export import QuerySnapshot = firebase.firestore.QuerySnapshot; export import Transaction = firebase.firestore.Transaction; export import WriteBatch = firebase.firestore.WriteBatch; export import Query = firebase.firestore.Query; export import WhereFilterOp = firebase.firestore.WhereFilterOp; export import FieldPath = firebase.firestore.FieldPath; export import OrderByDirection = firebase.firestore.OrderByDirection; export import FieldValue = firebase.firestore.FieldValue; export {};