@mobilerun/sdk 3.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (633) hide show
  1. package/CHANGELOG.md +542 -0
  2. package/README.md +2 -2
  3. package/api-promise.d.mts +1 -0
  4. package/api-promise.d.mts.map +1 -1
  5. package/api-promise.d.ts +1 -0
  6. package/api-promise.d.ts.map +1 -1
  7. package/api-promise.mjs +1 -0
  8. package/api-promise.mjs.map +1 -1
  9. package/client.d.mts +41 -25
  10. package/client.d.mts.map +1 -1
  11. package/client.d.ts +41 -25
  12. package/client.d.ts.map +1 -1
  13. package/client.js +52 -18
  14. package/client.js.map +1 -1
  15. package/client.mjs +53 -19
  16. package/client.mjs.map +1 -1
  17. package/core/api-promise.d.mts.map +1 -1
  18. package/core/api-promise.d.ts.map +1 -1
  19. package/core/api-promise.mjs.map +1 -1
  20. package/core/error.mjs.map +1 -1
  21. package/core/resource.d.mts.map +1 -1
  22. package/core/resource.d.ts.map +1 -1
  23. package/core/uploads.d.mts.map +1 -1
  24. package/core/uploads.d.ts.map +1 -1
  25. package/core/uploads.mjs.map +1 -1
  26. package/error.d.mts +1 -0
  27. package/error.d.mts.map +1 -1
  28. package/error.d.ts +1 -0
  29. package/error.d.ts.map +1 -1
  30. package/error.mjs +1 -0
  31. package/error.mjs.map +1 -1
  32. package/index.d.mts.map +1 -1
  33. package/index.d.ts.map +1 -1
  34. package/index.mjs.map +1 -1
  35. package/internal/detect-platform.mjs.map +1 -1
  36. package/internal/headers.mjs.map +1 -1
  37. package/internal/parse.d.mts.map +1 -1
  38. package/internal/parse.d.ts.map +1 -1
  39. package/internal/parse.mjs.map +1 -1
  40. package/internal/qs/formats.d.mts.map +1 -1
  41. package/internal/qs/formats.d.ts.map +1 -1
  42. package/internal/qs/index.d.mts +2 -2
  43. package/internal/qs/index.d.mts.map +1 -1
  44. package/internal/qs/index.d.ts +2 -2
  45. package/internal/qs/index.d.ts.map +1 -1
  46. package/internal/qs/index.mjs.map +1 -1
  47. package/internal/qs/stringify.d.mts.map +1 -1
  48. package/internal/qs/stringify.d.ts.map +1 -1
  49. package/internal/qs/stringify.mjs.map +1 -1
  50. package/internal/qs/utils.d.mts.map +1 -1
  51. package/internal/qs/utils.d.ts.map +1 -1
  52. package/internal/qs/utils.mjs.map +1 -1
  53. package/internal/request-options.d.mts.map +1 -1
  54. package/internal/request-options.d.ts.map +1 -1
  55. package/internal/shims.d.mts +6 -0
  56. package/internal/shims.d.mts.map +1 -1
  57. package/internal/shims.d.ts +6 -0
  58. package/internal/shims.d.ts.map +1 -1
  59. package/internal/to-file.d.mts.map +1 -1
  60. package/internal/to-file.d.ts.map +1 -1
  61. package/internal/to-file.mjs.map +1 -1
  62. package/internal/types.d.mts +10 -10
  63. package/internal/types.d.mts.map +1 -1
  64. package/internal/types.d.ts +10 -10
  65. package/internal/types.d.ts.map +1 -1
  66. package/internal/uploads.d.mts.map +1 -1
  67. package/internal/uploads.d.ts.map +1 -1
  68. package/internal/uploads.mjs.map +1 -1
  69. package/internal/utils/base64.mjs.map +1 -1
  70. package/internal/utils/env.js +2 -2
  71. package/internal/utils/env.js.map +1 -1
  72. package/internal/utils/env.mjs +2 -2
  73. package/internal/utils/env.mjs.map +1 -1
  74. package/internal/utils/log.d.mts.map +1 -1
  75. package/internal/utils/log.d.ts.map +1 -1
  76. package/internal/utils/log.js +2 -0
  77. package/internal/utils/log.js.map +1 -1
  78. package/internal/utils/log.mjs +2 -0
  79. package/internal/utils/log.mjs.map +1 -1
  80. package/internal/utils/path.mjs.map +1 -1
  81. package/internal/utils/query.mjs.map +1 -1
  82. package/internal/utils/values.mjs.map +1 -1
  83. package/internal/utils.d.mts.map +1 -1
  84. package/internal/utils.d.ts.map +1 -1
  85. package/internal/utils.mjs.map +1 -1
  86. package/lib/trajectory-decoder-stream.d.mts.map +1 -1
  87. package/lib/trajectory-decoder-stream.d.ts.map +1 -1
  88. package/package.json +1 -1
  89. package/resource.d.mts +1 -0
  90. package/resource.d.mts.map +1 -1
  91. package/resource.d.ts +1 -0
  92. package/resource.d.ts.map +1 -1
  93. package/resource.mjs +1 -0
  94. package/resource.mjs.map +1 -1
  95. package/resources/apps.d.mts +198 -16
  96. package/resources/apps.d.mts.map +1 -1
  97. package/resources/apps.d.ts +198 -16
  98. package/resources/apps.d.ts.map +1 -1
  99. package/resources/apps.js +102 -0
  100. package/resources/apps.js.map +1 -1
  101. package/resources/apps.mjs +102 -0
  102. package/resources/apps.mjs.map +1 -1
  103. package/resources/carriers.d.mts +108 -7
  104. package/resources/carriers.d.mts.map +1 -1
  105. package/resources/carriers.d.ts +108 -7
  106. package/resources/carriers.d.ts.map +1 -1
  107. package/resources/carriers.js +3 -0
  108. package/resources/carriers.js.map +1 -1
  109. package/resources/carriers.mjs +3 -0
  110. package/resources/carriers.mjs.map +1 -1
  111. package/resources/connect/connect.d.mts +18 -0
  112. package/resources/connect/connect.d.mts.map +1 -0
  113. package/resources/connect/connect.d.ts +18 -0
  114. package/resources/connect/connect.d.ts.map +1 -0
  115. package/resources/connect/connect.js +25 -0
  116. package/resources/connect/connect.js.map +1 -0
  117. package/resources/connect/connect.mjs +20 -0
  118. package/resources/connect/connect.mjs.map +1 -0
  119. package/resources/connect/countries.d.mts +79 -0
  120. package/resources/connect/countries.d.mts.map +1 -0
  121. package/resources/connect/countries.d.ts +79 -0
  122. package/resources/connect/countries.d.ts.map +1 -0
  123. package/resources/connect/countries.js +15 -0
  124. package/resources/connect/countries.js.map +1 -0
  125. package/resources/connect/countries.mjs +11 -0
  126. package/resources/connect/countries.mjs.map +1 -0
  127. package/resources/connect/index.d.mts +5 -0
  128. package/resources/connect/index.d.mts.map +1 -0
  129. package/resources/connect/index.d.ts +5 -0
  130. package/resources/connect/index.d.ts.map +1 -0
  131. package/resources/connect/index.js +13 -0
  132. package/resources/connect/index.js.map +1 -0
  133. package/resources/connect/index.mjs +6 -0
  134. package/resources/connect/index.mjs.map +1 -0
  135. package/resources/connect/proxies.d.mts +454 -0
  136. package/resources/connect/proxies.d.mts.map +1 -0
  137. package/resources/connect/proxies.d.ts +454 -0
  138. package/resources/connect/proxies.d.ts.map +1 -0
  139. package/resources/connect/proxies.js +57 -0
  140. package/resources/connect/proxies.js.map +1 -0
  141. package/resources/connect/proxies.mjs +53 -0
  142. package/resources/connect/proxies.mjs.map +1 -0
  143. package/resources/connect/users.d.mts +387 -0
  144. package/resources/connect/users.d.mts.map +1 -0
  145. package/resources/connect/users.d.ts +387 -0
  146. package/resources/connect/users.d.ts.map +1 -0
  147. package/resources/connect/users.js +54 -0
  148. package/resources/connect/users.js.map +1 -0
  149. package/resources/connect/users.mjs +50 -0
  150. package/resources/connect/users.mjs.map +1 -0
  151. package/resources/connect.d.mts +2 -0
  152. package/resources/connect.d.mts.map +1 -0
  153. package/resources/connect.d.ts +2 -0
  154. package/resources/connect.d.ts.map +1 -0
  155. package/resources/connect.js +6 -0
  156. package/resources/connect.js.map +1 -0
  157. package/resources/connect.mjs +3 -0
  158. package/resources/connect.mjs.map +1 -0
  159. package/resources/credentials/credentials.d.mts +3 -0
  160. package/resources/credentials/credentials.d.mts.map +1 -1
  161. package/resources/credentials/credentials.d.ts +3 -0
  162. package/resources/credentials/credentials.d.ts.map +1 -1
  163. package/resources/credentials/credentials.js +3 -0
  164. package/resources/credentials/credentials.js.map +1 -1
  165. package/resources/credentials/credentials.mjs +3 -0
  166. package/resources/credentials/credentials.mjs.map +1 -1
  167. package/resources/credentials/index.d.mts.map +1 -1
  168. package/resources/credentials/index.d.ts.map +1 -1
  169. package/resources/credentials/index.mjs.map +1 -1
  170. package/resources/credentials/packages/credentials/credentials.d.mts +3 -0
  171. package/resources/credentials/packages/credentials/credentials.d.mts.map +1 -1
  172. package/resources/credentials/packages/credentials/credentials.d.ts +3 -0
  173. package/resources/credentials/packages/credentials/credentials.d.ts.map +1 -1
  174. package/resources/credentials/packages/credentials/credentials.js +3 -0
  175. package/resources/credentials/packages/credentials/credentials.js.map +1 -1
  176. package/resources/credentials/packages/credentials/credentials.mjs +3 -0
  177. package/resources/credentials/packages/credentials/credentials.mjs.map +1 -1
  178. package/resources/credentials/packages/credentials/fields.d.mts +3 -0
  179. package/resources/credentials/packages/credentials/fields.d.mts.map +1 -1
  180. package/resources/credentials/packages/credentials/fields.d.ts +3 -0
  181. package/resources/credentials/packages/credentials/fields.d.ts.map +1 -1
  182. package/resources/credentials/packages/credentials/fields.js +3 -0
  183. package/resources/credentials/packages/credentials/fields.js.map +1 -1
  184. package/resources/credentials/packages/credentials/fields.mjs +3 -0
  185. package/resources/credentials/packages/credentials/fields.mjs.map +1 -1
  186. package/resources/credentials/packages/credentials/index.d.mts.map +1 -1
  187. package/resources/credentials/packages/credentials/index.d.ts.map +1 -1
  188. package/resources/credentials/packages/credentials/index.mjs.map +1 -1
  189. package/resources/credentials/packages/credentials.d.mts.map +1 -1
  190. package/resources/credentials/packages/credentials.d.ts.map +1 -1
  191. package/resources/credentials/packages/credentials.mjs.map +1 -1
  192. package/resources/credentials/packages/index.d.mts.map +1 -1
  193. package/resources/credentials/packages/index.d.ts.map +1 -1
  194. package/resources/credentials/packages/index.mjs.map +1 -1
  195. package/resources/credentials/packages/packages.d.mts +3 -0
  196. package/resources/credentials/packages/packages.d.mts.map +1 -1
  197. package/resources/credentials/packages/packages.d.ts +3 -0
  198. package/resources/credentials/packages/packages.d.ts.map +1 -1
  199. package/resources/credentials/packages/packages.js +3 -0
  200. package/resources/credentials/packages/packages.js.map +1 -1
  201. package/resources/credentials/packages/packages.mjs +3 -0
  202. package/resources/credentials/packages/packages.mjs.map +1 -1
  203. package/resources/credentials/packages.d.mts.map +1 -1
  204. package/resources/credentials/packages.d.ts.map +1 -1
  205. package/resources/credentials/packages.mjs.map +1 -1
  206. package/resources/credentials.d.mts.map +1 -1
  207. package/resources/credentials.d.ts.map +1 -1
  208. package/resources/credentials.mjs.map +1 -1
  209. package/resources/devices/actions.d.mts.map +1 -1
  210. package/resources/devices/actions.d.ts.map +1 -1
  211. package/resources/devices/actions.mjs.map +1 -1
  212. package/resources/devices/apps.d.mts +43 -22
  213. package/resources/devices/apps.d.mts.map +1 -1
  214. package/resources/devices/apps.d.ts +43 -22
  215. package/resources/devices/apps.d.ts.map +1 -1
  216. package/resources/devices/apps.js +19 -19
  217. package/resources/devices/apps.js.map +1 -1
  218. package/resources/devices/apps.mjs +19 -19
  219. package/resources/devices/apps.mjs.map +1 -1
  220. package/resources/devices/devices.d.mts +118 -27
  221. package/resources/devices/devices.d.mts.map +1 -1
  222. package/resources/devices/devices.d.ts +118 -27
  223. package/resources/devices/devices.d.ts.map +1 -1
  224. package/resources/devices/devices.js +71 -18
  225. package/resources/devices/devices.js.map +1 -1
  226. package/resources/devices/devices.mjs +72 -19
  227. package/resources/devices/devices.mjs.map +1 -1
  228. package/resources/devices/esim.d.mts +101 -0
  229. package/resources/devices/esim.d.mts.map +1 -0
  230. package/resources/devices/esim.d.ts +101 -0
  231. package/resources/devices/esim.d.ts.map +1 -0
  232. package/resources/devices/{time.js → esim.js} +23 -22
  233. package/resources/devices/esim.js.map +1 -0
  234. package/resources/devices/{time.mjs → esim.mjs} +21 -20
  235. package/resources/devices/esim.mjs.map +1 -0
  236. package/resources/devices/files.d.mts.map +1 -1
  237. package/resources/devices/files.d.ts.map +1 -1
  238. package/resources/devices/files.mjs.map +1 -1
  239. package/resources/devices/index.d.mts +8 -6
  240. package/resources/devices/index.d.mts.map +1 -1
  241. package/resources/devices/index.d.ts +8 -6
  242. package/resources/devices/index.d.ts.map +1 -1
  243. package/resources/devices/index.js +7 -3
  244. package/resources/devices/index.js.map +1 -1
  245. package/resources/devices/index.mjs +5 -3
  246. package/resources/devices/index.mjs.map +1 -1
  247. package/resources/devices/keyboard.d.mts +5 -0
  248. package/resources/devices/keyboard.d.mts.map +1 -1
  249. package/resources/devices/keyboard.d.ts +5 -0
  250. package/resources/devices/keyboard.d.ts.map +1 -1
  251. package/resources/devices/keyboard.mjs.map +1 -1
  252. package/resources/devices/language.d.mts +43 -0
  253. package/resources/devices/language.d.mts.map +1 -0
  254. package/resources/devices/language.d.ts +43 -0
  255. package/resources/devices/language.d.ts.map +1 -0
  256. package/resources/devices/language.js +47 -0
  257. package/resources/devices/language.js.map +1 -0
  258. package/resources/devices/language.mjs +43 -0
  259. package/resources/devices/language.mjs.map +1 -0
  260. package/resources/devices/location.d.mts +3 -10
  261. package/resources/devices/location.d.mts.map +1 -1
  262. package/resources/devices/location.d.ts +3 -10
  263. package/resources/devices/location.d.ts.map +1 -1
  264. package/resources/devices/location.js.map +1 -1
  265. package/resources/devices/location.mjs.map +1 -1
  266. package/resources/devices/packages.d.mts.map +1 -1
  267. package/resources/devices/packages.d.ts.map +1 -1
  268. package/resources/devices/packages.mjs.map +1 -1
  269. package/resources/devices/profile.d.mts.map +1 -1
  270. package/resources/devices/profile.d.ts.map +1 -1
  271. package/resources/devices/profile.mjs.map +1 -1
  272. package/resources/devices/proxy.d.mts +35 -9
  273. package/resources/devices/proxy.d.mts.map +1 -1
  274. package/resources/devices/proxy.d.ts +35 -9
  275. package/resources/devices/proxy.d.ts.map +1 -1
  276. package/resources/devices/proxy.js +17 -0
  277. package/resources/devices/proxy.js.map +1 -1
  278. package/resources/devices/proxy.mjs +17 -0
  279. package/resources/devices/proxy.mjs.map +1 -1
  280. package/resources/devices/state.d.mts +38 -3
  281. package/resources/devices/state.d.mts.map +1 -1
  282. package/resources/devices/state.d.ts +38 -3
  283. package/resources/devices/state.d.ts.map +1 -1
  284. package/resources/devices/state.js +17 -0
  285. package/resources/devices/state.js.map +1 -1
  286. package/resources/devices/state.mjs +17 -0
  287. package/resources/devices/state.mjs.map +1 -1
  288. package/resources/devices/tasks.d.mts +3 -0
  289. package/resources/devices/tasks.d.mts.map +1 -1
  290. package/resources/devices/tasks.d.ts +3 -0
  291. package/resources/devices/tasks.d.ts.map +1 -1
  292. package/resources/devices/tasks.js +3 -0
  293. package/resources/devices/tasks.js.map +1 -1
  294. package/resources/devices/tasks.mjs +3 -0
  295. package/resources/devices/tasks.mjs.map +1 -1
  296. package/resources/devices/timezone.d.mts +37 -0
  297. package/resources/devices/timezone.d.mts.map +1 -0
  298. package/resources/devices/timezone.d.ts +37 -0
  299. package/resources/devices/timezone.d.ts.map +1 -0
  300. package/resources/devices/timezone.js +47 -0
  301. package/resources/devices/timezone.js.map +1 -0
  302. package/resources/devices/timezone.mjs +43 -0
  303. package/resources/devices/timezone.mjs.map +1 -0
  304. package/resources/devices.d.mts.map +1 -1
  305. package/resources/devices.d.ts.map +1 -1
  306. package/resources/devices.mjs.map +1 -1
  307. package/resources/hooks.d.mts +35 -4
  308. package/resources/hooks.d.mts.map +1 -1
  309. package/resources/hooks.d.ts +35 -4
  310. package/resources/hooks.d.ts.map +1 -1
  311. package/resources/hooks.js +9 -3
  312. package/resources/hooks.js.map +1 -1
  313. package/resources/hooks.mjs +9 -3
  314. package/resources/hooks.mjs.map +1 -1
  315. package/resources/index.d.mts +8 -6
  316. package/resources/index.d.mts.map +1 -1
  317. package/resources/index.d.ts +8 -6
  318. package/resources/index.d.ts.map +1 -1
  319. package/resources/index.js +7 -3
  320. package/resources/index.js.map +1 -1
  321. package/resources/index.mjs +4 -2
  322. package/resources/index.mjs.map +1 -1
  323. package/resources/models.d.mts +3 -0
  324. package/resources/models.d.mts.map +1 -1
  325. package/resources/models.d.ts +3 -0
  326. package/resources/models.d.ts.map +1 -1
  327. package/resources/models.js +3 -0
  328. package/resources/models.js.map +1 -1
  329. package/resources/models.mjs +3 -0
  330. package/resources/models.mjs.map +1 -1
  331. package/resources/profiles.d.mts.map +1 -1
  332. package/resources/profiles.d.ts.map +1 -1
  333. package/resources/profiles.mjs.map +1 -1
  334. package/resources/proxies.d.mts +141 -21
  335. package/resources/proxies.d.mts.map +1 -1
  336. package/resources/proxies.d.ts +141 -21
  337. package/resources/proxies.d.ts.map +1 -1
  338. package/resources/proxies.js +11 -2
  339. package/resources/proxies.js.map +1 -1
  340. package/resources/proxies.mjs +11 -2
  341. package/resources/proxies.mjs.map +1 -1
  342. package/resources/shared.d.mts +28 -8
  343. package/resources/shared.d.mts.map +1 -1
  344. package/resources/shared.d.ts +28 -8
  345. package/resources/shared.d.ts.map +1 -1
  346. package/resources/tasks/index.d.mts.map +1 -1
  347. package/resources/tasks/index.d.ts.map +1 -1
  348. package/resources/tasks/index.mjs.map +1 -1
  349. package/resources/tasks/screenshots.d.mts.map +1 -1
  350. package/resources/tasks/screenshots.d.ts.map +1 -1
  351. package/resources/tasks/screenshots.mjs.map +1 -1
  352. package/resources/tasks/tasks.d.mts +121 -9
  353. package/resources/tasks/tasks.d.mts.map +1 -1
  354. package/resources/tasks/tasks.d.ts +121 -9
  355. package/resources/tasks/tasks.d.ts.map +1 -1
  356. package/resources/tasks/tasks.js.map +1 -1
  357. package/resources/tasks/tasks.mjs.map +1 -1
  358. package/resources/tasks/ui-states.d.mts.map +1 -1
  359. package/resources/tasks/ui-states.d.ts.map +1 -1
  360. package/resources/tasks/ui-states.mjs.map +1 -1
  361. package/resources/tasks.d.mts.map +1 -1
  362. package/resources/tasks.d.ts.map +1 -1
  363. package/resources/tasks.mjs.map +1 -1
  364. package/resources/webhooks/deliveries.d.mts +173 -0
  365. package/resources/webhooks/deliveries.d.mts.map +1 -0
  366. package/resources/webhooks/deliveries.d.ts +173 -0
  367. package/resources/webhooks/deliveries.d.ts.map +1 -0
  368. package/resources/webhooks/deliveries.js +62 -0
  369. package/resources/webhooks/deliveries.js.map +1 -0
  370. package/resources/webhooks/deliveries.mjs +58 -0
  371. package/resources/webhooks/deliveries.mjs.map +1 -0
  372. package/resources/webhooks/index.d.mts +3 -0
  373. package/resources/webhooks/index.d.mts.map +1 -0
  374. package/resources/webhooks/index.d.ts +3 -0
  375. package/resources/webhooks/index.d.ts.map +1 -0
  376. package/resources/webhooks/index.js +9 -0
  377. package/resources/webhooks/index.js.map +1 -0
  378. package/resources/webhooks/index.mjs +4 -0
  379. package/resources/webhooks/index.mjs.map +1 -0
  380. package/resources/webhooks/webhooks.d.mts +271 -0
  381. package/resources/webhooks/webhooks.d.mts.map +1 -0
  382. package/resources/webhooks/webhooks.d.ts +271 -0
  383. package/resources/webhooks/webhooks.d.ts.map +1 -0
  384. package/resources/webhooks/webhooks.js +122 -0
  385. package/resources/webhooks/webhooks.js.map +1 -0
  386. package/resources/webhooks/webhooks.mjs +117 -0
  387. package/resources/webhooks/webhooks.mjs.map +1 -0
  388. package/resources/webhooks.d.mts +2 -0
  389. package/resources/webhooks.d.mts.map +1 -0
  390. package/resources/webhooks.d.ts +2 -0
  391. package/resources/webhooks.d.ts.map +1 -0
  392. package/resources/webhooks.js +6 -0
  393. package/resources/webhooks.js.map +1 -0
  394. package/resources/webhooks.mjs +3 -0
  395. package/resources/webhooks.mjs.map +1 -0
  396. package/resources/workflows/action-catalog.d.mts +40 -0
  397. package/resources/workflows/action-catalog.d.mts.map +1 -0
  398. package/resources/workflows/action-catalog.d.ts +40 -0
  399. package/resources/workflows/action-catalog.d.ts.map +1 -0
  400. package/resources/workflows/action-catalog.js +22 -0
  401. package/resources/workflows/action-catalog.js.map +1 -0
  402. package/resources/workflows/action-catalog.mjs +18 -0
  403. package/resources/workflows/action-catalog.mjs.map +1 -0
  404. package/resources/workflows/actions/actions.d.mts +86 -0
  405. package/resources/workflows/actions/actions.d.mts.map +1 -0
  406. package/resources/workflows/actions/actions.d.ts +86 -0
  407. package/resources/workflows/actions/actions.d.ts.map +1 -0
  408. package/resources/workflows/actions/actions.js +48 -0
  409. package/resources/workflows/actions/actions.js.map +1 -0
  410. package/resources/workflows/actions/actions.mjs +43 -0
  411. package/resources/workflows/actions/actions.mjs.map +1 -0
  412. package/resources/workflows/actions/index.d.mts +3 -0
  413. package/resources/workflows/actions/index.d.mts.map +1 -0
  414. package/resources/workflows/actions/index.d.ts +3 -0
  415. package/resources/workflows/actions/index.d.ts.map +1 -0
  416. package/resources/workflows/actions/index.js +9 -0
  417. package/resources/workflows/actions/index.js.map +1 -0
  418. package/resources/workflows/actions/index.mjs +4 -0
  419. package/resources/workflows/actions/index.mjs.map +1 -0
  420. package/resources/workflows/actions/services.d.mts +39 -0
  421. package/resources/workflows/actions/services.d.mts.map +1 -0
  422. package/resources/workflows/actions/services.d.ts +39 -0
  423. package/resources/workflows/actions/services.d.ts.map +1 -0
  424. package/resources/workflows/actions/services.js +22 -0
  425. package/resources/workflows/actions/services.js.map +1 -0
  426. package/resources/workflows/actions/services.mjs +18 -0
  427. package/resources/workflows/actions/services.mjs.map +1 -0
  428. package/resources/workflows/actions.d.mts +2 -0
  429. package/resources/workflows/actions.d.mts.map +1 -0
  430. package/resources/workflows/actions.d.ts +2 -0
  431. package/resources/workflows/actions.d.ts.map +1 -0
  432. package/resources/workflows/actions.js +6 -0
  433. package/resources/workflows/actions.js.map +1 -0
  434. package/resources/workflows/actions.mjs +3 -0
  435. package/resources/workflows/actions.mjs.map +1 -0
  436. package/resources/workflows/events/catalog.d.mts +55 -0
  437. package/resources/workflows/events/catalog.d.mts.map +1 -0
  438. package/resources/workflows/events/catalog.d.ts +55 -0
  439. package/resources/workflows/events/catalog.d.ts.map +1 -0
  440. package/resources/workflows/events/catalog.js +21 -0
  441. package/resources/workflows/events/catalog.js.map +1 -0
  442. package/resources/workflows/events/catalog.mjs +17 -0
  443. package/resources/workflows/events/catalog.mjs.map +1 -0
  444. package/resources/workflows/events/events.d.mts +123 -0
  445. package/resources/workflows/events/events.d.mts.map +1 -0
  446. package/resources/workflows/events/events.d.ts +123 -0
  447. package/resources/workflows/events/events.d.ts.map +1 -0
  448. package/resources/workflows/events/events.js +30 -0
  449. package/resources/workflows/events/events.js.map +1 -0
  450. package/resources/workflows/events/events.mjs +25 -0
  451. package/resources/workflows/events/events.mjs.map +1 -0
  452. package/resources/workflows/events/index.d.mts +3 -0
  453. package/resources/workflows/events/index.d.mts.map +1 -0
  454. package/resources/workflows/events/index.d.ts +3 -0
  455. package/resources/workflows/events/index.d.ts.map +1 -0
  456. package/resources/workflows/events/index.js +9 -0
  457. package/resources/workflows/events/index.js.map +1 -0
  458. package/resources/workflows/events/index.mjs +4 -0
  459. package/resources/workflows/events/index.mjs.map +1 -0
  460. package/resources/workflows/events.d.mts +2 -0
  461. package/resources/workflows/events.d.mts.map +1 -0
  462. package/resources/workflows/events.d.ts +2 -0
  463. package/resources/workflows/events.d.ts.map +1 -0
  464. package/resources/workflows/events.js +6 -0
  465. package/resources/workflows/events.js.map +1 -0
  466. package/resources/workflows/events.mjs +3 -0
  467. package/resources/workflows/events.mjs.map +1 -0
  468. package/resources/workflows/executions.d.mts +83 -0
  469. package/resources/workflows/executions.d.mts.map +1 -0
  470. package/resources/workflows/executions.d.ts +83 -0
  471. package/resources/workflows/executions.d.ts.map +1 -0
  472. package/resources/workflows/executions.js +28 -0
  473. package/resources/workflows/executions.js.map +1 -0
  474. package/resources/workflows/executions.mjs +24 -0
  475. package/resources/workflows/executions.mjs.map +1 -0
  476. package/resources/workflows/flows/actions.d.mts +81 -0
  477. package/resources/workflows/flows/actions.d.mts.map +1 -0
  478. package/resources/workflows/flows/actions.d.ts +81 -0
  479. package/resources/workflows/flows/actions.d.ts.map +1 -0
  480. package/resources/workflows/flows/actions.js +35 -0
  481. package/resources/workflows/flows/actions.js.map +1 -0
  482. package/resources/workflows/flows/actions.mjs +31 -0
  483. package/resources/workflows/flows/actions.mjs.map +1 -0
  484. package/resources/workflows/flows/flows.d.mts +128 -0
  485. package/resources/workflows/flows/flows.d.mts.map +1 -0
  486. package/resources/workflows/flows/flows.d.ts +128 -0
  487. package/resources/workflows/flows/flows.d.ts.map +1 -0
  488. package/resources/workflows/flows/flows.js +61 -0
  489. package/resources/workflows/flows/flows.js.map +1 -0
  490. package/resources/workflows/flows/flows.mjs +56 -0
  491. package/resources/workflows/flows/flows.mjs.map +1 -0
  492. package/resources/workflows/flows/index.d.mts +3 -0
  493. package/resources/workflows/flows/index.d.mts.map +1 -0
  494. package/resources/workflows/flows/index.d.ts +3 -0
  495. package/resources/workflows/flows/index.d.ts.map +1 -0
  496. package/resources/workflows/flows/index.js +9 -0
  497. package/resources/workflows/flows/index.js.map +1 -0
  498. package/resources/workflows/flows/index.mjs +4 -0
  499. package/resources/workflows/flows/index.mjs.map +1 -0
  500. package/resources/workflows/flows.d.mts +2 -0
  501. package/resources/workflows/flows.d.mts.map +1 -0
  502. package/resources/workflows/flows.d.ts +2 -0
  503. package/resources/workflows/flows.d.ts.map +1 -0
  504. package/resources/workflows/flows.js +6 -0
  505. package/resources/workflows/flows.js.map +1 -0
  506. package/resources/workflows/flows.mjs +3 -0
  507. package/resources/workflows/flows.mjs.map +1 -0
  508. package/resources/workflows/index.d.mts +9 -0
  509. package/resources/workflows/index.d.mts.map +1 -0
  510. package/resources/workflows/index.d.ts +9 -0
  511. package/resources/workflows/index.d.ts.map +1 -0
  512. package/resources/workflows/index.js +21 -0
  513. package/resources/workflows/index.js.map +1 -0
  514. package/resources/workflows/index.mjs +10 -0
  515. package/resources/workflows/index.mjs.map +1 -0
  516. package/resources/workflows/timezones.d.mts +16 -0
  517. package/resources/workflows/timezones.d.mts.map +1 -0
  518. package/resources/workflows/timezones.d.ts +16 -0
  519. package/resources/workflows/timezones.d.ts.map +1 -0
  520. package/resources/workflows/timezones.js +15 -0
  521. package/resources/workflows/timezones.js.map +1 -0
  522. package/resources/workflows/timezones.mjs +11 -0
  523. package/resources/workflows/timezones.mjs.map +1 -0
  524. package/resources/workflows/triggers.d.mts +313 -0
  525. package/resources/workflows/triggers.d.mts.map +1 -0
  526. package/resources/workflows/triggers.d.ts +313 -0
  527. package/resources/workflows/triggers.d.ts.map +1 -0
  528. package/resources/workflows/triggers.js +62 -0
  529. package/resources/workflows/triggers.js.map +1 -0
  530. package/resources/workflows/triggers.mjs +58 -0
  531. package/resources/workflows/triggers.mjs.map +1 -0
  532. package/resources/workflows/workflows.d.mts +57 -0
  533. package/resources/workflows/workflows.d.mts.map +1 -0
  534. package/resources/workflows/workflows.d.ts +57 -0
  535. package/resources/workflows/workflows.d.ts.map +1 -0
  536. package/resources/workflows/workflows.js +41 -0
  537. package/resources/workflows/workflows.js.map +1 -0
  538. package/resources/workflows/workflows.mjs +36 -0
  539. package/resources/workflows/workflows.mjs.map +1 -0
  540. package/resources/workflows.d.mts +2 -0
  541. package/resources/workflows.d.mts.map +1 -0
  542. package/resources/workflows.d.ts +2 -0
  543. package/resources/workflows.d.ts.map +1 -0
  544. package/resources/workflows.js +6 -0
  545. package/resources/workflows.js.map +1 -0
  546. package/resources/workflows.mjs +3 -0
  547. package/resources/workflows.mjs.map +1 -0
  548. package/resources.d.mts.map +1 -1
  549. package/resources.d.ts.map +1 -1
  550. package/resources.mjs.map +1 -1
  551. package/src/client.ts +176 -68
  552. package/src/internal/types.ts +6 -8
  553. package/src/internal/utils/env.ts +2 -2
  554. package/src/internal/utils/log.ts +2 -0
  555. package/src/resources/apps.ts +547 -30
  556. package/src/resources/carriers.ts +191 -7
  557. package/src/resources/connect/connect.ts +73 -0
  558. package/src/resources/connect/countries.ts +101 -0
  559. package/src/resources/connect/index.ts +27 -0
  560. package/src/resources/connect/proxies.ts +596 -0
  561. package/src/resources/connect/users.ts +512 -0
  562. package/src/resources/connect.ts +3 -0
  563. package/src/resources/credentials/credentials.ts +3 -0
  564. package/src/resources/credentials/packages/credentials/credentials.ts +3 -0
  565. package/src/resources/credentials/packages/credentials/fields.ts +3 -0
  566. package/src/resources/credentials/packages/packages.ts +3 -0
  567. package/src/resources/devices/apps.ts +67 -41
  568. package/src/resources/devices/devices.ts +268 -71
  569. package/src/resources/devices/esim.ts +208 -0
  570. package/src/resources/devices/index.ts +34 -15
  571. package/src/resources/devices/keyboard.ts +6 -0
  572. package/src/resources/devices/language.ts +91 -0
  573. package/src/resources/devices/location.ts +3 -17
  574. package/src/resources/devices/proxy.ts +61 -9
  575. package/src/resources/devices/state.ts +82 -3
  576. package/src/resources/devices/tasks.ts +3 -0
  577. package/src/resources/devices/timezone.ts +84 -0
  578. package/src/resources/hooks.ts +44 -3
  579. package/src/resources/index.ts +39 -3
  580. package/src/resources/models.ts +3 -0
  581. package/src/resources/proxies.ts +186 -21
  582. package/src/resources/shared.ts +42 -11
  583. package/src/resources/tasks/tasks.ts +184 -8
  584. package/src/resources/webhooks/deliveries.ts +284 -0
  585. package/src/resources/webhooks/index.ts +26 -0
  586. package/src/resources/webhooks/webhooks.ts +433 -0
  587. package/src/resources/webhooks.ts +3 -0
  588. package/src/resources/workflows/action-catalog.ts +71 -0
  589. package/src/resources/workflows/actions/actions.ts +155 -0
  590. package/src/resources/workflows/actions/index.ts +15 -0
  591. package/src/resources/workflows/actions/services.ts +61 -0
  592. package/src/resources/workflows/actions.ts +3 -0
  593. package/src/resources/workflows/events/catalog.ts +88 -0
  594. package/src/resources/workflows/events/events.ts +189 -0
  595. package/src/resources/workflows/events/index.ts +16 -0
  596. package/src/resources/workflows/events.ts +3 -0
  597. package/src/resources/workflows/executions.ts +149 -0
  598. package/src/resources/workflows/flows/actions.ts +141 -0
  599. package/src/resources/workflows/flows/flows.ts +250 -0
  600. package/src/resources/workflows/flows/index.ts +29 -0
  601. package/src/resources/workflows/flows.ts +3 -0
  602. package/src/resources/workflows/index.ts +68 -0
  603. package/src/resources/workflows/timezones.ts +22 -0
  604. package/src/resources/workflows/triggers.ts +454 -0
  605. package/src/resources/workflows/workflows.ts +218 -0
  606. package/src/resources/workflows.ts +3 -0
  607. package/src/version.ts +1 -1
  608. package/uploads.d.mts +1 -0
  609. package/uploads.d.mts.map +1 -1
  610. package/uploads.d.ts +1 -0
  611. package/uploads.d.ts.map +1 -1
  612. package/uploads.mjs +1 -0
  613. package/uploads.mjs.map +1 -1
  614. package/version.d.mts +1 -1
  615. package/version.d.ts +1 -1
  616. package/version.js +1 -1
  617. package/version.mjs +1 -1
  618. package/resources/agents.d.mts +0 -29
  619. package/resources/agents.d.mts.map +0 -1
  620. package/resources/agents.d.ts +0 -29
  621. package/resources/agents.d.ts.map +0 -1
  622. package/resources/agents.js +0 -18
  623. package/resources/agents.js.map +0 -1
  624. package/resources/agents.mjs +0 -14
  625. package/resources/agents.mjs.map +0 -1
  626. package/resources/devices/time.d.mts +0 -59
  627. package/resources/devices/time.d.mts.map +0 -1
  628. package/resources/devices/time.d.ts +0 -59
  629. package/resources/devices/time.d.ts.map +0 -1
  630. package/resources/devices/time.js.map +0 -1
  631. package/resources/devices/time.mjs.map +0 -1
  632. package/src/resources/agents.ts +0 -43
  633. package/src/resources/devices/time.ts +0 -147
@@ -0,0 +1,271 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as Shared from "../shared.mjs";
3
+ import * as DeliveriesAPI from "./deliveries.mjs";
4
+ import { Deliveries, DeliveryListForWebhookParams, DeliveryListForWebhookResponse, DeliveryListParams, DeliveryListResponse, DeliveryRetrieveAttemptsParams, DeliveryRetrieveAttemptsResponse, DeliveryStatsParams, DeliveryStatsResponse } from "./deliveries.mjs";
5
+ import { APIPromise } from "../../core/api-promise.mjs";
6
+ import { RequestOptions } from "../../internal/request-options.mjs";
7
+ export declare class Webhooks extends APIResource {
8
+ deliveries: DeliveriesAPI.Deliveries;
9
+ /**
10
+ * Register a webhook subscription
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const webhook = await client.webhooks.create({
15
+ * url: 'https://example.com/webhooks/droidrun',
16
+ * });
17
+ * ```
18
+ */
19
+ create(body: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse>;
20
+ /**
21
+ * Get a webhook subscription
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const webhook = await client.webhooks.retrieve(
26
+ * '550e8400-e29b-41d4-a716-446655440000',
27
+ * );
28
+ * ```
29
+ */
30
+ retrieve(id: string, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
31
+ /**
32
+ * Update a webhook subscription
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const webhook = await client.webhooks.update(
37
+ * '550e8400-e29b-41d4-a716-446655440000',
38
+ * );
39
+ * ```
40
+ */
41
+ update(id: string, body?: WebhookUpdateParams | null | undefined, options?: RequestOptions): APIPromise<WebhookUpdateResponse>;
42
+ /**
43
+ * List your webhook subscriptions
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const webhooks = await client.webhooks.list();
48
+ * ```
49
+ */
50
+ list(query?: WebhookListParams | null | undefined, options?: RequestOptions): APIPromise<WebhookListResponse>;
51
+ /**
52
+ * Delete a webhook subscription
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * await client.webhooks.delete(
57
+ * '550e8400-e29b-41d4-a716-446655440000',
58
+ * );
59
+ * ```
60
+ */
61
+ delete(id: string, options?: RequestOptions): APIPromise<void>;
62
+ /**
63
+ * List subscribable event types per source
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const response = await client.webhooks.eventTypes();
68
+ * ```
69
+ */
70
+ eventTypes(options?: RequestOptions): APIPromise<WebhookEventTypesResponse>;
71
+ /**
72
+ * Rotate the signing secret (returned once)
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const response = await client.webhooks.rotateSecret(
77
+ * '550e8400-e29b-41d4-a716-446655440000',
78
+ * );
79
+ * ```
80
+ */
81
+ rotateSecret(id: string, options?: RequestOptions): APIPromise<WebhookRotateSecretResponse>;
82
+ /**
83
+ * Send a one-shot test delivery
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * const response = await client.webhooks.testDelivery(
88
+ * '550e8400-e29b-41d4-a716-446655440000',
89
+ * );
90
+ * ```
91
+ */
92
+ testDelivery(id: string, options?: RequestOptions): APIPromise<WebhookTestDeliveryResponse>;
93
+ }
94
+ export interface WebhookCreateResponse {
95
+ data: WebhookCreateResponse.Data;
96
+ }
97
+ export declare namespace WebhookCreateResponse {
98
+ interface Data {
99
+ id: string;
100
+ blockedAt: string | null;
101
+ blockedReason: string | null;
102
+ createdAt: string;
103
+ description: string | null;
104
+ eventTypes: Array<string>;
105
+ /**
106
+ * System-observed delivery health. `blocked` endpoints are auto-disabled after
107
+ * sustained failure; PATCH state=ACTIVE to re-enable.
108
+ */
109
+ health: 'healthy' | 'failing' | 'blocked';
110
+ /**
111
+ * Signing secret — shown only once. Store it now.
112
+ */
113
+ secret: string;
114
+ signingEnabled: boolean;
115
+ state: 'ACTIVE' | 'DISABLED' | 'DELETED';
116
+ updatedAt: string;
117
+ url: string;
118
+ }
119
+ }
120
+ export interface WebhookRetrieveResponse {
121
+ data: WebhookRetrieveResponse.Data;
122
+ }
123
+ export declare namespace WebhookRetrieveResponse {
124
+ interface Data {
125
+ id: string;
126
+ blockedAt: string | null;
127
+ blockedReason: string | null;
128
+ createdAt: string;
129
+ description: string | null;
130
+ eventTypes: Array<string>;
131
+ /**
132
+ * System-observed delivery health. `blocked` endpoints are auto-disabled after
133
+ * sustained failure; PATCH state=ACTIVE to re-enable.
134
+ */
135
+ health: 'healthy' | 'failing' | 'blocked';
136
+ signingEnabled: boolean;
137
+ state: 'ACTIVE' | 'DISABLED' | 'DELETED';
138
+ updatedAt: string;
139
+ url: string;
140
+ }
141
+ }
142
+ export interface WebhookUpdateResponse {
143
+ data: WebhookUpdateResponse.Data;
144
+ }
145
+ export declare namespace WebhookUpdateResponse {
146
+ interface Data {
147
+ id: string;
148
+ blockedAt: string | null;
149
+ blockedReason: string | null;
150
+ createdAt: string;
151
+ description: string | null;
152
+ eventTypes: Array<string>;
153
+ /**
154
+ * System-observed delivery health. `blocked` endpoints are auto-disabled after
155
+ * sustained failure; PATCH state=ACTIVE to re-enable.
156
+ */
157
+ health: 'healthy' | 'failing' | 'blocked';
158
+ signingEnabled: boolean;
159
+ state: 'ACTIVE' | 'DISABLED' | 'DELETED';
160
+ updatedAt: string;
161
+ url: string;
162
+ }
163
+ }
164
+ export interface WebhookListResponse {
165
+ counts: WebhookListResponse.Counts;
166
+ items: Array<WebhookListResponse.Item>;
167
+ pagination: Shared.Pagination;
168
+ }
169
+ export declare namespace WebhookListResponse {
170
+ interface Counts {
171
+ active: number;
172
+ blocked: number;
173
+ disabled: number;
174
+ failing: number;
175
+ total: number;
176
+ }
177
+ interface Item {
178
+ id: string;
179
+ blockedAt: string | null;
180
+ blockedReason: string | null;
181
+ createdAt: string;
182
+ description: string | null;
183
+ eventTypes: Array<string>;
184
+ /**
185
+ * System-observed delivery health. `blocked` endpoints are auto-disabled after
186
+ * sustained failure; PATCH state=ACTIVE to re-enable.
187
+ */
188
+ health: 'healthy' | 'failing' | 'blocked';
189
+ signingEnabled: boolean;
190
+ state: 'ACTIVE' | 'DISABLED' | 'DELETED';
191
+ updatedAt: string;
192
+ url: string;
193
+ }
194
+ }
195
+ export interface WebhookEventTypesResponse {
196
+ data: WebhookEventTypesResponse.Data;
197
+ }
198
+ export declare namespace WebhookEventTypesResponse {
199
+ interface Data {
200
+ schemaVersion: number;
201
+ sources: Array<Data.Source>;
202
+ }
203
+ namespace Data {
204
+ interface Source {
205
+ events: Array<Source.Event>;
206
+ source: string;
207
+ }
208
+ namespace Source {
209
+ interface Event {
210
+ description: string;
211
+ type: string;
212
+ }
213
+ }
214
+ }
215
+ }
216
+ export interface WebhookRotateSecretResponse {
217
+ data: WebhookRotateSecretResponse.Data;
218
+ }
219
+ export declare namespace WebhookRotateSecretResponse {
220
+ interface Data {
221
+ id: string;
222
+ blockedAt: string | null;
223
+ blockedReason: string | null;
224
+ createdAt: string;
225
+ description: string | null;
226
+ eventTypes: Array<string>;
227
+ /**
228
+ * System-observed delivery health. `blocked` endpoints are auto-disabled after
229
+ * sustained failure; PATCH state=ACTIVE to re-enable.
230
+ */
231
+ health: 'healthy' | 'failing' | 'blocked';
232
+ /**
233
+ * Signing secret — shown only once. Store it now.
234
+ */
235
+ secret: string;
236
+ signingEnabled: boolean;
237
+ state: 'ACTIVE' | 'DISABLED' | 'DELETED';
238
+ updatedAt: string;
239
+ url: string;
240
+ }
241
+ }
242
+ export interface WebhookTestDeliveryResponse {
243
+ data: WebhookTestDeliveryResponse.Data;
244
+ }
245
+ export declare namespace WebhookTestDeliveryResponse {
246
+ interface Data {
247
+ error: string | null;
248
+ statusCode: number | null;
249
+ success: boolean;
250
+ }
251
+ }
252
+ export interface WebhookCreateParams {
253
+ url: string;
254
+ description?: string;
255
+ eventTypes?: Array<string>;
256
+ }
257
+ export interface WebhookUpdateParams {
258
+ description?: string | null;
259
+ eventTypes?: Array<string>;
260
+ state?: 'ACTIVE' | 'DISABLED';
261
+ }
262
+ export interface WebhookListParams {
263
+ page?: number;
264
+ pageSize?: number;
265
+ status?: 'active' | 'failing' | 'blocked' | 'disabled';
266
+ }
267
+ export declare namespace Webhooks {
268
+ export { type WebhookCreateResponse as WebhookCreateResponse, type WebhookRetrieveResponse as WebhookRetrieveResponse, type WebhookUpdateResponse as WebhookUpdateResponse, type WebhookListResponse as WebhookListResponse, type WebhookEventTypesResponse as WebhookEventTypesResponse, type WebhookRotateSecretResponse as WebhookRotateSecretResponse, type WebhookTestDeliveryResponse as WebhookTestDeliveryResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
269
+ export { Deliveries as Deliveries, type DeliveryListResponse as DeliveryListResponse, type DeliveryListForWebhookResponse as DeliveryListForWebhookResponse, type DeliveryRetrieveAttemptsResponse as DeliveryRetrieveAttemptsResponse, type DeliveryStatsResponse as DeliveryStatsResponse, type DeliveryListParams as DeliveryListParams, type DeliveryListForWebhookParams as DeliveryListForWebhookParams, type DeliveryRetrieveAttemptsParams as DeliveryRetrieveAttemptsParams, type DeliveryStatsParams as DeliveryStatsParams, };
270
+ }
271
+ //# sourceMappingURL=webhooks.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.d.mts","sourceRoot":"","sources":["../../src/resources/webhooks/webhooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,aAAa,yBAAqB;AAC9C,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,8BAA8B,EAC9B,kBAAkB,EAClB,oBAAoB,EACpB,8BAA8B,EAC9B,gCAAgC,EAChC,mBAAmB,EACnB,qBAA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5C,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -0,0 +1,271 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as Shared from "../shared.js";
3
+ import * as DeliveriesAPI from "./deliveries.js";
4
+ import { Deliveries, DeliveryListForWebhookParams, DeliveryListForWebhookResponse, DeliveryListParams, DeliveryListResponse, DeliveryRetrieveAttemptsParams, DeliveryRetrieveAttemptsResponse, DeliveryStatsParams, DeliveryStatsResponse } from "./deliveries.js";
5
+ import { APIPromise } from "../../core/api-promise.js";
6
+ import { RequestOptions } from "../../internal/request-options.js";
7
+ export declare class Webhooks extends APIResource {
8
+ deliveries: DeliveriesAPI.Deliveries;
9
+ /**
10
+ * Register a webhook subscription
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const webhook = await client.webhooks.create({
15
+ * url: 'https://example.com/webhooks/droidrun',
16
+ * });
17
+ * ```
18
+ */
19
+ create(body: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse>;
20
+ /**
21
+ * Get a webhook subscription
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const webhook = await client.webhooks.retrieve(
26
+ * '550e8400-e29b-41d4-a716-446655440000',
27
+ * );
28
+ * ```
29
+ */
30
+ retrieve(id: string, options?: RequestOptions): APIPromise<WebhookRetrieveResponse>;
31
+ /**
32
+ * Update a webhook subscription
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const webhook = await client.webhooks.update(
37
+ * '550e8400-e29b-41d4-a716-446655440000',
38
+ * );
39
+ * ```
40
+ */
41
+ update(id: string, body?: WebhookUpdateParams | null | undefined, options?: RequestOptions): APIPromise<WebhookUpdateResponse>;
42
+ /**
43
+ * List your webhook subscriptions
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const webhooks = await client.webhooks.list();
48
+ * ```
49
+ */
50
+ list(query?: WebhookListParams | null | undefined, options?: RequestOptions): APIPromise<WebhookListResponse>;
51
+ /**
52
+ * Delete a webhook subscription
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * await client.webhooks.delete(
57
+ * '550e8400-e29b-41d4-a716-446655440000',
58
+ * );
59
+ * ```
60
+ */
61
+ delete(id: string, options?: RequestOptions): APIPromise<void>;
62
+ /**
63
+ * List subscribable event types per source
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const response = await client.webhooks.eventTypes();
68
+ * ```
69
+ */
70
+ eventTypes(options?: RequestOptions): APIPromise<WebhookEventTypesResponse>;
71
+ /**
72
+ * Rotate the signing secret (returned once)
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const response = await client.webhooks.rotateSecret(
77
+ * '550e8400-e29b-41d4-a716-446655440000',
78
+ * );
79
+ * ```
80
+ */
81
+ rotateSecret(id: string, options?: RequestOptions): APIPromise<WebhookRotateSecretResponse>;
82
+ /**
83
+ * Send a one-shot test delivery
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * const response = await client.webhooks.testDelivery(
88
+ * '550e8400-e29b-41d4-a716-446655440000',
89
+ * );
90
+ * ```
91
+ */
92
+ testDelivery(id: string, options?: RequestOptions): APIPromise<WebhookTestDeliveryResponse>;
93
+ }
94
+ export interface WebhookCreateResponse {
95
+ data: WebhookCreateResponse.Data;
96
+ }
97
+ export declare namespace WebhookCreateResponse {
98
+ interface Data {
99
+ id: string;
100
+ blockedAt: string | null;
101
+ blockedReason: string | null;
102
+ createdAt: string;
103
+ description: string | null;
104
+ eventTypes: Array<string>;
105
+ /**
106
+ * System-observed delivery health. `blocked` endpoints are auto-disabled after
107
+ * sustained failure; PATCH state=ACTIVE to re-enable.
108
+ */
109
+ health: 'healthy' | 'failing' | 'blocked';
110
+ /**
111
+ * Signing secret — shown only once. Store it now.
112
+ */
113
+ secret: string;
114
+ signingEnabled: boolean;
115
+ state: 'ACTIVE' | 'DISABLED' | 'DELETED';
116
+ updatedAt: string;
117
+ url: string;
118
+ }
119
+ }
120
+ export interface WebhookRetrieveResponse {
121
+ data: WebhookRetrieveResponse.Data;
122
+ }
123
+ export declare namespace WebhookRetrieveResponse {
124
+ interface Data {
125
+ id: string;
126
+ blockedAt: string | null;
127
+ blockedReason: string | null;
128
+ createdAt: string;
129
+ description: string | null;
130
+ eventTypes: Array<string>;
131
+ /**
132
+ * System-observed delivery health. `blocked` endpoints are auto-disabled after
133
+ * sustained failure; PATCH state=ACTIVE to re-enable.
134
+ */
135
+ health: 'healthy' | 'failing' | 'blocked';
136
+ signingEnabled: boolean;
137
+ state: 'ACTIVE' | 'DISABLED' | 'DELETED';
138
+ updatedAt: string;
139
+ url: string;
140
+ }
141
+ }
142
+ export interface WebhookUpdateResponse {
143
+ data: WebhookUpdateResponse.Data;
144
+ }
145
+ export declare namespace WebhookUpdateResponse {
146
+ interface Data {
147
+ id: string;
148
+ blockedAt: string | null;
149
+ blockedReason: string | null;
150
+ createdAt: string;
151
+ description: string | null;
152
+ eventTypes: Array<string>;
153
+ /**
154
+ * System-observed delivery health. `blocked` endpoints are auto-disabled after
155
+ * sustained failure; PATCH state=ACTIVE to re-enable.
156
+ */
157
+ health: 'healthy' | 'failing' | 'blocked';
158
+ signingEnabled: boolean;
159
+ state: 'ACTIVE' | 'DISABLED' | 'DELETED';
160
+ updatedAt: string;
161
+ url: string;
162
+ }
163
+ }
164
+ export interface WebhookListResponse {
165
+ counts: WebhookListResponse.Counts;
166
+ items: Array<WebhookListResponse.Item>;
167
+ pagination: Shared.Pagination;
168
+ }
169
+ export declare namespace WebhookListResponse {
170
+ interface Counts {
171
+ active: number;
172
+ blocked: number;
173
+ disabled: number;
174
+ failing: number;
175
+ total: number;
176
+ }
177
+ interface Item {
178
+ id: string;
179
+ blockedAt: string | null;
180
+ blockedReason: string | null;
181
+ createdAt: string;
182
+ description: string | null;
183
+ eventTypes: Array<string>;
184
+ /**
185
+ * System-observed delivery health. `blocked` endpoints are auto-disabled after
186
+ * sustained failure; PATCH state=ACTIVE to re-enable.
187
+ */
188
+ health: 'healthy' | 'failing' | 'blocked';
189
+ signingEnabled: boolean;
190
+ state: 'ACTIVE' | 'DISABLED' | 'DELETED';
191
+ updatedAt: string;
192
+ url: string;
193
+ }
194
+ }
195
+ export interface WebhookEventTypesResponse {
196
+ data: WebhookEventTypesResponse.Data;
197
+ }
198
+ export declare namespace WebhookEventTypesResponse {
199
+ interface Data {
200
+ schemaVersion: number;
201
+ sources: Array<Data.Source>;
202
+ }
203
+ namespace Data {
204
+ interface Source {
205
+ events: Array<Source.Event>;
206
+ source: string;
207
+ }
208
+ namespace Source {
209
+ interface Event {
210
+ description: string;
211
+ type: string;
212
+ }
213
+ }
214
+ }
215
+ }
216
+ export interface WebhookRotateSecretResponse {
217
+ data: WebhookRotateSecretResponse.Data;
218
+ }
219
+ export declare namespace WebhookRotateSecretResponse {
220
+ interface Data {
221
+ id: string;
222
+ blockedAt: string | null;
223
+ blockedReason: string | null;
224
+ createdAt: string;
225
+ description: string | null;
226
+ eventTypes: Array<string>;
227
+ /**
228
+ * System-observed delivery health. `blocked` endpoints are auto-disabled after
229
+ * sustained failure; PATCH state=ACTIVE to re-enable.
230
+ */
231
+ health: 'healthy' | 'failing' | 'blocked';
232
+ /**
233
+ * Signing secret — shown only once. Store it now.
234
+ */
235
+ secret: string;
236
+ signingEnabled: boolean;
237
+ state: 'ACTIVE' | 'DISABLED' | 'DELETED';
238
+ updatedAt: string;
239
+ url: string;
240
+ }
241
+ }
242
+ export interface WebhookTestDeliveryResponse {
243
+ data: WebhookTestDeliveryResponse.Data;
244
+ }
245
+ export declare namespace WebhookTestDeliveryResponse {
246
+ interface Data {
247
+ error: string | null;
248
+ statusCode: number | null;
249
+ success: boolean;
250
+ }
251
+ }
252
+ export interface WebhookCreateParams {
253
+ url: string;
254
+ description?: string;
255
+ eventTypes?: Array<string>;
256
+ }
257
+ export interface WebhookUpdateParams {
258
+ description?: string | null;
259
+ eventTypes?: Array<string>;
260
+ state?: 'ACTIVE' | 'DISABLED';
261
+ }
262
+ export interface WebhookListParams {
263
+ page?: number;
264
+ pageSize?: number;
265
+ status?: 'active' | 'failing' | 'blocked' | 'disabled';
266
+ }
267
+ export declare namespace Webhooks {
268
+ export { type WebhookCreateResponse as WebhookCreateResponse, type WebhookRetrieveResponse as WebhookRetrieveResponse, type WebhookUpdateResponse as WebhookUpdateResponse, type WebhookListResponse as WebhookListResponse, type WebhookEventTypesResponse as WebhookEventTypesResponse, type WebhookRotateSecretResponse as WebhookRotateSecretResponse, type WebhookTestDeliveryResponse as WebhookTestDeliveryResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
269
+ export { Deliveries as Deliveries, type DeliveryListResponse as DeliveryListResponse, type DeliveryListForWebhookResponse as DeliveryListForWebhookResponse, type DeliveryRetrieveAttemptsResponse as DeliveryRetrieveAttemptsResponse, type DeliveryStatsResponse as DeliveryStatsResponse, type DeliveryListParams as DeliveryListParams, type DeliveryListForWebhookParams as DeliveryListForWebhookParams, type DeliveryRetrieveAttemptsParams as DeliveryRetrieveAttemptsParams, type DeliveryStatsParams as DeliveryStatsParams, };
270
+ }
271
+ //# sourceMappingURL=webhooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/resources/webhooks/webhooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,aAAa,wBAAqB;AAC9C,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,8BAA8B,EAC9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AmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Webhooks = void 0;
5
+ const tslib_1 = require("../../internal/tslib.js");
6
+ const resource_1 = require("../../core/resource.js");
7
+ const DeliveriesAPI = tslib_1.__importStar(require("./deliveries.js"));
8
+ const deliveries_1 = require("./deliveries.js");
9
+ const headers_1 = require("../../internal/headers.js");
10
+ const path_1 = require("../../internal/utils/path.js");
11
+ class Webhooks extends resource_1.APIResource {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.deliveries = new DeliveriesAPI.Deliveries(this._client);
15
+ }
16
+ /**
17
+ * Register a webhook subscription
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const webhook = await client.webhooks.create({
22
+ * url: 'https://example.com/webhooks/droidrun',
23
+ * });
24
+ * ```
25
+ */
26
+ create(body, options) {
27
+ return this._client.post('/webhooks', { body, ...options });
28
+ }
29
+ /**
30
+ * Get a webhook subscription
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const webhook = await client.webhooks.retrieve(
35
+ * '550e8400-e29b-41d4-a716-446655440000',
36
+ * );
37
+ * ```
38
+ */
39
+ retrieve(id, options) {
40
+ return this._client.get((0, path_1.path) `/webhooks/${id}`, options);
41
+ }
42
+ /**
43
+ * Update a webhook subscription
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const webhook = await client.webhooks.update(
48
+ * '550e8400-e29b-41d4-a716-446655440000',
49
+ * );
50
+ * ```
51
+ */
52
+ update(id, body = {}, options) {
53
+ return this._client.patch((0, path_1.path) `/webhooks/${id}`, { body, ...options });
54
+ }
55
+ /**
56
+ * List your webhook subscriptions
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const webhooks = await client.webhooks.list();
61
+ * ```
62
+ */
63
+ list(query = {}, options) {
64
+ return this._client.get('/webhooks', { query, ...options });
65
+ }
66
+ /**
67
+ * Delete a webhook subscription
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * await client.webhooks.delete(
72
+ * '550e8400-e29b-41d4-a716-446655440000',
73
+ * );
74
+ * ```
75
+ */
76
+ delete(id, options) {
77
+ return this._client.delete((0, path_1.path) `/webhooks/${id}`, {
78
+ ...options,
79
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
80
+ });
81
+ }
82
+ /**
83
+ * List subscribable event types per source
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * const response = await client.webhooks.eventTypes();
88
+ * ```
89
+ */
90
+ eventTypes(options) {
91
+ return this._client.get('/event-types', options);
92
+ }
93
+ /**
94
+ * Rotate the signing secret (returned once)
95
+ *
96
+ * @example
97
+ * ```ts
98
+ * const response = await client.webhooks.rotateSecret(
99
+ * '550e8400-e29b-41d4-a716-446655440000',
100
+ * );
101
+ * ```
102
+ */
103
+ rotateSecret(id, options) {
104
+ return this._client.post((0, path_1.path) `/webhooks/${id}/rotate-secret`, options);
105
+ }
106
+ /**
107
+ * Send a one-shot test delivery
108
+ *
109
+ * @example
110
+ * ```ts
111
+ * const response = await client.webhooks.testDelivery(
112
+ * '550e8400-e29b-41d4-a716-446655440000',
113
+ * );
114
+ * ```
115
+ */
116
+ testDelivery(id, options) {
117
+ return this._client.post((0, path_1.path) `/webhooks/${id}/test`, options);
118
+ }
119
+ }
120
+ exports.Webhooks = Webhooks;
121
+ Webhooks.Deliveries = deliveries_1.Deliveries;
122
+ //# sourceMappingURL=webhooks.js.map