@skyvern/client 1.0.0 → 1.0.3

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 (311) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/Client.d.ts +75 -6
  3. package/dist/cjs/Client.js +328 -14
  4. package/dist/cjs/api/client/requests/CreateCredentialRequest.d.ts +1 -1
  5. package/dist/cjs/api/client/requests/DownloadFilesRequest.d.ts +37 -0
  6. package/dist/cjs/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.d.ts → client/requests/ListBrowserProfilesRequest.d.ts} +1 -1
  7. package/dist/cjs/api/client/requests/LoginRequest.d.ts +8 -6
  8. package/dist/cjs/api/client/requests/index.d.ts +3 -0
  9. package/dist/cjs/api/errors/ConflictError.d.ts +5 -0
  10. package/dist/cjs/api/errors/ConflictError.js +50 -0
  11. package/dist/cjs/api/errors/index.d.ts +1 -0
  12. package/dist/cjs/api/errors/index.js +1 -0
  13. package/dist/cjs/api/resources/index.d.ts +0 -4
  14. package/dist/cjs/api/resources/index.js +1 -8
  15. package/dist/cjs/api/types/ActionBlock.d.ts +4 -1
  16. package/dist/cjs/api/types/ActionBlockYaml.d.ts +4 -1
  17. package/dist/cjs/api/types/ActionType.d.ts +1 -0
  18. package/dist/cjs/api/types/ActionType.js +1 -0
  19. package/dist/cjs/api/types/BlockType.d.ts +1 -0
  20. package/dist/cjs/api/types/BlockType.js +1 -0
  21. package/dist/cjs/api/types/BranchCondition.d.ts +11 -0
  22. package/dist/cjs/api/types/BranchConditionCriteria.d.ts +10 -0
  23. package/dist/cjs/api/types/BranchConditionYaml.d.ts +7 -0
  24. package/dist/cjs/api/types/BranchCriteriaYaml.d.ts +12 -0
  25. package/dist/cjs/api/types/BranchCriteriaYaml.js +11 -0
  26. package/dist/cjs/api/types/CodeBlock.d.ts +4 -0
  27. package/dist/cjs/api/types/CodeBlockYaml.d.ts +4 -0
  28. package/dist/cjs/api/types/ConditionalBlock.d.ts +16 -0
  29. package/dist/cjs/api/types/ConditionalBlockYaml.d.ts +11 -0
  30. package/dist/cjs/api/types/CredentialResponse.d.ts +1 -1
  31. package/dist/cjs/api/types/CredentialTypeOutput.d.ts +1 -0
  32. package/dist/cjs/api/types/CredentialTypeOutput.js +1 -0
  33. package/dist/cjs/api/types/DownloadToS3Block.d.ts +4 -0
  34. package/dist/cjs/api/types/DownloadToS3BlockYaml.d.ts +4 -0
  35. package/dist/cjs/api/types/ExtractionBlock.d.ts +4 -1
  36. package/dist/cjs/api/types/ExtractionBlockYaml.d.ts +4 -1
  37. package/dist/cjs/api/types/FileDownloadBlock.d.ts +4 -1
  38. package/dist/cjs/api/types/FileDownloadBlockYaml.d.ts +4 -1
  39. package/dist/cjs/api/types/FileParserBlock.d.ts +4 -0
  40. package/dist/cjs/api/types/FileParserBlockYaml.d.ts +4 -0
  41. package/dist/cjs/api/types/FileUploadBlock.d.ts +4 -0
  42. package/dist/cjs/api/types/FileUploadBlockYaml.d.ts +4 -0
  43. package/dist/cjs/api/types/ForLoopBlock.d.ts +4 -0
  44. package/dist/cjs/api/types/ForLoopBlockLoopBlocksItem.d.ts +4 -1
  45. package/dist/cjs/api/types/ForLoopBlockYaml.d.ts +4 -0
  46. package/dist/cjs/api/types/ForLoopBlockYamlLoopBlocksItem.d.ts +4 -1
  47. package/dist/cjs/api/types/GeoTarget.d.ts +21 -0
  48. package/dist/cjs/api/types/GeoTarget.js +3 -0
  49. package/dist/cjs/api/types/HttpRequestBlock.d.ts +5 -0
  50. package/dist/cjs/api/types/HttpRequestBlockYaml.d.ts +5 -0
  51. package/dist/cjs/api/types/HumanInteractionBlock.d.ts +4 -1
  52. package/dist/cjs/api/types/HumanInteractionBlockYaml.d.ts +4 -0
  53. package/dist/cjs/api/types/JinjaBranchCriteria.d.ts +7 -0
  54. package/dist/cjs/api/types/JinjaBranchCriteria.js +3 -0
  55. package/dist/cjs/api/types/LocateElementAction.d.ts +7 -0
  56. package/dist/cjs/api/types/LocateElementAction.js +3 -0
  57. package/dist/cjs/api/types/LoginBlock.d.ts +4 -1
  58. package/dist/cjs/api/types/LoginBlockYaml.d.ts +4 -1
  59. package/dist/cjs/api/types/NavigationBlock.d.ts +4 -1
  60. package/dist/cjs/api/types/NavigationBlockYaml.d.ts +4 -1
  61. package/dist/cjs/api/types/NonEmptyPasswordCredential.d.ts +2 -0
  62. package/dist/cjs/api/types/PasswordCredentialResponse.d.ts +2 -0
  63. package/dist/cjs/api/types/PdfParserBlock.d.ts +4 -0
  64. package/dist/cjs/api/types/PdfParserBlockYaml.d.ts +4 -0
  65. package/dist/cjs/api/types/PromptAction.d.ts +11 -0
  66. package/dist/cjs/api/types/PromptAction.js +3 -0
  67. package/dist/cjs/api/types/PromptBranchCriteria.d.ts +7 -0
  68. package/dist/cjs/api/types/PromptBranchCriteria.js +3 -0
  69. package/dist/cjs/api/types/RunSdkActionRequestAction.d.ts +10 -1
  70. package/dist/cjs/api/types/SecretCredential.d.ts +9 -0
  71. package/dist/cjs/api/types/SecretCredential.js +3 -0
  72. package/dist/cjs/api/types/SecretCredentialResponse.d.ts +7 -0
  73. package/dist/cjs/api/types/SecretCredentialResponse.js +3 -0
  74. package/dist/cjs/api/types/SendEmailBlock.d.ts +4 -0
  75. package/dist/cjs/api/types/SendEmailBlockYaml.d.ts +4 -0
  76. package/dist/cjs/api/types/SkyvernForgeSdkSchemasCredentialsCredentialType.d.ts +1 -0
  77. package/dist/cjs/api/types/SkyvernForgeSdkSchemasCredentialsCredentialType.js +1 -0
  78. package/dist/cjs/api/types/TaskBlock.d.ts +4 -1
  79. package/dist/cjs/api/types/TaskBlockYaml.d.ts +4 -1
  80. package/dist/cjs/api/types/TaskRunRequest.d.ts +29 -1
  81. package/dist/cjs/api/types/TaskV2Block.d.ts +4 -0
  82. package/dist/cjs/api/types/TaskV2BlockYaml.d.ts +4 -0
  83. package/dist/cjs/api/types/TextPromptBlock.d.ts +4 -0
  84. package/dist/cjs/api/types/TextPromptBlockYaml.d.ts +4 -0
  85. package/dist/cjs/api/types/UploadToS3Block.d.ts +4 -0
  86. package/dist/cjs/api/types/UploadToS3BlockYaml.d.ts +4 -0
  87. package/dist/cjs/api/types/UrlBlock.d.ts +4 -1
  88. package/dist/cjs/api/types/UrlBlockYaml.d.ts +4 -0
  89. package/dist/cjs/api/types/ValidateAction.d.ts +9 -0
  90. package/dist/cjs/api/types/ValidateAction.js +3 -0
  91. package/dist/cjs/api/types/ValidationBlock.d.ts +4 -1
  92. package/dist/cjs/api/types/ValidationBlockYaml.d.ts +4 -0
  93. package/dist/cjs/api/types/WaitBlock.d.ts +4 -0
  94. package/dist/cjs/api/types/WaitBlockYaml.d.ts +4 -0
  95. package/dist/cjs/api/types/Workflow.d.ts +4 -1
  96. package/dist/cjs/api/types/WorkflowCreateYamlRequest.d.ts +4 -1
  97. package/dist/cjs/api/types/WorkflowDefinition.d.ts +1 -0
  98. package/dist/cjs/api/types/WorkflowDefinitionBlocksItem.d.ts +4 -1
  99. package/dist/cjs/api/types/WorkflowDefinitionYaml.d.ts +1 -0
  100. package/dist/cjs/api/types/WorkflowDefinitionYamlBlocksItem.d.ts +4 -1
  101. package/dist/cjs/api/types/WorkflowRunBlock.d.ts +4 -0
  102. package/dist/cjs/api/types/WorkflowRunRequest.d.ts +31 -1
  103. package/dist/cjs/api/types/index.d.ts +14 -1
  104. package/dist/cjs/api/types/index.js +14 -1
  105. package/dist/cjs/index.d.ts +3 -1
  106. package/dist/cjs/index.js +7 -2
  107. package/dist/cjs/library/Skyvern.d.ts +124 -0
  108. package/dist/cjs/library/Skyvern.js +315 -0
  109. package/dist/cjs/library/SkyvernBrowser.d.ts +76 -0
  110. package/dist/cjs/library/SkyvernBrowser.js +119 -0
  111. package/dist/cjs/library/SkyvernBrowserPage.d.ts +69 -0
  112. package/dist/cjs/library/SkyvernBrowserPage.js +162 -0
  113. package/dist/cjs/library/SkyvernBrowserPageAgent.d.ts +135 -0
  114. package/dist/cjs/library/SkyvernBrowserPageAgent.js +256 -0
  115. package/dist/cjs/library/SkyvernBrowserPageAi.d.ts +85 -0
  116. package/dist/cjs/library/SkyvernBrowserPageAi.js +248 -0
  117. package/dist/cjs/library/constants.d.ts +3 -0
  118. package/dist/cjs/library/constants.js +6 -0
  119. package/dist/cjs/library/index.d.ts +10 -0
  120. package/dist/cjs/library/index.js +20 -0
  121. package/dist/cjs/library/logger.d.ts +15 -0
  122. package/dist/cjs/library/logger.js +56 -0
  123. package/dist/cjs/version.d.ts +1 -1
  124. package/dist/cjs/version.js +1 -1
  125. package/dist/esm/Client.d.mts +75 -6
  126. package/dist/esm/Client.mjs +326 -12
  127. package/dist/esm/api/client/requests/CreateCredentialRequest.d.mts +1 -1
  128. package/dist/esm/api/client/requests/DownloadFilesRequest.d.mts +37 -0
  129. package/dist/esm/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.d.mts → client/requests/ListBrowserProfilesRequest.d.mts} +1 -1
  130. package/dist/esm/api/client/requests/LoginRequest.d.mts +8 -6
  131. package/dist/esm/api/client/requests/index.d.mts +3 -0
  132. package/dist/esm/api/errors/ConflictError.d.mts +5 -0
  133. package/dist/esm/api/errors/ConflictError.mjs +13 -0
  134. package/dist/esm/api/errors/index.d.mts +1 -0
  135. package/dist/esm/api/errors/index.mjs +1 -0
  136. package/dist/esm/api/resources/index.d.mts +0 -4
  137. package/dist/esm/api/resources/index.mjs +0 -4
  138. package/dist/esm/api/types/ActionBlock.d.mts +4 -1
  139. package/dist/esm/api/types/ActionBlockYaml.d.mts +4 -1
  140. package/dist/esm/api/types/ActionType.d.mts +1 -0
  141. package/dist/esm/api/types/ActionType.mjs +1 -0
  142. package/dist/esm/api/types/BlockType.d.mts +1 -0
  143. package/dist/esm/api/types/BlockType.mjs +1 -0
  144. package/dist/esm/api/types/BranchCondition.d.mts +11 -0
  145. package/dist/esm/api/types/BranchConditionCriteria.d.mts +10 -0
  146. package/dist/esm/api/types/BranchConditionYaml.d.mts +7 -0
  147. package/dist/esm/api/types/BranchCriteriaYaml.d.mts +12 -0
  148. package/dist/esm/api/types/BranchCriteriaYaml.mjs +8 -0
  149. package/dist/esm/api/types/CodeBlock.d.mts +4 -0
  150. package/dist/esm/api/types/CodeBlockYaml.d.mts +4 -0
  151. package/dist/esm/api/types/ConditionalBlock.d.mts +16 -0
  152. package/dist/esm/api/types/ConditionalBlockYaml.d.mts +11 -0
  153. package/dist/esm/api/types/CredentialResponse.d.mts +1 -1
  154. package/dist/esm/api/types/CredentialTypeOutput.d.mts +1 -0
  155. package/dist/esm/api/types/CredentialTypeOutput.mjs +1 -0
  156. package/dist/esm/api/types/DownloadToS3Block.d.mts +4 -0
  157. package/dist/esm/api/types/DownloadToS3BlockYaml.d.mts +4 -0
  158. package/dist/esm/api/types/ExtractionBlock.d.mts +4 -1
  159. package/dist/esm/api/types/ExtractionBlockYaml.d.mts +4 -1
  160. package/dist/esm/api/types/FileDownloadBlock.d.mts +4 -1
  161. package/dist/esm/api/types/FileDownloadBlockYaml.d.mts +4 -1
  162. package/dist/esm/api/types/FileParserBlock.d.mts +4 -0
  163. package/dist/esm/api/types/FileParserBlockYaml.d.mts +4 -0
  164. package/dist/esm/api/types/FileUploadBlock.d.mts +4 -0
  165. package/dist/esm/api/types/FileUploadBlockYaml.d.mts +4 -0
  166. package/dist/esm/api/types/ForLoopBlock.d.mts +4 -0
  167. package/dist/esm/api/types/ForLoopBlockLoopBlocksItem.d.mts +4 -1
  168. package/dist/esm/api/types/ForLoopBlockYaml.d.mts +4 -0
  169. package/dist/esm/api/types/ForLoopBlockYamlLoopBlocksItem.d.mts +4 -1
  170. package/dist/esm/api/types/GeoTarget.d.mts +21 -0
  171. package/dist/esm/api/types/GeoTarget.mjs +2 -0
  172. package/dist/esm/api/types/HttpRequestBlock.d.mts +5 -0
  173. package/dist/esm/api/types/HttpRequestBlockYaml.d.mts +5 -0
  174. package/dist/esm/api/types/HumanInteractionBlock.d.mts +4 -1
  175. package/dist/esm/api/types/HumanInteractionBlockYaml.d.mts +4 -0
  176. package/dist/esm/api/types/JinjaBranchCriteria.d.mts +7 -0
  177. package/dist/esm/api/types/JinjaBranchCriteria.mjs +2 -0
  178. package/dist/esm/api/types/LocateElementAction.d.mts +7 -0
  179. package/dist/esm/api/types/LocateElementAction.mjs +2 -0
  180. package/dist/esm/api/types/LoginBlock.d.mts +4 -1
  181. package/dist/esm/api/types/LoginBlockYaml.d.mts +4 -1
  182. package/dist/esm/api/types/NavigationBlock.d.mts +4 -1
  183. package/dist/esm/api/types/NavigationBlockYaml.d.mts +4 -1
  184. package/dist/esm/api/types/NonEmptyPasswordCredential.d.mts +2 -0
  185. package/dist/esm/api/types/PasswordCredentialResponse.d.mts +2 -0
  186. package/dist/esm/api/types/PdfParserBlock.d.mts +4 -0
  187. package/dist/esm/api/types/PdfParserBlockYaml.d.mts +4 -0
  188. package/dist/esm/api/types/PromptAction.d.mts +11 -0
  189. package/dist/esm/api/types/PromptAction.mjs +2 -0
  190. package/dist/esm/api/types/PromptBranchCriteria.d.mts +7 -0
  191. package/dist/esm/api/types/PromptBranchCriteria.mjs +2 -0
  192. package/dist/esm/api/types/RunSdkActionRequestAction.d.mts +10 -1
  193. package/dist/esm/api/types/SecretCredential.d.mts +9 -0
  194. package/dist/esm/api/types/SecretCredential.mjs +2 -0
  195. package/dist/esm/api/types/SecretCredentialResponse.d.mts +7 -0
  196. package/dist/esm/api/types/SecretCredentialResponse.mjs +2 -0
  197. package/dist/esm/api/types/SendEmailBlock.d.mts +4 -0
  198. package/dist/esm/api/types/SendEmailBlockYaml.d.mts +4 -0
  199. package/dist/esm/api/types/SkyvernForgeSdkSchemasCredentialsCredentialType.d.mts +1 -0
  200. package/dist/esm/api/types/SkyvernForgeSdkSchemasCredentialsCredentialType.mjs +1 -0
  201. package/dist/esm/api/types/TaskBlock.d.mts +4 -1
  202. package/dist/esm/api/types/TaskBlockYaml.d.mts +4 -1
  203. package/dist/esm/api/types/TaskRunRequest.d.mts +29 -1
  204. package/dist/esm/api/types/TaskV2Block.d.mts +4 -0
  205. package/dist/esm/api/types/TaskV2BlockYaml.d.mts +4 -0
  206. package/dist/esm/api/types/TextPromptBlock.d.mts +4 -0
  207. package/dist/esm/api/types/TextPromptBlockYaml.d.mts +4 -0
  208. package/dist/esm/api/types/UploadToS3Block.d.mts +4 -0
  209. package/dist/esm/api/types/UploadToS3BlockYaml.d.mts +4 -0
  210. package/dist/esm/api/types/UrlBlock.d.mts +4 -1
  211. package/dist/esm/api/types/UrlBlockYaml.d.mts +4 -0
  212. package/dist/esm/api/types/ValidateAction.d.mts +9 -0
  213. package/dist/esm/api/types/ValidateAction.mjs +2 -0
  214. package/dist/esm/api/types/ValidationBlock.d.mts +4 -1
  215. package/dist/esm/api/types/ValidationBlockYaml.d.mts +4 -0
  216. package/dist/esm/api/types/WaitBlock.d.mts +4 -0
  217. package/dist/esm/api/types/WaitBlockYaml.d.mts +4 -0
  218. package/dist/esm/api/types/Workflow.d.mts +4 -1
  219. package/dist/esm/api/types/WorkflowCreateYamlRequest.d.mts +4 -1
  220. package/dist/esm/api/types/WorkflowDefinition.d.mts +1 -0
  221. package/dist/esm/api/types/WorkflowDefinitionBlocksItem.d.mts +4 -1
  222. package/dist/esm/api/types/WorkflowDefinitionYaml.d.mts +1 -0
  223. package/dist/esm/api/types/WorkflowDefinitionYamlBlocksItem.d.mts +4 -1
  224. package/dist/esm/api/types/WorkflowRunBlock.d.mts +4 -0
  225. package/dist/esm/api/types/WorkflowRunRequest.d.mts +31 -1
  226. package/dist/esm/api/types/index.d.mts +14 -1
  227. package/dist/esm/api/types/index.mjs +14 -1
  228. package/dist/esm/index.d.mts +3 -1
  229. package/dist/esm/index.mjs +2 -1
  230. package/dist/esm/library/Skyvern.d.mts +124 -0
  231. package/dist/esm/library/Skyvern.mjs +278 -0
  232. package/dist/esm/library/SkyvernBrowser.d.mts +76 -0
  233. package/dist/esm/library/SkyvernBrowser.mjs +115 -0
  234. package/dist/esm/library/SkyvernBrowserPage.d.mts +69 -0
  235. package/dist/esm/library/SkyvernBrowserPage.mjs +158 -0
  236. package/dist/esm/library/SkyvernBrowserPageAgent.d.mts +135 -0
  237. package/dist/esm/library/SkyvernBrowserPageAgent.mjs +252 -0
  238. package/dist/esm/library/SkyvernBrowserPageAi.d.mts +85 -0
  239. package/dist/esm/library/SkyvernBrowserPageAi.mjs +244 -0
  240. package/dist/esm/library/constants.d.mts +3 -0
  241. package/dist/esm/library/constants.mjs +3 -0
  242. package/dist/esm/library/index.d.mts +10 -0
  243. package/dist/esm/library/index.mjs +7 -0
  244. package/dist/esm/library/logger.d.mts +15 -0
  245. package/dist/esm/library/logger.mjs +52 -0
  246. package/dist/esm/version.d.mts +1 -1
  247. package/dist/esm/version.mjs +1 -1
  248. package/package.json +4 -1
  249. package/reference.md +0 -654
  250. package/dist/cjs/api/resources/browserProfiles/client/Client.d.ts +0 -69
  251. package/dist/cjs/api/resources/browserProfiles/client/Client.js +0 -309
  252. package/dist/cjs/api/resources/browserProfiles/client/index.d.ts +0 -1
  253. package/dist/cjs/api/resources/browserProfiles/client/index.js +0 -17
  254. package/dist/cjs/api/resources/browserProfiles/client/requests/index.d.ts +0 -2
  255. package/dist/cjs/api/resources/browserProfiles/client/requests/index.js +0 -2
  256. package/dist/cjs/api/resources/browserProfiles/index.d.ts +0 -1
  257. package/dist/cjs/api/resources/browserProfiles/index.js +0 -17
  258. package/dist/cjs/api/resources/workflows/client/Client.d.ts +0 -108
  259. package/dist/cjs/api/resources/workflows/client/Client.js +0 -465
  260. package/dist/cjs/api/resources/workflows/client/index.d.ts +0 -1
  261. package/dist/cjs/api/resources/workflows/client/index.js +0 -17
  262. package/dist/cjs/api/resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.d.ts +0 -10
  263. package/dist/cjs/api/resources/workflows/client/requests/FolderCreate.d.ts +0 -12
  264. package/dist/cjs/api/resources/workflows/client/requests/FolderUpdate.d.ts +0 -10
  265. package/dist/cjs/api/resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.d.ts +0 -16
  266. package/dist/cjs/api/resources/workflows/client/requests/UpdateWorkflowFolderRequest.d.ts +0 -8
  267. package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +0 -5
  268. package/dist/cjs/api/resources/workflows/client/requests/index.js +0 -2
  269. package/dist/cjs/api/resources/workflows/index.d.ts +0 -1
  270. package/dist/cjs/api/resources/workflows/index.js +0 -17
  271. package/dist/cjs/api/types/Folder.d.ts +0 -15
  272. package/dist/esm/api/resources/browserProfiles/client/Client.d.mts +0 -69
  273. package/dist/esm/api/resources/browserProfiles/client/Client.mjs +0 -272
  274. package/dist/esm/api/resources/browserProfiles/client/index.d.mts +0 -1
  275. package/dist/esm/api/resources/browserProfiles/client/index.mjs +0 -1
  276. package/dist/esm/api/resources/browserProfiles/client/requests/index.d.mts +0 -2
  277. package/dist/esm/api/resources/browserProfiles/client/requests/index.mjs +0 -1
  278. package/dist/esm/api/resources/browserProfiles/index.d.mts +0 -1
  279. package/dist/esm/api/resources/browserProfiles/index.mjs +0 -1
  280. package/dist/esm/api/resources/workflows/client/Client.d.mts +0 -108
  281. package/dist/esm/api/resources/workflows/client/Client.mjs +0 -428
  282. package/dist/esm/api/resources/workflows/client/index.d.mts +0 -1
  283. package/dist/esm/api/resources/workflows/client/index.mjs +0 -1
  284. package/dist/esm/api/resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.d.mts +0 -10
  285. package/dist/esm/api/resources/workflows/client/requests/FolderCreate.d.mts +0 -12
  286. package/dist/esm/api/resources/workflows/client/requests/FolderUpdate.d.mts +0 -10
  287. package/dist/esm/api/resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.d.mts +0 -16
  288. package/dist/esm/api/resources/workflows/client/requests/UpdateWorkflowFolderRequest.d.mts +0 -8
  289. package/dist/esm/api/resources/workflows/client/requests/index.d.mts +0 -5
  290. package/dist/esm/api/resources/workflows/client/requests/index.mjs +0 -1
  291. package/dist/esm/api/resources/workflows/index.d.mts +0 -1
  292. package/dist/esm/api/resources/workflows/index.mjs +0 -1
  293. package/dist/esm/api/types/Folder.d.mts +0 -15
  294. /package/dist/cjs/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.d.ts +0 -0
  295. /package/dist/cjs/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.js +0 -0
  296. /package/dist/cjs/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.js → client/requests/DownloadFilesRequest.js} +0 -0
  297. /package/dist/cjs/api/{resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.js → client/requests/ListBrowserProfilesRequest.js} +0 -0
  298. /package/dist/cjs/api/{resources/workflows/client/requests/FolderCreate.js → types/BranchCondition.js} +0 -0
  299. /package/dist/cjs/api/{resources/workflows/client/requests/FolderUpdate.js → types/BranchConditionCriteria.js} +0 -0
  300. /package/dist/cjs/api/{resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.js → types/BranchConditionYaml.js} +0 -0
  301. /package/dist/cjs/api/{resources/workflows/client/requests/UpdateWorkflowFolderRequest.js → types/ConditionalBlock.js} +0 -0
  302. /package/dist/cjs/api/types/{Folder.js → ConditionalBlockYaml.js} +0 -0
  303. /package/dist/esm/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.d.mts +0 -0
  304. /package/dist/esm/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.mjs +0 -0
  305. /package/dist/esm/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.mjs → client/requests/DownloadFilesRequest.mjs} +0 -0
  306. /package/dist/esm/api/{resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.mjs → client/requests/ListBrowserProfilesRequest.mjs} +0 -0
  307. /package/dist/esm/api/{resources/workflows/client/requests/FolderCreate.mjs → types/BranchCondition.mjs} +0 -0
  308. /package/dist/esm/api/{resources/workflows/client/requests/FolderUpdate.mjs → types/BranchConditionCriteria.mjs} +0 -0
  309. /package/dist/esm/api/{resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.mjs → types/BranchConditionYaml.mjs} +0 -0
  310. /package/dist/esm/api/{resources/workflows/client/requests/UpdateWorkflowFolderRequest.mjs → types/ConditionalBlock.mjs} +0 -0
  311. /package/dist/esm/api/types/{Folder.mjs → ConditionalBlockYaml.mjs} +0 -0
package/README.md CHANGED
@@ -56,7 +56,7 @@ following namespace:
56
56
  ```typescript
57
57
  import { Skyvern } from "@skyvern/client";
58
58
 
59
- const request: Skyvern.GetFoldersV1FoldersGetRequest = {
59
+ const request: Skyvern.RunTaskRequest = {
60
60
  ...
61
61
  };
62
62
  ```
@@ -1,7 +1,5 @@
1
1
  import * as Skyvern from "./api/index.js";
2
- import { BrowserProfiles } from "./api/resources/browserProfiles/client/Client.js";
3
2
  import { Scripts } from "./api/resources/scripts/client/Client.js";
4
- import { Workflows } from "./api/resources/workflows/client/Client.js";
5
3
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
6
4
  import * as core from "./core/index.js";
7
5
  export declare namespace SkyvernClient {
@@ -12,12 +10,8 @@ export declare namespace SkyvernClient {
12
10
  }
13
11
  export declare class SkyvernClient {
14
12
  protected readonly _options: SkyvernClient.Options;
15
- protected _workflows: Workflows | undefined;
16
- protected _browserProfiles: BrowserProfiles | undefined;
17
13
  protected _scripts: Scripts | undefined;
18
14
  constructor(_options?: SkyvernClient.Options);
19
- get workflows(): Workflows;
20
- get browserProfiles(): BrowserProfiles;
21
15
  get scripts(): Scripts;
22
16
  /**
23
17
  * Run a task
@@ -214,6 +208,66 @@ export declare class SkyvernClient {
214
208
  */
215
209
  getRunTimeline(runId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowRunTimeline[]>;
216
210
  private __getRunTimeline;
211
+ /**
212
+ * Get all browser profiles for the organization
213
+ *
214
+ * @param {Skyvern.ListBrowserProfilesRequest} request
215
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
216
+ *
217
+ * @throws {@link Skyvern.UnprocessableEntityError}
218
+ *
219
+ * @example
220
+ * await client.listBrowserProfiles({
221
+ * include_deleted: true
222
+ * })
223
+ */
224
+ listBrowserProfiles(request?: Skyvern.ListBrowserProfilesRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.BrowserProfile[]>;
225
+ private __listBrowserProfiles;
226
+ /**
227
+ * Create a browser profile from a persistent browser session or workflow run.
228
+ *
229
+ * @param {Skyvern.CreateBrowserProfileRequest} request
230
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
231
+ *
232
+ * @throws {@link Skyvern.BadRequestError}
233
+ * @throws {@link Skyvern.ConflictError}
234
+ * @throws {@link Skyvern.UnprocessableEntityError}
235
+ *
236
+ * @example
237
+ * await client.createBrowserProfile({
238
+ * name: "name"
239
+ * })
240
+ */
241
+ createBrowserProfile(request: Skyvern.CreateBrowserProfileRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.BrowserProfile>;
242
+ private __createBrowserProfile;
243
+ /**
244
+ * Get a specific browser profile by ID
245
+ *
246
+ * @param {string} profileId - The ID of the browser profile. browser_profile_id starts with `bp_`
247
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
248
+ *
249
+ * @throws {@link Skyvern.NotFoundError}
250
+ * @throws {@link Skyvern.UnprocessableEntityError}
251
+ *
252
+ * @example
253
+ * await client.getBrowserProfile("bp_123456")
254
+ */
255
+ getBrowserProfile(profileId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.BrowserProfile>;
256
+ private __getBrowserProfile;
257
+ /**
258
+ * Delete a browser profile (soft delete)
259
+ *
260
+ * @param {string} profileId - The ID of the browser profile to delete. browser_profile_id starts with `bp_`
261
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
262
+ *
263
+ * @throws {@link Skyvern.NotFoundError}
264
+ * @throws {@link Skyvern.UnprocessableEntityError}
265
+ *
266
+ * @example
267
+ * await client.deleteBrowserProfile("bp_123456")
268
+ */
269
+ deleteBrowserProfile(profileId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<void>;
270
+ private __deleteBrowserProfile;
217
271
  /**
218
272
  * Get all active browser sessions for the organization
219
273
  *
@@ -364,6 +418,21 @@ export declare class SkyvernClient {
364
418
  */
365
419
  login(request: Skyvern.LoginRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowRunResponse>;
366
420
  private __login;
421
+ /**
422
+ * Download a file from a website by navigating and clicking download buttons
423
+ *
424
+ * @param {Skyvern.DownloadFilesRequest} request
425
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
426
+ *
427
+ * @throws {@link Skyvern.UnprocessableEntityError}
428
+ *
429
+ * @example
430
+ * await client.downloadFiles({
431
+ * navigation_goal: "navigation_goal"
432
+ * })
433
+ */
434
+ downloadFiles(request: Skyvern.DownloadFilesRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowRunResponse>;
435
+ private __downloadFiles;
367
436
  /**
368
437
  * Retrieves a paginated list of scripts for the current organization
369
438
  *
@@ -45,9 +45,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
46
  exports.SkyvernClient = void 0;
47
47
  const Skyvern = __importStar(require("./api/index.js"));
48
- const Client_js_1 = require("./api/resources/browserProfiles/client/Client.js");
49
- const Client_js_2 = require("./api/resources/scripts/client/Client.js");
50
- const Client_js_3 = require("./api/resources/workflows/client/Client.js");
48
+ const Client_js_1 = require("./api/resources/scripts/client/Client.js");
51
49
  const headers_js_1 = require("./core/headers.js");
52
50
  const core = __importStar(require("./core/index.js"));
53
51
  const environments = __importStar(require("./environments.js"));
@@ -58,23 +56,15 @@ class SkyvernClient {
58
56
  "x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
59
57
  "X-Fern-Language": "JavaScript",
60
58
  "X-Fern-SDK-Name": "@skyvern/client",
61
- "X-Fern-SDK-Version": "1.0.0",
62
- "User-Agent": "@skyvern/client/1.0.0",
59
+ "X-Fern-SDK-Version": "1.0.3",
60
+ "User-Agent": "@skyvern/client/1.0.3",
63
61
  "X-Fern-Runtime": core.RUNTIME.type,
64
62
  "X-Fern-Runtime-Version": core.RUNTIME.version,
65
63
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
66
64
  }
67
- get workflows() {
68
- var _a;
69
- return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new Client_js_3.Workflows(this._options)));
70
- }
71
- get browserProfiles() {
72
- var _a;
73
- return ((_a = this._browserProfiles) !== null && _a !== void 0 ? _a : (this._browserProfiles = new Client_js_1.BrowserProfiles(this._options)));
74
- }
75
65
  get scripts() {
76
66
  var _a;
77
- return ((_a = this._scripts) !== null && _a !== void 0 ? _a : (this._scripts = new Client_js_2.Scripts(this._options)));
67
+ return ((_a = this._scripts) !== null && _a !== void 0 ? _a : (this._scripts = new Client_js_1.Scripts(this._options)));
78
68
  }
79
69
  /**
80
70
  * Run a task
@@ -909,6 +899,266 @@ class SkyvernClient {
909
899
  }
910
900
  });
911
901
  }
902
+ /**
903
+ * Get all browser profiles for the organization
904
+ *
905
+ * @param {Skyvern.ListBrowserProfilesRequest} request
906
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
907
+ *
908
+ * @throws {@link Skyvern.UnprocessableEntityError}
909
+ *
910
+ * @example
911
+ * await client.listBrowserProfiles({
912
+ * include_deleted: true
913
+ * })
914
+ */
915
+ listBrowserProfiles(request = {}, requestOptions) {
916
+ return core.HttpResponsePromise.fromPromise(this.__listBrowserProfiles(request, requestOptions));
917
+ }
918
+ __listBrowserProfiles() {
919
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
920
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
921
+ const { include_deleted: includeDeleted } = request;
922
+ const _queryParams = {};
923
+ if (includeDeleted != null) {
924
+ _queryParams.include_deleted = includeDeleted.toString();
925
+ }
926
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "x-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
927
+ const _response = yield core.fetcher({
928
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SkyvernEnvironment.Cloud, "v1/browser_profiles"),
929
+ method: "GET",
930
+ headers: _headers,
931
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
932
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
933
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
934
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
935
+ });
936
+ if (_response.ok) {
937
+ return { data: _response.body, rawResponse: _response.rawResponse };
938
+ }
939
+ if (_response.error.reason === "status-code") {
940
+ switch (_response.error.statusCode) {
941
+ case 422:
942
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
943
+ default:
944
+ throw new errors.SkyvernError({
945
+ statusCode: _response.error.statusCode,
946
+ body: _response.error.body,
947
+ rawResponse: _response.rawResponse,
948
+ });
949
+ }
950
+ }
951
+ switch (_response.error.reason) {
952
+ case "non-json":
953
+ throw new errors.SkyvernError({
954
+ statusCode: _response.error.statusCode,
955
+ body: _response.error.rawBody,
956
+ rawResponse: _response.rawResponse,
957
+ });
958
+ case "timeout":
959
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/browser_profiles.");
960
+ case "unknown":
961
+ throw new errors.SkyvernError({
962
+ message: _response.error.errorMessage,
963
+ rawResponse: _response.rawResponse,
964
+ });
965
+ }
966
+ });
967
+ }
968
+ /**
969
+ * Create a browser profile from a persistent browser session or workflow run.
970
+ *
971
+ * @param {Skyvern.CreateBrowserProfileRequest} request
972
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
973
+ *
974
+ * @throws {@link Skyvern.BadRequestError}
975
+ * @throws {@link Skyvern.ConflictError}
976
+ * @throws {@link Skyvern.UnprocessableEntityError}
977
+ *
978
+ * @example
979
+ * await client.createBrowserProfile({
980
+ * name: "name"
981
+ * })
982
+ */
983
+ createBrowserProfile(request, requestOptions) {
984
+ return core.HttpResponsePromise.fromPromise(this.__createBrowserProfile(request, requestOptions));
985
+ }
986
+ __createBrowserProfile(request, requestOptions) {
987
+ return __awaiter(this, void 0, void 0, function* () {
988
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
989
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "x-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
990
+ const _response = yield core.fetcher({
991
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SkyvernEnvironment.Cloud, "v1/browser_profiles"),
992
+ method: "POST",
993
+ headers: _headers,
994
+ contentType: "application/json",
995
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
996
+ requestType: "json",
997
+ body: request,
998
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
999
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
1000
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1001
+ });
1002
+ if (_response.ok) {
1003
+ return { data: _response.body, rawResponse: _response.rawResponse };
1004
+ }
1005
+ if (_response.error.reason === "status-code") {
1006
+ switch (_response.error.statusCode) {
1007
+ case 400:
1008
+ throw new Skyvern.BadRequestError(_response.error.body, _response.rawResponse);
1009
+ case 409:
1010
+ throw new Skyvern.ConflictError(_response.error.body, _response.rawResponse);
1011
+ case 422:
1012
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1013
+ default:
1014
+ throw new errors.SkyvernError({
1015
+ statusCode: _response.error.statusCode,
1016
+ body: _response.error.body,
1017
+ rawResponse: _response.rawResponse,
1018
+ });
1019
+ }
1020
+ }
1021
+ switch (_response.error.reason) {
1022
+ case "non-json":
1023
+ throw new errors.SkyvernError({
1024
+ statusCode: _response.error.statusCode,
1025
+ body: _response.error.rawBody,
1026
+ rawResponse: _response.rawResponse,
1027
+ });
1028
+ case "timeout":
1029
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/browser_profiles.");
1030
+ case "unknown":
1031
+ throw new errors.SkyvernError({
1032
+ message: _response.error.errorMessage,
1033
+ rawResponse: _response.rawResponse,
1034
+ });
1035
+ }
1036
+ });
1037
+ }
1038
+ /**
1039
+ * Get a specific browser profile by ID
1040
+ *
1041
+ * @param {string} profileId - The ID of the browser profile. browser_profile_id starts with `bp_`
1042
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
1043
+ *
1044
+ * @throws {@link Skyvern.NotFoundError}
1045
+ * @throws {@link Skyvern.UnprocessableEntityError}
1046
+ *
1047
+ * @example
1048
+ * await client.getBrowserProfile("bp_123456")
1049
+ */
1050
+ getBrowserProfile(profileId, requestOptions) {
1051
+ return core.HttpResponsePromise.fromPromise(this.__getBrowserProfile(profileId, requestOptions));
1052
+ }
1053
+ __getBrowserProfile(profileId, requestOptions) {
1054
+ return __awaiter(this, void 0, void 0, function* () {
1055
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1056
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "x-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1057
+ const _response = yield core.fetcher({
1058
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SkyvernEnvironment.Cloud, `v1/browser_profiles/${core.url.encodePathParam(profileId)}`),
1059
+ method: "GET",
1060
+ headers: _headers,
1061
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1062
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
1063
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
1064
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1065
+ });
1066
+ if (_response.ok) {
1067
+ return { data: _response.body, rawResponse: _response.rawResponse };
1068
+ }
1069
+ if (_response.error.reason === "status-code") {
1070
+ switch (_response.error.statusCode) {
1071
+ case 404:
1072
+ throw new Skyvern.NotFoundError(_response.error.body, _response.rawResponse);
1073
+ case 422:
1074
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1075
+ default:
1076
+ throw new errors.SkyvernError({
1077
+ statusCode: _response.error.statusCode,
1078
+ body: _response.error.body,
1079
+ rawResponse: _response.rawResponse,
1080
+ });
1081
+ }
1082
+ }
1083
+ switch (_response.error.reason) {
1084
+ case "non-json":
1085
+ throw new errors.SkyvernError({
1086
+ statusCode: _response.error.statusCode,
1087
+ body: _response.error.rawBody,
1088
+ rawResponse: _response.rawResponse,
1089
+ });
1090
+ case "timeout":
1091
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/browser_profiles/{profile_id}.");
1092
+ case "unknown":
1093
+ throw new errors.SkyvernError({
1094
+ message: _response.error.errorMessage,
1095
+ rawResponse: _response.rawResponse,
1096
+ });
1097
+ }
1098
+ });
1099
+ }
1100
+ /**
1101
+ * Delete a browser profile (soft delete)
1102
+ *
1103
+ * @param {string} profileId - The ID of the browser profile to delete. browser_profile_id starts with `bp_`
1104
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
1105
+ *
1106
+ * @throws {@link Skyvern.NotFoundError}
1107
+ * @throws {@link Skyvern.UnprocessableEntityError}
1108
+ *
1109
+ * @example
1110
+ * await client.deleteBrowserProfile("bp_123456")
1111
+ */
1112
+ deleteBrowserProfile(profileId, requestOptions) {
1113
+ return core.HttpResponsePromise.fromPromise(this.__deleteBrowserProfile(profileId, requestOptions));
1114
+ }
1115
+ __deleteBrowserProfile(profileId, requestOptions) {
1116
+ return __awaiter(this, void 0, void 0, function* () {
1117
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1118
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "x-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1119
+ const _response = yield core.fetcher({
1120
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SkyvernEnvironment.Cloud, `v1/browser_profiles/${core.url.encodePathParam(profileId)}`),
1121
+ method: "DELETE",
1122
+ headers: _headers,
1123
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1124
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
1125
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
1126
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1127
+ });
1128
+ if (_response.ok) {
1129
+ return { data: undefined, rawResponse: _response.rawResponse };
1130
+ }
1131
+ if (_response.error.reason === "status-code") {
1132
+ switch (_response.error.statusCode) {
1133
+ case 404:
1134
+ throw new Skyvern.NotFoundError(_response.error.body, _response.rawResponse);
1135
+ case 422:
1136
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1137
+ default:
1138
+ throw new errors.SkyvernError({
1139
+ statusCode: _response.error.statusCode,
1140
+ body: _response.error.body,
1141
+ rawResponse: _response.rawResponse,
1142
+ });
1143
+ }
1144
+ }
1145
+ switch (_response.error.reason) {
1146
+ case "non-json":
1147
+ throw new errors.SkyvernError({
1148
+ statusCode: _response.error.statusCode,
1149
+ body: _response.error.rawBody,
1150
+ rawResponse: _response.rawResponse,
1151
+ });
1152
+ case "timeout":
1153
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling DELETE /v1/browser_profiles/{profile_id}.");
1154
+ case "unknown":
1155
+ throw new errors.SkyvernError({
1156
+ message: _response.error.errorMessage,
1157
+ rawResponse: _response.rawResponse,
1158
+ });
1159
+ }
1160
+ });
1161
+ }
912
1162
  /**
913
1163
  * Get all active browser sessions for the organization
914
1164
  *
@@ -1549,6 +1799,70 @@ class SkyvernClient {
1549
1799
  }
1550
1800
  });
1551
1801
  }
1802
+ /**
1803
+ * Download a file from a website by navigating and clicking download buttons
1804
+ *
1805
+ * @param {Skyvern.DownloadFilesRequest} request
1806
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
1807
+ *
1808
+ * @throws {@link Skyvern.UnprocessableEntityError}
1809
+ *
1810
+ * @example
1811
+ * await client.downloadFiles({
1812
+ * navigation_goal: "navigation_goal"
1813
+ * })
1814
+ */
1815
+ downloadFiles(request, requestOptions) {
1816
+ return core.HttpResponsePromise.fromPromise(this.__downloadFiles(request, requestOptions));
1817
+ }
1818
+ __downloadFiles(request, requestOptions) {
1819
+ return __awaiter(this, void 0, void 0, function* () {
1820
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1821
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "x-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1822
+ const _response = yield core.fetcher({
1823
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SkyvernEnvironment.Cloud, "v1/run/tasks/download_files"),
1824
+ method: "POST",
1825
+ headers: _headers,
1826
+ contentType: "application/json",
1827
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1828
+ requestType: "json",
1829
+ body: request,
1830
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
1831
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
1832
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1833
+ });
1834
+ if (_response.ok) {
1835
+ return { data: _response.body, rawResponse: _response.rawResponse };
1836
+ }
1837
+ if (_response.error.reason === "status-code") {
1838
+ switch (_response.error.statusCode) {
1839
+ case 422:
1840
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1841
+ default:
1842
+ throw new errors.SkyvernError({
1843
+ statusCode: _response.error.statusCode,
1844
+ body: _response.error.body,
1845
+ rawResponse: _response.rawResponse,
1846
+ });
1847
+ }
1848
+ }
1849
+ switch (_response.error.reason) {
1850
+ case "non-json":
1851
+ throw new errors.SkyvernError({
1852
+ statusCode: _response.error.statusCode,
1853
+ body: _response.error.rawBody,
1854
+ rawResponse: _response.rawResponse,
1855
+ });
1856
+ case "timeout":
1857
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/run/tasks/download_files.");
1858
+ case "unknown":
1859
+ throw new errors.SkyvernError({
1860
+ message: _response.error.errorMessage,
1861
+ rawResponse: _response.rawResponse,
1862
+ });
1863
+ }
1864
+ });
1865
+ }
1552
1866
  /**
1553
1867
  * Retrieves a paginated list of scripts for the current organization
1554
1868
  *
@@ -23,5 +23,5 @@ export declare namespace CreateCredentialRequest {
23
23
  /**
24
24
  * The credential data to store
25
25
  */
26
- type Credential = Skyvern.NonEmptyPasswordCredential | Skyvern.NonEmptyCreditCardCredential;
26
+ type Credential = Skyvern.NonEmptyPasswordCredential | Skyvern.NonEmptyCreditCardCredential | Skyvern.SecretCredential;
27
27
  }
@@ -0,0 +1,37 @@
1
+ import type * as Skyvern from "../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * navigation_goal: "navigation_goal"
6
+ * }
7
+ */
8
+ export interface DownloadFilesRequest {
9
+ /** Website URL */
10
+ url?: string;
11
+ /** Webhook URL to send status updates */
12
+ webhook_url?: string;
13
+ /** Proxy location to use */
14
+ proxy_location?: Skyvern.ProxyLocation;
15
+ /** Identifier for TOTP (Time-based One-Time Password) if required */
16
+ totp_identifier?: string;
17
+ /** TOTP URL to fetch one-time passwords */
18
+ totp_url?: string;
19
+ /** ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456` */
20
+ browser_session_id?: string;
21
+ /** ID of a browser profile to reuse for this run */
22
+ browser_profile_id?: string;
23
+ /** The CDP address for the task. */
24
+ browser_address?: string;
25
+ /** Additional HTTP headers to include in requests */
26
+ extra_http_headers?: Record<string, string | undefined>;
27
+ /** Maximum number of times to scroll for screenshots */
28
+ max_screenshot_scrolling_times?: number;
29
+ /** Instructions for navigating to and downloading the file */
30
+ navigation_goal: string;
31
+ /** Suffix or complete filename for the downloaded file */
32
+ download_suffix?: string;
33
+ /** Timeout in seconds for the download operation */
34
+ download_timeout?: number;
35
+ /** Maximum number of steps to execute */
36
+ max_steps_per_run?: number;
37
+ }
@@ -4,7 +4,7 @@
4
4
  * include_deleted: true
5
5
  * }
6
6
  */
7
- export interface ListBrowserProfilesV1BrowserProfilesGetRequest {
7
+ export interface ListBrowserProfilesRequest {
8
8
  /** Include deleted browser profiles */
9
9
  include_deleted?: boolean;
10
10
  }
@@ -6,13 +6,9 @@ import type * as Skyvern from "../../index.js";
6
6
  * }
7
7
  */
8
8
  export interface LoginRequest {
9
- /** Where to get the credential from */
10
- credential_type: Skyvern.SkyvernSchemasRunBlocksCredentialType;
11
- /** Website url */
9
+ /** Website URL */
12
10
  url?: string;
13
- /** Login instructions. Skyvern has default prompt/instruction for login if this field is not provided. */
14
- prompt?: string;
15
- /** Webhook URL to send login status updates */
11
+ /** Webhook URL to send status updates */
16
12
  webhook_url?: string;
17
13
  /** Proxy location to use */
18
14
  proxy_location?: Skyvern.ProxyLocation;
@@ -22,12 +18,18 @@ export interface LoginRequest {
22
18
  totp_url?: string;
23
19
  /** ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456` */
24
20
  browser_session_id?: string;
21
+ /** ID of a browser profile to reuse for this run */
22
+ browser_profile_id?: string;
25
23
  /** The CDP address for the task. */
26
24
  browser_address?: string;
27
25
  /** Additional HTTP headers to include in requests */
28
26
  extra_http_headers?: Record<string, string | undefined>;
29
27
  /** Maximum number of times to scroll for screenshots */
30
28
  max_screenshot_scrolling_times?: number;
29
+ /** Where to get the credential from */
30
+ credential_type: Skyvern.SkyvernSchemasRunBlocksCredentialType;
31
+ /** Login instructions. Skyvern has default prompt/instruction for login if this field is not provided. */
32
+ prompt?: string;
31
33
  /** ID of the Skyvern credential to use for login. */
32
34
  credential_id?: string;
33
35
  /** Bitwarden collection ID. You can find it in the Bitwarden collection URL. e.g. `https://vault.bitwarden.com/vaults/collection_id/items` */
@@ -1,12 +1,15 @@
1
+ export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.js";
1
2
  export type { CreateBrowserSessionRequest } from "./CreateBrowserSessionRequest.js";
2
3
  export type { CreateCredentialRequest } from "./CreateCredentialRequest.js";
3
4
  export type { CreateScriptRequest } from "./CreateScriptRequest.js";
4
5
  export type { CreateWorkflowRequest } from "./CreateWorkflowRequest.js";
5
6
  export type { DeployScriptRequest } from "./DeployScriptRequest.js";
7
+ export type { DownloadFilesRequest } from "./DownloadFilesRequest.js";
6
8
  export type { GetCredentialsRequest } from "./GetCredentialsRequest.js";
7
9
  export type { GetRunArtifactsRequest } from "./GetRunArtifactsRequest.js";
8
10
  export type { GetScriptsRequest } from "./GetScriptsRequest.js";
9
11
  export type { GetWorkflowsRequest } from "./GetWorkflowsRequest.js";
12
+ export type { ListBrowserProfilesRequest } from "./ListBrowserProfilesRequest.js";
10
13
  export type { LoginRequest } from "./LoginRequest.js";
11
14
  export type { RunSdkActionRequest } from "./RunSdkActionRequest.js";
12
15
  export type { RunTaskRequest } from "./RunTaskRequest.js";
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ export declare class ConflictError extends errors.SkyvernError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ConflictError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class ConflictError extends errors.SkyvernError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "ConflictError",
43
+ statusCode: 409,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, ConflictError.prototype);
48
+ }
49
+ }
50
+ exports.ConflictError = ConflictError;