@journeybee/sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4647 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { client as _heyApiClient } from './client.gen';
3
+ /**
4
+ * Get current account info
5
+ * Returns the authenticated company, API key permissions, and enabled modules. Use this to check what you can access.
6
+ */
7
+ export const getMe = (options) => {
8
+ return (options?.client ?? _heyApiClient).get({
9
+ security: [
10
+ {
11
+ scheme: 'bearer',
12
+ type: 'http'
13
+ }
14
+ ],
15
+ url: '/me',
16
+ ...options
17
+ });
18
+ };
19
+ /**
20
+ * List assets
21
+ */
22
+ export const listAssets = (options) => {
23
+ return (options.client ?? _heyApiClient).get({
24
+ security: [
25
+ {
26
+ scheme: 'bearer',
27
+ type: 'http'
28
+ }
29
+ ],
30
+ url: '/assets/',
31
+ ...options
32
+ });
33
+ };
34
+ /**
35
+ * Upload an asset from URL
36
+ * Fetches a file from the provided public URL and uploads it to Journeybee's CDN. Returns the asset with a UUID that can be used in resource blocks, room blocks, and other content. Maximum file size: 5GB.
37
+ */
38
+ export const uploadAsset = (options) => {
39
+ return (options.client ?? _heyApiClient).post({
40
+ security: [
41
+ {
42
+ scheme: 'bearer',
43
+ type: 'http'
44
+ }
45
+ ],
46
+ url: '/assets/',
47
+ ...options,
48
+ headers: {
49
+ 'Content-Type': 'application/json',
50
+ ...options?.headers
51
+ }
52
+ });
53
+ };
54
+ /**
55
+ * Delete an asset
56
+ */
57
+ export const deleteAsset = (options) => {
58
+ return (options.client ?? _heyApiClient).delete({
59
+ security: [
60
+ {
61
+ scheme: 'bearer',
62
+ type: 'http'
63
+ }
64
+ ],
65
+ url: '/assets/{uuid}',
66
+ ...options
67
+ });
68
+ };
69
+ /**
70
+ * Get an asset
71
+ */
72
+ export const getAsset = (options) => {
73
+ return (options.client ?? _heyApiClient).get({
74
+ security: [
75
+ {
76
+ scheme: 'bearer',
77
+ type: 'http'
78
+ }
79
+ ],
80
+ url: '/assets/{uuid}',
81
+ ...options
82
+ });
83
+ };
84
+ /**
85
+ * Update an asset
86
+ */
87
+ export const updateAsset = (options) => {
88
+ return (options.client ?? _heyApiClient).patch({
89
+ security: [
90
+ {
91
+ scheme: 'bearer',
92
+ type: 'http'
93
+ }
94
+ ],
95
+ url: '/assets/{uuid}',
96
+ ...options,
97
+ headers: {
98
+ 'Content-Type': 'application/json',
99
+ ...options?.headers
100
+ }
101
+ });
102
+ };
103
+ /**
104
+ * List attribution types
105
+ * Returns attribution type definitions. Use the UUID when adding attributions to leads.
106
+ */
107
+ export const listAttributions = (options) => {
108
+ return (options?.client ?? _heyApiClient).get({
109
+ security: [
110
+ {
111
+ scheme: 'bearer',
112
+ type: 'http'
113
+ }
114
+ ],
115
+ url: '/attributions/',
116
+ ...options
117
+ });
118
+ };
119
+ /**
120
+ * Create an attribution type
121
+ */
122
+ export const createAttribution = (options) => {
123
+ return (options.client ?? _heyApiClient).post({
124
+ security: [
125
+ {
126
+ scheme: 'bearer',
127
+ type: 'http'
128
+ }
129
+ ],
130
+ url: '/attributions/',
131
+ ...options,
132
+ headers: {
133
+ 'Content-Type': 'application/json',
134
+ ...options?.headers
135
+ }
136
+ });
137
+ };
138
+ /**
139
+ * Archive an attribution type
140
+ * Archives the attribution type. It will no longer appear in the default list but existing lead attributions referencing it are preserved.
141
+ */
142
+ export const deleteAttribution = (options) => {
143
+ return (options.client ?? _heyApiClient).delete({
144
+ security: [
145
+ {
146
+ scheme: 'bearer',
147
+ type: 'http'
148
+ }
149
+ ],
150
+ url: '/attributions/{uuid}',
151
+ ...options
152
+ });
153
+ };
154
+ /**
155
+ * Get an attribution type
156
+ */
157
+ export const getAttribution = (options) => {
158
+ return (options.client ?? _heyApiClient).get({
159
+ security: [
160
+ {
161
+ scheme: 'bearer',
162
+ type: 'http'
163
+ }
164
+ ],
165
+ url: '/attributions/{uuid}',
166
+ ...options
167
+ });
168
+ };
169
+ /**
170
+ * Update an attribution type
171
+ */
172
+ export const updateAttribution = (options) => {
173
+ return (options.client ?? _heyApiClient).patch({
174
+ security: [
175
+ {
176
+ scheme: 'bearer',
177
+ type: 'http'
178
+ }
179
+ ],
180
+ url: '/attributions/{uuid}',
181
+ ...options,
182
+ headers: {
183
+ 'Content-Type': 'application/json',
184
+ ...options?.headers
185
+ }
186
+ });
187
+ };
188
+ /**
189
+ * Partner revenue leaderboard
190
+ * Partners ranked by revenue for a period, each deal converted to the company base currency. Use this to answer 'best/top partner by revenue/leads/deals' — do NOT list deals and sum them by hand (that mis-handles currencies). Defaults to the current year; pass a `period` or `start_date`+`end_date`. Money is in whole currency units of `currency_code`.
191
+ */
192
+ export const getPartnerRevenueAnalytics = (options) => {
193
+ return (options?.client ?? _heyApiClient).get({
194
+ security: [
195
+ {
196
+ scheme: 'bearer',
197
+ type: 'http'
198
+ }
199
+ ],
200
+ url: '/analytics/partners',
201
+ ...options
202
+ });
203
+ };
204
+ /**
205
+ * Company revenue summary
206
+ * Company-wide totals for a period — revenue, deals won/total, average deal value, partner + lead counts, conversion and win rates — all in the company base currency. Defaults to the current year; pass a `period` or `start_date`+`end_date`. Money is in whole currency units of `currency_code`.
207
+ */
208
+ export const getRevenueSummary = (options) => {
209
+ return (options?.client ?? _heyApiClient).get({
210
+ security: [
211
+ {
212
+ scheme: 'bearer',
213
+ type: 'http'
214
+ }
215
+ ],
216
+ url: '/analytics/revenue-summary',
217
+ ...options
218
+ });
219
+ };
220
+ /**
221
+ * Revenue & leads over time
222
+ * Revenue (deals WON in the bucket) and lead count per month over the period, in the company base currency. Pass `partner_uuids` for one partner's trend, or category/tier/stage filters. Defaults to the current year.
223
+ */
224
+ export const getPartnerRevenueTimeSeries = (options) => {
225
+ return (options?.client ?? _heyApiClient).get({
226
+ security: [
227
+ {
228
+ scheme: 'bearer',
229
+ type: 'http'
230
+ }
231
+ ],
232
+ url: '/analytics/partners/revenue-time-series',
233
+ ...options
234
+ });
235
+ };
236
+ /**
237
+ * Leads sent vs received over time
238
+ * Monthly lead counts — received, sent, qualified (converted) and unqualified (rejected) — across all partners (or a `partner_uuids` subset). Defaults to the current year.
239
+ */
240
+ export const getLeadsSentReceived = (options) => {
241
+ return (options?.client ?? _heyApiClient).get({
242
+ security: [
243
+ {
244
+ scheme: 'bearer',
245
+ type: 'http'
246
+ }
247
+ ],
248
+ url: '/analytics/leads-sent-received',
249
+ ...options
250
+ });
251
+ };
252
+ /**
253
+ * Deals won vs lost over time
254
+ * Monthly won/lost deal counts and their base-currency value across all partners (or a `partner_uuids` subset). Deals are bucketed by close month; value is in `currency_code`. Defaults to the current year.
255
+ */
256
+ export const getDealsWonLost = (options) => {
257
+ return (options?.client ?? _heyApiClient).get({
258
+ security: [
259
+ {
260
+ scheme: 'bearer',
261
+ type: 'http'
262
+ }
263
+ ],
264
+ url: '/analytics/deals-won-lost',
265
+ ...options
266
+ });
267
+ };
268
+ /**
269
+ * One partner's leads by month
270
+ * A single partner's leads bucketed per month by status and direction (total, received, sent, converted, rejected, pending). Requires `partner_uuid`. Defaults to the last 6 months when no period is given.
271
+ */
272
+ export const getPartnerLeadsTimeline = (options) => {
273
+ return (options.client ?? _heyApiClient).get({
274
+ security: [
275
+ {
276
+ scheme: 'bearer',
277
+ type: 'http'
278
+ }
279
+ ],
280
+ url: '/analytics/partners/leads-timeline',
281
+ ...options
282
+ });
283
+ };
284
+ /**
285
+ * One partner's deals by month
286
+ * A single partner's deals bucketed per month — won/lost/total counts and base-currency value. Requires `partner_uuid`. Value is in `currency_code`. Defaults to the last 6 months when no period is given.
287
+ */
288
+ export const getPartnerDealsTimeline = (options) => {
289
+ return (options.client ?? _heyApiClient).get({
290
+ security: [
291
+ {
292
+ scheme: 'bearer',
293
+ type: 'http'
294
+ }
295
+ ],
296
+ url: '/analytics/partners/deals-timeline',
297
+ ...options
298
+ });
299
+ };
300
+ /**
301
+ * Commission summary
302
+ * Company-wide commission totals for a period — paid (earned), pending, and processing — in the company base currency, plus payment + deal counts. Use this for 'how much commission is owed/earned this period'. This is commission MONEY; for commission RULES use getCommissionReport. Defaults to the current year; pass a `period` or `start_date`+`end_date`. Money is in whole currency units of `currency_code`.
303
+ */
304
+ export const getCommissionSummary = (options) => {
305
+ return (options?.client ?? _heyApiClient).get({
306
+ security: [
307
+ {
308
+ scheme: 'bearer',
309
+ type: 'http'
310
+ }
311
+ ],
312
+ url: '/analytics/commission-summary',
313
+ ...options
314
+ });
315
+ };
316
+ /**
317
+ * Commission over time
318
+ * Commission paid and pending per bucket over the period, in the company base currency, with payment counts. Pass partner/category/tier/stage filters. Defaults to the current year.
319
+ */
320
+ export const getCommissionTimeSeries = (options) => {
321
+ return (options?.client ?? _heyApiClient).get({
322
+ security: [
323
+ {
324
+ scheme: 'bearer',
325
+ type: 'http'
326
+ }
327
+ ],
328
+ url: '/analytics/commission/time-series',
329
+ ...options
330
+ });
331
+ };
332
+ /**
333
+ * Commission leaderboard by partner
334
+ * Partners ranked by commission earned (and pending) for the period, in the company base currency, with payment + deal counts. Defaults to the current year.
335
+ */
336
+ export const getCommissionPartnerMetrics = (options) => {
337
+ return (options?.client ?? _heyApiClient).get({
338
+ security: [
339
+ {
340
+ scheme: 'bearer',
341
+ type: 'http'
342
+ }
343
+ ],
344
+ url: '/analytics/commission/partners',
345
+ ...options
346
+ });
347
+ };
348
+ /**
349
+ * Engagement summary
350
+ * Portal engagement totals for a period: unique users, sessions, page views, actions, and average session duration. Defaults to the current year; pass a `period` or `start_date`+`end_date`.
351
+ */
352
+ export const getEngagementSummary = (options) => {
353
+ return (options?.client ?? _heyApiClient).get({
354
+ security: [
355
+ {
356
+ scheme: 'bearer',
357
+ type: 'http'
358
+ }
359
+ ],
360
+ url: '/analytics/engagement-summary',
361
+ ...options
362
+ });
363
+ };
364
+ /**
365
+ * Engagement over time
366
+ * Sessions, page views and unique users bucketed over the period.
367
+ */
368
+ export const getEngagementTimeSeries = (options) => {
369
+ return (options?.client ?? _heyApiClient).get({
370
+ security: [
371
+ {
372
+ scheme: 'bearer',
373
+ type: 'http'
374
+ }
375
+ ],
376
+ url: '/analytics/engagement-time-series',
377
+ ...options
378
+ });
379
+ };
380
+ /**
381
+ * Top resources by views
382
+ * Most-viewed resources for the period.
383
+ */
384
+ export const getEngagementTopResources = (options) => {
385
+ return (options?.client ?? _heyApiClient).get({
386
+ security: [
387
+ {
388
+ scheme: 'bearer',
389
+ type: 'http'
390
+ }
391
+ ],
392
+ url: '/analytics/engagement/top-resources',
393
+ ...options
394
+ });
395
+ };
396
+ /**
397
+ * Top rooms by views
398
+ * Most-viewed rooms for the period.
399
+ */
400
+ export const getEngagementTopRooms = (options) => {
401
+ return (options?.client ?? _heyApiClient).get({
402
+ security: [
403
+ {
404
+ scheme: 'bearer',
405
+ type: 'http'
406
+ }
407
+ ],
408
+ url: '/analytics/engagement/top-rooms',
409
+ ...options
410
+ });
411
+ };
412
+ /**
413
+ * Top certifications by views
414
+ * Most-viewed certifications for the period.
415
+ */
416
+ export const getEngagementTopCertifications = (options) => {
417
+ return (options?.client ?? _heyApiClient).get({
418
+ security: [
419
+ {
420
+ scheme: 'bearer',
421
+ type: 'http'
422
+ }
423
+ ],
424
+ url: '/analytics/engagement/top-certifications',
425
+ ...options
426
+ });
427
+ };
428
+ /**
429
+ * Engagement action breakdown
430
+ * Counts of each partner action type for the period.
431
+ */
432
+ export const getEngagementActionBreakdown = (options) => {
433
+ return (options?.client ?? _heyApiClient).get({
434
+ security: [
435
+ {
436
+ scheme: 'bearer',
437
+ type: 'http'
438
+ }
439
+ ],
440
+ url: '/analytics/engagement/action-breakdown',
441
+ ...options
442
+ });
443
+ };
444
+ /**
445
+ * Partner engagement leaderboard
446
+ * Partners ranked by portal engagement for the period.
447
+ */
448
+ export const getEngagementPartnerMetrics = (options) => {
449
+ return (options?.client ?? _heyApiClient).get({
450
+ security: [
451
+ {
452
+ scheme: 'bearer',
453
+ type: 'http'
454
+ }
455
+ ],
456
+ url: '/analytics/engagement/partners',
457
+ ...options
458
+ });
459
+ };
460
+ /**
461
+ * LMS summary
462
+ * Training totals for a period: enrolments, started, completions, passes, pass rate, average score, active learners, certified users, average time to complete. Defaults to the current year.
463
+ */
464
+ export const getLmsSummary = (options) => {
465
+ return (options?.client ?? _heyApiClient).get({
466
+ security: [
467
+ {
468
+ scheme: 'bearer',
469
+ type: 'http'
470
+ }
471
+ ],
472
+ url: '/analytics/lms-summary',
473
+ ...options
474
+ });
475
+ };
476
+ /**
477
+ * LMS over time
478
+ * Enrolments, completions and passes bucketed over the period.
479
+ */
480
+ export const getLmsTimeSeries = (options) => {
481
+ return (options?.client ?? _heyApiClient).get({
482
+ security: [
483
+ {
484
+ scheme: 'bearer',
485
+ type: 'http'
486
+ }
487
+ ],
488
+ url: '/analytics/lms-time-series',
489
+ ...options
490
+ });
491
+ };
492
+ /**
493
+ * Most-completed certifications
494
+ * Certifications ranked by completions for the period.
495
+ */
496
+ export const getLmsTopCertificationsByCompletion = (options) => {
497
+ return (options?.client ?? _heyApiClient).get({
498
+ security: [
499
+ {
500
+ scheme: 'bearer',
501
+ type: 'http'
502
+ }
503
+ ],
504
+ url: '/analytics/lms/top-certifications-by-completion',
505
+ ...options
506
+ });
507
+ };
508
+ /**
509
+ * Hardest certifications
510
+ * Certifications ranked by lowest pass rate (hardest) for the period.
511
+ */
512
+ export const getLmsTopCertificationsByDifficulty = (options) => {
513
+ return (options?.client ?? _heyApiClient).get({
514
+ security: [
515
+ {
516
+ scheme: 'bearer',
517
+ type: 'http'
518
+ }
519
+ ],
520
+ url: '/analytics/lms/top-certifications-by-difficulty',
521
+ ...options
522
+ });
523
+ };
524
+ /**
525
+ * Partner training leaderboard
526
+ * Partners ranked by training completion for the period.
527
+ */
528
+ export const getLmsPartnerLeaderboard = (options) => {
529
+ return (options?.client ?? _heyApiClient).get({
530
+ security: [
531
+ {
532
+ scheme: 'bearer',
533
+ type: 'http'
534
+ }
535
+ ],
536
+ url: '/analytics/lms/partners',
537
+ ...options
538
+ });
539
+ };
540
+ /**
541
+ * Learner leaderboard
542
+ * Top learners by certifications earned + average score for the period.
543
+ */
544
+ export const getLmsUserLeaderboard = (options) => {
545
+ return (options?.client ?? _heyApiClient).get({
546
+ security: [
547
+ {
548
+ scheme: 'bearer',
549
+ type: 'http'
550
+ }
551
+ ],
552
+ url: '/analytics/lms/users',
553
+ ...options
554
+ });
555
+ };
556
+ /**
557
+ * At-risk learners
558
+ * Learners in progress for over 30 days without completing — candidates for a nudge.
559
+ */
560
+ export const getLmsAtRiskLearners = (options) => {
561
+ return (options?.client ?? _heyApiClient).get({
562
+ security: [
563
+ {
564
+ scheme: 'bearer',
565
+ type: 'http'
566
+ }
567
+ ],
568
+ url: '/analytics/lms/at-risk-learners',
569
+ ...options
570
+ });
571
+ };
572
+ /**
573
+ * Most-completed certification resources
574
+ * Certification-bound resource blocks ranked by completions for the period.
575
+ */
576
+ export const getLmsCertResourceCompletions = (options) => {
577
+ return (options?.client ?? _heyApiClient).get({
578
+ security: [
579
+ {
580
+ scheme: 'bearer',
581
+ type: 'http'
582
+ }
583
+ ],
584
+ url: '/analytics/lms/cert-resource-completions',
585
+ ...options
586
+ });
587
+ };
588
+ /**
589
+ * Hardest certification quizzes
590
+ * Certification-bound quiz blocks ranked by lowest pass rate for the period.
591
+ */
592
+ export const getLmsCertResourcePassRates = (options) => {
593
+ return (options?.client ?? _heyApiClient).get({
594
+ security: [
595
+ {
596
+ scheme: 'bearer',
597
+ type: 'http'
598
+ }
599
+ ],
600
+ url: '/analytics/lms/cert-resource-pass-rates',
601
+ ...options
602
+ });
603
+ };
604
+ /**
605
+ * Certification enrolments (paginated)
606
+ * Per-learner enrolment rows for a status (in_progress, completed, or failed) over the period. Paginated.
607
+ */
608
+ export const getLmsEnrollmentList = (options) => {
609
+ return (options.client ?? _heyApiClient).get({
610
+ security: [
611
+ {
612
+ scheme: 'bearer',
613
+ type: 'http'
614
+ }
615
+ ],
616
+ url: '/analytics/lms/enrollments',
617
+ ...options
618
+ });
619
+ };
620
+ /**
621
+ * List audit log entries
622
+ * List change-history entries for the company. Filter by entity_type (lead, lead_deal, partnership, lead_deal_payment) and/or entity_uuid for a single entity's trail, or omit both for a company-wide feed. Each entry records what changed (changes[]), the action, the rendered actor, and when.
623
+ */
624
+ export const listAuditLog = (options) => {
625
+ return (options?.client ?? _heyApiClient).get({
626
+ security: [
627
+ {
628
+ scheme: 'bearer',
629
+ type: 'http'
630
+ }
631
+ ],
632
+ url: '/audit-log/',
633
+ ...options
634
+ });
635
+ };
636
+ /**
637
+ * List automation workflows
638
+ */
639
+ export const listAutomations = (options) => {
640
+ return (options?.client ?? _heyApiClient).get({
641
+ security: [
642
+ {
643
+ scheme: 'bearer',
644
+ type: 'http'
645
+ }
646
+ ],
647
+ url: '/automations/',
648
+ ...options
649
+ });
650
+ };
651
+ /**
652
+ * Create an automation workflow
653
+ */
654
+ export const createAutomation = (options) => {
655
+ return (options.client ?? _heyApiClient).post({
656
+ security: [
657
+ {
658
+ scheme: 'bearer',
659
+ type: 'http'
660
+ }
661
+ ],
662
+ url: '/automations/',
663
+ ...options,
664
+ headers: {
665
+ 'Content-Type': 'application/json',
666
+ ...options?.headers
667
+ }
668
+ });
669
+ };
670
+ /**
671
+ * Archive an automation workflow
672
+ */
673
+ export const deleteAutomation = (options) => {
674
+ return (options.client ?? _heyApiClient).delete({
675
+ security: [
676
+ {
677
+ scheme: 'bearer',
678
+ type: 'http'
679
+ }
680
+ ],
681
+ url: '/automations/{uuid}',
682
+ ...options
683
+ });
684
+ };
685
+ /**
686
+ * Get an automation workflow
687
+ */
688
+ export const getAutomation = (options) => {
689
+ return (options.client ?? _heyApiClient).get({
690
+ security: [
691
+ {
692
+ scheme: 'bearer',
693
+ type: 'http'
694
+ }
695
+ ],
696
+ url: '/automations/{uuid}',
697
+ ...options
698
+ });
699
+ };
700
+ /**
701
+ * Update an automation workflow (label, description, graph)
702
+ */
703
+ export const updateAutomationWorkflow = (options) => {
704
+ return (options.client ?? _heyApiClient).patch({
705
+ security: [
706
+ {
707
+ scheme: 'bearer',
708
+ type: 'http'
709
+ }
710
+ ],
711
+ url: '/automations/{uuid}',
712
+ ...options,
713
+ headers: {
714
+ 'Content-Type': 'application/json',
715
+ ...options?.headers
716
+ }
717
+ });
718
+ };
719
+ /**
720
+ * Activate or deactivate an automation workflow
721
+ */
722
+ export const toggleAutomation = (options) => {
723
+ return (options.client ?? _heyApiClient).post({
724
+ security: [
725
+ {
726
+ scheme: 'bearer',
727
+ type: 'http'
728
+ }
729
+ ],
730
+ url: '/automations/{uuid}/toggle',
731
+ ...options,
732
+ headers: {
733
+ 'Content-Type': 'application/json',
734
+ ...options?.headers
735
+ }
736
+ });
737
+ };
738
+ /**
739
+ * List commission rules
740
+ * Returns commission rule configurations. Filter by `partner_type` (referral/reseller/distributor) or `payment_target` (`partnership` for partner commissions, `individual` for spiffs paid to individual users/contacts).
741
+ *
742
+ * Each commission rule contains a `calculation` object with `entries` — an array of payment triggers. Each entry specifies when payment occurs (`payment_stage_id`) and how it's calculated (`calculation.type`: oneOff, recurring, or split).
743
+ */
744
+ export const listCommissions = (options) => {
745
+ return (options?.client ?? _heyApiClient).get({
746
+ security: [
747
+ {
748
+ scheme: 'bearer',
749
+ type: 'http'
750
+ }
751
+ ],
752
+ url: '/commissions/',
753
+ ...options
754
+ });
755
+ };
756
+ /**
757
+ * Create a commission rule
758
+ * Create a commission rule with calculation entries. Optionally scope to specific tiers, categories, or partnerships via their UUIDs.
759
+ *
760
+ * ## Calculation structure
761
+ *
762
+ * The `calculation` object contains `entries` — an array of payment triggers:
763
+ *
764
+ * ```json
765
+ * {
766
+ * "entries": [
767
+ * {
768
+ * "payment_stage_id": 123,
769
+ * "calculation": {
770
+ * "type": "oneOff",
771
+ * "option": "percentage",
772
+ * "value": 10
773
+ * }
774
+ * }
775
+ * ]
776
+ * }
777
+ * ```
778
+ *
779
+ * ### Calculation types
780
+ *
781
+ * - **oneOff**: Single payment when stage is reached. `option`: fixed (flat amount), percentage (of deal value), or scaling (varies by custom field).
782
+ * - **recurring**: Multiple payments over time. Additional fields: `recurring_period` (weekly/monthly/quarterly/yearly), `number_of_occurrences`. Supports `periodRates` for variable rates per period.
783
+ * - **split**: Different calculations for one-off and recurring components. Contains `split.oneOff` and `split.recurring` sub-calculations.
784
+ *
785
+ * ### Scaling
786
+ *
787
+ * When `option` is `scaling`, provide `scalingConfig` with `customFieldId` and `tiers` array mapping custom field option IDs to fixed/percentage values.
788
+ *
789
+ * ### Scoping
790
+ *
791
+ * Commissions can be scoped to apply only to specific partners:
792
+ * - `tier_uuids` — apply to partners in these tiers
793
+ * - `category_uuids` — apply to partners in these categories
794
+ * - `partnership_uuids` — apply to these specific partnerships (highest priority)
795
+ */
796
+ export const createCommission = (options) => {
797
+ return (options.client ?? _heyApiClient).post({
798
+ security: [
799
+ {
800
+ scheme: 'bearer',
801
+ type: 'http'
802
+ }
803
+ ],
804
+ url: '/commissions/',
805
+ ...options,
806
+ headers: {
807
+ 'Content-Type': 'application/json',
808
+ ...options?.headers
809
+ }
810
+ });
811
+ };
812
+ /**
813
+ * Delete a commission rule
814
+ * Permanently deletes a commission rule and all its tier, category, and partnership assignments. Existing deal commissions that were applied from this rule are not affected.
815
+ */
816
+ export const deleteCommission = (options) => {
817
+ return (options.client ?? _heyApiClient).delete({
818
+ security: [
819
+ {
820
+ scheme: 'bearer',
821
+ type: 'http'
822
+ }
823
+ ],
824
+ url: '/commissions/{uuid}',
825
+ ...options
826
+ });
827
+ };
828
+ /**
829
+ * Get a commission rule
830
+ */
831
+ export const getCommission = (options) => {
832
+ return (options.client ?? _heyApiClient).get({
833
+ security: [
834
+ {
835
+ scheme: 'bearer',
836
+ type: 'http'
837
+ }
838
+ ],
839
+ url: '/commissions/{uuid}',
840
+ ...options
841
+ });
842
+ };
843
+ /**
844
+ * Update a commission rule
845
+ * Update commission rule properties or calculation entries. When `tier_uuids`, `category_uuids`, or `partnership_uuids` are provided, they **replace** the current assignments entirely (not merge). Omit these fields to leave assignments unchanged. See POST /v1/commissions for the full calculation schema documentation.
846
+ */
847
+ export const updateCommission = (options) => {
848
+ return (options.client ?? _heyApiClient).patch({
849
+ security: [
850
+ {
851
+ scheme: 'bearer',
852
+ type: 'http'
853
+ }
854
+ ],
855
+ url: '/commissions/{uuid}',
856
+ ...options,
857
+ headers: {
858
+ 'Content-Type': 'application/json',
859
+ ...options?.headers
860
+ }
861
+ });
862
+ };
863
+ /**
864
+ * List partner contacts
865
+ * Returns all partner contacts across partnerships. Filter by partnership_uuid to scope to a specific partner. Each contact includes its partnership reference.
866
+ */
867
+ export const listContacts = (options) => {
868
+ return (options?.client ?? _heyApiClient).get({
869
+ security: [
870
+ {
871
+ scheme: 'bearer',
872
+ type: 'http'
873
+ }
874
+ ],
875
+ url: '/contacts/',
876
+ ...options
877
+ });
878
+ };
879
+ /**
880
+ * Get a contact
881
+ */
882
+ export const getContact = (options) => {
883
+ return (options.client ?? _heyApiClient).get({
884
+ security: [
885
+ {
886
+ scheme: 'bearer',
887
+ type: 'http'
888
+ }
889
+ ],
890
+ url: '/contacts/{uuid}',
891
+ ...options
892
+ });
893
+ };
894
+ /**
895
+ * List available currencies
896
+ * Returns all available currencies. Use the UUID when setting currency on products, deals, or pricing calculators.
897
+ */
898
+ export const listCurrencies = (options) => {
899
+ return (options?.client ?? _heyApiClient).get({
900
+ security: [
901
+ {
902
+ scheme: 'bearer',
903
+ type: 'http'
904
+ }
905
+ ],
906
+ url: '/currencies/',
907
+ ...options
908
+ });
909
+ };
910
+ /**
911
+ * List company users
912
+ * Returns users in the company. Use the UUID when assigning users to leads, tasks, or partners.
913
+ */
914
+ export const listUsers = (options) => {
915
+ return (options?.client ?? _heyApiClient).get({
916
+ security: [
917
+ {
918
+ scheme: 'bearer',
919
+ type: 'http'
920
+ }
921
+ ],
922
+ url: '/users/',
923
+ ...options
924
+ });
925
+ };
926
+ /**
927
+ * List partner stages
928
+ */
929
+ export const listPartnerStages = (options) => {
930
+ return (options?.client ?? _heyApiClient).get({
931
+ security: [
932
+ {
933
+ scheme: 'bearer',
934
+ type: 'http'
935
+ }
936
+ ],
937
+ url: '/partner-stages/',
938
+ ...options
939
+ });
940
+ };
941
+ /**
942
+ * Create a partner stage
943
+ */
944
+ export const createPartnerStage = (options) => {
945
+ return (options.client ?? _heyApiClient).post({
946
+ security: [
947
+ {
948
+ scheme: 'bearer',
949
+ type: 'http'
950
+ }
951
+ ],
952
+ url: '/partner-stages/',
953
+ ...options,
954
+ headers: {
955
+ 'Content-Type': 'application/json',
956
+ ...options?.headers
957
+ }
958
+ });
959
+ };
960
+ /**
961
+ * Delete a partner stage
962
+ */
963
+ export const deletePartnerStage = (options) => {
964
+ return (options.client ?? _heyApiClient).delete({
965
+ security: [
966
+ {
967
+ scheme: 'bearer',
968
+ type: 'http'
969
+ }
970
+ ],
971
+ url: '/partner-stages/{uuid}',
972
+ ...options
973
+ });
974
+ };
975
+ /**
976
+ * Update a partner stage
977
+ */
978
+ export const updatePartnerStage = (options) => {
979
+ return (options.client ?? _heyApiClient).patch({
980
+ security: [
981
+ {
982
+ scheme: 'bearer',
983
+ type: 'http'
984
+ }
985
+ ],
986
+ url: '/partner-stages/{uuid}',
987
+ ...options,
988
+ headers: {
989
+ 'Content-Type': 'application/json',
990
+ ...options?.headers
991
+ }
992
+ });
993
+ };
994
+ /**
995
+ * List custom field definitions
996
+ */
997
+ export const listCustomFields = (options) => {
998
+ return (options?.client ?? _heyApiClient).get({
999
+ security: [
1000
+ {
1001
+ scheme: 'bearer',
1002
+ type: 'http'
1003
+ }
1004
+ ],
1005
+ url: '/custom-fields/',
1006
+ ...options
1007
+ });
1008
+ };
1009
+ /**
1010
+ * Create a custom field definition
1011
+ */
1012
+ export const createCustomField = (options) => {
1013
+ return (options.client ?? _heyApiClient).post({
1014
+ security: [
1015
+ {
1016
+ scheme: 'bearer',
1017
+ type: 'http'
1018
+ }
1019
+ ],
1020
+ url: '/custom-fields/',
1021
+ ...options,
1022
+ headers: {
1023
+ 'Content-Type': 'application/json',
1024
+ ...options?.headers
1025
+ }
1026
+ });
1027
+ };
1028
+ /**
1029
+ * Delete a custom field definition
1030
+ */
1031
+ export const deleteCustomField = (options) => {
1032
+ return (options.client ?? _heyApiClient).delete({
1033
+ security: [
1034
+ {
1035
+ scheme: 'bearer',
1036
+ type: 'http'
1037
+ }
1038
+ ],
1039
+ url: '/custom-fields/{uuid}',
1040
+ ...options
1041
+ });
1042
+ };
1043
+ /**
1044
+ * Update a custom field definition
1045
+ */
1046
+ export const updateCustomField = (options) => {
1047
+ return (options.client ?? _heyApiClient).patch({
1048
+ security: [
1049
+ {
1050
+ scheme: 'bearer',
1051
+ type: 'http'
1052
+ }
1053
+ ],
1054
+ url: '/custom-fields/{uuid}',
1055
+ ...options,
1056
+ headers: {
1057
+ 'Content-Type': 'application/json',
1058
+ ...options?.headers
1059
+ }
1060
+ });
1061
+ };
1062
+ /**
1063
+ * Add an option to a select/multi-select custom field
1064
+ */
1065
+ export const addCustomFieldOption = (options) => {
1066
+ return (options.client ?? _heyApiClient).post({
1067
+ security: [
1068
+ {
1069
+ scheme: 'bearer',
1070
+ type: 'http'
1071
+ }
1072
+ ],
1073
+ url: '/custom-fields/{uuid}/options',
1074
+ ...options,
1075
+ headers: {
1076
+ 'Content-Type': 'application/json',
1077
+ ...options?.headers
1078
+ }
1079
+ });
1080
+ };
1081
+ /**
1082
+ * Delete an option from a custom field
1083
+ */
1084
+ export const deleteCustomFieldOption = (options) => {
1085
+ return (options.client ?? _heyApiClient).delete({
1086
+ security: [
1087
+ {
1088
+ scheme: 'bearer',
1089
+ type: 'http'
1090
+ }
1091
+ ],
1092
+ url: '/custom-fields/{uuid}/options/{optionId}',
1093
+ ...options
1094
+ });
1095
+ };
1096
+ /**
1097
+ * Update an option on a custom field
1098
+ */
1099
+ export const updateCustomFieldOption = (options) => {
1100
+ return (options.client ?? _heyApiClient).patch({
1101
+ security: [
1102
+ {
1103
+ scheme: 'bearer',
1104
+ type: 'http'
1105
+ }
1106
+ ],
1107
+ url: '/custom-fields/{uuid}/options/{optionId}',
1108
+ ...options,
1109
+ headers: {
1110
+ 'Content-Type': 'application/json',
1111
+ ...options?.headers
1112
+ }
1113
+ });
1114
+ };
1115
+ /**
1116
+ * List custom field values for an entity
1117
+ */
1118
+ export const listCustomFieldValues = (options) => {
1119
+ return (options.client ?? _heyApiClient).get({
1120
+ security: [
1121
+ {
1122
+ scheme: 'bearer',
1123
+ type: 'http'
1124
+ }
1125
+ ],
1126
+ url: '/custom-field-values/',
1127
+ ...options
1128
+ });
1129
+ };
1130
+ /**
1131
+ * Set a custom field value on an entity
1132
+ */
1133
+ export const createCustomFieldValue = (options) => {
1134
+ return (options.client ?? _heyApiClient).post({
1135
+ security: [
1136
+ {
1137
+ scheme: 'bearer',
1138
+ type: 'http'
1139
+ }
1140
+ ],
1141
+ url: '/custom-field-values/',
1142
+ ...options,
1143
+ headers: {
1144
+ 'Content-Type': 'application/json',
1145
+ ...options?.headers
1146
+ }
1147
+ });
1148
+ };
1149
+ /**
1150
+ * Delete a custom field value
1151
+ */
1152
+ export const deleteCustomFieldValue = (options) => {
1153
+ return (options.client ?? _heyApiClient).delete({
1154
+ security: [
1155
+ {
1156
+ scheme: 'bearer',
1157
+ type: 'http'
1158
+ }
1159
+ ],
1160
+ url: '/custom-field-values/{uuid}',
1161
+ ...options
1162
+ });
1163
+ };
1164
+ /**
1165
+ * Update a custom field value
1166
+ */
1167
+ export const updateCustomFieldValue = (options) => {
1168
+ return (options.client ?? _heyApiClient).patch({
1169
+ security: [
1170
+ {
1171
+ scheme: 'bearer',
1172
+ type: 'http'
1173
+ }
1174
+ ],
1175
+ url: '/custom-field-values/{uuid}',
1176
+ ...options,
1177
+ headers: {
1178
+ 'Content-Type': 'application/json',
1179
+ ...options?.headers
1180
+ }
1181
+ });
1182
+ };
1183
+ /**
1184
+ * List deal stages
1185
+ */
1186
+ export const listDealStages = (options) => {
1187
+ return (options?.client ?? _heyApiClient).get({
1188
+ security: [
1189
+ {
1190
+ scheme: 'bearer',
1191
+ type: 'http'
1192
+ }
1193
+ ],
1194
+ url: '/deal-stages/',
1195
+ ...options
1196
+ });
1197
+ };
1198
+ /**
1199
+ * Create a deal stage
1200
+ */
1201
+ export const createDealStage = (options) => {
1202
+ return (options.client ?? _heyApiClient).post({
1203
+ security: [
1204
+ {
1205
+ scheme: 'bearer',
1206
+ type: 'http'
1207
+ }
1208
+ ],
1209
+ url: '/deal-stages/',
1210
+ ...options,
1211
+ headers: {
1212
+ 'Content-Type': 'application/json',
1213
+ ...options?.headers
1214
+ }
1215
+ });
1216
+ };
1217
+ /**
1218
+ * Delete a deal stage
1219
+ */
1220
+ export const deleteDealStage = (options) => {
1221
+ return (options.client ?? _heyApiClient).delete({
1222
+ security: [
1223
+ {
1224
+ scheme: 'bearer',
1225
+ type: 'http'
1226
+ }
1227
+ ],
1228
+ url: '/deal-stages/{uuid}',
1229
+ ...options
1230
+ });
1231
+ };
1232
+ /**
1233
+ * Update a deal stage
1234
+ */
1235
+ export const updateDealStage = (options) => {
1236
+ return (options.client ?? _heyApiClient).patch({
1237
+ security: [
1238
+ {
1239
+ scheme: 'bearer',
1240
+ type: 'http'
1241
+ }
1242
+ ],
1243
+ url: '/deal-stages/{uuid}',
1244
+ ...options,
1245
+ headers: {
1246
+ 'Content-Type': 'application/json',
1247
+ ...options?.headers
1248
+ }
1249
+ });
1250
+ };
1251
+ /**
1252
+ * List tiers
1253
+ */
1254
+ export const listTiers = (options) => {
1255
+ return (options?.client ?? _heyApiClient).get({
1256
+ security: [
1257
+ {
1258
+ scheme: 'bearer',
1259
+ type: 'http'
1260
+ }
1261
+ ],
1262
+ url: '/tiers/',
1263
+ ...options
1264
+ });
1265
+ };
1266
+ /**
1267
+ * Create a tier
1268
+ */
1269
+ export const createTier = (options) => {
1270
+ return (options.client ?? _heyApiClient).post({
1271
+ security: [
1272
+ {
1273
+ scheme: 'bearer',
1274
+ type: 'http'
1275
+ }
1276
+ ],
1277
+ url: '/tiers/',
1278
+ ...options,
1279
+ headers: {
1280
+ 'Content-Type': 'application/json',
1281
+ ...options?.headers
1282
+ }
1283
+ });
1284
+ };
1285
+ /**
1286
+ * Delete a tier
1287
+ */
1288
+ export const deleteTier = (options) => {
1289
+ return (options.client ?? _heyApiClient).delete({
1290
+ security: [
1291
+ {
1292
+ scheme: 'bearer',
1293
+ type: 'http'
1294
+ }
1295
+ ],
1296
+ url: '/tiers/{uuid}',
1297
+ ...options
1298
+ });
1299
+ };
1300
+ /**
1301
+ * Update a tier
1302
+ */
1303
+ export const updateTier = (options) => {
1304
+ return (options.client ?? _heyApiClient).patch({
1305
+ security: [
1306
+ {
1307
+ scheme: 'bearer',
1308
+ type: 'http'
1309
+ }
1310
+ ],
1311
+ url: '/tiers/{uuid}',
1312
+ ...options,
1313
+ headers: {
1314
+ 'Content-Type': 'application/json',
1315
+ ...options?.headers
1316
+ }
1317
+ });
1318
+ };
1319
+ /**
1320
+ * List categories
1321
+ */
1322
+ export const listCategories = (options) => {
1323
+ return (options?.client ?? _heyApiClient).get({
1324
+ security: [
1325
+ {
1326
+ scheme: 'bearer',
1327
+ type: 'http'
1328
+ }
1329
+ ],
1330
+ url: '/categories/',
1331
+ ...options
1332
+ });
1333
+ };
1334
+ /**
1335
+ * Create a category
1336
+ */
1337
+ export const createCategory = (options) => {
1338
+ return (options.client ?? _heyApiClient).post({
1339
+ security: [
1340
+ {
1341
+ scheme: 'bearer',
1342
+ type: 'http'
1343
+ }
1344
+ ],
1345
+ url: '/categories/',
1346
+ ...options,
1347
+ headers: {
1348
+ 'Content-Type': 'application/json',
1349
+ ...options?.headers
1350
+ }
1351
+ });
1352
+ };
1353
+ /**
1354
+ * Delete a category
1355
+ */
1356
+ export const deleteCategory = (options) => {
1357
+ return (options.client ?? _heyApiClient).delete({
1358
+ security: [
1359
+ {
1360
+ scheme: 'bearer',
1361
+ type: 'http'
1362
+ }
1363
+ ],
1364
+ url: '/categories/{uuid}',
1365
+ ...options
1366
+ });
1367
+ };
1368
+ /**
1369
+ * Update a category
1370
+ */
1371
+ export const updateCategory = (options) => {
1372
+ return (options.client ?? _heyApiClient).patch({
1373
+ security: [
1374
+ {
1375
+ scheme: 'bearer',
1376
+ type: 'http'
1377
+ }
1378
+ ],
1379
+ url: '/categories/{uuid}',
1380
+ ...options,
1381
+ headers: {
1382
+ 'Content-Type': 'application/json',
1383
+ ...options?.headers
1384
+ }
1385
+ });
1386
+ };
1387
+ /**
1388
+ * Campaign lead stats
1389
+ * Lead counts attributed to each campaign (leads.campaign_id) plus a grand total, in a single call. Ordered by lead count descending; includes campaigns with zero leads. Use this to answer 'how many leads have campaigns produced' instead of fetching each campaign one by one.
1390
+ */
1391
+ export const getCampaignLeadStats = (options) => {
1392
+ return (options?.client ?? _heyApiClient).get({
1393
+ security: [
1394
+ {
1395
+ scheme: 'bearer',
1396
+ type: 'http'
1397
+ }
1398
+ ],
1399
+ url: '/campaigns/lead-stats',
1400
+ ...options
1401
+ });
1402
+ };
1403
+ /**
1404
+ * List campaigns
1405
+ * List campaigns with optional filtering by status, type, or search. Each campaign includes its linked email template, audience partner-type flags, and tags.
1406
+ */
1407
+ export const listCampaigns = (options) => {
1408
+ return (options?.client ?? _heyApiClient).get({
1409
+ security: [
1410
+ {
1411
+ scheme: 'bearer',
1412
+ type: 'http'
1413
+ }
1414
+ ],
1415
+ url: '/campaigns/',
1416
+ ...options
1417
+ });
1418
+ };
1419
+ /**
1420
+ * Create a campaign
1421
+ * Create a campaign — the send configuration (audience filters, partner sharing, and a LINK to one email template). A campaign is NOT the email content itself: to create the actual email (a "campaign email" — its header, body, footer), use createMarketingTemplate, then link it here via PATCH email_template_uuid. All fields are optional — a campaign is created in draft and configured afterwards via the sub-resource endpoints. Sending emails is not available through the API.
1422
+ */
1423
+ export const createCampaign = (options) => {
1424
+ return (options.client ?? _heyApiClient).post({
1425
+ security: [
1426
+ {
1427
+ scheme: 'bearer',
1428
+ type: 'http'
1429
+ }
1430
+ ],
1431
+ url: '/campaigns/',
1432
+ ...options,
1433
+ headers: {
1434
+ 'Content-Type': 'application/json',
1435
+ ...options?.headers
1436
+ }
1437
+ });
1438
+ };
1439
+ /**
1440
+ * Archive a campaign
1441
+ */
1442
+ export const deleteCampaign = (options) => {
1443
+ return (options.client ?? _heyApiClient).delete({
1444
+ security: [
1445
+ {
1446
+ scheme: 'bearer',
1447
+ type: 'http'
1448
+ }
1449
+ ],
1450
+ url: '/campaigns/{uuid}',
1451
+ ...options
1452
+ });
1453
+ };
1454
+ /**
1455
+ * Get a campaign
1456
+ * Get a campaign with its full audience configuration: tier/category/stage filters, shared partners, partner-type flags, and linked email template.
1457
+ */
1458
+ export const getCampaign = (options) => {
1459
+ return (options.client ?? _heyApiClient).get({
1460
+ security: [
1461
+ {
1462
+ scheme: 'bearer',
1463
+ type: 'http'
1464
+ }
1465
+ ],
1466
+ url: '/campaigns/{uuid}',
1467
+ ...options
1468
+ });
1469
+ };
1470
+ /**
1471
+ * Update a campaign
1472
+ * Update campaign fields, including status, schedule, partner-type audience flags, and the linked email template (email_template_uuid; null clears it). Audience filters and partner sharing are managed via the sub-resource endpoints.
1473
+ */
1474
+ export const updateCampaign = (options) => {
1475
+ return (options.client ?? _heyApiClient).patch({
1476
+ security: [
1477
+ {
1478
+ scheme: 'bearer',
1479
+ type: 'http'
1480
+ }
1481
+ ],
1482
+ url: '/campaigns/{uuid}',
1483
+ ...options,
1484
+ headers: {
1485
+ 'Content-Type': 'application/json',
1486
+ ...options?.headers
1487
+ }
1488
+ });
1489
+ };
1490
+ /**
1491
+ * List a campaign's leads
1492
+ * List the leads attributed to a campaign (leads.campaign_id). Supports search, status filtering, and pagination. Read-only — sending is done by a human in the app.
1493
+ */
1494
+ export const listCampaignLeads = (options) => {
1495
+ return (options.client ?? _heyApiClient).get({
1496
+ security: [
1497
+ {
1498
+ scheme: 'bearer',
1499
+ type: 'http'
1500
+ }
1501
+ ],
1502
+ url: '/campaigns/{uuid}/leads',
1503
+ ...options
1504
+ });
1505
+ };
1506
+ /**
1507
+ * Add a tier filter to a campaign
1508
+ */
1509
+ export const addCampaignTier = (options) => {
1510
+ return (options.client ?? _heyApiClient).post({
1511
+ security: [
1512
+ {
1513
+ scheme: 'bearer',
1514
+ type: 'http'
1515
+ }
1516
+ ],
1517
+ url: '/campaigns/{uuid}/tiers',
1518
+ ...options,
1519
+ headers: {
1520
+ 'Content-Type': 'application/json',
1521
+ ...options?.headers
1522
+ }
1523
+ });
1524
+ };
1525
+ /**
1526
+ * Remove a tier filter from a campaign
1527
+ */
1528
+ export const removeCampaignTier = (options) => {
1529
+ return (options.client ?? _heyApiClient).delete({
1530
+ security: [
1531
+ {
1532
+ scheme: 'bearer',
1533
+ type: 'http'
1534
+ }
1535
+ ],
1536
+ url: '/campaigns/{uuid}/tiers/{subUuid}',
1537
+ ...options
1538
+ });
1539
+ };
1540
+ /**
1541
+ * Add a category filter to a campaign
1542
+ */
1543
+ export const addCampaignCategory = (options) => {
1544
+ return (options.client ?? _heyApiClient).post({
1545
+ security: [
1546
+ {
1547
+ scheme: 'bearer',
1548
+ type: 'http'
1549
+ }
1550
+ ],
1551
+ url: '/campaigns/{uuid}/categories',
1552
+ ...options,
1553
+ headers: {
1554
+ 'Content-Type': 'application/json',
1555
+ ...options?.headers
1556
+ }
1557
+ });
1558
+ };
1559
+ /**
1560
+ * Remove a category filter from a campaign
1561
+ */
1562
+ export const removeCampaignCategory = (options) => {
1563
+ return (options.client ?? _heyApiClient).delete({
1564
+ security: [
1565
+ {
1566
+ scheme: 'bearer',
1567
+ type: 'http'
1568
+ }
1569
+ ],
1570
+ url: '/campaigns/{uuid}/categories/{subUuid}',
1571
+ ...options
1572
+ });
1573
+ };
1574
+ /**
1575
+ * Add a partnership-stage filter to a campaign
1576
+ */
1577
+ export const addCampaignStage = (options) => {
1578
+ return (options.client ?? _heyApiClient).post({
1579
+ security: [
1580
+ {
1581
+ scheme: 'bearer',
1582
+ type: 'http'
1583
+ }
1584
+ ],
1585
+ url: '/campaigns/{uuid}/stages',
1586
+ ...options,
1587
+ headers: {
1588
+ 'Content-Type': 'application/json',
1589
+ ...options?.headers
1590
+ }
1591
+ });
1592
+ };
1593
+ /**
1594
+ * Remove a partnership-stage filter from a campaign
1595
+ */
1596
+ export const removeCampaignStage = (options) => {
1597
+ return (options.client ?? _heyApiClient).delete({
1598
+ security: [
1599
+ {
1600
+ scheme: 'bearer',
1601
+ type: 'http'
1602
+ }
1603
+ ],
1604
+ url: '/campaigns/{uuid}/stages/{subUuid}',
1605
+ ...options
1606
+ });
1607
+ };
1608
+ /**
1609
+ * Share a campaign with a partner
1610
+ * Add or update a partner's access to the campaign. `shared` exposes the campaign in the partner portal; `shared_leads` shares its leads.
1611
+ */
1612
+ export const shareCampaignPartner = (options) => {
1613
+ return (options.client ?? _heyApiClient).post({
1614
+ security: [
1615
+ {
1616
+ scheme: 'bearer',
1617
+ type: 'http'
1618
+ }
1619
+ ],
1620
+ url: '/campaigns/{uuid}/partners',
1621
+ ...options,
1622
+ headers: {
1623
+ 'Content-Type': 'application/json',
1624
+ ...options?.headers
1625
+ }
1626
+ });
1627
+ };
1628
+ /**
1629
+ * Remove a partner from a campaign
1630
+ */
1631
+ export const unshareCampaignPartner = (options) => {
1632
+ return (options.client ?? _heyApiClient).delete({
1633
+ security: [
1634
+ {
1635
+ scheme: 'bearer',
1636
+ type: 'http'
1637
+ }
1638
+ ],
1639
+ url: '/campaigns/{uuid}/partners/{subUuid}',
1640
+ ...options
1641
+ });
1642
+ };
1643
+ /**
1644
+ * Archive a kanban card
1645
+ * Archives (soft-deletes) a kanban card.
1646
+ */
1647
+ export const archiveCard = (options) => {
1648
+ return (options.client ?? _heyApiClient).delete({
1649
+ security: [
1650
+ {
1651
+ scheme: 'bearer',
1652
+ type: 'http'
1653
+ }
1654
+ ],
1655
+ url: '/cards/{uuid}',
1656
+ ...options
1657
+ });
1658
+ };
1659
+ /**
1660
+ * Get a kanban card
1661
+ * Returns a kanban card's metadata: title, current stage, the board's available stages (valid stage-move targets), assigned users, tags and linked partners. The rich-text body is edited separately.
1662
+ */
1663
+ export const getCard = (options) => {
1664
+ return (options.client ?? _heyApiClient).get({
1665
+ security: [
1666
+ {
1667
+ scheme: 'bearer',
1668
+ type: 'http'
1669
+ }
1670
+ ],
1671
+ url: '/cards/{uuid}',
1672
+ ...options
1673
+ });
1674
+ };
1675
+ /**
1676
+ * Update a kanban card
1677
+ * Rename a kanban card and/or move it to another stage. Use a stage_uuid from the card's available_stages (see getCard).
1678
+ */
1679
+ export const updateCard = (options) => {
1680
+ return (options.client ?? _heyApiClient).patch({
1681
+ security: [
1682
+ {
1683
+ scheme: 'bearer',
1684
+ type: 'http'
1685
+ }
1686
+ ],
1687
+ url: '/cards/{uuid}',
1688
+ ...options,
1689
+ headers: {
1690
+ 'Content-Type': 'application/json',
1691
+ ...options?.headers
1692
+ }
1693
+ });
1694
+ };
1695
+ /**
1696
+ * Assign a user to a kanban card
1697
+ */
1698
+ export const addCardAssignee = (options) => {
1699
+ return (options.client ?? _heyApiClient).post({
1700
+ security: [
1701
+ {
1702
+ scheme: 'bearer',
1703
+ type: 'http'
1704
+ }
1705
+ ],
1706
+ url: '/cards/{uuid}/assignees',
1707
+ ...options,
1708
+ headers: {
1709
+ 'Content-Type': 'application/json',
1710
+ ...options?.headers
1711
+ }
1712
+ });
1713
+ };
1714
+ /**
1715
+ * Unassign a user from a kanban card
1716
+ */
1717
+ export const removeCardAssignee = (options) => {
1718
+ return (options.client ?? _heyApiClient).delete({
1719
+ security: [
1720
+ {
1721
+ scheme: 'bearer',
1722
+ type: 'http'
1723
+ }
1724
+ ],
1725
+ url: '/cards/{uuid}/assignees/{subUuid}',
1726
+ ...options
1727
+ });
1728
+ };
1729
+ /**
1730
+ * Add a tag to a kanban card
1731
+ */
1732
+ export const addCardTag = (options) => {
1733
+ return (options.client ?? _heyApiClient).post({
1734
+ security: [
1735
+ {
1736
+ scheme: 'bearer',
1737
+ type: 'http'
1738
+ }
1739
+ ],
1740
+ url: '/cards/{uuid}/tags',
1741
+ ...options,
1742
+ headers: {
1743
+ 'Content-Type': 'application/json',
1744
+ ...options?.headers
1745
+ }
1746
+ });
1747
+ };
1748
+ /**
1749
+ * Remove a tag from a kanban card
1750
+ */
1751
+ export const removeCardTag = (options) => {
1752
+ return (options.client ?? _heyApiClient).delete({
1753
+ security: [
1754
+ {
1755
+ scheme: 'bearer',
1756
+ type: 'http'
1757
+ }
1758
+ ],
1759
+ url: '/cards/{uuid}/tags/{subUuid}',
1760
+ ...options
1761
+ });
1762
+ };
1763
+ /**
1764
+ * Link a partner to a kanban card
1765
+ */
1766
+ export const addCardPartner = (options) => {
1767
+ return (options.client ?? _heyApiClient).post({
1768
+ security: [
1769
+ {
1770
+ scheme: 'bearer',
1771
+ type: 'http'
1772
+ }
1773
+ ],
1774
+ url: '/cards/{uuid}/partners',
1775
+ ...options,
1776
+ headers: {
1777
+ 'Content-Type': 'application/json',
1778
+ ...options?.headers
1779
+ }
1780
+ });
1781
+ };
1782
+ /**
1783
+ * Unlink a partner from a kanban card
1784
+ */
1785
+ export const removeCardPartner = (options) => {
1786
+ return (options.client ?? _heyApiClient).delete({
1787
+ security: [
1788
+ {
1789
+ scheme: 'bearer',
1790
+ type: 'http'
1791
+ }
1792
+ ],
1793
+ url: '/cards/{uuid}/partners/{subUuid}',
1794
+ ...options
1795
+ });
1796
+ };
1797
+ /**
1798
+ * List marketing email templates
1799
+ * List email templates with optional search. Each template reports how many campaigns reference it. Block content is edited through the in-app builder, not the API.
1800
+ */
1801
+ export const listMarketingTemplates = (options) => {
1802
+ return (options?.client ?? _heyApiClient).get({
1803
+ security: [
1804
+ {
1805
+ scheme: 'bearer',
1806
+ type: 'http'
1807
+ }
1808
+ ],
1809
+ url: '/marketing-templates/',
1810
+ ...options
1811
+ });
1812
+ };
1813
+ /**
1814
+ * Create a marketing email template
1815
+ * Create the actual marketing EMAIL — a "campaign email" / email template: the content recipients see (header, body, footer blocks). Distinct from a campaign, which only references a template and defines its audience. Seeded with empty content; name, subject, and channel are optional. To build its blocks, navigate the user to /go/template/<uuid> (the returned uuid) — the block-builder tools become available once that editor opens.
1816
+ */
1817
+ export const createMarketingTemplate = (options) => {
1818
+ return (options.client ?? _heyApiClient).post({
1819
+ security: [
1820
+ {
1821
+ scheme: 'bearer',
1822
+ type: 'http'
1823
+ }
1824
+ ],
1825
+ url: '/marketing-templates/',
1826
+ ...options,
1827
+ headers: {
1828
+ 'Content-Type': 'application/json',
1829
+ ...options?.headers
1830
+ }
1831
+ });
1832
+ };
1833
+ /**
1834
+ * Archive a marketing email template
1835
+ */
1836
+ export const deleteMarketingTemplate = (options) => {
1837
+ return (options.client ?? _heyApiClient).delete({
1838
+ security: [
1839
+ {
1840
+ scheme: 'bearer',
1841
+ type: 'http'
1842
+ }
1843
+ ],
1844
+ url: '/marketing-templates/{uuid}',
1845
+ ...options
1846
+ });
1847
+ };
1848
+ /**
1849
+ * Get a marketing email template
1850
+ */
1851
+ export const getMarketingTemplate = (options) => {
1852
+ return (options.client ?? _heyApiClient).get({
1853
+ security: [
1854
+ {
1855
+ scheme: 'bearer',
1856
+ type: 'http'
1857
+ }
1858
+ ],
1859
+ url: '/marketing-templates/{uuid}',
1860
+ ...options
1861
+ });
1862
+ };
1863
+ /**
1864
+ * Update a marketing email template
1865
+ * Update template metadata: name, subject, channel, partner visibility, and live status. Block content is edited through the in-app builder, not the API.
1866
+ */
1867
+ export const updateMarketingTemplate = (options) => {
1868
+ return (options.client ?? _heyApiClient).patch({
1869
+ security: [
1870
+ {
1871
+ scheme: 'bearer',
1872
+ type: 'http'
1873
+ }
1874
+ ],
1875
+ url: '/marketing-templates/{uuid}',
1876
+ ...options,
1877
+ headers: {
1878
+ 'Content-Type': 'application/json',
1879
+ ...options?.headers
1880
+ }
1881
+ });
1882
+ };
1883
+ /**
1884
+ * List certifications
1885
+ */
1886
+ export const listCertifications = (options) => {
1887
+ return (options?.client ?? _heyApiClient).get({
1888
+ security: [
1889
+ {
1890
+ scheme: 'bearer',
1891
+ type: 'http'
1892
+ }
1893
+ ],
1894
+ url: '/certifications/',
1895
+ ...options
1896
+ });
1897
+ };
1898
+ /**
1899
+ * Create a certification
1900
+ */
1901
+ export const createCertification = (options) => {
1902
+ return (options.client ?? _heyApiClient).post({
1903
+ security: [
1904
+ {
1905
+ scheme: 'bearer',
1906
+ type: 'http'
1907
+ }
1908
+ ],
1909
+ url: '/certifications/',
1910
+ ...options,
1911
+ headers: {
1912
+ 'Content-Type': 'application/json',
1913
+ ...options?.headers
1914
+ }
1915
+ });
1916
+ };
1917
+ /**
1918
+ * Archive a certification
1919
+ */
1920
+ export const deleteCertification = (options) => {
1921
+ return (options.client ?? _heyApiClient).delete({
1922
+ security: [
1923
+ {
1924
+ scheme: 'bearer',
1925
+ type: 'http'
1926
+ }
1927
+ ],
1928
+ url: '/certifications/{uuid}',
1929
+ ...options
1930
+ });
1931
+ };
1932
+ /**
1933
+ * Get a certification
1934
+ */
1935
+ export const getCertification = (options) => {
1936
+ return (options.client ?? _heyApiClient).get({
1937
+ security: [
1938
+ {
1939
+ scheme: 'bearer',
1940
+ type: 'http'
1941
+ }
1942
+ ],
1943
+ url: '/certifications/{uuid}',
1944
+ ...options
1945
+ });
1946
+ };
1947
+ /**
1948
+ * Update a certification
1949
+ */
1950
+ export const updateCertification = (options) => {
1951
+ return (options.client ?? _heyApiClient).patch({
1952
+ security: [
1953
+ {
1954
+ scheme: 'bearer',
1955
+ type: 'http'
1956
+ }
1957
+ ],
1958
+ url: '/certifications/{uuid}',
1959
+ ...options,
1960
+ headers: {
1961
+ 'Content-Type': 'application/json',
1962
+ ...options?.headers
1963
+ }
1964
+ });
1965
+ };
1966
+ /**
1967
+ * List curriculum resources for a certification
1968
+ */
1969
+ export const listCertificationResources = (options) => {
1970
+ return (options.client ?? _heyApiClient).get({
1971
+ security: [
1972
+ {
1973
+ scheme: 'bearer',
1974
+ type: 'http'
1975
+ }
1976
+ ],
1977
+ url: '/certifications/{uuid}/resources',
1978
+ ...options
1979
+ });
1980
+ };
1981
+ /**
1982
+ * Add a curriculum resource to a certification
1983
+ */
1984
+ export const addCertificationResource = (options) => {
1985
+ return (options.client ?? _heyApiClient).post({
1986
+ security: [
1987
+ {
1988
+ scheme: 'bearer',
1989
+ type: 'http'
1990
+ }
1991
+ ],
1992
+ url: '/certifications/{uuid}/resources',
1993
+ ...options,
1994
+ headers: {
1995
+ 'Content-Type': 'application/json',
1996
+ ...options?.headers
1997
+ }
1998
+ });
1999
+ };
2000
+ /**
2001
+ * Remove a curriculum resource from a certification
2002
+ */
2003
+ export const removeCertificationResource = (options) => {
2004
+ return (options.client ?? _heyApiClient).delete({
2005
+ security: [
2006
+ {
2007
+ scheme: 'bearer',
2008
+ type: 'http'
2009
+ }
2010
+ ],
2011
+ url: '/certifications/{uuid}/resources/{subUuid}',
2012
+ ...options
2013
+ });
2014
+ };
2015
+ /**
2016
+ * Update a curriculum resource in a certification
2017
+ */
2018
+ export const updateCertificationResource = (options) => {
2019
+ return (options.client ?? _heyApiClient).patch({
2020
+ security: [
2021
+ {
2022
+ scheme: 'bearer',
2023
+ type: 'http'
2024
+ }
2025
+ ],
2026
+ url: '/certifications/{uuid}/resources/{subUuid}',
2027
+ ...options,
2028
+ headers: {
2029
+ 'Content-Type': 'application/json',
2030
+ ...options?.headers
2031
+ }
2032
+ });
2033
+ };
2034
+ /**
2035
+ * List enrollments for a certification
2036
+ */
2037
+ export const listCertificationEnrollments = (options) => {
2038
+ return (options.client ?? _heyApiClient).get({
2039
+ security: [
2040
+ {
2041
+ scheme: 'bearer',
2042
+ type: 'http'
2043
+ }
2044
+ ],
2045
+ url: '/certifications/{uuid}/enrollments',
2046
+ ...options
2047
+ });
2048
+ };
2049
+ /**
2050
+ * Enroll a user in a certification
2051
+ */
2052
+ export const enrollInCertification = (options) => {
2053
+ return (options.client ?? _heyApiClient).post({
2054
+ security: [
2055
+ {
2056
+ scheme: 'bearer',
2057
+ type: 'http'
2058
+ }
2059
+ ],
2060
+ url: '/certifications/{uuid}/enrollments',
2061
+ ...options,
2062
+ headers: {
2063
+ 'Content-Type': 'application/json',
2064
+ ...options?.headers
2065
+ }
2066
+ });
2067
+ };
2068
+ /**
2069
+ * Add a category to a certification
2070
+ */
2071
+ export const addCertificationCategory = (options) => {
2072
+ return (options.client ?? _heyApiClient).post({
2073
+ security: [
2074
+ {
2075
+ scheme: 'bearer',
2076
+ type: 'http'
2077
+ }
2078
+ ],
2079
+ url: '/certifications/{uuid}/categories',
2080
+ ...options,
2081
+ headers: {
2082
+ 'Content-Type': 'application/json',
2083
+ ...options?.headers
2084
+ }
2085
+ });
2086
+ };
2087
+ /**
2088
+ * Remove a category from a certification
2089
+ */
2090
+ export const removeCertificationCategory = (options) => {
2091
+ return (options.client ?? _heyApiClient).delete({
2092
+ security: [
2093
+ {
2094
+ scheme: 'bearer',
2095
+ type: 'http'
2096
+ }
2097
+ ],
2098
+ url: '/certifications/{uuid}/categories/{subUuid}',
2099
+ ...options
2100
+ });
2101
+ };
2102
+ /**
2103
+ * Add a folder to a certification
2104
+ */
2105
+ export const addCertificationFolder = (options) => {
2106
+ return (options.client ?? _heyApiClient).post({
2107
+ security: [
2108
+ {
2109
+ scheme: 'bearer',
2110
+ type: 'http'
2111
+ }
2112
+ ],
2113
+ url: '/certifications/{uuid}/folders',
2114
+ ...options,
2115
+ headers: {
2116
+ 'Content-Type': 'application/json',
2117
+ ...options?.headers
2118
+ }
2119
+ });
2120
+ };
2121
+ /**
2122
+ * Remove a folder from a certification
2123
+ */
2124
+ export const removeCertificationFolder = (options) => {
2125
+ return (options.client ?? _heyApiClient).delete({
2126
+ security: [
2127
+ {
2128
+ scheme: 'bearer',
2129
+ type: 'http'
2130
+ }
2131
+ ],
2132
+ url: '/certifications/{uuid}/folders/{subUuid}',
2133
+ ...options
2134
+ });
2135
+ };
2136
+ /**
2137
+ * List tags
2138
+ */
2139
+ export const listTags = (options) => {
2140
+ return (options?.client ?? _heyApiClient).get({
2141
+ security: [
2142
+ {
2143
+ scheme: 'bearer',
2144
+ type: 'http'
2145
+ }
2146
+ ],
2147
+ url: '/tags/',
2148
+ ...options
2149
+ });
2150
+ };
2151
+ /**
2152
+ * Create a tag
2153
+ */
2154
+ export const createTag = (options) => {
2155
+ return (options.client ?? _heyApiClient).post({
2156
+ security: [
2157
+ {
2158
+ scheme: 'bearer',
2159
+ type: 'http'
2160
+ }
2161
+ ],
2162
+ url: '/tags/',
2163
+ ...options,
2164
+ headers: {
2165
+ 'Content-Type': 'application/json',
2166
+ ...options?.headers
2167
+ }
2168
+ });
2169
+ };
2170
+ /**
2171
+ * Delete a tag
2172
+ */
2173
+ export const deleteTag = (options) => {
2174
+ return (options.client ?? _heyApiClient).delete({
2175
+ security: [
2176
+ {
2177
+ scheme: 'bearer',
2178
+ type: 'http'
2179
+ }
2180
+ ],
2181
+ url: '/tags/{uuid}',
2182
+ ...options
2183
+ });
2184
+ };
2185
+ /**
2186
+ * Update a tag
2187
+ */
2188
+ export const updateTag = (options) => {
2189
+ return (options.client ?? _heyApiClient).patch({
2190
+ security: [
2191
+ {
2192
+ scheme: 'bearer',
2193
+ type: 'http'
2194
+ }
2195
+ ],
2196
+ url: '/tags/{uuid}',
2197
+ ...options,
2198
+ headers: {
2199
+ 'Content-Type': 'application/json',
2200
+ ...options?.headers
2201
+ }
2202
+ });
2203
+ };
2204
+ /**
2205
+ * List leads
2206
+ */
2207
+ export const listLeads = (options) => {
2208
+ return (options?.client ?? _heyApiClient).get({
2209
+ security: [
2210
+ {
2211
+ scheme: 'bearer',
2212
+ type: 'http'
2213
+ }
2214
+ ],
2215
+ url: '/leads/',
2216
+ ...options
2217
+ });
2218
+ };
2219
+ /**
2220
+ * Create a lead
2221
+ */
2222
+ export const createLead = (options) => {
2223
+ return (options.client ?? _heyApiClient).post({
2224
+ security: [
2225
+ {
2226
+ scheme: 'bearer',
2227
+ type: 'http'
2228
+ }
2229
+ ],
2230
+ url: '/leads/',
2231
+ ...options,
2232
+ headers: {
2233
+ 'Content-Type': 'application/json',
2234
+ ...options?.headers
2235
+ }
2236
+ });
2237
+ };
2238
+ /**
2239
+ * Archive a lead
2240
+ */
2241
+ export const deleteLead = (options) => {
2242
+ return (options.client ?? _heyApiClient).delete({
2243
+ security: [
2244
+ {
2245
+ scheme: 'bearer',
2246
+ type: 'http'
2247
+ }
2248
+ ],
2249
+ url: '/leads/{uuid}',
2250
+ ...options
2251
+ });
2252
+ };
2253
+ /**
2254
+ * Get a lead
2255
+ */
2256
+ export const getLead = (options) => {
2257
+ return (options.client ?? _heyApiClient).get({
2258
+ security: [
2259
+ {
2260
+ scheme: 'bearer',
2261
+ type: 'http'
2262
+ }
2263
+ ],
2264
+ url: '/leads/{uuid}',
2265
+ ...options
2266
+ });
2267
+ };
2268
+ /**
2269
+ * Update a lead
2270
+ */
2271
+ export const updateLead = (options) => {
2272
+ return (options.client ?? _heyApiClient).patch({
2273
+ security: [
2274
+ {
2275
+ scheme: 'bearer',
2276
+ type: 'http'
2277
+ }
2278
+ ],
2279
+ url: '/leads/{uuid}',
2280
+ ...options,
2281
+ headers: {
2282
+ 'Content-Type': 'application/json',
2283
+ ...options?.headers
2284
+ }
2285
+ });
2286
+ };
2287
+ /**
2288
+ * Add a tag to a lead
2289
+ */
2290
+ export const addLeadTag = (options) => {
2291
+ return (options.client ?? _heyApiClient).post({
2292
+ security: [
2293
+ {
2294
+ scheme: 'bearer',
2295
+ type: 'http'
2296
+ }
2297
+ ],
2298
+ url: '/leads/{uuid}/tags',
2299
+ ...options,
2300
+ headers: {
2301
+ 'Content-Type': 'application/json',
2302
+ ...options?.headers
2303
+ }
2304
+ });
2305
+ };
2306
+ /**
2307
+ * Remove a tag from a lead
2308
+ */
2309
+ export const removeLeadTag = (options) => {
2310
+ return (options.client ?? _heyApiClient).delete({
2311
+ security: [
2312
+ {
2313
+ scheme: 'bearer',
2314
+ type: 'http'
2315
+ }
2316
+ ],
2317
+ url: '/leads/{uuid}/tags/{subUuid}',
2318
+ ...options
2319
+ });
2320
+ };
2321
+ /**
2322
+ * Assign a user to a lead
2323
+ */
2324
+ export const assignLeadUser = (options) => {
2325
+ return (options.client ?? _heyApiClient).post({
2326
+ security: [
2327
+ {
2328
+ scheme: 'bearer',
2329
+ type: 'http'
2330
+ }
2331
+ ],
2332
+ url: '/leads/{uuid}/assigned-users',
2333
+ ...options,
2334
+ headers: {
2335
+ 'Content-Type': 'application/json',
2336
+ ...options?.headers
2337
+ }
2338
+ });
2339
+ };
2340
+ /**
2341
+ * Remove an assigned user from a lead
2342
+ */
2343
+ export const removeLeadUser = (options) => {
2344
+ return (options.client ?? _heyApiClient).delete({
2345
+ security: [
2346
+ {
2347
+ scheme: 'bearer',
2348
+ type: 'http'
2349
+ }
2350
+ ],
2351
+ url: '/leads/{uuid}/assigned-users/{subUuid}',
2352
+ ...options
2353
+ });
2354
+ };
2355
+ /**
2356
+ * List contacts on a lead
2357
+ * Returns partner contacts assigned to a lead. Contacts belong to the lead's partnership.
2358
+ */
2359
+ export const listLeadContacts = (options) => {
2360
+ return (options.client ?? _heyApiClient).get({
2361
+ security: [
2362
+ {
2363
+ scheme: 'bearer',
2364
+ type: 'http'
2365
+ }
2366
+ ],
2367
+ url: '/leads/{uuid}/contacts',
2368
+ ...options
2369
+ });
2370
+ };
2371
+ /**
2372
+ * Add a contact to a lead
2373
+ * Assign a partner contact to a lead. The contact must belong to the same partnership as the lead.
2374
+ */
2375
+ export const addLeadContact = (options) => {
2376
+ return (options.client ?? _heyApiClient).post({
2377
+ security: [
2378
+ {
2379
+ scheme: 'bearer',
2380
+ type: 'http'
2381
+ }
2382
+ ],
2383
+ url: '/leads/{uuid}/contacts',
2384
+ ...options,
2385
+ headers: {
2386
+ 'Content-Type': 'application/json',
2387
+ ...options?.headers
2388
+ }
2389
+ });
2390
+ };
2391
+ /**
2392
+ * Remove a contact from a lead
2393
+ */
2394
+ export const removeLeadContact = (options) => {
2395
+ return (options.client ?? _heyApiClient).delete({
2396
+ security: [
2397
+ {
2398
+ scheme: 'bearer',
2399
+ type: 'http'
2400
+ }
2401
+ ],
2402
+ url: '/leads/{uuid}/contacts/{subUuid}',
2403
+ ...options
2404
+ });
2405
+ };
2406
+ /**
2407
+ * Set a custom field value on a lead
2408
+ */
2409
+ export const setLeadCustomField = (options) => {
2410
+ return (options.client ?? _heyApiClient).put({
2411
+ security: [
2412
+ {
2413
+ scheme: 'bearer',
2414
+ type: 'http'
2415
+ }
2416
+ ],
2417
+ url: '/leads/{uuid}/custom-fields',
2418
+ ...options,
2419
+ headers: {
2420
+ 'Content-Type': 'application/json',
2421
+ ...options?.headers
2422
+ }
2423
+ });
2424
+ };
2425
+ /**
2426
+ * Remove a custom field value from a lead
2427
+ */
2428
+ export const removeLeadCustomField = (options) => {
2429
+ return (options.client ?? _heyApiClient).delete({
2430
+ security: [
2431
+ {
2432
+ scheme: 'bearer',
2433
+ type: 'http'
2434
+ }
2435
+ ],
2436
+ url: '/leads/{uuid}/custom-fields/{subUuid}',
2437
+ ...options
2438
+ });
2439
+ };
2440
+ /**
2441
+ * Update a custom field value on a lead
2442
+ */
2443
+ export const updateLeadCustomField = (options) => {
2444
+ return (options.client ?? _heyApiClient).patch({
2445
+ security: [
2446
+ {
2447
+ scheme: 'bearer',
2448
+ type: 'http'
2449
+ }
2450
+ ],
2451
+ url: '/leads/{uuid}/custom-fields/{subUuid}',
2452
+ ...options,
2453
+ headers: {
2454
+ 'Content-Type': 'application/json',
2455
+ ...options?.headers
2456
+ }
2457
+ });
2458
+ };
2459
+ /**
2460
+ * List notes for a lead
2461
+ */
2462
+ export const listLeadNotes = (options) => {
2463
+ return (options.client ?? _heyApiClient).get({
2464
+ security: [
2465
+ {
2466
+ scheme: 'bearer',
2467
+ type: 'http'
2468
+ }
2469
+ ],
2470
+ url: '/leads/{uuid}/notes',
2471
+ ...options
2472
+ });
2473
+ };
2474
+ /**
2475
+ * Create a note on a lead
2476
+ */
2477
+ export const createLeadNote = (options) => {
2478
+ return (options.client ?? _heyApiClient).post({
2479
+ security: [
2480
+ {
2481
+ scheme: 'bearer',
2482
+ type: 'http'
2483
+ }
2484
+ ],
2485
+ url: '/leads/{uuid}/notes',
2486
+ ...options,
2487
+ headers: {
2488
+ 'Content-Type': 'application/json',
2489
+ ...options?.headers
2490
+ }
2491
+ });
2492
+ };
2493
+ /**
2494
+ * Delete a note from a lead
2495
+ */
2496
+ export const deleteLeadNote = (options) => {
2497
+ return (options.client ?? _heyApiClient).delete({
2498
+ security: [
2499
+ {
2500
+ scheme: 'bearer',
2501
+ type: 'http'
2502
+ }
2503
+ ],
2504
+ url: '/leads/{uuid}/notes/{subUuid}',
2505
+ ...options
2506
+ });
2507
+ };
2508
+ /**
2509
+ * List attributions for a lead
2510
+ */
2511
+ export const listLeadAttributions = (options) => {
2512
+ return (options.client ?? _heyApiClient).get({
2513
+ security: [
2514
+ {
2515
+ scheme: 'bearer',
2516
+ type: 'http'
2517
+ }
2518
+ ],
2519
+ url: '/leads/{uuid}/attributions',
2520
+ ...options
2521
+ });
2522
+ };
2523
+ /**
2524
+ * Add an attribution to a lead
2525
+ */
2526
+ export const addLeadAttribution = (options) => {
2527
+ return (options.client ?? _heyApiClient).post({
2528
+ security: [
2529
+ {
2530
+ scheme: 'bearer',
2531
+ type: 'http'
2532
+ }
2533
+ ],
2534
+ url: '/leads/{uuid}/attributions',
2535
+ ...options,
2536
+ headers: {
2537
+ 'Content-Type': 'application/json',
2538
+ ...options?.headers
2539
+ }
2540
+ });
2541
+ };
2542
+ /**
2543
+ * Remove an attribution from a lead
2544
+ */
2545
+ export const removeLeadAttribution = (options) => {
2546
+ return (options.client ?? _heyApiClient).delete({
2547
+ security: [
2548
+ {
2549
+ scheme: 'bearer',
2550
+ type: 'http'
2551
+ }
2552
+ ],
2553
+ url: '/leads/{uuid}/attributions/{subUuid}',
2554
+ ...options
2555
+ });
2556
+ };
2557
+ /**
2558
+ * Remove the assigned distributor from a lead
2559
+ */
2560
+ export const removeLeadDistributor = (options) => {
2561
+ return (options.client ?? _heyApiClient).delete({
2562
+ security: [
2563
+ {
2564
+ scheme: 'bearer',
2565
+ type: 'http'
2566
+ }
2567
+ ],
2568
+ url: '/leads/{uuid}/distributor',
2569
+ ...options
2570
+ });
2571
+ };
2572
+ /**
2573
+ * Get the assigned distributor for a lead
2574
+ */
2575
+ export const getLeadDistributor = (options) => {
2576
+ return (options.client ?? _heyApiClient).get({
2577
+ security: [
2578
+ {
2579
+ scheme: 'bearer',
2580
+ type: 'http'
2581
+ }
2582
+ ],
2583
+ url: '/leads/{uuid}/distributor',
2584
+ ...options
2585
+ });
2586
+ };
2587
+ /**
2588
+ * Assign a distributor to a lead
2589
+ */
2590
+ export const setLeadDistributor = (options) => {
2591
+ return (options.client ?? _heyApiClient).put({
2592
+ security: [
2593
+ {
2594
+ scheme: 'bearer',
2595
+ type: 'http'
2596
+ }
2597
+ ],
2598
+ url: '/leads/{uuid}/distributor',
2599
+ ...options,
2600
+ headers: {
2601
+ 'Content-Type': 'application/json',
2602
+ ...options?.headers
2603
+ }
2604
+ });
2605
+ };
2606
+ /**
2607
+ * List products on a lead
2608
+ * Returns all products attached to a lead, including both manually added products and products sourced from a quote. The `source` field indicates the origin.
2609
+ */
2610
+ export const listLeadProducts = (options) => {
2611
+ return (options.client ?? _heyApiClient).get({
2612
+ security: [
2613
+ {
2614
+ scheme: 'bearer',
2615
+ type: 'http'
2616
+ }
2617
+ ],
2618
+ url: '/leads/{uuid}/products',
2619
+ ...options
2620
+ });
2621
+ };
2622
+ /**
2623
+ * Add a product to a lead
2624
+ * Add a product from the catalog to a lead. Returns 409 if the lead has a quote attached (products become read-only when managed by a quote).
2625
+ */
2626
+ export const addLeadProduct = (options) => {
2627
+ return (options.client ?? _heyApiClient).post({
2628
+ security: [
2629
+ {
2630
+ scheme: 'bearer',
2631
+ type: 'http'
2632
+ }
2633
+ ],
2634
+ url: '/leads/{uuid}/products',
2635
+ ...options,
2636
+ headers: {
2637
+ 'Content-Type': 'application/json',
2638
+ ...options?.headers
2639
+ }
2640
+ });
2641
+ };
2642
+ /**
2643
+ * Remove a product from a lead
2644
+ * Remove a manually added product from a lead. Returns 409 if the lead has a quote attached. Only manual products can be removed (not quote-sourced).
2645
+ */
2646
+ export const removeLeadProduct = (options) => {
2647
+ return (options.client ?? _heyApiClient).delete({
2648
+ security: [
2649
+ {
2650
+ scheme: 'bearer',
2651
+ type: 'http'
2652
+ }
2653
+ ],
2654
+ url: '/leads/{uuid}/products/{subUuid}',
2655
+ ...options
2656
+ });
2657
+ };
2658
+ /**
2659
+ * Update a product on a lead
2660
+ * Update quantity or price override for a manually added product. Returns 409 if the lead has a quote attached. Only manual products can be updated (not quote-sourced).
2661
+ */
2662
+ export const updateLeadProduct = (options) => {
2663
+ return (options.client ?? _heyApiClient).patch({
2664
+ security: [
2665
+ {
2666
+ scheme: 'bearer',
2667
+ type: 'http'
2668
+ }
2669
+ ],
2670
+ url: '/leads/{uuid}/products/{subUuid}',
2671
+ ...options,
2672
+ headers: {
2673
+ 'Content-Type': 'application/json',
2674
+ ...options?.headers
2675
+ }
2676
+ });
2677
+ };
2678
+ /**
2679
+ * Delete the quote from a lead
2680
+ * Removes the quote and all its line items from a lead. Also removes any quote-sourced products from the lead, restoring manual product management.
2681
+ */
2682
+ export const deleteLeadQuote = (options) => {
2683
+ return (options.client ?? _heyApiClient).delete({
2684
+ security: [
2685
+ {
2686
+ scheme: 'bearer',
2687
+ type: 'http'
2688
+ }
2689
+ ],
2690
+ url: '/leads/{uuid}/quote',
2691
+ ...options
2692
+ });
2693
+ };
2694
+ /**
2695
+ * Get the quote for a lead
2696
+ * Returns the quote attached to a lead with all line items, currency, and pricing calculator reference. Returns null if no quote exists.
2697
+ */
2698
+ export const getLeadQuote = (options) => {
2699
+ return (options.client ?? _heyApiClient).get({
2700
+ security: [
2701
+ {
2702
+ scheme: 'bearer',
2703
+ type: 'http'
2704
+ }
2705
+ ],
2706
+ url: '/leads/{uuid}/quote',
2707
+ ...options
2708
+ });
2709
+ };
2710
+ /**
2711
+ * List tasks for a lead
2712
+ */
2713
+ export const listLeadTasks = (options) => {
2714
+ return (options.client ?? _heyApiClient).get({
2715
+ security: [
2716
+ {
2717
+ scheme: 'bearer',
2718
+ type: 'http'
2719
+ }
2720
+ ],
2721
+ url: '/leads/{uuid}/tasks',
2722
+ ...options
2723
+ });
2724
+ };
2725
+ /**
2726
+ * Create a task on a lead
2727
+ * Creates a task attached to this lead. Equivalent to POST /v1/tasks with lead_uuid set.
2728
+ */
2729
+ export const createLeadTask = (options) => {
2730
+ return (options.client ?? _heyApiClient).post({
2731
+ security: [
2732
+ {
2733
+ scheme: 'bearer',
2734
+ type: 'http'
2735
+ }
2736
+ ],
2737
+ url: '/leads/{uuid}/tasks',
2738
+ ...options,
2739
+ headers: {
2740
+ 'Content-Type': 'application/json',
2741
+ ...options?.headers
2742
+ }
2743
+ });
2744
+ };
2745
+ /**
2746
+ * List deals
2747
+ * List deals with optional filtering by stage phase, stage UUID, lead, partnership, or search. Each deal includes its linked lead, partner, stage, currency, tags, and custom field values. Note: deal stages and custom fields are scoped by partner type (referral/reseller/distributor).
2748
+ */
2749
+ export const listDeals = (options) => {
2750
+ return (options?.client ?? _heyApiClient).get({
2751
+ security: [
2752
+ {
2753
+ scheme: 'bearer',
2754
+ type: 'http'
2755
+ }
2756
+ ],
2757
+ url: '/deals/',
2758
+ ...options
2759
+ });
2760
+ };
2761
+ /**
2762
+ * Create a deal
2763
+ * Create a deal on a lead. A lead is required. Multiple deals can exist on the same lead. If no stage is provided, the first deal stage for the lead's partner type is used. If no currency is provided, the company's default currency is used. Deal stages and custom fields are scoped by partner type.
2764
+ */
2765
+ export const createDeal = (options) => {
2766
+ return (options.client ?? _heyApiClient).post({
2767
+ security: [
2768
+ {
2769
+ scheme: 'bearer',
2770
+ type: 'http'
2771
+ }
2772
+ ],
2773
+ url: '/deals/',
2774
+ ...options,
2775
+ headers: {
2776
+ 'Content-Type': 'application/json',
2777
+ ...options?.headers
2778
+ }
2779
+ });
2780
+ };
2781
+ /**
2782
+ * Archive a deal
2783
+ */
2784
+ export const deleteDeal = (options) => {
2785
+ return (options.client ?? _heyApiClient).delete({
2786
+ security: [
2787
+ {
2788
+ scheme: 'bearer',
2789
+ type: 'http'
2790
+ }
2791
+ ],
2792
+ url: '/deals/{uuid}',
2793
+ ...options
2794
+ });
2795
+ };
2796
+ /**
2797
+ * Get a deal
2798
+ */
2799
+ export const getDeal = (options) => {
2800
+ return (options.client ?? _heyApiClient).get({
2801
+ security: [
2802
+ {
2803
+ scheme: 'bearer',
2804
+ type: 'http'
2805
+ }
2806
+ ],
2807
+ url: '/deals/{uuid}',
2808
+ ...options
2809
+ });
2810
+ };
2811
+ /**
2812
+ * Update a deal
2813
+ * Update deal fields. **Note:** Changing `deal_value` does not automatically recalculate commission payments. Commission recalculation will be added in a future release. For now, update the deal commission separately via PUT /v1/deals/{uuid}/commission if needed.
2814
+ */
2815
+ export const updateDeal = (options) => {
2816
+ return (options.client ?? _heyApiClient).patch({
2817
+ security: [
2818
+ {
2819
+ scheme: 'bearer',
2820
+ type: 'http'
2821
+ }
2822
+ ],
2823
+ url: '/deals/{uuid}',
2824
+ ...options,
2825
+ headers: {
2826
+ 'Content-Type': 'application/json',
2827
+ ...options?.headers
2828
+ }
2829
+ });
2830
+ };
2831
+ /**
2832
+ * Add a tag to a deal
2833
+ */
2834
+ export const addDealTag = (options) => {
2835
+ return (options.client ?? _heyApiClient).post({
2836
+ security: [
2837
+ {
2838
+ scheme: 'bearer',
2839
+ type: 'http'
2840
+ }
2841
+ ],
2842
+ url: '/deals/{uuid}/tags',
2843
+ ...options,
2844
+ headers: {
2845
+ 'Content-Type': 'application/json',
2846
+ ...options?.headers
2847
+ }
2848
+ });
2849
+ };
2850
+ /**
2851
+ * Remove a tag from a deal
2852
+ */
2853
+ export const removeDealTag = (options) => {
2854
+ return (options.client ?? _heyApiClient).delete({
2855
+ security: [
2856
+ {
2857
+ scheme: 'bearer',
2858
+ type: 'http'
2859
+ }
2860
+ ],
2861
+ url: '/deals/{uuid}/tags/{subUuid}',
2862
+ ...options
2863
+ });
2864
+ };
2865
+ /**
2866
+ * List notes for a deal
2867
+ */
2868
+ export const listDealNotes = (options) => {
2869
+ return (options.client ?? _heyApiClient).get({
2870
+ security: [
2871
+ {
2872
+ scheme: 'bearer',
2873
+ type: 'http'
2874
+ }
2875
+ ],
2876
+ url: '/deals/{uuid}/notes',
2877
+ ...options
2878
+ });
2879
+ };
2880
+ /**
2881
+ * Create a note on a deal
2882
+ */
2883
+ export const createDealNote = (options) => {
2884
+ return (options.client ?? _heyApiClient).post({
2885
+ security: [
2886
+ {
2887
+ scheme: 'bearer',
2888
+ type: 'http'
2889
+ }
2890
+ ],
2891
+ url: '/deals/{uuid}/notes',
2892
+ ...options,
2893
+ headers: {
2894
+ 'Content-Type': 'application/json',
2895
+ ...options?.headers
2896
+ }
2897
+ });
2898
+ };
2899
+ /**
2900
+ * Delete a note from a deal
2901
+ */
2902
+ export const deleteDealNote = (options) => {
2903
+ return (options.client ?? _heyApiClient).delete({
2904
+ security: [
2905
+ {
2906
+ scheme: 'bearer',
2907
+ type: 'http'
2908
+ }
2909
+ ],
2910
+ url: '/deals/{uuid}/notes/{subUuid}',
2911
+ ...options
2912
+ });
2913
+ };
2914
+ /**
2915
+ * List products on a deal
2916
+ */
2917
+ export const listDealProducts = (options) => {
2918
+ return (options.client ?? _heyApiClient).get({
2919
+ security: [
2920
+ {
2921
+ scheme: 'bearer',
2922
+ type: 'http'
2923
+ }
2924
+ ],
2925
+ url: '/deals/{uuid}/products',
2926
+ ...options
2927
+ });
2928
+ };
2929
+ /**
2930
+ * Add a product to a deal
2931
+ */
2932
+ export const addDealProduct = (options) => {
2933
+ return (options.client ?? _heyApiClient).post({
2934
+ security: [
2935
+ {
2936
+ scheme: 'bearer',
2937
+ type: 'http'
2938
+ }
2939
+ ],
2940
+ url: '/deals/{uuid}/products',
2941
+ ...options,
2942
+ headers: {
2943
+ 'Content-Type': 'application/json',
2944
+ ...options?.headers
2945
+ }
2946
+ });
2947
+ };
2948
+ /**
2949
+ * Remove a product from a deal
2950
+ * Only manually added products can be removed.
2951
+ */
2952
+ export const removeDealProduct = (options) => {
2953
+ return (options.client ?? _heyApiClient).delete({
2954
+ security: [
2955
+ {
2956
+ scheme: 'bearer',
2957
+ type: 'http'
2958
+ }
2959
+ ],
2960
+ url: '/deals/{uuid}/products/{subUuid}',
2961
+ ...options
2962
+ });
2963
+ };
2964
+ /**
2965
+ * Update a product on a deal
2966
+ * Update quantity or price override. Only manually added products can be updated (not quote-sourced or lead-sourced).
2967
+ */
2968
+ export const updateDealProduct = (options) => {
2969
+ return (options.client ?? _heyApiClient).patch({
2970
+ security: [
2971
+ {
2972
+ scheme: 'bearer',
2973
+ type: 'http'
2974
+ }
2975
+ ],
2976
+ url: '/deals/{uuid}/products/{subUuid}',
2977
+ ...options,
2978
+ headers: {
2979
+ 'Content-Type': 'application/json',
2980
+ ...options?.headers
2981
+ }
2982
+ });
2983
+ };
2984
+ /**
2985
+ * List payments for a deal
2986
+ * Returns all payment records for a deal including commission and spiff payments, their approval status, and processing state. Payments are read-only via the API.
2987
+ */
2988
+ export const listDealPayments = (options) => {
2989
+ return (options.client ?? _heyApiClient).get({
2990
+ security: [
2991
+ {
2992
+ scheme: 'bearer',
2993
+ type: 'http'
2994
+ }
2995
+ ],
2996
+ url: '/deals/{uuid}/payments',
2997
+ ...options
2998
+ });
2999
+ };
3000
+ /**
3001
+ * Set a custom field value on a deal
3002
+ * Set or update a custom field value. Custom fields are scoped by partner type — only fields matching the deal's lead partnership type will be relevant.
3003
+ */
3004
+ export const setDealCustomField = (options) => {
3005
+ return (options.client ?? _heyApiClient).put({
3006
+ security: [
3007
+ {
3008
+ scheme: 'bearer',
3009
+ type: 'http'
3010
+ }
3011
+ ],
3012
+ url: '/deals/{uuid}/custom-fields',
3013
+ ...options,
3014
+ headers: {
3015
+ 'Content-Type': 'application/json',
3016
+ ...options?.headers
3017
+ }
3018
+ });
3019
+ };
3020
+ /**
3021
+ * Remove a custom field value from a deal
3022
+ */
3023
+ export const removeDealCustomField = (options) => {
3024
+ return (options.client ?? _heyApiClient).delete({
3025
+ security: [
3026
+ {
3027
+ scheme: 'bearer',
3028
+ type: 'http'
3029
+ }
3030
+ ],
3031
+ url: '/deals/{uuid}/custom-fields/{subUuid}',
3032
+ ...options
3033
+ });
3034
+ };
3035
+ /**
3036
+ * Clear the commission calculation from a deal
3037
+ * Resets the deal's commission calculation to empty. Existing payments are not affected.
3038
+ */
3039
+ export const clearDealCommission = (options) => {
3040
+ return (options.client ?? _heyApiClient).delete({
3041
+ security: [
3042
+ {
3043
+ scheme: 'bearer',
3044
+ type: 'http'
3045
+ }
3046
+ ],
3047
+ url: '/deals/{uuid}/commission',
3048
+ ...options
3049
+ });
3050
+ };
3051
+ /**
3052
+ * Get the commission calculation for a deal
3053
+ * Returns the commission calculation applied to this deal. The `calculation` contains `entries` — each with a `payment_stage_id` (when payment triggers) and a `calculation` object defining the type (oneOff/recurring/split), option (fixed/percentage/scaling), and value. Returns `null` calculation if no commission is set.
3054
+ */
3055
+ export const getDealCommission = (options) => {
3056
+ return (options.client ?? _heyApiClient).get({
3057
+ security: [
3058
+ {
3059
+ scheme: 'bearer',
3060
+ type: 'http'
3061
+ }
3062
+ ],
3063
+ url: '/deals/{uuid}/commission',
3064
+ ...options
3065
+ });
3066
+ };
3067
+ /**
3068
+ * Set the commission calculation for a deal
3069
+ * Override the commission calculation on a deal. This replaces the entire `calculation` structure. Use this to manually adjust commissions after they've been auto-applied from a commission rule. The structure matches the commission rule format — see POST /v1/commissions for the full calculation schema documentation.
3070
+ *
3071
+ * **Note:** Setting the commission calculation does not automatically create or update payment records. Payment recalculation from commission entries will be added in a future release.
3072
+ */
3073
+ export const setDealCommission = (options) => {
3074
+ return (options.client ?? _heyApiClient).put({
3075
+ security: [
3076
+ {
3077
+ scheme: 'bearer',
3078
+ type: 'http'
3079
+ }
3080
+ ],
3081
+ url: '/deals/{uuid}/commission',
3082
+ ...options,
3083
+ headers: {
3084
+ 'Content-Type': 'application/json',
3085
+ ...options?.headers
3086
+ }
3087
+ });
3088
+ };
3089
+ /**
3090
+ * List tasks for a deal
3091
+ */
3092
+ export const listDealTasks = (options) => {
3093
+ return (options.client ?? _heyApiClient).get({
3094
+ security: [
3095
+ {
3096
+ scheme: 'bearer',
3097
+ type: 'http'
3098
+ }
3099
+ ],
3100
+ url: '/deals/{uuid}/tasks',
3101
+ ...options
3102
+ });
3103
+ };
3104
+ /**
3105
+ * Create a task on a deal
3106
+ * Creates a task attached to this deal. Equivalent to POST /v1/tasks with deal_uuid set.
3107
+ */
3108
+ export const createDealTask = (options) => {
3109
+ return (options.client ?? _heyApiClient).post({
3110
+ security: [
3111
+ {
3112
+ scheme: 'bearer',
3113
+ type: 'http'
3114
+ }
3115
+ ],
3116
+ url: '/deals/{uuid}/tasks',
3117
+ ...options,
3118
+ headers: {
3119
+ 'Content-Type': 'application/json',
3120
+ ...options?.headers
3121
+ }
3122
+ });
3123
+ };
3124
+ /**
3125
+ * Get pipeline summary
3126
+ * Get a summary of the deal pipeline with deal counts and total values per stage. Values are converted to the company's base currency using locked rates (for won/lost deals) or live exchange rates.
3127
+ */
3128
+ export const getPipelineSummary = (options) => {
3129
+ return (options?.client ?? _heyApiClient).get({
3130
+ security: [
3131
+ {
3132
+ scheme: 'bearer',
3133
+ type: 'http'
3134
+ }
3135
+ ],
3136
+ url: '/deals/pipeline-summary',
3137
+ ...options
3138
+ });
3139
+ };
3140
+ /**
3141
+ * List folders
3142
+ */
3143
+ export const listFolders = (options) => {
3144
+ return (options?.client ?? _heyApiClient).get({
3145
+ security: [
3146
+ {
3147
+ scheme: 'bearer',
3148
+ type: 'http'
3149
+ }
3150
+ ],
3151
+ url: '/folders/',
3152
+ ...options
3153
+ });
3154
+ };
3155
+ /**
3156
+ * Create a folder
3157
+ */
3158
+ export const createFolder = (options) => {
3159
+ return (options.client ?? _heyApiClient).post({
3160
+ security: [
3161
+ {
3162
+ scheme: 'bearer',
3163
+ type: 'http'
3164
+ }
3165
+ ],
3166
+ url: '/folders/',
3167
+ ...options,
3168
+ headers: {
3169
+ 'Content-Type': 'application/json',
3170
+ ...options?.headers
3171
+ }
3172
+ });
3173
+ };
3174
+ /**
3175
+ * Delete a folder
3176
+ */
3177
+ export const deleteFolder = (options) => {
3178
+ return (options.client ?? _heyApiClient).delete({
3179
+ security: [
3180
+ {
3181
+ scheme: 'bearer',
3182
+ type: 'http'
3183
+ }
3184
+ ],
3185
+ url: '/folders/{uuid}',
3186
+ ...options
3187
+ });
3188
+ };
3189
+ /**
3190
+ * Get a folder
3191
+ */
3192
+ export const getFolder = (options) => {
3193
+ return (options.client ?? _heyApiClient).get({
3194
+ security: [
3195
+ {
3196
+ scheme: 'bearer',
3197
+ type: 'http'
3198
+ }
3199
+ ],
3200
+ url: '/folders/{uuid}',
3201
+ ...options
3202
+ });
3203
+ };
3204
+ /**
3205
+ * Update a folder
3206
+ */
3207
+ export const updateFolder = (options) => {
3208
+ return (options.client ?? _heyApiClient).patch({
3209
+ security: [
3210
+ {
3211
+ scheme: 'bearer',
3212
+ type: 'http'
3213
+ }
3214
+ ],
3215
+ url: '/folders/{uuid}',
3216
+ ...options,
3217
+ headers: {
3218
+ 'Content-Type': 'application/json',
3219
+ ...options?.headers
3220
+ }
3221
+ });
3222
+ };
3223
+ /**
3224
+ * List tasks
3225
+ * List tasks with optional filtering by status, lead, partnership, or search term. Tasks include assigned users and rich text content.
3226
+ */
3227
+ export const listTasks = (options) => {
3228
+ return (options?.client ?? _heyApiClient).get({
3229
+ security: [
3230
+ {
3231
+ scheme: 'bearer',
3232
+ type: 'http'
3233
+ }
3234
+ ],
3235
+ url: '/tasks/',
3236
+ ...options
3237
+ });
3238
+ };
3239
+ /**
3240
+ * Create a task
3241
+ * Create a task optionally attached to a lead or partnership. Content is plain text that gets converted to rich text internally. Assign users by providing their UUIDs.
3242
+ */
3243
+ export const createTask = (options) => {
3244
+ return (options.client ?? _heyApiClient).post({
3245
+ security: [
3246
+ {
3247
+ scheme: 'bearer',
3248
+ type: 'http'
3249
+ }
3250
+ ],
3251
+ url: '/tasks/',
3252
+ ...options,
3253
+ headers: {
3254
+ 'Content-Type': 'application/json',
3255
+ ...options?.headers
3256
+ }
3257
+ });
3258
+ };
3259
+ /**
3260
+ * Archive a task
3261
+ */
3262
+ export const deleteTask = (options) => {
3263
+ return (options.client ?? _heyApiClient).delete({
3264
+ security: [
3265
+ {
3266
+ scheme: 'bearer',
3267
+ type: 'http'
3268
+ }
3269
+ ],
3270
+ url: '/tasks/{uuid}',
3271
+ ...options
3272
+ });
3273
+ };
3274
+ /**
3275
+ * Get a task
3276
+ */
3277
+ export const getTask = (options) => {
3278
+ return (options.client ?? _heyApiClient).get({
3279
+ security: [
3280
+ {
3281
+ scheme: 'bearer',
3282
+ type: 'http'
3283
+ }
3284
+ ],
3285
+ url: '/tasks/{uuid}',
3286
+ ...options
3287
+ });
3288
+ };
3289
+ /**
3290
+ * Update a task
3291
+ * Update task fields. Content is plain text that gets converted to rich text internally. Use the assigned-users sub-resource to manage assignees.
3292
+ */
3293
+ export const updateTask = (options) => {
3294
+ return (options.client ?? _heyApiClient).patch({
3295
+ security: [
3296
+ {
3297
+ scheme: 'bearer',
3298
+ type: 'http'
3299
+ }
3300
+ ],
3301
+ url: '/tasks/{uuid}',
3302
+ ...options,
3303
+ headers: {
3304
+ 'Content-Type': 'application/json',
3305
+ ...options?.headers
3306
+ }
3307
+ });
3308
+ };
3309
+ /**
3310
+ * Assign a user to a task
3311
+ */
3312
+ export const assignTaskUser = (options) => {
3313
+ return (options.client ?? _heyApiClient).post({
3314
+ security: [
3315
+ {
3316
+ scheme: 'bearer',
3317
+ type: 'http'
3318
+ }
3319
+ ],
3320
+ url: '/tasks/{uuid}/assigned-users',
3321
+ ...options,
3322
+ headers: {
3323
+ 'Content-Type': 'application/json',
3324
+ ...options?.headers
3325
+ }
3326
+ });
3327
+ };
3328
+ /**
3329
+ * Remove an assigned user from a task
3330
+ */
3331
+ export const removeTaskUser = (options) => {
3332
+ return (options.client ?? _heyApiClient).delete({
3333
+ security: [
3334
+ {
3335
+ scheme: 'bearer',
3336
+ type: 'http'
3337
+ }
3338
+ ],
3339
+ url: '/tasks/{uuid}/assigned-users/{subUuid}',
3340
+ ...options
3341
+ });
3342
+ };
3343
+ /**
3344
+ * List pricing calculators
3345
+ */
3346
+ export const listPricingCalculators = (options) => {
3347
+ return (options?.client ?? _heyApiClient).get({
3348
+ security: [
3349
+ {
3350
+ scheme: 'bearer',
3351
+ type: 'http'
3352
+ }
3353
+ ],
3354
+ url: '/pricing-calculators/',
3355
+ ...options
3356
+ });
3357
+ };
3358
+ /**
3359
+ * Create a pricing calculator
3360
+ */
3361
+ export const createPricingCalculator = (options) => {
3362
+ return (options.client ?? _heyApiClient).post({
3363
+ security: [
3364
+ {
3365
+ scheme: 'bearer',
3366
+ type: 'http'
3367
+ }
3368
+ ],
3369
+ url: '/pricing-calculators/',
3370
+ ...options,
3371
+ headers: {
3372
+ 'Content-Type': 'application/json',
3373
+ ...options?.headers
3374
+ }
3375
+ });
3376
+ };
3377
+ /**
3378
+ * Archive a pricing calculator
3379
+ */
3380
+ export const deletePricingCalculator = (options) => {
3381
+ return (options.client ?? _heyApiClient).delete({
3382
+ security: [
3383
+ {
3384
+ scheme: 'bearer',
3385
+ type: 'http'
3386
+ }
3387
+ ],
3388
+ url: '/pricing-calculators/{uuid}',
3389
+ ...options
3390
+ });
3391
+ };
3392
+ /**
3393
+ * Get a pricing calculator with fields, products, and formulas
3394
+ */
3395
+ export const getPricingCalculator = (options) => {
3396
+ return (options.client ?? _heyApiClient).get({
3397
+ security: [
3398
+ {
3399
+ scheme: 'bearer',
3400
+ type: 'http'
3401
+ }
3402
+ ],
3403
+ url: '/pricing-calculators/{uuid}',
3404
+ ...options
3405
+ });
3406
+ };
3407
+ /**
3408
+ * Update a pricing calculator
3409
+ */
3410
+ export const updatePricingCalculator = (options) => {
3411
+ return (options.client ?? _heyApiClient).patch({
3412
+ security: [
3413
+ {
3414
+ scheme: 'bearer',
3415
+ type: 'http'
3416
+ }
3417
+ ],
3418
+ url: '/pricing-calculators/{uuid}',
3419
+ ...options,
3420
+ headers: {
3421
+ 'Content-Type': 'application/json',
3422
+ ...options?.headers
3423
+ }
3424
+ });
3425
+ };
3426
+ /**
3427
+ * Add a field to a pricing calculator
3428
+ */
3429
+ export const addPricingCalculatorField = (options) => {
3430
+ return (options.client ?? _heyApiClient).post({
3431
+ security: [
3432
+ {
3433
+ scheme: 'bearer',
3434
+ type: 'http'
3435
+ }
3436
+ ],
3437
+ url: '/pricing-calculators/{uuid}/fields',
3438
+ ...options,
3439
+ headers: {
3440
+ 'Content-Type': 'application/json',
3441
+ ...options?.headers
3442
+ }
3443
+ });
3444
+ };
3445
+ /**
3446
+ * Remove a field from a pricing calculator
3447
+ */
3448
+ export const removePricingCalculatorField = (options) => {
3449
+ return (options.client ?? _heyApiClient).delete({
3450
+ security: [
3451
+ {
3452
+ scheme: 'bearer',
3453
+ type: 'http'
3454
+ }
3455
+ ],
3456
+ url: '/pricing-calculators/{uuid}/fields/{subUuid}',
3457
+ ...options
3458
+ });
3459
+ };
3460
+ /**
3461
+ * Update a field on a pricing calculator
3462
+ */
3463
+ export const updatePricingCalculatorField = (options) => {
3464
+ return (options.client ?? _heyApiClient).patch({
3465
+ security: [
3466
+ {
3467
+ scheme: 'bearer',
3468
+ type: 'http'
3469
+ }
3470
+ ],
3471
+ url: '/pricing-calculators/{uuid}/fields/{subUuid}',
3472
+ ...options,
3473
+ headers: {
3474
+ 'Content-Type': 'application/json',
3475
+ ...options?.headers
3476
+ }
3477
+ });
3478
+ };
3479
+ /**
3480
+ * Add a product to a pricing calculator
3481
+ */
3482
+ export const addPricingCalculatorProduct = (options) => {
3483
+ return (options.client ?? _heyApiClient).post({
3484
+ security: [
3485
+ {
3486
+ scheme: 'bearer',
3487
+ type: 'http'
3488
+ }
3489
+ ],
3490
+ url: '/pricing-calculators/{uuid}/products',
3491
+ ...options,
3492
+ headers: {
3493
+ 'Content-Type': 'application/json',
3494
+ ...options?.headers
3495
+ }
3496
+ });
3497
+ };
3498
+ /**
3499
+ * Remove a product from a pricing calculator
3500
+ */
3501
+ export const removePricingCalculatorProduct = (options) => {
3502
+ return (options.client ?? _heyApiClient).delete({
3503
+ security: [
3504
+ {
3505
+ scheme: 'bearer',
3506
+ type: 'http'
3507
+ }
3508
+ ],
3509
+ url: '/pricing-calculators/{uuid}/products/{subUuid}',
3510
+ ...options
3511
+ });
3512
+ };
3513
+ /**
3514
+ * Update a product on a pricing calculator
3515
+ */
3516
+ export const updatePricingCalculatorProduct = (options) => {
3517
+ return (options.client ?? _heyApiClient).patch({
3518
+ security: [
3519
+ {
3520
+ scheme: 'bearer',
3521
+ type: 'http'
3522
+ }
3523
+ ],
3524
+ url: '/pricing-calculators/{uuid}/products/{subUuid}',
3525
+ ...options,
3526
+ headers: {
3527
+ 'Content-Type': 'application/json',
3528
+ ...options?.headers
3529
+ }
3530
+ });
3531
+ };
3532
+ /**
3533
+ * Add a formula to a pricing calculator
3534
+ */
3535
+ export const addPricingCalculatorFormula = (options) => {
3536
+ return (options.client ?? _heyApiClient).post({
3537
+ security: [
3538
+ {
3539
+ scheme: 'bearer',
3540
+ type: 'http'
3541
+ }
3542
+ ],
3543
+ url: '/pricing-calculators/{uuid}/formulas',
3544
+ ...options,
3545
+ headers: {
3546
+ 'Content-Type': 'application/json',
3547
+ ...options?.headers
3548
+ }
3549
+ });
3550
+ };
3551
+ /**
3552
+ * Remove a formula from a pricing calculator
3553
+ */
3554
+ export const removePricingCalculatorFormula = (options) => {
3555
+ return (options.client ?? _heyApiClient).delete({
3556
+ security: [
3557
+ {
3558
+ scheme: 'bearer',
3559
+ type: 'http'
3560
+ }
3561
+ ],
3562
+ url: '/pricing-calculators/{uuid}/formulas/{subUuid}',
3563
+ ...options
3564
+ });
3565
+ };
3566
+ /**
3567
+ * Update a formula on a pricing calculator
3568
+ */
3569
+ export const updatePricingCalculatorFormula = (options) => {
3570
+ return (options.client ?? _heyApiClient).patch({
3571
+ security: [
3572
+ {
3573
+ scheme: 'bearer',
3574
+ type: 'http'
3575
+ }
3576
+ ],
3577
+ url: '/pricing-calculators/{uuid}/formulas/{subUuid}',
3578
+ ...options,
3579
+ headers: {
3580
+ 'Content-Type': 'application/json',
3581
+ ...options?.headers
3582
+ }
3583
+ });
3584
+ };
3585
+ /**
3586
+ * List products
3587
+ */
3588
+ export const listProducts = (options) => {
3589
+ return (options?.client ?? _heyApiClient).get({
3590
+ security: [
3591
+ {
3592
+ scheme: 'bearer',
3593
+ type: 'http'
3594
+ }
3595
+ ],
3596
+ url: '/products/',
3597
+ ...options
3598
+ });
3599
+ };
3600
+ /**
3601
+ * Create a product
3602
+ */
3603
+ export const createProduct = (options) => {
3604
+ return (options.client ?? _heyApiClient).post({
3605
+ security: [
3606
+ {
3607
+ scheme: 'bearer',
3608
+ type: 'http'
3609
+ }
3610
+ ],
3611
+ url: '/products/',
3612
+ ...options,
3613
+ headers: {
3614
+ 'Content-Type': 'application/json',
3615
+ ...options?.headers
3616
+ }
3617
+ });
3618
+ };
3619
+ /**
3620
+ * Archive a product
3621
+ */
3622
+ export const deleteProduct = (options) => {
3623
+ return (options.client ?? _heyApiClient).delete({
3624
+ security: [
3625
+ {
3626
+ scheme: 'bearer',
3627
+ type: 'http'
3628
+ }
3629
+ ],
3630
+ url: '/products/{uuid}',
3631
+ ...options
3632
+ });
3633
+ };
3634
+ /**
3635
+ * Get a product
3636
+ */
3637
+ export const getProduct = (options) => {
3638
+ return (options.client ?? _heyApiClient).get({
3639
+ security: [
3640
+ {
3641
+ scheme: 'bearer',
3642
+ type: 'http'
3643
+ }
3644
+ ],
3645
+ url: '/products/{uuid}',
3646
+ ...options
3647
+ });
3648
+ };
3649
+ /**
3650
+ * Update a product
3651
+ */
3652
+ export const updateProduct = (options) => {
3653
+ return (options.client ?? _heyApiClient).patch({
3654
+ security: [
3655
+ {
3656
+ scheme: 'bearer',
3657
+ type: 'http'
3658
+ }
3659
+ ],
3660
+ url: '/products/{uuid}',
3661
+ ...options,
3662
+ headers: {
3663
+ 'Content-Type': 'application/json',
3664
+ ...options?.headers
3665
+ }
3666
+ });
3667
+ };
3668
+ /**
3669
+ * List rooms
3670
+ */
3671
+ export const listRooms = (options) => {
3672
+ return (options?.client ?? _heyApiClient).get({
3673
+ security: [
3674
+ {
3675
+ scheme: 'bearer',
3676
+ type: 'http'
3677
+ }
3678
+ ],
3679
+ url: '/rooms/',
3680
+ ...options
3681
+ });
3682
+ };
3683
+ /**
3684
+ * Create a room
3685
+ */
3686
+ export const createRoom = (options) => {
3687
+ return (options.client ?? _heyApiClient).post({
3688
+ security: [
3689
+ {
3690
+ scheme: 'bearer',
3691
+ type: 'http'
3692
+ }
3693
+ ],
3694
+ url: '/rooms/',
3695
+ ...options,
3696
+ headers: {
3697
+ 'Content-Type': 'application/json',
3698
+ ...options?.headers
3699
+ }
3700
+ });
3701
+ };
3702
+ /**
3703
+ * Archive a room
3704
+ */
3705
+ export const deleteRoom = (options) => {
3706
+ return (options.client ?? _heyApiClient).delete({
3707
+ security: [
3708
+ {
3709
+ scheme: 'bearer',
3710
+ type: 'http'
3711
+ }
3712
+ ],
3713
+ url: '/rooms/{uuid}',
3714
+ ...options
3715
+ });
3716
+ };
3717
+ /**
3718
+ * Get a room
3719
+ */
3720
+ export const getRoom = (options) => {
3721
+ return (options.client ?? _heyApiClient).get({
3722
+ security: [
3723
+ {
3724
+ scheme: 'bearer',
3725
+ type: 'http'
3726
+ }
3727
+ ],
3728
+ url: '/rooms/{uuid}',
3729
+ ...options
3730
+ });
3731
+ };
3732
+ /**
3733
+ * Update a room
3734
+ */
3735
+ export const updateRoom = (options) => {
3736
+ return (options.client ?? _heyApiClient).patch({
3737
+ security: [
3738
+ {
3739
+ scheme: 'bearer',
3740
+ type: 'http'
3741
+ }
3742
+ ],
3743
+ url: '/rooms/{uuid}',
3744
+ ...options,
3745
+ headers: {
3746
+ 'Content-Type': 'application/json',
3747
+ ...options?.headers
3748
+ }
3749
+ });
3750
+ };
3751
+ /**
3752
+ * List blocks for a room
3753
+ */
3754
+ export const listRoomBlocks = (options) => {
3755
+ return (options.client ?? _heyApiClient).get({
3756
+ security: [
3757
+ {
3758
+ scheme: 'bearer',
3759
+ type: 'http'
3760
+ }
3761
+ ],
3762
+ url: '/rooms/{uuid}/blocks',
3763
+ ...options
3764
+ });
3765
+ };
3766
+ /**
3767
+ * Add a block to a room
3768
+ */
3769
+ export const addRoomBlock = (options) => {
3770
+ return (options.client ?? _heyApiClient).post({
3771
+ security: [
3772
+ {
3773
+ scheme: 'bearer',
3774
+ type: 'http'
3775
+ }
3776
+ ],
3777
+ url: '/rooms/{uuid}/blocks',
3778
+ ...options,
3779
+ headers: {
3780
+ 'Content-Type': 'application/json',
3781
+ ...options?.headers
3782
+ }
3783
+ });
3784
+ };
3785
+ /**
3786
+ * Remove a block from a room
3787
+ */
3788
+ export const removeRoomBlock = (options) => {
3789
+ return (options.client ?? _heyApiClient).delete({
3790
+ security: [
3791
+ {
3792
+ scheme: 'bearer',
3793
+ type: 'http'
3794
+ }
3795
+ ],
3796
+ url: '/rooms/{uuid}/blocks/{subUuid}',
3797
+ ...options
3798
+ });
3799
+ };
3800
+ /**
3801
+ * Update a room block
3802
+ */
3803
+ export const updateRoomBlock = (options) => {
3804
+ return (options.client ?? _heyApiClient).patch({
3805
+ security: [
3806
+ {
3807
+ scheme: 'bearer',
3808
+ type: 'http'
3809
+ }
3810
+ ],
3811
+ url: '/rooms/{uuid}/blocks/{subUuid}',
3812
+ ...options,
3813
+ headers: {
3814
+ 'Content-Type': 'application/json',
3815
+ ...options?.headers
3816
+ }
3817
+ });
3818
+ };
3819
+ /**
3820
+ * Add a tier to a room
3821
+ */
3822
+ export const addRoomTier = (options) => {
3823
+ return (options.client ?? _heyApiClient).post({
3824
+ security: [
3825
+ {
3826
+ scheme: 'bearer',
3827
+ type: 'http'
3828
+ }
3829
+ ],
3830
+ url: '/rooms/{uuid}/tiers',
3831
+ ...options,
3832
+ headers: {
3833
+ 'Content-Type': 'application/json',
3834
+ ...options?.headers
3835
+ }
3836
+ });
3837
+ };
3838
+ /**
3839
+ * Remove a tier from a room
3840
+ */
3841
+ export const removeRoomTier = (options) => {
3842
+ return (options.client ?? _heyApiClient).delete({
3843
+ security: [
3844
+ {
3845
+ scheme: 'bearer',
3846
+ type: 'http'
3847
+ }
3848
+ ],
3849
+ url: '/rooms/{uuid}/tiers/{subUuid}',
3850
+ ...options
3851
+ });
3852
+ };
3853
+ /**
3854
+ * Add a category to a room
3855
+ */
3856
+ export const addRoomCategory = (options) => {
3857
+ return (options.client ?? _heyApiClient).post({
3858
+ security: [
3859
+ {
3860
+ scheme: 'bearer',
3861
+ type: 'http'
3862
+ }
3863
+ ],
3864
+ url: '/rooms/{uuid}/categories',
3865
+ ...options,
3866
+ headers: {
3867
+ 'Content-Type': 'application/json',
3868
+ ...options?.headers
3869
+ }
3870
+ });
3871
+ };
3872
+ /**
3873
+ * Remove a category from a room
3874
+ */
3875
+ export const removeRoomCategory = (options) => {
3876
+ return (options.client ?? _heyApiClient).delete({
3877
+ security: [
3878
+ {
3879
+ scheme: 'bearer',
3880
+ type: 'http'
3881
+ }
3882
+ ],
3883
+ url: '/rooms/{uuid}/categories/{subUuid}',
3884
+ ...options
3885
+ });
3886
+ };
3887
+ /**
3888
+ * Add a stage to a room
3889
+ */
3890
+ export const addRoomStage = (options) => {
3891
+ return (options.client ?? _heyApiClient).post({
3892
+ security: [
3893
+ {
3894
+ scheme: 'bearer',
3895
+ type: 'http'
3896
+ }
3897
+ ],
3898
+ url: '/rooms/{uuid}/stages',
3899
+ ...options,
3900
+ headers: {
3901
+ 'Content-Type': 'application/json',
3902
+ ...options?.headers
3903
+ }
3904
+ });
3905
+ };
3906
+ /**
3907
+ * Remove a stage from a room
3908
+ */
3909
+ export const removeRoomStage = (options) => {
3910
+ return (options.client ?? _heyApiClient).delete({
3911
+ security: [
3912
+ {
3913
+ scheme: 'bearer',
3914
+ type: 'http'
3915
+ }
3916
+ ],
3917
+ url: '/rooms/{uuid}/stages/{subUuid}',
3918
+ ...options
3919
+ });
3920
+ };
3921
+ /**
3922
+ * Add a tag to a room
3923
+ */
3924
+ export const addRoomTag = (options) => {
3925
+ return (options.client ?? _heyApiClient).post({
3926
+ security: [
3927
+ {
3928
+ scheme: 'bearer',
3929
+ type: 'http'
3930
+ }
3931
+ ],
3932
+ url: '/rooms/{uuid}/tags',
3933
+ ...options,
3934
+ headers: {
3935
+ 'Content-Type': 'application/json',
3936
+ ...options?.headers
3937
+ }
3938
+ });
3939
+ };
3940
+ /**
3941
+ * Remove a tag from a room
3942
+ */
3943
+ export const removeRoomTag = (options) => {
3944
+ return (options.client ?? _heyApiClient).delete({
3945
+ security: [
3946
+ {
3947
+ scheme: 'bearer',
3948
+ type: 'http'
3949
+ }
3950
+ ],
3951
+ url: '/rooms/{uuid}/tags/{subUuid}',
3952
+ ...options
3953
+ });
3954
+ };
3955
+ /**
3956
+ * Add a partnership to a room
3957
+ */
3958
+ export const addRoomPartnership = (options) => {
3959
+ return (options.client ?? _heyApiClient).post({
3960
+ security: [
3961
+ {
3962
+ scheme: 'bearer',
3963
+ type: 'http'
3964
+ }
3965
+ ],
3966
+ url: '/rooms/{uuid}/partnerships',
3967
+ ...options,
3968
+ headers: {
3969
+ 'Content-Type': 'application/json',
3970
+ ...options?.headers
3971
+ }
3972
+ });
3973
+ };
3974
+ /**
3975
+ * Remove a partnership from a room
3976
+ */
3977
+ export const removeRoomPartnership = (options) => {
3978
+ return (options.client ?? _heyApiClient).delete({
3979
+ security: [
3980
+ {
3981
+ scheme: 'bearer',
3982
+ type: 'http'
3983
+ }
3984
+ ],
3985
+ url: '/rooms/{uuid}/partnerships/{subUuid}',
3986
+ ...options
3987
+ });
3988
+ };
3989
+ /**
3990
+ * List resources
3991
+ */
3992
+ export const listResources = (options) => {
3993
+ return (options?.client ?? _heyApiClient).get({
3994
+ security: [
3995
+ {
3996
+ scheme: 'bearer',
3997
+ type: 'http'
3998
+ }
3999
+ ],
4000
+ url: '/resources/',
4001
+ ...options
4002
+ });
4003
+ };
4004
+ /**
4005
+ * Create a resource
4006
+ */
4007
+ export const createResource = (options) => {
4008
+ return (options.client ?? _heyApiClient).post({
4009
+ security: [
4010
+ {
4011
+ scheme: 'bearer',
4012
+ type: 'http'
4013
+ }
4014
+ ],
4015
+ url: '/resources/',
4016
+ ...options,
4017
+ headers: {
4018
+ 'Content-Type': 'application/json',
4019
+ ...options?.headers
4020
+ }
4021
+ });
4022
+ };
4023
+ /**
4024
+ * Archive a resource
4025
+ */
4026
+ export const deleteResource = (options) => {
4027
+ return (options.client ?? _heyApiClient).delete({
4028
+ security: [
4029
+ {
4030
+ scheme: 'bearer',
4031
+ type: 'http'
4032
+ }
4033
+ ],
4034
+ url: '/resources/{uuid}',
4035
+ ...options
4036
+ });
4037
+ };
4038
+ /**
4039
+ * Get a resource
4040
+ */
4041
+ export const getResource = (options) => {
4042
+ return (options.client ?? _heyApiClient).get({
4043
+ security: [
4044
+ {
4045
+ scheme: 'bearer',
4046
+ type: 'http'
4047
+ }
4048
+ ],
4049
+ url: '/resources/{uuid}',
4050
+ ...options
4051
+ });
4052
+ };
4053
+ /**
4054
+ * Update a resource
4055
+ */
4056
+ export const updateResource = (options) => {
4057
+ return (options.client ?? _heyApiClient).patch({
4058
+ security: [
4059
+ {
4060
+ scheme: 'bearer',
4061
+ type: 'http'
4062
+ }
4063
+ ],
4064
+ url: '/resources/{uuid}',
4065
+ ...options,
4066
+ headers: {
4067
+ 'Content-Type': 'application/json',
4068
+ ...options?.headers
4069
+ }
4070
+ });
4071
+ };
4072
+ /**
4073
+ * List blocks for a resource
4074
+ */
4075
+ export const listResourceBlocks = (options) => {
4076
+ return (options.client ?? _heyApiClient).get({
4077
+ security: [
4078
+ {
4079
+ scheme: 'bearer',
4080
+ type: 'http'
4081
+ }
4082
+ ],
4083
+ url: '/resources/{uuid}/blocks',
4084
+ ...options
4085
+ });
4086
+ };
4087
+ /**
4088
+ * Add a block to a resource
4089
+ */
4090
+ export const addResourceBlock = (options) => {
4091
+ return (options.client ?? _heyApiClient).post({
4092
+ security: [
4093
+ {
4094
+ scheme: 'bearer',
4095
+ type: 'http'
4096
+ }
4097
+ ],
4098
+ url: '/resources/{uuid}/blocks',
4099
+ ...options,
4100
+ headers: {
4101
+ 'Content-Type': 'application/json',
4102
+ ...options?.headers
4103
+ }
4104
+ });
4105
+ };
4106
+ /**
4107
+ * Remove a block from a resource
4108
+ */
4109
+ export const removeResourceBlock = (options) => {
4110
+ return (options.client ?? _heyApiClient).delete({
4111
+ security: [
4112
+ {
4113
+ scheme: 'bearer',
4114
+ type: 'http'
4115
+ }
4116
+ ],
4117
+ url: '/resources/{uuid}/blocks/{subUuid}',
4118
+ ...options
4119
+ });
4120
+ };
4121
+ /**
4122
+ * Update a resource block
4123
+ */
4124
+ export const updateResourceBlock = (options) => {
4125
+ return (options.client ?? _heyApiClient).patch({
4126
+ security: [
4127
+ {
4128
+ scheme: 'bearer',
4129
+ type: 'http'
4130
+ }
4131
+ ],
4132
+ url: '/resources/{uuid}/blocks/{subUuid}',
4133
+ ...options,
4134
+ headers: {
4135
+ 'Content-Type': 'application/json',
4136
+ ...options?.headers
4137
+ }
4138
+ });
4139
+ };
4140
+ /**
4141
+ * Add a tag to a resource
4142
+ */
4143
+ export const addResourceTag = (options) => {
4144
+ return (options.client ?? _heyApiClient).post({
4145
+ security: [
4146
+ {
4147
+ scheme: 'bearer',
4148
+ type: 'http'
4149
+ }
4150
+ ],
4151
+ url: '/resources/{uuid}/tags',
4152
+ ...options,
4153
+ headers: {
4154
+ 'Content-Type': 'application/json',
4155
+ ...options?.headers
4156
+ }
4157
+ });
4158
+ };
4159
+ /**
4160
+ * Remove a tag from a resource
4161
+ */
4162
+ export const removeResourceTag = (options) => {
4163
+ return (options.client ?? _heyApiClient).delete({
4164
+ security: [
4165
+ {
4166
+ scheme: 'bearer',
4167
+ type: 'http'
4168
+ }
4169
+ ],
4170
+ url: '/resources/{uuid}/tags/{subUuid}',
4171
+ ...options
4172
+ });
4173
+ };
4174
+ /**
4175
+ * Add a category to a resource
4176
+ */
4177
+ export const addResourceCategory = (options) => {
4178
+ return (options.client ?? _heyApiClient).post({
4179
+ security: [
4180
+ {
4181
+ scheme: 'bearer',
4182
+ type: 'http'
4183
+ }
4184
+ ],
4185
+ url: '/resources/{uuid}/categories',
4186
+ ...options,
4187
+ headers: {
4188
+ 'Content-Type': 'application/json',
4189
+ ...options?.headers
4190
+ }
4191
+ });
4192
+ };
4193
+ /**
4194
+ * Remove a category from a resource
4195
+ */
4196
+ export const removeResourceCategory = (options) => {
4197
+ return (options.client ?? _heyApiClient).delete({
4198
+ security: [
4199
+ {
4200
+ scheme: 'bearer',
4201
+ type: 'http'
4202
+ }
4203
+ ],
4204
+ url: '/resources/{uuid}/categories/{subUuid}',
4205
+ ...options
4206
+ });
4207
+ };
4208
+ /**
4209
+ * Add a resource to a folder
4210
+ */
4211
+ export const addResourceFolder = (options) => {
4212
+ return (options.client ?? _heyApiClient).post({
4213
+ security: [
4214
+ {
4215
+ scheme: 'bearer',
4216
+ type: 'http'
4217
+ }
4218
+ ],
4219
+ url: '/resources/{uuid}/folders',
4220
+ ...options,
4221
+ headers: {
4222
+ 'Content-Type': 'application/json',
4223
+ ...options?.headers
4224
+ }
4225
+ });
4226
+ };
4227
+ /**
4228
+ * Remove a resource from a folder
4229
+ */
4230
+ export const removeResourceFolder = (options) => {
4231
+ return (options.client ?? _heyApiClient).delete({
4232
+ security: [
4233
+ {
4234
+ scheme: 'bearer',
4235
+ type: 'http'
4236
+ }
4237
+ ],
4238
+ url: '/resources/{uuid}/folders/{subUuid}',
4239
+ ...options
4240
+ });
4241
+ };
4242
+ /**
4243
+ * List partners
4244
+ */
4245
+ export const listPartners = (options) => {
4246
+ return (options?.client ?? _heyApiClient).get({
4247
+ security: [
4248
+ {
4249
+ scheme: 'bearer',
4250
+ type: 'http'
4251
+ }
4252
+ ],
4253
+ url: '/partners/',
4254
+ ...options
4255
+ });
4256
+ };
4257
+ /**
4258
+ * Create a partner
4259
+ */
4260
+ export const createPartner = (options) => {
4261
+ return (options.client ?? _heyApiClient).post({
4262
+ security: [
4263
+ {
4264
+ scheme: 'bearer',
4265
+ type: 'http'
4266
+ }
4267
+ ],
4268
+ url: '/partners/',
4269
+ ...options,
4270
+ headers: {
4271
+ 'Content-Type': 'application/json',
4272
+ ...options?.headers
4273
+ }
4274
+ });
4275
+ };
4276
+ /**
4277
+ * Archive a partner
4278
+ * Soft-deletes a partner by setting archived_at. The partner will no longer appear in list results unless include_archived is set.
4279
+ */
4280
+ export const deletePartner = (options) => {
4281
+ return (options.client ?? _heyApiClient).delete({
4282
+ security: [
4283
+ {
4284
+ scheme: 'bearer',
4285
+ type: 'http'
4286
+ }
4287
+ ],
4288
+ url: '/partners/{uuid}',
4289
+ ...options
4290
+ });
4291
+ };
4292
+ /**
4293
+ * Get a partner
4294
+ */
4295
+ export const getPartner = (options) => {
4296
+ return (options.client ?? _heyApiClient).get({
4297
+ security: [
4298
+ {
4299
+ scheme: 'bearer',
4300
+ type: 'http'
4301
+ }
4302
+ ],
4303
+ url: '/partners/{uuid}',
4304
+ ...options
4305
+ });
4306
+ };
4307
+ /**
4308
+ * Update a partner
4309
+ */
4310
+ export const updatePartner = (options) => {
4311
+ return (options.client ?? _heyApiClient).patch({
4312
+ security: [
4313
+ {
4314
+ scheme: 'bearer',
4315
+ type: 'http'
4316
+ }
4317
+ ],
4318
+ url: '/partners/{uuid}',
4319
+ ...options,
4320
+ headers: {
4321
+ 'Content-Type': 'application/json',
4322
+ ...options?.headers
4323
+ }
4324
+ });
4325
+ };
4326
+ /**
4327
+ * Add a tag to a partner
4328
+ */
4329
+ export const addPartnerTag = (options) => {
4330
+ return (options.client ?? _heyApiClient).post({
4331
+ security: [
4332
+ {
4333
+ scheme: 'bearer',
4334
+ type: 'http'
4335
+ }
4336
+ ],
4337
+ url: '/partners/{uuid}/tags',
4338
+ ...options,
4339
+ headers: {
4340
+ 'Content-Type': 'application/json',
4341
+ ...options?.headers
4342
+ }
4343
+ });
4344
+ };
4345
+ /**
4346
+ * Remove a tag from a partner
4347
+ */
4348
+ export const removePartnerTag = (options) => {
4349
+ return (options.client ?? _heyApiClient).delete({
4350
+ security: [
4351
+ {
4352
+ scheme: 'bearer',
4353
+ type: 'http'
4354
+ }
4355
+ ],
4356
+ url: '/partners/{uuid}/tags/{subUuid}',
4357
+ ...options
4358
+ });
4359
+ };
4360
+ /**
4361
+ * Assign a user to a partner
4362
+ */
4363
+ export const assignPartnerUser = (options) => {
4364
+ return (options.client ?? _heyApiClient).post({
4365
+ security: [
4366
+ {
4367
+ scheme: 'bearer',
4368
+ type: 'http'
4369
+ }
4370
+ ],
4371
+ url: '/partners/{uuid}/assigned-users',
4372
+ ...options,
4373
+ headers: {
4374
+ 'Content-Type': 'application/json',
4375
+ ...options?.headers
4376
+ }
4377
+ });
4378
+ };
4379
+ /**
4380
+ * Remove a user from a partner
4381
+ */
4382
+ export const removePartnerUser = (options) => {
4383
+ return (options.client ?? _heyApiClient).delete({
4384
+ security: [
4385
+ {
4386
+ scheme: 'bearer',
4387
+ type: 'http'
4388
+ }
4389
+ ],
4390
+ url: '/partners/{uuid}/assigned-users/{subUuid}',
4391
+ ...options
4392
+ });
4393
+ };
4394
+ /**
4395
+ * Add a domain to a partner
4396
+ */
4397
+ export const addPartnerDomain = (options) => {
4398
+ return (options.client ?? _heyApiClient).post({
4399
+ security: [
4400
+ {
4401
+ scheme: 'bearer',
4402
+ type: 'http'
4403
+ }
4404
+ ],
4405
+ url: '/partners/{uuid}/domains',
4406
+ ...options,
4407
+ headers: {
4408
+ 'Content-Type': 'application/json',
4409
+ ...options?.headers
4410
+ }
4411
+ });
4412
+ };
4413
+ /**
4414
+ * Remove a domain from a partner
4415
+ */
4416
+ export const removePartnerDomain = (options) => {
4417
+ return (options.client ?? _heyApiClient).delete({
4418
+ security: [
4419
+ {
4420
+ scheme: 'bearer',
4421
+ type: 'http'
4422
+ }
4423
+ ],
4424
+ url: '/partners/{uuid}/domains/{subUuid}',
4425
+ ...options
4426
+ });
4427
+ };
4428
+ /**
4429
+ * Set a custom field value on a partner
4430
+ */
4431
+ export const setPartnerCustomField = (options) => {
4432
+ return (options.client ?? _heyApiClient).post({
4433
+ security: [
4434
+ {
4435
+ scheme: 'bearer',
4436
+ type: 'http'
4437
+ }
4438
+ ],
4439
+ url: '/partners/{uuid}/custom-fields',
4440
+ ...options,
4441
+ headers: {
4442
+ 'Content-Type': 'application/json',
4443
+ ...options?.headers
4444
+ }
4445
+ });
4446
+ };
4447
+ /**
4448
+ * Remove a custom field value from a partner
4449
+ */
4450
+ export const removePartnerCustomField = (options) => {
4451
+ return (options.client ?? _heyApiClient).delete({
4452
+ security: [
4453
+ {
4454
+ scheme: 'bearer',
4455
+ type: 'http'
4456
+ }
4457
+ ],
4458
+ url: '/partners/{uuid}/custom-fields/{subUuid}',
4459
+ ...options
4460
+ });
4461
+ };
4462
+ /**
4463
+ * Update a custom field value on a partner
4464
+ */
4465
+ export const updatePartnerCustomField = (options) => {
4466
+ return (options.client ?? _heyApiClient).patch({
4467
+ security: [
4468
+ {
4469
+ scheme: 'bearer',
4470
+ type: 'http'
4471
+ }
4472
+ ],
4473
+ url: '/partners/{uuid}/custom-fields/{subUuid}',
4474
+ ...options,
4475
+ headers: {
4476
+ 'Content-Type': 'application/json',
4477
+ ...options?.headers
4478
+ }
4479
+ });
4480
+ };
4481
+ /**
4482
+ * List contacts for a partner
4483
+ */
4484
+ export const listPartnerContacts = (options) => {
4485
+ return (options.client ?? _heyApiClient).get({
4486
+ security: [
4487
+ {
4488
+ scheme: 'bearer',
4489
+ type: 'http'
4490
+ }
4491
+ ],
4492
+ url: '/partners/{uuid}/contacts',
4493
+ ...options
4494
+ });
4495
+ };
4496
+ /**
4497
+ * Create a contact for a partner
4498
+ */
4499
+ export const createPartnerContact = (options) => {
4500
+ return (options.client ?? _heyApiClient).post({
4501
+ security: [
4502
+ {
4503
+ scheme: 'bearer',
4504
+ type: 'http'
4505
+ }
4506
+ ],
4507
+ url: '/partners/{uuid}/contacts',
4508
+ ...options,
4509
+ headers: {
4510
+ 'Content-Type': 'application/json',
4511
+ ...options?.headers
4512
+ }
4513
+ });
4514
+ };
4515
+ /**
4516
+ * Delete a contact
4517
+ */
4518
+ export const deletePartnerContact = (options) => {
4519
+ return (options.client ?? _heyApiClient).delete({
4520
+ security: [
4521
+ {
4522
+ scheme: 'bearer',
4523
+ type: 'http'
4524
+ }
4525
+ ],
4526
+ url: '/partners/{uuid}/contacts/{subUuid}',
4527
+ ...options
4528
+ });
4529
+ };
4530
+ /**
4531
+ * Update a contact
4532
+ */
4533
+ export const updatePartnerContact = (options) => {
4534
+ return (options.client ?? _heyApiClient).patch({
4535
+ security: [
4536
+ {
4537
+ scheme: 'bearer',
4538
+ type: 'http'
4539
+ }
4540
+ ],
4541
+ url: '/partners/{uuid}/contacts/{subUuid}',
4542
+ ...options,
4543
+ headers: {
4544
+ 'Content-Type': 'application/json',
4545
+ ...options?.headers
4546
+ }
4547
+ });
4548
+ };
4549
+ /**
4550
+ * List notes for a partner
4551
+ */
4552
+ export const listPartnerNotes = (options) => {
4553
+ return (options.client ?? _heyApiClient).get({
4554
+ security: [
4555
+ {
4556
+ scheme: 'bearer',
4557
+ type: 'http'
4558
+ }
4559
+ ],
4560
+ url: '/partners/{uuid}/notes',
4561
+ ...options
4562
+ });
4563
+ };
4564
+ /**
4565
+ * Create a note on a partner
4566
+ */
4567
+ export const createPartnerNote = (options) => {
4568
+ return (options.client ?? _heyApiClient).post({
4569
+ security: [
4570
+ {
4571
+ scheme: 'bearer',
4572
+ type: 'http'
4573
+ }
4574
+ ],
4575
+ url: '/partners/{uuid}/notes',
4576
+ ...options,
4577
+ headers: {
4578
+ 'Content-Type': 'application/json',
4579
+ ...options?.headers
4580
+ }
4581
+ });
4582
+ };
4583
+ /**
4584
+ * Delete a note from a partner
4585
+ */
4586
+ export const deletePartnerNote = (options) => {
4587
+ return (options.client ?? _heyApiClient).delete({
4588
+ security: [
4589
+ {
4590
+ scheme: 'bearer',
4591
+ type: 'http'
4592
+ }
4593
+ ],
4594
+ url: '/partners/{uuid}/notes/{subUuid}',
4595
+ ...options
4596
+ });
4597
+ };
4598
+ /**
4599
+ * List resellers assigned to a distributor
4600
+ */
4601
+ export const listPartnerResellers = (options) => {
4602
+ return (options.client ?? _heyApiClient).get({
4603
+ security: [
4604
+ {
4605
+ scheme: 'bearer',
4606
+ type: 'http'
4607
+ }
4608
+ ],
4609
+ url: '/partners/{uuid}/resellers',
4610
+ ...options
4611
+ });
4612
+ };
4613
+ /**
4614
+ * Assign a reseller to a distributor
4615
+ */
4616
+ export const addPartnerReseller = (options) => {
4617
+ return (options.client ?? _heyApiClient).post({
4618
+ security: [
4619
+ {
4620
+ scheme: 'bearer',
4621
+ type: 'http'
4622
+ }
4623
+ ],
4624
+ url: '/partners/{uuid}/resellers',
4625
+ ...options,
4626
+ headers: {
4627
+ 'Content-Type': 'application/json',
4628
+ ...options?.headers
4629
+ }
4630
+ });
4631
+ };
4632
+ /**
4633
+ * Remove a reseller from a distributor
4634
+ */
4635
+ export const removePartnerReseller = (options) => {
4636
+ return (options.client ?? _heyApiClient).delete({
4637
+ security: [
4638
+ {
4639
+ scheme: 'bearer',
4640
+ type: 'http'
4641
+ }
4642
+ ],
4643
+ url: '/partners/{uuid}/resellers/{subUuid}',
4644
+ ...options
4645
+ });
4646
+ };
4647
+ //# sourceMappingURL=sdk.gen.js.map