firebase_admin_interop.js library

Dart facade for Firebase Admin Node.js library.

import 'package:firebase_admin_interop/js.dart';
import 'package:node_interop/node.dart';

void main() {
  FirebaseAdmin admin = require('firebase-admin');
  App app = admin.initializeApp(jsify({
    'projectId': '<YOUR_PROJECT_ID>', // etc.
  }));
  console.log(app);
}

Classes

AccessToken
Google OAuth2 access token object used to authenticate with Firebase services.
AndroidConfig
Represents the Android-specific options that can be included in an admin.messaging.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 admin.messaging.AndroidConfig.
ApnsConfig
Represents the APNs-specific options that can be included in an admin.messaging.Message.
ApnsFcmOptions
Represents options for features provided by the FCM SDK for iOS.
ApnsPayload
Represents options for features provided by the FCM SDK for iOS.
App
A Firebase app holds the initialization information for a collection of services.
AppOptions
Available options to pass to initializeApp.
Aps
Represents the aps dictionary that is part of APNs messages.
ApsAlert
Auth
The Firebase Auth service interface.
BatchResponse
Interface representing the server response from the sendAll() and sendMulticast() methods.
CollectionReference
A CollectionReference object can be used for adding documents, getting document references, and querying for documents (using the methods inherited from Query).
ConditionMessage
CreateUserRequest
Credential
Interface which provides Google OAuth2 access tokens used to authenticate with Firebase services.
Credentials
CriticalSound
Represents a critical sound configuration that can be included in the aps dictionary of an APNs payload.
Database
The Firebase Database interface. [...]
DatabaseService
DataMessagePayload
Interface representing an FCM legacy API data message payload. [...]
DataSnapshot
Contains data from a Database location. [...]
DecodedIdToken
Interface representing a decoded Firebase ID token, returned from the Auth.verifyIdToken method.
DocumentChange
The type of of a DocumentChange may be 'added', 'removed', or 'modified'. A DocumentChange represents a change to the documents matching a query. It contains the document affected and the type of change that occurred.
DocumentData
Document data (for use with DocumentReference.set()) consists of fields mapped to values.
DocumentQuery
The direction of a Query.orderBy() clause is specified as 'desc' or 'asc' (descending or ascending). Filter conditions in a Query.where() clause are specified using the strings '<', '<=', '==', '>=', and '>'. 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.
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. For a DocumentSnapshot that points to a non-existing document, any data access will return 'undefined'. You can use the exists property to explicitly verify a document's existence.
FcmMessage
FcmOptions
Options for features provided by the FCM SDK for Web.
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).
FieldPathPrototype
FieldValue
FieldValues
Sentinel values that can be used when writing document fields with set() or update().
FirebaseAdmin
FirebaseArrayIndexError
FirebaseError
FirebaseSignInInfo
Firestore
Firestore represents a Firestore Database and is the entry point for all Firestore operations.
FirestoreModule
FirestoreService
FirestoreSettings
GeoPoint
An immutable object representing a geo point in Firestore. The geo point is represented as latitude/longitude pair. Latitude values are in the range of -90, 90. Longitude values are in the range of -180, 180.
GeoPointProto
GeoPointUtil
ListUsersResult
Interface representing a resulting object returned from a Auth.listUsers operation containing the list of users for the current batch and the next page token if available.
Messaging
The Firebase Messaging service interface.
MessagingConditionResponse
Interface representing the server response from the legacy sendToCondition() method.
MessagingDeviceGroupResponse
Interface representing the server response from the sendToDeviceGroup() method.
MessagingDeviceResult
Interface representing the status of a message sent to an individual device via the FCM legacy APIs.
MessagingDevicesResponse
Interface representing the server response from the legacy sendToDevice() method.
MessagingOptions
Interface representing the options that can be provided when sending a message via the FCM legacy APIs.
MessagingPayload
Interface representing a Firebase Cloud Messaging message payload. One or both of the data and notification keys are required.
MessagingTopicManagementResponse
Interface representing the server response from the subscribeToTopic() and admin.messaging.Messaging#unsubscribeFromTopic unsubscribeFromTopic() methods.
MessagingTopicResponse
Interface representing the server response from the legacy sendToTopic() method.
MulticastMessage
Notification
A notification that can be included in admin.messaging.Message.
NotificationMessagePayload
Interface representing an FCM legacy API notification message payload. Notification messages let developers send up to 4KB of predefined key-value pairs.
OnDisconnect
Allows you to write or clear data when your client disconnects from the Database server. These updates occur whether your client disconnects cleanly or not, so you can rely on them to clean up data even if a connection is dropped or a client crashes. [...]
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
Sorts and filters the data at a Database location so only a subset of the child data is included. [...]
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. A QueryDocumentSnapshot offers the same API surface as a DocumentSnapshot. Since query results contain only existing documents, the exists property will always be true and data() will never return 'undefined'.
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.
Reference
A Reference represents a specific location in your Database and can be used for reading or writing data to that Database location.
SendResponse
Interface representing the status of an individual message that was sent as part of a batch request.
ServerValues
A placeholder value for auto-populating the current timestamp (time since the Unix epoch, in milliseconds) as determined by the Firebase servers.
ServiceAccountConfig
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 by providing a SetOptions with merge: true.
ThenableReference
Timestamp
TimestampProto
TokenMessage
TopicMessage
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().
TransactionResult
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.
UpdateUserRequest
UserInfo
Interface representing a user's info from a third-party identity provider such as Google or Facebook.
UserMetadata
UserRecord
Interface representing a user.
WebpushConfig
Represents the WebPush protocol options that can be included in an admin.messaging.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 admin.messaging.WebpushConfig.
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().

Constants

defaultAppName → const String
'[DEFAULT]'

Properties

admin FirebaseAdmin
Singleton instance of FirebaseAdmin module.
final