@zavudev/sdk 0.56.0 → 0.58.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 (806) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +3 -3
  3. package/client.d.mts +39 -39
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +39 -39
  6. package/client.d.ts.map +1 -1
  7. package/client.js +43 -43
  8. package/client.js.map +1 -1
  9. package/client.mjs +43 -43
  10. package/client.mjs.map +1 -1
  11. package/core/api-promise.d.mts.map +1 -1
  12. package/core/api-promise.d.ts.map +1 -1
  13. package/core/api-promise.js +0 -1
  14. package/core/api-promise.js.map +1 -1
  15. package/core/api-promise.mjs +0 -1
  16. package/core/api-promise.mjs.map +1 -1
  17. package/core/error.d.mts.map +1 -1
  18. package/core/error.d.ts.map +1 -1
  19. package/core/error.js +0 -1
  20. package/core/error.js.map +1 -1
  21. package/core/error.mjs +0 -1
  22. package/core/error.mjs.map +1 -1
  23. package/core/pagination.d.mts.map +1 -1
  24. package/core/pagination.d.ts.map +1 -1
  25. package/core/pagination.js +0 -1
  26. package/core/pagination.js.map +1 -1
  27. package/core/pagination.mjs +0 -1
  28. package/core/pagination.mjs.map +1 -1
  29. package/core/resource.d.mts.map +1 -1
  30. package/core/resource.d.ts.map +1 -1
  31. package/core/resource.js +0 -1
  32. package/core/resource.js.map +1 -1
  33. package/core/resource.mjs +0 -1
  34. package/core/resource.mjs.map +1 -1
  35. package/index.d.mts.map +1 -1
  36. package/index.d.ts.map +1 -1
  37. package/index.js +0 -1
  38. package/index.js.map +1 -1
  39. package/index.mjs +0 -1
  40. package/index.mjs.map +1 -1
  41. package/internal/builtin-types.d.mts.map +1 -1
  42. package/internal/builtin-types.d.ts.map +1 -1
  43. package/internal/builtin-types.js +0 -1
  44. package/internal/builtin-types.js.map +1 -1
  45. package/internal/builtin-types.mjs +0 -1
  46. package/internal/builtin-types.mjs.map +1 -1
  47. package/internal/detect-platform.d.mts.map +1 -1
  48. package/internal/detect-platform.d.ts.map +1 -1
  49. package/internal/detect-platform.js +0 -1
  50. package/internal/detect-platform.js.map +1 -1
  51. package/internal/detect-platform.mjs +0 -1
  52. package/internal/detect-platform.mjs.map +1 -1
  53. package/internal/errors.d.mts.map +1 -1
  54. package/internal/errors.d.ts.map +1 -1
  55. package/internal/errors.js +0 -1
  56. package/internal/errors.js.map +1 -1
  57. package/internal/errors.mjs +0 -1
  58. package/internal/errors.mjs.map +1 -1
  59. package/internal/headers.d.mts.map +1 -1
  60. package/internal/headers.d.ts.map +1 -1
  61. package/internal/headers.js +0 -1
  62. package/internal/headers.js.map +1 -1
  63. package/internal/headers.mjs +0 -1
  64. package/internal/headers.mjs.map +1 -1
  65. package/internal/parse.d.mts.map +1 -1
  66. package/internal/parse.d.ts.map +1 -1
  67. package/internal/parse.js +0 -1
  68. package/internal/parse.js.map +1 -1
  69. package/internal/parse.mjs +0 -1
  70. package/internal/parse.mjs.map +1 -1
  71. package/internal/qs/formats.d.mts +7 -0
  72. package/internal/qs/formats.d.mts.map +1 -0
  73. package/internal/qs/formats.d.ts +7 -0
  74. package/internal/qs/formats.d.ts.map +1 -0
  75. package/internal/qs/formats.js +13 -0
  76. package/internal/qs/formats.js.map +1 -0
  77. package/internal/qs/formats.mjs +9 -0
  78. package/internal/qs/formats.mjs.map +1 -0
  79. package/internal/qs/index.d.mts +10 -0
  80. package/internal/qs/index.d.mts.map +1 -0
  81. package/internal/qs/index.d.ts +10 -0
  82. package/internal/qs/index.d.ts.map +1 -0
  83. package/internal/qs/index.js +14 -0
  84. package/internal/qs/index.js.map +1 -0
  85. package/internal/qs/index.mjs +10 -0
  86. package/internal/qs/index.mjs.map +1 -0
  87. package/internal/qs/stringify.d.mts +3 -0
  88. package/internal/qs/stringify.d.mts.map +1 -0
  89. package/internal/qs/stringify.d.ts +3 -0
  90. package/internal/qs/stringify.d.ts.map +1 -0
  91. package/internal/qs/stringify.js +277 -0
  92. package/internal/qs/stringify.js.map +1 -0
  93. package/internal/qs/stringify.mjs +274 -0
  94. package/internal/qs/stringify.mjs.map +1 -0
  95. package/internal/qs/types.d.mts +57 -0
  96. package/internal/qs/types.d.mts.map +1 -0
  97. package/internal/qs/types.d.ts +57 -0
  98. package/internal/qs/types.d.ts.map +1 -0
  99. package/internal/qs/types.js +3 -0
  100. package/internal/qs/types.js.map +1 -0
  101. package/internal/qs/types.mjs +2 -0
  102. package/internal/qs/types.mjs.map +1 -0
  103. package/internal/qs/utils.d.mts +15 -0
  104. package/internal/qs/utils.d.mts.map +1 -0
  105. package/internal/qs/utils.d.ts +15 -0
  106. package/internal/qs/utils.d.ts.map +1 -0
  107. package/internal/qs/utils.js +230 -0
  108. package/internal/qs/utils.js.map +1 -0
  109. package/internal/qs/utils.mjs +217 -0
  110. package/internal/qs/utils.mjs.map +1 -0
  111. package/internal/request-options.d.mts.map +1 -1
  112. package/internal/request-options.d.ts.map +1 -1
  113. package/internal/request-options.js +0 -1
  114. package/internal/request-options.js.map +1 -1
  115. package/internal/request-options.mjs +0 -1
  116. package/internal/request-options.mjs.map +1 -1
  117. package/internal/shim-types.d.mts.map +1 -1
  118. package/internal/shim-types.d.ts.map +1 -1
  119. package/internal/shim-types.js +6 -1
  120. package/internal/shim-types.js.map +1 -1
  121. package/internal/shim-types.mjs +6 -1
  122. package/internal/shim-types.mjs.map +1 -1
  123. package/internal/shims.d.mts.map +1 -1
  124. package/internal/shims.d.ts.map +1 -1
  125. package/internal/shims.js +6 -1
  126. package/internal/shims.js.map +1 -1
  127. package/internal/shims.mjs +6 -1
  128. package/internal/shims.mjs.map +1 -1
  129. package/internal/tslib.js +17 -17
  130. package/internal/types.d.mts.map +1 -1
  131. package/internal/types.d.ts.map +1 -1
  132. package/internal/types.js +0 -1
  133. package/internal/types.js.map +1 -1
  134. package/internal/types.mjs +0 -1
  135. package/internal/types.mjs.map +1 -1
  136. package/internal/utils/base64.d.mts.map +1 -1
  137. package/internal/utils/base64.d.ts.map +1 -1
  138. package/internal/utils/base64.js +0 -1
  139. package/internal/utils/base64.js.map +1 -1
  140. package/internal/utils/base64.mjs +0 -1
  141. package/internal/utils/base64.mjs.map +1 -1
  142. package/internal/utils/env.d.mts.map +1 -1
  143. package/internal/utils/env.d.ts.map +1 -1
  144. package/internal/utils/env.js +0 -1
  145. package/internal/utils/env.js.map +1 -1
  146. package/internal/utils/env.mjs +0 -1
  147. package/internal/utils/env.mjs.map +1 -1
  148. package/internal/utils/log.d.mts.map +1 -1
  149. package/internal/utils/log.d.ts.map +1 -1
  150. package/internal/utils/log.js +0 -1
  151. package/internal/utils/log.js.map +1 -1
  152. package/internal/utils/log.mjs +0 -1
  153. package/internal/utils/log.mjs.map +1 -1
  154. package/internal/utils/query.d.mts +0 -3
  155. package/internal/utils/query.d.mts.map +1 -1
  156. package/internal/utils/query.d.ts +0 -3
  157. package/internal/utils/query.d.ts.map +1 -1
  158. package/internal/utils/query.js +3 -17
  159. package/internal/utils/query.js.map +1 -1
  160. package/internal/utils/query.mjs +2 -17
  161. package/internal/utils/query.mjs.map +1 -1
  162. package/internal/utils/sleep.d.mts.map +1 -1
  163. package/internal/utils/sleep.d.ts.map +1 -1
  164. package/internal/utils/sleep.js +0 -1
  165. package/internal/utils/sleep.js.map +1 -1
  166. package/internal/utils/sleep.mjs +0 -1
  167. package/internal/utils/sleep.mjs.map +1 -1
  168. package/internal/utils/uuid.d.mts.map +1 -1
  169. package/internal/utils/uuid.d.ts.map +1 -1
  170. package/internal/utils/uuid.js +0 -1
  171. package/internal/utils/uuid.js.map +1 -1
  172. package/internal/utils/uuid.mjs +0 -1
  173. package/internal/utils/uuid.mjs.map +1 -1
  174. package/internal/utils/values.d.mts.map +1 -1
  175. package/internal/utils/values.d.ts.map +1 -1
  176. package/internal/utils/values.js +0 -1
  177. package/internal/utils/values.js.map +1 -1
  178. package/internal/utils/values.mjs +0 -1
  179. package/internal/utils/values.mjs.map +1 -1
  180. package/internal/utils.d.mts.map +1 -1
  181. package/internal/utils.d.ts.map +1 -1
  182. package/internal/utils.js +0 -1
  183. package/internal/utils.js.map +1 -1
  184. package/internal/utils.mjs +0 -1
  185. package/internal/utils.mjs.map +1 -1
  186. package/package.json +29 -10
  187. package/resources/addresses.d.mts +27 -77
  188. package/resources/addresses.d.mts.map +1 -1
  189. package/resources/addresses.d.ts +27 -77
  190. package/resources/addresses.d.ts.map +1 -1
  191. package/resources/addresses.js +19 -32
  192. package/resources/addresses.js.map +1 -1
  193. package/resources/addresses.mjs +19 -32
  194. package/resources/addresses.mjs.map +1 -1
  195. package/resources/agent-templates.d.mts +17 -71
  196. package/resources/agent-templates.d.mts.map +1 -1
  197. package/resources/agent-templates.d.ts +17 -71
  198. package/resources/agent-templates.d.ts.map +1 -1
  199. package/resources/agent-templates.js +11 -15
  200. package/resources/agent-templates.js.map +1 -1
  201. package/resources/agent-templates.mjs +11 -15
  202. package/resources/agent-templates.mjs.map +1 -1
  203. package/resources/agents/agents.d.mts +53 -395
  204. package/resources/agents/agents.d.mts.map +1 -1
  205. package/resources/agents/agents.d.ts +53 -395
  206. package/resources/agents/agents.d.ts.map +1 -1
  207. package/resources/agents/agents.js +33 -48
  208. package/resources/agents/agents.js.map +1 -1
  209. package/resources/agents/agents.mjs +33 -48
  210. package/resources/agents/agents.mjs.map +1 -1
  211. package/resources/agents/index.js +1 -1
  212. package/resources/agents/index.js.map +1 -1
  213. package/resources/agents/index.mjs +1 -1
  214. package/resources/agents/index.mjs.map +1 -1
  215. package/resources/agents/senders.d.mts +10 -32
  216. package/resources/agents/senders.d.mts.map +1 -1
  217. package/resources/agents/senders.d.ts +10 -32
  218. package/resources/agents/senders.d.ts.map +1 -1
  219. package/resources/agents/senders.js +7 -14
  220. package/resources/agents/senders.js.map +1 -1
  221. package/resources/agents/senders.mjs +7 -14
  222. package/resources/agents/senders.mjs.map +1 -1
  223. package/resources/agents.js +1 -1
  224. package/resources/agents.js.map +1 -1
  225. package/resources/agents.mjs +1 -1
  226. package/resources/agents.mjs.map +1 -1
  227. package/resources/balance.d.mts +6 -19
  228. package/resources/balance.d.mts.map +1 -1
  229. package/resources/balance.d.ts +6 -19
  230. package/resources/balance.d.ts.map +1 -1
  231. package/resources/balance.js +5 -1
  232. package/resources/balance.js.map +1 -1
  233. package/resources/balance.mjs +5 -1
  234. package/resources/balance.mjs.map +1 -1
  235. package/resources/broadcasts/broadcasts.d.mts +92 -411
  236. package/resources/broadcasts/broadcasts.d.mts.map +1 -1
  237. package/resources/broadcasts/broadcasts.d.ts +92 -411
  238. package/resources/broadcasts/broadcasts.d.ts.map +1 -1
  239. package/resources/broadcasts/broadcasts.js +64 -85
  240. package/resources/broadcasts/broadcasts.js.map +1 -1
  241. package/resources/broadcasts/broadcasts.mjs +64 -85
  242. package/resources/broadcasts/broadcasts.mjs.map +1 -1
  243. package/resources/broadcasts/contacts.d.mts +19 -109
  244. package/resources/broadcasts/contacts.d.mts.map +1 -1
  245. package/resources/broadcasts/contacts.d.ts +19 -109
  246. package/resources/broadcasts/contacts.d.ts.map +1 -1
  247. package/resources/broadcasts/contacts.js +10 -40
  248. package/resources/broadcasts/contacts.js.map +1 -1
  249. package/resources/broadcasts/contacts.mjs +10 -40
  250. package/resources/broadcasts/contacts.mjs.map +1 -1
  251. package/resources/broadcasts/index.js +1 -1
  252. package/resources/broadcasts/index.js.map +1 -1
  253. package/resources/broadcasts/index.mjs +1 -1
  254. package/resources/broadcasts/index.mjs.map +1 -1
  255. package/resources/broadcasts.js +1 -1
  256. package/resources/broadcasts.js.map +1 -1
  257. package/resources/broadcasts.mjs +1 -1
  258. package/resources/broadcasts.mjs.map +1 -1
  259. package/resources/calls.d.mts +40 -475
  260. package/resources/calls.d.mts.map +1 -1
  261. package/resources/calls.d.ts +40 -475
  262. package/resources/calls.d.ts.map +1 -1
  263. package/resources/calls.js +25 -26
  264. package/resources/calls.js.map +1 -1
  265. package/resources/calls.mjs +25 -26
  266. package/resources/calls.mjs.map +1 -1
  267. package/resources/contacts/channels.d.mts +20 -98
  268. package/resources/contacts/channels.d.mts.map +1 -1
  269. package/resources/contacts/channels.d.ts +20 -98
  270. package/resources/contacts/channels.d.ts.map +1 -1
  271. package/resources/contacts/channels.js +13 -32
  272. package/resources/contacts/channels.js.map +1 -1
  273. package/resources/contacts/channels.mjs +13 -32
  274. package/resources/contacts/channels.mjs.map +1 -1
  275. package/resources/contacts/contacts.d.mts +32 -224
  276. package/resources/contacts/contacts.d.mts.map +1 -1
  277. package/resources/contacts/contacts.d.ts +32 -224
  278. package/resources/contacts/contacts.d.ts.map +1 -1
  279. package/resources/contacts/contacts.js +20 -65
  280. package/resources/contacts/contacts.js.map +1 -1
  281. package/resources/contacts/contacts.mjs +20 -65
  282. package/resources/contacts/contacts.mjs.map +1 -1
  283. package/resources/contacts/index.js +1 -1
  284. package/resources/contacts/index.js.map +1 -1
  285. package/resources/contacts/index.mjs +1 -1
  286. package/resources/contacts/index.mjs.map +1 -1
  287. package/resources/contacts.js +1 -1
  288. package/resources/contacts.js.map +1 -1
  289. package/resources/contacts.mjs +1 -1
  290. package/resources/contacts.mjs.map +1 -1
  291. package/resources/conversations.d.mts +32 -316
  292. package/resources/conversations.d.mts.map +1 -1
  293. package/resources/conversations.d.ts +32 -316
  294. package/resources/conversations.d.ts.map +1 -1
  295. package/resources/conversations.js +15 -1
  296. package/resources/conversations.js.map +1 -1
  297. package/resources/conversations.mjs +15 -1
  298. package/resources/conversations.mjs.map +1 -1
  299. package/resources/email-domains.d.mts +25 -208
  300. package/resources/email-domains.d.mts.map +1 -1
  301. package/resources/email-domains.d.ts +25 -208
  302. package/resources/email-domains.d.ts.map +1 -1
  303. package/resources/email-domains.js +12 -27
  304. package/resources/email-domains.js.map +1 -1
  305. package/resources/email-domains.mjs +12 -27
  306. package/resources/email-domains.mjs.map +1 -1
  307. package/resources/functions/functions.d.mts +67 -553
  308. package/resources/functions/functions.d.mts.map +1 -1
  309. package/resources/functions/functions.d.ts +67 -553
  310. package/resources/functions/functions.d.ts.map +1 -1
  311. package/resources/functions/functions.js +39 -82
  312. package/resources/functions/functions.js.map +1 -1
  313. package/resources/functions/functions.mjs +39 -82
  314. package/resources/functions/functions.mjs.map +1 -1
  315. package/resources/functions/git-link.d.mts +25 -240
  316. package/resources/functions/git-link.d.mts.map +1 -1
  317. package/resources/functions/git-link.d.ts +25 -240
  318. package/resources/functions/git-link.d.ts.map +1 -1
  319. package/resources/functions/git-link.js +16 -34
  320. package/resources/functions/git-link.js.map +1 -1
  321. package/resources/functions/git-link.mjs +16 -34
  322. package/resources/functions/git-link.mjs.map +1 -1
  323. package/resources/functions/index.js +1 -1
  324. package/resources/functions/index.js.map +1 -1
  325. package/resources/functions/index.mjs +1 -1
  326. package/resources/functions/index.mjs.map +1 -1
  327. package/resources/functions/secrets.d.mts +15 -47
  328. package/resources/functions/secrets.d.mts.map +1 -1
  329. package/resources/functions/secrets.d.ts +15 -47
  330. package/resources/functions/secrets.d.ts.map +1 -1
  331. package/resources/functions/secrets.js +11 -21
  332. package/resources/functions/secrets.js.map +1 -1
  333. package/resources/functions/secrets.mjs +11 -21
  334. package/resources/functions/secrets.mjs.map +1 -1
  335. package/resources/functions/triggers.d.mts +14 -123
  336. package/resources/functions/triggers.d.mts.map +1 -1
  337. package/resources/functions/triggers.d.ts +14 -123
  338. package/resources/functions/triggers.d.ts.map +1 -1
  339. package/resources/functions/triggers.js +7 -25
  340. package/resources/functions/triggers.js.map +1 -1
  341. package/resources/functions/triggers.mjs +7 -25
  342. package/resources/functions/triggers.mjs.map +1 -1
  343. package/resources/functions.js +1 -1
  344. package/resources/functions.js.map +1 -1
  345. package/resources/functions.mjs +1 -1
  346. package/resources/functions.mjs.map +1 -1
  347. package/resources/index.d.mts +1 -0
  348. package/resources/index.d.mts.map +1 -1
  349. package/resources/index.d.ts +1 -0
  350. package/resources/index.d.ts.map +1 -1
  351. package/resources/index.js +4 -2
  352. package/resources/index.js.map +1 -1
  353. package/resources/index.mjs +2 -1
  354. package/resources/index.mjs.map +1 -1
  355. package/resources/introspect.d.mts +15 -105
  356. package/resources/introspect.d.mts.map +1 -1
  357. package/resources/introspect.d.ts +15 -105
  358. package/resources/introspect.d.ts.map +1 -1
  359. package/resources/introspect.js +7 -13
  360. package/resources/introspect.js.map +1 -1
  361. package/resources/introspect.mjs +7 -13
  362. package/resources/introspect.mjs.map +1 -1
  363. package/resources/invitations/webhook.d.mts +57 -0
  364. package/resources/invitations/webhook.d.mts.map +1 -0
  365. package/resources/invitations/webhook.d.ts +57 -0
  366. package/resources/invitations/webhook.d.ts.map +1 -0
  367. package/resources/invitations/webhook.js +61 -0
  368. package/resources/invitations/webhook.js.map +1 -0
  369. package/resources/invitations/webhook.mjs +57 -0
  370. package/resources/invitations/webhook.mjs.map +1 -0
  371. package/resources/invitations.d.mts +27 -174
  372. package/resources/invitations.d.mts.map +1 -1
  373. package/resources/invitations.d.ts +27 -174
  374. package/resources/invitations.d.ts.map +1 -1
  375. package/resources/invitations.js +20 -30
  376. package/resources/invitations.js.map +1 -1
  377. package/resources/invitations.mjs +19 -30
  378. package/resources/invitations.mjs.map +1 -1
  379. package/resources/me.d.mts +9 -18
  380. package/resources/me.d.mts.map +1 -1
  381. package/resources/me.d.ts +9 -18
  382. package/resources/me.d.ts.map +1 -1
  383. package/resources/me.js +5 -1
  384. package/resources/me.js.map +1 -1
  385. package/resources/me.mjs +5 -1
  386. package/resources/me.mjs.map +1 -1
  387. package/resources/memory/collections/collections.d.mts +75 -0
  388. package/resources/memory/collections/collections.d.mts.map +1 -0
  389. package/resources/memory/collections/collections.d.ts +75 -0
  390. package/resources/memory/collections/collections.d.ts.map +1 -0
  391. package/resources/memory/collections/collections.js +79 -0
  392. package/resources/memory/collections/collections.js.map +1 -0
  393. package/resources/memory/collections/collections.mjs +74 -0
  394. package/resources/memory/collections/collections.mjs.map +1 -0
  395. package/resources/memory/collections/index.d.mts +3 -0
  396. package/resources/memory/collections/index.d.mts.map +1 -0
  397. package/resources/memory/collections/index.d.ts +3 -0
  398. package/resources/memory/collections/index.d.ts.map +1 -0
  399. package/resources/memory/collections/index.js +9 -0
  400. package/resources/memory/collections/index.js.map +1 -0
  401. package/resources/memory/collections/index.mjs +4 -0
  402. package/resources/memory/collections/index.mjs.map +1 -0
  403. package/resources/memory/collections/items.d.mts +88 -0
  404. package/resources/memory/collections/items.d.mts.map +1 -0
  405. package/resources/memory/collections/items.d.ts +88 -0
  406. package/resources/memory/collections/items.d.ts.map +1 -0
  407. package/resources/memory/collections/items.js +120 -0
  408. package/resources/memory/collections/items.js.map +1 -0
  409. package/resources/memory/collections/items.mjs +116 -0
  410. package/resources/memory/collections/items.mjs.map +1 -0
  411. package/resources/memory/collections.d.mts +2 -0
  412. package/resources/memory/collections.d.mts.map +1 -0
  413. package/resources/memory/collections.d.ts +2 -0
  414. package/resources/memory/collections.d.ts.map +1 -0
  415. package/resources/memory/collections.js +6 -0
  416. package/resources/memory/collections.js.map +1 -0
  417. package/resources/memory/collections.mjs +3 -0
  418. package/resources/memory/collections.mjs.map +1 -0
  419. package/resources/memory/index.d.mts +3 -0
  420. package/resources/memory/index.d.mts.map +1 -0
  421. package/resources/memory/index.d.ts +3 -0
  422. package/resources/memory/index.d.ts.map +1 -0
  423. package/resources/memory/index.js +9 -0
  424. package/resources/memory/index.js.map +1 -0
  425. package/resources/memory/index.mjs +4 -0
  426. package/resources/memory/index.mjs.map +1 -0
  427. package/resources/memory/memory.d.mts +111 -0
  428. package/resources/memory/memory.d.mts.map +1 -0
  429. package/resources/memory/memory.d.ts +111 -0
  430. package/resources/memory/memory.d.ts.map +1 -0
  431. package/resources/memory/memory.js +116 -0
  432. package/resources/memory/memory.js.map +1 -0
  433. package/resources/memory/memory.mjs +111 -0
  434. package/resources/memory/memory.mjs.map +1 -0
  435. package/resources/memory.d.mts +2 -0
  436. package/resources/memory.d.mts.map +1 -0
  437. package/resources/memory.d.ts +2 -0
  438. package/resources/memory.d.ts.map +1 -0
  439. package/resources/memory.js +6 -0
  440. package/resources/memory.js.map +1 -0
  441. package/resources/memory.mjs +3 -0
  442. package/resources/memory.mjs.map +1 -0
  443. package/resources/messages.d.mts +119 -561
  444. package/resources/messages.d.mts.map +1 -1
  445. package/resources/messages.d.ts +119 -561
  446. package/resources/messages.d.ts.map +1 -1
  447. package/resources/messages.js +98 -58
  448. package/resources/messages.js.map +1 -1
  449. package/resources/messages.mjs +98 -58
  450. package/resources/messages.mjs.map +1 -1
  451. package/resources/number-10dlc/brands.d.mts +44 -209
  452. package/resources/number-10dlc/brands.d.mts.map +1 -1
  453. package/resources/number-10dlc/brands.d.ts +44 -209
  454. package/resources/number-10dlc/brands.d.ts.map +1 -1
  455. package/resources/number-10dlc/brands.js +31 -64
  456. package/resources/number-10dlc/brands.js.map +1 -1
  457. package/resources/number-10dlc/brands.mjs +31 -64
  458. package/resources/number-10dlc/brands.mjs.map +1 -1
  459. package/resources/number-10dlc/campaigns/campaigns.d.mts +40 -183
  460. package/resources/number-10dlc/campaigns/campaigns.d.mts.map +1 -1
  461. package/resources/number-10dlc/campaigns/campaigns.d.ts +40 -183
  462. package/resources/number-10dlc/campaigns/campaigns.d.ts.map +1 -1
  463. package/resources/number-10dlc/campaigns/campaigns.js +27 -69
  464. package/resources/number-10dlc/campaigns/campaigns.js.map +1 -1
  465. package/resources/number-10dlc/campaigns/campaigns.mjs +27 -69
  466. package/resources/number-10dlc/campaigns/campaigns.mjs.map +1 -1
  467. package/resources/number-10dlc/campaigns/index.js +1 -1
  468. package/resources/number-10dlc/campaigns/index.js.map +1 -1
  469. package/resources/number-10dlc/campaigns/index.mjs +1 -1
  470. package/resources/number-10dlc/campaigns/index.mjs.map +1 -1
  471. package/resources/number-10dlc/campaigns/phone-numbers.d.mts +21 -56
  472. package/resources/number-10dlc/campaigns/phone-numbers.d.mts.map +1 -1
  473. package/resources/number-10dlc/campaigns/phone-numbers.d.ts +21 -56
  474. package/resources/number-10dlc/campaigns/phone-numbers.d.ts.map +1 -1
  475. package/resources/number-10dlc/campaigns/phone-numbers.js +15 -26
  476. package/resources/number-10dlc/campaigns/phone-numbers.js.map +1 -1
  477. package/resources/number-10dlc/campaigns/phone-numbers.mjs +15 -26
  478. package/resources/number-10dlc/campaigns/phone-numbers.mjs.map +1 -1
  479. package/resources/number-10dlc/campaigns.js +1 -1
  480. package/resources/number-10dlc/campaigns.js.map +1 -1
  481. package/resources/number-10dlc/campaigns.mjs +1 -1
  482. package/resources/number-10dlc/campaigns.mjs.map +1 -1
  483. package/resources/number-10dlc/index.js +1 -1
  484. package/resources/number-10dlc/index.js.map +1 -1
  485. package/resources/number-10dlc/index.mjs +1 -1
  486. package/resources/number-10dlc/index.mjs.map +1 -1
  487. package/resources/number-10dlc/number-10dlc.d.mts +3 -4
  488. package/resources/number-10dlc/number-10dlc.d.mts.map +1 -1
  489. package/resources/number-10dlc/number-10dlc.d.ts +3 -4
  490. package/resources/number-10dlc/number-10dlc.d.ts.map +1 -1
  491. package/resources/number-10dlc/number-10dlc.js +1 -5
  492. package/resources/number-10dlc/number-10dlc.js.map +1 -1
  493. package/resources/number-10dlc/number-10dlc.mjs +1 -5
  494. package/resources/number-10dlc/number-10dlc.mjs.map +1 -1
  495. package/resources/number-10dlc.js +1 -1
  496. package/resources/number-10dlc.js.map +1 -1
  497. package/resources/number-10dlc.mjs +1 -1
  498. package/resources/number-10dlc.mjs.map +1 -1
  499. package/resources/phone-numbers.d.mts +95 -234
  500. package/resources/phone-numbers.d.mts.map +1 -1
  501. package/resources/phone-numbers.d.ts +95 -234
  502. package/resources/phone-numbers.d.ts.map +1 -1
  503. package/resources/phone-numbers.js +74 -54
  504. package/resources/phone-numbers.js.map +1 -1
  505. package/resources/phone-numbers.mjs +74 -54
  506. package/resources/phone-numbers.mjs.map +1 -1
  507. package/resources/regulatory-documents.d.mts +24 -78
  508. package/resources/regulatory-documents.d.mts.map +1 -1
  509. package/resources/regulatory-documents.d.ts +24 -78
  510. package/resources/regulatory-documents.d.ts.map +1 -1
  511. package/resources/regulatory-documents.js +16 -33
  512. package/resources/regulatory-documents.js.map +1 -1
  513. package/resources/regulatory-documents.mjs +16 -33
  514. package/resources/regulatory-documents.mjs.map +1 -1
  515. package/resources/senders/agent/agent.d.mts +44 -496
  516. package/resources/senders/agent/agent.d.mts.map +1 -1
  517. package/resources/senders/agent/agent.d.ts +44 -496
  518. package/resources/senders/agent/agent.d.ts.map +1 -1
  519. package/resources/senders/agent/agent.js +24 -49
  520. package/resources/senders/agent/agent.js.map +1 -1
  521. package/resources/senders/agent/agent.mjs +24 -49
  522. package/resources/senders/agent/agent.mjs.map +1 -1
  523. package/resources/senders/agent/executions.d.mts +13 -33
  524. package/resources/senders/agent/executions.d.mts.map +1 -1
  525. package/resources/senders/agent/executions.d.ts +13 -33
  526. package/resources/senders/agent/executions.d.ts.map +1 -1
  527. package/resources/senders/agent/executions.js +7 -18
  528. package/resources/senders/agent/executions.js.map +1 -1
  529. package/resources/senders/agent/executions.mjs +7 -18
  530. package/resources/senders/agent/executions.mjs.map +1 -1
  531. package/resources/senders/agent/flows.d.mts +34 -188
  532. package/resources/senders/agent/flows.d.mts.map +1 -1
  533. package/resources/senders/agent/flows.d.ts +34 -188
  534. package/resources/senders/agent/flows.d.ts.map +1 -1
  535. package/resources/senders/agent/flows.js +19 -69
  536. package/resources/senders/agent/flows.js.map +1 -1
  537. package/resources/senders/agent/flows.mjs +19 -69
  538. package/resources/senders/agent/flows.mjs.map +1 -1
  539. package/resources/senders/agent/index.js +1 -1
  540. package/resources/senders/agent/index.js.map +1 -1
  541. package/resources/senders/agent/index.mjs +1 -1
  542. package/resources/senders/agent/index.mjs.map +1 -1
  543. package/resources/senders/agent/knowledge-bases/documents.d.mts +27 -105
  544. package/resources/senders/agent/knowledge-bases/documents.d.mts.map +1 -1
  545. package/resources/senders/agent/knowledge-bases/documents.d.ts +27 -105
  546. package/resources/senders/agent/knowledge-bases/documents.d.ts.map +1 -1
  547. package/resources/senders/agent/knowledge-bases/documents.js +16 -47
  548. package/resources/senders/agent/knowledge-bases/documents.js.map +1 -1
  549. package/resources/senders/agent/knowledge-bases/documents.mjs +16 -47
  550. package/resources/senders/agent/knowledge-bases/documents.mjs.map +1 -1
  551. package/resources/senders/agent/knowledge-bases/index.js +1 -1
  552. package/resources/senders/agent/knowledge-bases/index.js.map +1 -1
  553. package/resources/senders/agent/knowledge-bases/index.mjs +1 -1
  554. package/resources/senders/agent/knowledge-bases/index.mjs.map +1 -1
  555. package/resources/senders/agent/knowledge-bases/knowledge-bases.d.mts +32 -113
  556. package/resources/senders/agent/knowledge-bases/knowledge-bases.d.mts.map +1 -1
  557. package/resources/senders/agent/knowledge-bases/knowledge-bases.d.ts +32 -113
  558. package/resources/senders/agent/knowledge-bases/knowledge-bases.d.ts.map +1 -1
  559. package/resources/senders/agent/knowledge-bases/knowledge-bases.js +17 -46
  560. package/resources/senders/agent/knowledge-bases/knowledge-bases.js.map +1 -1
  561. package/resources/senders/agent/knowledge-bases/knowledge-bases.mjs +17 -46
  562. package/resources/senders/agent/knowledge-bases/knowledge-bases.mjs.map +1 -1
  563. package/resources/senders/agent/knowledge-bases.js +1 -1
  564. package/resources/senders/agent/knowledge-bases.js.map +1 -1
  565. package/resources/senders/agent/knowledge-bases.mjs +1 -1
  566. package/resources/senders/agent/knowledge-bases.mjs.map +1 -1
  567. package/resources/senders/agent/tools/index.js +1 -1
  568. package/resources/senders/agent/tools/index.js.map +1 -1
  569. package/resources/senders/agent/tools/index.mjs +1 -1
  570. package/resources/senders/agent/tools/index.mjs.map +1 -1
  571. package/resources/senders/agent/tools/tools.d.mts +47 -280
  572. package/resources/senders/agent/tools/tools.d.mts.map +1 -1
  573. package/resources/senders/agent/tools/tools.d.ts +47 -280
  574. package/resources/senders/agent/tools/tools.d.ts.map +1 -1
  575. package/resources/senders/agent/tools/tools.js +25 -75
  576. package/resources/senders/agent/tools/tools.js.map +1 -1
  577. package/resources/senders/agent/tools/tools.mjs +25 -75
  578. package/resources/senders/agent/tools/tools.mjs.map +1 -1
  579. package/resources/senders/agent/tools/webhook.d.mts +6 -12
  580. package/resources/senders/agent/tools/webhook.d.mts.map +1 -1
  581. package/resources/senders/agent/tools/webhook.d.ts +6 -12
  582. package/resources/senders/agent/tools/webhook.d.ts.map +1 -1
  583. package/resources/senders/agent/tools/webhook.js +4 -9
  584. package/resources/senders/agent/tools/webhook.js.map +1 -1
  585. package/resources/senders/agent/tools/webhook.mjs +4 -9
  586. package/resources/senders/agent/tools/webhook.mjs.map +1 -1
  587. package/resources/senders/agent/tools.js +1 -1
  588. package/resources/senders/agent/tools.js.map +1 -1
  589. package/resources/senders/agent/tools.mjs +1 -1
  590. package/resources/senders/agent/tools.mjs.map +1 -1
  591. package/resources/senders/agent.js +1 -1
  592. package/resources/senders/agent.js.map +1 -1
  593. package/resources/senders/agent.mjs +1 -1
  594. package/resources/senders/agent.mjs.map +1 -1
  595. package/resources/senders/channels.d.mts +61 -0
  596. package/resources/senders/channels.d.mts.map +1 -0
  597. package/resources/senders/channels.d.ts +61 -0
  598. package/resources/senders/channels.d.ts.map +1 -0
  599. package/resources/senders/channels.js +60 -0
  600. package/resources/senders/channels.js.map +1 -0
  601. package/resources/senders/channels.mjs +56 -0
  602. package/resources/senders/channels.mjs.map +1 -0
  603. package/resources/senders/index.d.mts +1 -0
  604. package/resources/senders/index.d.mts.map +1 -1
  605. package/resources/senders/index.d.ts +1 -0
  606. package/resources/senders/index.d.ts.map +1 -1
  607. package/resources/senders/index.js +4 -2
  608. package/resources/senders/index.js.map +1 -1
  609. package/resources/senders/index.mjs +2 -1
  610. package/resources/senders/index.mjs.map +1 -1
  611. package/resources/senders/senders.d.mts +53 -514
  612. package/resources/senders/senders.d.mts.map +1 -1
  613. package/resources/senders/senders.d.ts +53 -514
  614. package/resources/senders/senders.d.ts.map +1 -1
  615. package/resources/senders/senders.js +30 -70
  616. package/resources/senders/senders.js.map +1 -1
  617. package/resources/senders/senders.mjs +30 -70
  618. package/resources/senders/senders.mjs.map +1 -1
  619. package/resources/senders/telegram.d.mts +10 -25
  620. package/resources/senders/telegram.d.mts.map +1 -1
  621. package/resources/senders/telegram.d.ts +10 -25
  622. package/resources/senders/telegram.d.ts.map +1 -1
  623. package/resources/senders/telegram.js +7 -12
  624. package/resources/senders/telegram.js.map +1 -1
  625. package/resources/senders/telegram.mjs +7 -12
  626. package/resources/senders/telegram.mjs.map +1 -1
  627. package/resources/senders/whatsapp-sync.d.mts +16 -104
  628. package/resources/senders/whatsapp-sync.d.mts.map +1 -1
  629. package/resources/senders/whatsapp-sync.d.ts +16 -104
  630. package/resources/senders/whatsapp-sync.d.ts.map +1 -1
  631. package/resources/senders/whatsapp-sync.js +10 -20
  632. package/resources/senders/whatsapp-sync.js.map +1 -1
  633. package/resources/senders/whatsapp-sync.mjs +10 -20
  634. package/resources/senders/whatsapp-sync.mjs.map +1 -1
  635. package/resources/senders.js +1 -1
  636. package/resources/senders.js.map +1 -1
  637. package/resources/senders.mjs +1 -1
  638. package/resources/senders.mjs.map +1 -1
  639. package/resources/sub-accounts/api-keys.d.mts +16 -57
  640. package/resources/sub-accounts/api-keys.d.mts.map +1 -1
  641. package/resources/sub-accounts/api-keys.d.ts +16 -57
  642. package/resources/sub-accounts/api-keys.d.ts.map +1 -1
  643. package/resources/sub-accounts/api-keys.js +10 -18
  644. package/resources/sub-accounts/api-keys.js.map +1 -1
  645. package/resources/sub-accounts/api-keys.mjs +10 -18
  646. package/resources/sub-accounts/api-keys.mjs.map +1 -1
  647. package/resources/sub-accounts/index.js +1 -1
  648. package/resources/sub-accounts/index.js.map +1 -1
  649. package/resources/sub-accounts/index.mjs +1 -1
  650. package/resources/sub-accounts/index.mjs.map +1 -1
  651. package/resources/sub-accounts/sub-accounts.d.mts +33 -125
  652. package/resources/sub-accounts/sub-accounts.d.mts.map +1 -1
  653. package/resources/sub-accounts/sub-accounts.d.ts +33 -125
  654. package/resources/sub-accounts/sub-accounts.d.ts.map +1 -1
  655. package/resources/sub-accounts/sub-accounts.js +20 -33
  656. package/resources/sub-accounts/sub-accounts.js.map +1 -1
  657. package/resources/sub-accounts/sub-accounts.mjs +20 -33
  658. package/resources/sub-accounts/sub-accounts.mjs.map +1 -1
  659. package/resources/sub-accounts.js +1 -1
  660. package/resources/sub-accounts.js.map +1 -1
  661. package/resources/sub-accounts.mjs +1 -1
  662. package/resources/sub-accounts.mjs.map +1 -1
  663. package/resources/templates.d.mts +46 -302
  664. package/resources/templates.d.mts.map +1 -1
  665. package/resources/templates.d.ts +46 -302
  666. package/resources/templates.d.ts.map +1 -1
  667. package/resources/templates.js +34 -51
  668. package/resources/templates.js.map +1 -1
  669. package/resources/templates.mjs +34 -51
  670. package/resources/templates.mjs.map +1 -1
  671. package/resources/urls.d.mts +27 -78
  672. package/resources/urls.d.mts.map +1 -1
  673. package/resources/urls.d.ts +27 -78
  674. package/resources/urls.d.ts.map +1 -1
  675. package/resources/urls.js +18 -28
  676. package/resources/urls.js.map +1 -1
  677. package/resources/urls.mjs +18 -28
  678. package/resources/urls.mjs.map +1 -1
  679. package/resources.d.mts.map +1 -1
  680. package/resources.d.ts.map +1 -1
  681. package/resources.js +1 -0
  682. package/resources.js.map +1 -1
  683. package/resources.mjs +1 -0
  684. package/resources.mjs.map +1 -1
  685. package/src/client.ts +273 -233
  686. package/src/core/api-promise.ts +0 -2
  687. package/src/core/error.ts +0 -2
  688. package/src/core/pagination.ts +0 -2
  689. package/src/core/resource.ts +0 -2
  690. package/src/index.ts +0 -2
  691. package/src/internal/builtin-types.ts +0 -2
  692. package/src/internal/detect-platform.ts +0 -2
  693. package/src/internal/errors.ts +0 -2
  694. package/src/internal/headers.ts +0 -2
  695. package/src/internal/parse.ts +0 -2
  696. package/src/internal/qs/LICENSE.md +13 -0
  697. package/src/internal/qs/README.md +3 -0
  698. package/src/internal/qs/formats.ts +10 -0
  699. package/src/internal/qs/index.ts +13 -0
  700. package/src/internal/qs/stringify.ts +385 -0
  701. package/src/internal/qs/types.ts +71 -0
  702. package/src/internal/qs/utils.ts +265 -0
  703. package/src/internal/request-options.ts +0 -2
  704. package/src/internal/shim-types.ts +0 -2
  705. package/src/internal/shims.ts +0 -2
  706. package/src/internal/types.ts +0 -2
  707. package/src/internal/utils/base64.ts +0 -2
  708. package/src/internal/utils/env.ts +0 -2
  709. package/src/internal/utils/log.ts +0 -2
  710. package/src/internal/utils/query.ts +2 -20
  711. package/src/internal/utils/sleep.ts +0 -2
  712. package/src/internal/utils/uuid.ts +0 -2
  713. package/src/internal/utils/values.ts +0 -2
  714. package/src/internal/utils.ts +0 -2
  715. package/src/resources/addresses.ts +28 -97
  716. package/src/resources/agent-templates.ts +18 -89
  717. package/src/resources/agents/agents.ts +58 -472
  718. package/src/resources/agents/index.ts +1 -1
  719. package/src/resources/agents/senders.ts +11 -33
  720. package/src/resources/agents.ts +1 -1
  721. package/src/resources/balance.ts +7 -24
  722. package/src/resources/broadcasts/broadcasts.ts +97 -490
  723. package/src/resources/broadcasts/contacts.ts +20 -114
  724. package/src/resources/broadcasts/index.ts +1 -1
  725. package/src/resources/broadcasts.ts +1 -1
  726. package/src/resources/calls.ts +41 -551
  727. package/src/resources/contacts/channels.ts +21 -104
  728. package/src/resources/contacts/contacts.ts +41 -273
  729. package/src/resources/contacts/index.ts +1 -1
  730. package/src/resources/contacts.ts +1 -1
  731. package/src/resources/conversations.ts +33 -387
  732. package/src/resources/email-domains.ts +26 -253
  733. package/src/resources/functions/functions.ts +83 -669
  734. package/src/resources/functions/git-link.ts +26 -301
  735. package/src/resources/functions/index.ts +1 -1
  736. package/src/resources/functions/secrets.ts +16 -55
  737. package/src/resources/functions/triggers.ts +15 -149
  738. package/src/resources/functions.ts +1 -1
  739. package/src/resources/index.ts +21 -1
  740. package/src/resources/introspect.ts +16 -136
  741. package/src/resources/invitations/webhook.ts +93 -0
  742. package/src/resources/invitations.ts +45 -201
  743. package/src/resources/me.ts +10 -28
  744. package/src/resources/memory/collections/collections.ts +149 -0
  745. package/src/resources/memory/collections/index.ts +30 -0
  746. package/src/resources/memory/collections/items.ts +185 -0
  747. package/src/resources/memory/collections.ts +3 -0
  748. package/src/resources/memory/index.ts +34 -0
  749. package/src/resources/memory/memory.ts +211 -0
  750. package/src/resources/memory.ts +3 -0
  751. package/src/resources/messages.ts +119 -678
  752. package/src/resources/number-10dlc/brands.ts +45 -268
  753. package/src/resources/number-10dlc/campaigns/campaigns.ts +47 -246
  754. package/src/resources/number-10dlc/campaigns/index.ts +1 -1
  755. package/src/resources/number-10dlc/campaigns/phone-numbers.ts +31 -64
  756. package/src/resources/number-10dlc/campaigns.ts +1 -1
  757. package/src/resources/number-10dlc/index.ts +1 -1
  758. package/src/resources/number-10dlc/number-10dlc.ts +23 -29
  759. package/src/resources/number-10dlc.ts +1 -1
  760. package/src/resources/phone-numbers.ts +96 -275
  761. package/src/resources/regulatory-documents.ts +25 -106
  762. package/src/resources/senders/agent/agent.ts +91 -662
  763. package/src/resources/senders/agent/executions.ts +14 -35
  764. package/src/resources/senders/agent/flows.ts +35 -213
  765. package/src/resources/senders/agent/index.ts +1 -1
  766. package/src/resources/senders/agent/knowledge-bases/documents.ts +28 -114
  767. package/src/resources/senders/agent/knowledge-bases/index.ts +1 -1
  768. package/src/resources/senders/agent/knowledge-bases/knowledge-bases.ts +42 -143
  769. package/src/resources/senders/agent/knowledge-bases.ts +1 -1
  770. package/src/resources/senders/agent/tools/index.ts +1 -1
  771. package/src/resources/senders/agent/tools/tools.ts +48 -318
  772. package/src/resources/senders/agent/tools/webhook.ts +7 -13
  773. package/src/resources/senders/agent/tools.ts +1 -1
  774. package/src/resources/senders/agent.ts +1 -1
  775. package/src/resources/senders/channels.ts +95 -0
  776. package/src/resources/senders/index.ts +11 -1
  777. package/src/resources/senders/senders.ts +86 -634
  778. package/src/resources/senders/telegram.ts +11 -29
  779. package/src/resources/senders/whatsapp-sync.ts +17 -115
  780. package/src/resources/senders.ts +1 -1
  781. package/src/resources/sub-accounts/api-keys.ts +17 -73
  782. package/src/resources/sub-accounts/index.ts +1 -1
  783. package/src/resources/sub-accounts/sub-accounts.ts +38 -147
  784. package/src/resources/sub-accounts.ts +1 -1
  785. package/src/resources/templates.ts +47 -358
  786. package/src/resources/urls.ts +28 -86
  787. package/src/resources.ts +2 -0
  788. package/src/types.ts +5464 -0
  789. package/src/version.ts +3 -1
  790. package/types.d.mts +4901 -0
  791. package/types.d.mts.map +1 -0
  792. package/types.d.ts +4901 -0
  793. package/types.d.ts.map +1 -0
  794. package/types.js +4 -0
  795. package/types.js.map +1 -0
  796. package/types.mjs +3 -0
  797. package/types.mjs.map +1 -0
  798. package/version.d.mts +1 -1
  799. package/version.d.mts.map +1 -1
  800. package/version.d.ts +1 -1
  801. package/version.d.ts.map +1 -1
  802. package/version.js +2 -1
  803. package/version.js.map +1 -1
  804. package/version.mjs +2 -1
  805. package/version.mjs.map +1 -1
  806. package/src/lib/.keep +0 -4
@@ -1,37 +1,29 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
1
+ // Generated by zavu-codegen from apps/docs/openapi.json. Do not edit: run `bun run codegen`.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import { APIPromise } from '../core/api-promise';
5
- import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
5
+ import { Cursor, PagePromise } from '../core/pagination';
6
6
  import { buildHeaders } from '../internal/headers';
7
7
  import { RequestOptions } from '../internal/request-options';
8
8
  import { path } from '../internal/utils/path';
9
+ import type * as T from '../types';
9
10
 
10
11
  export class Messages extends APIResource {
11
12
  /**
12
13
  * Get message by ID
13
14
  *
14
- * @example
15
- * ```ts
16
- * const messageResponse = await client.messages.retrieve(
17
- * 'messageId',
18
- * );
19
- * ```
15
+ * `GET /v1/messages/{messageId}`
20
16
  */
21
17
  retrieve(messageID: string, options?: RequestOptions): APIPromise<MessageResponse> {
22
18
  return this._client.get(path`/v1/messages/${messageID}`, options);
23
19
  }
24
20
 
25
21
  /**
22
+ * List messages
23
+ *
26
24
  * List messages previously sent by this project.
27
25
  *
28
- * @example
29
- * ```ts
30
- * // Automatically fetches more pages as needed.
31
- * for await (const message of client.messages.list()) {
32
- * // ...
33
- * }
34
- * ```
26
+ * `GET /v1/messages`
35
27
  */
36
28
  list(
37
29
  query: MessageListParams | null | undefined = {},
@@ -41,6 +33,8 @@ export class Messages extends APIResource {
41
33
  }
42
34
 
43
35
  /**
36
+ * List message attachments
37
+ *
44
38
  * List the stored file attachments for an email message and get a short-lived
45
39
  * signed `downloadUrl` for each. Works for both inbound emails (received via
46
40
  * `message.inbound`) and outbound emails you sent with attachments. Messages
@@ -48,28 +42,19 @@ export class Messages extends APIResource {
48
42
  * an empty list. Each `downloadUrl` is generated fresh per request and expires —
49
43
  * fetch the file promptly and do not cache the URL.
50
44
  *
51
- * @example
52
- * ```ts
53
- * const response = await client.messages.listAttachments(
54
- * 'messageId',
55
- * );
56
- * ```
45
+ * `GET /v1/messages/{messageId}/attachments`
57
46
  */
58
47
  listAttachments(messageID: string, options?: RequestOptions): APIPromise<MessageListAttachmentsResponse> {
59
48
  return this._client.get(path`/v1/messages/${messageID}/attachments`, options);
60
49
  }
61
50
 
62
51
  /**
52
+ * Send reaction to message
53
+ *
63
54
  * Send an emoji reaction to an existing WhatsApp message. Reactions are only
64
55
  * supported for WhatsApp messages.
65
56
  *
66
- * @example
67
- * ```ts
68
- * const messageResponse = await client.messages.react(
69
- * 'messageId',
70
- * { emoji: '👍' },
71
- * );
72
- * ```
57
+ * `POST /v1/messages/{messageId}/reactions`
73
58
  */
74
59
  react(
75
60
  messageID: string,
@@ -88,51 +73,110 @@ export class Messages extends APIResource {
88
73
  }
89
74
 
90
75
  /**
76
+ * Send a message
77
+ *
91
78
  * Send a message to a recipient via SMS or WhatsApp.
92
79
  *
93
80
  * **Channel selection:**
94
- *
95
81
  * - If `channel` is omitted and `messageType` is `text`, defaults to SMS
96
82
  * - If `messageType` is anything other than `text`, WhatsApp is used automatically
97
83
  *
98
84
  * **WhatsApp 24-hour window:**
99
- *
100
85
  * - Free-form messages (non-template) require an open 24h window
101
86
  * - Window opens when the user messages you first
102
87
  * - Use template messages to initiate conversations outside the window
103
88
  *
104
89
  * **Plan allowances and email billing:**
105
- *
106
90
  * - WhatsApp, Telegram, Instagram and Messenger share an allowance of 2,000
107
- * messages per month on Free. Over it, sends return 429 with code
108
- * `a2p_limit_exceeded` and upgrade details; the counter resets on the 1st of
109
- * each month. Paid plans have no message caps
91
+ * messages per month on Free. **It counts messages in both directions**: a
92
+ * message a contact sends you consumes one unit exactly as a message you send
93
+ * them does, so a project that has sent 300 and received 1,700 has used the
94
+ * whole allowance. Messages you send from the WhatsApp Business App on your own
95
+ * phone under coexistence are mirrored into your inbox but never counted, and
96
+ * neither are failed sends. Over the allowance, sends return 429 with code
97
+ * `a2p_limit_exceeded` and upgrade details, **and inbound messages on those
98
+ * channels are refused as well**: not stored, not shown in the inbox, and no
99
+ * `message.inbound` webhook, and not delivered later when the month resets. The
100
+ * counter resets on the 1st of each month. Paid plans have no message caps
110
101
  * - Email is billed from your prepaid balance in 1,000-message blocks: $0.40 per
111
102
  * 1,000 transactional emails, $0.80 per 1,000 marketing (broadcast) emails. A
112
103
  * block is charged when your monthly count crosses each 1,000 boundary, and at
113
104
  * zero balance email sends return 402 with code `insufficient_balance`. Free
114
105
  * teams start with $2 of credit and additionally cap at 3,000 emails/month and
115
- * 100/day. Teams on earlier plans keep their original email quotas instead
106
+ * 100/day. Email broadcasts (marketing email) need a paid plan: Free cannot send
107
+ * them, see `POST /v1/broadcasts/{broadcastId}/send`. Teams on earlier plans
108
+ * keep their original email quotas instead
116
109
  * - SMS and voice are billed per message from your balance on every plan
117
110
  *
118
- * **Email recipient pre-flight:** Email messages are validated automatically
119
- * before dispatch. Sends that would be a guaranteed hard bounce are failed instead
120
- * of sent, protecting your bounce rate: the message transitions to `failed`
121
- * (visible via `GET /v1/messages/{messageId}` and the `message.failed` webhook)
122
- * with `errorCode` set to `EMAIL_INVALID_RECIPIENT` (malformed address),
123
- * `EMAIL_DOMAIN_NOT_FOUND` (recipient domain has no MX or A records), or
124
- * `EMAIL_RECIPIENT_SUPPRESSED` (address is on your suppression list after a
125
- * previous bounce or complaint). Advisory signals (role addresses, disposable
126
- * domains) do not block sends — check them beforehand with
127
- * `POST /v1/introspect/email`.
111
+ * **Daily limits:**
112
+ * - An account sends on every channel from its first minute, to any destination.
113
+ * Verification is not a permission to send: identity verification and business
114
+ * verification (KYB) raise the ceilings below. That includes `sms_oneway`: it
115
+ * sends without verification, within the SMS ceiling, and every message passes
116
+ * the risk review below. KYB is still required to register a 10DLC brand and
117
+ * campaign, which every US and Canadian (+1) SMS destination needs — a carrier
118
+ * rule, answered separately with `403 ten_dlc_required`
119
+ * - Daily ceilings apply per channel group and rise with verification. An account
120
+ * that has verified nothing: 25/day across `sms` + `sms_oneway`, 5/day for
121
+ * `voice`, 100/day across WhatsApp, Telegram, Instagram and Messenger combined.
122
+ * Past that floor: 200/day for SMS, or 10,000/day once identity or business
123
+ * verification is approved (or a higher limit agreed for your account); 50/day
124
+ * voice and 250/day conversational on Free. **Paid plans have no voice or
125
+ * conversational daily ceiling.** Over a ceiling, sends return `429` with code
126
+ * `daily_limit_exceeded` and `details.limit`; the count resets at 00:00 UTC
127
+ * - The daily ceiling never reduces the monthly allowance: 100/day on the
128
+ * conversational group still reaches the 2,000 monthly A2P messages Free
129
+ * includes
130
+ * - Email: a sender with a verified domain sends from day one, within the plan
131
+ * quota (100/day and 3,000/month on Free). Over the daily quota it returns `429`
132
+ * with code `daily_limit_exceeded`
133
+ * - Every plan, paid ones included, also has a rolling email ceiling by account
134
+ * age: 200 per hour and 1,000 per 24 hours for the first 7 days, 1,000 per hour
135
+ * and 10,000 per 24 hours until day 30, then 5,000 per hour and 50,000 per 24
136
+ * hours. Past it the request is accepted and the message then fails with
137
+ * `errorCode` `EMAIL_RATE_LIMIT_HOURLY` or `EMAIL_RATE_LIMIT_DAILY`, visible on
138
+ * `GET /v1/messages/{messageId}` and the `message.failed` webhook. It does not
139
+ * reset at 00:00 UTC: it counts the last hour and the last 24 hours
140
+ * - Full reference: https://docs.zavu.dev/concepts/sending-limits
141
+ *
142
+ * **Risk review:**
143
+ * Every outbound `sms`, `sms_oneway`, `email` and `voice` message is read before
144
+ * it is sent — the content, and how this account has been sending. What is
145
+ * checked is the message, not who you are.
146
+ * - A message can be **held** for a short review. It stays `queued` while it
147
+ * waits: no new status exists for this, and `MessageStatus` is unchanged. When
148
+ * it is approved it sends normally.
149
+ * - A message that is not approved moves to `failed` and fires `message.failed`.
150
+ * `errorCode` says which happened: `RISK_REJECTED` (a reviewer refused it),
151
+ * `RISK_REVIEW_EXPIRED` (the review window closed first — it is a couple of
152
+ * hours, because a code that arrives late is worse than one that does not
153
+ * arrive), or `RISK_BLOCKED` (refused outright, without a hold). An SMS that
154
+ * fails this way is not charged; the prepaid amount is returned.
155
+ * - A call is never held. `POST /v1/calls` fails a call the review stops rather
156
+ * than placing it hours late.
157
+ * - A message whose content cannot be read — the check is briefly unavailable
158
+ * — is held rather than sent. An account with an approved business
159
+ * verification is unaffected, and so is one that has verified something, already
160
+ * sends real traffic, and has a clean recent record.
161
+ * - Repeated refusals suspend an account's sending. While it is suspended every
162
+ * send is refused with `403` and code `sending_suspended`,
163
+ * `details.dashboardUrl` points at support, and a message already queued fails
164
+ * with `errorCode` `SENDING_SUSPENDED`.
165
+ * - A broadcast is read once, on the broadcast itself, rather than per recipient
166
+ * — see `POST /v1/broadcasts/{broadcastId}/send`.
128
167
  *
129
- * @example
130
- * ```ts
131
- * const messageResponse = await client.messages.send({
132
- * to: '+56912345678',
133
- * text: 'Your verification code is 123456',
134
- * });
135
- * ```
168
+ * **Email recipient pre-flight:**
169
+ * Email messages are validated automatically before dispatch. Sends that would be
170
+ * a guaranteed hard bounce are failed instead of sent, protecting your bounce
171
+ * rate: the message transitions to `failed` (visible via `GET
172
+ * /v1/messages/{messageId}` and the `message.failed` webhook) with `errorCode` set
173
+ * to `EMAIL_INVALID_RECIPIENT` (malformed address), `EMAIL_DOMAIN_NOT_FOUND`
174
+ * (recipient domain has no MX or A records), or `EMAIL_RECIPIENT_SUPPRESSED`
175
+ * (address is on your suppression list after a previous bounce or complaint).
176
+ * Advisory signals (role addresses, disposable domains) do not block sends —
177
+ * check them beforehand with `POST /v1/introspect/email`.
178
+ *
179
+ * `POST /v1/messages`
136
180
  */
137
181
  send(params: MessageSendParams, options?: RequestOptions): APIPromise<MessageResponse> {
138
182
  const { 'Zavu-Sender': zavuSender, ...body } = params;
@@ -147,18 +191,15 @@ export class Messages extends APIResource {
147
191
  }
148
192
 
149
193
  /**
194
+ * Show typing indicator
195
+ *
150
196
  * Mark an inbound WhatsApp message as read and display a typing indicator to the
151
197
  * user while you prepare a response. The indicator is automatically dismissed when
152
198
  * you send a reply, or after 25 seconds — whichever comes first. Only valid for
153
199
  * inbound WhatsApp messages. Use this when a reply will take more than a couple of
154
200
  * seconds (LLM agent, tool call, lookup) to improve the recipient's experience.
155
201
  *
156
- * @example
157
- * ```ts
158
- * const response = await client.messages.showTyping(
159
- * 'messageId',
160
- * );
161
- * ```
202
+ * `POST /v1/messages/{messageId}/typing`
162
203
  */
163
204
  showTyping(
164
205
  messageID: string,
@@ -176,646 +217,46 @@ export class Messages extends APIResource {
176
217
  }
177
218
  }
178
219
 
179
- export type MessagesCursor = Cursor<Message>;
180
-
181
- /**
182
- * Delivery channel. Use 'auto' for intelligent routing.
183
- */
184
- export type Channel =
185
- | 'auto'
186
- | 'sms'
187
- | 'sms_oneway'
188
- | 'whatsapp'
189
- | 'telegram'
190
- | 'email'
191
- | 'instagram'
192
- | 'messenger'
193
- | 'voice';
194
-
195
- export interface Message {
196
- id: string;
197
-
198
- /**
199
- * Delivery channel. Use 'auto' for intelligent routing.
200
- */
201
- channel: Channel;
202
-
203
- createdAt: string;
204
-
205
- /**
206
- * Type of message. Non-text types are supported by WhatsApp and Telegram (varies
207
- * by type).
208
- *
209
- * `location_request` asks the recipient to share their location and is
210
- * WhatsApp-only. It takes no `content` object — the prompt goes in `text` (max
211
- * 1024 characters) and the button label is fixed by WhatsApp. The recipient's
212
- * answer arrives as an inbound `location` message whose `content.replyToMessageId`
213
- * is the ID of the request.
214
- *
215
- * `request_contact_info` asks the recipient to share their phone number and is
216
- * WhatsApp-only. Like `location_request` it takes no `content` object — the prompt
217
- * goes in `text` (max 1024 characters) and WhatsApp renders a fixed **Share
218
- * Contact Info** button. The answer arrives as an inbound `contact` message. Use
219
- * it to recover the phone number of a contact who adopted a WhatsApp username and
220
- * is only known by their business-scoped user ID (BSUID); when they share it, Zavu
221
- * automatically links the phone number to that contact.
222
- */
223
- messageType: MessageType;
224
-
225
- status: MessageStatus;
226
-
227
- to: string;
228
-
229
- /**
230
- * Content for non-text message types (WhatsApp and Telegram).
231
- */
232
- content?: MessageContent;
233
-
234
- /**
235
- * ID of the conversation (inbox thread) this message belongs to. Use it to build a
236
- * direct dashboard link:
237
- * `https://dashboard.zavu.dev/{locale}/inbox?conv={conversationId}`. Omitted only
238
- * on legacy messages created before conversation threading.
239
- */
240
- conversationId?: string;
241
-
242
- /**
243
- * Zavu platform charge in USD for this message. Messaging is billed against your
244
- * plan's monthly limits plus usage-based overage.
245
- */
246
- cost?: number | null;
247
-
248
- /**
249
- * Carrier and delivery cost in USD.
250
- */
251
- costProvider?: number | null;
252
-
253
- /**
254
- * Total cost in USD (platform charge + delivery cost).
255
- */
256
- costTotal?: number | null;
257
-
258
- errorCode?: string | null;
259
-
260
- errorMessage?: string | null;
261
-
262
- from?: string;
263
-
264
- metadata?: { [key: string]: string };
265
-
266
- /**
267
- * Message ID from the delivery provider.
268
- */
269
- providerMessageId?: string;
270
-
271
- senderId?: string;
272
-
273
- /**
274
- * Text content or caption.
275
- */
276
- text?: string;
277
-
278
- updatedAt?: string;
279
- }
280
-
281
- /**
282
- * Content for non-text message types (WhatsApp and Telegram).
283
- */
284
- export interface MessageContent {
285
- /**
286
- * Interactive buttons (max 3).
287
- */
288
- buttons?: Array<MessageContent.Button>;
289
-
290
- /**
291
- * Contact cards for contact messages.
292
- */
293
- contacts?: Array<MessageContent.Contact>;
294
-
295
- /**
296
- * Button label for cta_url messages.
297
- */
298
- ctaDisplayText?: string;
299
-
300
- /**
301
- * Public HTTPS URL of the header media when ctaHeaderType is 'image', 'video', or
302
- * 'document'. WhatsApp fetches this URL — it must be publicly reachable and return
303
- * the declared content type.
304
- */
305
- ctaHeaderMediaUrl?: string;
306
-
307
- /**
308
- * Header text when ctaHeaderType is 'text'.
309
- */
310
- ctaHeaderText?: string;
311
-
312
- /**
313
- * Optional header type for cta_url messages.
314
- */
315
- ctaHeaderType?: 'text' | 'image' | 'video' | 'document';
316
-
317
- /**
318
- * Destination URL opened in the device's default browser when the button is
319
- * tapped. Used with messageType=cta_url. WhatsApp requires HTTPS in production.
320
- */
321
- ctaUrl?: string;
322
-
323
- /**
324
- * Emoji for reaction messages.
325
- */
326
- emoji?: string;
327
-
328
- /**
329
- * Filename for documents.
330
- */
331
- filename?: string;
332
-
333
- /**
334
- * Optional footer text for cta_url messages.
335
- */
336
- footerText?: string;
337
-
338
- /**
339
- * Latitude for location messages.
340
- */
341
- latitude?: number;
342
-
343
- /**
344
- * Button text for list messages.
345
- */
346
- listButton?: string;
347
-
348
- /**
349
- * Address of the location.
350
- */
351
- locationAddress?: string;
352
-
353
- /**
354
- * Name of the location.
355
- */
356
- locationName?: string;
357
-
358
- /**
359
- * Longitude for location messages.
360
- */
361
- longitude?: number;
362
-
363
- /**
364
- * WhatsApp media ID if already uploaded.
365
- */
366
- mediaId?: string;
367
-
368
- /**
369
- * URL of the media file (for image, video, audio, document, sticker).
370
- */
371
- mediaUrl?: string;
372
-
373
- /**
374
- * MIME type of the media.
375
- */
376
- mimeType?: string;
377
-
378
- /**
379
- * Message ID to react to.
380
- */
381
- reactToMessageId?: string;
382
-
383
- /**
384
- * Click-to-WhatsApp (CTWA) ad attribution: where an inbound conversation came
385
- * from.
386
- *
387
- * WhatsApp only. Present on the **first inbound message** of a conversation opened
388
- * from a Meta ad or post, and on no message after it — so store it when it arrives
389
- * rather than expecting it again. Organic conversations never carry it.
390
- *
391
- * Field names are camelCased to match the rest of this API; Meta sends them as
392
- * snake_case (`ctwa_clid`, `source_id`, ...). Fields that do not apply are
393
- * omitted: a `post` source has no click id, and an image ad has no `videoUrl`.
394
- */
395
- referral?: MessageContent.Referral;
396
-
397
- /**
398
- * Sender of the quoted message (phone number in E.164 format).
399
- */
400
- replyToFrom?: string;
401
-
402
- /**
403
- * Zavu message ID of the quoted message this message replies to. Present on
404
- * inbound messages that quote an earlier message. Omitted when the quoted message
405
- * is not found in Zavu (e.g. an old or unknown message) — use
406
- * replyToProviderMessageId in that case.
407
- */
408
- replyToMessageId?: string;
409
-
410
- /**
411
- * Type of the quoted message (text, image, video, etc.).
412
- */
413
- replyToMessageType?: string;
414
-
415
- /**
416
- * Provider message ID (WhatsApp WAMID) of the quoted message. Present whenever an
417
- * inbound message is a reply, even if the quoted message is not stored in Zavu.
418
- */
419
- replyToProviderMessageId?: string;
420
-
421
- /**
422
- * Truncated snippet of the quoted message's text, for display. Empty when the
423
- * quoted message has no text (e.g. media).
424
- */
425
- replyToText?: string;
426
-
427
- /**
428
- * Sections for list messages.
429
- */
430
- sections?: Array<MessageContent.Section>;
431
-
432
- /**
433
- * Variables for dynamic button placeholders (URL buttons and OTP buttons). Keys
434
- * are the button index (0, 1, 2) in the template's `buttons` array — not the
435
- * placeholder name. Values substitute the `{{1}}` placeholder inside that button's
436
- * URL.
437
- *
438
- * **WhatsApp constraints:**
439
- *
440
- * - URL buttons only accept `{{1}}` — positional, numeric, no whitespace, no name.
441
- * Named placeholders like `{{token}}` are stored as literal URL text by Meta and
442
- * cannot be substituted.
443
- * - At most one placeholder per URL button.
444
- * - A template may have at most three buttons.
445
- * - Static URL buttons (no placeholder) and `quick_reply` buttons are not included
446
- * here.
447
- */
448
- templateButtonVariables?: { [key: string]: string };
449
-
450
- /**
451
- * Value for a text-header variable, keyed by `1` (WhatsApp text headers allow at
452
- * most one variable). Optional override. If omitted, Zavu resolves the header from
453
- * `templateVariables` using the header placeholder's name (e.g. `novios`). Static
454
- * text headers need no value.
455
- */
456
- templateHeaderVariables?: { [key: string]: string };
220
+ export type MessagesCursor = Cursor<T.Message>;
457
221
 
458
- /**
459
- * Template ID for template messages.
460
- */
461
- templateId?: string;
222
+ export type Channel = T.Channel;
462
223
 
463
- /**
464
- * Variables for body placeholders. Key them to match the template body: by
465
- * position (`1`, `2`, ...) for positional templates, or by name (e.g.
466
- * `customer_name`) for named templates. Zavu detects the template's format and
467
- * sends the correct payload to Meta. Named keys also resolve a named text-header
468
- * variable. Do not mix positional and named keys in the same request.
469
- */
470
- templateVariables?: { [key: string]: string };
471
- }
224
+ export type Message = T.Message;
472
225
 
226
+ export type MessageContent = T.MessageContent;
473
227
  export namespace MessageContent {
474
- export interface Button {
475
- id: string;
476
-
477
- title: string;
478
- }
479
-
480
- export interface Contact {
481
- name?: string;
482
-
483
- phones?: Array<string>;
484
- }
485
-
486
- /**
487
- * Click-to-WhatsApp (CTWA) ad attribution: where an inbound conversation came
488
- * from.
489
- *
490
- * WhatsApp only. Present on the **first inbound message** of a conversation opened
491
- * from a Meta ad or post, and on no message after it — so store it when it arrives
492
- * rather than expecting it again. Organic conversations never carry it.
493
- *
494
- * Field names are camelCased to match the rest of this API; Meta sends them as
495
- * snake_case (`ctwa_clid`, `source_id`, ...). Fields that do not apply are
496
- * omitted: a `post` source has no click id, and an image ad has no `videoUrl`.
497
- */
498
- export interface Referral {
499
- /**
500
- * Body copy of the ad or post.
501
- */
502
- body?: string;
503
-
504
- /**
505
- * Click-to-WhatsApp click identifier. This is the value Meta's Conversions API
506
- * needs to credit a conversion back to the ad that produced the conversation.
507
- * Present on `ad` sources; a `post` source has none.
508
- */
509
- ctwaClid?: string;
510
-
511
- /**
512
- * Headline of the ad or post.
513
- */
514
- headline?: string;
515
-
516
- /**
517
- * Image of the ad. Present when `mediaType` is `image`.
518
- */
519
- imageUrl?: string;
520
-
521
- /**
522
- * Type of media on the ad, when it had any.
523
- */
524
- mediaType?: 'image' | 'video';
525
-
526
- /**
527
- * Identifier of the ad or post that produced the click.
528
- */
529
- sourceId?: string;
530
-
531
- /**
532
- * Where the click came from.
533
- */
534
- sourceType?: 'ad' | 'post';
535
-
536
- /**
537
- * Meta permalink to the ad or post.
538
- */
539
- sourceUrl?: string;
540
-
541
- /**
542
- * Thumbnail of the ad media.
543
- */
544
- thumbnailUrl?: string;
545
-
546
- /**
547
- * Video of the ad. Present when `mediaType` is `video`.
548
- */
549
- videoUrl?: string;
550
- }
551
-
552
- export interface Section {
553
- rows: Array<Section.Row>;
554
-
555
- title: string;
556
- }
557
-
228
+ export type Button = T.MessageContentButtonsItem;
229
+ export type Contact = T.MessageContentContactsItem;
230
+ export type Referral = T.AdReferral;
231
+ export type Section = T.MessageContentSectionsItem;
558
232
  export namespace Section {
559
- export interface Row {
560
- id: string;
561
-
562
- title: string;
563
-
564
- description?: string;
565
- }
233
+ export type Row = T.MessageContentSectionsItemRowsItem;
566
234
  }
567
235
  }
568
236
 
569
- export interface MessageResponse {
570
- message: Message;
571
- }
572
-
573
- export type MessageStatus =
574
- | 'queued'
575
- | 'sending'
576
- | 'sent'
577
- | 'delivered'
578
- | 'read'
579
- | 'failed'
580
- | 'received'
581
- | 'pending_url_verification';
237
+ export type MessageResponse = T.MessageResponse;
582
238
 
583
- /**
584
- * Type of message. Non-text types are supported by WhatsApp and Telegram (varies
585
- * by type).
586
- *
587
- * `location_request` asks the recipient to share their location and is
588
- * WhatsApp-only. It takes no `content` object — the prompt goes in `text` (max
589
- * 1024 characters) and the button label is fixed by WhatsApp. The recipient's
590
- * answer arrives as an inbound `location` message whose `content.replyToMessageId`
591
- * is the ID of the request.
592
- *
593
- * `request_contact_info` asks the recipient to share their phone number and is
594
- * WhatsApp-only. Like `location_request` it takes no `content` object — the prompt
595
- * goes in `text` (max 1024 characters) and WhatsApp renders a fixed **Share
596
- * Contact Info** button. The answer arrives as an inbound `contact` message. Use
597
- * it to recover the phone number of a contact who adopted a WhatsApp username and
598
- * is only known by their business-scoped user ID (BSUID); when they share it, Zavu
599
- * automatically links the phone number to that contact.
600
- */
601
- export type MessageType =
602
- | 'text'
603
- | 'image'
604
- | 'video'
605
- | 'audio'
606
- | 'document'
607
- | 'sticker'
608
- | 'location'
609
- | 'contact'
610
- | 'buttons'
611
- | 'list'
612
- | 'cta_url'
613
- | 'request_contact_info'
614
- | 'location_request'
615
- | 'reaction'
616
- | 'template';
239
+ export type MessageStatus = T.MessageStatus;
617
240
 
618
- export interface MessageListAttachmentsResponse {
619
- items: Array<MessageListAttachmentsResponse.Item>;
620
- }
241
+ export type MessageType = T.MessageType;
621
242
 
243
+ export type MessageListAttachmentsResponse = T.MessageAttachmentsResponse;
622
244
  export namespace MessageListAttachmentsResponse {
623
- /**
624
- * A stored file attachment for an email message (inbound or outbound).
625
- */
626
- export interface Item {
627
- id: string;
628
-
629
- /**
630
- * Content-ID for inline attachments (referenced in the HTML body as
631
- * `cid:<contentId>`). Null for regular attachments.
632
- */
633
- contentId: string | null;
634
-
635
- createdAt: string;
636
-
637
- /**
638
- * Short-lived signed URL to download the attachment bytes. Freshly generated on
639
- * each request and expires; do not cache it. Null if the stored file is no longer
640
- * available.
641
- */
642
- downloadUrl: string | null;
643
-
644
- filename: string;
645
-
646
- /**
647
- * Whether the attachment is inline (embedded in the HTML body) rather than a
648
- * regular attachment.
649
- */
650
- isInline: boolean;
651
-
652
- /**
653
- * MIME type of the attachment.
654
- */
655
- mimeType: string;
656
-
657
- /**
658
- * Size of the attachment in bytes.
659
- */
660
- size: number;
661
- }
245
+ export type Item = T.MessageAttachment;
662
246
  }
663
247
 
664
- export interface MessageShowTypingResponse {
665
- success: boolean;
666
- }
248
+ export type MessageShowTypingResponse = T.ShowTypingIndicatorResponse;
667
249
 
668
- export interface MessageListParams extends CursorParams {
669
- /**
670
- * Filter by delivery channel.
671
- */
672
- channel?: 'sms' | 'sms_oneway' | 'whatsapp' | 'email' | 'telegram' | 'instagram' | 'messenger' | 'voice';
250
+ export type MessageListParams = T.MessagesListParams;
673
251
 
674
- /**
675
- * Filter by status. Not all stored statuses are filterable.
676
- */
677
- status?: 'queued' | 'sending' | 'sent' | 'delivered' | 'failed' | 'received';
678
-
679
- to?: string;
680
- }
681
-
682
- export interface MessageReactParams {
683
- /**
684
- * Body param: Single emoji character to react with.
685
- */
686
- emoji: string;
687
-
688
- /**
689
- * Header param: Optional sender profile ID. If omitted, the project's default
690
- * sender will be used.
691
- */
692
- 'Zavu-Sender'?: string;
693
- }
694
-
695
- export interface MessageSendParams {
696
- /**
697
- * Body param: Recipient phone number in E.164 format, email address, WhatsApp
698
- * business-scoped user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat
699
- * ID (for Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent
700
- * via the `recipient` field; use it to message a contact who adopted a username
701
- * and whose phone number is hidden.
702
- */
703
- to: string;
704
-
705
- /**
706
- * Body param: Email attachments. Only supported when channel is 'email'. Maximum
707
- * 40MB total size.
708
- */
709
- attachments?: Array<MessageSendParams.Attachment>;
710
-
711
- /**
712
- * Body param: Delivery channel. Use 'auto' for intelligent routing. If omitted,
713
- * channel is auto-selected based on sender capabilities and recipient type. For
714
- * email recipients, defaults to 'email'.
715
- */
716
- channel?: Channel;
717
-
718
- /**
719
- * Body param: Additional content for non-text message types.
720
- */
721
- content?: MessageContent;
722
-
723
- /**
724
- * Body param: Whether to enable automatic fallback to SMS if WhatsApp fails.
725
- * Defaults to true.
726
- */
727
- fallbackEnabled?: boolean;
728
-
729
- /**
730
- * Body param: HTML body for email messages. If provided, email will be sent as
731
- * multipart with both text and HTML.
732
- */
733
- htmlBody?: string;
734
-
735
- /**
736
- * Body param: Optional idempotency key to avoid duplicate sends.
737
- */
738
- idempotencyKey?: string;
739
-
740
- /**
741
- * Body param: Type of message. Defaults to 'text'.
742
- */
743
- messageType?: MessageType;
744
-
745
- /**
746
- * Body param: Arbitrary metadata to associate with the message.
747
- */
748
- metadata?: { [key: string]: string };
749
-
750
- /**
751
- * Body param: Reply-To email address for email messages.
752
- */
753
- replyTo?: string;
754
-
755
- /**
756
- * Body param: Email subject line. Required when channel is 'email' or recipient is
757
- * an email address.
758
- */
759
- subject?: string;
760
-
761
- /**
762
- * Body param: Text body for text messages or caption for media messages.
763
- */
764
- text?: string;
765
-
766
- /**
767
- * Body param: Language code for voice text-to-speech (e.g., 'en-US', 'es-ES',
768
- * 'pt-BR'). If omitted, language is auto-detected from recipient's country code.
769
- */
770
- voiceLanguage?: string;
771
-
772
- /**
773
- * Header param: Optional sender profile ID. If omitted, the project's default
774
- * sender will be used.
775
- */
776
- 'Zavu-Sender'?: string;
777
- }
252
+ export type MessageReactParams = T.MessagesReactParams;
778
253
 
254
+ export type MessageSendParams = T.MessagesSendParams;
779
255
  export namespace MessageSendParams {
780
- /**
781
- * Email attachment. Provide either `content` (base64) or `path` (URL), not both.
782
- */
783
- export interface Attachment {
784
- /**
785
- * Name of the attached file.
786
- */
787
- filename: string;
788
-
789
- /**
790
- * Content of the attached file as a Base64-encoded string.
791
- */
792
- content?: string;
793
-
794
- /**
795
- * Content ID for inline images. Reference in HTML as
796
- * `<img src="cid:your_content_id">`.
797
- */
798
- content_id?: string;
799
-
800
- /**
801
- * MIME type of the attachment. If not set, will be derived from the filename.
802
- */
803
- content_type?: string;
804
-
805
- /**
806
- * URL where the attachment file is hosted. The server will fetch the file.
807
- */
808
- path?: string;
809
- }
256
+ export type Attachment = T.EmailAttachmentInput;
810
257
  }
811
258
 
812
- export interface MessageShowTypingParams {
813
- /**
814
- * Optional sender profile ID. If omitted, the project's default sender will be
815
- * used.
816
- */
817
- 'Zavu-Sender'?: string;
818
- }
259
+ export type MessageShowTypingParams = T.MessagesShowTypingParams;
819
260
 
820
261
  export declare namespace Messages {
821
262
  export {