ghl-models 0.4.1

Rust data models (DTOs) for the GoHighLevel (HighLevel) API v2 and v3, generated from the official OpenAPI specifications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
//! `proposals` data models for GoHighLevel API V2 (21 types).
//!
//! Generated from HighLevel's official OpenAPI spec for the
//! **Proposals** module. Every endpoint that uses these types, with its
//! parameters, required scopes and enum values, is documented in the
//! [`proposals` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/proposals.md).
//!
//! Enable with `features = ["proposals"]`.
// @generated by xtask/generate_models.py — do not edit by hand.
// Source: https://github.com/GoHighLevel/highlevel-api-docs
// Doc comments are HighLevel's own field descriptions, reflowed verbatim, so
// they aren't held to rustdoc's markdown conventions.
#![allow(
    missing_docs,
    clippy::doc_lazy_continuation,
    clippy::doc_overindented_list_items
)]

use serde::{Deserialize, Serialize};

/// `BadRequestDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct BadRequestDTO {
    #[serde(
        rename = "statusCode",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub status_code: Option<f64>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}

/// `CCRecipientItem` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CCRecipientItem {
    /// Email
    /// Required by the API.
    pub email: String,
    /// Contact ID
    /// Required by the API.
    pub id: String,
    /// Contact Image URL
    /// Required by the API.
    #[serde(rename = "imageUrl")]
    pub image_url: String,
    /// Contact Name
    /// Required by the API.
    #[serde(rename = "contactName")]
    pub contact_name: String,
    /// First Name
    /// Required by the API.
    #[serde(rename = "firstName")]
    pub first_name: String,
    /// Last Name
    /// Required by the API.
    #[serde(rename = "lastName")]
    pub last_name: String,
}

/// `DiscountDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DiscountDto {
    /// Unique identifier for the discount
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Discount value (either a percentage or custom amount)
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<f64>,
    /// Type of discount
    /// Allowed values: `percentage`, `custom_amount`.
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
}

/// `DocumentDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DocumentDto {
    /// Location Id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "locationId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub location_id: Option<String>,
    /// Document Id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "documentId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub document_id: Option<String>,
    /// Unique identifier
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Name of the document
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Type of the document
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
    /// Whether the document is deleted
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub deleted: Option<bool>,
    /// Whether the document is expired
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "isExpired", default, skip_serializing_if = "Option::is_none")]
    pub is_expired: Option<bool>,
    /// Number of times document is moved to draft state
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "documentRevision",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub document_revision: Option<f64>,
    /// Fillable fields
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "fillableFields",
        default,
        skip_serializing_if = "Vec::is_empty"
    )]
    pub fillable_fields: Vec<FillableFieldsDTO>,
    /// Grand total object of the document
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "grandTotal",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub grand_total: Option<GrandTotalDto>,
    /// Locale of the location
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub locale: Option<String>,
    /// Document status
    /// Allowed values: `draft`, `sent`, `viewed`, `completed`, `accepted`.
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub status: Vec<String>,
    /// Payment status
    /// Allowed values: `waiting_for_payment`, `paid`, `no_payment`.
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "paymentStatus",
        default,
        skip_serializing_if = "Vec::is_empty"
    )]
    pub payment_status: Vec<String>,
    /// Recipients
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub recipients: Vec<RecipientItem>,
    /// Links for the document if its sent
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub links: Vec<ProposalEstimateLinksDto>,
    /// Date start from (ISO 8601)
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
    /// Date to (ISO 8601)
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
}

/// `DocumentListResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct DocumentListResponseDto {
    /// List of documents
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub documents: Vec<DocumentDto>,
    /// Total records available
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub total: Option<f64>,
    /// WhiteLabel url for document
    #[serde(
        rename = "whiteLabelBaseUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub white_label_base_url: Option<f64>,
    /// WhiteLabel url for invoice
    #[serde(
        rename = "whiteLabelBaseUrlForInvoice",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub white_label_base_url_for_invoice: Option<f64>,
}

/// Element type
/// Allowed values: `Page`, `Text`, `Image`, `Video`, `Table`, `ProductList`, `PageBreak`,
/// `Signature`, `PaymentDetails`, `TextField`, `DateField`, `InitialsField`, `Checkbox`,
/// `Row`, `Column`.
/// Kept as `String` so new upstream values don't break deserialization.
pub type ELEMENTSLOOKUP = String;

/// Entity type
/// Allowed values: `contacts`, `users`.
/// Kept as `String` so new upstream values don't break deserialization.
pub type EntityReference = String;

/// `FillableFieldsDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct FillableFieldsDTO {
    /// Field Id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "fieldId", default, skip_serializing_if = "Option::is_none")]
    pub field_id: Option<String>,
    /// Is the field required
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "isRequired",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub is_required: Option<bool>,
    /// Has the field been completed
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "hasCompleted",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub has_completed: Option<bool>,
    /// Recipient
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub recipient: Option<String>,
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "entityType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub entity_type: Option<EntityReference>,
    /// Id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<ELEMENTSLOOKUP>,
    /// Value of the field
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

/// `GrandTotalDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct GrandTotalDto {
    /// Total amount before discounts
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub amount: Option<f64>,
    /// Currency of the total amount
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    /// Total discount percentage applied
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "discountPercentage",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub discount_percentage: Option<f64>,
    /// List of applied discounts
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub discounts: Vec<DiscountDto>,
}

/// `NotificationSendSettingDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct NotificationSendSettingDto {
    /// Required by the API.
    #[serde(rename = "templateId")]
    pub template_id: String,
    /// Required by the API.
    pub subject: String,
}

/// `NotificationSenderSettingDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct NotificationSenderSettingDto {
    /// Required by the API.
    #[serde(rename = "fromEmail")]
    pub from_email: String,
    /// Required by the API.
    #[serde(rename = "fromName")]
    pub from_name: String,
}

/// `NotificationSettingsDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct NotificationSettingsDto {
    /// Required by the API.
    pub receive: NotificationSendSettingDto,
    /// Required by the API.
    pub sender: NotificationSenderSettingDto,
}

/// `ProposalEstimateLinksDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ProposalEstimateLinksDto {
    /// Reference ID
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "referenceId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub reference_id: Option<String>,
    /// Document ID
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "documentId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub document_id: Option<String>,
    /// Recipient ID
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "recipientId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub recipient_id: Option<String>,
    /// Entity name that the recipient belongs to
    /// Allowed values: `contacts`, `users`.
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "entityName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub entity_name: Option<String>,
    /// Recipient category (recipient, cc, or bcc)
    /// Allowed values: `recipient`, `cc`, `bcc`.
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "recipientCategory",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub recipient_category: Option<String>,
    /// Document revision number
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "documentRevision",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub document_revision: Option<f64>,
    /// Created by user ID
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
    pub created_by: Option<String>,
    /// Whether the document is deleted
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub deleted: Option<bool>,
}

/// `RecipientItem` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct RecipientItem {
    /// Recipient Id
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Recipient First Name
    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
    pub first_name: Option<String>,
    /// Recipient Last Name
    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
    pub last_name: Option<String>,
    /// Recipient Email
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    /// Recipient Phone Number
    #[serde(
        rename = "phoneNumber",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub phone_number: Option<String>,
    /// Recipient Phone
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub phone: Option<String>,
    /// Recipient has completed the document
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "hasCompleted",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub has_completed: Option<bool>,
    /// Recipient role
    /// Allowed values: `user`, `signer`.
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub role: Option<String>,
    /// Recipient is primary
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "isPrimary", default, skip_serializing_if = "Option::is_none")]
    pub is_primary: Option<bool>,
    /// Recipient signing order
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "signingOrder",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub signing_order: Option<f64>,
    /// Recipient image url
    #[serde(rename = "imgUrl", default, skip_serializing_if = "Option::is_none")]
    pub img_url: Option<String>,
    /// Recipient ip
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ip: Option<String>,
    /// Recipient user agent
    #[serde(rename = "userAgent", default, skip_serializing_if = "Option::is_none")]
    pub user_agent: Option<String>,
    /// Recipient signed date
    #[serde(
        rename = "signedDate",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub signed_date: Option<String>,
    /// Recipient contact name
    #[serde(
        rename = "contactName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub contact_name: Option<String>,
    /// Recipient country
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub country: Option<String>,
    /// Recipient entity name
    #[serde(
        rename = "entityName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub entity_name: Option<String>,
    /// Recipient initials image url
    #[serde(
        rename = "initialsImgUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub initials_img_url: Option<String>,
    /// Recipient last viewed date
    #[serde(
        rename = "lastViewedAt",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub last_viewed_at: Option<String>,
    /// Share link
    #[serde(rename = "shareLink", default, skip_serializing_if = "Option::is_none")]
    pub share_link: Option<String>,
}

/// `SendDocumentDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct SendDocumentDto {
    /// Location Id
    /// Required by the API.
    #[serde(rename = "locationId")]
    pub location_id: String,
    /// Document Id
    /// Required by the API.
    #[serde(rename = "documentId")]
    pub document_id: String,
    /// Document Name
    #[serde(
        rename = "documentName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub document_name: Option<String>,
    /// Medium to be used for sending the document
    /// Allowed values: `link`, `email`.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub medium: Option<String>,
    /// CC Recipient
    #[serde(
        rename = "ccRecipients",
        default,
        skip_serializing_if = "Vec::is_empty"
    )]
    pub cc_recipients: Vec<CCRecipientItem>,
    #[serde(
        rename = "notificationSettings",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub notification_settings: Option<NotificationSettingsDto>,
    /// Sent ByUser Id
    /// Required by the API.
    #[serde(rename = "sentBy")]
    pub sent_by: String,
}

/// `SendDocumentFromPublicApiBodyDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct SendDocumentFromPublicApiBodyDto {
    /// Template Id
    /// Required by the API.
    #[serde(rename = "templateId")]
    pub template_id: String,
    /// User Id
    /// Required by the API.
    #[serde(rename = "userId")]
    pub user_id: String,
    /// Send Document
    #[serde(
        rename = "sendDocument",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub send_document: Option<bool>,
    /// Location Id
    /// Required by the API.
    #[serde(rename = "locationId")]
    pub location_id: String,
    /// Contact Id
    /// Required by the API.
    #[serde(rename = "contactId")]
    pub contact_id: String,
    /// Opportunity Id
    #[serde(
        rename = "opportunityId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub opportunity_id: Option<String>,
}

/// `SendDocumentResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct SendDocumentResponseDto {
    /// Success status
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub success: Option<bool>,
    /// Links for all recipients
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub links: Vec<ProposalEstimateLinksDto>,
}

/// `SendTemplateResponseDto` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct SendTemplateResponseDto {
    /// Success status
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub success: Option<bool>,
    /// Links for all recipients
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub links: Vec<ProposalEstimateLinksDto>,
}

/// `TemplateListPaginationResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct TemplateListPaginationResponseDTO {
    /// Array of templates
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub data: Vec<TemplateListResponseDTO>,
    /// Total number of templates
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub total: Option<f64>,
    /// Trace ID for request tracking
    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
    pub trace_id: Option<String>,
}

/// `TemplateListResponseDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct TemplateListResponseDTO {
    /// Template ID
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Whether the template is deleted
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub deleted: Option<bool>,
    /// Template version
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub version: Option<f64>,
    /// Template name
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Location ID
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "locationId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub location_id: Option<String>,
    /// Template type
    /// Allowed values: `proposal`, `estimate`, `contentLibrary`.
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
    /// User ID who last updated the template
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "updatedBy", default, skip_serializing_if = "Option::is_none")]
    pub updated_by: Option<String>,
    /// Whether the template is a public document
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(
        rename = "isPublicDocument",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub is_public_document: Option<bool>,
    /// Template creation date
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Template last update date
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
    /// Template ID (alias for _id)
    /// Required by the API.
    /// (Optional here so responses that omit it still parse.)
    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
    pub id_alt: Option<String>,
    /// Document count (only present when isPublicDocument is true)
    #[serde(
        rename = "documentCount",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub document_count: Option<f64>,
    /// Document form URL (only present when isPublicDocument is true)
    #[serde(
        rename = "docFormUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub doc_form_url: Option<String>,
}

/// `UnauthorizedDTO` from the GoHighLevel OpenAPI spec.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct UnauthorizedDTO {
    #[serde(
        rename = "statusCode",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub status_code: Option<f64>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}