@mobilerun/sdk 5.1.0 → 5.2.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 (374) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/client.d.mts +4 -16
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -16
  5. package/client.d.ts.map +1 -1
  6. package/client.js +0 -12
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -13
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/apps.d.mts +12 -7
  12. package/resources/apps.d.mts.map +1 -1
  13. package/resources/apps.d.ts +12 -7
  14. package/resources/apps.d.ts.map +1 -1
  15. package/resources/apps.js +0 -4
  16. package/resources/apps.js.map +1 -1
  17. package/resources/apps.mjs +0 -4
  18. package/resources/apps.mjs.map +1 -1
  19. package/resources/carriers.d.mts +0 -3
  20. package/resources/carriers.d.mts.map +1 -1
  21. package/resources/carriers.d.ts +0 -3
  22. package/resources/carriers.d.ts.map +1 -1
  23. package/resources/carriers.js +0 -3
  24. package/resources/carriers.js.map +1 -1
  25. package/resources/carriers.mjs +0 -3
  26. package/resources/carriers.mjs.map +1 -1
  27. package/resources/connect/countries.d.mts +8 -3
  28. package/resources/connect/countries.d.mts.map +1 -1
  29. package/resources/connect/countries.d.ts +8 -3
  30. package/resources/connect/countries.d.ts.map +1 -1
  31. package/resources/connect/countries.js +6 -1
  32. package/resources/connect/countries.js.map +1 -1
  33. package/resources/connect/countries.mjs +6 -1
  34. package/resources/connect/countries.mjs.map +1 -1
  35. package/resources/connect/proxies.d.mts +11 -9
  36. package/resources/connect/proxies.d.mts.map +1 -1
  37. package/resources/connect/proxies.d.ts +11 -9
  38. package/resources/connect/proxies.d.ts.map +1 -1
  39. package/resources/connect/proxies.js +7 -5
  40. package/resources/connect/proxies.js.map +1 -1
  41. package/resources/connect/proxies.mjs +7 -5
  42. package/resources/connect/proxies.mjs.map +1 -1
  43. package/resources/connect/users.d.mts +7 -2
  44. package/resources/connect/users.d.mts.map +1 -1
  45. package/resources/connect/users.d.ts +7 -2
  46. package/resources/connect/users.d.ts.map +1 -1
  47. package/resources/connect/users.js +7 -2
  48. package/resources/connect/users.js.map +1 -1
  49. package/resources/connect/users.mjs +7 -2
  50. package/resources/connect/users.mjs.map +1 -1
  51. package/resources/credentials/credentials.d.mts +3 -4
  52. package/resources/credentials/credentials.d.mts.map +1 -1
  53. package/resources/credentials/credentials.d.ts +3 -4
  54. package/resources/credentials/credentials.d.ts.map +1 -1
  55. package/resources/credentials/credentials.js +3 -4
  56. package/resources/credentials/credentials.js.map +1 -1
  57. package/resources/credentials/credentials.mjs +3 -4
  58. package/resources/credentials/credentials.mjs.map +1 -1
  59. package/resources/credentials/packages/credentials/credentials.d.mts +14 -7
  60. package/resources/credentials/packages/credentials/credentials.d.mts.map +1 -1
  61. package/resources/credentials/packages/credentials/credentials.d.ts +14 -7
  62. package/resources/credentials/packages/credentials/credentials.d.ts.map +1 -1
  63. package/resources/credentials/packages/credentials/credentials.js +7 -6
  64. package/resources/credentials/packages/credentials/credentials.js.map +1 -1
  65. package/resources/credentials/packages/credentials/credentials.mjs +7 -6
  66. package/resources/credentials/packages/credentials/credentials.mjs.map +1 -1
  67. package/resources/credentials/packages/credentials/fields.d.mts +8 -6
  68. package/resources/credentials/packages/credentials/fields.d.mts.map +1 -1
  69. package/resources/credentials/packages/credentials/fields.d.ts +8 -6
  70. package/resources/credentials/packages/credentials/fields.d.ts.map +1 -1
  71. package/resources/credentials/packages/credentials/fields.js +8 -6
  72. package/resources/credentials/packages/credentials/fields.js.map +1 -1
  73. package/resources/credentials/packages/credentials/fields.mjs +8 -6
  74. package/resources/credentials/packages/credentials/fields.mjs.map +1 -1
  75. package/resources/credentials/packages/packages.d.mts +5 -5
  76. package/resources/credentials/packages/packages.d.mts.map +1 -1
  77. package/resources/credentials/packages/packages.d.ts +5 -5
  78. package/resources/credentials/packages/packages.d.ts.map +1 -1
  79. package/resources/credentials/packages/packages.js +5 -5
  80. package/resources/credentials/packages/packages.js.map +1 -1
  81. package/resources/credentials/packages/packages.mjs +5 -5
  82. package/resources/credentials/packages/packages.mjs.map +1 -1
  83. package/resources/devices/actions.d.mts +10 -5
  84. package/resources/devices/actions.d.mts.map +1 -1
  85. package/resources/devices/actions.d.ts +10 -5
  86. package/resources/devices/actions.d.ts.map +1 -1
  87. package/resources/devices/actions.js +10 -5
  88. package/resources/devices/actions.js.map +1 -1
  89. package/resources/devices/actions.mjs +10 -5
  90. package/resources/devices/actions.mjs.map +1 -1
  91. package/resources/devices/apps.d.mts +38 -5
  92. package/resources/devices/apps.d.mts.map +1 -1
  93. package/resources/devices/apps.d.ts +38 -5
  94. package/resources/devices/apps.d.ts.map +1 -1
  95. package/resources/devices/apps.js +21 -5
  96. package/resources/devices/apps.js.map +1 -1
  97. package/resources/devices/apps.mjs +21 -5
  98. package/resources/devices/apps.mjs.map +1 -1
  99. package/resources/devices/devices.d.mts +76 -14
  100. package/resources/devices/devices.d.mts.map +1 -1
  101. package/resources/devices/devices.d.ts +76 -14
  102. package/resources/devices/devices.d.ts.map +1 -1
  103. package/resources/devices/devices.js +28 -12
  104. package/resources/devices/devices.js.map +1 -1
  105. package/resources/devices/devices.mjs +28 -12
  106. package/resources/devices/devices.mjs.map +1 -1
  107. package/resources/devices/esim.d.mts +6 -4
  108. package/resources/devices/esim.d.mts.map +1 -1
  109. package/resources/devices/esim.d.ts +6 -4
  110. package/resources/devices/esim.d.ts.map +1 -1
  111. package/resources/devices/esim.js +6 -4
  112. package/resources/devices/esim.js.map +1 -1
  113. package/resources/devices/esim.mjs +6 -4
  114. package/resources/devices/esim.mjs.map +1 -1
  115. package/resources/devices/files.d.mts +7 -4
  116. package/resources/devices/files.d.mts.map +1 -1
  117. package/resources/devices/files.d.ts +7 -4
  118. package/resources/devices/files.d.ts.map +1 -1
  119. package/resources/devices/files.js +7 -4
  120. package/resources/devices/files.js.map +1 -1
  121. package/resources/devices/files.mjs +7 -4
  122. package/resources/devices/files.mjs.map +1 -1
  123. package/resources/devices/keyboard.d.mts +5 -3
  124. package/resources/devices/keyboard.d.mts.map +1 -1
  125. package/resources/devices/keyboard.d.ts +5 -3
  126. package/resources/devices/keyboard.d.ts.map +1 -1
  127. package/resources/devices/keyboard.js +5 -3
  128. package/resources/devices/keyboard.js.map +1 -1
  129. package/resources/devices/keyboard.mjs +5 -3
  130. package/resources/devices/keyboard.mjs.map +1 -1
  131. package/resources/devices/language.d.mts +4 -2
  132. package/resources/devices/language.d.mts.map +1 -1
  133. package/resources/devices/language.d.ts +4 -2
  134. package/resources/devices/language.d.ts.map +1 -1
  135. package/resources/devices/language.js +4 -2
  136. package/resources/devices/language.js.map +1 -1
  137. package/resources/devices/language.mjs +4 -2
  138. package/resources/devices/language.mjs.map +1 -1
  139. package/resources/devices/location.d.mts +4 -2
  140. package/resources/devices/location.d.mts.map +1 -1
  141. package/resources/devices/location.d.ts +4 -2
  142. package/resources/devices/location.d.ts.map +1 -1
  143. package/resources/devices/location.js +4 -2
  144. package/resources/devices/location.js.map +1 -1
  145. package/resources/devices/location.mjs +4 -2
  146. package/resources/devices/location.mjs.map +1 -1
  147. package/resources/devices/packages.d.mts +2 -1
  148. package/resources/devices/packages.d.mts.map +1 -1
  149. package/resources/devices/packages.d.ts +2 -1
  150. package/resources/devices/packages.d.ts.map +1 -1
  151. package/resources/devices/packages.js +2 -1
  152. package/resources/devices/packages.js.map +1 -1
  153. package/resources/devices/packages.mjs +2 -1
  154. package/resources/devices/packages.mjs.map +1 -1
  155. package/resources/devices/proxy.d.mts +29 -3
  156. package/resources/devices/proxy.d.mts.map +1 -1
  157. package/resources/devices/proxy.d.ts +29 -3
  158. package/resources/devices/proxy.d.ts.map +1 -1
  159. package/resources/devices/proxy.js +7 -3
  160. package/resources/devices/proxy.js.map +1 -1
  161. package/resources/devices/proxy.mjs +7 -3
  162. package/resources/devices/proxy.mjs.map +1 -1
  163. package/resources/devices/state.d.mts +7 -3
  164. package/resources/devices/state.d.mts.map +1 -1
  165. package/resources/devices/state.d.ts +7 -3
  166. package/resources/devices/state.d.ts.map +1 -1
  167. package/resources/devices/state.js +6 -3
  168. package/resources/devices/state.js.map +1 -1
  169. package/resources/devices/state.mjs +6 -3
  170. package/resources/devices/state.mjs.map +1 -1
  171. package/resources/devices/tasks.d.mts +4 -12
  172. package/resources/devices/tasks.d.mts.map +1 -1
  173. package/resources/devices/tasks.d.ts +4 -12
  174. package/resources/devices/tasks.d.ts.map +1 -1
  175. package/resources/devices/tasks.js +2 -4
  176. package/resources/devices/tasks.js.map +1 -1
  177. package/resources/devices/tasks.mjs +2 -4
  178. package/resources/devices/tasks.mjs.map +1 -1
  179. package/resources/devices/timezone.d.mts +4 -2
  180. package/resources/devices/timezone.d.mts.map +1 -1
  181. package/resources/devices/timezone.d.ts +4 -2
  182. package/resources/devices/timezone.d.ts.map +1 -1
  183. package/resources/devices/timezone.js +4 -2
  184. package/resources/devices/timezone.js.map +1 -1
  185. package/resources/devices/timezone.mjs +4 -2
  186. package/resources/devices/timezone.mjs.map +1 -1
  187. package/resources/hooks.d.mts +0 -239
  188. package/resources/hooks.d.mts.map +1 -1
  189. package/resources/hooks.d.ts +0 -239
  190. package/resources/hooks.d.ts.map +1 -1
  191. package/resources/hooks.js +0 -57
  192. package/resources/hooks.js.map +1 -1
  193. package/resources/hooks.mjs +0 -57
  194. package/resources/hooks.mjs.map +1 -1
  195. package/resources/index.d.mts +2 -2
  196. package/resources/index.d.mts.map +1 -1
  197. package/resources/index.d.ts +2 -2
  198. package/resources/index.d.ts.map +1 -1
  199. package/resources/index.js.map +1 -1
  200. package/resources/index.mjs +1 -1
  201. package/resources/index.mjs.map +1 -1
  202. package/resources/profiles.d.mts +69 -6
  203. package/resources/profiles.d.mts.map +1 -1
  204. package/resources/profiles.d.ts +69 -6
  205. package/resources/profiles.d.ts.map +1 -1
  206. package/resources/profiles.js.map +1 -1
  207. package/resources/profiles.mjs.map +1 -1
  208. package/resources/proxies.d.mts +14 -8
  209. package/resources/proxies.d.mts.map +1 -1
  210. package/resources/proxies.d.ts +14 -8
  211. package/resources/proxies.d.ts.map +1 -1
  212. package/resources/proxies.js +14 -8
  213. package/resources/proxies.js.map +1 -1
  214. package/resources/proxies.mjs +14 -8
  215. package/resources/proxies.mjs.map +1 -1
  216. package/resources/shared.d.mts +14 -0
  217. package/resources/shared.d.mts.map +1 -1
  218. package/resources/shared.d.ts +14 -0
  219. package/resources/shared.d.ts.map +1 -1
  220. package/resources/tasks/tasks.d.mts +159 -64
  221. package/resources/tasks/tasks.d.mts.map +1 -1
  222. package/resources/tasks/tasks.d.ts +159 -64
  223. package/resources/tasks/tasks.d.ts.map +1 -1
  224. package/resources/tasks/tasks.js +10 -2
  225. package/resources/tasks/tasks.js.map +1 -1
  226. package/resources/tasks/tasks.mjs +10 -2
  227. package/resources/tasks/tasks.mjs.map +1 -1
  228. package/resources/webhooks/deliveries.d.mts +38 -4
  229. package/resources/webhooks/deliveries.d.mts.map +1 -1
  230. package/resources/webhooks/deliveries.d.ts +38 -4
  231. package/resources/webhooks/deliveries.d.ts.map +1 -1
  232. package/resources/webhooks/deliveries.js +15 -4
  233. package/resources/webhooks/deliveries.js.map +1 -1
  234. package/resources/webhooks/deliveries.mjs +15 -4
  235. package/resources/webhooks/deliveries.mjs.map +1 -1
  236. package/resources/webhooks/webhooks.d.mts +67 -9
  237. package/resources/webhooks/webhooks.d.mts.map +1 -1
  238. package/resources/webhooks/webhooks.d.ts +67 -9
  239. package/resources/webhooks/webhooks.d.ts.map +1 -1
  240. package/resources/webhooks/webhooks.js +26 -8
  241. package/resources/webhooks/webhooks.js.map +1 -1
  242. package/resources/webhooks/webhooks.mjs +26 -8
  243. package/resources/webhooks/webhooks.mjs.map +1 -1
  244. package/resources/workflows/action-catalog.d.mts +5 -2
  245. package/resources/workflows/action-catalog.d.mts.map +1 -1
  246. package/resources/workflows/action-catalog.d.ts +5 -2
  247. package/resources/workflows/action-catalog.d.ts.map +1 -1
  248. package/resources/workflows/action-catalog.js +5 -2
  249. package/resources/workflows/action-catalog.js.map +1 -1
  250. package/resources/workflows/action-catalog.mjs +5 -2
  251. package/resources/workflows/action-catalog.mjs.map +1 -1
  252. package/resources/workflows/actions/actions.d.mts +15 -5
  253. package/resources/workflows/actions/actions.d.mts.map +1 -1
  254. package/resources/workflows/actions/actions.d.ts +15 -5
  255. package/resources/workflows/actions/actions.d.ts.map +1 -1
  256. package/resources/workflows/actions/actions.js +10 -5
  257. package/resources/workflows/actions/actions.js.map +1 -1
  258. package/resources/workflows/actions/actions.mjs +10 -5
  259. package/resources/workflows/actions/actions.mjs.map +1 -1
  260. package/resources/workflows/actions/services.d.mts +5 -2
  261. package/resources/workflows/actions/services.d.mts.map +1 -1
  262. package/resources/workflows/actions/services.d.ts +5 -2
  263. package/resources/workflows/actions/services.d.ts.map +1 -1
  264. package/resources/workflows/actions/services.js +5 -2
  265. package/resources/workflows/actions/services.js.map +1 -1
  266. package/resources/workflows/actions/services.mjs +5 -2
  267. package/resources/workflows/actions/services.mjs.map +1 -1
  268. package/resources/workflows/events/catalog.d.mts +0 -51
  269. package/resources/workflows/events/catalog.d.mts.map +1 -1
  270. package/resources/workflows/events/catalog.d.ts +0 -51
  271. package/resources/workflows/events/catalog.d.ts.map +1 -1
  272. package/resources/workflows/events/catalog.js +0 -12
  273. package/resources/workflows/events/catalog.js.map +1 -1
  274. package/resources/workflows/events/catalog.mjs +0 -12
  275. package/resources/workflows/events/catalog.mjs.map +1 -1
  276. package/resources/workflows/events/events.d.mts +10 -20
  277. package/resources/workflows/events/events.d.mts.map +1 -1
  278. package/resources/workflows/events/events.d.ts +10 -20
  279. package/resources/workflows/events/events.d.ts.map +1 -1
  280. package/resources/workflows/events/events.js.map +1 -1
  281. package/resources/workflows/events/events.mjs +1 -1
  282. package/resources/workflows/events/events.mjs.map +1 -1
  283. package/resources/workflows/events/index.d.mts +1 -1
  284. package/resources/workflows/events/index.d.mts.map +1 -1
  285. package/resources/workflows/events/index.d.ts +1 -1
  286. package/resources/workflows/events/index.d.ts.map +1 -1
  287. package/resources/workflows/events/index.js.map +1 -1
  288. package/resources/workflows/events/index.mjs +1 -1
  289. package/resources/workflows/events/index.mjs.map +1 -1
  290. package/resources/workflows/executions.d.mts +43 -5
  291. package/resources/workflows/executions.d.mts.map +1 -1
  292. package/resources/workflows/executions.d.ts +43 -5
  293. package/resources/workflows/executions.d.ts.map +1 -1
  294. package/resources/workflows/executions.js +8 -3
  295. package/resources/workflows/executions.js.map +1 -1
  296. package/resources/workflows/executions.mjs +8 -3
  297. package/resources/workflows/executions.mjs.map +1 -1
  298. package/resources/workflows/flows/actions.d.mts +12 -4
  299. package/resources/workflows/flows/actions.d.mts.map +1 -1
  300. package/resources/workflows/flows/actions.d.ts +12 -4
  301. package/resources/workflows/flows/actions.d.ts.map +1 -1
  302. package/resources/workflows/flows/actions.js +12 -4
  303. package/resources/workflows/flows/actions.js.map +1 -1
  304. package/resources/workflows/flows/actions.mjs +12 -4
  305. package/resources/workflows/flows/actions.mjs.map +1 -1
  306. package/resources/workflows/flows/flows.d.mts +33 -7
  307. package/resources/workflows/flows/flows.d.mts.map +1 -1
  308. package/resources/workflows/flows/flows.d.ts +33 -7
  309. package/resources/workflows/flows/flows.d.ts.map +1 -1
  310. package/resources/workflows/flows/flows.js +18 -6
  311. package/resources/workflows/flows/flows.js.map +1 -1
  312. package/resources/workflows/flows/flows.mjs +18 -6
  313. package/resources/workflows/flows/flows.mjs.map +1 -1
  314. package/resources/workflows/triggers.d.mts +75 -63
  315. package/resources/workflows/triggers.d.mts.map +1 -1
  316. package/resources/workflows/triggers.d.ts +75 -63
  317. package/resources/workflows/triggers.d.ts.map +1 -1
  318. package/resources/workflows/triggers.js +12 -5
  319. package/resources/workflows/triggers.js.map +1 -1
  320. package/resources/workflows/triggers.mjs +12 -5
  321. package/resources/workflows/triggers.mjs.map +1 -1
  322. package/resources/workflows/workflows.d.mts +15 -0
  323. package/resources/workflows/workflows.d.mts.map +1 -1
  324. package/resources/workflows/workflows.d.ts +15 -0
  325. package/resources/workflows/workflows.d.ts.map +1 -1
  326. package/resources/workflows/workflows.js.map +1 -1
  327. package/resources/workflows/workflows.mjs.map +1 -1
  328. package/src/client.ts +8 -46
  329. package/src/resources/apps.ts +16 -8
  330. package/src/resources/carriers.ts +0 -3
  331. package/src/resources/connect/countries.ts +8 -3
  332. package/src/resources/connect/proxies.ts +11 -9
  333. package/src/resources/connect/users.ts +7 -2
  334. package/src/resources/credentials/credentials.ts +3 -4
  335. package/src/resources/credentials/packages/credentials/credentials.ts +16 -7
  336. package/src/resources/credentials/packages/credentials/fields.ts +8 -6
  337. package/src/resources/credentials/packages/packages.ts +5 -5
  338. package/src/resources/devices/actions.ts +10 -5
  339. package/src/resources/devices/apps.ts +41 -5
  340. package/src/resources/devices/devices.ts +97 -15
  341. package/src/resources/devices/esim.ts +6 -4
  342. package/src/resources/devices/files.ts +7 -4
  343. package/src/resources/devices/keyboard.ts +5 -3
  344. package/src/resources/devices/language.ts +4 -2
  345. package/src/resources/devices/location.ts +4 -2
  346. package/src/resources/devices/packages.ts +2 -1
  347. package/src/resources/devices/proxy.ts +32 -3
  348. package/src/resources/devices/state.ts +8 -3
  349. package/src/resources/devices/tasks.ts +4 -15
  350. package/src/resources/devices/timezone.ts +4 -2
  351. package/src/resources/hooks.ts +1 -333
  352. package/src/resources/index.ts +4 -17
  353. package/src/resources/profiles.ts +105 -6
  354. package/src/resources/proxies.ts +14 -8
  355. package/src/resources/shared.ts +17 -0
  356. package/src/resources/tasks/tasks.ts +198 -78
  357. package/src/resources/webhooks/deliveries.ts +43 -4
  358. package/src/resources/webhooks/webhooks.ts +79 -9
  359. package/src/resources/workflows/action-catalog.ts +5 -2
  360. package/src/resources/workflows/actions/actions.ts +17 -5
  361. package/src/resources/workflows/actions/services.ts +5 -2
  362. package/src/resources/workflows/events/catalog.ts +1 -84
  363. package/src/resources/workflows/events/events.ts +14 -36
  364. package/src/resources/workflows/events/index.ts +1 -7
  365. package/src/resources/workflows/executions.ts +50 -5
  366. package/src/resources/workflows/flows/actions.ts +12 -4
  367. package/src/resources/workflows/flows/flows.ts +41 -7
  368. package/src/resources/workflows/triggers.ts +92 -75
  369. package/src/resources/workflows/workflows.ts +21 -0
  370. package/src/version.ts +1 -1
  371. package/version.d.mts +1 -1
  372. package/version.d.ts +1 -1
  373. package/version.js +1 -1
  374. package/version.mjs +1 -1
@@ -64,8 +64,16 @@ export class Tasks extends APIResource {
64
64
  * Create and dispatch a new agent task. Returns the task ID and device stream
65
65
  * details.
66
66
  */
67
- run(body: TaskRunParams, options?: RequestOptions): APIPromise<TaskRunResponse> {
68
- return this._client.post('/tasks', { body, ...options });
67
+ run(params: TaskRunParams, options?: RequestOptions): APIPromise<TaskRunResponse> {
68
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
69
+ return this._client.post('/tasks', {
70
+ body,
71
+ ...options,
72
+ headers: buildHeaders([
73
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
74
+ options?.headers,
75
+ ]),
76
+ });
69
77
  }
70
78
 
71
79
  /**
@@ -104,117 +112,132 @@ export interface PackageCredentials {
104
112
  }
105
113
 
106
114
  export interface Task {
107
- deviceId: string;
115
+ createdAt: string;
108
116
 
109
- /**
110
- * The LLM model identifier to use for the task (e.g. 'gemini/gemini-2.5-flash')
111
- */
112
- llmModel: string;
117
+ taskId: string;
113
118
 
114
- task: string;
119
+ updatedAt: string;
120
+ }
115
121
 
116
- userId: string;
122
+ export type TaskStatus =
123
+ | 'queued'
124
+ | 'created'
125
+ | 'running'
126
+ | 'cancelling'
127
+ | 'completed'
128
+ | 'failed'
129
+ | 'cancelled';
117
130
 
118
- id?: string;
131
+ export interface UsageResult {
132
+ request_tokens: number;
119
133
 
120
- accessibility?: boolean;
134
+ requests: number;
121
135
 
122
- agentId?: number;
136
+ response_tokens: number;
123
137
 
124
- apps?: Array<string>;
138
+ total_tokens: number;
139
+ }
125
140
 
126
- cancelRequestedAt?: string | null;
141
+ export interface TaskRetrieveResponse {
142
+ /**
143
+ * The task
144
+ */
145
+ task: TaskRetrieveResponse.Task;
146
+ }
127
147
 
128
- claimedAt?: string | null;
148
+ export namespace TaskRetrieveResponse {
149
+ /**
150
+ * The task
151
+ */
152
+ export interface Task {
153
+ id: string;
129
154
 
130
- continueOnFailure?: boolean;
155
+ deviceId: string;
131
156
 
132
- createdAt?: string;
157
+ displayId: number;
133
158
 
134
- credentials?: Array<PackageCredentials>;
159
+ /**
160
+ * The LLM model identifier to use for the task (e.g. 'gemini/gemini-2.5-flash')
161
+ */
162
+ llmModel: string;
135
163
 
136
- creditsUsed?: number | null;
164
+ ownerId: string;
137
165
 
138
- dispatchedAt?: string | null;
166
+ status: TasksAPI.TaskStatus;
139
167
 
140
- displayId?: number;
168
+ task: string;
141
169
 
142
- executionTimeout?: number;
170
+ tmpDevice: boolean;
143
171
 
144
- files?: Array<string>;
172
+ /**
173
+ * @deprecated Deprecated: use ownerId (tenancy) / createdBy (actor).
174
+ */
175
+ userId: string;
145
176
 
146
- finishedAt?: string | null;
177
+ accessibility?: boolean;
147
178
 
148
- heartbeatAt?: string | null;
179
+ agentId?: number;
149
180
 
150
- maxSteps?: number;
181
+ apps?: Array<string>;
151
182
 
152
- /**
153
- * Memory namespace for cross-task personalization
154
- */
155
- memoryNamespace?: string;
183
+ cancelRequestedAt?: string | null;
156
184
 
157
- message?: string | null;
185
+ claimedAt?: string | null;
158
186
 
159
- output?: { [key: string]: unknown } | null;
187
+ continueOnFailure?: boolean;
160
188
 
161
- outputSchema?: { [key: string]: unknown } | null;
189
+ createdAt?: string;
162
190
 
163
- reasoning?: boolean;
191
+ createdBy?: string | null;
164
192
 
165
- status?: TaskStatus;
193
+ credentials?: Array<TasksAPI.PackageCredentials>;
166
194
 
167
- stealth?: boolean;
195
+ creditsUsed?: number | null;
168
196
 
169
- steps?: number | null;
197
+ dispatchedAt?: string | null;
170
198
 
171
- streamUrl?: string | null;
199
+ executionTimeout?: number;
172
200
 
173
- /**
174
- * LLM model used by sub-agent roles: executor, app_opener, structured_output
175
- */
176
- subagentModel?: string;
201
+ files?: Array<string>;
177
202
 
178
- succeeded?: boolean | null;
203
+ finishedAt?: string | null;
179
204
 
180
- temperature?: number;
205
+ maxSteps?: number;
181
206
 
182
- tmpDevice?: boolean;
207
+ /**
208
+ * Memory namespace for cross-task personalization
209
+ */
210
+ memoryNamespace?: string;
183
211
 
184
- trajectory?: Array<{ [key: string]: unknown }>;
212
+ message?: string | null;
185
213
 
186
- updatedAt?: string;
214
+ output?: { [key: string]: unknown } | null;
187
215
 
188
- vision?: boolean;
216
+ outputSchema?: { [key: string]: unknown } | null;
189
217
 
190
- vpnCountry?: 'US' | 'BR' | 'FR' | 'DE' | 'IN' | 'JP' | 'KR' | 'ZA' | null;
191
- }
218
+ reasoning?: boolean;
192
219
 
193
- export type TaskStatus =
194
- | 'queued'
195
- | 'created'
196
- | 'running'
197
- | 'cancelling'
198
- | 'paused'
199
- | 'completed'
200
- | 'failed'
201
- | 'cancelled';
220
+ stealth?: boolean;
202
221
 
203
- export interface UsageResult {
204
- request_tokens: number;
222
+ steps?: number | null;
205
223
 
206
- requests: number;
224
+ streamUrl?: string | null;
207
225
 
208
- response_tokens: number;
226
+ /**
227
+ * LLM model used by sub-agent roles: executor, app_opener, structured_output
228
+ */
229
+ subagentModel?: string;
209
230
 
210
- total_tokens: number;
211
- }
231
+ succeeded?: boolean | null;
212
232
 
213
- export interface TaskRetrieveResponse {
214
- /**
215
- * The task
216
- */
217
- task: Task;
233
+ temperature?: number;
234
+
235
+ updatedAt?: string;
236
+
237
+ vision?: boolean;
238
+
239
+ vpnCountry?: 'US' | 'BR' | 'FR' | 'DE' | 'IN' | 'JP' | 'KR' | 'ZA' | null;
240
+ }
218
241
  }
219
242
 
220
243
  export interface TaskListResponse {
@@ -245,12 +268,17 @@ export namespace TaskListResponse {
245
268
  */
246
269
  llmModel: string;
247
270
 
271
+ ownerId: string;
272
+
248
273
  status: TasksAPI.TaskStatus;
249
274
 
250
275
  task: string;
251
276
 
252
277
  tmpDevice: boolean;
253
278
 
279
+ /**
280
+ * @deprecated Deprecated: use ownerId (tenancy) / createdBy (actor).
281
+ */
254
282
  userId: string;
255
283
 
256
284
  accessibility?: boolean;
@@ -267,6 +295,8 @@ export namespace TaskListResponse {
267
295
 
268
296
  createdAt?: string;
269
297
 
298
+ createdBy?: string | null;
299
+
270
300
  credentials?: Array<TasksAPI.PackageCredentials>;
271
301
 
272
302
  creditsUsed?: number | null;
@@ -323,6 +353,11 @@ export interface TaskGetStatusResponse {
323
353
  */
324
354
  status: TaskStatus;
325
355
 
356
+ /**
357
+ * Execution metadata for abnormal terminal outcomes
358
+ */
359
+ execution?: TaskGetStatusResponse.Execution | null;
360
+
326
361
  /**
327
362
  * The last agent response (FastAgentResponseEvent or ManagerPlanEvent)
328
363
  */
@@ -349,6 +384,31 @@ export interface TaskGetStatusResponse {
349
384
  succeeded?: boolean | null;
350
385
  }
351
386
 
387
+ export namespace TaskGetStatusResponse {
388
+ /**
389
+ * Execution metadata for abnormal terminal outcomes
390
+ */
391
+ export interface Execution {
392
+ checkpoint: Execution.Checkpoint;
393
+
394
+ terminationReason: 'execution_timeout' | 'worker_lost' | 'cancelled' | 'agent_failed';
395
+
396
+ retrySafety?: 'unknown';
397
+ }
398
+
399
+ export namespace Execution {
400
+ export interface Checkpoint {
401
+ currentSubgoal?: string | null;
402
+
403
+ plan?: string | null;
404
+
405
+ progressSummary?: string | null;
406
+
407
+ steps?: number;
408
+ }
409
+ }
410
+ }
411
+
352
412
  export interface TaskGetTrajectoryResponse {
353
413
  /**
354
414
  * The trajectory of the task
@@ -1002,6 +1062,16 @@ export interface TaskStopResponse {
1002
1062
  }
1003
1063
 
1004
1064
  export interface TaskListParams {
1065
+ /**
1066
+ * Only tasks created by this user id.
1067
+ */
1068
+ createdBy?: string | null;
1069
+
1070
+ /**
1071
+ * Only tasks created by the calling user.
1072
+ */
1073
+ mine?: boolean;
1074
+
1005
1075
  orderBy?: 'id' | 'createdAt' | 'finishedAt' | 'status' | null;
1006
1076
 
1007
1077
  orderByDirection?: 'asc' | 'desc';
@@ -1020,60 +1090,111 @@ export interface TaskListParams {
1020
1090
 
1021
1091
  export interface TaskRunParams {
1022
1092
  /**
1023
- * The ID of the device to run the task on.
1093
+ * Body param: The ID of the device to run the task on.
1024
1094
  */
1025
1095
  deviceId: string;
1026
1096
 
1097
+ /**
1098
+ * Body param
1099
+ */
1027
1100
  task: string;
1028
1101
 
1102
+ /**
1103
+ * Body param
1104
+ */
1029
1105
  accessibility?: boolean;
1030
1106
 
1107
+ /**
1108
+ * Body param
1109
+ */
1031
1110
  agentId?: number;
1032
1111
 
1112
+ /**
1113
+ * Body param
1114
+ */
1033
1115
  apps?: Array<string>;
1034
1116
 
1117
+ /**
1118
+ * Body param
1119
+ */
1035
1120
  continueOnFailure?: boolean;
1036
1121
 
1122
+ /**
1123
+ * Body param
1124
+ */
1037
1125
  credentials?: Array<PackageCredentials>;
1038
1126
 
1039
1127
  /**
1040
- * The display ID of the device to run the task on.
1128
+ * Body param: The display ID of the device to run the task on.
1041
1129
  */
1042
1130
  displayId?: number;
1043
1131
 
1132
+ /**
1133
+ * Body param
1134
+ */
1044
1135
  executionTimeout?: number;
1045
1136
 
1137
+ /**
1138
+ * Body param
1139
+ */
1046
1140
  files?: Array<string>;
1047
1141
 
1048
1142
  /**
1049
- * The LLM model identifier to use for the task (e.g.
1050
- * 'google/gemini-3.1-flash-lite')
1143
+ * Body param: The LLM model identifier to use for the task (e.g.
1144
+ * 'google/gemini-3.5-flash')
1051
1145
  */
1052
1146
  llmModel?: string;
1053
1147
 
1148
+ /**
1149
+ * Body param
1150
+ */
1054
1151
  maxSteps?: number;
1055
1152
 
1056
1153
  /**
1057
- * Memory namespace for cross-task personalization
1154
+ * Body param: Memory namespace for cross-task personalization
1058
1155
  */
1059
1156
  memoryNamespace?: string;
1060
1157
 
1158
+ /**
1159
+ * Body param
1160
+ */
1061
1161
  outputSchema?: { [key: string]: unknown } | null;
1062
1162
 
1163
+ /**
1164
+ * Body param
1165
+ */
1063
1166
  reasoning?: boolean;
1064
1167
 
1168
+ /**
1169
+ * Body param
1170
+ */
1065
1171
  stealth?: boolean;
1066
1172
 
1067
1173
  /**
1068
- * LLM model used by sub-agent roles: executor, app_opener, structured_output
1174
+ * Body param: LLM model used by sub-agent roles: executor, app_opener,
1175
+ * structured_output
1069
1176
  */
1070
1177
  subagentModel?: string;
1071
1178
 
1179
+ /**
1180
+ * Body param
1181
+ */
1072
1182
  temperature?: number;
1073
1183
 
1184
+ /**
1185
+ * Body param
1186
+ */
1074
1187
  vision?: boolean;
1075
1188
 
1189
+ /**
1190
+ * Body param
1191
+ */
1076
1192
  vpnCountry?: 'US' | 'BR' | 'FR' | 'DE' | 'IN' | 'JP' | 'KR' | 'ZA' | null;
1193
+
1194
+ /**
1195
+ * Header param
1196
+ */
1197
+ 'Idempotency-Key'?: string;
1077
1198
  }
1078
1199
 
1079
1200
  export interface TaskRunStreamedParams {
@@ -1104,8 +1225,7 @@ export interface TaskRunStreamedParams {
1104
1225
  files?: Array<string>;
1105
1226
 
1106
1227
  /**
1107
- * The LLM model identifier to use for the task (e.g.
1108
- * 'google/gemini-3.1-flash-lite')
1228
+ * The LLM model identifier to use for the task (e.g. 'google/gemini-3.5-flash')
1109
1229
  */
1110
1230
  llmModel?: string;
1111
1231
 
@@ -8,7 +8,10 @@ import { path } from '../../internal/utils/path';
8
8
 
9
9
  export class Deliveries extends APIResource {
10
10
  /**
11
- * List deliveries across all your webhooks
11
+ * Returns a paginated feed of webhook deliveries across all of your subscriptions,
12
+ * with the originating endpoint URL included on each record. Results can be
13
+ * filtered by delivery status (pending, success, skipped, or dead), by a `since`
14
+ * timestamp, and by `eventId` (exact match against the originating event id).
12
15
  *
13
16
  * @example
14
17
  * ```ts
@@ -23,7 +26,10 @@ export class Deliveries extends APIResource {
23
26
  }
24
27
 
25
28
  /**
26
- * List deliveries for a webhook
29
+ * Returns a paginated list of deliveries for a single webhook subscription,
30
+ * identified by its id. Each record reports the event, delivery status, attempt
31
+ * count, and the last response code or error. Results can be filtered by `eventId`
32
+ * (exact match against the originating event id).
27
33
  *
28
34
  * @example
29
35
  * ```ts
@@ -42,7 +48,9 @@ export class Deliveries extends APIResource {
42
48
  }
43
49
 
44
50
  /**
45
- * Get a delivery with its attempts
51
+ * Returns a single delivery for a webhook subscription along with the full list of
52
+ * captured attempt records. Each attempt includes the request URL, method, headers
53
+ * and body, whether it was signed, and the response status, headers, and snippet.
46
54
  *
47
55
  * @example
48
56
  * ```ts
@@ -63,7 +71,10 @@ export class Deliveries extends APIResource {
63
71
  }
64
72
 
65
73
  /**
66
- * Aggregate delivery statistics (excludes test sends)
74
+ * Returns aggregate delivery statistics across all of your webhooks, including the
75
+ * total count, a breakdown by status (pending, success, skipped, dead), and the
76
+ * overall success rate. An optional `since` timestamp narrows the reporting
77
+ * window.
67
78
  *
68
79
  * @example
69
80
  * ```ts
@@ -94,6 +105,12 @@ export namespace DeliveryListResponse {
94
105
 
95
106
  createdAt: string;
96
107
 
108
+ /**
109
+ * Id of the parent endpoint's creator. Null when the endpoint row is gone or its
110
+ * creator was never recorded.
111
+ */
112
+ createdBy: string | null;
113
+
97
114
  durationMs: number | null;
98
115
 
99
116
  endpointId: string;
@@ -134,6 +151,12 @@ export namespace DeliveryListForWebhookResponse {
134
151
 
135
152
  createdAt: string;
136
153
 
154
+ /**
155
+ * Id of the parent endpoint's creator. Null when the endpoint row is gone or its
156
+ * creator was never recorded.
157
+ */
158
+ createdBy: string | null;
159
+
137
160
  durationMs: number | null;
138
161
 
139
162
  endpointId: string;
@@ -170,6 +193,12 @@ export namespace DeliveryRetrieveAttemptsResponse {
170
193
 
171
194
  createdAt: string;
172
195
 
196
+ /**
197
+ * Id of the parent endpoint's creator. Null when the endpoint row is gone or its
198
+ * creator was never recorded.
199
+ */
200
+ createdBy: string | null;
201
+
173
202
  durationMs: number | null;
174
203
 
175
204
  endpointId: string;
@@ -247,6 +276,11 @@ export namespace DeliveryStatsResponse {
247
276
  }
248
277
 
249
278
  export interface DeliveryListParams {
279
+ /**
280
+ * Exact text match against the originating event id.
281
+ */
282
+ eventId?: string;
283
+
250
284
  page?: number;
251
285
 
252
286
  pageSize?: number;
@@ -257,6 +291,11 @@ export interface DeliveryListParams {
257
291
  }
258
292
 
259
293
  export interface DeliveryListForWebhookParams {
294
+ /**
295
+ * Exact text match against the originating event id.
296
+ */
297
+ eventId?: string;
298
+
260
299
  page?: number;
261
300
 
262
301
  pageSize?: number;