@agentuity/server 1.0.31 → 1.0.33

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