browser-use-sdk 1.2.0 → 2.0.1

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 (963) hide show
  1. package/README.md +130 -317
  2. package/dist/cjs/Client.d.ts +46 -0
  3. package/dist/cjs/Client.js +79 -0
  4. package/dist/cjs/api/errors/BadRequestError.d.ts +8 -0
  5. package/dist/cjs/api/errors/BadRequestError.js +52 -0
  6. package/dist/cjs/api/errors/InternalServerError.d.ts +8 -0
  7. package/dist/cjs/api/errors/InternalServerError.js +52 -0
  8. package/dist/cjs/api/errors/NotFoundError.d.ts +8 -0
  9. package/dist/cjs/api/errors/NotFoundError.js +52 -0
  10. package/dist/cjs/api/errors/PaymentRequiredError.d.ts +9 -0
  11. package/dist/cjs/api/errors/PaymentRequiredError.js +52 -0
  12. package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +8 -0
  13. package/dist/cjs/api/errors/UnprocessableEntityError.js +52 -0
  14. package/dist/cjs/api/errors/index.d.ts +5 -0
  15. package/dist/cjs/api/errors/index.js +21 -0
  16. package/dist/cjs/api/index.d.ts +3 -0
  17. package/dist/cjs/api/index.js +19 -0
  18. package/dist/cjs/api/resources/accounts/client/Client.d.ts +47 -0
  19. package/dist/cjs/api/resources/accounts/client/Client.js +123 -0
  20. package/dist/cjs/api/resources/accounts/client/index.d.ts +1 -0
  21. package/dist/cjs/api/resources/accounts/client/index.js +2 -0
  22. package/dist/cjs/api/resources/accounts/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/accounts/index.js +17 -0
  24. package/dist/cjs/api/resources/files/client/Client.d.ts +72 -0
  25. package/dist/cjs/api/resources/files/client/Client.js +210 -0
  26. package/dist/cjs/api/resources/files/client/index.d.ts +2 -0
  27. package/dist/cjs/api/resources/files/client/index.js +17 -0
  28. package/dist/cjs/api/resources/files/client/requests/UploadFileRequest.d.ts +40 -0
  29. package/dist/cjs/api/resources/files/client/requests/UploadFileRequest.js +25 -0
  30. package/dist/cjs/api/resources/files/client/requests/index.d.ts +1 -0
  31. package/dist/cjs/api/resources/files/client/requests/index.js +2 -0
  32. package/dist/cjs/api/resources/files/index.d.ts +1 -0
  33. package/dist/cjs/api/resources/files/index.js +17 -0
  34. package/dist/cjs/api/resources/index.d.ts +9 -0
  35. package/dist/cjs/api/resources/index.js +48 -0
  36. package/dist/cjs/api/resources/profiles/client/Client.d.ts +93 -0
  37. package/dist/cjs/api/resources/profiles/client/Client.js +319 -0
  38. package/dist/cjs/api/resources/profiles/client/index.d.ts +2 -0
  39. package/dist/cjs/api/resources/profiles/client/index.js +17 -0
  40. package/dist/cjs/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.d.ts +11 -0
  41. package/dist/cjs/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.js +5 -0
  42. package/dist/cjs/api/resources/profiles/client/requests/index.d.ts +1 -0
  43. package/dist/cjs/api/resources/profiles/client/requests/index.js +2 -0
  44. package/dist/cjs/api/resources/profiles/index.d.ts +1 -0
  45. package/dist/cjs/api/resources/profiles/index.js +17 -0
  46. package/dist/cjs/api/resources/sessions/client/Client.d.ts +146 -0
  47. package/dist/cjs/api/resources/sessions/client/Client.js +573 -0
  48. package/dist/cjs/api/resources/sessions/client/index.d.ts +2 -0
  49. package/dist/cjs/api/resources/sessions/client/index.js +17 -0
  50. package/dist/cjs/api/resources/sessions/client/requests/CreateSessionRequest.d.ts +14 -0
  51. package/dist/cjs/api/resources/sessions/client/requests/CreateSessionRequest.js +5 -0
  52. package/dist/cjs/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.d.ts +13 -0
  53. package/dist/cjs/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.js +5 -0
  54. package/dist/cjs/api/resources/sessions/client/requests/UpdateSessionRequest.d.ts +9 -0
  55. package/dist/cjs/api/resources/sessions/client/requests/UpdateSessionRequest.js +5 -0
  56. package/dist/cjs/api/resources/sessions/client/requests/index.d.ts +3 -0
  57. package/dist/cjs/api/resources/sessions/client/requests/index.js +2 -0
  58. package/dist/cjs/api/resources/sessions/index.d.ts +1 -0
  59. package/dist/cjs/api/resources/sessions/index.js +17 -0
  60. package/dist/cjs/api/resources/tasks/client/Client.d.ts +113 -0
  61. package/dist/cjs/api/resources/tasks/client/Client.js +411 -0
  62. package/dist/cjs/api/resources/tasks/client/index.d.ts +2 -0
  63. package/dist/cjs/api/resources/tasks/client/index.js +17 -0
  64. package/dist/cjs/api/resources/tasks/client/requests/CreateTaskRequest.d.ts +40 -0
  65. package/dist/cjs/api/resources/tasks/client/requests/CreateTaskRequest.js +5 -0
  66. package/dist/cjs/api/resources/tasks/client/requests/ListTasksTasksGetRequest.d.ts +16 -0
  67. package/dist/cjs/api/resources/tasks/client/requests/ListTasksTasksGetRequest.js +5 -0
  68. package/dist/cjs/api/resources/tasks/client/requests/UpdateTaskRequest.d.ts +14 -0
  69. package/dist/cjs/api/resources/tasks/client/requests/UpdateTaskRequest.js +5 -0
  70. package/dist/cjs/api/resources/tasks/client/requests/index.d.ts +3 -0
  71. package/dist/cjs/api/resources/tasks/client/requests/index.js +2 -0
  72. package/dist/cjs/api/resources/tasks/index.d.ts +1 -0
  73. package/dist/cjs/api/resources/tasks/index.js +17 -0
  74. package/dist/cjs/api/types/AccountNotFoundError.d.ts +9 -0
  75. package/dist/cjs/api/types/AccountNotFoundError.js +5 -0
  76. package/dist/cjs/api/types/AccountView.d.ts +18 -0
  77. package/dist/cjs/api/types/AccountView.js +5 -0
  78. package/dist/cjs/api/types/BadRequestErrorBody.d.ts +5 -0
  79. package/dist/cjs/api/types/BadRequestErrorBody.js +5 -0
  80. package/dist/cjs/api/types/DownloadUrlGenerationError.d.ts +9 -0
  81. package/dist/cjs/api/types/DownloadUrlGenerationError.js +5 -0
  82. package/dist/cjs/api/types/FileView.d.ts +12 -0
  83. package/dist/cjs/api/types/FileView.js +5 -0
  84. package/dist/cjs/api/types/HttpValidationError.d.ts +7 -0
  85. package/dist/cjs/api/types/HttpValidationError.js +5 -0
  86. package/dist/cjs/api/types/InsufficientCreditsError.d.ts +9 -0
  87. package/dist/cjs/api/types/InsufficientCreditsError.js +5 -0
  88. package/dist/cjs/api/types/InternalServerErrorBody.d.ts +9 -0
  89. package/dist/cjs/api/types/InternalServerErrorBody.js +5 -0
  90. package/dist/cjs/api/types/NotFoundErrorBody.d.ts +5 -0
  91. package/dist/cjs/api/types/NotFoundErrorBody.js +5 -0
  92. package/dist/cjs/api/types/OutputFileNotFoundError.d.ts +9 -0
  93. package/dist/cjs/api/types/OutputFileNotFoundError.js +5 -0
  94. package/dist/cjs/api/types/ProfileListResponse.d.ts +17 -0
  95. package/dist/cjs/api/types/ProfileListResponse.js +5 -0
  96. package/dist/cjs/api/types/ProfileNotFoundError.d.ts +9 -0
  97. package/dist/cjs/api/types/ProfileNotFoundError.js +5 -0
  98. package/dist/cjs/api/types/ProfileView.d.ts +18 -0
  99. package/dist/cjs/api/types/ProfileView.js +5 -0
  100. package/dist/cjs/api/types/ProxyCountryCode.d.ts +16 -0
  101. package/dist/cjs/api/types/ProxyCountryCode.js +18 -0
  102. package/dist/cjs/api/types/SessionHasRunningTaskError.d.ts +9 -0
  103. package/dist/cjs/api/types/SessionHasRunningTaskError.js +5 -0
  104. package/dist/cjs/api/types/SessionItemView.d.ts +19 -0
  105. package/dist/cjs/api/types/SessionItemView.js +5 -0
  106. package/dist/cjs/api/types/SessionListResponse.d.ts +17 -0
  107. package/dist/cjs/api/types/SessionListResponse.js +5 -0
  108. package/dist/cjs/api/types/SessionNotFoundError.d.ts +9 -0
  109. package/dist/cjs/api/types/SessionNotFoundError.js +5 -0
  110. package/dist/cjs/api/types/SessionStatus.d.ts +15 -0
  111. package/dist/cjs/api/types/SessionStatus.js +10 -0
  112. package/dist/cjs/api/types/SessionStoppedError.d.ts +9 -0
  113. package/dist/cjs/api/types/SessionStoppedError.js +5 -0
  114. package/dist/cjs/api/types/SessionUpdateAction.d.ts +10 -0
  115. package/dist/cjs/api/types/SessionUpdateAction.js +5 -0
  116. package/dist/cjs/api/types/SessionView.d.ts +23 -0
  117. package/dist/cjs/api/types/SessionView.js +5 -0
  118. package/dist/cjs/api/types/ShareNotFoundError.d.ts +9 -0
  119. package/dist/cjs/api/types/ShareNotFoundError.js +5 -0
  120. package/dist/cjs/api/types/ShareView.d.ts +16 -0
  121. package/dist/cjs/api/types/ShareView.js +5 -0
  122. package/dist/cjs/api/types/SupportedLlMs.d.ts +17 -0
  123. package/dist/cjs/api/types/SupportedLlMs.js +19 -0
  124. package/dist/cjs/api/types/TaskCreatedResponse.d.ts +10 -0
  125. package/dist/cjs/api/types/TaskCreatedResponse.js +5 -0
  126. package/dist/cjs/api/types/TaskItemView.d.ts +32 -0
  127. package/dist/cjs/api/types/TaskItemView.js +5 -0
  128. package/dist/cjs/api/types/TaskListResponse.d.ts +17 -0
  129. package/dist/cjs/api/types/TaskListResponse.js +5 -0
  130. package/dist/cjs/api/types/TaskLogFileResponse.d.ts +10 -0
  131. package/dist/cjs/api/types/TaskLogFileResponse.js +5 -0
  132. package/dist/cjs/api/types/TaskNotFoundError.d.ts +9 -0
  133. package/dist/cjs/api/types/TaskNotFoundError.js +5 -0
  134. package/dist/cjs/api/types/TaskOutputFileResponse.d.ts +14 -0
  135. package/dist/cjs/api/types/TaskOutputFileResponse.js +5 -0
  136. package/dist/cjs/api/types/TaskStatus.d.ts +19 -0
  137. package/dist/cjs/api/types/TaskStatus.js +12 -0
  138. package/dist/cjs/api/types/TaskStepView.d.ts +22 -0
  139. package/dist/cjs/api/types/TaskStepView.js +5 -0
  140. package/dist/cjs/api/types/TaskUpdateAction.d.ts +19 -0
  141. package/dist/cjs/api/types/TaskUpdateAction.js +12 -0
  142. package/dist/cjs/api/types/TaskView.d.ts +34 -0
  143. package/dist/cjs/api/types/TaskView.js +5 -0
  144. package/dist/cjs/api/types/UnsupportedContentTypeError.d.ts +9 -0
  145. package/dist/cjs/api/types/UnsupportedContentTypeError.js +5 -0
  146. package/dist/cjs/api/types/UploadFilePresignedUrlResponse.d.ts +18 -0
  147. package/dist/cjs/api/types/UploadFilePresignedUrlResponse.js +5 -0
  148. package/dist/cjs/api/types/ValidationError.d.ts +14 -0
  149. package/dist/cjs/api/types/ValidationError.js +5 -0
  150. package/dist/cjs/api/types/index.d.ts +38 -0
  151. package/dist/cjs/api/types/index.js +54 -0
  152. package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
  153. package/dist/cjs/core/fetcher/APIResponse.js +2 -0
  154. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +20 -0
  155. package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
  156. package/dist/cjs/core/fetcher/Fetcher.d.ts +40 -0
  157. package/dist/cjs/core/fetcher/Fetcher.js +120 -0
  158. package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
  159. package/dist/cjs/core/fetcher/Headers.js +84 -0
  160. package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
  161. package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
  162. package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
  163. package/dist/cjs/core/fetcher/RawResponse.js +44 -0
  164. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +4 -0
  165. package/dist/cjs/core/fetcher/ResponseWithBody.js +6 -0
  166. package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
  167. package/dist/cjs/core/fetcher/Supplier.js +22 -0
  168. package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
  169. package/dist/cjs/core/fetcher/createRequestUrl.js +8 -0
  170. package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
  171. package/dist/cjs/core/fetcher/getErrorResponseBody.js +44 -0
  172. package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -0
  173. package/dist/cjs/core/fetcher/getFetchFn.js +17 -0
  174. package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
  175. package/dist/cjs/core/fetcher/getHeader.js +11 -0
  176. package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
  177. package/dist/cjs/core/fetcher/getRequestBody.js +23 -0
  178. package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
  179. package/dist/cjs/core/fetcher/getResponseBody.js +55 -0
  180. package/dist/cjs/core/fetcher/index.d.ts +9 -0
  181. package/dist/cjs/core/fetcher/index.js +15 -0
  182. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -0
  183. package/dist/cjs/core/fetcher/makeRequest.js +42 -0
  184. package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
  185. package/dist/cjs/core/fetcher/requestWithRetries.js +40 -0
  186. package/dist/cjs/core/fetcher/signals.d.ts +11 -0
  187. package/dist/cjs/core/fetcher/signals.js +36 -0
  188. package/dist/cjs/core/headers.d.ts +3 -0
  189. package/dist/cjs/core/headers.js +29 -0
  190. package/dist/cjs/core/index.d.ts +3 -0
  191. package/dist/cjs/core/index.js +42 -0
  192. package/dist/cjs/core/json.d.ts +15 -0
  193. package/dist/cjs/core/json.js +24 -0
  194. package/dist/cjs/core/runtime/index.d.ts +1 -0
  195. package/dist/cjs/core/runtime/index.js +5 -0
  196. package/dist/cjs/core/runtime/runtime.d.ts +9 -0
  197. package/dist/cjs/core/runtime/runtime.js +102 -0
  198. package/dist/cjs/core/url/index.d.ts +2 -0
  199. package/dist/cjs/core/url/index.js +7 -0
  200. package/dist/cjs/core/url/join.d.ts +1 -0
  201. package/dist/cjs/core/url/join.js +69 -0
  202. package/dist/cjs/core/url/qs.d.ts +6 -0
  203. package/dist/cjs/core/url/qs.js +64 -0
  204. package/dist/cjs/environments.d.ts +7 -0
  205. package/dist/cjs/environments.js +9 -0
  206. package/dist/cjs/errors/BrowserUseError.d.ts +15 -0
  207. package/dist/cjs/errors/BrowserUseError.js +30 -0
  208. package/dist/cjs/errors/BrowserUseTimeoutError.d.ts +6 -0
  209. package/dist/cjs/errors/BrowserUseTimeoutError.js +13 -0
  210. package/dist/cjs/errors/index.d.ts +2 -0
  211. package/dist/cjs/errors/index.js +7 -0
  212. package/dist/cjs/index.d.ts +7 -0
  213. package/dist/cjs/index.js +47 -0
  214. package/dist/cjs/version.d.ts +1 -0
  215. package/dist/cjs/version.js +4 -0
  216. package/dist/cjs/wrapper/BrowserUseClient.d.ts +6 -0
  217. package/dist/cjs/wrapper/BrowserUseClient.js +12 -0
  218. package/dist/cjs/wrapper/api/BrowserUseTasks.d.ts +15 -0
  219. package/dist/cjs/wrapper/api/BrowserUseTasks.js +89 -0
  220. package/dist/cjs/wrapper/lib/parse.d.ts +69 -0
  221. package/dist/cjs/wrapper/lib/parse.js +212 -0
  222. package/dist/cjs/wrapper/lib/types.d.ts +74 -0
  223. package/dist/cjs/wrapper/lib/types.js +13 -0
  224. package/dist/cjs/wrapper/lib/webhooks.d.ts +72 -0
  225. package/dist/cjs/wrapper/lib/webhooks.js +97 -0
  226. package/dist/esm/Client.d.mts +46 -0
  227. package/dist/esm/Client.mjs +42 -0
  228. package/dist/esm/api/errors/BadRequestError.d.mts +8 -0
  229. package/dist/esm/api/errors/BadRequestError.mjs +15 -0
  230. package/dist/esm/api/errors/InternalServerError.d.mts +8 -0
  231. package/dist/esm/api/errors/InternalServerError.mjs +15 -0
  232. package/dist/esm/api/errors/NotFoundError.d.mts +8 -0
  233. package/dist/esm/api/errors/NotFoundError.mjs +15 -0
  234. package/dist/esm/api/errors/PaymentRequiredError.d.mts +9 -0
  235. package/dist/esm/api/errors/PaymentRequiredError.mjs +15 -0
  236. package/dist/esm/api/errors/UnprocessableEntityError.d.mts +8 -0
  237. package/dist/esm/api/errors/UnprocessableEntityError.mjs +15 -0
  238. package/dist/esm/api/errors/index.d.mts +5 -0
  239. package/dist/esm/api/errors/index.mjs +5 -0
  240. package/dist/esm/api/index.d.mts +3 -0
  241. package/dist/esm/api/index.mjs +3 -0
  242. package/dist/esm/api/resources/accounts/client/Client.d.mts +47 -0
  243. package/dist/esm/api/resources/accounts/client/Client.mjs +86 -0
  244. package/dist/esm/api/resources/accounts/client/index.d.mts +1 -0
  245. package/dist/esm/api/resources/accounts/client/index.mjs +1 -0
  246. package/dist/esm/api/resources/accounts/index.d.mts +1 -0
  247. package/dist/esm/api/resources/accounts/index.mjs +1 -0
  248. package/dist/esm/api/resources/files/client/Client.d.mts +72 -0
  249. package/dist/esm/api/resources/files/client/Client.mjs +173 -0
  250. package/dist/esm/api/resources/files/client/index.d.mts +2 -0
  251. package/dist/esm/api/resources/files/client/index.mjs +1 -0
  252. package/dist/esm/api/resources/files/client/requests/UploadFileRequest.d.mts +40 -0
  253. package/dist/esm/api/resources/files/client/requests/UploadFileRequest.mjs +22 -0
  254. package/dist/esm/api/resources/files/client/requests/index.d.mts +1 -0
  255. package/dist/esm/api/resources/files/client/requests/index.mjs +1 -0
  256. package/dist/esm/api/resources/files/index.d.mts +1 -0
  257. package/dist/esm/api/resources/files/index.mjs +1 -0
  258. package/dist/esm/api/resources/index.d.mts +9 -0
  259. package/dist/esm/api/resources/index.mjs +9 -0
  260. package/dist/esm/api/resources/profiles/client/Client.d.mts +93 -0
  261. package/dist/esm/api/resources/profiles/client/Client.mjs +282 -0
  262. package/dist/esm/api/resources/profiles/client/index.d.mts +2 -0
  263. package/dist/esm/api/resources/profiles/client/index.mjs +1 -0
  264. package/dist/esm/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.d.mts +11 -0
  265. package/dist/esm/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.mjs +4 -0
  266. package/dist/esm/api/resources/profiles/client/requests/index.d.mts +1 -0
  267. package/dist/esm/api/resources/profiles/client/requests/index.mjs +1 -0
  268. package/dist/esm/api/resources/profiles/index.d.mts +1 -0
  269. package/dist/esm/api/resources/profiles/index.mjs +1 -0
  270. package/dist/esm/api/resources/sessions/client/Client.d.mts +146 -0
  271. package/dist/esm/api/resources/sessions/client/Client.mjs +536 -0
  272. package/dist/esm/api/resources/sessions/client/index.d.mts +2 -0
  273. package/dist/esm/api/resources/sessions/client/index.mjs +1 -0
  274. package/dist/esm/api/resources/sessions/client/requests/CreateSessionRequest.d.mts +14 -0
  275. package/dist/esm/api/resources/sessions/client/requests/CreateSessionRequest.mjs +4 -0
  276. package/dist/esm/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.d.mts +13 -0
  277. package/dist/esm/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.mjs +4 -0
  278. package/dist/esm/api/resources/sessions/client/requests/UpdateSessionRequest.d.mts +9 -0
  279. package/dist/esm/api/resources/sessions/client/requests/UpdateSessionRequest.mjs +4 -0
  280. package/dist/esm/api/resources/sessions/client/requests/index.d.mts +3 -0
  281. package/dist/esm/api/resources/sessions/client/requests/index.mjs +1 -0
  282. package/dist/esm/api/resources/sessions/index.d.mts +1 -0
  283. package/dist/esm/api/resources/sessions/index.mjs +1 -0
  284. package/dist/esm/api/resources/tasks/client/Client.d.mts +113 -0
  285. package/dist/esm/api/resources/tasks/client/Client.mjs +374 -0
  286. package/dist/esm/api/resources/tasks/client/index.d.mts +2 -0
  287. package/dist/esm/api/resources/tasks/client/index.mjs +1 -0
  288. package/dist/esm/api/resources/tasks/client/requests/CreateTaskRequest.d.mts +40 -0
  289. package/dist/esm/api/resources/tasks/client/requests/CreateTaskRequest.mjs +4 -0
  290. package/dist/esm/api/resources/tasks/client/requests/ListTasksTasksGetRequest.d.mts +16 -0
  291. package/dist/esm/api/resources/tasks/client/requests/ListTasksTasksGetRequest.mjs +4 -0
  292. package/dist/esm/api/resources/tasks/client/requests/UpdateTaskRequest.d.mts +14 -0
  293. package/dist/esm/api/resources/tasks/client/requests/UpdateTaskRequest.mjs +4 -0
  294. package/dist/esm/api/resources/tasks/client/requests/index.d.mts +3 -0
  295. package/dist/esm/api/resources/tasks/client/requests/index.mjs +1 -0
  296. package/dist/esm/api/resources/tasks/index.d.mts +1 -0
  297. package/dist/esm/api/resources/tasks/index.mjs +1 -0
  298. package/dist/esm/api/types/AccountNotFoundError.d.mts +9 -0
  299. package/dist/esm/api/types/AccountNotFoundError.mjs +4 -0
  300. package/dist/esm/api/types/AccountView.d.mts +18 -0
  301. package/dist/esm/api/types/AccountView.mjs +4 -0
  302. package/dist/esm/api/types/BadRequestErrorBody.d.mts +5 -0
  303. package/dist/esm/api/types/BadRequestErrorBody.mjs +4 -0
  304. package/dist/esm/api/types/DownloadUrlGenerationError.d.mts +9 -0
  305. package/dist/esm/api/types/DownloadUrlGenerationError.mjs +4 -0
  306. package/dist/esm/api/types/FileView.d.mts +12 -0
  307. package/dist/esm/api/types/FileView.mjs +4 -0
  308. package/dist/esm/api/types/HttpValidationError.d.mts +7 -0
  309. package/dist/esm/api/types/HttpValidationError.mjs +4 -0
  310. package/dist/esm/api/types/InsufficientCreditsError.d.mts +9 -0
  311. package/dist/esm/api/types/InsufficientCreditsError.mjs +4 -0
  312. package/dist/esm/api/types/InternalServerErrorBody.d.mts +9 -0
  313. package/dist/esm/api/types/InternalServerErrorBody.mjs +4 -0
  314. package/dist/esm/api/types/NotFoundErrorBody.d.mts +5 -0
  315. package/dist/esm/api/types/NotFoundErrorBody.mjs +4 -0
  316. package/dist/esm/api/types/OutputFileNotFoundError.d.mts +9 -0
  317. package/dist/esm/api/types/OutputFileNotFoundError.mjs +4 -0
  318. package/dist/esm/api/types/ProfileListResponse.d.mts +17 -0
  319. package/dist/esm/api/types/ProfileListResponse.mjs +4 -0
  320. package/dist/esm/api/types/ProfileNotFoundError.d.mts +9 -0
  321. package/dist/esm/api/types/ProfileNotFoundError.mjs +4 -0
  322. package/dist/esm/api/types/ProfileView.d.mts +18 -0
  323. package/dist/esm/api/types/ProfileView.mjs +4 -0
  324. package/dist/esm/api/types/ProxyCountryCode.d.mts +16 -0
  325. package/dist/esm/api/types/ProxyCountryCode.mjs +15 -0
  326. package/dist/esm/api/types/SessionHasRunningTaskError.d.mts +9 -0
  327. package/dist/esm/api/types/SessionHasRunningTaskError.mjs +4 -0
  328. package/dist/esm/api/types/SessionItemView.d.mts +19 -0
  329. package/dist/esm/api/types/SessionItemView.mjs +4 -0
  330. package/dist/esm/api/types/SessionListResponse.d.mts +17 -0
  331. package/dist/esm/api/types/SessionListResponse.mjs +4 -0
  332. package/dist/esm/api/types/SessionNotFoundError.d.mts +9 -0
  333. package/dist/esm/api/types/SessionNotFoundError.mjs +4 -0
  334. package/dist/esm/api/types/SessionStatus.d.mts +15 -0
  335. package/dist/esm/api/types/SessionStatus.mjs +7 -0
  336. package/dist/esm/api/types/SessionStoppedError.d.mts +9 -0
  337. package/dist/esm/api/types/SessionStoppedError.mjs +4 -0
  338. package/dist/esm/api/types/SessionUpdateAction.d.mts +10 -0
  339. package/dist/esm/api/types/SessionUpdateAction.mjs +4 -0
  340. package/dist/esm/api/types/SessionView.d.mts +23 -0
  341. package/dist/esm/api/types/SessionView.mjs +4 -0
  342. package/dist/esm/api/types/ShareNotFoundError.d.mts +9 -0
  343. package/dist/esm/api/types/ShareNotFoundError.mjs +4 -0
  344. package/dist/esm/api/types/ShareView.d.mts +16 -0
  345. package/dist/esm/api/types/ShareView.mjs +4 -0
  346. package/dist/esm/api/types/SupportedLlMs.d.mts +17 -0
  347. package/dist/esm/api/types/SupportedLlMs.mjs +16 -0
  348. package/dist/esm/api/types/TaskCreatedResponse.d.mts +10 -0
  349. package/dist/esm/api/types/TaskCreatedResponse.mjs +4 -0
  350. package/dist/esm/api/types/TaskItemView.d.mts +32 -0
  351. package/dist/esm/api/types/TaskItemView.mjs +4 -0
  352. package/dist/esm/api/types/TaskListResponse.d.mts +17 -0
  353. package/dist/esm/api/types/TaskListResponse.mjs +4 -0
  354. package/dist/esm/api/types/TaskLogFileResponse.d.mts +10 -0
  355. package/dist/esm/api/types/TaskLogFileResponse.mjs +4 -0
  356. package/dist/esm/api/types/TaskNotFoundError.d.mts +9 -0
  357. package/dist/esm/api/types/TaskNotFoundError.mjs +4 -0
  358. package/dist/esm/api/types/TaskOutputFileResponse.d.mts +14 -0
  359. package/dist/esm/api/types/TaskOutputFileResponse.mjs +4 -0
  360. package/dist/esm/api/types/TaskStatus.d.mts +19 -0
  361. package/dist/esm/api/types/TaskStatus.mjs +9 -0
  362. package/dist/esm/api/types/TaskStepView.d.mts +22 -0
  363. package/dist/esm/api/types/TaskStepView.mjs +4 -0
  364. package/dist/esm/api/types/TaskUpdateAction.d.mts +19 -0
  365. package/dist/esm/api/types/TaskUpdateAction.mjs +9 -0
  366. package/dist/esm/api/types/TaskView.d.mts +34 -0
  367. package/dist/esm/api/types/TaskView.mjs +4 -0
  368. package/dist/esm/api/types/UnsupportedContentTypeError.d.mts +9 -0
  369. package/dist/esm/api/types/UnsupportedContentTypeError.mjs +4 -0
  370. package/dist/esm/api/types/UploadFilePresignedUrlResponse.d.mts +18 -0
  371. package/dist/esm/api/types/UploadFilePresignedUrlResponse.mjs +4 -0
  372. package/dist/esm/api/types/ValidationError.d.mts +14 -0
  373. package/dist/esm/api/types/ValidationError.mjs +4 -0
  374. package/dist/esm/api/types/index.d.mts +38 -0
  375. package/dist/esm/api/types/index.mjs +38 -0
  376. package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
  377. package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
  378. package/dist/esm/core/fetcher/BinaryResponse.d.mts +20 -0
  379. package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
  380. package/dist/esm/core/fetcher/Fetcher.d.mts +40 -0
  381. package/dist/esm/core/fetcher/Fetcher.mjs +116 -0
  382. package/dist/esm/core/fetcher/Headers.d.mts +2 -0
  383. package/dist/esm/core/fetcher/Headers.mjs +82 -0
  384. package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
  385. package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
  386. package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
  387. package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
  388. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +4 -0
  389. package/dist/esm/core/fetcher/ResponseWithBody.mjs +3 -0
  390. package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
  391. package/dist/esm/core/fetcher/Supplier.mjs +19 -0
  392. package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
  393. package/dist/esm/core/fetcher/createRequestUrl.mjs +5 -0
  394. package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
  395. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +41 -0
  396. package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -0
  397. package/dist/esm/core/fetcher/getFetchFn.mjs +14 -0
  398. package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
  399. package/dist/esm/core/fetcher/getHeader.mjs +8 -0
  400. package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
  401. package/dist/esm/core/fetcher/getRequestBody.mjs +20 -0
  402. package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
  403. package/dist/esm/core/fetcher/getResponseBody.mjs +52 -0
  404. package/dist/esm/core/fetcher/index.d.mts +9 -0
  405. package/dist/esm/core/fetcher/index.mjs +5 -0
  406. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -0
  407. package/dist/esm/core/fetcher/makeRequest.mjs +38 -0
  408. package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
  409. package/dist/esm/core/fetcher/requestWithRetries.mjs +37 -0
  410. package/dist/esm/core/fetcher/signals.d.mts +11 -0
  411. package/dist/esm/core/fetcher/signals.mjs +32 -0
  412. package/dist/esm/core/headers.d.mts +3 -0
  413. package/dist/esm/core/headers.mjs +25 -0
  414. package/dist/esm/core/index.d.mts +3 -0
  415. package/dist/esm/core/index.mjs +3 -0
  416. package/dist/esm/core/json.d.mts +15 -0
  417. package/dist/esm/core/json.mjs +19 -0
  418. package/dist/esm/core/runtime/index.d.mts +1 -0
  419. package/dist/esm/core/runtime/index.mjs +1 -0
  420. package/dist/esm/core/runtime/runtime.d.mts +9 -0
  421. package/dist/esm/core/runtime/runtime.mjs +99 -0
  422. package/dist/esm/core/url/index.d.mts +2 -0
  423. package/dist/esm/core/url/index.mjs +2 -0
  424. package/dist/esm/core/url/join.d.mts +1 -0
  425. package/dist/esm/core/url/join.mjs +66 -0
  426. package/dist/esm/core/url/qs.d.mts +6 -0
  427. package/dist/esm/core/url/qs.mjs +61 -0
  428. package/dist/esm/environments.d.mts +7 -0
  429. package/dist/esm/environments.mjs +6 -0
  430. package/dist/esm/errors/BrowserUseError.d.mts +15 -0
  431. package/dist/esm/errors/BrowserUseError.mjs +26 -0
  432. package/dist/esm/errors/BrowserUseTimeoutError.d.mts +6 -0
  433. package/dist/esm/errors/BrowserUseTimeoutError.mjs +9 -0
  434. package/dist/esm/errors/index.d.mts +2 -0
  435. package/dist/esm/errors/index.mjs +2 -0
  436. package/dist/esm/index.d.mts +7 -0
  437. package/dist/esm/index.mjs +5 -0
  438. package/dist/esm/version.d.mts +1 -0
  439. package/dist/esm/version.mjs +1 -0
  440. package/dist/esm/wrapper/BrowserUseClient.d.mts +6 -0
  441. package/dist/esm/wrapper/BrowserUseClient.mjs +8 -0
  442. package/dist/esm/wrapper/api/BrowserUseTasks.d.mts +15 -0
  443. package/dist/esm/wrapper/api/BrowserUseTasks.mjs +52 -0
  444. package/dist/esm/wrapper/lib/parse.d.mts +69 -0
  445. package/dist/esm/wrapper/lib/parse.mjs +203 -0
  446. package/dist/esm/wrapper/lib/types.d.mts +74 -0
  447. package/dist/esm/wrapper/lib/types.mjs +9 -0
  448. package/dist/esm/wrapper/lib/webhooks.d.mts +72 -0
  449. package/dist/esm/wrapper/lib/webhooks.mjs +89 -0
  450. package/package.json +83 -158
  451. package/reference.md +1302 -0
  452. package/CHANGELOG.md +0 -157
  453. package/LICENSE +0 -201
  454. package/api-promise.d.mts +0 -2
  455. package/api-promise.d.mts.map +0 -1
  456. package/api-promise.d.ts +0 -2
  457. package/api-promise.d.ts.map +0 -1
  458. package/api-promise.js +0 -6
  459. package/api-promise.js.map +0 -1
  460. package/api-promise.mjs +0 -2
  461. package/api-promise.mjs.map +0 -1
  462. package/client.d.mts +0 -192
  463. package/client.d.mts.map +0 -1
  464. package/client.d.ts +0 -192
  465. package/client.d.ts.map +0 -1
  466. package/client.js +0 -473
  467. package/client.js.map +0 -1
  468. package/client.mjs +0 -469
  469. package/client.mjs.map +0 -1
  470. package/core/api-promise.d.mts +0 -46
  471. package/core/api-promise.d.mts.map +0 -1
  472. package/core/api-promise.d.ts +0 -46
  473. package/core/api-promise.d.ts.map +0 -1
  474. package/core/api-promise.js +0 -74
  475. package/core/api-promise.js.map +0 -1
  476. package/core/api-promise.mjs +0 -70
  477. package/core/api-promise.mjs.map +0 -1
  478. package/core/error.d.mts +0 -46
  479. package/core/error.d.mts.map +0 -1
  480. package/core/error.d.ts +0 -46
  481. package/core/error.d.ts.map +0 -1
  482. package/core/error.js +0 -113
  483. package/core/error.js.map +0 -1
  484. package/core/error.mjs +0 -97
  485. package/core/error.mjs.map +0 -1
  486. package/core/resource.d.mts +0 -6
  487. package/core/resource.d.mts.map +0 -1
  488. package/core/resource.d.ts +0 -6
  489. package/core/resource.d.ts.map +0 -1
  490. package/core/resource.js +0 -11
  491. package/core/resource.js.map +0 -1
  492. package/core/resource.mjs +0 -7
  493. package/core/resource.mjs.map +0 -1
  494. package/core/uploads.d.mts +0 -3
  495. package/core/uploads.d.mts.map +0 -1
  496. package/core/uploads.d.ts +0 -3
  497. package/core/uploads.d.ts.map +0 -1
  498. package/core/uploads.js +0 -6
  499. package/core/uploads.js.map +0 -1
  500. package/core/uploads.mjs +0 -2
  501. package/core/uploads.mjs.map +0 -1
  502. package/error.d.mts +0 -2
  503. package/error.d.mts.map +0 -1
  504. package/error.d.ts +0 -2
  505. package/error.d.ts.map +0 -1
  506. package/error.js +0 -6
  507. package/error.js.map +0 -1
  508. package/error.mjs +0 -2
  509. package/error.mjs.map +0 -1
  510. package/index.d.mts +0 -6
  511. package/index.d.mts.map +0 -1
  512. package/index.d.ts +0 -6
  513. package/index.d.ts.map +0 -1
  514. package/index.js +0 -30
  515. package/index.js.map +0 -1
  516. package/index.mjs +0 -7
  517. package/index.mjs.map +0 -1
  518. package/internal/builtin-types.d.mts +0 -73
  519. package/internal/builtin-types.d.mts.map +0 -1
  520. package/internal/builtin-types.d.ts +0 -73
  521. package/internal/builtin-types.d.ts.map +0 -1
  522. package/internal/builtin-types.js +0 -4
  523. package/internal/builtin-types.js.map +0 -1
  524. package/internal/builtin-types.mjs +0 -3
  525. package/internal/builtin-types.mjs.map +0 -1
  526. package/internal/detect-platform.d.mts +0 -15
  527. package/internal/detect-platform.d.mts.map +0 -1
  528. package/internal/detect-platform.d.ts +0 -15
  529. package/internal/detect-platform.d.ts.map +0 -1
  530. package/internal/detect-platform.js +0 -162
  531. package/internal/detect-platform.js.map +0 -1
  532. package/internal/detect-platform.mjs +0 -157
  533. package/internal/detect-platform.mjs.map +0 -1
  534. package/internal/errors.d.mts +0 -3
  535. package/internal/errors.d.mts.map +0 -1
  536. package/internal/errors.d.ts +0 -3
  537. package/internal/errors.d.ts.map +0 -1
  538. package/internal/errors.js +0 -41
  539. package/internal/errors.js.map +0 -1
  540. package/internal/errors.mjs +0 -36
  541. package/internal/errors.mjs.map +0 -1
  542. package/internal/headers.d.mts +0 -20
  543. package/internal/headers.d.mts.map +0 -1
  544. package/internal/headers.d.ts +0 -20
  545. package/internal/headers.d.ts.map +0 -1
  546. package/internal/headers.js +0 -79
  547. package/internal/headers.js.map +0 -1
  548. package/internal/headers.mjs +0 -74
  549. package/internal/headers.mjs.map +0 -1
  550. package/internal/parse.d.mts +0 -12
  551. package/internal/parse.d.mts.map +0 -1
  552. package/internal/parse.d.ts +0 -12
  553. package/internal/parse.d.ts.map +0 -1
  554. package/internal/parse.js +0 -35
  555. package/internal/parse.js.map +0 -1
  556. package/internal/parse.mjs +0 -32
  557. package/internal/parse.mjs.map +0 -1
  558. package/internal/request-options.d.mts +0 -75
  559. package/internal/request-options.d.mts.map +0 -1
  560. package/internal/request-options.d.ts +0 -75
  561. package/internal/request-options.d.ts.map +0 -1
  562. package/internal/request-options.js +0 -14
  563. package/internal/request-options.js.map +0 -1
  564. package/internal/request-options.mjs +0 -10
  565. package/internal/request-options.mjs.map +0 -1
  566. package/internal/shim-types.d.mts +0 -17
  567. package/internal/shim-types.d.mts.map +0 -1
  568. package/internal/shim-types.d.ts +0 -17
  569. package/internal/shim-types.d.ts.map +0 -1
  570. package/internal/shim-types.js +0 -4
  571. package/internal/shim-types.js.map +0 -1
  572. package/internal/shim-types.mjs +0 -3
  573. package/internal/shim-types.mjs.map +0 -1
  574. package/internal/shims.d.mts +0 -20
  575. package/internal/shims.d.mts.map +0 -1
  576. package/internal/shims.d.ts +0 -20
  577. package/internal/shims.d.ts.map +0 -1
  578. package/internal/shims.js +0 -92
  579. package/internal/shims.js.map +0 -1
  580. package/internal/shims.mjs +0 -85
  581. package/internal/shims.mjs.map +0 -1
  582. package/internal/to-file.d.mts +0 -45
  583. package/internal/to-file.d.mts.map +0 -1
  584. package/internal/to-file.d.ts +0 -45
  585. package/internal/to-file.d.ts.map +0 -1
  586. package/internal/to-file.js +0 -91
  587. package/internal/to-file.js.map +0 -1
  588. package/internal/to-file.mjs +0 -88
  589. package/internal/to-file.mjs.map +0 -1
  590. package/internal/tslib.js +0 -85
  591. package/internal/tslib.mjs +0 -17
  592. package/internal/types.d.mts +0 -69
  593. package/internal/types.d.mts.map +0 -1
  594. package/internal/types.d.ts +0 -69
  595. package/internal/types.d.ts.map +0 -1
  596. package/internal/types.js +0 -4
  597. package/internal/types.js.map +0 -1
  598. package/internal/types.mjs +0 -3
  599. package/internal/types.mjs.map +0 -1
  600. package/internal/uploads.d.mts +0 -42
  601. package/internal/uploads.d.mts.map +0 -1
  602. package/internal/uploads.d.ts +0 -42
  603. package/internal/uploads.d.ts.map +0 -1
  604. package/internal/uploads.js +0 -141
  605. package/internal/uploads.js.map +0 -1
  606. package/internal/uploads.mjs +0 -131
  607. package/internal/uploads.mjs.map +0 -1
  608. package/internal/utils/base64.d.mts +0 -3
  609. package/internal/utils/base64.d.mts.map +0 -1
  610. package/internal/utils/base64.d.ts +0 -3
  611. package/internal/utils/base64.d.ts.map +0 -1
  612. package/internal/utils/base64.js +0 -38
  613. package/internal/utils/base64.js.map +0 -1
  614. package/internal/utils/base64.mjs +0 -33
  615. package/internal/utils/base64.mjs.map +0 -1
  616. package/internal/utils/bytes.d.mts +0 -4
  617. package/internal/utils/bytes.d.mts.map +0 -1
  618. package/internal/utils/bytes.d.ts +0 -4
  619. package/internal/utils/bytes.d.ts.map +0 -1
  620. package/internal/utils/bytes.js +0 -31
  621. package/internal/utils/bytes.js.map +0 -1
  622. package/internal/utils/bytes.mjs +0 -26
  623. package/internal/utils/bytes.mjs.map +0 -1
  624. package/internal/utils/env.d.mts +0 -9
  625. package/internal/utils/env.d.mts.map +0 -1
  626. package/internal/utils/env.d.ts +0 -9
  627. package/internal/utils/env.d.ts.map +0 -1
  628. package/internal/utils/env.js +0 -22
  629. package/internal/utils/env.js.map +0 -1
  630. package/internal/utils/env.mjs +0 -18
  631. package/internal/utils/env.mjs.map +0 -1
  632. package/internal/utils/log.d.mts +0 -37
  633. package/internal/utils/log.d.mts.map +0 -1
  634. package/internal/utils/log.d.ts +0 -37
  635. package/internal/utils/log.d.ts.map +0 -1
  636. package/internal/utils/log.js +0 -86
  637. package/internal/utils/log.js.map +0 -1
  638. package/internal/utils/log.mjs +0 -80
  639. package/internal/utils/log.mjs.map +0 -1
  640. package/internal/utils/path.d.mts +0 -15
  641. package/internal/utils/path.d.mts.map +0 -1
  642. package/internal/utils/path.d.ts +0 -15
  643. package/internal/utils/path.d.ts.map +0 -1
  644. package/internal/utils/path.js +0 -79
  645. package/internal/utils/path.js.map +0 -1
  646. package/internal/utils/path.mjs +0 -74
  647. package/internal/utils/path.mjs.map +0 -1
  648. package/internal/utils/sleep.d.mts +0 -2
  649. package/internal/utils/sleep.d.mts.map +0 -1
  650. package/internal/utils/sleep.d.ts +0 -2
  651. package/internal/utils/sleep.d.ts.map +0 -1
  652. package/internal/utils/sleep.js +0 -7
  653. package/internal/utils/sleep.js.map +0 -1
  654. package/internal/utils/sleep.mjs +0 -3
  655. package/internal/utils/sleep.mjs.map +0 -1
  656. package/internal/utils/uuid.d.mts +0 -5
  657. package/internal/utils/uuid.d.mts.map +0 -1
  658. package/internal/utils/uuid.d.ts +0 -5
  659. package/internal/utils/uuid.d.ts.map +0 -1
  660. package/internal/utils/uuid.js +0 -19
  661. package/internal/utils/uuid.js.map +0 -1
  662. package/internal/utils/uuid.mjs +0 -15
  663. package/internal/utils/uuid.mjs.map +0 -1
  664. package/internal/utils/values.d.mts +0 -18
  665. package/internal/utils/values.d.mts.map +0 -1
  666. package/internal/utils/values.d.ts +0 -18
  667. package/internal/utils/values.d.ts.map +0 -1
  668. package/internal/utils/values.js +0 -112
  669. package/internal/utils/values.js.map +0 -1
  670. package/internal/utils/values.mjs +0 -94
  671. package/internal/utils/values.mjs.map +0 -1
  672. package/internal/utils.d.mts +0 -7
  673. package/internal/utils.d.mts.map +0 -1
  674. package/internal/utils.d.ts +0 -7
  675. package/internal/utils.d.ts.map +0 -1
  676. package/internal/utils.js +0 -11
  677. package/internal/utils.js.map +0 -1
  678. package/internal/utils.mjs +0 -8
  679. package/internal/utils.mjs.map +0 -1
  680. package/lib/bin/auth.d.mts +0 -10
  681. package/lib/bin/auth.d.mts.map +0 -1
  682. package/lib/bin/auth.d.ts +0 -10
  683. package/lib/bin/auth.d.ts.map +0 -1
  684. package/lib/bin/auth.js +0 -52
  685. package/lib/bin/auth.js.map +0 -1
  686. package/lib/bin/auth.mjs +0 -47
  687. package/lib/bin/auth.mjs.map +0 -1
  688. package/lib/bin/cli.d.mts +0 -3
  689. package/lib/bin/cli.d.mts.map +0 -1
  690. package/lib/bin/cli.d.ts +0 -3
  691. package/lib/bin/cli.d.ts.map +0 -1
  692. package/lib/bin/cli.js +0 -12
  693. package/lib/bin/cli.js.map +0 -1
  694. package/lib/bin/cli.mjs +0 -10
  695. package/lib/bin/cli.mjs.map +0 -1
  696. package/lib/bin/commands/listen.d.mts +0 -3
  697. package/lib/bin/commands/listen.d.mts.map +0 -1
  698. package/lib/bin/commands/listen.d.ts +0 -3
  699. package/lib/bin/commands/listen.d.ts.map +0 -1
  700. package/lib/bin/commands/listen.js +0 -143
  701. package/lib/bin/commands/listen.js.map +0 -1
  702. package/lib/bin/commands/listen.mjs +0 -140
  703. package/lib/bin/commands/listen.mjs.map +0 -1
  704. package/lib/nextjs/hooks/useBrowserUse.d.mts +0 -7
  705. package/lib/nextjs/hooks/useBrowserUse.d.mts.map +0 -1
  706. package/lib/nextjs/hooks/useBrowserUse.d.ts +0 -7
  707. package/lib/nextjs/hooks/useBrowserUse.d.ts.map +0 -1
  708. package/lib/nextjs/hooks/useBrowserUse.js +0 -30
  709. package/lib/nextjs/hooks/useBrowserUse.js.map +0 -1
  710. package/lib/nextjs/hooks/useBrowserUse.mjs +0 -27
  711. package/lib/nextjs/hooks/useBrowserUse.mjs.map +0 -1
  712. package/lib/nextjs/server/utils.d.mts +0 -26
  713. package/lib/nextjs/server/utils.d.mts.map +0 -1
  714. package/lib/nextjs/server/utils.d.ts +0 -26
  715. package/lib/nextjs/server/utils.d.ts.map +0 -1
  716. package/lib/nextjs/server/utils.js +0 -42
  717. package/lib/nextjs/server/utils.js.map +0 -1
  718. package/lib/nextjs/server/utils.mjs +0 -39
  719. package/lib/nextjs/server/utils.mjs.map +0 -1
  720. package/lib/parse.d.mts +0 -11
  721. package/lib/parse.d.mts.map +0 -1
  722. package/lib/parse.d.ts +0 -11
  723. package/lib/parse.d.ts.map +0 -1
  724. package/lib/parse.js +0 -32
  725. package/lib/parse.js.map +0 -1
  726. package/lib/parse.mjs +0 -27
  727. package/lib/parse.mjs.map +0 -1
  728. package/lib/stream.d.mts +0 -7
  729. package/lib/stream.d.mts.map +0 -1
  730. package/lib/stream.d.ts +0 -7
  731. package/lib/stream.d.ts.map +0 -1
  732. package/lib/stream.js +0 -16
  733. package/lib/stream.js.map +0 -1
  734. package/lib/stream.mjs +0 -12
  735. package/lib/stream.mjs.map +0 -1
  736. package/lib/types.d.mts +0 -75
  737. package/lib/types.d.mts.map +0 -1
  738. package/lib/types.d.ts +0 -75
  739. package/lib/types.d.ts.map +0 -1
  740. package/lib/types.js +0 -14
  741. package/lib/types.js.map +0 -1
  742. package/lib/types.mjs +0 -10
  743. package/lib/types.mjs.map +0 -1
  744. package/lib/webhooks.d.mts +0 -73
  745. package/lib/webhooks.d.mts.map +0 -1
  746. package/lib/webhooks.d.ts +0 -73
  747. package/lib/webhooks.d.ts.map +0 -1
  748. package/lib/webhooks.js +0 -85
  749. package/lib/webhooks.js.map +0 -1
  750. package/lib/webhooks.mjs +0 -79
  751. package/lib/webhooks.mjs.map +0 -1
  752. package/resource.d.mts +0 -2
  753. package/resource.d.mts.map +0 -1
  754. package/resource.d.ts +0 -2
  755. package/resource.d.ts.map +0 -1
  756. package/resource.js +0 -6
  757. package/resource.js.map +0 -1
  758. package/resource.mjs +0 -2
  759. package/resource.mjs.map +0 -1
  760. package/resources/agent-profiles.d.mts +0 -174
  761. package/resources/agent-profiles.d.mts.map +0 -1
  762. package/resources/agent-profiles.d.ts +0 -174
  763. package/resources/agent-profiles.d.ts.map +0 -1
  764. package/resources/agent-profiles.js +0 -125
  765. package/resources/agent-profiles.js.map +0 -1
  766. package/resources/agent-profiles.mjs +0 -121
  767. package/resources/agent-profiles.mjs.map +0 -1
  768. package/resources/browser-profiles.d.mts +0 -179
  769. package/resources/browser-profiles.d.mts.map +0 -1
  770. package/resources/browser-profiles.d.ts +0 -179
  771. package/resources/browser-profiles.d.ts.map +0 -1
  772. package/resources/browser-profiles.js +0 -126
  773. package/resources/browser-profiles.js.map +0 -1
  774. package/resources/browser-profiles.mjs +0 -122
  775. package/resources/browser-profiles.mjs.map +0 -1
  776. package/resources/index.d.mts +0 -6
  777. package/resources/index.d.mts.map +0 -1
  778. package/resources/index.d.ts +0 -6
  779. package/resources/index.d.ts.map +0 -1
  780. package/resources/index.js +0 -15
  781. package/resources/index.js.map +0 -1
  782. package/resources/index.mjs +0 -7
  783. package/resources/index.mjs.map +0 -1
  784. package/resources/sessions/index.d.mts +0 -3
  785. package/resources/sessions/index.d.mts.map +0 -1
  786. package/resources/sessions/index.d.ts +0 -3
  787. package/resources/sessions/index.d.ts.map +0 -1
  788. package/resources/sessions/index.js +0 -9
  789. package/resources/sessions/index.js.map +0 -1
  790. package/resources/sessions/index.mjs +0 -4
  791. package/resources/sessions/index.mjs.map +0 -1
  792. package/resources/sessions/public-share.d.mts +0 -89
  793. package/resources/sessions/public-share.d.mts.map +0 -1
  794. package/resources/sessions/public-share.d.ts +0 -89
  795. package/resources/sessions/public-share.d.ts.map +0 -1
  796. package/resources/sessions/public-share.js +0 -86
  797. package/resources/sessions/public-share.js.map +0 -1
  798. package/resources/sessions/public-share.mjs +0 -82
  799. package/resources/sessions/public-share.mjs.map +0 -1
  800. package/resources/sessions/sessions.d.mts +0 -186
  801. package/resources/sessions/sessions.d.mts.map +0 -1
  802. package/resources/sessions/sessions.d.ts +0 -186
  803. package/resources/sessions/sessions.d.ts.map +0 -1
  804. package/resources/sessions/sessions.js +0 -113
  805. package/resources/sessions/sessions.js.map +0 -1
  806. package/resources/sessions/sessions.mjs +0 -108
  807. package/resources/sessions/sessions.mjs.map +0 -1
  808. package/resources/sessions.d.mts +0 -2
  809. package/resources/sessions.d.mts.map +0 -1
  810. package/resources/sessions.d.ts +0 -2
  811. package/resources/sessions.d.ts.map +0 -1
  812. package/resources/sessions.js +0 -6
  813. package/resources/sessions.js.map +0 -1
  814. package/resources/sessions.mjs +0 -3
  815. package/resources/sessions.mjs.map +0 -1
  816. package/resources/tasks.d.mts +0 -529
  817. package/resources/tasks.d.mts.map +0 -1
  818. package/resources/tasks.d.ts +0 -529
  819. package/resources/tasks.d.ts.map +0 -1
  820. package/resources/tasks.js +0 -238
  821. package/resources/tasks.js.map +0 -1
  822. package/resources/tasks.mjs +0 -234
  823. package/resources/tasks.mjs.map +0 -1
  824. package/resources/users/index.d.mts +0 -3
  825. package/resources/users/index.d.mts.map +0 -1
  826. package/resources/users/index.d.ts +0 -3
  827. package/resources/users/index.d.ts.map +0 -1
  828. package/resources/users/index.js +0 -9
  829. package/resources/users/index.js.map +0 -1
  830. package/resources/users/index.mjs +0 -4
  831. package/resources/users/index.mjs.map +0 -1
  832. package/resources/users/me/files.d.mts +0 -64
  833. package/resources/users/me/files.d.mts.map +0 -1
  834. package/resources/users/me/files.d.ts +0 -64
  835. package/resources/users/me/files.d.ts.map +0 -1
  836. package/resources/users/me/files.js +0 -43
  837. package/resources/users/me/files.js.map +0 -1
  838. package/resources/users/me/files.mjs +0 -39
  839. package/resources/users/me/files.mjs.map +0 -1
  840. package/resources/users/me/index.d.mts +0 -3
  841. package/resources/users/me/index.d.mts.map +0 -1
  842. package/resources/users/me/index.d.ts +0 -3
  843. package/resources/users/me/index.d.ts.map +0 -1
  844. package/resources/users/me/index.js +0 -9
  845. package/resources/users/me/index.js.map +0 -1
  846. package/resources/users/me/index.mjs +0 -4
  847. package/resources/users/me/index.mjs.map +0 -1
  848. package/resources/users/me/me.d.mts +0 -50
  849. package/resources/users/me/me.d.mts.map +0 -1
  850. package/resources/users/me/me.d.ts +0 -50
  851. package/resources/users/me/me.d.ts.map +0 -1
  852. package/resources/users/me/me.js +0 -41
  853. package/resources/users/me/me.js.map +0 -1
  854. package/resources/users/me/me.mjs +0 -36
  855. package/resources/users/me/me.mjs.map +0 -1
  856. package/resources/users/me.d.mts +0 -2
  857. package/resources/users/me.d.mts.map +0 -1
  858. package/resources/users/me.d.ts +0 -2
  859. package/resources/users/me.d.ts.map +0 -1
  860. package/resources/users/me.js +0 -6
  861. package/resources/users/me.js.map +0 -1
  862. package/resources/users/me.mjs +0 -3
  863. package/resources/users/me.mjs.map +0 -1
  864. package/resources/users/users.d.mts +0 -10
  865. package/resources/users/users.d.mts.map +0 -1
  866. package/resources/users/users.d.ts +0 -10
  867. package/resources/users/users.d.ts.map +0 -1
  868. package/resources/users/users.js +0 -17
  869. package/resources/users/users.js.map +0 -1
  870. package/resources/users/users.mjs +0 -12
  871. package/resources/users/users.mjs.map +0 -1
  872. package/resources/users.d.mts +0 -2
  873. package/resources/users.d.mts.map +0 -1
  874. package/resources/users.d.ts +0 -2
  875. package/resources/users.d.ts.map +0 -1
  876. package/resources/users.js +0 -6
  877. package/resources/users.js.map +0 -1
  878. package/resources/users.mjs +0 -3
  879. package/resources/users.mjs.map +0 -1
  880. package/resources.d.mts +0 -2
  881. package/resources.d.mts.map +0 -1
  882. package/resources.d.ts +0 -2
  883. package/resources.d.ts.map +0 -1
  884. package/resources.js +0 -5
  885. package/resources.js.map +0 -1
  886. package/resources.mjs +0 -2
  887. package/resources.mjs.map +0 -1
  888. package/src/api-promise.ts +0 -2
  889. package/src/client.ts +0 -824
  890. package/src/core/README.md +0 -3
  891. package/src/core/api-promise.ts +0 -92
  892. package/src/core/error.ts +0 -130
  893. package/src/core/resource.ts +0 -11
  894. package/src/core/uploads.ts +0 -2
  895. package/src/error.ts +0 -2
  896. package/src/index.ts +0 -22
  897. package/src/internal/README.md +0 -3
  898. package/src/internal/builtin-types.ts +0 -93
  899. package/src/internal/detect-platform.ts +0 -196
  900. package/src/internal/errors.ts +0 -33
  901. package/src/internal/headers.ts +0 -97
  902. package/src/internal/parse.ts +0 -50
  903. package/src/internal/request-options.ts +0 -91
  904. package/src/internal/shim-types.ts +0 -26
  905. package/src/internal/shims.ts +0 -107
  906. package/src/internal/to-file.ts +0 -154
  907. package/src/internal/types.ts +0 -95
  908. package/src/internal/uploads.ts +0 -187
  909. package/src/internal/utils/base64.ts +0 -40
  910. package/src/internal/utils/bytes.ts +0 -32
  911. package/src/internal/utils/env.ts +0 -18
  912. package/src/internal/utils/log.ts +0 -127
  913. package/src/internal/utils/path.ts +0 -88
  914. package/src/internal/utils/sleep.ts +0 -3
  915. package/src/internal/utils/uuid.ts +0 -17
  916. package/src/internal/utils/values.ts +0 -105
  917. package/src/internal/utils.ts +0 -8
  918. package/src/lib/.keep +0 -4
  919. package/src/lib/bin/auth.ts +0 -63
  920. package/src/lib/bin/cli.ts +0 -11
  921. package/src/lib/bin/commands/listen.ts +0 -183
  922. package/src/lib/nextjs/hooks/useBrowserUse.ts +0 -37
  923. package/src/lib/nextjs/server/utils.ts +0 -69
  924. package/src/lib/parse.ts +0 -46
  925. package/src/lib/stream.ts +0 -14
  926. package/src/lib/types.ts +0 -73
  927. package/src/lib/webhooks.ts +0 -119
  928. package/src/resource.ts +0 -2
  929. package/src/resources/agent-profiles.ts +0 -245
  930. package/src/resources/browser-profiles.ts +0 -255
  931. package/src/resources/index.ts +0 -46
  932. package/src/resources/sessions/index.ts +0 -11
  933. package/src/resources/sessions/public-share.ts +0 -109
  934. package/src/resources/sessions/sessions.ts +0 -240
  935. package/src/resources/sessions.ts +0 -3
  936. package/src/resources/tasks.ts +0 -783
  937. package/src/resources/users/index.ts +0 -4
  938. package/src/resources/users/me/files.ts +0 -95
  939. package/src/resources/users/me/index.ts +0 -4
  940. package/src/resources/users/me/me.ts +0 -68
  941. package/src/resources/users/me.ts +0 -3
  942. package/src/resources/users/users.ts +0 -15
  943. package/src/resources/users.ts +0 -3
  944. package/src/resources.ts +0 -1
  945. package/src/tsconfig.json +0 -11
  946. package/src/uploads.ts +0 -2
  947. package/src/version.ts +0 -1
  948. package/uploads.d.mts +0 -2
  949. package/uploads.d.mts.map +0 -1
  950. package/uploads.d.ts +0 -2
  951. package/uploads.d.ts.map +0 -1
  952. package/uploads.js +0 -6
  953. package/uploads.js.map +0 -1
  954. package/uploads.mjs +0 -2
  955. package/uploads.mjs.map +0 -1
  956. package/version.d.mts +0 -2
  957. package/version.d.mts.map +0 -1
  958. package/version.d.ts +0 -2
  959. package/version.d.ts.map +0 -1
  960. package/version.js +0 -5
  961. package/version.js.map +0 -1
  962. package/version.mjs +0 -2
  963. package/version.mjs.map +0 -1
@@ -1,238 +0,0 @@
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.Tasks = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- const path_1 = require("../internal/utils/path.js");
7
- const parse_1 = require("../lib/parse.js");
8
- const stream_1 = require("../lib/stream.js");
9
- const types_1 = require("../lib/types.js");
10
- class Tasks extends resource_1.APIResource {
11
- create(body, options) {
12
- if ('schema' in body && body.schema != null && typeof body.schema === 'object') {
13
- const schema = body.schema;
14
- const _body = {
15
- ...body,
16
- structuredOutputJson: (0, parse_1.stringifyStructuredOutput)(schema),
17
- };
18
- return this._client.post('/tasks', { body: _body, ...options });
19
- }
20
- return this._client.post('/tasks', { body, ...options });
21
- }
22
- retrieve(req, options) {
23
- if (typeof req === 'string') {
24
- return this._client.get((0, path_1.path) `/tasks/${req}`, options);
25
- }
26
- const { taskId, schema } = req;
27
- return this._client
28
- .get((0, path_1.path) `/tasks/${taskId}`, options)
29
- ._thenUnwrap((rsp) => (0, parse_1.parseStructuredTaskOutput)(rsp, schema));
30
- }
31
- async *watch(taskId, config, options) {
32
- const hash = { current: null };
33
- poll: do {
34
- if (options?.signal?.aborted) {
35
- break poll;
36
- }
37
- const res = await this.retrieve(taskId);
38
- const resHash = (0, stream_1.getTaskViewHash)(res);
39
- if (hash.current == null || resHash !== hash.current) {
40
- hash.current = resHash;
41
- yield { event: 'status', data: res };
42
- }
43
- switch (res.status) {
44
- case 'finished':
45
- case 'stopped':
46
- case 'paused':
47
- break poll;
48
- case 'started':
49
- await new Promise((resolve) => setTimeout(resolve, config.interval));
50
- break;
51
- default:
52
- throw new types_1.ExhaustiveSwitchCheck(res.status);
53
- }
54
- } while (true);
55
- }
56
- async *stream(body, options) {
57
- const taskId = typeof body === 'object' ? body.taskId : body;
58
- for await (const msg of this.watch(taskId, { interval: 500 }, options)) {
59
- if (options?.signal?.aborted) {
60
- break;
61
- }
62
- if (typeof body === 'object') {
63
- const parsed = (0, parse_1.parseStructuredTaskOutput)(msg.data, body.schema);
64
- yield { event: 'status', data: parsed };
65
- }
66
- else {
67
- yield { event: 'status', data: msg.data };
68
- }
69
- }
70
- }
71
- run(body, options) {
72
- if ('schema' in body && body.schema != null && typeof body.schema === 'object') {
73
- return this.create(body, options)._thenUnwrap(async (data) => {
74
- const taskId = data.id;
75
- for await (const msg of this.stream({ taskId, schema: body.schema }, options)) {
76
- if (msg.data.status === 'finished') {
77
- return msg.data;
78
- }
79
- }
80
- throw new Error('Task did not finish');
81
- });
82
- }
83
- return this.create(body, options)._thenUnwrap(async (data) => {
84
- const taskId = data.id;
85
- for await (const msg of this.stream(taskId, options)) {
86
- if (msg.data.status === 'finished') {
87
- return msg.data;
88
- }
89
- }
90
- throw new Error('Task did not finish');
91
- });
92
- }
93
- /**
94
- * Control the execution of an AI agent task.
95
- *
96
- * Allows you to pause, resume, or stop tasks, and optionally stop the entire
97
- * session. This is useful for:
98
- *
99
- * - Pausing long-running tasks to review progress
100
- * - Stopping tasks that are taking too long
101
- * - Ending sessions when you're done with all tasks
102
- *
103
- * Available actions:
104
- *
105
- * - STOP: Stop the current task
106
- * - PAUSE: Pause the task (can be resumed later)
107
- * - RESUME: Resume a paused task
108
- * - STOP_TASK_AND_SESSION: Stop the task and end the entire session
109
- *
110
- * Args:
111
- *
112
- * - task_id: The unique identifier of the agent task to control
113
- * - request: The action to perform on the task
114
- *
115
- * Returns:
116
- *
117
- * - The updated task information
118
- *
119
- * Raises:
120
- *
121
- * - 404: If the user agent task doesn't exist
122
- */
123
- update(taskID, body, options) {
124
- return this._client.patch((0, path_1.path) `/tasks/${taskID}`, { body, ...options });
125
- }
126
- /**
127
- * Get a paginated list of all Browser Use Agent tasks for the authenticated user.
128
- *
129
- * Browser Use Agent tasks are the individual jobs that your agents perform within
130
- * a session. Each task represents a specific instruction or goal that the agent
131
- * works on, such as filling out a form, extracting data, or navigating to specific
132
- * pages.
133
- *
134
- * Returns:
135
- *
136
- * - A paginated list of Browser Use Agent tasks
137
- * - Total count of Browser Use Agent tasks
138
- * - Page information for navigation
139
- */
140
- list(query = {}, options) {
141
- return this._client.get('/tasks', { query, ...options });
142
- }
143
- /**
144
- * Get a download URL for the execution logs of an AI agent task.
145
- *
146
- * Task logs contain detailed information about how the AI agent executed the task,
147
- * including:
148
- *
149
- * - Step-by-step reasoning and decisions
150
- * - Actions taken on web pages
151
- * - Error messages and debugging information
152
- * - Performance metrics and timing data
153
- *
154
- * This is useful for:
155
- *
156
- * - Understanding how the agent solved the task
157
- * - Debugging failed or unexpected results
158
- * - Optimizing agent behavior and prompts
159
- * - Auditing agent actions for compliance
160
- *
161
- * Args:
162
- *
163
- * - task_id: The unique identifier of the agent task
164
- *
165
- * Returns:
166
- *
167
- * - A presigned download URL for the task log file
168
- *
169
- * Raises:
170
- *
171
- * - 404: If the user agent task doesn't exist
172
- * - 500: If the download URL cannot be generated (should not happen)
173
- */
174
- getLogs(taskID, options) {
175
- return this._client.get((0, path_1.path) `/tasks/${taskID}/logs`, options);
176
- }
177
- /**
178
- * Get a download URL for a specific output file generated by an AI agent task.
179
- *
180
- * AI agents can generate various output files during task execution, such as:
181
- *
182
- * - Screenshots of web pages
183
- * - Extracted data in CSV/JSON format
184
- * - Generated reports or documents
185
- * - Downloaded files from websites
186
- *
187
- * This endpoint provides a secure, time-limited download URL for accessing these
188
- * files. The URL expires after a short time for security.
189
- *
190
- * Args:
191
- *
192
- * - task_id: The unique identifier of the agent task
193
- * - file_id: The unique identifier of the output file
194
- *
195
- * Returns:
196
- *
197
- * - A presigned download URL for the requested file
198
- *
199
- * Raises:
200
- *
201
- * - 404: If the user agent task or output file doesn't exist
202
- * - 500: If the download URL cannot be generated (should not happen)
203
- */
204
- getOutputFile(fileID, params, options) {
205
- const { task_id } = params;
206
- return this._client.get((0, path_1.path) `/tasks/${task_id}/output-files/${fileID}`, options);
207
- }
208
- /**
209
- * Get a download URL for a specific user uploaded file that was used in the task.
210
- *
211
- * A user can upload files to their account file bucket and reference the name of
212
- * the file in a task. These files are then made available for the agent to use
213
- * during the agent task run.
214
- *
215
- * This endpoint provides a secure, time-limited download URL for accessing these
216
- * files. The URL expires after a short time for security.
217
- *
218
- * Args:
219
- *
220
- * - task_id: The unique identifier of the agent task
221
- * - file_id: The unique identifier of the user uploaded file
222
- *
223
- * Returns:
224
- *
225
- * - A presigned download URL for the requested file
226
- *
227
- * Raises:
228
- *
229
- * - 404: If the user agent task or user uploaded file doesn't exist
230
- * - 500: If the download URL cannot be generated (should not happen)
231
- */
232
- getUserUploadedFile(fileID, params, options) {
233
- const { task_id } = params;
234
- return this._client.get((0, path_1.path) `/tasks/${task_id}/user-uploaded-files/${fileID}`, options);
235
- }
236
- }
237
- exports.Tasks = Tasks;
238
- //# sourceMappingURL=tasks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tasks.js","sourceRoot":"","sources":["../src/resources/tasks.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAKtF,kDAA+C;AAE/C,oDAA8C;AAC9C,2CAKsB;AACtB,6CAAgD;AAChD,2CAAqD;AAErD,MAAa,KAAM,SAAQ,sBAAW;IAmDpC,MAAM,CACJ,IAA4D,EAC5D,OAAwB;QAExB,IAAI,QAAQ,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/E,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;YAE3B,MAAM,KAAK,GAAqB;gBAC9B,GAAG,IAAI;gBACP,oBAAoB,EAAE,IAAA,iCAAyB,EAAC,MAAM,CAAC;aACxD,CAAC;YAEF,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAClE,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IAiCD,QAAQ,CAAC,GAAiD,EAAE,OAAwB;QAClF,IAAI,OAAO,GAAG,KAAK,QAAQ,EA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AO,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,OAAO,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,aAAa,CACX,MAAc,EACd,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,iBAAiB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,mBAAmB,CACjB,MAAc,EACd,MAAqC,EACrC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,wBAAwB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;CACF;AAvXD,sBAuXC"}
@@ -1,234 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- import { path } from "../internal/utils/path.mjs";
4
- import { parseStructuredTaskOutput, stringifyStructuredOutput, } from "../lib/parse.mjs";
5
- import { getTaskViewHash } from "../lib/stream.mjs";
6
- import { ExhaustiveSwitchCheck } from "../lib/types.mjs";
7
- export class Tasks extends APIResource {
8
- create(body, options) {
9
- if ('schema' in body && body.schema != null && typeof body.schema === 'object') {
10
- const schema = body.schema;
11
- const _body = {
12
- ...body,
13
- structuredOutputJson: stringifyStructuredOutput(schema),
14
- };
15
- return this._client.post('/tasks', { body: _body, ...options });
16
- }
17
- return this._client.post('/tasks', { body, ...options });
18
- }
19
- retrieve(req, options) {
20
- if (typeof req === 'string') {
21
- return this._client.get(path `/tasks/${req}`, options);
22
- }
23
- const { taskId, schema } = req;
24
- return this._client
25
- .get(path `/tasks/${taskId}`, options)
26
- ._thenUnwrap((rsp) => parseStructuredTaskOutput(rsp, schema));
27
- }
28
- async *watch(taskId, config, options) {
29
- const hash = { current: null };
30
- poll: do {
31
- if (options?.signal?.aborted) {
32
- break poll;
33
- }
34
- const res = await this.retrieve(taskId);
35
- const resHash = getTaskViewHash(res);
36
- if (hash.current == null || resHash !== hash.current) {
37
- hash.current = resHash;
38
- yield { event: 'status', data: res };
39
- }
40
- switch (res.status) {
41
- case 'finished':
42
- case 'stopped':
43
- case 'paused':
44
- break poll;
45
- case 'started':
46
- await new Promise((resolve) => setTimeout(resolve, config.interval));
47
- break;
48
- default:
49
- throw new ExhaustiveSwitchCheck(res.status);
50
- }
51
- } while (true);
52
- }
53
- async *stream(body, options) {
54
- const taskId = typeof body === 'object' ? body.taskId : body;
55
- for await (const msg of this.watch(taskId, { interval: 500 }, options)) {
56
- if (options?.signal?.aborted) {
57
- break;
58
- }
59
- if (typeof body === 'object') {
60
- const parsed = parseStructuredTaskOutput(msg.data, body.schema);
61
- yield { event: 'status', data: parsed };
62
- }
63
- else {
64
- yield { event: 'status', data: msg.data };
65
- }
66
- }
67
- }
68
- run(body, options) {
69
- if ('schema' in body && body.schema != null && typeof body.schema === 'object') {
70
- return this.create(body, options)._thenUnwrap(async (data) => {
71
- const taskId = data.id;
72
- for await (const msg of this.stream({ taskId, schema: body.schema }, options)) {
73
- if (msg.data.status === 'finished') {
74
- return msg.data;
75
- }
76
- }
77
- throw new Error('Task did not finish');
78
- });
79
- }
80
- return this.create(body, options)._thenUnwrap(async (data) => {
81
- const taskId = data.id;
82
- for await (const msg of this.stream(taskId, options)) {
83
- if (msg.data.status === 'finished') {
84
- return msg.data;
85
- }
86
- }
87
- throw new Error('Task did not finish');
88
- });
89
- }
90
- /**
91
- * Control the execution of an AI agent task.
92
- *
93
- * Allows you to pause, resume, or stop tasks, and optionally stop the entire
94
- * session. This is useful for:
95
- *
96
- * - Pausing long-running tasks to review progress
97
- * - Stopping tasks that are taking too long
98
- * - Ending sessions when you're done with all tasks
99
- *
100
- * Available actions:
101
- *
102
- * - STOP: Stop the current task
103
- * - PAUSE: Pause the task (can be resumed later)
104
- * - RESUME: Resume a paused task
105
- * - STOP_TASK_AND_SESSION: Stop the task and end the entire session
106
- *
107
- * Args:
108
- *
109
- * - task_id: The unique identifier of the agent task to control
110
- * - request: The action to perform on the task
111
- *
112
- * Returns:
113
- *
114
- * - The updated task information
115
- *
116
- * Raises:
117
- *
118
- * - 404: If the user agent task doesn't exist
119
- */
120
- update(taskID, body, options) {
121
- return this._client.patch(path `/tasks/${taskID}`, { body, ...options });
122
- }
123
- /**
124
- * Get a paginated list of all Browser Use Agent tasks for the authenticated user.
125
- *
126
- * Browser Use Agent tasks are the individual jobs that your agents perform within
127
- * a session. Each task represents a specific instruction or goal that the agent
128
- * works on, such as filling out a form, extracting data, or navigating to specific
129
- * pages.
130
- *
131
- * Returns:
132
- *
133
- * - A paginated list of Browser Use Agent tasks
134
- * - Total count of Browser Use Agent tasks
135
- * - Page information for navigation
136
- */
137
- list(query = {}, options) {
138
- return this._client.get('/tasks', { query, ...options });
139
- }
140
- /**
141
- * Get a download URL for the execution logs of an AI agent task.
142
- *
143
- * Task logs contain detailed information about how the AI agent executed the task,
144
- * including:
145
- *
146
- * - Step-by-step reasoning and decisions
147
- * - Actions taken on web pages
148
- * - Error messages and debugging information
149
- * - Performance metrics and timing data
150
- *
151
- * This is useful for:
152
- *
153
- * - Understanding how the agent solved the task
154
- * - Debugging failed or unexpected results
155
- * - Optimizing agent behavior and prompts
156
- * - Auditing agent actions for compliance
157
- *
158
- * Args:
159
- *
160
- * - task_id: The unique identifier of the agent task
161
- *
162
- * Returns:
163
- *
164
- * - A presigned download URL for the task log file
165
- *
166
- * Raises:
167
- *
168
- * - 404: If the user agent task doesn't exist
169
- * - 500: If the download URL cannot be generated (should not happen)
170
- */
171
- getLogs(taskID, options) {
172
- return this._client.get(path `/tasks/${taskID}/logs`, options);
173
- }
174
- /**
175
- * Get a download URL for a specific output file generated by an AI agent task.
176
- *
177
- * AI agents can generate various output files during task execution, such as:
178
- *
179
- * - Screenshots of web pages
180
- * - Extracted data in CSV/JSON format
181
- * - Generated reports or documents
182
- * - Downloaded files from websites
183
- *
184
- * This endpoint provides a secure, time-limited download URL for accessing these
185
- * files. The URL expires after a short time for security.
186
- *
187
- * Args:
188
- *
189
- * - task_id: The unique identifier of the agent task
190
- * - file_id: The unique identifier of the output file
191
- *
192
- * Returns:
193
- *
194
- * - A presigned download URL for the requested file
195
- *
196
- * Raises:
197
- *
198
- * - 404: If the user agent task or output file doesn't exist
199
- * - 500: If the download URL cannot be generated (should not happen)
200
- */
201
- getOutputFile(fileID, params, options) {
202
- const { task_id } = params;
203
- return this._client.get(path `/tasks/${task_id}/output-files/${fileID}`, options);
204
- }
205
- /**
206
- * Get a download URL for a specific user uploaded file that was used in the task.
207
- *
208
- * A user can upload files to their account file bucket and reference the name of
209
- * the file in a task. These files are then made available for the agent to use
210
- * during the agent task run.
211
- *
212
- * This endpoint provides a secure, time-limited download URL for accessing these
213
- * files. The URL expires after a short time for security.
214
- *
215
- * Args:
216
- *
217
- * - task_id: The unique identifier of the agent task
218
- * - file_id: The unique identifier of the user uploaded file
219
- *
220
- * Returns:
221
- *
222
- * - A presigned download URL for the requested file
223
- *
224
- * Raises:
225
- *
226
- * - 404: If the user agent task or user uploaded file doesn't exist
227
- * - 500: If the download URL cannot be generated (should not happen)
228
- */
229
- getUserUploadedFile(fileID, params, options) {
230
- const { task_id } = params;
231
- return this._client.get(path `/tasks/${task_id}/user-uploaded-files/${fileID}`, options);
232
- }
233
- }
234
- //# sourceM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;;;;;;;;;;;OA0BG;IACH,aAAa,CACX,MAAc,EACd,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,iBAAiB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,mBAAmB,CACjB,MAAc,EACd,MAAqC,EACrC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,wBAAwB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;CACF"}
@@ -1,3 +0,0 @@
1
- export { Me, type MeRetrieveResponse } from "./me/index.mjs";
2
- export { Users } from "./users.mjs";
3
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/users/index.ts"],"names":[],"mappings":"OAEO,EAAE,EAAE,EAAE,KAAK,kBAAkB,EAAE;OAC/B,EAAE,KAAK,EAAE"}
@@ -1,3 +0,0 @@
1
- export { Me, type MeRetrieveResponse } from "./me/index.js";
2
- export { Users } from "./users.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/users/index.ts"],"names":[],"mappings":"OAEO,EAAE,EAAE,EAAE,KAAK,kBAAkB,EAAE;OAC/B,EAAE,KAAK,EAAE"}
@@ -1,9 +0,0 @@
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.Users = exports.Me = void 0;
5
- var index_1 = require("./me/index.js");
6
- Object.defineProperty(exports, "Me", { enumerable: true, get: function () { return index_1.Me; } });
7
- var users_1 = require("./users.js");
8
- Object.defineProperty(exports, "Users", { enumerable: true, get: function () { return users_1.Users; } });
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/users/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,uCAAyD;AAAhD,2FAAA,EAAE,OAAA;AACX,oCAAgC;AAAvB,8FAAA,KAAK,OAAA"}
@@ -1,4 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- export { Me } from "./me/index.mjs";
3
- export { Users } from "./users.mjs";
4
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/users/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,EAAE,EAA2B;OAC/B,EAAE,KAAK,EAAE"}
@@ -1,64 +0,0 @@
1
- import { APIResource } from "../../../core/resource.mjs";
2
- import { APIPromise } from "../../../core/api-promise.mjs";
3
- import { RequestOptions } from "../../../internal/request-options.mjs";
4
- export declare class Files extends APIResource {
5
- /**
6
- * Get a presigned URL for uploading files that AI agents can use during tasks.
7
- *
8
- * This endpoint generates a secure, time-limited upload URL that allows you to
9
- * upload files directly to our storage system. These files can then be referenced
10
- * in AI agent tasks for the agent to work with.
11
- *
12
- * Supported use cases:
13
- *
14
- * - Uploading documents for data extraction tasks
15
- * - Providing reference materials for agents
16
- * - Sharing files that agents need to process
17
- * - Including images or PDFs for analysis
18
- *
19
- * The upload URL expires after 2 minutes for security. Files are automatically
20
- * organized by user ID and can be referenced in task creation using the returned
21
- * file name.
22
- *
23
- * Args:
24
- *
25
- * - request: File upload details including name, content type, and size
26
- *
27
- * Returns:
28
- *
29
- * - Presigned upload URL and form fields for direct file upload
30
- *
31
- * Raises:
32
- *
33
- * - 400: If the content type is unsupported
34
- * - 500: If the upload URL generation fails (should not happen)
35
- */
36
- createPresignedURL(body: FileCreatePresignedURLParams, options?: RequestOptions): APIPromise<FileCreatePresignedURLResponse>;
37
- }
38
- /**
39
- * Response model for a presigned upload URL
40
- *
41
- * Attributes: url: The URL to upload the file to method: The HTTP method to use
42
- * for the upload fields: The form fields to include in the upload request
43
- * file_name: The name of the file to upload (should be referenced when user wants
44
- * to use the file in a task) expires_in: The number of seconds until the presigned
45
- * URL expires
46
- */
47
- export interface FileCreatePresignedURLResponse {
48
- expiresIn: number;
49
- fields: {
50
- [key: string]: string;
51
- };
52
- fileName: string;
53
- method: 'POST';
54
- url: string;
55
- }
56
- export interface FileCreatePresignedURLParams {
57
- contentType: 'image/jpg' | 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp' | 'image/svg+xml' | 'application/pdf' | 'application/msword' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'text/plain' | 'text/csv' | 'text/markdown';
58
- fileName: string;
59
- sizeBytes: number;
60
- }
61
- export declare namespace Files {
62
- export { type FileCreatePresignedURLResponse as FileCreatePresignedURLResponse, type FileCreatePresignedURLParams as FileCreatePresignedURLParams, };
63
- }
64
- //# sourceMappingURL=files.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../../../src/resources/users/me/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,kBAAkB,CAChB,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAG9C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAElC,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;IAEf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EACP,WAAW,GACX,YAAY,GACZ,WAAW,GACX,WAAW,GACX,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,oBAAoB,GACpB,yEAAyE,GACzE,0BAA0B,GAC1B,mEAAmE,GACnE,YAAY,GACZ,UAAU,GACV,eAAe,CAAC;IAEpB,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
@@ -1,64 +0,0 @@
1
- import { APIResource } from "../../../core/resource.js";
2
- import { APIPromise } from "../../../core/api-promise.js";
3
- import { RequestOptions } from "../../../internal/request-options.js";
4
- export declare class Files extends APIResource {
5
- /**
6
- * Get a presigned URL for uploading files that AI agents can use during tasks.
7
- *
8
- * This endpoint generates a secure, time-limited upload URL that allows you to
9
- * upload files directly to our storage system. These files can then be referenced
10
- * in AI agent tasks for the agent to work with.
11
- *
12
- * Supported use cases:
13
- *
14
- * - Uploading documents for data extraction tasks
15
- * - Providing reference materials for agents
16
- * - Sharing files that agents need to process
17
- * - Including images or PDFs for analysis
18
- *
19
- * The upload URL expires after 2 minutes for security. Files are automatically
20
- * organized by user ID and can be referenced in task creation using the returned
21
- * file name.
22
- *
23
- * Args:
24
- *
25
- * - request: File upload details including name, content type, and size
26
- *
27
- * Returns:
28
- *
29
- * - Presigned upload URL and form fields for direct file upload
30
- *
31
- * Raises:
32
- *
33
- * - 400: If the content type is unsupported
34
- * - 500: If the upload URL generation fails (should not happen)
35
- */
36
- createPresignedURL(body: FileCreatePresignedURLParams, options?: RequestOptions): APIPromise<FileCreatePresignedURLResponse>;
37
- }
38
- /**
39
- * Response model for a presigned upload URL
40
- *
41
- * Attributes: url: The URL to upload the file to method: The HTTP method to use
42
- * for the upload fields: The form fields to include in the upload request
43
- * file_name: The name of the file to upload (should be referenced when user wants
44
- * to use the file in a task) expires_in: The number of seconds until the presigned
45
- * URL expires
46
- */
47
- export interface FileCreatePresignedURLResponse {
48
- expiresIn: number;
49
- fields: {
50
- [key: string]: string;
51
- };
52
- fileName: string;
53
- method: 'POST';
54
- url: string;
55
- }
56
- export interface FileCreatePresignedURLParams {
57
- contentType: 'image/jpg' | 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp' | 'image/svg+xml' | 'application/pdf' | 'application/msword' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'text/plain' | 'text/csv' | 'text/markdown';
58
- fileName: string;
59
- sizeBytes: number;
60
- }
61
- export declare namespace Files {
62
- export { type FileCreatePresignedURLResponse as FileCreatePresignedURLResponse, type FileCreatePresignedURLParams as FileCreatePresignedURLParams, };
63
- }
64
- //# sourceMappingURL=files.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/resources/users/me/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,kBAAkB,CAChB,IAAI,EAAE,4BAA4B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAG9C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAElC,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;IAEf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EACP,WAAW,GACX,YAAY,GACZ,WAAW,GACX,WAAW,GACX,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,oBAAoB,GACpB,yEAAyE,GACzE,0BAA0B,GAC1B,mEAAmE,GACnE,YAAY,GACZ,UAAU,GACV,eAAe,CAAC;IAEpB,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}