firebase_functions_interop library

Interop library for Firebase Functions Node.js SDK.

Use functions object as main entry point.

To create your cloud function see corresponding namespaces on FirebaseFunctions class:

Here is an example of creating and exporting an HTTPS trigger:

import 'package:firebase_functions_interop/firebase_functions_interop.dart';

void main() {
  // Registers helloWorld function under path prefix `/helloWorld`
  functions['helloWorld'] = functions.https
    .onRequest(helloWorld);
}

// Simple function which returns a response with a body containing
// "Hello world".
void helloWorld(ExpressHttpRequest request) {
  request.response.writeln("Hello world");
  request.response.close();
}

Classes

App
Represents initialized Firebase application and provides access to the app's services.
AppOptions
Available options to pass to initializeApp.
Auth
AuthFunctions
Namespace for Firebase Authentication functions.
Blob
An immutable object representing an array of bytes.
BucketBuilder
CallableContext
Change<T>
Container for events that change state, such as Realtime Database or Cloud Firestore onWrite and onUpdate.
CollectionReference
A CollectionReference object can be used for adding documents, getting document references, and querying for documents (using the methods inherited from DocumentQuery).
Config
Provides access to environment configuration of Firebase Functions. [...]
CreateUserRequest
CustomerEncryption
Database
Firebase Realtime Database service.
DatabaseFunctions
Realtime Database functions namespace.
DatabaseTransaction
Firebase Realtime Database transaction result returned from Reference.transaction.
DataSnapshot<T>
A DataSnapshot contains data from a Database location. [...]
DecodedIdToken
Interface representing a decoded Firebase ID token, returned from the Auth.verifyIdToken method.
DocumentBuilder
DocumentChange
A DocumentChange represents a change to the documents matching a query. [...]
DocumentData
Data stored in a Firestore Document. [...]
DocumentQuery
Represents a query over the data at a particular location.
DocumentReference
A DocumentReference refers to a document location in a Firestore database and can be used to write, read, or listen to the location. [...]
DocumentSnapshot
EventAuthInfo
EventContext
The context in which an event occurred. [...]
EventType
List of event types supported in Query.on and Query.off.
ExpressHttpRequest
FieldValue
Sentinel values that can be used when writing document fields with set() or update().
FieldValues
FirebaseAdmin
Provides access to Firebase Admin APIs. [...]
FirebaseFunctions
Global namespace for Firebase Cloud Functions functionality. [...]
FirebaseSignInInfo
Firestore
Represents a Firestore Database and is the entry point for all Firestore operations.
FirestoreFunctions
FirestoreSettings
FutureReference
A special Reference which notifies when it's written to the database. [...]
GeoPoint
Represents Firestore geo point object.
HttpRequest
A server-side object that contains the content of and information about an HTTP request. [...]
HttpResponse
An HTTP response, which returns the headers and data from the server to the client in response to an HTTP request. [...]
HttpsError
To send an error from an HTTPS Callable function to a client, throw an instance of this class from your handler function. [...]
HttpsFunctions
HTTPS functions namespace.
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.
Message
ObjectBuilder
ObjectMetadata
Interface representing a Google Google Cloud Storage object metadata object.
PubsubFunctions
Query
Sorts and filters the data at a Database location so only a subset of the child data is included. [...]
QuerySnapshot
A QuerySnapshot contains zero or more DocumentSnapshot objects.
QuerySubscription
QuerySubscription to keep function callback and allowing use to unsubscribe with cancel later.
RefBuilder
The Firebase Realtime Database reference builder.
Reference
A Reference represents a specific location in your Database and can be used for reading or writing data to that Database location.
RuntimeOptions
ScheduleBuilder
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.
StorageFunctions
Timestamp
Represents Firestore timestamp object.
TopicBuilder
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<T>
Realtime Database transaction result returned from DatabaseTransactionHandler. [...]
UpdateData
Represents data to update in a Firestore document. [...]
UpdateUserRequest
UserBuilder
The Firebase Authentication user builder interface.
UserInfo
Interface representing a user's info from a third-party identity provider such as Google or Facebook.
UserMetadata
UserRecord
Interface representing a user.
WriteBatch
A write batch, used to perform multiple writes as a single atomic unit. [...]

Properties

functions FirebaseFunctions
Main library object which can be used to create and register Firebase Cloud functions.
final

Functions

createFieldPath(List<String> fieldNames) FieldPath
@Deprecated('This function will be hidden from public API in future versions.')
createGeoPoint(num latitude num longitude) GeoPoint
@Deprecated('This function will be hidden from public API in future versions.')
documentId() FieldPath
Returns a special sentinel FieldPath to refer to the ID of a document. It can be used in queries to sort or filter by the document ID.
@Deprecated('Use "Firestore.documentId" instead.')

Enums

DocumentChangeType
An enumeration of document change types.

Typedefs

ChangeEventHandler<T>(Change<T> data, EventContext context) → FutureOr<void>
CloudFunction<T>(dynamic data, EventContext context) → void
The Cloud Function type for all non-HTTPS triggers. [...]
DatabaseTransactionHandler<T>(T currentData) TransactionResult<T>
Interface for a Realtime Database transaction handler function used in Reference.transaction.
DataEventHandler<T>(T data, EventContext context) → FutureOr<void>
HttpsFunction(IncomingMessage request, ServerResponse response) → void
The Cloud Function type for HTTPS triggers. [...]