Skip to main content

ghl_models/v2/
knowledge_base.rs

1//! `knowledge-base` data models for GoHighLevel API V2 (38 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Knowledge Base** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`knowledge-base` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/knowledge-base.md).
7//!
8//! Enable with `features = ["knowledge-base"]`.
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/// `AddFaqDTO` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct AddFaqDTO {
24    /// location ID as string
25    /// Required by the API.
26    #[serde(rename = "locationId")]
27    pub location_id: String,
28    /// faq question as a string
29    /// Required by the API.
30    pub question: String,
31    /// faq answer as a string
32    /// Required by the API.
33    pub answer: String,
34    /// knowledge base ID as string
35    /// Required by the API.
36    #[serde(rename = "knowledgeBaseId")]
37    pub knowledge_base_id: String,
38}
39
40/// `BadRequestDTO` from the GoHighLevel OpenAPI spec.
41#[derive(Debug, Clone, Default, Serialize, Deserialize)]
42pub struct BadRequestDTO {
43    #[serde(
44        rename = "statusCode",
45        default,
46        skip_serializing_if = "Option::is_none"
47    )]
48    pub status_code: Option<f64>,
49    #[serde(default, skip_serializing_if = "Option::is_none")]
50    pub message: Option<String>,
51}
52
53/// `CrawledUrlDTO` from the GoHighLevel OpenAPI spec.
54#[derive(Debug, Clone, Default, Serialize, Deserialize)]
55pub struct CrawledUrlDTO {
56    /// Unique identifier for the URL
57    /// Required by the API.
58    pub id: String,
59    /// The actual URL that was crawled
60    /// Required by the API.
61    pub url: String,
62    /// Title of the webpage
63    /// Required by the API.
64    pub title: String,
65    /// Current processing status of the URL
66    /// Allowed values: `Pending`, `Processing`, `Successful`, `Failed`, `Existing`,
67    /// `Restricted`, `Cancelled`, `Aborted`, `Training`.
68    /// Required by the API.
69    pub status: String,
70    /// Location ID associated with this URL
71    /// Required by the API.
72    #[serde(rename = "locationId")]
73    pub location_id: String,
74    /// Knowledge base ID this URL belongs to
75    /// Required by the API.
76    #[serde(rename = "knowledgeBaseId")]
77    pub knowledge_base_id: String,
78    /// URL to the stored content file
79    /// Required by the API.
80    pub content: String,
81    /// Whether the content was edited by user
82    /// Required by the API.
83    #[serde(rename = "contentEditedByUser")]
84    pub content_edited_by_user: bool,
85    /// Last updated timestamp
86    /// Required by the API.
87    #[serde(rename = "updatedAt")]
88    pub updated_at: String,
89}
90
91/// `CrawlingAggregateDTO` from the GoHighLevel OpenAPI spec.
92#[derive(Debug, Clone, Default, Serialize, Deserialize)]
93pub struct CrawlingAggregateDTO {
94    /// Status grouping identifier
95    /// Allowed values: `Pending`, `Processing`, `Successful`, `Failed`, `Existing`,
96    /// `Restricted`, `Cancelled`, `Aborted`, `Training`.
97    /// Required by the API.
98    #[serde(rename = "_id")]
99    pub id: String,
100    /// Array of records for this status
101    /// Required by the API.
102    #[serde(default, skip_serializing_if = "Vec::is_empty")]
103    pub records: Vec<CrawlingRecordDTO>,
104}
105
106/// `CrawlingRecordDTO` from the GoHighLevel OpenAPI spec.
107#[derive(Debug, Clone, Default, Serialize, Deserialize)]
108pub struct CrawlingRecordDTO {
109    /// URL being crawled
110    /// Required by the API.
111    pub url: String,
112    /// Unique record identifier
113    /// Required by the API.
114    pub id: String,
115    /// Page title (for successful/pending records)
116    #[serde(default, skip_serializing_if = "Option::is_none")]
117    pub title: Option<String>,
118    /// Error details (for failed records)
119    #[serde(default, skip_serializing_if = "Option::is_none")]
120    pub error: Option<ErrorDetailsDTO>,
121}
122
123/// `CrawlingStatusDataDTO` from the GoHighLevel OpenAPI spec.
124#[derive(Debug, Clone, Default, Serialize, Deserialize)]
125pub struct CrawlingStatusDataDTO {
126    /// Aggregated crawling results by status
127    /// Required by the API.
128    #[serde(default, skip_serializing_if = "Vec::is_empty")]
129    pub aggregate: Vec<CrawlingAggregateDTO>,
130    /// Detailed operation information
131    /// Required by the API.
132    #[serde(rename = "operationDetails")]
133    pub operation_details: OperationDetailsDTO,
134}
135
136/// `CrawlingStatusResponseDTO` from the GoHighLevel OpenAPI spec.
137#[derive(Debug, Clone, Default, Serialize, Deserialize)]
138pub struct CrawlingStatusResponseDTO {
139    /// Indicates if the operation was successful
140    /// Required by the API.
141    pub success: bool,
142    /// Detailed crawling status data
143    /// Required by the API.
144    pub data: CrawlingStatusDataDTO,
145}
146
147/// `CreateFaqResponseDTO` from the GoHighLevel OpenAPI spec.
148#[derive(Debug, Clone, Default, Serialize, Deserialize)]
149pub struct CreateFaqResponseDTO {
150    /// Success status of the operation
151    /// Required by the API.
152    pub success: bool,
153    /// Created FAQ details
154    /// Required by the API.
155    pub faq: FaqResponseDTO,
156}
157
158/// `CreateKnowledgeBaseDTO` from the GoHighLevel OpenAPI spec.
159#[derive(Debug, Clone, Default, Serialize, Deserialize)]
160pub struct CreateKnowledgeBaseDTO {
161    /// Required by the API.
162    pub name: String,
163    #[serde(default, skip_serializing_if = "Option::is_none")]
164    pub description: Option<String>,
165    /// Required by the API.
166    #[serde(rename = "locationId")]
167    pub location_id: String,
168}
169
170/// `CreateKnowledgeBaseResponseDTO` from the GoHighLevel OpenAPI spec.
171#[derive(Debug, Clone, Default, Serialize, Deserialize)]
172pub struct CreateKnowledgeBaseResponseDTO {
173    /// Success status of the operation
174    /// Required by the API.
175    pub success: bool,
176    /// Created knowledge base details
177    /// Required by the API.
178    pub data: KnowledgeBaseDataDTO,
179}
180
181/// `DeleteFaqResponseDTO` from the GoHighLevel OpenAPI spec.
182#[derive(Debug, Clone, Default, Serialize, Deserialize)]
183pub struct DeleteFaqResponseDTO {
184    /// Success status of the delete operation
185    /// Required by the API.
186    pub success: bool,
187}
188
189/// `DeleteKnowledgeBaseResponseDTO` from the GoHighLevel OpenAPI spec.
190#[derive(Debug, Clone, Default, Serialize, Deserialize)]
191pub struct DeleteKnowledgeBaseResponseDTO {
192    /// Required by the API.
193    pub success: bool,
194}
195
196/// `DeleteWebsiteUrlRequestDTO` from the GoHighLevel OpenAPI spec.
197#[derive(Debug, Clone, Default, Serialize, Deserialize)]
198pub struct DeleteWebsiteUrlRequestDTO {
199    /// knowledge base ID as string
200    /// Required by the API.
201    #[serde(rename = "knowledgeBaseId")]
202    pub knowledge_base_id: String,
203    /// location ID as string
204    /// Required by the API.
205    #[serde(rename = "locationId")]
206    pub location_id: String,
207    /// List of trained urls ids ( fetched from the Get all trained page links by knowledge base
208    /// endpoint)
209    /// Required by the API.
210    #[serde(rename = "urlIds", default, skip_serializing_if = "Vec::is_empty")]
211    pub url_ids: Vec<String>,
212}
213
214/// `DeleteWebsiteUrlResponseDTO` from the GoHighLevel OpenAPI spec.
215#[derive(Debug, Clone, Default, Serialize, Deserialize)]
216pub struct DeleteWebsiteUrlResponseDTO {
217    /// Indicates if the operation was successful
218    /// Required by the API.
219    pub success: bool,
220}
221
222/// `DiscoverWebsiteDataDTO` from the GoHighLevel OpenAPI spec.
223#[derive(Debug, Clone, Default, Serialize, Deserialize)]
224pub struct DiscoverWebsiteDataDTO {
225    /// Operation ID for tracking the discovery process
226    /// Required by the API.
227    #[serde(rename = "operationId")]
228    pub operation_id: String,
229    /// Current status of the website discovery operation
230    /// Allowed values: `Pending`, `Processing`, `Successful`, `Failed`, `Existing`,
231    /// `Restricted`, `Cancelled`, `Aborted`, `Training`.
232    /// Required by the API.
233    pub status: String,
234    /// The URL being discovered/crawled
235    /// Required by the API.
236    pub url: String,
237}
238
239/// `DiscoverWebsiteRequestDTO` from the GoHighLevel OpenAPI spec.
240#[derive(Debug, Clone, Default, Serialize, Deserialize)]
241pub struct DiscoverWebsiteRequestDTO {
242    /// Location ID as string
243    /// Required by the API.
244    #[serde(rename = "locationId")]
245    pub location_id: String,
246    /// Website URL as string
247    /// Required by the API.
248    pub url: String,
249    /// Mode as string
250    /// Allowed values: `Exact`, `Path`, `Domain`.
251    /// Required by the API.
252    pub option: String,
253    /// knowledge base ID as string
254    /// Required by the API.
255    #[serde(rename = "knowledgeBaseId")]
256    pub knowledge_base_id: String,
257}
258
259/// `DiscoverWebsiteResponseDTO` from the GoHighLevel OpenAPI spec.
260#[derive(Debug, Clone, Default, Serialize, Deserialize)]
261pub struct DiscoverWebsiteResponseDTO {
262    /// Indicates if the operation was successful
263    /// Required by the API.
264    pub success: bool,
265    /// Data containing operation details
266    /// Required by the API.
267    pub data: DiscoverWebsiteDataDTO,
268}
269
270/// `ErrorDetailsDTO` from the GoHighLevel OpenAPI spec.
271#[derive(Debug, Clone, Default, Serialize, Deserialize)]
272pub struct ErrorDetailsDTO {
273    /// Error stack trace
274    /// Required by the API.
275    pub stack: String,
276    /// Error response message
277    /// Required by the API.
278    pub response: String,
279    /// HTTP status code
280    /// Required by the API.
281    pub status: f64,
282    /// Additional options (nullable)
283    #[serde(default, skip_serializing_if = "Option::is_none")]
284    pub options: Option<serde_json::Value>,
285    /// Error message
286    /// Required by the API.
287    pub message: String,
288    /// Error name/type
289    /// Required by the API.
290    pub name: String,
291}
292
293/// `FaqResponseDTO` from the GoHighLevel OpenAPI spec.
294#[derive(Debug, Clone, Default, Serialize, Deserialize)]
295pub struct FaqResponseDTO {
296    /// FAQ ID as string
297    /// Required by the API.
298    pub id: String,
299    /// FAQ question
300    /// Required by the API.
301    pub question: String,
302    /// FAQ question in lowercase
303    /// Required by the API.
304    #[serde(rename = "questionLowerCase")]
305    pub question_lower_case: String,
306    /// FAQ answer
307    /// Required by the API.
308    pub answer: String,
309    /// Knowledge base ID
310    /// Required by the API.
311    #[serde(rename = "knowledgeBaseId")]
312    pub knowledge_base_id: String,
313    /// Location ID
314    /// Required by the API.
315    #[serde(rename = "locationId")]
316    pub location_id: String,
317    /// Trained URL ID
318    /// Required by the API.
319    #[serde(rename = "trainedUrlId")]
320    pub trained_url_id: String,
321    /// Whether the FAQ is deleted
322    /// Required by the API.
323    pub deleted: bool,
324    /// Date when FAQ was created
325    /// Required by the API.
326    #[serde(rename = "createdAt")]
327    pub created_at: String,
328    /// Date when FAQ was last updated
329    /// Required by the API.
330    #[serde(rename = "updatedAt")]
331    pub updated_at: String,
332}
333
334/// `GetAllKnowledgeBasesPaginatedDataDTO` from the GoHighLevel OpenAPI spec.
335#[derive(Debug, Clone, Default, Serialize, Deserialize)]
336pub struct GetAllKnowledgeBasesPaginatedDataDTO {
337    /// Array of knowledge bases
338    /// Required by the API.
339    #[serde(
340        rename = "knowledgeBases",
341        default,
342        skip_serializing_if = "Vec::is_empty"
343    )]
344    pub knowledge_bases: Vec<KnowledgeBaseListItemDTO>,
345    /// Total count of all active knowledge bases
346    /// Required by the API.
347    #[serde(rename = "activeCount")]
348    pub active_count: f64,
349    /// Whether there are more knowledge bases available
350    /// Required by the API.
351    #[serde(rename = "hasMore")]
352    pub has_more: bool,
353    /// ID of the last knowledge base in this page (use for next page request)
354    #[serde(
355        rename = "lastKnowledgeBaseId",
356        default,
357        skip_serializing_if = "Option::is_none"
358    )]
359    pub last_knowledge_base_id: Option<String>,
360}
361
362/// `GetAllKnowledgeBasesPaginatedResponseDTO` from the GoHighLevel OpenAPI spec.
363#[derive(Debug, Clone, Default, Serialize, Deserialize)]
364pub struct GetAllKnowledgeBasesPaginatedResponseDTO {
365    /// Success status of the operation
366    /// Required by the API.
367    pub success: bool,
368    /// Paginated knowledge bases data
369    /// Required by the API.
370    pub data: GetAllKnowledgeBasesPaginatedDataDTO,
371}
372
373/// `GetAllUrlsByKnowledgeBaseResponseDTO` from the GoHighLevel OpenAPI spec.
374#[derive(Debug, Clone, Default, Serialize, Deserialize)]
375pub struct GetAllUrlsByKnowledgeBaseResponseDTO {
376    /// Total count of URLs in the knowledge base
377    /// Required by the API.
378    pub count: f64,
379    /// Array of crawled URLs with their details
380    /// Required by the API.
381    #[serde(default, skip_serializing_if = "Vec::is_empty")]
382    pub urls: Vec<CrawledUrlDTO>,
383}
384
385/// `GetKnowledgeBaseByIdDataDTO` from the GoHighLevel OpenAPI spec.
386#[derive(Debug, Clone, Default, Serialize, Deserialize)]
387pub struct GetKnowledgeBaseByIdDataDTO {
388    /// Knowledge base ID
389    /// Required by the API.
390    pub id: String,
391    /// Knowledge base name
392    /// Required by the API.
393    pub name: String,
394    /// Knowledge base name in lowercase
395    /// Required by the API.
396    #[serde(rename = "nameLowerCase")]
397    pub name_lower_case: String,
398    /// Location ID
399    /// Required by the API.
400    #[serde(rename = "locationId")]
401    pub location_id: String,
402    /// Whether the knowledge base is deleted
403    /// Required by the API.
404    pub deleted: bool,
405    /// Date when knowledge base was created
406    /// Required by the API.
407    #[serde(rename = "createdAt")]
408    pub created_at: String,
409    /// Date when knowledge base was last updated
410    /// Required by the API.
411    #[serde(rename = "updatedAt")]
412    pub updated_at: String,
413    /// Knowledge base metadata with content counts
414    /// Required by the API.
415    #[serde(rename = "kbMetadata")]
416    pub kb_metadata: KnowledgeBaseMetadataDTO,
417    /// Whether the knowledge base is default or not
418    #[serde(rename = "isDefault", default, skip_serializing_if = "Option::is_none")]
419    pub is_default: Option<bool>,
420}
421
422/// `GetKnowledgeBaseByIdResponseDTO` from the GoHighLevel OpenAPI spec.
423#[derive(Debug, Clone, Default, Serialize, Deserialize)]
424pub struct GetKnowledgeBaseByIdResponseDTO {
425    /// Success status of the operation
426    /// Required by the API.
427    pub success: bool,
428    /// Knowledge base details
429    /// Required by the API.
430    pub data: GetKnowledgeBaseByIdDataDTO,
431}
432
433/// `InternalServerErrorDTO` from the GoHighLevel OpenAPI spec.
434#[derive(Debug, Clone, Default, Serialize, Deserialize)]
435pub struct InternalServerErrorDTO {
436    #[serde(
437        rename = "statusCode",
438        default,
439        skip_serializing_if = "Option::is_none"
440    )]
441    pub status_code: Option<f64>,
442    #[serde(default, skip_serializing_if = "Option::is_none")]
443    pub message: Option<String>,
444}
445
446/// `KnowledgeBaseDataDTO` from the GoHighLevel OpenAPI spec.
447#[derive(Debug, Clone, Default, Serialize, Deserialize)]
448pub struct KnowledgeBaseDataDTO {
449    /// Knowledge base ID
450    /// Required by the API.
451    pub id: String,
452    /// Knowledge base name
453    /// Required by the API.
454    pub name: String,
455    /// Knowledge base name in lowercase
456    /// Required by the API.
457    #[serde(rename = "nameLowerCase")]
458    pub name_lower_case: String,
459    /// Location ID
460    /// Required by the API.
461    #[serde(rename = "locationId")]
462    pub location_id: String,
463    /// Knowledge base metadata
464    /// Required by the API.
465    #[serde(rename = "kbMetadata")]
466    pub kb_metadata: serde_json::Value,
467    /// Whether the knowledge base is deleted
468    /// Required by the API.
469    pub deleted: bool,
470    /// Date when knowledge base was created
471    /// Required by the API.
472    #[serde(rename = "createdAt")]
473    pub created_at: String,
474    /// Date when knowledge base was last updated
475    /// Required by the API.
476    #[serde(rename = "updatedAt")]
477    pub updated_at: String,
478}
479
480/// `KnowledgeBaseListItemDTO` from the GoHighLevel OpenAPI spec.
481#[derive(Debug, Clone, Default, Serialize, Deserialize)]
482pub struct KnowledgeBaseListItemDTO {
483    /// Knowledge base ID
484    /// Required by the API.
485    pub id: String,
486    /// Knowledge base name
487    /// Required by the API.
488    pub name: String,
489    /// Date when knowledge base was created
490    /// Required by the API.
491    #[serde(rename = "createdAt")]
492    pub created_at: String,
493}
494
495/// `KnowledgeBaseMetadataDTO` from the GoHighLevel OpenAPI spec.
496#[derive(Debug, Clone, Default, Serialize, Deserialize)]
497pub struct KnowledgeBaseMetadataDTO {
498    /// Number of FAQs in the knowledge base
499    /// Required by the API.
500    pub faqs: f64,
501    /// Number of URLs in the knowledge base
502    /// Required by the API.
503    pub urls: f64,
504    /// Number of rich text documents in the knowledge base
505    /// Required by the API.
506    #[serde(rename = "richText")]
507    pub rich_text: f64,
508    /// Number of files in the knowledge base
509    /// Required by the API.
510    pub files: f64,
511    /// Number of web searche configs in the knowledge base
512    /// Required by the API.
513    #[serde(rename = "webSearches")]
514    pub web_searches: f64,
515    /// Number of tables in the knowledge base
516    /// Required by the API.
517    pub tables: f64,
518}
519
520/// `ListFaqsResponseDTO` from the GoHighLevel OpenAPI spec.
521#[derive(Debug, Clone, Default, Serialize, Deserialize)]
522pub struct ListFaqsResponseDTO {
523    /// Total count of all FAQs in the knowledge base
524    /// Required by the API.
525    pub count: f64,
526    /// Array of FAQ objects
527    /// Required by the API.
528    #[serde(default, skip_serializing_if = "Vec::is_empty")]
529    pub faqs: Vec<FaqResponseDTO>,
530    /// Last FAQ ID for pagination (use as lastFaqId in next request)
531    #[serde(rename = "lastFaqId", default, skip_serializing_if = "Option::is_none")]
532    pub last_faq_id: Option<String>,
533    /// Whether there are more FAQs available
534    #[serde(rename = "hasMore", default, skip_serializing_if = "Option::is_none")]
535    pub has_more: Option<bool>,
536}
537
538/// `OperationDetailsDTO` from the GoHighLevel OpenAPI spec.
539#[derive(Debug, Clone, Default, Serialize, Deserialize)]
540pub struct OperationDetailsDTO {
541    /// Number of URLs discovered
542    /// Required by the API.
543    #[serde(rename = "discoveredUrlsCount")]
544    pub discovered_urls_count: f64,
545    /// Number of URLs successfully trained
546    /// Required by the API.
547    #[serde(rename = "trainedUrlsCount")]
548    pub trained_urls_count: f64,
549    /// Operation unique identifier
550    /// Required by the API.
551    #[serde(rename = "_id")]
552    pub id: String,
553    /// Associated location ID
554    /// Required by the API.
555    #[serde(rename = "locationId")]
556    pub location_id: String,
557    /// Current operation status
558    /// Allowed values: `Pending`, `Processing`, `Successful`, `Failed`, `Existing`,
559    /// `Restricted`, `Cancelled`, `Aborted`, `Training`.
560    /// Required by the API.
561    pub status: String,
562    /// Base URL being crawled
563    /// Required by the API.
564    pub url: String,
565    /// Crawling mode used
566    /// Allowed values: `Exact`, `Path`, `Domain`.
567    /// Required by the API.
568    pub mode: String,
569    /// Knowledge base ID
570    /// Required by the API.
571    #[serde(rename = "knowledgeBaseId")]
572    pub knowledge_base_id: String,
573    /// Operation creation timestamp
574    /// Required by the API.
575    #[serde(rename = "createdAt")]
576    pub created_at: String,
577    /// Last update timestamp
578    /// Required by the API.
579    #[serde(rename = "updatedAt")]
580    pub updated_at: String,
581    /// Version field
582    /// Required by the API.
583    #[serde(rename = "__v")]
584    pub v: f64,
585    /// Robots.txt file content
586    #[serde(
587        rename = "robotsFileData",
588        default,
589        skip_serializing_if = "Option::is_none"
590    )]
591    pub robots_file_data: Option<String>,
592}
593
594/// `TrainDiscoveredUrlsDTO` from the GoHighLevel OpenAPI spec.
595#[derive(Debug, Clone, Default, Serialize, Deserialize)]
596pub struct TrainDiscoveredUrlsDTO {
597    /// Location ID as string
598    /// Required by the API.
599    #[serde(rename = "locationId")]
600    pub location_id: String,
601    /// List of Object ids of the discovered urls
602    /// Required by the API.
603    #[serde(rename = "urlIds", default, skip_serializing_if = "Vec::is_empty")]
604    pub url_ids: Vec<String>,
605    /// knowledge base id
606    /// Required by the API.
607    #[serde(rename = "knowledgeBaseId")]
608    pub knowledge_base_id: String,
609    /// operation id as string
610    /// Required by the API.
611    #[serde(rename = "operationId")]
612    pub operation_id: String,
613}
614
615/// `TrainDiscoveredUrlsResponseDTO` from the GoHighLevel OpenAPI spec.
616#[derive(Debug, Clone, Default, Serialize, Deserialize)]
617pub struct TrainDiscoveredUrlsResponseDTO {
618    /// Indicates if the operation was successful
619    /// Required by the API.
620    pub success: bool,
621}
622
623/// `UnauthorizedDTO` from the GoHighLevel OpenAPI spec.
624#[derive(Debug, Clone, Default, Serialize, Deserialize)]
625pub struct UnauthorizedDTO {
626    #[serde(
627        rename = "statusCode",
628        default,
629        skip_serializing_if = "Option::is_none"
630    )]
631    pub status_code: Option<f64>,
632    #[serde(default, skip_serializing_if = "Option::is_none")]
633    pub message: Option<String>,
634    #[serde(default, skip_serializing_if = "Option::is_none")]
635    pub error: Option<String>,
636}
637
638/// `UnprocessableDTO` from the GoHighLevel OpenAPI spec.
639#[derive(Debug, Clone, Default, Serialize, Deserialize)]
640pub struct UnprocessableDTO {
641    #[serde(
642        rename = "statusCode",
643        default,
644        skip_serializing_if = "Option::is_none"
645    )]
646    pub status_code: Option<f64>,
647    #[serde(default, skip_serializing_if = "Vec::is_empty")]
648    pub message: Vec<String>,
649    #[serde(default, skip_serializing_if = "Option::is_none")]
650    pub error: Option<String>,
651}
652
653/// `UpdateFaqBodyDTO` from the GoHighLevel OpenAPI spec.
654#[derive(Debug, Clone, Default, Serialize, Deserialize)]
655pub struct UpdateFaqBodyDTO {
656    /// faq question as a string
657    /// Required by the API.
658    pub question: String,
659    /// faq answer as a string
660    /// Required by the API.
661    pub answer: String,
662}
663
664/// `UpdateFaqResponseDTO` from the GoHighLevel OpenAPI spec.
665#[derive(Debug, Clone, Default, Serialize, Deserialize)]
666pub struct UpdateFaqResponseDTO {
667    /// Success status of the update operation
668    /// Required by the API.
669    pub success: bool,
670}
671
672/// `UpdateKnowledgeBaseDTO` from the GoHighLevel OpenAPI spec.
673#[derive(Debug, Clone, Default, Serialize, Deserialize)]
674pub struct UpdateKnowledgeBaseDTO {
675    /// field to update the name of the knowledge base
676    #[serde(default, skip_serializing_if = "Option::is_none")]
677    pub name: Option<String>,
678    /// field to update the description of the knowledge base
679    #[serde(default, skip_serializing_if = "Option::is_none")]
680    pub description: Option<String>,
681}
682
683/// `UpdateKnowledgeBaseResponseDTO` from the GoHighLevel OpenAPI spec.
684#[derive(Debug, Clone, Default, Serialize, Deserialize)]
685pub struct UpdateKnowledgeBaseResponseDTO {
686    /// Required by the API.
687    pub success: bool,
688}