Skip to content

feat: SDK update for version 15.3.0 - #104

Merged
ChiragAgg5k merged 1 commit into
mainfrom
dev
Jul 10, 2026
Merged

feat: SDK update for version 15.3.0#104
ChiragAgg5k merged 1 commit into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jul 10, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 15.3.0, generated with sdk-generator 2.4.5.

Supersedes the 15.3.0-rc.1 preview published from preview-1.9.x-rc under the next npm tag. Once released, the CLI SDK's @appwrite.io/console pin should move from 15.3.0-rc.1 to 15.3.0.

What's Changed

  • Updated: Split the Compute service into engine-specific Mysql, Postgresql, and Mongo services
  • Updated: tablesDB.create() now takes specification instead of dedicatedDatabaseId
  • Updated: Removed health.getQueueLogs()
  • Added: Notifications service for console notifications
  • Added: organization.get(), update(), and delete() methods
  • Added: Organization membership methods listMemberships, createMembership, getMembership, updateMembership, and deleteMembership
  • Added: TablesDB dedicated migration methods listMigrations, createMigration, getMigration, and deleteMigration
  • Added: oauth2.createPAR(), listOrganizations(), and listProjects() methods
  • Added: requestUri parameter on oauth2.authorize(); client ID, redirect URI, and response type are now optional
  • Added: Project addon methods listAddons, getAddon, deleteAddon, confirmAddonPayment, and getAddonPrice
  • Added: createPremiumGeoDBAddon() on Projects and Organizations
  • Added: account.listLogs(), teams.listLogs(), and users.listLogs() methods
  • Added: health.getGeo() and health.getGeoPremium() methods
  • Added: newSpecification parameter on backups.createRestoration()
  • Added: prompt and maxAge parameters on project.updateOAuth2Oidc()
  • Added: BlockMode, DatabaseStatus, OAuth2OidcPrompt, and ProjectOAuth2OidcPrompt enums

@ChiragAgg5k ChiragAgg5k changed the title feat: Console SDK update for version 15.3.0 feat: SDK update for version 15.3.0 Jul 10, 2026
@ChiragAgg5k
ChiragAgg5k merged commit 16fd709 into main Jul 10, 2026
2 checks passed
@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the Console SDK to version 15.3.0, adding new services (Mongo, Mysql, Postgresql, Notifications), OAuth2 PAR support, vector similarity query helpers, and extensive model updates to align with the 15.3.0 API surface.

  • setBearer is missing the Bearer scheme prefix — the method writes Authorization: <raw_value> instead of Authorization: Bearer <token> (RFC 6750), which will cause authentication failures for all OAuth2 endpoints that rely on it, including the new listOrganizations and listProjects calls.
  • StageList omits the total field present in every other list type in the SDK, making pagination impossible if the API returns a count.
  • Oauth2.authorize silently dropped its four required-parameter guards (clientId, redirectUri, responseType, scope) — previously threw helpful client-side errors; now defers all validation to the server.

Confidence Score: 3/5

The setBearer method writes a malformed Authorization header without the required Bearer prefix, which will silently break OAuth2 authentication for callers using the new method.

The setBearer implementation stores the raw token value directly as Authorization: <token> rather than Authorization: Bearer <token>. Any consumer calling client.setBearer(accessToken) and then using the new listOrganizations, listProjects, or other bearer-authenticated endpoints will receive authentication rejections from the server. Other Appwrite SDK implementations (Swift, Dart) consistently prepend "Bearer " inside the setter. The rest of the changes — new services, model updates, enum additions, and the improved publish pipeline — look correct.

src/client.ts (setBearer prefix bug) and src/services/oauth-2.ts (authorize validation removal and new endpoints that depend on the Authorization header).

Important Files Changed

Filename Overview
src/client.ts Adds setBearer method and bearer config field for OAuth2 authentication, bumps SDK version to 15.3.0, and improves error message fallback — but setBearer sets the raw token value as Authorization: <value> without the required Bearer scheme prefix, breaking OAuth2 authentication.
src/models.ts Large model update: adds Notification, Stage, CloudLocale, Oauth2PAR, PostgresExtension, DatabaseMigration, BillingPlanDedicatedDatabaseLimits, and several OAuth2 types; renames/removes various fields (highAvailabilitySyncMode→syncMode, backupPitr→pitr, etc.); new StageList is missing the total field present in all other list types.
src/services/oauth-2.ts Adds new listOrganizations, listProjects, and createPAR endpoints, adds scope param to approve, and changes authorize from required to fully optional params while silently removing all client-side validation guards.
src/index.ts Removes Compute service export and adds Mongo, Mysql, Postgresql, Notifications exports along with new enums (BlockMode, ProjectOAuth2OidcPrompt, DatabaseStatus, OAuth2OidcPrompt).
src/services/health.ts Adds two new health endpoints: getGeo for the geo service and getGeoPremium for the premium geo service; renames queue health method docs.
src/services/notifications.ts New service with list and update endpoints for managing console user notifications; straightforward implementation.
src/services/project.ts Adds prompt and maxAge parameters to updateOAuth2Oidc, bumps key scope limit from 100 to 200 in docs, and adds new stage management endpoints.
src/services/databases.ts Removes deprecated listDocumentLogs, listCollectionLogs, and listLogs methods (redirected to TablesDB in 1.8.0); no new logic introduced.
src/services/backups.ts Adds optional newSpecification parameter to createRestoration to support restoring DocumentsDB/VectorsDB to a different compute specification.
src/query.ts Adds three new vector similarity query helpers: vectorDot, vectorCosine, and vectorEuclidean; consistent with existing query patterns.
.github/workflows/publish.yml Adds npm audit --audit-level=high --omit=dev step to the publish pipeline to gate releases on known high-severity vulnerabilities.
package.json Bumps version to 15.3.0, upgrades @rollup/plugin-commonjs to 29.0.3, rollup to 4.62.2, and typescript to 5.9.3.

Comments Outside Diff (1)

  1. src/services/oauth-2.ts, line 160-175 (link)

    P2 Client-side required-parameter validation silently removed from authorize

    Previously, authorize validated clientId, redirectUri, responseType, and scope and threw an AppwriteException if any were missing. All four have been made optional and the guard checks removed entirely. Callers that omit these will now send a request with empty parameters and receive a server-side error with less context than the former client-side message, making debugging harder. If these parameters are genuinely now all optional on the API side, a comment explaining the intent would help future readers.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: src/services/oauth-2.ts
    Line: 160-175
    
    Comment:
    **Client-side required-parameter validation silently removed from `authorize`**
    
    Previously, `authorize` validated `clientId`, `redirectUri`, `responseType`, and `scope` and threw an `AppwriteException` if any were missing. All four have been made optional and the guard checks removed entirely. Callers that omit these will now send a request with empty parameters and receive a server-side error with less context than the former client-side message, making debugging harder. If these parameters are genuinely now all optional on the API side, a comment explaining the intent would help future readers.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

    Fix in Claude Code Fix in Codex

Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 3
src/client.ts:559-563
**Missing `Bearer ` scheme prefix in Authorization header**

`setBearer` stores the raw token value as `Authorization: <value>`, but RFC 6750 (OAuth 2.0 Bearer Token Usage) requires the format `Authorization: Bearer <token>`. Every other Appwrite SDK implementation (Swift, Dart, etc.) prepends `"Bearer "` inside the setter. Callers who pass a plain access token will generate a malformed header that the server will reject, causing authentication failures for all OAuth2 endpoints that rely on this method — including the new `listOrganizations` and `listProjects` calls which omit `X-Appwrite-Project` and depend solely on this header.

```suggestion
    setBearer(value: string): this {
        this.headers['Authorization'] = 'Bearer ' + value;
        this.config.bearer = value;
        return this;
    }
```

### Issue 2 of 3
src/models.ts:688-693
**`StageList` missing `total` field**

`StageList` is the only list type in this SDK that omits a `total: number` field. Every other list model (`NotificationList`, `ScheduleList`, `LogList`, `Oauth2ProjectList`, etc.) includes it. If the API endpoint returns a total count, callers have no way to access it through this type, making pagination impossible to implement correctly.

### Issue 3 of 3
src/services/oauth-2.ts:160-175
**Client-side required-parameter validation silently removed from `authorize`**

Previously, `authorize` validated `clientId`, `redirectUri`, `responseType`, and `scope` and threw an `AppwriteException` if any were missing. All four have been made optional and the guard checks removed entirely. Callers that omit these will now send a request with empty parameters and receive a server-side error with less context than the former client-side message, making debugging harder. If these parameters are genuinely now all optional on the API side, a comment explaining the intent would help future readers.

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

Comment thread src/client.ts
Comment on lines +559 to +563
setBearer(value: string): this {
this.headers['Authorization'] = value;
this.config.bearer = value;
return this;
}

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 Missing Bearer scheme prefix in Authorization header

setBearer stores the raw token value as Authorization: <value>, but RFC 6750 (OAuth 2.0 Bearer Token Usage) requires the format Authorization: Bearer <token>. Every other Appwrite SDK implementation (Swift, Dart, etc.) prepends "Bearer " inside the setter. Callers who pass a plain access token will generate a malformed header that the server will reject, causing authentication failures for all OAuth2 endpoints that rely on this method — including the new listOrganizations and listProjects calls which omit X-Appwrite-Project and depend solely on this header.

Suggested change
setBearer(value: string): this {
this.headers['Authorization'] = value;
this.config.bearer = value;
return this;
}
setBearer(value: string): this {
this.headers['Authorization'] = 'Bearer ' + value;
this.config.bearer = value;
return this;
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/client.ts
Line: 559-563

Comment:
**Missing `Bearer ` scheme prefix in Authorization header**

`setBearer` stores the raw token value as `Authorization: <value>`, but RFC 6750 (OAuth 2.0 Bearer Token Usage) requires the format `Authorization: Bearer <token>`. Every other Appwrite SDK implementation (Swift, Dart, etc.) prepends `"Bearer "` inside the setter. Callers who pass a plain access token will generate a malformed header that the server will reject, causing authentication failures for all OAuth2 endpoints that rely on this method — including the new `listOrganizations` and `listProjects` calls which omit `X-Appwrite-Project` and depend solely on this header.

```suggestion
    setBearer(value: string): this {
        this.headers['Authorization'] = 'Bearer ' + value;
        this.config.bearer = value;
        return this;
    }
```

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code Fix in Codex

Comment thread src/models.ts
Comment on lines +688 to +693
export type StageList = {
/**
* List of stages.
*/
stages: Stage[];
}

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 StageList missing total field

StageList is the only list type in this SDK that omits a total: number field. Every other list model (NotificationList, ScheduleList, LogList, Oauth2ProjectList, etc.) includes it. If the API endpoint returns a total count, callers have no way to access it through this type, making pagination impossible to implement correctly.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/models.ts
Line: 688-693

Comment:
**`StageList` missing `total` field**

`StageList` is the only list type in this SDK that omits a `total: number` field. Every other list model (`NotificationList`, `ScheduleList`, `LogList`, `Oauth2ProjectList`, etc.) includes it. If the API endpoint returns a total count, callers have no way to access it through this type, making pagination impossible to implement correctly.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code Fix in Codex

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.

1 participant