Skip to main content

ghl_models/v3/
emails.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/// `BuilderAttributePublicV2Dto` from the GoHighLevel OpenAPI spec.
14#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15pub struct BuilderAttributePublicV2Dto {
16    /// Attribute name
17    /// Required by the API.
18    pub name: String,
19    /// Attribute default value
20    #[serde(default, skip_serializing_if = "Option::is_none")]
21    pub default: Option<serde_json::Value>,
22    /// Attribute unit
23    #[serde(default, skip_serializing_if = "Option::is_none")]
24    pub unit: Option<String>,
25}
26
27/// `BuilderCustomFlagsPublicV2Dto` from the GoHighLevel OpenAPI spec.
28#[derive(Debug, Clone, Default, Serialize, Deserialize)]
29pub struct BuilderCustomFlagsPublicV2Dto {
30    /// Layout ID
31    #[serde(rename = "layoutId", default, skip_serializing_if = "Option::is_none")]
32    pub layout_id: Option<serde_json::Value>,
33    /// Theme name
34    #[serde(default, skip_serializing_if = "Option::is_none")]
35    pub theme: Option<String>,
36    /// Social element rendering type
37    /// Allowed values: `icon`, `icon-text`, `text`.
38    #[serde(
39        rename = "socialElementType",
40        default,
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub social_element_type: Option<String>,
44}
45
46/// `BuilderEditorContentPublicV2Dto` from the GoHighLevel OpenAPI spec.
47#[derive(Debug, Clone, Default, Serialize, Deserialize)]
48pub struct BuilderEditorContentPublicV2Dto {
49    /// Builder elements
50    #[serde(default, skip_serializing_if = "Vec::is_empty")]
51    pub elements: Vec<BuilderElementNodePublicV2Dto>,
52    /// Builder attributes map keyed by element ID
53    #[serde(default, skip_serializing_if = "Option::is_none")]
54    pub attrs: Option<serde_json::Value>,
55    /// Template-level settings map keyed by setting group
56    #[serde(
57        rename = "templateSettings",
58        default,
59        skip_serializing_if = "Option::is_none"
60    )]
61    pub template_settings: Option<serde_json::Value>,
62}
63
64/// `BuilderElementNodePublicV2Dto` from the GoHighLevel OpenAPI spec.
65#[derive(Debug, Clone, Default, Serialize, Deserialize)]
66pub struct BuilderElementNodePublicV2Dto {
67    /// Element ID
68    /// Required by the API.
69    pub id: String,
70    /// Tag name
71    /// Required by the API.
72    #[serde(rename = "tagName")]
73    pub tag_name: String,
74    /// Child elements
75    #[serde(default, skip_serializing_if = "Vec::is_empty")]
76    pub children: Vec<BuilderElementNodePublicV2Dto>,
77}
78
79/// `BuilderNodeAttrsPublicV2Dto` from the GoHighLevel OpenAPI spec.
80#[derive(Debug, Clone, Default, Serialize, Deserialize)]
81pub struct BuilderNodeAttrsPublicV2Dto {
82    /// Tag name
83    /// Required by the API.
84    #[serde(rename = "tagName")]
85    pub tag_name: String,
86    /// Element attributes
87    /// Required by the API.
88    #[serde(default, skip_serializing_if = "Vec::is_empty")]
89    pub attributes: Vec<BuilderAttributePublicV2Dto>,
90    /// Element content
91    #[serde(default, skip_serializing_if = "Option::is_none")]
92    pub content: Option<String>,
93    /// Custom flags
94    #[serde(
95        rename = "customFlags",
96        default,
97        skip_serializing_if = "Option::is_none"
98    )]
99    pub custom_flags: Option<BuilderCustomFlagsPublicV2Dto>,
100}
101
102/// `BuilderUpdateSuccessfulDTO` from the GoHighLevel OpenAPI spec.
103#[derive(Debug, Clone, Default, Serialize, Deserialize)]
104pub struct BuilderUpdateSuccessfulDTO {
105    /// ok
106    #[serde(default, skip_serializing_if = "Option::is_none")]
107    pub ok: Option<String>,
108    /// trace id
109    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
110    pub trace_id: Option<String>,
111    /// preview url
112    #[serde(
113        rename = "previewUrl",
114        default,
115        skip_serializing_if = "Option::is_none"
116    )]
117    pub preview_url: Option<String>,
118    /// template data download url
119    #[serde(
120        rename = "templateDownloadUrl",
121        default,
122        skip_serializing_if = "Option::is_none"
123    )]
124    pub template_download_url: Option<String>,
125    /// version id of the saved template
126    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
127    pub version_id: Option<String>,
128}
129
130/// `BulkActionCampaignDto` from the GoHighLevel OpenAPI spec.
131#[derive(Debug, Clone, Default, Serialize, Deserialize)]
132pub struct BulkActionCampaignDto {
133    /// Campaign ID
134    /// Required by the API.
135    pub id: String,
136    /// Campaign name
137    /// Required by the API.
138    pub name: String,
139    /// Campaign status
140    /// Allowed values: `processing`, `scheduled`, `paused`, `complete`, `cancelled`.
141    /// Required by the API.
142    pub status: String,
143    /// Schedule type (NOW or SCHEDULED)
144    /// Required by the API.
145    #[serde(rename = "scheduleType")]
146    pub schedule_type: String,
147    /// User who created the campaign
148    /// Required by the API.
149    #[serde(rename = "createdBy")]
150    pub created_by: String,
151    /// Whether the campaign is deleted
152    /// Required by the API.
153    pub deleted: bool,
154    /// Created at timestamp
155    /// Required by the API.
156    #[serde(rename = "createdAt")]
157    pub created_at: String,
158    /// Last updated timestamp
159    /// Required by the API.
160    #[serde(rename = "updatedAt")]
161    pub updated_at: String,
162    /// Processing completion timestamp
163    #[serde(
164        rename = "completedAt",
165        default,
166        skip_serializing_if = "Option::is_none"
167    )]
168    pub completed_at: Option<String>,
169    /// Email metadata
170    #[serde(
171        rename = "emailMetadata",
172        default,
173        skip_serializing_if = "Option::is_none"
174    )]
175    pub email_metadata: Option<BulkActionCampaignEmailDetailsDto>,
176}
177
178/// `BulkActionCampaignEmailDetailsDto` from the GoHighLevel OpenAPI spec.
179#[derive(Debug, Clone, Default, Serialize, Deserialize)]
180pub struct BulkActionCampaignEmailDetailsDto {
181    /// Email subject line
182    #[serde(default, skip_serializing_if = "Option::is_none")]
183    pub subject: Option<String>,
184    /// Sender (name and email)
185    #[serde(rename = "from", default, skip_serializing_if = "Option::is_none")]
186    pub from_: Option<String>,
187    /// Sender name
188    #[serde(default, skip_serializing_if = "Option::is_none")]
189    pub name: Option<String>,
190    /// Email template ID
191    #[serde(
192        rename = "templateId",
193        default,
194        skip_serializing_if = "Option::is_none"
195    )]
196    pub template_id: Option<String>,
197}
198
199/// `BulkActionCampaignPublicV2Dto` from the GoHighLevel OpenAPI spec.
200#[derive(Debug, Clone, Default, Serialize, Deserialize)]
201pub struct BulkActionCampaignPublicV2Dto {
202    /// Campaign ID
203    /// Required by the API.
204    pub id: String,
205    /// Source of the campaign
206    #[serde(default, skip_serializing_if = "Option::is_none")]
207    pub source: Option<String>,
208    /// Source ID of the campaign
209    #[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
210    pub source_id: Option<String>,
211    /// Campaign name
212    #[serde(default, skip_serializing_if = "Option::is_none")]
213    pub name: Option<String>,
214    /// Campaign status
215    /// Allowed values: `processing`, `scheduled`, `paused`, `complete`, `cancelled`.
216    /// Required by the API.
217    pub status: String,
218    /// Schedule type (NOW, SCHEDULED, or DRIP)
219    /// Allowed values: `NOW`, `SCHEDULED`, `DRIP`.
220    #[serde(
221        rename = "scheduleType",
222        default,
223        skip_serializing_if = "Option::is_none"
224    )]
225    pub schedule_type: Option<String>,
226    /// Whether the campaign is deleted
227    /// Required by the API.
228    pub deleted: bool,
229    /// Created at timestamp
230    /// Required by the API.
231    #[serde(rename = "createdAt")]
232    pub created_at: String,
233    /// Last updated timestamp
234    /// Required by the API.
235    #[serde(rename = "updatedAt")]
236    pub updated_at: String,
237    /// Processing completion timestamp
238    #[serde(
239        rename = "completedAt",
240        default,
241        skip_serializing_if = "Option::is_none"
242    )]
243    pub completed_at: Option<String>,
244    /// Email metadata
245    #[serde(
246        rename = "emailMetadata",
247        default,
248        skip_serializing_if = "Option::is_none"
249    )]
250    pub email_metadata: Option<BulkActionCampaignEmailDetailsDto>,
251}
252
253/// `CreateBuilderDto` from the GoHighLevel OpenAPI spec.
254#[derive(Debug, Clone, Default, Serialize, Deserialize)]
255pub struct CreateBuilderDto {
256    /// Required by the API.
257    #[serde(rename = "locationId")]
258    pub location_id: String,
259    #[serde(default, skip_serializing_if = "Option::is_none")]
260    pub title: Option<String>,
261    /// Allowed values: `html`, `folder`, `import`, `builder`, `blank`, `ai_template`,
262    /// `vibe-editor`.
263    /// Required by the API.
264    #[serde(rename = "type")]
265    pub type_: String,
266    #[serde(rename = "updatedBy", default, skip_serializing_if = "Option::is_none")]
267    pub updated_by: Option<String>,
268    /// Allowed values: `1`, `2`.
269    #[serde(
270        rename = "builderVersion",
271        default,
272        skip_serializing_if = "Option::is_none"
273    )]
274    pub builder_version: Option<String>,
275    #[serde(default, skip_serializing_if = "Option::is_none")]
276    pub name: Option<String>,
277    #[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
278    pub parent_id: Option<String>,
279    #[serde(
280        rename = "templateDataUrl",
281        default,
282        skip_serializing_if = "Option::is_none"
283    )]
284    pub template_data_url: Option<String>,
285    /// Allowed values: `mailchimp`, `active_campaign`, `kajabi`, `other`,
286    /// `import_with_email_ai`.
287    /// Required by the API.
288    #[serde(rename = "importProvider")]
289    pub import_provider: String,
290    #[serde(rename = "importURL", default, skip_serializing_if = "Option::is_none")]
291    pub import_url: Option<String>,
292    #[serde(
293        rename = "templateSource",
294        default,
295        skip_serializing_if = "Option::is_none"
296    )]
297    pub template_source: Option<String>,
298    #[serde(
299        rename = "isPlainText",
300        default,
301        skip_serializing_if = "Option::is_none"
302    )]
303    pub is_plain_text: Option<bool>,
304    #[serde(
305        rename = "subjectLine",
306        default,
307        skip_serializing_if = "Option::is_none"
308    )]
309    pub subject_line: Option<String>,
310    #[serde(rename = "fromName", default, skip_serializing_if = "Option::is_none")]
311    pub from_name: Option<String>,
312    #[serde(rename = "fromEmail", default, skip_serializing_if = "Option::is_none")]
313    pub from_email: Option<String>,
314    #[serde(
315        rename = "previewText",
316        default,
317        skip_serializing_if = "Option::is_none"
318    )]
319    pub preview_text: Option<String>,
320}
321
322/// `CreateBuilderSuccesfulResponseDto` from the GoHighLevel OpenAPI spec.
323#[derive(Debug, Clone, Default, Serialize, Deserialize)]
324pub struct CreateBuilderSuccesfulResponseDto {
325    /// template id
326    /// Required by the API.
327    pub redirect: String,
328    /// trace id
329    /// Required by the API.
330    #[serde(rename = "traceId")]
331    pub trace_id: String,
332}
333
334/// `CreateEmailCampaignPublicV2BodyDto` from the GoHighLevel OpenAPI spec.
335#[derive(Debug, Clone, Default, Serialize, Deserialize)]
336pub struct CreateEmailCampaignPublicV2BodyDto {
337    /// Campaign name
338    /// Required by the API.
339    pub name: String,
340    /// Editor type for the campaign content. Use `html` for code-editor campaigns or `text` for
341    /// plain-text campaigns.
342    /// Allowed values: `html`, `text`.
343    /// Required by the API.
344    #[serde(rename = "editorType")]
345    pub editor_type: String,
346    /// Existing template ID to create the campaign from. Omit this field to create a blank
347    /// campaign.
348    #[serde(
349        rename = "templateId",
350        default,
351        skip_serializing_if = "Option::is_none"
352    )]
353    pub template_id: Option<String>,
354    /// Optional initial editor content to persist immediately after campaign creation. Provide
355    /// HTML or plain-text string content.
356    #[serde(
357        rename = "editorContent",
358        default,
359        skip_serializing_if = "Option::is_none"
360    )]
361    pub editor_content: Option<String>,
362    /// Parent folder ID
363    #[serde(
364        rename = "parentFolderId",
365        default,
366        skip_serializing_if = "Option::is_none"
367    )]
368    pub parent_folder_id: Option<String>,
369    /// Timezone for the campaign
370    /// Required by the API.
371    #[serde(rename = "timeZone")]
372    pub time_zone: String,
373    /// ID of the user performing this action
374    /// Required by the API.
375    #[serde(rename = "userId")]
376    pub user_id: String,
377    /// Name of the user performing this action
378    #[serde(rename = "userName", default, skip_serializing_if = "Option::is_none")]
379    pub user_name: Option<String>,
380}
381
382/// `CreateEmailCampaignPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
383#[derive(Debug, Clone, Default, Serialize, Deserialize)]
384pub struct CreateEmailCampaignPublicV2ResponseDto {
385    /// Campaign ID
386    /// Required by the API.
387    pub id: String,
388    /// Source of the campaign
389    #[serde(default, skip_serializing_if = "Option::is_none")]
390    pub source: Option<String>,
391    /// Source ID of the campaign
392    #[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
393    pub source_id: Option<String>,
394    /// Campaign name
395    #[serde(default, skip_serializing_if = "Option::is_none")]
396    pub name: Option<String>,
397    /// Campaign status
398    /// Allowed values: `all`, `sent`, `failed`, `archived`, `draft`, `processing`, `scheduled`,
399    /// `cancelled`, `paused`.
400    #[serde(default, skip_serializing_if = "Option::is_none")]
401    pub status: Option<String>,
402    /// Campaign type
403    #[serde(
404        rename = "campaignType",
405        default,
406        skip_serializing_if = "Option::is_none"
407    )]
408    pub campaign_type: Option<String>,
409    /// Campaign category
410    #[serde(
411        rename = "campaignCategory",
412        default,
413        skip_serializing_if = "Option::is_none"
414    )]
415    pub campaign_category: Option<String>,
416    /// AB test variation identifiers (available only for AB test campaigns)
417    #[serde(default, skip_serializing_if = "Vec::is_empty")]
418    pub variations: Vec<EmailCampaignVariationPublicV2Dto>,
419    /// Whether the campaign is deleted
420    /// Required by the API.
421    pub deleted: bool,
422    /// Created at timestamp
423    /// Required by the API.
424    #[serde(rename = "createdAt")]
425    pub created_at: String,
426    /// Last updated timestamp
427    /// Required by the API.
428    #[serde(rename = "updatedAt")]
429    pub updated_at: String,
430    /// Trace ID of request
431    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
432    pub trace_id: Option<String>,
433}
434
435/// `CreateTemplateFolderPublicV2BodyDto` from the GoHighLevel OpenAPI spec.
436#[derive(Debug, Clone, Default, Serialize, Deserialize)]
437pub struct CreateTemplateFolderPublicV2BodyDto {
438    /// Folder name
439    /// Required by the API.
440    pub name: String,
441    /// ID of the user performing this action
442    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
443    pub user_id: Option<String>,
444}
445
446/// `CreateTemplateFolderPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
447#[derive(Debug, Clone, Default, Serialize, Deserialize)]
448pub struct CreateTemplateFolderPublicV2ResponseDto {
449    /// Folder ID
450    /// Required by the API.
451    pub id: String,
452    /// Folder name
453    /// Required by the API.
454    pub name: String,
455    /// Created timestamp
456    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
457    pub created_at: Option<String>,
458    /// Updated timestamp
459    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
460    pub updated_at: Option<String>,
461    /// Trace ID of request
462    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
463    pub trace_id: Option<String>,
464}
465
466/// `CreateTemplatePublicV2BodyDto` from the GoHighLevel OpenAPI spec.
467#[derive(Debug, Clone, Default, Serialize, Deserialize)]
468pub struct CreateTemplatePublicV2BodyDto {
469    /// Template name
470    /// Required by the API.
471    pub name: String,
472    /// Editor type for the new template. Use `html` for code-editor templates or `text` for
473    /// plain-text templates.
474    /// Allowed values: `html`, `text`.
475    /// Required by the API.
476    #[serde(rename = "editorType")]
477    pub editor_type: String,
478    /// Optional initial editor content. Provide HTML or plain-text string content.
479    #[serde(
480        rename = "editorContent",
481        default,
482        skip_serializing_if = "Option::is_none"
483    )]
484    pub editor_content: Option<String>,
485    /// Parent folder ID
486    #[serde(
487        rename = "parentFolderId",
488        default,
489        skip_serializing_if = "Option::is_none"
490    )]
491    pub parent_folder_id: Option<String>,
492    /// Email subject line
493    #[serde(
494        rename = "subjectLine",
495        default,
496        skip_serializing_if = "Option::is_none"
497    )]
498    pub subject_line: Option<String>,
499    /// Sender name
500    #[serde(rename = "fromName", default, skip_serializing_if = "Option::is_none")]
501    pub from_name: Option<String>,
502    /// Sender email address
503    #[serde(rename = "fromEmail", default, skip_serializing_if = "Option::is_none")]
504    pub from_email: Option<String>,
505    /// Preview text
506    #[serde(
507        rename = "previewText",
508        default,
509        skip_serializing_if = "Option::is_none"
510    )]
511    pub preview_text: Option<String>,
512    /// ID of the user performing this action
513    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
514    pub user_id: Option<String>,
515}
516
517/// `CreateTemplatePublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
518#[derive(Debug, Clone, Default, Serialize, Deserialize)]
519pub struct CreateTemplatePublicV2ResponseDto {
520    /// Template ID
521    /// Required by the API.
522    pub id: String,
523    /// Template name
524    /// Required by the API.
525    pub name: String,
526    /// Editor type
527    /// Allowed values: `html`, `text`.
528    /// Required by the API.
529    #[serde(rename = "editorType")]
530    pub editor_type: String,
531    /// Whether template is plain text
532    /// Required by the API.
533    #[serde(rename = "isPlainText")]
534    pub is_plain_text: bool,
535    /// Parent folder ID
536    #[serde(
537        rename = "parentFolderId",
538        default,
539        skip_serializing_if = "Option::is_none"
540    )]
541    pub parent_folder_id: Option<String>,
542    /// Sender name
543    #[serde(rename = "fromName", default, skip_serializing_if = "Option::is_none")]
544    pub from_name: Option<String>,
545    /// Sender email address
546    #[serde(rename = "fromEmail", default, skip_serializing_if = "Option::is_none")]
547    pub from_email: Option<String>,
548    /// Email subject line
549    #[serde(
550        rename = "subjectLine",
551        default,
552        skip_serializing_if = "Option::is_none"
553    )]
554    pub subject_line: Option<String>,
555    /// Preview text
556    #[serde(
557        rename = "previewText",
558        default,
559        skip_serializing_if = "Option::is_none"
560    )]
561    pub preview_text: Option<String>,
562    /// Preview URL
563    #[serde(
564        rename = "previewUrl",
565        default,
566        skip_serializing_if = "Option::is_none"
567    )]
568    pub preview_url: Option<String>,
569    /// Created timestamp
570    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
571    pub created_at: Option<String>,
572    /// Updated timestamp
573    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
574    pub updated_at: Option<String>,
575    /// Trace ID of request
576    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
577    pub trace_id: Option<String>,
578}
579
580/// `DeleteBuilderSuccesfulResponseDto` from the GoHighLevel OpenAPI spec.
581#[derive(Debug, Clone, Default, Serialize, Deserialize)]
582pub struct DeleteBuilderSuccesfulResponseDto {
583    /// ok
584    #[serde(default, skip_serializing_if = "Option::is_none")]
585    pub ok: Option<String>,
586    /// trace id
587    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
588    pub trace_id: Option<String>,
589}
590
591/// `DeleteCampaignPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
592#[derive(Debug, Clone, Default, Serialize, Deserialize)]
593pub struct DeleteCampaignPublicV2ResponseDto {
594    /// Whether the campaign was deleted successfully
595    /// Required by the API.
596    pub deleted: bool,
597    /// Trace ID of the request
598    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
599    pub trace_id: Option<String>,
600}
601
602/// `DeleteTemplatePublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
603#[derive(Debug, Clone, Default, Serialize, Deserialize)]
604pub struct DeleteTemplatePublicV2ResponseDto {
605    /// Whether the template was deleted successfully
606    /// Required by the API.
607    pub deleted: bool,
608    /// Trace ID of the request
609    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
610    pub trace_id: Option<String>,
611}
612
613/// `EmailCampaignPublicV2Dto` from the GoHighLevel OpenAPI spec.
614#[derive(Debug, Clone, Default, Serialize, Deserialize)]
615pub struct EmailCampaignPublicV2Dto {
616    /// Campaign ID
617    /// Required by the API.
618    pub id: String,
619    /// Source of the campaign
620    #[serde(default, skip_serializing_if = "Option::is_none")]
621    pub source: Option<String>,
622    /// Source ID of the campaign
623    #[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
624    pub source_id: Option<String>,
625    /// Campaign name
626    #[serde(default, skip_serializing_if = "Option::is_none")]
627    pub name: Option<String>,
628    /// Campaign status
629    /// Allowed values: `all`, `sent`, `failed`, `archived`, `draft`, `processing`, `scheduled`,
630    /// `cancelled`, `paused`.
631    #[serde(default, skip_serializing_if = "Option::is_none")]
632    pub status: Option<String>,
633    /// Campaign type
634    #[serde(
635        rename = "campaignType",
636        default,
637        skip_serializing_if = "Option::is_none"
638    )]
639    pub campaign_type: Option<String>,
640    /// Campaign category
641    #[serde(
642        rename = "campaignCategory",
643        default,
644        skip_serializing_if = "Option::is_none"
645    )]
646    pub campaign_category: Option<String>,
647    /// AB test variation identifiers (available only for AB test campaigns)
648    #[serde(default, skip_serializing_if = "Vec::is_empty")]
649    pub variations: Vec<EmailCampaignVariationPublicV2Dto>,
650    /// Whether the campaign is deleted
651    /// Required by the API.
652    pub deleted: bool,
653    /// Created at timestamp
654    /// Required by the API.
655    #[serde(rename = "createdAt")]
656    pub created_at: String,
657    /// Last updated timestamp
658    /// Required by the API.
659    #[serde(rename = "updatedAt")]
660    pub updated_at: String,
661}
662
663/// `EmailCampaignVariationPublicV2Dto` from the GoHighLevel OpenAPI spec.
664#[derive(Debug, Clone, Default, Serialize, Deserialize)]
665pub struct EmailCampaignVariationPublicV2Dto {
666    /// Variation source ID for stats lookup
667    /// Required by the API.
668    #[serde(rename = "sourceId")]
669    pub source_id: String,
670    /// Whether this is the winning variation
671    /// Required by the API.
672    #[serde(rename = "isWinner")]
673    pub is_winner: bool,
674}
675
676/// `EmailStatsNumbersDto` from the GoHighLevel OpenAPI spec.
677#[derive(Debug, Clone, Default, Serialize, Deserialize)]
678pub struct EmailStatsNumbersDto {
679    /// Emails delivered
680    /// Required by the API.
681    pub delivered: f64,
682    /// Emails opened
683    /// Required by the API.
684    pub opened: f64,
685    /// Links clicked
686    /// Required by the API.
687    pub clicked: f64,
688    /// Unsubscribes
689    /// Required by the API.
690    pub unsubscribed: f64,
691    /// Spam complaints
692    /// Required by the API.
693    pub complained: f64,
694    /// Hard bounces
695    /// Required by the API.
696    #[serde(rename = "permanentFail")]
697    pub permanent_fail: f64,
698    /// Soft bounces
699    /// Required by the API.
700    #[serde(rename = "temporaryFail")]
701    pub temporary_fail: f64,
702    /// Rejected emails
703    /// Required by the API.
704    pub rejected: f64,
705    /// Failed emails
706    /// Required by the API.
707    pub failed: f64,
708    /// Replies received
709    /// Required by the API.
710    pub replied: f64,
711}
712
713/// `EmailStatsNumbersPublicV2Dto` from the GoHighLevel OpenAPI spec.
714#[derive(Debug, Clone, Default, Serialize, Deserialize)]
715pub struct EmailStatsNumbersPublicV2Dto {
716    /// Total emails sent (delivered + accepted + bounced)
717    /// Required by the API.
718    pub sent: f64,
719    /// Emails accepted by the mail server
720    /// Required by the API.
721    pub accepted: f64,
722    /// Emails delivered to inbox
723    /// Required by the API.
724    pub delivered: f64,
725    /// Emails opened
726    /// Required by the API.
727    pub opened: f64,
728    /// Links clicked
729    /// Required by the API.
730    pub clicked: f64,
731    /// Unsubscribes
732    /// Required by the API.
733    pub unsubscribed: f64,
734    /// Spam complaints
735    /// Required by the API.
736    pub complained: f64,
737    /// Hard bounces
738    /// Required by the API.
739    #[serde(rename = "permanentFail")]
740    pub permanent_fail: f64,
741    /// Soft bounces
742    /// Required by the API.
743    #[serde(rename = "temporaryFail")]
744    pub temporary_fail: f64,
745    /// Rejected emails
746    /// Required by the API.
747    pub rejected: f64,
748    /// Failed emails
749    /// Required by the API.
750    pub failed: f64,
751    /// Replies received
752    /// Required by the API.
753    pub replied: f64,
754    /// Open rate as percentage of delivered
755    /// Required by the API.
756    #[serde(rename = "openRate")]
757    pub open_rate: f64,
758    /// Click rate as percentage of delivered
759    /// Required by the API.
760    #[serde(rename = "clickRate")]
761    pub click_rate: f64,
762    /// Unsubscribe rate as percentage of delivered
763    /// Required by the API.
764    #[serde(rename = "unsubscribeRate")]
765    pub unsubscribe_rate: f64,
766    /// Complaint rate as percentage of delivered
767    /// Required by the API.
768    #[serde(rename = "complaintRate")]
769    pub complaint_rate: f64,
770    /// Bounce rate as percentage of sent
771    /// Required by the API.
772    #[serde(rename = "bounceRate")]
773    pub bounce_rate: f64,
774    /// Reply rate as percentage of delivered
775    /// Required by the API.
776    #[serde(rename = "replyRate")]
777    pub reply_rate: f64,
778}
779
780/// `FetchBuilderSuccesfulResponseDto` from the GoHighLevel OpenAPI spec.
781#[derive(Debug, Clone, Default, Serialize, Deserialize)]
782pub struct FetchBuilderSuccesfulResponseDto {
783    /// template name
784    #[serde(default, skip_serializing_if = "Option::is_none")]
785    pub name: Option<String>,
786    /// updated by
787    #[serde(rename = "updatedBy", default, skip_serializing_if = "Option::is_none")]
788    pub updated_by: Option<String>,
789    /// plain text based template
790    #[serde(
791        rename = "isPlainText",
792        default,
793        skip_serializing_if = "Option::is_none"
794    )]
795    pub is_plain_text: Option<bool>,
796    /// last updated
797    #[serde(
798        rename = "lastUpdated",
799        default,
800        skip_serializing_if = "Option::is_none"
801    )]
802    pub last_updated: Option<String>,
803    /// date added
804    #[serde(rename = "dateAdded", default, skip_serializing_if = "Option::is_none")]
805    pub date_added: Option<String>,
806    /// preview url
807    #[serde(
808        rename = "previewUrl",
809        default,
810        skip_serializing_if = "Option::is_none"
811    )]
812    pub preview_url: Option<String>,
813    /// id
814    #[serde(default, skip_serializing_if = "Option::is_none")]
815    pub id: Option<String>,
816    /// version
817    #[serde(default, skip_serializing_if = "Option::is_none")]
818    pub version: Option<String>,
819    /// type
820    #[serde(
821        rename = "templateType",
822        default,
823        skip_serializing_if = "Option::is_none"
824    )]
825    pub template_type: Option<String>,
826}
827
828/// `GetBulkActionCampaignPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
829#[derive(Debug, Clone, Default, Serialize, Deserialize)]
830pub struct GetBulkActionCampaignPublicV2ResponseDto {
831    /// Campaign ID
832    /// Required by the API.
833    pub id: String,
834    /// Source of the campaign
835    #[serde(default, skip_serializing_if = "Option::is_none")]
836    pub source: Option<String>,
837    /// Source ID of the campaign
838    #[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
839    pub source_id: Option<String>,
840    /// Campaign name
841    #[serde(default, skip_serializing_if = "Option::is_none")]
842    pub name: Option<String>,
843    /// Campaign status
844    /// Allowed values: `processing`, `scheduled`, `paused`, `complete`, `cancelled`.
845    /// Required by the API.
846    pub status: String,
847    /// Schedule type (NOW, SCHEDULED, or DRIP)
848    /// Allowed values: `NOW`, `SCHEDULED`, `DRIP`.
849    #[serde(
850        rename = "scheduleType",
851        default,
852        skip_serializing_if = "Option::is_none"
853    )]
854    pub schedule_type: Option<String>,
855    /// Sender name
856    #[serde(rename = "fromName", default, skip_serializing_if = "Option::is_none")]
857    pub from_name: Option<String>,
858    /// Sender email address
859    #[serde(rename = "fromEmail", default, skip_serializing_if = "Option::is_none")]
860    pub from_email: Option<String>,
861    /// Email subject line
862    #[serde(default, skip_serializing_if = "Option::is_none")]
863    pub subject: Option<String>,
864    /// Reply-to email address
865    #[serde(
866        rename = "replyToAddress",
867        default,
868        skip_serializing_if = "Option::is_none"
869    )]
870    pub reply_to_address: Option<String>,
871    /// Preview text
872    #[serde(
873        rename = "previewText",
874        default,
875        skip_serializing_if = "Option::is_none"
876    )]
877    pub preview_text: Option<String>,
878    /// Editor type for this campaign
879    /// Allowed values: `html`, `builder`, `text`.
880    #[serde(
881        rename = "editorType",
882        default,
883        skip_serializing_if = "Option::is_none"
884    )]
885    pub editor_type: Option<String>,
886    /// Whether the campaign uses plain text
887    #[serde(
888        rename = "isPlainText",
889        default,
890        skip_serializing_if = "Option::is_none"
891    )]
892    pub is_plain_text: Option<bool>,
893    /// URL to fetch the rendered campaign content as HTML. Issue a GET against this URL to
894    /// retrieve the body.
895    #[serde(
896        rename = "editorContentUrl",
897        default,
898        skip_serializing_if = "Option::is_none"
899    )]
900    pub editor_content_url: Option<String>,
901    /// Whether the campaign is deleted
902    /// Required by the API.
903    pub deleted: bool,
904    /// Created at timestamp
905    /// Required by the API.
906    #[serde(rename = "createdAt")]
907    pub created_at: String,
908    /// Last updated timestamp
909    /// Required by the API.
910    #[serde(rename = "updatedAt")]
911    pub updated_at: String,
912    /// Processing completion timestamp
913    #[serde(
914        rename = "completedAt",
915        default,
916        skip_serializing_if = "Option::is_none"
917    )]
918    pub completed_at: Option<String>,
919    /// Trace ID of the request
920    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
921    pub trace_id: Option<String>,
922}
923
924/// `GetBulkActionCampaignsResponseDto` from the GoHighLevel OpenAPI spec.
925#[derive(Debug, Clone, Default, Serialize, Deserialize)]
926pub struct GetBulkActionCampaignsResponseDto {
927    /// List of bulk action campaigns
928    /// Required by the API.
929    #[serde(default, skip_serializing_if = "Vec::is_empty")]
930    pub campaigns: Vec<BulkActionCampaignDto>,
931    /// Total count of bulk action campaigns
932    /// Required by the API.
933    pub total: f64,
934}
935
936/// `GetCampaignStatsPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
937#[derive(Debug, Clone, Default, Serialize, Deserialize)]
938pub struct GetCampaignStatsPublicV2ResponseDto {
939    /// Location ID
940    /// Required by the API.
941    #[serde(rename = "locationId")]
942    pub location_id: String,
943    /// Source type
944    /// Allowed values: `email-campaigns`, `workflow-campaigns`, `bulk-actions`.
945    /// Required by the API.
946    pub source: String,
947    /// Source ID
948    /// Required by the API.
949    #[serde(rename = "sourceId")]
950    pub source_id: String,
951    /// Workflow action ID
952    #[serde(
953        rename = "subSourceId",
954        default,
955        skip_serializing_if = "Option::is_none"
956    )]
957    pub sub_source_id: Option<String>,
958    /// Email performance metrics
959    /// Required by the API.
960    pub stats: EmailStatsNumbersPublicV2Dto,
961    /// Trace ID of the request
962    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
963    pub trace_id: Option<String>,
964}
965
966/// `GetCampaignStatsResponseDto` from the GoHighLevel OpenAPI spec.
967#[derive(Debug, Clone, Default, Serialize, Deserialize)]
968pub struct GetCampaignStatsResponseDto {
969    /// Location ID
970    /// Required by the API.
971    #[serde(rename = "locationId")]
972    pub location_id: String,
973    /// Source type
974    /// Allowed values: `email-campaigns`, `workflow-campaigns`, `bulk-actions`.
975    /// Required by the API.
976    pub source: String,
977    /// Source ID
978    /// Required by the API.
979    #[serde(rename = "sourceId")]
980    pub source_id: String,
981    /// Workflow action ID
982    #[serde(
983        rename = "subSourceId",
984        default,
985        skip_serializing_if = "Option::is_none"
986    )]
987    pub sub_source_id: Option<String>,
988    /// Email performance metrics
989    /// Required by the API.
990    pub stats: EmailStatsNumbersDto,
991}
992
993/// `GetEmailCampaignPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
994#[derive(Debug, Clone, Default, Serialize, Deserialize)]
995pub struct GetEmailCampaignPublicV2ResponseDto {
996    /// Campaign ID
997    /// Required by the API.
998    pub id: String,
999    /// Source of the campaign
1000    #[serde(default, skip_serializing_if = "Option::is_none")]
1001    pub source: Option<String>,
1002    /// Source ID of the campaign
1003    #[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
1004    pub source_id: Option<String>,
1005    /// Campaign name
1006    #[serde(default, skip_serializing_if = "Option::is_none")]
1007    pub name: Option<String>,
1008    /// Campaign status
1009    /// Allowed values: `all`, `sent`, `failed`, `archived`, `draft`, `processing`, `scheduled`,
1010    /// `cancelled`, `paused`.
1011    #[serde(default, skip_serializing_if = "Option::is_none")]
1012    pub status: Option<String>,
1013    /// Campaign delivery type
1014    #[serde(
1015        rename = "campaignType",
1016        default,
1017        skip_serializing_if = "Option::is_none"
1018    )]
1019    pub campaign_type: Option<String>,
1020    /// Campaign category
1021    #[serde(
1022        rename = "campaignCategory",
1023        default,
1024        skip_serializing_if = "Option::is_none"
1025    )]
1026    pub campaign_category: Option<String>,
1027    /// AB test variation identifiers (available only for AB test campaigns)
1028    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1029    pub variations: Vec<EmailCampaignVariationPublicV2Dto>,
1030    /// Original editor type the campaign was created with
1031    /// Allowed values: `html`, `builder`, `text`.
1032    #[serde(
1033        rename = "editorType",
1034        default,
1035        skip_serializing_if = "Option::is_none"
1036    )]
1037    pub editor_type: Option<String>,
1038    /// Whether the campaign uses plain text
1039    #[serde(
1040        rename = "isPlainText",
1041        default,
1042        skip_serializing_if = "Option::is_none"
1043    )]
1044    pub is_plain_text: Option<bool>,
1045    /// URL to fetch the rendered campaign content as HTML. Issue a GET against this URL to
1046    /// retrieve the body.
1047    #[serde(
1048        rename = "editorContentUrl",
1049        default,
1050        skip_serializing_if = "Option::is_none"
1051    )]
1052    pub editor_content_url: Option<String>,
1053    /// Sender name
1054    #[serde(rename = "fromName", default, skip_serializing_if = "Option::is_none")]
1055    pub from_name: Option<String>,
1056    /// Sender email address
1057    #[serde(rename = "fromEmail", default, skip_serializing_if = "Option::is_none")]
1058    pub from_email: Option<String>,
1059    /// Email subject line
1060    #[serde(default, skip_serializing_if = "Option::is_none")]
1061    pub subject: Option<String>,
1062    /// Reply-to email address
1063    #[serde(
1064        rename = "replyToAddress",
1065        default,
1066        skip_serializing_if = "Option::is_none"
1067    )]
1068    pub reply_to_address: Option<String>,
1069    /// Preview text
1070    #[serde(
1071        rename = "previewText",
1072        default,
1073        skip_serializing_if = "Option::is_none"
1074    )]
1075    pub preview_text: Option<String>,
1076    /// Whether the campaign is deleted
1077    /// Required by the API.
1078    pub deleted: bool,
1079    /// Created at timestamp
1080    /// Required by the API.
1081    #[serde(rename = "createdAt")]
1082    pub created_at: String,
1083    /// Last updated timestamp
1084    /// Required by the API.
1085    #[serde(rename = "updatedAt")]
1086    pub updated_at: String,
1087    /// Trace ID of the request
1088    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1089    pub trace_id: Option<String>,
1090}
1091
1092/// `GetTemplatePublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
1093#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1094pub struct GetTemplatePublicV2ResponseDto {
1095    /// Template ID
1096    /// Required by the API.
1097    pub id: String,
1098    /// Template name
1099    /// Required by the API.
1100    pub name: String,
1101    /// Editor type
1102    /// Allowed values: `html`, `builder`, `text`.
1103    /// Required by the API.
1104    #[serde(rename = "editorType")]
1105    pub editor_type: String,
1106    /// Whether template is plain text
1107    /// Required by the API.
1108    #[serde(rename = "isPlainText")]
1109    pub is_plain_text: bool,
1110    /// Parent folder ID
1111    #[serde(
1112        rename = "parentFolderId",
1113        default,
1114        skip_serializing_if = "Option::is_none"
1115    )]
1116    pub parent_folder_id: Option<String>,
1117    /// Sender name
1118    #[serde(rename = "fromName", default, skip_serializing_if = "Option::is_none")]
1119    pub from_name: Option<String>,
1120    /// Sender email address
1121    #[serde(rename = "fromEmail", default, skip_serializing_if = "Option::is_none")]
1122    pub from_email: Option<String>,
1123    /// Email subject line
1124    #[serde(default, skip_serializing_if = "Option::is_none")]
1125    pub subject: Option<String>,
1126    /// Preview text
1127    #[serde(
1128        rename = "previewText",
1129        default,
1130        skip_serializing_if = "Option::is_none"
1131    )]
1132    pub preview_text: Option<String>,
1133    /// URL to fetch the rendered template content as HTML. Issue a GET against this URL to
1134    /// retrieve the body.
1135    #[serde(
1136        rename = "editorContentUrl",
1137        default,
1138        skip_serializing_if = "Option::is_none"
1139    )]
1140    pub editor_content_url: Option<String>,
1141    /// Whether the template is deleted
1142    /// Required by the API.
1143    pub deleted: bool,
1144    /// Created timestamp
1145    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1146    pub created_at: Option<String>,
1147    /// Updated timestamp
1148    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1149    pub updated_at: Option<String>,
1150    /// Trace ID of request
1151    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1152    pub trace_id: Option<String>,
1153}
1154
1155/// `GetWorkflowCampaignPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
1156#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1157pub struct GetWorkflowCampaignPublicV2ResponseDto {
1158    /// Campaign ID
1159    /// Required by the API.
1160    pub id: String,
1161    /// Campaign name
1162    #[serde(default, skip_serializing_if = "Option::is_none")]
1163    pub name: Option<String>,
1164    /// Campaign status
1165    /// Allowed values: `published`, `draft`.
1166    #[serde(default, skip_serializing_if = "Option::is_none")]
1167    pub status: Option<String>,
1168    /// Source of the campaign
1169    #[serde(default, skip_serializing_if = "Option::is_none")]
1170    pub source: Option<String>,
1171    /// Source ID of the campaign
1172    #[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
1173    pub source_id: Option<String>,
1174    /// Sub-sources (email-sending steps) within this workflow. Each entry's `id` can be passed
1175    /// as the `subSourceId` query parameter to the campaign stats endpoint to retrieve per-step
1176    /// stats.
1177    #[serde(rename = "subSources", default, skip_serializing_if = "Vec::is_empty")]
1178    pub sub_sources: Vec<WorkflowCampaignSubSourcePublicV2Dto>,
1179    /// Whether the campaign is deleted
1180    #[serde(default, skip_serializing_if = "Option::is_none")]
1181    pub deleted: Option<bool>,
1182    /// Created at timestamp
1183    /// Required by the API.
1184    #[serde(rename = "createdAt")]
1185    pub created_at: String,
1186    /// Updated at timestamp
1187    /// Required by the API.
1188    #[serde(rename = "updatedAt")]
1189    pub updated_at: String,
1190    /// Trace ID of the request
1191    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1192    pub trace_id: Option<String>,
1193}
1194
1195/// `GetWorkflowCampaignsPublicResponseDto` from the GoHighLevel OpenAPI spec.
1196#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1197pub struct GetWorkflowCampaignsPublicResponseDto {
1198    /// List of workflow campaigns
1199    /// Required by the API.
1200    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1201    pub campaigns: Vec<WorkflowCampaignPublicDto>,
1202    /// Total count of campaigns
1203    /// Required by the API.
1204    pub total: f64,
1205}
1206
1207/// `IBuilderJsonMapper` from the GoHighLevel OpenAPI spec.
1208#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1209pub struct IBuilderJsonMapper {
1210    /// Array of VNode elements representing the email structure
1211    /// Required by the API.
1212    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1213    pub elements: Vec<String>,
1214    /// Object mapping element IDs to their attributes and styles
1215    /// Required by the API.
1216    pub attrs: serde_json::Value,
1217    /// Template-level settings and configuration
1218    /// Required by the API.
1219    #[serde(rename = "templateSettings")]
1220    pub template_settings: TemplateSettings,
1221}
1222
1223/// `ImportTemplatePublicV2BodyDto` from the GoHighLevel OpenAPI spec.
1224#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1225pub struct ImportTemplatePublicV2BodyDto {
1226    /// Import provider (URL-based providers only)
1227    /// Allowed values: `mailchimp`, `active_campaign`.
1228    /// Required by the API.
1229    #[serde(rename = "importProvider")]
1230    pub import_provider: String,
1231    /// Public import URL
1232    /// Required by the API.
1233    #[serde(rename = "importUrl")]
1234    pub import_url: String,
1235    /// Template name
1236    #[serde(default, skip_serializing_if = "Option::is_none")]
1237    pub name: Option<String>,
1238    /// Parent folder ID
1239    #[serde(
1240        rename = "parentFolderId",
1241        default,
1242        skip_serializing_if = "Option::is_none"
1243    )]
1244    pub parent_folder_id: Option<String>,
1245    /// ID of the user performing this action
1246    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
1247    pub user_id: Option<String>,
1248}
1249
1250/// `ImportTemplatePublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
1251#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1252pub struct ImportTemplatePublicV2ResponseDto {
1253    /// Template ID
1254    /// Required by the API.
1255    pub id: String,
1256    /// Template name
1257    /// Required by the API.
1258    pub name: String,
1259    /// Editor type
1260    /// Allowed values: `html`, `text`.
1261    /// Required by the API.
1262    #[serde(rename = "editorType")]
1263    pub editor_type: String,
1264    /// Whether template is plain text
1265    /// Required by the API.
1266    #[serde(rename = "isPlainText")]
1267    pub is_plain_text: bool,
1268    /// Parent folder ID
1269    #[serde(
1270        rename = "parentFolderId",
1271        default,
1272        skip_serializing_if = "Option::is_none"
1273    )]
1274    pub parent_folder_id: Option<String>,
1275    /// Sender name
1276    #[serde(rename = "fromName", default, skip_serializing_if = "Option::is_none")]
1277    pub from_name: Option<String>,
1278    /// Sender email address
1279    #[serde(rename = "fromEmail", default, skip_serializing_if = "Option::is_none")]
1280    pub from_email: Option<String>,
1281    /// Email subject line
1282    #[serde(
1283        rename = "subjectLine",
1284        default,
1285        skip_serializing_if = "Option::is_none"
1286    )]
1287    pub subject_line: Option<String>,
1288    /// Preview text
1289    #[serde(
1290        rename = "previewText",
1291        default,
1292        skip_serializing_if = "Option::is_none"
1293    )]
1294    pub preview_text: Option<String>,
1295    /// Preview URL
1296    #[serde(
1297        rename = "previewUrl",
1298        default,
1299        skip_serializing_if = "Option::is_none"
1300    )]
1301    pub preview_url: Option<String>,
1302    /// Created timestamp
1303    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1304    pub created_at: Option<String>,
1305    /// Updated timestamp
1306    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1307    pub updated_at: Option<String>,
1308    /// Trace ID of request
1309    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1310    pub trace_id: Option<String>,
1311}
1312
1313/// `InvalidLocationDTO` from the GoHighLevel OpenAPI spec.
1314#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1315pub struct InvalidLocationDTO {
1316    /// HTTP status code for invalid location access
1317    #[serde(
1318        rename = "statusCode",
1319        default,
1320        skip_serializing_if = "Option::is_none"
1321    )]
1322    pub status_code: Option<f64>,
1323    /// Error message describing the location access failure
1324    #[serde(default, skip_serializing_if = "Option::is_none")]
1325    pub message: Option<String>,
1326}
1327
1328/// `ListBulkActionCampaignsPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
1329#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1330pub struct ListBulkActionCampaignsPublicV2ResponseDto {
1331    /// List of bulk action campaigns
1332    /// Required by the API.
1333    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1334    pub campaigns: Vec<BulkActionCampaignPublicV2Dto>,
1335    /// Total count of bulk action campaigns
1336    /// Required by the API.
1337    pub total: f64,
1338    /// Trace ID of the request
1339    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1340    pub trace_id: Option<String>,
1341}
1342
1343/// `ListEmailCampaignsPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
1344#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1345pub struct ListEmailCampaignsPublicV2ResponseDto {
1346    /// List of email campaigns
1347    /// Required by the API.
1348    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1349    pub campaigns: Vec<EmailCampaignPublicV2Dto>,
1350    /// Total count of email campaigns
1351    /// Required by the API.
1352    pub total: f64,
1353    /// Trace ID of the request
1354    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1355    pub trace_id: Option<String>,
1356}
1357
1358/// `ListTemplatesPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
1359#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1360pub struct ListTemplatesPublicV2ResponseDto {
1361    /// List of template and folder resources
1362    /// Required by the API.
1363    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1364    pub items: Vec<TemplateListItemPublicV2Dto>,
1365    /// Total count of templates and folders
1366    /// Required by the API.
1367    pub total: f64,
1368    /// Trace ID of the request
1369    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1370    pub trace_id: Option<String>,
1371}
1372
1373/// `ListWorkflowCampaignsPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
1374#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1375pub struct ListWorkflowCampaignsPublicV2ResponseDto {
1376    /// List of workflow campaigns
1377    /// Required by the API.
1378    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1379    pub campaigns: Vec<WorkflowCampaignPublicV2Dto>,
1380    /// Total count of campaigns
1381    /// Required by the API.
1382    pub total: f64,
1383    /// Trace ID of the request
1384    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1385    pub trace_id: Option<String>,
1386}
1387
1388/// `NotFoundDTO` from the GoHighLevel OpenAPI spec.
1389#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1390pub struct NotFoundDTO {
1391    /// HTTP status code for not found
1392    #[serde(
1393        rename = "statusCode",
1394        default,
1395        skip_serializing_if = "Option::is_none"
1396    )]
1397    pub status_code: Option<f64>,
1398    /// Error message describing the not found failure
1399    #[serde(default, skip_serializing_if = "Option::is_none")]
1400    pub message: Option<String>,
1401    /// Error type identifier
1402    #[serde(default, skip_serializing_if = "Option::is_none")]
1403    pub error: Option<String>,
1404}
1405
1406/// `SaveBuilderDataDto` from the GoHighLevel OpenAPI spec.
1407#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1408pub struct SaveBuilderDataDto {
1409    /// Required by the API.
1410    #[serde(rename = "locationId")]
1411    pub location_id: String,
1412    /// Required by the API.
1413    #[serde(rename = "templateId")]
1414    pub template_id: String,
1415    /// Required by the API.
1416    #[serde(rename = "updatedBy")]
1417    pub updated_by: String,
1418    /// Required by the API.
1419    pub dnd: IBuilderJsonMapper,
1420    /// Required by the API.
1421    pub html: String,
1422    /// Allowed values: `html`, `builder`.
1423    /// Required by the API.
1424    #[serde(rename = "editorType")]
1425    pub editor_type: String,
1426    #[serde(
1427        rename = "previewText",
1428        default,
1429        skip_serializing_if = "Option::is_none"
1430    )]
1431    pub preview_text: Option<String>,
1432    #[serde(
1433        rename = "isPlainText",
1434        default,
1435        skip_serializing_if = "Option::is_none"
1436    )]
1437    pub is_plain_text: Option<bool>,
1438    /// Whether Email AI was used
1439    #[serde(
1440        rename = "usedEmailAI",
1441        default,
1442        skip_serializing_if = "Option::is_none"
1443    )]
1444    pub used_email_ai: Option<bool>,
1445}
1446
1447/// `ScheduleCampaignABTestConfigPublicV2Dto` from the GoHighLevel OpenAPI spec.
1448#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1449pub struct ScheduleCampaignABTestConfigPublicV2Dto {
1450    /// What is being tested
1451    /// Allowed values: `emailContent`, `subjectLine`.
1452    /// Required by the API.
1453    #[serde(rename = "testType")]
1454    pub test_type: String,
1455    /// Seconds to run the test before picking a winner
1456    /// Required by the API.
1457    #[serde(rename = "testDuration")]
1458    pub test_duration: f64,
1459    /// Number of variations
1460    /// Required by the API.
1461    #[serde(rename = "variationCount")]
1462    pub variation_count: f64,
1463    /// Percentage of contacts in the test group (0-100)
1464    /// Required by the API.
1465    #[serde(rename = "testSize")]
1466    pub test_size: f64,
1467    /// How to pick the winner
1468    /// Allowed values: `openRate`, `clickRate`.
1469    /// Required by the API.
1470    #[serde(rename = "winningCriteria")]
1471    pub winning_criteria: String,
1472    /// A/B test variations
1473    /// Required by the API.
1474    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1475    pub variations: Vec<ScheduleCampaignABTestVariationPublicV2Dto>,
1476}
1477
1478/// `ScheduleCampaignABTestVariationPublicV2Dto` from the GoHighLevel OpenAPI spec.
1479#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1480pub struct ScheduleCampaignABTestVariationPublicV2Dto {
1481    /// Subject line for this variation
1482    #[serde(default, skip_serializing_if = "Option::is_none")]
1483    pub subject: Option<String>,
1484    /// Template/document ID for this variation
1485    #[serde(
1486        rename = "documentId",
1487        default,
1488        skip_serializing_if = "Option::is_none"
1489    )]
1490    pub document_id: Option<String>,
1491}
1492
1493/// `ScheduleCampaignBatchConfigPublicV2Dto` from the GoHighLevel OpenAPI spec.
1494#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1495pub struct ScheduleCampaignBatchConfigPublicV2Dto {
1496    /// Number of contacts to process per batch
1497    /// Required by the API.
1498    #[serde(rename = "batchSize")]
1499    pub batch_size: f64,
1500    /// Delay between batches
1501    /// Required by the API.
1502    pub interval: f64,
1503    /// Unit for the interval
1504    /// Allowed values: `minutes`, `hours`, `days`.
1505    /// Required by the API.
1506    #[serde(rename = "intervalUnit")]
1507    pub interval_unit: String,
1508    /// Days to skip sending
1509    /// Allowed values: `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`.
1510    #[serde(rename = "skipDays", default, skip_serializing_if = "Vec::is_empty")]
1511    pub skip_days: Vec<String>,
1512    /// Earliest time to send batches
1513    #[serde(
1514        rename = "windowStart",
1515        default,
1516        skip_serializing_if = "Option::is_none"
1517    )]
1518    pub window_start: Option<String>,
1519    /// Latest time to send batches
1520    #[serde(rename = "windowEnd", default, skip_serializing_if = "Option::is_none")]
1521    pub window_end: Option<String>,
1522}
1523
1524/// `ScheduleCampaignEmailMetaPublicV2Dto` from the GoHighLevel OpenAPI spec.
1525#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1526pub struct ScheduleCampaignEmailMetaPublicV2Dto {
1527    /// Email subject line
1528    /// Required by the API.
1529    pub subject: String,
1530    /// Sender display name
1531    /// Required by the API.
1532    #[serde(rename = "fromName")]
1533    pub from_name: String,
1534    /// Sender email address
1535    /// Required by the API.
1536    #[serde(rename = "fromEmail")]
1537    pub from_email: String,
1538    /// Reply-to email address
1539    #[serde(
1540        rename = "replyToAddress",
1541        default,
1542        skip_serializing_if = "Option::is_none"
1543    )]
1544    pub reply_to_address: Option<String>,
1545    /// Preview text shown in inbox after subject
1546    #[serde(
1547        rename = "previewText",
1548        default,
1549        skip_serializing_if = "Option::is_none"
1550    )]
1551    pub preview_text: Option<String>,
1552    /// Attachment download URLs
1553    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1554    pub attachments: Vec<String>,
1555}
1556
1557/// `ScheduleCampaignPublicV2BodyDto` from the GoHighLevel OpenAPI spec.
1558#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1559pub struct ScheduleCampaignPublicV2BodyDto {
1560    /// How to schedule the campaign
1561    /// Allowed values: `immediate`, `scheduled`, `batch`, `rss`, `smart_send`.
1562    /// Required by the API.
1563    #[serde(rename = "scheduleType")]
1564    pub schedule_type: String,
1565    /// IANA timezone
1566    /// Required by the API.
1567    #[serde(rename = "timeZone")]
1568    pub time_zone: String,
1569    /// ID of the user performing this action
1570    /// Required by the API.
1571    #[serde(rename = "userId")]
1572    pub user_id: String,
1573    /// Name of the user performing this action
1574    #[serde(rename = "userName", default, skip_serializing_if = "Option::is_none")]
1575    pub user_name: Option<String>,
1576    /// Email subject, sender, and content metadata
1577    /// Required by the API.
1578    #[serde(rename = "emailMeta")]
1579    pub email_meta: ScheduleCampaignEmailMetaPublicV2Dto,
1580    /// Who receives the email. Must provide either contactIds or filter.
1581    /// Required by the API.
1582    pub recipients: ScheduleCampaignRecipientsPublicV2Dto,
1583    /// Days of the week to allow sending. Used for batch and RSS scheduleTypes.
1584    /// Allowed values: `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`.
1585    #[serde(rename = "sendDays", default, skip_serializing_if = "Vec::is_empty")]
1586    pub send_days: Vec<String>,
1587    /// Schedule configuration for immediate, scheduled, batch, and smart_send types. Required
1588    /// when scheduleType is not rss.
1589    #[serde(
1590        rename = "scheduleConfig",
1591        default,
1592        skip_serializing_if = "Option::is_none"
1593    )]
1594    pub schedule_config: Option<ScheduleCampaignScheduleConfigPublicV2Dto>,
1595    /// RSS feed configuration. Required when scheduleType is rss.
1596    #[serde(rename = "rssConfig", default, skip_serializing_if = "Option::is_none")]
1597    pub rss_config: Option<ScheduleCampaignRssConfigPublicV2Dto>,
1598    /// A/B test configuration. Can be combined with any scheduleType except rss.
1599    #[serde(
1600        rename = "abTestConfig",
1601        default,
1602        skip_serializing_if = "Option::is_none"
1603    )]
1604    pub ab_test_config: Option<ScheduleCampaignABTestConfigPublicV2Dto>,
1605}
1606
1607/// `ScheduleCampaignPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
1608#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1609pub struct ScheduleCampaignPublicV2ResponseDto {
1610    /// Campaign ID
1611    /// Required by the API.
1612    #[serde(rename = "campaignId")]
1613    pub campaign_id: String,
1614    /// Source ID for fetching campaign statistics
1615    /// Required by the API.
1616    #[serde(rename = "sourceId")]
1617    pub source_id: String,
1618    /// Trace ID of the request
1619    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
1620    pub trace_id: Option<String>,
1621}
1622
1623/// `ScheduleCampaignRecipientsPublicV2Dto` from the GoHighLevel OpenAPI spec.
1624#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1625pub struct ScheduleCampaignRecipientsPublicV2Dto {
1626    /// Recipient selection type
1627    /// Allowed values: `contact`, `tag`, `segment`.
1628    /// Required by the API.
1629    #[serde(rename = "type")]
1630    pub type_: String,
1631    /// Contact IDs to send to. Required when type is contact.
1632    #[serde(rename = "contactIds", default, skip_serializing_if = "Vec::is_empty")]
1633    pub contact_ids: Vec<String>,
1634    /// Tag IDs to filter recipients by. Required when type is tag.
1635    #[serde(rename = "tagIds", default, skip_serializing_if = "Vec::is_empty")]
1636    pub tag_ids: Vec<String>,
1637    /// Segment type for pre-built segments. Required when type is segment.
1638    /// Allowed values: `engaged_last_7_days`, `engaged_last_30_days`, `engaged_last_60_days`,
1639    /// `engaged_last_5_campaigns`, `unengaged_last_5_campaigns`.
1640    #[serde(default, skip_serializing_if = "Option::is_none")]
1641    pub segment: Option<String>,
1642    /// Freeze the contact list at schedule time — new matching contacts will not be added later
1643    #[serde(
1644        rename = "freezeList",
1645        default,
1646        skip_serializing_if = "Option::is_none"
1647    )]
1648    pub freeze_list: Option<bool>,
1649}
1650
1651/// `ScheduleCampaignResendPublicV2Dto` from the GoHighLevel OpenAPI spec.
1652#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1653pub struct ScheduleCampaignResendPublicV2Dto {
1654    /// Enable resend to contacts who did not open
1655    #[serde(default, skip_serializing_if = "Option::is_none")]
1656    pub enabled: Option<bool>,
1657    /// Hours to wait before resending. Required when enabled is true.
1658    #[serde(rename = "waitHours", default, skip_serializing_if = "Option::is_none")]
1659    pub wait_hours: Option<f64>,
1660    /// Override subject line for the resend email
1661    #[serde(default, skip_serializing_if = "Option::is_none")]
1662    pub subject: Option<String>,
1663}
1664
1665/// `ScheduleCampaignRssConfigPublicV2Dto` from the GoHighLevel OpenAPI spec.
1666#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1667pub struct ScheduleCampaignRssConfigPublicV2Dto {
1668    /// RSS schedule name
1669    /// Required by the API.
1670    pub name: String,
1671    /// RSS feed URL
1672    /// Required by the API.
1673    #[serde(rename = "rssFeedURL")]
1674    pub rss_feed_url: String,
1675    /// How often to check the feed
1676    /// Allowed values: `every_day`, `every_week`, `every_month`.
1677    /// Required by the API.
1678    #[serde(rename = "repeatAfter")]
1679    pub repeat_after: String,
1680    /// Time of day to execute
1681    /// Required by the API.
1682    #[serde(rename = "repeatAfterTime")]
1683    pub repeat_after_time: String,
1684    /// Max number of RSS items per email
1685    #[serde(
1686        rename = "rssFeedLimit",
1687        default,
1688        skip_serializing_if = "Option::is_none"
1689    )]
1690    pub rss_feed_limit: Option<f64>,
1691    /// Day of week for weekly RSS
1692    /// Allowed values: `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`,
1693    /// `Sunday`.
1694    #[serde(
1695        rename = "startAtDay",
1696        default,
1697        skip_serializing_if = "Option::is_none"
1698    )]
1699    pub start_at_day: Option<String>,
1700    /// Day of month for monthly RSS
1701    #[serde(
1702        rename = "startAtMonthDay",
1703        default,
1704        skip_serializing_if = "Option::is_none"
1705    )]
1706    pub start_at_month_day: Option<String>,
1707    /// Override first execution date/time
1708    #[serde(
1709        rename = "firstExecutionDate",
1710        default,
1711        skip_serializing_if = "Option::is_none"
1712    )]
1713    pub first_execution_date: Option<String>,
1714}
1715
1716/// `ScheduleCampaignScheduleConfigPublicV2Dto` from the GoHighLevel OpenAPI spec.
1717#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1718pub struct ScheduleCampaignScheduleConfigPublicV2Dto {
1719    /// Date/time to send. Required for scheduled, batch, and smart_send. Ignored for immediate.
1720    #[serde(rename = "sendAt", default, skip_serializing_if = "Option::is_none")]
1721    pub send_at: Option<String>,
1722    /// Batch/drip configuration. Required when scheduleType is batch. Ignored otherwise.
1723    #[serde(default, skip_serializing_if = "Option::is_none")]
1724    pub batch: Option<ScheduleCampaignBatchConfigPublicV2Dto>,
1725    /// Click and UTM tracking options
1726    #[serde(default, skip_serializing_if = "Option::is_none")]
1727    pub tracking: Option<ScheduleCampaignTrackingPublicV2Dto>,
1728    /// Auto-resend to contacts who did not open
1729    #[serde(default, skip_serializing_if = "Option::is_none")]
1730    pub resend: Option<ScheduleCampaignResendPublicV2Dto>,
1731    /// Email preference type ID for categorizing this campaign
1732    #[serde(
1733        rename = "emailPreferenceId",
1734        default,
1735        skip_serializing_if = "Option::is_none"
1736    )]
1737    pub email_preference_id: Option<String>,
1738}
1739
1740/// `ScheduleCampaignTrackingPublicV2Dto` from the GoHighLevel OpenAPI spec.
1741#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1742pub struct ScheduleCampaignTrackingPublicV2Dto {
1743    /// Enable click tracking on links
1744    #[serde(
1745        rename = "clickTracking",
1746        default,
1747        skip_serializing_if = "Option::is_none"
1748    )]
1749    pub click_tracking: Option<bool>,
1750    /// Enable UTM parameters on links
1751    #[serde(
1752        rename = "utmTracking",
1753        default,
1754        skip_serializing_if = "Option::is_none"
1755    )]
1756    pub utm_tracking: Option<bool>,
1757}
1758
1759/// `ScheduleDto` from the GoHighLevel OpenAPI spec.
1760#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1761pub struct ScheduleDto {
1762    /// Required by the API.
1763    pub name: String,
1764    /// Required by the API.
1765    #[serde(rename = "repeatAfter")]
1766    pub repeat_after: String,
1767    /// Required by the API.
1768    pub id: String,
1769    /// Required by the API.
1770    #[serde(rename = "parentId")]
1771    pub parent_id: String,
1772    /// Required by the API.
1773    #[serde(rename = "childCount")]
1774    pub child_count: f64,
1775    /// Required by the API.
1776    #[serde(rename = "campaignType")]
1777    pub campaign_type: String,
1778    /// Required by the API.
1779    #[serde(rename = "bulkActionVersion")]
1780    pub bulk_action_version: String,
1781    /// Required by the API.
1782    #[serde(rename = "_id")]
1783    pub id_alt: String,
1784    /// Required by the API.
1785    pub status: String,
1786    /// Required by the API.
1787    #[serde(rename = "sendDays", default, skip_serializing_if = "Vec::is_empty")]
1788    pub send_days: Vec<String>,
1789    /// Required by the API.
1790    pub deleted: bool,
1791    /// Required by the API.
1792    pub migrated: bool,
1793    /// Required by the API.
1794    pub archived: bool,
1795    /// Required by the API.
1796    #[serde(rename = "hasTracking")]
1797    pub has_tracking: bool,
1798    /// Required by the API.
1799    #[serde(rename = "isPlainText")]
1800    pub is_plain_text: bool,
1801    /// Required by the API.
1802    #[serde(rename = "hasUtmTracking")]
1803    pub has_utm_tracking: bool,
1804    /// Required by the API.
1805    #[serde(rename = "enableResendToUnopened")]
1806    pub enable_resend_to_unopened: bool,
1807    /// Required by the API.
1808    #[serde(rename = "locationId")]
1809    pub location_id: String,
1810    /// Required by the API.
1811    #[serde(rename = "templateId")]
1812    pub template_id: String,
1813    /// Required by the API.
1814    #[serde(rename = "templateType")]
1815    pub template_type: String,
1816    /// Required by the API.
1817    #[serde(rename = "createdAt")]
1818    pub created_at: String,
1819    /// Required by the API.
1820    #[serde(rename = "updatedAt")]
1821    pub updated_at: String,
1822    /// Required by the API.
1823    #[serde(rename = "__v")]
1824    pub v: f64,
1825    /// Required by the API.
1826    #[serde(rename = "documentId")]
1827    pub document_id: String,
1828    /// Required by the API.
1829    #[serde(rename = "downloadUrl")]
1830    pub download_url: String,
1831    /// Required by the API.
1832    #[serde(rename = "templateDataDownloadUrl")]
1833    pub template_data_download_url: String,
1834    /// Required by the API.
1835    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1836    pub child: Vec<String>,
1837}
1838
1839/// `ScheduleFetchSuccessfulDTO` from the GoHighLevel OpenAPI spec.
1840#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1841pub struct ScheduleFetchSuccessfulDTO {
1842    /// The list of campaigns
1843    /// Required by the API.
1844    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1845    pub schedules: Vec<ScheduleDto>,
1846    /// The total number of campaigns
1847    /// Required by the API.
1848    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1849    pub total: Vec<String>,
1850    /// Trace Id
1851    /// Required by the API.
1852    #[serde(rename = "traceId")]
1853    pub trace_id: String,
1854}
1855
1856/// `TemplateListItemPublicV2Dto` from the GoHighLevel OpenAPI spec.
1857#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1858pub struct TemplateListItemPublicV2Dto {
1859    /// Resource ID
1860    /// Required by the API.
1861    pub id: String,
1862    /// Resource name
1863    /// Required by the API.
1864    pub name: String,
1865    /// Resource type
1866    /// Allowed values: `template`, `folder`.
1867    /// Required by the API.
1868    #[serde(rename = "type")]
1869    pub type_: String,
1870    /// Whether template is plain text
1871    #[serde(
1872        rename = "isPlainText",
1873        default,
1874        skip_serializing_if = "Option::is_none"
1875    )]
1876    pub is_plain_text: Option<bool>,
1877    /// Last updated timestamp
1878    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
1879    pub updated_at: Option<String>,
1880    /// Created timestamp
1881    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
1882    pub created_at: Option<String>,
1883    /// Preview URL
1884    #[serde(
1885        rename = "previewUrl",
1886        default,
1887        skip_serializing_if = "Option::is_none"
1888    )]
1889    pub preview_url: Option<String>,
1890    /// Editor type for template resources
1891    /// Allowed values: `html`, `builder`, `text`.
1892    #[serde(
1893        rename = "editorType",
1894        default,
1895        skip_serializing_if = "Option::is_none"
1896    )]
1897    pub editor_type: Option<String>,
1898    /// Children count for folder resources
1899    #[serde(
1900        rename = "childCount",
1901        default,
1902        skip_serializing_if = "Option::is_none"
1903    )]
1904    pub child_count: Option<f64>,
1905    /// Whether folder has child resources
1906    #[serde(
1907        rename = "hasChildren",
1908        default,
1909        skip_serializing_if = "Option::is_none"
1910    )]
1911    pub has_children: Option<bool>,
1912    /// Parent folder ID
1913    #[serde(
1914        rename = "parentFolderId",
1915        default,
1916        skip_serializing_if = "Option::is_none"
1917    )]
1918    pub parent_folder_id: Option<String>,
1919}
1920
1921/// `TemplateSettings` from the GoHighLevel OpenAPI spec.
1922#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1923pub struct TemplateSettings {
1924    /// The spec defines no fields for this schema.
1925    #[serde(flatten)]
1926    pub extra: serde_json::Map<String, serde_json::Value>,
1927}
1928
1929/// `UpdateEmailCampaignPublicV2BodyDto` from the GoHighLevel OpenAPI spec.
1930#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1931pub struct UpdateEmailCampaignPublicV2BodyDto {
1932    /// Campaign name
1933    #[serde(default, skip_serializing_if = "Option::is_none")]
1934    pub name: Option<String>,
1935    /// Editor content to update. Required only when updating campaign content, and must be
1936    /// provided together with editorType. Provide HTML or plain-text string content.
1937    #[serde(
1938        rename = "editorContent",
1939        default,
1940        skip_serializing_if = "Option::is_none"
1941    )]
1942    pub editor_content: Option<String>,
1943    /// Editor type for campaign content. Required only when updating campaign content, and must
1944    /// be provided together with editorContent.
1945    /// Allowed values: `html`, `text`.
1946    #[serde(
1947        rename = "editorType",
1948        default,
1949        skip_serializing_if = "Option::is_none"
1950    )]
1951    pub editor_type: Option<String>,
1952    /// ID of the user performing this action
1953    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
1954    pub user_id: Option<String>,
1955}
1956
1957/// `UpdateEmailCampaignPublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
1958#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1959pub struct UpdateEmailCampaignPublicV2ResponseDto {
1960    /// Campaign ID
1961    /// Required by the API.
1962    pub id: String,
1963    /// Source of the campaign
1964    #[serde(default, skip_serializing_if = "Option::is_none")]
1965    pub source: Option<String>,
1966    /// Source ID of the campaign
1967    #[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
1968    pub source_id: Option<String>,
1969    /// Campaign name
1970    #[serde(default, skip_serializing_if = "Option::is_none")]
1971    pub name: Option<String>,
1972    /// Campaign status
1973    /// Allowed values: `all`, `sent`, `failed`, `archived`, `draft`, `processing`, `scheduled`,
1974    /// `cancelled`, `paused`.
1975    #[serde(default, skip_serializing_if = "Option::is_none")]
1976    pub status: Option<String>,
1977    /// Campaign type
1978    #[serde(
1979        rename = "campaignType",
1980        default,
1981        skip_serializing_if = "Option::is_none"
1982    )]
1983    pub campaign_type: Option<String>,
1984    /// Campaign category
1985    #[serde(
1986        rename = "campaignCategory",
1987        default,
1988        skip_serializing_if = "Option::is_none"
1989    )]
1990    pub campaign_category: Option<String>,
1991    /// AB test variation identifiers (available only for AB test campaigns)
1992    #[serde(default, skip_serializing_if = "Vec::is_empty")]
1993    pub variations: Vec<EmailCampaignVariationPublicV2Dto>,
1994    /// Whether the campaign is deleted
1995    /// Required by the API.
1996    pub deleted: bool,
1997    /// Created at timestamp
1998    /// Required by the API.
1999    #[serde(rename = "createdAt")]
2000    pub created_at: String,
2001    /// Last updated timestamp
2002    /// Required by the API.
2003    #[serde(rename = "updatedAt")]
2004    pub updated_at: String,
2005    /// Trace ID of request
2006    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
2007    pub trace_id: Option<String>,
2008}
2009
2010/// `UpdateEmailTemplateDto` from the GoHighLevel OpenAPI spec.
2011#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2012pub struct UpdateEmailTemplateDto {
2013    /// Location ID where the template belongs
2014    /// Required by the API.
2015    #[serde(rename = "locationId")]
2016    pub location_id: String,
2017    /// User ID who is updating the template
2018    #[serde(rename = "updatedBy", default, skip_serializing_if = "Option::is_none")]
2019    pub updated_by: Option<String>,
2020    /// Editor content - can be HTML string, plain text string, or DND builder object depending
2021    /// on editorType. When editorType is "html" or "text", this should be a string. When
2022    /// editorType is "builder", this should be a DND object with elements, attrs, and
2023    /// templateSettings. Must be provided together with editorType.
2024    /// Multiple possible shapes in the spec; raw JSON.
2025    #[serde(
2026        rename = "editorContent",
2027        default,
2028        skip_serializing_if = "Option::is_none"
2029    )]
2030    pub editor_content: Option<serde_json::Value>,
2031    /// Type of editor content: "html" for HTML content, "text" for plain text content,
2032    /// "builder" for drag-and-drop builder content. Must be provided together with
2033    /// editorContent.
2034    /// Allowed values: `html`, `builder`, `text`.
2035    #[serde(
2036        rename = "editorType",
2037        default,
2038        skip_serializing_if = "Option::is_none"
2039    )]
2040    pub editor_type: Option<String>,
2041    /// Preview text shown in email clients before opening
2042    #[serde(
2043        rename = "previewText",
2044        default,
2045        skip_serializing_if = "Option::is_none"
2046    )]
2047    pub preview_text: Option<String>,
2048    /// Email subject line
2049    #[serde(
2050        rename = "subjectLine",
2051        default,
2052        skip_serializing_if = "Option::is_none"
2053    )]
2054    pub subject_line: Option<String>,
2055    /// Sender name displayed in email
2056    #[serde(rename = "fromName", default, skip_serializing_if = "Option::is_none")]
2057    pub from_name: Option<String>,
2058    /// Sender email address
2059    #[serde(rename = "fromEmail", default, skip_serializing_if = "Option::is_none")]
2060    pub from_email: Option<String>,
2061    /// Template name
2062    #[serde(default, skip_serializing_if = "Option::is_none")]
2063    pub name: Option<String>,
2064    /// Whether the template is archived
2065    #[serde(default, skip_serializing_if = "Option::is_none")]
2066    pub archived: Option<bool>,
2067    /// Field-level default values for custom variables in template fields (fromName,
2068    /// subjectLine, previewText)
2069    #[serde(
2070        rename = "fieldDefaults",
2071        default,
2072        skip_serializing_if = "Option::is_none"
2073    )]
2074    pub field_defaults: Option<serde_json::Value>,
2075}
2076
2077/// `UpdateEmailTemplateResponseDto` from the GoHighLevel OpenAPI spec.
2078#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2079pub struct UpdateEmailTemplateResponseDto {
2080    /// Indicates if the update was successful
2081    /// Required by the API.
2082    pub ok: bool,
2083    /// Unique template identifier
2084    /// Required by the API.
2085    pub id: String,
2086    /// Template name
2087    /// Required by the API.
2088    pub name: String,
2089    /// Whether the template is archived
2090    /// Required by the API.
2091    pub archived: bool,
2092    /// Builder version used for the template
2093    /// Required by the API.
2094    #[serde(rename = "builderVersion")]
2095    pub builder_version: String,
2096    /// Sender name displayed in email
2097    /// Required by the API.
2098    #[serde(rename = "fromName")]
2099    pub from_name: String,
2100    /// Sender email address
2101    /// Required by the API.
2102    #[serde(rename = "fromEmail")]
2103    pub from_email: String,
2104    /// Email subject line
2105    /// Required by the API.
2106    #[serde(rename = "subjectLine")]
2107    pub subject_line: String,
2108    /// Preview text shown in email clients
2109    /// Required by the API.
2110    #[serde(rename = "previewText")]
2111    pub preview_text: String,
2112    /// URL to preview the rendered template
2113    /// Required by the API.
2114    #[serde(rename = "previewUrl")]
2115    pub preview_url: String,
2116    /// Type of template editor used
2117    /// Allowed values: `html`, `builder`.
2118    /// Required by the API.
2119    #[serde(rename = "type")]
2120    pub type_: String,
2121    /// Timestamp of last update
2122    /// Required by the API.
2123    #[serde(rename = "lastUpdated")]
2124    pub last_updated: String,
2125    /// Timestamp when template was created
2126    /// Required by the API.
2127    #[serde(rename = "createdAt")]
2128    pub created_at: String,
2129    /// Whether the template contains plain text content (true) or HTML content (false)
2130    /// Required by the API.
2131    #[serde(rename = "isPlainText")]
2132    pub is_plain_text: bool,
2133    /// Field-level default values for custom variables in template fields
2134    #[serde(
2135        rename = "fieldDefaults",
2136        default,
2137        skip_serializing_if = "Option::is_none"
2138    )]
2139    pub field_defaults: Option<serde_json::Value>,
2140}
2141
2142/// `UpdateTemplatePublicV2BodyDto` from the GoHighLevel OpenAPI spec.
2143#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2144pub struct UpdateTemplatePublicV2BodyDto {
2145    /// Template name
2146    #[serde(default, skip_serializing_if = "Option::is_none")]
2147    pub name: Option<String>,
2148    /// Editor content to update. Required only when updating template content, and must be
2149    /// provided together with editorType. Provide HTML or plain-text string content.
2150    #[serde(
2151        rename = "editorContent",
2152        default,
2153        skip_serializing_if = "Option::is_none"
2154    )]
2155    pub editor_content: Option<String>,
2156    /// Type of editor content. Required only when updating template content, and must be
2157    /// provided together with editorContent.
2158    /// Allowed values: `html`, `text`.
2159    #[serde(
2160        rename = "editorType",
2161        default,
2162        skip_serializing_if = "Option::is_none"
2163    )]
2164    pub editor_type: Option<String>,
2165    /// Preview text
2166    #[serde(
2167        rename = "previewText",
2168        default,
2169        skip_serializing_if = "Option::is_none"
2170    )]
2171    pub preview_text: Option<String>,
2172    /// Email subject line
2173    #[serde(
2174        rename = "subjectLine",
2175        default,
2176        skip_serializing_if = "Option::is_none"
2177    )]
2178    pub subject_line: Option<String>,
2179    /// Sender name
2180    #[serde(rename = "fromName", default, skip_serializing_if = "Option::is_none")]
2181    pub from_name: Option<String>,
2182    /// Sender email address
2183    #[serde(rename = "fromEmail", default, skip_serializing_if = "Option::is_none")]
2184    pub from_email: Option<String>,
2185    /// Whether template is archived
2186    #[serde(default, skip_serializing_if = "Option::is_none")]
2187    pub archived: Option<bool>,
2188    /// Parent folder ID. Pass `null` to move template to the root level.
2189    #[serde(
2190        rename = "parentFolderId",
2191        default,
2192        skip_serializing_if = "Option::is_none"
2193    )]
2194    pub parent_folder_id: Option<String>,
2195    /// ID of the user performing this action
2196    #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
2197    pub user_id: Option<String>,
2198}
2199
2200/// `UpdateTemplatePublicV2ResponseDto` from the GoHighLevel OpenAPI spec.
2201#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2202pub struct UpdateTemplatePublicV2ResponseDto {
2203    /// Template ID
2204    /// Required by the API.
2205    pub id: String,
2206    /// Template name
2207    /// Required by the API.
2208    pub name: String,
2209    /// Whether template is archived
2210    /// Required by the API.
2211    pub archived: bool,
2212    /// Sender name
2213    /// Required by the API.
2214    #[serde(rename = "fromName")]
2215    pub from_name: String,
2216    /// Sender email address
2217    /// Required by the API.
2218    #[serde(rename = "fromEmail")]
2219    pub from_email: String,
2220    /// Email subject line
2221    /// Required by the API.
2222    #[serde(rename = "subjectLine")]
2223    pub subject_line: String,
2224    /// Preview text
2225    /// Required by the API.
2226    #[serde(rename = "previewText")]
2227    pub preview_text: String,
2228    /// Preview URL
2229    /// Required by the API.
2230    #[serde(rename = "previewUrl")]
2231    pub preview_url: String,
2232    /// Template type
2233    /// Allowed values: `html`, `text`.
2234    #[serde(
2235        rename = "editorType",
2236        default,
2237        skip_serializing_if = "Option::is_none"
2238    )]
2239    pub editor_type: Option<String>,
2240    /// Whether template is plain text
2241    #[serde(
2242        rename = "isPlainText",
2243        default,
2244        skip_serializing_if = "Option::is_none"
2245    )]
2246    pub is_plain_text: Option<bool>,
2247    /// Parent folder ID
2248    #[serde(
2249        rename = "parentFolderId",
2250        default,
2251        skip_serializing_if = "Option::is_none"
2252    )]
2253    pub parent_folder_id: Option<String>,
2254    /// Last updated timestamp
2255    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
2256    pub updated_at: Option<String>,
2257    /// Created timestamp
2258    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
2259    pub created_at: Option<String>,
2260    /// Trace ID of request
2261    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
2262    pub trace_id: Option<String>,
2263}
2264
2265/// `WorkflowCampaignPublicDto` from the GoHighLevel OpenAPI spec.
2266#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2267pub struct WorkflowCampaignPublicDto {
2268    /// Campaign ID
2269    /// Required by the API.
2270    pub id: String,
2271    /// Campaign name
2272    /// Required by the API.
2273    pub name: String,
2274    /// Campaign status
2275    /// Allowed values: `published`, `draft`.
2276    /// Required by the API.
2277    pub status: String,
2278    /// Source ID
2279    /// Required by the API.
2280    #[serde(rename = "sourceId")]
2281    pub source_id: String,
2282    /// Whether the campaign is deleted
2283    /// Required by the API.
2284    pub deleted: bool,
2285    /// Created at timestamp
2286    /// Required by the API.
2287    #[serde(rename = "createdAt")]
2288    pub created_at: String,
2289    /// Updated at timestamp
2290    /// Required by the API.
2291    #[serde(rename = "updatedAt")]
2292    pub updated_at: String,
2293}
2294
2295/// `WorkflowCampaignPublicV2Dto` from the GoHighLevel OpenAPI spec.
2296#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2297pub struct WorkflowCampaignPublicV2Dto {
2298    /// Campaign ID
2299    /// Required by the API.
2300    pub id: String,
2301    /// Campaign name
2302    #[serde(default, skip_serializing_if = "Option::is_none")]
2303    pub name: Option<String>,
2304    /// Campaign status
2305    /// Allowed values: `published`, `draft`.
2306    #[serde(default, skip_serializing_if = "Option::is_none")]
2307    pub status: Option<String>,
2308    /// Source of the campaign
2309    #[serde(default, skip_serializing_if = "Option::is_none")]
2310    pub source: Option<String>,
2311    /// Source ID of the campaign
2312    #[serde(rename = "sourceId", default, skip_serializing_if = "Option::is_none")]
2313    pub source_id: Option<String>,
2314    /// Whether the campaign is deleted
2315    #[serde(default, skip_serializing_if = "Option::is_none")]
2316    pub deleted: Option<bool>,
2317    /// Created at timestamp
2318    /// Required by the API.
2319    #[serde(rename = "createdAt")]
2320    pub created_at: String,
2321    /// Updated at timestamp
2322    /// Required by the API.
2323    #[serde(rename = "updatedAt")]
2324    pub updated_at: String,
2325}
2326
2327/// `WorkflowCampaignSubSourcePublicV2Dto` from the GoHighLevel OpenAPI spec.
2328#[derive(Debug, Clone, Default, Serialize, Deserialize)]
2329pub struct WorkflowCampaignSubSourcePublicV2Dto {
2330    /// Sub-source identifier (workflow step). Pass this value as the `subSourceId` query
2331    /// parameter on the campaign stats endpoint to retrieve stats scoped to this step.
2332    /// Required by the API.
2333    pub id: String,
2334    /// Workflow step name
2335    #[serde(default, skip_serializing_if = "Option::is_none")]
2336    pub name: Option<String>,
2337    /// Email subject line
2338    #[serde(default, skip_serializing_if = "Option::is_none")]
2339    pub subject: Option<String>,
2340    /// Sender name
2341    #[serde(rename = "fromName", default, skip_serializing_if = "Option::is_none")]
2342    pub from_name: Option<String>,
2343    /// Sender email address
2344    #[serde(rename = "fromEmail", default, skip_serializing_if = "Option::is_none")]
2345    pub from_email: Option<String>,
2346    /// Preview text
2347    #[serde(
2348        rename = "previewText",
2349        default,
2350        skip_serializing_if = "Option::is_none"
2351    )]
2352    pub preview_text: Option<String>,
2353    /// Editor type for this step
2354    /// Allowed values: `html`, `builder`, `text`.
2355    #[serde(
2356        rename = "editorType",
2357        default,
2358        skip_serializing_if = "Option::is_none"
2359    )]
2360    pub editor_type: Option<String>,
2361    /// Whether this step uses plain text
2362    #[serde(
2363        rename = "isPlainText",
2364        default,
2365        skip_serializing_if = "Option::is_none"
2366    )]
2367    pub is_plain_text: Option<bool>,
2368    /// URL to fetch the rendered step content as HTML. Issue a GET against this URL to retrieve
2369    /// the body.
2370    #[serde(
2371        rename = "editorContentUrl",
2372        default,
2373        skip_serializing_if = "Option::is_none"
2374    )]
2375    pub editor_content_url: Option<String>,
2376    /// Timestamp when this step was added to the workflow
2377    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
2378    pub created_at: Option<String>,
2379    /// Timestamp when this step was last updated
2380    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
2381    pub updated_at: Option<String>,
2382}