@skyvern/client 0.2.23 → 1.0.2

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 (184) hide show
  1. package/README.md +18 -1
  2. package/dist/cjs/Client.d.ts +60 -3
  3. package/dist/cjs/Client.js +266 -11
  4. package/dist/cjs/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.d.ts → client/requests/ListBrowserProfilesRequest.d.ts} +1 -1
  5. package/dist/cjs/api/client/requests/LoginRequest.d.ts +2 -0
  6. package/dist/cjs/api/client/requests/index.d.ts +2 -0
  7. package/dist/cjs/api/errors/ConflictError.d.ts +5 -0
  8. package/dist/cjs/api/errors/ConflictError.js +50 -0
  9. package/dist/cjs/api/errors/index.d.ts +1 -0
  10. package/dist/cjs/api/errors/index.js +1 -0
  11. package/dist/cjs/api/resources/index.d.ts +0 -2
  12. package/dist/cjs/api/resources/index.js +4 -6
  13. package/dist/cjs/api/types/ActionBlock.d.ts +3 -1
  14. package/dist/cjs/api/types/ActionBlockYaml.d.ts +3 -1
  15. package/dist/cjs/api/types/BlockType.d.ts +1 -0
  16. package/dist/cjs/api/types/BlockType.js +1 -0
  17. package/dist/cjs/api/types/BranchCondition.d.ts +10 -0
  18. package/dist/cjs/api/{resources/browserProfiles/client/requests/index.js → types/BranchCondition.js} +1 -0
  19. package/dist/cjs/api/types/BranchCriteria.d.ts +8 -0
  20. package/dist/cjs/api/types/BranchCriteria.js +3 -0
  21. package/dist/cjs/api/types/CodeBlock.d.ts +3 -0
  22. package/dist/cjs/api/types/CodeBlockYaml.d.ts +3 -0
  23. package/dist/cjs/api/types/ConditionalBlock.d.ts +15 -0
  24. package/dist/cjs/api/types/ConditionalBlock.js +3 -0
  25. package/dist/cjs/api/types/DownloadToS3Block.d.ts +3 -0
  26. package/dist/cjs/api/types/DownloadToS3BlockYaml.d.ts +3 -0
  27. package/dist/cjs/api/types/ExtractionBlock.d.ts +3 -1
  28. package/dist/cjs/api/types/ExtractionBlockYaml.d.ts +3 -1
  29. package/dist/cjs/api/types/FileDownloadBlock.d.ts +3 -1
  30. package/dist/cjs/api/types/FileDownloadBlockYaml.d.ts +3 -1
  31. package/dist/cjs/api/types/FileParserBlock.d.ts +3 -0
  32. package/dist/cjs/api/types/FileParserBlockYaml.d.ts +3 -0
  33. package/dist/cjs/api/types/FileUploadBlock.d.ts +3 -0
  34. package/dist/cjs/api/types/FileUploadBlockYaml.d.ts +3 -0
  35. package/dist/cjs/api/types/ForLoopBlock.d.ts +3 -0
  36. package/dist/cjs/api/types/ForLoopBlockLoopBlocksItem.d.ts +4 -1
  37. package/dist/cjs/api/types/ForLoopBlockYaml.d.ts +3 -0
  38. package/dist/cjs/api/types/GeoTarget.d.ts +21 -0
  39. package/dist/cjs/api/types/GeoTarget.js +3 -0
  40. package/dist/cjs/api/types/HttpRequestBlock.d.ts +3 -0
  41. package/dist/cjs/api/types/HttpRequestBlockYaml.d.ts +3 -0
  42. package/dist/cjs/api/types/HumanInteractionBlock.d.ts +3 -1
  43. package/dist/cjs/api/types/HumanInteractionBlockYaml.d.ts +3 -0
  44. package/dist/cjs/api/types/LocateElementAction.d.ts +7 -0
  45. package/dist/cjs/api/types/LocateElementAction.js +3 -0
  46. package/dist/cjs/api/types/LoginBlock.d.ts +3 -1
  47. package/dist/cjs/api/types/LoginBlockYaml.d.ts +3 -1
  48. package/dist/cjs/api/types/NavigationBlock.d.ts +3 -1
  49. package/dist/cjs/api/types/NavigationBlockYaml.d.ts +3 -1
  50. package/dist/cjs/api/types/NonEmptyPasswordCredential.d.ts +2 -0
  51. package/dist/cjs/api/types/PasswordCredentialResponse.d.ts +2 -0
  52. package/dist/cjs/api/types/PdfParserBlock.d.ts +3 -0
  53. package/dist/cjs/api/types/PdfParserBlockYaml.d.ts +3 -0
  54. package/dist/cjs/api/types/RunSdkActionRequestAction.d.ts +4 -1
  55. package/dist/cjs/api/types/SendEmailBlock.d.ts +3 -0
  56. package/dist/cjs/api/types/SendEmailBlockYaml.d.ts +3 -0
  57. package/dist/cjs/api/types/TaskBlock.d.ts +3 -1
  58. package/dist/cjs/api/types/TaskBlockYaml.d.ts +3 -1
  59. package/dist/cjs/api/types/TaskRunRequest.d.ts +29 -1
  60. package/dist/cjs/api/types/TaskV2Block.d.ts +3 -0
  61. package/dist/cjs/api/types/TaskV2BlockYaml.d.ts +3 -0
  62. package/dist/cjs/api/types/TextPromptBlock.d.ts +3 -0
  63. package/dist/cjs/api/types/TextPromptBlockYaml.d.ts +3 -0
  64. package/dist/cjs/api/types/UploadToS3Block.d.ts +3 -0
  65. package/dist/cjs/api/types/UploadToS3BlockYaml.d.ts +3 -0
  66. package/dist/cjs/api/types/UrlBlock.d.ts +3 -1
  67. package/dist/cjs/api/types/UrlBlockYaml.d.ts +3 -0
  68. package/dist/cjs/api/types/ValidationBlock.d.ts +3 -1
  69. package/dist/cjs/api/types/ValidationBlockYaml.d.ts +3 -0
  70. package/dist/cjs/api/types/WaitBlock.d.ts +3 -0
  71. package/dist/cjs/api/types/WaitBlockYaml.d.ts +3 -0
  72. package/dist/cjs/api/types/Workflow.d.ts +4 -1
  73. package/dist/cjs/api/types/WorkflowCreateYamlRequest.d.ts +4 -1
  74. package/dist/cjs/api/types/WorkflowDefinition.d.ts +1 -0
  75. package/dist/cjs/api/types/WorkflowDefinitionBlocksItem.d.ts +4 -1
  76. package/dist/cjs/api/types/WorkflowDefinitionYaml.d.ts +1 -0
  77. package/dist/cjs/api/types/WorkflowRunRequest.d.ts +31 -1
  78. package/dist/cjs/api/types/index.d.ts +5 -0
  79. package/dist/cjs/api/types/index.js +5 -0
  80. package/dist/cjs/version.d.ts +1 -1
  81. package/dist/cjs/version.js +1 -1
  82. package/dist/esm/Client.d.mts +60 -3
  83. package/dist/esm/Client.mjs +262 -7
  84. package/dist/esm/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.d.mts → client/requests/ListBrowserProfilesRequest.d.mts} +1 -1
  85. package/dist/esm/api/client/requests/LoginRequest.d.mts +2 -0
  86. package/dist/esm/api/client/requests/index.d.mts +2 -0
  87. package/dist/esm/api/errors/ConflictError.d.mts +5 -0
  88. package/dist/esm/api/errors/ConflictError.mjs +13 -0
  89. package/dist/esm/api/errors/index.d.mts +1 -0
  90. package/dist/esm/api/errors/index.mjs +1 -0
  91. package/dist/esm/api/resources/index.d.mts +0 -2
  92. package/dist/esm/api/resources/index.mjs +0 -2
  93. package/dist/esm/api/types/ActionBlock.d.mts +3 -1
  94. package/dist/esm/api/types/ActionBlockYaml.d.mts +3 -1
  95. package/dist/esm/api/types/BlockType.d.mts +1 -0
  96. package/dist/esm/api/types/BlockType.mjs +1 -0
  97. package/dist/esm/api/types/BranchCondition.d.mts +10 -0
  98. package/dist/esm/api/types/BranchCondition.mjs +2 -0
  99. package/dist/esm/api/types/BranchCriteria.d.mts +8 -0
  100. package/dist/esm/api/types/BranchCriteria.mjs +2 -0
  101. package/dist/esm/api/types/CodeBlock.d.mts +3 -0
  102. package/dist/esm/api/types/CodeBlockYaml.d.mts +3 -0
  103. package/dist/esm/api/types/ConditionalBlock.d.mts +15 -0
  104. package/dist/esm/api/types/ConditionalBlock.mjs +2 -0
  105. package/dist/esm/api/types/DownloadToS3Block.d.mts +3 -0
  106. package/dist/esm/api/types/DownloadToS3BlockYaml.d.mts +3 -0
  107. package/dist/esm/api/types/ExtractionBlock.d.mts +3 -1
  108. package/dist/esm/api/types/ExtractionBlockYaml.d.mts +3 -1
  109. package/dist/esm/api/types/FileDownloadBlock.d.mts +3 -1
  110. package/dist/esm/api/types/FileDownloadBlockYaml.d.mts +3 -1
  111. package/dist/esm/api/types/FileParserBlock.d.mts +3 -0
  112. package/dist/esm/api/types/FileParserBlockYaml.d.mts +3 -0
  113. package/dist/esm/api/types/FileUploadBlock.d.mts +3 -0
  114. package/dist/esm/api/types/FileUploadBlockYaml.d.mts +3 -0
  115. package/dist/esm/api/types/ForLoopBlock.d.mts +3 -0
  116. package/dist/esm/api/types/ForLoopBlockLoopBlocksItem.d.mts +4 -1
  117. package/dist/esm/api/types/ForLoopBlockYaml.d.mts +3 -0
  118. package/dist/esm/api/types/GeoTarget.d.mts +21 -0
  119. package/dist/esm/api/types/GeoTarget.mjs +2 -0
  120. package/dist/esm/api/types/HttpRequestBlock.d.mts +3 -0
  121. package/dist/esm/api/types/HttpRequestBlockYaml.d.mts +3 -0
  122. package/dist/esm/api/types/HumanInteractionBlock.d.mts +3 -1
  123. package/dist/esm/api/types/HumanInteractionBlockYaml.d.mts +3 -0
  124. package/dist/esm/api/types/LocateElementAction.d.mts +7 -0
  125. package/dist/esm/api/types/LocateElementAction.mjs +2 -0
  126. package/dist/esm/api/types/LoginBlock.d.mts +3 -1
  127. package/dist/esm/api/types/LoginBlockYaml.d.mts +3 -1
  128. package/dist/esm/api/types/NavigationBlock.d.mts +3 -1
  129. package/dist/esm/api/types/NavigationBlockYaml.d.mts +3 -1
  130. package/dist/esm/api/types/NonEmptyPasswordCredential.d.mts +2 -0
  131. package/dist/esm/api/types/PasswordCredentialResponse.d.mts +2 -0
  132. package/dist/esm/api/types/PdfParserBlock.d.mts +3 -0
  133. package/dist/esm/api/types/PdfParserBlockYaml.d.mts +3 -0
  134. package/dist/esm/api/types/RunSdkActionRequestAction.d.mts +4 -1
  135. package/dist/esm/api/types/SendEmailBlock.d.mts +3 -0
  136. package/dist/esm/api/types/SendEmailBlockYaml.d.mts +3 -0
  137. package/dist/esm/api/types/TaskBlock.d.mts +3 -1
  138. package/dist/esm/api/types/TaskBlockYaml.d.mts +3 -1
  139. package/dist/esm/api/types/TaskRunRequest.d.mts +29 -1
  140. package/dist/esm/api/types/TaskV2Block.d.mts +3 -0
  141. package/dist/esm/api/types/TaskV2BlockYaml.d.mts +3 -0
  142. package/dist/esm/api/types/TextPromptBlock.d.mts +3 -0
  143. package/dist/esm/api/types/TextPromptBlockYaml.d.mts +3 -0
  144. package/dist/esm/api/types/UploadToS3Block.d.mts +3 -0
  145. package/dist/esm/api/types/UploadToS3BlockYaml.d.mts +3 -0
  146. package/dist/esm/api/types/UrlBlock.d.mts +3 -1
  147. package/dist/esm/api/types/UrlBlockYaml.d.mts +3 -0
  148. package/dist/esm/api/types/ValidationBlock.d.mts +3 -1
  149. package/dist/esm/api/types/ValidationBlockYaml.d.mts +3 -0
  150. package/dist/esm/api/types/WaitBlock.d.mts +3 -0
  151. package/dist/esm/api/types/WaitBlockYaml.d.mts +3 -0
  152. package/dist/esm/api/types/Workflow.d.mts +4 -1
  153. package/dist/esm/api/types/WorkflowCreateYamlRequest.d.mts +4 -1
  154. package/dist/esm/api/types/WorkflowDefinition.d.mts +1 -0
  155. package/dist/esm/api/types/WorkflowDefinitionBlocksItem.d.mts +4 -1
  156. package/dist/esm/api/types/WorkflowDefinitionYaml.d.mts +1 -0
  157. package/dist/esm/api/types/WorkflowRunRequest.d.mts +31 -1
  158. package/dist/esm/api/types/index.d.mts +5 -0
  159. package/dist/esm/api/types/index.mjs +5 -0
  160. package/dist/esm/version.d.mts +1 -1
  161. package/dist/esm/version.mjs +1 -1
  162. package/package.json +1 -1
  163. package/reference.md +0 -243
  164. package/dist/cjs/api/resources/browserProfiles/client/Client.d.ts +0 -69
  165. package/dist/cjs/api/resources/browserProfiles/client/Client.js +0 -309
  166. package/dist/cjs/api/resources/browserProfiles/client/index.d.ts +0 -1
  167. package/dist/cjs/api/resources/browserProfiles/client/index.js +0 -17
  168. package/dist/cjs/api/resources/browserProfiles/client/requests/index.d.ts +0 -2
  169. package/dist/cjs/api/resources/browserProfiles/index.d.ts +0 -1
  170. package/dist/cjs/api/resources/browserProfiles/index.js +0 -17
  171. package/dist/esm/api/resources/browserProfiles/client/Client.d.mts +0 -69
  172. package/dist/esm/api/resources/browserProfiles/client/Client.mjs +0 -272
  173. package/dist/esm/api/resources/browserProfiles/client/index.d.mts +0 -1
  174. package/dist/esm/api/resources/browserProfiles/client/index.mjs +0 -1
  175. package/dist/esm/api/resources/browserProfiles/client/requests/index.d.mts +0 -2
  176. package/dist/esm/api/resources/browserProfiles/client/requests/index.mjs +0 -1
  177. package/dist/esm/api/resources/browserProfiles/index.d.mts +0 -1
  178. package/dist/esm/api/resources/browserProfiles/index.mjs +0 -1
  179. /package/dist/cjs/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.d.ts +0 -0
  180. /package/dist/cjs/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.js +0 -0
  181. /package/dist/cjs/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.js → client/requests/ListBrowserProfilesRequest.js} +0 -0
  182. /package/dist/esm/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.d.mts +0 -0
  183. /package/dist/esm/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.mjs +0 -0
  184. /package/dist/esm/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.mjs → client/requests/ListBrowserProfilesRequest.mjs} +0 -0
@@ -1,5 +1,8 @@
1
1
  export interface UrlBlockYaml {
2
+ /** Author-facing identifier; must be unique per workflow. */
2
3
  label: string;
4
+ /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
5
+ next_block_label?: string;
3
6
  continue_on_failure?: boolean;
4
7
  model?: Record<string, unknown>;
5
8
  url: string;
@@ -1,6 +1,9 @@
1
1
  import type * as Skyvern from "../index.js";
2
2
  export interface ValidationBlock {
3
+ /** Author-facing identifier for a block; unique within a workflow. */
3
4
  label: string;
5
+ /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
6
+ next_block_label?: string;
4
7
  output_parameter: Skyvern.OutputParameter;
5
8
  continue_on_failure?: boolean;
6
9
  model?: Record<string, unknown>;
@@ -22,7 +25,6 @@ export interface ValidationBlock {
22
25
  download_suffix?: string;
23
26
  totp_verification_url?: string;
24
27
  totp_identifier?: string;
25
- cache_actions?: boolean;
26
28
  complete_verification?: boolean;
27
29
  include_action_history_in_verification?: boolean;
28
30
  download_timeout?: number;
@@ -1,5 +1,8 @@
1
1
  export interface ValidationBlockYaml {
2
+ /** Author-facing identifier; must be unique per workflow. */
2
3
  label: string;
4
+ /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
5
+ next_block_label?: string;
3
6
  continue_on_failure?: boolean;
4
7
  model?: Record<string, unknown>;
5
8
  complete_criterion?: string;
@@ -1,6 +1,9 @@
1
1
  import type * as Skyvern from "../index.js";
2
2
  export interface WaitBlock {
3
+ /** Author-facing identifier for a block; unique within a workflow. */
3
4
  label: string;
5
+ /** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
6
+ next_block_label?: string;
4
7
  output_parameter: Skyvern.OutputParameter;
5
8
  continue_on_failure?: boolean;
6
9
  model?: Record<string, unknown>;
@@ -1,5 +1,8 @@
1
1
  export interface WaitBlockYaml {
2
+ /** Author-facing identifier; must be unique per workflow. */
2
3
  label: string;
4
+ /** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
5
+ next_block_label?: string;
3
6
  continue_on_failure?: boolean;
4
7
  model?: Record<string, unknown>;
5
8
  wait_sec?: number;
@@ -8,7 +8,7 @@ export interface Workflow {
8
8
  is_saved_task: boolean;
9
9
  description?: string;
10
10
  workflow_definition: Skyvern.WorkflowDefinition;
11
- proxy_location?: Skyvern.ProxyLocation;
11
+ proxy_location?: Workflow.ProxyLocation;
12
12
  webhook_callback_url?: string;
13
13
  totp_verification_url?: string;
14
14
  totp_identifier?: string;
@@ -28,3 +28,6 @@ export interface Workflow {
28
28
  modified_at: string;
29
29
  deleted_at?: string;
30
30
  }
31
+ export declare namespace Workflow {
32
+ type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
33
+ }
@@ -2,7 +2,7 @@ import type * as Skyvern from "../index.js";
2
2
  export interface WorkflowCreateYamlRequest {
3
3
  title: string;
4
4
  description?: string;
5
- proxy_location?: Skyvern.ProxyLocation;
5
+ proxy_location?: WorkflowCreateYamlRequest.ProxyLocation;
6
6
  webhook_callback_url?: string;
7
7
  totp_verification_url?: string;
8
8
  totp_identifier?: string;
@@ -20,3 +20,6 @@ export interface WorkflowCreateYamlRequest {
20
20
  sequential_key?: string;
21
21
  folder_id?: string;
22
22
  }
23
+ export declare namespace WorkflowCreateYamlRequest {
24
+ type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
25
+ }
@@ -1,5 +1,6 @@
1
1
  import type * as Skyvern from "../index.js";
2
2
  export interface WorkflowDefinition {
3
+ version?: number;
3
4
  parameters: Skyvern.WorkflowDefinitionParametersItem[];
4
5
  blocks: Skyvern.WorkflowDefinitionBlocksItem[];
5
6
  }
@@ -1,5 +1,5 @@
1
1
  import type * as Skyvern from "../index.js";
2
- export type WorkflowDefinitionBlocksItem = Skyvern.WorkflowDefinitionBlocksItem.Action | Skyvern.WorkflowDefinitionBlocksItem.Code | Skyvern.WorkflowDefinitionBlocksItem.DownloadToS3 | Skyvern.WorkflowDefinitionBlocksItem.Extraction | Skyvern.WorkflowDefinitionBlocksItem.FileDownload | Skyvern.WorkflowDefinitionBlocksItem.FileUpload | Skyvern.WorkflowDefinitionBlocksItem.FileUrlParser | Skyvern.WorkflowDefinitionBlocksItem.ForLoop | Skyvern.WorkflowDefinitionBlocksItem.GotoUrl | Skyvern.WorkflowDefinitionBlocksItem.HttpRequest | Skyvern.WorkflowDefinitionBlocksItem.HumanInteraction | Skyvern.WorkflowDefinitionBlocksItem.Login | Skyvern.WorkflowDefinitionBlocksItem.Navigation | Skyvern.WorkflowDefinitionBlocksItem.PdfParser | Skyvern.WorkflowDefinitionBlocksItem.SendEmail | Skyvern.WorkflowDefinitionBlocksItem.Task | Skyvern.WorkflowDefinitionBlocksItem.TaskV2 | Skyvern.WorkflowDefinitionBlocksItem.TextPrompt | Skyvern.WorkflowDefinitionBlocksItem.UploadToS3 | Skyvern.WorkflowDefinitionBlocksItem.Validation | Skyvern.WorkflowDefinitionBlocksItem.Wait;
2
+ export type WorkflowDefinitionBlocksItem = Skyvern.WorkflowDefinitionBlocksItem.Action | Skyvern.WorkflowDefinitionBlocksItem.Code | Skyvern.WorkflowDefinitionBlocksItem.Conditional | Skyvern.WorkflowDefinitionBlocksItem.DownloadToS3 | Skyvern.WorkflowDefinitionBlocksItem.Extraction | Skyvern.WorkflowDefinitionBlocksItem.FileDownload | Skyvern.WorkflowDefinitionBlocksItem.FileUpload | Skyvern.WorkflowDefinitionBlocksItem.FileUrlParser | Skyvern.WorkflowDefinitionBlocksItem.ForLoop | Skyvern.WorkflowDefinitionBlocksItem.GotoUrl | Skyvern.WorkflowDefinitionBlocksItem.HttpRequest | Skyvern.WorkflowDefinitionBlocksItem.HumanInteraction | Skyvern.WorkflowDefinitionBlocksItem.Login | Skyvern.WorkflowDefinitionBlocksItem.Navigation | Skyvern.WorkflowDefinitionBlocksItem.PdfParser | Skyvern.WorkflowDefinitionBlocksItem.SendEmail | Skyvern.WorkflowDefinitionBlocksItem.Task | Skyvern.WorkflowDefinitionBlocksItem.TaskV2 | Skyvern.WorkflowDefinitionBlocksItem.TextPrompt | Skyvern.WorkflowDefinitionBlocksItem.UploadToS3 | Skyvern.WorkflowDefinitionBlocksItem.Validation | Skyvern.WorkflowDefinitionBlocksItem.Wait;
3
3
  export declare namespace WorkflowDefinitionBlocksItem {
4
4
  interface Action extends Skyvern.ActionBlock {
5
5
  block_type: "action";
@@ -7,6 +7,9 @@ export declare namespace WorkflowDefinitionBlocksItem {
7
7
  interface Code extends Skyvern.CodeBlock {
8
8
  block_type: "code";
9
9
  }
10
+ interface Conditional extends Skyvern.ConditionalBlock {
11
+ block_type: "conditional";
12
+ }
10
13
  interface DownloadToS3 extends Skyvern.DownloadToS3Block {
11
14
  block_type: "download_to_s3";
12
15
  }
@@ -1,5 +1,6 @@
1
1
  import type * as Skyvern from "../index.js";
2
2
  export interface WorkflowDefinitionYaml {
3
+ version?: number;
3
4
  parameters: Skyvern.WorkflowDefinitionYamlParametersItem[];
4
5
  blocks: Skyvern.WorkflowDefinitionYamlBlocksItem[];
5
6
  }
@@ -29,8 +29,9 @@ export interface WorkflowRunRequest {
29
29
  * - US-FL: Florida
30
30
  * - US-WA: Washington
31
31
  * - NONE: No proxy
32
+ * Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
32
33
  */
33
- proxy_location?: Skyvern.ProxyLocation;
34
+ proxy_location?: WorkflowRunRequest.ProxyLocation;
34
35
  /** URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions. */
35
36
  webhook_url?: string;
36
37
  /**
@@ -56,3 +57,32 @@ export interface WorkflowRunRequest {
56
57
  /** Whether to run the workflow with agent or code. */
57
58
  run_with?: string;
58
59
  }
60
+ export declare namespace WorkflowRunRequest {
61
+ /**
62
+ *
63
+ * Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
64
+ *
65
+ * Available geotargeting options:
66
+ * - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.
67
+ * - RESIDENTIAL_ES: Spain
68
+ * - RESIDENTIAL_IE: Ireland
69
+ * - RESIDENTIAL_GB: United Kingdom
70
+ * - RESIDENTIAL_IN: India
71
+ * - RESIDENTIAL_JP: Japan
72
+ * - RESIDENTIAL_FR: France
73
+ * - RESIDENTIAL_DE: Germany
74
+ * - RESIDENTIAL_NZ: New Zealand
75
+ * - RESIDENTIAL_ZA: South Africa
76
+ * - RESIDENTIAL_AR: Argentina
77
+ * - RESIDENTIAL_AU: Australia
78
+ * - RESIDENTIAL_ISP: ISP proxy
79
+ * - US-CA: California
80
+ * - US-NY: New York
81
+ * - US-TX: Texas
82
+ * - US-FL: Florida
83
+ * - US-WA: Washington
84
+ * - NONE: No proxy
85
+ * Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
86
+ */
87
+ type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
88
+ }
@@ -19,6 +19,8 @@ export * from "./BitwardenLoginCredentialParameterYaml.js";
19
19
  export * from "./BitwardenSensitiveInformationParameter.js";
20
20
  export * from "./BitwardenSensitiveInformationParameterYaml.js";
21
21
  export * from "./BlockType.js";
22
+ export * from "./BranchCondition.js";
23
+ export * from "./BranchCriteria.js";
22
24
  export * from "./BrowserProfile.js";
23
25
  export * from "./BrowserSessionResponse.js";
24
26
  export * from "./ClickAction.js";
@@ -26,6 +28,7 @@ export * from "./ClickContext.js";
26
28
  export * from "./CodeBlock.js";
27
29
  export * from "./CodeBlockParametersItem.js";
28
30
  export * from "./CodeBlockYaml.js";
31
+ export * from "./ConditionalBlock.js";
29
32
  export * from "./ContextParameter.js";
30
33
  export * from "./ContextParameterSource.js";
31
34
  export * from "./ContextParameterYaml.js";
@@ -59,6 +62,7 @@ export * from "./ForLoopBlockLoopBlocksItem.js";
59
62
  export * from "./ForLoopBlockLoopOver.js";
60
63
  export * from "./ForLoopBlockYaml.js";
61
64
  export * from "./ForLoopBlockYamlLoopBlocksItem.js";
65
+ export * from "./GeoTarget.js";
62
66
  export * from "./GetRunResponse.js";
63
67
  export * from "./HttpRequestBlock.js";
64
68
  export * from "./HttpRequestBlockParametersItem.js";
@@ -69,6 +73,7 @@ export * from "./HumanInteractionBlockParametersItem.js";
69
73
  export * from "./HumanInteractionBlockYaml.js";
70
74
  export * from "./InputOrSelectContext.js";
71
75
  export * from "./InputTextAction.js";
76
+ export * from "./LocateElementAction.js";
72
77
  export * from "./LoginBlock.js";
73
78
  export * from "./LoginBlockParametersItem.js";
74
79
  export * from "./LoginBlockYaml.js";
@@ -35,6 +35,8 @@ __exportStar(require("./BitwardenLoginCredentialParameterYaml.js"), exports);
35
35
  __exportStar(require("./BitwardenSensitiveInformationParameter.js"), exports);
36
36
  __exportStar(require("./BitwardenSensitiveInformationParameterYaml.js"), exports);
37
37
  __exportStar(require("./BlockType.js"), exports);
38
+ __exportStar(require("./BranchCondition.js"), exports);
39
+ __exportStar(require("./BranchCriteria.js"), exports);
38
40
  __exportStar(require("./BrowserProfile.js"), exports);
39
41
  __exportStar(require("./BrowserSessionResponse.js"), exports);
40
42
  __exportStar(require("./ClickAction.js"), exports);
@@ -42,6 +44,7 @@ __exportStar(require("./ClickContext.js"), exports);
42
44
  __exportStar(require("./CodeBlock.js"), exports);
43
45
  __exportStar(require("./CodeBlockParametersItem.js"), exports);
44
46
  __exportStar(require("./CodeBlockYaml.js"), exports);
47
+ __exportStar(require("./ConditionalBlock.js"), exports);
45
48
  __exportStar(require("./ContextParameter.js"), exports);
46
49
  __exportStar(require("./ContextParameterSource.js"), exports);
47
50
  __exportStar(require("./ContextParameterYaml.js"), exports);
@@ -75,6 +78,7 @@ __exportStar(require("./ForLoopBlockLoopBlocksItem.js"), exports);
75
78
  __exportStar(require("./ForLoopBlockLoopOver.js"), exports);
76
79
  __exportStar(require("./ForLoopBlockYaml.js"), exports);
77
80
  __exportStar(require("./ForLoopBlockYamlLoopBlocksItem.js"), exports);
81
+ __exportStar(require("./GeoTarget.js"), exports);
78
82
  __exportStar(require("./GetRunResponse.js"), exports);
79
83
  __exportStar(require("./HttpRequestBlock.js"), exports);
80
84
  __exportStar(require("./HttpRequestBlockParametersItem.js"), exports);
@@ -85,6 +89,7 @@ __exportStar(require("./HumanInteractionBlockParametersItem.js"), exports);
85
89
  __exportStar(require("./HumanInteractionBlockYaml.js"), exports);
86
90
  __exportStar(require("./InputOrSelectContext.js"), exports);
87
91
  __exportStar(require("./InputTextAction.js"), exports);
92
+ __exportStar(require("./LocateElementAction.js"), exports);
88
93
  __exportStar(require("./LoginBlock.js"), exports);
89
94
  __exportStar(require("./LoginBlockParametersItem.js"), exports);
90
95
  __exportStar(require("./LoginBlockYaml.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.2.23";
1
+ export declare const SDK_VERSION = "1.0.2";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.2.23";
4
+ exports.SDK_VERSION = "1.0.2";
@@ -1,5 +1,4 @@
1
1
  import * as Skyvern from "./api/index.mjs";
2
- import { BrowserProfiles } from "./api/resources/browserProfiles/client/Client.mjs";
3
2
  import { Scripts } from "./api/resources/scripts/client/Client.mjs";
4
3
  import { Workflows } from "./api/resources/workflows/client/Client.mjs";
5
4
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
@@ -13,11 +12,9 @@ export declare namespace SkyvernClient {
13
12
  export declare class SkyvernClient {
14
13
  protected readonly _options: SkyvernClient.Options;
15
14
  protected _workflows: Workflows | undefined;
16
- protected _browserProfiles: BrowserProfiles | undefined;
17
15
  protected _scripts: Scripts | undefined;
18
16
  constructor(_options?: SkyvernClient.Options);
19
17
  get workflows(): Workflows;
20
- get browserProfiles(): BrowserProfiles;
21
18
  get scripts(): Scripts;
22
19
  /**
23
20
  * Run a task
@@ -214,6 +211,66 @@ export declare class SkyvernClient {
214
211
  */
215
212
  getRunTimeline(runId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowRunTimeline[]>;
216
213
  private __getRunTimeline;
214
+ /**
215
+ * Get all browser profiles for the organization
216
+ *
217
+ * @param {Skyvern.ListBrowserProfilesRequest} request
218
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
219
+ *
220
+ * @throws {@link Skyvern.UnprocessableEntityError}
221
+ *
222
+ * @example
223
+ * await client.listBrowserProfiles({
224
+ * include_deleted: true
225
+ * })
226
+ */
227
+ listBrowserProfiles(request?: Skyvern.ListBrowserProfilesRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.BrowserProfile[]>;
228
+ private __listBrowserProfiles;
229
+ /**
230
+ * Create a browser profile from a persistent browser session or workflow run.
231
+ *
232
+ * @param {Skyvern.CreateBrowserProfileRequest} request
233
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
234
+ *
235
+ * @throws {@link Skyvern.BadRequestError}
236
+ * @throws {@link Skyvern.ConflictError}
237
+ * @throws {@link Skyvern.UnprocessableEntityError}
238
+ *
239
+ * @example
240
+ * await client.createBrowserProfile({
241
+ * name: "name"
242
+ * })
243
+ */
244
+ createBrowserProfile(request: Skyvern.CreateBrowserProfileRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.BrowserProfile>;
245
+ private __createBrowserProfile;
246
+ /**
247
+ * Get a specific browser profile by ID
248
+ *
249
+ * @param {string} profileId - The ID of the browser profile. browser_profile_id starts with `bp_`
250
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
251
+ *
252
+ * @throws {@link Skyvern.NotFoundError}
253
+ * @throws {@link Skyvern.UnprocessableEntityError}
254
+ *
255
+ * @example
256
+ * await client.getBrowserProfile("bp_123456")
257
+ */
258
+ getBrowserProfile(profileId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.BrowserProfile>;
259
+ private __getBrowserProfile;
260
+ /**
261
+ * Delete a browser profile (soft delete)
262
+ *
263
+ * @param {string} profileId - The ID of the browser profile to delete. browser_profile_id starts with `bp_`
264
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
265
+ *
266
+ * @throws {@link Skyvern.NotFoundError}
267
+ * @throws {@link Skyvern.UnprocessableEntityError}
268
+ *
269
+ * @example
270
+ * await client.deleteBrowserProfile("bp_123456")
271
+ */
272
+ deleteBrowserProfile(profileId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<void>;
273
+ private __deleteBrowserProfile;
217
274
  /**
218
275
  * Get all active browser sessions for the organization
219
276
  *
@@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  import * as Skyvern from "./api/index.mjs";
12
- import { BrowserProfiles } from "./api/resources/browserProfiles/client/Client.mjs";
13
12
  import { Scripts } from "./api/resources/scripts/client/Client.mjs";
14
13
  import { Workflows } from "./api/resources/workflows/client/Client.mjs";
15
14
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "./core/headers.mjs";
@@ -22,8 +21,8 @@ export class SkyvernClient {
22
21
  "x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
23
22
  "X-Fern-Language": "JavaScript",
24
23
  "X-Fern-SDK-Name": "@skyvern/client",
25
- "X-Fern-SDK-Version": "0.2.23",
26
- "User-Agent": "@skyvern/client/0.2.23",
24
+ "X-Fern-SDK-Version": "1.0.2",
25
+ "User-Agent": "@skyvern/client/1.0.2",
27
26
  "X-Fern-Runtime": core.RUNTIME.type,
28
27
  "X-Fern-Runtime-Version": core.RUNTIME.version,
29
28
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -32,10 +31,6 @@ export class SkyvernClient {
32
31
  var _a;
33
32
  return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new Workflows(this._options)));
34
33
  }
35
- get browserProfiles() {
36
- var _a;
37
- return ((_a = this._browserProfiles) !== null && _a !== void 0 ? _a : (this._browserProfiles = new BrowserProfiles(this._options)));
38
- }
39
34
  get scripts() {
40
35
  var _a;
41
36
  return ((_a = this._scripts) !== null && _a !== void 0 ? _a : (this._scripts = new Scripts(this._options)));
@@ -873,6 +868,266 @@ export class SkyvernClient {
873
868
  }
874
869
  });
875
870
  }
871
+ /**
872
+ * Get all browser profiles for the organization
873
+ *
874
+ * @param {Skyvern.ListBrowserProfilesRequest} request
875
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
876
+ *
877
+ * @throws {@link Skyvern.UnprocessableEntityError}
878
+ *
879
+ * @example
880
+ * await client.listBrowserProfiles({
881
+ * include_deleted: true
882
+ * })
883
+ */
884
+ listBrowserProfiles(request = {}, requestOptions) {
885
+ return core.HttpResponsePromise.fromPromise(this.__listBrowserProfiles(request, requestOptions));
886
+ }
887
+ __listBrowserProfiles() {
888
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
889
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
890
+ const { include_deleted: includeDeleted } = request;
891
+ const _queryParams = {};
892
+ if (includeDeleted != null) {
893
+ _queryParams.include_deleted = includeDeleted.toString();
894
+ }
895
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
896
+ const _response = yield core.fetcher({
897
+ 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"),
898
+ method: "GET",
899
+ headers: _headers,
900
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
901
+ 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,
902
+ 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,
903
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
904
+ });
905
+ if (_response.ok) {
906
+ return { data: _response.body, rawResponse: _response.rawResponse };
907
+ }
908
+ if (_response.error.reason === "status-code") {
909
+ switch (_response.error.statusCode) {
910
+ case 422:
911
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
912
+ default:
913
+ throw new errors.SkyvernError({
914
+ statusCode: _response.error.statusCode,
915
+ body: _response.error.body,
916
+ rawResponse: _response.rawResponse,
917
+ });
918
+ }
919
+ }
920
+ switch (_response.error.reason) {
921
+ case "non-json":
922
+ throw new errors.SkyvernError({
923
+ statusCode: _response.error.statusCode,
924
+ body: _response.error.rawBody,
925
+ rawResponse: _response.rawResponse,
926
+ });
927
+ case "timeout":
928
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/browser_profiles.");
929
+ case "unknown":
930
+ throw new errors.SkyvernError({
931
+ message: _response.error.errorMessage,
932
+ rawResponse: _response.rawResponse,
933
+ });
934
+ }
935
+ });
936
+ }
937
+ /**
938
+ * Create a browser profile from a persistent browser session or workflow run.
939
+ *
940
+ * @param {Skyvern.CreateBrowserProfileRequest} request
941
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
942
+ *
943
+ * @throws {@link Skyvern.BadRequestError}
944
+ * @throws {@link Skyvern.ConflictError}
945
+ * @throws {@link Skyvern.UnprocessableEntityError}
946
+ *
947
+ * @example
948
+ * await client.createBrowserProfile({
949
+ * name: "name"
950
+ * })
951
+ */
952
+ createBrowserProfile(request, requestOptions) {
953
+ return core.HttpResponsePromise.fromPromise(this.__createBrowserProfile(request, requestOptions));
954
+ }
955
+ __createBrowserProfile(request, requestOptions) {
956
+ return __awaiter(this, void 0, void 0, function* () {
957
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
958
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
959
+ const _response = yield core.fetcher({
960
+ 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"),
961
+ method: "POST",
962
+ headers: _headers,
963
+ contentType: "application/json",
964
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
965
+ requestType: "json",
966
+ body: request,
967
+ 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,
968
+ 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,
969
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
970
+ });
971
+ if (_response.ok) {
972
+ return { data: _response.body, rawResponse: _response.rawResponse };
973
+ }
974
+ if (_response.error.reason === "status-code") {
975
+ switch (_response.error.statusCode) {
976
+ case 400:
977
+ throw new Skyvern.BadRequestError(_response.error.body, _response.rawResponse);
978
+ case 409:
979
+ throw new Skyvern.ConflictError(_response.error.body, _response.rawResponse);
980
+ case 422:
981
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
982
+ default:
983
+ throw new errors.SkyvernError({
984
+ statusCode: _response.error.statusCode,
985
+ body: _response.error.body,
986
+ rawResponse: _response.rawResponse,
987
+ });
988
+ }
989
+ }
990
+ switch (_response.error.reason) {
991
+ case "non-json":
992
+ throw new errors.SkyvernError({
993
+ statusCode: _response.error.statusCode,
994
+ body: _response.error.rawBody,
995
+ rawResponse: _response.rawResponse,
996
+ });
997
+ case "timeout":
998
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/browser_profiles.");
999
+ case "unknown":
1000
+ throw new errors.SkyvernError({
1001
+ message: _response.error.errorMessage,
1002
+ rawResponse: _response.rawResponse,
1003
+ });
1004
+ }
1005
+ });
1006
+ }
1007
+ /**
1008
+ * Get a specific browser profile by ID
1009
+ *
1010
+ * @param {string} profileId - The ID of the browser profile. browser_profile_id starts with `bp_`
1011
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
1012
+ *
1013
+ * @throws {@link Skyvern.NotFoundError}
1014
+ * @throws {@link Skyvern.UnprocessableEntityError}
1015
+ *
1016
+ * @example
1017
+ * await client.getBrowserProfile("bp_123456")
1018
+ */
1019
+ getBrowserProfile(profileId, requestOptions) {
1020
+ return core.HttpResponsePromise.fromPromise(this.__getBrowserProfile(profileId, requestOptions));
1021
+ }
1022
+ __getBrowserProfile(profileId, requestOptions) {
1023
+ return __awaiter(this, void 0, void 0, function* () {
1024
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1025
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
1026
+ const _response = yield core.fetcher({
1027
+ 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)}`),
1028
+ method: "GET",
1029
+ headers: _headers,
1030
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1031
+ 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,
1032
+ 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,
1033
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1034
+ });
1035
+ if (_response.ok) {
1036
+ return { data: _response.body, rawResponse: _response.rawResponse };
1037
+ }
1038
+ if (_response.error.reason === "status-code") {
1039
+ switch (_response.error.statusCode) {
1040
+ case 404:
1041
+ throw new Skyvern.NotFoundError(_response.error.body, _response.rawResponse);
1042
+ case 422:
1043
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1044
+ default:
1045
+ throw new errors.SkyvernError({
1046
+ statusCode: _response.error.statusCode,
1047
+ body: _response.error.body,
1048
+ rawResponse: _response.rawResponse,
1049
+ });
1050
+ }
1051
+ }
1052
+ switch (_response.error.reason) {
1053
+ case "non-json":
1054
+ throw new errors.SkyvernError({
1055
+ statusCode: _response.error.statusCode,
1056
+ body: _response.error.rawBody,
1057
+ rawResponse: _response.rawResponse,
1058
+ });
1059
+ case "timeout":
1060
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/browser_profiles/{profile_id}.");
1061
+ case "unknown":
1062
+ throw new errors.SkyvernError({
1063
+ message: _response.error.errorMessage,
1064
+ rawResponse: _response.rawResponse,
1065
+ });
1066
+ }
1067
+ });
1068
+ }
1069
+ /**
1070
+ * Delete a browser profile (soft delete)
1071
+ *
1072
+ * @param {string} profileId - The ID of the browser profile to delete. browser_profile_id starts with `bp_`
1073
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
1074
+ *
1075
+ * @throws {@link Skyvern.NotFoundError}
1076
+ * @throws {@link Skyvern.UnprocessableEntityError}
1077
+ *
1078
+ * @example
1079
+ * await client.deleteBrowserProfile("bp_123456")
1080
+ */
1081
+ deleteBrowserProfile(profileId, requestOptions) {
1082
+ return core.HttpResponsePromise.fromPromise(this.__deleteBrowserProfile(profileId, requestOptions));
1083
+ }
1084
+ __deleteBrowserProfile(profileId, requestOptions) {
1085
+ return __awaiter(this, void 0, void 0, function* () {
1086
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1087
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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);
1088
+ const _response = yield core.fetcher({
1089
+ 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)}`),
1090
+ method: "DELETE",
1091
+ headers: _headers,
1092
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1093
+ 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,
1094
+ 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,
1095
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1096
+ });
1097
+ if (_response.ok) {
1098
+ return { data: undefined, rawResponse: _response.rawResponse };
1099
+ }
1100
+ if (_response.error.reason === "status-code") {
1101
+ switch (_response.error.statusCode) {
1102
+ case 404:
1103
+ throw new Skyvern.NotFoundError(_response.error.body, _response.rawResponse);
1104
+ case 422:
1105
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1106
+ default:
1107
+ throw new errors.SkyvernError({
1108
+ statusCode: _response.error.statusCode,
1109
+ body: _response.error.body,
1110
+ rawResponse: _response.rawResponse,
1111
+ });
1112
+ }
1113
+ }
1114
+ switch (_response.error.reason) {
1115
+ case "non-json":
1116
+ throw new errors.SkyvernError({
1117
+ statusCode: _response.error.statusCode,
1118
+ body: _response.error.rawBody,
1119
+ rawResponse: _response.rawResponse,
1120
+ });
1121
+ case "timeout":
1122
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling DELETE /v1/browser_profiles/{profile_id}.");
1123
+ case "unknown":
1124
+ throw new errors.SkyvernError({
1125
+ message: _response.error.errorMessage,
1126
+ rawResponse: _response.rawResponse,
1127
+ });
1128
+ }
1129
+ });
1130
+ }
876
1131
  /**
877
1132
  * Get all active browser sessions for the organization
878
1133
  *
@@ -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
  }
@@ -22,6 +22,8 @@ export interface LoginRequest {
22
22
  totp_url?: string;
23
23
  /** ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456` */
24
24
  browser_session_id?: string;
25
+ /** ID of a browser profile to reuse for this run */
26
+ browser_profile_id?: string;
25
27
  /** The CDP address for the task. */
26
28
  browser_address?: string;
27
29
  /** Additional HTTP headers to include in requests */