@firebase/firestore-types
- Version 3.0.3
- Published
- 13.6 kB
- No dependencies
- Apache-2.0 license
Install
npm i @firebase/firestore-typesyarn add @firebase/firestore-typespnpm add @firebase/firestore-typesOverview
@firebase/firestore Types
Index
Variables
Functions
Classes
Interfaces
Type Aliases
Variables
variable CACHE_SIZE_UNLIMITED
const CACHE_SIZE_UNLIMITED: number;Functions
function setLogLevel
setLogLevel: (logLevel: LogLevel) => void;Classes
class Blob
class Blob {}method fromBase64String
static fromBase64String: (base64: string) => Blob;method fromUint8Array
static fromUint8Array: (array: Uint8Array) => Blob;method isEqual
isEqual: (other: Blob) => boolean;method toBase64
toBase64: () => string;method toUint8Array
toUint8Array: () => Uint8Array;class CollectionReference
class CollectionReference< T = DocumentData, T2 extends DocumentData = DocumentData> extends Query<T, T2> {}property id
readonly id: string;property parent
readonly parent: DocumentReference<DocumentData, DocumentData>;property path
readonly path: string;method add
add: (data: T) => Promise<DocumentReference<T>>;method doc
doc: (documentPath?: string) => DocumentReference<T>;method isEqual
isEqual: (other: CollectionReference<T>) => boolean;method withConverter
withConverter: { (converter: null): CollectionReference<DocumentData>; <U>(converter: FirestoreDataConverter<U>): CollectionReference< U, DocumentData >;};class DocumentReference
class DocumentReference<T = DocumentData, T2 extends DocumentData = DocumentData> {}property firestore
readonly firestore: FirebaseFirestore;property id
readonly id: string;property parent
readonly parent: CollectionReference<T, DocumentData>;property path
readonly path: string;method collection
collection: (collectionPath: string) => CollectionReference<DocumentData>;method delete
delete: () => Promise<void>;method get
get: (options?: GetOptions) => Promise<DocumentSnapshot<T>>;method isEqual
isEqual: (other: DocumentReference<T>) => boolean;method onSnapshot
onSnapshot: { (observer: { next?: (snapshot: DocumentSnapshot<T>) => void; error?: (error: FirestoreError) => void; complete?: () => void; }): () => void; ( options: SnapshotListenOptions, observer: { next?: (snapshot: DocumentSnapshot<T, DocumentData>) => void; error?: (error: FirestoreError) => void; complete?: () => void; } ): () => void; ( onNext: (snapshot: DocumentSnapshot<T, DocumentData>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void ): () => void; ( options: SnapshotListenOptions, onNext: (snapshot: DocumentSnapshot<T, DocumentData>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void ): () => void;};method set
set: { (data: Partial<T>, options: SetOptions): Promise<void>; (data: T): Promise<void>;};method update
update: { (data: UpdateData): Promise<void>; ( field: string | FieldPath, value: any, ...moreFieldsAndValues: any[] ): Promise<void>;};method withConverter
withConverter: { (converter: null): DocumentReference<DocumentData>; <U>(converter: FirestoreDataConverter<U>): DocumentReference< U, DocumentData >;};class DocumentSnapshot
class DocumentSnapshot<T = DocumentData, T2 extends DocumentData = DocumentData> {}constructor
protected constructor();property exists
readonly exists: boolean;property id
readonly id: string;property metadata
readonly metadata: SnapshotMetadata;property ref
readonly ref: DocumentReference<T, DocumentData>;method data
data: (options?: SnapshotOptions) => T | undefined;method get
get: (fieldPath: string | FieldPath, options?: SnapshotOptions) => any;method isEqual
isEqual: (other: DocumentSnapshot<T>) => boolean;class FieldPath
class FieldPath {}constructor
constructor(...fieldNames: string[]);method documentId
static documentId: () => FieldPath;method isEqual
isEqual: (other: FieldPath) => boolean;class FieldValue
class FieldValue {}method arrayRemove
static arrayRemove: (...elements: any[]) => FieldValue;method arrayUnion
static arrayUnion: (...elements: any[]) => FieldValue;method delete
static delete: () => FieldValue;method increment
static increment: (n: number) => FieldValue;method isEqual
isEqual: (other: FieldValue) => boolean;method serverTimestamp
static serverTimestamp: () => FieldValue;class FirebaseFirestore
class FirebaseFirestore {}property app
app: any;property INTERNAL
INTERNAL: { delete: () => Promise<void> };method batch
batch: () => WriteBatch;method clearPersistence
clearPersistence: () => Promise<void>;method collection
collection: (collectionPath: string) => CollectionReference<DocumentData>;method collectionGroup
collectionGroup: (collectionId: string) => Query<DocumentData>;method disableNetwork
disableNetwork: () => Promise<void>;method doc
doc: (documentPath: string) => DocumentReference<DocumentData>;method enableNetwork
enableNetwork: () => Promise<void>;method enablePersistence
enablePersistence: (settings?: PersistenceSettings) => Promise<void>;method loadBundle
loadBundle: ( bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string) => LoadBundleTask;method namedQuery
namedQuery: (name: string) => Promise<Query<DocumentData> | null>;method onSnapshotsInSync
onSnapshotsInSync: { (observer: { next?: (value: void) => void; error?: (error: FirestoreError) => void; complete?: () => void; }): () => void; (onSync: () => void): () => void;};method runTransaction
runTransaction: <T>( updateFunction: (transaction: Transaction) => Promise<T>) => Promise<T>;method settings
settings: (settings: Settings) => void;method terminate
terminate: () => Promise<void>;method useEmulator
useEmulator: ( host: string, port: number, options?: { mockUserToken?: EmulatorMockTokenOptions | string }) => void;method waitForPendingWrites
waitForPendingWrites: () => Promise<void>;class GeoPoint
class GeoPoint {}constructor
constructor(latitude: number, longitude: number);property latitude
readonly latitude: number;property longitude
readonly longitude: number;method isEqual
isEqual: (other: GeoPoint) => boolean;class Query
class Query<T = DocumentData, T2 extends DocumentData = DocumentData> {}constructor
protected constructor();property firestore
readonly firestore: FirebaseFirestore;method endAt
endAt: { (snapshot: DocumentSnapshot<any>): Query<T>; (...fieldValues: any[]): Query<T, DocumentData>;};method endBefore
endBefore: { (snapshot: DocumentSnapshot<any>): Query<T>; (...fieldValues: any[]): Query<T, DocumentData>;};method get
get: (options?: GetOptions) => Promise<QuerySnapshot<T>>;method isEqual
isEqual: (other: Query<T>) => boolean;method limit
limit: (limit: number) => Query<T>;method limitToLast
limitToLast: (limit: number) => Query<T>;method onSnapshot
onSnapshot: { (observer: { next?: (snapshot: QuerySnapshot<T>) => void; error?: (error: FirestoreError) => void; complete?: () => void; }): () => void; ( options: SnapshotListenOptions, observer: { next?: (snapshot: QuerySnapshot<T, DocumentData>) => void; error?: (error: FirestoreError) => void; complete?: () => void; } ): () => void; ( onNext: (snapshot: QuerySnapshot<T, DocumentData>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void ): () => void; ( options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot<T, DocumentData>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void ): () => void;};method orderBy
orderBy: ( fieldPath: string | FieldPath, directionStr?: OrderByDirection) => Query<T>;method startAfter
startAfter: { (snapshot: DocumentSnapshot<any>): Query<T>; (...fieldValues: any[]): Query<T, DocumentData>;};method startAt
startAt: { (snapshot: DocumentSnapshot<any>): Query<T>; (...fieldValues: any[]): Query<T, DocumentData>;};method where
where: ( fieldPath: string | FieldPath, opStr: WhereFilterOp, value: any) => Query<T>;method withConverter
withConverter: { (converter: null): Query<DocumentData>; <U>(converter: FirestoreDataConverter<U>): Query<U, DocumentData>;};class QueryDocumentSnapshot
class QueryDocumentSnapshot< T = DocumentData, T2 extends DocumentData = DocumentData> extends DocumentSnapshot<T, T2> {}method data
data: (options?: SnapshotOptions) => T;class QuerySnapshot
class QuerySnapshot<T = DocumentData, T2 extends DocumentData = DocumentData> {}property docs
readonly docs: QueryDocumentSnapshot<T, DocumentData>[];property empty
readonly empty: boolean;property metadata
readonly metadata: SnapshotMetadata;property query
readonly query: Query<T, DocumentData>;property size
readonly size: number;method docChanges
docChanges: (options?: SnapshotListenOptions) => Array<DocumentChange<T>>;method forEach
forEach: ( callback: (result: QueryDocumentSnapshot<T>) => void, thisArg?: any) => void;method isEqual
isEqual: (other: QuerySnapshot<T>) => boolean;class Timestamp
class Timestamp {}constructor
constructor(seconds: number, nanoseconds: number);property nanoseconds
readonly nanoseconds: number;property seconds
readonly seconds: number;method fromDate
static fromDate: (date: Date) => Timestamp;method fromMillis
static fromMillis: (milliseconds: number) => Timestamp;method isEqual
isEqual: (other: Timestamp) => boolean;method now
static now: () => Timestamp;method toDate
toDate: () => Date;method toMillis
toMillis: () => number;method valueOf
valueOf: () => string;class Transaction
class Transaction {}method delete
delete: (documentRef: DocumentReference<any>) => Transaction;method get
get: <T>(documentRef: DocumentReference<T>) => Promise<DocumentSnapshot<T>>;method set
set: { <T>( documentRef: DocumentReference<T>, data: Partial<T>, options: SetOptions ): Transaction; <T>(documentRef: DocumentReference<T, DocumentData>, data: T): Transaction;};method update
update: { (documentRef: DocumentReference<any>, data: UpdateData): Transaction; ( documentRef: DocumentReference<any, DocumentData>, field: string | FieldPath, value: any, ...moreFieldsAndValues: any[] ): Transaction;};class WriteBatch
class WriteBatch {}method commit
commit: () => Promise<void>;method delete
delete: (documentRef: DocumentReference<any>) => WriteBatch;method set
set: { <T>( documentRef: DocumentReference<T>, data: Partial<T>, options: SetOptions ): WriteBatch; <T>(documentRef: DocumentReference<T, DocumentData>, data: T): WriteBatch;};method update
update: { (documentRef: DocumentReference<any>, data: UpdateData): WriteBatch; ( documentRef: DocumentReference<any, DocumentData>, field: string | FieldPath, value: any, ...moreFieldsAndValues: any[] ): WriteBatch;};Interfaces
interface DocumentChange
interface DocumentChange<T = DocumentData, T2 extends DocumentData = DocumentData> {}interface FirestoreDataConverter
interface FirestoreDataConverter<T> {}method fromFirestore
fromFirestore: (snapshot: QueryDocumentSnapshot, options: SnapshotOptions) => T;method toFirestore
toFirestore: { (modelObject: T): DocumentData; (modelObject: Partial<T>, options: SetOptions): DocumentData;};interface FirestoreError
interface FirestoreError {}interface GetOptions
interface GetOptions {}property source
readonly source?: 'default' | 'server' | 'cache';interface LoadBundleTask
interface LoadBundleTask extends PromiseLike<LoadBundleTaskProgress> {}method catch
catch: <R>( onRejected: (a: Error) => R | PromiseLike<R>) => Promise<R | LoadBundleTaskProgress>;method onProgress
onProgress: ( next?: (progress: LoadBundleTaskProgress) => any, error?: (error: Error) => any, complete?: () => void) => void;method then
then: <T, R>( onFulfilled?: (a: LoadBundleTaskProgress) => T | PromiseLike<T>, onRejected?: (a: Error) => R | PromiseLike<R>) => Promise<T | R>;interface LoadBundleTaskProgress
interface LoadBundleTaskProgress {}property bytesLoaded
bytesLoaded: number;property documentsLoaded
documentsLoaded: number;property taskState
taskState: TaskState;property totalBytes
totalBytes: number;property totalDocuments
totalDocuments: number;interface PersistenceSettings
interface PersistenceSettings {}property experimentalForceOwningTab
experimentalForceOwningTab?: boolean;property experimentalTabSynchronization
experimentalTabSynchronization?: boolean;property synchronizeTabs
synchronizeTabs?: boolean;interface SetOptions
interface SetOptions {}property merge
readonly merge?: boolean;property mergeFields
readonly mergeFields?: (string | FieldPath)[];interface Settings
interface Settings {}property cacheSizeBytes
cacheSizeBytes?: number;property experimentalAutoDetectLongPolling
experimentalAutoDetectLongPolling?: boolean;property experimentalForceLongPolling
experimentalForceLongPolling?: boolean;property host
host?: string;property ignoreUndefinedProperties
ignoreUndefinedProperties?: boolean;property merge
merge?: boolean;property ssl
ssl?: boolean;interface SnapshotListenOptions
interface SnapshotListenOptions {}property includeMetadataChanges
readonly includeMetadataChanges?: boolean;interface SnapshotMetadata
interface SnapshotMetadata {}property fromCache
readonly fromCache: boolean;property hasPendingWrites
readonly hasPendingWrites: boolean;method isEqual
isEqual: (other: SnapshotMetadata) => boolean;interface SnapshotOptions
interface SnapshotOptions {}property serverTimestamps
readonly serverTimestamps?: 'estimate' | 'previous' | 'none';Type Aliases
type DocumentChangeType
type DocumentChangeType = 'added' | 'removed' | 'modified';type DocumentData
type DocumentData = { [field: string]: any };type FirestoreErrorCode
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';type LogLevel
type LogLevel = 'debug' | 'error' | 'silent' | 'warn' | 'info' | 'verbose';type OrderByDirection
type OrderByDirection = 'desc' | 'asc';type TaskState
type TaskState = 'Error' | 'Running' | 'Success';type UpdateData
type UpdateData = { [fieldPath: string]: any };type WhereFilterOp
type WhereFilterOp = | '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (1)
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@firebase/firestore-types.
- Markdown[](https://www.jsdocs.io/package/@firebase/firestore-types)
- HTML<a href="https://www.jsdocs.io/package/@firebase/firestore-types"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 5300 ms. - Missing or incorrect documentation? Open an issue for this package.
