1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use std::collections::HashMap;
use serde::{Deserialize, Serialize};
use serde_json::Value;


#[derive(Clone, Serialize, Deserialize, Debug)]
pub struct JsonpathExtract{
    pub key: String,
    pub jsonpath: String
}


#[derive(Clone, Serialize, Deserialize, Debug)]
pub struct SetupApiEndpoint {
    pub name: String,
    pub url: String,
    pub method: String,
    pub timeout_secs: u64,
    pub json: Option<Value>,
    pub form_data: Option<HashMap<String, String>>,
    pub headers: Option<HashMap<String, String>>,
    pub cookies: Option<String>,
    pub jsonpath_extract: Option<Vec<JsonpathExtract>>
}