Skip to content

feat: Console SDK update for version 8.0.0#73

Merged
abnegate merged 9 commits intomainfrom
dev
Mar 26, 2026
Merged

feat: Console SDK update for version 8.0.0#73
abnegate merged 9 commits intomainfrom
dev

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

@ChiragAgg5k ChiragAgg5k commented Mar 24, 2026

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

No user-facing SDK changes
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

Warning

Rate limit exceeded

@ChiragAgg5k has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 26 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 36fbc47a-d72e-4076-a624-018878543d1a

📥 Commits

Reviewing files that changed from the base of the PR and between c1222d4 and b43518e.

📒 Files selected for processing (32)
  • CHANGELOG.md
  • README.md
  • docs/examples/databases/create-index.md
  • docs/examples/domains/create-purchase.md
  • docs/examples/domains/create-transfer-in.md
  • docs/examples/domains/update-auto-renewal.md
  • docs/examples/project/create-variable.md
  • docs/examples/project/list-variables.md
  • docs/examples/project/update-variable.md
  • docs/examples/tablesdb/create-index.md
  • docs/examples/users/update-impersonator.md
  • package.json
  • rollup.config.js
  • src/client.ts
  • src/enums/appwrite-migration-resource.ts
  • src/enums/backup-services.ts
  • src/enums/build-runtime.ts
  • src/enums/database-type.ts
  • src/enums/databases-index-type.ts
  • src/enums/runtime.ts
  • src/enums/runtimes.ts
  • src/enums/scopes.ts
  • src/enums/tables-db-index-type.ts
  • src/enums/template-reference-type.ts
  • src/enums/use-cases.ts
  • src/index.ts
  • src/models.ts
  • src/services/databases.ts
  • src/services/domains.ts
  • src/services/project.ts
  • src/services/tables-db.ts
  • src/services/users.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 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.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 24, 2026

Greptile Summary

This PR delivers the Console SDK update for version 7.0.0, introducing two new database service families (DocumentsDB and VectorsDB) with full CRUD, transaction, and usage APIs, alongside impersonation support in the Client and Users services. Despite the PR description stating "No user-facing SDK changes," there are multiple user-facing breaking changes that consumers must be aware of:

  • IndexType removed (src/index.ts): The IndexType enum is no longer exported; users must migrate to DatabasesIndexType.
  • createVariable new required parameter (src/services/project.ts): A variableId field was prepended as a required argument to createVariable, breaking all existing callers.
  • updateVariable loosened signature: key changed from required to optional.
  • DocumentsDB.listUsage() return type (src/services/documents-db.ts): Returns Models.UsageDatabases rather than a DocumentsDB-specific aggregate type, unlike the consistent Models.UsageVectorsDBs used by VectorsDB.listUsage(). This should be verified against the server spec.
  • New impersonation headers added to Client (setImpersonateUserId, setImpersonateUserEmail, setImpersonateUserPhone), backed by a new Users.updateImpersonator endpoint.
  • rollup.config.js migrates from an ESM JSON import assertion to fs.readFileSync to improve build compatibility.

Confidence Score: 3/5

  • The PR introduces breaking changes that contradict the stated PR description; verify the DocumentsDB.listUsage() return type before merging.
  • Two confirmed user-facing breaking changes (IndexType removal, createVariable new required variableId) are undocumented in the PR description, and there is a potential type accuracy issue in DocumentsDB.listUsage(). The new service implementations and client additions themselves look structurally sound, but these issues lower confidence.
  • src/index.ts (breaking export removal), src/services/project.ts (breaking createVariable signature), src/services/documents-db.ts (listUsage return type accuracy)

Important Files Changed

Filename Overview
src/index.ts Removes IndexType export and replaces it with DatabasesIndexType, and adds new exports for DocumentsDB, VectorsDB, and several new enums. The removal of IndexType is a breaking change not reflected in the PR description.
src/services/project.ts createVariable now requires a new variableId parameter as the first positional argument — a breaking change for existing callers. updateVariable changes key from required to optional, and listVariables gains optional queries/total parameters.
src/services/documents-db.ts New DocumentsDB service with full CRUD for databases, collections, documents, indexes, and transactions. listUsage() returns Models.UsageDatabases rather than a dedicated UsageDocumentsDBs type, inconsistent with VectorsDB.listUsage() which uses Models.UsageVectorsDBs.
src/services/vectors-db.ts New VectorsDB service with CRUD for vector databases, collections, documents, indexes, transactions, and specialized methods for text embeddings and vector operations. Uses dedicated UsageVectorsDBs/UsageVectorsDB models consistently.
src/client.ts Adds three new impersonation header methods (setImpersonateUserId, setImpersonateUserEmail, setImpersonateUserPhone) and their corresponding config fields. Clean, well-documented additions.
src/models.ts Adds several new models: VectorsdbCollectionList, EmbeddingList, Embedding, UsageDocumentsDB, VectorsdbCollection, AttributeObject, AttributeVector, UsageVectorsDBs, UsageVectorsDB, and extends User with impersonator/impersonatorUserId fields, and UsageProject with DocumentsDB/VectorsDB metrics.
src/services/databases.ts Renames IndexType import to DatabasesIndexType throughout, affecting the createIndex method signatures and implementation.

Reviews (1): Last reviewed commit: "feat: update Console SDK to 7.0.0" | Re-trigger Greptile

@@ -58,8 +60,9 @@ export { ConsoleResourceType } from './enums/console-resource-type';
export { UsageRange } from './enums/usage-range';
export { RelationshipType } from './enums/relationship-type';
export { RelationMutate } from './enums/relation-mutate';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Breaking removal of IndexType export

IndexType (previously exported from ./enums/index-type) has been completely removed and replaced by DatabasesIndexType. Any consumer code that imports IndexType directly — e.g. import { IndexType } from '@appwrite.io/console' — will immediately break with a TypeScript/runtime import error after upgrading.

Since this is a major version bump (7.0.0) the breaking change itself is appropriate, but the PR description states "No user-facing SDK changes," which is incorrect for this (and several other changes in this PR). Consider updating the PR description to document the rename so consumers know how to migrate.

Comment on lines 163 to +169
* @throws {AppwriteException}
* @returns {Promise<Models.Variable>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
createVariable(key: string, value: string, secret?: boolean): Promise<Models.Variable>;
createVariable(variableId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;
createVariable(
paramsOrFirst: { key: string, value: string, secret?: boolean } | string,
...rest: [(string)?, (boolean)?]
paramsOrFirst: { variableId: string, key: string, value: string, secret?: boolean } | string,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Breaking signature change: new required variableId parameter

createVariable previously accepted (key, value, secret?). A new required variableId field has been prepended, making the new positional signature (variableId, key, value, secret?). All existing callers using either the legacy positional style or the object style without variableId will receive a runtime AppwriteException: Missing required parameter: "variableId" after upgrading.

This is a user-facing breaking change that should be called out in the PR/changelog, contradicting the "No user-facing SDK changes" description.

Comment on lines +427 to +437
listUsage(params?: { range?: UsageRange }): Promise<Models.UsageDatabases>;
/**
* List usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
*
* @param {UsageRange} range - Date range.
* @throws {AppwriteException}
* @returns {Promise<Models.UsageDatabases>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
listUsage(range?: UsageRange): Promise<Models.UsageDatabases>;
listUsage(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Inconsistent return type for listUsage

DocumentsDB.listUsage() is typed to return Promise<Models.UsageDatabases> (the general, legacy databases usage model), while the analogous VectorsDB.listUsage() returns the dedicated Promise<Models.UsageVectorsDBs>. A new UsageDocumentsDB model was added for the per-database getUsage() method, but no UsageDocumentsDBs aggregate type was created for this list-level endpoint.

If the /documentsdb/usage API response shape truly matches UsageDatabases exactly this is fine, but if the response includes DocumentsDB-specific fields they would be silently dropped. It is worth confirming against the server API spec whether a dedicated UsageDocumentsDBs model is needed here for parity with VectorsDB.

CHANGELOG.md Outdated
@@ -2,10 +2,26 @@

## 7.0.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Version wasn't bumped

@ChiragAgg5k ChiragAgg5k changed the title feat: Console SDK update for version 7.0.0 feat: Console SDK update for version 8.0.0 Mar 26, 2026
@abnegate abnegate merged commit c4178fc into main Mar 26, 2026
1 check passed
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