browser-use-sdk 2.0.4 → 2.0.6

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 (632) hide show
  1. package/dist/cjs/BaseClient.d.ts +30 -0
  2. package/dist/cjs/BaseClient.js +3 -0
  3. package/dist/cjs/Client.d.ts +14 -28
  4. package/dist/cjs/Client.js +26 -18
  5. package/dist/cjs/api/errors/BadRequestError.d.ts +1 -4
  6. package/dist/cjs/api/errors/BadRequestError.js +1 -3
  7. package/dist/cjs/api/errors/ForbiddenError.d.ts +6 -0
  8. package/dist/cjs/api/errors/ForbiddenError.js +50 -0
  9. package/dist/cjs/api/errors/InternalServerError.d.ts +1 -4
  10. package/dist/cjs/api/errors/InternalServerError.js +1 -3
  11. package/dist/cjs/api/errors/NotFoundError.d.ts +1 -4
  12. package/dist/cjs/api/errors/NotFoundError.js +1 -3
  13. package/dist/cjs/api/errors/PaymentRequiredError.d.ts +2 -5
  14. package/dist/cjs/api/errors/PaymentRequiredError.js +1 -3
  15. package/dist/cjs/api/errors/TooManyRequestsError.d.ts +2 -5
  16. package/dist/cjs/api/errors/TooManyRequestsError.js +1 -3
  17. package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -4
  18. package/dist/cjs/api/errors/UnprocessableEntityError.js +1 -3
  19. package/dist/cjs/api/errors/index.d.ts +4 -3
  20. package/dist/cjs/api/errors/index.js +4 -3
  21. package/dist/cjs/api/index.d.ts +1 -1
  22. package/dist/cjs/api/index.js +1 -1
  23. package/dist/cjs/api/resources/billing/client/Client.d.ts +27 -0
  24. package/dist/cjs/api/resources/{accounts → billing}/client/Client.js +23 -20
  25. package/dist/cjs/api/resources/browsers/client/Client.d.ts +90 -0
  26. package/dist/cjs/api/resources/browsers/client/Client.js +374 -0
  27. package/dist/cjs/api/resources/browsers/client/index.d.ts +1 -0
  28. package/dist/cjs/api/resources/browsers/client/index.js +17 -0
  29. package/dist/cjs/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.ts +13 -0
  30. package/dist/cjs/api/resources/browsers/client/requests/CreateBrowserSessionRequest.js +3 -0
  31. package/dist/cjs/api/resources/browsers/client/requests/GetBrowserSessionBrowsersSessionIdGetRequest.d.ts +9 -0
  32. package/dist/cjs/api/resources/browsers/client/requests/GetBrowserSessionBrowsersSessionIdGetRequest.js +3 -0
  33. package/dist/cjs/api/resources/browsers/client/requests/ListBrowserSessionsBrowsersGetRequest.d.ts +10 -0
  34. package/dist/cjs/api/resources/browsers/client/requests/ListBrowserSessionsBrowsersGetRequest.js +3 -0
  35. package/dist/cjs/api/resources/browsers/client/requests/UpdateBrowserSessionRequest.d.ts +9 -0
  36. package/dist/cjs/api/resources/browsers/client/requests/UpdateBrowserSessionRequest.js +3 -0
  37. package/dist/cjs/api/resources/browsers/client/requests/index.d.ts +4 -0
  38. package/dist/cjs/api/resources/browsers/client/requests/index.js +2 -0
  39. package/dist/cjs/api/resources/browsers/index.d.ts +1 -0
  40. package/dist/cjs/api/resources/browsers/index.js +17 -0
  41. package/dist/cjs/api/resources/files/client/Client.d.ts +44 -38
  42. package/dist/cjs/api/resources/files/client/Client.js +125 -33
  43. package/dist/cjs/api/resources/files/client/index.d.ts +0 -1
  44. package/dist/cjs/api/resources/files/client/requests/AgentSessionUploadFilePresignedUrlFilesSessionsSessionIdPresignedUrlPostRequest.d.ts +16 -0
  45. package/dist/cjs/api/resources/files/client/requests/AgentSessionUploadFilePresignedUrlFilesSessionsSessionIdPresignedUrlPostRequest.js +3 -0
  46. package/dist/cjs/api/resources/files/client/requests/BrowserSessionUploadFilePresignedUrlFilesBrowsersSessionIdPresignedUrlPostRequest.d.ts +16 -0
  47. package/dist/cjs/api/resources/files/client/requests/BrowserSessionUploadFilePresignedUrlFilesBrowsersSessionIdPresignedUrlPostRequest.js +3 -0
  48. package/dist/cjs/api/resources/files/client/requests/GetTaskOutputFilePresignedUrlFilesTasksTaskIdOutputFilesFileIdGetRequest.d.ts +11 -0
  49. package/dist/cjs/api/resources/files/client/requests/GetTaskOutputFilePresignedUrlFilesTasksTaskIdOutputFilesFileIdGetRequest.js +3 -0
  50. package/dist/cjs/api/resources/files/client/requests/index.d.ts +3 -1
  51. package/dist/cjs/api/resources/index.d.ts +11 -6
  52. package/dist/cjs/api/resources/index.js +12 -7
  53. package/dist/cjs/api/resources/profiles/client/Client.d.ts +32 -32
  54. package/dist/cjs/api/resources/profiles/client/Client.js +137 -40
  55. package/dist/cjs/api/resources/profiles/client/index.d.ts +0 -1
  56. package/dist/cjs/api/resources/profiles/client/requests/DeleteBrowserProfileProfilesProfileIdDeleteRequest.d.ts +9 -0
  57. package/dist/cjs/api/resources/profiles/client/requests/DeleteBrowserProfileProfilesProfileIdDeleteRequest.js +3 -0
  58. package/dist/cjs/api/resources/profiles/client/requests/GetProfileProfilesProfileIdGetRequest.d.ts +9 -0
  59. package/dist/cjs/api/resources/profiles/client/requests/GetProfileProfilesProfileIdGetRequest.js +3 -0
  60. package/dist/cjs/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.d.ts +0 -3
  61. package/dist/cjs/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.js +1 -3
  62. package/dist/cjs/api/resources/profiles/client/requests/ProfileCreateRequest.d.ts +8 -0
  63. package/dist/cjs/api/resources/profiles/client/requests/ProfileCreateRequest.js +3 -0
  64. package/dist/cjs/api/resources/profiles/client/requests/ProfileUpdateRequest.d.ts +11 -0
  65. package/dist/cjs/api/resources/profiles/client/requests/ProfileUpdateRequest.js +3 -0
  66. package/dist/cjs/api/resources/profiles/client/requests/index.d.ts +5 -1
  67. package/dist/cjs/api/resources/sessions/client/Client.d.ts +28 -40
  68. package/dist/cjs/api/resources/sessions/client/Client.js +106 -69
  69. package/dist/cjs/api/resources/sessions/client/index.d.ts +0 -1
  70. package/dist/cjs/api/resources/sessions/client/requests/CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest.d.ts +9 -0
  71. package/dist/cjs/api/resources/sessions/client/requests/CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest.js +3 -0
  72. package/dist/cjs/api/resources/sessions/client/requests/CreateSessionRequest.d.ts +5 -6
  73. package/dist/cjs/api/resources/sessions/client/requests/CreateSessionRequest.js +1 -3
  74. package/dist/cjs/api/resources/sessions/client/requests/DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest.d.ts +9 -0
  75. package/dist/cjs/api/resources/sessions/client/requests/DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest.js +3 -0
  76. package/dist/cjs/api/resources/sessions/client/requests/GetSessionPublicShareSessionsSessionIdPublicShareGetRequest.d.ts +9 -0
  77. package/dist/cjs/api/resources/sessions/client/requests/GetSessionPublicShareSessionsSessionIdPublicShareGetRequest.js +3 -0
  78. package/dist/cjs/api/resources/sessions/client/requests/GetSessionSessionsSessionIdGetRequest.d.ts +9 -0
  79. package/dist/cjs/api/resources/sessions/client/requests/GetSessionSessionsSessionIdGetRequest.js +3 -0
  80. package/dist/cjs/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.d.ts +2 -5
  81. package/dist/cjs/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.js +1 -3
  82. package/dist/cjs/api/resources/sessions/client/requests/UpdateSessionRequest.d.ts +4 -4
  83. package/dist/cjs/api/resources/sessions/client/requests/UpdateSessionRequest.js +1 -3
  84. package/dist/cjs/api/resources/sessions/client/requests/index.d.ts +7 -3
  85. package/dist/cjs/api/resources/tasks/client/Client.d.ts +17 -34
  86. package/dist/cjs/api/resources/tasks/client/Client.js +81 -55
  87. package/dist/cjs/api/resources/tasks/client/index.d.ts +0 -1
  88. package/dist/cjs/api/resources/tasks/client/requests/CreateTaskRequest.d.ts +19 -14
  89. package/dist/cjs/api/resources/tasks/client/requests/CreateTaskRequest.js +1 -3
  90. package/dist/cjs/api/resources/tasks/client/requests/GetTaskLogsTasksTaskIdLogsGetRequest.d.ts +9 -0
  91. package/dist/cjs/api/resources/tasks/client/requests/GetTaskLogsTasksTaskIdLogsGetRequest.js +3 -0
  92. package/dist/cjs/api/resources/tasks/client/requests/GetTaskTasksTaskIdGetRequest.d.ts +9 -0
  93. package/dist/cjs/api/resources/tasks/client/requests/GetTaskTasksTaskIdGetRequest.js +3 -0
  94. package/dist/cjs/api/resources/tasks/client/requests/ListTasksTasksGetRequest.d.ts +5 -8
  95. package/dist/cjs/api/resources/tasks/client/requests/ListTasksTasksGetRequest.js +1 -3
  96. package/dist/cjs/api/resources/tasks/client/requests/UpdateTaskRequest.d.ts +3 -4
  97. package/dist/cjs/api/resources/tasks/client/requests/UpdateTaskRequest.js +1 -3
  98. package/dist/cjs/api/resources/tasks/client/requests/index.d.ts +5 -3
  99. package/dist/cjs/api/resources/workflows/client/Client.d.ts +221 -0
  100. package/dist/cjs/api/resources/workflows/client/Client.js +986 -0
  101. package/dist/cjs/api/resources/workflows/client/index.d.ts +1 -0
  102. package/dist/cjs/api/resources/workflows/client/index.js +17 -0
  103. package/dist/cjs/api/resources/workflows/client/requests/CancelExecutionWorkflowsExecutionsExecutionIdCancelPatchRequest.d.ts +9 -0
  104. package/dist/cjs/api/resources/workflows/client/requests/CancelExecutionWorkflowsExecutionsExecutionIdCancelPatchRequest.js +3 -0
  105. package/dist/cjs/api/resources/workflows/client/requests/DeleteWorkflowWorkflowsWorkflowIdDeleteRequest.d.ts +9 -0
  106. package/dist/cjs/api/resources/workflows/client/requests/DeleteWorkflowWorkflowsWorkflowIdDeleteRequest.js +3 -0
  107. package/dist/cjs/api/resources/workflows/client/requests/GetExecutionLogsWorkflowsExecutionsExecutionIdLogsGetRequest.d.ts +9 -0
  108. package/dist/cjs/api/resources/workflows/client/requests/GetExecutionLogsWorkflowsExecutionsExecutionIdLogsGetRequest.js +3 -0
  109. package/dist/cjs/api/resources/workflows/client/requests/GetExecutionWorkflowsExecutionsExecutionIdGetRequest.d.ts +9 -0
  110. package/dist/cjs/api/resources/workflows/client/requests/GetExecutionWorkflowsExecutionsExecutionIdGetRequest.js +3 -0
  111. package/dist/cjs/api/resources/workflows/client/requests/GetWorkflowWorkflowsWorkflowIdGetRequest.d.ts +9 -0
  112. package/dist/cjs/api/resources/workflows/client/requests/GetWorkflowWorkflowsWorkflowIdGetRequest.js +3 -0
  113. package/dist/cjs/api/resources/workflows/client/requests/ListAllExecutionsWorkflowsExecutionsGetRequest.d.ts +11 -0
  114. package/dist/cjs/api/resources/workflows/client/requests/ListAllExecutionsWorkflowsExecutionsGetRequest.js +3 -0
  115. package/dist/cjs/api/resources/workflows/client/requests/ListWorkflowExecutionsWorkflowsWorkflowIdExecutionsGetRequest.d.ts +14 -0
  116. package/dist/cjs/api/resources/workflows/client/requests/ListWorkflowExecutionsWorkflowsWorkflowIdExecutionsGetRequest.js +3 -0
  117. package/dist/cjs/api/resources/workflows/client/requests/ListWorkflowsWorkflowsGetRequest.d.ts +10 -0
  118. package/dist/cjs/api/resources/workflows/client/requests/ListWorkflowsWorkflowsGetRequest.js +3 -0
  119. package/dist/cjs/api/resources/workflows/client/requests/WorkflowCreateRequest.d.ts +14 -0
  120. package/dist/cjs/api/resources/workflows/client/requests/WorkflowCreateRequest.js +3 -0
  121. package/dist/cjs/api/resources/workflows/client/requests/WorkflowExecuteRequest.d.ts +16 -0
  122. package/dist/cjs/api/resources/workflows/client/requests/WorkflowExecuteRequest.js +3 -0
  123. package/dist/cjs/api/resources/workflows/client/requests/WorkflowGenerateRequest.d.ts +36 -0
  124. package/dist/cjs/api/resources/workflows/client/requests/WorkflowGenerateRequest.js +3 -0
  125. package/dist/cjs/api/resources/workflows/client/requests/WorkflowUpdateRequest.d.ts +15 -0
  126. package/dist/cjs/api/resources/workflows/client/requests/WorkflowUpdateRequest.js +3 -0
  127. package/dist/cjs/api/resources/workflows/client/requests/WorkflowYamlPresignedUploadRequest.d.ts +14 -0
  128. package/dist/cjs/api/resources/workflows/client/requests/WorkflowYamlPresignedUploadRequest.js +3 -0
  129. package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +13 -0
  130. package/dist/cjs/api/resources/workflows/client/requests/index.js +2 -0
  131. package/dist/cjs/api/resources/workflows/index.d.ts +2 -0
  132. package/dist/cjs/api/resources/workflows/index.js +18 -0
  133. package/dist/cjs/api/resources/workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.d.ts +2 -0
  134. package/dist/cjs/api/resources/workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.js +3 -0
  135. package/dist/cjs/api/resources/workflows/types/index.d.ts +1 -0
  136. package/dist/cjs/api/resources/workflows/types/index.js +17 -0
  137. package/dist/cjs/api/types/AccountNotFoundError.d.ts +0 -3
  138. package/dist/cjs/api/types/AccountNotFoundError.js +1 -3
  139. package/dist/cjs/api/types/AccountView.d.ts +11 -9
  140. package/dist/cjs/api/types/AccountView.js +1 -3
  141. package/dist/cjs/api/types/BadRequestErrorBody.d.ts +1 -4
  142. package/dist/cjs/api/types/BadRequestErrorBody.js +1 -3
  143. package/dist/cjs/api/types/BrowserSessionItemView.d.ts +20 -0
  144. package/dist/cjs/api/types/BrowserSessionItemView.js +3 -0
  145. package/dist/cjs/api/types/BrowserSessionListResponse.d.ts +14 -0
  146. package/dist/cjs/api/types/BrowserSessionListResponse.js +3 -0
  147. package/dist/cjs/api/types/BrowserSessionStatus.d.ts +12 -0
  148. package/dist/cjs/api/types/BrowserSessionStatus.js +15 -0
  149. package/dist/cjs/api/types/BrowserSessionUpdateAction.d.ts +7 -0
  150. package/dist/cjs/api/types/BrowserSessionUpdateAction.js +3 -0
  151. package/dist/cjs/api/types/BrowserSessionView.d.ts +20 -0
  152. package/dist/cjs/api/types/BrowserSessionView.js +3 -0
  153. package/dist/cjs/api/types/DownloadUrlGenerationError.d.ts +0 -3
  154. package/dist/cjs/api/types/DownloadUrlGenerationError.js +1 -3
  155. package/dist/cjs/api/types/ExecutionMode.d.ts +12 -0
  156. package/dist/cjs/api/types/ExecutionMode.js +15 -0
  157. package/dist/cjs/api/types/FileView.d.ts +0 -3
  158. package/dist/cjs/api/types/FileView.js +1 -3
  159. package/dist/cjs/api/types/HttpValidationError.d.ts +1 -4
  160. package/dist/cjs/api/types/HttpValidationError.js +1 -3
  161. package/dist/cjs/api/types/InsufficientCreditsError.d.ts +0 -3
  162. package/dist/cjs/api/types/InsufficientCreditsError.js +1 -3
  163. package/dist/cjs/api/types/InternalServerErrorBody.d.ts +0 -3
  164. package/dist/cjs/api/types/InternalServerErrorBody.js +1 -3
  165. package/dist/cjs/api/types/NotFoundErrorBody.d.ts +1 -4
  166. package/dist/cjs/api/types/NotFoundErrorBody.js +1 -3
  167. package/dist/cjs/api/types/OutputFileNotFoundError.d.ts +0 -3
  168. package/dist/cjs/api/types/OutputFileNotFoundError.js +1 -3
  169. package/dist/cjs/api/types/PlanInfo.d.ts +15 -0
  170. package/dist/cjs/api/types/PlanInfo.js +3 -0
  171. package/dist/cjs/api/types/ProfileListResponse.d.ts +1 -4
  172. package/dist/cjs/api/types/ProfileListResponse.js +1 -3
  173. package/dist/cjs/api/types/ProfileNotFoundError.d.ts +0 -3
  174. package/dist/cjs/api/types/ProfileNotFoundError.js +1 -3
  175. package/dist/cjs/api/types/ProfileView.d.ts +5 -4
  176. package/dist/cjs/api/types/ProfileView.js +1 -3
  177. package/dist/cjs/api/types/ProxyCountryCode.d.ts +244 -10
  178. package/dist/cjs/api/types/ProxyCountryCode.js +244 -9
  179. package/dist/cjs/api/types/SessionHasRunningTaskError.d.ts +0 -3
  180. package/dist/cjs/api/types/SessionHasRunningTaskError.js +1 -3
  181. package/dist/cjs/api/types/SessionItemView.d.ts +3 -6
  182. package/dist/cjs/api/types/SessionItemView.js +1 -3
  183. package/dist/cjs/api/types/SessionListResponse.d.ts +1 -4
  184. package/dist/cjs/api/types/SessionListResponse.js +1 -3
  185. package/dist/cjs/api/types/SessionNotFoundError.d.ts +0 -3
  186. package/dist/cjs/api/types/SessionNotFoundError.js +1 -3
  187. package/dist/cjs/api/types/SessionStatus.d.ts +1 -4
  188. package/dist/cjs/api/types/SessionStatus.js +8 -3
  189. package/dist/cjs/api/types/SessionStoppedError.d.ts +0 -3
  190. package/dist/cjs/api/types/SessionStoppedError.js +1 -3
  191. package/dist/cjs/api/types/SessionTimeoutLimitExceededError.d.ts +6 -0
  192. package/dist/cjs/api/types/SessionTimeoutLimitExceededError.js +3 -0
  193. package/dist/cjs/api/types/SessionUpdateAction.d.ts +0 -3
  194. package/dist/cjs/api/types/SessionUpdateAction.js +1 -3
  195. package/dist/cjs/api/types/SessionView.d.ts +4 -7
  196. package/dist/cjs/api/types/SessionView.js +1 -3
  197. package/dist/cjs/api/types/ShareNotFoundError.d.ts +0 -3
  198. package/dist/cjs/api/types/ShareNotFoundError.js +1 -3
  199. package/dist/cjs/api/types/ShareView.d.ts +1 -4
  200. package/dist/cjs/api/types/ShareView.js +1 -3
  201. package/dist/cjs/api/types/SupportedLlMs.d.ts +5 -4
  202. package/dist/cjs/api/types/SupportedLlMs.js +5 -3
  203. package/dist/cjs/api/types/TaskCreatedResponse.d.ts +2 -3
  204. package/dist/cjs/api/types/TaskCreatedResponse.js +1 -3
  205. package/dist/cjs/api/types/TaskItemView.d.ts +9 -10
  206. package/dist/cjs/api/types/TaskItemView.js +1 -3
  207. package/dist/cjs/api/types/TaskListResponse.d.ts +1 -4
  208. package/dist/cjs/api/types/TaskListResponse.js +1 -3
  209. package/dist/cjs/api/types/TaskLogFileResponse.d.ts +0 -3
  210. package/dist/cjs/api/types/TaskLogFileResponse.js +1 -3
  211. package/dist/cjs/api/types/TaskNotFoundError.d.ts +0 -3
  212. package/dist/cjs/api/types/TaskNotFoundError.js +1 -3
  213. package/dist/cjs/api/types/TaskOutputFileResponse.d.ts +0 -3
  214. package/dist/cjs/api/types/TaskOutputFileResponse.js +1 -3
  215. package/dist/cjs/api/types/TaskStatus.d.ts +3 -6
  216. package/dist/cjs/api/types/TaskStatus.js +11 -4
  217. package/dist/cjs/api/types/TaskStepView.d.ts +1 -4
  218. package/dist/cjs/api/types/TaskStepView.js +1 -3
  219. package/dist/cjs/api/types/TaskUpdateAction.d.ts +1 -8
  220. package/dist/cjs/api/types/TaskUpdateAction.js +8 -5
  221. package/dist/cjs/api/types/TaskView.d.ts +9 -10
  222. package/dist/cjs/api/types/TaskView.js +1 -3
  223. package/dist/cjs/api/types/TooManyConcurrentActiveSessionsError.d.ts +0 -3
  224. package/dist/cjs/api/types/TooManyConcurrentActiveSessionsError.js +1 -3
  225. package/dist/cjs/api/types/UnsupportedContentTypeError.d.ts +0 -3
  226. package/dist/cjs/api/types/UnsupportedContentTypeError.js +1 -3
  227. package/dist/cjs/api/types/UploadFilePresignedUrlResponse.d.ts +0 -3
  228. package/dist/cjs/api/types/UploadFilePresignedUrlResponse.js +1 -3
  229. package/dist/cjs/api/{resources/files/client/requests → types}/UploadFileRequest.d.ts +3 -13
  230. package/dist/cjs/api/{resources/files/client/requests → types}/UploadFileRequest.js +2 -3
  231. package/dist/cjs/api/types/ValidationError.d.ts +0 -3
  232. package/dist/cjs/api/types/ValidationError.js +1 -3
  233. package/dist/cjs/api/types/WorkflowExecutionCreatedResponse.d.ts +12 -0
  234. package/dist/cjs/api/types/WorkflowExecutionCreatedResponse.js +3 -0
  235. package/dist/cjs/api/types/WorkflowExecutionItemView.d.ts +28 -0
  236. package/dist/cjs/api/types/WorkflowExecutionItemView.js +3 -0
  237. package/dist/cjs/api/types/WorkflowExecutionListResponse.d.ts +14 -0
  238. package/dist/cjs/api/types/WorkflowExecutionListResponse.js +3 -0
  239. package/dist/cjs/api/types/WorkflowExecutionLogResponse.d.ts +7 -0
  240. package/dist/cjs/api/types/WorkflowExecutionLogResponse.js +3 -0
  241. package/dist/cjs/api/types/WorkflowExecutionResponse.d.ts +38 -0
  242. package/dist/cjs/api/types/WorkflowExecutionResponse.js +3 -0
  243. package/dist/cjs/api/types/WorkflowExecutionStatus.d.ts +18 -0
  244. package/dist/cjs/api/types/WorkflowExecutionStatus.js +21 -0
  245. package/dist/cjs/api/types/WorkflowGenerateResponse.d.ts +11 -0
  246. package/dist/cjs/api/types/WorkflowGenerateResponse.js +3 -0
  247. package/dist/cjs/api/types/WorkflowGenerationStatus.d.ts +8 -0
  248. package/dist/cjs/api/types/WorkflowGenerationStatus.js +11 -0
  249. package/dist/cjs/api/types/WorkflowItemView.d.ts +19 -0
  250. package/dist/cjs/api/types/WorkflowItemView.js +3 -0
  251. package/dist/cjs/api/types/WorkflowListResponse.d.ts +14 -0
  252. package/dist/cjs/api/types/WorkflowListResponse.js +3 -0
  253. package/dist/cjs/api/types/WorkflowResponse.d.ts +38 -0
  254. package/dist/cjs/api/types/WorkflowResponse.js +3 -0
  255. package/dist/cjs/api/types/WorkflowYamlPresignedUploadResponse.d.ts +15 -0
  256. package/dist/cjs/api/types/WorkflowYamlPresignedUploadResponse.js +3 -0
  257. package/dist/cjs/api/types/index.d.ts +23 -2
  258. package/dist/cjs/api/types/index.js +23 -2
  259. package/dist/cjs/core/exports.d.ts +1 -0
  260. package/dist/cjs/core/exports.js +17 -0
  261. package/dist/cjs/core/fetcher/APIResponse.d.ts +1 -1
  262. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
  263. package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
  264. package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
  265. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
  266. package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
  267. package/dist/cjs/core/fetcher/Fetcher.d.ts +9 -4
  268. package/dist/cjs/core/fetcher/Fetcher.js +205 -10
  269. package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +1 -1
  270. package/dist/cjs/core/fetcher/getErrorResponseBody.js +2 -1
  271. package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
  272. package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
  273. package/dist/cjs/core/fetcher/getResponseBody.js +3 -3
  274. package/dist/cjs/core/fetcher/index.d.ts +2 -0
  275. package/dist/cjs/core/fetcher/index.js +3 -1
  276. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
  277. package/dist/cjs/core/fetcher/makeRequest.js +2 -4
  278. package/dist/cjs/core/fetcher/requestWithRetries.js +35 -8
  279. package/dist/cjs/core/fetcher/signals.d.ts +0 -6
  280. package/dist/cjs/core/fetcher/signals.js +0 -12
  281. package/dist/cjs/core/headers.d.ts +2 -3
  282. package/dist/cjs/core/headers.js +6 -4
  283. package/dist/cjs/core/index.d.ts +1 -0
  284. package/dist/cjs/core/index.js +2 -1
  285. package/dist/cjs/core/logging/exports.d.ts +18 -0
  286. package/dist/cjs/core/logging/exports.js +45 -0
  287. package/dist/cjs/core/logging/index.d.ts +1 -0
  288. package/dist/cjs/core/logging/index.js +17 -0
  289. package/dist/cjs/core/logging/logger.d.ts +126 -0
  290. package/dist/cjs/core/logging/logger.js +144 -0
  291. package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
  292. package/dist/cjs/core/url/encodePathParam.js +21 -0
  293. package/dist/cjs/core/url/index.d.ts +1 -0
  294. package/dist/cjs/core/url/index.js +3 -1
  295. package/dist/cjs/core/url/join.js +3 -4
  296. package/dist/cjs/environments.d.ts +0 -3
  297. package/dist/cjs/environments.js +1 -3
  298. package/dist/cjs/errors/BrowserUseError.d.ts +1 -4
  299. package/dist/cjs/errors/BrowserUseError.js +2 -4
  300. package/dist/cjs/errors/BrowserUseTimeoutError.d.ts +0 -3
  301. package/dist/cjs/errors/BrowserUseTimeoutError.js +1 -3
  302. package/dist/cjs/exports.d.ts +1 -0
  303. package/dist/cjs/exports.js +17 -0
  304. package/dist/cjs/version.d.ts +1 -1
  305. package/dist/cjs/version.js +1 -1
  306. package/dist/cjs/wrapper/api/BrowserUseTasks.d.ts +2 -2
  307. package/dist/cjs/wrapper/api/BrowserUseTasks.js +3 -3
  308. package/dist/cjs/wrapper/lib/parse.js +5 -18
  309. package/dist/cjs/wrapper/lib/webhooks.d.ts +24 -4
  310. package/dist/cjs/wrapper/lib/webhooks.js +2 -2
  311. package/dist/esm/BaseClient.d.mts +30 -0
  312. package/dist/esm/BaseClient.mjs +2 -0
  313. package/dist/esm/Client.d.mts +14 -28
  314. package/dist/esm/Client.mjs +21 -13
  315. package/dist/esm/api/errors/BadRequestError.d.mts +1 -4
  316. package/dist/esm/api/errors/BadRequestError.mjs +1 -3
  317. package/dist/esm/api/errors/ForbiddenError.d.mts +6 -0
  318. package/dist/esm/api/errors/ForbiddenError.mjs +13 -0
  319. package/dist/esm/api/errors/InternalServerError.d.mts +1 -4
  320. package/dist/esm/api/errors/InternalServerError.mjs +1 -3
  321. package/dist/esm/api/errors/NotFoundError.d.mts +1 -4
  322. package/dist/esm/api/errors/NotFoundError.mjs +1 -3
  323. package/dist/esm/api/errors/PaymentRequiredError.d.mts +2 -5
  324. package/dist/esm/api/errors/PaymentRequiredError.mjs +1 -3
  325. package/dist/esm/api/errors/TooManyRequestsError.d.mts +2 -5
  326. package/dist/esm/api/errors/TooManyRequestsError.mjs +1 -3
  327. package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -4
  328. package/dist/esm/api/errors/UnprocessableEntityError.mjs +1 -3
  329. package/dist/esm/api/errors/index.d.mts +4 -3
  330. package/dist/esm/api/errors/index.mjs +4 -3
  331. package/dist/esm/api/index.d.mts +1 -1
  332. package/dist/esm/api/index.mjs +1 -1
  333. package/dist/esm/api/resources/billing/client/Client.d.mts +27 -0
  334. package/dist/esm/api/resources/{accounts → billing}/client/Client.mjs +21 -18
  335. package/dist/esm/api/resources/browsers/client/Client.d.mts +90 -0
  336. package/dist/esm/api/resources/browsers/client/Client.mjs +337 -0
  337. package/dist/esm/api/resources/browsers/client/index.d.mts +1 -0
  338. package/dist/esm/api/resources/browsers/client/index.mjs +1 -0
  339. package/dist/esm/api/resources/browsers/client/requests/CreateBrowserSessionRequest.d.mts +13 -0
  340. package/dist/esm/api/resources/browsers/client/requests/CreateBrowserSessionRequest.mjs +2 -0
  341. package/dist/esm/api/resources/browsers/client/requests/GetBrowserSessionBrowsersSessionIdGetRequest.d.mts +9 -0
  342. package/dist/esm/api/resources/browsers/client/requests/GetBrowserSessionBrowsersSessionIdGetRequest.mjs +2 -0
  343. package/dist/esm/api/resources/browsers/client/requests/ListBrowserSessionsBrowsersGetRequest.d.mts +10 -0
  344. package/dist/esm/api/resources/browsers/client/requests/ListBrowserSessionsBrowsersGetRequest.mjs +2 -0
  345. package/dist/esm/api/resources/browsers/client/requests/UpdateBrowserSessionRequest.d.mts +9 -0
  346. package/dist/esm/api/resources/browsers/client/requests/UpdateBrowserSessionRequest.mjs +2 -0
  347. package/dist/esm/api/resources/browsers/client/requests/index.d.mts +4 -0
  348. package/dist/esm/api/resources/browsers/client/requests/index.mjs +1 -0
  349. package/dist/esm/api/resources/browsers/index.d.mts +1 -0
  350. package/dist/esm/api/resources/browsers/index.mjs +1 -0
  351. package/dist/esm/api/resources/files/client/Client.d.mts +44 -38
  352. package/dist/esm/api/resources/files/client/Client.mjs +125 -33
  353. package/dist/esm/api/resources/files/client/index.d.mts +0 -1
  354. package/dist/esm/api/resources/files/client/requests/AgentSessionUploadFilePresignedUrlFilesSessionsSessionIdPresignedUrlPostRequest.d.mts +16 -0
  355. package/dist/esm/api/resources/files/client/requests/AgentSessionUploadFilePresignedUrlFilesSessionsSessionIdPresignedUrlPostRequest.mjs +2 -0
  356. package/dist/esm/api/resources/files/client/requests/BrowserSessionUploadFilePresignedUrlFilesBrowsersSessionIdPresignedUrlPostRequest.d.mts +16 -0
  357. package/dist/esm/api/resources/files/client/requests/BrowserSessionUploadFilePresignedUrlFilesBrowsersSessionIdPresignedUrlPostRequest.mjs +2 -0
  358. package/dist/esm/api/resources/files/client/requests/GetTaskOutputFilePresignedUrlFilesTasksTaskIdOutputFilesFileIdGetRequest.d.mts +11 -0
  359. package/dist/esm/api/resources/files/client/requests/GetTaskOutputFilePresignedUrlFilesTasksTaskIdOutputFilesFileIdGetRequest.mjs +2 -0
  360. package/dist/esm/api/resources/files/client/requests/index.d.mts +3 -1
  361. package/dist/esm/api/resources/index.d.mts +11 -6
  362. package/dist/esm/api/resources/index.mjs +11 -6
  363. package/dist/esm/api/resources/profiles/client/Client.d.mts +32 -32
  364. package/dist/esm/api/resources/profiles/client/Client.mjs +137 -40
  365. package/dist/esm/api/resources/profiles/client/index.d.mts +0 -1
  366. package/dist/esm/api/resources/profiles/client/requests/DeleteBrowserProfileProfilesProfileIdDeleteRequest.d.mts +9 -0
  367. package/dist/esm/api/resources/profiles/client/requests/DeleteBrowserProfileProfilesProfileIdDeleteRequest.mjs +2 -0
  368. package/dist/esm/api/resources/profiles/client/requests/GetProfileProfilesProfileIdGetRequest.d.mts +9 -0
  369. package/dist/esm/api/resources/profiles/client/requests/GetProfileProfilesProfileIdGetRequest.mjs +2 -0
  370. package/dist/esm/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.d.mts +0 -3
  371. package/dist/esm/api/resources/profiles/client/requests/ListProfilesProfilesGetRequest.mjs +1 -3
  372. package/dist/esm/api/resources/profiles/client/requests/ProfileCreateRequest.d.mts +8 -0
  373. package/dist/esm/api/resources/profiles/client/requests/ProfileCreateRequest.mjs +2 -0
  374. package/dist/esm/api/resources/profiles/client/requests/ProfileUpdateRequest.d.mts +11 -0
  375. package/dist/esm/api/resources/profiles/client/requests/ProfileUpdateRequest.mjs +2 -0
  376. package/dist/esm/api/resources/profiles/client/requests/index.d.mts +5 -1
  377. package/dist/esm/api/resources/sessions/client/Client.d.mts +28 -40
  378. package/dist/esm/api/resources/sessions/client/Client.mjs +106 -69
  379. package/dist/esm/api/resources/sessions/client/index.d.mts +0 -1
  380. package/dist/esm/api/resources/sessions/client/requests/CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest.d.mts +9 -0
  381. package/dist/esm/api/resources/sessions/client/requests/CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest.mjs +2 -0
  382. package/dist/esm/api/resources/sessions/client/requests/CreateSessionRequest.d.mts +5 -6
  383. package/dist/esm/api/resources/sessions/client/requests/CreateSessionRequest.mjs +1 -3
  384. package/dist/esm/api/resources/sessions/client/requests/DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest.d.mts +9 -0
  385. package/dist/esm/api/resources/sessions/client/requests/DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest.mjs +2 -0
  386. package/dist/esm/api/resources/sessions/client/requests/GetSessionPublicShareSessionsSessionIdPublicShareGetRequest.d.mts +9 -0
  387. package/dist/esm/api/resources/sessions/client/requests/GetSessionPublicShareSessionsSessionIdPublicShareGetRequest.mjs +2 -0
  388. package/dist/esm/api/resources/sessions/client/requests/GetSessionSessionsSessionIdGetRequest.d.mts +9 -0
  389. package/dist/esm/api/resources/sessions/client/requests/GetSessionSessionsSessionIdGetRequest.mjs +2 -0
  390. package/dist/esm/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.d.mts +2 -5
  391. package/dist/esm/api/resources/sessions/client/requests/ListSessionsSessionsGetRequest.mjs +1 -3
  392. package/dist/esm/api/resources/sessions/client/requests/UpdateSessionRequest.d.mts +4 -4
  393. package/dist/esm/api/resources/sessions/client/requests/UpdateSessionRequest.mjs +1 -3
  394. package/dist/esm/api/resources/sessions/client/requests/index.d.mts +7 -3
  395. package/dist/esm/api/resources/tasks/client/Client.d.mts +17 -34
  396. package/dist/esm/api/resources/tasks/client/Client.mjs +81 -55
  397. package/dist/esm/api/resources/tasks/client/index.d.mts +0 -1
  398. package/dist/esm/api/resources/tasks/client/requests/CreateTaskRequest.d.mts +19 -14
  399. package/dist/esm/api/resources/tasks/client/requests/CreateTaskRequest.mjs +1 -3
  400. package/dist/esm/api/resources/tasks/client/requests/GetTaskLogsTasksTaskIdLogsGetRequest.d.mts +9 -0
  401. package/dist/esm/api/resources/tasks/client/requests/GetTaskLogsTasksTaskIdLogsGetRequest.mjs +2 -0
  402. package/dist/esm/api/resources/tasks/client/requests/GetTaskTasksTaskIdGetRequest.d.mts +9 -0
  403. package/dist/esm/api/resources/tasks/client/requests/GetTaskTasksTaskIdGetRequest.mjs +2 -0
  404. package/dist/esm/api/resources/tasks/client/requests/ListTasksTasksGetRequest.d.mts +5 -8
  405. package/dist/esm/api/resources/tasks/client/requests/ListTasksTasksGetRequest.mjs +1 -3
  406. package/dist/esm/api/resources/tasks/client/requests/UpdateTaskRequest.d.mts +3 -4
  407. package/dist/esm/api/resources/tasks/client/requests/UpdateTaskRequest.mjs +1 -3
  408. package/dist/esm/api/resources/tasks/client/requests/index.d.mts +5 -3
  409. package/dist/esm/api/resources/workflows/client/Client.d.mts +221 -0
  410. package/dist/esm/api/resources/workflows/client/Client.mjs +949 -0
  411. package/dist/esm/api/resources/workflows/client/index.d.mts +1 -0
  412. package/dist/esm/api/resources/workflows/client/index.mjs +1 -0
  413. package/dist/esm/api/resources/workflows/client/requests/CancelExecutionWorkflowsExecutionsExecutionIdCancelPatchRequest.d.mts +9 -0
  414. package/dist/esm/api/resources/workflows/client/requests/CancelExecutionWorkflowsExecutionsExecutionIdCancelPatchRequest.mjs +2 -0
  415. package/dist/esm/api/resources/workflows/client/requests/DeleteWorkflowWorkflowsWorkflowIdDeleteRequest.d.mts +9 -0
  416. package/dist/esm/api/resources/workflows/client/requests/DeleteWorkflowWorkflowsWorkflowIdDeleteRequest.mjs +2 -0
  417. package/dist/esm/api/resources/workflows/client/requests/GetExecutionLogsWorkflowsExecutionsExecutionIdLogsGetRequest.d.mts +9 -0
  418. package/dist/esm/api/resources/workflows/client/requests/GetExecutionLogsWorkflowsExecutionsExecutionIdLogsGetRequest.mjs +2 -0
  419. package/dist/esm/api/resources/workflows/client/requests/GetExecutionWorkflowsExecutionsExecutionIdGetRequest.d.mts +9 -0
  420. package/dist/esm/api/resources/workflows/client/requests/GetExecutionWorkflowsExecutionsExecutionIdGetRequest.mjs +2 -0
  421. package/dist/esm/api/resources/workflows/client/requests/GetWorkflowWorkflowsWorkflowIdGetRequest.d.mts +9 -0
  422. package/dist/esm/api/resources/workflows/client/requests/GetWorkflowWorkflowsWorkflowIdGetRequest.mjs +2 -0
  423. package/dist/esm/api/resources/workflows/client/requests/ListAllExecutionsWorkflowsExecutionsGetRequest.d.mts +11 -0
  424. package/dist/esm/api/resources/workflows/client/requests/ListAllExecutionsWorkflowsExecutionsGetRequest.mjs +2 -0
  425. package/dist/esm/api/resources/workflows/client/requests/ListWorkflowExecutionsWorkflowsWorkflowIdExecutionsGetRequest.d.mts +14 -0
  426. package/dist/esm/api/resources/workflows/client/requests/ListWorkflowExecutionsWorkflowsWorkflowIdExecutionsGetRequest.mjs +2 -0
  427. package/dist/esm/api/resources/workflows/client/requests/ListWorkflowsWorkflowsGetRequest.d.mts +10 -0
  428. package/dist/esm/api/resources/workflows/client/requests/ListWorkflowsWorkflowsGetRequest.mjs +2 -0
  429. package/dist/esm/api/resources/workflows/client/requests/WorkflowCreateRequest.d.mts +14 -0
  430. package/dist/esm/api/resources/workflows/client/requests/WorkflowCreateRequest.mjs +2 -0
  431. package/dist/esm/api/resources/workflows/client/requests/WorkflowExecuteRequest.d.mts +16 -0
  432. package/dist/esm/api/resources/workflows/client/requests/WorkflowExecuteRequest.mjs +2 -0
  433. package/dist/esm/api/resources/workflows/client/requests/WorkflowGenerateRequest.d.mts +36 -0
  434. package/dist/esm/api/resources/workflows/client/requests/WorkflowGenerateRequest.mjs +2 -0
  435. package/dist/esm/api/resources/workflows/client/requests/WorkflowUpdateRequest.d.mts +15 -0
  436. package/dist/esm/api/resources/workflows/client/requests/WorkflowUpdateRequest.mjs +2 -0
  437. package/dist/esm/api/resources/workflows/client/requests/WorkflowYamlPresignedUploadRequest.d.mts +14 -0
  438. package/dist/esm/api/resources/workflows/client/requests/WorkflowYamlPresignedUploadRequest.mjs +2 -0
  439. package/dist/esm/api/resources/workflows/client/requests/index.d.mts +13 -0
  440. package/dist/esm/api/resources/workflows/client/requests/index.mjs +1 -0
  441. package/dist/esm/api/resources/workflows/index.d.mts +2 -0
  442. package/dist/esm/api/resources/workflows/index.mjs +2 -0
  443. package/dist/esm/api/resources/workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.d.mts +2 -0
  444. package/dist/esm/api/resources/workflows/types/ExecuteWorkflowWorkflowsWorkflowIdExecutePostResponse.mjs +2 -0
  445. package/dist/esm/api/resources/workflows/types/index.d.mts +1 -0
  446. package/dist/esm/api/resources/workflows/types/index.mjs +1 -0
  447. package/dist/esm/api/types/AccountNotFoundError.d.mts +0 -3
  448. package/dist/esm/api/types/AccountNotFoundError.mjs +1 -3
  449. package/dist/esm/api/types/AccountView.d.mts +11 -9
  450. package/dist/esm/api/types/AccountView.mjs +1 -3
  451. package/dist/esm/api/types/BadRequestErrorBody.d.mts +1 -4
  452. package/dist/esm/api/types/BadRequestErrorBody.mjs +1 -3
  453. package/dist/esm/api/types/BrowserSessionItemView.d.mts +20 -0
  454. package/dist/esm/api/types/BrowserSessionItemView.mjs +2 -0
  455. package/dist/esm/api/types/BrowserSessionListResponse.d.mts +14 -0
  456. package/dist/esm/api/types/BrowserSessionListResponse.mjs +2 -0
  457. package/dist/esm/api/types/BrowserSessionStatus.d.mts +12 -0
  458. package/dist/esm/api/types/BrowserSessionStatus.mjs +12 -0
  459. package/dist/esm/api/types/BrowserSessionUpdateAction.d.mts +7 -0
  460. package/dist/esm/api/types/BrowserSessionUpdateAction.mjs +2 -0
  461. package/dist/esm/api/types/BrowserSessionView.d.mts +20 -0
  462. package/dist/esm/api/types/BrowserSessionView.mjs +2 -0
  463. package/dist/esm/api/types/DownloadUrlGenerationError.d.mts +0 -3
  464. package/dist/esm/api/types/DownloadUrlGenerationError.mjs +1 -3
  465. package/dist/esm/api/types/ExecutionMode.d.mts +12 -0
  466. package/dist/esm/api/types/ExecutionMode.mjs +12 -0
  467. package/dist/esm/api/types/FileView.d.mts +0 -3
  468. package/dist/esm/api/types/FileView.mjs +1 -3
  469. package/dist/esm/api/types/HttpValidationError.d.mts +1 -4
  470. package/dist/esm/api/types/HttpValidationError.mjs +1 -3
  471. package/dist/esm/api/types/InsufficientCreditsError.d.mts +0 -3
  472. package/dist/esm/api/types/InsufficientCreditsError.mjs +1 -3
  473. package/dist/esm/api/types/InternalServerErrorBody.d.mts +0 -3
  474. package/dist/esm/api/types/InternalServerErrorBody.mjs +1 -3
  475. package/dist/esm/api/types/NotFoundErrorBody.d.mts +1 -4
  476. package/dist/esm/api/types/NotFoundErrorBody.mjs +1 -3
  477. package/dist/esm/api/types/OutputFileNotFoundError.d.mts +0 -3
  478. package/dist/esm/api/types/OutputFileNotFoundError.mjs +1 -3
  479. package/dist/esm/api/types/PlanInfo.d.mts +15 -0
  480. package/dist/esm/api/types/PlanInfo.mjs +2 -0
  481. package/dist/esm/api/types/ProfileListResponse.d.mts +1 -4
  482. package/dist/esm/api/types/ProfileListResponse.mjs +1 -3
  483. package/dist/esm/api/types/ProfileNotFoundError.d.mts +0 -3
  484. package/dist/esm/api/types/ProfileNotFoundError.mjs +1 -3
  485. package/dist/esm/api/types/ProfileView.d.mts +5 -4
  486. package/dist/esm/api/types/ProfileView.mjs +1 -3
  487. package/dist/esm/api/types/ProxyCountryCode.d.mts +244 -10
  488. package/dist/esm/api/types/ProxyCountryCode.mjs +244 -9
  489. package/dist/esm/api/types/SessionHasRunningTaskError.d.mts +0 -3
  490. package/dist/esm/api/types/SessionHasRunningTaskError.mjs +1 -3
  491. package/dist/esm/api/types/SessionItemView.d.mts +3 -6
  492. package/dist/esm/api/types/SessionItemView.mjs +1 -3
  493. package/dist/esm/api/types/SessionListResponse.d.mts +1 -4
  494. package/dist/esm/api/types/SessionListResponse.mjs +1 -3
  495. package/dist/esm/api/types/SessionNotFoundError.d.mts +0 -3
  496. package/dist/esm/api/types/SessionNotFoundError.mjs +1 -3
  497. package/dist/esm/api/types/SessionStatus.d.mts +1 -4
  498. package/dist/esm/api/types/SessionStatus.mjs +6 -1
  499. package/dist/esm/api/types/SessionStoppedError.d.mts +0 -3
  500. package/dist/esm/api/types/SessionStoppedError.mjs +1 -3
  501. package/dist/esm/api/types/SessionTimeoutLimitExceededError.d.mts +6 -0
  502. package/dist/esm/api/types/SessionTimeoutLimitExceededError.mjs +2 -0
  503. package/dist/esm/api/types/SessionUpdateAction.d.mts +0 -3
  504. package/dist/esm/api/types/SessionUpdateAction.mjs +1 -3
  505. package/dist/esm/api/types/SessionView.d.mts +4 -7
  506. package/dist/esm/api/types/SessionView.mjs +1 -3
  507. package/dist/esm/api/types/ShareNotFoundError.d.mts +0 -3
  508. package/dist/esm/api/types/ShareNotFoundError.mjs +1 -3
  509. package/dist/esm/api/types/ShareView.d.mts +1 -4
  510. package/dist/esm/api/types/ShareView.mjs +1 -3
  511. package/dist/esm/api/types/SupportedLlMs.d.mts +5 -4
  512. package/dist/esm/api/types/SupportedLlMs.mjs +5 -3
  513. package/dist/esm/api/types/TaskCreatedResponse.d.mts +2 -3
  514. package/dist/esm/api/types/TaskCreatedResponse.mjs +1 -3
  515. package/dist/esm/api/types/TaskItemView.d.mts +9 -10
  516. package/dist/esm/api/types/TaskItemView.mjs +1 -3
  517. package/dist/esm/api/types/TaskListResponse.d.mts +1 -4
  518. package/dist/esm/api/types/TaskListResponse.mjs +1 -3
  519. package/dist/esm/api/types/TaskLogFileResponse.d.mts +0 -3
  520. package/dist/esm/api/types/TaskLogFileResponse.mjs +1 -3
  521. package/dist/esm/api/types/TaskNotFoundError.d.mts +0 -3
  522. package/dist/esm/api/types/TaskNotFoundError.mjs +1 -3
  523. package/dist/esm/api/types/TaskOutputFileResponse.d.mts +0 -3
  524. package/dist/esm/api/types/TaskOutputFileResponse.mjs +1 -3
  525. package/dist/esm/api/types/TaskStatus.d.mts +3 -6
  526. package/dist/esm/api/types/TaskStatus.mjs +9 -2
  527. package/dist/esm/api/types/TaskStepView.d.mts +1 -4
  528. package/dist/esm/api/types/TaskStepView.mjs +1 -3
  529. package/dist/esm/api/types/TaskUpdateAction.d.mts +1 -8
  530. package/dist/esm/api/types/TaskUpdateAction.mjs +6 -3
  531. package/dist/esm/api/types/TaskView.d.mts +9 -10
  532. package/dist/esm/api/types/TaskView.mjs +1 -3
  533. package/dist/esm/api/types/TooManyConcurrentActiveSessionsError.d.mts +0 -3
  534. package/dist/esm/api/types/TooManyConcurrentActiveSessionsError.mjs +1 -3
  535. package/dist/esm/api/types/UnsupportedContentTypeError.d.mts +0 -3
  536. package/dist/esm/api/types/UnsupportedContentTypeError.mjs +1 -3
  537. package/dist/esm/api/types/UploadFilePresignedUrlResponse.d.mts +0 -3
  538. package/dist/esm/api/types/UploadFilePresignedUrlResponse.mjs +1 -3
  539. package/dist/esm/api/{resources/files/client/requests → types}/UploadFileRequest.d.mts +3 -13
  540. package/dist/esm/api/{resources/files/client/requests → types}/UploadFileRequest.mjs +2 -3
  541. package/dist/esm/api/types/ValidationError.d.mts +0 -3
  542. package/dist/esm/api/types/ValidationError.mjs +1 -3
  543. package/dist/esm/api/types/WorkflowExecutionCreatedResponse.d.mts +12 -0
  544. package/dist/esm/api/types/WorkflowExecutionCreatedResponse.mjs +2 -0
  545. package/dist/esm/api/types/WorkflowExecutionItemView.d.mts +28 -0
  546. package/dist/esm/api/types/WorkflowExecutionItemView.mjs +2 -0
  547. package/dist/esm/api/types/WorkflowExecutionListResponse.d.mts +14 -0
  548. package/dist/esm/api/types/WorkflowExecutionListResponse.mjs +2 -0
  549. package/dist/esm/api/types/WorkflowExecutionLogResponse.d.mts +7 -0
  550. package/dist/esm/api/types/WorkflowExecutionLogResponse.mjs +2 -0
  551. package/dist/esm/api/types/WorkflowExecutionResponse.d.mts +38 -0
  552. package/dist/esm/api/types/WorkflowExecutionResponse.mjs +2 -0
  553. package/dist/esm/api/types/WorkflowExecutionStatus.d.mts +18 -0
  554. package/dist/esm/api/types/WorkflowExecutionStatus.mjs +18 -0
  555. package/dist/esm/api/types/WorkflowGenerateResponse.d.mts +11 -0
  556. package/dist/esm/api/types/WorkflowGenerateResponse.mjs +2 -0
  557. package/dist/esm/api/types/WorkflowGenerationStatus.d.mts +8 -0
  558. package/dist/esm/api/types/WorkflowGenerationStatus.mjs +8 -0
  559. package/dist/esm/api/types/WorkflowItemView.d.mts +19 -0
  560. package/dist/esm/api/types/WorkflowItemView.mjs +2 -0
  561. package/dist/esm/api/types/WorkflowListResponse.d.mts +14 -0
  562. package/dist/esm/api/types/WorkflowListResponse.mjs +2 -0
  563. package/dist/esm/api/types/WorkflowResponse.d.mts +38 -0
  564. package/dist/esm/api/types/WorkflowResponse.mjs +2 -0
  565. package/dist/esm/api/types/WorkflowYamlPresignedUploadResponse.d.mts +15 -0
  566. package/dist/esm/api/types/WorkflowYamlPresignedUploadResponse.mjs +2 -0
  567. package/dist/esm/api/types/index.d.mts +23 -2
  568. package/dist/esm/api/types/index.mjs +23 -2
  569. package/dist/esm/core/exports.d.mts +1 -0
  570. package/dist/esm/core/exports.mjs +1 -0
  571. package/dist/esm/core/fetcher/APIResponse.d.mts +1 -1
  572. package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
  573. package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
  574. package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
  575. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
  576. package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
  577. package/dist/esm/core/fetcher/Fetcher.d.mts +9 -4
  578. package/dist/esm/core/fetcher/Fetcher.mjs +205 -10
  579. package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +1 -1
  580. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +2 -1
  581. package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
  582. package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
  583. package/dist/esm/core/fetcher/getResponseBody.mjs +3 -3
  584. package/dist/esm/core/fetcher/index.d.mts +2 -0
  585. package/dist/esm/core/fetcher/index.mjs +1 -0
  586. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
  587. package/dist/esm/core/fetcher/makeRequest.mjs +2 -4
  588. package/dist/esm/core/fetcher/requestWithRetries.mjs +35 -8
  589. package/dist/esm/core/fetcher/signals.d.mts +0 -6
  590. package/dist/esm/core/fetcher/signals.mjs +0 -12
  591. package/dist/esm/core/headers.d.mts +2 -3
  592. package/dist/esm/core/headers.mjs +6 -4
  593. package/dist/esm/core/index.d.mts +1 -0
  594. package/dist/esm/core/index.mjs +1 -0
  595. package/dist/esm/core/logging/exports.d.mts +18 -0
  596. package/dist/esm/core/logging/exports.mjs +9 -0
  597. package/dist/esm/core/logging/index.d.mts +1 -0
  598. package/dist/esm/core/logging/index.mjs +1 -0
  599. package/dist/esm/core/logging/logger.d.mts +126 -0
  600. package/dist/esm/core/logging/logger.mjs +138 -0
  601. package/dist/esm/core/url/encodePathParam.d.mts +1 -0
  602. package/dist/esm/core/url/encodePathParam.mjs +18 -0
  603. package/dist/esm/core/url/index.d.mts +1 -0
  604. package/dist/esm/core/url/index.mjs +1 -0
  605. package/dist/esm/core/url/join.mjs +3 -4
  606. package/dist/esm/environments.d.mts +0 -3
  607. package/dist/esm/environments.mjs +1 -3
  608. package/dist/esm/errors/BrowserUseError.d.mts +1 -4
  609. package/dist/esm/errors/BrowserUseError.mjs +2 -4
  610. package/dist/esm/errors/BrowserUseTimeoutError.d.mts +0 -3
  611. package/dist/esm/errors/BrowserUseTimeoutError.mjs +1 -3
  612. package/dist/esm/exports.d.mts +1 -0
  613. package/dist/esm/exports.mjs +1 -0
  614. package/dist/esm/version.d.mts +1 -1
  615. package/dist/esm/version.mjs +1 -1
  616. package/dist/esm/wrapper/api/BrowserUseTasks.d.mts +2 -2
  617. package/dist/esm/wrapper/api/BrowserUseTasks.mjs +4 -3
  618. package/dist/esm/wrapper/lib/parse.mjs +6 -19
  619. package/dist/esm/wrapper/lib/webhooks.d.mts +24 -4
  620. package/dist/esm/wrapper/lib/webhooks.mjs +2 -2
  621. package/package.json +15 -15
  622. package/reference.md +1434 -174
  623. package/dist/cjs/api/resources/accounts/client/Client.d.ts +0 -47
  624. package/dist/esm/api/resources/accounts/client/Client.d.mts +0 -47
  625. /package/dist/cjs/api/resources/{accounts → billing}/client/index.d.ts +0 -0
  626. /package/dist/cjs/api/resources/{accounts → billing}/client/index.js +0 -0
  627. /package/dist/cjs/api/resources/{accounts → billing}/index.d.ts +0 -0
  628. /package/dist/cjs/api/resources/{accounts → billing}/index.js +0 -0
  629. /package/dist/esm/api/resources/{accounts → billing}/client/index.d.mts +0 -0
  630. /package/dist/esm/api/resources/{accounts → billing}/client/index.mjs +0 -0
  631. /package/dist/esm/api/resources/{accounts → billing}/index.d.mts +0 -0
  632. /package/dist/esm/api/resources/{accounts → billing}/index.mjs +0 -0
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
2
+ // This file was auto-generated by Fern from our API Definition.
5
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
4
  if (k2 === undefined) k2 = k;
7
5
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -44,13 +42,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
42
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
43
  });
46
44
  };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
47
56
  Object.defineProperty(exports, "__esModule", { value: true });
48
57
  exports.Tasks = void 0;
49
- const environments = __importStar(require("../../../../environments.js"));
50
- const core = __importStar(require("../../../../core/index.js"));
51
- const BrowserUse = __importStar(require("../../../index.js"));
52
58
  const headers_js_1 = require("../../../../core/headers.js");
59
+ const core = __importStar(require("../../../../core/index.js"));
60
+ const environments = __importStar(require("../../../../environments.js"));
53
61
  const errors = __importStar(require("../../../../errors/index.js"));
62
+ const BrowserUse = __importStar(require("../../../index.js"));
54
63
  class Tasks {
55
64
  constructor(_options) {
56
65
  this._options = _options;
@@ -71,36 +80,38 @@ class Tasks {
71
80
  }
72
81
  __listTasks() {
73
82
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
74
- var _a, _b, _c;
83
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
75
84
  const { pageSize, pageNumber, sessionId, filterBy, after, before } = request;
76
85
  const _queryParams = {};
77
86
  if (pageSize != null) {
78
- _queryParams["pageSize"] = pageSize.toString();
87
+ _queryParams.pageSize = pageSize.toString();
79
88
  }
80
89
  if (pageNumber != null) {
81
- _queryParams["pageNumber"] = pageNumber.toString();
90
+ _queryParams.pageNumber = pageNumber.toString();
82
91
  }
83
- if (sessionId != null) {
84
- _queryParams["sessionId"] = sessionId;
92
+ if (sessionId !== undefined) {
93
+ _queryParams.sessionId = sessionId;
85
94
  }
86
- if (filterBy != null) {
87
- _queryParams["filterBy"] = filterBy;
95
+ if (filterBy !== undefined) {
96
+ _queryParams.filterBy = filterBy;
88
97
  }
89
- if (after != null) {
90
- _queryParams["after"] = after;
98
+ if (after !== undefined) {
99
+ _queryParams.after = after;
91
100
  }
92
- if (before != null) {
93
- _queryParams["before"] = before;
101
+ if (before !== undefined) {
102
+ _queryParams.before = before;
94
103
  }
95
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
104
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
96
105
  const _response = yield core.fetcher({
97
106
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, "tasks"),
98
107
  method: "GET",
99
108
  headers: _headers,
100
109
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
101
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
102
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
110
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
111
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
103
112
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
113
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
114
+ logging: this._options.logging,
104
115
  });
105
116
  if (_response.ok) {
106
117
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -157,8 +168,8 @@ class Tasks {
157
168
  }
158
169
  __createTask(request, requestOptions) {
159
170
  return __awaiter(this, void 0, void 0, function* () {
160
- var _a, _b, _c;
161
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
171
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
172
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
162
173
  const _response = yield core.fetcher({
163
174
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, "tasks"),
164
175
  method: "POST",
@@ -167,9 +178,11 @@ class Tasks {
167
178
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
168
179
  requestType: "json",
169
180
  body: request,
170
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
171
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
181
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
182
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
172
183
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
184
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
185
+ logging: this._options.logging,
173
186
  });
174
187
  if (_response.ok) {
175
188
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -212,30 +225,35 @@ class Tasks {
212
225
  /**
213
226
  * Get detailed task information including status, progress, steps, and file outputs.
214
227
  *
215
- * @param {string} taskId
228
+ * @param {BrowserUse.GetTaskTasksTaskIdGetRequest} request
216
229
  * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
217
230
  *
218
231
  * @throws {@link BrowserUse.NotFoundError}
219
232
  * @throws {@link BrowserUse.UnprocessableEntityError}
220
233
  *
221
234
  * @example
222
- * await client.tasks.getTask("task_id")
235
+ * await client.tasks.getTask({
236
+ * task_id: "task_id"
237
+ * })
223
238
  */
224
- getTask(taskId, requestOptions) {
225
- return core.HttpResponsePromise.fromPromise(this.__getTask(taskId, requestOptions));
239
+ getTask(request, requestOptions) {
240
+ return core.HttpResponsePromise.fromPromise(this.__getTask(request, requestOptions));
226
241
  }
227
- __getTask(taskId, requestOptions) {
242
+ __getTask(request, requestOptions) {
228
243
  return __awaiter(this, void 0, void 0, function* () {
229
- var _a, _b, _c;
230
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
244
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
245
+ const { task_id: taskId } = request;
246
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
231
247
  const _response = yield core.fetcher({
232
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `tasks/${encodeURIComponent(taskId)}`),
248
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `tasks/${core.url.encodePathParam(taskId)}`),
233
249
  method: "GET",
234
250
  headers: _headers,
235
251
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
236
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
237
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
252
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
253
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
238
254
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
255
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
256
+ logging: this._options.logging,
239
257
  });
240
258
  if (_response.ok) {
241
259
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -274,7 +292,6 @@ class Tasks {
274
292
  /**
275
293
  * Control task execution with stop, pause, resume, or stop task and session actions.
276
294
  *
277
- * @param {string} taskId
278
295
  * @param {BrowserUse.UpdateTaskRequest} request
279
296
  * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
280
297
  *
@@ -282,28 +299,32 @@ class Tasks {
282
299
  * @throws {@link BrowserUse.UnprocessableEntityError}
283
300
  *
284
301
  * @example
285
- * await client.tasks.updateTask("task_id", {
302
+ * await client.tasks.updateTask({
303
+ * task_id: "task_id",
286
304
  * action: "stop"
287
305
  * })
288
306
  */
289
- updateTask(taskId, request, requestOptions) {
290
- return core.HttpResponsePromise.fromPromise(this.__updateTask(taskId, request, requestOptions));
307
+ updateTask(request, requestOptions) {
308
+ return core.HttpResponsePromise.fromPromise(this.__updateTask(request, requestOptions));
291
309
  }
292
- __updateTask(taskId, request, requestOptions) {
310
+ __updateTask(request, requestOptions) {
293
311
  return __awaiter(this, void 0, void 0, function* () {
294
- var _a, _b, _c;
295
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
312
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
313
+ const { task_id: taskId } = request, _body = __rest(request, ["task_id"]);
314
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
296
315
  const _response = yield core.fetcher({
297
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `tasks/${encodeURIComponent(taskId)}`),
316
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `tasks/${core.url.encodePathParam(taskId)}`),
298
317
  method: "PATCH",
299
318
  headers: _headers,
300
319
  contentType: "application/json",
301
320
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
302
321
  requestType: "json",
303
- body: request,
304
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
305
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
322
+ body: _body,
323
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
324
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
306
325
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
326
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
327
+ logging: this._options.logging,
307
328
  });
308
329
  if (_response.ok) {
309
330
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -342,7 +363,7 @@ class Tasks {
342
363
  /**
343
364
  * Get secure download URL for task execution logs with step-by-step details.
344
365
  *
345
- * @param {string} taskId
366
+ * @param {BrowserUse.GetTaskLogsTasksTaskIdLogsGetRequest} request
346
367
  * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
347
368
  *
348
369
  * @throws {@link BrowserUse.NotFoundError}
@@ -350,23 +371,28 @@ class Tasks {
350
371
  * @throws {@link BrowserUse.InternalServerError}
351
372
  *
352
373
  * @example
353
- * await client.tasks.getTaskLogs("task_id")
374
+ * await client.tasks.getTaskLogs({
375
+ * task_id: "task_id"
376
+ * })
354
377
  */
355
- getTaskLogs(taskId, requestOptions) {
356
- return core.HttpResponsePromise.fromPromise(this.__getTaskLogs(taskId, requestOptions));
378
+ getTaskLogs(request, requestOptions) {
379
+ return core.HttpResponsePromise.fromPromise(this.__getTaskLogs(request, requestOptions));
357
380
  }
358
- __getTaskLogs(taskId, requestOptions) {
381
+ __getTaskLogs(request, requestOptions) {
359
382
  return __awaiter(this, void 0, void 0, function* () {
360
- var _a, _b, _c;
361
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
383
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
384
+ const { task_id: taskId } = request;
385
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
362
386
  const _response = yield core.fetcher({
363
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `tasks/${encodeURIComponent(taskId)}/logs`),
387
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `tasks/${core.url.encodePathParam(taskId)}/logs`),
364
388
  method: "GET",
365
389
  headers: _headers,
366
390
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
367
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
368
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
391
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
392
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
369
393
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
394
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
395
+ logging: this._options.logging,
370
396
  });
371
397
  if (_response.ok) {
372
398
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -1,2 +1 @@
1
- export {};
2
1
  export * from "./requests/index.js";
@@ -1,7 +1,4 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as BrowserUse from "../../../../index.js";
1
+ import type * as BrowserUse from "../../../../index.js";
5
2
  /**
6
3
  * @example
7
4
  * {
@@ -14,27 +11,35 @@ export interface CreateTaskRequest {
14
11
  /** The LLM model to use for the agent. */
15
12
  llm?: BrowserUse.SupportedLlMs;
16
13
  /** The URL to start the task from. */
17
- startUrl?: string;
14
+ startUrl?: string | null;
18
15
  /** Maximum number of steps the agent can take before stopping. */
19
16
  maxSteps?: number;
20
17
  /** The stringified JSON schema for the structured output. */
21
- structuredOutput?: string;
18
+ structuredOutput?: string | null;
22
19
  /** The ID of the session where the task will run. */
23
- sessionId?: string;
24
- /** The metadata for the task. */
25
- metadata?: Record<string, string | undefined>;
26
- /** The secrets for the task. */
27
- secrets?: Record<string, string | undefined>;
20
+ sessionId?: string | null;
21
+ /** The metadata for the task. Up to 10 key-value pairs. */
22
+ metadata?: Record<string, string | null> | null;
23
+ /** The secrets for the task. Allowed domains are not required for secrets to be injected, but are recommended. */
24
+ secrets?: Record<string, string | null> | null;
28
25
  /** The allowed domains for the task. */
29
- allowedDomains?: string[];
26
+ allowedDomains?: string[] | null;
27
+ /** The ID of the 1Password vault to use for the task. This is used to inject secrets into the task. */
28
+ opVaultId?: string | null;
30
29
  /** Tells the agent to highlight interactive elements on the page. */
31
30
  highlightElements?: boolean;
32
31
  /** Whether agent flash mode is enabled. */
33
32
  flashMode?: boolean;
34
33
  /** Whether agent thinking mode is enabled. */
35
34
  thinking?: boolean;
36
- /** Whether agent vision capabilities are enabled. */
37
- vision?: boolean;
35
+ /** Whether agent vision capabilities are enabled. Set to 'auto' to let the agent decide based on the model capabilities. */
36
+ vision?: CreateTaskRequest.Vision;
38
37
  /** Optional extension to the agent system prompt. */
39
38
  systemPromptExtension?: string;
40
39
  }
40
+ export declare namespace CreateTaskRequest {
41
+ /**
42
+ * Whether agent vision capabilities are enabled. Set to 'auto' to let the agent decide based on the model capabilities.
43
+ */
44
+ type Vision = boolean | "auto";
45
+ }
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
2
+ // This file was auto-generated by Fern from our API Definition.
5
3
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * task_id: "task_id"
5
+ * }
6
+ */
7
+ export interface GetTaskLogsTasksTaskIdLogsGetRequest {
8
+ task_id: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * task_id: "task_id"
5
+ * }
6
+ */
7
+ export interface GetTaskTasksTaskIdGetRequest {
8
+ task_id: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,4 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as BrowserUse from "../../../../index.js";
1
+ import type * as BrowserUse from "../../../../index.js";
5
2
  /**
6
3
  * @example
7
4
  * {}
@@ -9,8 +6,8 @@ import * as BrowserUse from "../../../../index.js";
9
6
  export interface ListTasksTasksGetRequest {
10
7
  pageSize?: number;
11
8
  pageNumber?: number;
12
- sessionId?: string;
13
- filterBy?: BrowserUse.TaskStatus;
14
- after?: string;
15
- before?: string;
9
+ sessionId?: string | null;
10
+ filterBy?: BrowserUse.TaskStatus | null;
11
+ after?: string | null;
12
+ before?: string | null;
16
13
  }
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
2
+ // This file was auto-generated by Fern from our API Definition.
5
3
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +1,13 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as BrowserUse from "../../../../index.js";
1
+ import type * as BrowserUse from "../../../../index.js";
5
2
  /**
6
3
  * @example
7
4
  * {
5
+ * task_id: "task_id",
8
6
  * action: "stop"
9
7
  * }
10
8
  */
11
9
  export interface UpdateTaskRequest {
10
+ task_id: string;
12
11
  /** The action to perform on the task */
13
12
  action: BrowserUse.TaskUpdateAction;
14
13
  }
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
2
+ // This file was auto-generated by Fern from our API Definition.
5
3
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,5 @@
1
- export { type ListTasksTasksGetRequest } from "./ListTasksTasksGetRequest.js";
2
- export { type CreateTaskRequest } from "./CreateTaskRequest.js";
3
- export { type UpdateTaskRequest } from "./UpdateTaskRequest.js";
1
+ export type { CreateTaskRequest } from "./CreateTaskRequest.js";
2
+ export type { GetTaskLogsTasksTaskIdLogsGetRequest } from "./GetTaskLogsTasksTaskIdLogsGetRequest.js";
3
+ export type { GetTaskTasksTaskIdGetRequest } from "./GetTaskTasksTaskIdGetRequest.js";
4
+ export type { ListTasksTasksGetRequest } from "./ListTasksTasksGetRequest.js";
5
+ export type { UpdateTaskRequest } from "./UpdateTaskRequest.js";