Skip to content

feat: SDK update for version 15.9.0 - #110

Closed
ChiragAgg5k wants to merge 5 commits into
mainfrom
dev
Closed

feat: SDK update for version 15.9.0#110
ChiragAgg5k wants to merge 5 commits into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jul 31, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 15.9.0.

What's Changed

  • Added: client.setOrganization() to send the X-Appwrite-Organization header

main received 15.7.0 as a squash merge (#108), so the same change exists
under a different commit on each branch. main's tree is identical to dev's
15.7.0 commit, so dev's generated 15.8.0 tree is kept as-is.
@ChiragAgg5k ChiragAgg5k changed the title feat: Console SDK update for version 15.9.0 feat: SDK update for version 15.9.0 Jul 31, 2026
@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Greptile Summary

Updates the console SDK to 15.9.0.

  • Adds organization-header configuration to Client.
  • Adds database replication, WAF, project-policy, runtime, and response-model updates.
  • Refreshes generated examples, release metadata, and Rollup.

Confidence Score: 4/5

The positional WAF compatibility break and nullable branch-port type mismatch should be fixed before merging.

Existing positional WAF calls are reinterpreted after the inserted key argument, and the branch model promises a number in a server state now documented to return null.

Files Needing Attention: src/services/waf.ts, src/models.ts

Important Files Changed

Filename Overview
src/client.ts Adds setOrganization using the established client-header propagation pattern.
src/services/waf.ts Adds challenge and rate-limit options, but shifts existing positional rate-limit arguments incompatibly.
src/models.ts Adds database and WAF response fields, while leaving the newly documented nullable branch port typed as number.
src/services/documents-db.ts Adds syncMode consistently to object and positional create/update calls and request payloads.
src/services/tables-db.ts Adds syncMode consistently to database create/update APIs.
src/services/vectors-db.ts Adds syncMode consistently to database create/update APIs.
src/services/project.ts Updates policy limits and makes the session-limit total parameter required.
package.json Updates the SDK release version and Rollup development dependency.

Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
### Issue 1
src/services/waf.ts:823
**Positional arguments are reinterpreted**

When existing consumers call `createRateLimitRule` or `updateRateLimitRule` using the positional form, inserting `key` before `priority` shifts the existing arguments, causing TypeScript compilation failures or malformed JavaScript requests where priority, enabled, and conditions are assigned to the wrong payload fields.

### Issue 2
src/models.ts:9715-9718
**Nullable port remains non-nullable**

When a branch is returned before its backing reports a port, the documented runtime value is `null` but the model declares an always-present `number`, allowing consumers to perform unchecked numeric operations that produce incorrect results or throw.

```suggestion
        /**
         * Branch port. Null until the backing reports one.
         */
        port?: number;
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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

Comment thread src/services/waf.ts
* @param {boolean} enabled - Set to false to create the rule in a disabled state.
* @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
* @throws {AppwriteException}
* @returns {Promise<Models.WafRuleRateLimit>}

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 Positional arguments are reinterpreted

When existing consumers call createRateLimitRule or updateRateLimitRule using the positional form, inserting key before priority shifts the existing arguments, causing TypeScript compilation failures or malformed JavaScript requests where priority, enabled, and conditions are assigned to the wrong payload fields.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/services/waf.ts
Line: 823

Comment:
**Positional arguments are reinterpreted**

When existing consumers call `createRateLimitRule` or `updateRateLimitRule` using the positional form, inserting `key` before `priority` shifts the existing arguments, causing TypeScript compilation failures or malformed JavaScript requests where priority, enabled, and conditions are assigned to the wrong payload fields.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

Comment thread src/models.ts
Comment on lines 9715 to 9718
/**
* Branch port.
* Branch port. Null until the backing reports one.
*/
port: number;

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 Nullable port remains non-nullable

When a branch is returned before its backing reports a port, the documented runtime value is null but the model declares an always-present number, allowing consumers to perform unchecked numeric operations that produce incorrect results or throw.

Suggested change
/**
* Branch port.
* Branch port. Null until the backing reports one.
*/
port: number;
/**
* Branch port. Null until the backing reports one.
*/
port?: number;
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/models.ts
Line: 9715-9718

Comment:
**Nullable port remains non-nullable**

When a branch is returned before its backing reports a port, the documented runtime value is `null` but the model declares an always-present `number`, allowing consumers to perform unchecked numeric operations that produce incorrect results or throw.

```suggestion
        /**
         * Branch port. Null until the backing reports one.
         */
        port?: number;
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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