Skip to main content

ghl_models/v3/
emails.rs

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