Skip to content

feat: SDK update for version 12.2.0#90

Merged
ArnabChatterjee20k merged 15 commits into
mainfrom
dev
May 8, 2026
Merged

feat: SDK update for version 12.2.0#90
ArnabChatterjee20k merged 15 commits into
mainfrom
dev

Conversation

@ArnabChatterjee20k

@ArnabChatterjee20k ArnabChatterjee20k commented May 7, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 12.2.0.

Whats Changed

  • Added: Introduced bigint create/update APIs for legacy Databases attributes
  • Added: Introduced bigint create/update APIs for TablesDB columns
  • Updated: Extended key-list query filters with key, resourceType, resourceId, and secret

@greptile-apps

greptile-apps Bot commented May 7, 2026

Copy link
Copy Markdown

Greptile Summary

SDK update for Appwrite Console version 12.2.0, bumping x-sdk-version to 12.2.0 and X-Appwrite-Response-Format to 1.9.4. The change adds bigint attribute/column support, an onDuplicate migration option, createEphemeralKey, renames MethodIdAuthMethod and PolicyIdProjectPolicy, renames tokenUrl/userInfoUrl to tokenURL/userInfoURL, and renames updateRuleVerificationupdateRuleStatus.

  • Type inconsistency in vcs.ts: The new queries parameter on listRepositoryBranches is typed as string rather than string[], conflicting with its own JSDoc ("Array of query strings") and the identical parameter on the adjacent listRepositories method. All three overload sites need to be updated.
  • Breaking renames: MethodId, PolicyId, tokenUrl, userInfoUrl, provider (on getOAuth2Provider), and updateRuleVerification are all removed/renamed — consumers of the previous version will need to update call sites.

Confidence Score: 4/5

Safe to merge once the queries type mismatch in listRepositoryBranches is corrected; all other changes are well-formed.

The queries parameter on listRepositoryBranches is typed as string instead of string[] across all three overload sites, so any caller passing query filters (limit, offset, cursor) will either hit a type error or send a malformed payload to the server. Everything else in the PR is correct.

src/services/vcs.ts — the queries type needs correcting at lines 313, 326, and 328–331.

Important Files Changed

Filename Overview
src/services/vcs.ts Added search and queries params to listRepositoryBranches; queries is incorrectly typed as string instead of string[].
src/services/project.ts Renamed enums (MethodId→AuthMethod, PolicyId→ProjectPolicy), fixed getOAuth2Provider path substitution, added createEphemeralKey, renamed tokenUrl/userInfoUrl to tokenURL/userInfoURL — all look correct.
src/services/proxy.ts Renamed updateRuleVerification→updateRuleStatus with updated API path; removed deprecated Created enum value from ProxyRuleStatus.
src/services/databases.ts Added createBigIntAttribute and updateBigIntAttribute methods with proper parameter handling.
src/services/tables-db.ts Added createBigIntColumn and updateBigIntColumn methods mirroring the databases.ts bigint attribute additions.
src/services/functions.ts createVariable now requires variableId; updateVariable makes key optional; listVariables gains queries/total params — all consistent.
src/services/migrations.ts Added optional onDuplicate parameter (new OnDuplicate enum) to createAppwriteMigration, createCSVImport, and createJsonImport.
src/models.ts Added AttributeBigint and ColumnBigint model types; renamed tokenUrl/userInfoUrl fields to tokenURL/userInfoURL in OAuth2Oidc; updated ProxyRule status docs.
src/client.ts Version bumped to 12.2.0 and response format header updated to 1.9.4.

Reviews (12): Last reviewed commit: "chore: update Console SDK to 12.2.0" | Re-trigger Greptile

Comment thread src/services/project.ts Outdated
Comment thread src/services/databases.ts
Comment thread src/services/tables-db.ts
Comment thread src/services/tables-db.ts
required: false,
min: null, // optional
max: null, // optional
default: null, // optional

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Wrong property name for default value in example

The example uses default: null but the TypeScript method signature expects the property to be named xdefault. Callers who copy this snippet verbatim will get a TypeScript type error (since default is not in the params interface) and the default value will be silently dropped from the request. The same mismatch exists in docs/examples/databases/update-big-int-attribute.md, docs/examples/tablesdb/create-big-int-column.md, and docs/examples/tablesdb/update-big-int-column.md.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is also present in the main repo as well https://github.com/appwrite/sdk-for-console/blob/main/docs/examples/tablesdb/create-integer-column.md
default and not xdefault

@ArnabChatterjee20k ArnabChatterjee20k changed the title feat: Console SDK update for version 12.2.0 feat: Console SDK update for version 12.3.0 May 8, 2026
Comment thread src/client.ts
Comment thread src/enums/query-suggestion-resource.ts
@ArnabChatterjee20k ArnabChatterjee20k changed the title feat: Console SDK update for version 12.3.0 feat: Console SDK update for version 12.2.0 May 8, 2026
Comment thread src/enums/query-suggestion-resource.ts Outdated
Comment thread src/services/presences.ts Outdated
Comment thread src/services/presences.ts Outdated
Comment thread src/services/presences.ts Outdated
Comment thread src/services/presences.ts Outdated
Comment thread docs/examples/console/list-o-auth-2-providers.md
@ArnabChatterjee20k ArnabChatterjee20k changed the title feat: Console SDK update for version 12.2.0 feat: SDK update for version 12.2.0 May 8, 2026
Comment thread src/services/vcs.ts
* @returns {Promise<Models.BranchList>}
*/
listRepositoryBranches(params: { installationId: string, providerRepositoryId: string }): Promise<Models.BranchList>;
listRepositoryBranches(params: { installationId: string, providerRepositoryId: string, search?: string, queries?: string }): Promise<Models.BranchList>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 The queries parameter in listRepositoryBranches is typed as string (singular) but the JSDoc describes it as "Array of query strings" and every other queries parameter in this SDK (including the adjacent listRepositories in the same file) is typed as string[]. Passing a plain string will serialize incorrectly — the server expects an array, so query filters like Query.limit() will be silently ignored or cause a server-side error.

Suggested change
listRepositoryBranches(params: { installationId: string, providerRepositoryId: string, search?: string, queries?: string }): Promise<Models.BranchList>;
listRepositoryBranches(params: { installationId: string, providerRepositoryId: string, search?: string, queries?: string[] }): Promise<Models.BranchList>;

@ArnabChatterjee20k ArnabChatterjee20k merged commit a0b9edb into main May 8, 2026
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