Skip to content

feat: Console SDK update for version 6.0.0#71

Merged
ChiragAgg5k merged 3 commits intomainfrom
dev
Mar 20, 2026
Merged

feat: Console SDK update for version 6.0.0#71
ChiragAgg5k merged 3 commits intomainfrom
dev

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

@ChiragAgg5k ChiragAgg5k commented Mar 20, 2026

This PR contains updates to the Console SDK for version 6.0.0.

Changes

  • 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()

Summary by CodeRabbit

Release Notes - Version 6.0.0

  • Breaking Changes

    • Renamed domains.confirmPurchase() to domains.updatePurchase() and domains.confirmTransferIn() to domains.updateTransferIn()
    • Replaced Projects API with new Webhooks API; renamed updateWebhook() to update() and listWebhooks() to list()
    • Updated enum names: DomainPurchasePaymentStatusDomainPurchaseStatus, DomainTransferStatusStatusDomainTransferStatusEnum
    • Removed Deno 1.21, 1.24, 1.35 from supported build runtimes
  • New Features

    • Added dedicated Webhooks service for managing webhooks independently
    • Added queries parameter to webhooks.list() for filtering results
    • Added support for release candidate runtime versions across multiple platforms
  • Updates

    • SDK version bumped to 6.0.0; API version updated to 1.8.2

* 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()`
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 20, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 69116379-2923-4311-9799-8a86c54f049a

📥 Commits

Reviewing files that changed from the base of the PR and between 331fde7 and 90fe52a.

📒 Files selected for processing (3)
  • src/enums/domain-transfer-status-enum.ts
  • src/index.ts
  • src/models.ts

Walkthrough

This pull request updates the SDK to version 6.0.0 with breaking API changes. It renames domain-related methods (confirmPurchaseupdatePurchase, confirmTransferInupdateTransferIn), replaces the Projects webhook API with a new Webhooks service (renaming operations like listWebhooks()list() and updateWebhook()update()), replaces enums (DomainPurchasePaymentStatusDomainPurchaseStatus, DomainTransferStatusStatusDomainTransferStatusEnum), and adds runtime release-candidate variants while removing obsolete Deno versions. Return types for domain purchase operations change from Models.Domain to Models.DomainPurchase. Documentation examples are updated to reflect the new APIs.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: Console SDK update for version 6.0.0' clearly and concisely describes the main objective of this changeset: updating the SDK to version 6.0.0 with its associated breaking changes and new features.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 20, 2026

Greptile Summary

This 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 Webhooks service replaces webhook methods previously scattered across Projects, domain payment flows are simplified (9-value DomainPurchasePaymentStatus → 4-value DomainPurchaseStatus), and a large batch of -rc runtime variants is added across the three runtime enums.

  • New Webhooks service (list, create, get, update, delete, updateSignature) with correct /webhooks API paths; all corresponding webhook methods removed from Projects.
  • domains.confirmPurchase / domains.confirmTransferIn renamed to updatePurchase / updateTransferIn and migrated from POST /…/confirm to PATCH on the base resource path, with return types updated to Models.DomainPurchase.
  • DomainPurchasePaymentStatus deleted; replaced by simplified DomainPurchaseStatus. DomainTransferStatusStatus renamed to DomainTransferStatus.
  • New DomainPurchase model added; Domain model updated (removed paymentStatus, clientSecret, attempts; added typed transferStatus).
  • WebhooksRead / WebhooksWrite scopes added.
  • RC runtime variants added to BuildRuntime, Runtime, and Runtimes enums.
  • Minor: src/services/webhooks.ts contains unused imports (Service, UploadProgress) that will produce lint/TypeScript warnings. The X-Appwrite-Response-Format header in src/client.ts was not updated alongside the API version badge bump to 1.8.2 — worth confirming this is intentional.

Confidence Score: 4/5

  • This PR is safe to merge with minor cleanup recommended before release.
  • All breaking changes are accurately documented in CHANGELOG, API path/method changes in the Domains service are correct (POST→PATCH, path simplification), and the new Webhooks service is well-structured. Two minor issues lower the score slightly: unused imports in webhooks.ts will produce lint warnings, and the X-Appwrite-Response-Format header was not updated alongside the API version bump, which should be verified before shipping.
  • src/services/webhooks.ts (unused imports) and src/client.ts (X-Appwrite-Response-Format version mismatch with README badge).

Important Files Changed

Filename Overview
src/services/webhooks.ts New Webhooks service replacing webhook methods from Projects. Well-structured with correct API paths and HTTP methods. Has unused imports (Service, UploadProgress) that should be cleaned up.
src/services/domains.ts Renamed confirmPurchaseupdatePurchase and confirmTransferInupdateTransferIn. API paths correctly changed from /confirm POST endpoints to base PATCH endpoints. Return types correctly updated to Models.DomainPurchase.
src/services/projects.ts Cleanly removed all webhook-related methods (listWebhooks, createWebhook, getWebhook, updateWebhook, deleteWebhook, updateWebhookSignature) which are now handled by the new Webhooks service.
src/client.ts SDK version bumped to 6.0.0. X-Appwrite-Response-Format header remains at 1.8.0 while the API badge targets 1.8.2 — worth verifying this is intentional.
src/models.ts Removed paymentStatus and clientSecret from the Domain model, added transferStatus: DomainTransferStatus. Added a new DomainPurchase model with full purchase lifecycle fields. Updated DomainTransferStatus enum reference throughout.
src/index.ts Exports updated correctly: Webhooks service added, DomainPurchasePaymentStatus/DomainTransferStatusStatus replaced by DomainPurchaseStatus/DomainTransferStatus.
src/enums/domain-purchase-status.ts New enum replacing DomainPurchasePaymentStatus. Simplified from 9 payment-specific statuses to 4 high-level statuses (pending, succeeded, failed, cancelled).
src/enums/build-runtime.ts Removed Deno121, Deno124, Deno135 as documented. Added *-rc (release candidate) variants for every existing runtime — a large but mechanical addition.
src/enums/scopes.ts Added WebhooksRead and WebhooksWrite scopes to support the new standalone Webhooks API.

Comments Outside Diff (1)

  1. src/client.ts, line 268 (link)

    P2 X-Appwrite-Response-Format not updated

    The x-sdk-version was bumped from 5.0.0 to 6.0.0 and the README badge now targets API version 1.8.2, but X-Appwrite-Response-Format still sends 1.8.0. This header tells the Appwrite server which response schema to use. If the response format changed in 1.8.1 or 1.8.2 (e.g., the new DomainPurchase model shape, the added usageRealtimeMessages/usageRealtimeBandwidth fields), the server may serve responses in the old format, causing the new model fields to be silently omitted.

    Please verify whether the response contract changed between 1.8.0 and 1.8.2, and update accordingly if needed:

Last reviewed commit: "feat: update Console..."

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7e26de1 and 331fde7.

📒 Files selected for processing (24)
  • CHANGELOG.md
  • README.md
  • docs/examples/domains/update-purchase.md
  • docs/examples/domains/update-transfer-in.md
  • docs/examples/webhooks/create.md
  • docs/examples/webhooks/delete.md
  • docs/examples/webhooks/get.md
  • docs/examples/webhooks/list.md
  • docs/examples/webhooks/update-signature.md
  • docs/examples/webhooks/update.md
  • package.json
  • src/client.ts
  • src/enums/build-runtime.ts
  • src/enums/domain-purchase-payment-status.ts
  • src/enums/domain-purchase-status.ts
  • src/enums/domain-transfer-status.ts
  • src/enums/runtime.ts
  • src/enums/runtimes.ts
  • src/enums/scopes.ts
  • src/index.ts
  • src/models.ts
  • src/services/domains.ts
  • src/services/projects.ts
  • src/services/webhooks.ts
💤 Files with no reviewable changes (2)
  • src/enums/domain-purchase-payment-status.ts
  • src/services/projects.ts

@ChiragAgg5k ChiragAgg5k merged commit 2f041f8 into main Mar 20, 2026
1 check was pending
@ChiragAgg5k ChiragAgg5k deleted the dev branch March 20, 2026 02:44
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