Skip to main content

ghl_models/v3/
contacts.rs

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