Skip to main content

uarp_sdk/generated/api/
feedback.rs

1// Code generated by @uarp/codegen from spec/openapi.json. DO NOT EDIT.
2//!
3//! Error reports from any tenant; the inbox is super-admin only
4
5#![allow(unused_imports, clippy::too_many_arguments)]
6
7use reqwest::Method;
8use serde::{Deserialize, Serialize};
9
10use crate::client::{Client, Request, NO_BODY, NO_QUERY};
11use crate::error::Result;
12use crate::generated::models;
13use crate::multipart::{field_text, FilePart};
14use crate::util::encode_path;
15
16/// Error reports from any tenant; the inbox is super-admin only
17#[derive(Debug, Clone)]
18pub struct FeedbackApi {
19    pub(crate) client: Client,
20}
21
22impl Client {
23    /// Error reports from any tenant; the inbox is super-admin only
24    pub fn feedback(&self) -> FeedbackApi {
25        FeedbackApi { client: self.clone() }
26    }
27}
28
29impl FeedbackApi {
30    /// Report an error or send feedback
31    ///
32    /// Any authenticated caller. `message` is required; everything else is optional and clipped to
33    /// a maximum length rather than rejected, so a long paste still files a report instead of
34    /// losing it.
35    ///
36    /// `POST /api/v1/feedback`
37    pub async fn submit_feedback(&self, body: &models::SubmitFeedbackRequest) -> Result<models::SubmitFeedbackResponse> {
38        self.client
39            .request_json(Request {
40                method: Method::POST,
41                path: "/api/v1/feedback".to_string(),
42                query: NO_QUERY,
43                body: Some(body),
44                headers: Vec::new(),
45                idempotent: true,
46            })
47            .await
48    }
49}