feat: Console SDK update for version 6.0.0#71
Conversation
* Added new runtime RC values to `BuildRuntime`, `Runtime`, and `Runtimes` enums * Updated CDN script to load `@appwrite.io/console` version 4.0.0
* Breaking: Renamed `domains.confirmPurchase()` to `domains.updatePurchase()` * Breaking: Renamed `domains.confirmTransferIn()` to `domains.updateTransferIn()` * Breaking: Replaced `Projects` API with `Webhooks` for webhook usage * Breaking: Renamed `updateWebhook()` to `update()` on `Webhooks` * Breaking: Renamed `listWebhooks()` to `list()` on `Webhooks` * Breaking: Replaced `DomainPurchasePaymentStatus` with `DomainPurchaseStatus` * Breaking: Renamed `DomainTransferStatusStatus` to `DomainTransferStatus` * Breaking: Removed `Deno121`, `Deno124`, `Deno135` from `BuildRuntime`/`Runtime` enums * Updated README badge to API version `1.8.2` * Added `queries` option to `webhooks.list()`
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis pull request updates the SDK to version 6.0.0 with breaking API changes. It renames domain-related methods ( Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
Greptile SummaryThis PR delivers the Console SDK 6.0.0 update, a breaking-change release that refactors domain-purchase and webhook APIs to match Appwrite API version 1.8.2. The changes are well-scoped: the new standalone
Confidence Score: 4/5
Important Files Changed
|
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
README.md (1)
4-4: Add a migration note/link for 6.0.0 breaking changes.Since this is a major release with API renames/removals, please add a short “Migrating to 6.0.0” pointer in README near the version/install section to reduce upgrade friction.
Also applies to: 36-36
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` at line 4, Add a short "Migrating to 6.0.0" pointer in the README near the version/install area (around the version badge line with the "api version-1.8.2" image) that briefly calls out breaking changes and links to a dedicated migration guide or changelog entry for 6.0.0; include a one-sentence summary of the most important rename/removal and a link to documentation or a "MIGRATING.md" file so users upgrading to 6.0.0 can quickly find detailed steps.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Around line 3-14: Update the 6.0.0 changelog lines to accurately describe the
migration surface: change the "Replaced `Projects` API with `Webhooks` for
webhook usage" entry to say that the webhook surface moved from `Projects` to
the new `Webhooks` API (without implying `Projects` was removed), add a line
noting that purchase-specific fields were moved from `Models.Domain` into the
new `Models.DomainPurchase` model, and clarify the rename of
`domains.confirmPurchase()`→`domains.updatePurchase()` and
`domains.confirmTransferIn()`→`domains.updateTransferIn()` as domain API
renames; reference the affected symbols (`Projects`, `Webhooks`,
`webhooks.list()`, `updateWebhook()`/`update()`, `Models.Domain`,
`Models.DomainPurchase`, `domains.confirmPurchase`, `domains.updatePurchase`,
`domains.confirmTransferIn`, `domains.updateTransferIn`) in the updated wording.
In `@docs/examples/webhooks/create.md`:
- Around line 10-16: The example call to webhooks.create uses an empty URL
('url: ''') which is misleading; update the example in
docs/examples/webhooks/create.md so the url field contains a realistic non-empty
placeholder (e.g., 'https://example.com/webhook') in the webhooks.create payload
(refer to the webhookId and url fields) so users can copy/paste a valid example.
In `@docs/examples/webhooks/update.md`:
- Around line 10-17: Replace the empty string in the example call to
webhooks.update so the request uses a valid URL placeholder (e.g.,
"https://example.com/webhook") instead of url: '' — update the url field within
the webhooks.update call (alongside webhookId, name, events) to a concrete
placeholder value so the example runs without failing.
In `@src/models.ts`:
- Around line 15-16: The imported enum DomainTransferStatus is being shadowed by
the Models.DomainTransferStatus type, causing recursive type resolution; fix
this by aliasing the enum import (e.g., import DomainTransferStatus as
DomainTransferStatusEnum) so the enum and model type are distinct, then update
the model property types that currently reference DomainTransferStatus (notably
the model fields named status and transferStatus) to use
DomainTransferStatusEnum instead; ensure the import line that brings in
DomainPurchaseStatus is left unchanged or similarly aliased if needed.
In `@src/services/webhooks.ts`:
- Around line 32-45: The positional overload loses the `total` value when
callers call list(undefined, false); update the start of the list function
(symbols: list, paramsOrFirst, rest, params) to detect when paramsOrFirst is
undefined and rest[0] is provided (a boolean) and set params = { queries:
undefined, total: rest[0] } in that case; otherwise keep the existing
object-style branch and the array-style branch that sets queries from
paramsOrFirst and total from rest[0]. Ensure you only treat rest[0] as boolean
when it exists.
---
Nitpick comments:
In `@README.md`:
- Line 4: Add a short "Migrating to 6.0.0" pointer in the README near the
version/install area (around the version badge line with the "api version-1.8.2"
image) that briefly calls out breaking changes and links to a dedicated
migration guide or changelog entry for 6.0.0; include a one-sentence summary of
the most important rename/removal and a link to documentation or a
"MIGRATING.md" file so users upgrading to 6.0.0 can quickly find detailed steps.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e0bb8136-e507-445f-9a0c-81681dc8d369
📒 Files selected for processing (24)
CHANGELOG.mdREADME.mddocs/examples/domains/update-purchase.mddocs/examples/domains/update-transfer-in.mddocs/examples/webhooks/create.mddocs/examples/webhooks/delete.mddocs/examples/webhooks/get.mddocs/examples/webhooks/list.mddocs/examples/webhooks/update-signature.mddocs/examples/webhooks/update.mdpackage.jsonsrc/client.tssrc/enums/build-runtime.tssrc/enums/domain-purchase-payment-status.tssrc/enums/domain-purchase-status.tssrc/enums/domain-transfer-status.tssrc/enums/runtime.tssrc/enums/runtimes.tssrc/enums/scopes.tssrc/index.tssrc/models.tssrc/services/domains.tssrc/services/projects.tssrc/services/webhooks.ts
💤 Files with no reviewable changes (2)
- src/enums/domain-purchase-payment-status.ts
- src/services/projects.ts
This PR contains updates to the Console SDK for version 6.0.0.
Changes
domains.confirmPurchase()todomains.updatePurchase()domains.confirmTransferIn()todomains.updateTransferIn()ProjectsAPI withWebhooksfor webhook usageupdateWebhook()toupdate()onWebhookslistWebhooks()tolist()onWebhooksDomainPurchasePaymentStatuswithDomainPurchaseStatusDomainTransferStatusStatustoDomainTransferStatusDeno121,Deno124,Deno135fromBuildRuntime/Runtimeenums1.8.2queriesoption towebhooks.list()Summary by CodeRabbit
Release Notes - Version 6.0.0
Breaking Changes
domains.confirmPurchase()todomains.updatePurchase()anddomains.confirmTransferIn()todomains.updateTransferIn()updateWebhook()toupdate()andlistWebhooks()tolist()DomainPurchasePaymentStatus→DomainPurchaseStatus,DomainTransferStatusStatus→DomainTransferStatusEnumNew Features
queriesparameter towebhooks.list()for filtering resultsUpdates