Skip to content

feat: Web SDK update for version 26.2.0#178

Merged
ChiragAgg5k merged 2 commits into
mainfrom
dev
Jul 13, 2026
Merged

feat: Web SDK update for version 26.2.0#178
ChiragAgg5k merged 2 commits into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jul 13, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 26.2.0.

What's Changed

  • Added: Client.setBearer() to authenticate requests with an OAuth access token
  • Added: appwrite value to OAuthProvider enum
  • Added: Query.vectorDot, Query.vectorCosine, Query.vectorEuclidean vector similarity query helpers
  • Added: geolocation and network fields (city, timeZone, latitude, isp, ASN, connection info) to Locale model
  • Fixed: AppwriteException message now falls back to response text when missing

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the Web SDK to version 26.2.0, introducing OAuth bearer token support, three vector similarity query helpers, new geolocation fields on the Locale model, a new appwrite OAuth provider enum value, and a fix for AppwriteException message fallback.

  • Client.setBearer() sets Authorization: Bearer <token> correctly; AppwriteException now uses data?.message ?? responseText so the error message is never empty when the server returns body text without a structured message field.
  • Vector queries (vectorDot, vectorCosine, vectorEuclidean) follow the established [vector] wrapping pattern, consistent with other multi-value queries in the class.
  • CI hardening: npm audit --audit-level=high --omit=dev is added before the build step to block deploys on high-severity production vulnerabilities.

Confidence Score: 5/5

Safe to merge — all new API surface is additive, the bearer header is correctly formed, and existing behaviour is unchanged.

All changes are additive (new methods, new enum values, new optional model fields). The one behavioural change — the AppwriteException message fallback — is a strict improvement with no regression path. No logic is removed or altered in ways that could break existing callers.

No files require special attention.

Important Files Changed

Filename Overview
src/client.ts Adds setBearer() method with correct Bearer scheme prefix, and fixes AppwriteException to fall back to responseText when data.message is nullish.
src/query.ts Adds vectorDot, vectorCosine, vectorEuclidean helpers following the existing Query wrapping pattern ([vector] produces values:[[...]]) correctly.
src/models.ts Adds optional geolocation/network fields to Locale model and updates audit log userType docs with hidden value.
src/enums/o-auth-provider.ts Adds Appwrite = 'appwrite' enum value in alphabetical order, consistent with existing entries.
.github/workflows/publish.yml Adds npm audit --audit-level=high --omit=dev before build to gate deploys on high-severity production dependency vulnerabilities.
CHANGELOG.md 26.2.0 section added; two 26.1.0 Fixed entries were removed (noted in prior review thread).

Reviews (2): Last reviewed commit: "chore: update Web SDK to 26.2.0" | Re-trigger Greptile

Comment thread src/client.ts
Comment thread CHANGELOG.md
Comment thread src/client.ts
@ChiragAgg5k
ChiragAgg5k merged commit a5151b7 into main Jul 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants