Skip to main content

ghl_models/v2/
conversations.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/// `AddMessageAttachmentsDto` from the GoHighLevel OpenAPI spec.
14#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15pub struct AddMessageAttachmentsDto {
16    /// Array of attachment URLs to set on the message (replaces existing). Maximum 5 URLs.
17    /// Required by the API.
18    #[serde(default, skip_serializing_if = "Vec::is_empty")]
19    pub attachments: Vec<String>,
20}
21
22/// `CallDataDTO` from the GoHighLevel OpenAPI spec.
23#[derive(Debug, Clone, Default, Serialize, Deserialize)]
24pub struct CallDataDTO {
25    /// Phone number of the receiver
26    #[serde(default, skip_serializing_if = "Option::is_none")]
27    pub to: Option<String>,
28    /// Phone number of the dialer
29    #[serde(rename = "from", default, skip_serializing_if = "Option::is_none")]
30    pub from_: Option<String>,
31    /// Call status
32    /// Allowed values: `pending`, `completed`, `answered`, `busy`, `no-answer`, `failed`,
33    /// `canceled`, `voicemail`.
34    #[serde(default, skip_serializing_if = "Option::is_none")]
35    pub status: Option<String>,
36}
37
38/// `CancelScheduledResponseDto` from the GoHighLevel OpenAPI spec.
39#[derive(Debug, Clone, Default, Serialize, Deserialize)]
40pub struct CancelScheduledResponseDto {
41    /// HTTP Status code of the request
42    /// Required by the API.
43    pub status: f64,
44    /// Error message of the request
45    /// Required by the API.
46    pub message: String,
47}
48
49/// `CompleteFileUploadDto` from the GoHighLevel OpenAPI spec.
50#[derive(Debug, Clone, Default, Serialize, Deserialize)]
51pub struct CompleteFileUploadDto {
52    /// Upload ID from request response
53    /// Required by the API.
54    #[serde(rename = "uploadId")]
55    pub upload_id: String,
56    /// File path from request response
57    /// Required by the API.
58    #[serde(rename = "filePath")]
59    pub file_path: String,
60    /// Location ID
61    /// Required by the API.
62    #[serde(rename = "locationId")]
63    pub location_id: String,
64    /// Conversation ID
65    /// Required by the API.
66    #[serde(rename = "conversationId")]
67    pub conversation_id: String,
68    /// Original filename (for response mapping)
69    /// Required by the API.
70    pub filename: String,
71}
72
73/// `CompleteFileUploadResponseDto` from the GoHighLevel OpenAPI spec.
74#[derive(Debug, Clone, Default, Serialize, Deserialize)]
75pub struct CompleteFileUploadResponseDto {
76    /// Map of filename to public URL
77    /// Required by the API.
78    #[serde(rename = "uploadedFiles")]
79    pub uploaded_files: serde_json::Value,
80    /// File metadata
81    /// Required by the API.
82    pub metadata: serde_json::Value,
83}
84
85/// `ConversationCreateResponseDto` from the GoHighLevel OpenAPI spec.
86#[derive(Debug, Clone, Default, Serialize, Deserialize)]
87pub struct ConversationCreateResponseDto {
88    /// Unique identifier for the conversation
89    /// Required by the API.
90    pub id: String,
91    /// Date when the conversation was last updated
92    /// Required by the API.
93    #[serde(rename = "dateUpdated")]
94    pub date_updated: String,
95    /// Date when the conversation was created
96    /// Required by the API.
97    #[serde(rename = "dateAdded")]
98    pub date_added: String,
99    /// Flag indicating if this conversation has been deleted
100    /// Required by the API.
101    pub deleted: bool,
102    /// Unique identifier of the contact associated with this conversation
103    /// Required by the API.
104    #[serde(rename = "contactId")]
105    pub contact_id: String,
106    /// Unique identifier of the business location where this conversation takes place
107    /// Required by the API.
108    #[serde(rename = "locationId")]
109    pub location_id: String,
110    /// Date of the last message in the conversation
111    /// Required by the API.
112    #[serde(rename = "lastMessageDate")]
113    pub last_message_date: String,
114    /// Unique identifier of the team member assigned to this conversation
115    #[serde(
116        rename = "assignedTo",
117        default,
118        skip_serializing_if = "Option::is_none"
119    )]
120    pub assigned_to: Option<String>,
121}
122
123/// `ConversationDto` from the GoHighLevel OpenAPI spec.
124#[derive(Debug, Clone, Default, Serialize, Deserialize)]
125pub struct ConversationDto {
126    /// Contact ID as string
127    #[serde(default, skip_serializing_if = "Option::is_none")]
128    pub id: Option<String>,
129    /// Location ID as string
130    /// Required by the API.
131    #[serde(rename = "locationId")]
132    pub location_id: String,
133    /// Contact ID as string
134    /// Required by the API.
135    #[serde(rename = "contactId")]
136    pub contact_id: String,
137    /// Assigned User ID as string
138    #[serde(
139        rename = "assignedTo",
140        default,
141        skip_serializing_if = "Option::is_none"
142    )]
143    pub assigned_to: Option<String>,
144    /// User ID as string
145    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
146    pub user_id: Option<String>,
147    /// Last message body as string
148    #[serde(
149        rename = "lastMessageBody",
150        default,
151        skip_serializing_if = "Option::is_none"
152    )]
153    pub last_message_body: Option<String>,
154    /// Last message date as UTC
155    #[serde(
156        rename = "lastMessageDate",
157        default,
158        skip_serializing_if = "Option::is_none"
159    )]
160    pub last_message_date: Option<String>,
161    /// Type of the last message sent/received in the conversation.
162    /// Allowed values: `TYPE_CALL`, `TYPE_SMS`, `TYPE_RCS`, `TYPE_EMAIL`,
163    /// `TYPE_SMS_REVIEW_REQUEST`, `TYPE_WEBCHAT`, `TYPE_SMS_NO_SHOW_REQUEST`,
164    /// `TYPE_CAMPAIGN_SMS`, `TYPE_CAMPAIGN_CALL`, `TYPE_CAMPAIGN_EMAIL`,
165    /// `TYPE_CAMPAIGN_VOICEMAIL`, `TYPE_FACEBOOK`.
166    #[serde(
167        rename = "lastMessageType",
168        default,
169        skip_serializing_if = "Option::is_none"
170    )]
171    pub last_message_type: Option<String>,
172    /// Count of unread messages in the conversation
173    #[serde(
174        rename = "unreadCount",
175        default,
176        skip_serializing_if = "Option::is_none"
177    )]
178    pub unread_count: Option<f64>,
179    /// Inbox status of the conversation.
180    #[serde(default, skip_serializing_if = "Option::is_none")]
181    pub inbox: Option<bool>,
182    /// Starred status of the conversation.
183    #[serde(default, skip_serializing_if = "Option::is_none")]
184    pub starred: Option<bool>,
185    /// Deleted status of the conversation.
186    /// Required by the API.
187    pub deleted: bool,
188}
189
190/// `ConversationSchema` from the GoHighLevel OpenAPI spec.
191#[derive(Debug, Clone, Default, Serialize, Deserialize)]
192pub struct ConversationSchema {
193    /// Conversation Id
194    /// Required by the API.
195    pub id: String,
196    /// Contact Id
197    /// Required by the API.
198    #[serde(rename = "contactId")]
199    pub contact_id: String,
200    /// Location Id
201    /// Required by the API.
202    #[serde(rename = "locationId")]
203    pub location_id: String,
204    /// Content of the most recent message in the conversation
205    /// Required by the API.
206    #[serde(rename = "lastMessageBody")]
207    pub last_message_body: String,
208    /// Channel/type of the most recent message (SMS, Email, Call, etc)
209    /// Allowed values: `TYPE_CALL`, `TYPE_SMS`, `TYPE_RCS`, `TYPE_EMAIL`,
210    /// `TYPE_SMS_REVIEW_REQUEST`, `TYPE_WEBCHAT`, `TYPE_SMS_NO_SHOW_REQUEST`,
211    /// `TYPE_CAMPAIGN_SMS`, `TYPE_CAMPAIGN_CALL`, `TYPE_CAMPAIGN_EMAIL`,
212    /// `TYPE_CAMPAIGN_VOICEMAIL`, `TYPE_FACEBOOK`.
213    /// Required by the API.
214    #[serde(rename = "lastMessageType")]
215    pub last_message_type: String,
216    /// Primary channel/type of the conversation (Phone, Email, etc)
217    /// Allowed values: `TYPE_PHONE`, `TYPE_EMAIL`, `TYPE_FB_MESSENGER`, `TYPE_REVIEW`,
218    /// `TYPE_GROUP_SMS`.
219    /// Required by the API.
220    #[serde(rename = "type")]
221    pub type_: String,
222    /// Number of unread messages in this conversation
223    /// Required by the API.
224    #[serde(rename = "unreadCount")]
225    pub unread_count: f64,
226    /// Complete name of the contact (first and last name)
227    /// Required by the API.
228    #[serde(rename = "fullName")]
229    pub full_name: String,
230    /// Alternative display name for the contact - used when full name is not available
231    /// Required by the API.
232    #[serde(rename = "contactName")]
233    pub contact_name: String,
234    /// Primary email address of the contact
235    /// Required by the API.
236    pub email: String,
237    /// Primary phone number of the contact
238    /// Required by the API.
239    pub phone: String,
240}
241
242/// `CreateConversationDto` from the GoHighLevel OpenAPI spec.
243#[derive(Debug, Clone, Default, Serialize, Deserialize)]
244pub struct CreateConversationDto {
245    /// Location ID as string
246    /// Required by the API.
247    #[serde(rename = "locationId")]
248    pub location_id: String,
249    /// Contact ID as string
250    /// Required by the API.
251    #[serde(rename = "contactId")]
252    pub contact_id: String,
253}
254
255/// `CreateConversationSuccessResponse` from the GoHighLevel OpenAPI spec.
256#[derive(Debug, Clone, Default, Serialize, Deserialize)]
257pub struct CreateConversationSuccessResponse {
258    /// Indicates whether the API request was successful.
259    /// Required by the API.
260    pub success: bool,
261    /// Conversation data of the provided conversation ID.
262    /// Required by the API.
263    pub conversation: ConversationCreateResponseDto,
264}
265
266/// `CreateCustomSubtypeDto` from the GoHighLevel OpenAPI spec.
267#[derive(Debug, Clone, Default, Serialize, Deserialize)]
268pub struct CreateCustomSubtypeDto {
269    /// Name of the custom subtype (max 100 characters)
270    /// Required by the API.
271    pub name: String,
272    /// Description of the custom subtype (max 100 characters)
273    #[serde(default, skip_serializing_if = "Option::is_none")]
274    pub description: Option<String>,
275    /// Communication channel
276    /// Allowed values: `email`, `sms`.
277    /// Required by the API.
278    pub channel: String,
279    /// Language code
280    /// Required by the API.
281    pub language: String,
282}
283
284/// `CreateLiveChatMessageFeedbackResponse` from the GoHighLevel OpenAPI spec.
285#[derive(Debug, Clone, Default, Serialize, Deserialize)]
286pub struct CreateLiveChatMessageFeedbackResponse {
287    /// Required by the API.
288    pub success: bool,
289}
290
291/// `DeleteConversationSuccessfulResponse` from the GoHighLevel OpenAPI spec.
292#[derive(Debug, Clone, Default, Serialize, Deserialize)]
293pub struct DeleteConversationSuccessfulResponse {
294    /// Boolean value as the API response.
295    /// Required by the API.
296    pub success: bool,
297}
298
299/// `ErrorDto` from the GoHighLevel OpenAPI spec.
300#[derive(Debug, Clone, Default, Serialize, Deserialize)]
301pub struct ErrorDto {
302    /// Error Code
303    /// Required by the API.
304    pub code: String,
305    /// Error Type
306    /// Required by the API.
307    #[serde(rename = "type")]
308    pub type_: String,
309    /// Error Message
310    /// Required by the API.
311    pub message: String,
312}
313
314/// `ExportMessagesResponseDto` from the GoHighLevel OpenAPI spec.
315#[derive(Debug, Clone, Default, Serialize, Deserialize)]
316pub struct ExportMessagesResponseDto {
317    /// Array of messages
318    /// Required by the API.
319    #[serde(default, skip_serializing_if = "Vec::is_empty")]
320    pub messages: Vec<GetMessageResponseDto>,
321    /// Cursor for fetching next page. Null if no more results.
322    #[serde(
323        rename = "nextCursor",
324        default,
325        skip_serializing_if = "Option::is_none"
326    )]
327    pub next_cursor: Option<String>,
328    /// Total number of messages matching the query
329    /// Required by the API.
330    pub total: f64,
331}
332
333/// `ForwardConfigDto` from the GoHighLevel OpenAPI spec.
334#[derive(Debug, Clone, Default, Serialize, Deserialize)]
335pub struct ForwardConfigDto {
336    /// Specify if this is a forwarded email
337    /// Required by the API.
338    #[serde(rename = "isForwarded")]
339    pub is_forwarded: bool,
340    /// Specify if forwarding the whole thread or just a single email
341    #[serde(
342        rename = "forwardWholeThread",
343        default,
344        skip_serializing_if = "Option::is_none"
345    )]
346    pub forward_whole_thread: Option<bool>,
347    /// Message ID of the email thread being forwarded (source) - REQUIRED for forwarding
348    #[serde(rename = "messageId", default, skip_serializing_if = "Option::is_none")]
349    pub message_id: Option<String>,
350    /// Email Message ID of the specific email being forwarded (source) - Required for single
351    /// email forward, ignored for thread forward
352    #[serde(
353        rename = "emailMessageId",
354        default,
355        skip_serializing_if = "Option::is_none"
356    )]
357    pub email_message_id: Option<String>,
358    /// Contact ID where the forwarded email originated from (source) - Auto-populated if not
359    /// provided
360    #[serde(
361        rename = "sourceContactId",
362        default,
363        skip_serializing_if = "Option::is_none"
364    )]
365    pub source_contact_id: Option<String>,
366    /// Conversation ID where the forwarded email originated from (source) - Auto-populated if
367    /// not provided
368    #[serde(
369        rename = "sourceConversationId",
370        default,
371        skip_serializing_if = "Option::is_none"
372    )]
373    pub source_conversation_id: Option<String>,
374    /// Email address to forward to (destination)
375    #[serde(rename = "toEmail", default, skip_serializing_if = "Option::is_none")]
376    pub to_email: Option<String>,
377    /// Contact ID of recipient when forwarding (destination)
378    #[serde(
379        rename = "recipientContactId",
380        default,
381        skip_serializing_if = "Option::is_none"
382    )]
383    pub recipient_contact_id: Option<String>,
384    /// Conversation ID of recipient when forwarding (destination)
385    #[serde(
386        rename = "recipientConversationId",
387        default,
388        skip_serializing_if = "Option::is_none"
389    )]
390    pub recipient_conversation_id: Option<String>,
391}
392
393/// `ForwardResponseDto` from the GoHighLevel OpenAPI spec.
394#[derive(Debug, Clone, Default, Serialize, Deserialize)]
395pub struct ForwardResponseDto {
396    /// Whether the entire thread was forwarded
397    #[serde(
398        rename = "forwardWholeThread",
399        default,
400        skip_serializing_if = "Option::is_none"
401    )]
402    pub forward_whole_thread: Option<bool>,
403    /// Message ID of the forwarded message (source)
404    #[serde(rename = "messageId", default, skip_serializing_if = "Option::is_none")]
405    pub message_id: Option<String>,
406    /// Email Message ID of the forwarded email (source)
407    #[serde(
408        rename = "emailMessageId",
409        default,
410        skip_serializing_if = "Option::is_none"
411    )]
412    pub email_message_id: Option<String>,
413    /// Contact ID where the forwarded email originated from (source)
414    #[serde(
415        rename = "sourceContactId",
416        default,
417        skip_serializing_if = "Option::is_none"
418    )]
419    pub source_contact_id: Option<String>,
420    /// Conversation ID where the forwarded email originated from (source)
421    #[serde(
422        rename = "sourceConversationId",
423        default,
424        skip_serializing_if = "Option::is_none"
425    )]
426    pub source_conversation_id: Option<String>,
427    /// Email address the message was forwarded to (destination)
428    #[serde(
429        rename = "forwardToEmail",
430        default,
431        skip_serializing_if = "Option::is_none"
432    )]
433    pub forward_to_email: Option<String>,
434    /// Contact ID of the recipient of the forwarded email (destination)
435    #[serde(
436        rename = "recipientContactId",
437        default,
438        skip_serializing_if = "Option::is_none"
439    )]
440    pub recipient_contact_id: Option<String>,
441    /// Conversation ID of the recipient of the forwarded email (destination)
442    #[serde(
443        rename = "recipientConversationId",
444        default,
445        skip_serializing_if = "Option::is_none"
446    )]
447    pub recipient_conversation_id: Option<String>,
448}
449
450/// `GetConversationByIdResponse` from the GoHighLevel OpenAPI spec.
451#[derive(Debug, Clone, Default, Serialize, Deserialize)]
452pub struct GetConversationByIdResponse {
453    /// Unique identifier of the contact associated with this conversation
454    /// Required by the API.
455    #[serde(rename = "contactId")]
456    pub contact_id: String,
457    /// Unique identifier of the business location where this conversation takes place
458    /// Required by the API.
459    #[serde(rename = "locationId")]
460    pub location_id: String,
461    /// Flag indicating if this conversation has been moved to trash/deleted
462    /// Required by the API.
463    pub deleted: bool,
464    /// Flag indicating if this conversation is currently in the main inbox view
465    /// Required by the API.
466    pub inbox: bool,
467    /// Communication channel type for this conversation: 1 (Phone), 2 (Email), 3 (Facebook
468    /// Messenger), 4 (Review), 5 (Group SMS), 6 (Internal Chat - coming soon)
469    /// Required by the API.
470    #[serde(rename = "type")]
471    pub type_: f64,
472    /// Number of messages in this conversation that have not been read by the user
473    /// Required by the API.
474    #[serde(rename = "unreadCount")]
475    pub unread_count: f64,
476    /// Unique identifier of the team member currently responsible for handling this
477    /// conversation
478    #[serde(
479        rename = "assignedTo",
480        default,
481        skip_serializing_if = "Option::is_none"
482    )]
483    pub assigned_to: Option<String>,
484    /// Unique identifier for this specific conversation thread
485    /// Required by the API.
486    pub id: String,
487    /// Flag indicating if this conversation has been marked as important/starred by the user
488    #[serde(default, skip_serializing_if = "Option::is_none")]
489    pub starred: Option<bool>,
490}
491
492/// `GetConversationSuccessfulResponse` from the GoHighLevel OpenAPI spec.
493#[derive(Debug, Clone, Default, Serialize, Deserialize)]
494pub struct GetConversationSuccessfulResponse {
495    /// Boolean value as the API response.
496    /// Required by the API.
497    pub success: bool,
498    /// Conversation data of the provided conversation ID.
499    /// Required by the API.
500    pub conversation: ConversationDto,
501}
502
503/// `GetEmailMessageResponseDto` from the GoHighLevel OpenAPI spec.
504#[derive(Debug, Clone, Default, Serialize, Deserialize)]
505pub struct GetEmailMessageResponseDto {
506    /// Required by the API.
507    pub id: String,
508    /// External Id
509    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
510    pub alt_id: Option<String>,
511    /// Message Id or thread Id
512    /// Required by the API.
513    #[serde(rename = "threadId")]
514    pub thread_id: String,
515    /// Required by the API.
516    #[serde(rename = "locationId")]
517    pub location_id: String,
518    /// Required by the API.
519    #[serde(rename = "contactId")]
520    pub contact_id: String,
521    /// Required by the API.
522    #[serde(rename = "conversationId")]
523    pub conversation_id: String,
524    /// Required by the API.
525    #[serde(rename = "dateAdded")]
526    pub date_added: String,
527    #[serde(default, skip_serializing_if = "Option::is_none")]
528    pub subject: Option<String>,
529    /// Required by the API.
530    pub body: String,
531    /// Allowed values: `inbound`, `outbound`.
532    /// Required by the API.
533    pub direction: String,
534    /// Allowed values: `pending`, `scheduled`, `sent`, `delivered`, `read`, `undelivered`,
535    /// `connected`, `failed`, `opened`.
536    #[serde(default, skip_serializing_if = "Option::is_none")]
537    pub status: Option<String>,
538    /// Required by the API.
539    #[serde(rename = "contentType")]
540    pub content_type: String,
541    /// An array of attachment URLs.
542    #[serde(default, skip_serializing_if = "Vec::is_empty")]
543    pub attachments: Vec<String>,
544    #[serde(default, skip_serializing_if = "Option::is_none")]
545    pub provider: Option<String>,
546    /// Name and Email Id of the sender
547    /// Required by the API.
548    #[serde(rename = "from")]
549    pub from_: String,
550    /// List of email Ids of the receivers
551    /// Required by the API.
552    #[serde(default, skip_serializing_if = "Vec::is_empty")]
553    pub to: Vec<String>,
554    /// List of email Ids of the people in the cc field
555    #[serde(default, skip_serializing_if = "Vec::is_empty")]
556    pub cc: Vec<String>,
557    /// List of email Ids of the people in the bcc field
558    #[serde(default, skip_serializing_if = "Vec::is_empty")]
559    pub bcc: Vec<String>,
560    /// In case of reply, email message Id of the reply to email
561    #[serde(
562        rename = "replyToMessageId",
563        default,
564        skip_serializing_if = "Option::is_none"
565    )]
566    pub reply_to_message_id: Option<String>,
567    /// Email source
568    /// Allowed values: `workflow`, `bulk_actions`, `campaign`, `api`, `app`.
569    #[serde(default, skip_serializing_if = "Option::is_none")]
570    pub source: Option<String>,
571    /// Conversation provider ID
572    #[serde(
573        rename = "conversationProviderId",
574        default,
575        skip_serializing_if = "Option::is_none"
576    )]
577    pub conversation_provider_id: Option<String>,
578}
579
580/// `GetMessageResponseDto` from the GoHighLevel OpenAPI spec.
581#[derive(Debug, Clone, Default, Serialize, Deserialize)]
582pub struct GetMessageResponseDto {
583    /// Required by the API.
584    pub id: String,
585    /// Required by the API.
586    #[serde(rename = "type")]
587    pub type_: f64,
588    /// Type of the message as a string
589    /// Allowed values: `TYPE_CALL`, `TYPE_SMS`, `TYPE_RCS`, `TYPE_EMAIL`,
590    /// `TYPE_SMS_REVIEW_REQUEST`, `TYPE_WEBCHAT`, `TYPE_SMS_NO_SHOW_REQUEST`,
591    /// `TYPE_CAMPAIGN_SMS`, `TYPE_CAMPAIGN_CALL`, `TYPE_CAMPAIGN_EMAIL`,
592    /// `TYPE_CAMPAIGN_VOICEMAIL`, `TYPE_FACEBOOK`.
593    /// Required by the API.
594    #[serde(rename = "messageType")]
595    pub message_type: String,
596    /// Required by the API.
597    #[serde(rename = "locationId")]
598    pub location_id: String,
599    /// Required by the API.
600    #[serde(rename = "contactId")]
601    pub contact_id: String,
602    /// Required by the API.
603    #[serde(rename = "conversationId")]
604    pub conversation_id: String,
605    /// Required by the API.
606    #[serde(rename = "dateAdded")]
607    pub date_added: String,
608    #[serde(default, skip_serializing_if = "Option::is_none")]
609    pub body: Option<String>,
610    /// Allowed values: `inbound`, `outbound`.
611    /// Required by the API.
612    pub direction: String,
613    /// Allowed values: `connected`, `delivered`, `failed`, `opened`, `pending`, `read`,
614    /// `scheduled`, `sent`, `undelivered`, `clicked`, `opt_out`, `queued`.
615    #[serde(default, skip_serializing_if = "Option::is_none")]
616    pub status: Option<String>,
617    /// Required by the API.
618    #[serde(rename = "contentType")]
619    pub content_type: String,
620    /// An array of attachment URLs. Attachments will be empty for Call and Voicemails, type 1
621    /// and 10. Please use get call recording API to fetch call recording and voicemails.
622    #[serde(default, skip_serializing_if = "Vec::is_empty")]
623    pub attachments: Vec<String>,
624    #[serde(default, skip_serializing_if = "Option::is_none")]
625    pub meta: Option<MessageMeta>,
626    /// Message source
627    /// Allowed values: `workflow`, `bulk_actions`, `campaign`, `api`, `app`.
628    #[serde(default, skip_serializing_if = "Option::is_none")]
629    pub source: Option<String>,
630    /// User Id
631    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
632    pub user_id: Option<String>,
633    /// Conversation Provider Id
634    #[serde(
635        rename = "conversationProviderId",
636        default,
637        skip_serializing_if = "Option::is_none"
638    )]
639    pub conversation_provider_id: Option<String>,
640    /// Chat Widget Id
641    #[serde(
642        rename = "chatWidgetId",
643        default,
644        skip_serializing_if = "Option::is_none"
645    )]
646    pub chat_widget_id: Option<String>,
647}
648
649/// `GetMessageTranscriptionResponseDto` from the GoHighLevel OpenAPI spec.
650#[derive(Debug, Clone, Default, Serialize, Deserialize)]
651pub struct GetMessageTranscriptionResponseDto {
652    /// Media channel describes the user interaction channel
653    /// Required by the API.
654    #[serde(rename = "mediaChannel")]
655    pub media_channel: f64,
656    /// Index of the sentence in the transcription
657    /// Required by the API.
658    #[serde(rename = "sentenceIndex")]
659    pub sentence_index: f64,
660    /// Start time of the sentence in milliseconds
661    /// Required by the API.
662    #[serde(rename = "startTime")]
663    pub start_time: f64,
664    /// End time of the sentence in milliseconds
665    /// Required by the API.
666    #[serde(rename = "endTime")]
667    pub end_time: f64,
668    /// Transcript of the sentence
669    /// Required by the API.
670    pub transcript: String,
671    /// Confidence of the transcription
672    /// Required by the API.
673    pub confidence: f64,
674}
675
676/// `GetMessagesByConversationResponseDto` from the GoHighLevel OpenAPI spec.
677#[derive(Debug, Clone, Default, Serialize, Deserialize)]
678pub struct GetMessagesByConversationResponseDto {
679    /// Id of the last message in the messages array
680    /// Required by the API.
681    #[serde(rename = "lastMessageId")]
682    pub last_message_id: String,
683    /// Next page value true indicates only 20 message is in the response. Rest of the messages
684    /// are in the next page. Please use the lastMessageId value in the query to get the next
685    /// page messages
686    /// Required by the API.
687    #[serde(rename = "nextPage")]
688    pub next_page: bool,
689    /// Array of messages
690    /// Required by the API.
691    #[serde(default, skip_serializing_if = "Vec::is_empty")]
692    pub messages: Vec<GetMessageResponseDto>,
693}
694
695/// `InitiateFileUploadDto` from the GoHighLevel OpenAPI spec.
696#[derive(Debug, Clone, Default, Serialize, Deserialize)]
697pub struct InitiateFileUploadDto {
698    /// Location ID
699    /// Required by the API.
700    #[serde(rename = "locationId")]
701    pub location_id: String,
702    /// Conversation ID
703    /// Required by the API.
704    #[serde(rename = "conversationId")]
705    pub conversation_id: String,
706    /// Original filename with extension
707    /// Required by the API.
708    pub filename: String,
709    /// MIME type of the file
710    /// Required by the API.
711    #[serde(rename = "contentType")]
712    pub content_type: String,
713    /// File size in bytes (optional, for pre-validation)
714    #[serde(rename = "fileSize", default, skip_serializing_if = "Option::is_none")]
715    pub file_size: Option<f64>,
716    /// Channel type for size limits (WHATSAPP for 100MB limit, others for 5MB)
717    /// Required by the API.
718    pub channel: String,
719}
720
721/// `InitiateFileUploadResponseDto` from the GoHighLevel OpenAPI spec.
722#[derive(Debug, Clone, Default, Serialize, Deserialize)]
723pub struct InitiateFileUploadResponseDto {
724    /// Signed URL for direct upload to GCS. Use PUT request with file content.
725    /// Required by the API.
726    #[serde(rename = "uploadUrl")]
727    pub upload_url: String,
728    /// Unique upload ID for tracking and completing the upload
729    /// Required by the API.
730    #[serde(rename = "uploadId")]
731    pub upload_id: String,
732    /// File path in GCS bucket (needed for confirmation endpoint)
733    /// Required by the API.
734    #[serde(rename = "filePath")]
735    pub file_path: String,
736    /// URL expiration timestamp (Unix milliseconds)
737    /// Required by the API.
738    #[serde(rename = "expiresAt")]
739    pub expires_at: f64,
740    /// Maximum allowed file size in bytes
741    /// Required by the API.
742    #[serde(rename = "maxFileSize")]
743    pub max_file_size: f64,
744}
745
746/// `MessageMeta` from the GoHighLevel OpenAPI spec.
747#[derive(Debug, Clone, Default, Serialize, Deserialize)]
748pub struct MessageMeta {
749    /// Call duration in seconds
750    #[serde(
751        rename = "callDuration",
752        default,
753        skip_serializing_if = "Option::is_none"
754    )]
755    pub call_duration: Option<String>,
756    /// Call status - can be pending, completed, answered, busy, no-answer, failed, canceled, or
757    /// voicemail
758    /// Allowed values: `pending`, `completed`, `answered`, `busy`, `no-answer`, `failed`,
759    /// `canceled`, `voicemail`.
760    #[serde(
761        rename = "callStatus",
762        default,
763        skip_serializing_if = "Option::is_none"
764    )]
765    pub call_status: Option<String>,
766    /// meta will contain email, for message type 3 (email). messageIds is list of all email
767    /// message ids under the message thread
768    #[serde(default, skip_serializing_if = "Option::is_none")]
769    pub email: Option<serde_json::Value>,
770}
771
772/// `ProcessMessageBodyDto` from the GoHighLevel OpenAPI spec.
773#[derive(Debug, Clone, Default, Serialize, Deserialize)]
774pub struct ProcessMessageBodyDto {
775    /// Message Type
776    /// Allowed values: `SMS`, `RCS`, `Email`, `WhatsApp`, `GMB`, `IG`, `FB`, `Custom`,
777    /// `WebChat`, `Live_Chat`, `Call`, `IVR_Call`.
778    /// Required by the API.
779    #[serde(rename = "type")]
780    pub type_: String,
781    /// Array of attachments
782    #[serde(default, skip_serializing_if = "Vec::is_empty")]
783    pub attachments: Vec<String>,
784    /// Message Body
785    #[serde(default, skip_serializing_if = "Option::is_none")]
786    pub message: Option<String>,
787    /// Conversation Id
788    /// Required by the API.
789    #[serde(rename = "conversationId")]
790    pub conversation_id: String,
791    /// Contact Id
792    /// Required by the API.
793    #[serde(rename = "contactId")]
794    pub contact_id: String,
795    /// Conversation Provider Id
796    /// Required by the API.
797    #[serde(rename = "conversationProviderId")]
798    pub conversation_provider_id: String,
799    /// HTML Body of Email
800    #[serde(default, skip_serializing_if = "Option::is_none")]
801    pub html: Option<String>,
802    /// Subject of the Email
803    #[serde(default, skip_serializing_if = "Option::is_none")]
804    pub subject: Option<String>,
805    /// Email address to send from. This field is associated with the contact record and cannot
806    /// be dynamically changed.
807    #[serde(rename = "emailFrom", default, skip_serializing_if = "Option::is_none")]
808    pub email_from: Option<String>,
809    /// Recipient email address. This field is associated with the contact record and cannot be
810    /// dynamically changed.
811    #[serde(rename = "emailTo", default, skip_serializing_if = "Option::is_none")]
812    pub email_to: Option<String>,
813    /// List of email address to CC
814    #[serde(rename = "emailCc", default, skip_serializing_if = "Vec::is_empty")]
815    pub email_cc: Vec<String>,
816    /// List of email address to BCC
817    #[serde(rename = "emailBcc", default, skip_serializing_if = "Vec::is_empty")]
818    pub email_bcc: Vec<String>,
819    /// Send the email message id for which this email should be threaded. This is for replying
820    /// to a specific email
821    #[serde(
822        rename = "emailMessageId",
823        default,
824        skip_serializing_if = "Option::is_none"
825    )]
826    pub email_message_id: Option<String>,
827    /// external mail provider's message id
828    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
829    pub alt_id: Option<String>,
830    /// Message direction, if required can be set manually, default is outbound
831    #[serde(default, skip_serializing_if = "Option::is_none")]
832    pub direction: Option<serde_json::Value>,
833    /// Date of the inbound message
834    /// Format: date-time (ISO-8601 string).
835    #[serde(default, skip_serializing_if = "Option::is_none")]
836    pub date: Option<String>,
837    /// Phone call dialer and receiver information
838    #[serde(default, skip_serializing_if = "Option::is_none")]
839    pub call: Option<CallDataDTO>,
840}
841
842/// `ProcessMessageResponseDto` from the GoHighLevel OpenAPI spec.
843#[derive(Debug, Clone, Default, Serialize, Deserialize)]
844pub struct ProcessMessageResponseDto {
845    /// Required by the API.
846    pub success: bool,
847    /// Conversation ID.
848    /// Required by the API.
849    #[serde(rename = "conversationId")]
850    pub conversation_id: String,
851    /// This is the main Message ID
852    /// Required by the API.
853    #[serde(rename = "messageId")]
854    pub message_id: String,
855    /// Required by the API.
856    pub message: String,
857    #[serde(rename = "contactId", default, skip_serializing_if = "Option::is_none")]
858    pub contact_id: Option<String>,
859    /// Format: date-time (ISO-8601 string).
860    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
861    pub date_added: Option<String>,
862    #[serde(
863        rename = "emailMessageId",
864        default,
865        skip_serializing_if = "Option::is_none"
866    )]
867    pub email_message_id: Option<String>,
868}
869
870/// `ProcessOutboundMessageBodyDto` from the GoHighLevel OpenAPI spec.
871#[derive(Debug, Clone, Default, Serialize, Deserialize)]
872pub struct ProcessOutboundMessageBodyDto {
873    /// Message Type
874    /// Allowed values: `Call`.
875    /// Required by the API.
876    #[serde(rename = "type")]
877    pub type_: String,
878    /// Array of attachments
879    #[serde(default, skip_serializing_if = "Vec::is_empty")]
880    pub attachments: Vec<String>,
881    /// Conversation Id
882    /// Required by the API.
883    #[serde(rename = "conversationId")]
884    pub conversation_id: String,
885    /// Conversation Provider Id
886    /// Required by the API.
887    #[serde(rename = "conversationProviderId")]
888    pub conversation_provider_id: String,
889    /// external mail provider's message id
890    #[serde(rename = "altId", default, skip_serializing_if = "Option::is_none")]
891    pub alt_id: Option<String>,
892    /// Date of the outbound message
893    /// Format: date-time (ISO-8601 string).
894    #[serde(default, skip_serializing_if = "Option::is_none")]
895    pub date: Option<String>,
896    /// Phone call dialer and receiver information
897    #[serde(default, skip_serializing_if = "Option::is_none")]
898    pub call: Option<CallDataDTO>,
899}
900
901/// `SendConversationResponseDto` from the GoHighLevel OpenAPI spec.
902#[derive(Debug, Clone, Default, Serialize, Deserialize)]
903pub struct SendConversationResponseDto {
904    /// The list of all conversations found for the given query
905    /// Required by the API.
906    #[serde(default, skip_serializing_if = "Vec::is_empty")]
907    pub conversations: Vec<ConversationSchema>,
908    /// Total Number of results found for the given query
909    /// Required by the API.
910    pub total: f64,
911}
912
913/// `SendMessageBodyDto` from the GoHighLevel OpenAPI spec.
914#[derive(Debug, Clone, Default, Serialize, Deserialize)]
915pub struct SendMessageBodyDto {
916    /// Type of message being sent
917    /// Allowed values: `SMS`, `RCS`, `Email`, `WhatsApp`, `IG`, `FB`, `Custom`, `Live_Chat`,
918    /// `TIKTOK`.
919    /// Required by the API.
920    #[serde(rename = "type")]
921    pub type_: String,
922    /// Type of message being sent
923    /// Required by the API.
924    #[serde(rename = "subType")]
925    pub sub_type: serde_json::Value,
926    /// ID of the contact receiving the message
927    /// Required by the API.
928    #[serde(rename = "contactId")]
929    pub contact_id: String,
930    /// ID of the associated appointment
931    #[serde(
932        rename = "appointmentId",
933        default,
934        skip_serializing_if = "Option::is_none"
935    )]
936    pub appointment_id: Option<String>,
937    /// Array of attachment URLs
938    #[serde(default, skip_serializing_if = "Vec::is_empty")]
939    pub attachments: Vec<String>,
940    /// Email address to send from
941    #[serde(rename = "emailFrom", default, skip_serializing_if = "Option::is_none")]
942    pub email_from: Option<String>,
943    /// Array of CC email addresses
944    #[serde(rename = "emailCc", default, skip_serializing_if = "Vec::is_empty")]
945    pub email_cc: Vec<String>,
946    /// Array of BCC email addresses
947    #[serde(rename = "emailBcc", default, skip_serializing_if = "Vec::is_empty")]
948    pub email_bcc: Vec<String>,
949    /// HTML content of the message
950    #[serde(default, skip_serializing_if = "Option::is_none")]
951    pub html: Option<String>,
952    /// Text content of the message
953    #[serde(default, skip_serializing_if = "Option::is_none")]
954    pub message: Option<String>,
955    /// Subject line for email messages
956    #[serde(default, skip_serializing_if = "Option::is_none")]
957    pub subject: Option<String>,
958    /// ID of message being replied to
959    #[serde(
960        rename = "replyMessageId",
961        default,
962        skip_serializing_if = "Option::is_none"
963    )]
964    pub reply_message_id: Option<String>,
965    /// ID of message template
966    #[serde(
967        rename = "templateId",
968        default,
969        skip_serializing_if = "Option::is_none"
970    )]
971    pub template_id: Option<String>,
972    /// ID of message thread. For email messages, this is the message ID that contains multiple
973    /// email messages in the thread
974    #[serde(rename = "threadId", default, skip_serializing_if = "Option::is_none")]
975    pub thread_id: Option<String>,
976    /// UTC Timestamp (in seconds) at which the message should be scheduled
977    #[serde(
978        rename = "scheduledTimestamp",
979        default,
980        skip_serializing_if = "Option::is_none"
981    )]
982    pub scheduled_timestamp: Option<f64>,
983    /// ID of conversation provider
984    #[serde(
985        rename = "conversationProviderId",
986        default,
987        skip_serializing_if = "Option::is_none"
988    )]
989    pub conversation_provider_id: Option<String>,
990    /// Email address to send to, if different from contact's primary email. This should be a
991    /// valid email address associated with the contact.
992    #[serde(rename = "emailTo", default, skip_serializing_if = "Option::is_none")]
993    pub email_to: Option<String>,
994    /// Custom subtype ID for email unsubscription preferences. Only applies to email messages.
995    #[serde(
996        rename = "customSubtypeId",
997        default,
998        skip_serializing_if = "Option::is_none"
999    )]
1000    pub custom_subtype_id: Option<String>,
1001    /// Mode for email replies
1002    /// Allowed values: `reply`, `reply_all`.
1003    #[serde(
1004        rename = "emailReplyMode",
1005        default,
1006        skip_serializing_if = "Option::is_none"
1007    )]
1008    pub email_reply_mode: Option<String>,
1009    /// Phone number used as the sender number for outbound messages
1010    #[serde(
1011        rename = "fromNumber",
1012        default,
1013        skip_serializing_if = "Option::is_none"
1014    )]
1015    pub from_number: Option<String>,
1016    /// Recipient phone number for outbound messages
1017    #[serde(rename = "toNumber", default, skip_serializing_if = "Option::is_none")]
1018    pub to_number: Option<String>,
1019    /// Forwarding configuration for emails
1020    #[serde(default, skip_serializing_if = "Option::is_none")]
1021    pub forward: Option<ForwardConfigDto>,
1022    /// Message status
1023    /// Allowed values: `delivered`, `failed`, `pending`, `read`.
1024    /// Required by the API.
1025    pub status: String,
1026    /// Whether the scheduled email uses native AI for the email scheduling
1027    #[serde(
1028        rename = "usesNativeSchedulingAi",
1029        default,
1030        skip_serializing_if = "Option::is_none"
1031    )]
1032    pub uses_native_scheduling_ai: Option<bool>,
1033    /// Optimization period in hours (24h, 48h, or 72h)
1034    /// Allowed values: `24h`, `48h`, `72h`.
1035    #[serde(
1036        rename = "optimizationPeriod",
1037        default,
1038        skip_serializing_if = "Option::is_none"
1039    )]
1040    pub optimization_period: Option<String>,
1041}
1042
1043/// `SendMessageResponseDto` from the GoHighLevel OpenAPI spec.
1044#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1045pub struct SendMessageResponseDto {
1046    /// Conversation ID.
1047    /// Required by the API.
1048    #[serde(rename = "conversationId")]
1049    pub conversation_id: String,
1050    /// This contains the email message id (only for Email type). Use this ID to send inbound
1051    /// replies to GHL to create a threaded email.
1052    #[serde(
1053        rename = "emailMessageId",
1054        default,
1055        skip_serializing_if = "Option::is_none"
1056    )]
1057    pub email_message_id: Option<String>,
1058    /// This is the main Message ID
1059    /// Required by the API.
1060    #[serde(rename = "messageId")]
1061    pub message_id: String,
1062    /// When sending via the GMB channel, we will be returning list of `messageIds` instead of
1063    /// single `messageId`.
1064    #[serde(rename = "messageIds", default, skip_serializing_if = "Vec::is_empty")]
1065    pub message_ids: Vec<String>,
1066    /// Additional response message when sending a workflow message
1067    #[serde(default, skip_serializing_if = "Option::is_none")]
1068    pub msg: Option<String>,
1069    /// Optional metadata for forwarded email
1070    #[serde(
1071        rename = "forwardData",
1072        default,
1073        skip_serializing_if = "Option::is_none"
1074    )]
1075    pub forward_data: Option<ForwardResponseDto>,
1076    /// Message status
1077    /// Allowed values: `delivered`, `failed`, `pending`, `read`.
1078    /// Required by the API.
1079    pub status: String,
1080}
1081
1082/// `SendReviewReplyDto` from the GoHighLevel OpenAPI spec.
1083#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1084pub struct SendReviewReplyDto {
1085    /// Conversation ID (must have reviewId)
1086    /// Required by the API.
1087    #[serde(rename = "conversationId")]
1088    pub conversation_id: String,
1089    /// Location ID
1090    /// Required by the API.
1091    #[serde(rename = "locationId")]
1092    pub location_id: String,
1093    /// Review reply message text
1094    /// Required by the API.
1095    pub message: String,
1096}
1097
1098/// `StartAfterArrayNumberSchema` from the GoHighLevel OpenAPI spec.
1099#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1100pub struct StartAfterArrayNumberSchema {
1101    /// Search to begin after the specified date - should contain the sort value of the last
1102    /// document
1103    #[serde(
1104        rename = "startAfterDate",
1105        default,
1106        skip_serializing_if = "Vec::is_empty"
1107    )]
1108    pub start_after_date: Vec<String>,
1109}
1110
1111/// `StartAfterNumberSchema` from the GoHighLevel OpenAPI spec.
1112#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1113pub struct StartAfterNumberSchema {
1114    /// Search to begin after the specified date - should contain the sort value of the last
1115    /// document
1116    #[serde(
1117        rename = "startAfterDate",
1118        default,
1119        skip_serializing_if = "Option::is_none"
1120    )]
1121    pub start_after_date: Option<f64>,
1122}
1123
1124/// `SubscriptionActionDto` from the GoHighLevel OpenAPI spec.
1125#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1126pub struct SubscriptionActionDto {
1127    /// Type of subscription action
1128    /// Allowed values: `default`, `custom`, `resub_all`.
1129    /// Required by the API.
1130    #[serde(rename = "type")]
1131    pub type_: String,
1132    /// Subscription type name (required for default types: "One on One")
1133    /// Allowed values: `One on One`.
1134    #[serde(default, skip_serializing_if = "Option::is_none")]
1135    pub subtype_name: Option<String>,
1136    /// Custom subscription type ID (required for custom types)
1137    #[serde(default, skip_serializing_if = "Option::is_none")]
1138    pub subtype_id: Option<String>,
1139    /// Subscription status
1140    /// Allowed values: `subscribed`, `unsubscribed`.
1141    /// Required by the API.
1142    pub subtype_status: String,
1143}
1144
1145/// `UpdateConversationDto` from the GoHighLevel OpenAPI spec.
1146#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1147pub struct UpdateConversationDto {
1148    /// Location ID as string
1149    /// Required by the API.
1150    #[serde(rename = "locationId")]
1151    pub location_id: String,
1152    /// Count of unread messages in the conversation
1153    #[serde(
1154        rename = "unreadCount",
1155        default,
1156        skip_serializing_if = "Option::is_none"
1157    )]
1158    pub unread_count: Option<f64>,
1159    /// Starred status of the conversation.
1160    #[serde(default, skip_serializing_if = "Option::is_none")]
1161    pub starred: Option<bool>,
1162    #[serde(default, skip_serializing_if = "Option::is_none")]
1163    pub feedback: Option<serde_json::Value>,
1164}
1165
1166/// `UpdateCustomSubtypeDto` from the GoHighLevel OpenAPI spec.
1167#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1168pub struct UpdateCustomSubtypeDto {
1169    /// Name of the custom subtype (max 100 characters)
1170    #[serde(default, skip_serializing_if = "Option::is_none")]
1171    pub name: Option<String>,
1172    /// Description of the custom subtype (max 100 characters)
1173    #[serde(default, skip_serializing_if = "Option::is_none")]
1174    pub description: Option<String>,
1175    /// Whether the custom subtype is archived
1176    #[serde(default, skip_serializing_if = "Option::is_none")]
1177    pub archived: Option<bool>,
1178    /// Resubscription legal form ID (optional when archiving)
1179    #[serde(default, skip_serializing_if = "Option::is_none")]
1180    pub resubscription_legal_form_id: Option<String>,
1181}
1182
1183/// `UpdateMessageStatusDto` from the GoHighLevel OpenAPI spec.
1184#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1185pub struct UpdateMessageStatusDto {
1186    /// Message status
1187    /// Allowed values: `delivered`, `failed`, `pending`, `read`.
1188    /// Required by the API.
1189    pub status: String,
1190    /// Error object from the conversation provider
1191    #[serde(default, skip_serializing_if = "Option::is_none")]
1192    pub error: Option<ErrorDto>,
1193    /// Email message Id
1194    #[serde(
1195        rename = "emailMessageId",
1196        default,
1197        skip_serializing_if = "Option::is_none"
1198    )]
1199    pub email_message_id: Option<String>,
1200    /// Email delivery status for additional email recipients.
1201    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1202    pub recipients: Vec<String>,
1203}
1204
1205/// `UploadFilesDto` from the GoHighLevel OpenAPI spec.
1206#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1207pub struct UploadFilesDto {
1208    /// Conversation Id
1209    /// Required by the API.
1210    #[serde(rename = "conversationId")]
1211    pub conversation_id: String,
1212    /// Contact Id
1213    /// Required by the API.
1214    #[serde(rename = "contactId")]
1215    pub contact_id: String,
1216    /// Required by the API.
1217    #[serde(rename = "locationId")]
1218    pub location_id: String,
1219    /// Required by the API.
1220    #[serde(
1221        rename = "attachmentUrls",
1222        default,
1223        skip_serializing_if = "Vec::is_empty"
1224    )]
1225    pub attachment_urls: Vec<String>,
1226    /// Twilio chat service SID for group SMS uploads
1227    #[serde(
1228        rename = "chatServiceSid",
1229        default,
1230        skip_serializing_if = "Option::is_none"
1231    )]
1232    pub chat_service_sid: Option<String>,
1233    /// Flag to indicate group SMS upload flow. When true, only 1 file upload is allowed per
1234    /// request.
1235    #[serde(
1236        rename = "isGroupSms",
1237        default,
1238        skip_serializing_if = "Option::is_none"
1239    )]
1240    pub is_group_sms: Option<String>,
1241}
1242
1243/// `UploadFilesErrorResponseDto` from the GoHighLevel OpenAPI spec.
1244#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1245pub struct UploadFilesErrorResponseDto {
1246    /// HTTP Status code of the request
1247    /// Allowed values: `400`, `413`, `415`.
1248    /// Required by the API.
1249    pub status: String,
1250    /// Error message of the request
1251    /// Required by the API.
1252    pub message: String,
1253}
1254
1255/// `UploadFilesResponseDto` from the GoHighLevel OpenAPI spec.
1256#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1257pub struct UploadFilesResponseDto {
1258    /// Required by the API.
1259    #[serde(rename = "uploadedFiles")]
1260    pub uploaded_files: serde_json::Value,
1261    /// Twilio media SIDs for group SMS (when isGroupSms=true)
1262    #[serde(
1263        rename = "twilioMediaSids",
1264        default,
1265        skip_serializing_if = "Vec::is_empty"
1266    )]
1267    pub twilio_media_sids: Vec<String>,
1268}
1269
1270/// `UserSubscriptionChangeDto` from the GoHighLevel OpenAPI spec.
1271#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1272pub struct UserSubscriptionChangeDto {
1273    /// Location Id
1274    /// Required by the API.
1275    #[serde(rename = "locationId")]
1276    pub location_id: String,
1277    /// Contact Id
1278    /// Required by the API.
1279    #[serde(rename = "contactId")]
1280    pub contact_id: String,
1281    /// Email address
1282    /// Required by the API.
1283    pub email: String,
1284    /// Subscription action details
1285    /// Required by the API.
1286    pub subscription_action: SubscriptionActionDto,
1287    /// Legal reason for the change (required only for resubscribe and resub_all actions)
1288    #[serde(default, skip_serializing_if = "Option::is_none")]
1289    pub legal_reason: Option<String>,
1290    /// Legal description/details
1291    #[serde(default, skip_serializing_if = "Option::is_none")]
1292    pub legal_description: Option<String>,
1293}
1294
1295/// `UserTypingBody` from the GoHighLevel OpenAPI spec.
1296#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1297pub struct UserTypingBody {
1298    /// Location Id
1299    /// Required by the API.
1300    #[serde(rename = "locationId")]
1301    pub location_id: String,
1302    /// Typing status
1303    /// Required by the API.
1304    #[serde(rename = "isTyping")]
1305    pub is_typing: String,
1306    /// visitorId is the Unique ID assigned to each Live chat visitor. visitorId will be added
1307    /// soon in <a
1308    /// href="https://highlevel.stoplight.io/docs/integrations/00c5ff21f0030-get-contact"
1309    /// target="_blank">GET Contact API</a>
1310    /// Required by the API.
1311    #[serde(rename = "visitorId")]
1312    pub visitor_id: String,
1313    /// Conversation Id
1314    /// Required by the API.
1315    #[serde(rename = "conversationId")]
1316    pub conversation_id: String,
1317}