feat: Console SDK update for version 15.8.0 - #109
Conversation
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.
| /** | ||
| * Branch port. | ||
| * Branch port. Null until the backing reports one. | ||
| */ | ||
| port: number; |
There was a problem hiding this comment.
Branch port nullability is incorrect
When a branch is returned before its backing reports a port, the response contains null while the model declares port as an unconditional number, allowing consumers to perform numeric operations or construct invalid connection settings without handling the provisioning state.
| /** | |
| * Branch port. | |
| * Branch port. Null until the backing reports one. | |
| */ | |
| port: number; | |
| /** | |
| * Branch port. Null until the backing reports one. | |
| */ | |
| port: number | null; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/models.ts
Line: 9715-9718
Comment:
**Branch port nullability is incorrect**
When a branch is returned before its backing reports a port, the response contains `null` while the model declares `port` as an unconditional number, allowing consumers to perform numeric operations or construct invalid connection settings without handling the provisioning state.
```suggestion
/**
* Branch port. Null until the backing reports one.
*/
port: number | null;
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| * @param {number} params.total - Set the maximum number of users allowed in the project. Value can be between 0 and 10000. Use 0 or null to disable the limit. | ||
| * @throws {AppwriteException} | ||
| * @returns {Promise<Models.Project>} | ||
| */ | ||
| updateUserLimitPolicy(params: { total?: number }): Promise<Models.Project>; | ||
| /** | ||
| * Update the maximum number of users in the project. When the limit is hit or amount of existing users already exceeded the limit, all users remain active, but new user sign up will be prohibited. | ||
| * | ||
| * @param {number} total - Set the maximum number of users allowed in the project. Value can be between 1 and 5000, or null to disable the limit. | ||
| * @param {number} total - Set the maximum number of users allowed in the project. Value can be between 0 and 10000. Use 0 or null to disable the limit. |
There was a problem hiding this comment.
Documented null value is rejected
When a TypeScript consumer follows the updated documentation and passes null to disable the user limit, both overloads reject the call because total only accepts number | undefined, making the documented operation unavailable through the public type contract.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/services/project.ts
Line: 6072-6080
Comment:
**Documented null value is rejected**
When a TypeScript consumer follows the updated documentation and passes `null` to disable the user limit, both overloads reject the call because `total` only accepts `number | undefined`, making the documented operation unavailable through the public type contract.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Greptile SummaryUpdates the Console SDK for version 15.8.0.
Confidence Score: 3/5The PR does not appear safe to merge until the positional WAF compatibility break and the two public type-contract mismatches are corrected. Existing WAF positional calls can send shifted rule fields, branch responses can expose null through a number-only type, and the documented null user-limit value remains unavailable through the declared TypeScript overloads. Files Needing Attention: src/services/waf.ts, src/models.ts, src/services/project.ts Important Files Changed
Reviews (2): Last reviewed commit: "chore: update Console SDK to 15.8.0" | Re-trigger Greptile |
This PR contains updates to the Console SDK for version 15.8.0.
What's Changed
create()onmysql,postgresql, andmongono longer acceptsapiproject.updateSessionLimitPolicy()now requirestotalsyncModeparameter tocreate()andupdate()ontablesDB,documentsDB, andvectorsDBdifficultyandttlparameters towaf.createChallengeRule()andwaf.updateChallengeRule()keyparameter towaf.createRateLimitRule()andwaf.updateRateLimitRule()DatabaseStatusandDedicatedDatabaseReplicassyncModeto theDedicatedDatabasemodeldifficultyandttltoWafRuleChallenge, andkeytoWafRuleRateLimitrequestedTypeandfallbackReasontoDedicatedDatabaseBackupattemptandlastErrortoDatabaseMigrationnode-26to theRuntimeandBuildRuntimeenumsDatabaseStatusReplica.roledocuments theunknownrole during topology transitions