Repository navigation
feat: React Native SDK update for version 2.0.0 - #126
Conversation
馃數 Tier A 路 Mergeable after minor fixes
This release updates the React Native SDK for Appwrite 2.5 response shapes, adds response defaults and nullable model types, and introduces expanded query, OAuth2, analytics, app-management, and passkey APIs. It also packages native push modules and updates push notification handling and status reporting. 14 of 54 changed files were too large to include in full.
Note Not approving while a bug finding is open: Keep the released Topic wildcard builder methods
Fix with agent prompt### Issue 1
src/topic.ts:58-63
**Keep the released Topic wildcard builder methods**
The released 1.2.0-rc.4 helper exposed `Topic.any()`, `Topic.all()`, and `ResolvedTopic`; this revision rejects `+`/`#` levels and removes those methods. Existing users building MQTT wildcard filters with `Topic` now fail to compile or can no longer construct those filters, and this API removal is not among the listed breaking changes.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.馃搨 Walkthrough 路 5
Reviewed |
|
@hansi-codes review |
|
@hansi-codes review |
| /** Append the given levels. */ | ||
| path(levels: string[]): Topic { | ||
| return new Topic([...this.levels, ...levelsOf(levels)]); | ||
| } | ||
|
|
||
| /** Append a single-level wildcard (`+`): matches exactly one level. */ | ||
| any(): Topic { | ||
| return new Topic([...this.levels, '+']); | ||
| } | ||
|
|
||
| /** Append the multi-level wildcard (`#`) and end the topic. */ | ||
| all(): ResolvedTopic { | ||
| return new ResolvedTopic([...this.levels, '#']); | ||
| } | ||
|
|
||
| toString(): string { | ||
| return this.levels.join('/'); | ||
| } | ||
| } | ||
|
|
||
| /** A topic ended by `all()`: nothing can be appended after the `#` wildcard. */ | ||
| export class ResolvedTopic { | ||
| /** @internal Created by {@link Topic.all}. */ | ||
| constructor(private readonly levels: readonly string[]) {} | ||
|
|
||
| toString(): string { |
There was a problem hiding this comment.
Keep the released Topic wildcard builder methods
The released 1.2.0-rc.4 helper exposed Topic.any(), Topic.all(), and ResolvedTopic; this revision rejects +/# levels and removes those methods. Existing users building MQTT wildcard filters with Topic now fail to compile or can no longer construct those filters, and this API removal is not among the listed breaking changes.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/topic.ts
Line: 58-63
Comment:
**Keep the released Topic wildcard builder methods**
The released 1.2.0-rc.4 helper exposed `Topic.any()`, `Topic.all()`, and `ResolvedTopic`; this revision rejects `+`/`#` levels and removes those methods. Existing users building MQTT wildcard filters with `Topic` now fail to compile or can no longer construct those filters, and this API removal is not among the listed breaking changes.
---
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 2.0.0.
What's Changed
X-Appwrite-Response-Format: 2.5.0; responses follow the 2.5 shapesT | null, such asLocale.cityandPresence.statusAppsservice to manage apps, installations, keys and secretsOauth2service for the OAuth2 authorize, token, device and grant flowsPushservice, with optional peersexpo-notifications,react-native-background-actionsandreact-native-tcp-socketTopichelperio.appwrite.reactnative, so apps can also depend onsdk-for-android; set the notification icon with theio.appwrite.reactnative.push.notification_iconmeta-dataQueryaggregates (count,countDistinct,sum,avg,min,maxand more),groupBy,having,distinct, joins,relationship,covers,spatialEqualsandpageQuery.builder()to chain queries; realtime subscriptions accept a builder forqueriesExecutionTrigger.Email{}instead of[]Also 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:1.2.0
accountpasskey methodslistPasskeys,createPasskey,getPasskey,updatePasskey,deletePasskeyandupdatePasskeyVerificationaccount.createPasskeyTokenandaccount.updatePasskeyTokenfor passkey sign-inPasskey,PasskeyList,PasskeyChallengeandTokenSecretmodels1.3.0
analytics.createEventin a newAnalyticsservice to send tracking eventsavatars.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 andlistTransactions