samva 0.53.0 → 0.55.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 (157) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +1 -0
  3. package/dist/_virtual/_rolldown/runtime.js +4 -4
  4. package/dist/agent/index.js +1 -1
  5. package/dist/client/client/client.gen.js +1 -2
  6. package/dist/client/client/utils.gen.js +1 -1
  7. package/dist/client/client.gen.js +1 -1
  8. package/dist/client/sdk.gen.d.ts +96 -12
  9. package/dist/client/sdk.gen.js +314 -25
  10. package/dist/client/types.gen.d.ts +647 -13
  11. package/dist/client-attribution.js +1 -1
  12. package/dist/effect/agents.js +1 -1
  13. package/dist/effect/analytics.js +1 -1
  14. package/dist/effect/api-keys.js +1 -1
  15. package/dist/effect/approval-requests.js +1 -1
  16. package/dist/effect/attachments.js +1 -1
  17. package/dist/effect/brands.d.ts +8 -1
  18. package/dist/effect/brands.js +2 -2
  19. package/dist/effect/campaigns.d.ts +66 -56
  20. package/dist/effect/campaigns.js +1 -1
  21. package/dist/effect/categories.js +6 -6
  22. package/dist/effect/contact-groups.js +1 -1
  23. package/dist/effect/contacts.js +1 -1
  24. package/dist/effect/conversations.js +1 -1
  25. package/dist/effect/custom-fields.js +1 -1
  26. package/dist/effect/descriptors/brands.d.ts +4 -4
  27. package/dist/effect/descriptors/brands.js +4 -4
  28. package/dist/effect/descriptors/email.d.ts +21 -1
  29. package/dist/effect/descriptors/email.js +21 -1
  30. package/dist/effect/descriptors/phone-numbers.d.ts +49 -0
  31. package/dist/effect/descriptors/phone-numbers.js +47 -0
  32. package/dist/effect/descriptors/topics.d.ts +1 -1
  33. package/dist/effect/descriptors/topics.js +1 -1
  34. package/dist/effect/email.d.ts +12 -0
  35. package/dist/effect/email.js +6 -2
  36. package/dist/effect/errors.d.ts +1 -1
  37. package/dist/effect/errors.js +2 -2
  38. package/dist/effect/events.js +2 -2
  39. package/dist/effect/feedback.js +2 -2
  40. package/dist/effect/generated/accounts.d.ts +12 -1
  41. package/dist/effect/generated/accounts.js +2 -1
  42. package/dist/effect/generated/agents.js +7 -7
  43. package/dist/effect/generated/analytics.js +16 -16
  44. package/dist/effect/generated/api-keys.js +7 -7
  45. package/dist/effect/generated/approval-requests.js +1 -1
  46. package/dist/effect/generated/attachments.js +4 -4
  47. package/dist/effect/generated/brands.d.ts +78 -8
  48. package/dist/effect/generated/brands.js +21 -12
  49. package/dist/effect/generated/campaigns.d.ts +17 -1
  50. package/dist/effect/generated/campaigns.js +15 -14
  51. package/dist/effect/generated/contact-events.js +1 -1
  52. package/dist/effect/generated/contact-groups.js +12 -12
  53. package/dist/effect/generated/contacts.js +50 -50
  54. package/dist/effect/generated/conversations.js +7 -7
  55. package/dist/effect/generated/custom-fields.js +6 -6
  56. package/dist/effect/generated/email.d.ts +473 -2
  57. package/dist/effect/generated/email.js +143 -44
  58. package/dist/effect/generated/events.js +5 -5
  59. package/dist/effect/generated/feedback.js +1 -1
  60. package/dist/effect/generated/index.d.ts +3 -1
  61. package/dist/effect/generated/integrations-catalog.d.ts +16 -0
  62. package/dist/effect/generated/integrations-catalog.js +10 -6
  63. package/dist/effect/generated/integrations.js +5 -5
  64. package/dist/effect/generated/journeys.d.ts +158 -1
  65. package/dist/effect/generated/journeys.js +16 -14
  66. package/dist/effect/generated/logs.js +2 -2
  67. package/dist/effect/generated/mailboxes.d.ts +41 -3
  68. package/dist/effect/generated/mailboxes.js +48 -50
  69. package/dist/effect/generated/media.js +1 -1
  70. package/dist/effect/generated/messages.d.ts +6 -0
  71. package/dist/effect/generated/messages.js +12 -6
  72. package/dist/effect/generated/namespaces.d.ts +9 -9
  73. package/dist/effect/generated/namespaces.js +1 -1
  74. package/dist/effect/generated/newsletter-domains.js +1 -1
  75. package/dist/effect/generated/newsletter-issues.js +69 -69
  76. package/dist/effect/generated/newsletters.js +1 -1
  77. package/dist/effect/generated/operations.js +1 -1
  78. package/dist/effect/generated/organizations.d.ts +3 -0
  79. package/dist/effect/generated/organizations.js +2 -1
  80. package/dist/effect/generated/phone-numbers.d.ts +817 -0
  81. package/dist/effect/generated/phone-numbers.js +230 -0
  82. package/dist/effect/generated/policies.js +2 -2
  83. package/dist/effect/generated/scheduled-messages.js +1 -1
  84. package/dist/effect/generated/shared.d.ts +75 -14
  85. package/dist/effect/generated/shared.js +46 -17
  86. package/dist/effect/generated/subscriptions.js +1 -1
  87. package/dist/effect/generated/template-registrations.js +1 -1
  88. package/dist/effect/generated/template-share-links.js +9 -9
  89. package/dist/effect/generated/templates.d.ts +34 -1
  90. package/dist/effect/generated/templates.js +136 -121
  91. package/dist/effect/generated/topic-forms.js +1 -1
  92. package/dist/effect/generated/topics.d.ts +10 -0
  93. package/dist/effect/generated/topics.js +20 -13
  94. package/dist/effect/generated/webhooks.js +18 -18
  95. package/dist/effect/generated/whats-app-flows.js +5 -5
  96. package/dist/effect/generated/whats-app-setup-links.js +1 -1
  97. package/dist/effect/generated/whats-app.d.ts +75 -0
  98. package/dist/effect/generated/whats-app.js +43 -18
  99. package/dist/effect/generated/whoami.js +1 -1
  100. package/dist/effect/generated-metadata.d.ts +47 -1
  101. package/dist/effect/generated-metadata.js +175 -146
  102. package/dist/effect/index.d.ts +1 -0
  103. package/dist/effect/index.js +6 -5
  104. package/dist/effect/integrations-catalog.js +1 -1
  105. package/dist/effect/integrations.js +1 -1
  106. package/dist/effect/internal/client.js +6 -6
  107. package/dist/effect/internal/email-sender.js +3 -3
  108. package/dist/effect/internal/log-events.js +2 -2
  109. package/dist/effect/internal/mailbox-events.js +1 -1
  110. package/dist/effect/internal/operation.js +2 -2
  111. package/dist/effect/internal/send.js +4 -4
  112. package/dist/effect/journeys.d.ts +20 -0
  113. package/dist/effect/journeys.js +1 -1
  114. package/dist/effect/logs.js +1 -1
  115. package/dist/effect/mailboxes.d.ts +191 -191
  116. package/dist/effect/mailboxes.js +3 -3
  117. package/dist/effect/media.js +2 -2
  118. package/dist/effect/messages.js +2 -2
  119. package/dist/effect/namespaces.d.ts +2 -2
  120. package/dist/effect/namespaces.js +1 -1
  121. package/dist/effect/newsletter-domains.js +1 -1
  122. package/dist/effect/newsletter-issues.js +1 -1
  123. package/dist/effect/newsletters.js +1 -1
  124. package/dist/effect/operations.js +1 -1
  125. package/dist/effect/organizations.js +1 -1
  126. package/dist/effect/phone-numbers.d.ts +22 -0
  127. package/dist/effect/phone-numbers.js +21 -0
  128. package/dist/effect/policies.js +1 -1
  129. package/dist/effect/retry.js +3 -3
  130. package/dist/effect/scheduled-messages.d.ts +350 -350
  131. package/dist/effect/scheduled-messages.js +1 -1
  132. package/dist/effect/subscriptions.js +1 -1
  133. package/dist/effect/template-registrations.js +1 -1
  134. package/dist/effect/template-share-links.js +1 -1
  135. package/dist/effect/templates.d.ts +1 -0
  136. package/dist/effect/templates.js +2 -2
  137. package/dist/effect/topic-forms.js +1 -1
  138. package/dist/effect/topics.d.ts +70 -2
  139. package/dist/effect/topics.js +1 -1
  140. package/dist/effect/webhooks.js +2 -2
  141. package/dist/effect/whatsapp-flows.js +1 -1
  142. package/dist/effect/whatsapp-setup-links.js +1 -1
  143. package/dist/effect/whatsapp.d.ts +10 -0
  144. package/dist/effect/whatsapp.js +1 -1
  145. package/dist/effect/whoami.js +1 -1
  146. package/dist/index.js +2 -2
  147. package/dist/package.json.js +5 -0
  148. package/dist/promises/client.d.ts +3 -1
  149. package/dist/promises/client.js +7 -5
  150. package/dist/promises/errors.gen.d.ts +16 -2
  151. package/dist/promises/errors.gen.js +48 -11
  152. package/dist/promises/index.js +3 -3
  153. package/dist/promises/types.gen.d.ts +1 -1
  154. package/dist/request-policy.js +1 -1
  155. package/dist/service-map.d.ts +40 -5
  156. package/package.json +9 -5
  157. package/dist/package.js +0 -5
@@ -1,5 +1,5 @@
1
- import { buildClientParams } from "./core/params.gen.js";
2
1
  import { requestWithPolicy } from "../promises/request.js";
2
+ import { buildClientParams } from "./core/params.gen.js";
3
3
  import { client } from "./client.gen.js";
4
4
  // src/client/sdk.gen.ts
5
5
  var ApprovalRequests = class {
@@ -465,6 +465,167 @@ var Messages = class {
465
465
  }));
466
466
  }
467
467
  };
468
+ var PhoneNumbers = class {
469
+ /**
470
+ * Search available phone numbers
471
+ *
472
+ * Find US phone numbers by type and location. Each result identifies the channels the number supports.
473
+ */
474
+ static searchAvailableNumbers(parameters, options) {
475
+ const params = buildClientParams([parameters], [{ args: [
476
+ {
477
+ in: "query",
478
+ key: "country"
479
+ },
480
+ {
481
+ in: "query",
482
+ key: "type"
483
+ },
484
+ {
485
+ in: "query",
486
+ key: "areaCode"
487
+ },
488
+ {
489
+ in: "query",
490
+ key: "locality"
491
+ },
492
+ {
493
+ in: "query",
494
+ key: "limit"
495
+ }
496
+ ] }]);
497
+ return requestWithPolicy(options?.client ?? client, "phoneNumbersSearchAvailableNumbers", options, (headers, signal) => (options?.client ?? client).get({
498
+ security: [{
499
+ name: "x-api-key",
500
+ type: "apiKey"
501
+ }],
502
+ url: "/v1/phone-numbers/available",
503
+ ...options,
504
+ ...params,
505
+ headers: {
506
+ ...headers,
507
+ ...params.headers
508
+ },
509
+ signal
510
+ }));
511
+ }
512
+ /**
513
+ * List phone numbers
514
+ *
515
+ * List provisioned phone numbers in the namespaces your credential can reach.
516
+ */
517
+ static listPhoneNumbers(parameters, options) {
518
+ const params = buildClientParams([parameters], [{ args: [{
519
+ in: "query",
520
+ key: "namespaceId"
521
+ }] }]);
522
+ return requestWithPolicy(options?.client ?? client, "phoneNumbersListPhoneNumbers", options, (headers, signal) => (options?.client ?? client).get({
523
+ security: [{
524
+ name: "x-api-key",
525
+ type: "apiKey"
526
+ }],
527
+ url: "/v1/phone-numbers",
528
+ ...options,
529
+ ...params,
530
+ headers: {
531
+ ...headers,
532
+ ...params.headers
533
+ },
534
+ signal
535
+ }));
536
+ }
537
+ /**
538
+ * Purchase a phone number
539
+ *
540
+ * Order an available US phone number. A payment method is required. Poll until the number becomes active or failed. Monthly billing begins once the number is active.
541
+ */
542
+ static purchaseNumber(parameters, options) {
543
+ const params = buildClientParams([parameters], [{ args: [
544
+ {
545
+ in: "body",
546
+ key: "phoneNumber"
547
+ },
548
+ {
549
+ in: "body",
550
+ key: "friendlyName"
551
+ },
552
+ {
553
+ in: "body",
554
+ key: "uses"
555
+ },
556
+ {
557
+ in: "body",
558
+ key: "namespaceId"
559
+ }
560
+ ] }]);
561
+ return requestWithPolicy(options?.client ?? client, "phoneNumbersPurchaseNumber", options, (headers, signal) => (options?.client ?? client).post({
562
+ security: [{
563
+ name: "x-api-key",
564
+ type: "apiKey"
565
+ }],
566
+ url: "/v1/phone-numbers",
567
+ ...options,
568
+ ...params,
569
+ body: params.body ?? {},
570
+ headers: {
571
+ "Content-Type": "application/json",
572
+ ...headers,
573
+ ...params.headers
574
+ },
575
+ signal
576
+ }));
577
+ }
578
+ /**
579
+ * Release a phone number
580
+ *
581
+ * Return a number to the provider. Pending orders must settle before the number can be released.
582
+ */
583
+ static releasePhoneNumber(parameters, options) {
584
+ const params = buildClientParams([parameters], [{ args: [{
585
+ in: "path",
586
+ key: "id"
587
+ }] }]);
588
+ return requestWithPolicy(options?.client ?? client, "phoneNumbersReleasePhoneNumber", options, (headers, signal) => (options?.client ?? client).delete({
589
+ security: [{
590
+ name: "x-api-key",
591
+ type: "apiKey"
592
+ }],
593
+ url: "/v1/phone-numbers/{id}",
594
+ ...options,
595
+ ...params,
596
+ headers: {
597
+ ...headers,
598
+ ...params.headers
599
+ },
600
+ signal
601
+ }));
602
+ }
603
+ /**
604
+ * Get a phone number
605
+ *
606
+ * Read a provisioned phone number and its current order status.
607
+ */
608
+ static getPhoneNumber(parameters, options) {
609
+ const params = buildClientParams([parameters], [{ args: [{
610
+ in: "path",
611
+ key: "id"
612
+ }] }]);
613
+ return requestWithPolicy(options?.client ?? client, "phoneNumbersGetPhoneNumber", options, (headers, signal) => (options?.client ?? client).get({
614
+ security: [{
615
+ name: "x-api-key",
616
+ type: "apiKey"
617
+ }],
618
+ url: "/v1/phone-numbers/{id}",
619
+ ...options,
620
+ ...params,
621
+ headers: {
622
+ ...headers,
623
+ ...params.headers
624
+ },
625
+ signal
626
+ }));
627
+ }
628
+ };
468
629
  var Logs = class {
469
630
  /**
470
631
  * List message log events
@@ -1343,6 +1504,41 @@ var Campaigns = class {
1343
1504
  }
1344
1505
  };
1345
1506
  var Email = class {
1507
+ /**
1508
+ * Get deliverability insights for a sending domain
1509
+ *
1510
+ * Requires the Deliverability Insights add-on. Returns delivery, permanent and transient bounce, and complaint rates by mailbox provider. Includes recommendations and Samva-tracked open and click rates for the sending domain. The report covers the last 7 days by default. Use days=30 for a 30-day report.
1511
+ */
1512
+ static getDeliverabilityInsights(parameters, options) {
1513
+ const params = buildClientParams([parameters], [{ args: [
1514
+ {
1515
+ in: "path",
1516
+ key: "id"
1517
+ },
1518
+ {
1519
+ in: "query",
1520
+ key: "days"
1521
+ },
1522
+ {
1523
+ in: "query",
1524
+ key: "mailboxProvider"
1525
+ }
1526
+ ] }]);
1527
+ return requestWithPolicy(options?.client ?? client, "emailGetDeliverabilityInsights", options, (headers, signal) => (options?.client ?? client).get({
1528
+ security: [{
1529
+ name: "x-api-key",
1530
+ type: "apiKey"
1531
+ }],
1532
+ url: "/v1/email/domains/{id}/deliverability",
1533
+ ...options,
1534
+ ...params,
1535
+ headers: {
1536
+ ...headers,
1537
+ ...params.headers
1538
+ },
1539
+ signal
1540
+ }));
1541
+ }
1346
1542
  /**
1347
1543
  * Get email review status
1348
1544
  *
@@ -1796,16 +1992,23 @@ var Email = class {
1796
1992
  /**
1797
1993
  * Build a one-click DNS apply URL
1798
1994
  *
1799
- * Builds the signed Domain Connect apply URL for the selected sending-only or sending-and-receiving service. The sending-and-receiving service writes the apex inbound MX, so it is refused until the domain's receiving is enabled. Manual DNS remains available for either mode.
1995
+ * Builds the signed Domain Connect apply URL for the selected sending-only or sending-and-receiving service. The sending-and-receiving service writes the apex inbound MX, so it is refused until the domain's receiving is enabled. Manual DNS remains available for either mode. With returnUrl, Samva handles the registrar return and redirects to your app with status and domainId. Omit it to return to the Samva dashboard.
1800
1996
  */
1801
1997
  static buildDomainConnectApplyUrl(parameters, options) {
1802
- const params = buildClientParams([parameters], [{ args: [{
1803
- in: "path",
1804
- key: "id"
1805
- }, {
1806
- in: "body",
1807
- key: "mode"
1808
- }] }]);
1998
+ const params = buildClientParams([parameters], [{ args: [
1999
+ {
2000
+ in: "path",
2001
+ key: "id"
2002
+ },
2003
+ {
2004
+ in: "body",
2005
+ key: "mode"
2006
+ },
2007
+ {
2008
+ in: "body",
2009
+ key: "returnUrl"
2010
+ }
2011
+ ] }]);
1809
2012
  return requestWithPolicy(options?.client ?? client, "emailBuildDomainConnectApplyUrl", options, (headers, signal) => (options?.client ?? client).post({
1810
2013
  security: [{
1811
2014
  name: "x-api-key",
@@ -2152,12 +2355,15 @@ var Email = class {
2152
2355
  /**
2153
2356
  * Build an automatic Custom Tracking Domain apply URL
2154
2357
  *
2155
- * Builds the signed Domain Connect URL for the current customer-selected tracking host. Samva fills in the host and the certificate validation record; the manual CNAME records remain available.
2358
+ * Builds the signed Domain Connect URL for the current customer-selected tracking host. Samva fills in the host and certificate validation record. With returnUrl, Samva handles the registrar return and redirects to your app with status, domainId, and customTrackingDomainId. Omit it to return to the Samva dashboard. The manual CNAME records remain available.
2156
2359
  */
2157
2360
  static buildCustomTrackingDomainConnectApplyUrl(parameters, options) {
2158
2361
  const params = buildClientParams([parameters], [{ args: [{
2159
2362
  in: "path",
2160
2363
  key: "id"
2364
+ }, {
2365
+ in: "query",
2366
+ key: "returnUrl"
2161
2367
  }] }]);
2162
2368
  return requestWithPolicy(options?.client ?? client, "emailBuildCustomTrackingDomainConnectApplyUrl", options, (headers, signal) => (options?.client ?? client).post({
2163
2369
  security: [{
@@ -2383,6 +2589,43 @@ var Email = class {
2383
2589
  }));
2384
2590
  }
2385
2591
  /**
2592
+ * Update a sender
2593
+ *
2594
+ * Updates a sender's display name and reply-to addresses without re-verification. Omit a field to leave it unchanged. Set it to null to clear it. Set replyToEmails to an empty array to suppress inherited reply-to addresses.
2595
+ */
2596
+ static updateSender(parameters, options) {
2597
+ const params = buildClientParams([parameters], [{ args: [
2598
+ {
2599
+ in: "path",
2600
+ key: "id"
2601
+ },
2602
+ {
2603
+ in: "body",
2604
+ key: "name"
2605
+ },
2606
+ {
2607
+ in: "body",
2608
+ key: "replyToEmails"
2609
+ }
2610
+ ] }]);
2611
+ return requestWithPolicy(options?.client ?? client, "emailUpdateSender", options, (headers, signal) => (options?.client ?? client).patch({
2612
+ security: [{
2613
+ name: "x-api-key",
2614
+ type: "apiKey"
2615
+ }],
2616
+ url: "/v1/email/senders/{id}",
2617
+ ...options,
2618
+ ...params,
2619
+ body: params.body ?? {},
2620
+ headers: {
2621
+ "Content-Type": "application/json",
2622
+ ...headers,
2623
+ ...params.headers
2624
+ },
2625
+ signal
2626
+ }));
2627
+ }
2628
+ /**
2386
2629
  * Set the default sender
2387
2630
  *
2388
2631
  * Sets a sendable sender (see `sendable` on the sender) as the default for the caller's namespace, the explicit namespaceId, or the sender's own scope. A namespace can select its own sender or a sender on a shared organization domain. This changes only the namespace's default; it does not change a shared sender. Omitted-`from` sends use this default when neither the request nor the template names a `from`.
@@ -7558,13 +7801,23 @@ var Topics = class {
7558
7801
  /**
7559
7802
  * List topics
7560
7803
  *
7561
- * Lists visible topics, default first then by name. The organization holds at most 200 topics, so the list is bounded and unpaged.
7804
+ * Lists one page of visible topics, default topics first, then by name and ID. Optionally filter by namespaceId. Pass nextCursor as cursor with the same filters to continue.
7562
7805
  */
7563
7806
  static list(parameters, options) {
7564
- const params = buildClientParams([parameters], [{ args: [{
7565
- in: "query",
7566
- key: "namespaceId"
7567
- }] }]);
7807
+ const params = buildClientParams([parameters], [{ args: [
7808
+ {
7809
+ in: "query",
7810
+ key: "limit"
7811
+ },
7812
+ {
7813
+ in: "query",
7814
+ key: "cursor"
7815
+ },
7816
+ {
7817
+ in: "query",
7818
+ key: "namespaceId"
7819
+ }
7820
+ ] }]);
7568
7821
  return requestWithPolicy(options?.client ?? client, "topicsList", options, (headers, signal) => (options?.client ?? client).get({
7569
7822
  security: [{
7570
7823
  name: "x-api-key",
@@ -7583,7 +7836,7 @@ var Topics = class {
7583
7836
  /**
7584
7837
  * Create a topic
7585
7838
  *
7586
- * Creates a topic in the caller's or requested namespace. The subscription default is opt_out when omitted. Sending defaults must be compatible with that namespace. An organization holds at most 200 topics.
7839
+ * Creates a topic in the caller's or requested namespace. The subscription default is opt_out when omitted. Sending defaults must be compatible with that namespace. Each namespace and the organization level can each hold up to 200 topics. An organization can hold up to 20,000 topics in total.
7587
7840
  */
7588
7841
  static create(parameters, options) {
7589
7842
  const params = buildClientParams([parameters], [{ args: [
@@ -9561,7 +9814,7 @@ var Templates = class {
9561
9814
  /**
9562
9815
  * Add a template entry
9563
9816
  *
9564
- * Registers a `.tsx` file under `templates/` or `emails/` in an existing template project as its own template and returns it with status 201. The file does not need to exist yet; publishing fails until a commit contains it. Repeating the call with the same entry path, name, and slug returns the existing template.
9817
+ * Registers a `.tsx` file under `templates/` or `emails/` in an existing project as an email or WhatsApp template and returns status 201. The source determines the channel when available. If the entry declares both channels, email is selected unless you pass a channel. For a local or unwritten file, pass its channel or omit it to register email. Publishing checks the channel against the saved commit. Repeating the call with the same entry path, name, and slug returns the existing template.
9565
9818
  */
9566
9819
  static addEntry(parameters, options) {
9567
9820
  const params = buildClientParams([parameters], [{ args: [
@@ -9581,6 +9834,10 @@ var Templates = class {
9581
9834
  in: "body",
9582
9835
  key: "slug"
9583
9836
  },
9837
+ {
9838
+ in: "body",
9839
+ key: "channel"
9840
+ },
9584
9841
  {
9585
9842
  in: "body",
9586
9843
  key: "description"
@@ -10439,9 +10696,13 @@ var Brands = class {
10439
10696
  /**
10440
10697
  * List brands
10441
10698
  *
10442
- * Returns the organization's brands, the default brand first.
10699
+ * Returns brands in the addressed scope, the default first. A namespace caller without brands sees the shared organization brands when no namespaceId is supplied.
10443
10700
  */
10444
- static list(options) {
10701
+ static list(parameters, options) {
10702
+ const params = buildClientParams([parameters], [{ args: [{
10703
+ in: "query",
10704
+ key: "namespaceId"
10705
+ }] }]);
10445
10706
  return requestWithPolicy(options?.client ?? client, "brandsList", options, (headers, signal) => (options?.client ?? client).get({
10446
10707
  security: [{
10447
10708
  name: "x-api-key",
@@ -10449,17 +10710,25 @@ var Brands = class {
10449
10710
  }],
10450
10711
  url: "/v1/brands",
10451
10712
  ...options,
10452
- headers: { ...headers },
10713
+ ...params,
10714
+ headers: {
10715
+ ...headers,
10716
+ ...params.headers
10717
+ },
10453
10718
  signal
10454
10719
  }));
10455
10720
  }
10456
10721
  /**
10457
10722
  * Create a brand
10458
10723
  *
10459
- * Creates a brand. The CSS must parse as a brand theme; a rejected theme answers 422 with located findings under `fields.css`. With `isDefault`, the new brand becomes the default. An organization holds at most 12 brands; creating one more answers 409 with a `ConflictError`.
10724
+ * Creates a brand. The CSS must parse as a brand theme; a rejected theme answers 422 with located findings under `fields.css`. The first namespace brand is its default. With `isDefault`, the new brand becomes the default for its scope. Each organization or namespace independently holds at most 12 brands; creating one more answers 409 with a `ConflictError`.
10460
10725
  */
10461
10726
  static create(parameters, options) {
10462
10727
  const params = buildClientParams([parameters], [{ args: [
10728
+ {
10729
+ in: "body",
10730
+ key: "namespaceId"
10731
+ },
10463
10732
  {
10464
10733
  in: "body",
10465
10734
  key: "slug"
@@ -10511,6 +10780,9 @@ var Brands = class {
10511
10780
  const params = buildClientParams([parameters], [{ args: [{
10512
10781
  in: "path",
10513
10782
  key: "slug"
10783
+ }, {
10784
+ in: "query",
10785
+ key: "namespaceId"
10514
10786
  }] }]);
10515
10787
  return requestWithPolicy(options?.client ?? client, "brandsRemove", options, (headers, signal) => (options?.client ?? client).delete({
10516
10788
  security: [{
@@ -10530,12 +10802,15 @@ var Brands = class {
10530
10802
  /**
10531
10803
  * Get a brand
10532
10804
  *
10533
- * Returns one brand by its slug.
10805
+ * Returns a brand by slug in the addressed scope. A namespace caller omitting namespaceId can also look up shared organization brands.
10534
10806
  */
10535
10807
  static get(parameters, options) {
10536
10808
  const params = buildClientParams([parameters], [{ args: [{
10537
10809
  in: "path",
10538
10810
  key: "slug"
10811
+ }, {
10812
+ in: "query",
10813
+ key: "namespaceId"
10539
10814
  }] }]);
10540
10815
  return requestWithPolicy(options?.client ?? client, "brandsGet", options, (headers, signal) => (options?.client ?? client).get({
10541
10816
  security: [{
@@ -10555,7 +10830,7 @@ var Brands = class {
10555
10830
  /**
10556
10831
  * Update a brand
10557
10832
  *
10558
- * Updates a brand. Each section given replaces that section whole. Published templates keep the brand they were built against until they are republished.
10833
+ * Updates a brand. Each section given replaces that section whole. Namespace sends using bare `samva:brand` use the current default.
10559
10834
  */
10560
10835
  static update(parameters, options) {
10561
10836
  const params = buildClientParams([parameters], [{ args: [
@@ -10563,6 +10838,10 @@ var Brands = class {
10563
10838
  in: "path",
10564
10839
  key: "slug"
10565
10840
  },
10841
+ {
10842
+ in: "body",
10843
+ key: "namespaceId"
10844
+ },
10566
10845
  {
10567
10846
  in: "body",
10568
10847
  key: "newSlug"
@@ -10604,12 +10883,15 @@ var Brands = class {
10604
10883
  /**
10605
10884
  * Make a brand the default
10606
10885
  *
10607
- * Makes this brand the organization's default: bare `samva:brand` and domains without a brand resolve to it at their next build or send.
10886
+ * Makes this brand the default in the addressed organization or namespace.
10608
10887
  */
10609
10888
  static setDefault(parameters, options) {
10610
10889
  const params = buildClientParams([parameters], [{ args: [{
10611
10890
  in: "path",
10612
10891
  key: "slug"
10892
+ }, {
10893
+ in: "query",
10894
+ key: "namespaceId"
10613
10895
  }] }]);
10614
10896
  return requestWithPolicy(options?.client ?? client, "brandsSetDefault", options, (headers, signal) => (options?.client ?? client).post({
10615
10897
  security: [{
@@ -15951,6 +16233,11 @@ Object.assign(Messages.getEmail, { operation: "messagesGetEmail" });
15951
16233
  Object.assign(Messages.validateEmail, { operation: "messagesValidateEmail" });
15952
16234
  Object.assign(Messages.getStatus, { operation: "messagesGetStatus" });
15953
16235
  Object.assign(Messages.getEvents, { operation: "messagesGetEvents" });
16236
+ Object.assign(PhoneNumbers.searchAvailableNumbers, { operation: "phoneNumbersSearchAvailableNumbers" });
16237
+ Object.assign(PhoneNumbers.listPhoneNumbers, { operation: "phoneNumbersListPhoneNumbers" });
16238
+ Object.assign(PhoneNumbers.purchaseNumber, { operation: "phoneNumbersPurchaseNumber" });
16239
+ Object.assign(PhoneNumbers.releasePhoneNumber, { operation: "phoneNumbersReleasePhoneNumber" });
16240
+ Object.assign(PhoneNumbers.getPhoneNumber, { operation: "phoneNumbersGetPhoneNumber" });
15954
16241
  Object.assign(Logs.list, { operation: "logsList" });
15955
16242
  Object.assign(Logs.get, { operation: "logsGet" });
15956
16243
  Object.assign(Operations.list, { operation: "operationsList" });
@@ -15976,6 +16263,7 @@ Object.assign(Campaigns.pauseRun, { operation: "campaignsPauseRun" });
15976
16263
  Object.assign(Campaigns.resumeRun, { operation: "campaignsResumeRun" });
15977
16264
  Object.assign(Campaigns.cancelRun, { operation: "campaignsCancelRun" });
15978
16265
  Object.assign(Campaigns.listRecipients, { operation: "campaignsListRecipients" });
16266
+ Object.assign(Email.getDeliverabilityInsights, { operation: "emailGetDeliverabilityInsights" });
15979
16267
  Object.assign(Email.getOnboardingReview, { operation: "emailGetOnboardingReview" });
15980
16268
  Object.assign(Email.reapplyOnboardingReview, { operation: "emailReapplyOnboardingReview" });
15981
16269
  Object.assign(Email.respondToOnboardingInformationRequest, { operation: "emailRespondToOnboardingInformationRequest" });
@@ -16010,6 +16298,7 @@ Object.assign(Email.addSender, { operation: "emailAddSender" });
16010
16298
  Object.assign(Email.checkSenderVerification, { operation: "emailCheckSenderVerification" });
16011
16299
  Object.assign(Email.removeSender, { operation: "emailRemoveSender" });
16012
16300
  Object.assign(Email.getSender, { operation: "emailGetSender" });
16301
+ Object.assign(Email.updateSender, { operation: "emailUpdateSender" });
16013
16302
  Object.assign(Email.setDefaultSender, { operation: "emailSetDefaultSender" });
16014
16303
  Object.assign(Email.getStats, { operation: "emailGetStats" });
16015
16304
  Object.assign(Email.enableCatchAll, { operation: "emailEnableCatchAll" });
@@ -16402,6 +16691,6 @@ Object.assign(WhatsappSetupLinks.revoke, { operation: "whatsappSetupLinksRevoke"
16402
16691
  Object.assign(TemplateRegistrations.list, { operation: "templateRegistrationsList" });
16403
16692
  Object.assign(TemplateRegistrations.submit, { operation: "templateRegistrationsSubmit" });
16404
16693
  Object.assign(TemplateRegistrations.get, { operation: "templateRegistrationsGet" });
16405
- export { Accounts, Agents, Analytics, ApiKeys, ApprovalRequests, Attachments, Brands, Campaigns, ContactEvents, ContactGroups, Contacts, Conversations, CustomFields, Domains, Email, Events, Feedback, IntegrationCatalog, Integrations, Issues, Journeys, Logs, Mailboxes, Media, Messages, Namespaces, Newsletters, Operations, Organizations, Policies, ScheduledMessages, Subscriptions, TemplateRegistrations, TemplateShareLinks, Templates, TopicForms, Topics, Webhooks, Whatsapp, WhatsappFlows, WhatsappSetupLinks, Whoami };
16694
+ export { Accounts, Agents, Analytics, ApiKeys, ApprovalRequests, Attachments, Brands, Campaigns, ContactEvents, ContactGroups, Contacts, Conversations, CustomFields, Domains, Email, Events, Feedback, IntegrationCatalog, Integrations, Issues, Journeys, Logs, Mailboxes, Media, Messages, Namespaces, Newsletters, Operations, Organizations, PhoneNumbers, Policies, ScheduledMessages, Subscriptions, TemplateRegistrations, TemplateShareLinks, Templates, TopicForms, Topics, Webhooks, Whatsapp, WhatsappFlows, WhatsappSetupLinks, Whoami };
16406
16695
 
16407
16696
  //# sourceMappingURL=sdk.gen.js.map