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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
//! `brand-boards` data models for GoHighLevel API V2 (11 types).
//!
//! Generated from HighLevel's official OpenAPI spec for the
//! **Brand Boards** module. Every endpoint that uses these types, with its
//! parameters, required scopes and enum values, is documented in the
//! [`brand-boards` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/brand-boards.md).
//!
//! Enable with `features = ["brand-boards"]`.
// @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};
/// `BrandBoardListItemDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct BrandBoardListItemDTO {
/// Brand board ID
/// 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>,
/// Brand board name
/// 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>,
/// Last update timestamp
/// 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>,
/// Whether this is the default brand board for the location
#[serde(default, skip_serializing_if = "Option::is_none")]
pub default: Option<bool>,
/// Metadata about the brand board
#[serde(default, skip_serializing_if = "Option::is_none")]
pub meta: Option<MetaData>,
}
/// `Color` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Color {
/// Unique identifier for the color
/// 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>,
/// Color in HEXA format (with alpha)
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub hexa: Option<String>,
/// Color in RGBA format
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub rgba: Option<String>,
/// Color in HEX format
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub hex: Option<String>,
/// Color in RGB format
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub rgb: Option<String>,
/// Display label for the color
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
}
/// `CreateBrandBoardParam` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateBrandBoardParam {
/// Location ID where the brand board will be created
/// Required by the API.
#[serde(rename = "locationId")]
pub location_id: String,
/// Name of the brand board
/// Required by the API.
pub name: String,
/// Array of logos for the brand board
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub logos: Vec<Logo>,
/// Array of colors for the brand board
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub colors: Vec<Color>,
/// Array of fonts for the brand board
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub fonts: Vec<Font>,
/// Set as the default brand board for this location
#[serde(default, skip_serializing_if = "Option::is_none")]
pub default: Option<bool>,
/// Source brand board ID to copy from (creates a new brand board based on this template)
#[serde(
rename = "brandBoardId",
default,
skip_serializing_if = "Option::is_none"
)]
pub brand_board_id: Option<String>,
/// Parent folder ID in media library for organizing brand boards
#[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
pub parent_id: Option<String>,
/// Source type indicating how the brand board was created
/// Allowed values: `template`, `blank`, `snapshot`.
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
/// `Font` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Font {
/// Unique identifier for the font
/// 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>,
/// Font family name
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub font: Option<String>,
/// Fallback font family
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub fallback: Option<String>,
/// Display label for the font
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
}
/// `GetBrandBoardSuccessDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetBrandBoardSuccessDTO {
/// Brand board ID
/// 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>,
/// Location ID
/// 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>,
/// Brand board name
/// 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>,
/// Array of logos
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub logos: Vec<Logo>,
/// Array of brand colors
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub colors: Vec<Color>,
/// Array of brand fonts
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub fonts: Vec<Font>,
/// Whether this is the default brand board for the location
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub default: Option<bool>,
/// Whether the brand board has been soft deleted
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub deleted: Option<bool>,
/// Parent folder ID in media library
#[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
pub parent_id: Option<String>,
/// Media library folder ID for this brand board
#[serde(rename = "folderId", default, skip_serializing_if = "Option::is_none")]
pub folder_id: Option<String>,
/// Original brand board ID if cloned from snapshot
#[serde(rename = "originId", default, skip_serializing_if = "Option::is_none")]
pub origin_id: Option<String>,
/// Metadata about the brand board
#[serde(default, skip_serializing_if = "Option::is_none")]
pub meta: Option<MetaData>,
/// Creation timestamp
#[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
/// Last update timestamp
#[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
/// `GetBrandBoardsByLocationSuccessDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GetBrandBoardsByLocationSuccessDTO {
/// Array of brand boards for the location
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(rename = "brandBoards", default, skip_serializing_if = "Vec::is_empty")]
pub brand_boards: Vec<BrandBoardListItemDTO>,
/// Total number of brand boards matching the query
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(
rename = "totalCount",
default,
skip_serializing_if = "Option::is_none"
)]
pub total_count: Option<f64>,
}
/// `InvalidLocationDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct InvalidLocationDTO {
#[serde(
rename = "statusCode",
default,
skip_serializing_if = "Option::is_none"
)]
pub status_code: Option<f64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
/// `Logo` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Logo {
/// Unique identifier for the logo
/// 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>,
/// Public URL of the logo image. Used for uploading to the brand board folder in media
/// library
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// Display label for the logo (e.g., Primary, Secondary)
/// Required by the API.
/// (Optional here so responses that omit it still parse.)
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
/// Storage path of the logo in the media library
/// 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>,
}
/// `MetaData` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct MetaData {
/// User ID who last updated the brand board
#[serde(rename = "updatedBy", default, skip_serializing_if = "Option::is_none")]
pub updated_by: Option<String>,
/// Last action performed on the brand board
#[serde(
rename = "lastAction",
default,
skip_serializing_if = "Option::is_none"
)]
pub last_action: Option<String>,
/// Source brand board ID if created from a template
#[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
pub source_id: Option<String>,
/// How the brand board was created
/// Allowed values: `template`, `blank`, `snapshot`.
#[serde(
rename = "sourceType",
default,
skip_serializing_if = "Option::is_none"
)]
pub source_type: Option<String>,
}
/// `NotFoundDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct NotFoundDTO {
#[serde(
rename = "statusCode",
default,
skip_serializing_if = "Option::is_none"
)]
pub status_code: Option<f64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub error: Option<String>,
}
/// `UpdateBrandBoardBody` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UpdateBrandBoardBody {
/// Name of the brand board
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Array of logos for the brand board
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub logos: Vec<Logo>,
/// Array of colors for the brand board
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub colors: Vec<Color>,
/// Array of fonts for the brand board
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub fonts: Vec<Font>,
/// Set as the default brand board for this location
#[serde(default, skip_serializing_if = "Option::is_none")]
pub default: Option<bool>,
/// Parent folder ID in media library (reserved for future use)
#[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
pub parent_id: Option<String>,
}