diff --git a/packages/dart_firebase_admin/CHANGELOG.md b/packages/dart_firebase_admin/CHANGELOG.md index 58875912..a1191482 100644 --- a/packages/dart_firebase_admin/CHANGELOG.md +++ b/packages/dart_firebase_admin/CHANGELOG.md @@ -1,6 +1,62 @@ -## 0.5.0 - 2026-02-12 - -- Major changes +## 0.5.0 - 2026-03-10 + +### Breaking Changes + +- `initializeApp()` now accepts `AppOptions` instead of positional `projectId` and `credential` arguments. Project ID is auto-discovered from credentials, environment variables, or the GCE metadata server if not provided. +- Firebase service constructors (`Auth(app)`, `Firestore(app)`, etc.) have been removed. Use the instance methods on `FirebaseApp` instead: `app.auth()`, `app.firestore()`, `app.messaging()`, etc. Service instances are now cached — calling `app.auth()` multiple times returns the same instance. +- `ActionCodeSettings.dynamicLinkDomain` has been removed. Use `linkDomain` instead. +- `Credential` is now a sealed class with `ServiceAccountCredential` and `ApplicationDefaultCredential` subtypes. + +### New Features + +**App** +- Added multi-app support: `initializeApp(options, name: 'secondary')` and `FirebaseApp.getApp('name')` +- Added `app.serviceAccountEmail()` and `app.sign()` extension methods on `FirebaseApp` +- All outgoing SDK requests now include an `X-Firebase-Client: fire-admin-dart/` usage tracking header + +**Auth** +- Added tenant support: `app.auth().tenantManager()` returns a `TenantManager`; use `tenantManager.authForTenant(tenantId)` for tenant-scoped auth operations +- Added `ProjectConfigManager` for managing project-level auth configuration (email privacy, SMS regions, password policies, MFA, reCAPTCHA, mobile links) via `app.auth().projectConfigManager()` +- Added TOTP multi-factor authentication support +- Added `SessionCookieOptions` type for `createSessionCookie` +- Added `linkDomain` to `ActionCodeSettings` +- Added `Credential.getAccessToken()` to retrieve an OAuth2 access token +- Added reCAPTCHA managed rules, key types, and toll fraud protection configuration in tenant settings + +**Firestore** +- Added multi-database support: `app.firestore(databaseId: 'analytics-db')` +- Added `Transaction.getQuery()` to execute queries within a transaction +- Added `Transaction.getAggregateQuery()` to execute aggregation queries within a transaction +- Added `BulkWriter` for high-throughput writes with automatic batching (20 ops/batch) and rate limiting using the 500/50/5 rule +- Added `SetOptions` for merge operations, available on `WriteBatch`, `Transaction`, `BulkWriter`, and `DocumentReference` +- Added Vector Search support: `FieldValue.vector()`, `VectorValue`, `query.findNearest()`, `VectorQuery`, `VectorQuerySnapshot` +- Added Query Explain API: `query.explain()` and `vectorQuery.explain()` +- Added query partitioning: `CollectionGroup.getPartitions(desiredPartitionCount)` returns a list of `QueryPartition` objects; call `partition.toQuery()` to execute each chunk in parallel +- Added `Firestore.recursiveDelete(ref, bulkWriter)` for bulk deletion of documents and collections +- `withConverter()` now accepts `null` to reset a typed reference back to `DocumentData` + +**Storage** _(new service)_ +- Added `app.storage()` with full `FirebaseApp` lifecycle integration +- Added emulator support via `FIREBASE_STORAGE_EMULATOR_HOST` +- Added `file.getSignedUrl()` for V2/V4 signed URL generation +- Added `file.getDownloadURL()` for retrieving a permanent download URL + +**Messaging** +- Added `messaging.subscribeToTopic(tokens, topic)` and `messaging.unsubscribeFromTopic(tokens, topic)` + +**Functions** _(new service)_ +- Added `app.functions()` for Cloud Functions admin operations +- Added Task Queue API: `functions.taskQueue(functionName)` with `enqueue()` and `delete()`, supporting scheduling, deadlines, custom headers, and custom task IDs +- Added Cloud Tasks emulator support via `CLOUD_TASKS_EMULATOR_HOST` + +### Bug Fixes + +- Fixed exceptions being silently swallowed instead of rethrown across all services +- Fixed `Messaging.sendEach()` incorrectly returning `internalError` for invalid registration tokens; now correctly returns `invalidArgument` +- Fixed JWT decode exceptions and integer division issues in `verifySessionCookie` +- Fixed missing `INVALID_ARGUMENT` error code mapping in `SecurityRules` +- Fixed `ExponentialBackoff` in Firestore not correctly tracking backoff completion state +- Fixed Auth using `invalidProviderUid` instead of `invalidUid` in `getAccountInfoByFederatedUid` ## 0.4.1 - 2025-03-21 diff --git a/packages/dart_firebase_admin/README.md b/packages/dart_firebase_admin/README.md index 385e87e0..a76a1988 100644 --- a/packages/dart_firebase_admin/README.md +++ b/packages/dart_firebase_admin/README.md @@ -530,24 +530,24 @@ The Firebase Admin Dart SDK currently supports the following Firebase services: 🟡 - Partially supported / Work in progress
🔴 - Not supported -| Service | Status | Notes | -|-----------------------|---------|-------------------------------------| -| App | 🟢 | | -| App Check | 🟢 | | -| Authentication | 🟢 | | -| Data Connect | 🔴 | | -| Realtime Database | 🔴 | | -| Event Arc | 🔴 | | -| Extensions | 🔴 | | -| Firestore | 🟢 | Excludes realtime capabilities | -| Functions | 🟢 | | -| Installations | 🔴 | | -| Machine Learning | 🔴 | | -| Messaging | 🟢 | | -| Project Management | 🔴 | | -| Remote Config | 🔴 | | -| Security Rules | 🟢 | | -| Storage | 🟡 | Work in progress | +| Service | Status | Notes | +|-----------------------|---------|--------------------------------| +| App | 🟢 | | +| App Check | 🟢 | | +| Authentication | 🟢 | | +| Data Connect | 🔴 | | +| Realtime Database | 🔴 | | +| Event Arc | 🔴 | | +| Extensions | 🔴 | | +| Firestore | 🟢 | Excludes realtime capabilities | +| Functions | 🟢 | | +| Installations | 🔴 | | +| Machine Learning | 🔴 | | +| Messaging | 🟢 | | +| Project Management | 🔴 | | +| Remote Config | 🔴 | | +| Security Rules | 🟢 | | +| Storage | 🟢 | | ## Additional Packages