@zavudev/sdk 0.38.0 → 0.43.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 +81 -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 +12 -1
  91. package/resources/broadcasts/broadcasts.d.mts.map +1 -1
  92. package/resources/broadcasts/broadcasts.d.ts +12 -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 +9 -1
  97. package/resources/broadcasts/contacts.d.mts.map +1 -1
  98. package/resources/broadcasts/contacts.d.ts +9 -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 +75 -3
  182. package/resources/messages.d.mts.map +1 -1
  183. package/resources/messages.d.ts +75 -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 +16 -0
  303. package/resources/templates.d.mts.map +1 -1
  304. package/resources/templates.d.ts +16 -0
  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 +10 -1
  320. package/src/resources/broadcasts/contacts.ts +8 -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 +97 -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 +18 -0
  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,32 @@ 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
+
263
343
  /**
264
344
  * Template ID for template messages.
265
345
  */
266
346
  templateId?: string;
267
347
 
268
348
  /**
269
- * Variables for template rendering. Keys are variable positions (1, 2, 3...).
349
+ * Variables for body placeholders. Keys are positions (1, 2, 3, ...) matching the
350
+ * order placeholders appear in the template body.
270
351
  */
271
352
  templateVariables?: { [key: string]: string };
272
353
  }
@@ -330,9 +411,14 @@ export type MessageType =
330
411
  | 'contact'
331
412
  | 'buttons'
332
413
  | 'list'
414
+ | 'cta_url'
333
415
  | 'reaction'
334
416
  | 'template';
335
417
 
418
+ export interface MessageShowTypingResponse {
419
+ success: boolean;
420
+ }
421
+
336
422
  export interface MessageListParams extends CursorParams {
337
423
  /**
338
424
  * Delivery channel. Use 'auto' for intelligent routing.
@@ -471,6 +557,14 @@ export namespace MessageSendParams {
471
557
  }
472
558
  }
473
559
 
560
+ export interface MessageShowTypingParams {
561
+ /**
562
+ * Optional sender profile ID. If omitted, the project's default sender will be
563
+ * used.
564
+ */
565
+ 'Zavu-Sender'?: string;
566
+ }
567
+
474
568
  export declare namespace Messages {
475
569
  export {
476
570
  type Channel as Channel,
@@ -479,9 +573,11 @@ export declare namespace Messages {
479
573
  type MessageResponse as MessageResponse,
480
574
  type MessageStatus as MessageStatus,
481
575
  type MessageType as MessageType,
576
+ type MessageShowTypingResponse as MessageShowTypingResponse,
482
577
  type MessagesCursor as MessagesCursor,
483
578
  type MessageListParams as MessageListParams,
484
579
  type MessageReactParams as MessageReactParams,
485
580
  type MessageSendParams as MessageSendParams,
581
+ type MessageShowTypingParams as MessageShowTypingParams,
486
582
  };
487
583
  }
@@ -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
@@ -182,6 +182,12 @@ export interface Template {
182
182
 
183
183
  export namespace Template {
184
184
  export interface Button {
185
+ /**
186
+ * Sample value used to substitute `{{1}}` in the URL when submitting the template
187
+ * to Meta for review. Only present for dynamic URL buttons.
188
+ */
189
+ example?: string;
190
+
185
191
  /**
186
192
  * OTP button type. Required when type is 'otp'.
187
193
  */
@@ -301,6 +307,13 @@ export namespace TemplateCreateParams {
301
307
 
302
308
  type: 'quick_reply' | 'url' | 'phone' | 'otp';
303
309
 
310
+ /**
311
+ * Sample value Meta uses to review templates with a dynamic URL button.
312
+ * Substituted into `{{1}}` of the URL when the template is submitted to Meta. Only
313
+ * meaningful when `url` contains `{{1}}`; ignored for static URLs.
314
+ */
315
+ example?: string;
316
+
304
317
  /**
305
318
  * Required when type is 'otp'. COPY_CODE shows copy button, ONE_TAP enables
306
319
  * Android autofill.
@@ -319,6 +332,11 @@ export namespace TemplateCreateParams {
319
332
  */
320
333
  signatureHash?: string;
321
334
 
335
+ /**
336
+ * Button destination. Use `{{1}}` exactly once for a dynamic URL (e.g.
337
+ * `https://example.com/orders/{{1}}`); WhatsApp only accepts the strict `{{1}}`
338
+ * form. Static URLs must not contain any `{{...}}` placeholder.
339
+ */
322
340
  url?: string;
323
341
  }
324
342
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.38.0'; // x-release-please-version
1
+ export const VERSION = '0.43.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.43.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.43.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.43.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.43.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map