Conversation
Greptile SummaryThis release promotes the Node SDK to 29.0.0 and aligns it with response format 2.0.0.
Confidence Score: 4/5The dedicated database model鈥檚 nullability mismatch should be corrected before merging so consumers receive an accurate credential-generation contract. The new shared DedicatedDatabase field is declared as always numeric despite its own API documentation stating that freshly initialized resources can return null. Files Needing Attention: src/models.ts Important Files Changed
Prompt To Fix All With AI### Issue 1
src/models.ts:8284
**Credential generation excludes null**
When a dedicated database's credential-rotation contract has not been initialized, the API contract permits `credentialGeneration` to be null, but this model declares it as an unconditional `number`, causing consumers to make unsafe numeric assumptions about the response.
```suggestion
credentialGeneration: number | null;
```
---
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 Node.js SDK to 29.0.0" | Re-trigger Greptile |
| /** | ||
| * Committed generation of the primary connection credentials. Null until the rotation contract has been initialized. | ||
| */ | ||
| credentialGeneration: number; |
There was a problem hiding this comment.
Credential generation excludes null
When a dedicated database's credential-rotation contract has not been initialized, the API contract permits credentialGeneration to be null, but this model declares it as an unconditional number, causing consumers to make unsafe numeric assumptions about the response.
| credentialGeneration: number; | |
| credentialGeneration: number | null; |
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/models.ts
Line: 8284
Comment:
**Credential generation excludes null**
When a dedicated database's credential-rotation contract has not been initialized, the API contract permits `credentialGeneration` to be null, but this model declares it as an unconditional `number`, causing consumers to make unsafe numeric assumptions about the response.
```suggestion
credentialGeneration: number | null;
```
**Knowledge Base Used:**
- [Generated models and enum vocabulary](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-node/-/docs/models-and-enums.md)
- [SDK data contracts and helpers](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-node/-/docs/sdk-data-contracts.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
This PR contains updates to the SDK for version 29.0.0.
What's Changed
mysql,postgresql,mongo,documentsDB, andvectorsDBservices, previously released as release candidatestablesDB.cutoverMigrationis renamed totablesDB.createCutoverExecution.functionIdis replaced byresourceIdandresourceType, covering function and site executionsusageAggregateOnlyMetricson theBillingPlanmodeltransactionIdis accepted again bydocumentsDBandvectorsDBcreateDocumentandcreateDocumentsX-Appwrite-Response-Formatis now2.0.0FrameworkAdapter.fallbackFileis now optional