admin library

Classes

FirebaseAdmin
Access to Firebase Admin components
GrpcStatus
Status codes returned by Firestore's gRPC calls.

Extension Types

AggregateField
Represents an aggregation that can be performed by Firestore.
AggregateFieldStatic
Static members on AggregateField
AggregateQuery
A query that calculates aggregations over an underlying query.
AggregateQuerySnapshot
The results of executing an aggregation query.
AndroidConfig
Represents the Android-specific options that can be included in an {@link Message}.
AndroidFcmOptions
Represents options for features provided by the FCM SDK for Android.
AndroidNotification
Represents the Android-specific notification options that can be included in {@link AndroidConfig}.
ApnsConfig
Represents the APNs-specific options that can be included in an {@link Message}. Refer to {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html | Apple documentation} for various headers and payload fields supported by APNs.
ApnsFcmOptions
Represents options for features provided by the FCM SDK for iOS.
ApnsPayload
Represents the payload of an APNs message. Mainly consists of the aps dictionary. But may also contain other arbitrary custom keys.
App
A Firebase app holds the initialization information for a collection of services.
AppErrorCodes
App client error codes and their default messages.
AppOptions
Available options to pass to {@link firebase-admin.app#initializeApp}.
Aps
Represents the {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html | aps dictionary} that is part of APNs messages.
ApsAlert
Aps alert
BaseMessage
Base class for FCM messages
BatchResponse
Interface representing the server response from the {@link Messaging.sendAll} and {@link Messaging.sendMulticast} methods.
BulkWriter
A Firestore BulkWriter than can be used to perform a large number of writes in parallel. Writes to the same document will be executed sequentially.
BulkWriterError
The error thrown when a BulkWriter operation fails.
BulkWriterOptions
An options object to configure throttling on BulkWriter.
BundleBuilder
Builds a Firestore data bundle with results from the given document and query snapshots.
CollectionGroup
A CollectionGroup refers to all documents that are contained in a collection or subcollection with a specific collection ID.
CollectionReference
A CollectionReference object can be used for adding documents, getting document references, and querying for documents (using the methods inherited from Query).
ConditionMessage
A message sent to a condition
Credential
Interface that provides Google OAuth2 access tokens used to authenticate with Firebase services.
CriticalSound
Represents a critical sound configuration that can be included in the aps dictionary of an APNs payload.
DocumentChange
A DocumentChange represents a change to the documents matching a query. It contains the document affected and the type of change that occurred.
DocumentReference
A DocumentReference refers to a document location in a Firestore database and can be used to write, read, or listen to the location. The document at the referenced location may or may not exist. A DocumentReference can also be used to create a CollectionReference to a subcollection.
DocumentSnapshot
A DocumentSnapshot contains data read from a document in your Firestore database. The data can be extracted with .data() or .get(<field>) to get a specific field.
ExecutionStats
ExecutionStats contains information about the execution of a query.
ExplainMetrics
ExplainMetrics contains information about planning and execution of a query.
ExplainOptions
Options used to configure explain queries.
ExplainResults
ExplainResults contains information about planning, execution, and results of a query.
FcmOptions
Represents platform-independent options for features provided by the FCM SDKs.
FieldPath
A FieldPath refers to a field in a document. The path may consist of a single field name (referring to a top-level field in the document), or a list of field names (referring to a nested field in the document).
FieldPathStatic
Static members on FieldPath
FieldValue
Sentinel values that can be used when writing document fields with set(), create() or update().
FieldValueStatic
Static members on FieldValue
Filter
A Filter represents a restriction on one or more field values and can be used to refine the results of a {@link Query}. Filterss are created by invoking {@link Filter#where}, {@link Filter#or}, or {@link Filter#and} and can then be passed to {@link Query#where} to create a new {@link Query} instance that also contains this Filter.
FilterStatic
Static members on Filter
FirebaseAdminApp
Firebase App and SDK initialization.
FirebaseAdminFirestore
Cloud Firestore.
FirebaseAdminMessaging
Firebase Cloud Messaging (FCM).
FirebaseAppError
Firebase App error code structure. This extends PrefixedFirebaseError.
FirebaseArrayIndexError
Composite type which includes both a FirebaseError object and an index which can be used to get the errored item.
FirebaseError
FirebaseError is a subclass of the standard JavaScript Error object. In addition to a message string and stack trace, it contains a string code.
Firestore
Firestore represents a Firestore Database and is the entry point for all Firestore operations.
FirestoreDataConverter
Converter used by withConverter() to transform user objects of type AppModelType into Firestore data of type DbModelType.
FirestoreSettings
Settings to pass to the Firestore constructor.
GeoPoint
An immutable object representing a geo point in Firestore. The geo point is represented as latitude/longitude pair.
GoogleOAuthAccessToken
Interface for Google OAuth 2.0 access tokens.
LightSettings
Represents settings to control notification LED that can be included in {@link AndroidNotification}.
Message
Payload for the {@link Messaging.send} operation. The payload contains all the fields in the BaseMessage type, and exactly one of token, topic or condition.
Messaging
Messaging service bound to the provided app.
MessagingTopicManagementResponse
Interface representing the server response from the {@link Messaging.subscribeToTopic} and {@link Messaging.unsubscribeFromTopic} methods.
MulticastMessage
Payload for the {@link Messaging.sendMulticast} method. The payload contains all the fields in the BaseMessage type, and a list of tokens.
Notification
A notification that can be included in {@link Message}.
PlanSummary
PlanSummary contains information about the planning stage of a query.
Precondition
An options object that configures conditional behavior of update() and delete() calls in DocumentReference, WriteBatch, and Transaction. Using Preconditions, these calls can be restricted to only apply to documents that match the specified restrictions.
Query
A Query refers to a Query which you can read or listen to. You can also construct refined Query objects by adding filters and ordering.
QueryDocumentSnapshot
A QueryDocumentSnapshot contains data read from a document in your Firestore database as part of a query. The document is guaranteed to exist and its data can be extracted with .data() or .get(<field>) to get a specific field.
QueryPartition
A split point that can be used in a query as a starting and/or end point for the query results. The cursors returned by {@link #startAt} and {@link #endBefore} can only be used in a query that matches the constraint of query that produced this partition.
QuerySnapshot
A QuerySnapshot contains zero or more QueryDocumentSnapshot objects representing the results of a query. The documents can be accessed as an array via the docs property or enumerated using the forEach method. The number of documents can be determined via the empty and size properties.
ReadOptions
An options object that can be used to configure the behavior of getAll() calls. By providing a fieldMask, these calls can be configured to only return a subset of fields.
SendResponse
Interface representing the status of an individual message that was sent as part of a batch request.
ServiceAccount
A service account object
SetOptions
An options object that configures the behavior of set() calls in DocumentReference, WriteBatch and Transaction. These calls can be configured to perform granular merges instead of overwriting the target documents in their entirety.
Settings
Settings used to directly configure a Firestore instance.
SortOptions
An options object that configures the behavior of set() calls in DocumentReference, WriteBatch and Transaction. These calls can be configured to perform granular merges instead of overwriting the target documents in their entirety.
Timestamp
A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
TimestampStatic
Static members on Timestamp
TokenMessage
A message sent to a single device
TopicMessage
A message sent to a topic
Transaction
A reference to a transaction. The Transaction object passed to a transaction's updateFunction provides the methods to read and write data within the transaction context. See Firestore.runTransaction().
TransactionOptions
Options to configure a transaction.
VectorQuery
A query that finds the document whose vector fields are closest to a certain vector.
VectorQuerySnapshot
A VectorQuerySnapshot contains zero or more QueryDocumentSnapshot objects representing the results of a query. The documents can be accessed as an array via the docs property or enumerated using the forEach method. The number of documents can be determined via the empty and size properties.
VectorValue
Represent a vector type in Firestore documents.
WebpushConfig
Represents the WebPush protocol options that can be included in an {@link Message}.
WebpushFcmOptions
Represents options for features provided by the FCM SDK for Web (which are not part of the Webpush standard).
WebpushNotification
Represents the WebPush-specific notification options that can be included in {@link WebpushConfig}. This supports most of the standard options as defined in the Web Notification {@link https://developer.mozilla.org/en-US/docs/Web/API/notification/Notification | specification}.
WriteBatch
A write batch, used to perform multiple writes as a single atomic unit.
WriteResult
A WriteResult wraps the write time set by the Firestore servers on sets(), updates(), and creates().

Extensions

FirebaseAdminAppCredentialFactory on FirebaseAdminApp
Access to the Firebase Admin App Credential Factory methods
FirebaseAdminAppLifecycle on FirebaseAdminApp
Access to Firebase Admin App Lifecycle methods