@zavudev/sdk 0.38.0 → 0.44.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 (346) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/api-promise.d.mts +1 -0
  3. package/api-promise.d.mts.map +1 -1
  4. package/api-promise.d.ts +1 -0
  5. package/api-promise.d.ts.map +1 -1
  6. package/api-promise.mjs +1 -0
  7. package/api-promise.mjs.map +1 -1
  8. package/client.d.mts +8 -2
  9. package/client.d.mts.map +1 -1
  10. package/client.d.ts +8 -2
  11. package/client.d.ts.map +1 -1
  12. package/client.js +17 -0
  13. package/client.js.map +1 -1
  14. package/client.mjs +17 -0
  15. package/client.mjs.map +1 -1
  16. package/core/api-promise.d.mts.map +1 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.mjs.map +1 -1
  19. package/core/error.mjs.map +1 -1
  20. package/core/pagination.d.mts.map +1 -1
  21. package/core/pagination.d.ts.map +1 -1
  22. package/core/pagination.mjs.map +1 -1
  23. package/core/resource.d.mts.map +1 -1
  24. package/core/resource.d.ts.map +1 -1
  25. package/core/uploads.d.mts.map +1 -1
  26. package/core/uploads.d.ts.map +1 -1
  27. package/core/uploads.mjs.map +1 -1
  28. package/error.d.mts +1 -0
  29. package/error.d.mts.map +1 -1
  30. package/error.d.ts +1 -0
  31. package/error.d.ts.map +1 -1
  32. package/error.mjs +1 -0
  33. package/error.mjs.map +1 -1
  34. package/index.d.mts.map +1 -1
  35. package/index.d.ts.map +1 -1
  36. package/index.mjs.map +1 -1
  37. package/internal/detect-platform.mjs.map +1 -1
  38. package/internal/headers.mjs.map +1 -1
  39. package/internal/parse.d.mts.map +1 -1
  40. package/internal/parse.d.ts.map +1 -1
  41. package/internal/parse.mjs.map +1 -1
  42. package/internal/request-options.d.mts.map +1 -1
  43. package/internal/request-options.d.ts.map +1 -1
  44. package/internal/shims.d.mts +6 -0
  45. package/internal/shims.d.mts.map +1 -1
  46. package/internal/shims.d.ts +6 -0
  47. package/internal/shims.d.ts.map +1 -1
  48. package/internal/to-file.d.mts.map +1 -1
  49. package/internal/to-file.d.ts.map +1 -1
  50. package/internal/to-file.mjs.map +1 -1
  51. package/internal/types.d.mts +10 -10
  52. package/internal/types.d.mts.map +1 -1
  53. package/internal/types.d.ts +10 -10
  54. package/internal/types.d.ts.map +1 -1
  55. package/internal/uploads.d.mts.map +1 -1
  56. package/internal/uploads.d.ts.map +1 -1
  57. package/internal/uploads.mjs.map +1 -1
  58. package/internal/utils/base64.mjs.map +1 -1
  59. package/internal/utils/log.d.mts.map +1 -1
  60. package/internal/utils/log.d.ts.map +1 -1
  61. package/internal/utils/log.js +2 -0
  62. package/internal/utils/log.js.map +1 -1
  63. package/internal/utils/log.mjs +2 -0
  64. package/internal/utils/log.mjs.map +1 -1
  65. package/internal/utils/path.mjs.map +1 -1
  66. package/internal/utils/query.mjs.map +1 -1
  67. package/internal/utils/values.mjs.map +1 -1
  68. package/internal/utils.d.mts.map +1 -1
  69. package/internal/utils.d.ts.map +1 -1
  70. package/internal/utils.mjs.map +1 -1
  71. package/package.json +1 -1
  72. package/pagination.d.mts +1 -0
  73. package/pagination.d.mts.map +1 -1
  74. package/pagination.d.ts +1 -0
  75. package/pagination.d.ts.map +1 -1
  76. package/pagination.mjs +1 -0
  77. package/pagination.mjs.map +1 -1
  78. package/resource.d.mts +1 -0
  79. package/resource.d.mts.map +1 -1
  80. package/resource.d.ts +1 -0
  81. package/resource.d.ts.map +1 -1
  82. package/resource.mjs +1 -0
  83. package/resource.mjs.map +1 -1
  84. package/resources/addresses.d.mts.map +1 -1
  85. package/resources/addresses.d.ts.map +1 -1
  86. package/resources/addresses.mjs.map +1 -1
  87. package/resources/balance.d.mts.map +1 -1
  88. package/resources/balance.d.ts.map +1 -1
  89. package/resources/balance.mjs.map +1 -1
  90. package/resources/broadcasts/broadcasts.d.mts +25 -1
  91. package/resources/broadcasts/broadcasts.d.mts.map +1 -1
  92. package/resources/broadcasts/broadcasts.d.ts +25 -1
  93. package/resources/broadcasts/broadcasts.d.ts.map +1 -1
  94. package/resources/broadcasts/broadcasts.js.map +1 -1
  95. package/resources/broadcasts/broadcasts.mjs.map +1 -1
  96. package/resources/broadcasts/contacts.d.mts +18 -1
  97. package/resources/broadcasts/contacts.d.mts.map +1 -1
  98. package/resources/broadcasts/contacts.d.ts +18 -1
  99. package/resources/broadcasts/contacts.d.ts.map +1 -1
  100. package/resources/broadcasts/contacts.mjs.map +1 -1
  101. package/resources/broadcasts/index.d.mts.map +1 -1
  102. package/resources/broadcasts/index.d.ts.map +1 -1
  103. package/resources/broadcasts/index.mjs.map +1 -1
  104. package/resources/broadcasts.d.mts.map +1 -1
  105. package/resources/broadcasts.d.ts.map +1 -1
  106. package/resources/broadcasts.mjs.map +1 -1
  107. package/resources/contacts/channels.d.mts.map +1 -1
  108. package/resources/contacts/channels.d.ts.map +1 -1
  109. package/resources/contacts/channels.mjs.map +1 -1
  110. package/resources/contacts/contacts.d.mts +14 -0
  111. package/resources/contacts/contacts.d.mts.map +1 -1
  112. package/resources/contacts/contacts.d.ts +14 -0
  113. package/resources/contacts/contacts.d.ts.map +1 -1
  114. package/resources/contacts/contacts.js +19 -0
  115. package/resources/contacts/contacts.js.map +1 -1
  116. package/resources/contacts/contacts.mjs +19 -0
  117. package/resources/contacts/contacts.mjs.map +1 -1
  118. package/resources/contacts/index.d.mts.map +1 -1
  119. package/resources/contacts/index.d.ts.map +1 -1
  120. package/resources/contacts/index.mjs.map +1 -1
  121. package/resources/contacts.d.mts.map +1 -1
  122. package/resources/contacts.d.ts.map +1 -1
  123. package/resources/contacts.mjs.map +1 -1
  124. package/resources/exports.d.mts.map +1 -1
  125. package/resources/exports.d.ts.map +1 -1
  126. package/resources/exports.mjs.map +1 -1
  127. package/resources/functions/functions.d.mts +420 -0
  128. package/resources/functions/functions.d.mts.map +1 -0
  129. package/resources/functions/functions.d.ts +420 -0
  130. package/resources/functions/functions.d.ts.map +1 -0
  131. package/resources/functions/functions.js +129 -0
  132. package/resources/functions/functions.js.map +1 -0
  133. package/resources/functions/functions.mjs +124 -0
  134. package/resources/functions/functions.mjs.map +1 -0
  135. package/resources/functions/index.d.mts +3 -0
  136. package/resources/functions/index.d.mts.map +1 -0
  137. package/resources/functions/index.d.ts +3 -0
  138. package/resources/functions/index.d.ts.map +1 -0
  139. package/resources/functions/index.js +9 -0
  140. package/resources/functions/index.js.map +1 -0
  141. package/resources/functions/index.mjs +4 -0
  142. package/resources/functions/index.mjs.map +1 -0
  143. package/resources/functions/secrets.d.mts +78 -0
  144. package/resources/functions/secrets.d.mts.map +1 -0
  145. package/resources/functions/secrets.d.ts +78 -0
  146. package/resources/functions/secrets.d.ts.map +1 -0
  147. package/resources/functions/secrets.js +61 -0
  148. package/resources/functions/secrets.js.map +1 -0
  149. package/resources/functions/secrets.mjs +57 -0
  150. package/resources/functions/secrets.mjs.map +1 -0
  151. package/resources/functions.d.mts +2 -0
  152. package/resources/functions.d.mts.map +1 -0
  153. package/resources/functions.d.ts +2 -0
  154. package/resources/functions.d.ts.map +1 -0
  155. package/resources/functions.js +6 -0
  156. package/resources/functions.js.map +1 -0
  157. package/resources/functions.mjs +3 -0
  158. package/resources/functions.mjs.map +1 -0
  159. package/resources/index.d.mts +3 -1
  160. package/resources/index.d.mts.map +1 -1
  161. package/resources/index.d.ts +3 -1
  162. package/resources/index.d.ts.map +1 -1
  163. package/resources/index.js +5 -1
  164. package/resources/index.js.map +1 -1
  165. package/resources/index.mjs +2 -0
  166. package/resources/index.mjs.map +1 -1
  167. package/resources/introspect.d.mts.map +1 -1
  168. package/resources/introspect.d.ts.map +1 -1
  169. package/resources/introspect.mjs.map +1 -1
  170. package/resources/invitations.d.mts.map +1 -1
  171. package/resources/invitations.d.ts.map +1 -1
  172. package/resources/invitations.mjs.map +1 -1
  173. package/resources/me.d.mts +34 -0
  174. package/resources/me.d.mts.map +1 -0
  175. package/resources/me.d.ts +34 -0
  176. package/resources/me.d.ts.map +1 -0
  177. package/resources/me.js +16 -0
  178. package/resources/me.js.map +1 -0
  179. package/resources/me.mjs +12 -0
  180. package/resources/me.mjs.map +1 -0
  181. package/resources/messages.d.mts +87 -3
  182. package/resources/messages.d.mts.map +1 -1
  183. package/resources/messages.d.ts +87 -3
  184. package/resources/messages.d.ts.map +1 -1
  185. package/resources/messages.js +24 -0
  186. package/resources/messages.js.map +1 -1
  187. package/resources/messages.mjs +24 -0
  188. package/resources/messages.mjs.map +1 -1
  189. package/resources/number-10dlc/brands.d.mts.map +1 -1
  190. package/resources/number-10dlc/brands.d.ts.map +1 -1
  191. package/resources/number-10dlc/brands.mjs.map +1 -1
  192. package/resources/number-10dlc/campaigns/campaigns.d.mts.map +1 -1
  193. package/resources/number-10dlc/campaigns/campaigns.d.ts.map +1 -1
  194. package/resources/number-10dlc/campaigns/campaigns.mjs.map +1 -1
  195. package/resources/number-10dlc/campaigns/index.d.mts.map +1 -1
  196. package/resources/number-10dlc/campaigns/index.d.ts.map +1 -1
  197. package/resources/number-10dlc/campaigns/index.mjs.map +1 -1
  198. package/resources/number-10dlc/campaigns/phone-numbers.d.mts.map +1 -1
  199. package/resources/number-10dlc/campaigns/phone-numbers.d.ts.map +1 -1
  200. package/resources/number-10dlc/campaigns/phone-numbers.mjs.map +1 -1
  201. package/resources/number-10dlc/campaigns.d.mts.map +1 -1
  202. package/resources/number-10dlc/campaigns.d.ts.map +1 -1
  203. package/resources/number-10dlc/campaigns.mjs.map +1 -1
  204. package/resources/number-10dlc/index.d.mts.map +1 -1
  205. package/resources/number-10dlc/index.d.ts.map +1 -1
  206. package/resources/number-10dlc/index.mjs.map +1 -1
  207. package/resources/number-10dlc/number-10dlc.d.mts.map +1 -1
  208. package/resources/number-10dlc/number-10dlc.d.ts.map +1 -1
  209. package/resources/number-10dlc/number-10dlc.mjs.map +1 -1
  210. package/resources/number-10dlc.d.mts.map +1 -1
  211. package/resources/number-10dlc.d.ts.map +1 -1
  212. package/resources/number-10dlc.mjs.map +1 -1
  213. package/resources/phone-numbers.d.mts.map +1 -1
  214. package/resources/phone-numbers.d.ts.map +1 -1
  215. package/resources/phone-numbers.mjs.map +1 -1
  216. package/resources/plan.d.mts.map +1 -1
  217. package/resources/plan.d.ts.map +1 -1
  218. package/resources/plan.mjs.map +1 -1
  219. package/resources/regulatory-documents.d.mts.map +1 -1
  220. package/resources/regulatory-documents.d.ts.map +1 -1
  221. package/resources/regulatory-documents.mjs.map +1 -1
  222. package/resources/senders/agent/agent.d.mts +2 -2
  223. package/resources/senders/agent/agent.d.mts.map +1 -1
  224. package/resources/senders/agent/agent.d.ts +2 -2
  225. package/resources/senders/agent/agent.d.ts.map +1 -1
  226. package/resources/senders/agent/agent.js.map +1 -1
  227. package/resources/senders/agent/agent.mjs +1 -1
  228. package/resources/senders/agent/agent.mjs.map +1 -1
  229. package/resources/senders/agent/executions.d.mts +22 -1
  230. package/resources/senders/agent/executions.d.mts.map +1 -1
  231. package/resources/senders/agent/executions.d.ts +22 -1
  232. package/resources/senders/agent/executions.d.ts.map +1 -1
  233. package/resources/senders/agent/executions.js +17 -0
  234. package/resources/senders/agent/executions.js.map +1 -1
  235. package/resources/senders/agent/executions.mjs +17 -0
  236. package/resources/senders/agent/executions.mjs.map +1 -1
  237. package/resources/senders/agent/flows.d.mts.map +1 -1
  238. package/resources/senders/agent/flows.d.ts.map +1 -1
  239. package/resources/senders/agent/flows.mjs.map +1 -1
  240. package/resources/senders/agent/index.d.mts +1 -1
  241. package/resources/senders/agent/index.d.mts.map +1 -1
  242. package/resources/senders/agent/index.d.ts +1 -1
  243. package/resources/senders/agent/index.d.ts.map +1 -1
  244. package/resources/senders/agent/index.js.map +1 -1
  245. package/resources/senders/agent/index.mjs +1 -1
  246. package/resources/senders/agent/index.mjs.map +1 -1
  247. package/resources/senders/agent/knowledge-bases/documents.d.mts.map +1 -1
  248. package/resources/senders/agent/knowledge-bases/documents.d.ts.map +1 -1
  249. package/resources/senders/agent/knowledge-bases/documents.mjs.map +1 -1
  250. package/resources/senders/agent/knowledge-bases/index.d.mts.map +1 -1
  251. package/resources/senders/agent/knowledge-bases/index.d.ts.map +1 -1
  252. package/resources/senders/agent/knowledge-bases/index.mjs.map +1 -1
  253. package/resources/senders/agent/knowledge-bases/knowledge-bases.d.mts.map +1 -1
  254. package/resources/senders/agent/knowledge-bases/knowledge-bases.d.ts.map +1 -1
  255. package/resources/senders/agent/knowledge-bases/knowledge-bases.mjs.map +1 -1
  256. package/resources/senders/agent/knowledge-bases.d.mts.map +1 -1
  257. package/resources/senders/agent/knowledge-bases.d.ts.map +1 -1
  258. package/resources/senders/agent/knowledge-bases.mjs.map +1 -1
  259. package/resources/senders/agent/tools.d.mts.map +1 -1
  260. package/resources/senders/agent/tools.d.ts.map +1 -1
  261. package/resources/senders/agent/tools.mjs.map +1 -1
  262. package/resources/senders/agent.d.mts.map +1 -1
  263. package/resources/senders/agent.d.ts.map +1 -1
  264. package/resources/senders/agent.mjs.map +1 -1
  265. package/resources/senders/index.d.mts.map +1 -1
  266. package/resources/senders/index.d.ts.map +1 -1
  267. package/resources/senders/index.mjs.map +1 -1
  268. package/resources/senders/senders.d.mts +8 -1
  269. package/resources/senders/senders.d.mts.map +1 -1
  270. package/resources/senders/senders.d.ts +8 -1
  271. package/resources/senders/senders.d.ts.map +1 -1
  272. package/resources/senders/senders.js.map +1 -1
  273. package/resources/senders/senders.mjs.map +1 -1
  274. package/resources/senders/whatsapp-sync.d.mts.map +1 -1
  275. package/resources/senders/whatsapp-sync.d.ts.map +1 -1
  276. package/resources/senders/whatsapp-sync.mjs.map +1 -1
  277. package/resources/senders.d.mts.map +1 -1
  278. package/resources/senders.d.ts.map +1 -1
  279. package/resources/senders.mjs.map +1 -1
  280. package/resources/sub-accounts/api-keys.d.mts +6 -3
  281. package/resources/sub-accounts/api-keys.d.mts.map +1 -1
  282. package/resources/sub-accounts/api-keys.d.ts +6 -3
  283. package/resources/sub-accounts/api-keys.d.ts.map +1 -1
  284. package/resources/sub-accounts/api-keys.js +6 -3
  285. package/resources/sub-accounts/api-keys.js.map +1 -1
  286. package/resources/sub-accounts/api-keys.mjs +6 -3
  287. package/resources/sub-accounts/api-keys.mjs.map +1 -1
  288. package/resources/sub-accounts/index.d.mts.map +1 -1
  289. package/resources/sub-accounts/index.d.ts.map +1 -1
  290. package/resources/sub-accounts/index.mjs.map +1 -1
  291. package/resources/sub-accounts/sub-accounts.d.mts +12 -6
  292. package/resources/sub-accounts/sub-accounts.d.mts.map +1 -1
  293. package/resources/sub-accounts/sub-accounts.d.ts +12 -6
  294. package/resources/sub-accounts/sub-accounts.d.ts.map +1 -1
  295. package/resources/sub-accounts/sub-accounts.js +12 -6
  296. package/resources/sub-accounts/sub-accounts.js.map +1 -1
  297. package/resources/sub-accounts/sub-accounts.mjs +12 -6
  298. package/resources/sub-accounts/sub-accounts.mjs.map +1 -1
  299. package/resources/sub-accounts.d.mts.map +1 -1
  300. package/resources/sub-accounts.d.ts.map +1 -1
  301. package/resources/sub-accounts.mjs.map +1 -1
  302. package/resources/templates.d.mts +21 -2
  303. package/resources/templates.d.mts.map +1 -1
  304. package/resources/templates.d.ts +21 -2
  305. package/resources/templates.d.ts.map +1 -1
  306. package/resources/templates.mjs.map +1 -1
  307. package/resources/urls.d.mts.map +1 -1
  308. package/resources/urls.d.ts.map +1 -1
  309. package/resources/urls.mjs.map +1 -1
  310. package/resources/usage.d.mts.map +1 -1
  311. package/resources/usage.d.ts.map +1 -1
  312. package/resources/usage.mjs.map +1 -1
  313. package/resources.d.mts.map +1 -1
  314. package/resources.d.ts.map +1 -1
  315. package/resources.mjs.map +1 -1
  316. package/src/client.ts +52 -0
  317. package/src/internal/types.ts +6 -8
  318. package/src/internal/utils/log.ts +2 -0
  319. package/src/resources/broadcasts/broadcasts.ts +21 -1
  320. package/src/resources/broadcasts/contacts.ts +16 -1
  321. package/src/resources/contacts/contacts.ts +20 -0
  322. package/src/resources/functions/functions.ts +562 -0
  323. package/src/resources/functions/index.ts +23 -0
  324. package/src/resources/functions/secrets.ts +112 -0
  325. package/src/resources/functions.ts +3 -0
  326. package/src/resources/index.ts +17 -0
  327. package/src/resources/me.ts +49 -0
  328. package/src/resources/messages.ts +108 -1
  329. package/src/resources/senders/agent/agent.ts +12 -2
  330. package/src/resources/senders/agent/executions.ts +36 -1
  331. package/src/resources/senders/agent/index.ts +6 -1
  332. package/src/resources/senders/senders.ts +10 -1
  333. package/src/resources/sub-accounts/api-keys.ts +6 -3
  334. package/src/resources/sub-accounts/sub-accounts.ts +12 -6
  335. package/src/resources/templates.ts +23 -2
  336. package/src/version.ts +1 -1
  337. package/uploads.d.mts +1 -0
  338. package/uploads.d.mts.map +1 -1
  339. package/uploads.d.ts +1 -0
  340. package/uploads.d.ts.map +1 -1
  341. package/uploads.mjs +1 -0
  342. package/uploads.mjs.map +1 -1
  343. package/version.d.mts +1 -1
  344. package/version.d.ts +1 -1
  345. package/version.js +1 -1
  346. package/version.mjs +1 -1
@@ -56,6 +56,20 @@ export {
56
56
  type ExportListParams,
57
57
  type DataExportsCursor,
58
58
  } from './exports';
59
+ export {
60
+ Functions,
61
+ type FunctionCreateResponse,
62
+ type FunctionRetrieveResponse,
63
+ type FunctionUpdateResponse,
64
+ type FunctionDeleteResponse,
65
+ type FunctionDeployResponse,
66
+ type FunctionGetDeploymentResponse,
67
+ type FunctionTailLogsResponse,
68
+ type FunctionCreateParams,
69
+ type FunctionUpdateParams,
70
+ type FunctionDeployParams,
71
+ type FunctionTailLogsParams,
72
+ } from './functions/functions';
59
73
  export {
60
74
  Introspect,
61
75
  type LineType,
@@ -72,6 +86,7 @@ export {
72
86
  type InvitationListParams,
73
87
  type InvitationsCursor,
74
88
  } from './invitations';
89
+ export { Me, type MeRetrieveResponse } from './me';
75
90
  export {
76
91
  Messages,
77
92
  type Channel,
@@ -80,9 +95,11 @@ export {
80
95
  type MessageResponse,
81
96
  type MessageStatus,
82
97
  type MessageType,
98
+ type MessageShowTypingResponse,
83
99
  type MessageListParams,
84
100
  type MessageReactParams,
85
101
  type MessageSendParams,
102
+ type MessageShowTypingParams,
86
103
  type MessagesCursor,
87
104
  } from './messages';
88
105
  export { Number10dlc } from './number-10dlc/number-10dlc';
@@ -0,0 +1,49 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class Me extends APIResource {
8
+ /**
9
+ * Returns the project, team, and API key metadata bound to the current Bearer
10
+ * token. Used by CLIs and SDKs to confirm which project they will operate on.
11
+ */
12
+ retrieve(options?: RequestOptions): APIPromise<MeRetrieveResponse> {
13
+ return this._client.get('/v1/me', options);
14
+ }
15
+ }
16
+
17
+ export interface MeRetrieveResponse {
18
+ apiKey: MeRetrieveResponse.APIKey;
19
+
20
+ isTestMode: boolean;
21
+
22
+ project: MeRetrieveResponse.Project;
23
+
24
+ team: MeRetrieveResponse.Team;
25
+ }
26
+
27
+ export namespace MeRetrieveResponse {
28
+ export interface APIKey {
29
+ id: string;
30
+ }
31
+
32
+ export interface Project {
33
+ id: string;
34
+
35
+ isSubAccount: boolean;
36
+
37
+ name: string | null;
38
+ }
39
+
40
+ export interface Team {
41
+ id: string;
42
+
43
+ name: string | null;
44
+ }
45
+ }
46
+
47
+ export declare namespace Me {
48
+ export { type MeRetrieveResponse as MeRetrieveResponse };
49
+ }
@@ -106,6 +106,35 @@ export class Messages extends APIResource {
106
106
  ]),
107
107
  });
108
108
  }
109
+
110
+ /**
111
+ * Mark an inbound WhatsApp message as read and display a typing indicator to the
112
+ * user while you prepare a response. The indicator is automatically dismissed when
113
+ * you send a reply, or after 25 seconds — whichever comes first. Only valid for
114
+ * inbound WhatsApp messages. Use this when a reply will take more than a couple of
115
+ * seconds (LLM agent, tool call, lookup) to improve the recipient's experience.
116
+ *
117
+ * @example
118
+ * ```ts
119
+ * const response = await client.messages.showTyping(
120
+ * 'messageId',
121
+ * );
122
+ * ```
123
+ */
124
+ showTyping(
125
+ messageID: string,
126
+ params: MessageShowTypingParams | null | undefined = {},
127
+ options?: RequestOptions,
128
+ ): APIPromise<MessageShowTypingResponse> {
129
+ const { 'Zavu-Sender': zavuSender } = params ?? {};
130
+ return this._client.post(path`/v1/messages/${messageID}/typing`, {
131
+ ...options,
132
+ headers: buildHeaders([
133
+ { ...(zavuSender != null ? { 'Zavu-Sender': zavuSender } : undefined) },
134
+ options?.headers,
135
+ ]),
136
+ });
137
+ }
109
138
  }
110
139
 
111
140
  export type MessagesCursor = Cursor<Message>;
@@ -200,6 +229,34 @@ export interface MessageContent {
200
229
  */
201
230
  contacts?: Array<MessageContent.Contact>;
202
231
 
232
+ /**
233
+ * Button label for cta_url messages.
234
+ */
235
+ ctaDisplayText?: string;
236
+
237
+ /**
238
+ * Public HTTPS URL of the header media when ctaHeaderType is 'image', 'video', or
239
+ * 'document'. WhatsApp fetches this URL — it must be publicly reachable and return
240
+ * the declared content type.
241
+ */
242
+ ctaHeaderMediaUrl?: string;
243
+
244
+ /**
245
+ * Header text when ctaHeaderType is 'text'.
246
+ */
247
+ ctaHeaderText?: string;
248
+
249
+ /**
250
+ * Optional header type for cta_url messages.
251
+ */
252
+ ctaHeaderType?: 'text' | 'image' | 'video' | 'document';
253
+
254
+ /**
255
+ * Destination URL opened in the device's default browser when the button is
256
+ * tapped. Used with messageType=cta_url. WhatsApp requires HTTPS in production.
257
+ */
258
+ ctaUrl?: string;
259
+
203
260
  /**
204
261
  * Emoji for reaction messages.
205
262
  */
@@ -210,6 +267,11 @@ export interface MessageContent {
210
267
  */
211
268
  filename?: string;
212
269
 
270
+ /**
271
+ * Optional footer text for cta_url messages.
272
+ */
273
+ footerText?: string;
274
+
213
275
  /**
214
276
  * Latitude for location messages.
215
277
  */
@@ -260,13 +322,43 @@ export interface MessageContent {
260
322
  */
261
323
  sections?: Array<MessageContent.Section>;
262
324
 
325
+ /**
326
+ * Variables for dynamic button placeholders (URL buttons and OTP buttons). Keys
327
+ * are the button index (0, 1, 2) in the template's `buttons` array — not the
328
+ * placeholder name. Values substitute the `{{1}}` placeholder inside that button's
329
+ * URL.
330
+ *
331
+ * **WhatsApp constraints:**
332
+ *
333
+ * - URL buttons only accept `{{1}}` — positional, numeric, no whitespace, no name.
334
+ * Named placeholders like `{{token}}` are stored as literal URL text by Meta and
335
+ * cannot be substituted.
336
+ * - At most one placeholder per URL button.
337
+ * - A template may have at most three buttons.
338
+ * - Static URL buttons (no placeholder) and `quick_reply` buttons are not included
339
+ * here.
340
+ */
341
+ templateButtonVariables?: { [key: string]: string };
342
+
343
+ /**
344
+ * Value for a text-header variable, keyed by `1` (WhatsApp text headers allow at
345
+ * most one variable). Optional override. If omitted, Zavu resolves the header from
346
+ * `templateVariables` using the header placeholder's name (e.g. `novios`). Static
347
+ * text headers need no value.
348
+ */
349
+ templateHeaderVariables?: { [key: string]: string };
350
+
263
351
  /**
264
352
  * Template ID for template messages.
265
353
  */
266
354
  templateId?: string;
267
355
 
268
356
  /**
269
- * Variables for template rendering. Keys are variable positions (1, 2, 3...).
357
+ * Variables for body placeholders. Key them to match the template body: by
358
+ * position (`1`, `2`, ...) for positional templates, or by name (e.g.
359
+ * `customer_name`) for named templates. Zavu detects the template's format and
360
+ * sends the correct payload to Meta. Named keys also resolve a named text-header
361
+ * variable. Do not mix positional and named keys in the same request.
270
362
  */
271
363
  templateVariables?: { [key: string]: string };
272
364
  }
@@ -330,9 +422,14 @@ export type MessageType =
330
422
  | 'contact'
331
423
  | 'buttons'
332
424
  | 'list'
425
+ | 'cta_url'
333
426
  | 'reaction'
334
427
  | 'template';
335
428
 
429
+ export interface MessageShowTypingResponse {
430
+ success: boolean;
431
+ }
432
+
336
433
  export interface MessageListParams extends CursorParams {
337
434
  /**
338
435
  * Delivery channel. Use 'auto' for intelligent routing.
@@ -471,6 +568,14 @@ export namespace MessageSendParams {
471
568
  }
472
569
  }
473
570
 
571
+ export interface MessageShowTypingParams {
572
+ /**
573
+ * Optional sender profile ID. If omitted, the project's default sender will be
574
+ * used.
575
+ */
576
+ 'Zavu-Sender'?: string;
577
+ }
578
+
474
579
  export declare namespace Messages {
475
580
  export {
476
581
  type Channel as Channel,
@@ -479,9 +584,11 @@ export declare namespace Messages {
479
584
  type MessageResponse as MessageResponse,
480
585
  type MessageStatus as MessageStatus,
481
586
  type MessageType as MessageType,
587
+ type MessageShowTypingResponse as MessageShowTypingResponse,
482
588
  type MessagesCursor as MessagesCursor,
483
589
  type MessageListParams as MessageListParams,
484
590
  type MessageReactParams as MessageReactParams,
485
591
  type MessageSendParams as MessageSendParams,
592
+ type MessageShowTypingParams as MessageShowTypingParams,
486
593
  };
487
594
  }
@@ -2,7 +2,12 @@
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as ExecutionsAPI from './executions';
5
- import { ExecutionListParams, Executions } from './executions';
5
+ import {
6
+ ExecutionListParams,
7
+ ExecutionRetrieveParams,
8
+ ExecutionRetrieveResponse,
9
+ Executions,
10
+ } from './executions';
6
11
  import * as FlowsAPI from './flows';
7
12
  import {
8
13
  AgentFlow,
@@ -369,7 +374,12 @@ export declare namespace AgentResource {
369
374
  type AgentUpdateParams as AgentUpdateParams,
370
375
  };
371
376
 
372
- export { Executions as Executions, type ExecutionListParams as ExecutionListParams };
377
+ export {
378
+ Executions as Executions,
379
+ type ExecutionRetrieveResponse as ExecutionRetrieveResponse,
380
+ type ExecutionRetrieveParams as ExecutionRetrieveParams,
381
+ type ExecutionListParams as ExecutionListParams,
382
+ };
373
383
 
374
384
  export {
375
385
  Flows as Flows,
@@ -3,11 +3,34 @@
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as AgentAPI from './agent';
5
5
  import { AgentExecutionsCursor } from './agent';
6
+ import { APIPromise } from '../../../core/api-promise';
6
7
  import { Cursor, type CursorParams, PagePromise } from '../../../core/pagination';
7
8
  import { RequestOptions } from '../../../internal/request-options';
8
9
  import { path } from '../../../internal/utils/path';
9
10
 
10
11
  export class Executions extends APIResource {
12
+ /**
13
+ * Fetch full details for one execution — including `errorMessage`, `errorCode`,
14
+ * and `responseText`. Use this to debug failures surfaced by the list endpoint.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const execution =
19
+ * await client.senders.agent.executions.retrieve(
20
+ * 'executionId',
21
+ * { senderId: 'senderId' },
22
+ * );
23
+ * ```
24
+ */
25
+ retrieve(
26
+ executionID: string,
27
+ params: ExecutionRetrieveParams,
28
+ options?: RequestOptions,
29
+ ): APIPromise<ExecutionRetrieveResponse> {
30
+ const { senderId } = params;
31
+ return this._client.get(path`/v1/senders/${senderId}/agent/executions/${executionID}`, options);
32
+ }
33
+
11
34
  /**
12
35
  * List recent agent executions with pagination.
13
36
  *
@@ -34,6 +57,14 @@ export class Executions extends APIResource {
34
57
  }
35
58
  }
36
59
 
60
+ export interface ExecutionRetrieveResponse {
61
+ execution: AgentAPI.AgentExecution;
62
+ }
63
+
64
+ export interface ExecutionRetrieveParams {
65
+ senderId: string;
66
+ }
67
+
37
68
  export interface ExecutionListParams extends CursorParams {
38
69
  /**
39
70
  * Status of an agent execution.
@@ -42,7 +73,11 @@ export interface ExecutionListParams extends CursorParams {
42
73
  }
43
74
 
44
75
  export declare namespace Executions {
45
- export { type ExecutionListParams as ExecutionListParams };
76
+ export {
77
+ type ExecutionRetrieveResponse as ExecutionRetrieveResponse,
78
+ type ExecutionRetrieveParams as ExecutionRetrieveParams,
79
+ type ExecutionListParams as ExecutionListParams,
80
+ };
46
81
  }
47
82
 
48
83
  export { type AgentExecutionsCursor };
@@ -12,7 +12,12 @@ export {
12
12
  type AgentUpdateParams,
13
13
  type AgentExecutionsCursor,
14
14
  } from './agent';
15
- export { Executions, type ExecutionListParams } from './executions';
15
+ export {
16
+ Executions,
17
+ type ExecutionRetrieveResponse,
18
+ type ExecutionRetrieveParams,
19
+ type ExecutionListParams,
20
+ } from './executions';
16
21
  export {
17
22
  Flows,
18
23
  type AgentFlow,
@@ -326,6 +326,13 @@ export interface SenderWebhook {
326
326
  *
327
327
  * - `invitation.status_changed`: A partner invitation status changed (pending,
328
328
  * in_progress, completed, cancelled)
329
+ *
330
+ * **Custom domain events:**
331
+ *
332
+ * - `domain.verified`: A custom email domain passed verification (DKIM, and
333
+ * SPF/DMARC/MAIL FROM if enhanced records are enabled)
334
+ * - `domain.failed`: A custom email domain failed verification or is partially
335
+ * verified
329
336
  */
330
337
  export type WebhookEvent =
331
338
  | 'message.queued'
@@ -338,7 +345,9 @@ export type WebhookEvent =
338
345
  | 'broadcast.status_changed'
339
346
  | 'conversation.new'
340
347
  | 'template.status_changed'
341
- | 'invitation.status_changed';
348
+ | 'invitation.status_changed'
349
+ | 'domain.verified'
350
+ | 'domain.failed';
342
351
 
343
352
  export interface WebhookSecretResponse {
344
353
  /**
@@ -8,7 +8,8 @@ import { path } from '../../internal/utils/path';
8
8
 
9
9
  export class APIKeys extends APIResource {
10
10
  /**
11
- * Create sub-account API key
11
+ * Create sub-account API key. Requires a parent project API key; sub-account API
12
+ * keys receive HTTP 403.
12
13
  *
13
14
  * @example
14
15
  * ```ts
@@ -23,7 +24,8 @@ export class APIKeys extends APIResource {
23
24
  }
24
25
 
25
26
  /**
26
- * List sub-account API keys
27
+ * List sub-account API keys. Requires a parent project API key; sub-account API
28
+ * keys receive HTTP 403.
27
29
  *
28
30
  * @example
29
31
  * ```ts
@@ -35,7 +37,8 @@ export class APIKeys extends APIResource {
35
37
  }
36
38
 
37
39
  /**
38
- * Revoke sub-account API key
40
+ * Revoke sub-account API key. Requires a parent project API key; sub-account API
41
+ * keys receive HTTP 403.
39
42
  *
40
43
  * @example
41
44
  * ```ts
@@ -20,7 +20,8 @@ export class SubAccounts extends APIResource {
20
20
  /**
21
21
  * Create a new sub-account (project) with its own API key. All charges are billed
22
22
  * to the parent team's balance. Use creditLimit to set a spending cap. The
23
- * sub-account's API key is returned only in the creation response.
23
+ * sub-account's API key is returned only in the creation response. Requires a
24
+ * parent project API key; sub-account API keys receive HTTP 403.
24
25
  *
25
26
  * @example
26
27
  * ```ts
@@ -34,7 +35,8 @@ export class SubAccounts extends APIResource {
34
35
  }
35
36
 
36
37
  /**
37
- * Get sub-account
38
+ * Get sub-account. Requires a parent project API key; sub-account API keys receive
39
+ * HTTP 403.
38
40
  *
39
41
  * @example
40
42
  * ```ts
@@ -46,7 +48,8 @@ export class SubAccounts extends APIResource {
46
48
  }
47
49
 
48
50
  /**
49
- * Update sub-account
51
+ * Update sub-account. Requires a parent project API key; sub-account API keys
52
+ * receive HTTP 403.
50
53
  *
51
54
  * @example
52
55
  * ```ts
@@ -62,7 +65,8 @@ export class SubAccounts extends APIResource {
62
65
  }
63
66
 
64
67
  /**
65
- * List sub-accounts for this team.
68
+ * List sub-accounts for this team. Requires a parent project API key; sub-account
69
+ * API keys receive HTTP 403.
66
70
  *
67
71
  * @example
68
72
  * ```ts
@@ -81,7 +85,8 @@ export class SubAccounts extends APIResource {
81
85
 
82
86
  /**
83
87
  * Deactivate a sub-account. Remaining balance is returned to the parent team and
84
- * all API keys are revoked.
88
+ * all API keys are revoked. Requires a parent project API key; sub-account API
89
+ * keys receive HTTP 403.
85
90
  *
86
91
  * @example
87
92
  * ```ts
@@ -94,7 +99,8 @@ export class SubAccounts extends APIResource {
94
99
 
95
100
  /**
96
101
  * Get spending information for a sub-account. Returns the parent team's balance,
97
- * the sub-account's total spending, and its credit limit (spending cap).
102
+ * the sub-account's total spending, and its credit limit (spending cap). Requires
103
+ * a parent project API key; sub-account API keys receive HTTP 403.
98
104
  *
99
105
  * @example
100
106
  * ```ts
@@ -98,8 +98,11 @@ export interface Template {
98
98
  id: string;
99
99
 
100
100
  /**
101
- * Default template body with variables: {{1}}, {{2}}, or named variables like
102
- * {{contact.first_name}}. Used when no channel-specific body is set.
101
+ * Default template body with variables: positional ({{1}}, {{2}}) or named
102
+ * ({{customer_name}}, {{contact.first_name}}). Templates created in Zavu are
103
+ * submitted to Meta as positional; templates imported from a WhatsApp Business
104
+ * Account keep their original format (named or positional). Used when no
105
+ * channel-specific body is set.
103
106
  */
104
107
  body: string;
105
108
 
@@ -182,6 +185,12 @@ export interface Template {
182
185
 
183
186
  export namespace Template {
184
187
  export interface Button {
188
+ /**
189
+ * Sample value used to substitute `{{1}}` in the URL when submitting the template
190
+ * to Meta for review. Only present for dynamic URL buttons.
191
+ */
192
+ example?: string;
193
+
185
194
  /**
186
195
  * OTP button type. Required when type is 'otp'.
187
196
  */
@@ -301,6 +310,13 @@ export namespace TemplateCreateParams {
301
310
 
302
311
  type: 'quick_reply' | 'url' | 'phone' | 'otp';
303
312
 
313
+ /**
314
+ * Sample value Meta uses to review templates with a dynamic URL button.
315
+ * Substituted into `{{1}}` of the URL when the template is submitted to Meta. Only
316
+ * meaningful when `url` contains `{{1}}`; ignored for static URLs.
317
+ */
318
+ example?: string;
319
+
304
320
  /**
305
321
  * Required when type is 'otp'. COPY_CODE shows copy button, ONE_TAP enables
306
322
  * Android autofill.
@@ -319,6 +335,11 @@ export namespace TemplateCreateParams {
319
335
  */
320
336
  signatureHash?: string;
321
337
 
338
+ /**
339
+ * Button destination. Use `{{1}}` exactly once for a dynamic URL (e.g.
340
+ * `https://example.com/orders/{{1}}`); WhatsApp only accepts the strict `{{1}}`
341
+ * form. Static URLs must not contain any `{{...}}` placeholder.
342
+ */
322
343
  url?: string;
323
344
  }
324
345
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.38.0'; // x-release-please-version
1
+ export const VERSION = '0.44.0'; // x-release-please-version
package/uploads.d.mts CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.mjs";
2
3
  //# sourceMappingURL=uploads.d.mts.map
package/uploads.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
package/uploads.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.js";
2
3
  //# sourceMappingURL=uploads.d.ts.map
package/uploads.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,kCAA+B"}
package/uploads.mjs CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.mjs";
2
3
  //# sourceMappingURL=uploads.mjs.map
package/uploads.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.38.0";
1
+ export declare const VERSION = "0.44.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.38.0";
1
+ export declare const VERSION = "0.44.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.38.0'; // x-release-please-version
4
+ exports.VERSION = '0.44.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.38.0'; // x-release-please-version
1
+ export const VERSION = '0.44.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map