uarp_sdk/generated/api/
gdpr.rs1#![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#[derive(Debug, Clone)]
18pub struct GDPRApi {
19 pub(crate) client: Client,
20}
21
22impl Client {
23 pub fn gdpr(&self) -> GDPRApi {
25 GDPRApi { client: self.clone() }
26 }
27}
28
29impl GDPRApi {
30 pub async fn data_subject_access(&self) -> Result<serde_json::Map<String, serde_json::Value>> {
34 self.client
35 .request_json(Request {
36 method: Method::GET,
37 path: "/api/v1/data-subject/access".to_string(),
38 query: NO_QUERY,
39 body: NO_BODY,
40 headers: Vec::new(),
41 idempotent: false,
42 })
43 .await
44 }
45
46 pub async fn data_subject_erasure(&self, body: &serde_json::Map<String, serde_json::Value>) -> Result<serde_json::Map<String, serde_json::Value>> {
50 self.client
51 .request_json(Request {
52 method: Method::POST,
53 path: "/api/v1/data-subject/erasure".to_string(),
54 query: NO_QUERY,
55 body: Some(body),
56 headers: Vec::new(),
57 idempotent: true,
58 })
59 .await
60 }
61}