@sentdm/sentdm 0.7.2 → 0.15.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.
- package/CHANGELOG.md +132 -0
- package/README.md +71 -34
- package/client.d.mts +49 -21
- package/client.d.mts.map +1 -1
- package/client.d.ts +49 -21
- package/client.d.ts.map +1 -1
- package/client.js +52 -38
- package/client.js.map +1 -1
- package/client.mjs +52 -38
- package/client.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +0 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +0 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +7 -1
- package/resources/contacts.d.mts +243 -49
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +243 -49
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +112 -15
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +112 -15
- package/resources/contacts.mjs.map +1 -1
- package/resources/index.d.mts +8 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +269 -0
- package/resources/me.d.mts.map +1 -0
- package/resources/me.d.ts +269 -0
- package/resources/me.d.ts.map +1 -0
- package/resources/me.js +40 -0
- package/resources/me.js.map +1 -0
- package/resources/me.mjs +36 -0
- package/resources/me.mjs.map +1 -0
- package/resources/messages.d.mts +239 -133
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +239 -133
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +42 -50
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +42 -50
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +70 -0
- package/resources/numbers.d.mts.map +1 -0
- package/resources/numbers.d.ts +70 -0
- package/resources/numbers.d.ts.map +1 -0
- package/resources/numbers.js +36 -0
- package/resources/numbers.js.map +1 -0
- package/resources/numbers.mjs +32 -0
- package/resources/numbers.mjs.map +1 -0
- package/resources/profiles/campaigns.d.mts +339 -0
- package/resources/profiles/campaigns.d.mts.map +1 -0
- package/resources/profiles/campaigns.d.ts +339 -0
- package/resources/profiles/campaigns.d.ts.map +1 -0
- package/resources/profiles/campaigns.js +148 -0
- package/resources/profiles/campaigns.js.map +1 -0
- package/resources/profiles/campaigns.mjs +144 -0
- package/resources/profiles/campaigns.mjs.map +1 -0
- package/resources/profiles/index.d.mts +3 -0
- package/resources/profiles/index.d.mts.map +1 -0
- package/resources/profiles/index.d.ts +3 -0
- package/resources/profiles/index.d.ts.map +1 -0
- package/resources/profiles/index.js +9 -0
- package/resources/profiles/index.js.map +1 -0
- package/resources/profiles/index.mjs +4 -0
- package/resources/profiles/index.mjs.map +1 -0
- package/resources/profiles/profiles.d.mts +967 -0
- package/resources/profiles/profiles.d.mts.map +1 -0
- package/resources/profiles/profiles.d.ts +967 -0
- package/resources/profiles/profiles.d.ts.map +1 -0
- package/resources/profiles/profiles.js +227 -0
- package/resources/profiles/profiles.js.map +1 -0
- package/resources/profiles/profiles.mjs +222 -0
- package/resources/profiles/profiles.mjs.map +1 -0
- package/resources/profiles.d.mts +2 -0
- package/resources/profiles.d.mts.map +1 -0
- package/resources/profiles.d.ts +2 -0
- package/resources/profiles.d.ts.map +1 -0
- package/resources/profiles.js +6 -0
- package/resources/profiles.js.map +1 -0
- package/resources/profiles.mjs +3 -0
- package/resources/profiles.mjs.map +1 -0
- package/resources/templates.d.mts +327 -191
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +327 -191
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +80 -35
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +80 -35
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +251 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +251 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +124 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +120 -0
- package/resources/users.mjs.map +1 -0
- package/resources/webhooks.d.mts +639 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +639 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +237 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +233 -0
- package/resources/webhooks.mjs.map +1 -0
- package/src/client.ts +228 -80
- package/src/internal/utils/log.ts +0 -1
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/contacts.ts +335 -57
- package/src/resources/index.ts +81 -12
- package/src/resources/me.ts +333 -0
- package/src/resources/messages.ts +306 -147
- package/src/resources/numbers.ts +102 -0
- package/src/resources/profiles/campaigns.ts +501 -0
- package/src/resources/profiles/index.ts +38 -0
- package/src/resources/profiles/profiles.ts +1302 -0
- package/src/resources/profiles.ts +3 -0
- package/src/resources/templates.ts +424 -202
- package/src/resources/users.ts +366 -0
- package/src/resources/webhooks.ts +923 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/number-lookup.d.mts +0 -59
- package/resources/number-lookup.d.mts.map +0 -1
- package/resources/number-lookup.d.ts +0 -59
- package/resources/number-lookup.d.ts.map +0 -1
- package/resources/number-lookup.js +0 -17
- package/resources/number-lookup.js.map +0 -1
- package/resources/number-lookup.mjs +0 -13
- package/resources/number-lookup.mjs.map +0 -1
- package/src/resources/number-lookup.ts +0 -80
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,137 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.15.0 (2026-03-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.14.0...v0.15.0](https://github.com/sentdm/sent-dm-typescript/compare/v0.14.0...v0.15.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([fb7c8e6](https://github.com/sentdm/sent-dm-typescript/commit/fb7c8e63b78de2e0d1cb47e942647368108cf217))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* update SDK settings ([dfb23d8](https://github.com/sentdm/sent-dm-typescript/commit/dfb23d87015b64f9dda633623aa1eba12df21b97))
|
|
15
|
+
* update SDK settings ([aeee7b6](https://github.com/sentdm/sent-dm-typescript/commit/aeee7b63edeb3d38f84c090b5aefd347c3bed4c7))
|
|
16
|
+
* update SDK settings ([c88540a](https://github.com/sentdm/sent-dm-typescript/commit/c88540a869b3714edbcb3e9fc9e542f39d99f30c))
|
|
17
|
+
|
|
18
|
+
## 0.14.0 (2026-03-12)
|
|
19
|
+
|
|
20
|
+
Full Changelog: [v0.13.0...v0.14.0](https://github.com/sentdm/sent-dm-typescript/compare/v0.13.0...v0.14.0)
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **api:** manual updates ([33e5709](https://github.com/sentdm/sent-dm-typescript/commit/33e5709bb21ad4d73d3886aef24f24f5b66b279d))
|
|
25
|
+
|
|
26
|
+
## 0.13.0 (2026-03-12)
|
|
27
|
+
|
|
28
|
+
Full Changelog: [v0.12.0...v0.13.0](https://github.com/sentdm/sent-dm-typescript/compare/v0.12.0...v0.13.0)
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* **api:** api update ([ef4e9a1](https://github.com/sentdm/sent-dm-typescript/commit/ef4e9a1c7a7337b476b7914420d3172093a1bb6e))
|
|
33
|
+
* **api:** api update ([6fb0dd3](https://github.com/sentdm/sent-dm-typescript/commit/6fb0dd3c440c26ad9c05812a84e57b0ae123ae54))
|
|
34
|
+
* **api:** api update ([a04f52c](https://github.com/sentdm/sent-dm-typescript/commit/a04f52c87dc9fccd6c8c2ecba9c0b8944c41f218))
|
|
35
|
+
* **api:** api update ([239c385](https://github.com/sentdm/sent-dm-typescript/commit/239c38532511dc57c29f8796f1e641fb6267dc6d))
|
|
36
|
+
* **api:** manual updates ([ae44913](https://github.com/sentdm/sent-dm-typescript/commit/ae449134418fee998751bb5dfc2976df069749e0))
|
|
37
|
+
* **api:** manual updates ([8abf3df](https://github.com/sentdm/sent-dm-typescript/commit/8abf3df62ef06a454b3e892840a1d73aa404380e))
|
|
38
|
+
|
|
39
|
+
## 0.12.0 (2026-03-11)
|
|
40
|
+
|
|
41
|
+
Full Changelog: [v0.11.0...v0.12.0](https://github.com/sentdm/sent-dm-typescript/compare/v0.11.0...v0.12.0)
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
* **api:** manual updates ([1bbc13d](https://github.com/sentdm/sent-dm-typescript/commit/1bbc13dd4a11ce1a27c17fcd9d8e21f057f8db06))
|
|
46
|
+
|
|
47
|
+
## 0.11.0 (2026-03-11)
|
|
48
|
+
|
|
49
|
+
Full Changelog: [v0.10.0...v0.11.0](https://github.com/sentdm/sent-dm-typescript/compare/v0.10.0...v0.11.0)
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
|
|
53
|
+
* **api:** manual updates ([7ba0989](https://github.com/sentdm/sent-dm-typescript/commit/7ba09897117ed5438995adbed2e804e68d752296))
|
|
54
|
+
|
|
55
|
+
## 0.10.0 (2026-03-11)
|
|
56
|
+
|
|
57
|
+
Full Changelog: [v0.9.0...v0.10.0](https://github.com/sentdm/sent-dm-typescript/compare/v0.9.0...v0.10.0)
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
* **api:** api update ([655e54a](https://github.com/sentdm/sent-dm-typescript/commit/655e54ae8d3b123ad68483f160aa3161e4c5a65e))
|
|
62
|
+
|
|
63
|
+
## 0.9.0 (2026-03-11)
|
|
64
|
+
|
|
65
|
+
Full Changelog: [v0.8.0...v0.9.0](https://github.com/sentdm/sent-dm-typescript/compare/v0.8.0...v0.9.0)
|
|
66
|
+
|
|
67
|
+
### Features
|
|
68
|
+
|
|
69
|
+
* **api:** api update ([14ad67f](https://github.com/sentdm/sent-dm-typescript/commit/14ad67f946a9ebb44229c588772cc41c821d5075))
|
|
70
|
+
* **api:** api update ([a124e59](https://github.com/sentdm/sent-dm-typescript/commit/a124e591573537a534771e85415b7bc729269fb1))
|
|
71
|
+
* **api:** api update ([4ea5ea5](https://github.com/sentdm/sent-dm-typescript/commit/4ea5ea51923d418980c4ead2f47e8403b30d44df))
|
|
72
|
+
* **api:** api update ([d593916](https://github.com/sentdm/sent-dm-typescript/commit/d593916905bea20251d7d0f516cadfba72d58676))
|
|
73
|
+
* **api:** api update ([e26adb5](https://github.com/sentdm/sent-dm-typescript/commit/e26adb5fc0afbcf4f3ecc61996d1a7ed2168617d))
|
|
74
|
+
* **api:** api update ([df3f0cd](https://github.com/sentdm/sent-dm-typescript/commit/df3f0cdb77e18ad481f3aa772490d56cf144a64a))
|
|
75
|
+
* **api:** api update ([0fe5e05](https://github.com/sentdm/sent-dm-typescript/commit/0fe5e05522bf32a41e83ec22bcc9c74f604d076e))
|
|
76
|
+
* **api:** api update ([9b7140b](https://github.com/sentdm/sent-dm-typescript/commit/9b7140b3afa11e433f3bd8ccbb63259a852f413f))
|
|
77
|
+
* **api:** api update ([6750b65](https://github.com/sentdm/sent-dm-typescript/commit/6750b65ad79bcb0723cfde1333aeeb275bdbbde8))
|
|
78
|
+
* **api:** api update ([904c6db](https://github.com/sentdm/sent-dm-typescript/commit/904c6db65bfd54d0be716e61644c345898962cb3))
|
|
79
|
+
* **api:** api update ([bcf6976](https://github.com/sentdm/sent-dm-typescript/commit/bcf6976de86cc1c93958cc64bdc070cfedccf4f1))
|
|
80
|
+
* **api:** api update ([e34f2c0](https://github.com/sentdm/sent-dm-typescript/commit/e34f2c06bae1105a994ef30ddecc259c63484986))
|
|
81
|
+
* **api:** api update ([920e6a5](https://github.com/sentdm/sent-dm-typescript/commit/920e6a54a211e972437b2b8a2980b6e27f62e313))
|
|
82
|
+
* **api:** api update ([17df948](https://github.com/sentdm/sent-dm-typescript/commit/17df948c5df8120d086eb69d04b29626494aa7b8))
|
|
83
|
+
* **mcp:** add an option to disable code tool ([120013f](https://github.com/sentdm/sent-dm-typescript/commit/120013f466279e750a6b0af92bb772088cc548be))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Bug Fixes
|
|
87
|
+
|
|
88
|
+
* **client:** preserve URL params already embedded in path ([d06a3dd](https://github.com/sentdm/sent-dm-typescript/commit/d06a3dd0e9d56286acfbcac35fee543e144611ea))
|
|
89
|
+
* **mcp:** update prompt ([3143fa6](https://github.com/sentdm/sent-dm-typescript/commit/3143fa610c5a0e26ae4c9e245eb28d060a288874))
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Chores
|
|
93
|
+
|
|
94
|
+
* **ci:** skip uploading artifacts on stainless-internal branches ([f7871a4](https://github.com/sentdm/sent-dm-typescript/commit/f7871a4c60fd943bca4a7a73d194a0dab98e9fe7))
|
|
95
|
+
* **internal:** codegen related update ([d77d3a3](https://github.com/sentdm/sent-dm-typescript/commit/d77d3a3e4430d1ee9bf7d8d2a618a01bbda19cd0))
|
|
96
|
+
* **internal:** codegen related update ([68a0b71](https://github.com/sentdm/sent-dm-typescript/commit/68a0b71ddb82f316837c7add8c648a7dc0180ed6))
|
|
97
|
+
* **internal:** codegen related update ([0e8793c](https://github.com/sentdm/sent-dm-typescript/commit/0e8793cee686d5c022388283956523950d1e4e40))
|
|
98
|
+
* **internal:** codegen related update ([7bbf075](https://github.com/sentdm/sent-dm-typescript/commit/7bbf07563948ff1945982942a84e034bf4492d5d))
|
|
99
|
+
* **internal:** codegen related update ([3c5415b](https://github.com/sentdm/sent-dm-typescript/commit/3c5415baa6fedf31ee08917060bdac2e0da065e3))
|
|
100
|
+
* **internal:** codegen related update ([10d4830](https://github.com/sentdm/sent-dm-typescript/commit/10d48301f2fc662118566554fa435fa286949909))
|
|
101
|
+
* **internal:** codegen related update ([cdbde6f](https://github.com/sentdm/sent-dm-typescript/commit/cdbde6f9ae275bb614267effef7e6b1b750bfd7a))
|
|
102
|
+
* **internal:** codegen related update ([d12b158](https://github.com/sentdm/sent-dm-typescript/commit/d12b1588c66c97db67ebe4453c090f2854c3b1e0))
|
|
103
|
+
* **internal:** codegen related update ([4e1ba57](https://github.com/sentdm/sent-dm-typescript/commit/4e1ba57cbec3cf32ce04c485d545b616f8834d0b))
|
|
104
|
+
* **internal:** codegen related update ([a8a21df](https://github.com/sentdm/sent-dm-typescript/commit/a8a21df35a84125c0ffa8ce2e58f12eb69c5fb28))
|
|
105
|
+
* **internal:** codegen related update ([9891015](https://github.com/sentdm/sent-dm-typescript/commit/98910153af8fb73576500d6baeda52ffa3c7c130))
|
|
106
|
+
* **internal:** codegen related update ([f7f87e9](https://github.com/sentdm/sent-dm-typescript/commit/f7f87e9be5432fe695893b7b5743b7c9ef2fd847))
|
|
107
|
+
* **internal:** codegen related update ([6019d24](https://github.com/sentdm/sent-dm-typescript/commit/6019d242d4606ebd2af97e573373859018605af8))
|
|
108
|
+
* **internal:** codegen related update ([2fb0f6e](https://github.com/sentdm/sent-dm-typescript/commit/2fb0f6e955fb38684be7dfd6a0a35fecd250a58b))
|
|
109
|
+
* **internal:** codegen related update ([eec9d8c](https://github.com/sentdm/sent-dm-typescript/commit/eec9d8ce556750de69b1219b51b0c2abf2ddcab9))
|
|
110
|
+
* **internal:** codegen related update ([b78f90b](https://github.com/sentdm/sent-dm-typescript/commit/b78f90b29f6ee53a60c8f0f04ff56d2b6cad8b62))
|
|
111
|
+
* **internal:** codegen related update ([62bb43a](https://github.com/sentdm/sent-dm-typescript/commit/62bb43a8cdc56d3ffde3b0f0956d9d15e0cb9f6e))
|
|
112
|
+
* **internal:** codegen related update ([57db8bd](https://github.com/sentdm/sent-dm-typescript/commit/57db8bd09ea4fe553c7205f54033d7906ceb9b06))
|
|
113
|
+
* **internal:** codegen related update ([4809458](https://github.com/sentdm/sent-dm-typescript/commit/480945876f28d91ae64d29d873f22b6842427214))
|
|
114
|
+
* **internal:** codegen related update ([6bc3047](https://github.com/sentdm/sent-dm-typescript/commit/6bc304740f9d1aa64379e50a50565944698e3f2d))
|
|
115
|
+
* **internal:** codegen related update ([6a5d8fe](https://github.com/sentdm/sent-dm-typescript/commit/6a5d8feac2c4de91c4a10fc42dff41a7903bae9e))
|
|
116
|
+
* **internal:** codegen related update ([f085de1](https://github.com/sentdm/sent-dm-typescript/commit/f085de140d71af9798ebb0c4f419fdfaea467421))
|
|
117
|
+
* **internal:** fix MCP Dockerfiles so they can be built without buildkit ([1f9a560](https://github.com/sentdm/sent-dm-typescript/commit/1f9a560ea6cb47a91f6d120c289f6405c7a39e2a))
|
|
118
|
+
* **internal:** fix MCP Dockerfiles so they can be built without buildkit ([00c1562](https://github.com/sentdm/sent-dm-typescript/commit/00c156226476460526105ecc60da00c4026a6f68))
|
|
119
|
+
* **internal:** move stringifyQuery implementation to internal function ([8222503](https://github.com/sentdm/sent-dm-typescript/commit/82225030eb43318f4e364c5dfddf0dce656980cb))
|
|
120
|
+
* **internal:** update dependencies to address dependabot vulnerabilities ([9d2a513](https://github.com/sentdm/sent-dm-typescript/commit/9d2a5139c26f42e5a71396b0a225fc9fcdc3e73a))
|
|
121
|
+
* **internal:** use x-stainless-mcp-client-envs header for MCP remote code tool calls ([2bf2d10](https://github.com/sentdm/sent-dm-typescript/commit/2bf2d100c358c4288c108fc21f2d1f30b8e847aa))
|
|
122
|
+
* **mcp-server:** improve instructions ([b56b908](https://github.com/sentdm/sent-dm-typescript/commit/b56b90826d7f0a8ddfe39dcf2909619840473318))
|
|
123
|
+
* **mcp-server:** return access instructions for 404 without API key ([56b399f](https://github.com/sentdm/sent-dm-typescript/commit/56b399f8b8a1fa1c253ee56991a283179c574036))
|
|
124
|
+
|
|
125
|
+
## 0.8.0 (2026-02-18)
|
|
126
|
+
|
|
127
|
+
Full Changelog: [v0.7.2...v0.8.0](https://github.com/sentdm/sent-dm-typescript/compare/v0.7.2...v0.8.0)
|
|
128
|
+
|
|
129
|
+
### Features
|
|
130
|
+
|
|
131
|
+
* **api:** manual updates ([6998d05](https://github.com/sentdm/sent-dm-typescript/commit/6998d0515bc4a502f10e9694ccc08b8c7d6d8c31))
|
|
132
|
+
* **api:** manual updates ([60fa7ef](https://github.com/sentdm/sent-dm-typescript/commit/60fa7ef2131f6240f608584fd243b2698d9e706f))
|
|
133
|
+
* **api:** manual updates ([da3410b](https://github.com/sentdm/sent-dm-typescript/commit/da3410bd3b08e261bcd5d5da3934d32fb8132ac2))
|
|
134
|
+
|
|
3
135
|
## 0.7.2 (2026-02-18)
|
|
4
136
|
|
|
5
137
|
Full Changelog: [v0.7.1...v0.7.2](https://github.com/sentdm/sent-dm-typescript/compare/v0.7.1...v0.7.2)
|
package/README.md
CHANGED
|
@@ -8,6 +8,15 @@ The REST API documentation can be found on [docs.sent.dm](https://docs.sent.dm).
|
|
|
8
8
|
|
|
9
9
|
It is generated with [Stainless](https://www.stainless.com/).
|
|
10
10
|
|
|
11
|
+
## MCP Server
|
|
12
|
+
|
|
13
|
+
Use the Sent Dm MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
14
|
+
|
|
15
|
+
[](https://cursor.com/en-US/install-mcp?name=%40sentdm%2Fsentdm-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBzZW50ZG0vc2VudGRtLW1jcCJdLCJlbnYiOnsiU0VOVF9ETV9BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)
|
|
16
|
+
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40sentdm%2Fsentdm-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40sentdm%2Fsentdm-mcp%22%5D%2C%22env%22%3A%7B%22SENT_DM_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
|
|
17
|
+
|
|
18
|
+
> Note: You may need to set environment variables in your MCP client.
|
|
19
|
+
|
|
11
20
|
## Installation
|
|
12
21
|
|
|
13
22
|
```sh
|
|
@@ -24,14 +33,19 @@ import SentDm from '@sentdm/sentdm';
|
|
|
24
33
|
|
|
25
34
|
const client = new SentDm({
|
|
26
35
|
apiKey: process.env['SENT_DM_API_KEY'], // This is the default and can be omitted
|
|
27
|
-
senderID: process.env['SENT_DM_SENDER_ID'], // This is the default and can be omitted
|
|
28
36
|
});
|
|
29
37
|
|
|
30
|
-
await client.messages.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
const response = await client.messages.send({
|
|
39
|
+
channel: ['sms', 'whatsapp'],
|
|
40
|
+
template: {
|
|
41
|
+
id: '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
42
|
+
name: 'order_confirmation',
|
|
43
|
+
parameters: { name: 'John Doe', order_id: '12345' },
|
|
44
|
+
},
|
|
45
|
+
to: ['+14155551234', '+14155555678'],
|
|
34
46
|
});
|
|
47
|
+
|
|
48
|
+
console.log(response.data);
|
|
35
49
|
```
|
|
36
50
|
|
|
37
51
|
### Request & Response types
|
|
@@ -44,15 +58,18 @@ import SentDm from '@sentdm/sentdm';
|
|
|
44
58
|
|
|
45
59
|
const client = new SentDm({
|
|
46
60
|
apiKey: process.env['SENT_DM_API_KEY'], // This is the default and can be omitted
|
|
47
|
-
senderID: process.env['SENT_DM_SENDER_ID'], // This is the default and can be omitted
|
|
48
61
|
});
|
|
49
62
|
|
|
50
|
-
const params: SentDm.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
const params: SentDm.MessageSendParams = {
|
|
64
|
+
channel: ['sms'],
|
|
65
|
+
template: {
|
|
66
|
+
id: '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
67
|
+
name: 'order_confirmation',
|
|
68
|
+
parameters: { name: 'John Doe', order_id: '12345' },
|
|
69
|
+
},
|
|
70
|
+
to: ['+14155551234'],
|
|
54
71
|
};
|
|
55
|
-
await client.messages.
|
|
72
|
+
const response: SentDm.MessageSendResponse = await client.messages.send(params);
|
|
56
73
|
```
|
|
57
74
|
|
|
58
75
|
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
@@ -66,10 +83,14 @@ a subclass of `APIError` will be thrown:
|
|
|
66
83
|
<!-- prettier-ignore -->
|
|
67
84
|
```ts
|
|
68
85
|
const response = await client.messages
|
|
69
|
-
.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
86
|
+
.send({
|
|
87
|
+
channel: ['sms'],
|
|
88
|
+
template: {
|
|
89
|
+
id: '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
90
|
+
name: 'order_confirmation',
|
|
91
|
+
parameters: { name: 'John Doe', order_id: '12345' },
|
|
92
|
+
},
|
|
93
|
+
to: ['+14155551234'],
|
|
73
94
|
})
|
|
74
95
|
.catch(async (err) => {
|
|
75
96
|
if (err instanceof SentDm.APIError) {
|
|
@@ -111,10 +132,14 @@ const client = new SentDm({
|
|
|
111
132
|
});
|
|
112
133
|
|
|
113
134
|
// Or, configure per-request:
|
|
114
|
-
await client.messages.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
135
|
+
await client.messages.send({
|
|
136
|
+
channel: ['sms'],
|
|
137
|
+
template: {
|
|
138
|
+
id: '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
139
|
+
name: 'order_confirmation',
|
|
140
|
+
parameters: { name: 'John Doe', order_id: '12345' },
|
|
141
|
+
},
|
|
142
|
+
to: ['+14155551234'],
|
|
118
143
|
}, {
|
|
119
144
|
maxRetries: 5,
|
|
120
145
|
});
|
|
@@ -132,10 +157,14 @@ const client = new SentDm({
|
|
|
132
157
|
});
|
|
133
158
|
|
|
134
159
|
// Override per-request:
|
|
135
|
-
await client.messages.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
160
|
+
await client.messages.send({
|
|
161
|
+
channel: ['sms'],
|
|
162
|
+
template: {
|
|
163
|
+
id: '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
164
|
+
name: 'order_confirmation',
|
|
165
|
+
parameters: { name: 'John Doe', order_id: '12345' },
|
|
166
|
+
},
|
|
167
|
+
to: ['+14155551234'],
|
|
139
168
|
}, {
|
|
140
169
|
timeout: 5 * 1000,
|
|
141
170
|
});
|
|
@@ -160,24 +189,32 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse
|
|
|
160
189
|
const client = new SentDm();
|
|
161
190
|
|
|
162
191
|
const response = await client.messages
|
|
163
|
-
.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
192
|
+
.send({
|
|
193
|
+
channel: ['sms'],
|
|
194
|
+
template: {
|
|
195
|
+
id: '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
196
|
+
name: 'order_confirmation',
|
|
197
|
+
parameters: { name: 'John Doe', order_id: '12345' },
|
|
198
|
+
},
|
|
199
|
+
to: ['+14155551234'],
|
|
167
200
|
})
|
|
168
201
|
.asResponse();
|
|
169
202
|
console.log(response.headers.get('X-My-Header'));
|
|
170
203
|
console.log(response.statusText); // access the underlying Response object
|
|
171
204
|
|
|
172
|
-
const { data:
|
|
173
|
-
.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
205
|
+
const { data: response, response: raw } = await client.messages
|
|
206
|
+
.send({
|
|
207
|
+
channel: ['sms'],
|
|
208
|
+
template: {
|
|
209
|
+
id: '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
210
|
+
name: 'order_confirmation',
|
|
211
|
+
parameters: { name: 'John Doe', order_id: '12345' },
|
|
212
|
+
},
|
|
213
|
+
to: ['+14155551234'],
|
|
177
214
|
})
|
|
178
215
|
.withResponse();
|
|
179
216
|
console.log(raw.headers.get('X-My-Header'));
|
|
180
|
-
console.log(
|
|
217
|
+
console.log(response.data);
|
|
181
218
|
```
|
|
182
219
|
|
|
183
220
|
### Logging
|
|
@@ -257,7 +294,7 @@ parameter. This library doesn't validate at runtime that the request matches the
|
|
|
257
294
|
send will be sent as-is.
|
|
258
295
|
|
|
259
296
|
```ts
|
|
260
|
-
client.messages.
|
|
297
|
+
client.messages.send({
|
|
261
298
|
// ...
|
|
262
299
|
// @ts-expect-error baz is not yet public
|
|
263
300
|
baz: 'undocumented option',
|
package/client.d.mts
CHANGED
|
@@ -6,10 +6,14 @@ import * as Errors from "./core/error.mjs";
|
|
|
6
6
|
import * as Uploads from "./core/uploads.mjs";
|
|
7
7
|
import * as API from "./resources/index.mjs";
|
|
8
8
|
import { APIPromise } from "./core/api-promise.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import { APIResponseOfContact, ContactCreateParams, ContactDeleteParams, ContactListParams, ContactListResponse, ContactResponse, ContactRetrieveParams, ContactUpdateParams, Contacts } from "./resources/contacts.mjs";
|
|
10
|
+
import { Me, MeRetrieveParams, MeRetrieveResponse, ProfileSettings } from "./resources/me.mjs";
|
|
11
|
+
import { MessageRetrieveActivitiesParams, MessageRetrieveActivitiesResponse, MessageRetrieveStatusParams, MessageRetrieveStatusResponse, MessageSendParams, MessageSendResponse, Messages } from "./resources/messages.mjs";
|
|
12
|
+
import { NumberLookupParams, NumberLookupResponse, Numbers } from "./resources/numbers.mjs";
|
|
13
|
+
import { APIResponseTemplate, SentDmServicesCommonContractsPocOsAuthenticationConfig, SentDmServicesCommonContractsPocOsTemplateBody, SentDmServicesCommonContractsPocOsTemplateButton, SentDmServicesCommonContractsPocOsTemplateButtonProps, SentDmServicesCommonContractsPocOsTemplateFooter, SentDmServicesCommonContractsPocOsTemplateHeader, Template, TemplateBodyContent, TemplateCreateParams, TemplateDefinition, TemplateDeleteParams, TemplateListParams, TemplateListResponse, TemplateRetrieveParams, TemplateUpdateParams, TemplateVariable, Templates } from "./resources/templates.mjs";
|
|
14
|
+
import { APIResponseOfUser, UserInviteParams, UserListParams, UserListResponse, UserRemoveParams, UserResponse, UserRetrieveParams, UserUpdateRoleParams, Users } from "./resources/users.mjs";
|
|
15
|
+
import { APIMeta, APIResponseWebhook, ErrorDetail, MutationRequest, PaginationMeta, WebhookCreateParams, WebhookDeleteParams, WebhookListEventTypesParams, WebhookListEventTypesResponse, WebhookListEventsParams, WebhookListEventsResponse, WebhookListParams, WebhookListResponse, WebhookResponse, WebhookRetrieveParams, WebhookRotateSecretParams, WebhookRotateSecretResponse, WebhookTestParams, WebhookTestResponse, WebhookToggleStatusParams, WebhookUpdateParams, Webhooks } from "./resources/webhooks.mjs";
|
|
16
|
+
import { APIResponseOfProfileDetail, BillingContactInfo, BrandsBrandData, DestinationCountry, PaymentDetails, ProfileCompleteParams, ProfileCompleteResponse, ProfileCreateParams, ProfileDeleteParams, ProfileDetail, ProfileListParams, ProfileListResponse, ProfileRetrieveParams, ProfileUpdateParams, Profiles, SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo, SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo, SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo, TcrBrandRelationship, TcrVertical } from "./resources/profiles/profiles.mjs";
|
|
13
17
|
import { type Fetch } from "./internal/builtin-types.mjs";
|
|
14
18
|
import { HeadersLike, NullableHeaders } from "./internal/headers.mjs";
|
|
15
19
|
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.mjs";
|
|
@@ -19,10 +23,6 @@ export interface ClientOptions {
|
|
|
19
23
|
* Customer API key for authentication. Use `sk_live_*` keys for production and `sk_test_*` keys for sandbox/testing. Pass via the `x-api-key` header.
|
|
20
24
|
*/
|
|
21
25
|
apiKey?: string | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* Customer sender ID (UUID) identifying the customer account. Obtain this from your account settings. Pass via the `x-sender-id` header.
|
|
24
|
-
*/
|
|
25
|
-
senderID?: string | undefined;
|
|
26
26
|
/**
|
|
27
27
|
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
28
28
|
*
|
|
@@ -90,7 +90,6 @@ export interface ClientOptions {
|
|
|
90
90
|
export declare class SentDm {
|
|
91
91
|
#private;
|
|
92
92
|
apiKey: string;
|
|
93
|
-
senderID: string;
|
|
94
93
|
baseURL: string;
|
|
95
94
|
maxRetries: number;
|
|
96
95
|
timeout: number;
|
|
@@ -104,7 +103,6 @@ export declare class SentDm {
|
|
|
104
103
|
* API Client for interfacing with the Sent Dm API.
|
|
105
104
|
*
|
|
106
105
|
* @param {string | undefined} [opts.apiKey=process.env['SENT_DM_API_KEY'] ?? undefined]
|
|
107
|
-
* @param {string | undefined} [opts.senderID=process.env['SENT_DM_SENDER_ID'] ?? undefined]
|
|
108
106
|
* @param {string} [opts.baseURL=process.env['SENT_DM_BASE_URL'] ?? https://api.sent.dm] - Override the default base URL for the API.
|
|
109
107
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
110
108
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
@@ -113,7 +111,7 @@ export declare class SentDm {
|
|
|
113
111
|
* @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
114
112
|
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
115
113
|
*/
|
|
116
|
-
constructor({ baseURL, apiKey,
|
|
114
|
+
constructor({ baseURL, apiKey, ...opts }?: ClientOptions);
|
|
117
115
|
/**
|
|
118
116
|
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
119
117
|
*/
|
|
@@ -121,12 +119,10 @@ export declare class SentDm {
|
|
|
121
119
|
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
|
122
120
|
protected validateHeaders({ values, nulls }: NullableHeaders): void;
|
|
123
121
|
protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
124
|
-
protected customerAPIKeyAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
125
|
-
protected customerSenderIDAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
126
122
|
/**
|
|
127
123
|
* Basic re-implementation of `qs.stringify` for primitive types.
|
|
128
124
|
*/
|
|
129
|
-
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
125
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string;
|
|
130
126
|
private getUserAgent;
|
|
131
127
|
protected defaultIdempotencyKey(): string;
|
|
132
128
|
protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
|
|
@@ -183,16 +179,48 @@ export declare class SentDm {
|
|
|
183
179
|
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
184
180
|
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
185
181
|
static toFile: typeof Uploads.toFile;
|
|
186
|
-
|
|
187
|
-
|
|
182
|
+
/**
|
|
183
|
+
* Configure webhook endpoints for real-time event delivery
|
|
184
|
+
*/
|
|
185
|
+
webhooks: API.Webhooks;
|
|
186
|
+
/**
|
|
187
|
+
* Invite, update, and manage organization users and roles
|
|
188
|
+
*/
|
|
189
|
+
users: API.Users;
|
|
190
|
+
/**
|
|
191
|
+
* Manage message templates with variable substitution
|
|
192
|
+
*/
|
|
188
193
|
templates: API.Templates;
|
|
189
|
-
|
|
194
|
+
/**
|
|
195
|
+
* Manage organization profiles
|
|
196
|
+
*/
|
|
197
|
+
profiles: API.Profiles;
|
|
198
|
+
/**
|
|
199
|
+
* Manage and lookup phone numbers
|
|
200
|
+
*/
|
|
201
|
+
numbers: API.Numbers;
|
|
202
|
+
/**
|
|
203
|
+
* Send and track SMS and WhatsApp messages
|
|
204
|
+
*/
|
|
205
|
+
messages: API.Messages;
|
|
206
|
+
/**
|
|
207
|
+
* Create, update, and manage customer contact lists
|
|
208
|
+
*/
|
|
209
|
+
contacts: API.Contacts;
|
|
210
|
+
/**
|
|
211
|
+
* Retrieve account details
|
|
212
|
+
*/
|
|
213
|
+
me: API.Me;
|
|
190
214
|
}
|
|
191
215
|
export declare namespace SentDm {
|
|
192
216
|
export type RequestOptions = Opts.RequestOptions;
|
|
193
|
-
export {
|
|
194
|
-
export {
|
|
195
|
-
export { Templates as Templates, type
|
|
196
|
-
export {
|
|
217
|
+
export { Webhooks as Webhooks, type APIMeta as APIMeta, type APIResponseWebhook as APIResponseWebhook, type ErrorDetail as ErrorDetail, type MutationRequest as MutationRequest, type PaginationMeta as PaginationMeta, type WebhookResponse as WebhookResponse, type WebhookListResponse as WebhookListResponse, type WebhookListEventTypesResponse as WebhookListEventTypesResponse, type WebhookListEventsResponse as WebhookListEventsResponse, type WebhookRotateSecretResponse as WebhookRotateSecretResponse, type WebhookTestResponse as WebhookTestResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookRetrieveParams as WebhookRetrieveParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, type WebhookDeleteParams as WebhookDeleteParams, type WebhookListEventTypesParams as WebhookListEventTypesParams, type WebhookListEventsParams as WebhookListEventsParams, type WebhookRotateSecretParams as WebhookRotateSecretParams, type WebhookTestParams as WebhookTestParams, type WebhookToggleStatusParams as WebhookToggleStatusParams, };
|
|
218
|
+
export { Users as Users, type APIResponseOfUser as APIResponseOfUser, type UserResponse as UserResponse, type UserListResponse as UserListResponse, type UserRetrieveParams as UserRetrieveParams, type UserListParams as UserListParams, type UserInviteParams as UserInviteParams, type UserRemoveParams as UserRemoveParams, type UserUpdateRoleParams as UserUpdateRoleParams, };
|
|
219
|
+
export { Templates as Templates, type APIResponseTemplate as APIResponseTemplate, type SentDmServicesCommonContractsPocOsAuthenticationConfig as SentDmServicesCommonContractsPocOsAuthenticationConfig, type SentDmServicesCommonContractsPocOsTemplateBody as SentDmServicesCommonContractsPocOsTemplateBody, type SentDmServicesCommonContractsPocOsTemplateButton as SentDmServicesCommonContractsPocOsTemplateButton, type SentDmServicesCommonContractsPocOsTemplateButtonProps as SentDmServicesCommonContractsPocOsTemplateButtonProps, type SentDmServicesCommonContractsPocOsTemplateFooter as SentDmServicesCommonContractsPocOsTemplateFooter, type SentDmServicesCommonContractsPocOsTemplateHeader as SentDmServicesCommonContractsPocOsTemplateHeader, type Template as Template, type TemplateBodyContent as TemplateBodyContent, type TemplateDefinition as TemplateDefinition, type TemplateVariable as TemplateVariable, type TemplateListResponse as TemplateListResponse, type TemplateCreateParams as TemplateCreateParams, type TemplateRetrieveParams as TemplateRetrieveParams, type TemplateUpdateParams as TemplateUpdateParams, type TemplateListParams as TemplateListParams, type TemplateDeleteParams as TemplateDeleteParams, };
|
|
220
|
+
export { Profiles as Profiles, type APIResponseOfProfileDetail as APIResponseOfProfileDetail, type BillingContactInfo as BillingContactInfo, type BrandsBrandData as BrandsBrandData, type DestinationCountry as DestinationCountry, type PaymentDetails as PaymentDetails, type ProfileDetail as ProfileDetail, type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo, type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo, type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo, type TcrBrandRelationship as TcrBrandRelationship, type TcrVertical as TcrVertical, type ProfileListResponse as ProfileListResponse, type ProfileCompleteResponse as ProfileCompleteResponse, type ProfileCreateParams as ProfileCreateParams, type ProfileRetrieveParams as ProfileRetrieveParams, type ProfileUpdateParams as ProfileUpdateParams, type ProfileListParams as ProfileListParams, type ProfileDeleteParams as ProfileDeleteParams, type ProfileCompleteParams as ProfileCompleteParams, };
|
|
221
|
+
export { Numbers as Numbers, type NumberLookupResponse as NumberLookupResponse, type NumberLookupParams as NumberLookupParams, };
|
|
222
|
+
export { Messages as Messages, type MessageRetrieveActivitiesResponse as MessageRetrieveActivitiesResponse, type MessageRetrieveStatusResponse as MessageRetrieveStatusResponse, type MessageSendResponse as MessageSendResponse, type MessageRetrieveActivitiesParams as MessageRetrieveActivitiesParams, type MessageRetrieveStatusParams as MessageRetrieveStatusParams, type MessageSendParams as MessageSendParams, };
|
|
223
|
+
export { Contacts as Contacts, type APIResponseOfContact as APIResponseOfContact, type ContactResponse as ContactResponse, type ContactListResponse as ContactListResponse, type ContactCreateParams as ContactCreateParams, type ContactRetrieveParams as ContactRetrieveParams, type ContactUpdateParams as ContactUpdateParams, type ContactListParams as ContactListParams, type ContactDeleteParams as ContactDeleteParams, };
|
|
224
|
+
export { Me as Me, type ProfileSettings as ProfileSettings, type MeRetrieveResponse as MeRetrieveResponse, type MeRetrieveParams as MeRetrieveParams, };
|
|
197
225
|
}
|
|
198
226
|
//# sourceMappingURL=client.d.mts.map
|
package/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;
|
|
1
|
+
{"version":3,"file":"client.d.mts","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":"OAEO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAY;OAC3C,KAAK,EAAc,cAAc,EAAE,iBAAiB,EAAE,oBAAoB,EAAE;YAIvE,EAAE,MAAM,EAAE,QAAQ,EAAE;OAKzB,KAAK,IAAI;OAGT,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,UAAU,EAAE;OACd,EACL,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,QAAQ,EACT;OACM,EAAE,EAAE,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE;OAC7D,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,2BAA2B,EAC3B,6BAA6B,EAC7B,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACT;OACM,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,OAAO,EAAE;OACrD,EACL,mBAAmB,EACnB,sDAAsD,EACtD,8CAA8C,EAC9C,gDAAgD,EAChD,qDAAqD,EACrD,gDAAgD,EAChD,gDAAgD,EAChD,QAAQ,EACR,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,SAAS,EACV;OACM,EACL,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,EACN;OACM,EACL,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACj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,GAC1C,CAAC;CACH"}
|
package/client.d.ts
CHANGED
|
@@ -6,10 +6,14 @@ import * as Errors from "./core/error.js";
|
|
|
6
6
|
import * as Uploads from "./core/uploads.js";
|
|
7
7
|
import * as API from "./resources/index.js";
|
|
8
8
|
import { APIPromise } from "./core/api-promise.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import { APIResponseOfContact, ContactCreateParams, ContactDeleteParams, ContactListParams, ContactListResponse, ContactResponse, ContactRetrieveParams, ContactUpdateParams, Contacts } from "./resources/contacts.js";
|
|
10
|
+
import { Me, MeRetrieveParams, MeRetrieveResponse, ProfileSettings } from "./resources/me.js";
|
|
11
|
+
import { MessageRetrieveActivitiesParams, MessageRetrieveActivitiesResponse, MessageRetrieveStatusParams, MessageRetrieveStatusResponse, MessageSendParams, MessageSendResponse, Messages } from "./resources/messages.js";
|
|
12
|
+
import { NumberLookupParams, NumberLookupResponse, Numbers } from "./resources/numbers.js";
|
|
13
|
+
import { APIResponseTemplate, SentDmServicesCommonContractsPocOsAuthenticationConfig, SentDmServicesCommonContractsPocOsTemplateBody, SentDmServicesCommonContractsPocOsTemplateButton, SentDmServicesCommonContractsPocOsTemplateButtonProps, SentDmServicesCommonContractsPocOsTemplateFooter, SentDmServicesCommonContractsPocOsTemplateHeader, Template, TemplateBodyContent, TemplateCreateParams, TemplateDefinition, TemplateDeleteParams, TemplateListParams, TemplateListResponse, TemplateRetrieveParams, TemplateUpdateParams, TemplateVariable, Templates } from "./resources/templates.js";
|
|
14
|
+
import { APIResponseOfUser, UserInviteParams, UserListParams, UserListResponse, UserRemoveParams, UserResponse, UserRetrieveParams, UserUpdateRoleParams, Users } from "./resources/users.js";
|
|
15
|
+
import { APIMeta, APIResponseWebhook, ErrorDetail, MutationRequest, PaginationMeta, WebhookCreateParams, WebhookDeleteParams, WebhookListEventTypesParams, WebhookListEventTypesResponse, WebhookListEventsParams, WebhookListEventsResponse, WebhookListParams, WebhookListResponse, WebhookResponse, WebhookRetrieveParams, WebhookRotateSecretParams, WebhookRotateSecretResponse, WebhookTestParams, WebhookTestResponse, WebhookToggleStatusParams, WebhookUpdateParams, Webhooks } from "./resources/webhooks.js";
|
|
16
|
+
import { APIResponseOfProfileDetail, BillingContactInfo, BrandsBrandData, DestinationCountry, PaymentDetails, ProfileCompleteParams, ProfileCompleteResponse, ProfileCreateParams, ProfileDeleteParams, ProfileDetail, ProfileListParams, ProfileListResponse, ProfileRetrieveParams, ProfileUpdateParams, Profiles, SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo, SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo, SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo, TcrBrandRelationship, TcrVertical } from "./resources/profiles/profiles.js";
|
|
13
17
|
import { type Fetch } from "./internal/builtin-types.js";
|
|
14
18
|
import { HeadersLike, NullableHeaders } from "./internal/headers.js";
|
|
15
19
|
import { FinalRequestOptions, RequestOptions } from "./internal/request-options.js";
|
|
@@ -19,10 +23,6 @@ export interface ClientOptions {
|
|
|
19
23
|
* Customer API key for authentication. Use `sk_live_*` keys for production and `sk_test_*` keys for sandbox/testing. Pass via the `x-api-key` header.
|
|
20
24
|
*/
|
|
21
25
|
apiKey?: string | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* Customer sender ID (UUID) identifying the customer account. Obtain this from your account settings. Pass via the `x-sender-id` header.
|
|
24
|
-
*/
|
|
25
|
-
senderID?: string | undefined;
|
|
26
26
|
/**
|
|
27
27
|
* Override the default base URL for the API, e.g., "https://api.example.com/v2/"
|
|
28
28
|
*
|
|
@@ -90,7 +90,6 @@ export interface ClientOptions {
|
|
|
90
90
|
export declare class SentDm {
|
|
91
91
|
#private;
|
|
92
92
|
apiKey: string;
|
|
93
|
-
senderID: string;
|
|
94
93
|
baseURL: string;
|
|
95
94
|
maxRetries: number;
|
|
96
95
|
timeout: number;
|
|
@@ -104,7 +103,6 @@ export declare class SentDm {
|
|
|
104
103
|
* API Client for interfacing with the Sent Dm API.
|
|
105
104
|
*
|
|
106
105
|
* @param {string | undefined} [opts.apiKey=process.env['SENT_DM_API_KEY'] ?? undefined]
|
|
107
|
-
* @param {string | undefined} [opts.senderID=process.env['SENT_DM_SENDER_ID'] ?? undefined]
|
|
108
106
|
* @param {string} [opts.baseURL=process.env['SENT_DM_BASE_URL'] ?? https://api.sent.dm] - Override the default base URL for the API.
|
|
109
107
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
110
108
|
* @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls.
|
|
@@ -113,7 +111,7 @@ export declare class SentDm {
|
|
|
113
111
|
* @param {HeadersLike} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
114
112
|
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
115
113
|
*/
|
|
116
|
-
constructor({ baseURL, apiKey,
|
|
114
|
+
constructor({ baseURL, apiKey, ...opts }?: ClientOptions);
|
|
117
115
|
/**
|
|
118
116
|
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
119
117
|
*/
|
|
@@ -121,12 +119,10 @@ export declare class SentDm {
|
|
|
121
119
|
protected defaultQuery(): Record<string, string | undefined> | undefined;
|
|
122
120
|
protected validateHeaders({ values, nulls }: NullableHeaders): void;
|
|
123
121
|
protected authHeaders(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
124
|
-
protected customerAPIKeyAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
125
|
-
protected customerSenderIDAuth(opts: FinalRequestOptions): Promise<NullableHeaders | undefined>;
|
|
126
122
|
/**
|
|
127
123
|
* Basic re-implementation of `qs.stringify` for primitive types.
|
|
128
124
|
*/
|
|
129
|
-
protected stringifyQuery(query: Record<string, unknown>): string;
|
|
125
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string;
|
|
130
126
|
private getUserAgent;
|
|
131
127
|
protected defaultIdempotencyKey(): string;
|
|
132
128
|
protected makeStatusError(status: number, error: Object, message: string | undefined, headers: Headers): Errors.APIError;
|
|
@@ -183,16 +179,48 @@ export declare class SentDm {
|
|
|
183
179
|
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
184
180
|
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
185
181
|
static toFile: typeof Uploads.toFile;
|
|
186
|
-
|
|
187
|
-
|
|
182
|
+
/**
|
|
183
|
+
* Configure webhook endpoints for real-time event delivery
|
|
184
|
+
*/
|
|
185
|
+
webhooks: API.Webhooks;
|
|
186
|
+
/**
|
|
187
|
+
* Invite, update, and manage organization users and roles
|
|
188
|
+
*/
|
|
189
|
+
users: API.Users;
|
|
190
|
+
/**
|
|
191
|
+
* Manage message templates with variable substitution
|
|
192
|
+
*/
|
|
188
193
|
templates: API.Templates;
|
|
189
|
-
|
|
194
|
+
/**
|
|
195
|
+
* Manage organization profiles
|
|
196
|
+
*/
|
|
197
|
+
profiles: API.Profiles;
|
|
198
|
+
/**
|
|
199
|
+
* Manage and lookup phone numbers
|
|
200
|
+
*/
|
|
201
|
+
numbers: API.Numbers;
|
|
202
|
+
/**
|
|
203
|
+
* Send and track SMS and WhatsApp messages
|
|
204
|
+
*/
|
|
205
|
+
messages: API.Messages;
|
|
206
|
+
/**
|
|
207
|
+
* Create, update, and manage customer contact lists
|
|
208
|
+
*/
|
|
209
|
+
contacts: API.Contacts;
|
|
210
|
+
/**
|
|
211
|
+
* Retrieve account details
|
|
212
|
+
*/
|
|
213
|
+
me: API.Me;
|
|
190
214
|
}
|
|
191
215
|
export declare namespace SentDm {
|
|
192
216
|
export type RequestOptions = Opts.RequestOptions;
|
|
193
|
-
export {
|
|
194
|
-
export {
|
|
195
|
-
export { Templates as Templates, type
|
|
196
|
-
export {
|
|
217
|
+
export { Webhooks as Webhooks, type APIMeta as APIMeta, type APIResponseWebhook as APIResponseWebhook, type ErrorDetail as ErrorDetail, type MutationRequest as MutationRequest, type PaginationMeta as PaginationMeta, type WebhookResponse as WebhookResponse, type WebhookListResponse as WebhookListResponse, type WebhookListEventTypesResponse as WebhookListEventTypesResponse, type WebhookListEventsResponse as WebhookListEventsResponse, type WebhookRotateSecretResponse as WebhookRotateSecretResponse, type WebhookTestResponse as WebhookTestResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookRetrieveParams as WebhookRetrieveParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, type WebhookDeleteParams as WebhookDeleteParams, type WebhookListEventTypesParams as WebhookListEventTypesParams, type WebhookListEventsParams as WebhookListEventsParams, type WebhookRotateSecretParams as WebhookRotateSecretParams, type WebhookTestParams as WebhookTestParams, type WebhookToggleStatusParams as WebhookToggleStatusParams, };
|
|
218
|
+
export { Users as Users, type APIResponseOfUser as APIResponseOfUser, type UserResponse as UserResponse, type UserListResponse as UserListResponse, type UserRetrieveParams as UserRetrieveParams, type UserListParams as UserListParams, type UserInviteParams as UserInviteParams, type UserRemoveParams as UserRemoveParams, type UserUpdateRoleParams as UserUpdateRoleParams, };
|
|
219
|
+
export { Templates as Templates, type APIResponseTemplate as APIResponseTemplate, type SentDmServicesCommonContractsPocOsAuthenticationConfig as SentDmServicesCommonContractsPocOsAuthenticationConfig, type SentDmServicesCommonContractsPocOsTemplateBody as SentDmServicesCommonContractsPocOsTemplateBody, type SentDmServicesCommonContractsPocOsTemplateButton as SentDmServicesCommonContractsPocOsTemplateButton, type SentDmServicesCommonContractsPocOsTemplateButtonProps as SentDmServicesCommonContractsPocOsTemplateButtonProps, type SentDmServicesCommonContractsPocOsTemplateFooter as SentDmServicesCommonContractsPocOsTemplateFooter, type SentDmServicesCommonContractsPocOsTemplateHeader as SentDmServicesCommonContractsPocOsTemplateHeader, type Template as Template, type TemplateBodyContent as TemplateBodyContent, type TemplateDefinition as TemplateDefinition, type TemplateVariable as TemplateVariable, type TemplateListResponse as TemplateListResponse, type TemplateCreateParams as TemplateCreateParams, type TemplateRetrieveParams as TemplateRetrieveParams, type TemplateUpdateParams as TemplateUpdateParams, type TemplateListParams as TemplateListParams, type TemplateDeleteParams as TemplateDeleteParams, };
|
|
220
|
+
export { Profiles as Profiles, type APIResponseOfProfileDetail as APIResponseOfProfileDetail, type BillingContactInfo as BillingContactInfo, type BrandsBrandData as BrandsBrandData, type DestinationCountry as DestinationCountry, type PaymentDetails as PaymentDetails, type ProfileDetail as ProfileDetail, type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo, type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo, type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo as SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo, type TcrBrandRelationship as TcrBrandRelationship, type TcrVertical as TcrVertical, type ProfileListResponse as ProfileListResponse, type ProfileCompleteResponse as ProfileCompleteResponse, type ProfileCreateParams as ProfileCreateParams, type ProfileRetrieveParams as ProfileRetrieveParams, type ProfileUpdateParams as ProfileUpdateParams, type ProfileListParams as ProfileListParams, type ProfileDeleteParams as ProfileDeleteParams, type ProfileCompleteParams as ProfileCompleteParams, };
|
|
221
|
+
export { Numbers as Numbers, type NumberLookupResponse as NumberLookupResponse, type NumberLookupParams as NumberLookupParams, };
|
|
222
|
+
export { Messages as Messages, type MessageRetrieveActivitiesResponse as MessageRetrieveActivitiesResponse, type MessageRetrieveStatusResponse as MessageRetrieveStatusResponse, type MessageSendResponse as MessageSendResponse, type MessageRetrieveActivitiesParams as MessageRetrieveActivitiesParams, type MessageRetrieveStatusParams as MessageRetrieveStatusParams, type MessageSendParams as MessageSendParams, };
|
|
223
|
+
export { Contacts as Contacts, type APIResponseOfContact as APIResponseOfContact, type ContactResponse as ContactResponse, type ContactListResponse as ContactListResponse, type ContactCreateParams as ContactCreateParams, type ContactRetrieveParams as ContactRetrieveParams, type ContactUpdateParams as ContactUpdateParams, type ContactListParams as ContactListParams, type ContactDeleteParams as ContactDeleteParams, };
|
|
224
|
+
export { Me as Me, type ProfileSettings as ProfileSettings, type MeRetrieveResponse as MeRetrieveResponse, type MeRetrieveParams as MeRetrieveParams, };
|
|
197
225
|
}
|
|
198
226
|
//# sourceMappingURL=client.d.ts.map
|