Skip to main content

ghl_models/v3/
contacts.rs

1//! `contacts` data models for GoHighLevel API V3 (60 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Contacts** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`contacts` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/contacts.md).
7//!
8//! Enable with `features = ["contacts"]`.
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/// `AddContactToCampaignDto` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct AddContactToCampaignDto {
24    /// The spec defines no fields for this schema.
25    #[serde(flatten)]
26    pub extra: serde_json::Map<String, serde_json::Value>,
27}
28
29/// `AttributionSource` from the GoHighLevel OpenAPI spec.
30#[derive(Debug, Clone, Default, Serialize, Deserialize)]
31pub struct AttributionSource {
32    /// Attribution source type
33    /// Required by the API.
34    /// (Optional here so responses that omit it still parse.)
35    #[serde(default, skip_serializing_if = "Option::is_none")]
36    pub url: Option<String>,
37    /// Campaign name
38    #[serde(default, skip_serializing_if = "Option::is_none")]
39    pub campaign: Option<String>,
40    /// UTM source parameter
41    #[serde(rename = "utmSource", default, skip_serializing_if = "Option::is_none")]
42    pub utm_source: Option<String>,
43    /// UTM medium parameter
44    #[serde(rename = "utmMedium", default, skip_serializing_if = "Option::is_none")]
45    pub utm_medium: Option<String>,
46    /// UTM content parameter
47    #[serde(
48        rename = "utmContent",
49        default,
50        skip_serializing_if = "Option::is_none"
51    )]
52    pub utm_content: Option<String>,
53    /// Referrer URL
54    #[serde(default, skip_serializing_if = "Option::is_none")]
55    pub referrer: Option<String>,
56    /// Campaign Id
57    #[serde(
58        rename = "campaignId",
59        default,
60        skip_serializing_if = "Option::is_none"
61    )]
62    pub campaign_id: Option<String>,
63    /// Facebook click Id
64    #[serde(default, skip_serializing_if = "Option::is_none")]
65    pub fbclid: Option<String>,
66    /// Google click Id
67    #[serde(default, skip_serializing_if = "Option::is_none")]
68    pub gclid: Option<String>,
69    /// Microsoft click Id
70    #[serde(default, skip_serializing_if = "Option::is_none")]
71    pub msclikid: Option<String>,
72    /// DoubleClick click Id
73    #[serde(default, skip_serializing_if = "Option::is_none")]
74    pub dclid: Option<String>,
75    /// Facebook browser Id
76    #[serde(default, skip_serializing_if = "Option::is_none")]
77    pub fbc: Option<String>,
78    /// Facebook pixel Id
79    #[serde(default, skip_serializing_if = "Option::is_none")]
80    pub fbp: Option<String>,
81    /// Facebook event Id
82    #[serde(rename = "fbEventId", default, skip_serializing_if = "Option::is_none")]
83    pub fb_event_id: Option<String>,
84    /// Browser user agent string
85    #[serde(rename = "userAgent", default, skip_serializing_if = "Option::is_none")]
86    pub user_agent: Option<String>,
87    /// IP address of the visitor
88    #[serde(default, skip_serializing_if = "Option::is_none")]
89    pub ip: Option<String>,
90    /// Attribution medium (e.g. survey, funnel)
91    #[serde(default, skip_serializing_if = "Option::is_none")]
92    pub medium: Option<String>,
93    /// Id of the attribution medium
94    #[serde(rename = "mediumId", default, skip_serializing_if = "Option::is_none")]
95    pub medium_id: Option<String>,
96}
97
98/// `CheckboxField` from the GoHighLevel OpenAPI spec.
99#[derive(Debug, Clone, Default, Serialize, Deserialize)]
100pub struct CheckboxField {
101    /// Pass either `id` or `key` of custom field
102    /// Required by the API.
103    pub id: String,
104    /// Pass either `id` or `key` of custom field
105    #[serde(default, skip_serializing_if = "Option::is_none")]
106    pub key: Option<String>,
107    /// Array of selected checkbox values for the custom field (preferred).
108    #[serde(rename = "fieldValue", default, skip_serializing_if = "Vec::is_empty")]
109    pub field_value: Vec<String>,
110    /// Deprecated. Use `fieldValue` instead.
111    #[serde(rename = "field_value", default, skip_serializing_if = "Vec::is_empty")]
112    pub field_value_alt: Vec<String>,
113}
114
115/// `ContactsBulkUpateResponse` from the GoHighLevel OpenAPI spec.
116#[derive(Debug, Clone, Default, Serialize, Deserialize)]
117pub struct ContactsBulkUpateResponse {
118    /// Whether the bulk update was successful
119    /// Required by the API.
120    /// (Optional here so responses that omit it still parse.)
121    #[serde(default, skip_serializing_if = "Option::is_none")]
122    pub success: Option<bool>,
123    /// List of contact Ids that were updated
124    /// Required by the API.
125    /// (Optional here so responses that omit it still parse.)
126    #[serde(default, skip_serializing_if = "Vec::is_empty")]
127    pub ids: Vec<String>,
128}
129
130/// `ContactsBusinessUpdate` from the GoHighLevel OpenAPI spec.
131#[derive(Debug, Clone, Default, Serialize, Deserialize)]
132pub struct ContactsBusinessUpdate {
133    /// Location Id
134    /// Required by the API.
135    #[serde(rename = "locationId")]
136    pub location_id: String,
137    /// List of contact Ids to update (maximum 50)
138    /// Required by the API.
139    #[serde(default, skip_serializing_if = "Vec::is_empty")]
140    pub ids: Vec<String>,
141    /// Business Id to assign to contacts. Pass null to remove business association.
142    /// Required by the API.
143    #[serde(rename = "businessId")]
144    pub business_id: String,
145}
146
147/// `ContactsByIdSuccessfulResponseDtoV3` from the GoHighLevel OpenAPI spec.
148#[derive(Debug, Clone, Default, Serialize, Deserialize)]
149pub struct ContactsByIdSuccessfulResponseDtoV3 {
150    /// Contact details
151    #[serde(default, skip_serializing_if = "Option::is_none")]
152    pub contact: Option<GetContactByIdSchemaV3>,
153}
154
155/// `ContactsMetaSchema` from the GoHighLevel OpenAPI spec.
156#[derive(Debug, Clone, Default, Serialize, Deserialize)]
157pub struct ContactsMetaSchema {
158    #[serde(default, skip_serializing_if = "Option::is_none")]
159    pub total: Option<f64>,
160    #[serde(
161        rename = "nextPageUrl",
162        default,
163        skip_serializing_if = "Option::is_none"
164    )]
165    pub next_page_url: Option<String>,
166    #[serde(
167        rename = "startAfterId",
168        default,
169        skip_serializing_if = "Option::is_none"
170    )]
171    pub start_after_id: Option<String>,
172    #[serde(
173        rename = "startAfter",
174        default,
175        skip_serializing_if = "Option::is_none"
176    )]
177    pub start_after: Option<f64>,
178    #[serde(
179        rename = "currentPage",
180        default,
181        skip_serializing_if = "Option::is_none"
182    )]
183    pub current_page: Option<f64>,
184    #[serde(rename = "nextPage", default, skip_serializing_if = "Option::is_none")]
185    pub next_page: Option<f64>,
186    #[serde(rename = "prevPage", default, skip_serializing_if = "Option::is_none")]
187    pub prev_page: Option<f64>,
188}
189
190/// `ContactsSearchSchema` from the GoHighLevel OpenAPI spec.
191#[derive(Debug, Clone, Default, Serialize, Deserialize)]
192pub struct ContactsSearchSchema {
193    /// Unique identifier of the contact
194    #[serde(default, skip_serializing_if = "Option::is_none")]
195    pub id: Option<String>,
196    /// Location Id the contact belongs to
197    #[serde(
198        rename = "locationId",
199        default,
200        skip_serializing_if = "Option::is_none"
201    )]
202    pub location_id: Option<String>,
203    /// Email address of the contact
204    #[serde(default, skip_serializing_if = "Option::is_none")]
205    pub email: Option<String>,
206    /// Timezone of the contact
207    #[serde(default, skip_serializing_if = "Option::is_none")]
208    pub timezone: Option<String>,
209    /// Country of the contact
210    #[serde(default, skip_serializing_if = "Option::is_none")]
211    pub country: Option<String>,
212    /// Source from which the contact was created
213    #[serde(default, skip_serializing_if = "Option::is_none")]
214    pub source: Option<String>,
215    /// Date and time the contact was added (ISO 8601)
216    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
217    pub date_added: Option<String>,
218    /// List of custom field values for the contact
219    #[serde(
220        rename = "customFields",
221        default,
222        skip_serializing_if = "Vec::is_empty"
223    )]
224    pub custom_fields: Vec<CustomFieldSchema>,
225    /// List of tags associated with the contact
226    #[serde(default, skip_serializing_if = "Vec::is_empty")]
227    pub tags: Vec<String>,
228    /// Business Id the contact is associated with
229    #[serde(
230        rename = "businessId",
231        default,
232        skip_serializing_if = "Option::is_none"
233    )]
234    pub business_id: Option<String>,
235    /// List of attribution sources for the contact
236    #[serde(default, skip_serializing_if = "Vec::is_empty")]
237    pub attributions: Vec<AttributionSource>,
238    /// List of user Ids following this contact
239    #[serde(default, skip_serializing_if = "Vec::is_empty")]
240    pub followers: Vec<String>,
241}
242
243/// `ContactsSearchSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
244#[derive(Debug, Clone, Default, Serialize, Deserialize)]
245pub struct ContactsSearchSuccessfulResponseDto {
246    /// List of contacts associated with the business
247    #[serde(default, skip_serializing_if = "Vec::is_empty")]
248    pub contacts: Vec<ContactsSearchSchema>,
249    /// Total number of contacts matching the query
250    #[serde(default, skip_serializing_if = "Option::is_none")]
251    pub count: Option<f64>,
252}
253
254/// `ContactsWorkflowSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
255#[derive(Debug, Clone, Default, Serialize, Deserialize)]
256pub struct ContactsWorkflowSuccessfulResponseDto {
257    /// Whether the workflow operation was successful
258    #[serde(default, skip_serializing_if = "Option::is_none")]
259    pub succeeded: Option<bool>,
260    /// Legacy misspelling of `succeeded`. Deprecated; use `succeeded`.
261    #[serde(default, skip_serializing_if = "Option::is_none")]
262    pub succeded: Option<bool>,
263}
264
265/// `CreateAddFollowersSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
266#[derive(Debug, Clone, Default, Serialize, Deserialize)]
267pub struct CreateAddFollowersSuccessfulResponseDto {
268    /// Current followers after the operation
269    #[serde(default, skip_serializing_if = "Vec::is_empty")]
270    pub followers: Vec<String>,
271    /// Followers that were added
272    #[serde(
273        rename = "followersAdded",
274        default,
275        skip_serializing_if = "Vec::is_empty"
276    )]
277    pub followers_added: Vec<String>,
278}
279
280/// `CreateAddTagSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
281#[derive(Debug, Clone, Default, Serialize, Deserialize)]
282pub struct CreateAddTagSuccessfulResponseDto {
283    /// Current tags on the contact after the operation
284    #[serde(default, skip_serializing_if = "Vec::is_empty")]
285    pub tags: Vec<String>,
286}
287
288/// `CreateContactDtoV3` from the GoHighLevel OpenAPI spec.
289#[derive(Debug, Clone, Default, Serialize, Deserialize)]
290pub struct CreateContactDtoV3 {
291    /// First name of the contact
292    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
293    pub first_name: Option<String>,
294    /// Last name of the contact
295    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
296    pub last_name: Option<String>,
297    /// Full name of the contact
298    #[serde(default, skip_serializing_if = "Option::is_none")]
299    pub name: Option<String>,
300    /// Email address of the contact
301    #[serde(default, skip_serializing_if = "Option::is_none")]
302    pub email: Option<String>,
303    /// Location Id the contact should be created under
304    /// Required by the API.
305    #[serde(rename = "locationId")]
306    pub location_id: String,
307    /// Gender of the contact
308    #[serde(default, skip_serializing_if = "Option::is_none")]
309    pub gender: Option<String>,
310    /// Phone number of the contact
311    #[serde(default, skip_serializing_if = "Option::is_none")]
312    pub phone: Option<String>,
313    /// Street address of the contact
314    #[serde(default, skip_serializing_if = "Option::is_none")]
315    pub address1: Option<String>,
316    /// City of the contact
317    #[serde(default, skip_serializing_if = "Option::is_none")]
318    pub city: Option<String>,
319    /// State of the contact
320    #[serde(default, skip_serializing_if = "Option::is_none")]
321    pub state: Option<String>,
322    /// Postal code of the contact
323    #[serde(
324        rename = "postalCode",
325        default,
326        skip_serializing_if = "Option::is_none"
327    )]
328    pub postal_code: Option<String>,
329    /// Website URL of the contact
330    #[serde(default, skip_serializing_if = "Option::is_none")]
331    pub website: Option<String>,
332    /// Timezone of the contact
333    #[serde(default, skip_serializing_if = "Option::is_none")]
334    pub timezone: Option<String>,
335    /// Whether Do Not Disturb is enabled for the contact
336    #[serde(default, skip_serializing_if = "Option::is_none")]
337    pub dnd: Option<bool>,
338    /// Inbound DND settings per channel for the contact
339    #[serde(
340        rename = "inboundDndSettings",
341        default,
342        skip_serializing_if = "Option::is_none"
343    )]
344    pub inbound_dnd_settings: Option<InboundDndSettingsSchema>,
345    /// List of tags to assign to the contact
346    #[serde(default, skip_serializing_if = "Vec::is_empty")]
347    pub tags: Vec<String>,
348    /// List of custom field values to assign to the contact
349    /// Multiple possible shapes in the spec; raw JSON.
350    #[serde(
351        rename = "customFields",
352        default,
353        skip_serializing_if = "Vec::is_empty"
354    )]
355    pub custom_fields: Vec<serde_json::Value>,
356    /// Source from which the contact was created
357    #[serde(default, skip_serializing_if = "Option::is_none")]
358    pub source: Option<String>,
359    /// The birth date of the contact. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD,
360    /// MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, YYYY_MM_DD, MM_DD_YYYY
361    #[serde(
362        rename = "dateOfBirth",
363        default,
364        skip_serializing_if = "Option::is_none"
365    )]
366    pub date_of_birth: Option<serde_json::Value>,
367    /// Country code of the contact (ISO 3166-1 alpha-2)
368    #[serde(default, skip_serializing_if = "Option::is_none")]
369    pub country: Option<String>,
370    /// Company name of the contact
371    #[serde(
372        rename = "companyName",
373        default,
374        skip_serializing_if = "Option::is_none"
375    )]
376    pub company_name: Option<String>,
377    /// User's Id
378    #[serde(
379        rename = "assignedTo",
380        default,
381        skip_serializing_if = "Option::is_none"
382    )]
383    pub assigned_to: Option<String>,
384    /// Per-channel DND settings for the contact
385    #[serde(
386        rename = "dndSettings",
387        default,
388        skip_serializing_if = "Option::is_none"
389    )]
390    pub dnd_settings: Option<DndSettingsSchemaV3>,
391}
392
393/// `CreateContactsSuccessfulResponseDtoV3` from the GoHighLevel OpenAPI spec.
394#[derive(Debug, Clone, Default, Serialize, Deserialize)]
395pub struct CreateContactsSuccessfulResponseDtoV3 {
396    /// Contact details
397    #[serde(default, skip_serializing_if = "Option::is_none")]
398    pub contact: Option<GetContactByIdSchemaV3>,
399}
400
401/// `CreateDeleteCantactsCampaignsSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
402#[derive(Debug, Clone, Default, Serialize, Deserialize)]
403pub struct CreateDeleteCantactsCampaignsSuccessfulResponseDto {
404    /// Whether the campaign operation was successful
405    #[serde(default, skip_serializing_if = "Option::is_none")]
406    pub succeeded: Option<bool>,
407    /// Legacy misspelling of `succeeded`. Deprecated; use `succeeded`.
408    #[serde(default, skip_serializing_if = "Option::is_none")]
409    pub succeded: Option<bool>,
410}
411
412/// `CreateDeleteTagSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
413#[derive(Debug, Clone, Default, Serialize, Deserialize)]
414pub struct CreateDeleteTagSuccessfulResponseDto {
415    /// Current tags on the contact after the operation
416    #[serde(default, skip_serializing_if = "Vec::is_empty")]
417    pub tags: Vec<String>,
418}
419
420/// `CreateTaskParams` from the GoHighLevel OpenAPI spec.
421#[derive(Debug, Clone, Default, Serialize, Deserialize)]
422pub struct CreateTaskParams {
423    /// Title of the task
424    /// Required by the API.
425    pub title: String,
426    /// Body or description of the task
427    #[serde(default, skip_serializing_if = "Option::is_none")]
428    pub body: Option<String>,
429    /// Due date of the task (ISO 8601 format)
430    /// Required by the API.
431    #[serde(rename = "dueDate")]
432    pub due_date: String,
433    /// Whether the task is completed
434    /// Required by the API.
435    pub completed: bool,
436    /// User Id to whom the task is assigned
437    #[serde(
438        rename = "assignedTo",
439        default,
440        skip_serializing_if = "Option::is_none"
441    )]
442    pub assigned_to: Option<String>,
443}
444
445/// `CreateWorkflowDto` from the GoHighLevel OpenAPI spec.
446#[derive(Debug, Clone, Default, Serialize, Deserialize)]
447pub struct CreateWorkflowDto {
448    /// Start time of the workflow event (ISO 8601 format)
449    #[serde(
450        rename = "eventStartTime",
451        default,
452        skip_serializing_if = "Option::is_none"
453    )]
454    pub event_start_time: Option<String>,
455}
456
457/// `CustomFieldSchema` from the GoHighLevel OpenAPI spec.
458#[derive(Debug, Clone, Default, Serialize, Deserialize)]
459pub struct CustomFieldSchema {
460    /// Unique identifier of the custom field
461    #[serde(default, skip_serializing_if = "Option::is_none")]
462    pub id: Option<String>,
463    /// Value of the custom field
464    #[serde(default, skip_serializing_if = "Option::is_none")]
465    pub value: Option<String>,
466}
467
468/// `DeleteContactsSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
469#[derive(Debug, Clone, Default, Serialize, Deserialize)]
470pub struct DeleteContactsSuccessfulResponseDto {
471    /// Whether the delete operation succeeded
472    #[serde(default, skip_serializing_if = "Option::is_none")]
473    pub succeeded: Option<bool>,
474    /// Legacy misspelling of `succeeded`. Deprecated; use `succeeded`.
475    #[serde(default, skip_serializing_if = "Option::is_none")]
476    pub succeded: Option<bool>,
477}
478
479/// `DeleteFollowersSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
480#[derive(Debug, Clone, Default, Serialize, Deserialize)]
481pub struct DeleteFollowersSuccessfulResponseDto {
482    /// Current followers after the operation
483    #[serde(default, skip_serializing_if = "Vec::is_empty")]
484    pub followers: Vec<String>,
485    /// Followers that were removed
486    #[serde(
487        rename = "followersRemoved",
488        default,
489        skip_serializing_if = "Vec::is_empty"
490    )]
491    pub followers_removed: Vec<String>,
492}
493
494/// `DeleteNoteSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
495#[derive(Debug, Clone, Default, Serialize, Deserialize)]
496pub struct DeleteNoteSuccessfulResponseDto {
497    /// Whether the note was successfully deleted
498    #[serde(default, skip_serializing_if = "Option::is_none")]
499    pub succeeded: Option<bool>,
500    /// Legacy misspelling of `succeeded`. Deprecated; use `succeeded`.
501    #[serde(default, skip_serializing_if = "Option::is_none")]
502    pub succeded: Option<bool>,
503}
504
505/// `DeleteTaskSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
506#[derive(Debug, Clone, Default, Serialize, Deserialize)]
507pub struct DeleteTaskSuccessfulResponseDto {
508    /// Whether the task was successfully deleted
509    #[serde(default, skip_serializing_if = "Option::is_none")]
510    pub succeeded: Option<bool>,
511    /// Legacy misspelling of `succeeded`. Deprecated; use `succeeded`.
512    #[serde(default, skip_serializing_if = "Option::is_none")]
513    pub succeded: Option<bool>,
514}
515
516/// `DndSettingSchema` from the GoHighLevel OpenAPI spec.
517#[derive(Debug, Clone, Default, Serialize, Deserialize)]
518pub struct DndSettingSchema {
519    /// Do Not Disturb status for this channel
520    /// Allowed values: `active`, `inactive`, `permanent`.
521    /// Required by the API.
522    /// (Optional here so responses that omit it still parse.)
523    #[serde(default, skip_serializing_if = "Option::is_none")]
524    pub status: Option<String>,
525    /// Custom message associated with the DND setting
526    #[serde(default, skip_serializing_if = "Option::is_none")]
527    pub message: Option<String>,
528    /// DND code or reason
529    #[serde(default, skip_serializing_if = "Option::is_none")]
530    pub code: Option<String>,
531}
532
533/// `DndSettingsSchemaV3` from the GoHighLevel OpenAPI spec.
534#[derive(Debug, Clone, Default, Serialize, Deserialize)]
535pub struct DndSettingsSchemaV3 {
536    /// DND settings for phone calls
537    #[serde(default, skip_serializing_if = "Option::is_none")]
538    pub call: Option<DndSettingSchema>,
539    /// DND settings for email
540    #[serde(default, skip_serializing_if = "Option::is_none")]
541    pub email: Option<DndSettingSchema>,
542    /// DND settings for SMS
543    #[serde(default, skip_serializing_if = "Option::is_none")]
544    pub sms: Option<DndSettingSchema>,
545    /// DND settings for WhatsApp
546    #[serde(rename = "whatsApp", default, skip_serializing_if = "Option::is_none")]
547    pub whats_app: Option<DndSettingSchema>,
548    /// DND settings for Google My Business
549    #[serde(default, skip_serializing_if = "Option::is_none")]
550    pub gmb: Option<DndSettingSchema>,
551    /// DND settings for Facebook
552    #[serde(default, skip_serializing_if = "Option::is_none")]
553    pub fb: Option<DndSettingSchema>,
554}
555
556/// `FileField` from the GoHighLevel OpenAPI spec.
557#[derive(Debug, Clone, Default, Serialize, Deserialize)]
558pub struct FileField {
559    /// Pass either `id` or `key` of custom field
560    /// Required by the API.
561    pub id: String,
562    /// Pass either `id` or `key` of custom field
563    #[serde(default, skip_serializing_if = "Option::is_none")]
564    pub key: Option<String>,
565    /// File upload value — a map of UUID to file metadata and download URL (preferred).
566    #[serde(
567        rename = "fieldValue",
568        default,
569        skip_serializing_if = "Option::is_none"
570    )]
571    pub field_value: Option<serde_json::Value>,
572    /// Deprecated. Use `fieldValue` instead.
573    #[serde(
574        rename = "field_value",
575        default,
576        skip_serializing_if = "Option::is_none"
577    )]
578    pub field_value_alt: Option<serde_json::Value>,
579}
580
581/// `FollowersDTO` from the GoHighLevel OpenAPI spec.
582#[derive(Debug, Clone, Default, Serialize, Deserialize)]
583pub struct FollowersDTO {
584    /// List of user Ids to follow or unfollow the contact
585    /// Required by the API.
586    #[serde(default, skip_serializing_if = "Vec::is_empty")]
587    pub followers: Vec<String>,
588}
589
590/// `GetContactByIdSchemaV3` from the GoHighLevel OpenAPI spec.
591#[derive(Debug, Clone, Default, Serialize, Deserialize)]
592pub struct GetContactByIdSchemaV3 {
593    /// Unique identifier of the contact
594    #[serde(default, skip_serializing_if = "Option::is_none")]
595    pub id: Option<String>,
596    /// Full name of the contact
597    #[serde(default, skip_serializing_if = "Option::is_none")]
598    pub name: Option<String>,
599    /// Location Id the contact belongs to
600    #[serde(
601        rename = "locationId",
602        default,
603        skip_serializing_if = "Option::is_none"
604    )]
605    pub location_id: Option<String>,
606    /// First name of the contact
607    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
608    pub first_name: Option<String>,
609    /// Last name of the contact
610    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
611    pub last_name: Option<String>,
612    /// Email address of the contact
613    #[serde(default, skip_serializing_if = "Option::is_none")]
614    pub email: Option<String>,
615    /// Lowercase version of the contact email
616    #[serde(
617        rename = "emailLowerCase",
618        default,
619        skip_serializing_if = "Option::is_none"
620    )]
621    pub email_lower_case: Option<String>,
622    /// Timezone of the contact
623    #[serde(default, skip_serializing_if = "Option::is_none")]
624    pub timezone: Option<String>,
625    /// Company name of the contact
626    #[serde(
627        rename = "companyName",
628        default,
629        skip_serializing_if = "Option::is_none"
630    )]
631    pub company_name: Option<String>,
632    /// Phone number of the contact
633    #[serde(default, skip_serializing_if = "Option::is_none")]
634    pub phone: Option<String>,
635    /// Whether Do Not Disturb is enabled for the contact
636    #[serde(default, skip_serializing_if = "Option::is_none")]
637    pub dnd: Option<bool>,
638    /// Contact type classification
639    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
640    pub type_: Option<String>,
641    /// Source from which the contact was created
642    #[serde(default, skip_serializing_if = "Option::is_none")]
643    pub source: Option<String>,
644    /// User Id the contact is assigned to
645    #[serde(
646        rename = "assignedTo",
647        default,
648        skip_serializing_if = "Option::is_none"
649    )]
650    pub assigned_to: Option<String>,
651    /// Street address of the contact
652    #[serde(default, skip_serializing_if = "Option::is_none")]
653    pub address1: Option<String>,
654    /// City of the contact
655    #[serde(default, skip_serializing_if = "Option::is_none")]
656    pub city: Option<String>,
657    /// State of the contact
658    #[serde(default, skip_serializing_if = "Option::is_none")]
659    pub state: Option<String>,
660    /// Country of the contact
661    #[serde(default, skip_serializing_if = "Option::is_none")]
662    pub country: Option<String>,
663    /// Postal code of the contact
664    #[serde(
665        rename = "postalCode",
666        default,
667        skip_serializing_if = "Option::is_none"
668    )]
669    pub postal_code: Option<String>,
670    /// Website URL of the contact
671    #[serde(default, skip_serializing_if = "Option::is_none")]
672    pub website: Option<String>,
673    /// List of tags associated with the contact
674    #[serde(default, skip_serializing_if = "Vec::is_empty")]
675    pub tags: Vec<String>,
676    /// Date of birth of the contact (YYYY-MM-DD)
677    #[serde(
678        rename = "dateOfBirth",
679        default,
680        skip_serializing_if = "Option::is_none"
681    )]
682    pub date_of_birth: Option<String>,
683    /// Date and time the contact was added (ISO 8601)
684    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
685    pub date_added: Option<String>,
686    /// Date and time the contact was last updated (ISO 8601)
687    #[serde(
688        rename = "dateUpdated",
689        default,
690        skip_serializing_if = "Option::is_none"
691    )]
692    pub date_updated: Option<String>,
693    /// List of attachment URLs associated with the contact
694    #[serde(default, skip_serializing_if = "Option::is_none")]
695    pub attachments: Option<String>,
696    /// Social Security Number (if applicable)
697    #[serde(default, skip_serializing_if = "Option::is_none")]
698    pub ssn: Option<String>,
699    /// Search keyword associated with the contact
700    #[serde(default, skip_serializing_if = "Option::is_none")]
701    pub keyword: Option<String>,
702    /// Lowercase version of the contact first name
703    #[serde(
704        rename = "firstNameLowerCase",
705        default,
706        skip_serializing_if = "Option::is_none"
707    )]
708    pub first_name_lower_case: Option<String>,
709    /// Lowercase version of the contact full name
710    #[serde(
711        rename = "fullNameLowerCase",
712        default,
713        skip_serializing_if = "Option::is_none"
714    )]
715    pub full_name_lower_case: Option<String>,
716    /// Lowercase version of the contact last name
717    #[serde(
718        rename = "lastNameLowerCase",
719        default,
720        skip_serializing_if = "Option::is_none"
721    )]
722    pub last_name_lower_case: Option<String>,
723    /// Date and time of last activity on this contact (ISO 8601)
724    #[serde(
725        rename = "lastActivity",
726        default,
727        skip_serializing_if = "Option::is_none"
728    )]
729    pub last_activity: Option<String>,
730    /// List of custom field values for the contact
731    #[serde(
732        rename = "customFields",
733        default,
734        skip_serializing_if = "Vec::is_empty"
735    )]
736    pub custom_fields: Vec<CustomFieldSchema>,
737    /// Business Id the contact is associated with
738    #[serde(
739        rename = "businessId",
740        default,
741        skip_serializing_if = "Option::is_none"
742    )]
743    pub business_id: Option<String>,
744    /// First-touch attribution source details for the contact
745    #[serde(
746        rename = "attributionSource",
747        default,
748        skip_serializing_if = "Option::is_none"
749    )]
750    pub attribution_source: Option<AttributionSource>,
751    /// Last-touch attribution source details for the contact
752    #[serde(
753        rename = "lastAttributionSource",
754        default,
755        skip_serializing_if = "Option::is_none"
756    )]
757    pub last_attribution_source: Option<AttributionSource>,
758    /// visitorId is the Unique ID assigned to each Live chat visitor.
759    #[serde(rename = "visitorId", default, skip_serializing_if = "Option::is_none")]
760    pub visitor_id: Option<String>,
761    /// Per-channel DND settings for the contact
762    #[serde(
763        rename = "dndSettings",
764        default,
765        skip_serializing_if = "Option::is_none"
766    )]
767    pub dnd_settings: Option<DndSettingsSchemaV3>,
768}
769
770/// `GetCreateUpdateNoteSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
771#[derive(Debug, Clone, Default, Serialize, Deserialize)]
772pub struct GetCreateUpdateNoteSuccessfulResponseDto {
773    /// Note details
774    #[serde(default, skip_serializing_if = "Option::is_none")]
775    pub note: Option<GetNoteSchema>,
776}
777
778/// `GetEventSchema` from the GoHighLevel OpenAPI spec.
779#[derive(Debug, Clone, Default, Serialize, Deserialize)]
780pub struct GetEventSchema {
781    /// Unique identifier of the appointment
782    #[serde(default, skip_serializing_if = "Option::is_none")]
783    pub id: Option<String>,
784    /// Calendar Id associated with the appointment
785    #[serde(
786        rename = "calendarId",
787        default,
788        skip_serializing_if = "Option::is_none"
789    )]
790    pub calendar_id: Option<String>,
791    /// Status of the appointment
792    #[serde(default, skip_serializing_if = "Option::is_none")]
793    pub status: Option<String>,
794    /// Title of the appointment
795    #[serde(default, skip_serializing_if = "Option::is_none")]
796    pub title: Option<String>,
797    /// User Id assigned to the appointment
798    #[serde(
799        rename = "assignedUserId",
800        default,
801        skip_serializing_if = "Option::is_none"
802    )]
803    pub assigned_user_id: Option<String>,
804    /// Notes for the appointment
805    #[serde(default, skip_serializing_if = "Option::is_none")]
806    pub notes: Option<String>,
807    /// Start time of the appointment
808    #[serde(rename = "startTime", default, skip_serializing_if = "Option::is_none")]
809    pub start_time: Option<String>,
810    /// End time of the appointment
811    #[serde(rename = "endTime", default, skip_serializing_if = "Option::is_none")]
812    pub end_time: Option<String>,
813    /// Address for the appointment
814    #[serde(default, skip_serializing_if = "Option::is_none")]
815    pub address: Option<String>,
816    /// Location Id of the appointment
817    #[serde(
818        rename = "locationId",
819        default,
820        skip_serializing_if = "Option::is_none"
821    )]
822    pub location_id: Option<String>,
823    /// Contact Id associated with the appointment
824    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
825    pub contact_id: Option<String>,
826    /// Group Id of the appointment
827    #[serde(rename = "groupId", default, skip_serializing_if = "Option::is_none")]
828    pub group_id: Option<String>,
829    /// Appointment status
830    #[serde(
831        rename = "appointmentStatus",
832        default,
833        skip_serializing_if = "Option::is_none"
834    )]
835    pub appointment_status: Option<String>,
836    /// List of user Ids assigned to the appointment
837    #[serde(default, skip_serializing_if = "Vec::is_empty")]
838    pub users: Vec<String>,
839    /// Date the appointment was created
840    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
841    pub date_added: Option<String>,
842    /// Date the appointment was last updated
843    #[serde(
844        rename = "dateUpdated",
845        default,
846        skip_serializing_if = "Option::is_none"
847    )]
848    pub date_updated: Option<String>,
849    /// List of resource Ids assigned to the appointment
850    #[serde(
851        rename = "assignedResources",
852        default,
853        skip_serializing_if = "Vec::is_empty"
854    )]
855    pub assigned_resources: Vec<String>,
856}
857
858/// `GetEventsSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
859#[derive(Debug, Clone, Default, Serialize, Deserialize)]
860pub struct GetEventsSuccessfulResponseDto {
861    /// List of appointments
862    #[serde(default, skip_serializing_if = "Vec::is_empty")]
863    pub events: Vec<GetEventSchema>,
864}
865
866/// `GetNoteSchema` from the GoHighLevel OpenAPI spec.
867#[derive(Debug, Clone, Default, Serialize, Deserialize)]
868pub struct GetNoteSchema {
869    /// Unique identifier of the note
870    #[serde(default, skip_serializing_if = "Option::is_none")]
871    pub id: Option<String>,
872    /// Body content of the note
873    #[serde(default, skip_serializing_if = "Option::is_none")]
874    pub body: Option<String>,
875    /// User Id of the note author
876    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
877    pub user_id: Option<String>,
878    /// Date the note was added (ISO 8601 format)
879    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
880    pub date_added: Option<String>,
881    /// Contact Id associated with the note
882    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
883    pub contact_id: Option<String>,
884    /// Title of the note
885    #[serde(default, skip_serializing_if = "Option::is_none")]
886    pub title: Option<String>,
887    /// Hex color code for the note
888    #[serde(default, skip_serializing_if = "Option::is_none")]
889    pub color: Option<String>,
890    /// Whether the note is pinned
891    #[serde(default, skip_serializing_if = "Option::is_none")]
892    pub pinned: Option<bool>,
893}
894
895/// `GetNotesListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
896#[derive(Debug, Clone, Default, Serialize, Deserialize)]
897pub struct GetNotesListSuccessfulResponseDto {
898    /// List of notes
899    #[serde(default, skip_serializing_if = "Vec::is_empty")]
900    pub notes: Vec<GetNoteSchema>,
901}
902
903/// `InboundDndSettingSchema` from the GoHighLevel OpenAPI spec.
904#[derive(Debug, Clone, Default, Serialize, Deserialize)]
905pub struct InboundDndSettingSchema {
906    /// Inbound DND status for this channel
907    /// Allowed values: `active`, `inactive`.
908    /// Required by the API.
909    pub status: String,
910    /// Custom message associated with the inbound DND setting
911    #[serde(default, skip_serializing_if = "Option::is_none")]
912    pub message: Option<String>,
913}
914
915/// `InboundDndSettingsSchema` from the GoHighLevel OpenAPI spec.
916#[derive(Debug, Clone, Default, Serialize, Deserialize)]
917pub struct InboundDndSettingsSchema {
918    /// Inbound DND settings applied to all channels
919    #[serde(default, skip_serializing_if = "Option::is_none")]
920    pub all: Option<InboundDndSettingSchema>,
921}
922
923/// `LargeTextField` from the GoHighLevel OpenAPI spec.
924#[derive(Debug, Clone, Default, Serialize, Deserialize)]
925pub struct LargeTextField {
926    /// Pass either `id` or `key` of custom field
927    /// Required by the API.
928    pub id: String,
929    /// Pass either `id` or `key` of custom field
930    #[serde(default, skip_serializing_if = "Option::is_none")]
931    pub key: Option<String>,
932    /// Large text value for the custom field (preferred).
933    #[serde(
934        rename = "fieldValue",
935        default,
936        skip_serializing_if = "Option::is_none"
937    )]
938    pub field_value: Option<String>,
939    /// Deprecated. Use `fieldValue` instead.
940    #[serde(
941        rename = "field_value",
942        default,
943        skip_serializing_if = "Option::is_none"
944    )]
945    pub field_value_alt: Option<String>,
946}
947
948/// `MonetoryField` from the GoHighLevel OpenAPI spec.
949#[derive(Debug, Clone, Default, Serialize, Deserialize)]
950pub struct MonetoryField {
951    /// Pass either `id` or `key` of custom field
952    /// Required by the API.
953    pub id: String,
954    /// Pass either `id` or `key` of custom field
955    #[serde(default, skip_serializing_if = "Option::is_none")]
956    pub key: Option<String>,
957    /// Monetary value for the custom field (preferred).
958    #[serde(
959        rename = "fieldValue",
960        default,
961        skip_serializing_if = "Option::is_none"
962    )]
963    pub field_value: Option<serde_json::Value>,
964    /// Deprecated. Use `fieldValue` instead.
965    #[serde(
966        rename = "field_value",
967        default,
968        skip_serializing_if = "Option::is_none"
969    )]
970    pub field_value_alt: Option<serde_json::Value>,
971}
972
973/// `MultiSelectField` from the GoHighLevel OpenAPI spec.
974#[derive(Debug, Clone, Default, Serialize, Deserialize)]
975pub struct MultiSelectField {
976    /// Pass either `id` or `key` of custom field
977    /// Required by the API.
978    pub id: String,
979    /// Pass either `id` or `key` of custom field
980    #[serde(default, skip_serializing_if = "Option::is_none")]
981    pub key: Option<String>,
982    /// Array of selected values for the custom field (preferred).
983    #[serde(rename = "fieldValue", default, skip_serializing_if = "Vec::is_empty")]
984    pub field_value: Vec<String>,
985    /// Deprecated. Use `fieldValue` instead.
986    #[serde(rename = "field_value", default, skip_serializing_if = "Vec::is_empty")]
987    pub field_value_alt: Vec<String>,
988}
989
990/// `NotesDTO` from the GoHighLevel OpenAPI spec.
991#[derive(Debug, Clone, Default, Serialize, Deserialize)]
992pub struct NotesDTO {
993    /// User Id of the note author
994    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
995    pub user_id: Option<String>,
996    /// Body content of the note
997    /// Required by the API.
998    pub body: String,
999    /// Title of the note
1000    #[serde(default, skip_serializing_if = "Option::is_none")]
1001    pub title: Option<String>,
1002    /// Hex color code for the note
1003    #[serde(default, skip_serializing_if = "Option::is_none")]
1004    pub color: Option<String>,
1005    /// Whether the note is pinned
1006    #[serde(default, skip_serializing_if = "Option::is_none")]
1007    pub pinned: Option<bool>,
1008}
1009
1010/// `NumericField` from the GoHighLevel OpenAPI spec.
1011#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1012pub struct NumericField {
1013    /// Pass either `id` or `key` of custom field
1014    /// Required by the API.
1015    pub id: String,
1016    /// Pass either `id` or `key` of custom field
1017    #[serde(default, skip_serializing_if = "Option::is_none")]
1018    pub key: Option<String>,
1019    /// Numeric value for the custom field (preferred).
1020    #[serde(
1021        rename = "fieldValue",
1022        default,
1023        skip_serializing_if = "Option::is_none"
1024    )]
1025    pub field_value: Option<serde_json::Value>,
1026    /// Deprecated. Use `fieldValue` instead.
1027    #[serde(
1028        rename = "field_value",
1029        default,
1030        skip_serializing_if = "Option::is_none"
1031    )]
1032    pub field_value_alt: Option<serde_json::Value>,
1033}
1034
1035/// `RadioField` from the GoHighLevel OpenAPI spec.
1036#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1037pub struct RadioField {
1038    /// Pass either `id` or `key` of custom field
1039    /// Required by the API.
1040    pub id: String,
1041    /// Pass either `id` or `key` of custom field
1042    #[serde(default, skip_serializing_if = "Option::is_none")]
1043    pub key: Option<String>,
1044    /// Selected radio option value for the custom field (preferred).
1045    #[serde(
1046        rename = "fieldValue",
1047        default,
1048        skip_serializing_if = "Option::is_none"
1049    )]
1050    pub field_value: Option<String>,
1051    /// Deprecated. Use `fieldValue` instead.
1052    #[serde(
1053        rename = "field_value",
1054        default,
1055        skip_serializing_if = "Option::is_none"
1056    )]
1057    pub field_value_alt: Option<String>,
1058}
1059
1060/// `SearchBodyV2DTO` from the GoHighLevel OpenAPI spec.
1061#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1062pub struct SearchBodyV2DTO {
1063    /// The spec defines no fields for this schema.
1064    #[serde(flatten)]
1065    pub extra: serde_json::Map<String, serde_json::Value>,
1066}
1067
1068/// `SingleSelectField` from the GoHighLevel OpenAPI spec.
1069#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1070pub struct SingleSelectField {
1071    /// Pass either `id` or `key` of custom field
1072    /// Required by the API.
1073    pub id: String,
1074    /// Pass either `id` or `key` of custom field
1075    #[serde(default, skip_serializing_if = "Option::is_none")]
1076    pub key: Option<String>,
1077    /// Selected option value for the custom field (preferred).
1078    #[serde(
1079        rename = "fieldValue",
1080        default,
1081        skip_serializing_if = "Option::is_none"
1082    )]
1083    pub field_value: Option<String>,
1084    /// Deprecated. Use `fieldValue` instead.
1085    #[serde(
1086        rename = "field_value",
1087        default,
1088        skip_serializing_if = "Option::is_none"
1089    )]
1090    pub field_value_alt: Option<String>,
1091}
1092
1093/// `TagsDTO` from the GoHighLevel OpenAPI spec.
1094#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1095pub struct TagsDTO {
1096    /// List of tags to add or remove
1097    /// Required by the API.
1098    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1099    pub tags: Vec<String>,
1100}
1101
1102/// `TaskByIsSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
1103#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1104pub struct TaskByIsSuccessfulResponseDto {
1105    /// Task details
1106    #[serde(default, skip_serializing_if = "Option::is_none")]
1107    pub task: Option<TaskSchema>,
1108}
1109
1110/// `TaskSchema` from the GoHighLevel OpenAPI spec.
1111#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1112pub struct TaskSchema {
1113    /// Unique identifier of the task
1114    #[serde(default, skip_serializing_if = "Option::is_none")]
1115    pub id: Option<String>,
1116    /// Title of the task
1117    #[serde(default, skip_serializing_if = "Option::is_none")]
1118    pub title: Option<String>,
1119    /// Body or description of the task
1120    #[serde(default, skip_serializing_if = "Option::is_none")]
1121    pub body: Option<String>,
1122    /// User Id to whom the task is assigned
1123    #[serde(
1124        rename = "assignedTo",
1125        default,
1126        skip_serializing_if = "Option::is_none"
1127    )]
1128    pub assigned_to: Option<String>,
1129    /// Due date of the task (ISO 8601 format)
1130    #[serde(rename = "dueDate", default, skip_serializing_if = "Option::is_none")]
1131    pub due_date: Option<String>,
1132    /// Whether the task is completed
1133    #[serde(default, skip_serializing_if = "Option::is_none")]
1134    pub completed: Option<bool>,
1135    /// Contact Id associated with the task
1136    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
1137    pub contact_id: Option<String>,
1138}
1139
1140/// `TasksListSuccessfulResponseDto` from the GoHighLevel OpenAPI spec.
1141#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1142pub struct TasksListSuccessfulResponseDto {
1143    /// List of tasks
1144    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1145    pub tasks: Vec<TaskSchema>,
1146}
1147
1148/// `TextField` from the GoHighLevel OpenAPI spec.
1149#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1150pub struct TextField {
1151    /// Pass either `id` or `key` of custom field
1152    /// Required by the API.
1153    pub id: String,
1154    /// Pass either `id` or `key` of custom field
1155    #[serde(default, skip_serializing_if = "Option::is_none")]
1156    pub key: Option<String>,
1157    /// Text value for the custom field (preferred).
1158    #[serde(
1159        rename = "fieldValue",
1160        default,
1161        skip_serializing_if = "Option::is_none"
1162    )]
1163    pub field_value: Option<String>,
1164    /// Deprecated. Use `fieldValue` instead.
1165    #[serde(
1166        rename = "field_value",
1167        default,
1168        skip_serializing_if = "Option::is_none"
1169    )]
1170    pub field_value_alt: Option<String>,
1171}
1172
1173/// `UpdateContactDtoV3` from the GoHighLevel OpenAPI spec.
1174#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1175pub struct UpdateContactDtoV3 {
1176    /// First name of the contact
1177    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
1178    pub first_name: Option<String>,
1179    /// Last name of the contact
1180    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
1181    pub last_name: Option<String>,
1182    /// Full name of the contact
1183    #[serde(default, skip_serializing_if = "Option::is_none")]
1184    pub name: Option<String>,
1185    /// Email address of the contact
1186    #[serde(default, skip_serializing_if = "Option::is_none")]
1187    pub email: Option<String>,
1188    /// Phone number of the contact
1189    #[serde(default, skip_serializing_if = "Option::is_none")]
1190    pub phone: Option<String>,
1191    /// Street address of the contact
1192    #[serde(default, skip_serializing_if = "Option::is_none")]
1193    pub address1: Option<String>,
1194    /// City of the contact
1195    #[serde(default, skip_serializing_if = "Option::is_none")]
1196    pub city: Option<String>,
1197    /// State of the contact
1198    #[serde(default, skip_serializing_if = "Option::is_none")]
1199    pub state: Option<String>,
1200    /// Postal code of the contact
1201    #[serde(
1202        rename = "postalCode",
1203        default,
1204        skip_serializing_if = "Option::is_none"
1205    )]
1206    pub postal_code: Option<String>,
1207    /// Website URL of the contact
1208    #[serde(default, skip_serializing_if = "Option::is_none")]
1209    pub website: Option<String>,
1210    /// Timezone of the contact
1211    #[serde(default, skip_serializing_if = "Option::is_none")]
1212    pub timezone: Option<String>,
1213    /// Whether Do Not Disturb is enabled for the contact
1214    #[serde(default, skip_serializing_if = "Option::is_none")]
1215    pub dnd: Option<bool>,
1216    /// Inbound DND settings per channel for the contact
1217    #[serde(
1218        rename = "inboundDndSettings",
1219        default,
1220        skip_serializing_if = "Option::is_none"
1221    )]
1222    pub inbound_dnd_settings: Option<InboundDndSettingsSchema>,
1223    /// This field will overwrite all current tags associated with the contact. To update a
1224    /// tags, it is recommended to use the Add Tag or Remove Tag API instead.
1225    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1226    pub tags: Vec<String>,
1227    /// List of custom field values to assign to the contact
1228    /// Multiple possible shapes in the spec; raw JSON.
1229    #[serde(
1230        rename = "customFields",
1231        default,
1232        skip_serializing_if = "Vec::is_empty"
1233    )]
1234    pub custom_fields: Vec<serde_json::Value>,
1235    /// Source from which the contact was updated
1236    #[serde(default, skip_serializing_if = "Option::is_none")]
1237    pub source: Option<String>,
1238    /// The birth date of the contact. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD,
1239    /// MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, YYYY_MM_DD, MM_DD_YYYY
1240    #[serde(
1241        rename = "dateOfBirth",
1242        default,
1243        skip_serializing_if = "Option::is_none"
1244    )]
1245    pub date_of_birth: Option<serde_json::Value>,
1246    /// Country code of the contact (ISO 3166-1 alpha-2), Refer country list from documentaion,
1247    /// documentation has list of all countries
1248    #[serde(default, skip_serializing_if = "Option::is_none")]
1249    pub country: Option<String>,
1250    /// User's Id
1251    #[serde(
1252        rename = "assignedTo",
1253        default,
1254        skip_serializing_if = "Option::is_none"
1255    )]
1256    pub assigned_to: Option<String>,
1257    /// Per-channel DND settings for the contact
1258    #[serde(
1259        rename = "dndSettings",
1260        default,
1261        skip_serializing_if = "Option::is_none"
1262    )]
1263    pub dnd_settings: Option<DndSettingsSchemaV3>,
1264}
1265
1266/// `UpdateContactsSuccessfulResponseDtoV3` from the GoHighLevel OpenAPI spec.
1267#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1268pub struct UpdateContactsSuccessfulResponseDtoV3 {
1269    /// Whether the update operation succeeded
1270    #[serde(default, skip_serializing_if = "Option::is_none")]
1271    pub succeeded: Option<bool>,
1272    /// Contact details
1273    #[serde(default, skip_serializing_if = "Option::is_none")]
1274    pub contact: Option<GetContactByIdSchemaV3>,
1275}
1276
1277/// `UpdateNoteDTO` from the GoHighLevel OpenAPI spec.
1278#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1279pub struct UpdateNoteDTO {
1280    /// User Id of the note author
1281    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
1282    pub user_id: Option<String>,
1283    /// Body content of the note
1284    #[serde(default, skip_serializing_if = "Option::is_none")]
1285    pub body: Option<String>,
1286    /// Title of the note
1287    #[serde(default, skip_serializing_if = "Option::is_none")]
1288    pub title: Option<String>,
1289    /// Hex color code for the note
1290    #[serde(default, skip_serializing_if = "Option::is_none")]
1291    pub color: Option<String>,
1292    /// Whether the note is pinned
1293    #[serde(default, skip_serializing_if = "Option::is_none")]
1294    pub pinned: Option<bool>,
1295}
1296
1297/// `UpdateTagsDTO` from the GoHighLevel OpenAPI spec.
1298#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1299pub struct UpdateTagsDTO {
1300    /// list of contact ids to be processed
1301    /// Required by the API.
1302    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1303    pub contacts: Vec<String>,
1304    /// list of tags to be added or removed
1305    /// Required by the API.
1306    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1307    pub tags: Vec<String>,
1308    /// location id from where the bulk request is executed
1309    /// Required by the API.
1310    #[serde(rename = "locationId")]
1311    pub location_id: String,
1312    /// Option to implement remove all tags. if true, all tags will be removed from the
1313    /// contacts. Can only be used with remove type.
1314    #[serde(
1315        rename = "removeAllTags",
1316        default,
1317        skip_serializing_if = "Option::is_none"
1318    )]
1319    pub remove_all_tags: Option<bool>,
1320}
1321
1322/// `UpdateTagsResponseDTO` from the GoHighLevel OpenAPI spec.
1323#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1324pub struct UpdateTagsResponseDTO {
1325    /// Indicates if the operation was successful
1326    /// Required by the API.
1327    /// (Optional here so responses that omit it still parse.)
1328    #[serde(default, skip_serializing_if = "Option::is_none")]
1329    pub succeeded: Option<bool>,
1330    /// Legacy misspelling of `succeeded`. Deprecated; use `succeeded`.
1331    /// Required by the API.
1332    /// (Optional here so responses that omit it still parse.)
1333    #[serde(default, skip_serializing_if = "Option::is_none")]
1334    pub succeded: Option<bool>,
1335    /// Number of errors encountered during the operation
1336    /// Required by the API.
1337    /// (Optional here so responses that omit it still parse.)
1338    #[serde(
1339        rename = "errorCount",
1340        default,
1341        skip_serializing_if = "Option::is_none"
1342    )]
1343    pub error_count: Option<f64>,
1344    /// Responses for each contact processed
1345    /// Required by the API.
1346    /// (Optional here so responses that omit it still parse.)
1347    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1348    pub responses: Vec<String>,
1349}
1350
1351/// `UpdateTaskBody` from the GoHighLevel OpenAPI spec.
1352#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1353pub struct UpdateTaskBody {
1354    /// Title of the task
1355    #[serde(default, skip_serializing_if = "Option::is_none")]
1356    pub title: Option<String>,
1357    /// Body or description of the task
1358    #[serde(default, skip_serializing_if = "Option::is_none")]
1359    pub body: Option<String>,
1360    /// Due date of the task (ISO 8601 format)
1361    #[serde(rename = "dueDate", default, skip_serializing_if = "Option::is_none")]
1362    pub due_date: Option<String>,
1363    /// Whether the task is completed
1364    #[serde(default, skip_serializing_if = "Option::is_none")]
1365    pub completed: Option<bool>,
1366    /// User Id to whom the task is assigned
1367    #[serde(
1368        rename = "assignedTo",
1369        default,
1370        skip_serializing_if = "Option::is_none"
1371    )]
1372    pub assigned_to: Option<String>,
1373}
1374
1375/// `UpdateTaskStatusParams` from the GoHighLevel OpenAPI spec.
1376#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1377pub struct UpdateTaskStatusParams {
1378    /// Whether the task is completed
1379    /// Required by the API.
1380    pub completed: bool,
1381}
1382
1383/// `UpsertContactDtoV3` from the GoHighLevel OpenAPI spec.
1384#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1385pub struct UpsertContactDtoV3 {
1386    /// First name of the contact
1387    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
1388    pub first_name: Option<String>,
1389    /// Last name of the contact
1390    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
1391    pub last_name: Option<String>,
1392    /// Full name of the contact
1393    #[serde(default, skip_serializing_if = "Option::is_none")]
1394    pub name: Option<String>,
1395    /// Email address of the contact
1396    #[serde(default, skip_serializing_if = "Option::is_none")]
1397    pub email: Option<String>,
1398    /// Location Id the contact should be created under
1399    /// Required by the API.
1400    #[serde(rename = "locationId")]
1401    pub location_id: String,
1402    /// Gender of the contact
1403    #[serde(default, skip_serializing_if = "Option::is_none")]
1404    pub gender: Option<String>,
1405    /// Phone number of the contact
1406    #[serde(default, skip_serializing_if = "Option::is_none")]
1407    pub phone: Option<String>,
1408    /// Street address of the contact
1409    #[serde(default, skip_serializing_if = "Option::is_none")]
1410    pub address1: Option<String>,
1411    /// City of the contact
1412    #[serde(default, skip_serializing_if = "Option::is_none")]
1413    pub city: Option<String>,
1414    /// State of the contact
1415    #[serde(default, skip_serializing_if = "Option::is_none")]
1416    pub state: Option<String>,
1417    /// Postal code of the contact
1418    #[serde(
1419        rename = "postalCode",
1420        default,
1421        skip_serializing_if = "Option::is_none"
1422    )]
1423    pub postal_code: Option<String>,
1424    /// Website URL of the contact
1425    #[serde(default, skip_serializing_if = "Option::is_none")]
1426    pub website: Option<String>,
1427    /// Timezone of the contact
1428    #[serde(default, skip_serializing_if = "Option::is_none")]
1429    pub timezone: Option<String>,
1430    /// Whether Do Not Disturb is enabled for the contact
1431    #[serde(default, skip_serializing_if = "Option::is_none")]
1432    pub dnd: Option<bool>,
1433    /// Inbound DND settings per channel for the contact
1434    #[serde(
1435        rename = "inboundDndSettings",
1436        default,
1437        skip_serializing_if = "Option::is_none"
1438    )]
1439    pub inbound_dnd_settings: Option<InboundDndSettingsSchema>,
1440    /// This field will overwrite all current tags associated with the contact. To update a
1441    /// tags, it is recommended to use the Add Tag or Remove Tag API instead.
1442    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1443    pub tags: Vec<String>,
1444    /// List of custom field values to assign to the contact
1445    /// Multiple possible shapes in the spec; raw JSON.
1446    #[serde(
1447        rename = "customFields",
1448        default,
1449        skip_serializing_if = "Vec::is_empty"
1450    )]
1451    pub custom_fields: Vec<serde_json::Value>,
1452    /// Source from which the contact was created
1453    #[serde(default, skip_serializing_if = "Option::is_none")]
1454    pub source: Option<String>,
1455    /// The birth date of the contact. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD,
1456    /// MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, YYYY_MM_DD, MM_DD_YYYY
1457    #[serde(
1458        rename = "dateOfBirth",
1459        default,
1460        skip_serializing_if = "Option::is_none"
1461    )]
1462    pub date_of_birth: Option<serde_json::Value>,
1463    /// Country code of the contact (ISO 3166-1 alpha-2)
1464    #[serde(default, skip_serializing_if = "Option::is_none")]
1465    pub country: Option<String>,
1466    /// Company name of the contact
1467    #[serde(
1468        rename = "companyName",
1469        default,
1470        skip_serializing_if = "Option::is_none"
1471    )]
1472    pub company_name: Option<String>,
1473    /// User's Id
1474    #[serde(
1475        rename = "assignedTo",
1476        default,
1477        skip_serializing_if = "Option::is_none"
1478    )]
1479    pub assigned_to: Option<String>,
1480    /// Controls whether to create a new contact or update an existing duplicate. **Scenario
1481    /// 1:** If this value is `true` and the location allows duplicate contacts, a new contact
1482    /// will be created immediately without checking for duplicates. **Scenario 2:** If this
1483    /// value is `true` but the location does not allow duplicate contacts, this field is
1484    /// ignored and the normal upsert behavior applies: the API will search for an existing
1485    /// duplicate contact, update it if found, or create a new contact if not found. **Scenario
1486    /// 3:** If this value is `false` or not provided, the normal upsert behavior applies
1487    /// regardless of the location's duplicate contact setting.
1488    #[serde(
1489        rename = "createNewIfDuplicateAllowed",
1490        default,
1491        skip_serializing_if = "Option::is_none"
1492    )]
1493    pub create_new_if_duplicate_allowed: Option<bool>,
1494    /// Per-channel DND settings for the contact
1495    #[serde(
1496        rename = "dndSettings",
1497        default,
1498        skip_serializing_if = "Option::is_none"
1499    )]
1500    pub dnd_settings: Option<DndSettingsSchemaV3>,
1501}
1502
1503/// `UpsertContactsSuccessfulResponseDtoV3` from the GoHighLevel OpenAPI spec.
1504#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1505pub struct UpsertContactsSuccessfulResponseDtoV3 {
1506    /// Whether a new contact was created (true) or an existing one was updated (false)
1507    #[serde(default, skip_serializing_if = "Option::is_none")]
1508    pub new: Option<bool>,
1509    /// Contact details
1510    #[serde(default, skip_serializing_if = "Option::is_none")]
1511    pub contact: Option<GetContactByIdSchemaV3>,
1512    /// Unique trace identifier for this operation
1513    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1514    pub trace_id: Option<String>,
1515}
1516
1517/// `customFieldsInputArraySchema` from the GoHighLevel OpenAPI spec.
1518#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1519pub struct CustomFieldsInputArraySchema {
1520    /// Pass either `id` or `key` of custom field
1521    /// Required by the API.
1522    /// (Optional here so responses that omit it still parse.)
1523    #[serde(default, skip_serializing_if = "Option::is_none")]
1524    pub id: Option<String>,
1525    /// Pass either `id` or `key` of custom field
1526    #[serde(default, skip_serializing_if = "Option::is_none")]
1527    pub key: Option<String>,
1528    /// Array value for the custom field (preferred).
1529    #[serde(rename = "fieldValue", default, skip_serializing_if = "Vec::is_empty")]
1530    pub field_value: Vec<String>,
1531    /// Deprecated. Use `fieldValue` instead.
1532    #[serde(rename = "field_value", default, skip_serializing_if = "Vec::is_empty")]
1533    pub field_value_alt: Vec<String>,
1534}
1535
1536/// `customFieldsInputObjectSchema` from the GoHighLevel OpenAPI spec.
1537#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1538pub struct CustomFieldsInputObjectSchema {
1539    /// Pass either `id` or `key` of custom field
1540    /// Required by the API.
1541    /// (Optional here so responses that omit it still parse.)
1542    #[serde(default, skip_serializing_if = "Option::is_none")]
1543    pub id: Option<String>,
1544    /// Pass either `id` or `key` of custom field
1545    #[serde(default, skip_serializing_if = "Option::is_none")]
1546    pub key: Option<String>,
1547    /// Object value for the custom field (preferred).
1548    #[serde(
1549        rename = "fieldValue",
1550        default,
1551        skip_serializing_if = "Option::is_none"
1552    )]
1553    pub field_value: Option<serde_json::Value>,
1554    /// Deprecated. Use `fieldValue` instead.
1555    #[serde(
1556        rename = "field_value",
1557        default,
1558        skip_serializing_if = "Option::is_none"
1559    )]
1560    pub field_value_alt: Option<serde_json::Value>,
1561}
1562
1563/// `customFieldsInputStringSchema` from the GoHighLevel OpenAPI spec.
1564#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1565pub struct CustomFieldsInputStringSchema {
1566    /// Pass either `id` or `key` of custom field
1567    #[serde(default, skip_serializing_if = "Option::is_none")]
1568    pub id: Option<String>,
1569    /// Pass either `id` or `key` of custom field
1570    #[serde(default, skip_serializing_if = "Option::is_none")]
1571    pub key: Option<String>,
1572    /// Value for the custom field (preferred).
1573    #[serde(
1574        rename = "fieldValue",
1575        default,
1576        skip_serializing_if = "Option::is_none"
1577    )]
1578    pub field_value: Option<String>,
1579    /// Deprecated. Use `fieldValue` instead.
1580    #[serde(
1581        rename = "field_value",
1582        default,
1583        skip_serializing_if = "Option::is_none"
1584    )]
1585    pub field_value_alt: Option<String>,
1586}