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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
//! `custom-menus` data models for GoHighLevel API V2 (9 types).
//!
//! Generated from HighLevel's official OpenAPI spec for the
//! **Custom Menus** module. Every endpoint that uses these types, with its
//! parameters, required scopes and enum values, is documented in the
//! [`custom-menus` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/custom-menus.md).
//!
//! Enable with `features = ["custom-menus"]`.
// @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};
/// `CreateCustomMenuDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateCustomMenuDTO {
/// Title of the custom menu
/// Required by the API.
pub title: String,
/// URL of the custom menu
/// Required by the API.
pub url: String,
/// Icon information for the custom menu
/// Required by the API.
pub icon: IconSchema,
/// Whether the menu must be displayed on the agency's level
/// Required by the API.
#[serde(rename = "showOnCompany")]
pub show_on_company: bool,
/// Whether the menu must be displayed for sub-accounts level
/// Required by the API.
#[serde(rename = "showOnLocation")]
pub show_on_location: bool,
/// Whether the menu must be displayed to all sub-accounts
/// Required by the API.
#[serde(rename = "showToAllLocations")]
pub show_to_all_locations: bool,
/// Mode for opening the menu link
/// Allowed values: `iframe`, `new_tab`, `current_tab`.
/// Required by the API.
#[serde(rename = "openMode")]
pub open_mode: String,
/// List of sub-account IDs where the menu should be shown. This list is applicable only
/// when showOnLocation is true and showToAllLocations is false
/// Required by the API.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub locations: Vec<String>,
/// Which user-roles should the menu be accessible to?
/// Allowed values: `all`, `admin`, `user`.
/// Required by the API.
#[serde(rename = "userRole")]
pub user_role: String,
/// Whether to allow camera access (only for iframe mode)
#[serde(
rename = "allowCamera",
default,
skip_serializing_if = "Option::is_none"
)]
pub allow_camera: Option<bool>,
/// Whether to allow microphone access (only for iframe mode)
#[serde(
rename = "allowMicrophone",
default,
skip_serializing_if = "Option::is_none"
)]
pub allow_microphone: Option<bool>,
}
/// `CustomMenuSchema` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CustomMenuSchema {
/// Unique identifier for the custom menu
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Icon information for the menu item
#[serde(default, skip_serializing_if = "Option::is_none")]
pub icon: Option<IconSchemaOptional>,
/// Title of the custom menu
#[serde(default, skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// URL of the custom menu
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// Order of the custom menu
#[serde(default, skip_serializing_if = "Option::is_none")]
pub order: Option<f64>,
/// Filter to show only agency-level menu links. When omitted, fetches both agency and
/// sub-account menu links. Ignored if locationId is provided
#[serde(
rename = "showOnCompany",
default,
skip_serializing_if = "Option::is_none"
)]
pub show_on_company: Option<bool>,
/// Whether the menu must be displayed for sub-accounts level
#[serde(
rename = "showOnLocation",
default,
skip_serializing_if = "Option::is_none"
)]
pub show_on_location: Option<bool>,
/// Whether the menu must be displayed to all sub-accounts
#[serde(
rename = "showToAllLocations",
default,
skip_serializing_if = "Option::is_none"
)]
pub show_to_all_locations: Option<bool>,
/// List of sub-account IDs where the menu should be shown. This list is applicable only
/// when showOnLocation is true and showToAllLocations is false
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub locations: Vec<String>,
/// Mode for opening the menu link
/// Allowed values: `iframe`, `new_tab`, `current_tab`.
#[serde(rename = "openMode", default, skip_serializing_if = "Option::is_none")]
pub open_mode: Option<String>,
/// Which user-roles should the menu be accessible to?
/// Allowed values: `all`, `admin`, `user`.
#[serde(rename = "userRole", default, skip_serializing_if = "Option::is_none")]
pub user_role: Option<String>,
/// Indicates if camera access is allowed for this menu
#[serde(
rename = "allowCamera",
default,
skip_serializing_if = "Option::is_none"
)]
pub allow_camera: Option<bool>,
/// Indicates if microphone access is allowed for this menu
#[serde(
rename = "allowMicrophone",
default,
skip_serializing_if = "Option::is_none"
)]
pub allow_microphone: Option<bool>,
}
/// `DeleteCustomMenuSuccessfulResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DeleteCustomMenuSuccessfulResponseDTO {
/// Indicates whether the custom menu was successfully deleted
#[serde(default, skip_serializing_if = "Option::is_none")]
pub success: Option<bool>,
/// A message providing additional information about the deletion operation
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
/// The ID of the deleted custom menu
#[serde(
rename = "deletedMenuId",
default,
skip_serializing_if = "Option::is_none"
)]
pub deleted_menu_id: Option<String>,
/// Timestamp of when the deletion was performed
/// Format: date-time (ISO-8601 string).
#[serde(rename = "deletedAt", default, skip_serializing_if = "Option::is_none")]
pub deleted_at: Option<String>,
}
/// `GetCustomMenusResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetCustomMenusResponseDTO {
/// Array of custom menu links
#[serde(rename = "customMenus", default, skip_serializing_if = "Vec::is_empty")]
pub custom_menus: Vec<CustomMenuSchema>,
/// Total number of custom menu records
#[serde(
rename = "totalLinks",
default,
skip_serializing_if = "Option::is_none"
)]
pub total_links: Option<f64>,
}
/// `GetSingleCustomMenusSuccessfulResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetSingleCustomMenusSuccessfulResponseDTO {
/// Single Custom menu link object
#[serde(
rename = "customMenu",
default,
skip_serializing_if = "Option::is_none"
)]
pub custom_menu: Option<CustomMenuSchema>,
}
/// `IconSchema` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct IconSchema {
/// Name of the icon
/// Required by the API.
pub name: String,
/// Font family of the icon
/// Allowed values: `fab`, `fas`, `far`.
/// Required by the API.
#[serde(rename = "fontFamily")]
pub font_family: String,
}
/// `IconSchemaOptional` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct IconSchemaOptional {
/// Name of the icon
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Font family of the icon
/// Allowed values: `fab`, `fas`, `far`.
#[serde(
rename = "fontFamily",
default,
skip_serializing_if = "Option::is_none"
)]
pub font_family: Option<String>,
}
/// `UpdateCustomMenuDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UpdateCustomMenuDTO {
/// Title of the custom menu
#[serde(default, skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// URL of the custom menu
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// Icon information for the custom menu
#[serde(default, skip_serializing_if = "Option::is_none")]
pub icon: Option<IconSchemaOptional>,
/// Whether the menu must be displayed on the agency's level
#[serde(
rename = "showOnCompany",
default,
skip_serializing_if = "Option::is_none"
)]
pub show_on_company: Option<bool>,
/// Whether the menu must be displayed for sub-accounts level
#[serde(
rename = "showOnLocation",
default,
skip_serializing_if = "Option::is_none"
)]
pub show_on_location: Option<bool>,
/// Whether the menu must be displayed to all sub-accounts
#[serde(
rename = "showToAllLocations",
default,
skip_serializing_if = "Option::is_none"
)]
pub show_to_all_locations: Option<bool>,
/// Mode for opening the menu link
/// Allowed values: `iframe`, `new_tab`, `current_tab`.
#[serde(rename = "openMode", default, skip_serializing_if = "Option::is_none")]
pub open_mode: Option<String>,
/// List of sub-account IDs where the menu should be shown. This list is applicable only
/// when showOnLocation is true and showToAllLocations is false
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub locations: Vec<String>,
/// Which user-roles should the menu be accessible to?
/// Allowed values: `all`, `admin`, `user`.
#[serde(rename = "userRole", default, skip_serializing_if = "Option::is_none")]
pub user_role: Option<String>,
/// Whether to allow camera access (only for iframe mode)
#[serde(
rename = "allowCamera",
default,
skip_serializing_if = "Option::is_none"
)]
pub allow_camera: Option<bool>,
/// Whether to allow microphone access (only for iframe mode)
#[serde(
rename = "allowMicrophone",
default,
skip_serializing_if = "Option::is_none"
)]
pub allow_microphone: Option<bool>,
}
/// `UpdateCustomMenuLinkResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UpdateCustomMenuLinkResponseDTO {
/// Status of update
#[serde(default, skip_serializing_if = "Option::is_none")]
pub success: Option<bool>,
/// Updated custom menu link
#[serde(
rename = "customMenu",
default,
skip_serializing_if = "Option::is_none"
)]
pub custom_menu: Option<CustomMenuSchema>,
}