samva 0.27.0 → 0.28.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.
Files changed (105) hide show
  1. package/AGENTS.md +7 -0
  2. package/README.md +12 -7
  3. package/dist/client/sdk.gen.d.ts +322 -143
  4. package/dist/client/sdk.gen.js +604 -95
  5. package/dist/client/types.gen.d.ts +1342 -479
  6. package/dist/effect/agents.d.ts +6 -8
  7. package/dist/effect/analytics.d.ts +1 -1
  8. package/dist/effect/api-keys.d.ts +6 -6
  9. package/dist/effect/attachments.d.ts +1 -1
  10. package/dist/effect/brands.d.ts +2 -0
  11. package/dist/effect/campaigns.d.ts +275 -25
  12. package/dist/effect/campaigns.js +7 -1
  13. package/dist/effect/contact-groups.d.ts +9 -9
  14. package/dist/effect/contacts.d.ts +74 -81
  15. package/dist/effect/contacts.js +7 -3
  16. package/dist/effect/conversations.d.ts +14 -6
  17. package/dist/effect/email.d.ts +34 -34
  18. package/dist/effect/errors.d.ts +1 -1
  19. package/dist/effect/errors.js +2 -2
  20. package/dist/effect/extension-installations.d.ts +3 -3
  21. package/dist/effect/extensions.d.ts +6 -6
  22. package/dist/effect/generated/agents.d.ts +6 -28
  23. package/dist/effect/generated/agents.js +2 -3
  24. package/dist/effect/generated/analytics.d.ts +3 -3
  25. package/dist/effect/generated/analytics.js +1 -1
  26. package/dist/effect/generated/api-keys.d.ts +6 -6
  27. package/dist/effect/generated/api-keys.js +2 -2
  28. package/dist/effect/generated/attachments.d.ts +3 -3
  29. package/dist/effect/generated/attachments.js +1 -1
  30. package/dist/effect/generated/brands.d.ts +16 -0
  31. package/dist/effect/generated/campaigns.d.ts +1181 -302
  32. package/dist/effect/generated/campaigns.js +169 -36
  33. package/dist/effect/generated/contact-events.d.ts +3 -3
  34. package/dist/effect/generated/contact-events.js +1 -1
  35. package/dist/effect/generated/contact-groups.d.ts +9 -9
  36. package/dist/effect/generated/contact-groups.js +7 -7
  37. package/dist/effect/generated/contacts.d.ts +2063 -290
  38. package/dist/effect/generated/contacts.js +343 -75
  39. package/dist/effect/generated/conversations.d.ts +14 -6
  40. package/dist/effect/generated/conversations.js +6 -6
  41. package/dist/effect/generated/email.d.ts +40 -40
  42. package/dist/effect/generated/email.js +15 -15
  43. package/dist/effect/generated/extension-installations.d.ts +3 -3
  44. package/dist/effect/generated/extension-installations.js +1 -1
  45. package/dist/effect/generated/extensions.d.ts +6 -6
  46. package/dist/effect/generated/extensions.js +2 -2
  47. package/dist/effect/generated/index.d.ts +5 -3
  48. package/dist/effect/generated/journeys.d.ts +9 -9
  49. package/dist/effect/generated/journeys.js +3 -3
  50. package/dist/effect/generated/mailboxes.d.ts +172 -124
  51. package/dist/effect/generated/mailboxes.js +22 -14
  52. package/dist/effect/generated/messages.d.ts +53 -29
  53. package/dist/effect/generated/messages.js +9 -5
  54. package/dist/effect/generated/namespaces.d.ts +3 -3
  55. package/dist/effect/generated/namespaces.js +1 -1
  56. package/dist/effect/generated/operations.d.ts +3 -3
  57. package/dist/effect/generated/operations.js +1 -1
  58. package/dist/effect/generated/organizations.d.ts +0 -9
  59. package/dist/effect/generated/organizations.js +1 -4
  60. package/dist/effect/generated/scheduled-messages.d.ts +69 -20
  61. package/dist/effect/generated/scheduled-messages.js +22 -3
  62. package/dist/effect/generated/shared.d.ts +396 -107
  63. package/dist/effect/generated/shared.js +170 -89
  64. package/dist/effect/generated/subscriptions.d.ts +4 -7
  65. package/dist/effect/generated/subscriptions.js +3 -4
  66. package/dist/effect/generated/templates.d.ts +71 -407
  67. package/dist/effect/generated/templates.js +23 -23
  68. package/dist/effect/generated/topic-forms.d.ts +656 -0
  69. package/dist/effect/generated/topic-forms.js +145 -0
  70. package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
  71. package/dist/effect/generated/topics.js +267 -0
  72. package/dist/effect/generated/webhooks.d.ts +6 -6
  73. package/dist/effect/generated/webhooks.js +2 -2
  74. package/dist/effect/generated-metadata.d.ts +78 -24
  75. package/dist/effect/generated-metadata.js +61 -27
  76. package/dist/effect/index.d.ts +2 -1
  77. package/dist/effect/index.js +4 -3
  78. package/dist/effect/internal/operation.js +3 -3
  79. package/dist/effect/internal/send.d.ts +4 -4
  80. package/dist/effect/journeys.d.ts +7 -7
  81. package/dist/effect/mailboxes.d.ts +137 -121
  82. package/dist/effect/messages.d.ts +19 -11
  83. package/dist/effect/namespaces.d.ts +3 -3
  84. package/dist/effect/operations.d.ts +3 -3
  85. package/dist/effect/scheduled-messages.d.ts +6 -6
  86. package/dist/effect/subscriptions.d.ts +1 -2
  87. package/dist/effect/templates.d.ts +13 -13
  88. package/dist/effect/topic-forms.d.ts +30 -0
  89. package/dist/effect/topic-forms.js +21 -0
  90. package/dist/effect/topics.d.ts +94 -0
  91. package/dist/effect/topics.js +29 -0
  92. package/dist/effect/webhooks.d.ts +6 -6
  93. package/dist/index.js +2 -2
  94. package/dist/package.js +1 -1
  95. package/dist/promises/errors.gen.d.ts +65 -8
  96. package/dist/promises/errors.gen.js +139 -7
  97. package/dist/promises/index.d.ts +5 -3
  98. package/dist/promises/index.js +7 -5
  99. package/dist/promises/types.gen.d.ts +1 -1
  100. package/dist/service-map.d.ts +74 -25
  101. package/dist/service-map.js +43 -12
  102. package/package.json +12 -8
  103. package/dist/effect/generated/unsubscribe-groups.js +0 -284
  104. package/dist/effect/unsubscribe-groups.d.ts +0 -74
  105. package/dist/effect/unsubscribe-groups.js +0 -29
@@ -116,6 +116,7 @@ var Messages = class {
116
116
  url: "/v1/messages",
117
117
  ...options,
118
118
  ...params,
119
+ body: params.body ?? {},
119
120
  headers: {
120
121
  "Content-Type": "application/json",
121
122
  ...options?.headers,
@@ -281,6 +282,7 @@ var Messages = class {
281
282
  url: "/v1/messages/validate/email",
282
283
  ...options,
283
284
  ...params,
285
+ body: params.body ?? {},
284
286
  headers: {
285
287
  "Content-Type": "application/json",
286
288
  ...options?.headers,
@@ -482,6 +484,7 @@ var ScheduledMessages = class {
482
484
  url: "/v1/messages/scheduled",
483
485
  ...options,
484
486
  ...params,
487
+ body: params.body ?? {},
485
488
  headers: {
486
489
  "Content-Type": "application/json",
487
490
  ...options?.headers,
@@ -559,6 +562,78 @@ var ScheduledMessages = class {
559
562
  }
560
563
  };
561
564
  var Campaigns = class {
565
+ /**
566
+ * Preview a campaign email
567
+ *
568
+ * Renders draft email content using the selected contact's fields and declared templateData fallbacks. Creates no campaign run or message. Omit contactId to preview the fallback data alone.
569
+ */
570
+ static preview(parameters, options) {
571
+ const params = buildClientParams([parameters], [{ args: [
572
+ {
573
+ in: "body",
574
+ key: "content"
575
+ },
576
+ {
577
+ in: "body",
578
+ key: "audience"
579
+ },
580
+ {
581
+ in: "body",
582
+ key: "contactId"
583
+ }
584
+ ] }]);
585
+ return (options?.client ?? client).post({
586
+ security: [{
587
+ name: "x-api-key",
588
+ type: "apiKey"
589
+ }],
590
+ url: "/v1/campaigns/preview",
591
+ ...options,
592
+ ...params,
593
+ body: params.body ?? {},
594
+ headers: {
595
+ "Content-Type": "application/json",
596
+ ...options?.headers,
597
+ ...params.headers
598
+ }
599
+ });
600
+ }
601
+ /**
602
+ * Send a campaign test
603
+ *
604
+ * Sends one rendered draft email to the authenticated actor's email address, using optional contactId only for personalization. Creates no campaign run. Normal sending permissions, billing, and delivery policies apply.
605
+ */
606
+ static sendTest(parameters, options) {
607
+ const params = buildClientParams([parameters], [{ args: [
608
+ {
609
+ in: "body",
610
+ key: "content"
611
+ },
612
+ {
613
+ in: "body",
614
+ key: "audience"
615
+ },
616
+ {
617
+ in: "body",
618
+ key: "contactId"
619
+ }
620
+ ] }]);
621
+ return (options?.client ?? client).post({
622
+ security: [{
623
+ name: "x-api-key",
624
+ type: "apiKey"
625
+ }],
626
+ url: "/v1/campaigns/test-send",
627
+ ...options,
628
+ ...params,
629
+ body: params.body ?? {},
630
+ headers: {
631
+ "Content-Type": "application/json",
632
+ ...options?.headers,
633
+ ...params.headers
634
+ }
635
+ });
636
+ }
562
637
  /**
563
638
  * List campaigns
564
639
  *
@@ -625,6 +700,7 @@ var Campaigns = class {
625
700
  url: "/v1/campaigns",
626
701
  ...options,
627
702
  ...params,
703
+ body: params.body ?? {},
628
704
  headers: {
629
705
  "Content-Type": "application/json",
630
706
  ...options?.headers,
@@ -688,6 +764,7 @@ var Campaigns = class {
688
764
  url: "/v1/campaigns/{id}",
689
765
  ...options,
690
766
  ...params,
767
+ body: params.body ?? {},
691
768
  headers: {
692
769
  "Content-Type": "application/json",
693
770
  ...options?.headers,
@@ -777,6 +854,7 @@ var Campaigns = class {
777
854
  url: "/v1/campaigns/{id}/runs",
778
855
  ...options,
779
856
  ...params,
857
+ body: params.body ?? {},
780
858
  headers: {
781
859
  "Content-Type": "application/json",
782
860
  ...options?.headers,
@@ -808,6 +886,29 @@ var Campaigns = class {
808
886
  });
809
887
  }
810
888
  /**
889
+ * Get a campaign run report
890
+ *
891
+ * Returns delivery outcomes, topic unsubscribes, replies, and skip reasons for an email campaign run. Non-email runs return 404. Namespace-scoped reads require an existing audience topic in that namespace. Opens and clicks are directional counts of unique recipients excluding machine events, not exact measurements.
892
+ */
893
+ static getRunReport(parameters, options) {
894
+ const params = buildClientParams([parameters], [{ args: [{
895
+ in: "path",
896
+ key: "id"
897
+ }, {
898
+ in: "path",
899
+ key: "runId"
900
+ }] }]);
901
+ return (options?.client ?? client).get({
902
+ security: [{
903
+ name: "x-api-key",
904
+ type: "apiKey"
905
+ }],
906
+ url: "/v1/campaigns/{id}/runs/{runId}/report",
907
+ ...options,
908
+ ...params
909
+ });
910
+ }
911
+ /**
811
912
  * Pause a campaign run
812
913
  *
813
914
  * Pauses an in-progress campaign run and returns the updated run.
@@ -949,6 +1050,7 @@ var Email = class {
949
1050
  url: "/v1/email/onboarding-review/reapply",
950
1051
  ...options,
951
1052
  ...params,
1053
+ body: params.body ?? {},
952
1054
  headers: {
953
1055
  "Content-Type": "application/json",
954
1056
  ...options?.headers,
@@ -984,6 +1086,7 @@ var Email = class {
984
1086
  url: "/v1/email/onboarding-review/respond",
985
1087
  ...options,
986
1088
  ...params,
1089
+ body: params.body ?? {},
987
1090
  headers: {
988
1091
  "Content-Type": "application/json",
989
1092
  ...options?.headers,
@@ -1027,6 +1130,7 @@ var Email = class {
1027
1130
  url: "/v1/email/tracking/defaults",
1028
1131
  ...options,
1029
1132
  ...params,
1133
+ body: params.body ?? {},
1030
1134
  headers: {
1031
1135
  "Content-Type": "application/json",
1032
1136
  ...options?.headers,
@@ -1075,6 +1179,7 @@ var Email = class {
1075
1179
  url: "/v1/email/tracking/recipients",
1076
1180
  ...options,
1077
1181
  ...params,
1182
+ body: params.body ?? {},
1078
1183
  headers: {
1079
1184
  "Content-Type": "application/json",
1080
1185
  ...options?.headers,
@@ -1144,6 +1249,7 @@ var Email = class {
1144
1249
  url: "/v1/email/domains",
1145
1250
  ...options,
1146
1251
  ...params,
1252
+ body: params.body ?? {},
1147
1253
  headers: {
1148
1254
  "Content-Type": "application/json",
1149
1255
  ...options?.headers,
@@ -1275,6 +1381,7 @@ var Email = class {
1275
1381
  url: "/v1/email/domains/{id}/registrar",
1276
1382
  ...options,
1277
1383
  ...params,
1384
+ body: params.body ?? {},
1278
1385
  headers: {
1279
1386
  "Content-Type": "application/json",
1280
1387
  ...options?.headers,
@@ -1326,6 +1433,7 @@ var Email = class {
1326
1433
  url: "/v1/email/domains/{id}/domain-connect/apply-url",
1327
1434
  ...options,
1328
1435
  ...params,
1436
+ body: params.body ?? {},
1329
1437
  headers: {
1330
1438
  "Content-Type": "application/json",
1331
1439
  ...options?.headers,
@@ -1365,6 +1473,7 @@ var Email = class {
1365
1473
  url: "/v1/email/domains/{id}/domain-connect/complete",
1366
1474
  ...options,
1367
1475
  ...params,
1476
+ body: params.body ?? {},
1368
1477
  headers: {
1369
1478
  "Content-Type": "application/json",
1370
1479
  ...options?.headers,
@@ -1408,6 +1517,7 @@ var Email = class {
1408
1517
  url: "/v1/email/domains/{id}/enable-receiving",
1409
1518
  ...options,
1410
1519
  ...params,
1520
+ body: params.body ?? {},
1411
1521
  headers: {
1412
1522
  "Content-Type": "application/json",
1413
1523
  ...options?.headers,
@@ -1458,7 +1568,7 @@ var Email = class {
1458
1568
  /**
1459
1569
  * Update a domain's send-settings config
1460
1570
  *
1461
- * Overrides the domain's open/click tracking, reply-to, unsubscribe-group defaults, and the brand its mail uses for the settings cascade. An omitted field is left unchanged; null clears it back to the organization default. Returns the saved config.
1571
+ * Overrides the domain's open/click tracking, reply-to, topic defaults, and the brand its mail uses for the settings cascade. An omitted field is left unchanged; null clears it back to the organization default. Returns the saved config.
1462
1572
  */
1463
1573
  static updateDomainConfig(parameters, options) {
1464
1574
  const params = buildClientParams([parameters], [{ args: [
@@ -1480,7 +1590,7 @@ var Email = class {
1480
1590
  },
1481
1591
  {
1482
1592
  in: "body",
1483
- key: "unsubscribeGroupId"
1593
+ key: "topicId"
1484
1594
  },
1485
1595
  {
1486
1596
  in: "body",
@@ -1499,6 +1609,7 @@ var Email = class {
1499
1609
  url: "/v1/email/domains/{id}/config",
1500
1610
  ...options,
1501
1611
  ...params,
1612
+ body: params.body ?? {},
1502
1613
  headers: {
1503
1614
  "Content-Type": "application/json",
1504
1615
  ...options?.headers,
@@ -1574,6 +1685,7 @@ var Email = class {
1574
1685
  url: "/v1/email/domains/{id}/custom-tracking",
1575
1686
  ...options,
1576
1687
  ...params,
1688
+ body: params.body ?? {},
1577
1689
  headers: {
1578
1690
  "Content-Type": "application/json",
1579
1691
  ...options?.headers,
@@ -1673,6 +1785,7 @@ var Email = class {
1673
1785
  url: "/v1/email/domains/{id}/custom-tracking/domain-connect/complete",
1674
1786
  ...options,
1675
1787
  ...params,
1788
+ body: params.body ?? {},
1676
1789
  headers: {
1677
1790
  "Content-Type": "application/json",
1678
1791
  ...options?.headers,
@@ -1762,6 +1875,7 @@ var Email = class {
1762
1875
  url: "/v1/email/senders",
1763
1876
  ...options,
1764
1877
  ...params,
1878
+ body: params.body ?? {},
1765
1879
  headers: {
1766
1880
  "Content-Type": "application/json",
1767
1881
  ...options?.headers,
@@ -1893,6 +2007,7 @@ var Email = class {
1893
2007
  url: "/v1/email/domains/{id}/enable-catch-all",
1894
2008
  ...options,
1895
2009
  ...params,
2010
+ body: params.body ?? {},
1896
2011
  headers: {
1897
2012
  "Content-Type": "application/json",
1898
2013
  ...options?.headers,
@@ -1961,6 +2076,7 @@ var Email = class {
1961
2076
  url: "/v1/email/catch-all/config",
1962
2077
  ...options,
1963
2078
  ...params,
2079
+ body: params.body ?? {},
1964
2080
  headers: {
1965
2081
  "Content-Type": "application/json",
1966
2082
  ...options?.headers,
@@ -2141,6 +2257,7 @@ var Email = class {
2141
2257
  url: "/v1/email/blocks",
2142
2258
  ...options,
2143
2259
  ...params,
2260
+ body: params.body ?? {},
2144
2261
  headers: {
2145
2262
  "Content-Type": "application/json",
2146
2263
  ...options?.headers,
@@ -2204,6 +2321,7 @@ var Email = class {
2204
2321
  url: "/v1/email/blocks/{id}",
2205
2322
  ...options,
2206
2323
  ...params,
2324
+ body: params.body ?? {},
2207
2325
  headers: {
2208
2326
  "Content-Type": "application/json",
2209
2327
  ...options?.headers,
@@ -2271,6 +2389,7 @@ var Email = class {
2271
2389
  url: "/v1/email/blocks/check",
2272
2390
  ...options,
2273
2391
  ...params,
2392
+ body: params.body ?? {},
2274
2393
  headers: {
2275
2394
  "Content-Type": "application/json",
2276
2395
  ...options?.headers,
@@ -2361,6 +2480,7 @@ var Email = class {
2361
2480
  url: "/v1/email/forwarding",
2362
2481
  ...options,
2363
2482
  ...params,
2483
+ body: params.body ?? {},
2364
2484
  headers: {
2365
2485
  "Content-Type": "application/json",
2366
2486
  ...options?.headers,
@@ -2452,6 +2572,7 @@ var Email = class {
2452
2572
  url: "/v1/email/forwarding/{id}",
2453
2573
  ...options,
2454
2574
  ...params,
2575
+ body: params.body ?? {},
2455
2576
  headers: {
2456
2577
  "Content-Type": "application/json",
2457
2578
  ...options?.headers,
@@ -2557,6 +2678,7 @@ var Email = class {
2557
2678
  url: "/v1/email/domains/{id}/warming",
2558
2679
  ...options,
2559
2680
  ...params,
2681
+ body: params.body ?? {},
2560
2682
  headers: {
2561
2683
  "Content-Type": "application/json",
2562
2684
  ...options?.headers,
@@ -2596,6 +2718,7 @@ var Email = class {
2596
2718
  url: "/v1/email/domains/{id}/warming/policy",
2597
2719
  ...options,
2598
2720
  ...params,
2721
+ body: params.body ?? {},
2599
2722
  headers: {
2600
2723
  "Content-Type": "application/json",
2601
2724
  ...options?.headers,
@@ -2647,6 +2770,7 @@ var Email = class {
2647
2770
  url: "/v1/email/domains/{id}/warming/pause",
2648
2771
  ...options,
2649
2772
  ...params,
2773
+ body: params.body ?? {},
2650
2774
  headers: {
2651
2775
  "Content-Type": "application/json",
2652
2776
  ...options?.headers,
@@ -2675,6 +2799,7 @@ var Email = class {
2675
2799
  url: "/v1/email/domains/{id}/warming/resume",
2676
2800
  ...options,
2677
2801
  ...params,
2802
+ body: params.body ?? {},
2678
2803
  headers: {
2679
2804
  "Content-Type": "application/json",
2680
2805
  ...options?.headers,
@@ -2703,6 +2828,7 @@ var Email = class {
2703
2828
  url: "/v1/email/domains/{id}/warming/complete",
2704
2829
  ...options,
2705
2830
  ...params,
2831
+ body: params.body ?? {},
2706
2832
  headers: {
2707
2833
  "Content-Type": "application/json",
2708
2834
  ...options?.headers,
@@ -2748,6 +2874,7 @@ var Media = class {
2748
2874
  url: "/v1/media",
2749
2875
  ...options,
2750
2876
  ...params,
2877
+ body: params.body ?? {},
2751
2878
  headers: {
2752
2879
  "Content-Type": "application/json",
2753
2880
  ...options?.headers,
@@ -3056,6 +3183,7 @@ var Conversations = class {
3056
3183
  url: "/v1/conversations",
3057
3184
  ...options,
3058
3185
  ...params,
3186
+ body: params.body ?? {},
3059
3187
  headers: {
3060
3188
  "Content-Type": "application/json",
3061
3189
  ...options?.headers,
@@ -3163,6 +3291,7 @@ var Conversations = class {
3163
3291
  url: "/v1/conversations/{id}",
3164
3292
  ...options,
3165
3293
  ...params,
3294
+ body: params.body ?? {},
3166
3295
  headers: {
3167
3296
  "Content-Type": "application/json",
3168
3297
  ...options?.headers,
@@ -3229,6 +3358,7 @@ var Conversations = class {
3229
3358
  url: "/v1/conversations/{id}/tags",
3230
3359
  ...options,
3231
3360
  ...params,
3361
+ body: params.body ?? {},
3232
3362
  headers: {
3233
3363
  "Content-Type": "application/json",
3234
3364
  ...options?.headers,
@@ -3257,6 +3387,7 @@ var Conversations = class {
3257
3387
  url: "/v1/conversations/{id}/tags",
3258
3388
  ...options,
3259
3389
  ...params,
3390
+ body: params.body ?? {},
3260
3391
  headers: {
3261
3392
  "Content-Type": "application/json",
3262
3393
  ...options?.headers,
@@ -3285,6 +3416,7 @@ var Conversations = class {
3285
3416
  url: "/v1/conversations/{id}/categories",
3286
3417
  ...options,
3287
3418
  ...params,
3419
+ body: params.body ?? {},
3288
3420
  headers: {
3289
3421
  "Content-Type": "application/json",
3290
3422
  ...options?.headers,
@@ -3313,6 +3445,7 @@ var Conversations = class {
3313
3445
  url: "/v1/conversations/{id}/categories",
3314
3446
  ...options,
3315
3447
  ...params,
3448
+ body: params.body ?? {},
3316
3449
  headers: {
3317
3450
  "Content-Type": "application/json",
3318
3451
  ...options?.headers,
@@ -3341,6 +3474,7 @@ var Conversations = class {
3341
3474
  url: "/v1/conversations/{id}/channels",
3342
3475
  ...options,
3343
3476
  ...params,
3477
+ body: params.body ?? {},
3344
3478
  headers: {
3345
3479
  "Content-Type": "application/json",
3346
3480
  ...options?.headers,
@@ -3369,6 +3503,7 @@ var Conversations = class {
3369
3503
  url: "/v1/conversations/{id}/channels",
3370
3504
  ...options,
3371
3505
  ...params,
3506
+ body: params.body ?? {},
3372
3507
  headers: {
3373
3508
  "Content-Type": "application/json",
3374
3509
  ...options?.headers,
@@ -3379,7 +3514,7 @@ var Conversations = class {
3379
3514
  /**
3380
3515
  * Remove contacts from a conversation
3381
3516
  *
3382
- * Detaches one or more contacts from a conversation and returns the updated conversation.
3517
+ * Detaches one or more contacts from a conversation and returns the updated conversation. One request carries at most 1000 ids.
3383
3518
  */
3384
3519
  static removeContacts(parameters, options) {
3385
3520
  const params = buildClientParams([parameters], [{ args: [{
@@ -3397,6 +3532,7 @@ var Conversations = class {
3397
3532
  url: "/v1/conversations/{id}/contacts",
3398
3533
  ...options,
3399
3534
  ...params,
3535
+ body: params.body ?? {},
3400
3536
  headers: {
3401
3537
  "Content-Type": "application/json",
3402
3538
  ...options?.headers,
@@ -3407,7 +3543,7 @@ var Conversations = class {
3407
3543
  /**
3408
3544
  * Add contacts to a conversation
3409
3545
  *
3410
- * Attaches one or more contacts to a conversation and returns the updated conversation.
3546
+ * Attaches one or more contacts to a conversation and returns the updated conversation. One request carries at most 1000 ids.
3411
3547
  */
3412
3548
  static addContacts(parameters, options) {
3413
3549
  const params = buildClientParams([parameters], [{ args: [{
@@ -3425,6 +3561,7 @@ var Conversations = class {
3425
3561
  url: "/v1/conversations/{id}/contacts",
3426
3562
  ...options,
3427
3563
  ...params,
3564
+ body: params.body ?? {},
3428
3565
  headers: {
3429
3566
  "Content-Type": "application/json",
3430
3567
  ...options?.headers,
@@ -3556,6 +3693,7 @@ var Contacts = class {
3556
3693
  url: "/v1/contacts",
3557
3694
  ...options,
3558
3695
  ...params,
3696
+ body: params.body ?? {},
3559
3697
  headers: {
3560
3698
  "Content-Type": "application/json",
3561
3699
  ...options?.headers,
@@ -3595,6 +3733,7 @@ var Contacts = class {
3595
3733
  url: "/v1/contacts/find",
3596
3734
  ...options,
3597
3735
  ...params,
3736
+ body: params.body ?? {},
3598
3737
  headers: {
3599
3738
  "Content-Type": "application/json",
3600
3739
  ...options?.headers,
@@ -3630,6 +3769,7 @@ var Contacts = class {
3630
3769
  url: "/v1/contacts/find-or-create",
3631
3770
  ...options,
3632
3771
  ...params,
3772
+ body: params.body ?? {},
3633
3773
  headers: {
3634
3774
  "Content-Type": "application/json",
3635
3775
  ...options?.headers,
@@ -3733,6 +3873,7 @@ var Contacts = class {
3733
3873
  url: "/v1/contacts/{id}",
3734
3874
  ...options,
3735
3875
  ...params,
3876
+ body: params.body ?? {},
3736
3877
  headers: {
3737
3878
  "Content-Type": "application/json",
3738
3879
  ...options?.headers,
@@ -3772,6 +3913,7 @@ var Contacts = class {
3772
3913
  url: "/v1/contacts/{id}/identities",
3773
3914
  ...options,
3774
3915
  ...params,
3916
+ body: params.body ?? {},
3775
3917
  headers: {
3776
3918
  "Content-Type": "application/json",
3777
3919
  ...options?.headers,
@@ -3846,6 +3988,7 @@ var Contacts = class {
3846
3988
  url: "/v1/contacts/{id}/identities/{identityId}/consent/{channel}",
3847
3989
  ...options,
3848
3990
  ...params,
3991
+ body: params.body ?? {},
3849
3992
  headers: {
3850
3993
  "Content-Type": "application/json",
3851
3994
  ...options?.headers,
@@ -3874,6 +4017,7 @@ var Contacts = class {
3874
4017
  url: "/v1/contacts/{id}/tags",
3875
4018
  ...options,
3876
4019
  ...params,
4020
+ body: params.body ?? {},
3877
4021
  headers: {
3878
4022
  "Content-Type": "application/json",
3879
4023
  ...options?.headers,
@@ -3902,6 +4046,7 @@ var Contacts = class {
3902
4046
  url: "/v1/contacts/{id}/tags",
3903
4047
  ...options,
3904
4048
  ...params,
4049
+ body: params.body ?? {},
3905
4050
  headers: {
3906
4051
  "Content-Type": "application/json",
3907
4052
  ...options?.headers,
@@ -3930,23 +4075,27 @@ var Contacts = class {
3930
4075
  });
3931
4076
  }
3932
4077
  /**
3933
- * Bulk import contacts
4078
+ * Preview a list migration
3934
4079
  *
3935
- * Creates contacts in bulk from a list of entries shaped like a create request, returning per-entry results with created, updated, skipped, and error counts. An entry whose identities match an existing contact is skipped, or updates it with `onConflict: "update"`.
4080
+ * The complete encoded JSON request must not exceed 3000000 bytes. Reads multiple declared export files without changing contacts. Restrictive evidence wins per address. Returns estimated counts and at most 100 diagnostics; processing rechecks current restrictions. Filenames never establish permission. Requires listMigration. Missing required columns refuse the file; unknown status values are conflicts and never subscribe a reader.
3936
4081
  */
3937
- static bulkImport(parameters, options) {
4082
+ static planImport(parameters, options) {
3938
4083
  const params = buildClientParams([parameters], [{ args: [
3939
4084
  {
3940
4085
  in: "body",
3941
- key: "namespaceId"
4086
+ key: "preset"
3942
4087
  },
3943
4088
  {
3944
4089
  in: "body",
3945
- key: "contacts"
4090
+ key: "topicId"
4091
+ },
4092
+ {
4093
+ in: "body",
4094
+ key: "namespaceId"
3946
4095
  },
3947
4096
  {
3948
4097
  in: "body",
3949
- key: "onConflict"
4098
+ key: "files"
3950
4099
  }
3951
4100
  ] }]);
3952
4101
  return (options?.client ?? client).post({
@@ -3954,9 +4103,10 @@ var Contacts = class {
3954
4103
  name: "x-api-key",
3955
4104
  type: "apiKey"
3956
4105
  }],
3957
- url: "/v1/contacts/bulk-import",
4106
+ url: "/v1/contacts/imports/plan",
3958
4107
  ...options,
3959
4108
  ...params,
4109
+ body: params.body ?? {},
3960
4110
  headers: {
3961
4111
  "Content-Type": "application/json",
3962
4112
  ...options?.headers,
@@ -3965,9 +4115,51 @@ var Contacts = class {
3965
4115
  });
3966
4116
  }
3967
4117
  /**
4118
+ * Start or resume a list migration
4119
+ *
4120
+ * The complete encoded JSON request, including new-start metadata, must not exceed 3000000 bytes. Admits a durable import using the preview hash and an idempotency key, or resumes the same persisted input at its committed cursor. Imports never restore an existing unsubscribe, suppression or bounce. Namespace-scoped credentials cannot create organization-wide suppressions; those rows are conflicts and create no contact. New active contacts are billable and normal contact events apply. Requires listMigration for new admissions.
4121
+ */
4122
+ static startImport(parameters, options) {
4123
+ const params = { body: parameters };
4124
+ return (options?.client ?? client).post({
4125
+ security: [{
4126
+ name: "x-api-key",
4127
+ type: "apiKey"
4128
+ }],
4129
+ url: "/v1/contacts/imports",
4130
+ ...options,
4131
+ ...params,
4132
+ headers: {
4133
+ "Content-Type": "application/json",
4134
+ ...options?.headers,
4135
+ ...params.headers
4136
+ }
4137
+ });
4138
+ }
4139
+ /**
4140
+ * Get list migration progress
4141
+ *
4142
+ * Returns the visible import job's committed counts, generation, terminal failure and resumability. The job persists across worker restarts and page reloads. Admitted jobs remain readable when listMigration is disabled.
4143
+ */
4144
+ static getImportJob(parameters, options) {
4145
+ const params = buildClientParams([parameters], [{ args: [{
4146
+ in: "path",
4147
+ key: "id"
4148
+ }] }]);
4149
+ return (options?.client ?? client).get({
4150
+ security: [{
4151
+ name: "x-api-key",
4152
+ type: "apiKey"
4153
+ }],
4154
+ url: "/v1/contacts/imports/{id}",
4155
+ ...options,
4156
+ ...params
4157
+ });
4158
+ }
4159
+ /**
3968
4160
  * Bulk delete contacts
3969
4161
  *
3970
- * Permanently deletes multiple contacts by ID, returning counts of deleted and failed records.
4162
+ * Permanently deletes multiple contacts by ID, returning counts of deleted and failed records. One request carries at most 1000 ids.
3971
4163
  */
3972
4164
  static bulkDelete(parameters, options) {
3973
4165
  const params = buildClientParams([parameters], [{ args: [{
@@ -3982,6 +4174,7 @@ var Contacts = class {
3982
4174
  url: "/v1/contacts/bulk-delete",
3983
4175
  ...options,
3984
4176
  ...params,
4177
+ body: params.body ?? {},
3985
4178
  headers: {
3986
4179
  "Content-Type": "application/json",
3987
4180
  ...options?.headers,
@@ -3992,7 +4185,7 @@ var Contacts = class {
3992
4185
  /**
3993
4186
  * Bulk update contact tags
3994
4187
  *
3995
- * Adds, removes, or replaces tags on multiple contacts in one request, returning counts of updated and failed records.
4188
+ * Adds, removes, or replaces tags on multiple contacts in one request, returning counts of updated and failed records. One request carries at most 1000 ids.
3996
4189
  */
3997
4190
  static bulkUpdateTags(parameters, options) {
3998
4191
  const params = buildClientParams([parameters], [{ args: [
@@ -4017,6 +4210,7 @@ var Contacts = class {
4017
4210
  url: "/v1/contacts/bulk-update-tags",
4018
4211
  ...options,
4019
4212
  ...params,
4213
+ body: params.body ?? {},
4020
4214
  headers: {
4021
4215
  "Content-Type": "application/json",
4022
4216
  ...options?.headers,
@@ -4027,7 +4221,7 @@ var Contacts = class {
4027
4221
  /**
4028
4222
  * Bulk update contact status
4029
4223
  *
4030
- * Sets the status on multiple contacts in one request, returning counts of updated and failed records.
4224
+ * Sets the status on multiple contacts in one request, returning counts of updated and failed records. One request carries at most 1000 ids.
4031
4225
  */
4032
4226
  static bulkUpdateStatus(parameters, options) {
4033
4227
  const params = buildClientParams([parameters], [{ args: [{
@@ -4045,6 +4239,7 @@ var Contacts = class {
4045
4239
  url: "/v1/contacts/bulk-update-status",
4046
4240
  ...options,
4047
4241
  ...params,
4242
+ body: params.body ?? {},
4048
4243
  headers: {
4049
4244
  "Content-Type": "application/json",
4050
4245
  ...options?.headers,
@@ -4055,7 +4250,7 @@ var Contacts = class {
4055
4250
  /**
4056
4251
  * Export contacts
4057
4252
  *
4058
- * Exports contacts as JSON or CSV, returning the serialized data and a count of exported records.
4253
+ * Exports contacts as JSON or CSV, returning the serialized data and a count of exported records. The ids filter takes at most 1000 ids.
4059
4254
  */
4060
4255
  static export(parameters, options) {
4061
4256
  const params = buildClientParams([parameters], [{ args: [
@@ -4084,6 +4279,7 @@ var Contacts = class {
4084
4279
  url: "/v1/contacts/export",
4085
4280
  ...options,
4086
4281
  ...params,
4282
+ body: params.body ?? {},
4087
4283
  headers: {
4088
4284
  "Content-Type": "application/json",
4089
4285
  ...options?.headers,
@@ -4193,6 +4389,7 @@ var Events = class {
4193
4389
  url: "/v1/events",
4194
4390
  ...options,
4195
4391
  ...params,
4392
+ body: params.body ?? {},
4196
4393
  headers: {
4197
4394
  "Content-Type": "application/json",
4198
4395
  ...options?.headers,
@@ -4218,6 +4415,7 @@ var Events = class {
4218
4415
  url: "/v1/events/batch",
4219
4416
  ...options,
4220
4417
  ...params,
4418
+ body: params.body ?? {},
4221
4419
  headers: {
4222
4420
  "Content-Type": "application/json",
4223
4421
  ...options?.headers,
@@ -4310,6 +4508,7 @@ var Journeys = class {
4310
4508
  url: "/v1/journeys",
4311
4509
  ...options,
4312
4510
  ...params,
4511
+ body: params.body ?? {},
4313
4512
  headers: {
4314
4513
  "Content-Type": "application/json",
4315
4514
  ...options?.headers,
@@ -4378,6 +4577,7 @@ var Journeys = class {
4378
4577
  url: "/v1/journeys/{id}",
4379
4578
  ...options,
4380
4579
  ...params,
4580
+ body: params.body ?? {},
4381
4581
  headers: {
4382
4582
  "Content-Type": "application/json",
4383
4583
  ...options?.headers,
@@ -4413,6 +4613,7 @@ var Journeys = class {
4413
4613
  url: "/v1/journeys/{id}/draft",
4414
4614
  ...options,
4415
4615
  ...params,
4616
+ body: params.body ?? {},
4416
4617
  headers: {
4417
4618
  "Content-Type": "application/json",
4418
4619
  ...options?.headers,
@@ -4441,6 +4642,7 @@ var Journeys = class {
4441
4642
  url: "/v1/journeys/{id}/publish",
4442
4643
  ...options,
4443
4644
  ...params,
4645
+ body: params.body ?? {},
4444
4646
  headers: {
4445
4647
  "Content-Type": "application/json",
4446
4648
  ...options?.headers,
@@ -4668,6 +4870,7 @@ var Agents = class {
4668
4870
  url: "/v1/agents",
4669
4871
  ...options,
4670
4872
  ...params,
4873
+ body: params.body ?? {},
4671
4874
  headers: {
4672
4875
  "Content-Type": "application/json",
4673
4876
  ...options?.headers,
@@ -4736,6 +4939,7 @@ var Agents = class {
4736
4939
  url: "/v1/agents/{id}",
4737
4940
  ...options,
4738
4941
  ...params,
4942
+ body: params.body ?? {},
4739
4943
  headers: {
4740
4944
  "Content-Type": "application/json",
4741
4945
  ...options?.headers,
@@ -4771,6 +4975,7 @@ var Agents = class {
4771
4975
  url: "/v1/agents/{id}/draft",
4772
4976
  ...options,
4773
4977
  ...params,
4978
+ body: params.body ?? {},
4774
4979
  headers: {
4775
4980
  "Content-Type": "application/json",
4776
4981
  ...options?.headers,
@@ -4799,6 +5004,7 @@ var Agents = class {
4799
5004
  url: "/v1/agents/{id}/publish",
4800
5005
  ...options,
4801
5006
  ...params,
5007
+ body: params.body ?? {},
4802
5008
  headers: {
4803
5009
  "Content-Type": "application/json",
4804
5010
  ...options?.headers,
@@ -4864,7 +5070,7 @@ var Subscriptions = class {
4864
5070
  /**
4865
5071
  * Request subscription confirmation
4866
5072
  *
4867
- * Sends a confirmation email from your sender. Only the recipient's explicit confirmation adds them to the active static contact group and clears the optional unsubscribe group. The link expires after seven days and can be used once. A custom published email template receives confirmUrl. Sending follows ordinary sender, admission, billing, and brand-footer settings. Requires email send authority in addition to the declared contact grants, including the optional unsubscribe preference change.
5073
+ * Sends a confirmation email from your sender. Only the recipient's explicit confirmation creates their contact and subscribes them to the named topic. The link expires after seven days and can be used once. A custom published email template receives confirmUrl. Sending follows ordinary sender, admission, billing, and brand-footer settings. Requires email send authority in addition to the declared contact grants, including the topic subscription change.
4868
5074
  */
4869
5075
  static subscribe(parameters, options) {
4870
5076
  const params = buildClientParams([parameters], [{ args: [
@@ -4874,16 +5080,12 @@ var Subscriptions = class {
4874
5080
  },
4875
5081
  {
4876
5082
  in: "body",
4877
- key: "contactGroupId"
5083
+ key: "topicId"
4878
5084
  },
4879
5085
  {
4880
5086
  in: "body",
4881
5087
  key: "from"
4882
5088
  },
4883
- {
4884
- in: "body",
4885
- key: "unsubscribeGroupId"
4886
- },
4887
5089
  {
4888
5090
  in: "body",
4889
5091
  key: "templateSlug"
@@ -4905,6 +5107,7 @@ var Subscriptions = class {
4905
5107
  url: "/v1/subscriptions",
4906
5108
  ...options,
4907
5109
  ...params,
5110
+ body: params.body ?? {},
4908
5111
  headers: {
4909
5112
  "Content-Type": "application/json",
4910
5113
  ...options?.headers,
@@ -4996,6 +5199,7 @@ var ContactGroups = class {
4996
5199
  url: "/v1/contact-groups",
4997
5200
  ...options,
4998
5201
  ...params,
5202
+ body: params.body ?? {},
4999
5203
  headers: {
5000
5204
  "Content-Type": "application/json",
5001
5205
  ...options?.headers,
@@ -5095,6 +5299,7 @@ var ContactGroups = class {
5095
5299
  url: "/v1/contact-groups/{id}",
5096
5300
  ...options,
5097
5301
  ...params,
5302
+ body: params.body ?? {},
5098
5303
  headers: {
5099
5304
  "Content-Type": "application/json",
5100
5305
  ...options?.headers,
@@ -5105,7 +5310,7 @@ var ContactGroups = class {
5105
5310
  /**
5106
5311
  * Remove members from a contact group
5107
5312
  *
5108
- * Removes one or more contacts from a contact group, returning the count of removed members.
5313
+ * Removes one or more contacts from a contact group, returning the count of removed members. One request carries at most 1000 ids.
5109
5314
  */
5110
5315
  static removeMembers(parameters, options) {
5111
5316
  const params = buildClientParams([parameters], [{ args: [{
@@ -5123,6 +5328,7 @@ var ContactGroups = class {
5123
5328
  url: "/v1/contact-groups/{id}/members",
5124
5329
  ...options,
5125
5330
  ...params,
5331
+ body: params.body ?? {},
5126
5332
  headers: {
5127
5333
  "Content-Type": "application/json",
5128
5334
  ...options?.headers,
@@ -5163,7 +5369,7 @@ var ContactGroups = class {
5163
5369
  /**
5164
5370
  * Add members to a contact group
5165
5371
  *
5166
- * Adds one or more contacts to a contact group, returning counts of added and skipped members.
5372
+ * Adds one or more contacts to a contact group, returning counts of added and skipped members. One request carries at most 1000 ids.
5167
5373
  */
5168
5374
  static addMembers(parameters, options) {
5169
5375
  const params = buildClientParams([parameters], [{ args: [
@@ -5188,6 +5394,7 @@ var ContactGroups = class {
5188
5394
  url: "/v1/contact-groups/{id}/members",
5189
5395
  ...options,
5190
5396
  ...params,
5397
+ body: params.body ?? {},
5191
5398
  headers: {
5192
5399
  "Content-Type": "application/json",
5193
5400
  ...options?.headers,
@@ -5233,6 +5440,7 @@ var ContactGroups = class {
5233
5440
  url: "/v1/contact-groups/preview",
5234
5441
  ...options,
5235
5442
  ...params,
5443
+ body: params.body ?? {},
5236
5444
  headers: {
5237
5445
  "Content-Type": "application/json",
5238
5446
  ...options?.headers,
@@ -5301,6 +5509,7 @@ var CustomFields = class {
5301
5509
  url: "/v1/custom-fields",
5302
5510
  ...options,
5303
5511
  ...params,
5512
+ body: params.body ?? {},
5304
5513
  headers: {
5305
5514
  "Content-Type": "application/json",
5306
5515
  ...options?.headers,
@@ -5368,6 +5577,7 @@ var CustomFields = class {
5368
5577
  url: "/v1/custom-fields/{id}",
5369
5578
  ...options,
5370
5579
  ...params,
5580
+ body: params.body ?? {},
5371
5581
  headers: {
5372
5582
  "Content-Type": "application/json",
5373
5583
  ...options?.headers,
@@ -5376,43 +5586,72 @@ var CustomFields = class {
5376
5586
  });
5377
5587
  }
5378
5588
  };
5379
- var Unsubscribe = class {
5589
+ var Topics = class {
5380
5590
  /**
5381
- * List unsubscribe groups
5591
+ * List topics
5382
5592
  *
5383
- * Returns every unsubscribe group in the organization, the default group first, then by name. An organization holds at most 200, so the list is never paged.
5593
+ * Lists visible topics, default first then by name. The organization holds at most 200 topics, so the list is bounded and unpaged.
5384
5594
  */
5385
- static list(options) {
5595
+ static list(parameters, options) {
5596
+ const params = buildClientParams([parameters], [{ args: [{
5597
+ in: "query",
5598
+ key: "namespaceId"
5599
+ }] }]);
5386
5600
  return (options?.client ?? client).get({
5387
5601
  security: [{
5388
5602
  name: "x-api-key",
5389
5603
  type: "apiKey"
5390
5604
  }],
5391
- url: "/v1/unsubscribe-groups",
5392
- ...options
5605
+ url: "/v1/topics",
5606
+ ...options,
5607
+ ...params
5393
5608
  });
5394
5609
  }
5395
5610
  /**
5396
- * Create an unsubscribe group
5611
+ * Create a topic
5397
5612
  *
5398
- * Creates a new unsubscribe group and returns it with a 201 Created status. An organization holds at most 200 groups.
5613
+ * Creates a topic in the caller's or requested namespace. The subscription default is opt_out when omitted. Publishing defaults must be compatible with that namespace. An organization holds at most 200 topics.
5399
5614
  */
5400
5615
  static create(parameters, options) {
5401
- const params = buildClientParams([parameters], [{ args: [{
5402
- in: "body",
5403
- key: "name"
5404
- }, {
5405
- in: "body",
5406
- key: "description"
5407
- }] }]);
5616
+ const params = buildClientParams([parameters], [{ args: [
5617
+ {
5618
+ in: "body",
5619
+ key: "name"
5620
+ },
5621
+ {
5622
+ in: "body",
5623
+ key: "description"
5624
+ },
5625
+ {
5626
+ in: "body",
5627
+ key: "namespaceId"
5628
+ },
5629
+ {
5630
+ in: "body",
5631
+ key: "default"
5632
+ },
5633
+ {
5634
+ in: "body",
5635
+ key: "defaultSenderId"
5636
+ },
5637
+ {
5638
+ in: "body",
5639
+ key: "replyMailboxId"
5640
+ },
5641
+ {
5642
+ in: "body",
5643
+ key: "templateId"
5644
+ }
5645
+ ] }]);
5408
5646
  return (options?.client ?? client).post({
5409
5647
  security: [{
5410
5648
  name: "x-api-key",
5411
5649
  type: "apiKey"
5412
5650
  }],
5413
- url: "/v1/unsubscribe-groups",
5651
+ url: "/v1/topics",
5414
5652
  ...options,
5415
5653
  ...params,
5654
+ body: params.body ?? {},
5416
5655
  headers: {
5417
5656
  "Content-Type": "application/json",
5418
5657
  ...options?.headers,
@@ -5421,9 +5660,51 @@ var Unsubscribe = class {
5421
5660
  });
5422
5661
  }
5423
5662
  /**
5424
- * Delete an unsubscribe group
5663
+ * Check topic subscriptions
5664
+ *
5665
+ * Name exactly one contactId, email, or phone and a channel. Returns effective status, using the topic default when no explicit subscription exists. topicIds is an optional comma-separated list. Addresses resolve within the requested namespace; an unknown address returns contactId null and the effective defaults.
5666
+ */
5667
+ static checkSubscription(parameters, options) {
5668
+ const params = buildClientParams([parameters], [{ args: [
5669
+ {
5670
+ in: "query",
5671
+ key: "contactId"
5672
+ },
5673
+ {
5674
+ in: "query",
5675
+ key: "email"
5676
+ },
5677
+ {
5678
+ in: "query",
5679
+ key: "phone"
5680
+ },
5681
+ {
5682
+ in: "query",
5683
+ key: "namespaceId"
5684
+ },
5685
+ {
5686
+ in: "query",
5687
+ key: "channel"
5688
+ },
5689
+ {
5690
+ in: "query",
5691
+ key: "topicIds"
5692
+ }
5693
+ ] }]);
5694
+ return (options?.client ?? client).get({
5695
+ security: [{
5696
+ name: "x-api-key",
5697
+ type: "apiKey"
5698
+ }],
5699
+ url: "/v1/topics/check",
5700
+ ...options,
5701
+ ...params
5702
+ });
5703
+ }
5704
+ /**
5705
+ * Delete a topic
5425
5706
  *
5426
- * Permanently deletes an unsubscribe group by its ID. The default group cannot be deleted; make another group the default first. A group a scheduled or running campaign uses cannot be deleted until that run finishes or is cancelled.
5707
+ * Refuses the default topic and any topic a scheduled or running campaign uses.
5427
5708
  */
5428
5709
  static remove(parameters, options) {
5429
5710
  const params = buildClientParams([parameters], [{ args: [{
@@ -5435,15 +5716,35 @@ var Unsubscribe = class {
5435
5716
  name: "x-api-key",
5436
5717
  type: "apiKey"
5437
5718
  }],
5438
- url: "/v1/unsubscribe-groups/{id}",
5719
+ url: "/v1/topics/{id}",
5439
5720
  ...options,
5440
5721
  ...params
5441
5722
  });
5442
5723
  }
5443
5724
  /**
5444
- * Update an unsubscribe group
5725
+ * Get a topic
5445
5726
  *
5446
- * Updates the name or description of an unsubscribe group.
5727
+ * Returns a visible topic, its publishing defaults, and explicit subscription counts by channel and status. Individual subscriptions are read through listSubscriptions.
5728
+ */
5729
+ static get(parameters, options) {
5730
+ const params = buildClientParams([parameters], [{ args: [{
5731
+ in: "path",
5732
+ key: "id"
5733
+ }] }]);
5734
+ return (options?.client ?? client).get({
5735
+ security: [{
5736
+ name: "x-api-key",
5737
+ type: "apiKey"
5738
+ }],
5739
+ url: "/v1/topics/{id}",
5740
+ ...options,
5741
+ ...params
5742
+ });
5743
+ }
5744
+ /**
5745
+ * Update a topic
5746
+ *
5747
+ * Updates named fields. Changing the default does not change any explicit subscription status. Null clears a publishing default.
5447
5748
  */
5448
5749
  static update(parameters, options) {
5449
5750
  const params = buildClientParams([parameters], [{ args: [
@@ -5458,6 +5759,22 @@ var Unsubscribe = class {
5458
5759
  {
5459
5760
  in: "body",
5460
5761
  key: "description"
5762
+ },
5763
+ {
5764
+ in: "body",
5765
+ key: "default"
5766
+ },
5767
+ {
5768
+ in: "body",
5769
+ key: "defaultSenderId"
5770
+ },
5771
+ {
5772
+ in: "body",
5773
+ key: "replyMailboxId"
5774
+ },
5775
+ {
5776
+ in: "body",
5777
+ key: "templateId"
5461
5778
  }
5462
5779
  ] }]);
5463
5780
  return (options?.client ?? client).patch({
@@ -5465,9 +5782,10 @@ var Unsubscribe = class {
5465
5782
  name: "x-api-key",
5466
5783
  type: "apiKey"
5467
5784
  }],
5468
- url: "/v1/unsubscribe-groups/{id}",
5785
+ url: "/v1/topics/{id}",
5469
5786
  ...options,
5470
5787
  ...params,
5788
+ body: params.body ?? {},
5471
5789
  headers: {
5472
5790
  "Content-Type": "application/json",
5473
5791
  ...options?.headers,
@@ -5476,9 +5794,9 @@ var Unsubscribe = class {
5476
5794
  });
5477
5795
  }
5478
5796
  /**
5479
- * Make an unsubscribe group the default
5797
+ * Make a topic the default
5480
5798
  *
5481
- * Makes this group the organization's default: campaigns that name no group, and whose template and sending domain name none, unsubscribe recipients from it.
5799
+ * Makes this the default category of messages in its namespace. Existing explicit subscription statuses remain unchanged.
5482
5800
  */
5483
5801
  static setDefault(parameters, options) {
5484
5802
  const params = buildClientParams([parameters], [{ args: [{
@@ -5490,75 +5808,121 @@ var Unsubscribe = class {
5490
5808
  name: "x-api-key",
5491
5809
  type: "apiKey"
5492
5810
  }],
5493
- url: "/v1/unsubscribe-groups/{id}/default",
5811
+ url: "/v1/topics/{id}/default",
5494
5812
  ...options,
5495
5813
  ...params
5496
5814
  });
5497
5815
  }
5498
5816
  /**
5499
- * Remove contacts from an unsubscribe group
5817
+ * List topic subscriptions
5500
5818
  *
5501
- * Returns contacts to an unsubscribe group's audience and returns the number removed. Each member is a contact ID, an email address, or a phone number; an address no contact holds is skipped.
5819
+ * Returns explicit per-channel subscriptions, newest first, optionally filtered by channel and status. Pass nextCursor as cursor to continue; nextCursor is null on the last page. Contacts without an explicit subscription are absent from this list.
5502
5820
  */
5503
- static removeMembers(parameters, options) {
5504
- const params = buildClientParams([parameters], [{ args: [{
5505
- in: "path",
5506
- key: "id"
5507
- }, {
5508
- in: "body",
5509
- key: "members"
5510
- }] }]);
5511
- return (options?.client ?? client).delete({
5821
+ static listSubscriptions(parameters, options) {
5822
+ const params = buildClientParams([parameters], [{ args: [
5823
+ {
5824
+ in: "path",
5825
+ key: "id"
5826
+ },
5827
+ {
5828
+ in: "query",
5829
+ key: "limit"
5830
+ },
5831
+ {
5832
+ in: "query",
5833
+ key: "cursor"
5834
+ },
5835
+ {
5836
+ in: "query",
5837
+ key: "channel"
5838
+ },
5839
+ {
5840
+ in: "query",
5841
+ key: "status"
5842
+ }
5843
+ ] }]);
5844
+ return (options?.client ?? client).get({
5512
5845
  security: [{
5513
5846
  name: "x-api-key",
5514
5847
  type: "apiKey"
5515
5848
  }],
5516
- url: "/v1/unsubscribe-groups/{id}/members",
5849
+ url: "/v1/topics/{id}/subscriptions",
5517
5850
  ...options,
5518
- ...params,
5519
- headers: {
5520
- "Content-Type": "application/json",
5521
- ...options?.headers,
5522
- ...params.headers
5523
- }
5851
+ ...params
5524
5852
  });
5525
5853
  }
5526
5854
  /**
5527
- * List unsubscribe group members
5855
+ * Set topic subscriptions
5528
5856
  *
5529
- * Returns the contacts that have left an unsubscribe group, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.
5857
+ * Upserts explicit subscribed or unsubscribed status for one channel. Each contact is named by ID, email, or phone. New addresses create contacts in the topic's namespace. Repeating the same status is idempotent.
5530
5858
  */
5531
- static listMembers(parameters, options) {
5859
+ static setSubscriptions(parameters, options) {
5532
5860
  const params = buildClientParams([parameters], [{ args: [
5533
5861
  {
5534
5862
  in: "path",
5535
5863
  key: "id"
5536
5864
  },
5537
5865
  {
5538
- in: "query",
5539
- key: "limit"
5866
+ in: "body",
5867
+ key: "contacts"
5540
5868
  },
5541
5869
  {
5542
- in: "query",
5543
- key: "cursor"
5870
+ in: "body",
5871
+ key: "channel"
5872
+ },
5873
+ {
5874
+ in: "body",
5875
+ key: "status"
5876
+ },
5877
+ {
5878
+ in: "body",
5879
+ key: "source"
5544
5880
  }
5545
5881
  ] }]);
5882
+ return (options?.client ?? client).post({
5883
+ security: [{
5884
+ name: "x-api-key",
5885
+ type: "apiKey"
5886
+ }],
5887
+ url: "/v1/topics/{id}/subscriptions",
5888
+ ...options,
5889
+ ...params,
5890
+ body: params.body ?? {},
5891
+ headers: {
5892
+ "Content-Type": "application/json",
5893
+ ...options?.headers,
5894
+ ...params.headers
5895
+ }
5896
+ });
5897
+ }
5898
+ };
5899
+ var TopicForms = class {
5900
+ /**
5901
+ * List topic forms
5902
+ *
5903
+ * Lists the signup forms belonging to the visible topic. Requires topicSignup. Forms contain exact HTTPS allowed origins, bounded confirmation and success copy, an optional HTTPS redirect, and a public key for hosted or embedded signup.
5904
+ */
5905
+ static list(parameters, options) {
5906
+ const params = buildClientParams([parameters], [{ args: [{
5907
+ in: "path",
5908
+ key: "id"
5909
+ }] }]);
5546
5910
  return (options?.client ?? client).get({
5547
5911
  security: [{
5548
5912
  name: "x-api-key",
5549
5913
  type: "apiKey"
5550
5914
  }],
5551
- url: "/v1/unsubscribe-groups/{id}/members",
5915
+ url: "/v1/topics/{id}/forms",
5552
5916
  ...options,
5553
5917
  ...params
5554
5918
  });
5555
5919
  }
5556
5920
  /**
5557
- * Add contacts to an unsubscribe group
5921
+ * Create a topic form
5558
5922
  *
5559
- * Moves contacts out of an unsubscribe group's audience and returns the number added and the number skipped. Leaving a group stops that group's sends to the contact on every channel. Each member is a contact ID, an email address, or a phone number; an address no contact holds gets a new contact, so an import from another email service needs no contacts first.
5923
+ * Creates a signup form for the visible topic and returns 201. The server generates its opaque public key. allowedOrigins contains exact HTTPS origins; the canonical web origin and current topic link origin are also accepted. Copy is plain text and redirectUrl is HTTPS or null. Requires topicSignup.
5560
5924
  */
5561
- static addMembers(parameters, options) {
5925
+ static create(parameters, options) {
5562
5926
  const params = buildClientParams([parameters], [{ args: [
5563
5927
  {
5564
5928
  in: "path",
@@ -5566,11 +5930,27 @@ var Unsubscribe = class {
5566
5930
  },
5567
5931
  {
5568
5932
  in: "body",
5569
- key: "members"
5933
+ key: "allowedOrigins"
5570
5934
  },
5571
5935
  {
5572
5936
  in: "body",
5573
- key: "source"
5937
+ key: "confirmationTitle"
5938
+ },
5939
+ {
5940
+ in: "body",
5941
+ key: "confirmationMessage"
5942
+ },
5943
+ {
5944
+ in: "body",
5945
+ key: "successTitle"
5946
+ },
5947
+ {
5948
+ in: "body",
5949
+ key: "successMessage"
5950
+ },
5951
+ {
5952
+ in: "body",
5953
+ key: "redirectUrl"
5574
5954
  }
5575
5955
  ] }]);
5576
5956
  return (options?.client ?? client).post({
@@ -5578,9 +5958,10 @@ var Unsubscribe = class {
5578
5958
  name: "x-api-key",
5579
5959
  type: "apiKey"
5580
5960
  }],
5581
- url: "/v1/unsubscribe-groups/{id}/members",
5961
+ url: "/v1/topics/{id}/forms",
5582
5962
  ...options,
5583
5963
  ...params,
5964
+ body: params.body ?? {},
5584
5965
  headers: {
5585
5966
  "Content-Type": "application/json",
5586
5967
  ...options?.headers,
@@ -5589,37 +5970,105 @@ var Unsubscribe = class {
5589
5970
  });
5590
5971
  }
5591
5972
  /**
5592
- * Check unsubscribe group membership
5973
+ * Delete a topic form
5593
5974
  *
5594
- * Returns the unsubscribe groups a contact has left, optionally limited to a specified set of groups. Name the contact by exactly one of `contactId`, `email`, or `phone`. Membership belongs to the contact, so the answer is the same whichever identifier names it; `contactId` is null, and no groups are returned, when no contact holds the email or phone.
5975
+ * Deletes a form belonging to the visible topic. Its public key immediately stops accepting signups. Existing email confirmation links keep their snapshotted copy and remain valid until expiry. Requires topicSignup.
5595
5976
  */
5596
- static checkSubscription(parameters, options) {
5977
+ static remove(parameters, options) {
5978
+ const params = buildClientParams([parameters], [{ args: [{
5979
+ in: "path",
5980
+ key: "id"
5981
+ }, {
5982
+ in: "path",
5983
+ key: "formId"
5984
+ }] }]);
5985
+ return (options?.client ?? client).delete({
5986
+ security: [{
5987
+ name: "x-api-key",
5988
+ type: "apiKey"
5989
+ }],
5990
+ url: "/v1/topics/{id}/forms/{formId}",
5991
+ ...options,
5992
+ ...params
5993
+ });
5994
+ }
5995
+ /**
5996
+ * Get a topic form
5997
+ *
5998
+ * Returns a signup form belonging to the visible topic, including its public key and current link origin. Forms outside the caller namespace or organization return 404. Requires topicSignup.
5999
+ */
6000
+ static get(parameters, options) {
6001
+ const params = buildClientParams([parameters], [{ args: [{
6002
+ in: "path",
6003
+ key: "id"
6004
+ }, {
6005
+ in: "path",
6006
+ key: "formId"
6007
+ }] }]);
6008
+ return (options?.client ?? client).get({
6009
+ security: [{
6010
+ name: "x-api-key",
6011
+ type: "apiKey"
6012
+ }],
6013
+ url: "/v1/topics/{id}/forms/{formId}",
6014
+ ...options,
6015
+ ...params
6016
+ });
6017
+ }
6018
+ /**
6019
+ * Update a topic form
6020
+ *
6021
+ * Updates only the supplied form fields. allowedOrigins replaces the complete exact-origin allowlist; redirectUrl null clears the success redirect. The public key remains stable. Requires topicSignup.
6022
+ */
6023
+ static update(parameters, options) {
5597
6024
  const params = buildClientParams([parameters], [{ args: [
5598
6025
  {
5599
- in: "query",
5600
- key: "contactId"
6026
+ in: "path",
6027
+ key: "id"
5601
6028
  },
5602
6029
  {
5603
- in: "query",
5604
- key: "email"
6030
+ in: "path",
6031
+ key: "formId"
5605
6032
  },
5606
6033
  {
5607
- in: "query",
5608
- key: "phone"
6034
+ in: "body",
6035
+ key: "allowedOrigins"
5609
6036
  },
5610
6037
  {
5611
- in: "query",
5612
- key: "groupIds"
6038
+ in: "body",
6039
+ key: "confirmationTitle"
6040
+ },
6041
+ {
6042
+ in: "body",
6043
+ key: "confirmationMessage"
6044
+ },
6045
+ {
6046
+ in: "body",
6047
+ key: "successTitle"
6048
+ },
6049
+ {
6050
+ in: "body",
6051
+ key: "successMessage"
6052
+ },
6053
+ {
6054
+ in: "body",
6055
+ key: "redirectUrl"
5613
6056
  }
5614
6057
  ] }]);
5615
- return (options?.client ?? client).get({
6058
+ return (options?.client ?? client).patch({
5616
6059
  security: [{
5617
6060
  name: "x-api-key",
5618
6061
  type: "apiKey"
5619
6062
  }],
5620
- url: "/v1/unsubscribe-groups/check",
6063
+ url: "/v1/topics/{id}/forms/{formId}",
5621
6064
  ...options,
5622
- ...params
6065
+ ...params,
6066
+ body: params.body ?? {},
6067
+ headers: {
6068
+ "Content-Type": "application/json",
6069
+ ...options?.headers,
6070
+ ...params.headers
6071
+ }
5623
6072
  });
5624
6073
  }
5625
6074
  };
@@ -5800,6 +6249,7 @@ var Analytics = class {
5800
6249
  url: "/v1/analytics/export",
5801
6250
  ...options,
5802
6251
  ...params,
6252
+ body: params.body ?? {},
5803
6253
  headers: {
5804
6254
  "Content-Type": "application/json",
5805
6255
  ...options?.headers,
@@ -5923,6 +6373,7 @@ var Templates = class {
5923
6373
  url: "/v1/templates",
5924
6374
  ...options,
5925
6375
  ...params,
6376
+ body: params.body ?? {},
5926
6377
  headers: {
5927
6378
  "Content-Type": "application/json",
5928
6379
  ...options?.headers,
@@ -5971,6 +6422,7 @@ var Templates = class {
5971
6422
  url: "/v1/templates/families",
5972
6423
  ...options,
5973
6424
  ...params,
6425
+ body: params.body ?? {},
5974
6426
  headers: {
5975
6427
  "Content-Type": "application/json",
5976
6428
  ...options?.headers,
@@ -6039,6 +6491,7 @@ var Templates = class {
6039
6491
  url: "/v1/templates/families/{id}",
6040
6492
  ...options,
6041
6493
  ...params,
6494
+ body: params.body ?? {},
6042
6495
  headers: {
6043
6496
  "Content-Type": "application/json",
6044
6497
  ...options?.headers,
@@ -6067,6 +6520,7 @@ var Templates = class {
6067
6520
  url: "/v1/templates/families/from-template/{templateId}",
6068
6521
  ...options,
6069
6522
  ...params,
6523
+ body: params.body ?? {},
6070
6524
  headers: {
6071
6525
  "Content-Type": "application/json",
6072
6526
  ...options?.headers,
@@ -6181,6 +6635,7 @@ var Templates = class {
6181
6635
  url: "/v1/templates/{id}",
6182
6636
  ...options,
6183
6637
  ...params,
6638
+ body: params.body ?? {},
6184
6639
  headers: {
6185
6640
  "Content-Type": "application/json",
6186
6641
  ...options?.headers,
@@ -6220,6 +6675,7 @@ var Templates = class {
6220
6675
  url: "/v1/templates/from-website",
6221
6676
  ...options,
6222
6677
  ...params,
6678
+ body: params.body ?? {},
6223
6679
  headers: {
6224
6680
  "Content-Type": "application/json",
6225
6681
  ...options?.headers,
@@ -6267,6 +6723,7 @@ var Templates = class {
6267
6723
  url: "/v1/templates/projects/{id}/entries",
6268
6724
  ...options,
6269
6725
  ...params,
6726
+ body: params.body ?? {},
6270
6727
  headers: {
6271
6728
  "Content-Type": "application/json",
6272
6729
  ...options?.headers,
@@ -6306,6 +6763,7 @@ var Templates = class {
6306
6763
  url: "/v1/templates/{id}/workspace",
6307
6764
  ...options,
6308
6765
  ...params,
6766
+ body: params.body ?? {},
6309
6767
  headers: {
6310
6768
  "Content-Type": "application/json",
6311
6769
  ...options?.headers,
@@ -6354,6 +6812,7 @@ var Templates = class {
6354
6812
  url: "/v1/templates/{id}/workspace/diff",
6355
6813
  ...options,
6356
6814
  ...params,
6815
+ body: params.body ?? {},
6357
6816
  headers: {
6358
6817
  "Content-Type": "application/json",
6359
6818
  ...options?.headers,
@@ -6401,6 +6860,7 @@ var Templates = class {
6401
6860
  url: "/v1/templates/{id}/workspace/assets",
6402
6861
  ...options,
6403
6862
  ...params,
6863
+ body: params.body ?? {},
6404
6864
  headers: {
6405
6865
  "Content-Type": "application/json",
6406
6866
  ...options?.headers,
@@ -6444,6 +6904,7 @@ var Templates = class {
6444
6904
  url: "/v1/templates/{id}/workspace/conflicts",
6445
6905
  ...options,
6446
6906
  ...params,
6907
+ body: params.body ?? {},
6447
6908
  headers: {
6448
6909
  "Content-Type": "application/json",
6449
6910
  ...options?.headers,
@@ -6487,6 +6948,7 @@ var Templates = class {
6487
6948
  url: "/v1/templates/{id}/workspace/save",
6488
6949
  ...options,
6489
6950
  ...params,
6951
+ body: params.body ?? {},
6490
6952
  headers: {
6491
6953
  "Content-Type": "application/json",
6492
6954
  ...options?.headers,
@@ -6526,6 +6988,7 @@ var Templates = class {
6526
6988
  url: "/v1/templates/{id}/workspace/restore",
6527
6989
  ...options,
6528
6990
  ...params,
6991
+ body: params.body ?? {},
6529
6992
  headers: {
6530
6993
  "Content-Type": "application/json",
6531
6994
  ...options?.headers,
@@ -6577,6 +7040,7 @@ var Templates = class {
6577
7040
  url: "/v1/templates/{id}/workspace/check",
6578
7041
  ...options,
6579
7042
  ...params,
7043
+ body: params.body ?? {},
6580
7044
  headers: {
6581
7045
  "Content-Type": "application/json",
6582
7046
  ...options?.headers,
@@ -6612,6 +7076,7 @@ var Templates = class {
6612
7076
  url: "/v1/templates/{id}/workspace/fixtures",
6613
7077
  ...options,
6614
7078
  ...params,
7079
+ body: params.body ?? {},
6615
7080
  headers: {
6616
7081
  "Content-Type": "application/json",
6617
7082
  ...options?.headers,
@@ -6659,6 +7124,7 @@ var Templates = class {
6659
7124
  url: "/v1/templates/{id}/publications",
6660
7125
  ...options,
6661
7126
  ...params,
7127
+ body: params.body ?? {},
6662
7128
  headers: {
6663
7129
  "Content-Type": "application/json",
6664
7130
  ...options?.headers,
@@ -6725,6 +7191,7 @@ var Templates = class {
6725
7191
  url: "/v1/templates/{id}/publications/{publicationId}/render",
6726
7192
  ...options,
6727
7193
  ...params,
7194
+ body: params.body ?? {},
6728
7195
  headers: {
6729
7196
  "Content-Type": "application/json",
6730
7197
  ...options?.headers,
@@ -6826,6 +7293,7 @@ var Templates = class {
6826
7293
  url: "/v1/templates/{id}/repository/credentials",
6827
7294
  ...options,
6828
7295
  ...params,
7296
+ body: params.body ?? {},
6829
7297
  headers: {
6830
7298
  "Content-Type": "application/json",
6831
7299
  ...options?.headers,
@@ -6865,6 +7333,7 @@ var Templates = class {
6865
7333
  url: "/v1/templates/{id}/workspace/resources",
6866
7334
  ...options,
6867
7335
  ...params,
7336
+ body: params.body ?? {},
6868
7337
  headers: {
6869
7338
  "Content-Type": "application/json",
6870
7339
  ...options?.headers,
@@ -6904,6 +7373,7 @@ var Templates = class {
6904
7373
  url: "/v1/templates/{id}/workspace/resources/{resourceId}/remove",
6905
7374
  ...options,
6906
7375
  ...params,
7376
+ body: params.body ?? {},
6907
7377
  headers: {
6908
7378
  "Content-Type": "application/json",
6909
7379
  ...options?.headers,
@@ -6968,6 +7438,7 @@ var Brands = class {
6968
7438
  url: "/v1/brands",
6969
7439
  ...options,
6970
7440
  ...params,
7441
+ body: params.body ?? {},
6971
7442
  headers: {
6972
7443
  "Content-Type": "application/json",
6973
7444
  ...options?.headers,
@@ -7055,6 +7526,7 @@ var Brands = class {
7055
7526
  url: "/v1/brands/{slug}",
7056
7527
  ...options,
7057
7528
  ...params,
7529
+ body: params.body ?? {},
7058
7530
  headers: {
7059
7531
  "Content-Type": "application/json",
7060
7532
  ...options?.headers,
@@ -7166,6 +7638,7 @@ var Webhooks = class {
7166
7638
  url: "/v1/webhooks",
7167
7639
  ...options,
7168
7640
  ...params,
7641
+ body: params.body ?? {},
7169
7642
  headers: {
7170
7643
  "Content-Type": "application/json",
7171
7644
  ...options?.headers,
@@ -7265,6 +7738,7 @@ var Webhooks = class {
7265
7738
  url: "/v1/webhooks/{id}",
7266
7739
  ...options,
7267
7740
  ...params,
7741
+ body: params.body ?? {},
7268
7742
  headers: {
7269
7743
  "Content-Type": "application/json",
7270
7744
  ...options?.headers,
@@ -7293,6 +7767,7 @@ var Webhooks = class {
7293
7767
  url: "/v1/webhooks/{id}/test",
7294
7768
  ...options,
7295
7769
  ...params,
7770
+ body: params.body ?? {},
7296
7771
  headers: {
7297
7772
  "Content-Type": "application/json",
7298
7773
  ...options?.headers,
@@ -7443,6 +7918,7 @@ var Organizations = class {
7443
7918
  url: "/v1/organizations",
7444
7919
  ...options,
7445
7920
  ...params,
7921
+ body: params.body ?? {},
7446
7922
  headers: {
7447
7923
  "Content-Type": "application/json",
7448
7924
  ...options?.headers,
@@ -7517,6 +7993,7 @@ var Organizations = class {
7517
7993
  url: "/v1/organizations/current",
7518
7994
  ...options,
7519
7995
  ...params,
7996
+ body: params.body ?? {},
7520
7997
  headers: {
7521
7998
  "Content-Type": "application/json",
7522
7999
  ...options?.headers,
@@ -7613,6 +8090,7 @@ var Organizations = class {
7613
8090
  url: "/v1/organizations/deletion-operations",
7614
8091
  ...options,
7615
8092
  ...params,
8093
+ body: params.body ?? {},
7616
8094
  headers: {
7617
8095
  "Content-Type": "application/json",
7618
8096
  ...options?.headers,
@@ -7688,6 +8166,7 @@ var ApiKeys = class {
7688
8166
  url: "/v1/api-keys",
7689
8167
  ...options,
7690
8168
  ...params,
8169
+ body: params.body ?? {},
7691
8170
  headers: {
7692
8171
  "Content-Type": "application/json",
7693
8172
  ...options?.headers,
@@ -7747,6 +8226,7 @@ var ApiKeys = class {
7747
8226
  url: "/v1/api-keys/{id}",
7748
8227
  ...options,
7749
8228
  ...params,
8229
+ body: params.body ?? {},
7750
8230
  headers: {
7751
8231
  "Content-Type": "application/json",
7752
8232
  ...options?.headers,
@@ -7884,6 +8364,7 @@ var Feedback = class {
7884
8364
  url: "/v1/feedback",
7885
8365
  ...options,
7886
8366
  ...params,
8367
+ body: params.body ?? {},
7887
8368
  headers: {
7888
8369
  "Content-Type": "application/json",
7889
8370
  ...options?.headers,
@@ -7980,6 +8461,7 @@ var Mailboxes = class {
7980
8461
  url: "/v1/mailboxes",
7981
8462
  ...options,
7982
8463
  ...params,
8464
+ body: params.body ?? {},
7983
8465
  headers: {
7984
8466
  "Content-Type": "application/json",
7985
8467
  ...options?.headers,
@@ -8055,6 +8537,7 @@ var Mailboxes = class {
8055
8537
  url: "/v1/mailboxes/{id}",
8056
8538
  ...options,
8057
8539
  ...params,
8540
+ body: params.body ?? {},
8058
8541
  headers: {
8059
8542
  "Content-Type": "application/json",
8060
8543
  ...options?.headers,
@@ -8094,6 +8577,7 @@ var Mailboxes = class {
8094
8577
  url: "/v1/mailboxes/{id}/endpoints",
8095
8578
  ...options,
8096
8579
  ...params,
8580
+ body: params.body ?? {},
8097
8581
  headers: {
8098
8582
  "Content-Type": "application/json",
8099
8583
  ...options?.headers,
@@ -8156,6 +8640,7 @@ var Mailboxes = class {
8156
8640
  url: "/v1/mailboxes/{id}/endpoints/{endpointId}",
8157
8641
  ...options,
8158
8642
  ...params,
8643
+ body: params.body ?? {},
8159
8644
  headers: {
8160
8645
  "Content-Type": "application/json",
8161
8646
  ...options?.headers,
@@ -8295,6 +8780,7 @@ var Mailboxes = class {
8295
8780
  url: "/v1/mailboxes/{id}/grants",
8296
8781
  ...options,
8297
8782
  ...params,
8783
+ body: params.body ?? {},
8298
8784
  headers: {
8299
8785
  "Content-Type": "application/json",
8300
8786
  ...options?.headers,
@@ -8357,6 +8843,7 @@ var Mailboxes = class {
8357
8843
  url: "/v1/mailboxes/{id}/grants/{grantId}",
8358
8844
  ...options,
8359
8845
  ...params,
8846
+ body: params.body ?? {},
8360
8847
  headers: {
8361
8848
  "Content-Type": "application/json",
8362
8849
  ...options?.headers,
@@ -8420,6 +8907,7 @@ var Mailboxes = class {
8420
8907
  url: "/v1/mailboxes/{id}/policies",
8421
8908
  ...options,
8422
8909
  ...params,
8910
+ body: params.body ?? {},
8423
8911
  headers: {
8424
8912
  "Content-Type": "application/json",
8425
8913
  ...options?.headers,
@@ -8513,6 +9001,7 @@ var Mailboxes = class {
8513
9001
  url: "/v1/mailboxes/{id}/policies/{policyId}",
8514
9002
  ...options,
8515
9003
  ...params,
9004
+ body: params.body ?? {},
8516
9005
  headers: {
8517
9006
  "Content-Type": "application/json",
8518
9007
  ...options?.headers,
@@ -8592,6 +9081,7 @@ var Mailboxes = class {
8592
9081
  url: "/v1/mailboxes/{id}/labels",
8593
9082
  ...options,
8594
9083
  ...params,
9084
+ body: params.body ?? {},
8595
9085
  headers: {
8596
9086
  "Content-Type": "application/json",
8597
9087
  ...options?.headers,
@@ -8654,6 +9144,7 @@ var Mailboxes = class {
8654
9144
  url: "/v1/mailboxes/{id}/labels/{labelId}",
8655
9145
  ...options,
8656
9146
  ...params,
9147
+ body: params.body ?? {},
8657
9148
  headers: {
8658
9149
  "Content-Type": "application/json",
8659
9150
  ...options?.headers,
@@ -8790,6 +9281,7 @@ var Mailboxes = class {
8790
9281
  url: "/v1/mailboxes/{id}/threads/{threadId}",
8791
9282
  ...options,
8792
9283
  ...params,
9284
+ body: params.body ?? {},
8793
9285
  headers: {
8794
9286
  "Content-Type": "application/json",
8795
9287
  ...options?.headers,
@@ -8825,6 +9317,7 @@ var Mailboxes = class {
8825
9317
  url: "/v1/mailboxes/{id}/threads/{threadId}/labels",
8826
9318
  ...options,
8827
9319
  ...params,
9320
+ body: params.body ?? {},
8828
9321
  headers: {
8829
9322
  "Content-Type": "application/json",
8830
9323
  ...options?.headers,
@@ -8860,6 +9353,7 @@ var Mailboxes = class {
8860
9353
  url: "/v1/mailboxes/{id}/threads/{threadId}/labels",
8861
9354
  ...options,
8862
9355
  ...params,
9356
+ body: params.body ?? {},
8863
9357
  headers: {
8864
9358
  "Content-Type": "application/json",
8865
9359
  ...options?.headers,
@@ -9005,6 +9499,7 @@ var Mailboxes = class {
9005
9499
  url: "/v1/mailboxes/{id}/threads/{threadId}/notes",
9006
9500
  ...options,
9007
9501
  ...params,
9502
+ body: params.body ?? {},
9008
9503
  headers: {
9009
9504
  "Content-Type": "application/json",
9010
9505
  ...options?.headers,
@@ -9082,6 +9577,7 @@ var Mailboxes = class {
9082
9577
  url: "/v1/mailboxes/{id}/threads/{threadId}/notes/{noteId}",
9083
9578
  ...options,
9084
9579
  ...params,
9580
+ body: params.body ?? {},
9085
9581
  headers: {
9086
9582
  "Content-Type": "application/json",
9087
9583
  ...options?.headers,
@@ -9149,6 +9645,7 @@ var Mailboxes = class {
9149
9645
  url: "/v1/mailboxes/{id}/messages",
9150
9646
  ...options,
9151
9647
  ...params,
9648
+ body: params.body ?? {},
9152
9649
  headers: {
9153
9650
  "Content-Type": "application/json",
9154
9651
  ...options?.headers,
@@ -9314,6 +9811,7 @@ var Mailboxes = class {
9314
9811
  url: "/v1/mailboxes/{id}/messages/{messageId}/reply",
9315
9812
  ...options,
9316
9813
  ...params,
9814
+ body: params.body ?? {},
9317
9815
  headers: {
9318
9816
  "Content-Type": "application/json",
9319
9817
  ...options?.headers,
@@ -9373,6 +9871,7 @@ var Mailboxes = class {
9373
9871
  url: "/v1/mailboxes/{id}/messages/{messageId}/reply-all",
9374
9872
  ...options,
9375
9873
  ...params,
9874
+ body: params.body ?? {},
9376
9875
  headers: {
9377
9876
  "Content-Type": "application/json",
9378
9877
  ...options?.headers,
@@ -9432,6 +9931,7 @@ var Mailboxes = class {
9432
9931
  url: "/v1/mailboxes/{id}/messages/{messageId}/forward",
9433
9932
  ...options,
9434
9933
  ...params,
9934
+ body: params.body ?? {},
9435
9935
  headers: {
9436
9936
  "Content-Type": "application/json",
9437
9937
  ...options?.headers,
@@ -9621,6 +10121,7 @@ var Mailboxes = class {
9621
10121
  url: "/v1/mailboxes/{id}/drafts",
9622
10122
  ...options,
9623
10123
  ...params,
10124
+ body: params.body ?? {},
9624
10125
  headers: {
9625
10126
  "Content-Type": "application/json",
9626
10127
  ...options?.headers,
@@ -9730,6 +10231,7 @@ var Mailboxes = class {
9730
10231
  url: "/v1/mailboxes/{id}/drafts/{draftId}",
9731
10232
  ...options,
9732
10233
  ...params,
10234
+ body: params.body ?? {},
9733
10235
  headers: {
9734
10236
  "Content-Type": "application/json",
9735
10237
  ...options?.headers,
@@ -9933,6 +10435,7 @@ var Mailboxes = class {
9933
10435
  url: "/v1/mailboxes/{id}/actions/{actionId}/deny",
9934
10436
  ...options,
9935
10437
  ...params,
10438
+ body: params.body ?? {},
9936
10439
  headers: {
9937
10440
  "Content-Type": "application/json",
9938
10441
  ...options?.headers,
@@ -10035,6 +10538,7 @@ var Namespaces = class {
10035
10538
  url: "/v1/namespaces",
10036
10539
  ...options,
10037
10540
  ...params,
10541
+ body: params.body ?? {},
10038
10542
  headers: {
10039
10543
  "Content-Type": "application/json",
10040
10544
  ...options?.headers,
@@ -10110,6 +10614,7 @@ var Namespaces = class {
10110
10614
  url: "/v1/namespaces/{id}",
10111
10615
  ...options,
10112
10616
  ...params,
10617
+ body: params.body ?? {},
10113
10618
  headers: {
10114
10619
  "Content-Type": "application/json",
10115
10620
  ...options?.headers,
@@ -10145,6 +10650,7 @@ var Namespaces = class {
10145
10650
  url: "/v1/namespaces/{id}/resources",
10146
10651
  ...options,
10147
10652
  ...params,
10653
+ body: params.body ?? {},
10148
10654
  headers: {
10149
10655
  "Content-Type": "application/json",
10150
10656
  ...options?.headers,
@@ -10269,6 +10775,7 @@ var Extensions = class {
10269
10775
  url: "/v1/extensions",
10270
10776
  ...options,
10271
10777
  ...params,
10778
+ body: params.body ?? {},
10272
10779
  headers: {
10273
10780
  "Content-Type": "application/json",
10274
10781
  ...options?.headers,
@@ -10429,6 +10936,7 @@ var ExtensionInstallations = class {
10429
10936
  url: "/v1/extension-installations",
10430
10937
  ...options,
10431
10938
  ...params,
10939
+ body: params.body ?? {},
10432
10940
  headers: {
10433
10941
  "Content-Type": "application/json",
10434
10942
  ...options?.headers,
@@ -10508,6 +11016,7 @@ var ExtensionInstallations = class {
10508
11016
  url: "/v1/extension-installations/{id}/upgrade",
10509
11017
  ...options,
10510
11018
  ...params,
11019
+ body: params.body ?? {},
10511
11020
  headers: {
10512
11021
  "Content-Type": "application/json",
10513
11022
  ...options?.headers,
@@ -10600,6 +11109,6 @@ var ExtensionInstallations = class {
10600
11109
  }
10601
11110
  };
10602
11111
  //#endregion
10603
- export { Agents, Analytics, ApiKeys, Attachments, Brands, Campaigns, ContactEvents, ContactGroups, Contacts, Conversations, CustomFields, Email, Events, ExtensionInstallations, Extensions, Feedback, Journeys, Mailboxes, Media, Messages, Namespaces, Operations, Organizations, ScheduledMessages, Subscriptions, Templates, Unsubscribe, Webhooks, Whoami };
11112
+ export { Agents, Analytics, ApiKeys, Attachments, Brands, Campaigns, ContactEvents, ContactGroups, Contacts, Conversations, CustomFields, Email, Events, ExtensionInstallations, Extensions, Feedback, Journeys, Mailboxes, Media, Messages, Namespaces, Operations, Organizations, ScheduledMessages, Subscriptions, Templates, TopicForms, Topics, Webhooks, Whoami };
10604
11113
 
10605
11114
  //# sourceMappingURL=sdk.gen.js.map