Skip to main content

ghl_models/v2/
funnels.rs

1// @generated by xtask/generate_models.py — do not edit by hand.
2// Source: https://github.com/GoHighLevel/highlevel-api-docs
3// Doc comments are HighLevel's own field descriptions, reflowed verbatim, so
4// they aren't held to rustdoc's markdown conventions.
5#![allow(
6    missing_docs,
7    clippy::doc_lazy_continuation,
8    clippy::doc_overindented_list_items
9)]
10
11use serde::{Deserialize, Serialize};
12
13/// `CreateRedirectParams` from the GoHighLevel OpenAPI spec.
14#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15pub struct CreateRedirectParams {
16    /// Required by the API.
17    #[serde(rename = "locationId")]
18    pub location_id: String,
19    /// Required by the API.
20    pub domain: String,
21    /// Required by the API.
22    pub path: String,
23    /// Required by the API.
24    pub target: String,
25    /// Allowed values: `funnel`, `website`, `url`, `all`.
26    /// Required by the API.
27    pub action: String,
28}
29
30/// `CreateRedirectResponseDTO` from the GoHighLevel OpenAPI spec.
31#[derive(Debug, Clone, Default, Serialize, Deserialize)]
32pub struct CreateRedirectResponseDTO {
33    /// Data containing details of the created redirect
34    /// Required by the API.
35    pub data: RedirectResponseDTO,
36}
37
38/// `DeleteRedirectResponseDTO` from the GoHighLevel OpenAPI spec.
39#[derive(Debug, Clone, Default, Serialize, Deserialize)]
40pub struct DeleteRedirectResponseDTO {
41    /// Status of the delete operation
42    /// Required by the API.
43    pub data: serde_json::Value,
44}
45
46/// `FunnelListResponseDTO` from the GoHighLevel OpenAPI spec.
47#[derive(Debug, Clone, Default, Serialize, Deserialize)]
48pub struct FunnelListResponseDTO {
49    /// Required by the API.
50    pub funnels: serde_json::Value,
51    /// Required by the API.
52    pub count: f64,
53    /// Required by the API.
54    #[serde(rename = "traceId")]
55    pub trace_id: String,
56}
57
58/// `FunnelPageCountResponseDTO` from the GoHighLevel OpenAPI spec.
59#[derive(Debug, Clone, Default, Serialize, Deserialize)]
60pub struct FunnelPageCountResponseDTO {
61    /// Required by the API.
62    pub count: f64,
63}
64
65/// `FunnelPageResponseDTO` from the GoHighLevel OpenAPI spec.
66#[derive(Debug, Clone, Default, Serialize, Deserialize)]
67pub struct FunnelPageResponseDTO {
68    /// Required by the API.
69    #[serde(rename = "_id")]
70    pub id: String,
71    /// Required by the API.
72    #[serde(rename = "locationId")]
73    pub location_id: String,
74    /// Required by the API.
75    #[serde(rename = "funnelId")]
76    pub funnel_id: String,
77    /// Required by the API.
78    pub name: String,
79    /// Required by the API.
80    #[serde(rename = "stepId")]
81    pub step_id: String,
82    /// Required by the API.
83    pub deleted: String,
84    /// Required by the API.
85    #[serde(rename = "updatedAt")]
86    pub updated_at: String,
87}
88
89/// `RedirectListResponseDTO` from the GoHighLevel OpenAPI spec.
90#[derive(Debug, Clone, Default, Serialize, Deserialize)]
91pub struct RedirectListResponseDTO {
92    /// Object containing the count of redirects and an array of redirect data
93    /// Required by the API.
94    pub data: serde_json::Value,
95}
96
97/// `RedirectResponseDTO` from the GoHighLevel OpenAPI spec.
98#[derive(Debug, Clone, Default, Serialize, Deserialize)]
99pub struct RedirectResponseDTO {
100    /// Unique identifier of the redirect
101    /// Required by the API.
102    pub id: String,
103    /// Identifier of the location associated with the redirect
104    /// Required by the API.
105    #[serde(rename = "locationId")]
106    pub location_id: String,
107    /// Domain where the redirect occurs
108    /// Required by the API.
109    pub domain: String,
110    /// Original path that will be redirected
111    /// Required by the API.
112    pub path: String,
113    /// Lowercase version of the original path
114    /// Required by the API.
115    #[serde(rename = "pathLowercase")]
116    pub path_lowercase: String,
117    /// Type of redirect (e.g., Permanent, Temporary)
118    /// Required by the API.
119    #[serde(rename = "type")]
120    pub type_: String,
121    /// Target URL to which the original path will be redirected
122    /// Required by the API.
123    pub target: String,
124    /// Action performed by the redirect
125    /// Required by the API.
126    pub action: String,
127}
128
129/// `UpdateRedirectParams` from the GoHighLevel OpenAPI spec.
130#[derive(Debug, Clone, Default, Serialize, Deserialize)]
131pub struct UpdateRedirectParams {
132    /// Required by the API.
133    pub target: String,
134    /// Allowed values: `funnel`, `website`, `url`, `all`.
135    /// Required by the API.
136    pub action: String,
137    /// Required by the API.
138    #[serde(rename = "locationId")]
139    pub location_id: String,
140}
141
142/// `UpdateRedirectResponseDTO` from the GoHighLevel OpenAPI spec.
143#[derive(Debug, Clone, Default, Serialize, Deserialize)]
144pub struct UpdateRedirectResponseDTO {
145    /// Data containing details of the updated redirect
146    /// Required by the API.
147    pub data: RedirectResponseDTO,
148}