Stay organized with collections
Save and categorize content based on your preferences.
Type aliases
DocumentChangeType
DocumentChangeType: "added" | "removed" | "modified"
DocumentData
DocumentData: {}
FirestoreErrorCode
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"
LogLevel
LogLevel: "debug" | "error" | "silent"
OrderByDirection
OrderByDirection: "desc" | "asc"
TaskState
TaskState: "Error" | "Running" | "Success"
UpdateData
UpdateData: {}
WhereFilterOp
WhereFilterOp: "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains" | "in" | "array-contains-any" | "not-in"
Variables
Const CACHE_SIZE_UNLIMITED
CACHE_SIZE_UNLIMITED: number
Functions
setLogLevel
- setLogLevel
(
logLevel
:
LogLevel
)
:
void
-
Parameters
Returns void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.
[null,null,["Last updated 2022-07-27 UTC."],[],[],null,["- [firebase](/docs/reference/js/v8/firebase).\n- firestore \n\nCallable\n\n- firestore ( app ? : [App](/docs/reference/js/v8/firebase.app.App) ) : [Firestore](/docs/reference/js/v8/firebase.firestore.Firestore)\n-\n\n Parameters\n -\n\n Optional app: [App](/docs/reference/js/v8/firebase.app.App)\n\n Returns [Firestore](/docs/reference/js/v8/firebase.firestore.Firestore)\n\nIndex\n\nClasses\n\n- [Blob](/docs/reference/js/v8/firebase.firestore.Blob)\n- [CollectionReference](/docs/reference/js/v8/firebase.firestore.CollectionReference)\n- [DocumentReference](/docs/reference/js/v8/firebase.firestore.DocumentReference)\n- [DocumentSnapshot](/docs/reference/js/v8/firebase.firestore.DocumentSnapshot)\n- [FieldPath](/docs/reference/js/v8/firebase.firestore.FieldPath)\n- [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n- [Firestore](/docs/reference/js/v8/firebase.firestore.Firestore)\n- [GeoPoint](/docs/reference/js/v8/firebase.firestore.GeoPoint)\n- [Query](/docs/reference/js/v8/firebase.firestore.Query)\n- [QueryDocumentSnapshot](/docs/reference/js/v8/firebase.firestore.QueryDocumentSnapshot)\n- [QuerySnapshot](/docs/reference/js/v8/firebase.firestore.QuerySnapshot)\n- [Timestamp](/docs/reference/js/v8/firebase.firestore.Timestamp)\n- [Transaction](/docs/reference/js/v8/firebase.firestore.Transaction)\n- [WriteBatch](/docs/reference/js/v8/firebase.firestore.WriteBatch)\n\nInterfaces\n\n- [DocumentChange](/docs/reference/js/v8/firebase.firestore.DocumentChange)\n- [FirestoreDataConverter](/docs/reference/js/v8/firebase.firestore.FirestoreDataConverter)\n- [FirestoreError](/docs/reference/js/v8/firebase.firestore.FirestoreError)\n- [GetOptions](/docs/reference/js/v8/firebase.firestore.GetOptions)\n- [LoadBundleTask](/docs/reference/js/v8/firebase.firestore.LoadBundleTask)\n- [LoadBundleTaskProgress](/docs/reference/js/v8/firebase.firestore.LoadBundleTaskProgress)\n- [PersistenceSettings](/docs/reference/js/v8/firebase.firestore.PersistenceSettings)\n- [SetOptions](/docs/reference/js/v8/firebase.firestore.SetOptions)\n- [Settings](/docs/reference/js/v8/firebase.firestore.Settings)\n- [SnapshotListenOptions](/docs/reference/js/v8/firebase.firestore.SnapshotListenOptions)\n- [SnapshotMetadata](/docs/reference/js/v8/firebase.firestore.SnapshotMetadata)\n- [SnapshotOptions](/docs/reference/js/v8/firebase.firestore.SnapshotOptions)\n\nType aliases\n\n- [DocumentChangeType](/docs/reference/js/v8/firebase.firestore#documentchangetype)\n- [DocumentData](/docs/reference/js/v8/firebase.firestore#documentdata)\n- [EmulatorMockTokenOptions](/docs/reference/js/v8/firebase.firestore#emulatormocktokenoptions)\n- [FirestoreErrorCode](/docs/reference/js/v8/firebase.firestore#firestoreerrorcode)\n- [LogLevel](/docs/reference/js/v8/firebase.firestore#loglevel)\n- [OrderByDirection](/docs/reference/js/v8/firebase.firestore#orderbydirection)\n- [TaskState](/docs/reference/js/v8/firebase.firestore#taskstate)\n- [UpdateData](/docs/reference/js/v8/firebase.firestore#updatedata)\n- [WhereFilterOp](/docs/reference/js/v8/firebase.firestore#wherefilterop)\n\nVariables\n\n- [CACHE_SIZE_UNLIMITED](/docs/reference/js/v8/firebase.firestore#cache_size_unlimited)\n\nFunctions\n\n- [setLogLevel](/docs/reference/js/v8/firebase.firestore#setloglevel)\n\nType aliases\n\nDocumentChangeType \nDocumentChangeType: \"added\" \\| \"removed\" \\| \"modified\" \nThe type of a `DocumentChange` may be 'added', 'removed', or 'modified'.\n\nDocumentData \nDocumentData: {} \nDocument data (for use with `DocumentReference.set()`) consists of fields\nmapped to values. \n\nType declaration\n\n-\n\n \\[field: string\\]: any\n\nEmulatorMockTokenOptions \nEmulatorMockTokenOptions: [EmulatorMockTokenOptions](/docs/reference/js/v8/firebase#emulatormocktokenoptions)\n\nFirestoreErrorCode \nFirestoreErrorCode: \"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\" \nThe set of Firestore status codes. The codes are the same at the ones\nexposed by gRPC here:\n\u003chttps://github.com/grpc/grpc/blob/master/doc/statuscodes.md\u003e\n\nPossible values:\n\n- 'cancelled': The operation was cancelled (typically by the caller).\n- 'unknown': Unknown error or an error from a different error domain.\n- 'invalid-argument': Client specified an invalid argument. Note that this differs from 'failed-precondition'. 'invalid-argument' indicates arguments that are problematic regardless of the state of the system (e.g. an invalid field name).\n- 'deadline-exceeded': Deadline expired before operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire.\n- 'not-found': Some requested document was not found.\n- 'already-exists': Some document that we attempted to create already exists.\n- 'permission-denied': The caller does not have permission to execute the specified operation.\n- 'resource-exhausted': Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.\n- 'failed-precondition': Operation was rejected because the system is not in a state required for the operation's execution.\n- 'aborted': The operation was aborted, typically due to a concurrency issue like transaction aborts, etc.\n- 'out-of-range': Operation was attempted past the valid range.\n- 'unimplemented': Operation is not implemented or not supported/enabled.\n- 'internal': Internal errors. Means some invariants expected by underlying system has been broken. If you see one of these errors, something is very broken.\n- 'unavailable': The service is currently unavailable. This is most likely a transient condition and may be corrected by retrying with a backoff.\n- 'data-loss': Unrecoverable data loss or corruption.\n- 'unauthenticated': The request does not have valid authentication credentials for the operation.\n\nLogLevel \nLogLevel: \"debug\" \\| \"error\" \\| \"silent\"\n\nOrderByDirection \nOrderByDirection: \"desc\" \\| \"asc\" \nThe direction of a `Query.orderBy()` clause is specified as 'desc' or 'asc'\n(descending or ascending).\n\nTaskState \nTaskState: \"Error\" \\| \"Running\" \\| \"Success\" \nRepresents the state of bundle loading tasks.\n\nBoth 'Error' and 'Success' are sinking state: task will abort or complete and there will\nbe no more updates after they are reported.\n\nUpdateData \nUpdateData: {} \nUpdate data (for use with `DocumentReference.update()`) consists of field\npaths (e.g. 'foo' or 'foo.baz') mapped to values. Fields that contain dots\nreference nested fields within the document. \n\nType declaration\n\n-\n\n \\[fieldPath: string\\]: any\n\nWhereFilterOp \nWhereFilterOp: \"\\\u003c\" \\| \"\\\u003c=\" \\| \"==\" \\| \"!=\" \\| \"\\\u003e=\" \\| \"\\\u003e\" \\| \"array-contains\" \\| \"in\" \\| \"array-contains-any\" \\| \"not-in\" \nFilter conditions in a `Query.where()` clause are specified using the\nstrings '\\\u003c', '\\\u003c=', '==', '!=', '\\\u003e=', '\\\u003e', 'array-contains', 'in',\n'array-contains-any', and 'not-in'.\n\nVariables\n\nConst CACHE_SIZE_UNLIMITED \nCACHE_SIZE_UNLIMITED: number \nConstant used to indicate the LRU garbage collection should be disabled.\nSet this value as the `cacheSizeBytes` on the settings passed to the\n`Firestore` instance.\n\nFunctions\n\nsetLogLevel\n\n- setLogLevel ( logLevel : [LogLevel](/docs/reference/js/v8/firebase.firestore#loglevel) ) : void\n- Sets the verbosity of Cloud Firestore logs (debug, error, or silent).\n\n Parameters\n -\n\n logLevel: [LogLevel](/docs/reference/js/v8/firebase.firestore#loglevel) \n The verbosity you set for activity and error logging. Can be any of\n the following values:\n - `debug` for the most verbose logging level, primarily for debugging.\n - `error` to log errors only.\n - `silent` to turn off logging.\n\nReturns void"]]
The type of a
DocumentChange
may be 'added', 'removed', or 'modified'.