ghl_models/v2/funnels.rs
1//! `funnels` data models for GoHighLevel API V2 (10 types).
2//!
3//! Generated from HighLevel's official OpenAPI spec for the
4//! **Funnels** module. Every endpoint that uses these types, with its
5//! parameters, required scopes and enum values, is documented in the
6//! [`funnels` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/funnels.md).
7//!
8//! Enable with `features = ["funnels"]`.
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/// `CreateRedirectParams` from the GoHighLevel OpenAPI spec.
22#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct CreateRedirectParams {
24 /// Required by the API.
25 #[serde(rename = "locationId")]
26 pub location_id: String,
27 /// Required by the API.
28 pub domain: String,
29 /// Required by the API.
30 pub path: String,
31 /// Required by the API.
32 pub target: String,
33 /// Allowed values: `funnel`, `website`, `url`, `all`.
34 /// Required by the API.
35 pub action: String,
36}
37
38/// `CreateRedirectResponseDTO` from the GoHighLevel OpenAPI spec.
39#[derive(Debug, Clone, Default, Serialize, Deserialize)]
40pub struct CreateRedirectResponseDTO {
41 /// Data containing details of the created redirect
42 /// Required by the API.
43 pub data: RedirectResponseDTO,
44}
45
46/// `DeleteRedirectResponseDTO` from the GoHighLevel OpenAPI spec.
47#[derive(Debug, Clone, Default, Serialize, Deserialize)]
48pub struct DeleteRedirectResponseDTO {
49 /// Status of the delete operation
50 /// Required by the API.
51 pub data: serde_json::Value,
52}
53
54/// `FunnelListResponseDTO` from the GoHighLevel OpenAPI spec.
55#[derive(Debug, Clone, Default, Serialize, Deserialize)]
56pub struct FunnelListResponseDTO {
57 /// Required by the API.
58 pub funnels: serde_json::Value,
59 /// Required by the API.
60 pub count: f64,
61 /// Required by the API.
62 #[serde(rename = "traceId")]
63 pub trace_id: String,
64}
65
66/// `FunnelPageCountResponseDTO` from the GoHighLevel OpenAPI spec.
67#[derive(Debug, Clone, Default, Serialize, Deserialize)]
68pub struct FunnelPageCountResponseDTO {
69 /// Required by the API.
70 pub count: f64,
71}
72
73/// `FunnelPageResponseDTO` from the GoHighLevel OpenAPI spec.
74#[derive(Debug, Clone, Default, Serialize, Deserialize)]
75pub struct FunnelPageResponseDTO {
76 /// Required by the API.
77 #[serde(rename = "_id")]
78 pub id: String,
79 /// Required by the API.
80 #[serde(rename = "locationId")]
81 pub location_id: String,
82 /// Required by the API.
83 #[serde(rename = "funnelId")]
84 pub funnel_id: String,
85 /// Required by the API.
86 pub name: String,
87 /// Required by the API.
88 #[serde(rename = "stepId")]
89 pub step_id: String,
90 /// Required by the API.
91 pub deleted: String,
92 /// Required by the API.
93 #[serde(rename = "updatedAt")]
94 pub updated_at: String,
95}
96
97/// `RedirectListResponseDTO` from the GoHighLevel OpenAPI spec.
98#[derive(Debug, Clone, Default, Serialize, Deserialize)]
99pub struct RedirectListResponseDTO {
100 /// Object containing the count of redirects and an array of redirect data
101 /// Required by the API.
102 pub data: serde_json::Value,
103}
104
105/// `RedirectResponseDTO` from the GoHighLevel OpenAPI spec.
106#[derive(Debug, Clone, Default, Serialize, Deserialize)]
107pub struct RedirectResponseDTO {
108 /// Unique identifier of the redirect
109 /// Required by the API.
110 pub id: String,
111 /// Identifier of the location associated with the redirect
112 /// Required by the API.
113 #[serde(rename = "locationId")]
114 pub location_id: String,
115 /// Domain where the redirect occurs
116 /// Required by the API.
117 pub domain: String,
118 /// Original path that will be redirected
119 /// Required by the API.
120 pub path: String,
121 /// Lowercase version of the original path
122 /// Required by the API.
123 #[serde(rename = "pathLowercase")]
124 pub path_lowercase: String,
125 /// Type of redirect (e.g., Permanent, Temporary)
126 /// Required by the API.
127 #[serde(rename = "type")]
128 pub type_: String,
129 /// Target URL to which the original path will be redirected
130 /// Required by the API.
131 pub target: String,
132 /// Action performed by the redirect
133 /// Required by the API.
134 pub action: String,
135}
136
137/// `UpdateRedirectParams` from the GoHighLevel OpenAPI spec.
138#[derive(Debug, Clone, Default, Serialize, Deserialize)]
139pub struct UpdateRedirectParams {
140 /// Required by the API.
141 pub target: String,
142 /// Allowed values: `funnel`, `website`, `url`, `all`.
143 /// Required by the API.
144 pub action: String,
145 /// Required by the API.
146 #[serde(rename = "locationId")]
147 pub location_id: String,
148}
149
150/// `UpdateRedirectResponseDTO` from the GoHighLevel OpenAPI spec.
151#[derive(Debug, Clone, Default, Serialize, Deserialize)]
152pub struct UpdateRedirectResponseDTO {
153 /// Data containing details of the updated redirect
154 /// Required by the API.
155 pub data: RedirectResponseDTO,
156}