Skip to main content

ghl_models/v3/
proposals.rs

1//! `proposals` data models for GoHighLevel API V3 (21 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Proposals** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`proposals` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/proposals.md).
7//!
8//! Enable with `features = ["proposals"]`.
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/// `BadRequestDTO` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct BadRequestDTO {
24    #[serde(
25        rename = "statusCode",
26        default,
27        skip_serializing_if = "Option::is_none"
28    )]
29    pub status_code: Option<f64>,
30    #[serde(default, skip_serializing_if = "Option::is_none")]
31    pub message: Option<String>,
32}
33
34/// `CCRecipientItem` from the GoHighLevel OpenAPI spec.
35#[derive(Debug, Clone, Default, Serialize, Deserialize)]
36pub struct CCRecipientItem {
37    /// Email
38    /// Required by the API.
39    pub email: String,
40    /// Contact ID
41    /// Required by the API.
42    pub id: String,
43    /// Contact Image URL
44    /// Required by the API.
45    #[serde(rename = "imageUrl")]
46    pub image_url: String,
47    /// Contact Name
48    /// Required by the API.
49    #[serde(rename = "contactName")]
50    pub contact_name: String,
51    /// First Name
52    /// Required by the API.
53    #[serde(rename = "firstName")]
54    pub first_name: String,
55    /// Last Name
56    /// Required by the API.
57    #[serde(rename = "lastName")]
58    pub last_name: String,
59}
60
61/// `DiscountDto` from the GoHighLevel OpenAPI spec.
62#[derive(Debug, Clone, Default, Serialize, Deserialize)]
63pub struct DiscountDto {
64    /// Unique identifier for the discount
65    /// Required by the API.
66    /// (Optional here so responses that omit it still parse.)
67    #[serde(default, skip_serializing_if = "Option::is_none")]
68    pub id: Option<String>,
69    /// Discount value (either a percentage or custom amount)
70    /// Required by the API.
71    /// (Optional here so responses that omit it still parse.)
72    #[serde(default, skip_serializing_if = "Option::is_none")]
73    pub value: Option<f64>,
74    /// Type of discount
75    /// Allowed values: `percentage`, `custom_amount`.
76    /// Required by the API.
77    /// (Optional here so responses that omit it still parse.)
78    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
79    pub type_: Option<String>,
80}
81
82/// `DocumentDto` from the GoHighLevel OpenAPI spec.
83#[derive(Debug, Clone, Default, Serialize, Deserialize)]
84pub struct DocumentDto {
85    /// Location Id
86    /// Required by the API.
87    /// (Optional here so responses that omit it still parse.)
88    #[serde(
89        rename = "locationId",
90        default,
91        skip_serializing_if = "Option::is_none"
92    )]
93    pub location_id: Option<String>,
94    /// Document Id
95    /// Required by the API.
96    /// (Optional here so responses that omit it still parse.)
97    #[serde(
98        rename = "documentId",
99        default,
100        skip_serializing_if = "Option::is_none"
101    )]
102    pub document_id: Option<String>,
103    /// Unique identifier
104    /// Required by the API.
105    /// (Optional here so responses that omit it still parse.)
106    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
107    pub id: Option<String>,
108    /// Name of the document
109    /// Required by the API.
110    /// (Optional here so responses that omit it still parse.)
111    #[serde(default, skip_serializing_if = "Option::is_none")]
112    pub name: Option<String>,
113    /// Type of the document
114    /// Required by the API.
115    /// (Optional here so responses that omit it still parse.)
116    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
117    pub type_: Option<String>,
118    /// Whether the document is deleted
119    /// Required by the API.
120    /// (Optional here so responses that omit it still parse.)
121    #[serde(default, skip_serializing_if = "Option::is_none")]
122    pub deleted: Option<bool>,
123    /// Whether the document is expired
124    /// Required by the API.
125    /// (Optional here so responses that omit it still parse.)
126    #[serde(rename = "isExpired", default, skip_serializing_if = "Option::is_none")]
127    pub is_expired: Option<bool>,
128    /// Number of times document is moved to draft state
129    /// Required by the API.
130    /// (Optional here so responses that omit it still parse.)
131    #[serde(
132        rename = "documentRevision",
133        default,
134        skip_serializing_if = "Option::is_none"
135    )]
136    pub document_revision: Option<f64>,
137    /// Fillable fields
138    /// Required by the API.
139    /// (Optional here so responses that omit it still parse.)
140    #[serde(
141        rename = "fillableFields",
142        default,
143        skip_serializing_if = "Vec::is_empty"
144    )]
145    pub fillable_fields: Vec<FillableFieldsDTO>,
146    /// Grand total object of the document
147    /// Required by the API.
148    /// (Optional here so responses that omit it still parse.)
149    #[serde(
150        rename = "grandTotal",
151        default,
152        skip_serializing_if = "Option::is_none"
153    )]
154    pub grand_total: Option<GrandTotalDto>,
155    /// Locale of the location
156    /// Required by the API.
157    /// (Optional here so responses that omit it still parse.)
158    #[serde(default, skip_serializing_if = "Option::is_none")]
159    pub locale: Option<String>,
160    /// Document status
161    /// Allowed values: `draft`, `sent`, `viewed`, `completed`, `accepted`.
162    /// Required by the API.
163    /// (Optional here so responses that omit it still parse.)
164    #[serde(default, skip_serializing_if = "Vec::is_empty")]
165    pub status: Vec<String>,
166    /// Payment status
167    /// Allowed values: `waiting_for_payment`, `paid`, `no_payment`.
168    /// Required by the API.
169    /// (Optional here so responses that omit it still parse.)
170    #[serde(
171        rename = "paymentStatus",
172        default,
173        skip_serializing_if = "Vec::is_empty"
174    )]
175    pub payment_status: Vec<String>,
176    /// Recipients
177    /// Required by the API.
178    /// (Optional here so responses that omit it still parse.)
179    #[serde(default, skip_serializing_if = "Vec::is_empty")]
180    pub recipients: Vec<RecipientItem>,
181    /// Links for the document if its sent
182    /// Required by the API.
183    /// (Optional here so responses that omit it still parse.)
184    #[serde(default, skip_serializing_if = "Vec::is_empty")]
185    pub links: Vec<ProposalEstimateLinksDto>,
186    /// Date start from (ISO 8601)
187    /// Required by the API.
188    /// (Optional here so responses that omit it still parse.)
189    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
190    pub updated_at: Option<String>,
191    /// Date to (ISO 8601)
192    /// Required by the API.
193    /// (Optional here so responses that omit it still parse.)
194    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
195    pub created_at: Option<String>,
196}
197
198/// `DocumentListResponseDto` from the GoHighLevel OpenAPI spec.
199#[derive(Debug, Clone, Default, Serialize, Deserialize)]
200pub struct DocumentListResponseDto {
201    /// List of documents
202    /// Required by the API.
203    /// (Optional here so responses that omit it still parse.)
204    #[serde(default, skip_serializing_if = "Vec::is_empty")]
205    pub documents: Vec<DocumentDto>,
206    /// Total records available
207    /// Required by the API.
208    /// (Optional here so responses that omit it still parse.)
209    #[serde(default, skip_serializing_if = "Option::is_none")]
210    pub total: Option<f64>,
211    /// WhiteLabel url for document
212    #[serde(
213        rename = "whiteLabelBaseUrl",
214        default,
215        skip_serializing_if = "Option::is_none"
216    )]
217    pub white_label_base_url: Option<f64>,
218    /// WhiteLabel url for invoice
219    #[serde(
220        rename = "whiteLabelBaseUrlForInvoice",
221        default,
222        skip_serializing_if = "Option::is_none"
223    )]
224    pub white_label_base_url_for_invoice: Option<f64>,
225}
226
227/// Element type
228/// Allowed values: `Page`, `Text`, `Image`, `Video`, `Table`, `ProductList`, `PageBreak`,
229/// `Signature`, `PaymentDetails`, `TextField`, `DateField`, `InitialsField`, `Checkbox`,
230/// `Row`, `Column`.
231/// Kept as `String` so new upstream values don't break deserialization.
232pub type ELEMENTSLOOKUP = String;
233
234/// Entity type
235/// Allowed values: `contacts`, `users`.
236/// Kept as `String` so new upstream values don't break deserialization.
237pub type EntityReference = String;
238
239/// `FillableFieldsDTO` from the GoHighLevel OpenAPI spec.
240#[derive(Debug, Clone, Default, Serialize, Deserialize)]
241pub struct FillableFieldsDTO {
242    /// Field Id
243    /// Required by the API.
244    /// (Optional here so responses that omit it still parse.)
245    #[serde(rename = "fieldId", default, skip_serializing_if = "Option::is_none")]
246    pub field_id: Option<String>,
247    /// Is the field required
248    /// Required by the API.
249    /// (Optional here so responses that omit it still parse.)
250    #[serde(
251        rename = "isRequired",
252        default,
253        skip_serializing_if = "Option::is_none"
254    )]
255    pub is_required: Option<bool>,
256    /// Has the field been completed
257    /// Required by the API.
258    /// (Optional here so responses that omit it still parse.)
259    #[serde(
260        rename = "hasCompleted",
261        default,
262        skip_serializing_if = "Option::is_none"
263    )]
264    pub has_completed: Option<bool>,
265    /// Recipient
266    /// Required by the API.
267    /// (Optional here so responses that omit it still parse.)
268    #[serde(default, skip_serializing_if = "Option::is_none")]
269    pub recipient: Option<String>,
270    /// Required by the API.
271    /// (Optional here so responses that omit it still parse.)
272    #[serde(
273        rename = "entityType",
274        default,
275        skip_serializing_if = "Option::is_none"
276    )]
277    pub entity_type: Option<EntityReference>,
278    /// Id
279    /// Required by the API.
280    /// (Optional here so responses that omit it still parse.)
281    #[serde(default, skip_serializing_if = "Option::is_none")]
282    pub id: Option<String>,
283    /// Required by the API.
284    /// (Optional here so responses that omit it still parse.)
285    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
286    pub type_: Option<ELEMENTSLOOKUP>,
287    /// Value of the field
288    /// Required by the API.
289    /// (Optional here so responses that omit it still parse.)
290    #[serde(default, skip_serializing_if = "Option::is_none")]
291    pub value: Option<String>,
292}
293
294/// `GrandTotalDto` from the GoHighLevel OpenAPI spec.
295#[derive(Debug, Clone, Default, Serialize, Deserialize)]
296pub struct GrandTotalDto {
297    /// Total amount before discounts
298    /// Required by the API.
299    /// (Optional here so responses that omit it still parse.)
300    #[serde(default, skip_serializing_if = "Option::is_none")]
301    pub amount: Option<f64>,
302    /// Currency of the total amount
303    /// Required by the API.
304    /// (Optional here so responses that omit it still parse.)
305    #[serde(default, skip_serializing_if = "Option::is_none")]
306    pub currency: Option<String>,
307    /// Total discount percentage applied
308    /// Required by the API.
309    /// (Optional here so responses that omit it still parse.)
310    #[serde(
311        rename = "discountPercentage",
312        default,
313        skip_serializing_if = "Option::is_none"
314    )]
315    pub discount_percentage: Option<f64>,
316    /// List of applied discounts
317    /// Required by the API.
318    /// (Optional here so responses that omit it still parse.)
319    #[serde(default, skip_serializing_if = "Vec::is_empty")]
320    pub discounts: Vec<DiscountDto>,
321}
322
323/// `NotificationSendSettingDto` from the GoHighLevel OpenAPI spec.
324#[derive(Debug, Clone, Default, Serialize, Deserialize)]
325pub struct NotificationSendSettingDto {
326    /// Required by the API.
327    #[serde(rename = "templateId")]
328    pub template_id: String,
329    /// Required by the API.
330    pub subject: String,
331}
332
333/// `NotificationSenderSettingDto` from the GoHighLevel OpenAPI spec.
334#[derive(Debug, Clone, Default, Serialize, Deserialize)]
335pub struct NotificationSenderSettingDto {
336    /// Required by the API.
337    #[serde(rename = "fromEmail")]
338    pub from_email: String,
339    /// Required by the API.
340    #[serde(rename = "fromName")]
341    pub from_name: String,
342}
343
344/// `NotificationSettingsDto` from the GoHighLevel OpenAPI spec.
345#[derive(Debug, Clone, Default, Serialize, Deserialize)]
346pub struct NotificationSettingsDto {
347    /// Required by the API.
348    pub receive: NotificationSendSettingDto,
349    /// Required by the API.
350    pub sender: NotificationSenderSettingDto,
351}
352
353/// `ProposalEstimateLinksDto` from the GoHighLevel OpenAPI spec.
354#[derive(Debug, Clone, Default, Serialize, Deserialize)]
355pub struct ProposalEstimateLinksDto {
356    /// Reference ID
357    /// Required by the API.
358    /// (Optional here so responses that omit it still parse.)
359    #[serde(
360        rename = "referenceId",
361        default,
362        skip_serializing_if = "Option::is_none"
363    )]
364    pub reference_id: Option<String>,
365    /// Document ID
366    /// Required by the API.
367    /// (Optional here so responses that omit it still parse.)
368    #[serde(
369        rename = "documentId",
370        default,
371        skip_serializing_if = "Option::is_none"
372    )]
373    pub document_id: Option<String>,
374    /// Recipient ID
375    /// Required by the API.
376    /// (Optional here so responses that omit it still parse.)
377    #[serde(
378        rename = "recipientId",
379        default,
380        skip_serializing_if = "Option::is_none"
381    )]
382    pub recipient_id: Option<String>,
383    /// Entity name that the recipient belongs to
384    /// Allowed values: `contacts`, `users`.
385    /// Required by the API.
386    /// (Optional here so responses that omit it still parse.)
387    #[serde(
388        rename = "entityName",
389        default,
390        skip_serializing_if = "Option::is_none"
391    )]
392    pub entity_name: Option<String>,
393    /// Recipient category (recipient, cc, or bcc)
394    /// Allowed values: `recipient`, `cc`, `bcc`.
395    /// Required by the API.
396    /// (Optional here so responses that omit it still parse.)
397    #[serde(
398        rename = "recipientCategory",
399        default,
400        skip_serializing_if = "Option::is_none"
401    )]
402    pub recipient_category: Option<String>,
403    /// Document revision number
404    /// Required by the API.
405    /// (Optional here so responses that omit it still parse.)
406    #[serde(
407        rename = "documentRevision",
408        default,
409        skip_serializing_if = "Option::is_none"
410    )]
411    pub document_revision: Option<f64>,
412    /// Created by user ID
413    /// Required by the API.
414    /// (Optional here so responses that omit it still parse.)
415    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
416    pub created_by: Option<String>,
417    /// Whether the document is deleted
418    /// Required by the API.
419    /// (Optional here so responses that omit it still parse.)
420    #[serde(default, skip_serializing_if = "Option::is_none")]
421    pub deleted: Option<bool>,
422}
423
424/// `RecipientItem` from the GoHighLevel OpenAPI spec.
425#[derive(Debug, Clone, Default, Serialize, Deserialize)]
426pub struct RecipientItem {
427    /// Recipient Id
428    /// Required by the API.
429    /// (Optional here so responses that omit it still parse.)
430    #[serde(default, skip_serializing_if = "Option::is_none")]
431    pub id: Option<String>,
432    /// Recipient First Name
433    #[serde(rename = "firstName", default, skip_serializing_if = "Option::is_none")]
434    pub first_name: Option<String>,
435    /// Recipient Last Name
436    #[serde(rename = "lastName", default, skip_serializing_if = "Option::is_none")]
437    pub last_name: Option<String>,
438    /// Recipient Email
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 email: Option<String>,
443    /// Recipient Phone Number
444    #[serde(
445        rename = "phoneNumber",
446        default,
447        skip_serializing_if = "Option::is_none"
448    )]
449    pub phone_number: Option<String>,
450    /// Recipient Phone
451    #[serde(default, skip_serializing_if = "Option::is_none")]
452    pub phone: Option<String>,
453    /// Recipient has completed the document
454    /// Required by the API.
455    /// (Optional here so responses that omit it still parse.)
456    #[serde(
457        rename = "hasCompleted",
458        default,
459        skip_serializing_if = "Option::is_none"
460    )]
461    pub has_completed: Option<bool>,
462    /// Recipient role
463    /// Allowed values: `user`, `signer`.
464    /// Required by the API.
465    /// (Optional here so responses that omit it still parse.)
466    #[serde(default, skip_serializing_if = "Option::is_none")]
467    pub role: Option<String>,
468    /// Recipient is primary
469    /// Required by the API.
470    /// (Optional here so responses that omit it still parse.)
471    #[serde(rename = "isPrimary", default, skip_serializing_if = "Option::is_none")]
472    pub is_primary: Option<bool>,
473    /// Recipient signing order
474    /// Required by the API.
475    /// (Optional here so responses that omit it still parse.)
476    #[serde(
477        rename = "signingOrder",
478        default,
479        skip_serializing_if = "Option::is_none"
480    )]
481    pub signing_order: Option<f64>,
482    /// Recipient image url
483    #[serde(rename = "imgUrl", default, skip_serializing_if = "Option::is_none")]
484    pub img_url: Option<String>,
485    /// Recipient ip
486    #[serde(default, skip_serializing_if = "Option::is_none")]
487    pub ip: Option<String>,
488    /// Recipient user agent
489    #[serde(rename = "userAgent", default, skip_serializing_if = "Option::is_none")]
490    pub user_agent: Option<String>,
491    /// Recipient signed date
492    #[serde(
493        rename = "signedDate",
494        default,
495        skip_serializing_if = "Option::is_none"
496    )]
497    pub signed_date: Option<String>,
498    /// Recipient contact name
499    #[serde(
500        rename = "contactName",
501        default,
502        skip_serializing_if = "Option::is_none"
503    )]
504    pub contact_name: Option<String>,
505    /// Recipient country
506    #[serde(default, skip_serializing_if = "Option::is_none")]
507    pub country: Option<String>,
508    /// Recipient entity name
509    #[serde(
510        rename = "entityName",
511        default,
512        skip_serializing_if = "Option::is_none"
513    )]
514    pub entity_name: Option<String>,
515    /// Recipient initials image url
516    #[serde(
517        rename = "initialsImgUrl",
518        default,
519        skip_serializing_if = "Option::is_none"
520    )]
521    pub initials_img_url: Option<String>,
522    /// Recipient last viewed date
523    #[serde(
524        rename = "lastViewedAt",
525        default,
526        skip_serializing_if = "Option::is_none"
527    )]
528    pub last_viewed_at: Option<String>,
529    /// Share link
530    #[serde(rename = "shareLink", default, skip_serializing_if = "Option::is_none")]
531    pub share_link: Option<String>,
532}
533
534/// `SendDocumentDto` from the GoHighLevel OpenAPI spec.
535#[derive(Debug, Clone, Default, Serialize, Deserialize)]
536pub struct SendDocumentDto {
537    /// Location Id
538    /// Required by the API.
539    #[serde(rename = "locationId")]
540    pub location_id: String,
541    /// Document Id
542    /// Required by the API.
543    #[serde(rename = "documentId")]
544    pub document_id: String,
545    /// Document Name
546    #[serde(
547        rename = "documentName",
548        default,
549        skip_serializing_if = "Option::is_none"
550    )]
551    pub document_name: Option<String>,
552    /// Medium to be used for sending the document
553    /// Allowed values: `link`, `email`.
554    #[serde(default, skip_serializing_if = "Option::is_none")]
555    pub medium: Option<String>,
556    /// CC Recipient
557    #[serde(
558        rename = "ccRecipients",
559        default,
560        skip_serializing_if = "Vec::is_empty"
561    )]
562    pub cc_recipients: Vec<CCRecipientItem>,
563    #[serde(
564        rename = "notificationSettings",
565        default,
566        skip_serializing_if = "Option::is_none"
567    )]
568    pub notification_settings: Option<NotificationSettingsDto>,
569    /// Sent ByUser Id
570    /// Required by the API.
571    #[serde(rename = "sentBy")]
572    pub sent_by: String,
573}
574
575/// `SendDocumentFromPublicApiBodyDto` from the GoHighLevel OpenAPI spec.
576#[derive(Debug, Clone, Default, Serialize, Deserialize)]
577pub struct SendDocumentFromPublicApiBodyDto {
578    /// Template Id
579    /// Required by the API.
580    #[serde(rename = "templateId")]
581    pub template_id: String,
582    /// User Id
583    /// Required by the API.
584    #[serde(rename = "userId")]
585    pub user_id: String,
586    /// Send Document
587    #[serde(
588        rename = "sendDocument",
589        default,
590        skip_serializing_if = "Option::is_none"
591    )]
592    pub send_document: Option<bool>,
593    /// Location Id
594    /// Required by the API.
595    #[serde(rename = "locationId")]
596    pub location_id: String,
597    /// Contact Id
598    /// Required by the API.
599    #[serde(rename = "contactId")]
600    pub contact_id: String,
601    /// Opportunity Id
602    #[serde(
603        rename = "opportunityId",
604        default,
605        skip_serializing_if = "Option::is_none"
606    )]
607    pub opportunity_id: Option<String>,
608}
609
610/// `SendDocumentResponseDto` from the GoHighLevel OpenAPI spec.
611#[derive(Debug, Clone, Default, Serialize, Deserialize)]
612pub struct SendDocumentResponseDto {
613    /// Success status
614    /// Required by the API.
615    /// (Optional here so responses that omit it still parse.)
616    #[serde(default, skip_serializing_if = "Option::is_none")]
617    pub success: Option<bool>,
618    /// Links for all recipients
619    /// Required by the API.
620    /// (Optional here so responses that omit it still parse.)
621    #[serde(default, skip_serializing_if = "Vec::is_empty")]
622    pub links: Vec<ProposalEstimateLinksDto>,
623}
624
625/// `SendTemplateResponseDto` from the GoHighLevel OpenAPI spec.
626#[derive(Debug, Clone, Default, Serialize, Deserialize)]
627pub struct SendTemplateResponseDto {
628    /// Success status
629    /// Required by the API.
630    /// (Optional here so responses that omit it still parse.)
631    #[serde(default, skip_serializing_if = "Option::is_none")]
632    pub success: Option<bool>,
633    /// Links for all recipients
634    /// Required by the API.
635    /// (Optional here so responses that omit it still parse.)
636    #[serde(default, skip_serializing_if = "Vec::is_empty")]
637    pub links: Vec<ProposalEstimateLinksDto>,
638}
639
640/// `TemplateListPaginationResponseDTO` from the GoHighLevel OpenAPI spec.
641#[derive(Debug, Clone, Default, Serialize, Deserialize)]
642pub struct TemplateListPaginationResponseDTO {
643    /// Array of templates
644    /// Required by the API.
645    /// (Optional here so responses that omit it still parse.)
646    #[serde(default, skip_serializing_if = "Vec::is_empty")]
647    pub data: Vec<TemplateListResponseDTO>,
648    /// Total number of templates
649    /// Required by the API.
650    /// (Optional here so responses that omit it still parse.)
651    #[serde(default, skip_serializing_if = "Option::is_none")]
652    pub total: Option<f64>,
653    /// Trace ID for request tracking
654    #[serde(rename = "traceId", default, skip_serializing_if = "Option::is_none")]
655    pub trace_id: Option<String>,
656}
657
658/// `TemplateListResponseDTO` from the GoHighLevel OpenAPI spec.
659#[derive(Debug, Clone, Default, Serialize, Deserialize)]
660pub struct TemplateListResponseDTO {
661    /// Template ID
662    /// Required by the API.
663    /// (Optional here so responses that omit it still parse.)
664    #[serde(rename = "_id", default, skip_serializing_if = "Option::is_none")]
665    pub id: Option<String>,
666    /// Whether the template is deleted
667    /// Required by the API.
668    /// (Optional here so responses that omit it still parse.)
669    #[serde(default, skip_serializing_if = "Option::is_none")]
670    pub deleted: Option<bool>,
671    /// Template version
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 version: Option<f64>,
676    /// Template name
677    /// Required by the API.
678    /// (Optional here so responses that omit it still parse.)
679    #[serde(default, skip_serializing_if = "Option::is_none")]
680    pub name: Option<String>,
681    /// Location ID
682    /// Required by the API.
683    /// (Optional here so responses that omit it still parse.)
684    #[serde(
685        rename = "locationId",
686        default,
687        skip_serializing_if = "Option::is_none"
688    )]
689    pub location_id: Option<String>,
690    /// Template type
691    /// Allowed values: `proposal`, `estimate`, `contentLibrary`.
692    /// Required by the API.
693    /// (Optional here so responses that omit it still parse.)
694    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
695    pub type_: Option<String>,
696    /// User ID who last updated the template
697    /// Required by the API.
698    /// (Optional here so responses that omit it still parse.)
699    #[serde(rename = "updatedBy", default, skip_serializing_if = "Option::is_none")]
700    pub updated_by: Option<String>,
701    /// Whether the template is a public document
702    /// Required by the API.
703    /// (Optional here so responses that omit it still parse.)
704    #[serde(
705        rename = "isPublicDocument",
706        default,
707        skip_serializing_if = "Option::is_none"
708    )]
709    pub is_public_document: Option<bool>,
710    /// Template creation date
711    /// Required by the API.
712    /// (Optional here so responses that omit it still parse.)
713    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
714    pub created_at: Option<String>,
715    /// Template last update date
716    /// Required by the API.
717    /// (Optional here so responses that omit it still parse.)
718    #[serde(rename = "updatedAt", default, skip_serializing_if = "Option::is_none")]
719    pub updated_at: Option<String>,
720    /// Template ID (alias for _id)
721    /// Required by the API.
722    /// (Optional here so responses that omit it still parse.)
723    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
724    pub id_alt: Option<String>,
725    /// Document count (only present when isPublicDocument is true)
726    #[serde(
727        rename = "documentCount",
728        default,
729        skip_serializing_if = "Option::is_none"
730    )]
731    pub document_count: Option<f64>,
732    /// Document form URL (only present when isPublicDocument is true)
733    #[serde(
734        rename = "docFormUrl",
735        default,
736        skip_serializing_if = "Option::is_none"
737    )]
738    pub doc_form_url: Option<String>,
739}
740
741/// `UnauthorizedDTO` from the GoHighLevel OpenAPI spec.
742#[derive(Debug, Clone, Default, Serialize, Deserialize)]
743pub struct UnauthorizedDTO {
744    #[serde(
745        rename = "statusCode",
746        default,
747        skip_serializing_if = "Option::is_none"
748    )]
749    pub status_code: Option<f64>,
750    #[serde(default, skip_serializing_if = "Option::is_none")]
751    pub message: Option<String>,
752    #[serde(default, skip_serializing_if = "Option::is_none")]
753    pub error: Option<String>,
754}