Skip to content

feat: Web SDK update for version 26.0.0#175

Merged
ChiragAgg5k merged 13 commits into
mainfrom
dev
Jun 8, 2026
Merged

feat: Web SDK update for version 26.0.0#175
ChiragAgg5k merged 13 commits into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jun 8, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the Web SDK for version 26.0.0.

@ChiragAgg5k ChiragAgg5k changed the title feat: Web SDK update for version 26.0.0 feat: SDK update for version 26.0.0 Jun 8, 2026
@ChiragAgg5k ChiragAgg5k changed the title feat: SDK update for version 26.0.0 feat: Web SDK update for version 26.0.0 Jun 8, 2026
# Conflicts:
#	package-lock.json
#	package.json
#	src/client.ts
@ChiragAgg5k ChiragAgg5k changed the title feat: Web SDK update for version 26.0.0 feat: SDK update for version 26.0.0 Jun 8, 2026
@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR bumps the Web SDK to version 26.0.0, introducing several breaking changes and new fields across models and services. All service methods are updated to pass X-Appwrite-Project and explicit accept headers per-call (rather than relying on the now-removed global header set by setProject()), setKey() and setForwardedUserAgent() are removed, and x-sdk-platform is corrected to 'client'.

  • Breaking enum rename: ThemeBrowserTheme; presences list/get/upsert/update methods lose their generic type parameter and Models.DefaultPresence is removed.
  • New model fields: User gains five optional email-metadata fields; Presence gains optional metadata; Membership gains userAccessedAt (typed as required — see inline comment).
  • Client hardening: toString() on response objects now uses Object.defineProperty with enumerable: false to prevent the helper from leaking into JSON serialisation.

Confidence Score: 4/5

Safe to merge with one model type fix recommended before release.

The bulk of the change is a mechanical, generated update that correctly threads X-Appwrite-Project through every service call. The one substantive concern is Membership.userAccessedAt being typed as a required string when its JSDoc explicitly says "Show this attribute by toggling membership privacy in the Console" — meaning the field is absent from API responses by default.

src/models.ts — the Membership.userAccessedAt field type

Important Files Changed

Filename Overview
src/models.ts Adds email metadata fields (correctly optional) and Membership.userAccessedAt (incorrectly required — opt-in visibility means absent by default)
src/client.ts Removes setKey/setForwardedUserAgent, moves X-Appwrite-Project from global headers to per-call, fixes toString() enumeration via Object.defineProperty, changes platform to 'client'
src/services/account.ts All methods updated to include X-Appwrite-Project and accept headers per-call; OAuth endpoints correctly use text/html accept
src/services/functions.ts Adds X-Appwrite-Project and accept: application/json headers to all three execution endpoints
src/services/presences.ts Removes DefaultPresence generic; all four methods now return concrete Models.Presence types; adds metadata field support
src/enums/browser-theme.ts Renamed from theme.ts to browser-theme.ts, enum renamed from Theme to BrowserTheme
CHANGELOG.md 26.0.0 entry incorrectly states setKey() and setForwardedUserAgent() were removed (they remain in client.ts)

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

Comment thread src/services/functions.ts Outdated
Comment thread src/services/avatars.ts
Comment on lines 86 to 89
const apiHeaders: { [header: string]: string } = {
'X-Appwrite-Project': this.client.config.project,
'accept': 'image/png',
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unused apiHeaders block in URL-building methods

All eight avatar methods return uri.toString() directly without calling this.client.call(). The apiHeaders object (including the newly added X-Appwrite-Project and accept values) is declared but never passed anywhere and has no effect. The same pattern is also present in the three URL-building methods in storage.ts (download, preview, view). The project identity is correctly carried via payload['project'] appended as a query parameter; the dead apiHeaders block just adds noise and could mislead maintainers.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines 3 to 4
Dark = 'dark',
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing trailing newline at end of file — most editors and linters expect it.

Suggested change
Dark = 'dark',
}
Dark = 'dark',
}

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread CHANGELOG.md Outdated
@ChiragAgg5k ChiragAgg5k changed the title feat: SDK update for version 26.0.0 feat: Web SDK update for version 26.0.0 Jun 8, 2026
Comment thread src/services/functions.ts Outdated
Comment on lines 174 to 180
return this.client.chunkedUpload(
'post',
uri,
apiHeaders,
payload
payload,
onProgress
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 createExecution always throws "File not found in payload"

chunkedUpload (line 910 in client.ts) immediately throws Error: 'File not found in payload' when no File instance is found in the payload. The createExecution payload only ever contains strings, booleans, and plain objects — never a File — so every call to createExecution will throw this error unconditionally, making the function completely non-functional in this release.

@ChiragAgg5k ChiragAgg5k merged commit 2b2c6a3 into main Jun 8, 2026
2 checks 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