1#[cfg(feature = "rust")]
2use bon::Builder;
3#[cfg(feature = "node")]
4use napi_derive::napi;
5#[cfg(feature = "python")]
6use pyo3::pyclass;
7#[cfg(feature = "python")]
8use pyo3_stub_gen::derive::gen_stub_pyclass;
9use serde::{Deserialize, Serialize};
10
11#[cfg_attr(feature = "python", gen_stub_pyclass)]
13#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
14#[cfg_attr(feature = "node", napi(object))]
15#[derive(Debug, Clone, Serialize, Deserialize)]
16pub struct SecurityOption {
17 pub option: String,
19 pub status: String,
21 pub value: Option<String>,
23}
24
25#[cfg_attr(feature = "python", gen_stub_pyclass)]
27#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
28#[cfg_attr(feature = "node", napi(object))]
29#[derive(Debug, Clone, Serialize, Deserialize)]
30pub struct GetSecurityOptionsResponse {
31 #[serde(default)]
33 pub data: Vec<SecurityOption>,
34 pub error: Option<String>,
36}
37
38#[cfg_attr(feature = "python", gen_stub_pyclass)]
41#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
42#[cfg_attr(feature = "node", napi(object))]
43#[cfg_attr(feature = "rust", derive(Builder))]
44#[derive(Debug, Clone, Default, Serialize)]
45pub struct SecurityOptionsUpdate {
46 #[serde(skip_serializing_if = "Option::is_none")]
48 pub tokens: Option<String>,
49 #[serde(skip_serializing_if = "Option::is_none")]
51 pub referrers: Option<String>,
52 #[serde(skip_serializing_if = "Option::is_none")]
54 pub jwts: Option<String>,
55 #[serde(skip_serializing_if = "Option::is_none")]
57 pub ips: Option<String>,
58 #[serde(rename = "domainMasks", skip_serializing_if = "Option::is_none")]
60 pub domain_masks: Option<String>,
61 #[serde(skip_serializing_if = "Option::is_none")]
63 pub hsts: Option<String>,
64 #[serde(skip_serializing_if = "Option::is_none")]
66 pub cors: Option<String>,
67 #[serde(rename = "requestFilters", skip_serializing_if = "Option::is_none")]
69 pub request_filters: Option<String>,
70 #[serde(rename = "ipCustomHeader", skip_serializing_if = "Option::is_none")]
72 pub ip_custom_header: Option<String>,
73}
74
75#[cfg_attr(feature = "python", gen_stub_pyclass)]
77#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
78#[cfg_attr(feature = "node", napi(object))]
79#[cfg_attr(feature = "rust", derive(Builder))]
80#[derive(Debug, Clone, Default, Serialize)]
81pub struct UpdateSecurityOptionsRequest {
82 pub options: SecurityOptionsUpdate,
84}
85
86#[cfg_attr(feature = "python", gen_stub_pyclass)]
88#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
89#[cfg_attr(feature = "node", napi(object))]
90#[derive(Debug, Clone, Serialize, Deserialize)]
91pub struct UpdateSecurityOptionsResponse {
92 #[serde(default)]
94 pub data: Vec<SecurityOption>,
95 pub error: Option<String>,
97}
98
99#[cfg_attr(feature = "python", gen_stub_pyclass)]
101#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
102#[cfg_attr(feature = "node", napi(object))]
103#[cfg_attr(feature = "rust", derive(Builder))]
104#[derive(Debug, Clone, Default, Serialize)]
105pub struct CreateReferrerRequest {
106 #[serde(skip_serializing_if = "Option::is_none")]
108 pub referrer: Option<String>,
109}
110
111#[cfg_attr(feature = "python", gen_stub_pyclass)]
113#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
114#[cfg_attr(feature = "node", napi(object))]
115#[cfg_attr(feature = "rust", derive(Builder))]
116#[derive(Debug, Clone, Default, Serialize)]
117pub struct CreateIpRequest {
118 #[serde(skip_serializing_if = "Option::is_none")]
120 pub ip: Option<String>,
121}
122
123#[cfg_attr(feature = "python", gen_stub_pyclass)]
125#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
126#[cfg_attr(feature = "node", napi(object))]
127#[cfg_attr(feature = "rust", derive(Builder))]
128#[derive(Debug, Clone, Default, Serialize)]
129pub struct CreateDomainMaskRequest {
130 #[serde(skip_serializing_if = "Option::is_none")]
132 pub domain_mask: Option<String>,
133}
134
135#[cfg_attr(feature = "python", gen_stub_pyclass)]
137#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
138#[cfg_attr(feature = "node", napi(object))]
139#[cfg_attr(feature = "rust", derive(Builder))]
140#[derive(Debug, Clone, Default, Serialize)]
141pub struct CreateJwtRequest {
142 #[serde(skip_serializing_if = "Option::is_none")]
144 pub public_key: Option<String>,
145 pub kid: String,
147 #[serde(skip_serializing_if = "Option::is_none")]
149 pub name: Option<String>,
150}
151
152#[cfg_attr(feature = "python", gen_stub_pyclass)]
154#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
155#[cfg_attr(feature = "node", napi(object))]
156#[cfg_attr(feature = "rust", derive(Builder))]
157#[derive(Debug, Clone, Default, Serialize)]
158pub struct CreateRequestFilterRequest {
159 #[serde(skip_serializing_if = "Option::is_none")]
161 pub method: Option<Vec<String>>,
162}
163
164#[cfg_attr(feature = "python", gen_stub_pyclass)]
166#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
167#[cfg_attr(feature = "node", napi(object))]
168#[derive(Debug, Clone, Serialize, Deserialize)]
169pub struct CreateRequestFilterResponse {
170 pub data: Option<CreateRequestFilterData>,
172 pub error: Option<String>,
174}
175
176#[cfg_attr(feature = "python", gen_stub_pyclass)]
178#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
179#[cfg_attr(feature = "node", napi(object))]
180#[derive(Debug, Clone, Serialize, Deserialize)]
181pub struct CreateRequestFilterData {
182 pub id: String,
184}
185
186#[cfg_attr(feature = "python", gen_stub_pyclass)]
188#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
189#[cfg_attr(feature = "node", napi(object))]
190#[cfg_attr(feature = "rust", derive(Builder))]
191#[derive(Debug, Clone, Default, Serialize)]
192pub struct UpdateRequestFilterRequest {
193 #[serde(skip_serializing_if = "Option::is_none")]
195 pub method: Option<Vec<String>>,
196}
197
198#[cfg_attr(feature = "python", gen_stub_pyclass)]
200#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
201#[cfg_attr(feature = "node", napi(object))]
202#[cfg_attr(feature = "rust", derive(Builder))]
203#[derive(Debug, Clone, Default, Serialize)]
204pub struct CreateOrUpdateIpCustomHeaderRequest {
205 pub header_name: String,
207}
208
209#[cfg_attr(feature = "python", gen_stub_pyclass)]
211#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
212#[cfg_attr(feature = "node", napi(object))]
213#[derive(Debug, Clone, Serialize, Deserialize)]
214pub struct IpCustomHeaderData {
215 pub header_name: String,
217}
218
219#[cfg_attr(feature = "python", gen_stub_pyclass)]
221#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
222#[cfg_attr(feature = "node", napi(object))]
223#[derive(Debug, Clone, Serialize, Deserialize)]
224pub struct CreateOrUpdateIpCustomHeaderResponse {
225 pub data: Option<IpCustomHeaderData>,
227 pub error: Option<String>,
229}
230
231#[cfg_attr(feature = "python", gen_stub_pyclass)]
233#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
234#[cfg_attr(feature = "node", napi(object))]
235#[derive(Debug, Clone, Serialize, Deserialize)]
236pub struct DeleteBoolResponse {
237 pub data: Option<bool>,
239 pub error: Option<String>,
241}