-
Notifications
You must be signed in to change notification settings - Fork 62
feat: Web SDK update for version 21.5.0 #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds Appwrite SDK version 21.5.0. Introduces Avatars.getScreenshot with an object-based signature (plus a deprecated variadic form) that builds a screenshot URL from many optional parameters and returns the URI string. Adds three exported enums: Theme, Timezone (comprehensive IANA list), and Output. Updates package version and devDependency playwright, updates client default x-sdk-version header, README CDN tag, and CHANGELOG. Adds a TypeScript docs example for getScreenshot. Also updates four account MFA endpoints to use /account/mfa/challenges. Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🪛 markdownlint-cli2 (0.18.1)docs/examples/avatars/get-screenshot.md10-10: Bare URL used (MD034, no-bare-urls) 🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/services/avatars.ts (1)
571-577: Minor documentation inconsistency: boolean params described as 0/1.The JSDoc describes
fullpageandtouchas "Pass 0 for ... or 1 for ..." but the TypeScript type isboolean. Consider aligning the documentation with the type (e.g., "Passtruefor full page capture, orfalsefor viewport only").
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
CHANGELOG.md(1 hunks)README.md(1 hunks)docs/examples/avatars/get-screenshot.md(1 hunks)package.json(2 hunks)src/client.ts(1 hunks)src/enums/output.ts(1 hunks)src/enums/theme.ts(1 hunks)src/enums/timezone.ts(1 hunks)src/index.ts(1 hunks)src/services/avatars.ts(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
src/enums/theme.ts (1)
src/index.ts (1)
Theme(32-32)
src/enums/output.ts (1)
src/index.ts (1)
Output(34-34)
src/enums/timezone.ts (1)
src/index.ts (1)
Timezone(33-33)
🔇 Additional comments (11)
src/client.ts (1)
323-323: LGTM! Version header updated correctly.The SDK version header has been properly updated to 21.5.0, aligning with the version bump across the repository.
package.json (2)
5-5: LGTM! Version bumped to 21.5.0.The package version has been properly updated to 21.5.0, consistent with the SDK version changes.
29-29: Playwright is not actively used in this codebase; no test suite exists to be affected by breaking changes.Investigation found that while Playwright 1.56.1 is listed as a devDependency in package.json, it is not invoked by any npm scripts (which only include
build,build:types, andbuild:libs), not used in any CI workflows, and the codebase contains no test files or test runner. The "Browser" reference found in the code is an enum in the avatars service, not Playwright. Since this is an SDK with no active test infrastructure using Playwright, the documented breaking changes (route glob patterns, Cookie headers, deprecated APIs, background page events) have no practical impact on this repository.Likely an incorrect or invalid review comment.
README.md (1)
36-36: LGTM! CDN URL updated to version 21.5.0.The CDN script URL has been properly updated to reference the new version, maintaining consistency with the release.
CHANGELOG.md (1)
3-6: LGTM! Changelog entry properly documents the new feature.The changelog entry for version 21.5.0 clearly documents the addition of the
getScreenshotmethod, following the established format and structure.src/enums/theme.ts (1)
1-4: LGTM! Clean enum implementation.The Theme enum is simple and well-defined with appropriate Light and Dark values for screenshot theming.
src/index.ts (1)
32-34: LGTM! New enums properly exported.The three new enums (Theme, Timezone, Output) have been correctly added to the public API exports, following the established pattern for enum exports.
src/enums/output.ts (1)
1-9: LGTM! Comprehensive image format enum.The Output enum provides a good range of image formats, covering both legacy formats (JPEG, PNG, GIF) and modern formats (WebP, AVIF, HEIC).
src/services/avatars.ts (2)
8-10: LGTM!New enum imports are correctly added and align with the new
getScreenshotmethod requirements.
620-752: LGTM!The implementation correctly follows the established SDK patterns:
- Proper parameter normalization between object and positional styles
- Required parameter validation for
url- Consistent payload construction and URL building
src/enums/timezone.ts (1)
1-421: Now let me check the Appwrite API documentation directly:
web_search
Appwrite getScreenshot timezone parameter API documentation official
This PR contains updates to the Web SDK for version 21.5.0.
Summary by CodeRabbit
Release Notes v21.5.0
New Features
getScreenshotmethod to Avatars service with support for multiple output formats, viewport configuration, theming, geolocation, and quality settingsBug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.