1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
//! `funnels` data models for GoHighLevel API V2 (10 types).
//!
//! Generated from HighLevel's official OpenAPI spec for the
//! **Funnels** module. Every endpoint that uses these types, with its
//! parameters, required scopes and enum values, is documented in the
//! [`funnels` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/funnels.md).
//!
//! Enable with `features = ["funnels"]`.
// @generated by xtask/generate_models.py — do not edit by hand.
// Source: https://github.com/GoHighLevel/highlevel-api-docs
// Doc comments are HighLevel's own field descriptions, reflowed verbatim, so
// they aren't held to rustdoc's markdown conventions.
#![allow(
missing_docs,
clippy::doc_lazy_continuation,
clippy::doc_overindented_list_items
)]
use serde::{Deserialize, Serialize};
/// `CreateRedirectParams` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateRedirectParams {
/// Required by the API.
#[serde(rename = "locationId")]
pub location_id: String,
/// Required by the API.
pub domain: String,
/// Required by the API.
pub path: String,
/// Required by the API.
pub target: String,
/// Allowed values: `funnel`, `website`, `url`, `all`.
/// Required by the API.
pub action: String,
}
/// `CreateRedirectResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateRedirectResponseDTO {
/// Data containing details of the created redirect
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub data: Option<RedirectResponseDTO>,
}
/// `DeleteRedirectResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteRedirectResponseDTO {
/// Status of the delete operation
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub data: Option<serde_json::Value>,
}
/// `FunnelListResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct FunnelListResponseDTO {
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub funnels: Option<serde_json::Value>,
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub count: Option<f64>,
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
pub trace_id: Option<String>,
}
/// `FunnelPageCountResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct FunnelPageCountResponseDTO {
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub count: Option<f64>,
}
/// `FunnelPageResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct FunnelPageResponseDTO {
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(
rename = "locationId",
default,
skip_serializing_if = "Option::is_none"
)]
pub location_id: Option<String>,
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(rename = "funnelId", default, skip_serializing_if = "Option::is_none")]
pub funnel_id: Option<String>,
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(rename = "stepId", default, skip_serializing_if = "Option::is_none")]
pub step_id: Option<String>,
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub deleted: Option<String>,
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
/// `RedirectListResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RedirectListResponseDTO {
/// Object containing the count of redirects and an array of redirect data
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub data: Option<serde_json::Value>,
}
/// `RedirectResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RedirectResponseDTO {
/// Unique identifier of the redirect
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Identifier of the location associated with the redirect
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(
rename = "locationId",
default,
skip_serializing_if = "Option::is_none"
)]
pub location_id: Option<String>,
/// Domain where the redirect occurs
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
/// Original path that will be redirected
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
/// Lowercase version of the original path
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(
rename = "pathLowercase",
default,
skip_serializing_if = "Option::is_none"
)]
pub path_lowercase: Option<String>,
/// Type of redirect (e.g., Permanent, Temporary)
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
/// Target URL to which the original path will be redirected
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
/// Action performed by the redirect
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub action: Option<String>,
}
/// `UpdateRedirectParams` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UpdateRedirectParams {
/// Required by the API.
pub target: String,
/// Allowed values: `funnel`, `website`, `url`, `all`.
/// Required by the API.
pub action: String,
/// Required by the API.
#[serde(rename = "locationId")]
pub location_id: String,
}
/// `UpdateRedirectResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UpdateRedirectResponseDTO {
/// Data containing details of the updated redirect
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub data: Option<RedirectResponseDTO>,
}