feat: SDK update for version 0.10.0#23
Conversation
Greptile SummaryThis PR updates the Appwrite Rust SDK from 0.9.0 to 0.10.0, adding new API surface (Notifications service, corporate-email policy, device-flow OAuth2 params,
Confidence Score: 3/5The PR is mostly mechanical and correct, but the non-optional Every other privacy-gated field on src/models/membership.rs needs the Important Files Changed
Reviews (1): Last reviewed commit: "chore: update Rust SDK to 0.10.0" | Re-trigger Greptile |
| /// Most recent access date in ISO 8601 format. Show this attribute by toggling | ||
| /// membership privacy in the Console. | ||
| #[serde(rename = "userAccessedAt")] | ||
| pub user_accessed_at: String, |
There was a problem hiding this comment.
user_accessed_at should be Option<String>
Every other privacy-gated field in this struct uses "Hide this attribute by toggling membership privacy" (meaning it is present by default). The new field uses the opposite wording — "Show this attribute by toggling membership privacy" — meaning it is absent from API responses until the toggle is enabled. A non-optional String field will cause a serde deserialization error whenever the Appwrite API omits userAccessedAt, breaking any call that retrieves memberships when the privacy toggle is off.
| thiserror = "1.0.69" | ||
| bytes = "1.11.1" | ||
| arc-swap = "1.8.0" | ||
| zeroize = ">=1.8, <1.9" |
There was a problem hiding this comment.
The upper bound
<1.9 restricts the dependency to only 1.8.x patch releases. When zeroize publishes 1.9.0 (a semver-compatible minor bump), Cargo will refuse to resolve it, potentially causing unnecessary conflicts with other crates that depend on a newer 1.x. The conventional Cargo range for "1.8 or later within the same major" is >=1.8, <2.0 (or simply "1.8" which expands to that by Cargo convention).
| zeroize = ">=1.8, <1.9" | |
| zeroize = ">=1.8, <2.0" |
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!
| pub interval: String, | ||
| /// One entry per requested metric, each carrying its own points[] time series | ||
| /// (sums per bucket / dimension over time). |
There was a problem hiding this comment.
interval should be Option<String>
The field doc states "Empty when the request omits interval". Using a non-optional String with an empty-string sentinel means callers cannot distinguish "no interval was requested" from "the API returned an empty string for some other reason", and it forces callers to check interval.is_empty() rather than the idiomatic interval.is_none(). The same pattern applies to UsageGaugeList::interval. An Option<String> — None when absent, Some("1h") when present — would be semantically correct.
This PR contains updates to the SDK for version 0.10.0.
What's Changed
listEventsandlistGaugesinusagewith a requiredmetricsparam and newinterval,dimensions, date-range, and ordering optionsUsageEventandUsageGaugemodels withUsageDataPointandUsageMetricNotificationsservice withNotificationandNotificationListmodelsgetQueueNotificationshealth check tohealthupdateDenyCorporateEmailPolicyandPolicyDenyCorporateEmailtoprojectAccept: application/jsonheader