@zavudev/sdk 0.57.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 (756) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +3 -3
  3. package/client.d.mts +39 -36
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +39 -36
  6. package/client.d.ts.map +1 -1
  7. package/client.js +43 -40
  8. package/client.js.map +1 -1
  9. package/client.mjs +43 -40
  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/request-options.d.mts.map +1 -1
  72. package/internal/request-options.d.ts.map +1 -1
  73. package/internal/request-options.js +0 -1
  74. package/internal/request-options.js.map +1 -1
  75. package/internal/request-options.mjs +0 -1
  76. package/internal/request-options.mjs.map +1 -1
  77. package/internal/shim-types.d.mts.map +1 -1
  78. package/internal/shim-types.d.ts.map +1 -1
  79. package/internal/shim-types.js +6 -1
  80. package/internal/shim-types.js.map +1 -1
  81. package/internal/shim-types.mjs +6 -1
  82. package/internal/shim-types.mjs.map +1 -1
  83. package/internal/shims.d.mts.map +1 -1
  84. package/internal/shims.d.ts.map +1 -1
  85. package/internal/shims.js +6 -1
  86. package/internal/shims.js.map +1 -1
  87. package/internal/shims.mjs +6 -1
  88. package/internal/shims.mjs.map +1 -1
  89. package/internal/types.d.mts.map +1 -1
  90. package/internal/types.d.ts.map +1 -1
  91. package/internal/types.js +0 -1
  92. package/internal/types.js.map +1 -1
  93. package/internal/types.mjs +0 -1
  94. package/internal/types.mjs.map +1 -1
  95. package/internal/utils/base64.d.mts.map +1 -1
  96. package/internal/utils/base64.d.ts.map +1 -1
  97. package/internal/utils/base64.js +0 -1
  98. package/internal/utils/base64.js.map +1 -1
  99. package/internal/utils/base64.mjs +0 -1
  100. package/internal/utils/base64.mjs.map +1 -1
  101. package/internal/utils/env.d.mts.map +1 -1
  102. package/internal/utils/env.d.ts.map +1 -1
  103. package/internal/utils/env.js +0 -1
  104. package/internal/utils/env.js.map +1 -1
  105. package/internal/utils/env.mjs +0 -1
  106. package/internal/utils/env.mjs.map +1 -1
  107. package/internal/utils/log.d.mts.map +1 -1
  108. package/internal/utils/log.d.ts.map +1 -1
  109. package/internal/utils/log.js +0 -1
  110. package/internal/utils/log.js.map +1 -1
  111. package/internal/utils/log.mjs +0 -1
  112. package/internal/utils/log.mjs.map +1 -1
  113. package/internal/utils/query.d.mts.map +1 -1
  114. package/internal/utils/query.d.ts.map +1 -1
  115. package/internal/utils/query.js +1 -2
  116. package/internal/utils/query.js.map +1 -1
  117. package/internal/utils/query.mjs +1 -2
  118. package/internal/utils/query.mjs.map +1 -1
  119. package/internal/utils/sleep.d.mts.map +1 -1
  120. package/internal/utils/sleep.d.ts.map +1 -1
  121. package/internal/utils/sleep.js +0 -1
  122. package/internal/utils/sleep.js.map +1 -1
  123. package/internal/utils/sleep.mjs +0 -1
  124. package/internal/utils/sleep.mjs.map +1 -1
  125. package/internal/utils/uuid.d.mts.map +1 -1
  126. package/internal/utils/uuid.d.ts.map +1 -1
  127. package/internal/utils/uuid.js +0 -1
  128. package/internal/utils/uuid.js.map +1 -1
  129. package/internal/utils/uuid.mjs +0 -1
  130. package/internal/utils/uuid.mjs.map +1 -1
  131. package/internal/utils/values.d.mts.map +1 -1
  132. package/internal/utils/values.d.ts.map +1 -1
  133. package/internal/utils/values.js +0 -1
  134. package/internal/utils/values.js.map +1 -1
  135. package/internal/utils/values.mjs +0 -1
  136. package/internal/utils/values.mjs.map +1 -1
  137. package/internal/utils.d.mts.map +1 -1
  138. package/internal/utils.d.ts.map +1 -1
  139. package/internal/utils.js +0 -1
  140. package/internal/utils.js.map +1 -1
  141. package/internal/utils.mjs +0 -1
  142. package/internal/utils.mjs.map +1 -1
  143. package/package.json +29 -10
  144. package/resources/addresses.d.mts +27 -77
  145. package/resources/addresses.d.mts.map +1 -1
  146. package/resources/addresses.d.ts +27 -77
  147. package/resources/addresses.d.ts.map +1 -1
  148. package/resources/addresses.js +19 -32
  149. package/resources/addresses.js.map +1 -1
  150. package/resources/addresses.mjs +19 -32
  151. package/resources/addresses.mjs.map +1 -1
  152. package/resources/agent-templates.d.mts +17 -71
  153. package/resources/agent-templates.d.mts.map +1 -1
  154. package/resources/agent-templates.d.ts +17 -71
  155. package/resources/agent-templates.d.ts.map +1 -1
  156. package/resources/agent-templates.js +11 -15
  157. package/resources/agent-templates.js.map +1 -1
  158. package/resources/agent-templates.mjs +11 -15
  159. package/resources/agent-templates.mjs.map +1 -1
  160. package/resources/agents/agents.d.mts +53 -395
  161. package/resources/agents/agents.d.mts.map +1 -1
  162. package/resources/agents/agents.d.ts +53 -395
  163. package/resources/agents/agents.d.ts.map +1 -1
  164. package/resources/agents/agents.js +33 -48
  165. package/resources/agents/agents.js.map +1 -1
  166. package/resources/agents/agents.mjs +33 -48
  167. package/resources/agents/agents.mjs.map +1 -1
  168. package/resources/agents/index.js +1 -1
  169. package/resources/agents/index.js.map +1 -1
  170. package/resources/agents/index.mjs +1 -1
  171. package/resources/agents/index.mjs.map +1 -1
  172. package/resources/agents/senders.d.mts +10 -32
  173. package/resources/agents/senders.d.mts.map +1 -1
  174. package/resources/agents/senders.d.ts +10 -32
  175. package/resources/agents/senders.d.ts.map +1 -1
  176. package/resources/agents/senders.js +7 -14
  177. package/resources/agents/senders.js.map +1 -1
  178. package/resources/agents/senders.mjs +7 -14
  179. package/resources/agents/senders.mjs.map +1 -1
  180. package/resources/agents.js +1 -1
  181. package/resources/agents.js.map +1 -1
  182. package/resources/agents.mjs +1 -1
  183. package/resources/agents.mjs.map +1 -1
  184. package/resources/balance.d.mts +6 -19
  185. package/resources/balance.d.mts.map +1 -1
  186. package/resources/balance.d.ts +6 -19
  187. package/resources/balance.d.ts.map +1 -1
  188. package/resources/balance.js +5 -1
  189. package/resources/balance.js.map +1 -1
  190. package/resources/balance.mjs +5 -1
  191. package/resources/balance.mjs.map +1 -1
  192. package/resources/broadcasts/broadcasts.d.mts +87 -413
  193. package/resources/broadcasts/broadcasts.d.mts.map +1 -1
  194. package/resources/broadcasts/broadcasts.d.ts +87 -413
  195. package/resources/broadcasts/broadcasts.d.ts.map +1 -1
  196. package/resources/broadcasts/broadcasts.js +59 -87
  197. package/resources/broadcasts/broadcasts.js.map +1 -1
  198. package/resources/broadcasts/broadcasts.mjs +59 -87
  199. package/resources/broadcasts/broadcasts.mjs.map +1 -1
  200. package/resources/broadcasts/contacts.d.mts +19 -109
  201. package/resources/broadcasts/contacts.d.mts.map +1 -1
  202. package/resources/broadcasts/contacts.d.ts +19 -109
  203. package/resources/broadcasts/contacts.d.ts.map +1 -1
  204. package/resources/broadcasts/contacts.js +10 -40
  205. package/resources/broadcasts/contacts.js.map +1 -1
  206. package/resources/broadcasts/contacts.mjs +10 -40
  207. package/resources/broadcasts/contacts.mjs.map +1 -1
  208. package/resources/broadcasts/index.js +1 -1
  209. package/resources/broadcasts/index.js.map +1 -1
  210. package/resources/broadcasts/index.mjs +1 -1
  211. package/resources/broadcasts/index.mjs.map +1 -1
  212. package/resources/broadcasts.js +1 -1
  213. package/resources/broadcasts.js.map +1 -1
  214. package/resources/broadcasts.mjs +1 -1
  215. package/resources/broadcasts.mjs.map +1 -1
  216. package/resources/calls.d.mts +40 -484
  217. package/resources/calls.d.mts.map +1 -1
  218. package/resources/calls.d.ts +40 -484
  219. package/resources/calls.d.ts.map +1 -1
  220. package/resources/calls.js +25 -35
  221. package/resources/calls.js.map +1 -1
  222. package/resources/calls.mjs +25 -35
  223. package/resources/calls.mjs.map +1 -1
  224. package/resources/contacts/channels.d.mts +20 -98
  225. package/resources/contacts/channels.d.mts.map +1 -1
  226. package/resources/contacts/channels.d.ts +20 -98
  227. package/resources/contacts/channels.d.ts.map +1 -1
  228. package/resources/contacts/channels.js +13 -32
  229. package/resources/contacts/channels.js.map +1 -1
  230. package/resources/contacts/channels.mjs +13 -32
  231. package/resources/contacts/channels.mjs.map +1 -1
  232. package/resources/contacts/contacts.d.mts +33 -244
  233. package/resources/contacts/contacts.d.mts.map +1 -1
  234. package/resources/contacts/contacts.d.ts +33 -244
  235. package/resources/contacts/contacts.d.ts.map +1 -1
  236. package/resources/contacts/contacts.js +21 -52
  237. package/resources/contacts/contacts.js.map +1 -1
  238. package/resources/contacts/contacts.mjs +21 -52
  239. package/resources/contacts/contacts.mjs.map +1 -1
  240. package/resources/contacts/index.js +1 -1
  241. package/resources/contacts/index.js.map +1 -1
  242. package/resources/contacts/index.mjs +1 -1
  243. package/resources/contacts/index.mjs.map +1 -1
  244. package/resources/contacts.js +1 -1
  245. package/resources/contacts.js.map +1 -1
  246. package/resources/contacts.mjs +1 -1
  247. package/resources/contacts.mjs.map +1 -1
  248. package/resources/conversations.d.mts +32 -316
  249. package/resources/conversations.d.mts.map +1 -1
  250. package/resources/conversations.d.ts +32 -316
  251. package/resources/conversations.d.ts.map +1 -1
  252. package/resources/conversations.js +15 -1
  253. package/resources/conversations.js.map +1 -1
  254. package/resources/conversations.mjs +15 -1
  255. package/resources/conversations.mjs.map +1 -1
  256. package/resources/email-domains.d.mts +25 -208
  257. package/resources/email-domains.d.mts.map +1 -1
  258. package/resources/email-domains.d.ts +25 -208
  259. package/resources/email-domains.d.ts.map +1 -1
  260. package/resources/email-domains.js +12 -27
  261. package/resources/email-domains.js.map +1 -1
  262. package/resources/email-domains.mjs +12 -27
  263. package/resources/email-domains.mjs.map +1 -1
  264. package/resources/functions/functions.d.mts +67 -553
  265. package/resources/functions/functions.d.mts.map +1 -1
  266. package/resources/functions/functions.d.ts +67 -553
  267. package/resources/functions/functions.d.ts.map +1 -1
  268. package/resources/functions/functions.js +39 -82
  269. package/resources/functions/functions.js.map +1 -1
  270. package/resources/functions/functions.mjs +39 -82
  271. package/resources/functions/functions.mjs.map +1 -1
  272. package/resources/functions/git-link.d.mts +25 -240
  273. package/resources/functions/git-link.d.mts.map +1 -1
  274. package/resources/functions/git-link.d.ts +25 -240
  275. package/resources/functions/git-link.d.ts.map +1 -1
  276. package/resources/functions/git-link.js +16 -34
  277. package/resources/functions/git-link.js.map +1 -1
  278. package/resources/functions/git-link.mjs +16 -34
  279. package/resources/functions/git-link.mjs.map +1 -1
  280. package/resources/functions/index.js +1 -1
  281. package/resources/functions/index.js.map +1 -1
  282. package/resources/functions/index.mjs +1 -1
  283. package/resources/functions/index.mjs.map +1 -1
  284. package/resources/functions/secrets.d.mts +15 -47
  285. package/resources/functions/secrets.d.mts.map +1 -1
  286. package/resources/functions/secrets.d.ts +15 -47
  287. package/resources/functions/secrets.d.ts.map +1 -1
  288. package/resources/functions/secrets.js +11 -21
  289. package/resources/functions/secrets.js.map +1 -1
  290. package/resources/functions/secrets.mjs +11 -21
  291. package/resources/functions/secrets.mjs.map +1 -1
  292. package/resources/functions/triggers.d.mts +14 -123
  293. package/resources/functions/triggers.d.mts.map +1 -1
  294. package/resources/functions/triggers.d.ts +14 -123
  295. package/resources/functions/triggers.d.ts.map +1 -1
  296. package/resources/functions/triggers.js +7 -25
  297. package/resources/functions/triggers.js.map +1 -1
  298. package/resources/functions/triggers.mjs +7 -25
  299. package/resources/functions/triggers.mjs.map +1 -1
  300. package/resources/functions.js +1 -1
  301. package/resources/functions.js.map +1 -1
  302. package/resources/functions.mjs +1 -1
  303. package/resources/functions.mjs.map +1 -1
  304. package/resources/index.d.mts +1 -0
  305. package/resources/index.d.mts.map +1 -1
  306. package/resources/index.d.ts +1 -0
  307. package/resources/index.d.ts.map +1 -1
  308. package/resources/index.js +4 -2
  309. package/resources/index.js.map +1 -1
  310. package/resources/index.mjs +2 -1
  311. package/resources/index.mjs.map +1 -1
  312. package/resources/introspect.d.mts +15 -105
  313. package/resources/introspect.d.mts.map +1 -1
  314. package/resources/introspect.d.ts +15 -105
  315. package/resources/introspect.d.ts.map +1 -1
  316. package/resources/introspect.js +7 -13
  317. package/resources/introspect.js.map +1 -1
  318. package/resources/introspect.mjs +7 -13
  319. package/resources/introspect.mjs.map +1 -1
  320. package/resources/invitations/webhook.d.mts +57 -0
  321. package/resources/invitations/webhook.d.mts.map +1 -0
  322. package/resources/invitations/webhook.d.ts +57 -0
  323. package/resources/invitations/webhook.d.ts.map +1 -0
  324. package/resources/invitations/webhook.js +61 -0
  325. package/resources/invitations/webhook.js.map +1 -0
  326. package/resources/invitations/webhook.mjs +57 -0
  327. package/resources/invitations/webhook.mjs.map +1 -0
  328. package/resources/invitations.d.mts +27 -174
  329. package/resources/invitations.d.mts.map +1 -1
  330. package/resources/invitations.d.ts +27 -174
  331. package/resources/invitations.d.ts.map +1 -1
  332. package/resources/invitations.js +20 -30
  333. package/resources/invitations.js.map +1 -1
  334. package/resources/invitations.mjs +19 -30
  335. package/resources/invitations.mjs.map +1 -1
  336. package/resources/me.d.mts +9 -18
  337. package/resources/me.d.mts.map +1 -1
  338. package/resources/me.d.ts +9 -18
  339. package/resources/me.d.ts.map +1 -1
  340. package/resources/me.js +5 -1
  341. package/resources/me.js.map +1 -1
  342. package/resources/me.mjs +5 -1
  343. package/resources/me.mjs.map +1 -1
  344. package/resources/memory/collections/collections.d.mts +75 -0
  345. package/resources/memory/collections/collections.d.mts.map +1 -0
  346. package/resources/memory/collections/collections.d.ts +75 -0
  347. package/resources/memory/collections/collections.d.ts.map +1 -0
  348. package/resources/memory/collections/collections.js +79 -0
  349. package/resources/memory/collections/collections.js.map +1 -0
  350. package/resources/memory/collections/collections.mjs +74 -0
  351. package/resources/memory/collections/collections.mjs.map +1 -0
  352. package/resources/memory/collections/index.d.mts +3 -0
  353. package/resources/memory/collections/index.d.mts.map +1 -0
  354. package/resources/memory/collections/index.d.ts +3 -0
  355. package/resources/memory/collections/index.d.ts.map +1 -0
  356. package/resources/memory/collections/index.js +9 -0
  357. package/resources/memory/collections/index.js.map +1 -0
  358. package/resources/memory/collections/index.mjs +4 -0
  359. package/resources/memory/collections/index.mjs.map +1 -0
  360. package/resources/memory/collections/items.d.mts +88 -0
  361. package/resources/memory/collections/items.d.mts.map +1 -0
  362. package/resources/memory/collections/items.d.ts +88 -0
  363. package/resources/memory/collections/items.d.ts.map +1 -0
  364. package/resources/memory/collections/items.js +120 -0
  365. package/resources/memory/collections/items.js.map +1 -0
  366. package/resources/memory/collections/items.mjs +116 -0
  367. package/resources/memory/collections/items.mjs.map +1 -0
  368. package/resources/memory/collections.d.mts +2 -0
  369. package/resources/memory/collections.d.mts.map +1 -0
  370. package/resources/memory/collections.d.ts +2 -0
  371. package/resources/memory/collections.d.ts.map +1 -0
  372. package/resources/memory/collections.js +6 -0
  373. package/resources/memory/collections.js.map +1 -0
  374. package/resources/memory/collections.mjs +3 -0
  375. package/resources/memory/collections.mjs.map +1 -0
  376. package/resources/memory/index.d.mts +3 -0
  377. package/resources/memory/index.d.mts.map +1 -0
  378. package/resources/memory/index.d.ts +3 -0
  379. package/resources/memory/index.d.ts.map +1 -0
  380. package/resources/memory/index.js +9 -0
  381. package/resources/memory/index.js.map +1 -0
  382. package/resources/memory/index.mjs +4 -0
  383. package/resources/memory/index.mjs.map +1 -0
  384. package/resources/memory/memory.d.mts +111 -0
  385. package/resources/memory/memory.d.mts.map +1 -0
  386. package/resources/memory/memory.d.ts +111 -0
  387. package/resources/memory/memory.d.ts.map +1 -0
  388. package/resources/memory/memory.js +116 -0
  389. package/resources/memory/memory.js.map +1 -0
  390. package/resources/memory/memory.mjs +111 -0
  391. package/resources/memory/memory.mjs.map +1 -0
  392. package/resources/memory.d.mts +2 -0
  393. package/resources/memory.d.mts.map +1 -0
  394. package/resources/memory.d.ts +2 -0
  395. package/resources/memory.d.ts.map +1 -0
  396. package/resources/memory.js +6 -0
  397. package/resources/memory.js.map +1 -0
  398. package/resources/memory.mjs +3 -0
  399. package/resources/memory.mjs.map +1 -0
  400. package/resources/messages.d.mts +106 -583
  401. package/resources/messages.d.mts.map +1 -1
  402. package/resources/messages.d.ts +106 -583
  403. package/resources/messages.d.ts.map +1 -1
  404. package/resources/messages.js +85 -75
  405. package/resources/messages.js.map +1 -1
  406. package/resources/messages.mjs +85 -75
  407. package/resources/messages.mjs.map +1 -1
  408. package/resources/number-10dlc/brands.d.mts +34 -204
  409. package/resources/number-10dlc/brands.d.mts.map +1 -1
  410. package/resources/number-10dlc/brands.d.ts +34 -204
  411. package/resources/number-10dlc/brands.d.ts.map +1 -1
  412. package/resources/number-10dlc/brands.js +21 -59
  413. package/resources/number-10dlc/brands.js.map +1 -1
  414. package/resources/number-10dlc/brands.mjs +21 -59
  415. package/resources/number-10dlc/brands.mjs.map +1 -1
  416. package/resources/number-10dlc/campaigns/campaigns.d.mts +32 -176
  417. package/resources/number-10dlc/campaigns/campaigns.d.mts.map +1 -1
  418. package/resources/number-10dlc/campaigns/campaigns.d.ts +32 -176
  419. package/resources/number-10dlc/campaigns/campaigns.d.ts.map +1 -1
  420. package/resources/number-10dlc/campaigns/campaigns.js +19 -62
  421. package/resources/number-10dlc/campaigns/campaigns.js.map +1 -1
  422. package/resources/number-10dlc/campaigns/campaigns.mjs +19 -62
  423. package/resources/number-10dlc/campaigns/campaigns.mjs.map +1 -1
  424. package/resources/number-10dlc/campaigns/index.js +1 -1
  425. package/resources/number-10dlc/campaigns/index.js.map +1 -1
  426. package/resources/number-10dlc/campaigns/index.mjs +1 -1
  427. package/resources/number-10dlc/campaigns/index.mjs.map +1 -1
  428. package/resources/number-10dlc/campaigns/phone-numbers.d.mts +21 -56
  429. package/resources/number-10dlc/campaigns/phone-numbers.d.mts.map +1 -1
  430. package/resources/number-10dlc/campaigns/phone-numbers.d.ts +21 -56
  431. package/resources/number-10dlc/campaigns/phone-numbers.d.ts.map +1 -1
  432. package/resources/number-10dlc/campaigns/phone-numbers.js +15 -26
  433. package/resources/number-10dlc/campaigns/phone-numbers.js.map +1 -1
  434. package/resources/number-10dlc/campaigns/phone-numbers.mjs +15 -26
  435. package/resources/number-10dlc/campaigns/phone-numbers.mjs.map +1 -1
  436. package/resources/number-10dlc/campaigns.js +1 -1
  437. package/resources/number-10dlc/campaigns.js.map +1 -1
  438. package/resources/number-10dlc/campaigns.mjs +1 -1
  439. package/resources/number-10dlc/campaigns.mjs.map +1 -1
  440. package/resources/number-10dlc/index.js +1 -1
  441. package/resources/number-10dlc/index.js.map +1 -1
  442. package/resources/number-10dlc/index.mjs +1 -1
  443. package/resources/number-10dlc/index.mjs.map +1 -1
  444. package/resources/number-10dlc/number-10dlc.d.mts +3 -4
  445. package/resources/number-10dlc/number-10dlc.d.mts.map +1 -1
  446. package/resources/number-10dlc/number-10dlc.d.ts +3 -4
  447. package/resources/number-10dlc/number-10dlc.d.ts.map +1 -1
  448. package/resources/number-10dlc/number-10dlc.js +1 -5
  449. package/resources/number-10dlc/number-10dlc.js.map +1 -1
  450. package/resources/number-10dlc/number-10dlc.mjs +1 -5
  451. package/resources/number-10dlc/number-10dlc.mjs.map +1 -1
  452. package/resources/number-10dlc.js +1 -1
  453. package/resources/number-10dlc.js.map +1 -1
  454. package/resources/number-10dlc.mjs +1 -1
  455. package/resources/number-10dlc.mjs.map +1 -1
  456. package/resources/phone-numbers.d.mts +95 -239
  457. package/resources/phone-numbers.d.mts.map +1 -1
  458. package/resources/phone-numbers.d.ts +95 -239
  459. package/resources/phone-numbers.d.ts.map +1 -1
  460. package/resources/phone-numbers.js +74 -54
  461. package/resources/phone-numbers.js.map +1 -1
  462. package/resources/phone-numbers.mjs +74 -54
  463. package/resources/phone-numbers.mjs.map +1 -1
  464. package/resources/regulatory-documents.d.mts +24 -78
  465. package/resources/regulatory-documents.d.mts.map +1 -1
  466. package/resources/regulatory-documents.d.ts +24 -78
  467. package/resources/regulatory-documents.d.ts.map +1 -1
  468. package/resources/regulatory-documents.js +16 -33
  469. package/resources/regulatory-documents.js.map +1 -1
  470. package/resources/regulatory-documents.mjs +16 -33
  471. package/resources/regulatory-documents.mjs.map +1 -1
  472. package/resources/senders/agent/agent.d.mts +44 -496
  473. package/resources/senders/agent/agent.d.mts.map +1 -1
  474. package/resources/senders/agent/agent.d.ts +44 -496
  475. package/resources/senders/agent/agent.d.ts.map +1 -1
  476. package/resources/senders/agent/agent.js +24 -49
  477. package/resources/senders/agent/agent.js.map +1 -1
  478. package/resources/senders/agent/agent.mjs +24 -49
  479. package/resources/senders/agent/agent.mjs.map +1 -1
  480. package/resources/senders/agent/executions.d.mts +13 -33
  481. package/resources/senders/agent/executions.d.mts.map +1 -1
  482. package/resources/senders/agent/executions.d.ts +13 -33
  483. package/resources/senders/agent/executions.d.ts.map +1 -1
  484. package/resources/senders/agent/executions.js +7 -18
  485. package/resources/senders/agent/executions.js.map +1 -1
  486. package/resources/senders/agent/executions.mjs +7 -18
  487. package/resources/senders/agent/executions.mjs.map +1 -1
  488. package/resources/senders/agent/flows.d.mts +34 -188
  489. package/resources/senders/agent/flows.d.mts.map +1 -1
  490. package/resources/senders/agent/flows.d.ts +34 -188
  491. package/resources/senders/agent/flows.d.ts.map +1 -1
  492. package/resources/senders/agent/flows.js +19 -69
  493. package/resources/senders/agent/flows.js.map +1 -1
  494. package/resources/senders/agent/flows.mjs +19 -69
  495. package/resources/senders/agent/flows.mjs.map +1 -1
  496. package/resources/senders/agent/index.js +1 -1
  497. package/resources/senders/agent/index.js.map +1 -1
  498. package/resources/senders/agent/index.mjs +1 -1
  499. package/resources/senders/agent/index.mjs.map +1 -1
  500. package/resources/senders/agent/knowledge-bases/documents.d.mts +27 -105
  501. package/resources/senders/agent/knowledge-bases/documents.d.mts.map +1 -1
  502. package/resources/senders/agent/knowledge-bases/documents.d.ts +27 -105
  503. package/resources/senders/agent/knowledge-bases/documents.d.ts.map +1 -1
  504. package/resources/senders/agent/knowledge-bases/documents.js +16 -47
  505. package/resources/senders/agent/knowledge-bases/documents.js.map +1 -1
  506. package/resources/senders/agent/knowledge-bases/documents.mjs +16 -47
  507. package/resources/senders/agent/knowledge-bases/documents.mjs.map +1 -1
  508. package/resources/senders/agent/knowledge-bases/index.js +1 -1
  509. package/resources/senders/agent/knowledge-bases/index.js.map +1 -1
  510. package/resources/senders/agent/knowledge-bases/index.mjs +1 -1
  511. package/resources/senders/agent/knowledge-bases/index.mjs.map +1 -1
  512. package/resources/senders/agent/knowledge-bases/knowledge-bases.d.mts +32 -113
  513. package/resources/senders/agent/knowledge-bases/knowledge-bases.d.mts.map +1 -1
  514. package/resources/senders/agent/knowledge-bases/knowledge-bases.d.ts +32 -113
  515. package/resources/senders/agent/knowledge-bases/knowledge-bases.d.ts.map +1 -1
  516. package/resources/senders/agent/knowledge-bases/knowledge-bases.js +17 -46
  517. package/resources/senders/agent/knowledge-bases/knowledge-bases.js.map +1 -1
  518. package/resources/senders/agent/knowledge-bases/knowledge-bases.mjs +17 -46
  519. package/resources/senders/agent/knowledge-bases/knowledge-bases.mjs.map +1 -1
  520. package/resources/senders/agent/knowledge-bases.js +1 -1
  521. package/resources/senders/agent/knowledge-bases.js.map +1 -1
  522. package/resources/senders/agent/knowledge-bases.mjs +1 -1
  523. package/resources/senders/agent/knowledge-bases.mjs.map +1 -1
  524. package/resources/senders/agent/tools/index.js +1 -1
  525. package/resources/senders/agent/tools/index.js.map +1 -1
  526. package/resources/senders/agent/tools/index.mjs +1 -1
  527. package/resources/senders/agent/tools/index.mjs.map +1 -1
  528. package/resources/senders/agent/tools/tools.d.mts +47 -280
  529. package/resources/senders/agent/tools/tools.d.mts.map +1 -1
  530. package/resources/senders/agent/tools/tools.d.ts +47 -280
  531. package/resources/senders/agent/tools/tools.d.ts.map +1 -1
  532. package/resources/senders/agent/tools/tools.js +25 -75
  533. package/resources/senders/agent/tools/tools.js.map +1 -1
  534. package/resources/senders/agent/tools/tools.mjs +25 -75
  535. package/resources/senders/agent/tools/tools.mjs.map +1 -1
  536. package/resources/senders/agent/tools/webhook.d.mts +6 -12
  537. package/resources/senders/agent/tools/webhook.d.mts.map +1 -1
  538. package/resources/senders/agent/tools/webhook.d.ts +6 -12
  539. package/resources/senders/agent/tools/webhook.d.ts.map +1 -1
  540. package/resources/senders/agent/tools/webhook.js +4 -9
  541. package/resources/senders/agent/tools/webhook.js.map +1 -1
  542. package/resources/senders/agent/tools/webhook.mjs +4 -9
  543. package/resources/senders/agent/tools/webhook.mjs.map +1 -1
  544. package/resources/senders/agent/tools.js +1 -1
  545. package/resources/senders/agent/tools.js.map +1 -1
  546. package/resources/senders/agent/tools.mjs +1 -1
  547. package/resources/senders/agent/tools.mjs.map +1 -1
  548. package/resources/senders/agent.js +1 -1
  549. package/resources/senders/agent.js.map +1 -1
  550. package/resources/senders/agent.mjs +1 -1
  551. package/resources/senders/agent.mjs.map +1 -1
  552. package/resources/senders/channels.d.mts +61 -0
  553. package/resources/senders/channels.d.mts.map +1 -0
  554. package/resources/senders/channels.d.ts +61 -0
  555. package/resources/senders/channels.d.ts.map +1 -0
  556. package/resources/senders/channels.js +60 -0
  557. package/resources/senders/channels.js.map +1 -0
  558. package/resources/senders/channels.mjs +56 -0
  559. package/resources/senders/channels.mjs.map +1 -0
  560. package/resources/senders/index.d.mts +1 -0
  561. package/resources/senders/index.d.mts.map +1 -1
  562. package/resources/senders/index.d.ts +1 -0
  563. package/resources/senders/index.d.ts.map +1 -1
  564. package/resources/senders/index.js +4 -2
  565. package/resources/senders/index.js.map +1 -1
  566. package/resources/senders/index.mjs +2 -1
  567. package/resources/senders/index.mjs.map +1 -1
  568. package/resources/senders/senders.d.mts +53 -514
  569. package/resources/senders/senders.d.mts.map +1 -1
  570. package/resources/senders/senders.d.ts +53 -514
  571. package/resources/senders/senders.d.ts.map +1 -1
  572. package/resources/senders/senders.js +30 -70
  573. package/resources/senders/senders.js.map +1 -1
  574. package/resources/senders/senders.mjs +30 -70
  575. package/resources/senders/senders.mjs.map +1 -1
  576. package/resources/senders/telegram.d.mts +10 -25
  577. package/resources/senders/telegram.d.mts.map +1 -1
  578. package/resources/senders/telegram.d.ts +10 -25
  579. package/resources/senders/telegram.d.ts.map +1 -1
  580. package/resources/senders/telegram.js +7 -12
  581. package/resources/senders/telegram.js.map +1 -1
  582. package/resources/senders/telegram.mjs +7 -12
  583. package/resources/senders/telegram.mjs.map +1 -1
  584. package/resources/senders/whatsapp-sync.d.mts +16 -104
  585. package/resources/senders/whatsapp-sync.d.mts.map +1 -1
  586. package/resources/senders/whatsapp-sync.d.ts +16 -104
  587. package/resources/senders/whatsapp-sync.d.ts.map +1 -1
  588. package/resources/senders/whatsapp-sync.js +10 -20
  589. package/resources/senders/whatsapp-sync.js.map +1 -1
  590. package/resources/senders/whatsapp-sync.mjs +10 -20
  591. package/resources/senders/whatsapp-sync.mjs.map +1 -1
  592. package/resources/senders.js +1 -1
  593. package/resources/senders.js.map +1 -1
  594. package/resources/senders.mjs +1 -1
  595. package/resources/senders.mjs.map +1 -1
  596. package/resources/sub-accounts/api-keys.d.mts +16 -57
  597. package/resources/sub-accounts/api-keys.d.mts.map +1 -1
  598. package/resources/sub-accounts/api-keys.d.ts +16 -57
  599. package/resources/sub-accounts/api-keys.d.ts.map +1 -1
  600. package/resources/sub-accounts/api-keys.js +10 -18
  601. package/resources/sub-accounts/api-keys.js.map +1 -1
  602. package/resources/sub-accounts/api-keys.mjs +10 -18
  603. package/resources/sub-accounts/api-keys.mjs.map +1 -1
  604. package/resources/sub-accounts/index.js +1 -1
  605. package/resources/sub-accounts/index.js.map +1 -1
  606. package/resources/sub-accounts/index.mjs +1 -1
  607. package/resources/sub-accounts/index.mjs.map +1 -1
  608. package/resources/sub-accounts/sub-accounts.d.mts +33 -125
  609. package/resources/sub-accounts/sub-accounts.d.mts.map +1 -1
  610. package/resources/sub-accounts/sub-accounts.d.ts +33 -125
  611. package/resources/sub-accounts/sub-accounts.d.ts.map +1 -1
  612. package/resources/sub-accounts/sub-accounts.js +20 -33
  613. package/resources/sub-accounts/sub-accounts.js.map +1 -1
  614. package/resources/sub-accounts/sub-accounts.mjs +20 -33
  615. package/resources/sub-accounts/sub-accounts.mjs.map +1 -1
  616. package/resources/sub-accounts.js +1 -1
  617. package/resources/sub-accounts.js.map +1 -1
  618. package/resources/sub-accounts.mjs +1 -1
  619. package/resources/sub-accounts.mjs.map +1 -1
  620. package/resources/templates.d.mts +46 -302
  621. package/resources/templates.d.mts.map +1 -1
  622. package/resources/templates.d.ts +46 -302
  623. package/resources/templates.d.ts.map +1 -1
  624. package/resources/templates.js +34 -51
  625. package/resources/templates.js.map +1 -1
  626. package/resources/templates.mjs +34 -51
  627. package/resources/templates.mjs.map +1 -1
  628. package/resources/urls.d.mts +27 -78
  629. package/resources/urls.d.mts.map +1 -1
  630. package/resources/urls.d.ts +27 -78
  631. package/resources/urls.d.ts.map +1 -1
  632. package/resources/urls.js +18 -28
  633. package/resources/urls.js.map +1 -1
  634. package/resources/urls.mjs +18 -28
  635. package/resources/urls.mjs.map +1 -1
  636. package/resources.d.mts.map +1 -1
  637. package/resources.d.ts.map +1 -1
  638. package/resources.js +1 -0
  639. package/resources.js.map +1 -1
  640. package/resources.mjs +1 -0
  641. package/resources.mjs.map +1 -1
  642. package/src/client.ts +273 -230
  643. package/src/core/api-promise.ts +0 -2
  644. package/src/core/error.ts +0 -2
  645. package/src/core/pagination.ts +0 -2
  646. package/src/core/resource.ts +0 -2
  647. package/src/index.ts +0 -2
  648. package/src/internal/builtin-types.ts +0 -2
  649. package/src/internal/detect-platform.ts +0 -2
  650. package/src/internal/errors.ts +0 -2
  651. package/src/internal/headers.ts +0 -2
  652. package/src/internal/parse.ts +0 -2
  653. package/src/internal/request-options.ts +0 -2
  654. package/src/internal/shim-types.ts +0 -2
  655. package/src/internal/shims.ts +0 -2
  656. package/src/internal/types.ts +0 -2
  657. package/src/internal/utils/base64.ts +0 -2
  658. package/src/internal/utils/env.ts +0 -2
  659. package/src/internal/utils/log.ts +0 -2
  660. package/src/internal/utils/query.ts +1 -3
  661. package/src/internal/utils/sleep.ts +0 -2
  662. package/src/internal/utils/uuid.ts +0 -2
  663. package/src/internal/utils/values.ts +0 -2
  664. package/src/internal/utils.ts +0 -2
  665. package/src/resources/addresses.ts +28 -97
  666. package/src/resources/agent-templates.ts +18 -89
  667. package/src/resources/agents/agents.ts +58 -472
  668. package/src/resources/agents/index.ts +1 -1
  669. package/src/resources/agents/senders.ts +11 -33
  670. package/src/resources/agents.ts +1 -1
  671. package/src/resources/balance.ts +7 -24
  672. package/src/resources/broadcasts/broadcasts.ts +92 -492
  673. package/src/resources/broadcasts/contacts.ts +20 -114
  674. package/src/resources/broadcasts/index.ts +1 -1
  675. package/src/resources/broadcasts.ts +1 -1
  676. package/src/resources/calls.ts +41 -560
  677. package/src/resources/contacts/channels.ts +21 -104
  678. package/src/resources/contacts/contacts.ts +42 -289
  679. package/src/resources/contacts/index.ts +1 -1
  680. package/src/resources/contacts.ts +1 -1
  681. package/src/resources/conversations.ts +33 -387
  682. package/src/resources/email-domains.ts +26 -253
  683. package/src/resources/functions/functions.ts +83 -669
  684. package/src/resources/functions/git-link.ts +26 -301
  685. package/src/resources/functions/index.ts +1 -1
  686. package/src/resources/functions/secrets.ts +16 -55
  687. package/src/resources/functions/triggers.ts +15 -149
  688. package/src/resources/functions.ts +1 -1
  689. package/src/resources/index.ts +21 -1
  690. package/src/resources/introspect.ts +16 -136
  691. package/src/resources/invitations/webhook.ts +93 -0
  692. package/src/resources/invitations.ts +45 -201
  693. package/src/resources/me.ts +10 -28
  694. package/src/resources/memory/collections/collections.ts +149 -0
  695. package/src/resources/memory/collections/index.ts +30 -0
  696. package/src/resources/memory/collections/items.ts +185 -0
  697. package/src/resources/memory/collections.ts +3 -0
  698. package/src/resources/memory/index.ts +34 -0
  699. package/src/resources/memory/memory.ts +211 -0
  700. package/src/resources/memory.ts +3 -0
  701. package/src/resources/messages.ts +106 -701
  702. package/src/resources/number-10dlc/brands.ts +35 -263
  703. package/src/resources/number-10dlc/campaigns/campaigns.ts +39 -239
  704. package/src/resources/number-10dlc/campaigns/index.ts +1 -1
  705. package/src/resources/number-10dlc/campaigns/phone-numbers.ts +31 -64
  706. package/src/resources/number-10dlc/campaigns.ts +1 -1
  707. package/src/resources/number-10dlc/index.ts +1 -1
  708. package/src/resources/number-10dlc/number-10dlc.ts +23 -29
  709. package/src/resources/number-10dlc.ts +1 -1
  710. package/src/resources/phone-numbers.ts +96 -280
  711. package/src/resources/regulatory-documents.ts +25 -106
  712. package/src/resources/senders/agent/agent.ts +91 -662
  713. package/src/resources/senders/agent/executions.ts +14 -35
  714. package/src/resources/senders/agent/flows.ts +35 -213
  715. package/src/resources/senders/agent/index.ts +1 -1
  716. package/src/resources/senders/agent/knowledge-bases/documents.ts +28 -114
  717. package/src/resources/senders/agent/knowledge-bases/index.ts +1 -1
  718. package/src/resources/senders/agent/knowledge-bases/knowledge-bases.ts +42 -143
  719. package/src/resources/senders/agent/knowledge-bases.ts +1 -1
  720. package/src/resources/senders/agent/tools/index.ts +1 -1
  721. package/src/resources/senders/agent/tools/tools.ts +48 -318
  722. package/src/resources/senders/agent/tools/webhook.ts +7 -13
  723. package/src/resources/senders/agent/tools.ts +1 -1
  724. package/src/resources/senders/agent.ts +1 -1
  725. package/src/resources/senders/channels.ts +95 -0
  726. package/src/resources/senders/index.ts +11 -1
  727. package/src/resources/senders/senders.ts +86 -634
  728. package/src/resources/senders/telegram.ts +11 -29
  729. package/src/resources/senders/whatsapp-sync.ts +17 -115
  730. package/src/resources/senders.ts +1 -1
  731. package/src/resources/sub-accounts/api-keys.ts +17 -73
  732. package/src/resources/sub-accounts/index.ts +1 -1
  733. package/src/resources/sub-accounts/sub-accounts.ts +38 -147
  734. package/src/resources/sub-accounts.ts +1 -1
  735. package/src/resources/templates.ts +47 -358
  736. package/src/resources/urls.ts +28 -86
  737. package/src/resources.ts +2 -0
  738. package/src/types.ts +5464 -0
  739. package/src/version.ts +3 -1
  740. package/types.d.mts +4901 -0
  741. package/types.d.mts.map +1 -0
  742. package/types.d.ts +4901 -0
  743. package/types.d.ts.map +1 -0
  744. package/types.js +4 -0
  745. package/types.js.map +1 -0
  746. package/types.mjs +3 -0
  747. package/types.mjs.map +1 -0
  748. package/version.d.mts +1 -1
  749. package/version.d.mts.map +1 -1
  750. package/version.d.ts +1 -1
  751. package/version.d.ts.map +1 -1
  752. package/version.js +2 -1
  753. package/version.js.map +1 -1
  754. package/version.mjs +2 -1
  755. package/version.mjs.map +1 -1
  756. package/src/lib/.keep +0 -4
@@ -1,34 +1,36 @@
1
1
  "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ // Generated by zavu-codegen from apps/docs/openapi.json. Do not edit: run `bun run codegen`.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Invitations = void 0;
5
+ const tslib_1 = require("../internal/tslib.js");
5
6
  const resource_1 = require("../core/resource.js");
6
7
  const pagination_1 = require("../core/pagination.js");
7
8
  const path_1 = require("../internal/utils/path.js");
9
+ const WebhookAPI = tslib_1.__importStar(require("./invitations/webhook.js"));
8
10
  class Invitations extends resource_1.APIResource {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.webhook = new WebhookAPI.Webhook(this._client);
14
+ }
9
15
  /**
16
+ * Create invitation
17
+ *
10
18
  * Create a partner invitation link for a client to connect a Meta channel. The
11
19
  * client opens the returned `url` and authorizes with Meta; the resulting sender
12
20
  * is created in your project when they finish, and the invitation transitions to
13
21
  * `completed`.
14
22
  *
15
23
  * `connectionType` picks the channel:
16
- *
17
24
  * - `whatsapp_waba` (default): Meta's embedded signup links an official WhatsApp
18
25
  * Business Account.
19
26
  * - `messenger`: the client picks a Facebook Page they administer; its Messenger
20
27
  * inbox (including Marketplace chats) is routed to Zavu.
21
28
  *
22
- * One invitation connects one channel — create one per channel to onboard a client
23
- * on several. `phoneNumberId` and `allowedPhoneCountries` apply to `whatsapp_waba`
24
- * only.
29
+ * One invitation connects one channel — create one per channel to onboard a
30
+ * client on several. `phoneNumberId` and `allowedPhoneCountries` apply to
31
+ * `whatsapp_waba` only.
25
32
  *
26
- * @example
27
- * ```ts
28
- * const invitation = await client.invitations.create({
29
- * clientName: 'Acme Corp',
30
- * });
31
- * ```
33
+ * `POST /v1/invitations`
32
34
  */
33
35
  create(body = {}, options) {
34
36
  return this._client.post('/v1/invitations', { body, ...options });
@@ -36,40 +38,28 @@ class Invitations extends resource_1.APIResource {
36
38
  /**
37
39
  * Get invitation
38
40
  *
39
- * @example
40
- * ```ts
41
- * const invitation = await client.invitations.retrieve(
42
- * 'invitationId',
43
- * );
44
- * ```
41
+ * `GET /v1/invitations/{invitationId}`
45
42
  */
46
43
  retrieve(invitationID, options) {
47
44
  return this._client.get((0, path_1.path) `/v1/invitations/${invitationID}`, options);
48
45
  }
49
46
  /**
47
+ * List invitations
48
+ *
50
49
  * List partner invitations for this project.
51
50
  *
52
- * @example
53
- * ```ts
54
- * // Automatically fetches more pages as needed.
55
- * for await (const invitation of client.invitations.list()) {
56
- * // ...
57
- * }
58
- * ```
51
+ * `GET /v1/invitations`
59
52
  */
60
53
  list(query = {}, options) {
61
54
  return this._client.getAPIList('/v1/invitations', (pagination_1.Cursor), { query, ...options });
62
55
  }
63
56
  /**
57
+ * Cancel invitation
58
+ *
64
59
  * Cancel an active invitation. The client will no longer be able to use the
65
60
  * invitation link.
66
61
  *
67
- * @example
68
- * ```ts
69
- * const response = await client.invitations.cancel(
70
- * 'invitationId',
71
- * );
72
- * ```
62
+ * `POST /v1/invitations/{invitationId}/cancel`
73
63
  */
74
64
  cancel(invitationID, options) {
75
65
  return this._client.post((0, path_1.path) `/v1/invitations/${invitationID}/cancel`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"invitations.js","sourceRoot":"","sources":["../src/resources/invitations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAA4E;AAE5E,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,MAAM,CACJ,OA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C;IAED;;;;OAIG;IACH,QAAQ,CAAC,YAAoB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,mBAAkB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,YAAoB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,mBAAmB,YAAY,SAAS,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACF;AAhED,kCAgEC"}
@@ -1,31 +1,32 @@
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
  import { APIResource } from "../core/resource.mjs";
3
3
  import { Cursor } from "../core/pagination.mjs";
4
4
  import { path } from "../internal/utils/path.mjs";
5
+ import * as WebhookAPI from "./invitations/webhook.mjs";
5
6
  export class Invitations extends APIResource {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.webhook = new WebhookAPI.Webhook(this._client);
10
+ }
6
11
  /**
12
+ * Create invitation
13
+ *
7
14
  * Create a partner invitation link for a client to connect a Meta channel. The
8
15
  * client opens the returned `url` and authorizes with Meta; the resulting sender
9
16
  * is created in your project when they finish, and the invitation transitions to
10
17
  * `completed`.
11
18
  *
12
19
  * `connectionType` picks the channel:
13
- *
14
20
  * - `whatsapp_waba` (default): Meta's embedded signup links an official WhatsApp
15
21
  * Business Account.
16
22
  * - `messenger`: the client picks a Facebook Page they administer; its Messenger
17
23
  * inbox (including Marketplace chats) is routed to Zavu.
18
24
  *
19
- * One invitation connects one channel — create one per channel to onboard a client
20
- * on several. `phoneNumberId` and `allowedPhoneCountries` apply to `whatsapp_waba`
21
- * only.
25
+ * One invitation connects one channel — create one per channel to onboard a
26
+ * client on several. `phoneNumberId` and `allowedPhoneCountries` apply to
27
+ * `whatsapp_waba` only.
22
28
  *
23
- * @example
24
- * ```ts
25
- * const invitation = await client.invitations.create({
26
- * clientName: 'Acme Corp',
27
- * });
28
- * ```
29
+ * `POST /v1/invitations`
29
30
  */
30
31
  create(body = {}, options) {
31
32
  return this._client.post('/v1/invitations', { body, ...options });
@@ -33,40 +34,28 @@ export class Invitations extends APIResource {
33
34
  /**
34
35
  * Get invitation
35
36
  *
36
- * @example
37
- * ```ts
38
- * const invitation = await client.invitations.retrieve(
39
- * 'invitationId',
40
- * );
41
- * ```
37
+ * `GET /v1/invitations/{invitationId}`
42
38
  */
43
39
  retrieve(invitationID, options) {
44
40
  return this._client.get(path `/v1/invitations/${invitationID}`, options);
45
41
  }
46
42
  /**
43
+ * List invitations
44
+ *
47
45
  * List partner invitations for this project.
48
46
  *
49
- * @example
50
- * ```ts
51
- * // Automatically fetches more pages as needed.
52
- * for await (const invitation of client.invitations.list()) {
53
- * // ...
54
- * }
55
- * ```
47
+ * `GET /v1/invitations`
56
48
  */
57
49
  list(query = {}, options) {
58
50
  return this._client.getAPIList('/v1/invitations', (Cursor), { query, ...options });
59
51
  }
60
52
  /**
53
+ * Cancel invitation
54
+ *
61
55
  * Cancel an active invitation. The client will no longer be able to use the
62
56
  * invitation link.
63
57
  *
64
- * @example
65
- * ```ts
66
- * const response = await client.invitations.cancel(
67
- * 'invitationId',
68
- * );
69
- * ```
58
+ * `POST /v1/invitations/{invitationId}/cancel`
70
59
  */
71
60
  cancel(invitationID, options) {
72
61
  return this._client.post(path `/v1/invitations/${invitationID}/cancel`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"invitations.mjs","sourceRoot":"","sources":["../src/resources/invitations.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Y,SAAQ,WAAW;IAA5C;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA+DrE,CAAC;IA7DC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CACJ,OAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,YAAoB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mBAAmB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,MAAkB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,YAAoB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,mBAAmB,YAAY,SAAS,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACF"}
@@ -1,32 +1,23 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
2
  import { APIPromise } from "../core/api-promise.mjs";
3
3
  import { RequestOptions } from "../internal/request-options.mjs";
4
+ import type * as T from "../types.mjs";
4
5
  export declare class Me extends APIResource {
5
6
  /**
7
+ * Get current API key context
8
+ *
6
9
  * Returns the project, team, and API key metadata bound to the current Bearer
7
10
  * token. Used by CLIs and SDKs to confirm which project they will operate on.
11
+ *
12
+ * `GET /v1/me`
8
13
  */
9
14
  retrieve(options?: RequestOptions): APIPromise<MeRetrieveResponse>;
10
15
  }
11
- export interface MeRetrieveResponse {
12
- apiKey: MeRetrieveResponse.APIKey;
13
- isTestMode: boolean;
14
- project: MeRetrieveResponse.Project;
15
- team: MeRetrieveResponse.Team;
16
- }
16
+ export type MeRetrieveResponse = T.GetMeResponse;
17
17
  export declare namespace MeRetrieveResponse {
18
- interface APIKey {
19
- id: string;
20
- }
21
- interface Project {
22
- id: string;
23
- isSubAccount: boolean;
24
- name: string | null;
25
- }
26
- interface Team {
27
- id: string;
28
- name: string | null;
29
- }
18
+ type APIKey = T.GetMeResponseApiKey;
19
+ type Project = T.GetMeResponseProject;
20
+ type Team = T.GetMeResponseTeam;
30
21
  }
31
22
  export declare namespace Me {
32
23
  export { type MeRetrieveResponse as MeRetrieveResponse };
@@ -1 +1 @@
1
- {"version":3,"file":"me.d.mts","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAGnE;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,kBAAkB,CAAC,MAAM,CAAC;IAElC,UAAU,EAAE,OAAO,CAAC;IAEpB,OAAO,EAAE,kBAAkB,CAAC,OAAO,CAAC;IAEpC,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;CAC/B;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,MAAM;QACrB,EAAE,EAAE,MAAM,CAAC;KACZ;IAED,UAAiB,OAAO;QACtB,EAAE,EAAE,MAAM,CAAC;QAEX,YAAY,EAAE,OAAO,CAAC;QAEtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;IAED,UAAiB,IAAI;QACnB,EAAE,EAAE,MAAM,CAAC;QAEX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC1D"}
1
+ {"version":3,"file":"me.d.mts","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAC7D,OAAO,KAAK,KAAK,CAAC,qBAAiB;AAEnC,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAGnE;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,aAAa,CAAC;AACjD,yBAAiB,kBAAkB,CAAC;IAClC,KAAY,MAAM,GAAG,CAAC,CAAC,mBAAmB,CAAC;IAC3C,KAAY,OAAO,GAAG,CAAC,CAAC,oBAAoB,CAAC;IAC7C,KAAY,IAAI,GAAG,CAAC,CAAC,iBAAiB,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC1D"}
package/resources/me.d.ts CHANGED
@@ -1,32 +1,23 @@
1
1
  import { APIResource } from "../core/resource.js";
2
2
  import { APIPromise } from "../core/api-promise.js";
3
3
  import { RequestOptions } from "../internal/request-options.js";
4
+ import type * as T from "../types.js";
4
5
  export declare class Me extends APIResource {
5
6
  /**
7
+ * Get current API key context
8
+ *
6
9
  * Returns the project, team, and API key metadata bound to the current Bearer
7
10
  * token. Used by CLIs and SDKs to confirm which project they will operate on.
11
+ *
12
+ * `GET /v1/me`
8
13
  */
9
14
  retrieve(options?: RequestOptions): APIPromise<MeRetrieveResponse>;
10
15
  }
11
- export interface MeRetrieveResponse {
12
- apiKey: MeRetrieveResponse.APIKey;
13
- isTestMode: boolean;
14
- project: MeRetrieveResponse.Project;
15
- team: MeRetrieveResponse.Team;
16
- }
16
+ export type MeRetrieveResponse = T.GetMeResponse;
17
17
  export declare namespace MeRetrieveResponse {
18
- interface APIKey {
19
- id: string;
20
- }
21
- interface Project {
22
- id: string;
23
- isSubAccount: boolean;
24
- name: string | null;
25
- }
26
- interface Team {
27
- id: string;
28
- name: string | null;
29
- }
18
+ type APIKey = T.GetMeResponseApiKey;
19
+ type Project = T.GetMeResponseProject;
20
+ type Team = T.GetMeResponseTeam;
30
21
  }
31
22
  export declare namespace Me {
32
23
  export { type MeRetrieveResponse as MeRetrieveResponse };
@@ -1 +1 @@
1
- {"version":3,"file":"me.d.ts","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAGnE;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,kBAAkB,CAAC,MAAM,CAAC;IAElC,UAAU,EAAE,OAAO,CAAC;IAEpB,OAAO,EAAE,kBAAkB,CAAC,OAAO,CAAC;IAEpC,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;CAC/B;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,MAAM;QACrB,EAAE,EAAE,MAAM,CAAC;KACZ;IAED,UAAiB,OAAO;QACtB,EAAE,EAAE,MAAM,CAAC;QAEX,YAAY,EAAE,OAAO,CAAC;QAEtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;IAED,UAAiB,IAAI;QACnB,EAAE,EAAE,MAAM,CAAC;QAEX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC1D"}
1
+ {"version":3,"file":"me.d.ts","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAC7D,OAAO,KAAK,KAAK,CAAC,oBAAiB;AAEnC,qBAAa,EAAG,SAAQ,WAAW;IACjC;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAGnE;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,aAAa,CAAC;AACjD,yBAAiB,kBAAkB,CAAC;IAClC,KAAY,MAAM,GAAG,CAAC,CAAC,mBAAmB,CAAC;IAC3C,KAAY,OAAO,GAAG,CAAC,CAAC,oBAAoB,CAAC;IAC7C,KAAY,IAAI,GAAG,CAAC,CAAC,iBAAiB,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC1D"}
package/resources/me.js CHANGED
@@ -1,12 +1,16 @@
1
1
  "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ // Generated by zavu-codegen from apps/docs/openapi.json. Do not edit: run `bun run codegen`.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Me = void 0;
5
5
  const resource_1 = require("../core/resource.js");
6
6
  class Me extends resource_1.APIResource {
7
7
  /**
8
+ * Get current API key context
9
+ *
8
10
  * Returns the project, team, and API key metadata bound to the current Bearer
9
11
  * token. Used by CLIs and SDKs to confirm which project they will operate on.
12
+ *
13
+ * `GET /v1/me`
10
14
  */
11
15
  retrieve(options) {
12
16
  return this._client.get('/v1/me', options);
@@ -1 +1 @@
1
- {"version":3,"file":"me.js","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,EAAG,SAAQ,sBAAW;IACjC;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;CACF;AARD,gBAQC"}
1
+ {"version":3,"file":"me.js","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":";AAAA,6FAA6F;;;AAE7F,kDAA+C;AAK/C,MAAa,EAAG,SAAQ,sBAAW;IACjC;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;CACF;AAZD,gBAYC"}
package/resources/me.mjs CHANGED
@@ -1,9 +1,13 @@
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
  import { APIResource } from "../core/resource.mjs";
3
3
  export class Me extends APIResource {
4
4
  /**
5
+ * Get current API key context
6
+ *
5
7
  * Returns the project, team, and API key metadata bound to the current Bearer
6
8
  * token. Used by CLIs and SDKs to confirm which project they will operate on.
9
+ *
10
+ * `GET /v1/me`
7
11
  */
8
12
  retrieve(options) {
9
13
  return this._client.get('/v1/me', options);
@@ -1 +1 @@
1
- {"version":3,"file":"me.mjs","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,EAAG,SAAQ,WAAW;IACjC;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;CACF"}
1
+ {"version":3,"file":"me.mjs","sourceRoot":"","sources":["../src/resources/me.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAK/C,MAAM,OAAO,EAAG,SAAQ,WAAW;IACjC;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;CACF"}
@@ -0,0 +1,75 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import { APIPromise } from "../../../core/api-promise.mjs";
3
+ import { Cursor, PagePromise } from "../../../core/pagination.mjs";
4
+ import { RequestOptions } from "../../../internal/request-options.mjs";
5
+ import type * as T from "../../../types.mjs";
6
+ import * as ItemsAPI from "./items.mjs";
7
+ import { Items, type ItemListParams, type MemoryItem, type MemoryItemsCursor, type ItemBatchParams, type ItemBatchResponse, type MemoryItemBatchResponse, type ItemPutParams, type ItemPutResponse, type ItemRetrieveParams, type ItemRetrieveResponse, type ItemDeleteParams, type ItemQueryParams, type ItemQueryResponse } from "./items.mjs";
8
+ export declare class Collections extends APIResource {
9
+ items: ItemsAPI.Items;
10
+ /**
11
+ * Create a collection
12
+ *
13
+ * Declare a collection of JSON documents addressed by key. This is the counterpart
14
+ * to facts: `POST /v1/memory` recalls by meaning, a collection recalls by key.
15
+ *
16
+ * **Create it explicitly when you need `query`.** Writing to an unknown collection
17
+ * creates it implicitly, but with no indexes — and indexes cannot be added
18
+ * afterwards. If you will ever look items up by a field rather than by key,
19
+ * declare that field here, before the first write.
20
+ *
21
+ * A collection is defined once for the project. Its ITEMS are per-scope, so the
22
+ * same collection holds a separate set of documents for the project, for each
23
+ * contact, and for each conversation.
24
+ *
25
+ * `POST /v1/memory/collections`
26
+ */
27
+ create(body: CollectionCreateParams, options?: RequestOptions): APIPromise<CollectionCreateResponse>;
28
+ /**
29
+ * List collections
30
+ *
31
+ * `GET /v1/memory/collections`
32
+ */
33
+ list(query?: CollectionListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryCollectionsCursor, MemoryCollection>;
34
+ /**
35
+ * Get a collection
36
+ *
37
+ * The collection's definition: its indexes, default TTL and status. Collections
38
+ * are project-level, so this takes no scope.
39
+ *
40
+ * `GET /v1/memory/collections/{collection}`
41
+ */
42
+ retrieve(collection: string, options?: RequestOptions): APIPromise<CollectionRetrieveResponse>;
43
+ /**
44
+ * Update a collection
45
+ *
46
+ * Only `defaultTtlSeconds` can change. Indexes are fixed at creation: changing
47
+ * them would require rewriting every item in the collection.
48
+ *
49
+ * `PATCH /v1/memory/collections/{collection}`
50
+ */
51
+ update(collection: string, body: CollectionUpdateParams, options?: RequestOptions): APIPromise<CollectionUpdateResponse>;
52
+ /**
53
+ * Delete a collection
54
+ *
55
+ * Delete the collection and every item it holds, **in every scope** — the
56
+ * per-contact and per-conversation copies included. Returns immediately; the purge
57
+ * drains in batches and writes are refused while `status` is `deleting`.
58
+ *
59
+ * `DELETE /v1/memory/collections/{collection}`
60
+ */
61
+ delete(collection: string, options?: RequestOptions): APIPromise<CollectionDeleteResponse>;
62
+ }
63
+ export type CollectionCreateParams = T.MemoryCollectionsCreateParams;
64
+ export type CollectionCreateResponse = T.CreateMemoryCollectionResponse;
65
+ export type MemoryCollection = T.MemoryCollection;
66
+ export type CollectionListParams = T.MemoryCollectionsListParams;
67
+ export type MemoryCollectionsCursor = Cursor<T.MemoryCollection>;
68
+ export type CollectionRetrieveResponse = T.GetMemoryCollectionResponse;
69
+ export type CollectionUpdateParams = T.MemoryCollectionsUpdateParams;
70
+ export type CollectionUpdateResponse = T.UpdateMemoryCollectionResponse;
71
+ export type CollectionDeleteResponse = T.DeleteMemoryCollectionResponse;
72
+ export declare namespace Collections {
73
+ export { type CollectionCreateParams as CollectionCreateParams, type CollectionCreateResponse as CollectionCreateResponse, type CollectionDeleteResponse as CollectionDeleteResponse, type CollectionListParams as CollectionListParams, type CollectionRetrieveResponse as CollectionRetrieveResponse, type CollectionUpdateParams as CollectionUpdateParams, type CollectionUpdateResponse as CollectionUpdateResponse, type MemoryCollection as MemoryCollection, type MemoryCollectionsCursor as MemoryCollectionsCursor, Items as Items, type ItemListParams as ItemListParams, type MemoryItem as MemoryItem, type MemoryItemsCursor as MemoryItemsCursor, type ItemBatchParams as ItemBatchParams, type ItemBatchResponse as ItemBatchResponse, type MemoryItemBatchResponse as MemoryItemBatchResponse, type ItemPutParams as ItemPutParams, type ItemPutResponse as ItemPutResponse, type ItemRetrieveParams as ItemRetrieveParams, type ItemRetrieveResponse as ItemRetrieveResponse, type ItemDeleteParams as ItemDeleteParams, type ItemQueryParams as ItemQueryParams, type ItemQueryResponse as ItemQueryResponse, };
74
+ }
75
+ //# sourceMappingURL=collections.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.d.mts","sourceRoot":"","sources":["../../../src/resources/memory/collections/collections.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,qCAAiC;AAC/D,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAEnE,OAAO,KAAK,KAAK,CAAC,2BAAuB;AACzC,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EACL,KAAK,EACL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EAC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B,CAAC;AAErE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,8BAA8B,CAAC;AAExE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,8BAA8B,CAAC;AAExE,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,IAAI,KAAK,EACd,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -0,0 +1,75 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import { APIPromise } from "../../../core/api-promise.js";
3
+ import { Cursor, PagePromise } from "../../../core/pagination.js";
4
+ import { RequestOptions } from "../../../internal/request-options.js";
5
+ import type * as T from "../../../types.js";
6
+ import * as ItemsAPI from "./items.js";
7
+ import { Items, type ItemListParams, type MemoryItem, type MemoryItemsCursor, type ItemBatchParams, type ItemBatchResponse, type MemoryItemBatchResponse, type ItemPutParams, type ItemPutResponse, type ItemRetrieveParams, type ItemRetrieveResponse, type ItemDeleteParams, type ItemQueryParams, type ItemQueryResponse } from "./items.js";
8
+ export declare class Collections extends APIResource {
9
+ items: ItemsAPI.Items;
10
+ /**
11
+ * Create a collection
12
+ *
13
+ * Declare a collection of JSON documents addressed by key. This is the counterpart
14
+ * to facts: `POST /v1/memory` recalls by meaning, a collection recalls by key.
15
+ *
16
+ * **Create it explicitly when you need `query`.** Writing to an unknown collection
17
+ * creates it implicitly, but with no indexes — and indexes cannot be added
18
+ * afterwards. If you will ever look items up by a field rather than by key,
19
+ * declare that field here, before the first write.
20
+ *
21
+ * A collection is defined once for the project. Its ITEMS are per-scope, so the
22
+ * same collection holds a separate set of documents for the project, for each
23
+ * contact, and for each conversation.
24
+ *
25
+ * `POST /v1/memory/collections`
26
+ */
27
+ create(body: CollectionCreateParams, options?: RequestOptions): APIPromise<CollectionCreateResponse>;
28
+ /**
29
+ * List collections
30
+ *
31
+ * `GET /v1/memory/collections`
32
+ */
33
+ list(query?: CollectionListParams | null | undefined, options?: RequestOptions): PagePromise<MemoryCollectionsCursor, MemoryCollection>;
34
+ /**
35
+ * Get a collection
36
+ *
37
+ * The collection's definition: its indexes, default TTL and status. Collections
38
+ * are project-level, so this takes no scope.
39
+ *
40
+ * `GET /v1/memory/collections/{collection}`
41
+ */
42
+ retrieve(collection: string, options?: RequestOptions): APIPromise<CollectionRetrieveResponse>;
43
+ /**
44
+ * Update a collection
45
+ *
46
+ * Only `defaultTtlSeconds` can change. Indexes are fixed at creation: changing
47
+ * them would require rewriting every item in the collection.
48
+ *
49
+ * `PATCH /v1/memory/collections/{collection}`
50
+ */
51
+ update(collection: string, body: CollectionUpdateParams, options?: RequestOptions): APIPromise<CollectionUpdateResponse>;
52
+ /**
53
+ * Delete a collection
54
+ *
55
+ * Delete the collection and every item it holds, **in every scope** — the
56
+ * per-contact and per-conversation copies included. Returns immediately; the purge
57
+ * drains in batches and writes are refused while `status` is `deleting`.
58
+ *
59
+ * `DELETE /v1/memory/collections/{collection}`
60
+ */
61
+ delete(collection: string, options?: RequestOptions): APIPromise<CollectionDeleteResponse>;
62
+ }
63
+ export type CollectionCreateParams = T.MemoryCollectionsCreateParams;
64
+ export type CollectionCreateResponse = T.CreateMemoryCollectionResponse;
65
+ export type MemoryCollection = T.MemoryCollection;
66
+ export type CollectionListParams = T.MemoryCollectionsListParams;
67
+ export type MemoryCollectionsCursor = Cursor<T.MemoryCollection>;
68
+ export type CollectionRetrieveResponse = T.GetMemoryCollectionResponse;
69
+ export type CollectionUpdateParams = T.MemoryCollectionsUpdateParams;
70
+ export type CollectionUpdateResponse = T.UpdateMemoryCollectionResponse;
71
+ export type CollectionDeleteResponse = T.DeleteMemoryCollectionResponse;
72
+ export declare namespace Collections {
73
+ export { type CollectionCreateParams as CollectionCreateParams, type CollectionCreateResponse as CollectionCreateResponse, type CollectionDeleteResponse as CollectionDeleteResponse, type CollectionListParams as CollectionListParams, type CollectionRetrieveResponse as CollectionRetrieveResponse, type CollectionUpdateParams as CollectionUpdateParams, type CollectionUpdateResponse as CollectionUpdateResponse, type MemoryCollection as MemoryCollection, type MemoryCollectionsCursor as MemoryCollectionsCursor, Items as Items, type ItemListParams as ItemListParams, type MemoryItem as MemoryItem, type MemoryItemsCursor as MemoryItemsCursor, type ItemBatchParams as ItemBatchParams, type ItemBatchResponse as ItemBatchResponse, type MemoryItemBatchResponse as MemoryItemBatchResponse, type ItemPutParams as ItemPutParams, type ItemPutResponse as ItemPutResponse, type ItemRetrieveParams as ItemRetrieveParams, type ItemRetrieveResponse as ItemRetrieveResponse, type ItemDeleteParams as ItemDeleteParams, type ItemQueryParams as ItemQueryParams, type ItemQueryResponse as ItemQueryResponse, };
74
+ }
75
+ //# sourceMappingURL=collections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/resources/memory/collections/collections.ts"],"names":[],"mappings":"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AK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ // Generated by zavu-codegen from apps/docs/openapi.json. Do not edit: run `bun run codegen`.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Collections = void 0;
5
+ const tslib_1 = require("../../../internal/tslib.js");
6
+ const resource_1 = require("../../../core/resource.js");
7
+ const pagination_1 = require("../../../core/pagination.js");
8
+ const path_1 = require("../../../internal/utils/path.js");
9
+ const ItemsAPI = tslib_1.__importStar(require("./items.js"));
10
+ class Collections extends resource_1.APIResource {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.items = new ItemsAPI.Items(this._client);
14
+ }
15
+ /**
16
+ * Create a collection
17
+ *
18
+ * Declare a collection of JSON documents addressed by key. This is the counterpart
19
+ * to facts: `POST /v1/memory` recalls by meaning, a collection recalls by key.
20
+ *
21
+ * **Create it explicitly when you need `query`.** Writing to an unknown collection
22
+ * creates it implicitly, but with no indexes — and indexes cannot be added
23
+ * afterwards. If you will ever look items up by a field rather than by key,
24
+ * declare that field here, before the first write.
25
+ *
26
+ * A collection is defined once for the project. Its ITEMS are per-scope, so the
27
+ * same collection holds a separate set of documents for the project, for each
28
+ * contact, and for each conversation.
29
+ *
30
+ * `POST /v1/memory/collections`
31
+ */
32
+ create(body, options) {
33
+ return this._client.post('/v1/memory/collections', { body, ...options });
34
+ }
35
+ /**
36
+ * List collections
37
+ *
38
+ * `GET /v1/memory/collections`
39
+ */
40
+ list(query = {}, options) {
41
+ return this._client.getAPIList('/v1/memory/collections', (pagination_1.Cursor), { query, ...options });
42
+ }
43
+ /**
44
+ * Get a collection
45
+ *
46
+ * The collection's definition: its indexes, default TTL and status. Collections
47
+ * are project-level, so this takes no scope.
48
+ *
49
+ * `GET /v1/memory/collections/{collection}`
50
+ */
51
+ retrieve(collection, options) {
52
+ return this._client.get((0, path_1.path) `/v1/memory/collections/${collection}`, options);
53
+ }
54
+ /**
55
+ * Update a collection
56
+ *
57
+ * Only `defaultTtlSeconds` can change. Indexes are fixed at creation: changing
58
+ * them would require rewriting every item in the collection.
59
+ *
60
+ * `PATCH /v1/memory/collections/{collection}`
61
+ */
62
+ update(collection, body, options) {
63
+ return this._client.patch((0, path_1.path) `/v1/memory/collections/${collection}`, { body, ...options });
64
+ }
65
+ /**
66
+ * Delete a collection
67
+ *
68
+ * Delete the collection and every item it holds, **in every scope** — the
69
+ * per-contact and per-conversation copies included. Returns immediately; the purge
70
+ * drains in batches and writes are refused while `status` is `deleting`.
71
+ *
72
+ * `DELETE /v1/memory/collections/{collection}`
73
+ */
74
+ delete(collection, options) {
75
+ return this._client.delete((0, path_1.path) `/v1/memory/collections/${collection}`, options);
76
+ }
77
+ }
78
+ exports.Collections = Collections;
79
+ //# sourceMappingURL=collections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.js","sourceRoot":"","sources":["../../../src/resources/memory/collections/collections.ts"],"names":[],"mappings":";AAAA,6FAA6F;;;;AAE7F,wDAAqD;AAErD,4DAA+D;AAE/D,0DAAoD;AAEpD,6DAAoC;AAkBpC,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2E3D,CAAC;IAzEC;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;OAIG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB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