Skip to content

feat: Console SDK update for version 4.0.0#67

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

feat: Console SDK update for version 4.0.0#67
ChiragAgg5k merged 2 commits intomainfrom
dev

Conversation

@premtsd-code
Copy link
Copy Markdown
Contributor

@premtsd-code premtsd-code commented Mar 2, 2026

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

Changes

  • Breaking: Channel.collection() and Channel.table() now require explicit IDs
  • Added migration resource enums: AppwriteMigrationResource, FirebaseMigrationResource, NHostMigrationResource, SupabaseMigrationResource
  • Added DomainTransferStatusStatus enum
  • Added ttl option to listDocuments and listRows
  • Added new docs/examples across domains, health, migrations, projects, sites
  • Updated docs and examples to reflect new resources and transfers

Summary by CodeRabbit

Release Notes

  • New Features

    • Domain transfer operations for managing domain transfers with in/out and status tracking.
    • Console pausing health status endpoint with threshold and inactivity configuration.
    • Project console access and status update endpoints.
    • Migration resource type refinements for Appwrite, Firebase, NHost, and Supabase migrations.
  • Improvements

    • TTL caching support added to document and row listing operations.
    • Site deployment activation now optional during creation.
    • Channel IDs now require explicit non-empty values.
    • Domain operations updated to use organization identifiers.
  • Documentation

    • New examples for domain transfers and project management features.
    • Updated SDK version to 4.0.0.

@premtsd-code premtsd-code changed the title feat: Console SDK update for version 3.1.0 feat: Console SDK update for version 3.2.0 Mar 2, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 2, 2026

Walkthrough

This release introduces version 4.0.0 with multiple breaking changes and new features. Key changes include: replacing the generic Resources enum with migration-specific enums (AppwriteMigrationResource, FirebaseMigrationResource, NHostMigrationResource, SupabaseMigrationResource) across the migrations API; requiring explicit Channel IDs instead of optional wildcards; adding domain transfer operations (createTransferIn, createTransferOut, getTransferStatus); introducing new project APIs (updateConsoleAccess, updateStatus with Status enum); adding TTL support to document and row listing operations; making site deployment activation parameter optional and reordering parameters; introducing new health and domain-related model types; and updating documentation examples to reflect API changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title states version 4.0.0 but the PR objectives reference version 3.2.0, creating a contradiction. However, examining the changeset confirms version 4.0.0 is correct (package.json, README.md, and src/client.ts all update to 4.0.0). The title accurately reflects the main change in the changeset.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

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.

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: 3

🧹 Nitpick comments (1)
src/enums/appwrite-migration-resource.ts (1)

17-20: Consider PascalCase for multi-word enum members.

The enum members Environmentvariable, Sitedeployment, and Sitevariable deviate from PascalCase convention used elsewhere (e.g., User, Database). If the string values are the API contract, the member names could still be EnvironmentVariable, SiteDeployment, SiteVariable for readability while keeping the string values unchanged.

♻️ Suggested naming improvement
-    Environmentvariable = 'environment-variable',
-    Site = 'site',
-    Sitedeployment = 'site-deployment',
-    Sitevariable = 'site-variable',
+    EnvironmentVariable = 'environment-variable',
+    Site = 'site',
+    SiteDeployment = 'site-deployment',
+    SiteVariable = 'site-variable',
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/enums/appwrite-migration-resource.ts` around lines 17 - 20, The enum
members Environmentvariable, Sitedeployment, and Sitevariable should be renamed
to PascalCase for readability; update the enum in appwrite-migration-resource.ts
to use EnvironmentVariable, SiteDeployment, and SiteVariable while keeping their
string values ('environment-variable', 'site', 'site-deployment',
'site-variable') unchanged and ensure any references to the old names
(Environmentvariable, Sitedeployment, Sitevariable) in code are updated to the
new identifiers (EnvironmentVariable, SiteDeployment, SiteVariable).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/index.ts`:
- Around line 74-77: Add a deprecated compatibility export named Resources to
avoid breaking existing imports: declare and export a Resources type alias that
unions the provider-specific enums (AppwriteMigrationResource |
FirebaseMigrationResource | NHostMigrationResource | SupabaseMigrationResource)
and mark it as deprecated in a comment; place this export alongside the existing
provider exports in src/index.ts so existing `import { Resources }` continues to
work while new code uses the provider-specific symbols.

In `@src/services/sites.ts`:
- Around line 918-932: The JSDoc for the createDeployment method documents the
parameter "activate" as required but the method signature marks it optional;
update the JSDoc `@param` entries for "activate" in the createDeployment docs to
indicate it is optional (e.g., add brackets or a question mark to the type/param
description) so the comments match the method signature in the createDeployment
declaration and overloaded doc block.
- Around line 936-957: The positional-args branch in createDeployment
misinterprets legacy calls where the third positional argument was boolean
activate (it ends up assigned to installCommand); update the else block in
createDeployment to detect if rest[1] is a boolean (legacy activate position)
and, when so, set params.activate = rest[1] and shift
installCommand/buildCommand/outputDirectory/onProgress to rest[2..], otherwise
keep the current mapping; reference the createDeployment function, the
paramsOrFirst/rest arrays and the
params.activate/installCommand/buildCommand/outputDirectory/onProgress
properties to locate and implement the fix.

---

Nitpick comments:
In `@src/enums/appwrite-migration-resource.ts`:
- Around line 17-20: The enum members Environmentvariable, Sitedeployment, and
Sitevariable should be renamed to PascalCase for readability; update the enum in
appwrite-migration-resource.ts to use EnvironmentVariable, SiteDeployment, and
SiteVariable while keeping their string values ('environment-variable', 'site',
'site-deployment', 'site-variable') unchanged and ensure any references to the
old names (Environmentvariable, Sitedeployment, Sitevariable) in code are
updated to the new identifiers (EnvironmentVariable, SiteDeployment,
SiteVariable).

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 40d238d and 377af53.

📒 Files selected for processing (27)
  • docs/examples/databases/list-documents.md
  • docs/examples/migrations/create-appwrite-migration.md
  • docs/examples/migrations/create-firebase-migration.md
  • docs/examples/migrations/create-n-host-migration.md
  • docs/examples/migrations/create-supabase-migration.md
  • docs/examples/migrations/get-appwrite-report.md
  • docs/examples/migrations/get-firebase-report.md
  • docs/examples/migrations/get-n-host-report.md
  • docs/examples/migrations/get-supabase-report.md
  • docs/examples/sites/create-deployment.md
  • docs/examples/tablesdb/list-rows.md
  • src/channel.ts
  • src/enums/appwrite-migration-resource.ts
  • src/enums/build-runtime.ts
  • src/enums/firebase-migration-resource.ts
  • src/enums/n-host-migration-resource.ts
  • src/enums/runtime.ts
  • src/enums/runtimes.ts
  • src/enums/supabase-migration-resource.ts
  • src/index.ts
  • src/models.ts
  • src/services/databases.ts
  • src/services/messaging.ts
  • src/services/migrations.ts
  • src/services/sites.ts
  • src/services/tables-db.ts
  • src/services/teams.ts

@ChiragAgg5k ChiragAgg5k changed the title feat: Console SDK update for version 3.2.0 feat: Console SDK update for version 4.0.0 Mar 3, 2026
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: 4

🧹 Nitpick comments (1)
src/models.ts (1)

8683-8686: Use DomainTransferStatusStatus enum for Domain.transferStatus for type consistency.

DomainTransferStatusStatus is already defined and imported in this file (line 15), and is already used for DomainTransferStatus.status (line 8988). Typing Domain.transferStatus with the enum instead of string strengthens type safety and maintains consistency across the domain transfer models.

🔧 Proposed change
     /**
      * Domain transfer status (e.g., "pending", "completed", "failed").
      */
-    transferStatus: string;
+    transferStatus: DomainTransferStatusStatus;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/models.ts` around lines 8683 - 8686, The Domain model's transferStatus
property is currently typed as string; change its type to the existing enum
DomainTransferStatusStatus to ensure consistency with
DomainTransferStatus.status and stronger type safety—update the transferStatus
declaration in the Domain interface/class to use DomainTransferStatusStatus (the
enum is already imported), and run type checks to confirm no downstream types
need adjustment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/examples/domains/create-transfer-in.md`:
- Around line 10-15: The example call to domains.createTransferIn uses an empty
string for the domain parameter which is confusing; update the domain field in
the createTransferIn payload to a descriptive placeholder (for example
'<DOMAIN_NAME>' or 'example.com') so it matches other examples and clarifies
expected input for the domains.createTransferIn function.

In `@src/enums/status.ts`:
- Around line 1-3: The Status enum is incomplete and must include the missing
values used by the API; update the export enum Status (in src/enums/status.ts)
to add entries Archived = 'archived' and Paused = 'paused' alongside Active =
'active' so methods like updateStatus and any callers can use type-safe
Status.Archived and Status.Paused instead of raw string literals.

In `@src/services/domains.ts`:
- Around line 213-214: Update the JSDoc for the createPurchase function to
remove "Team ID" wording and replace with consistent "Organization ID" (or
"Organization that will own the domain") for the params.organizationId
description; locate the createPurchase JSDoc block (references: function
createPurchase, param organizationId) and change both occurrences that read
"Team ID" to the updated phrasing so the docs match the renamed API.
- Around line 447-452: Update the JSDoc summary for createTransferIn to
accurately reflect the actual parameters and behavior: remove the phrase about
"registrant information" and instead state that it creates a domain transfer-in
using domain, organizationId, authCode, and paymentMethodId (and that
paymentMethodId will be used to authorize/capture payment). Edit the comment
block above the createTransferIn function so the description matches the listed
params (domain, organizationId, authCode, paymentMethodId) and clarifies
responsibility for payment authorization.

---

Nitpick comments:
In `@src/models.ts`:
- Around line 8683-8686: The Domain model's transferStatus property is currently
typed as string; change its type to the existing enum DomainTransferStatusStatus
to ensure consistency with DomainTransferStatus.status and stronger type
safety—update the transferStatus declaration in the Domain interface/class to
use DomainTransferStatusStatus (the enum is already imported), and run type
checks to confirm no downstream types need adjustment.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 377af53 and 41481e8.

📒 Files selected for processing (18)
  • README.md
  • docs/examples/domains/create-purchase.md
  • docs/examples/domains/create-transfer-in.md
  • docs/examples/domains/create-transfer-out.md
  • docs/examples/domains/get-transfer-status.md
  • docs/examples/health/get-console-pausing.md
  • docs/examples/projects/update-console-access.md
  • docs/examples/projects/update-status.md
  • package.json
  • src/client.ts
  • src/enums/domain-transfer-status-status.ts
  • src/enums/status.ts
  • src/index.ts
  • src/models.ts
  • src/services/account.ts
  • src/services/domains.ts
  • src/services/health.ts
  • src/services/projects.ts
✅ Files skipped from review due to trivial changes (5)
  • docs/examples/domains/create-transfer-out.md
  • docs/examples/projects/update-console-access.md
  • src/client.ts
  • src/services/account.ts
  • docs/examples/health/get-console-pausing.md

@ChiragAgg5k ChiragAgg5k merged commit dbe5081 into main Mar 3, 2026
1 check passed
@ChiragAgg5k ChiragAgg5k deleted the dev branch March 3, 2026 04:12
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.

3 participants