@skyvern/client 1.0.2 → 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.
- package/README.md +1 -1
- package/dist/cjs/Client.d.ts +15 -3
- package/dist/cjs/Client.js +66 -7
- package/dist/cjs/api/client/requests/CreateCredentialRequest.d.ts +1 -1
- package/dist/cjs/api/client/requests/DownloadFilesRequest.d.ts +37 -0
- package/dist/cjs/api/client/requests/LoginRequest.d.ts +6 -6
- package/dist/cjs/api/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/index.js +1 -6
- package/dist/cjs/api/types/ActionBlock.d.ts +1 -0
- package/dist/cjs/api/types/ActionBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/ActionType.d.ts +1 -0
- package/dist/cjs/api/types/ActionType.js +1 -0
- package/dist/cjs/api/types/BranchCondition.d.ts +2 -1
- package/dist/cjs/api/types/BranchConditionCriteria.d.ts +10 -0
- package/dist/cjs/api/types/BranchConditionYaml.d.ts +7 -0
- package/dist/cjs/api/types/BranchCriteriaYaml.d.ts +12 -0
- package/dist/cjs/api/types/BranchCriteriaYaml.js +11 -0
- package/dist/cjs/api/types/CodeBlock.d.ts +1 -0
- package/dist/cjs/api/types/CodeBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/ConditionalBlock.d.ts +1 -0
- package/dist/cjs/api/types/ConditionalBlockYaml.d.ts +11 -0
- package/dist/cjs/api/types/CredentialResponse.d.ts +1 -1
- package/dist/cjs/api/types/CredentialTypeOutput.d.ts +1 -0
- package/dist/cjs/api/types/CredentialTypeOutput.js +1 -0
- package/dist/cjs/api/types/DownloadToS3Block.d.ts +1 -0
- package/dist/cjs/api/types/DownloadToS3BlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/ExtractionBlock.d.ts +1 -0
- package/dist/cjs/api/types/ExtractionBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/FileDownloadBlock.d.ts +1 -0
- package/dist/cjs/api/types/FileDownloadBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/FileParserBlock.d.ts +1 -0
- package/dist/cjs/api/types/FileParserBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/FileUploadBlock.d.ts +1 -0
- package/dist/cjs/api/types/FileUploadBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/ForLoopBlock.d.ts +1 -0
- package/dist/cjs/api/types/ForLoopBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/ForLoopBlockYamlLoopBlocksItem.d.ts +4 -1
- package/dist/cjs/api/types/HttpRequestBlock.d.ts +2 -0
- package/dist/cjs/api/types/HttpRequestBlockYaml.d.ts +2 -0
- package/dist/cjs/api/types/HumanInteractionBlock.d.ts +1 -0
- package/dist/cjs/api/types/HumanInteractionBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/JinjaBranchCriteria.d.ts +7 -0
- package/dist/cjs/api/types/LoginBlock.d.ts +1 -0
- package/dist/cjs/api/types/LoginBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/NavigationBlock.d.ts +1 -0
- package/dist/cjs/api/types/NavigationBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/PdfParserBlock.d.ts +1 -0
- package/dist/cjs/api/types/PdfParserBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/PromptAction.d.ts +11 -0
- package/dist/cjs/api/types/PromptBranchCriteria.d.ts +7 -0
- package/dist/cjs/api/types/RunSdkActionRequestAction.d.ts +7 -1
- package/dist/cjs/api/types/SecretCredential.d.ts +9 -0
- package/dist/cjs/api/types/SecretCredential.js +3 -0
- package/dist/cjs/api/types/SecretCredentialResponse.d.ts +7 -0
- package/dist/cjs/api/types/SecretCredentialResponse.js +3 -0
- package/dist/cjs/api/types/SendEmailBlock.d.ts +1 -0
- package/dist/cjs/api/types/SendEmailBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/SkyvernForgeSdkSchemasCredentialsCredentialType.d.ts +1 -0
- package/dist/cjs/api/types/SkyvernForgeSdkSchemasCredentialsCredentialType.js +1 -0
- package/dist/cjs/api/types/TaskBlock.d.ts +1 -0
- package/dist/cjs/api/types/TaskBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/TaskV2Block.d.ts +1 -0
- package/dist/cjs/api/types/TaskV2BlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/TextPromptBlock.d.ts +1 -0
- package/dist/cjs/api/types/TextPromptBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/UploadToS3Block.d.ts +1 -0
- package/dist/cjs/api/types/UploadToS3BlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/UrlBlock.d.ts +1 -0
- package/dist/cjs/api/types/UrlBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/ValidateAction.d.ts +9 -0
- package/dist/cjs/api/types/ValidateAction.js +3 -0
- package/dist/cjs/api/types/ValidationBlock.d.ts +1 -0
- package/dist/cjs/api/types/ValidationBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/WaitBlock.d.ts +1 -0
- package/dist/cjs/api/types/WaitBlockYaml.d.ts +1 -0
- package/dist/cjs/api/types/WorkflowDefinitionYamlBlocksItem.d.ts +4 -1
- package/dist/cjs/api/types/WorkflowRunBlock.d.ts +4 -0
- package/dist/cjs/api/types/index.d.ts +10 -2
- package/dist/cjs/api/types/index.js +10 -2
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.js +7 -2
- package/dist/cjs/library/Skyvern.d.ts +124 -0
- package/dist/cjs/library/Skyvern.js +315 -0
- package/dist/cjs/library/SkyvernBrowser.d.ts +76 -0
- package/dist/cjs/library/SkyvernBrowser.js +119 -0
- package/dist/cjs/library/SkyvernBrowserPage.d.ts +69 -0
- package/dist/cjs/library/SkyvernBrowserPage.js +162 -0
- package/dist/cjs/library/SkyvernBrowserPageAgent.d.ts +135 -0
- package/dist/cjs/library/SkyvernBrowserPageAgent.js +256 -0
- package/dist/cjs/library/SkyvernBrowserPageAi.d.ts +85 -0
- package/dist/cjs/library/SkyvernBrowserPageAi.js +248 -0
- package/dist/cjs/library/constants.d.ts +3 -0
- package/dist/cjs/library/constants.js +6 -0
- package/dist/cjs/library/index.d.ts +10 -0
- package/dist/cjs/library/index.js +20 -0
- package/dist/cjs/library/logger.d.ts +15 -0
- package/dist/cjs/library/logger.js +56 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +15 -3
- package/dist/esm/Client.mjs +66 -7
- package/dist/esm/api/client/requests/CreateCredentialRequest.d.mts +1 -1
- package/dist/esm/api/client/requests/DownloadFilesRequest.d.mts +37 -0
- package/dist/esm/api/client/requests/LoginRequest.d.mts +6 -6
- package/dist/esm/api/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/index.mjs +0 -2
- package/dist/esm/api/types/ActionBlock.d.mts +1 -0
- package/dist/esm/api/types/ActionBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/ActionType.d.mts +1 -0
- package/dist/esm/api/types/ActionType.mjs +1 -0
- package/dist/esm/api/types/BranchCondition.d.mts +2 -1
- package/dist/esm/api/types/BranchConditionCriteria.d.mts +10 -0
- package/dist/esm/api/types/BranchConditionYaml.d.mts +7 -0
- package/dist/esm/api/types/BranchCriteriaYaml.d.mts +12 -0
- package/dist/esm/api/types/BranchCriteriaYaml.mjs +8 -0
- package/dist/esm/api/types/CodeBlock.d.mts +1 -0
- package/dist/esm/api/types/CodeBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/ConditionalBlock.d.mts +1 -0
- package/dist/esm/api/types/ConditionalBlockYaml.d.mts +11 -0
- package/dist/esm/api/types/CredentialResponse.d.mts +1 -1
- package/dist/esm/api/types/CredentialTypeOutput.d.mts +1 -0
- package/dist/esm/api/types/CredentialTypeOutput.mjs +1 -0
- package/dist/esm/api/types/DownloadToS3Block.d.mts +1 -0
- package/dist/esm/api/types/DownloadToS3BlockYaml.d.mts +1 -0
- package/dist/esm/api/types/ExtractionBlock.d.mts +1 -0
- package/dist/esm/api/types/ExtractionBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/FileDownloadBlock.d.mts +1 -0
- package/dist/esm/api/types/FileDownloadBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/FileParserBlock.d.mts +1 -0
- package/dist/esm/api/types/FileParserBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/FileUploadBlock.d.mts +1 -0
- package/dist/esm/api/types/FileUploadBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/ForLoopBlock.d.mts +1 -0
- package/dist/esm/api/types/ForLoopBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/ForLoopBlockYamlLoopBlocksItem.d.mts +4 -1
- package/dist/esm/api/types/HttpRequestBlock.d.mts +2 -0
- package/dist/esm/api/types/HttpRequestBlockYaml.d.mts +2 -0
- package/dist/esm/api/types/HumanInteractionBlock.d.mts +1 -0
- package/dist/esm/api/types/HumanInteractionBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/JinjaBranchCriteria.d.mts +7 -0
- package/dist/esm/api/types/LoginBlock.d.mts +1 -0
- package/dist/esm/api/types/LoginBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/NavigationBlock.d.mts +1 -0
- package/dist/esm/api/types/NavigationBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/PdfParserBlock.d.mts +1 -0
- package/dist/esm/api/types/PdfParserBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/PromptAction.d.mts +11 -0
- package/dist/esm/api/types/PromptBranchCriteria.d.mts +7 -0
- package/dist/esm/api/types/RunSdkActionRequestAction.d.mts +7 -1
- package/dist/esm/api/types/SecretCredential.d.mts +9 -0
- package/dist/esm/api/types/SecretCredential.mjs +2 -0
- package/dist/esm/api/types/SecretCredentialResponse.d.mts +7 -0
- package/dist/esm/api/types/SecretCredentialResponse.mjs +2 -0
- package/dist/esm/api/types/SendEmailBlock.d.mts +1 -0
- package/dist/esm/api/types/SendEmailBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/SkyvernForgeSdkSchemasCredentialsCredentialType.d.mts +1 -0
- package/dist/esm/api/types/SkyvernForgeSdkSchemasCredentialsCredentialType.mjs +1 -0
- package/dist/esm/api/types/TaskBlock.d.mts +1 -0
- package/dist/esm/api/types/TaskBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/TaskV2Block.d.mts +1 -0
- package/dist/esm/api/types/TaskV2BlockYaml.d.mts +1 -0
- package/dist/esm/api/types/TextPromptBlock.d.mts +1 -0
- package/dist/esm/api/types/TextPromptBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/UploadToS3Block.d.mts +1 -0
- package/dist/esm/api/types/UploadToS3BlockYaml.d.mts +1 -0
- package/dist/esm/api/types/UrlBlock.d.mts +1 -0
- package/dist/esm/api/types/UrlBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/ValidateAction.d.mts +9 -0
- package/dist/esm/api/types/ValidateAction.mjs +2 -0
- package/dist/esm/api/types/ValidationBlock.d.mts +1 -0
- package/dist/esm/api/types/ValidationBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/WaitBlock.d.mts +1 -0
- package/dist/esm/api/types/WaitBlockYaml.d.mts +1 -0
- package/dist/esm/api/types/WorkflowDefinitionYamlBlocksItem.d.mts +4 -1
- package/dist/esm/api/types/WorkflowRunBlock.d.mts +4 -0
- package/dist/esm/api/types/index.d.mts +10 -2
- package/dist/esm/api/types/index.mjs +10 -2
- package/dist/esm/index.d.mts +3 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/library/Skyvern.d.mts +124 -0
- package/dist/esm/library/Skyvern.mjs +278 -0
- package/dist/esm/library/SkyvernBrowser.d.mts +76 -0
- package/dist/esm/library/SkyvernBrowser.mjs +115 -0
- package/dist/esm/library/SkyvernBrowserPage.d.mts +69 -0
- package/dist/esm/library/SkyvernBrowserPage.mjs +158 -0
- package/dist/esm/library/SkyvernBrowserPageAgent.d.mts +135 -0
- package/dist/esm/library/SkyvernBrowserPageAgent.mjs +252 -0
- package/dist/esm/library/SkyvernBrowserPageAi.d.mts +85 -0
- package/dist/esm/library/SkyvernBrowserPageAi.mjs +244 -0
- package/dist/esm/library/constants.d.mts +3 -0
- package/dist/esm/library/constants.mjs +3 -0
- package/dist/esm/library/index.d.mts +10 -0
- package/dist/esm/library/index.mjs +7 -0
- package/dist/esm/library/logger.d.mts +15 -0
- package/dist/esm/library/logger.mjs +52 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +4 -1
- package/reference.md +0 -411
- package/dist/cjs/api/resources/workflows/client/Client.d.ts +0 -108
- package/dist/cjs/api/resources/workflows/client/Client.js +0 -465
- package/dist/cjs/api/resources/workflows/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/workflows/client/index.js +0 -17
- package/dist/cjs/api/resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.d.ts +0 -10
- package/dist/cjs/api/resources/workflows/client/requests/FolderCreate.d.ts +0 -12
- package/dist/cjs/api/resources/workflows/client/requests/FolderUpdate.d.ts +0 -10
- package/dist/cjs/api/resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.d.ts +0 -16
- package/dist/cjs/api/resources/workflows/client/requests/UpdateWorkflowFolderRequest.d.ts +0 -8
- package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +0 -5
- package/dist/cjs/api/resources/workflows/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/workflows/index.d.ts +0 -1
- package/dist/cjs/api/resources/workflows/index.js +0 -17
- package/dist/cjs/api/types/BranchCriteria.d.ts +0 -8
- package/dist/cjs/api/types/Folder.d.ts +0 -15
- package/dist/esm/api/resources/workflows/client/Client.d.mts +0 -108
- package/dist/esm/api/resources/workflows/client/Client.mjs +0 -428
- package/dist/esm/api/resources/workflows/client/index.d.mts +0 -1
- package/dist/esm/api/resources/workflows/client/index.mjs +0 -1
- package/dist/esm/api/resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.d.mts +0 -10
- package/dist/esm/api/resources/workflows/client/requests/FolderCreate.d.mts +0 -12
- package/dist/esm/api/resources/workflows/client/requests/FolderUpdate.d.mts +0 -10
- package/dist/esm/api/resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.d.mts +0 -16
- package/dist/esm/api/resources/workflows/client/requests/UpdateWorkflowFolderRequest.d.mts +0 -8
- package/dist/esm/api/resources/workflows/client/requests/index.d.mts +0 -5
- package/dist/esm/api/resources/workflows/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/workflows/index.d.mts +0 -1
- package/dist/esm/api/resources/workflows/index.mjs +0 -1
- package/dist/esm/api/types/BranchCriteria.d.mts +0 -8
- package/dist/esm/api/types/Folder.d.mts +0 -15
- /package/dist/cjs/api/{resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.js → client/requests/DownloadFilesRequest.js} +0 -0
- /package/dist/cjs/api/{resources/workflows/client/requests/FolderCreate.js → types/BranchConditionCriteria.js} +0 -0
- /package/dist/cjs/api/{resources/workflows/client/requests/FolderUpdate.js → types/BranchConditionYaml.js} +0 -0
- /package/dist/cjs/api/{resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.js → types/ConditionalBlockYaml.js} +0 -0
- /package/dist/cjs/api/{resources/workflows/client/requests/UpdateWorkflowFolderRequest.js → types/JinjaBranchCriteria.js} +0 -0
- /package/dist/cjs/api/types/{BranchCriteria.js → PromptAction.js} +0 -0
- /package/dist/cjs/api/types/{Folder.js → PromptBranchCriteria.js} +0 -0
- /package/dist/esm/api/{resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.mjs → client/requests/DownloadFilesRequest.mjs} +0 -0
- /package/dist/esm/api/{resources/workflows/client/requests/FolderCreate.mjs → types/BranchConditionCriteria.mjs} +0 -0
- /package/dist/esm/api/{resources/workflows/client/requests/FolderUpdate.mjs → types/BranchConditionYaml.mjs} +0 -0
- /package/dist/esm/api/{resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.mjs → types/ConditionalBlockYaml.mjs} +0 -0
- /package/dist/esm/api/{resources/workflows/client/requests/UpdateWorkflowFolderRequest.mjs → types/JinjaBranchCriteria.mjs} +0 -0
- /package/dist/esm/api/types/{BranchCriteria.mjs → PromptAction.mjs} +0 -0
- /package/dist/esm/api/types/{Folder.mjs → PromptBranchCriteria.mjs} +0 -0
package/README.md
CHANGED
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as Skyvern from "./api/index.js";
|
|
2
2
|
import { Scripts } from "./api/resources/scripts/client/Client.js";
|
|
3
|
-
import { Workflows } from "./api/resources/workflows/client/Client.js";
|
|
4
3
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
5
4
|
import * as core from "./core/index.js";
|
|
6
5
|
export declare namespace SkyvernClient {
|
|
@@ -11,10 +10,8 @@ export declare namespace SkyvernClient {
|
|
|
11
10
|
}
|
|
12
11
|
export declare class SkyvernClient {
|
|
13
12
|
protected readonly _options: SkyvernClient.Options;
|
|
14
|
-
protected _workflows: Workflows | undefined;
|
|
15
13
|
protected _scripts: Scripts | undefined;
|
|
16
14
|
constructor(_options?: SkyvernClient.Options);
|
|
17
|
-
get workflows(): Workflows;
|
|
18
15
|
get scripts(): Scripts;
|
|
19
16
|
/**
|
|
20
17
|
* Run a task
|
|
@@ -421,6 +418,21 @@ export declare class SkyvernClient {
|
|
|
421
418
|
*/
|
|
422
419
|
login(request: Skyvern.LoginRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowRunResponse>;
|
|
423
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;
|
|
424
436
|
/**
|
|
425
437
|
* Retrieves a paginated list of scripts for the current organization
|
|
426
438
|
*
|
package/dist/cjs/Client.js
CHANGED
|
@@ -46,7 +46,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
46
46
|
exports.SkyvernClient = void 0;
|
|
47
47
|
const Skyvern = __importStar(require("./api/index.js"));
|
|
48
48
|
const Client_js_1 = require("./api/resources/scripts/client/Client.js");
|
|
49
|
-
const Client_js_2 = require("./api/resources/workflows/client/Client.js");
|
|
50
49
|
const headers_js_1 = require("./core/headers.js");
|
|
51
50
|
const core = __importStar(require("./core/index.js"));
|
|
52
51
|
const environments = __importStar(require("./environments.js"));
|
|
@@ -57,16 +56,12 @@ class SkyvernClient {
|
|
|
57
56
|
"x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
|
|
58
57
|
"X-Fern-Language": "JavaScript",
|
|
59
58
|
"X-Fern-SDK-Name": "@skyvern/client",
|
|
60
|
-
"X-Fern-SDK-Version": "1.0.
|
|
61
|
-
"User-Agent": "@skyvern/client/1.0.
|
|
59
|
+
"X-Fern-SDK-Version": "1.0.3",
|
|
60
|
+
"User-Agent": "@skyvern/client/1.0.3",
|
|
62
61
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
63
62
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
64
63
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
65
64
|
}
|
|
66
|
-
get workflows() {
|
|
67
|
-
var _a;
|
|
68
|
-
return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new Client_js_2.Workflows(this._options)));
|
|
69
|
-
}
|
|
70
65
|
get scripts() {
|
|
71
66
|
var _a;
|
|
72
67
|
return ((_a = this._scripts) !== null && _a !== void 0 ? _a : (this._scripts = new Client_js_1.Scripts(this._options)));
|
|
@@ -1804,6 +1799,70 @@ class SkyvernClient {
|
|
|
1804
1799
|
}
|
|
1805
1800
|
});
|
|
1806
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
|
+
}
|
|
1807
1866
|
/**
|
|
1808
1867
|
* Retrieves a paginated list of scripts for the current organization
|
|
1809
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
|
+
}
|
|
@@ -6,13 +6,9 @@ import type * as Skyvern from "../../index.js";
|
|
|
6
6
|
* }
|
|
7
7
|
*/
|
|
8
8
|
export interface LoginRequest {
|
|
9
|
-
/**
|
|
10
|
-
credential_type: Skyvern.SkyvernSchemasRunBlocksCredentialType;
|
|
11
|
-
/** Website url */
|
|
9
|
+
/** Website URL */
|
|
12
10
|
url?: string;
|
|
13
|
-
/**
|
|
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;
|
|
@@ -30,6 +26,10 @@ export interface LoginRequest {
|
|
|
30
26
|
extra_http_headers?: Record<string, string | undefined>;
|
|
31
27
|
/** Maximum number of times to scroll for screenshots */
|
|
32
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;
|
|
33
33
|
/** ID of the Skyvern credential to use for login. */
|
|
34
34
|
credential_id?: string;
|
|
35
35
|
/** Bitwarden collection ID. You can find it in the Bitwarden collection URL. e.g. `https://vault.bitwarden.com/vaults/collection_id/items` */
|
|
@@ -4,6 +4,7 @@ export type { CreateCredentialRequest } from "./CreateCredentialRequest.js";
|
|
|
4
4
|
export type { CreateScriptRequest } from "./CreateScriptRequest.js";
|
|
5
5
|
export type { CreateWorkflowRequest } from "./CreateWorkflowRequest.js";
|
|
6
6
|
export type { DeployScriptRequest } from "./DeployScriptRequest.js";
|
|
7
|
+
export type { DownloadFilesRequest } from "./DownloadFilesRequest.js";
|
|
7
8
|
export type { GetCredentialsRequest } from "./GetCredentialsRequest.js";
|
|
8
9
|
export type { GetRunArtifactsRequest } from "./GetRunArtifactsRequest.js";
|
|
9
10
|
export type { GetScriptsRequest } from "./GetScriptsRequest.js";
|
|
@@ -32,11 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
-
};
|
|
38
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
36
|
+
exports.scripts = void 0;
|
|
40
37
|
exports.scripts = __importStar(require("./scripts/index.js"));
|
|
41
|
-
__exportStar(require("./workflows/client/requests/index.js"), exports);
|
|
42
|
-
exports.workflows = __importStar(require("./workflows/index.js"));
|
|
@@ -6,6 +6,7 @@ export declare const ActionType: {
|
|
|
6
6
|
readonly SelectOption: "select_option";
|
|
7
7
|
readonly Checkbox: "checkbox";
|
|
8
8
|
readonly Wait: "wait";
|
|
9
|
+
readonly Hover: "hover";
|
|
9
10
|
readonly NullAction: "null_action";
|
|
10
11
|
readonly SolveCaptcha: "solve_captcha";
|
|
11
12
|
readonly Terminate: "terminate";
|
|
@@ -3,7 +3,8 @@ import type * as Skyvern from "../index.js";
|
|
|
3
3
|
* Represents a single conditional branch edge within a ConditionalBlock.
|
|
4
4
|
*/
|
|
5
5
|
export interface BranchCondition {
|
|
6
|
-
|
|
6
|
+
id?: string;
|
|
7
|
+
criteria?: Skyvern.BranchConditionCriteria;
|
|
7
8
|
next_block_label?: string;
|
|
8
9
|
description?: string;
|
|
9
10
|
is_default?: boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as Skyvern from "../index.js";
|
|
2
|
+
export type BranchConditionCriteria = Skyvern.BranchConditionCriteria.Jinja2Template | Skyvern.BranchConditionCriteria.Prompt;
|
|
3
|
+
export declare namespace BranchConditionCriteria {
|
|
4
|
+
interface Jinja2Template extends Skyvern.JinjaBranchCriteria {
|
|
5
|
+
criteria_type: "jinja2_template";
|
|
6
|
+
}
|
|
7
|
+
interface Prompt extends Skyvern.PromptBranchCriteria {
|
|
8
|
+
criteria_type: "prompt";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface BranchCriteriaYaml {
|
|
2
|
+
criteria_type?: BranchCriteriaYaml.CriteriaType;
|
|
3
|
+
expression: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare namespace BranchCriteriaYaml {
|
|
7
|
+
const CriteriaType: {
|
|
8
|
+
readonly Jinja2Template: "jinja2_template";
|
|
9
|
+
readonly Prompt: "prompt";
|
|
10
|
+
};
|
|
11
|
+
type CriteriaType = (typeof CriteriaType)[keyof typeof CriteriaType];
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.BranchCriteriaYaml = void 0;
|
|
5
|
+
var BranchCriteriaYaml;
|
|
6
|
+
(function (BranchCriteriaYaml) {
|
|
7
|
+
BranchCriteriaYaml.CriteriaType = {
|
|
8
|
+
Jinja2Template: "jinja2_template",
|
|
9
|
+
Prompt: "prompt",
|
|
10
|
+
};
|
|
11
|
+
})(BranchCriteriaYaml || (exports.BranchCriteriaYaml = BranchCriteriaYaml = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as Skyvern from "../index.js";
|
|
2
|
+
export interface ConditionalBlockYaml {
|
|
3
|
+
/** Author-facing identifier; must be unique per workflow. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
|
6
|
+
next_block_label?: string;
|
|
7
|
+
continue_on_failure?: boolean;
|
|
8
|
+
model?: Record<string, unknown>;
|
|
9
|
+
next_loop_on_failure?: boolean;
|
|
10
|
+
branch_conditions?: Skyvern.BranchConditionYaml[];
|
|
11
|
+
}
|
|
@@ -16,5 +16,5 @@ export declare namespace CredentialResponse {
|
|
|
16
16
|
/**
|
|
17
17
|
* The credential data
|
|
18
18
|
*/
|
|
19
|
-
type Credential = Skyvern.PasswordCredentialResponse | Skyvern.CreditCardCredentialResponse;
|
|
19
|
+
type Credential = Skyvern.PasswordCredentialResponse | Skyvern.CreditCardCredentialResponse | Skyvern.SecretCredentialResponse;
|
|
20
20
|
}
|
|
@@ -8,6 +8,7 @@ export interface ForLoopBlock {
|
|
|
8
8
|
continue_on_failure?: boolean;
|
|
9
9
|
model?: Record<string, unknown>;
|
|
10
10
|
disable_cache?: boolean;
|
|
11
|
+
next_loop_on_failure?: boolean;
|
|
11
12
|
loop_blocks: Skyvern.ForLoopBlockLoopBlocksItem[];
|
|
12
13
|
loop_over?: Skyvern.ForLoopBlockLoopOver;
|
|
13
14
|
loop_variable_reference?: string;
|
|
@@ -6,6 +6,7 @@ export interface ForLoopBlockYaml {
|
|
|
6
6
|
next_block_label?: string;
|
|
7
7
|
continue_on_failure?: boolean;
|
|
8
8
|
model?: Record<string, unknown>;
|
|
9
|
+
next_loop_on_failure?: boolean;
|
|
9
10
|
loop_blocks: Skyvern.ForLoopBlockYamlLoopBlocksItem[];
|
|
10
11
|
loop_over_parameter_key?: string;
|
|
11
12
|
loop_variable_reference?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as Skyvern from "../index.js";
|
|
2
|
-
export type ForLoopBlockYamlLoopBlocksItem = Skyvern.ForLoopBlockYamlLoopBlocksItem.Task | Skyvern.ForLoopBlockYamlLoopBlocksItem.ForLoop | Skyvern.ForLoopBlockYamlLoopBlocksItem.Code | Skyvern.ForLoopBlockYamlLoopBlocksItem.TextPrompt | Skyvern.ForLoopBlockYamlLoopBlocksItem.DownloadToS3 | Skyvern.ForLoopBlockYamlLoopBlocksItem.UploadToS3 | Skyvern.ForLoopBlockYamlLoopBlocksItem.FileUpload | Skyvern.ForLoopBlockYamlLoopBlocksItem.SendEmail | Skyvern.ForLoopBlockYamlLoopBlocksItem.FileUrlParser | Skyvern.ForLoopBlockYamlLoopBlocksItem.Validation | Skyvern.ForLoopBlockYamlLoopBlocksItem.Action | Skyvern.ForLoopBlockYamlLoopBlocksItem.Navigation | Skyvern.ForLoopBlockYamlLoopBlocksItem.Extraction | Skyvern.ForLoopBlockYamlLoopBlocksItem.Login | Skyvern.ForLoopBlockYamlLoopBlocksItem.Wait | Skyvern.ForLoopBlockYamlLoopBlocksItem.HumanInteraction | Skyvern.ForLoopBlockYamlLoopBlocksItem.FileDownload | Skyvern.ForLoopBlockYamlLoopBlocksItem.GotoUrl | Skyvern.ForLoopBlockYamlLoopBlocksItem.PdfParser | Skyvern.ForLoopBlockYamlLoopBlocksItem.TaskV2 | Skyvern.ForLoopBlockYamlLoopBlocksItem.HttpRequest;
|
|
2
|
+
export type ForLoopBlockYamlLoopBlocksItem = Skyvern.ForLoopBlockYamlLoopBlocksItem.Task | Skyvern.ForLoopBlockYamlLoopBlocksItem.ForLoop | Skyvern.ForLoopBlockYamlLoopBlocksItem.Code | Skyvern.ForLoopBlockYamlLoopBlocksItem.TextPrompt | Skyvern.ForLoopBlockYamlLoopBlocksItem.DownloadToS3 | Skyvern.ForLoopBlockYamlLoopBlocksItem.UploadToS3 | Skyvern.ForLoopBlockYamlLoopBlocksItem.FileUpload | Skyvern.ForLoopBlockYamlLoopBlocksItem.SendEmail | Skyvern.ForLoopBlockYamlLoopBlocksItem.FileUrlParser | Skyvern.ForLoopBlockYamlLoopBlocksItem.Validation | Skyvern.ForLoopBlockYamlLoopBlocksItem.Action | Skyvern.ForLoopBlockYamlLoopBlocksItem.Navigation | Skyvern.ForLoopBlockYamlLoopBlocksItem.Extraction | Skyvern.ForLoopBlockYamlLoopBlocksItem.Login | Skyvern.ForLoopBlockYamlLoopBlocksItem.Wait | Skyvern.ForLoopBlockYamlLoopBlocksItem.HumanInteraction | Skyvern.ForLoopBlockYamlLoopBlocksItem.FileDownload | Skyvern.ForLoopBlockYamlLoopBlocksItem.GotoUrl | Skyvern.ForLoopBlockYamlLoopBlocksItem.PdfParser | Skyvern.ForLoopBlockYamlLoopBlocksItem.TaskV2 | Skyvern.ForLoopBlockYamlLoopBlocksItem.HttpRequest | Skyvern.ForLoopBlockYamlLoopBlocksItem.Conditional;
|
|
3
3
|
export declare namespace ForLoopBlockYamlLoopBlocksItem {
|
|
4
4
|
interface Task extends Skyvern.TaskBlockYaml {
|
|
5
5
|
block_type: "task";
|
|
@@ -64,4 +64,7 @@ export declare namespace ForLoopBlockYamlLoopBlocksItem {
|
|
|
64
64
|
interface HttpRequest extends Skyvern.HttpRequestBlockYaml {
|
|
65
65
|
block_type: "http_request";
|
|
66
66
|
}
|
|
67
|
+
interface Conditional extends Skyvern.ConditionalBlockYaml {
|
|
68
|
+
block_type: "conditional";
|
|
69
|
+
}
|
|
67
70
|
}
|
|
@@ -8,10 +8,12 @@ export interface HttpRequestBlock {
|
|
|
8
8
|
continue_on_failure?: boolean;
|
|
9
9
|
model?: Record<string, unknown>;
|
|
10
10
|
disable_cache?: boolean;
|
|
11
|
+
next_loop_on_failure?: boolean;
|
|
11
12
|
method?: string;
|
|
12
13
|
url?: string;
|
|
13
14
|
headers?: Record<string, string | undefined>;
|
|
14
15
|
body?: Record<string, unknown>;
|
|
16
|
+
files?: Record<string, string | undefined>;
|
|
15
17
|
timeout?: number;
|
|
16
18
|
follow_redirects?: boolean;
|
|
17
19
|
parameters?: Skyvern.HttpRequestBlockParametersItem[];
|
|
@@ -5,10 +5,12 @@ export interface HttpRequestBlockYaml {
|
|
|
5
5
|
next_block_label?: string;
|
|
6
6
|
continue_on_failure?: boolean;
|
|
7
7
|
model?: Record<string, unknown>;
|
|
8
|
+
next_loop_on_failure?: boolean;
|
|
8
9
|
method?: string;
|
|
9
10
|
url?: string;
|
|
10
11
|
headers?: Record<string, string | undefined>;
|
|
11
12
|
body?: Record<string, unknown>;
|
|
13
|
+
files?: Record<string, string | undefined>;
|
|
12
14
|
timeout?: number;
|
|
13
15
|
follow_redirects?: boolean;
|
|
14
16
|
parameter_keys?: string[];
|