@agentuity/server 1.0.32 → 1.0.34

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 (562) hide show
  1. package/dist/api/api.d.ts +1 -227
  2. package/dist/api/api.d.ts.map +1 -1
  3. package/dist/api/api.js +1 -637
  4. package/dist/api/api.js.map +1 -1
  5. package/dist/api/index.d.ts +1 -17
  6. package/dist/api/index.d.ts.map +1 -1
  7. package/dist/api/index.js +1 -17
  8. package/dist/api/index.js.map +1 -1
  9. package/dist/api/org/env-delete.d.ts +1 -22
  10. package/dist/api/org/env-delete.d.ts.map +1 -1
  11. package/dist/api/org/env-delete.js +1 -24
  12. package/dist/api/org/env-delete.js.map +1 -1
  13. package/dist/api/org/env-get.d.ts +1 -32
  14. package/dist/api/org/env-get.d.ts.map +1 -1
  15. package/dist/api/org/env-get.js +1 -25
  16. package/dist/api/org/env-get.js.map +1 -1
  17. package/dist/api/org/env-update.d.ts +1 -23
  18. package/dist/api/org/env-update.d.ts.map +1 -1
  19. package/dist/api/org/env-update.js +1 -25
  20. package/dist/api/org/env-update.js.map +1 -1
  21. package/dist/api/project/get.d.ts +1 -42
  22. package/dist/api/project/get.d.ts.map +1 -1
  23. package/dist/api/project/get.js +1 -35
  24. package/dist/api/project/get.js.map +1 -1
  25. package/dist/api/project/list.d.ts +1 -47
  26. package/dist/api/project/list.d.ts.map +1 -1
  27. package/dist/api/project/list.js +1 -37
  28. package/dist/api/project/list.js.map +1 -1
  29. package/dist/api/project/malware.d.ts +1 -70
  30. package/dist/api/project/malware.d.ts.map +1 -1
  31. package/dist/api/project/malware.js +1 -41
  32. package/dist/api/project/malware.js.map +1 -1
  33. package/dist/api/region/create.d.ts +1 -80
  34. package/dist/api/region/create.d.ts.map +1 -1
  35. package/dist/api/region/create.js +1 -176
  36. package/dist/api/region/create.js.map +1 -1
  37. package/dist/api/sandbox/client.d.ts +1 -190
  38. package/dist/api/sandbox/client.d.ts.map +1 -1
  39. package/dist/api/sandbox/client.js +1 -260
  40. package/dist/api/sandbox/client.js.map +1 -1
  41. package/dist/api/sandbox/pause.d.ts +1 -21
  42. package/dist/api/sandbox/pause.d.ts.map +1 -1
  43. package/dist/api/sandbox/pause.js +1 -24
  44. package/dist/api/sandbox/pause.js.map +1 -1
  45. package/dist/api/sandbox/resume.d.ts +1 -21
  46. package/dist/api/sandbox/resume.d.ts.map +1 -1
  47. package/dist/api/sandbox/resume.js +1 -24
  48. package/dist/api/sandbox/resume.js.map +1 -1
  49. package/dist/api/sandbox/util.d.ts +1 -284
  50. package/dist/api/sandbox/util.d.ts.map +1 -1
  51. package/dist/api/sandbox/util.js +1 -210
  52. package/dist/api/sandbox/util.js.map +1 -1
  53. package/dist/api/user/whoami.d.ts +1 -38
  54. package/dist/api/user/whoami.d.ts.map +1 -1
  55. package/dist/api/user/whoami.js +1 -26
  56. package/dist/api/user/whoami.js.map +1 -1
  57. package/dist/index.d.ts +1 -4
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +3 -12
  60. package/dist/index.js.map +1 -1
  61. package/package.json +4 -4
  62. package/src/api/api.ts +1 -936
  63. package/src/api/index.ts +1 -17
  64. package/src/api/org/env-delete.ts +1 -37
  65. package/src/api/org/env-get.ts +1 -43
  66. package/src/api/org/env-update.ts +1 -38
  67. package/src/api/project/get.ts +1 -49
  68. package/src/api/project/list.ts +1 -54
  69. package/src/api/project/malware.ts +1 -68
  70. package/src/api/region/create.ts +1 -207
  71. package/src/api/sandbox/client.ts +1 -460
  72. package/src/api/sandbox/pause.ts +1 -39
  73. package/src/api/sandbox/resume.ts +1 -39
  74. package/src/api/sandbox/util.ts +1 -276
  75. package/src/api/user/whoami.ts +1 -32
  76. package/src/index.ts +3 -30
  77. package/dist/api/apikey/create.d.ts +0 -33
  78. package/dist/api/apikey/create.d.ts.map +0 -1
  79. package/dist/api/apikey/create.js +0 -23
  80. package/dist/api/apikey/create.js.map +0 -1
  81. package/dist/api/apikey/delete.d.ts +0 -19
  82. package/dist/api/apikey/delete.d.ts.map +0 -1
  83. package/dist/api/apikey/delete.js +0 -19
  84. package/dist/api/apikey/delete.js.map +0 -1
  85. package/dist/api/apikey/get.d.ts +0 -45
  86. package/dist/api/apikey/get.d.ts.map +0 -1
  87. package/dist/api/apikey/get.js +0 -36
  88. package/dist/api/apikey/get.js.map +0 -1
  89. package/dist/api/apikey/index.d.ts +0 -6
  90. package/dist/api/apikey/index.d.ts.map +0 -1
  91. package/dist/api/apikey/index.js +0 -6
  92. package/dist/api/apikey/index.js.map +0 -1
  93. package/dist/api/apikey/list.d.ts +0 -64
  94. package/dist/api/apikey/list.d.ts.map +0 -1
  95. package/dist/api/apikey/list.js +0 -46
  96. package/dist/api/apikey/list.js.map +0 -1
  97. package/dist/api/apikey/util.d.ts +0 -23
  98. package/dist/api/apikey/util.d.ts.map +0 -1
  99. package/dist/api/apikey/util.js +0 -3
  100. package/dist/api/apikey/util.js.map +0 -1
  101. package/dist/api/db/index.d.ts +0 -5
  102. package/dist/api/db/index.d.ts.map +0 -1
  103. package/dist/api/db/index.js +0 -5
  104. package/dist/api/db/index.js.map +0 -1
  105. package/dist/api/db/logs.d.ts +0 -70
  106. package/dist/api/db/logs.d.ts.map +0 -1
  107. package/dist/api/db/logs.js +0 -59
  108. package/dist/api/db/logs.js.map +0 -1
  109. package/dist/api/db/query.d.ts +0 -39
  110. package/dist/api/db/query.d.ts.map +0 -1
  111. package/dist/api/db/query.js +0 -49
  112. package/dist/api/db/query.js.map +0 -1
  113. package/dist/api/db/tables.d.ts +0 -49
  114. package/dist/api/db/tables.d.ts.map +0 -1
  115. package/dist/api/db/tables.js +0 -59
  116. package/dist/api/db/tables.js.map +0 -1
  117. package/dist/api/db/util.d.ts +0 -31
  118. package/dist/api/db/util.d.ts.map +0 -1
  119. package/dist/api/db/util.js +0 -4
  120. package/dist/api/db/util.js.map +0 -1
  121. package/dist/api/eval/get.d.ts +0 -36
  122. package/dist/api/eval/get.d.ts.map +0 -1
  123. package/dist/api/eval/get.js +0 -23
  124. package/dist/api/eval/get.js.map +0 -1
  125. package/dist/api/eval/index.d.ts +0 -5
  126. package/dist/api/eval/index.d.ts.map +0 -1
  127. package/dist/api/eval/index.js +0 -5
  128. package/dist/api/eval/index.js.map +0 -1
  129. package/dist/api/eval/list.d.ts +0 -50
  130. package/dist/api/eval/list.d.ts.map +0 -1
  131. package/dist/api/eval/list.js +0 -32
  132. package/dist/api/eval/list.js.map +0 -1
  133. package/dist/api/eval/run-get.d.ts +0 -48
  134. package/dist/api/eval/run-get.d.ts.map +0 -1
  135. package/dist/api/eval/run-get.js +0 -29
  136. package/dist/api/eval/run-get.js.map +0 -1
  137. package/dist/api/eval/run-list.d.ts +0 -70
  138. package/dist/api/eval/run-list.d.ts.map +0 -1
  139. package/dist/api/eval/run-list.js +0 -42
  140. package/dist/api/eval/run-list.js.map +0 -1
  141. package/dist/api/machine/index.d.ts +0 -3
  142. package/dist/api/machine/index.d.ts.map +0 -1
  143. package/dist/api/machine/index.js +0 -3
  144. package/dist/api/machine/index.js.map +0 -1
  145. package/dist/api/machine/machine.d.ts +0 -192
  146. package/dist/api/machine/machine.d.ts.map +0 -1
  147. package/dist/api/machine/machine.js +0 -109
  148. package/dist/api/machine/machine.js.map +0 -1
  149. package/dist/api/machine/util.d.ts +0 -14
  150. package/dist/api/machine/util.d.ts.map +0 -1
  151. package/dist/api/machine/util.js +0 -3
  152. package/dist/api/machine/util.js.map +0 -1
  153. package/dist/api/org/index.d.ts +0 -7
  154. package/dist/api/org/index.d.ts.map +0 -1
  155. package/dist/api/org/index.js +0 -7
  156. package/dist/api/org/index.js.map +0 -1
  157. package/dist/api/org/list.d.ts +0 -27
  158. package/dist/api/org/list.d.ts.map +0 -1
  159. package/dist/api/org/list.js +0 -22
  160. package/dist/api/org/list.js.map +0 -1
  161. package/dist/api/org/resources.d.ts +0 -141
  162. package/dist/api/org/resources.d.ts.map +0 -1
  163. package/dist/api/org/resources.js +0 -97
  164. package/dist/api/org/resources.js.map +0 -1
  165. package/dist/api/org/util.d.ts +0 -45
  166. package/dist/api/org/util.d.ts.map +0 -1
  167. package/dist/api/org/util.js +0 -4
  168. package/dist/api/org/util.js.map +0 -1
  169. package/dist/api/project/agent.d.ts +0 -89
  170. package/dist/api/project/agent.d.ts.map +0 -1
  171. package/dist/api/project/agent.js +0 -60
  172. package/dist/api/project/agent.js.map +0 -1
  173. package/dist/api/project/create.d.ts +0 -37
  174. package/dist/api/project/create.d.ts.map +0 -1
  175. package/dist/api/project/create.js +0 -31
  176. package/dist/api/project/create.js.map +0 -1
  177. package/dist/api/project/delete.d.ts +0 -15
  178. package/dist/api/project/delete.d.ts.map +0 -1
  179. package/dist/api/project/delete.js +0 -13
  180. package/dist/api/project/delete.js.map +0 -1
  181. package/dist/api/project/deploy.d.ts +0 -490
  182. package/dist/api/project/deploy.d.ts.map +0 -1
  183. package/dist/api/project/deploy.js +0 -313
  184. package/dist/api/project/deploy.js.map +0 -1
  185. package/dist/api/project/deployment.d.ts +0 -237
  186. package/dist/api/project/deployment.d.ts.map +0 -1
  187. package/dist/api/project/deployment.js +0 -127
  188. package/dist/api/project/deployment.js.map +0 -1
  189. package/dist/api/project/env-delete.d.ts +0 -22
  190. package/dist/api/project/env-delete.d.ts.map +0 -1
  191. package/dist/api/project/env-delete.js +0 -29
  192. package/dist/api/project/env-delete.js.map +0 -1
  193. package/dist/api/project/env-update.d.ts +0 -31
  194. package/dist/api/project/env-update.d.ts.map +0 -1
  195. package/dist/api/project/env-update.js +0 -36
  196. package/dist/api/project/env-update.js.map +0 -1
  197. package/dist/api/project/exists.d.ts +0 -25
  198. package/dist/api/project/exists.d.ts.map +0 -1
  199. package/dist/api/project/exists.js +0 -45
  200. package/dist/api/project/exists.js.map +0 -1
  201. package/dist/api/project/hostname.d.ts +0 -25
  202. package/dist/api/project/hostname.d.ts.map +0 -1
  203. package/dist/api/project/hostname.js +0 -37
  204. package/dist/api/project/hostname.js.map +0 -1
  205. package/dist/api/project/index.d.ts +0 -14
  206. package/dist/api/project/index.d.ts.map +0 -1
  207. package/dist/api/project/index.js +0 -14
  208. package/dist/api/project/index.js.map +0 -1
  209. package/dist/api/project/update-region.d.ts +0 -27
  210. package/dist/api/project/update-region.d.ts.map +0 -1
  211. package/dist/api/project/update-region.js +0 -25
  212. package/dist/api/project/update-region.js.map +0 -1
  213. package/dist/api/project/util.d.ts +0 -62
  214. package/dist/api/project/util.d.ts.map +0 -1
  215. package/dist/api/project/util.js +0 -6
  216. package/dist/api/project/util.js.map +0 -1
  217. package/dist/api/queue/analytics.d.ts +0 -250
  218. package/dist/api/queue/analytics.d.ts.map +0 -1
  219. package/dist/api/queue/analytics.js +0 -233
  220. package/dist/api/queue/analytics.js.map +0 -1
  221. package/dist/api/queue/destinations.d.ts +0 -202
  222. package/dist/api/queue/destinations.d.ts.map +0 -1
  223. package/dist/api/queue/destinations.js +0 -168
  224. package/dist/api/queue/destinations.js.map +0 -1
  225. package/dist/api/queue/dlq.d.ts +0 -168
  226. package/dist/api/queue/dlq.d.ts.map +0 -1
  227. package/dist/api/queue/dlq.js +0 -166
  228. package/dist/api/queue/dlq.js.map +0 -1
  229. package/dist/api/queue/index.d.ts +0 -56
  230. package/dist/api/queue/index.d.ts.map +0 -1
  231. package/dist/api/queue/index.js +0 -90
  232. package/dist/api/queue/index.js.map +0 -1
  233. package/dist/api/queue/messages.d.ts +0 -503
  234. package/dist/api/queue/messages.d.ts.map +0 -1
  235. package/dist/api/queue/messages.js +0 -549
  236. package/dist/api/queue/messages.js.map +0 -1
  237. package/dist/api/queue/queues.d.ts +0 -226
  238. package/dist/api/queue/queues.d.ts.map +0 -1
  239. package/dist/api/queue/queues.js +0 -321
  240. package/dist/api/queue/queues.js.map +0 -1
  241. package/dist/api/queue/sources.d.ts +0 -202
  242. package/dist/api/queue/sources.d.ts.map +0 -1
  243. package/dist/api/queue/sources.js +0 -202
  244. package/dist/api/queue/sources.js.map +0 -1
  245. package/dist/api/queue/types.d.ts +0 -1218
  246. package/dist/api/queue/types.d.ts.map +0 -1
  247. package/dist/api/queue/types.js +0 -1002
  248. package/dist/api/queue/types.js.map +0 -1
  249. package/dist/api/queue/util.d.ts +0 -278
  250. package/dist/api/queue/util.d.ts.map +0 -1
  251. package/dist/api/queue/util.js +0 -235
  252. package/dist/api/queue/util.js.map +0 -1
  253. package/dist/api/queue/validation.d.ts +0 -247
  254. package/dist/api/queue/validation.d.ts.map +0 -1
  255. package/dist/api/queue/validation.js +0 -513
  256. package/dist/api/queue/validation.js.map +0 -1
  257. package/dist/api/queue/websocket.d.ts +0 -168
  258. package/dist/api/queue/websocket.d.ts.map +0 -1
  259. package/dist/api/queue/websocket.js +0 -394
  260. package/dist/api/queue/websocket.js.map +0 -1
  261. package/dist/api/region/delete.d.ts +0 -62
  262. package/dist/api/region/delete.d.ts.map +0 -1
  263. package/dist/api/region/delete.js +0 -37
  264. package/dist/api/region/delete.js.map +0 -1
  265. package/dist/api/region/index.d.ts +0 -5
  266. package/dist/api/region/index.d.ts.map +0 -1
  267. package/dist/api/region/index.js +0 -5
  268. package/dist/api/region/index.js.map +0 -1
  269. package/dist/api/region/list.d.ts +0 -27
  270. package/dist/api/region/list.d.ts.map +0 -1
  271. package/dist/api/region/list.js +0 -22
  272. package/dist/api/region/list.js.map +0 -1
  273. package/dist/api/region/resources.d.ts +0 -71
  274. package/dist/api/region/resources.d.ts.map +0 -1
  275. package/dist/api/region/resources.js +0 -53
  276. package/dist/api/region/resources.js.map +0 -1
  277. package/dist/api/region/util.d.ts +0 -23
  278. package/dist/api/region/util.d.ts.map +0 -1
  279. package/dist/api/region/util.js +0 -3
  280. package/dist/api/region/util.js.map +0 -1
  281. package/dist/api/sandbox/cli-list.d.ts +0 -114
  282. package/dist/api/sandbox/cli-list.d.ts.map +0 -1
  283. package/dist/api/sandbox/cli-list.js +0 -71
  284. package/dist/api/sandbox/cli-list.js.map +0 -1
  285. package/dist/api/sandbox/create.d.ts +0 -118
  286. package/dist/api/sandbox/create.d.ts.map +0 -1
  287. package/dist/api/sandbox/create.js +0 -211
  288. package/dist/api/sandbox/create.js.map +0 -1
  289. package/dist/api/sandbox/destroy.d.ts +0 -22
  290. package/dist/api/sandbox/destroy.d.ts.map +0 -1
  291. package/dist/api/sandbox/destroy.js +0 -25
  292. package/dist/api/sandbox/destroy.js.map +0 -1
  293. package/dist/api/sandbox/disk-checkpoint.d.ts +0 -104
  294. package/dist/api/sandbox/disk-checkpoint.d.ts.map +0 -1
  295. package/dist/api/sandbox/disk-checkpoint.js +0 -104
  296. package/dist/api/sandbox/disk-checkpoint.js.map +0 -1
  297. package/dist/api/sandbox/execute.d.ts +0 -69
  298. package/dist/api/sandbox/execute.d.ts.map +0 -1
  299. package/dist/api/sandbox/execute.js +0 -103
  300. package/dist/api/sandbox/execute.js.map +0 -1
  301. package/dist/api/sandbox/execution.d.ts +0 -169
  302. package/dist/api/sandbox/execution.d.ts.map +0 -1
  303. package/dist/api/sandbox/execution.js +0 -118
  304. package/dist/api/sandbox/execution.js.map +0 -1
  305. package/dist/api/sandbox/files.d.ts +0 -261
  306. package/dist/api/sandbox/files.d.ts.map +0 -1
  307. package/dist/api/sandbox/files.js +0 -386
  308. package/dist/api/sandbox/files.js.map +0 -1
  309. package/dist/api/sandbox/get.d.ts +0 -283
  310. package/dist/api/sandbox/get.d.ts.map +0 -1
  311. package/dist/api/sandbox/get.js +0 -215
  312. package/dist/api/sandbox/get.js.map +0 -1
  313. package/dist/api/sandbox/getStatus.d.ts +0 -16
  314. package/dist/api/sandbox/getStatus.d.ts.map +0 -1
  315. package/dist/api/sandbox/getStatus.js +0 -32
  316. package/dist/api/sandbox/getStatus.js.map +0 -1
  317. package/dist/api/sandbox/index.d.ts +0 -39
  318. package/dist/api/sandbox/index.d.ts.map +0 -1
  319. package/dist/api/sandbox/index.js +0 -20
  320. package/dist/api/sandbox/index.js.map +0 -1
  321. package/dist/api/sandbox/list.d.ts +0 -293
  322. package/dist/api/sandbox/list.d.ts.map +0 -1
  323. package/dist/api/sandbox/list.js +0 -191
  324. package/dist/api/sandbox/list.js.map +0 -1
  325. package/dist/api/sandbox/resolve.d.ts +0 -82
  326. package/dist/api/sandbox/resolve.d.ts.map +0 -1
  327. package/dist/api/sandbox/resolve.js +0 -71
  328. package/dist/api/sandbox/resolve.js.map +0 -1
  329. package/dist/api/sandbox/run.d.ts +0 -28
  330. package/dist/api/sandbox/run.d.ts.map +0 -1
  331. package/dist/api/sandbox/run.js +0 -342
  332. package/dist/api/sandbox/run.js.map +0 -1
  333. package/dist/api/sandbox/runtime.d.ts +0 -83
  334. package/dist/api/sandbox/runtime.d.ts.map +0 -1
  335. package/dist/api/sandbox/runtime.js +0 -78
  336. package/dist/api/sandbox/runtime.js.map +0 -1
  337. package/dist/api/sandbox/snapshot-build.d.ts +0 -48
  338. package/dist/api/sandbox/snapshot-build.d.ts.map +0 -1
  339. package/dist/api/sandbox/snapshot-build.js +0 -74
  340. package/dist/api/sandbox/snapshot-build.js.map +0 -1
  341. package/dist/api/sandbox/snapshot.d.ts +0 -595
  342. package/dist/api/sandbox/snapshot.d.ts.map +0 -1
  343. package/dist/api/sandbox/snapshot.js +0 -598
  344. package/dist/api/sandbox/snapshot.js.map +0 -1
  345. package/dist/api/services/index.d.ts +0 -2
  346. package/dist/api/services/index.d.ts.map +0 -1
  347. package/dist/api/services/index.js +0 -2
  348. package/dist/api/services/index.js.map +0 -1
  349. package/dist/api/services/stats.d.ts +0 -263
  350. package/dist/api/services/stats.d.ts.map +0 -1
  351. package/dist/api/services/stats.js +0 -144
  352. package/dist/api/services/stats.js.map +0 -1
  353. package/dist/api/session/get.d.ts +0 -169
  354. package/dist/api/session/get.d.ts.map +0 -1
  355. package/dist/api/session/get.js +0 -56
  356. package/dist/api/session/get.js.map +0 -1
  357. package/dist/api/session/index.d.ts +0 -4
  358. package/dist/api/session/index.d.ts.map +0 -1
  359. package/dist/api/session/index.js +0 -4
  360. package/dist/api/session/index.js.map +0 -1
  361. package/dist/api/session/list.d.ts +0 -143
  362. package/dist/api/session/list.d.ts.map +0 -1
  363. package/dist/api/session/list.js +0 -91
  364. package/dist/api/session/list.js.map +0 -1
  365. package/dist/api/session/logs.d.ts +0 -40
  366. package/dist/api/session/logs.d.ts.map +0 -1
  367. package/dist/api/session/logs.js +0 -28
  368. package/dist/api/session/logs.js.map +0 -1
  369. package/dist/api/session/util.d.ts +0 -23
  370. package/dist/api/session/util.d.ts.map +0 -1
  371. package/dist/api/session/util.js +0 -3
  372. package/dist/api/session/util.js.map +0 -1
  373. package/dist/api/storage/config.d.ts +0 -99
  374. package/dist/api/storage/config.d.ts.map +0 -1
  375. package/dist/api/storage/config.js +0 -61
  376. package/dist/api/storage/config.js.map +0 -1
  377. package/dist/api/storage/index.d.ts +0 -5
  378. package/dist/api/storage/index.d.ts.map +0 -1
  379. package/dist/api/storage/index.js +0 -5
  380. package/dist/api/storage/index.js.map +0 -1
  381. package/dist/api/storage/objects.d.ts +0 -155
  382. package/dist/api/storage/objects.d.ts.map +0 -1
  383. package/dist/api/storage/objects.js +0 -148
  384. package/dist/api/storage/objects.js.map +0 -1
  385. package/dist/api/storage/types.d.ts +0 -161
  386. package/dist/api/storage/types.d.ts.map +0 -1
  387. package/dist/api/storage/types.js +0 -141
  388. package/dist/api/storage/types.js.map +0 -1
  389. package/dist/api/storage/util.d.ts +0 -48
  390. package/dist/api/storage/util.d.ts.map +0 -1
  391. package/dist/api/storage/util.js +0 -8
  392. package/dist/api/storage/util.js.map +0 -1
  393. package/dist/api/stream/get.d.ts +0 -58
  394. package/dist/api/stream/get.d.ts.map +0 -1
  395. package/dist/api/stream/get.js +0 -40
  396. package/dist/api/stream/get.js.map +0 -1
  397. package/dist/api/stream/index.d.ts +0 -4
  398. package/dist/api/stream/index.d.ts.map +0 -1
  399. package/dist/api/stream/index.js +0 -4
  400. package/dist/api/stream/index.js.map +0 -1
  401. package/dist/api/stream/list.d.ts +0 -120
  402. package/dist/api/stream/list.d.ts.map +0 -1
  403. package/dist/api/stream/list.js +0 -77
  404. package/dist/api/stream/list.js.map +0 -1
  405. package/dist/api/stream/util.d.ts +0 -23
  406. package/dist/api/stream/util.d.ts.map +0 -1
  407. package/dist/api/stream/util.js +0 -3
  408. package/dist/api/stream/util.js.map +0 -1
  409. package/dist/api/thread/delete.d.ts +0 -23
  410. package/dist/api/thread/delete.d.ts.map +0 -1
  411. package/dist/api/thread/delete.js +0 -21
  412. package/dist/api/thread/delete.js.map +0 -1
  413. package/dist/api/thread/get.d.ts +0 -36
  414. package/dist/api/thread/get.d.ts.map +0 -1
  415. package/dist/api/thread/get.js +0 -23
  416. package/dist/api/thread/get.js.map +0 -1
  417. package/dist/api/thread/index.d.ts +0 -5
  418. package/dist/api/thread/index.d.ts.map +0 -1
  419. package/dist/api/thread/index.js +0 -5
  420. package/dist/api/thread/index.js.map +0 -1
  421. package/dist/api/thread/list.d.ts +0 -69
  422. package/dist/api/thread/list.d.ts.map +0 -1
  423. package/dist/api/thread/list.js +0 -51
  424. package/dist/api/thread/list.js.map +0 -1
  425. package/dist/api/thread/util.d.ts +0 -23
  426. package/dist/api/thread/util.d.ts.map +0 -1
  427. package/dist/api/thread/util.js +0 -3
  428. package/dist/api/thread/util.js.map +0 -1
  429. package/dist/api/user/index.d.ts +0 -2
  430. package/dist/api/user/index.d.ts.map +0 -1
  431. package/dist/api/user/index.js +0 -2
  432. package/dist/api/user/index.js.map +0 -1
  433. package/dist/api/user/util.d.ts +0 -23
  434. package/dist/api/user/util.d.ts.map +0 -1
  435. package/dist/api/user/util.js +0 -3
  436. package/dist/api/user/util.js.map +0 -1
  437. package/dist/api/webhook/deliveries.d.ts +0 -94
  438. package/dist/api/webhook/deliveries.d.ts.map +0 -1
  439. package/dist/api/webhook/deliveries.js +0 -79
  440. package/dist/api/webhook/deliveries.js.map +0 -1
  441. package/dist/api/webhook/destinations.d.ts +0 -136
  442. package/dist/api/webhook/destinations.d.ts.map +0 -1
  443. package/dist/api/webhook/destinations.js +0 -137
  444. package/dist/api/webhook/destinations.js.map +0 -1
  445. package/dist/api/webhook/index.d.ts +0 -41
  446. package/dist/api/webhook/index.d.ts.map +0 -1
  447. package/dist/api/webhook/index.js +0 -59
  448. package/dist/api/webhook/index.js.map +0 -1
  449. package/dist/api/webhook/receipts.d.ts +0 -77
  450. package/dist/api/webhook/receipts.d.ts.map +0 -1
  451. package/dist/api/webhook/receipts.js +0 -78
  452. package/dist/api/webhook/receipts.js.map +0 -1
  453. package/dist/api/webhook/types.d.ts +0 -249
  454. package/dist/api/webhook/types.d.ts.map +0 -1
  455. package/dist/api/webhook/types.js +0 -221
  456. package/dist/api/webhook/types.js.map +0 -1
  457. package/dist/api/webhook/util.d.ts +0 -202
  458. package/dist/api/webhook/util.d.ts.map +0 -1
  459. package/dist/api/webhook/util.js +0 -201
  460. package/dist/api/webhook/util.js.map +0 -1
  461. package/dist/api/webhook/webhooks.d.ts +0 -146
  462. package/dist/api/webhook/webhooks.d.ts.map +0 -1
  463. package/dist/api/webhook/webhooks.js +0 -165
  464. package/dist/api/webhook/webhooks.js.map +0 -1
  465. package/src/api/api-example.md +0 -164
  466. package/src/api/apikey/create.ts +0 -41
  467. package/src/api/apikey/delete.ts +0 -30
  468. package/src/api/apikey/get.ts +0 -48
  469. package/src/api/apikey/index.ts +0 -5
  470. package/src/api/apikey/list.ts +0 -64
  471. package/src/api/apikey/util.ts +0 -3
  472. package/src/api/db/index.ts +0 -27
  473. package/src/api/db/logs.ts +0 -75
  474. package/src/api/db/query.ts +0 -67
  475. package/src/api/db/tables.ts +0 -92
  476. package/src/api/db/util.ts +0 -9
  477. package/src/api/eval/get.ts +0 -33
  478. package/src/api/eval/index.ts +0 -28
  479. package/src/api/eval/list.ts +0 -49
  480. package/src/api/eval/run-get.ts +0 -39
  481. package/src/api/eval/run-list.ts +0 -59
  482. package/src/api/machine/index.ts +0 -2
  483. package/src/api/machine/machine.ts +0 -160
  484. package/src/api/machine/util.ts +0 -5
  485. package/src/api/org/index.ts +0 -6
  486. package/src/api/org/list.ts +0 -28
  487. package/src/api/org/resources.ts +0 -140
  488. package/src/api/org/util.ts +0 -4
  489. package/src/api/project/agent.ts +0 -86
  490. package/src/api/project/create.ts +0 -47
  491. package/src/api/project/delete.ts +0 -25
  492. package/src/api/project/deploy.ts +0 -458
  493. package/src/api/project/deployment.ts +0 -195
  494. package/src/api/project/env-delete.ts +0 -45
  495. package/src/api/project/env-update.ts +0 -55
  496. package/src/api/project/exists.ts +0 -58
  497. package/src/api/project/hostname.ts +0 -73
  498. package/src/api/project/index.ts +0 -13
  499. package/src/api/project/update-region.ts +0 -44
  500. package/src/api/project/util.ts +0 -8
  501. package/src/api/queue/analytics.ts +0 -311
  502. package/src/api/queue/destinations.ts +0 -259
  503. package/src/api/queue/dlq.ts +0 -243
  504. package/src/api/queue/index.ts +0 -308
  505. package/src/api/queue/messages.ts +0 -784
  506. package/src/api/queue/queues.ts +0 -460
  507. package/src/api/queue/sources.ts +0 -294
  508. package/src/api/queue/types.ts +0 -1325
  509. package/src/api/queue/util.ts +0 -278
  510. package/src/api/queue/validation.ts +0 -560
  511. package/src/api/queue/websocket.ts +0 -514
  512. package/src/api/region/delete.ts +0 -57
  513. package/src/api/region/index.ts +0 -4
  514. package/src/api/region/list.ts +0 -32
  515. package/src/api/region/resources.ts +0 -69
  516. package/src/api/region/util.ts +0 -3
  517. package/src/api/sandbox/cli-list.ts +0 -127
  518. package/src/api/sandbox/create.ts +0 -256
  519. package/src/api/sandbox/destroy.ts +0 -41
  520. package/src/api/sandbox/disk-checkpoint.ts +0 -179
  521. package/src/api/sandbox/execute.ts +0 -132
  522. package/src/api/sandbox/execution.ts +0 -183
  523. package/src/api/sandbox/files.ts +0 -596
  524. package/src/api/sandbox/get.ts +0 -249
  525. package/src/api/sandbox/getStatus.ts +0 -54
  526. package/src/api/sandbox/index.ts +0 -211
  527. package/src/api/sandbox/list.ts +0 -224
  528. package/src/api/sandbox/resolve.ts +0 -98
  529. package/src/api/sandbox/run.ts +0 -439
  530. package/src/api/sandbox/runtime.ts +0 -100
  531. package/src/api/sandbox/snapshot-build.ts +0 -98
  532. package/src/api/sandbox/snapshot.ts +0 -781
  533. package/src/api/services/index.ts +0 -1
  534. package/src/api/services/stats.ts +0 -213
  535. package/src/api/session/get.ts +0 -106
  536. package/src/api/session/index.ts +0 -3
  537. package/src/api/session/list.ts +0 -136
  538. package/src/api/session/logs.ts +0 -47
  539. package/src/api/session/util.ts +0 -3
  540. package/src/api/storage/config.ts +0 -111
  541. package/src/api/storage/index.ts +0 -4
  542. package/src/api/storage/objects.ts +0 -250
  543. package/src/api/storage/types.ts +0 -174
  544. package/src/api/storage/util.ts +0 -10
  545. package/src/api/stream/get.ts +0 -51
  546. package/src/api/stream/index.ts +0 -3
  547. package/src/api/stream/list.ts +0 -127
  548. package/src/api/stream/util.ts +0 -3
  549. package/src/api/thread/delete.ts +0 -31
  550. package/src/api/thread/get.ts +0 -34
  551. package/src/api/thread/index.ts +0 -4
  552. package/src/api/thread/list.ts +0 -76
  553. package/src/api/thread/util.ts +0 -3
  554. package/src/api/user/index.ts +0 -1
  555. package/src/api/user/util.ts +0 -3
  556. package/src/api/webhook/deliveries.ts +0 -129
  557. package/src/api/webhook/destinations.ts +0 -224
  558. package/src/api/webhook/index.ts +0 -133
  559. package/src/api/webhook/receipts.ts +0 -124
  560. package/src/api/webhook/types.ts +0 -309
  561. package/src/api/webhook/util.ts +0 -237
  562. package/src/api/webhook/webhooks.ts +0 -260
@@ -1,202 +0,0 @@
1
- import { z } from 'zod';
2
- import { type APIClient } from '../api.ts';
3
- import { type CreateDestinationRequest, type Destination, type QueueApiOptions, type UpdateDestinationRequest } from './types.ts';
4
- export declare const DestinationResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5
- success: z.ZodLiteral<false>;
6
- message: z.ZodString;
7
- code: z.ZodOptional<z.ZodString>;
8
- }, z.core.$strip>, z.ZodObject<{
9
- success: z.ZodLiteral<true>;
10
- data: z.ZodObject<{
11
- destination: z.ZodObject<{
12
- id: z.ZodString;
13
- queue_id: z.ZodString;
14
- destination_type: z.ZodEnum<{
15
- http: "http";
16
- }>;
17
- config: z.ZodObject<{
18
- url: z.ZodString;
19
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
20
- method: z.ZodDefault<z.ZodString>;
21
- timeout_ms: z.ZodDefault<z.ZodNumber>;
22
- retry_policy: z.ZodOptional<z.ZodObject<{
23
- max_attempts: z.ZodDefault<z.ZodNumber>;
24
- initial_backoff_ms: z.ZodDefault<z.ZodNumber>;
25
- max_backoff_ms: z.ZodDefault<z.ZodNumber>;
26
- backoff_multiplier: z.ZodDefault<z.ZodNumber>;
27
- }, z.core.$strip>>;
28
- signing: z.ZodOptional<z.ZodObject<{
29
- enabled: z.ZodDefault<z.ZodBoolean>;
30
- secret_key: z.ZodOptional<z.ZodString>;
31
- }, z.core.$strip>>;
32
- }, z.core.$strip>;
33
- enabled: z.ZodBoolean;
34
- stats: z.ZodOptional<z.ZodObject<{
35
- total_deliveries: z.ZodNumber;
36
- successful_deliveries: z.ZodNumber;
37
- failed_deliveries: z.ZodNumber;
38
- last_delivery_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
- last_success_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
- last_failure_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
- }, z.core.$strip>>;
42
- created_at: z.ZodString;
43
- updated_at: z.ZodString;
44
- }, z.core.$strip>;
45
- }, z.core.$strip>;
46
- }, z.core.$strip>], "success">;
47
- export declare const DestinationsListResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
48
- success: z.ZodLiteral<false>;
49
- message: z.ZodString;
50
- code: z.ZodOptional<z.ZodString>;
51
- }, z.core.$strip>, z.ZodObject<{
52
- success: z.ZodLiteral<true>;
53
- data: z.ZodObject<{
54
- destinations: z.ZodArray<z.ZodObject<{
55
- id: z.ZodString;
56
- queue_id: z.ZodString;
57
- destination_type: z.ZodEnum<{
58
- http: "http";
59
- }>;
60
- config: z.ZodObject<{
61
- url: z.ZodString;
62
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
63
- method: z.ZodDefault<z.ZodString>;
64
- timeout_ms: z.ZodDefault<z.ZodNumber>;
65
- retry_policy: z.ZodOptional<z.ZodObject<{
66
- max_attempts: z.ZodDefault<z.ZodNumber>;
67
- initial_backoff_ms: z.ZodDefault<z.ZodNumber>;
68
- max_backoff_ms: z.ZodDefault<z.ZodNumber>;
69
- backoff_multiplier: z.ZodDefault<z.ZodNumber>;
70
- }, z.core.$strip>>;
71
- signing: z.ZodOptional<z.ZodObject<{
72
- enabled: z.ZodDefault<z.ZodBoolean>;
73
- secret_key: z.ZodOptional<z.ZodString>;
74
- }, z.core.$strip>>;
75
- }, z.core.$strip>;
76
- enabled: z.ZodBoolean;
77
- stats: z.ZodOptional<z.ZodObject<{
78
- total_deliveries: z.ZodNumber;
79
- successful_deliveries: z.ZodNumber;
80
- failed_deliveries: z.ZodNumber;
81
- last_delivery_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
- last_success_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
- last_failure_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
- }, z.core.$strip>>;
85
- created_at: z.ZodString;
86
- updated_at: z.ZodString;
87
- }, z.core.$strip>>;
88
- }, z.core.$strip>;
89
- }, z.core.$strip>], "success">;
90
- export declare const DeleteDestinationResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
- success: z.ZodLiteral<false>;
92
- message: z.ZodString;
93
- code: z.ZodOptional<z.ZodString>;
94
- }, z.core.$strip>, z.ZodObject<{
95
- success: z.ZodLiteral<true>;
96
- }, z.core.$strip>], "success">;
97
- /**
98
- * Create a destination for a queue.
99
- *
100
- * Destinations are webhook endpoints that automatically receive messages when
101
- * they are published to a queue. When a message is published, it will be
102
- * delivered via HTTP POST to all active destinations configured for that queue.
103
- *
104
- * @param client - The API client instance
105
- * @param queueName - The name of the queue to add the destination to
106
- * @param params - Destination configuration including URL and optional settings
107
- * @returns The created destination with assigned ID
108
- * @throws {QueueValidationError} If validation fails (invalid queue name or config)
109
- * @throws {QueueNotFoundError} If the queue does not exist
110
- * @throws {QueueError} If the API request fails
111
- *
112
- * @example
113
- * ```typescript
114
- * const destination = await createDestination(client, 'order-events', {
115
- * url: 'https://api.example.com/webhooks/orders',
116
- * config: {
117
- * retry_attempts: 3,
118
- * timeout_seconds: 30,
119
- * },
120
- * });
121
- * console.log(`Created destination ${destination.id}`);
122
- * ```
123
- */
124
- export declare function createDestination(client: APIClient, queueName: string, params: CreateDestinationRequest, options?: QueueApiOptions): Promise<Destination>;
125
- /**
126
- * List all destinations for a queue.
127
- *
128
- * Retrieves all webhook destinations configured for a queue. Each destination
129
- * represents an endpoint that receives messages when they are published.
130
- *
131
- * @param client - The API client instance
132
- * @param queueName - The name of the queue
133
- * @returns Array of destinations configured for the queue
134
- * @throws {QueueValidationError} If validation fails (invalid queue name)
135
- * @throws {QueueNotFoundError} If the queue does not exist
136
- * @throws {QueueError} If the API request fails
137
- *
138
- * @example
139
- * ```typescript
140
- * const destinations = await listDestinations(client, 'order-events');
141
- * for (const dest of destinations) {
142
- * console.log(`Destination ${dest.id}: ${dest.url} (${dest.enabled ? 'enabled' : 'disabled'})`);
143
- * }
144
- * ```
145
- */
146
- export declare function listDestinations(client: APIClient, queueName: string, options?: QueueApiOptions): Promise<Destination[]>;
147
- /**
148
- * Update a destination's configuration.
149
- *
150
- * Modifies an existing destination's settings such as URL, enabled status,
151
- * or retry configuration. Only the fields provided in params will be updated.
152
- *
153
- * @param client - The API client instance
154
- * @param queueName - The name of the queue
155
- * @param destinationId - The destination ID to update (prefixed with dest_)
156
- * @param params - Fields to update (partial update supported)
157
- * @returns The updated destination
158
- * @throws {QueueValidationError} If validation fails (invalid queue name, destination ID, or config)
159
- * @throws {DestinationNotFoundError} If the destination does not exist
160
- * @throws {QueueNotFoundError} If the queue does not exist
161
- * @throws {QueueError} If the API request fails
162
- *
163
- * @example
164
- * ```typescript
165
- * // Disable a destination temporarily
166
- * const updated = await updateDestination(client, 'order-events', 'dest_abc123', {
167
- * enabled: false,
168
- * });
169
- *
170
- * // Update URL and retry settings
171
- * const updated = await updateDestination(client, 'order-events', 'dest_abc123', {
172
- * url: 'https://api.example.com/v2/webhooks/orders',
173
- * config: {
174
- * retry_attempts: 5,
175
- * },
176
- * });
177
- * ```
178
- */
179
- export declare function updateDestination(client: APIClient, queueName: string, destinationId: string, params: UpdateDestinationRequest, options?: QueueApiOptions): Promise<Destination>;
180
- /**
181
- * Delete a destination from a queue.
182
- *
183
- * Permanently removes a webhook destination. Messages will no longer be
184
- * delivered to this endpoint. This action cannot be undone.
185
- *
186
- * @param client - The API client instance
187
- * @param queueName - The name of the queue
188
- * @param destinationId - The destination ID to delete (prefixed with dest_)
189
- * @returns void
190
- * @throws {QueueValidationError} If validation fails (invalid queue name or destination ID)
191
- * @throws {DestinationNotFoundError} If the destination does not exist
192
- * @throws {QueueNotFoundError} If the queue does not exist
193
- * @throws {QueueError} If the API request fails
194
- *
195
- * @example
196
- * ```typescript
197
- * await deleteDestination(client, 'order-events', 'dest_abc123');
198
- * console.log('Destination deleted');
199
- * ```
200
- */
201
- export declare function deleteDestination(client: APIClient, queueName: string, destinationId: string, options?: QueueApiOptions): Promise<void>;
202
- //# sourceMappingURL=destinations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"destinations.d.ts","sourceRoot":"","sources":["../../../src/api/queue/destinations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAA8C,MAAM,WAAW,CAAC;AACvF,OAAO,EACN,KAAK,wBAAwB,EAE7B,KAAK,WAAW,EAEhB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAE7B,MAAM,YAAY,CAAC;AAQpB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAErC,CAAC;AACF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAI1C,CAAC;AACF,eAAO,MAAM,+BAA+B;;;;;;8BAA4B,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,iBAAiB,CACtC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,WAAW,CAAC,CA4BtB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,gBAAgB,CACrC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,WAAW,EAAE,CAAC,CAsBxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,iBAAiB,CACtC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,WAAW,CAAC,CA6BtB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,iBAAiB,CACtC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAwBf"}
@@ -1,168 +0,0 @@
1
- import { z } from 'zod';
2
- import { APIResponseSchema, APIResponseSchemaNoData } from "../api.js";
3
- import { CreateDestinationRequestSchema, DestinationSchema, UpdateDestinationRequestSchema, } from "./types.js";
4
- import { buildQueueHeaders, QueueError, queueApiPath, withQueueErrorHandling } from "./util.js";
5
- import { validateDestinationConfig, validateDestinationId, validateQueueName, } from "./validation.js";
6
- export const DestinationResponseSchema = APIResponseSchema(z.object({ destination: DestinationSchema }));
7
- export const DestinationsListResponseSchema = APIResponseSchema(z.object({
8
- destinations: z.array(DestinationSchema),
9
- }));
10
- export const DeleteDestinationResponseSchema = APIResponseSchemaNoData();
11
- /**
12
- * Create a destination for a queue.
13
- *
14
- * Destinations are webhook endpoints that automatically receive messages when
15
- * they are published to a queue. When a message is published, it will be
16
- * delivered via HTTP POST to all active destinations configured for that queue.
17
- *
18
- * @param client - The API client instance
19
- * @param queueName - The name of the queue to add the destination to
20
- * @param params - Destination configuration including URL and optional settings
21
- * @returns The created destination with assigned ID
22
- * @throws {QueueValidationError} If validation fails (invalid queue name or config)
23
- * @throws {QueueNotFoundError} If the queue does not exist
24
- * @throws {QueueError} If the API request fails
25
- *
26
- * @example
27
- * ```typescript
28
- * const destination = await createDestination(client, 'order-events', {
29
- * url: 'https://api.example.com/webhooks/orders',
30
- * config: {
31
- * retry_attempts: 3,
32
- * timeout_seconds: 30,
33
- * },
34
- * });
35
- * console.log(`Created destination ${destination.id}`);
36
- * ```
37
- */
38
- export async function createDestination(client, queueName, params, options) {
39
- validateQueueName(queueName);
40
- if (params.config) {
41
- validateDestinationConfig(params.config);
42
- }
43
- const url = queueApiPath('destinations/create', queueName);
44
- const resp = await withQueueErrorHandling(() => client.post(url, params, DestinationResponseSchema, CreateDestinationRequestSchema, undefined, buildQueueHeaders(options?.orgId)), { queueName, destinationUrl: params.config?.url });
45
- if (resp.success) {
46
- return resp.data.destination;
47
- }
48
- throw new QueueError({
49
- queueName,
50
- message: resp.message || 'Failed to create destination',
51
- });
52
- }
53
- /**
54
- * List all destinations for a queue.
55
- *
56
- * Retrieves all webhook destinations configured for a queue. Each destination
57
- * represents an endpoint that receives messages when they are published.
58
- *
59
- * @param client - The API client instance
60
- * @param queueName - The name of the queue
61
- * @returns Array of destinations configured for the queue
62
- * @throws {QueueValidationError} If validation fails (invalid queue name)
63
- * @throws {QueueNotFoundError} If the queue does not exist
64
- * @throws {QueueError} If the API request fails
65
- *
66
- * @example
67
- * ```typescript
68
- * const destinations = await listDestinations(client, 'order-events');
69
- * for (const dest of destinations) {
70
- * console.log(`Destination ${dest.id}: ${dest.url} (${dest.enabled ? 'enabled' : 'disabled'})`);
71
- * }
72
- * ```
73
- */
74
- export async function listDestinations(client, queueName, options) {
75
- validateQueueName(queueName);
76
- const url = queueApiPath('destinations/list', queueName);
77
- const resp = await withQueueErrorHandling(() => client.get(url, DestinationsListResponseSchema, undefined, buildQueueHeaders(options?.orgId)), { queueName });
78
- if (resp.success) {
79
- return resp.data.destinations;
80
- }
81
- throw new QueueError({
82
- queueName,
83
- message: resp.message || 'Failed to list destinations',
84
- });
85
- }
86
- /**
87
- * Update a destination's configuration.
88
- *
89
- * Modifies an existing destination's settings such as URL, enabled status,
90
- * or retry configuration. Only the fields provided in params will be updated.
91
- *
92
- * @param client - The API client instance
93
- * @param queueName - The name of the queue
94
- * @param destinationId - The destination ID to update (prefixed with dest_)
95
- * @param params - Fields to update (partial update supported)
96
- * @returns The updated destination
97
- * @throws {QueueValidationError} If validation fails (invalid queue name, destination ID, or config)
98
- * @throws {DestinationNotFoundError} If the destination does not exist
99
- * @throws {QueueNotFoundError} If the queue does not exist
100
- * @throws {QueueError} If the API request fails
101
- *
102
- * @example
103
- * ```typescript
104
- * // Disable a destination temporarily
105
- * const updated = await updateDestination(client, 'order-events', 'dest_abc123', {
106
- * enabled: false,
107
- * });
108
- *
109
- * // Update URL and retry settings
110
- * const updated = await updateDestination(client, 'order-events', 'dest_abc123', {
111
- * url: 'https://api.example.com/v2/webhooks/orders',
112
- * config: {
113
- * retry_attempts: 5,
114
- * },
115
- * });
116
- * ```
117
- */
118
- export async function updateDestination(client, queueName, destinationId, params, options) {
119
- validateQueueName(queueName);
120
- validateDestinationId(destinationId);
121
- if (params.config) {
122
- validateDestinationConfig(params.config);
123
- }
124
- const url = queueApiPath('destinations/update', queueName, destinationId);
125
- const resp = await withQueueErrorHandling(() => client.patch(url, params, DestinationResponseSchema, UpdateDestinationRequestSchema, undefined, buildQueueHeaders(options?.orgId)), { queueName, destinationId });
126
- if (resp.success) {
127
- return resp.data.destination;
128
- }
129
- throw new QueueError({
130
- queueName,
131
- message: resp.message || 'Failed to update destination',
132
- });
133
- }
134
- /**
135
- * Delete a destination from a queue.
136
- *
137
- * Permanently removes a webhook destination. Messages will no longer be
138
- * delivered to this endpoint. This action cannot be undone.
139
- *
140
- * @param client - The API client instance
141
- * @param queueName - The name of the queue
142
- * @param destinationId - The destination ID to delete (prefixed with dest_)
143
- * @returns void
144
- * @throws {QueueValidationError} If validation fails (invalid queue name or destination ID)
145
- * @throws {DestinationNotFoundError} If the destination does not exist
146
- * @throws {QueueNotFoundError} If the queue does not exist
147
- * @throws {QueueError} If the API request fails
148
- *
149
- * @example
150
- * ```typescript
151
- * await deleteDestination(client, 'order-events', 'dest_abc123');
152
- * console.log('Destination deleted');
153
- * ```
154
- */
155
- export async function deleteDestination(client, queueName, destinationId, options) {
156
- validateQueueName(queueName);
157
- validateDestinationId(destinationId);
158
- const url = queueApiPath('destinations/delete', queueName, destinationId);
159
- const resp = await withQueueErrorHandling(() => client.delete(url, DeleteDestinationResponseSchema, undefined, buildQueueHeaders(options?.orgId)), { queueName, destinationId });
160
- if (resp.success) {
161
- return;
162
- }
163
- throw new QueueError({
164
- queueName,
165
- message: resp.message || 'Failed to delete destination',
166
- });
167
- }
168
- //# sourceMappingURL=destinations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"destinations.js","sourceRoot":"","sources":["../../../src/api/queue/destinations.ts"],"names":[],"mappings":"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"}
@@ -1,168 +0,0 @@
1
- import { z } from 'zod';
2
- import { type APIClient } from '../api.ts';
3
- import { type DeadLetterMessage, type ListDlqRequest, type Message, type QueueApiOptions } from './types.ts';
4
- export declare const DlqListResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5
- success: z.ZodLiteral<false>;
6
- message: z.ZodString;
7
- code: z.ZodOptional<z.ZodString>;
8
- }, z.core.$strip>, z.ZodObject<{
9
- success: z.ZodLiteral<true>;
10
- data: z.ZodObject<{
11
- messages: z.ZodArray<z.ZodObject<{
12
- id: z.ZodString;
13
- queue_id: z.ZodString;
14
- original_message_id: z.ZodOptional<z.ZodString>;
15
- offset: z.ZodNumber;
16
- payload: z.ZodUnknown;
17
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
18
- failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
- delivery_attempts: z.ZodNumber;
20
- moved_at: z.ZodOptional<z.ZodString>;
21
- original_published_at: z.ZodOptional<z.ZodString>;
22
- published_at: z.ZodOptional<z.ZodString>;
23
- created_at: z.ZodString;
24
- }, z.core.$strip>>;
25
- total: z.ZodOptional<z.ZodNumber>;
26
- }, z.core.$strip>;
27
- }, z.core.$strip>], "success">;
28
- export declare const ReplayDlqResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
29
- success: z.ZodLiteral<false>;
30
- message: z.ZodString;
31
- code: z.ZodOptional<z.ZodString>;
32
- }, z.core.$strip>, z.ZodObject<{
33
- success: z.ZodLiteral<true>;
34
- data: z.ZodObject<{
35
- message: z.ZodObject<{
36
- id: z.ZodString;
37
- queue_id: z.ZodString;
38
- offset: z.ZodNumber;
39
- payload: z.ZodUnknown;
40
- size: z.ZodOptional<z.ZodNumber>;
41
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
42
- state: z.ZodOptional<z.ZodEnum<{
43
- pending: "pending";
44
- failed: "failed";
45
- leased: "leased";
46
- processing: "processing";
47
- delivered: "delivered";
48
- dead: "dead";
49
- }>>;
50
- idempotency_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
- partition_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
- ttl_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
53
- delivery_attempts: z.ZodOptional<z.ZodNumber>;
54
- max_retries: z.ZodOptional<z.ZodNumber>;
55
- published_at: z.ZodOptional<z.ZodString>;
56
- expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
- delivered_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
- acknowledged_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
- created_at: z.ZodOptional<z.ZodString>;
60
- updated_at: z.ZodOptional<z.ZodString>;
61
- }, z.core.$strip>;
62
- }, z.core.$strip>;
63
- }, z.core.$strip>], "success">;
64
- export declare const DeleteDlqResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
65
- success: z.ZodLiteral<false>;
66
- message: z.ZodString;
67
- code: z.ZodOptional<z.ZodString>;
68
- }, z.core.$strip>, z.ZodObject<{
69
- success: z.ZodLiteral<true>;
70
- }, z.core.$strip>], "success">;
71
- /**
72
- * List messages in the dead letter queue.
73
- *
74
- * Retrieves messages that failed processing after exhausting all retries.
75
- * These messages can be inspected, replayed back to the main queue, or deleted.
76
- *
77
- * @param client - The API client instance
78
- * @param queueName - The name of the queue whose DLQ to list
79
- * @param params - Optional pagination parameters (limit, offset)
80
- * @returns Object containing dead letter messages and optional total count
81
- * @throws {QueueValidationError} If validation fails (invalid queue name, limit, or offset)
82
- * @throws {QueueNotFoundError} If the queue does not exist
83
- * @throws {QueueError} If the API request fails
84
- *
85
- * @example
86
- * ```typescript
87
- * // List first 10 dead letter messages
88
- * const result = await listDeadLetterMessages(client, 'order-queue', { limit: 10 });
89
- * for (const msg of result.messages) {
90
- * console.log(`Failed message ${msg.id}: ${msg.failure_reason}`);
91
- * console.log(`Attempts: ${msg.delivery_attempts}, Moved at: ${msg.moved_at}`);
92
- * }
93
- * ```
94
- */
95
- export declare function listDeadLetterMessages(client: APIClient, queueName: string, params?: ListDlqRequest, options?: QueueApiOptions): Promise<{
96
- messages: DeadLetterMessage[];
97
- total?: number;
98
- }>;
99
- /**
100
- * Replay a dead letter message back to the main queue.
101
- *
102
- * Moves a message from the dead letter queue back to the main queue for
103
- * reprocessing. The message state is reset to pending and retry count is
104
- * preserved. Use this after fixing the underlying issue that caused the failure.
105
- *
106
- * @param client - The API client instance
107
- * @param queueName - The name of the queue
108
- * @param messageId - The message ID to replay (prefixed with msg_)
109
- * @returns The replayed message with updated state
110
- * @throws {QueueValidationError} If validation fails (invalid queue name or message ID)
111
- * @throws {MessageNotFoundError} If the message does not exist in the DLQ
112
- * @throws {QueueNotFoundError} If the queue does not exist
113
- * @throws {QueueError} If the API request fails
114
- *
115
- * @example
116
- * ```typescript
117
- * // Replay a failed message after fixing the bug
118
- * const message = await replayDeadLetterMessage(client, 'order-queue', 'msg_abc123');
119
- * console.log(`Replayed message ${message.id}, now in state: ${message.state}`);
120
- * ```
121
- */
122
- export declare function replayDeadLetterMessage(client: APIClient, queueName: string, messageId: string, options?: QueueApiOptions): Promise<Message>;
123
- /**
124
- * Purge all messages from a dead letter queue.
125
- *
126
- * Permanently deletes all messages in the dead letter queue. This operation
127
- * cannot be undone. Use with caution - consider reviewing or exporting
128
- * messages before purging.
129
- *
130
- * @param client - The API client instance
131
- * @param queueName - The name of the queue whose DLQ to purge
132
- * @returns void
133
- * @throws {QueueValidationError} If validation fails (invalid queue name)
134
- * @throws {QueueNotFoundError} If the queue does not exist
135
- * @throws {QueueError} If the API request fails
136
- *
137
- * @example
138
- * ```typescript
139
- * // Purge all dead letter messages after investigation
140
- * await purgeDeadLetter(client, 'order-queue');
141
- * console.log('All dead letter messages have been deleted');
142
- * ```
143
- */
144
- export declare function purgeDeadLetter(client: APIClient, queueName: string, options?: QueueApiOptions): Promise<void>;
145
- /**
146
- * Delete a specific message from the dead letter queue.
147
- *
148
- * Permanently removes a single message from the dead letter queue.
149
- * Use this when you've determined that a specific failed message
150
- * should not be retried and can be discarded.
151
- *
152
- * @param client - The API client instance
153
- * @param queueName - The name of the queue
154
- * @param messageId - The message ID to delete (prefixed with msg_)
155
- * @returns void
156
- * @throws {QueueValidationError} If validation fails (invalid queue name or message ID)
157
- * @throws {MessageNotFoundError} If the message does not exist in the DLQ
158
- * @throws {QueueError} If the API request fails
159
- *
160
- * @example
161
- * ```typescript
162
- * // Delete a message that cannot be recovered
163
- * await deleteDeadLetterMessage(client, 'order-queue', 'msg_abc123');
164
- * console.log('Dead letter message deleted');
165
- * ```
166
- */
167
- export declare function deleteDeadLetterMessage(client: APIClient, queueName: string, messageId: string, options?: QueueApiOptions): Promise<void>;
168
- //# sourceMappingURL=dlq.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dlq.d.ts","sourceRoot":"","sources":["../../../src/api/queue/dlq.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAA8C,MAAM,WAAW,CAAC;AACvF,OAAO,EACN,KAAK,iBAAiB,EAEtB,KAAK,cAAc,EACnB,KAAK,OAAO,EAEZ,KAAK,eAAe,EACpB,MAAM,YAAY,CAAC;AAepB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;8BAKjC,CAAC;AACF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAA0D,CAAC;AAC/F,eAAO,MAAM,uBAAuB;;;;;;8BAA4B,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,sBAAsB,CAC3C,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC;IAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgC5D;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,uBAAuB,CAC5C,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,OAAO,CAAC,CA0BlB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,eAAe,CACpC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAiBf;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,uBAAuB,CAC5C,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAmBf"}