feat: SDK update for version 0.4.0#13
Conversation
Greptile SummaryThis PR bumps the SDK to version 0.4.0 (targeting Appwrite API 1.9.2), adding a suite of new Confidence Score: 3/5Not safe to merge until the Multiple P1 issues flagged in previous review threads remain unaddressed:
Important Files Changed
Reviews (2): Last reviewed commit: "chore: update Rust SDK to 0.4.0" | Re-trigger Greptile |
| let path = "/project/templates/email/{templateId}".to_string().replace("{templateId}", &template_id.to_string()); | ||
|
|
||
| self.client.call(Method::GET, &path, None, Some(params)).await | ||
| } |
There was a problem hiding this comment.
templateId sent as body param but path uses no ID segment
update_email_template inserts templateId into params (the request body) and targets the path /project/templates/email, while the sibling get_email_template uses templateId as a URL path segment (/project/templates/email/{templateId}). If the Appwrite 1.9.2 PATCH endpoint also expects the template type in the path (matching the GET), the current implementation will hit the wrong route and the server will return a 404 or 400. The templateId should likely be substituted into the path instead of sent in the body.
// Likely intended:
let path = "/project/templates/email/{templateId}"
.to_string()
.replace("{templateId}", &template_id.to_string());
// and remove: params.insert("templateId".to_string(), json!(template_id));
This PR contains updates to the SDK for version 0.4.0.
What's Changed
Project::update_protocol_statustoProject::update_protocolProject::update_service_statustoProject::update_serviceProjectmodel fieldsmtp_reply_totosmtp_reply_to_emailupdate_membership_privacy_policy,update_password_dictionary_policy,update_password_history_policy,update_password_personal_data_policy,update_session_alert_policy,update_session_duration_policy,update_session_invalidation_policy,update_session_limit_policy,update_user_limit_policyProject::update_smtpandProject::create_smtp_testupdate_email_template,get_email_templateEmailTemplatemodel andEmailTemplateLocale,EmailTemplateType,Secureenumsauth_memberships_user_id,auth_memberships_user_phone,smtp_reply_to_namefields toProjectmodeluser_phonefield toMembershipmodeltemplates.readandtemplates.writetoScopesenumdeno-1.21,deno-1.24,deno-1.35toRuntimeandBuildRuntimeenumsX-Appwrite-Response-Formatheader to1.9.2Cargo.tomlto constrainurlto>=2.5.4, <2.6and addidnaandidna_adapterSome(...)