samva 0.1.1 → 0.3.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 (47) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +10 -3
  3. package/dist/client/sdk.gen.d.ts +333 -188
  4. package/dist/client/types.gen.d.ts +1452 -718
  5. package/dist/{client-DVALvDUe.js → client-BOghX8fr.js} +1990 -1631
  6. package/dist/effect/api-keys.d.ts +14 -14
  7. package/dist/effect/api-keys.js +1 -1
  8. package/dist/effect/campaigns.d.ts +233 -861
  9. package/dist/effect/campaigns.js +1 -1
  10. package/dist/effect/categories.d.ts +1 -1
  11. package/dist/effect/client.js +1 -1
  12. package/dist/effect/contacts.d.ts +131 -231
  13. package/dist/effect/contacts.js +1 -1
  14. package/dist/effect/conversations.d.ts +91 -208
  15. package/dist/effect/conversations.js +1 -1
  16. package/dist/effect/design.d.ts +11 -11
  17. package/dist/effect/design.js +1 -1
  18. package/dist/effect/email.d.ts +164 -168
  19. package/dist/effect/email.js +20 -18
  20. package/dist/effect/generated.d.ts +13753 -14935
  21. package/dist/effect/index.d.ts +1 -0
  22. package/dist/effect/index.js +3 -2
  23. package/dist/effect/internal/operation.d.ts +15 -113
  24. package/dist/effect/media.d.ts +80 -0
  25. package/dist/effect/media.js +19 -0
  26. package/dist/effect/messages.d.ts +41 -261
  27. package/dist/effect/messages.js +1 -1
  28. package/dist/effect/operations.d.ts +10 -10
  29. package/dist/effect/operations.js +1 -1
  30. package/dist/effect/organizations.d.ts +24 -42
  31. package/dist/effect/organizations.js +1 -1
  32. package/dist/effect/scheduled-messages.d.ts +43 -502
  33. package/dist/effect/scheduled-messages.js +1 -1
  34. package/dist/effect/templates.d.ts +312 -1542
  35. package/dist/effect/templates.js +26 -18
  36. package/dist/effect/webhooks.d.ts +26 -27
  37. package/dist/effect/webhooks.js +2 -2
  38. package/dist/index.js +1 -1
  39. package/dist/{normalize-LkWl4HUF.js → normalize-BKFjbR9t.js} +5 -13
  40. package/dist/normalize.d.ts +3 -33
  41. package/dist/{operation-UtKNITtG.js → operation-C2Q4cFJL.js} +67 -26
  42. package/dist/promises/index.d.ts +6 -14
  43. package/dist/promises/index.js +1 -1
  44. package/dist/promises/types.gen.d.ts +1 -1
  45. package/dist/{promises-QxEfMTho.js → promises-oiy7mOyu.js} +680 -157
  46. package/dist/service-map.d.ts +92 -40
  47. package/package.json +19 -14
@@ -1,4 +1,4 @@
1
- import { n as buildMessagesSendPayload, r as replyToEmailsPayload, t as buildEmailSendPayload } from "./normalize-LkWl4HUF.js";
1
+ import { n as buildMessagesSendPayload, r as replyToEmailsPayload, t as buildEmailSendPayload } from "./normalize-BKFjbR9t.js";
2
2
  //#region src/client/core/bodySerializer.gen.ts
3
3
  const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
4
4
  //#endregion
@@ -45,18 +45,20 @@ function buildClientParams(args, fields) {
45
45
  for (const [index, arg] of args.entries()) {
46
46
  if (fields[index]) config = fields[index];
47
47
  if (!config) continue;
48
- if ("in" in config) if (config.key) {
49
- const field = map.get(config.key);
50
- const name = field.map || config.key;
51
- if (field.in) writeSlot(field.in, name, arg);
52
- } else params.body = arg;
53
- else for (const [key, value] of Object.entries(arg ?? {})) {
48
+ if ("in" in config) {
49
+ if (config.key) {
50
+ const field = map.get(config.key);
51
+ const name = field.map || config.key;
52
+ if (field.in) writeSlot(field.in, name, arg);
53
+ } else params.body = arg;
54
+ } else for (const [key, value] of Object.entries(arg ?? {})) {
54
55
  const field = map.get(key);
55
- if (field) if (field.in) {
56
- const name = field.map || key;
57
- writeSlot(field.in, name, value);
58
- } else params[field.map] = value;
59
- else {
56
+ if (field) {
57
+ if (field.in) {
58
+ const name = field.map || key;
59
+ writeSlot(field.in, name, value);
60
+ } else params[field.map] = value;
61
+ } else {
60
62
  const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
61
63
  if (extra) {
62
64
  const [prefix, slot] = extra;
@@ -725,14 +727,14 @@ var Messages = class {
725
727
  /**
726
728
  * Send a message
727
729
  *
728
- * Sends a message on the requested channel and returns the created message with a 201 Created status. `channel` selects the payload variant. Email sends today; the SMS and WhatsApp variants are coming soon and answer 403 until the channel launches for your organization, so integrating against them now costs no rewrite later. Repeating an identical request with the same optional `Idempotency-Key` header returns the original message; reusing the key for different content returns a conflict.
730
+ * Sends a message on the requested channel and returns the created message with a 201 Created status. `channel` selects the payload variant. Repeating an identical request with the same optional `Idempotency-Key` header returns the original message; reusing the key for different content returns a conflict.
729
731
  */
730
732
  static send(parameters, options) {
731
733
  const params = buildClientParams([parameters], [{ args: [{
732
734
  in: "headers",
733
735
  key: "idempotency-key"
734
736
  }, {
735
- key: "body",
737
+ key: "emailSendMessagePayload",
736
738
  map: "body"
737
739
  }] }]);
738
740
  return (options?.client ?? client).post({
@@ -793,7 +795,7 @@ var Messages = class {
793
795
  /**
794
796
  * Get email message details
795
797
  *
796
- * Returns the email projection of a message, optionally including signed S3 URLs for its raw MIME, HTML, and text content.
798
+ * Returns email delivery details for a message, optionally including signed URLs for its raw MIME, HTML, and text content.
797
799
  */
798
800
  static getEmail(parameters, options) {
799
801
  const params = buildClientParams([parameters], [{ args: [
@@ -971,7 +973,7 @@ var ScheduledMessages = class {
971
973
  /**
972
974
  * Schedule a message
973
975
  *
974
- * Schedules a message at the absolute ISO-8601 instant in scheduledFor. The send payload is the same channel union the immediate send accepts, with each channel's content checked at schedule time so a send that could never render fails now rather than hours later: email schedules today, and the SMS and WhatsApp variants are coming soon and answer 403 until the channel launches. Optional timezone is validated IANA display metadata only and never changes the execution instant.
976
+ * Schedules a message at the absolute ISO-8601 instant in scheduledFor. Optional timezone is validated IANA display metadata only and never changes the execution instant.
975
977
  */
976
978
  static create(parameters, options) {
977
979
  const params = buildClientParams([parameters], [{ args: [
@@ -1550,64 +1552,36 @@ var Email = class {
1550
1552
  });
1551
1553
  }
1552
1554
  /**
1553
- * Provision a sending domain
1554
- *
1555
- * Accepts durable provisioning for a sending domain. Repeating an identical request with the same Idempotency-Key returns the same organization-scoped operation.
1556
- */
1557
- static provisionDomain(parameters, options) {
1558
- const params = buildClientParams([parameters], [{ args: [{
1559
- in: "headers",
1560
- key: "idempotency-key"
1561
- }, {
1562
- in: "body",
1563
- key: "domain"
1564
- }] }]);
1565
- return (options?.client ?? client).post({
1566
- security: [{
1567
- name: "x-api-key",
1568
- type: "apiKey"
1569
- }],
1570
- url: "/v1/email/domain-operations",
1571
- ...options,
1572
- ...params,
1573
- headers: {
1574
- "Content-Type": "application/json",
1575
- ...options?.headers,
1576
- ...params.headers
1577
- }
1578
- });
1579
- }
1580
- /**
1581
- * Verify a sending domain
1555
+ * Get domain verification
1582
1556
  *
1583
- * Initiates verification of a sending domain with the email provider and stores the DNS records needed to complete it.
1557
+ * Returns the stored DNS and provider lifecycle snapshot without calling a provider or mutating state.
1584
1558
  */
1585
- static verifyDomain(parameters, options) {
1559
+ static getDomainVerification(parameters, options) {
1586
1560
  const params = buildClientParams([parameters], [{ args: [{
1587
1561
  in: "path",
1588
1562
  key: "id"
1589
1563
  }] }]);
1590
- return (options?.client ?? client).post({
1564
+ return (options?.client ?? client).get({
1591
1565
  security: [{
1592
1566
  name: "x-api-key",
1593
1567
  type: "apiKey"
1594
1568
  }],
1595
- url: "/v1/email/domains/{id}/verify",
1569
+ url: "/v1/email/domains/{id}/verification",
1596
1570
  ...options,
1597
1571
  ...params
1598
1572
  });
1599
1573
  }
1600
1574
  /**
1601
- * Check domain verification status
1575
+ * Advance domain verification
1602
1576
  *
1603
- * Re-checks a sending domain's verification live with the email provider and updates the stored status once it is verified.
1577
+ * Observes the required DNS records and, once they match, idempotently starts provider provisioning for the staged domain.
1604
1578
  */
1605
- static checkDomainVerification(parameters, options) {
1579
+ static advanceDomainVerification(parameters, options) {
1606
1580
  const params = buildClientParams([parameters], [{ args: [{
1607
1581
  in: "path",
1608
1582
  key: "id"
1609
1583
  }] }]);
1610
- return (options?.client ?? client).get({
1584
+ return (options?.client ?? client).post({
1611
1585
  security: [{
1612
1586
  name: "x-api-key",
1613
1587
  type: "apiKey"
@@ -1694,6 +1668,9 @@ var Email = class {
1694
1668
  const params = buildClientParams([parameters], [{ args: [{
1695
1669
  in: "path",
1696
1670
  key: "id"
1671
+ }, {
1672
+ in: "query",
1673
+ key: "mode"
1697
1674
  }] }]);
1698
1675
  return (options?.client ?? client).get({
1699
1676
  security: [{
@@ -1708,7 +1685,7 @@ var Email = class {
1708
1685
  /**
1709
1686
  * Build a one-click DNS apply URL
1710
1687
  *
1711
- * Builds the signed Domain Connect apply URL that sends the customer to their DNS provider to apply Samva's sending records in one click. Pass inbound to also request the receiving MX records.
1688
+ * Builds the signed Domain Connect apply URL for the selected sending-only or sending-and-receiving service. Manual DNS remains available for either mode.
1712
1689
  */
1713
1690
  static buildDomainConnectApplyUrl(parameters, options) {
1714
1691
  const params = buildClientParams([parameters], [{ args: [{
@@ -1716,7 +1693,7 @@ var Email = class {
1716
1693
  key: "id"
1717
1694
  }, {
1718
1695
  in: "body",
1719
- key: "inbound"
1696
+ key: "mode"
1720
1697
  }] }]);
1721
1698
  return (options?.client ?? client).post({
1722
1699
  security: [{
@@ -1812,26 +1789,6 @@ var Email = class {
1812
1789
  });
1813
1790
  }
1814
1791
  /**
1815
- * Get sending domain status
1816
- *
1817
- * Returns the stored verification status of a sending domain without contacting the email provider.
1818
- */
1819
- static getDomainStatus(parameters, options) {
1820
- const params = buildClientParams([parameters], [{ args: [{
1821
- in: "path",
1822
- key: "id"
1823
- }] }]);
1824
- return (options?.client ?? client).get({
1825
- security: [{
1826
- name: "x-api-key",
1827
- type: "apiKey"
1828
- }],
1829
- url: "/v1/email/domains/{id}/status",
1830
- ...options,
1831
- ...params
1832
- });
1833
- }
1834
- /**
1835
1792
  * Set the default sending domain
1836
1793
  *
1837
1794
  * Marks a verified domain as the organization's default sending domain, atomically clearing any previous default. Omitted-`from` sends resolve through the default domain's default sender.
@@ -1947,11 +1904,11 @@ var Email = class {
1947
1904
  });
1948
1905
  }
1949
1906
  /**
1950
- * Disable a branded tracking domain
1907
+ * Disable a custom tracking domain
1951
1908
  *
1952
- * Tears down a domain's branded tracking and its managed resources. Sends immediately revert to the shared tracking host. Existing branded links in already-delivered mail stop working.
1909
+ * Tears down a domain's custom tracking and its managed resources. Sends immediately revert to the shared tracking host. Existing custom links in already-delivered mail stop working.
1953
1910
  */
1954
- static disableBrandedTracking(parameters, options) {
1911
+ static disableCustomTracking(parameters, options) {
1955
1912
  const params = buildClientParams([parameters], [{ args: [{
1956
1913
  in: "path",
1957
1914
  key: "id"
@@ -1961,17 +1918,17 @@ var Email = class {
1961
1918
  name: "x-api-key",
1962
1919
  type: "apiKey"
1963
1920
  }],
1964
- url: "/v1/email/domains/{id}/branded-tracking",
1921
+ url: "/v1/email/domains/{id}/custom-tracking",
1965
1922
  ...options,
1966
1923
  ...params
1967
1924
  });
1968
1925
  }
1969
1926
  /**
1970
- * Get branded tracking status
1927
+ * Get custom tracking status
1971
1928
  *
1972
- * Returns the branded tracking state for a sending domain: lifecycle status, the required DNS records, certificate and CAA readiness, and any scheduled teardown. `enabled` is false when no branded tracking domain is provisioned.
1929
+ * Returns the custom tracking state for a sending domain: lifecycle status, the required DNS records, certificate and CAA readiness, and any scheduled teardown. `enabled` is false when no custom tracking domain is provisioned.
1973
1930
  */
1974
- static getBrandedTracking(parameters, options) {
1931
+ static getCustomTracking(parameters, options) {
1975
1932
  const params = buildClientParams([parameters], [{ args: [{
1976
1933
  in: "path",
1977
1934
  key: "id"
@@ -1981,17 +1938,17 @@ var Email = class {
1981
1938
  name: "x-api-key",
1982
1939
  type: "apiKey"
1983
1940
  }],
1984
- url: "/v1/email/domains/{id}/branded-tracking",
1941
+ url: "/v1/email/domains/{id}/custom-tracking",
1985
1942
  ...options,
1986
1943
  ...params
1987
1944
  });
1988
1945
  }
1989
1946
  /**
1990
- * Enable a branded tracking domain
1947
+ * Enable a custom tracking domain
1991
1948
  *
1992
- * Provisions a branded tracking domain (default label `track`) for a verified sending domain so open/click links redirect through the customer's own subdomain. Requires the branded_tracking entitlement. Returns the resulting state including the two DNS records the customer must create.
1949
+ * Provisions a custom tracking domain (default label `track`) for a verified sending domain so open/click links redirect through the customer's own subdomain. Requires the custom_tracking_domain entitlement. Returns the resulting state including the two DNS records the customer must create.
1993
1950
  */
1994
- static enableBrandedTracking(parameters, options) {
1951
+ static enableCustomTracking(parameters, options) {
1995
1952
  const params = buildClientParams([parameters], [{ args: [{
1996
1953
  in: "path",
1997
1954
  key: "id"
@@ -2004,7 +1961,82 @@ var Email = class {
2004
1961
  name: "x-api-key",
2005
1962
  type: "apiKey"
2006
1963
  }],
2007
- url: "/v1/email/domains/{id}/branded-tracking",
1964
+ url: "/v1/email/domains/{id}/custom-tracking",
1965
+ ...options,
1966
+ ...params,
1967
+ headers: {
1968
+ "Content-Type": "application/json",
1969
+ ...options?.headers,
1970
+ ...params.headers
1971
+ }
1972
+ });
1973
+ }
1974
+ /**
1975
+ * Check automatic Custom Tracking Domain setup eligibility
1976
+ *
1977
+ * Reports whether the domain's DNS provider supports Domain Connect for its current Custom Tracking Domain. Ineligible is a normal result and the exact manual CNAME records remain available.
1978
+ */
1979
+ static getCustomTrackingDomainConnect(parameters, options) {
1980
+ const params = buildClientParams([parameters], [{ args: [{
1981
+ in: "path",
1982
+ key: "id"
1983
+ }] }]);
1984
+ return (options?.client ?? client).get({
1985
+ security: [{
1986
+ name: "x-api-key",
1987
+ type: "apiKey"
1988
+ }],
1989
+ url: "/v1/email/domains/{id}/custom-tracking/domain-connect",
1990
+ ...options,
1991
+ ...params
1992
+ });
1993
+ }
1994
+ /**
1995
+ * Build an automatic Custom Tracking Domain apply URL
1996
+ *
1997
+ * Builds the signed Domain Connect URL for the current customer-selected tracking host. The server derives the host and Cloudflare DCV UUID; exact manual CNAME records remain available.
1998
+ */
1999
+ static buildCustomTrackingDomainConnectApplyUrl(parameters, options) {
2000
+ const params = buildClientParams([parameters], [{ args: [{
2001
+ in: "path",
2002
+ key: "id"
2003
+ }] }]);
2004
+ return (options?.client ?? client).post({
2005
+ security: [{
2006
+ name: "x-api-key",
2007
+ type: "apiKey"
2008
+ }],
2009
+ url: "/v1/email/domains/{id}/custom-tracking/domain-connect/apply-url",
2010
+ ...options,
2011
+ ...params
2012
+ });
2013
+ }
2014
+ /**
2015
+ * Complete an automatic Custom Tracking Domain return
2016
+ *
2017
+ * Validates the purpose- and revision-bound registrar state, then re-kicks the existing readiness reconciliation. The callback never declares the host ready or changes email tracking selection.
2018
+ */
2019
+ static completeCustomTrackingDomainConnect(parameters, options) {
2020
+ const params = buildClientParams([parameters], [{ args: [
2021
+ {
2022
+ in: "path",
2023
+ key: "id"
2024
+ },
2025
+ {
2026
+ in: "body",
2027
+ key: "state"
2028
+ },
2029
+ {
2030
+ in: "body",
2031
+ key: "error"
2032
+ }
2033
+ ] }]);
2034
+ return (options?.client ?? client).post({
2035
+ security: [{
2036
+ name: "x-api-key",
2037
+ type: "apiKey"
2038
+ }],
2039
+ url: "/v1/email/domains/{id}/custom-tracking/domain-connect/complete",
2008
2040
  ...options,
2009
2041
  ...params,
2010
2042
  headers: {
@@ -2805,6 +2837,131 @@ var Email = class {
2805
2837
  });
2806
2838
  }
2807
2839
  };
2840
+ var Media = class {
2841
+ /**
2842
+ * Create a media object
2843
+ *
2844
+ * Creates the media object in the pending state and returns it with the upload instruction — URL, method, and headers — for putting its bytes into storage.
2845
+ */
2846
+ static create(parameters, options) {
2847
+ const params = buildClientParams([parameters], [{ args: [
2848
+ {
2849
+ in: "body",
2850
+ key: "filename"
2851
+ },
2852
+ {
2853
+ in: "body",
2854
+ key: "contentType"
2855
+ },
2856
+ {
2857
+ in: "body",
2858
+ key: "sizeBytes"
2859
+ },
2860
+ {
2861
+ in: "body",
2862
+ key: "purpose"
2863
+ },
2864
+ {
2865
+ in: "body",
2866
+ key: "checksumSha256"
2867
+ }
2868
+ ] }]);
2869
+ return (options?.client ?? client).post({
2870
+ security: [{
2871
+ name: "x-api-key",
2872
+ type: "apiKey"
2873
+ }],
2874
+ url: "/v1/media",
2875
+ ...options,
2876
+ ...params,
2877
+ headers: {
2878
+ "Content-Type": "application/json",
2879
+ ...options?.headers,
2880
+ ...params.headers
2881
+ }
2882
+ });
2883
+ }
2884
+ /**
2885
+ * Complete a media upload
2886
+ *
2887
+ * Verifies the uploaded object exists in storage, marks the media object ready, and returns it with a download URL.
2888
+ */
2889
+ static complete(parameters, options) {
2890
+ const params = buildClientParams([parameters], [{ args: [{
2891
+ in: "path",
2892
+ key: "mediaId"
2893
+ }] }]);
2894
+ return (options?.client ?? client).post({
2895
+ security: [{
2896
+ name: "x-api-key",
2897
+ type: "apiKey"
2898
+ }],
2899
+ url: "/v1/media/{mediaId}/complete",
2900
+ ...options,
2901
+ ...params
2902
+ });
2903
+ }
2904
+ /**
2905
+ * Delete a media object
2906
+ *
2907
+ * Deletes a pending media object and the bytes stored for it. Fails if the media object is already ready.
2908
+ */
2909
+ static remove(parameters, options) {
2910
+ const params = buildClientParams([parameters], [{ args: [{
2911
+ in: "path",
2912
+ key: "mediaId"
2913
+ }] }]);
2914
+ return (options?.client ?? client).delete({
2915
+ security: [{
2916
+ name: "x-api-key",
2917
+ type: "apiKey"
2918
+ }],
2919
+ url: "/v1/media/{mediaId}",
2920
+ ...options,
2921
+ ...params
2922
+ });
2923
+ }
2924
+ /**
2925
+ * Get a media object
2926
+ *
2927
+ * Returns the media object's metadata, including status, dimensions, and confirmation timestamps.
2928
+ */
2929
+ static getById(parameters, options) {
2930
+ const params = buildClientParams([parameters], [{ args: [{
2931
+ in: "path",
2932
+ key: "mediaId"
2933
+ }] }]);
2934
+ return (options?.client ?? client).get({
2935
+ security: [{
2936
+ name: "x-api-key",
2937
+ type: "apiKey"
2938
+ }],
2939
+ url: "/v1/media/{mediaId}",
2940
+ ...options,
2941
+ ...params
2942
+ });
2943
+ }
2944
+ /**
2945
+ * Get a media download URL
2946
+ *
2947
+ * Generates a presigned, time-limited download URL for a ready media object.
2948
+ */
2949
+ static downloadUrl(parameters, options) {
2950
+ const params = buildClientParams([parameters], [{ args: [{
2951
+ in: "path",
2952
+ key: "mediaId"
2953
+ }] }]);
2954
+ return (options?.client ?? client).get({
2955
+ security: [{
2956
+ name: "x-api-key",
2957
+ type: "apiKey"
2958
+ }],
2959
+ url: "/v1/media/{mediaId}/url",
2960
+ ...options,
2961
+ ...params
2962
+ });
2963
+ }
2964
+ };
2808
2965
  var Conversations = class {
2809
2966
  /**
2810
2967
  * List conversations
@@ -3255,10 +3412,6 @@ var Contacts = class {
3255
3412
  in: "body",
3256
3413
  key: "tags"
3257
3414
  },
3258
- {
3259
- in: "body",
3260
- key: "engagement"
3261
- },
3262
3415
  {
3263
3416
  in: "body",
3264
3417
  key: "accessLevel"
@@ -3314,7 +3467,7 @@ var Contacts = class {
3314
3467
  /**
3315
3468
  * Find a contact
3316
3469
  *
3317
- * Looks up a single contact by email, phone, WhatsApp, or external ID, returning null when no contact matches.
3470
+ * Samva API operation.
3318
3471
  */
3319
3472
  static find(parameters, options) {
3320
3473
  const params = buildClientParams([parameters], [{ args: [
@@ -3326,10 +3479,6 @@ var Contacts = class {
3326
3479
  in: "body",
3327
3480
  key: "phone"
3328
3481
  },
3329
- {
3330
- in: "body",
3331
- key: "whatsapp"
3332
- },
3333
3482
  {
3334
3483
  in: "body",
3335
3484
  key: "externalId"
@@ -3365,10 +3514,6 @@ var Contacts = class {
3365
3514
  in: "body",
3366
3515
  key: "phone"
3367
3516
  },
3368
- {
3369
- in: "body",
3370
- key: "whatsapp"
3371
- },
3372
3517
  {
3373
3518
  in: "body",
3374
3519
  key: "externalId"
@@ -3480,10 +3625,6 @@ var Contacts = class {
3480
3625
  in: "body",
3481
3626
  key: "tags"
3482
3627
  },
3483
- {
3484
- in: "body",
3485
- key: "engagement"
3486
- },
3487
3628
  {
3488
3629
  in: "body",
3489
3630
  key: "accessLevel"
@@ -3900,6 +4041,11 @@ var Templates = class {
3900
4041
  }
3901
4042
  });
3902
4043
  }
4044
+ /**
4045
+ * List templates for the dashboard
4046
+ *
4047
+ * Returns a paginated dashboard view that groups related channel templates into families and leaves standalone templates ungrouped.
4048
+ */
3903
4049
  static listDashboard(parameters, options) {
3904
4050
  const params = buildClientParams([parameters], [{ args: [
3905
4051
  {
@@ -3949,6 +4095,11 @@ var Templates = class {
3949
4095
  ...params
3950
4096
  });
3951
4097
  }
4098
+ /**
4099
+ * List template families
4100
+ *
4101
+ * Returns a paginated list of the organization's template families and members.
4102
+ */
3952
4103
  static listFamilies(parameters, options) {
3953
4104
  const params = buildClientParams([parameters], [{ args: [{
3954
4105
  in: "query",
@@ -3967,6 +4118,11 @@ var Templates = class {
3967
4118
  ...params
3968
4119
  });
3969
4120
  }
4121
+ /**
4122
+ * Create a template family
4123
+ *
4124
+ * Creates an empty template family with the supplied name and returns it with status 201.
4125
+ */
3970
4126
  static createFamily(parameters, options) {
3971
4127
  const params = buildClientParams([parameters], [{ args: [{
3972
4128
  in: "body",
@@ -3987,6 +4143,11 @@ var Templates = class {
3987
4143
  }
3988
4144
  });
3989
4145
  }
4146
+ /**
4147
+ * Delete a template family
4148
+ *
4149
+ * Deletes a template family without deleting its member templates.
4150
+ */
3990
4151
  static deleteFamily(parameters, options) {
3991
4152
  const params = buildClientParams([parameters], [{ args: [{
3992
4153
  in: "path",
@@ -4002,6 +4163,11 @@ var Templates = class {
4002
4163
  ...params
4003
4164
  });
4004
4165
  }
4166
+ /**
4167
+ * Get a template family
4168
+ *
4169
+ * Returns a template family and its channel-specific member templates.
4170
+ */
4005
4171
  static getFamily(parameters, options) {
4006
4172
  const params = buildClientParams([parameters], [{ args: [{
4007
4173
  in: "path",
@@ -4017,6 +4183,11 @@ var Templates = class {
4017
4183
  ...params
4018
4184
  });
4019
4185
  }
4186
+ /**
4187
+ * Rename a template family
4188
+ *
4189
+ * Changes a template family's name and returns the updated family.
4190
+ */
4020
4191
  static renameFamily(parameters, options) {
4021
4192
  const params = buildClientParams([parameters], [{ args: [{
4022
4193
  in: "path",
@@ -4040,6 +4211,11 @@ var Templates = class {
4040
4211
  }
4041
4212
  });
4042
4213
  }
4214
+ /**
4215
+ * Create a family from a template
4216
+ *
4217
+ * Creates a template family containing the specified template and returns the new family with status 201.
4218
+ */
4043
4219
  static createFamilyFromTemplate(parameters, options) {
4044
4220
  const params = buildClientParams([parameters], [{ args: [{
4045
4221
  in: "path",
@@ -4063,6 +4239,11 @@ var Templates = class {
4063
4239
  }
4064
4240
  });
4065
4241
  }
4242
+ /**
4243
+ * Detach a template from a family
4244
+ *
4245
+ * Removes a member template from the family without deleting the template.
4246
+ */
4066
4247
  static detachFamilyMember(parameters, options) {
4067
4248
  const params = buildClientParams([parameters], [{ args: [{
4068
4249
  in: "path",
@@ -4081,6 +4262,11 @@ var Templates = class {
4081
4262
  ...params
4082
4263
  });
4083
4264
  }
4265
+ /**
4266
+ * Attach a template to a family
4267
+ *
4268
+ * Adds an existing template as a channel member of the family and returns the updated family.
4269
+ */
4084
4270
  static attachFamilyMember(parameters, options) {
4085
4271
  const params = buildClientParams([parameters], [{ args: [{
4086
4272
  in: "path",
@@ -4099,6 +4285,11 @@ var Templates = class {
4099
4285
  ...params
4100
4286
  });
4101
4287
  }
4288
+ /**
4289
+ * Add a channel to a template family
4290
+ *
4291
+ * Creates a template for the requested channel in the family and returns the updated family with status 201.
4292
+ */
4102
4293
  static addFamilyChannel(parameters, options) {
4103
4294
  const params = buildClientParams([parameters], [{ args: [{
4104
4295
  in: "path",
@@ -4140,7 +4331,7 @@ var Templates = class {
4140
4331
  /**
4141
4332
  * Get a template
4142
4333
  *
4143
- * Returns a single template by ID, including its SML source and compiled channel content.
4334
+ * Returns template metadata and compiled channel content. Read live SML through the template-document API.
4144
4335
  */
4145
4336
  static getById(parameters, options) {
4146
4337
  const params = buildClientParams([parameters], [{ args: [{
@@ -4160,7 +4351,7 @@ var Templates = class {
4160
4351
  /**
4161
4352
  * Update a template
4162
4353
  *
4163
- * Updates a template's metadata or SML source; a new source's root tag must match the template's existing channel. Returns the updated template.
4354
+ * Updates template metadata. Source changes use the template-document revision API.
4164
4355
  */
4165
4356
  static update(parameters, options) {
4166
4357
  const params = buildClientParams([parameters], [{ args: [{
@@ -4213,25 +4404,24 @@ var Templates = class {
4213
4404
  }
4214
4405
  });
4215
4406
  }
4407
+ };
4408
+ var TemplateDocuments = class {
4216
4409
  /**
4217
- * Render a template
4410
+ * Bootstrap a template document
4218
4411
  *
4219
- * Renders a template with the provided variables and returns a channel-specific preview, along with any missing variables and errors. No message is sent.
4412
+ * Creates or loads the authoritative editable document for a template and returns its current snapshot.
4220
4413
  */
4221
- static render(parameters, options) {
4414
+ static bootstrap(parameters, options) {
4222
4415
  const params = buildClientParams([parameters], [{ args: [{
4223
- in: "path",
4224
- key: "id"
4225
- }, {
4226
4416
  in: "body",
4227
- key: "data"
4417
+ key: "templateId"
4228
4418
  }] }]);
4229
4419
  return (options?.client ?? client).post({
4230
4420
  security: [{
4231
4421
  name: "x-api-key",
4232
4422
  type: "apiKey"
4233
4423
  }],
4234
- url: "/v1/templates/{id}/render",
4424
+ url: "/v1/template-documents/bootstrap",
4235
4425
  ...options,
4236
4426
  ...params,
4237
4427
  headers: {
@@ -4242,124 +4432,452 @@ var Templates = class {
4242
4432
  });
4243
4433
  }
4244
4434
  /**
4245
- * Duplicate a template
4435
+ * Get a template document
4246
4436
  *
4247
- * Creates a copy of the template as a new draft template with a fresh slug. Returns the new template with status 201.
4437
+ * Returns the current authoritative source, revision, and metadata for a template document.
4248
4438
  */
4249
- static duplicate(parameters, options) {
4439
+ static get(parameters, options) {
4250
4440
  const params = buildClientParams([parameters], [{ args: [{
4251
4441
  in: "path",
4252
- key: "id"
4442
+ key: "templateId"
4253
4443
  }] }]);
4254
- return (options?.client ?? client).post({
4444
+ return (options?.client ?? client).get({
4255
4445
  security: [{
4256
4446
  name: "x-api-key",
4257
4447
  type: "apiKey"
4258
4448
  }],
4259
- url: "/v1/templates/{id}/duplicate",
4449
+ url: "/v1/template-documents/{templateId}",
4260
4450
  ...options,
4261
4451
  ...params
4262
4452
  });
4263
4453
  }
4264
4454
  /**
4265
- * Publish a template
4455
+ * Issue an agent admission
4266
4456
  *
4267
- * Compiles the template's current source and creates a new published version snapshot, recording the publisher. Returns the updated template.
4457
+ * Authorizes a bounded template-agent operation against the current document and returns the admission context.
4268
4458
  */
4269
- static publish(parameters, options) {
4459
+ static issueAgentAdmission(parameters, options) {
4460
+ const params = buildClientParams([parameters], [{ args: [
4461
+ {
4462
+ in: "path",
4463
+ key: "templateId"
4464
+ },
4465
+ {
4466
+ in: "body",
4467
+ key: "method"
4468
+ },
4469
+ {
4470
+ in: "body",
4471
+ key: "route"
4472
+ },
4473
+ {
4474
+ in: "body",
4475
+ key: "referenceDigest"
4476
+ },
4477
+ {
4478
+ in: "body",
4479
+ key: "research"
4480
+ },
4481
+ {
4482
+ in: "body",
4483
+ key: "competitorMessage"
4484
+ }
4485
+ ] }]);
4486
+ return (options?.client ?? client).post({
4487
+ security: [{
4488
+ name: "x-api-key",
4489
+ type: "apiKey"
4490
+ }],
4491
+ url: "/v1/template-documents/{templateId}/agent-admission",
4492
+ ...options,
4493
+ ...params,
4494
+ headers: {
4495
+ "Content-Type": "application/json",
4496
+ ...options?.headers,
4497
+ ...params.headers
4498
+ }
4499
+ });
4500
+ }
4501
+ /**
4502
+ * Complete an agent conversation clear
4503
+ *
4504
+ * Records completion of an admitted agent conversation-clear operation for the template document.
4505
+ */
4506
+ static completeAgentConversationClear(parameters, options) {
4270
4507
  const params = buildClientParams([parameters], [{ args: [{
4271
4508
  in: "path",
4272
- key: "id"
4509
+ key: "templateId"
4510
+ }, {
4511
+ in: "body",
4512
+ key: "conversationId"
4273
4513
  }] }]);
4274
4514
  return (options?.client ?? client).post({
4275
4515
  security: [{
4276
4516
  name: "x-api-key",
4277
4517
  type: "apiKey"
4278
4518
  }],
4279
- url: "/v1/templates/{id}/publish",
4519
+ url: "/v1/template-documents/{templateId}/agent-conversation/clear-completion",
4280
4520
  ...options,
4281
- ...params
4521
+ ...params,
4522
+ headers: {
4523
+ "Content-Type": "application/json",
4524
+ ...options?.headers,
4525
+ ...params.headers
4526
+ }
4282
4527
  });
4283
4528
  }
4284
4529
  /**
4285
- * Unpublish a template
4530
+ * Apply an agent proposal
4286
4531
  *
4287
- * Reverts a published template by creating a new draft version from its current source. Returns the updated template.
4532
+ * Applies an admitted agent-authored source proposal when its revision and source digest still match the document.
4288
4533
  */
4289
- static unpublish(parameters, options) {
4534
+ static applyAgentProposal(parameters, options) {
4535
+ const params = buildClientParams([parameters], [{ args: [
4536
+ {
4537
+ in: "path",
4538
+ key: "templateId"
4539
+ },
4540
+ {
4541
+ in: "body",
4542
+ key: "expectedRevision"
4543
+ },
4544
+ {
4545
+ in: "body",
4546
+ key: "sourceDigest"
4547
+ },
4548
+ {
4549
+ in: "body",
4550
+ key: "idempotencyKey"
4551
+ },
4552
+ {
4553
+ in: "body",
4554
+ key: "source"
4555
+ },
4556
+ {
4557
+ in: "body",
4558
+ key: "references"
4559
+ },
4560
+ {
4561
+ in: "body",
4562
+ key: "proposalBinding"
4563
+ }
4564
+ ] }]);
4565
+ return (options?.client ?? client).post({
4566
+ security: [{
4567
+ name: "x-api-key",
4568
+ type: "apiKey"
4569
+ }],
4570
+ url: "/v1/template-documents/{templateId}/agent-proposals/apply",
4571
+ ...options,
4572
+ ...params,
4573
+ headers: {
4574
+ "Content-Type": "application/json",
4575
+ ...options?.headers,
4576
+ ...params.headers
4577
+ }
4578
+ });
4579
+ }
4580
+ /**
4581
+ * Replace template source
4582
+ *
4583
+ * Replaces the editable SML source when the expected revision matches and returns the updated document snapshot.
4584
+ */
4585
+ static replace(parameters, options) {
4586
+ const params = buildClientParams([parameters], [{ args: [
4587
+ {
4588
+ in: "path",
4589
+ key: "templateId"
4590
+ },
4591
+ {
4592
+ in: "body",
4593
+ key: "expectedRevision"
4594
+ },
4595
+ {
4596
+ in: "body",
4597
+ key: "source"
4598
+ }
4599
+ ] }]);
4600
+ return (options?.client ?? client).post({
4601
+ security: [{
4602
+ name: "x-api-key",
4603
+ type: "apiKey"
4604
+ }],
4605
+ url: "/v1/template-documents/{templateId}/source",
4606
+ ...options,
4607
+ ...params,
4608
+ headers: {
4609
+ "Content-Type": "application/json",
4610
+ ...options?.headers,
4611
+ ...params.headers
4612
+ }
4613
+ });
4614
+ }
4615
+ /**
4616
+ * Save a template document
4617
+ *
4618
+ * Materializes the specified document revision as a durable template source version and returns its receipt.
4619
+ */
4620
+ static save(parameters, options) {
4290
4621
  const params = buildClientParams([parameters], [{ args: [{
4291
4622
  in: "path",
4292
- key: "id"
4623
+ key: "templateId"
4624
+ }, {
4625
+ in: "body",
4626
+ key: "revision"
4293
4627
  }] }]);
4294
4628
  return (options?.client ?? client).post({
4295
4629
  security: [{
4296
4630
  name: "x-api-key",
4297
4631
  type: "apiKey"
4298
4632
  }],
4299
- url: "/v1/templates/{id}/unpublish",
4633
+ url: "/v1/template-documents/{templateId}/save",
4300
4634
  ...options,
4301
- ...params
4635
+ ...params,
4636
+ headers: {
4637
+ "Content-Type": "application/json",
4638
+ ...options?.headers,
4639
+ ...params.headers
4640
+ }
4302
4641
  });
4303
4642
  }
4304
4643
  /**
4305
- * List template versions
4644
+ * Render a template document
4306
4645
  *
4307
- * Returns the template's version history, listing each source version with its status and publish metadata.
4646
+ * Renders the specified document revision with optional variables and reports any missing variables.
4308
4647
  */
4309
- static versionHistory(parameters, options) {
4648
+ static render(parameters, options) {
4649
+ const params = buildClientParams([parameters], [{ args: [
4650
+ {
4651
+ in: "path",
4652
+ key: "templateId"
4653
+ },
4654
+ {
4655
+ in: "body",
4656
+ key: "revision"
4657
+ },
4658
+ {
4659
+ in: "body",
4660
+ key: "variables"
4661
+ }
4662
+ ] }]);
4663
+ return (options?.client ?? client).post({
4664
+ security: [{
4665
+ name: "x-api-key",
4666
+ type: "apiKey"
4667
+ }],
4668
+ url: "/v1/template-documents/{templateId}/render",
4669
+ ...options,
4670
+ ...params,
4671
+ headers: {
4672
+ "Content-Type": "application/json",
4673
+ ...options?.headers,
4674
+ ...params.headers
4675
+ }
4676
+ });
4677
+ }
4678
+ /**
4679
+ * Check a template document for spam
4680
+ *
4681
+ * Renders and analyzes the specified document revision for spam risks, returning issues and recommendations.
4682
+ */
4683
+ static spamCheck(parameters, options) {
4684
+ const params = buildClientParams([parameters], [{ args: [
4685
+ {
4686
+ in: "path",
4687
+ key: "templateId"
4688
+ },
4689
+ {
4690
+ in: "body",
4691
+ key: "revision"
4692
+ },
4693
+ {
4694
+ in: "body",
4695
+ key: "variables"
4696
+ }
4697
+ ] }]);
4698
+ return (options?.client ?? client).post({
4699
+ security: [{
4700
+ name: "x-api-key",
4701
+ type: "apiKey"
4702
+ }],
4703
+ url: "/v1/template-documents/{templateId}/spam-check",
4704
+ ...options,
4705
+ ...params,
4706
+ headers: {
4707
+ "Content-Type": "application/json",
4708
+ ...options?.headers,
4709
+ ...params.headers
4710
+ }
4711
+ });
4712
+ }
4713
+ /**
4714
+ * Send a template test
4715
+ *
4716
+ * Renders the specified document revision and sends a test message to one recipient without publishing it.
4717
+ */
4718
+ static testSend(parameters, options) {
4719
+ const params = buildClientParams([parameters], [{ args: [
4720
+ {
4721
+ in: "path",
4722
+ key: "templateId"
4723
+ },
4724
+ {
4725
+ in: "body",
4726
+ key: "revision"
4727
+ },
4728
+ {
4729
+ in: "body",
4730
+ key: "to"
4731
+ },
4732
+ {
4733
+ in: "body",
4734
+ key: "variables"
4735
+ }
4736
+ ] }]);
4737
+ return (options?.client ?? client).post({
4738
+ security: [{
4739
+ name: "x-api-key",
4740
+ type: "apiKey"
4741
+ }],
4742
+ url: "/v1/template-documents/{templateId}/send-test",
4743
+ ...options,
4744
+ ...params,
4745
+ headers: {
4746
+ "Content-Type": "application/json",
4747
+ ...options?.headers,
4748
+ ...params.headers
4749
+ }
4750
+ });
4751
+ }
4752
+ /**
4753
+ * Send a template document
4754
+ *
4755
+ * Sends or schedules the specified document revision for one or more recipients with optional variables.
4756
+ */
4757
+ static send(parameters, options) {
4758
+ const params = buildClientParams([parameters], [{ args: [
4759
+ {
4760
+ in: "path",
4761
+ key: "templateId"
4762
+ },
4763
+ {
4764
+ in: "body",
4765
+ key: "revision"
4766
+ },
4767
+ {
4768
+ in: "body",
4769
+ key: "to"
4770
+ },
4771
+ {
4772
+ in: "body",
4773
+ key: "variables"
4774
+ },
4775
+ {
4776
+ in: "body",
4777
+ key: "schedule"
4778
+ }
4779
+ ] }]);
4780
+ return (options?.client ?? client).post({
4781
+ security: [{
4782
+ name: "x-api-key",
4783
+ type: "apiKey"
4784
+ }],
4785
+ url: "/v1/template-documents/{templateId}/send",
4786
+ ...options,
4787
+ ...params,
4788
+ headers: {
4789
+ "Content-Type": "application/json",
4790
+ ...options?.headers,
4791
+ ...params.headers
4792
+ }
4793
+ });
4794
+ }
4795
+ /**
4796
+ * List template document versions
4797
+ *
4798
+ * Returns the saved source-version history for a template document.
4799
+ */
4800
+ static versions(parameters, options) {
4310
4801
  const params = buildClientParams([parameters], [{ args: [{
4311
4802
  in: "path",
4312
- key: "id"
4803
+ key: "templateId"
4313
4804
  }] }]);
4314
4805
  return (options?.client ?? client).get({
4315
4806
  security: [{
4316
4807
  name: "x-api-key",
4317
4808
  type: "apiKey"
4318
4809
  }],
4319
- url: "/v1/templates/{id}/versions",
4810
+ url: "/v1/template-documents/{templateId}/versions",
4320
4811
  ...options,
4321
4812
  ...params
4322
4813
  });
4323
4814
  }
4324
4815
  /**
4325
- * Restore a template version
4816
+ * Publish a template document
4326
4817
  *
4327
- * Recompiles an older version's source and restores it as a new draft version. Fails if the source no longer compiles or its channel differs.
4818
+ * Publishes the current saved template source version and returns its lifecycle receipt.
4328
4819
  */
4329
- static restoreVersion(parameters, options) {
4820
+ static publish(parameters, options) {
4330
4821
  const params = buildClientParams([parameters], [{ args: [{
4331
4822
  in: "path",
4332
- key: "id"
4333
- }, {
4334
- in: "path",
4335
- key: "versionId"
4823
+ key: "templateId"
4336
4824
  }] }]);
4337
4825
  return (options?.client ?? client).post({
4338
4826
  security: [{
4339
4827
  name: "x-api-key",
4340
4828
  type: "apiKey"
4341
4829
  }],
4342
- url: "/v1/templates/{id}/versions/{versionId}/restore",
4830
+ url: "/v1/template-documents/{templateId}/publish",
4343
4831
  ...options,
4344
4832
  ...params
4345
4833
  });
4346
4834
  }
4347
4835
  /**
4348
- * Spam-check a template or email content
4836
+ * Unpublish a template document
4349
4837
  *
4350
- * Scores email content for spam risk, from either a stored email template or raw subject, HTML, and text. Returns a score, severity, issues, and recommendations.
4838
+ * Unpublishes the current template source version and returns its lifecycle receipt.
4351
4839
  */
4352
- static spamCheck(parameters, options) {
4840
+ static unpublish(parameters, options) {
4353
4841
  const params = buildClientParams([parameters], [{ args: [{
4354
- key: "body",
4355
- map: "body"
4842
+ in: "path",
4843
+ key: "templateId"
4356
4844
  }] }]);
4357
4845
  return (options?.client ?? client).post({
4358
4846
  security: [{
4359
4847
  name: "x-api-key",
4360
4848
  type: "apiKey"
4361
4849
  }],
4362
- url: "/v1/templates/spam-check",
4850
+ url: "/v1/template-documents/{templateId}/unpublish",
4851
+ ...options,
4852
+ ...params
4853
+ });
4854
+ }
4855
+ /**
4856
+ * Restore a template document version
4857
+ *
4858
+ * Restores a saved source version into the editable document when the expected revision matches.
4859
+ */
4860
+ static restore(parameters, options) {
4861
+ const params = buildClientParams([parameters], [{ args: [
4862
+ {
4863
+ in: "path",
4864
+ key: "templateId"
4865
+ },
4866
+ {
4867
+ in: "path",
4868
+ key: "versionId"
4869
+ },
4870
+ {
4871
+ in: "body",
4872
+ key: "expectedRevision"
4873
+ }
4874
+ ] }]);
4875
+ return (options?.client ?? client).post({
4876
+ security: [{
4877
+ name: "x-api-key",
4878
+ type: "apiKey"
4879
+ }],
4880
+ url: "/v1/template-documents/{templateId}/versions/{versionId}/restore",
4363
4881
  ...options,
4364
4882
  ...params,
4365
4883
  headers: {
@@ -5034,7 +5552,7 @@ var ApiKeys = class {
5034
5552
  /**
5035
5553
  * Rotate an API key
5036
5554
  *
5037
- * Deactivates the existing key and issues a replacement with the same name and permissions. Returns the new key, including the plaintext secret.
5555
+ * Issues a replacement with the same owner, name, and permissions, then deactivates the existing key. Returns the new key, including the plaintext secret.
5038
5556
  */
5039
5557
  static rotate(parameters, options) {
5040
5558
  const params = buildClientParams([parameters], [{ args: [{
@@ -5127,6 +5645,7 @@ var ApiKeys = class {
5127
5645
  };
5128
5646
  //#endregion
5129
5647
  //#region src/promises/errors.gen.ts
5648
+ const redactRequest = (request) => request === void 0 ? void 0 : new Request(request.url, { method: request.method });
5130
5649
  /** Base class for failures declared by the public Samva OpenAPI contract. */
5131
5650
  var SamvaApiError = class extends Error {
5132
5651
  request;
@@ -5135,7 +5654,7 @@ var SamvaApiError = class extends Error {
5135
5654
  constructor(message, context = {}) {
5136
5655
  super(message);
5137
5656
  this.name = new.target.name;
5138
- this.request = context.request;
5657
+ this.request = redactRequest(context.request);
5139
5658
  this.response = context.response;
5140
5659
  this.status = context.response?.status;
5141
5660
  }
@@ -5151,7 +5670,7 @@ var SamvaTransportError = class extends Error {
5151
5670
  super(cause instanceof Error ? cause.message : "Samva request failed", { cause });
5152
5671
  this.name = "SamvaTransportError";
5153
5672
  this.cause = cause;
5154
- this.request = context.request;
5673
+ this.request = redactRequest(context.request);
5155
5674
  this.response = context.response;
5156
5675
  this.status = context.response?.status;
5157
5676
  }
@@ -5622,7 +6141,7 @@ function createPromiseMessagesTransport(clientInstance) {
5622
6141
  getEmail: boundMessages.getEmail,
5623
6142
  getStatus: boundMessages.getStatus,
5624
6143
  getEvents: boundMessages.getEvents,
5625
- send: (input, options) => Messages.send({ body: buildMessagesSendPayload(input) }, {
6144
+ send: (input, options) => Messages.send({ emailSendMessagePayload: buildMessagesSendPayload(input) }, {
5626
6145
  ...options,
5627
6146
  client: clientInstance
5628
6147
  })
@@ -5641,7 +6160,7 @@ function createPromiseEmailTransport(clientInstance) {
5641
6160
  client: clientInstance
5642
6161
  });
5643
6162
  },
5644
- send: (input, options) => Messages.send({ body: buildEmailSendPayload(input) }, {
6163
+ send: (input, options) => Messages.send({ emailSendMessagePayload: buildEmailSendPayload(input) }, {
5645
6164
  ...options,
5646
6165
  client: clientInstance
5647
6166
  })
@@ -5712,7 +6231,9 @@ function createClient(config) {
5712
6231
  scheduledMessages: createBoundService(ScheduledMessages, clientInstance),
5713
6232
  campaigns: createBoundService(Campaigns, clientInstance),
5714
6233
  email: createBoundService(Email, clientInstance),
6234
+ media: createBoundService(Media, clientInstance),
5715
6235
  templates: createBoundService(Templates, clientInstance),
6236
+ templateDocuments: createBoundService(TemplateDocuments, clientInstance),
5716
6237
  contacts: createBoundService(Contacts, clientInstance),
5717
6238
  conversations: createBoundService(Conversations, clientInstance),
5718
6239
  design: createBoundService(Design, clientInstance),
@@ -5729,7 +6250,9 @@ function createClient(config) {
5729
6250
  scheduledMessages: createDirectService(raw.scheduledMessages),
5730
6251
  campaigns: createDirectService(raw.campaigns),
5731
6252
  email: createDirectService(promiseEmail),
6253
+ media: createDirectService(raw.media),
5732
6254
  templates: createDirectService(raw.templates),
6255
+ templateDocuments: createDirectService(raw.templateDocuments),
5733
6256
  contacts: createDirectService(raw.contacts),
5734
6257
  conversations: createDirectService(raw.conversations),
5735
6258
  design: createDirectService(raw.design),
@@ -5742,4 +6265,4 @@ function createClient(config) {
5742
6265
  //#endregion
5743
6266
  export { fromApiError as _, ExternalServiceError as a, InternalError as c, ResourceNotFoundError as d, SamvaApiError as f, WebhookEnqueueError as g, ValidationError as h, EmailChannelError as i, PaymentRequiredError as l, UnauthorizedError as m, BillingProviderError as n, FlagDisabledError as o, SamvaTransportError as p, ConflictError as r, ForbiddenError as s, createClient as t, RateLimitedError as u };
5744
6267
 
5745
- //# sourceMappingURL=promises-QxEfMTho.js.map
6268
+ //# sourceMappingURL=promises-oiy7mOyu.js.map