'cancelled': The operation was cancelled (typically by the caller).
'unknown': Unknown error or an error from a different error domain.
'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).
'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.
'not-found': Some requested document was not found.
'already-exists': Some document that we attempted to create already
exists.
'permission-denied': The caller does not have permission to execute the
specified operation.
'resource-exhausted': Some resource has been exhausted, perhaps a
per-user quota, or perhaps the entire file system is out of space.
'failed-precondition': Operation was rejected because the system is not
in a state required for the operation's execution.
'aborted': The operation was aborted, typically due to a concurrency
issue like transaction aborts, etc.
'out-of-range': Operation was attempted past the valid range.
'unimplemented': Operation is not implemented or not supported/enabled.
'internal': Internal errors. Means some invariants expected by
underlying system has been broken. If you see one of these errors,
something is very broken.
'unavailable': The service is currently unavailable. This is most likely
a transient condition and may be corrected by retrying with a backoff.
'data-loss': Unrecoverable data loss or corruption.
'unauthenticated': The request does not have valid authentication
credentials for the operation.
LogLevel
LogLevel:"debug" | "error" | "silent"
OrderByDirection
OrderByDirection:"desc" | "asc"
The direction of a Query.orderBy() clause is specified as 'desc' or 'asc'
(descending or ascending).
TaskState
TaskState:"Error" | "Running" | "Success"
Represents the state of bundle loading tasks.
Both 'Error' and 'Success' are sinking state: task will abort or complete and there will
be no more updates after they are reported.
UpdateData
UpdateData:{}
Update data (for use with DocumentReference.update()) consists of field
paths (e.g. 'foo' or 'foo.baz') mapped to values. Fields that contain dots
reference nested fields within the document.
Filter conditions in a Query.where() clause are specified using the
strings '<', '<=', '==', '!=', '>=', '>', 'array-contains', 'in',
'array-contains-any', and 'not-in'.
Variables
Const CACHE_SIZE_UNLIMITED
CACHE_SIZE_UNLIMITED:number
Constant used to indicate the LRU garbage collection should be disabled.
Set this value as the cacheSizeBytes on the settings passed to the
Firestore instance.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-07-27 UTC."],[],[],null,["# firestore | JavaScript SDK\n\n- [firebase](/docs/reference/js/v8/firebase).\n- firestore\n=========================================================\n\n### Callable\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\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-----\n\n### Classes\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\n### Interfaces\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\n### Type 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\n### Variables\n\n- [CACHE_SIZE_UNLIMITED](/docs/reference/js/v8/firebase.firestore#cache_size_unlimited)\n\n### Functions\n\n- [setLogLevel](/docs/reference/js/v8/firebase.firestore#setloglevel)\n\nType aliases\n------------\n\n### DocumentChangeType\n\nDocumentChangeType: \"added\" \\| \"removed\" \\| \"modified\" \nThe type of a `DocumentChange` may be 'added', 'removed', or 'modified'.\n\n### DocumentData\n\nDocumentData: {} \nDocument data (for use with `DocumentReference.set()`) consists of fields\nmapped to values. \n\n#### Type declaration\n\n-\n\n ##### \\[field: string\\]: any\n\n### EmulatorMockTokenOptions\n\nEmulatorMockTokenOptions: [EmulatorMockTokenOptions](/docs/reference/js/v8/firebase#emulatormocktokenoptions)\n\n### FirestoreErrorCode\n\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\n### LogLevel\n\nLogLevel: \"debug\" \\| \"error\" \\| \"silent\"\n\n### OrderByDirection\n\nOrderByDirection: \"desc\" \\| \"asc\" \nThe direction of a `Query.orderBy()` clause is specified as 'desc' or 'asc'\n(descending or ascending).\n\n### TaskState\n\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\n### UpdateData\n\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\n#### Type declaration\n\n-\n\n ##### \\[fieldPath: string\\]: any\n\n### WhereFilterOp\n\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---------\n\n### Const CACHE_SIZE_UNLIMITED\n\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---------\n\n### setLogLevel\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\n ##### logLevel: [LogLevel](/docs/reference/js/v8/firebase.firestore#loglevel)\n\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\n #### Returns void"]]
The type of a
DocumentChange
may be 'added', 'removed', or 'modified'.