Repository navigation
feat: SDK update for version 27.2.0 - #340
Conversation
🟡 Tier B · Needs changes before merging
This release adds analytics event creation and tracking helpers, custom avatar photo management, and the Account model. It also adds optional parameters and OAuth provider support across account, locale, transaction, and team APIs, and updates chunked uploads for the new avatar endpoint. Latest changes: The latest commit adds a test assertion that avatars.updatePhoto passes PUT as the chunked upload method.
Note Not approving while a bug finding is open: This signature breaks downstream Client implementations Fix with agent prompt### Issue 1
lib/src/client.dart:44
**This signature breaks downstream Client implementations**
Because `Client` is public, downstream classes that implement it with the previous `chunkedUpload` signature will no longer compile: Dart implementers must accept the newly added named parameter even though it has a default. This makes the 27.2.0 update source-incompatible for custom clients.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 8
⏳ Still open from earlier reviews · 1
Reviewed the commits since |
| required String idParamName, | ||
| required Map<String, String> headers, | ||
| Function(UploadProgress)? onProgress, | ||
| HttpMethod method = HttpMethod.post, |
There was a problem hiding this comment.
This signature breaks downstream Client implementations
Because Client is public, downstream classes that implement it with the previous chunkedUpload signature will no longer compile: Dart implementers must accept the newly added named parameter even though it has a default. This makes the 27.2.0 update source-incompatible for custom clients.
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/src/client.dart
Line: 44
Comment:
**This signature breaks downstream Client implementations**
Because `Client` is public, downstream classes that implement it with the previous `chunkedUpload` signature will no longer compile: Dart implementers must accept the newly added named parameter even though it has a default. This makes the 27.2.0 update source-incompatible for custom clients.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · bug · Reply if this doesn't apply.
There was a problem hiding this comment.
Keeping this. updatePhoto has to upload with PUT, and adding a named parameter with a default is how the newer SDK line already shapes chunkedUpload, so implementations have to take this step whenever they upgrade. Client is built through its factory; outside test mocks, custom implementations of it are not a supported extension point.
There was a problem hiding this comment.
This is still a source-compatibility break. The factory creates the SDK’s built-in client, but Client is also a public, exported abstract type (client.dart, appwrite.dart), and services accept a Client instance (service.dart). A downstream implements Client using the old signature will no longer satisfy the interface. The default lets callers omit method; it does not provide an implementation for downstream implementers.
Whether custom clients are a supported extension point doesn’t change that compile-time effect. Please preserve the existing Client contract or treat this as a breaking API change.
This PR contains updates to the SDK for version 27.2.0.
What's Changed
analytics.createEventin a newAnalyticsservice to send tracking eventsTrackinghelper for app lifecycle events and screen views, andTrackingObserverfor automatic route trackingavatars.updatePhotoandavatars.deletePhototo manage the user's custom profile photo, and theAccountmodelWebflowto theOAuthProviderenumstateonaccount.createOAuth2Sessionandaccount.createOAuth2Token, returned unchanged on the success and failure URLsdurationonaccount.createEmailPasswordSessionto set the session lengthcurrentonaccount.deleteSessionsto keep the current session signed inmembershipIdonteams.createMembershiptotalonaccount.listSessions, thelocalelist methods andlistTransactionsPatched onto
27.1.0: the diff of the SDK generated with and without these features, three-way merged onto the release. Everything else on the release is unchanged, including itsX-Appwrite-Response-Format.membershipIdis the last parameter ofteams.createMembership, so existing positional calls keep working.