Repository navigation
feat: Android SDK update for version 30.0.0 - #143
Conversation
馃數 Tier A 路 Mergeable after minor fixes
This update aligns the Android SDK with Appwrite 2.5 response shapes and adds the corresponding service and model APIs. It also adds query-builder support, OAuth2 resource and state options, passkey and analytics APIs, and push notification options with refreshed documentation and examples. 24 of 130 changed files were too large to include in full.
Note Not approving while a bug finding is open: Preserve nested string arrays in request parameters
Fix with agent prompt### Issue 1
library/src/main/java/io/appwrite/Client.kt:875-879
**Preserve nested string arrays in request parameters**
This branch flattens any nested collection whose elements are strings, not just values produced by a query builder. A valid parameter such as `listOf(listOf("a", "b"))` is therefore serialized as `["a","b"]` instead of `[["a","b"]]`, silently changing the request shape; only query and builder results should be expanded.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.馃搨 Walkthrough 路 6
Reviewed |
|
@hansi-codes review |
|
@hansi-codes review |
| if ((item is Array<*> || item is Collection<*>) && flat is Collection<*> && flat.all { it is String }) { | ||
| out.addAll(flat) | ||
| changed = true | ||
| continue | ||
| } |
There was a problem hiding this comment.
Preserve nested string arrays in request parameters
This branch flattens any nested collection whose elements are strings, not just values produced by a query builder. A valid parameter such as listOf(listOf("a", "b")) is therefore serialized as ["a","b"] instead of [["a","b"]], silently changing the request shape; only query and builder results should be expanded.
Prompt To Fix With AI
This is a comment left during a code review.
Path: library/src/main/java/io/appwrite/Client.kt
Line: 875-879
Comment:
**Preserve nested string arrays in request parameters**
This branch flattens any nested collection whose elements are strings, not just values produced by a query builder. A valid parameter such as `listOf(listOf("a", "b"))` is therefore serialized as `["a","b"]` instead of `[["a","b"]]`, silently changing the request shape; only query and builder results should be expanded.
---
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.
This PR contains updates to the SDK for version 30.0.0.
What's Changed
x-appwrite-response-format: 2.5.0; responses follow the 2.5 shapesoauth2resourceparams now takeList<String>on the authorize, PAR, device and token methodsPush.subscribetakesnotifyInForegroundbefore the callback; Java callers must pass itTopic.any()andTopic.all()wildcard builders andResolvedTopic;Push.subscribetakes strings orTopicnotifyInForegroundoption onPush.subscribePushOpenActivityfor opening notificationsQueryaggregates (count,countDistinct,sum,avg,min,maxand more),groupBy,having,distinct, joins,relationship,covers,spatialEqualsandpageQuery.builder()to chain queries;build()returns the query listExecutionTrigger.EMAILTopic.pathrejects levels containing a NUL characterCHUNK_SIZEbytes long uploads in a single requestAlso in this diff
mainwas behind the release tags, which were cut from release branches. This PR brings it up to date, so the diff also contains these already-released versions:29.1.0
accountpasskey methodslistPasskeys,createPasskey,getPasskey,updatePasskey,deletePasskeyandupdatePasskeyVerificationaccount.createPasskeyTokenandaccount.updatePasskeyTokenfor passkey sign-inPasskey,PasskeyList,PasskeyChallengeandTokenSecretmodels29.2.0
analytics.createEventin a newAnalyticsservice to send tracking eventsstateonaccount.createOAuth2Sessionandaccount.createOAuth2Token, returned unchanged on the success and failure URLsmembershipIdonteams.createMembershipavatars.updatePhotosendsPUT, so uploading a profile photo no longer returns 404success,failure,scopes,state) are URL-encoded, so values containing&,+or#survive the redirect