- Notifications
You must be signed in to change notification settings - Fork 45
feat: Node.js SDK update for version 21.0.0 #131
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request updates many documentation examples to chain a new Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-09-05T09:48:56.219ZApplied to files:
🔇 Additional comments (2)
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: 0
♻️ Duplicate comments (1)
docs/examples/account/create-mfa-challenge.md (1)
5-6: SamesetSessionchaining pattern as other account examplesThis matches the updated client initialization pattern shown in the other account docs and keeps usage consistent.
🧹 Nitpick comments (1)
src/services/tables-db.ts (1)
744-828: Optional: consider stronger typing forcolumnsandindexesRight now both are typed as
object[], which is flexible but loses IDE help and compile-time checks for the documented shapes (keys, types, attributes, orders, etc.). If/when dedicated input models (or reusable request-side versions ofModels.Column*/Models.ColumnIndex) are available, tightening these to concrete types would improve DX without changing runtime behavior.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
docs/examples/account/create-anonymous-session.md(1 hunks)docs/examples/account/create-email-password-session.md(1 hunks)docs/examples/account/create-email-token.md(1 hunks)docs/examples/account/create-jwt.md(1 hunks)docs/examples/account/create-magic-url-token.md(1 hunks)docs/examples/account/create-mfa-challenge.md(1 hunks)docs/examples/account/create-o-auth-2-token.md(1 hunks)docs/examples/account/create-phone-token.md(1 hunks)docs/examples/account/create-session.md(1 hunks)docs/examples/account/create.md(1 hunks)docs/examples/account/update-magic-url-session.md(1 hunks)docs/examples/account/update-phone-session.md(1 hunks)docs/examples/databases/create-collection.md(1 hunks)docs/examples/tablesdb/create-table.md(1 hunks)src/services/databases.ts(4 hunks)src/services/tables-db.ts(4 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: abnegate Repo: appwrite/sdk-for-node PR: 121 File: docs/examples/databases/create-line-attribute.md:10-16 Timestamp: 2025-09-05T09:48:56.219Z Learning: Documentation examples in .md files in the Appwrite Node.js SDK are illustrative and don't need to be strictly correct or executable code. They focus on showing API structure and usage patterns rather than being copy-paste ready. 📚 Learning: 2025-09-05T09:48:56.219Z
Learnt from: abnegate Repo: appwrite/sdk-for-node PR: 121 File: docs/examples/databases/create-line-attribute.md:10-16 Timestamp: 2025-09-05T09:48:56.219Z Learning: Documentation examples in .md files in the Appwrite Node.js SDK are illustrative and don't need to be strictly correct or executable code. They focus on showing API structure and usage patterns rather than being copy-paste ready. Applied to files:
docs/examples/account/create-session.mddocs/examples/account/create.mddocs/examples/account/update-phone-session.mddocs/examples/account/create-jwt.mddocs/examples/account/create-anonymous-session.mddocs/examples/account/create-phone-token.mddocs/examples/account/create-o-auth-2-token.mddocs/examples/account/update-magic-url-session.mddocs/examples/account/create-mfa-challenge.mddocs/examples/account/create-magic-url-token.mddocs/examples/account/create-email-password-session.mddocs/examples/account/create-email-token.md
🧬 Code graph analysis (2)
src/services/databases.ts (1)
src/models.ts (1)
Collection(556-597)
src/services/tables-db.ts (1)
src/models.ts (1)
Table(1230-1271)
🔇 Additional comments (10)
docs/examples/account/update-phone-session.md (1)
5-6: Verify thatClient.setSession()method exists in the source code.The documentation adds
.setSession('')to the client initialization chain across multiple account examples. Please confirm that this method has been implemented in the Client class with proper chainable return type. Since the source code files (src/services/client.tsor equivalent) are not provided in this review, I cannot verify the implementation.docs/examples/databases/create-collection.md (1)
16-18: Verify thatcreateCollection()accepts the newattributesandindexesparameters.The documentation now shows optional
attributes: []andindexes: []parameters in the createCollection method. Please confirm that the implementation insrc/services/databases.tshas been updated to accept these parameters and properly includes them in the request payload.docs/examples/tablesdb/create-table.md (1)
16-18: Verify thatcreateTable()accepts the newcolumnsandindexesparameters.The documentation now shows optional
columns: []andindexes: []parameters in the createTable method. Please confirm that the implementation insrc/services/tables-db.tshas been updated to accept these parameters and properly includes them in the request payload.docs/examples/account/create.md (1)
5-6: Client chaining withsetSessionlooks consistentThe new
.setSession('')step fits the existing fluent client configuration and keeps the example readable; no issues from an SDK-usage perspective. Based on learnings, these examples are illustrative rather than copy‑paste ready.docs/examples/account/create-email-token.md (1)
5-6: Consistent client/session initializationThe added
.setSession('')call aligns this example with the other account docs’ client setup, so the pattern is uniform across flows.docs/examples/account/create-session.md (1)
5-6: Fluent client + session chain looks goodUsing
.setSession('')here matches the new authentication pattern in the other examples and keeps the fluent API style intact.docs/examples/account/update-magic-url-session.md (1)
5-6: Uniform client configuration across account docsThe added
setSessioncall keeps this magic‑URL example in sync with the other updated account examples’ client setup.docs/examples/account/create-jwt.md (1)
5-6: Good showcase of newClient.setSessionAPIThis example cleanly demonstrates the new
setSessionstep in the fluent client chain and matches the rest of the updated account examples.src/services/databases.ts (1)
741-835:createCollectionoverload and payload wiring look correctThe new optional
attributes/indexesparameters are threaded consistently through the overload signatures, positional rest tuple, localparamsobject, and conditional payload fields, so this extends the API surface without breaking existing callers.src/services/tables-db.ts (1)
735-841: createTable overload and payload wiring look correctThe new
columns/indexesparameters are threaded consistently through the JSDoc, both overload signatures, the internal params object, and the request payload. Required parameter checks remain unchanged, and existing positional-callers stay backward compatible because the new arguments are appended and optional. This aligns with theModels.Tableshape that already exposescolumnsandindexes(seesrc/models.ts:1229-1270).
This PR contains updates to the Node.js SDK for version 21.0.0.
Summary by CodeRabbit
New Features
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.