firebase_admin_interop 1.1.0

Write server-side Firebase applications in Dart using Node.js as a runtime.

Firestore Timestamps migration:

Firestore deprecated usage of DateTime objects in favor of custom Timestamp type and recommends
migrating as soon as possible.
By default all timestamps are still returned as DateTime objects and you can access them with
DocumentData.getDateTime or DocumentData.setDateTime.
To start using Timestamps you must configure Firestore as follows:

final app = FirebaseAdmin.instance.initializeApp();
final firestore = app.firestore();
// Call Firestore.settings at the very beginning before any other calls:
firestore.settings(FirestoreSettings(timestampsInSnapshots: true));
// You can read and write data now, but make sure to use new `setTimestamp` and `getTimestamp`
// methods of `DocumentData`.

Installation

Add this package as a dependency to your pubspec.yaml:

dependencies:
firebase_admin_interop: ^1.1.0

Run pub get.

Create package.json file to install Node.js modules used by this library:

Note that it is only possible to use JSON-compatible values when reading
and writing data to the Realtime Database. This includes all primitive
types (int, double, bool), string values (String) as well as
any List or Map instance.

For Firestore there are a few more supported data types, like DateTime
and GeoPoint.

1.0.0-dev.18.0

1.0.0-dev.17.0

Added: complex types support to Firestore lists

Breaking: removed generic type argument from DocumentData.setList
and DocumentData.getList methods. Firestore does not enforce single
type to all elements in a list, so having generic type on those
methods was limiting.

1.0.0-dev.16.0

Fixed: strong mode errors with latest Dart 2 SDK (dev.68).

1.0.0-dev.15.0

Added: Firestore.runTransaction

Breaking: Firestore DocumentSnapshot.updateTime type changed to
String from DateTime. This field contains ISO formatted datetime
string with nanosecond precision and can't be converted to Dart's
DateTime object without loosing information (DateTime only
stores microseconds). This value should be treated as opaque when
passed to any transaction as a precondition.

1.0.0-dev.10.0

Deprecated: Firestore, deprecated createGeoPoint and createFieldPath
functions. These will be hidden from public API before stable
1.0.0 release.

Added: Firestore, Firestore.documentId() function as a
replacement for the library-level documentId() function.
The library-level function is now deprecated and will be removed
before stable 1.0.0 release.

1.0.0-dev.9.0

Upgraded to JS sdk v5.11.0

FirebaseAdmin.initializeApp can now be invoked without explicit
credentials, in which case the app will be initialized with Google
Application Default Credentials (introduced in JS SDK v5.9.1).

1.0.0-dev.8.0

Fixed: GeoPoint treated as invalid type when used in Firebase Functions.

1.0.0-dev.5.0

Added: Auth service implementation. See App.auth() method and Auth class
for more details.

1.0.0-dev.4.0

Breaking change: CollectionReference.add now expects instance of
DocumentData instead of regular Dart Map. Use DocumentData.fromMap to
upgrade from previous version.

Fixed: Handle nested maps in DocumentData.fromMap.

1.0.0-dev.3.0

Added: Firestore DocumentData.keys and DocumentData.toMap().

1.0.0-dev.2.0

Fixed: DocumentQuery.snapshots was subscribing to a wrong stream of updates.

Added: DocumentQuery.get.

1.0.0-dev.1.0

Breaking change: Depends on Dart SDK >= 2.0.0-dev.

Breaking change: Depends on node_interop >= 1.0.0-dev.

Breaking change: removed built_value integration.

Added: Firestore support.

Internal: run tests in both dart2js and dartdevc.

Updated documentation with new instructions.

0.1.0-beta.4

Breaking: FirebaseAdmin.initializeApp() now expects new AppOptions
object as the first argument and optional name argument. See documentation
for FirebaseAdmin.initializeApp() for more details and example.