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 #[serde(skip_serializing_if = "Option::is_none")]
147 pub kid: Option<String>,
148 #[serde(skip_serializing_if = "Option::is_none")]
150 pub name: Option<String>,
151}
152
153#[cfg_attr(feature = "python", gen_stub_pyclass)]
155#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
156#[cfg_attr(feature = "node", napi(object))]
157#[cfg_attr(feature = "rust", derive(Builder))]
158#[derive(Debug, Clone, Default, Serialize)]
159pub struct CreateRequestFilterRequest {
160 #[serde(skip_serializing_if = "Option::is_none")]
162 pub method: Option<Vec<String>>,
163}
164
165#[cfg_attr(feature = "python", gen_stub_pyclass)]
167#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
168#[cfg_attr(feature = "node", napi(object))]
169#[derive(Debug, Clone, Serialize, Deserialize)]
170pub struct CreateRequestFilterResponse {
171 pub data: Option<CreateRequestFilterData>,
173 pub error: Option<String>,
175}
176
177#[cfg_attr(feature = "python", gen_stub_pyclass)]
179#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
180#[cfg_attr(feature = "node", napi(object))]
181#[derive(Debug, Clone, Serialize, Deserialize)]
182pub struct CreateRequestFilterData {
183 pub id: String,
185}
186
187#[cfg_attr(feature = "python", gen_stub_pyclass)]
189#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
190#[cfg_attr(feature = "node", napi(object))]
191#[cfg_attr(feature = "rust", derive(Builder))]
192#[derive(Debug, Clone, Default, Serialize)]
193pub struct UpdateRequestFilterRequest {
194 #[serde(skip_serializing_if = "Option::is_none")]
196 pub method: Option<Vec<String>>,
197}
198
199#[cfg_attr(feature = "python", gen_stub_pyclass)]
201#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
202#[cfg_attr(feature = "node", napi(object))]
203#[cfg_attr(feature = "rust", derive(Builder))]
204#[derive(Debug, Clone, Default, Serialize)]
205pub struct CreateOrUpdateIpCustomHeaderRequest {
206 pub header_name: String,
208}
209
210#[cfg_attr(feature = "python", gen_stub_pyclass)]
212#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
213#[cfg_attr(feature = "node", napi(object))]
214#[derive(Debug, Clone, Serialize, Deserialize)]
215pub struct IpCustomHeaderData {
216 pub header_name: String,
218}
219
220#[cfg_attr(feature = "python", gen_stub_pyclass)]
222#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
223#[cfg_attr(feature = "node", napi(object))]
224#[derive(Debug, Clone, Serialize, Deserialize)]
225pub struct CreateOrUpdateIpCustomHeaderResponse {
226 pub data: Option<IpCustomHeaderData>,
228 pub error: Option<String>,
230}
231
232#[cfg_attr(feature = "python", gen_stub_pyclass)]
234#[cfg_attr(feature = "python", pyclass(get_all, set_all))]
235#[cfg_attr(feature = "node", napi(object))]
236#[derive(Debug, Clone, Serialize, Deserialize)]
237pub struct DeleteBoolResponse {
238 pub data: Option<bool>,
240 pub error: Option<String>,
242}