Skip to main content

ghl_models/v3/
locations.rs

1//! `locations` data models for GoHighLevel API V3 (53 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Locations** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`locations` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/locations.md).
7//!
8//! Enable with `features = ["locations"]`.
9// @generated by xtask/generate_models.py — do not edit by hand.
10// Source: https://github.com/GoHighLevel/highlevel-api-docs
11// Doc comments are HighLevel's own field descriptions, reflowed verbatim, so
12// they aren't held to rustdoc's markdown conventions.
13#![allow(
14    missing_docs,
15    clippy::doc_lazy_continuation,
16    clippy::doc_overindented_list_items
17)]
18
19use serde::{Deserialize, Serialize};
20
21/// `BusinessSchema` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct BusinessSchema {
24    #[serde(default, skip_serializing_if = "Option::is_none")]
25    pub name: Option<String>,
26    #[serde(default, skip_serializing_if = "Option::is_none")]
27    pub address: Option<String>,
28    #[serde(default, skip_serializing_if = "Option::is_none")]
29    pub city: Option<String>,
30    #[serde(default, skip_serializing_if = "Option::is_none")]
31    pub state: Option<String>,
32    #[serde(default, skip_serializing_if = "Option::is_none")]
33    pub country: Option<String>,
34    #[serde(
35        rename = "postalCode",
36        default,
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub postal_code: Option<String>,
40    #[serde(default, skip_serializing_if = "Option::is_none")]
41    pub website: Option<String>,
42    #[serde(default, skip_serializing_if = "Option::is_none")]
43    pub timezone: Option<String>,
44    #[serde(rename = "logoUrl", default, skip_serializing_if = "Option::is_none")]
45    pub logo_url: Option<String>,
46}
47
48/// `ConversationChannelEntrySchema` from the GoHighLevel OpenAPI spec.
49#[derive(Debug, Clone, Default, Serialize, Deserialize)]
50pub struct ConversationChannelEntrySchema {
51    /// Required by the API.
52    #[serde(rename = "conversationProvider")]
53    pub conversation_provider: ConversationProviderSchema,
54}
55
56/// `ConversationChannelSchema` from the GoHighLevel OpenAPI spec.
57#[derive(Debug, Clone, Default, Serialize, Deserialize)]
58pub struct ConversationChannelSchema {
59    /// List of SMS providers configured for this location
60    #[serde(rename = "SMS", default, skip_serializing_if = "Vec::is_empty")]
61    pub sms: Vec<ConversationChannelEntrySchema>,
62    /// List of Email providers configured for this location
63    #[serde(rename = "Email", default, skip_serializing_if = "Vec::is_empty")]
64    pub email: Vec<ConversationChannelEntrySchema>,
65}
66
67/// `ConversationProviderSchema` from the GoHighLevel OpenAPI spec.
68#[derive(Debug, Clone, Default, Serialize, Deserialize)]
69pub struct ConversationProviderSchema {
70    /// Provider ID
71    /// Required by the API.
72    #[serde(rename = "_id")]
73    pub id: String,
74    /// Provider name
75    /// Required by the API.
76    pub name: String,
77    /// Provider type
78    /// Allowed values: `SMS`, `Email`.
79    /// Required by the API.
80    #[serde(rename = "type")]
81    pub type_: String,
82    /// Whether this is the default provider
83    /// Required by the API.
84    pub default: bool,
85}
86
87/// `CreateCustomFieldsDTO` from the GoHighLevel OpenAPI spec.
88#[derive(Debug, Clone, Default, Serialize, Deserialize)]
89pub struct CreateCustomFieldsDTO {
90    /// Required by the API.
91    pub name: String,
92    /// Required by the API.
93    #[serde(rename = "dataType")]
94    pub data_type: String,
95    #[serde(default, skip_serializing_if = "Option::is_none")]
96    pub placeholder: Option<String>,
97    #[serde(
98        rename = "acceptedFormat",
99        default,
100        skip_serializing_if = "Vec::is_empty"
101    )]
102    pub accepted_format: Vec<String>,
103    #[serde(
104        rename = "isMultipleFile",
105        default,
106        skip_serializing_if = "Option::is_none"
107    )]
108    pub is_multiple_file: Option<bool>,
109    #[serde(
110        rename = "maxNumberOfFiles",
111        default,
112        skip_serializing_if = "Option::is_none"
113    )]
114    pub max_number_of_files: Option<f64>,
115    /// Multiple possible shapes in the spec; raw JSON.
116    #[serde(
117        rename = "textBoxListOptions",
118        default,
119        skip_serializing_if = "Vec::is_empty"
120    )]
121    pub text_box_list_options: Vec<serde_json::Value>,
122    #[serde(default, skip_serializing_if = "Option::is_none")]
123    pub position: Option<f64>,
124    /// Model of the custom field you want to create
125    /// Allowed values: `contact`, `opportunity`.
126    #[serde(default, skip_serializing_if = "Option::is_none")]
127    pub model: Option<String>,
128}
129
130/// `CreateLocationDto` from the GoHighLevel OpenAPI spec.
131#[derive(Debug, Clone, Default, Serialize, Deserialize)]
132pub struct CreateLocationDto {
133    /// The name for the sub-account/location
134    /// Required by the API.
135    pub name: String,
136    /// The phone number of the business for which sub-account is created with the appropriate
137    /// country-code
138    #[serde(default, skip_serializing_if = "Option::is_none")]
139    pub phone: Option<String>,
140    /// Company/Agency Id
141    /// Required by the API.
142    #[serde(rename = "companyId")]
143    pub company_id: String,
144    /// The address of the business for which sub-account is created
145    #[serde(default, skip_serializing_if = "Option::is_none")]
146    pub address: Option<String>,
147    /// The city where the business is located for which sub-account is created
148    #[serde(default, skip_serializing_if = "Option::is_none")]
149    pub city: Option<String>,
150    /// The state in which the business operates for which sub-account is created
151    #[serde(default, skip_serializing_if = "Option::is_none")]
152    pub state: Option<String>,
153    /// The 2 letter country-code in which the business is present for which sub-account is
154    /// created
155    /// Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`.
156    #[serde(default, skip_serializing_if = "Option::is_none")]
157    pub country: Option<String>,
158    /// The postal code of the business for which sub-account is created
159    #[serde(
160        rename = "postalCode",
161        default,
162        skip_serializing_if = "Option::is_none"
163    )]
164    pub postal_code: Option<String>,
165    /// The website of the business for which sub-account is created
166    #[serde(default, skip_serializing_if = "Option::is_none")]
167    pub website: Option<String>,
168    /// The timezone of the business for which sub-account is created
169    #[serde(default, skip_serializing_if = "Option::is_none")]
170    pub timezone: Option<String>,
171    #[serde(
172        rename = "prospectInfo",
173        default,
174        skip_serializing_if = "Option::is_none"
175    )]
176    pub prospect_info: Option<ProspectInfoDto>,
177    /// The default settings for location
178    #[serde(default, skip_serializing_if = "Option::is_none")]
179    pub settings: Option<SettingsSchema>,
180    /// The social media links for location
181    #[serde(default, skip_serializing_if = "Option::is_none")]
182    pub social: Option<SocialSchema>,
183    /// (DEPRECATED) The twilio credentials for location
184    #[serde(default, skip_serializing_if = "Option::is_none")]
185    pub twilio: Option<TwilioSchema>,
186    /// The mailgun credentials for location
187    #[serde(default, skip_serializing_if = "Option::is_none")]
188    pub mailgun: Option<MailgunSchema>,
189    /// The snapshot ID to be loaded into the location.
190    #[serde(
191        rename = "snapshotId",
192        default,
193        skip_serializing_if = "Option::is_none"
194    )]
195    pub snapshot_id: Option<String>,
196}
197
198/// `CreateLocationSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
199#[derive(Debug, Clone, Default, Serialize, Deserialize)]
200pub struct CreateLocationSuccessfulResponseDto {
201    /// Location Id
202    #[serde(default, skip_serializing_if = "Option::is_none")]
203    pub id: Option<String>,
204    /// Company/Agency Id
205    #[serde(rename = "companyId", default, skip_serializing_if = "Option::is_none")]
206    pub company_id: Option<String>,
207    /// The name for the sub-account/location
208    #[serde(default, skip_serializing_if = "Option::is_none")]
209    pub name: Option<String>,
210    /// The phone number of the business for which sub-account is created
211    #[serde(default, skip_serializing_if = "Option::is_none")]
212    pub phone: Option<String>,
213    /// The email for the sub-account/location
214    #[serde(default, skip_serializing_if = "Option::is_none")]
215    pub email: Option<String>,
216    /// The address of the business for which sub-account is created
217    #[serde(default, skip_serializing_if = "Option::is_none")]
218    pub address: Option<String>,
219    /// The city where the business is located for which sub-account is created
220    #[serde(default, skip_serializing_if = "Option::is_none")]
221    pub city: Option<String>,
222    /// The state in which the business operates for which sub-account is created
223    #[serde(default, skip_serializing_if = "Option::is_none")]
224    pub state: Option<String>,
225    #[serde(default, skip_serializing_if = "Option::is_none")]
226    pub domain: Option<String>,
227    /// The country in which the business is present for which sub-account is created
228    /// Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`.
229    #[serde(default, skip_serializing_if = "Option::is_none")]
230    pub country: Option<String>,
231    /// The postal code of the business for which sub-account is created
232    #[serde(
233        rename = "postalCode",
234        default,
235        skip_serializing_if = "Option::is_none"
236    )]
237    pub postal_code: Option<String>,
238    /// The website of the business for which sub-account is created
239    #[serde(default, skip_serializing_if = "Option::is_none")]
240    pub website: Option<String>,
241    /// The timezone of the business for which sub-account is created
242    #[serde(default, skip_serializing_if = "Option::is_none")]
243    pub timezone: Option<String>,
244    /// The default settings for location
245    #[serde(default, skip_serializing_if = "Option::is_none")]
246    pub settings: Option<SettingsSchema>,
247    /// The social media links for location
248    #[serde(default, skip_serializing_if = "Option::is_none")]
249    pub social: Option<SocialSchema>,
250}
251
252/// `CustomFieldDeleteSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
253#[derive(Debug, Clone, Default, Serialize, Deserialize)]
254pub struct CustomFieldDeleteSuccessfulResponseDto {
255    #[serde(default, skip_serializing_if = "Option::is_none")]
256    pub succeded: Option<bool>,
257}
258
259/// `CustomFieldSchema` from the GoHighLevel OpenAPI spec.
260#[derive(Debug, Clone, Default, Serialize, Deserialize)]
261pub struct CustomFieldSchema {
262    #[serde(default, skip_serializing_if = "Option::is_none")]
263    pub id: Option<String>,
264    #[serde(default, skip_serializing_if = "Option::is_none")]
265    pub name: Option<String>,
266    #[serde(rename = "fieldKey", default, skip_serializing_if = "Option::is_none")]
267    pub field_key: Option<String>,
268    #[serde(default, skip_serializing_if = "Option::is_none")]
269    pub placeholder: Option<String>,
270    #[serde(rename = "dataType", default, skip_serializing_if = "Option::is_none")]
271    pub data_type: Option<String>,
272    #[serde(default, skip_serializing_if = "Option::is_none")]
273    pub position: Option<f64>,
274    #[serde(
275        rename = "picklistOptions",
276        default,
277        skip_serializing_if = "Vec::is_empty"
278    )]
279    pub picklist_options: Vec<String>,
280    #[serde(
281        rename = "picklistImageOptions",
282        default,
283        skip_serializing_if = "Vec::is_empty"
284    )]
285    pub picklist_image_options: Vec<String>,
286    #[serde(
287        rename = "isAllowedCustomOption",
288        default,
289        skip_serializing_if = "Option::is_none"
290    )]
291    pub is_allowed_custom_option: Option<bool>,
292    #[serde(
293        rename = "isMultiFileAllowed",
294        default,
295        skip_serializing_if = "Option::is_none"
296    )]
297    pub is_multi_file_allowed: Option<bool>,
298    #[serde(
299        rename = "maxFileLimit",
300        default,
301        skip_serializing_if = "Option::is_none"
302    )]
303    pub max_file_limit: Option<f64>,
304    #[serde(
305        rename = "locationId",
306        default,
307        skip_serializing_if = "Option::is_none"
308    )]
309    pub location_id: Option<String>,
310    /// Model of the custom field
311    /// Allowed values: `contact`, `opportunity`.
312    #[serde(default, skip_serializing_if = "Option::is_none")]
313    pub model: Option<String>,
314}
315
316/// `CustomFieldSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
317#[derive(Debug, Clone, Default, Serialize, Deserialize)]
318pub struct CustomFieldSuccessfulResponseDto {
319    #[serde(
320        rename = "customField",
321        default,
322        skip_serializing_if = "Option::is_none"
323    )]
324    pub custom_field: Option<CustomFieldSchema>,
325}
326
327/// `CustomFieldsListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
328#[derive(Debug, Clone, Default, Serialize, Deserialize)]
329pub struct CustomFieldsListSuccessfulResponseDto {
330    #[serde(
331        rename = "customFields",
332        default,
333        skip_serializing_if = "Vec::is_empty"
334    )]
335    pub custom_fields: Vec<CustomFieldSchema>,
336}
337
338/// `CustomRRulesOptions` from the GoHighLevel OpenAPI spec.
339#[derive(Debug, Clone, Default, Serialize, Deserialize)]
340pub struct CustomRRulesOptions {
341    /// Allowed values: `yearly`, `monthly`, `weekly`, `daily`, `hourly`.
342    /// Required by the API.
343    #[serde(rename = "intervalType")]
344    pub interval_type: String,
345    /// Required by the API.
346    pub interval: f64,
347    /// Start Date
348    /// Required by the API.
349    #[serde(rename = "startDate")]
350    pub start_date: String,
351    /// End Date
352    #[serde(rename = "endDate", default, skip_serializing_if = "Option::is_none")]
353    pub end_date: Option<String>,
354    /// 1, 2, 3, ..., 27, 31
355    #[serde(
356        rename = "dayOfMonth",
357        default,
358        skip_serializing_if = "Option::is_none"
359    )]
360    pub day_of_month: Option<f64>,
361    /// Allowed values: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`.
362    #[serde(rename = "dayOfWeek", default, skip_serializing_if = "Option::is_none")]
363    pub day_of_week: Option<String>,
364    /// 1, 2, ....., 11, 12
365    #[serde(
366        rename = "monthOfYear",
367        default,
368        skip_serializing_if = "Option::is_none"
369    )]
370    pub month_of_year: Option<f64>,
371    /// Max number of task executions
372    #[serde(default, skip_serializing_if = "Option::is_none")]
373    pub count: Option<f64>,
374    /// Create Task If Over Due
375    #[serde(
376        rename = "createTaskIfOverDue",
377        default,
378        skip_serializing_if = "Option::is_none"
379    )]
380    pub create_task_if_over_due: Option<bool>,
381    /// Due after seconds
382    /// Required by the API.
383    #[serde(rename = "dueAfterSeconds")]
384    pub due_after_seconds: f64,
385}
386
387/// `CustomValueDeleteSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
388#[derive(Debug, Clone, Default, Serialize, Deserialize)]
389pub struct CustomValueDeleteSuccessfulResponseDto {
390    #[serde(default, skip_serializing_if = "Option::is_none")]
391    pub succeded: Option<bool>,
392}
393
394/// `CustomValueIdSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
395#[derive(Debug, Clone, Default, Serialize, Deserialize)]
396pub struct CustomValueIdSuccessfulResponseDto {
397    #[serde(
398        rename = "customValue",
399        default,
400        skip_serializing_if = "Option::is_none"
401    )]
402    pub custom_value: Option<CustomValueSchema>,
403}
404
405/// `CustomValueSchema` from the GoHighLevel OpenAPI spec.
406#[derive(Debug, Clone, Default, Serialize, Deserialize)]
407pub struct CustomValueSchema {
408    #[serde(default, skip_serializing_if = "Option::is_none")]
409    pub id: Option<String>,
410    #[serde(default, skip_serializing_if = "Option::is_none")]
411    pub name: Option<String>,
412    #[serde(rename = "fieldKey", default, skip_serializing_if = "Option::is_none")]
413    pub field_key: Option<String>,
414    #[serde(default, skip_serializing_if = "Option::is_none")]
415    pub value: Option<String>,
416    #[serde(
417        rename = "locationId",
418        default,
419        skip_serializing_if = "Option::is_none"
420    )]
421    pub location_id: Option<String>,
422}
423
424/// `CustomValuesListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
425#[derive(Debug, Clone, Default, Serialize, Deserialize)]
426pub struct CustomValuesListSuccessfulResponseDto {
427    #[serde(
428        rename = "customValues",
429        default,
430        skip_serializing_if = "Vec::is_empty"
431    )]
432    pub custom_values: Vec<CustomValueSchema>,
433}
434
435/// `DeleteRecurringTaskResponseDTO` from the GoHighLevel OpenAPI spec.
436#[derive(Debug, Clone, Default, Serialize, Deserialize)]
437pub struct DeleteRecurringTaskResponseDTO {
438    /// Recurring Task Id
439    /// Required by the API.
440    pub id: String,
441    /// Success
442    /// Required by the API.
443    pub success: bool,
444}
445
446/// `EmailTemplateSchema` from the GoHighLevel OpenAPI spec.
447#[derive(Debug, Clone, Default, Serialize, Deserialize)]
448pub struct EmailTemplateSchema {
449    #[serde(default, skip_serializing_if = "Option::is_none")]
450    pub subject: Option<String>,
451    #[serde(default, skip_serializing_if = "Vec::is_empty")]
452    pub attachments: Vec<Vec<serde_json::Value>>,
453    #[serde(default, skip_serializing_if = "Option::is_none")]
454    pub html: Option<String>,
455}
456
457/// `FileUploadBody` from the GoHighLevel OpenAPI spec.
458#[derive(Debug, Clone, Default, Serialize, Deserialize)]
459pub struct FileUploadBody {
460    /// Id(Contact Id/Opportunity Id/Custom Field Id)
461    #[serde(default, skip_serializing_if = "Option::is_none")]
462    pub id: Option<String>,
463    /// Max number of files
464    #[serde(rename = "maxFiles", default, skip_serializing_if = "Option::is_none")]
465    pub max_files: Option<String>,
466}
467
468/// `FileUploadResponseDto` from the GoHighLevel OpenAPI spec.
469#[derive(Debug, Clone, Default, Serialize, Deserialize)]
470pub struct FileUploadResponseDto {
471    /// Uploaded files
472    #[serde(
473        rename = "uploadedFiles",
474        default,
475        skip_serializing_if = "Option::is_none"
476    )]
477    pub uploaded_files: Option<serde_json::Value>,
478    /// Meta data of uploaded files
479    #[serde(default, skip_serializing_if = "Vec::is_empty")]
480    pub meta: Vec<String>,
481}
482
483/// `GetConversationChannelListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
484#[derive(Debug, Clone, Default, Serialize, Deserialize)]
485pub struct GetConversationChannelListSuccessfulResponseDto {
486    /// Required by the API.
487    #[serde(rename = "conversationChannel")]
488    pub conversation_channel: ConversationChannelSchema,
489}
490
491/// `GetEmailTemplateResponseSchema` from the GoHighLevel OpenAPI spec.
492#[derive(Debug, Clone, Default, Serialize, Deserialize)]
493pub struct GetEmailTemplateResponseSchema {
494    #[serde(default, skip_serializing_if = "Option::is_none")]
495    pub id: Option<String>,
496    #[serde(default, skip_serializing_if = "Option::is_none")]
497    pub name: Option<String>,
498    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
499    pub type_: Option<String>,
500    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
501    pub date_added: Option<String>,
502    #[serde(default, skip_serializing_if = "Option::is_none")]
503    pub template: Option<EmailTemplateSchema>,
504    #[serde(
505        rename = "locationId",
506        default,
507        skip_serializing_if = "Option::is_none"
508    )]
509    pub location_id: Option<String>,
510}
511
512/// `GetLocationByIdSchema` from the GoHighLevel OpenAPI spec.
513#[derive(Debug, Clone, Default, Serialize, Deserialize)]
514pub struct GetLocationByIdSchema {
515    #[serde(default, skip_serializing_if = "Option::is_none")]
516    pub id: Option<String>,
517    #[serde(rename = "companyId", default, skip_serializing_if = "Option::is_none")]
518    pub company_id: Option<String>,
519    #[serde(default, skip_serializing_if = "Option::is_none")]
520    pub name: Option<String>,
521    #[serde(default, skip_serializing_if = "Option::is_none")]
522    pub domain: Option<String>,
523    #[serde(default, skip_serializing_if = "Option::is_none")]
524    pub address: Option<String>,
525    #[serde(default, skip_serializing_if = "Option::is_none")]
526    pub city: Option<String>,
527    #[serde(default, skip_serializing_if = "Option::is_none")]
528    pub state: Option<String>,
529    #[serde(rename = "logoUrl", default, skip_serializing_if = "Option::is_none")]
530    pub logo_url: Option<String>,
531    #[serde(default, skip_serializing_if = "Option::is_none")]
532    pub country: Option<String>,
533    #[serde(
534        rename = "postalCode",
535        default,
536        skip_serializing_if = "Option::is_none"
537    )]
538    pub postal_code: Option<String>,
539    #[serde(default, skip_serializing_if = "Option::is_none")]
540    pub website: Option<String>,
541    #[serde(default, skip_serializing_if = "Option::is_none")]
542    pub timezone: Option<String>,
543    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
544    pub first_name: Option<String>,
545    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
546    pub last_name: Option<String>,
547    #[serde(default, skip_serializing_if = "Option::is_none")]
548    pub email: Option<String>,
549    #[serde(default, skip_serializing_if = "Option::is_none")]
550    pub phone: Option<String>,
551    #[serde(default, skip_serializing_if = "Option::is_none")]
552    pub business: Option<BusinessSchema>,
553    #[serde(default, skip_serializing_if = "Option::is_none")]
554    pub social: Option<SocialSchema>,
555    #[serde(default, skip_serializing_if = "Option::is_none")]
556    pub settings: Option<SettingsSchema>,
557    #[serde(default, skip_serializing_if = "Option::is_none")]
558    pub reseller: Option<serde_json::Value>,
559}
560
561/// `GetLocationByIdSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
562#[derive(Debug, Clone, Default, Serialize, Deserialize)]
563pub struct GetLocationByIdSuccessfulResponseDto {
564    #[serde(default, skip_serializing_if = "Option::is_none")]
565    pub location: Option<GetLocationByIdSchema>,
566}
567
568/// `GetLocationSchema` from the GoHighLevel OpenAPI spec.
569#[derive(Debug, Clone, Default, Serialize, Deserialize)]
570pub struct GetLocationSchema {
571    /// Location Id
572    #[serde(default, skip_serializing_if = "Option::is_none")]
573    pub id: Option<String>,
574    /// The name for the sub-account/location
575    #[serde(default, skip_serializing_if = "Option::is_none")]
576    pub name: Option<String>,
577    /// The phone number of the business for which sub-account is created
578    #[serde(default, skip_serializing_if = "Option::is_none")]
579    pub phone: Option<String>,
580    /// The email for the sub-account/location
581    #[serde(default, skip_serializing_if = "Option::is_none")]
582    pub email: Option<String>,
583    /// The address of the business for which sub-account is created
584    #[serde(default, skip_serializing_if = "Option::is_none")]
585    pub address: Option<String>,
586    /// The city where the business is located for which sub-account is created
587    #[serde(default, skip_serializing_if = "Option::is_none")]
588    pub city: Option<String>,
589    /// The state in which the business operates for which sub-account is created
590    #[serde(default, skip_serializing_if = "Option::is_none")]
591    pub state: Option<String>,
592    /// The country in which the business is present for which sub-account is created
593    #[serde(default, skip_serializing_if = "Option::is_none")]
594    pub country: Option<String>,
595    /// The postal code of the business for which sub-account is created
596    #[serde(
597        rename = "postalCode",
598        default,
599        skip_serializing_if = "Option::is_none"
600    )]
601    pub postal_code: Option<String>,
602    /// The website of the business for which sub-account is created
603    #[serde(default, skip_serializing_if = "Option::is_none")]
604    pub website: Option<String>,
605    /// The timezone of the business for which sub-account is created
606    #[serde(default, skip_serializing_if = "Option::is_none")]
607    pub timezone: Option<String>,
608    /// The default settings for location
609    #[serde(default, skip_serializing_if = "Option::is_none")]
610    pub settings: Option<SettingsSchema>,
611    /// The social media links for location
612    #[serde(default, skip_serializing_if = "Option::is_none")]
613    pub social: Option<SocialSchema>,
614}
615
616/// `GetSmsTemplateResponseSchema` from the GoHighLevel OpenAPI spec.
617#[derive(Debug, Clone, Default, Serialize, Deserialize)]
618pub struct GetSmsTemplateResponseSchema {
619    #[serde(default, skip_serializing_if = "Option::is_none")]
620    pub id: Option<String>,
621    #[serde(default, skip_serializing_if = "Option::is_none")]
622    pub name: Option<String>,
623    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
624    pub type_: Option<String>,
625    #[serde(default, skip_serializing_if = "Option::is_none")]
626    pub template: Option<SmsTemplateSchema>,
627    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
628    pub date_added: Option<String>,
629    #[serde(
630        rename = "locationId",
631        default,
632        skip_serializing_if = "Option::is_none"
633    )]
634    pub location_id: Option<String>,
635    #[serde(
636        rename = "urlAttachments",
637        default,
638        skip_serializing_if = "Vec::is_empty"
639    )]
640    pub url_attachments: Vec<String>,
641}
642
643/// `GetTemplatesSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
644#[derive(Debug, Clone, Default, Serialize, Deserialize)]
645pub struct GetTemplatesSuccessfulResponseDto {
646    /// Multiple possible shapes in the spec; raw JSON.
647    #[serde(default, skip_serializing_if = "Vec::is_empty")]
648    pub templates: Vec<serde_json::Value>,
649    #[serde(
650        rename = "totalCount",
651        default,
652        skip_serializing_if = "Option::is_none"
653    )]
654    pub total_count: Option<f64>,
655}
656
657/// `LocationDeletedSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
658#[derive(Debug, Clone, Default, Serialize, Deserialize)]
659pub struct LocationDeletedSuccessfulResponseDto {
660    /// Success status of the API
661    /// Required by the API.
662    pub success: bool,
663    /// Success message of the API
664    /// Required by the API.
665    pub message: String,
666}
667
668/// `LocationTagDeleteSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
669#[derive(Debug, Clone, Default, Serialize, Deserialize)]
670pub struct LocationTagDeleteSuccessfulResponseDto {
671    #[serde(default, skip_serializing_if = "Option::is_none")]
672    pub succeded: Option<bool>,
673}
674
675/// `LocationTagSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
676#[derive(Debug, Clone, Default, Serialize, Deserialize)]
677pub struct LocationTagSuccessfulResponseDto {
678    #[serde(default, skip_serializing_if = "Option::is_none")]
679    pub tag: Option<LocationTagsSchema>,
680}
681
682/// `LocationTagsSchema` from the GoHighLevel OpenAPI spec.
683#[derive(Debug, Clone, Default, Serialize, Deserialize)]
684pub struct LocationTagsSchema {
685    #[serde(default, skip_serializing_if = "Option::is_none")]
686    pub name: Option<String>,
687    #[serde(
688        rename = "locationId",
689        default,
690        skip_serializing_if = "Option::is_none"
691    )]
692    pub location_id: Option<String>,
693    #[serde(default, skip_serializing_if = "Option::is_none")]
694    pub id: Option<String>,
695}
696
697/// `LocationTagsSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
698#[derive(Debug, Clone, Default, Serialize, Deserialize)]
699pub struct LocationTagsSuccessfulResponseDto {
700    #[serde(default, skip_serializing_if = "Vec::is_empty")]
701    pub tags: Vec<LocationTagsSchema>,
702}
703
704/// `LocationTaskListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
705#[derive(Debug, Clone, Default, Serialize, Deserialize)]
706pub struct LocationTaskListSuccessfulResponseDto {
707    #[serde(default, skip_serializing_if = "Vec::is_empty")]
708    pub tasks: Vec<Vec<serde_json::Value>>,
709}
710
711/// `MailgunSchema` from the GoHighLevel OpenAPI spec.
712#[derive(Debug, Clone, Default, Serialize, Deserialize)]
713pub struct MailgunSchema {
714    /// API key provided by Mailgun
715    /// Required by the API.
716    #[serde(rename = "apiKey")]
717    pub api_key: String,
718    /// Domain connected with Mailgun
719    /// Required by the API.
720    pub domain: String,
721}
722
723/// `PermissionsResponseDto` from the GoHighLevel OpenAPI spec.
724#[derive(Debug, Clone, Default, Serialize, Deserialize)]
725pub struct PermissionsResponseDto {
726    /// Enabled permission names for the sub-account
727    /// Allowed values: `2-way-text-messaging`, `gmb-messaging`, `web-chat`,
728    /// `reputation-management`, `facebook-messenger`, `gmb-call-tracking`,
729    /// `missed-call-text-back`, `text-to-pay`, `calendar`, `crm`, `opportunities`,
730    /// `email-marketing`.
731    /// Required by the API.
732    #[serde(default, skip_serializing_if = "Vec::is_empty")]
733    pub permissions: Vec<String>,
734}
735
736/// `ProspectInfoDto` from the GoHighLevel OpenAPI spec.
737#[derive(Debug, Clone, Default, Serialize, Deserialize)]
738pub struct ProspectInfoDto {
739    /// First name of the prospect
740    /// Required by the API.
741    #[serde(rename = "firstName")]
742    pub first_name: String,
743    /// Last name of the prospect
744    /// Required by the API.
745    #[serde(rename = "lastName")]
746    pub last_name: String,
747    /// Email of the prospect
748    /// Required by the API.
749    pub email: String,
750}
751
752/// `RecurringTaskCreateDTO` from the GoHighLevel OpenAPI spec.
753#[derive(Debug, Clone, Default, Serialize, Deserialize)]
754pub struct RecurringTaskCreateDTO {
755    /// Name of the task
756    /// Required by the API.
757    pub title: String,
758    /// Description of the task
759    #[serde(default, skip_serializing_if = "Option::is_none")]
760    pub description: Option<String>,
761    /// Contact Id
762    #[serde(rename = "contactIds", default, skip_serializing_if = "Vec::is_empty")]
763    pub contact_ids: Vec<String>,
764    /// Assigned To
765    #[serde(default, skip_serializing_if = "Vec::is_empty")]
766    pub owners: Vec<String>,
767    /// Recurring rules
768    /// Required by the API.
769    #[serde(rename = "rruleOptions")]
770    pub rrule_options: CustomRRulesOptions,
771    /// Create initial task or not
772    #[serde(
773        rename = "ignoreTaskCreation",
774        default,
775        skip_serializing_if = "Option::is_none"
776    )]
777    pub ignore_task_creation: Option<bool>,
778}
779
780/// `RecurringTaskResponseDTO` from the GoHighLevel OpenAPI spec.
781#[derive(Debug, Clone, Default, Serialize, Deserialize)]
782pub struct RecurringTaskResponseDTO {
783    /// Recurring Task Id
784    /// Required by the API.
785    pub id: String,
786    /// Name of the task
787    /// Required by the API.
788    pub title: String,
789    /// Description of the task
790    /// Required by the API.
791    pub description: String,
792    /// Location Id
793    /// Required by the API.
794    #[serde(rename = "locationId")]
795    pub location_id: String,
796    /// Updated At
797    /// Required by the API.
798    #[serde(rename = "updatedAt")]
799    pub updated_at: String,
800    /// Created At
801    /// Required by the API.
802    #[serde(rename = "createdAt")]
803    pub created_at: String,
804    /// Recurring rules
805    /// Required by the API.
806    #[serde(rename = "rruleOptions")]
807    pub rrule_options: CustomRRulesOptions,
808    /// Total Occurrence
809    /// Required by the API.
810    #[serde(rename = "totalOccurrence")]
811    pub total_occurrence: f64,
812    /// Deleted
813    /// Required by the API.
814    pub deleted: bool,
815    /// Assigned To
816    #[serde(
817        rename = "assignedTo",
818        default,
819        skip_serializing_if = "Option::is_none"
820    )]
821    pub assigned_to: Option<String>,
822    /// Contact Id
823    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
824    pub contact_id: Option<String>,
825}
826
827/// `RecurringTaskSingleResponseDTO` from the GoHighLevel OpenAPI spec.
828#[derive(Debug, Clone, Default, Serialize, Deserialize)]
829pub struct RecurringTaskSingleResponseDTO {
830    /// Recurring Tasks
831    /// Required by the API.
832    #[serde(rename = "recurringTask")]
833    pub recurring_task: RecurringTaskResponseDTO,
834}
835
836/// `RecurringTaskUpdateDTO` from the GoHighLevel OpenAPI spec.
837#[derive(Debug, Clone, Default, Serialize, Deserialize)]
838pub struct RecurringTaskUpdateDTO {
839    /// Name of the task
840    #[serde(default, skip_serializing_if = "Option::is_none")]
841    pub title: Option<String>,
842    /// Description of the task
843    #[serde(default, skip_serializing_if = "Option::is_none")]
844    pub description: Option<String>,
845    /// Contact Id
846    #[serde(rename = "contactIds", default, skip_serializing_if = "Vec::is_empty")]
847    pub contact_ids: Vec<String>,
848    /// Assigned To
849    #[serde(default, skip_serializing_if = "Vec::is_empty")]
850    pub owners: Vec<String>,
851    /// Recurring rules
852    #[serde(
853        rename = "rruleOptions",
854        default,
855        skip_serializing_if = "Option::is_none"
856    )]
857    pub rrule_options: Option<CustomRRulesOptions>,
858    /// Create initial task or not
859    #[serde(
860        rename = "ignoreTaskCreation",
861        default,
862        skip_serializing_if = "Option::is_none"
863    )]
864    pub ignore_task_creation: Option<bool>,
865}
866
867/// `SearchSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
868#[derive(Debug, Clone, Default, Serialize, Deserialize)]
869pub struct SearchSuccessfulResponseDto {
870    #[serde(default, skip_serializing_if = "Vec::is_empty")]
871    pub locations: Vec<GetLocationSchema>,
872}
873
874/// `SettingsSchema` from the GoHighLevel OpenAPI spec.
875#[derive(Debug, Clone, Default, Serialize, Deserialize)]
876pub struct SettingsSchema {
877    #[serde(
878        rename = "allowDuplicateContact",
879        default,
880        skip_serializing_if = "Option::is_none"
881    )]
882    pub allow_duplicate_contact: Option<bool>,
883    #[serde(
884        rename = "allowDuplicateOpportunity",
885        default,
886        skip_serializing_if = "Option::is_none"
887    )]
888    pub allow_duplicate_opportunity: Option<bool>,
889    #[serde(
890        rename = "allowFacebookNameMerge",
891        default,
892        skip_serializing_if = "Option::is_none"
893    )]
894    pub allow_facebook_name_merge: Option<bool>,
895    #[serde(
896        rename = "disableContactTimezone",
897        default,
898        skip_serializing_if = "Option::is_none"
899    )]
900    pub disable_contact_timezone: Option<bool>,
901}
902
903/// `SmsTemplateSchema` from the GoHighLevel OpenAPI spec.
904#[derive(Debug, Clone, Default, Serialize, Deserialize)]
905pub struct SmsTemplateSchema {
906    #[serde(default, skip_serializing_if = "Option::is_none")]
907    pub body: Option<String>,
908    #[serde(default, skip_serializing_if = "Vec::is_empty")]
909    pub attachments: Vec<Vec<serde_json::Value>>,
910}
911
912/// `SnapshotPutSchema` from the GoHighLevel OpenAPI spec.
913#[derive(Debug, Clone, Default, Serialize, Deserialize)]
914pub struct SnapshotPutSchema {
915    /// Snaptshot ID
916    /// Required by the API.
917    pub id: String,
918    /// If you want override all conflicted assets then pass true. Default value is false.
919    #[serde(rename = "override", default, skip_serializing_if = "Option::is_none")]
920    pub override_: Option<bool>,
921}
922
923/// `SocialSchema` from the GoHighLevel OpenAPI spec.
924#[derive(Debug, Clone, Default, Serialize, Deserialize)]
925pub struct SocialSchema {
926    /// Facebook URL
927    #[serde(
928        rename = "facebookUrl",
929        default,
930        skip_serializing_if = "Option::is_none"
931    )]
932    pub facebook_url: Option<String>,
933    /// Googleplus URL
934    #[serde(
935        rename = "googlePlus",
936        default,
937        skip_serializing_if = "Option::is_none"
938    )]
939    pub google_plus: Option<String>,
940    /// LinkedIn URL
941    #[serde(rename = "linkedIn", default, skip_serializing_if = "Option::is_none")]
942    pub linked_in: Option<String>,
943    /// Foursquare URL
944    #[serde(default, skip_serializing_if = "Option::is_none")]
945    pub foursquare: Option<String>,
946    /// Twitter URL
947    #[serde(default, skip_serializing_if = "Option::is_none")]
948    pub twitter: Option<String>,
949    /// Yelp URL
950    #[serde(default, skip_serializing_if = "Option::is_none")]
951    pub yelp: Option<String>,
952    /// Instagram URL
953    #[serde(default, skip_serializing_if = "Option::is_none")]
954    pub instagram: Option<String>,
955    /// Instagram URL
956    #[serde(default, skip_serializing_if = "Option::is_none")]
957    pub youtube: Option<String>,
958    /// Instagram URL
959    #[serde(default, skip_serializing_if = "Option::is_none")]
960    pub pinterest: Option<String>,
961    /// Instagram URL
962    #[serde(rename = "blogRss", default, skip_serializing_if = "Option::is_none")]
963    pub blog_rss: Option<String>,
964    /// Google Business Places ID
965    #[serde(
966        rename = "googlePlacesId",
967        default,
968        skip_serializing_if = "Option::is_none"
969    )]
970    pub google_places_id: Option<String>,
971}
972
973/// `TaskSearchParamsDto` from the GoHighLevel OpenAPI spec.
974#[derive(Debug, Clone, Default, Serialize, Deserialize)]
975pub struct TaskSearchParamsDto {
976    /// Contact Ids
977    #[serde(rename = "contactId", default, skip_serializing_if = "Vec::is_empty")]
978    pub contact_id: Vec<String>,
979    /// Task Completed Or Pending
980    #[serde(default, skip_serializing_if = "Option::is_none")]
981    pub completed: Option<bool>,
982    /// Assigned User Ids
983    #[serde(rename = "assignedTo", default, skip_serializing_if = "Vec::is_empty")]
984    pub assigned_to: Vec<String>,
985    /// Search Value
986    #[serde(default, skip_serializing_if = "Option::is_none")]
987    pub query: Option<String>,
988    /// Limit To Api
989    #[serde(default, skip_serializing_if = "Option::is_none")]
990    pub limit: Option<f64>,
991    /// Number Of Tasks To Skip
992    #[serde(default, skip_serializing_if = "Option::is_none")]
993    pub skip: Option<f64>,
994    /// Bussiness Id
995    #[serde(
996        rename = "businessId",
997        default,
998        skip_serializing_if = "Option::is_none"
999    )]
1000    pub business_id: Option<String>,
1001}
1002
1003/// `TwilioSchema` from the GoHighLevel OpenAPI spec.
1004#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1005pub struct TwilioSchema {
1006    /// SID provided by Twilio
1007    /// Required by the API.
1008    pub sid: String,
1009    /// Auth token provided by Twilio
1010    /// Required by the API.
1011    #[serde(rename = "authToken")]
1012    pub auth_token: String,
1013}
1014
1015/// `UpdateCustomFieldsDTO` from the GoHighLevel OpenAPI spec.
1016#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1017pub struct UpdateCustomFieldsDTO {
1018    /// Required by the API.
1019    pub name: String,
1020    #[serde(default, skip_serializing_if = "Option::is_none")]
1021    pub placeholder: Option<String>,
1022    #[serde(
1023        rename = "acceptedFormat",
1024        default,
1025        skip_serializing_if = "Vec::is_empty"
1026    )]
1027    pub accepted_format: Vec<String>,
1028    #[serde(
1029        rename = "isMultipleFile",
1030        default,
1031        skip_serializing_if = "Option::is_none"
1032    )]
1033    pub is_multiple_file: Option<bool>,
1034    #[serde(
1035        rename = "maxNumberOfFiles",
1036        default,
1037        skip_serializing_if = "Option::is_none"
1038    )]
1039    pub max_number_of_files: Option<f64>,
1040    /// Multiple possible shapes in the spec; raw JSON.
1041    #[serde(
1042        rename = "textBoxListOptions",
1043        default,
1044        skip_serializing_if = "Vec::is_empty"
1045    )]
1046    pub text_box_list_options: Vec<serde_json::Value>,
1047    #[serde(default, skip_serializing_if = "Option::is_none")]
1048    pub position: Option<f64>,
1049    /// Model of the custom field you want to update
1050    /// Allowed values: `contact`, `opportunity`.
1051    #[serde(default, skip_serializing_if = "Option::is_none")]
1052    pub model: Option<String>,
1053}
1054
1055/// `UpdateLocationDto` from the GoHighLevel OpenAPI spec.
1056#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1057pub struct UpdateLocationDto {
1058    /// The name for the sub-account/location
1059    #[serde(default, skip_serializing_if = "Option::is_none")]
1060    pub name: Option<String>,
1061    /// The phone number of the business for which sub-account is created
1062    #[serde(default, skip_serializing_if = "Option::is_none")]
1063    pub phone: Option<String>,
1064    /// Company/Agency Id
1065    /// Required by the API.
1066    #[serde(rename = "companyId")]
1067    pub company_id: String,
1068    /// The address of the business for which sub-account is created
1069    #[serde(default, skip_serializing_if = "Option::is_none")]
1070    pub address: Option<String>,
1071    /// The city where the business is located for which sub-account is created
1072    #[serde(default, skip_serializing_if = "Option::is_none")]
1073    pub city: Option<String>,
1074    /// The state in which the business operates for which sub-account is created
1075    #[serde(default, skip_serializing_if = "Option::is_none")]
1076    pub state: Option<String>,
1077    /// The country in which the business is present for which sub-account is created
1078    /// Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`.
1079    #[serde(default, skip_serializing_if = "Option::is_none")]
1080    pub country: Option<String>,
1081    /// The postal code of the business for which sub-account is created
1082    #[serde(
1083        rename = "postalCode",
1084        default,
1085        skip_serializing_if = "Option::is_none"
1086    )]
1087    pub postal_code: Option<String>,
1088    /// The website of the business for which sub-account is created
1089    #[serde(default, skip_serializing_if = "Option::is_none")]
1090    pub website: Option<String>,
1091    /// The timezone of the business for which sub-account is created
1092    #[serde(default, skip_serializing_if = "Option::is_none")]
1093    pub timezone: Option<String>,
1094    #[serde(
1095        rename = "prospectInfo",
1096        default,
1097        skip_serializing_if = "Option::is_none"
1098    )]
1099    pub prospect_info: Option<ProspectInfoDto>,
1100    /// The default settings for location
1101    #[serde(default, skip_serializing_if = "Option::is_none")]
1102    pub settings: Option<SettingsSchema>,
1103    /// The social media links for location
1104    #[serde(default, skip_serializing_if = "Option::is_none")]
1105    pub social: Option<SocialSchema>,
1106    /// (DEPRECATED) The twilio credentials for location
1107    #[serde(default, skip_serializing_if = "Option::is_none")]
1108    pub twilio: Option<TwilioSchema>,
1109    /// The mailgun credentials for location
1110    #[serde(default, skip_serializing_if = "Option::is_none")]
1111    pub mailgun: Option<MailgunSchema>,
1112    /// The snapshot to be updated in the location.
1113    #[serde(default, skip_serializing_if = "Option::is_none")]
1114    pub snapshot: Option<SnapshotPutSchema>,
1115}
1116
1117/// `UpdatePermissionsDto` from the GoHighLevel OpenAPI spec.
1118#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1119pub struct UpdatePermissionsDto {
1120    /// Permission plan values to apply for the sub-account
1121    /// Allowed values: `2-way-text-messaging`, `gmb-messaging`, `web-chat`,
1122    /// `reputation-management`, `facebook-messenger`, `gmb-call-tracking`,
1123    /// `missed-call-text-back`, `text-to-pay`, `calendar`, `crm`, `opportunities`,
1124    /// `email-marketing`.
1125    /// Required by the API.
1126    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1127    pub permissions: Vec<String>,
1128}
1129
1130/// `customValuesDTO` from the GoHighLevel OpenAPI spec.
1131#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1132pub struct CustomValuesDTO {
1133    /// Required by the API.
1134    pub name: String,
1135    /// Required by the API.
1136    pub value: String,
1137}
1138
1139/// `tagBody` from the GoHighLevel OpenAPI spec.
1140#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1141pub struct TagBody {
1142    /// Tag name
1143    /// Required by the API.
1144    pub name: String,
1145}
1146
1147/// `textBoxListOptionsSchema` from the GoHighLevel OpenAPI spec.
1148#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1149pub struct TextBoxListOptionsSchema {
1150    #[serde(default, skip_serializing_if = "Option::is_none")]
1151    pub label: Option<String>,
1152    #[serde(
1153        rename = "prefillValue",
1154        default,
1155        skip_serializing_if = "Option::is_none"
1156    )]
1157    pub prefill_value: Option<String>,
1158}