// AUTO-GENERATED by mizan — do not edit

use serde_json::Value;

use mizan_rust::{MizanClient, MizanError};

{% if !type_imports.is_empty() -%}
use crate::types::{ {{- type_imports|join(", ") -}} };

{% endif -%}
pub async fn call_{{ snake }}(client: &MizanClient{{ input_param }}) -> Result<{{ return_type }}, MizanError> {
    let args_value = {{ args_value }};
    let raw = client.call("{{ name }}", args_value).await?;
    serde_json::from_value(raw)
        .map_err(|e| MizanError::transport(format!("decode {{ name }} result: {e}")))
}

