ghl-sdk 0.5.2

Unofficial async Rust SDK for the GoHighLevel (HighLevel) API 2.0 — OAuth 2.0, Private Integration Tokens, rate-limit-aware retries, paginated streams
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
// @generated by xtask/generate_services.py — do not edit by hand.
//! Generated typed services for **GoHighLevel API v3**.
//!
//! Reach these through [`Ghl::v3`](crate::Ghl::v3):
//!
//! ```ignore
//! let out = ghl.v3().contacts().get_duplicate_contact(&params).await?;
//! ```
//!
//! Every call sends `Version: v3`. Modules are behind the same cargo
//! features as their v2 counterparts.

use crate::client::Ghl;

/// `ad-publishing` — 95 v3 operations.
#[cfg(feature = "ad-publishing")]
#[cfg_attr(docsrs, doc(cfg(feature = "ad-publishing")))]
pub mod ad_publishing;
/// `affiliate-manager` — 4 v3 operations.
#[cfg(feature = "affiliate-manager")]
#[cfg_attr(docsrs, doc(cfg(feature = "affiliate-manager")))]
pub mod affiliate_manager;
/// `agent-studio` — 11 v3 operations.
#[cfg(feature = "agent-studio")]
#[cfg_attr(docsrs, doc(cfg(feature = "agent-studio")))]
pub mod agent_studio;
/// `associations` — 10 v3 operations.
#[cfg(feature = "associations")]
#[cfg_attr(docsrs, doc(cfg(feature = "associations")))]
pub mod associations;
/// `blogs` — 7 v3 operations.
#[cfg(feature = "blogs")]
#[cfg_attr(docsrs, doc(cfg(feature = "blogs")))]
pub mod blogs;
/// `brand-boards` — 11 v3 operations.
#[cfg(feature = "brand-boards")]
#[cfg_attr(docsrs, doc(cfg(feature = "brand-boards")))]
pub mod brand_boards;
/// `businesses` — 5 v3 operations.
#[cfg(feature = "businesses")]
#[cfg_attr(docsrs, doc(cfg(feature = "businesses")))]
pub mod businesses;
/// `calendars` — 59 v3 operations.
#[cfg(feature = "calendars")]
#[cfg_attr(docsrs, doc(cfg(feature = "calendars")))]
pub mod calendars;
/// `campaigns` — 1 v3 operations.
#[cfg(feature = "campaigns")]
#[cfg_attr(docsrs, doc(cfg(feature = "campaigns")))]
pub mod campaigns;
/// `chat-widget` — 8 v3 operations.
#[cfg(feature = "chat-widget")]
#[cfg_attr(docsrs, doc(cfg(feature = "chat-widget")))]
pub mod chat_widget;
/// `companies` — 1 v3 operations.
#[cfg(feature = "companies")]
#[cfg_attr(docsrs, doc(cfg(feature = "companies")))]
pub mod companies;
/// `contacts` — 31 v3 operations.
#[cfg(feature = "contacts")]
#[cfg_attr(docsrs, doc(cfg(feature = "contacts")))]
pub mod contacts;
/// `conversation-ai` — 12 v3 operations.
#[cfg(feature = "conversation-ai")]
#[cfg_attr(docsrs, doc(cfg(feature = "conversation-ai")))]
pub mod conversation_ai;
/// `conversations` — 25 v3 operations.
#[cfg(feature = "conversations")]
#[cfg_attr(docsrs, doc(cfg(feature = "conversations")))]
pub mod conversations;
/// `courses` — 1 v3 operations.
#[cfg(feature = "courses")]
#[cfg_attr(docsrs, doc(cfg(feature = "courses")))]
pub mod courses;
/// `custom-fields` — 8 v3 operations.
#[cfg(feature = "custom-fields")]
#[cfg_attr(docsrs, doc(cfg(feature = "custom-fields")))]
pub mod custom_fields;
/// `custom-menus` — 5 v3 operations.
#[cfg(feature = "custom-menus")]
#[cfg_attr(docsrs, doc(cfg(feature = "custom-menus")))]
pub mod custom_menus;
/// `email-isv` — 1 v3 operations.
#[cfg(feature = "email-isv")]
#[cfg_attr(docsrs, doc(cfg(feature = "email-isv")))]
pub mod email_isv;
/// `emails` — 18 v3 operations.
#[cfg(feature = "emails")]
#[cfg_attr(docsrs, doc(cfg(feature = "emails")))]
pub mod emails;
/// `forms` — 3 v3 operations.
#[cfg(feature = "forms")]
#[cfg_attr(docsrs, doc(cfg(feature = "forms")))]
pub mod forms;
/// `funnels` — 7 v3 operations.
#[cfg(feature = "funnels")]
#[cfg_attr(docsrs, doc(cfg(feature = "funnels")))]
pub mod funnels;
/// `invoices` — 42 v3 operations.
#[cfg(feature = "invoices")]
#[cfg_attr(docsrs, doc(cfg(feature = "invoices")))]
pub mod invoices;
/// `knowledge-base` — 14 v3 operations.
#[cfg(feature = "knowledge-base")]
#[cfg_attr(docsrs, doc(cfg(feature = "knowledge-base")))]
pub mod knowledge_base;
/// `links` — 6 v3 operations.
#[cfg(feature = "links")]
#[cfg_attr(docsrs, doc(cfg(feature = "links")))]
pub mod links;
/// `locations` — 32 v3 operations.
#[cfg(feature = "locations")]
#[cfg_attr(docsrs, doc(cfg(feature = "locations")))]
pub mod locations;
/// `marketplace` — 9 v3 operations.
#[cfg(feature = "marketplace")]
#[cfg_attr(docsrs, doc(cfg(feature = "marketplace")))]
pub mod marketplace;
/// `medias` — 7 v3 operations.
#[cfg(feature = "medias")]
#[cfg_attr(docsrs, doc(cfg(feature = "medias")))]
pub mod medias;
/// `oauth` — 3 v3 operations.
#[cfg(feature = "oauth")]
#[cfg_attr(docsrs, doc(cfg(feature = "oauth")))]
pub mod oauth;
/// `objects` — 9 v3 operations.
#[cfg(feature = "objects")]
#[cfg_attr(docsrs, doc(cfg(feature = "objects")))]
pub mod objects;
/// `opportunities` — 12 v3 operations.
#[cfg(feature = "opportunities")]
#[cfg_attr(docsrs, doc(cfg(feature = "opportunities")))]
pub mod opportunities;
/// `payments` — 23 v3 operations.
#[cfg(feature = "payments")]
#[cfg_attr(docsrs, doc(cfg(feature = "payments")))]
pub mod payments;
/// `phone-system` — 4 v3 operations.
#[cfg(feature = "phone-system")]
#[cfg_attr(docsrs, doc(cfg(feature = "phone-system")))]
pub mod phone_system;
/// `products` — 27 v3 operations.
#[cfg(feature = "products")]
#[cfg_attr(docsrs, doc(cfg(feature = "products")))]
pub mod products;
/// `proposals` — 4 v3 operations.
#[cfg(feature = "proposals")]
#[cfg_attr(docsrs, doc(cfg(feature = "proposals")))]
pub mod proposals;
/// `saas` — 25 v3 operations.
#[cfg(feature = "saas")]
#[cfg_attr(docsrs, doc(cfg(feature = "saas")))]
pub mod saas;
/// `snapshots` — 4 v3 operations.
#[cfg(feature = "snapshots")]
#[cfg_attr(docsrs, doc(cfg(feature = "snapshots")))]
pub mod snapshots;
/// `social-planner` — 45 v3 operations.
#[cfg(feature = "social-planner")]
#[cfg_attr(docsrs, doc(cfg(feature = "social-planner")))]
pub mod social_planner;
/// `store` — 18 v3 operations.
#[cfg(feature = "store")]
#[cfg_attr(docsrs, doc(cfg(feature = "store")))]
pub mod store;
/// `surveys` — 2 v3 operations.
#[cfg(feature = "surveys")]
#[cfg_attr(docsrs, doc(cfg(feature = "surveys")))]
pub mod surveys;
/// `users` — 6 v3 operations.
#[cfg(feature = "users")]
#[cfg_attr(docsrs, doc(cfg(feature = "users")))]
pub mod users;
/// `voice-ai` — 11 v3 operations.
#[cfg(feature = "voice-ai")]
#[cfg_attr(docsrs, doc(cfg(feature = "voice-ai")))]
pub mod voice_ai;
/// `workflows` — 1 v3 operations.
#[cfg(feature = "workflows")]
#[cfg_attr(docsrs, doc(cfg(feature = "workflows")))]
pub mod workflows;

/// Entry point for the API v3 services. Obtained via [`Ghl::v3`](crate::Ghl::v3).
#[derive(Debug, Clone)]
pub struct V3 {
    /// Only the feature-gated accessors below read this, so with no module
    /// features enabled it is legitimately unused.
    #[allow(dead_code)]
    pub(crate) client: Ghl,
}

impl V3 {
    /// The `ad-publishing` API v3 surface (95 operations).
    #[cfg(feature = "ad-publishing")]
    #[cfg_attr(docsrs, doc(cfg(feature = "ad-publishing")))]
    pub fn ad_publishing(&self) -> ad_publishing::AdPublishingService {
        ad_publishing::AdPublishingService::new(self.client.clone())
    }

    /// The `affiliate-manager` API v3 surface (4 operations).
    #[cfg(feature = "affiliate-manager")]
    #[cfg_attr(docsrs, doc(cfg(feature = "affiliate-manager")))]
    pub fn affiliate_manager(&self) -> affiliate_manager::AffiliateManagerService {
        affiliate_manager::AffiliateManagerService::new(self.client.clone())
    }

    /// The `agent-studio` API v3 surface (11 operations).
    #[cfg(feature = "agent-studio")]
    #[cfg_attr(docsrs, doc(cfg(feature = "agent-studio")))]
    pub fn agent_studio(&self) -> agent_studio::AgentStudioService {
        agent_studio::AgentStudioService::new(self.client.clone())
    }

    /// The `associations` API v3 surface (10 operations).
    #[cfg(feature = "associations")]
    #[cfg_attr(docsrs, doc(cfg(feature = "associations")))]
    pub fn associations(&self) -> associations::AssociationsService {
        associations::AssociationsService::new(self.client.clone())
    }

    /// The `blogs` API v3 surface (7 operations).
    #[cfg(feature = "blogs")]
    #[cfg_attr(docsrs, doc(cfg(feature = "blogs")))]
    pub fn blogs(&self) -> blogs::BlogsService {
        blogs::BlogsService::new(self.client.clone())
    }

    /// The `brand-boards` API v3 surface (11 operations).
    #[cfg(feature = "brand-boards")]
    #[cfg_attr(docsrs, doc(cfg(feature = "brand-boards")))]
    pub fn brand_boards(&self) -> brand_boards::BrandBoardsService {
        brand_boards::BrandBoardsService::new(self.client.clone())
    }

    /// The `businesses` API v3 surface (5 operations).
    #[cfg(feature = "businesses")]
    #[cfg_attr(docsrs, doc(cfg(feature = "businesses")))]
    pub fn businesses(&self) -> businesses::BusinessesService {
        businesses::BusinessesService::new(self.client.clone())
    }

    /// The `calendars` API v3 surface (59 operations).
    #[cfg(feature = "calendars")]
    #[cfg_attr(docsrs, doc(cfg(feature = "calendars")))]
    pub fn calendars(&self) -> calendars::CalendarsService {
        calendars::CalendarsService::new(self.client.clone())
    }

    /// The `campaigns` API v3 surface (1 operations).
    #[cfg(feature = "campaigns")]
    #[cfg_attr(docsrs, doc(cfg(feature = "campaigns")))]
    pub fn campaigns(&self) -> campaigns::CampaignsService {
        campaigns::CampaignsService::new(self.client.clone())
    }

    /// The `chat-widget` API v3 surface (8 operations).
    #[cfg(feature = "chat-widget")]
    #[cfg_attr(docsrs, doc(cfg(feature = "chat-widget")))]
    pub fn chat_widget(&self) -> chat_widget::ChatWidgetService {
        chat_widget::ChatWidgetService::new(self.client.clone())
    }

    /// The `companies` API v3 surface (1 operations).
    #[cfg(feature = "companies")]
    #[cfg_attr(docsrs, doc(cfg(feature = "companies")))]
    pub fn companies(&self) -> companies::CompaniesService {
        companies::CompaniesService::new(self.client.clone())
    }

    /// The `contacts` API v3 surface (31 operations).
    #[cfg(feature = "contacts")]
    #[cfg_attr(docsrs, doc(cfg(feature = "contacts")))]
    pub fn contacts(&self) -> contacts::ContactsService {
        contacts::ContactsService::new(self.client.clone())
    }

    /// The `conversation-ai` API v3 surface (12 operations).
    #[cfg(feature = "conversation-ai")]
    #[cfg_attr(docsrs, doc(cfg(feature = "conversation-ai")))]
    pub fn conversation_ai(&self) -> conversation_ai::ConversationAiService {
        conversation_ai::ConversationAiService::new(self.client.clone())
    }

    /// The `conversations` API v3 surface (25 operations).
    #[cfg(feature = "conversations")]
    #[cfg_attr(docsrs, doc(cfg(feature = "conversations")))]
    pub fn conversations(&self) -> conversations::ConversationsService {
        conversations::ConversationsService::new(self.client.clone())
    }

    /// The `courses` API v3 surface (1 operations).
    #[cfg(feature = "courses")]
    #[cfg_attr(docsrs, doc(cfg(feature = "courses")))]
    pub fn courses(&self) -> courses::CoursesService {
        courses::CoursesService::new(self.client.clone())
    }

    /// The `custom-fields` API v3 surface (8 operations).
    #[cfg(feature = "custom-fields")]
    #[cfg_attr(docsrs, doc(cfg(feature = "custom-fields")))]
    pub fn custom_fields(&self) -> custom_fields::CustomFieldsService {
        custom_fields::CustomFieldsService::new(self.client.clone())
    }

    /// The `custom-menus` API v3 surface (5 operations).
    #[cfg(feature = "custom-menus")]
    #[cfg_attr(docsrs, doc(cfg(feature = "custom-menus")))]
    pub fn custom_menus(&self) -> custom_menus::CustomMenusService {
        custom_menus::CustomMenusService::new(self.client.clone())
    }

    /// The `email-isv` API v3 surface (1 operations).
    #[cfg(feature = "email-isv")]
    #[cfg_attr(docsrs, doc(cfg(feature = "email-isv")))]
    pub fn email_isv(&self) -> email_isv::EmailIsvService {
        email_isv::EmailIsvService::new(self.client.clone())
    }

    /// The `emails` API v3 surface (18 operations).
    #[cfg(feature = "emails")]
    #[cfg_attr(docsrs, doc(cfg(feature = "emails")))]
    pub fn emails(&self) -> emails::EmailsService {
        emails::EmailsService::new(self.client.clone())
    }

    /// The `forms` API v3 surface (3 operations).
    #[cfg(feature = "forms")]
    #[cfg_attr(docsrs, doc(cfg(feature = "forms")))]
    pub fn forms(&self) -> forms::FormsService {
        forms::FormsService::new(self.client.clone())
    }

    /// The `funnels` API v3 surface (7 operations).
    #[cfg(feature = "funnels")]
    #[cfg_attr(docsrs, doc(cfg(feature = "funnels")))]
    pub fn funnels(&self) -> funnels::FunnelsService {
        funnels::FunnelsService::new(self.client.clone())
    }

    /// The `invoices` API v3 surface (42 operations).
    #[cfg(feature = "invoices")]
    #[cfg_attr(docsrs, doc(cfg(feature = "invoices")))]
    pub fn invoices(&self) -> invoices::InvoicesService {
        invoices::InvoicesService::new(self.client.clone())
    }

    /// The `knowledge-base` API v3 surface (14 operations).
    #[cfg(feature = "knowledge-base")]
    #[cfg_attr(docsrs, doc(cfg(feature = "knowledge-base")))]
    pub fn knowledge_base(&self) -> knowledge_base::KnowledgeBaseService {
        knowledge_base::KnowledgeBaseService::new(self.client.clone())
    }

    /// The `links` API v3 surface (6 operations).
    #[cfg(feature = "links")]
    #[cfg_attr(docsrs, doc(cfg(feature = "links")))]
    pub fn links(&self) -> links::LinksService {
        links::LinksService::new(self.client.clone())
    }

    /// The `locations` API v3 surface (32 operations).
    #[cfg(feature = "locations")]
    #[cfg_attr(docsrs, doc(cfg(feature = "locations")))]
    pub fn locations(&self) -> locations::LocationsService {
        locations::LocationsService::new(self.client.clone())
    }

    /// The `marketplace` API v3 surface (9 operations).
    #[cfg(feature = "marketplace")]
    #[cfg_attr(docsrs, doc(cfg(feature = "marketplace")))]
    pub fn marketplace(&self) -> marketplace::MarketplaceService {
        marketplace::MarketplaceService::new(self.client.clone())
    }

    /// The `medias` API v3 surface (7 operations).
    #[cfg(feature = "medias")]
    #[cfg_attr(docsrs, doc(cfg(feature = "medias")))]
    pub fn medias(&self) -> medias::MediasService {
        medias::MediasService::new(self.client.clone())
    }

    /// The `oauth` API v3 surface (3 operations).
    #[cfg(feature = "oauth")]
    #[cfg_attr(docsrs, doc(cfg(feature = "oauth")))]
    pub fn oauth(&self) -> oauth::OauthService {
        oauth::OauthService::new(self.client.clone())
    }

    /// The `objects` API v3 surface (9 operations).
    #[cfg(feature = "objects")]
    #[cfg_attr(docsrs, doc(cfg(feature = "objects")))]
    pub fn objects(&self) -> objects::ObjectsService {
        objects::ObjectsService::new(self.client.clone())
    }

    /// The `opportunities` API v3 surface (12 operations).
    #[cfg(feature = "opportunities")]
    #[cfg_attr(docsrs, doc(cfg(feature = "opportunities")))]
    pub fn opportunities(&self) -> opportunities::OpportunitiesService {
        opportunities::OpportunitiesService::new(self.client.clone())
    }

    /// The `payments` API v3 surface (23 operations).
    #[cfg(feature = "payments")]
    #[cfg_attr(docsrs, doc(cfg(feature = "payments")))]
    pub fn payments(&self) -> payments::PaymentsService {
        payments::PaymentsService::new(self.client.clone())
    }

    /// The `phone-system` API v3 surface (4 operations).
    #[cfg(feature = "phone-system")]
    #[cfg_attr(docsrs, doc(cfg(feature = "phone-system")))]
    pub fn phone_system(&self) -> phone_system::PhoneSystemService {
        phone_system::PhoneSystemService::new(self.client.clone())
    }

    /// The `products` API v3 surface (27 operations).
    #[cfg(feature = "products")]
    #[cfg_attr(docsrs, doc(cfg(feature = "products")))]
    pub fn products(&self) -> products::ProductsService {
        products::ProductsService::new(self.client.clone())
    }

    /// The `proposals` API v3 surface (4 operations).
    #[cfg(feature = "proposals")]
    #[cfg_attr(docsrs, doc(cfg(feature = "proposals")))]
    pub fn proposals(&self) -> proposals::ProposalsService {
        proposals::ProposalsService::new(self.client.clone())
    }

    /// The `saas` API v3 surface (25 operations).
    #[cfg(feature = "saas")]
    #[cfg_attr(docsrs, doc(cfg(feature = "saas")))]
    pub fn saas(&self) -> saas::SaasService {
        saas::SaasService::new(self.client.clone())
    }

    /// The `snapshots` API v3 surface (4 operations).
    #[cfg(feature = "snapshots")]
    #[cfg_attr(docsrs, doc(cfg(feature = "snapshots")))]
    pub fn snapshots(&self) -> snapshots::SnapshotsService {
        snapshots::SnapshotsService::new(self.client.clone())
    }

    /// The `social-planner` API v3 surface (45 operations).
    #[cfg(feature = "social-planner")]
    #[cfg_attr(docsrs, doc(cfg(feature = "social-planner")))]
    pub fn social_planner(&self) -> social_planner::SocialPlannerService {
        social_planner::SocialPlannerService::new(self.client.clone())
    }

    /// The `store` API v3 surface (18 operations).
    #[cfg(feature = "store")]
    #[cfg_attr(docsrs, doc(cfg(feature = "store")))]
    pub fn store(&self) -> store::StoreService {
        store::StoreService::new(self.client.clone())
    }

    /// The `surveys` API v3 surface (2 operations).
    #[cfg(feature = "surveys")]
    #[cfg_attr(docsrs, doc(cfg(feature = "surveys")))]
    pub fn surveys(&self) -> surveys::SurveysService {
        surveys::SurveysService::new(self.client.clone())
    }

    /// The `users` API v3 surface (6 operations).
    #[cfg(feature = "users")]
    #[cfg_attr(docsrs, doc(cfg(feature = "users")))]
    pub fn users(&self) -> users::UsersService {
        users::UsersService::new(self.client.clone())
    }

    /// The `voice-ai` API v3 surface (11 operations).
    #[cfg(feature = "voice-ai")]
    #[cfg_attr(docsrs, doc(cfg(feature = "voice-ai")))]
    pub fn voice_ai(&self) -> voice_ai::VoiceAiService {
        voice_ai::VoiceAiService::new(self.client.clone())
    }

    /// The `workflows` API v3 surface (1 operations).
    #[cfg(feature = "workflows")]
    #[cfg_attr(docsrs, doc(cfg(feature = "workflows")))]
    pub fn workflows(&self) -> workflows::WorkflowsService {
        workflows::WorkflowsService::new(self.client.clone())
    }
}