feat: SDK update for version 15.1.0 - #101
Conversation
Greptile SummaryThis PR updates the console SDK to version 15.1.0, delivering several breaking changes and additive features aligned with the Appwrite backend 15.1.0 release.
Confidence Score: 4/5The changes are clean auto-generated SDK updates with one gap: the The src/services/usage.ts — the Important Files Changed
Reviews (1): Last reviewed commit: "chore: update Console SDK to 15.1.0" | Re-trigger Greptile |
| if (typeof metrics === 'undefined') { | ||
| throw new AppwriteException('Missing required parameter: "metrics"'); | ||
| } |
There was a problem hiding this comment.
metrics empty-array passes validation silently
The guard only checks for undefined, so metrics: [] passes the client-side check, gets serialized into the request body, and the server returns an error. The API explicitly documents 1–10 entries as the valid range — a zero-length array should be caught here just like undefined. The same pattern applies in listGauges (line 861–863).
| const usage = new Usage(client); | ||
|
|
||
| const result = await usage.listEvents({ |
There was a problem hiding this comment.
Example uses empty
metrics array
metrics: [] would fail the 1–10 constraint enforced by the API, so this example would error on every copy-paste run. It should show a real placeholder such as metrics: ['<METRIC>'], consistent with the single-metric placeholder style used in the previous version. The same applies to docs/examples/usage/list-gauges.md.
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!
| prompt: '<PROMPT>', // optional | ||
| maxAge: 0, // optional |
There was a problem hiding this comment.
resource placeholder uses empty string instead of a URI sentinel
Every other optional string parameter in the OAuth2 examples uses '<PLACEHOLDER>' style, but resource: '' uses a bare empty string. An empty string is not a valid RFC 8707 URI and would likely be rejected or silently ignored by the server, whereas '<RESOURCE_URI>' makes the intent clear. The same occurs in create-device-authorization.md and create-token.md.
This PR contains updates to the SDK for version 15.1.0.
What's Changed
listEventsandlistGaugesonUsagenow takemetrics(string array, 1-10) instead of a singlemetricUsageEventListandUsageGaugeListnow exposeintervaland ametricsarray;UsageGroupis replaced byUsageMetricandUsageDataPointcreateDatabaseExecutiononComputenow posts to the/executionsendpointresourceparameter onOauth2authorize,createDeviceAuthorization, andcreateTokenfor RFC 8707 resource indicatorsresourcesfield on theOauth2Authorizemodelserviceandresourcebreak-down dimensions onUsagelistGaugesDatabasestransaction and text attribute methods are now marked deprecated in favor ofTablesDB