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