@skyvern/client 1.0.2 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -1
- package/dist/cjs/Client.d.ts +32 -4
- package/dist/cjs/Client.js +144 -11
- package/dist/cjs/api/client/requests/BodyUploadFileV1UploadFilePost.d.ts +10 -0
- 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/GetWorkflowsRequest.d.ts +2 -0
- package/dist/cjs/api/client/requests/LoginRequest.d.ts +6 -6
- package/dist/cjs/api/client/requests/index.d.ts +2 -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/Action.d.ts +1 -0
- 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/Artifact.d.ts +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/PromptBranchCriteria.js +3 -0
- package/dist/cjs/api/types/RetryRunWebhookRequest.d.ts +4 -0
- package/dist/cjs/api/types/RetryRunWebhookRequest.js +3 -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/UploadFileResponse.d.ts +6 -0
- package/dist/cjs/api/types/UploadFileResponse.js +3 -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/Workflow.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 +12 -2
- package/dist/cjs/api/types/index.js +12 -2
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/{api/resources/workflows/index.js → core/exports.js} +1 -1
- package/dist/cjs/core/file/exports.d.ts +1 -0
- package/dist/cjs/core/file/file.d.ts +10 -0
- package/dist/cjs/core/file/file.js +221 -0
- package/dist/cjs/core/file/index.d.ts +2 -0
- package/dist/cjs/core/file/index.js +18 -0
- package/dist/cjs/core/file/types.d.ts +66 -0
- package/dist/cjs/core/file/types.js +2 -0
- package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +15 -0
- package/dist/cjs/core/form-data-utils/FormDataWrapper.js +185 -0
- package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
- package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +12 -0
- package/dist/cjs/core/form-data-utils/index.d.ts +2 -0
- package/dist/cjs/core/form-data-utils/index.js +20 -0
- package/dist/cjs/core/index.d.ts +2 -0
- package/dist/cjs/core/index.js +3 -1
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/{api/resources/workflows/client/index.js → exports.js} +1 -1
- package/dist/cjs/index.d.ts +4 -1
- package/dist/cjs/index.js +11 -2
- package/dist/cjs/library/Skyvern.d.ts +124 -0
- package/dist/cjs/library/Skyvern.js +333 -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 +152 -0
- package/dist/cjs/library/SkyvernBrowserPage.js +275 -0
- package/dist/cjs/library/SkyvernBrowserPageAgent.d.ts +183 -0
- package/dist/cjs/library/SkyvernBrowserPageAgent.js +243 -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 +32 -4
- package/dist/esm/Client.mjs +144 -11
- package/dist/esm/api/client/requests/BodyUploadFileV1UploadFilePost.d.mts +10 -0
- 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/GetWorkflowsRequest.d.mts +2 -0
- package/dist/esm/api/client/requests/LoginRequest.d.mts +6 -6
- package/dist/esm/api/client/requests/index.d.mts +2 -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/Action.d.mts +1 -0
- 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/Artifact.d.mts +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/PromptBranchCriteria.mjs +2 -0
- package/dist/esm/api/types/RetryRunWebhookRequest.d.mts +4 -0
- package/dist/esm/api/types/RetryRunWebhookRequest.mjs +2 -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/UploadFileResponse.d.mts +6 -0
- package/dist/esm/api/types/UploadFileResponse.mjs +2 -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/Workflow.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 +12 -2
- package/dist/esm/api/types/index.mjs +12 -2
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/file/exports.d.mts +1 -0
- package/dist/esm/core/file/file.d.mts +10 -0
- package/dist/esm/core/file/file.mjs +184 -0
- package/dist/esm/core/file/index.d.mts +2 -0
- package/dist/esm/core/file/index.mjs +2 -0
- package/dist/esm/core/file/types.d.mts +66 -0
- package/dist/esm/core/file/types.mjs +1 -0
- package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +15 -0
- package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +147 -0
- package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +1 -0
- package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +9 -0
- package/dist/esm/core/form-data-utils/index.d.mts +2 -0
- package/dist/esm/core/form-data-utils/index.mjs +2 -0
- package/dist/esm/core/index.d.mts +2 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +4 -1
- package/dist/esm/index.mjs +3 -1
- package/dist/esm/library/Skyvern.d.mts +124 -0
- package/dist/esm/library/Skyvern.mjs +296 -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 +152 -0
- package/dist/esm/library/SkyvernBrowserPage.mjs +271 -0
- package/dist/esm/library/SkyvernBrowserPageAgent.d.mts +183 -0
- package/dist/esm/library/SkyvernBrowserPageAgent.mjs +239 -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/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/index.d.ts +0 -1
- 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/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/BodyUploadFileV1UploadFilePost.js} +0 -0
- /package/dist/cjs/api/{resources/workflows/client/requests/FolderCreate.js → client/requests/DownloadFilesRequest.js} +0 -0
- /package/dist/cjs/api/{resources/workflows/client/requests/FolderUpdate.js → types/BranchConditionCriteria.js} +0 -0
- /package/dist/cjs/api/{resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.js → types/BranchConditionYaml.js} +0 -0
- /package/dist/cjs/api/{resources/workflows/client/requests/UpdateWorkflowFolderRequest.js → types/ConditionalBlockYaml.js} +0 -0
- /package/dist/cjs/api/types/{BranchCriteria.js → JinjaBranchCriteria.js} +0 -0
- /package/dist/cjs/api/types/{Folder.js → PromptAction.js} +0 -0
- /package/dist/cjs/{api/resources/workflows/client/requests/index.js → core/file/exports.js} +0 -0
- /package/dist/esm/api/{resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.mjs → client/requests/BodyUploadFileV1UploadFilePost.mjs} +0 -0
- /package/dist/esm/api/{resources/workflows/client/requests/FolderCreate.mjs → client/requests/DownloadFilesRequest.mjs} +0 -0
- /package/dist/esm/api/{resources/workflows/client/requests/FolderUpdate.mjs → types/BranchConditionCriteria.mjs} +0 -0
- /package/dist/esm/api/{resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.mjs → types/BranchConditionYaml.mjs} +0 -0
- /package/dist/esm/api/{resources/workflows/client/requests/UpdateWorkflowFolderRequest.mjs → types/ConditionalBlockYaml.mjs} +0 -0
- /package/dist/esm/api/types/{BranchCriteria.mjs → JinjaBranchCriteria.mjs} +0 -0
- /package/dist/esm/api/types/{Folder.mjs → PromptAction.mjs} +0 -0
- /package/dist/esm/{api/resources/workflows/client/requests/index.mjs → core/file/exports.mjs} +0 -0
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ The Skyvern TypeScript library provides convenient access to the Skyvern APIs fr
|
|
|
12
12
|
- [Usage](#usage)
|
|
13
13
|
- [Request and Response Types](#request-and-response-types)
|
|
14
14
|
- [Exception Handling](#exception-handling)
|
|
15
|
+
- [File Uploads](#file-uploads)
|
|
15
16
|
- [Advanced](#advanced)
|
|
16
17
|
- [Additional Headers](#additional-headers)
|
|
17
18
|
- [Additional Query String Parameters](#additional-query-string-parameters)
|
|
@@ -56,7 +57,7 @@ following namespace:
|
|
|
56
57
|
```typescript
|
|
57
58
|
import { Skyvern } from "@skyvern/client";
|
|
58
59
|
|
|
59
|
-
const request: Skyvern.
|
|
60
|
+
const request: Skyvern.RunTaskRequest = {
|
|
60
61
|
...
|
|
61
62
|
};
|
|
62
63
|
```
|
|
@@ -81,6 +82,50 @@ try {
|
|
|
81
82
|
}
|
|
82
83
|
```
|
|
83
84
|
|
|
85
|
+
## File Uploads
|
|
86
|
+
|
|
87
|
+
You can upload files using the client:
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
import { createReadStream } from "fs";
|
|
91
|
+
import { SkyvernClient } from "@skyvern/client";
|
|
92
|
+
import * as fs from "fs";
|
|
93
|
+
|
|
94
|
+
const client = new SkyvernClient({ apiKey: "YOUR_API_KEY" });
|
|
95
|
+
await client.uploadFile({
|
|
96
|
+
file: fs.createReadStream("/path/to/your/file")
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
The client accepts a variety of types for file upload parameters:
|
|
100
|
+
* Stream types: `fs.ReadStream`, `stream.Readable`, and `ReadableStream`
|
|
101
|
+
* Buffered types: `Buffer`, `Blob`, `File`, `ArrayBuffer`, `ArrayBufferView`, and `Uint8Array`
|
|
102
|
+
|
|
103
|
+
### Metadata
|
|
104
|
+
|
|
105
|
+
You can configure metadata when uploading a file:
|
|
106
|
+
```typescript
|
|
107
|
+
const file: Uploadable.WithMetadata = {
|
|
108
|
+
data: createReadStream("path/to/file"),
|
|
109
|
+
filename: "my-file", // optional
|
|
110
|
+
contentType: "audio/mpeg", // optional
|
|
111
|
+
contentLength: 1949, // optional
|
|
112
|
+
};
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Alternatively, you can upload a file directly from a file path:
|
|
116
|
+
```typescript
|
|
117
|
+
const file : Uploadable.FromPath = {
|
|
118
|
+
path: "path/to/file",
|
|
119
|
+
filename: "my-file", // optional
|
|
120
|
+
contentType: "audio/mpeg", // optional
|
|
121
|
+
contentLength: 1949, // optional
|
|
122
|
+
};
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The metadata is used to set the `Content-Length`, `Content-Type`, and `Content-Disposition` headers. If not provided, the client will attempt to determine them automatically.
|
|
126
|
+
For example, `fs.ReadStream` has a `path` property which the SDK uses to retrieve the file size from the filesystem without loading it into memory.
|
|
127
|
+
|
|
128
|
+
|
|
84
129
|
## Advanced
|
|
85
130
|
|
|
86
131
|
### Additional Headers
|
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
|
|
@@ -104,6 +101,7 @@ export declare class SkyvernClient {
|
|
|
104
101
|
* page_size: 1,
|
|
105
102
|
* only_saved_tasks: true,
|
|
106
103
|
* only_workflows: true,
|
|
104
|
+
* only_templates: true,
|
|
107
105
|
* search_key: "search_key",
|
|
108
106
|
* title: "title",
|
|
109
107
|
* folder_id: "folder_id",
|
|
@@ -187,6 +185,7 @@ export declare class SkyvernClient {
|
|
|
187
185
|
* Retry sending the webhook for a run
|
|
188
186
|
*
|
|
189
187
|
* @param {string} runId - The id of the task run or the workflow run.
|
|
188
|
+
* @param {Skyvern.RetryRunWebhookRequest} request
|
|
190
189
|
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
191
190
|
*
|
|
192
191
|
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
@@ -194,7 +193,7 @@ export declare class SkyvernClient {
|
|
|
194
193
|
* @example
|
|
195
194
|
* await client.retryRunWebhook("tsk_123")
|
|
196
195
|
*/
|
|
197
|
-
retryRunWebhook(runId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
196
|
+
retryRunWebhook(runId: string, request?: Skyvern.RetryRunWebhookRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
198
197
|
private __retryRunWebhook;
|
|
199
198
|
/**
|
|
200
199
|
* Get timeline for a run (workflow run or task_v2 run)
|
|
@@ -211,6 +210,20 @@ export declare class SkyvernClient {
|
|
|
211
210
|
*/
|
|
212
211
|
getRunTimeline(runId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowRunTimeline[]>;
|
|
213
212
|
private __getRunTimeline;
|
|
213
|
+
/**
|
|
214
|
+
* @param {Skyvern.BodyUploadFileV1UploadFilePost} request
|
|
215
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
216
|
+
*
|
|
217
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* import { createReadStream } from "fs";
|
|
221
|
+
* await client.uploadFile({
|
|
222
|
+
* file: fs.createReadStream("/path/to/your/file")
|
|
223
|
+
* })
|
|
224
|
+
*/
|
|
225
|
+
uploadFile(request: Skyvern.BodyUploadFileV1UploadFilePost, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.UploadFileResponse>;
|
|
226
|
+
private __uploadFile;
|
|
214
227
|
/**
|
|
215
228
|
* Get all browser profiles for the organization
|
|
216
229
|
*
|
|
@@ -421,6 +434,21 @@ export declare class SkyvernClient {
|
|
|
421
434
|
*/
|
|
422
435
|
login(request: Skyvern.LoginRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowRunResponse>;
|
|
423
436
|
private __login;
|
|
437
|
+
/**
|
|
438
|
+
* Download a file from a website by navigating and clicking download buttons
|
|
439
|
+
*
|
|
440
|
+
* @param {Skyvern.DownloadFilesRequest} request
|
|
441
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
442
|
+
*
|
|
443
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
444
|
+
*
|
|
445
|
+
* @example
|
|
446
|
+
* await client.downloadFiles({
|
|
447
|
+
* navigation_goal: "navigation_goal"
|
|
448
|
+
* })
|
|
449
|
+
*/
|
|
450
|
+
downloadFiles(request: Skyvern.DownloadFilesRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowRunResponse>;
|
|
451
|
+
private __downloadFiles;
|
|
424
452
|
/**
|
|
425
453
|
* Retrieves a paginated list of scripts for the current organization
|
|
426
454
|
*
|
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.6",
|
|
60
|
+
"User-Agent": "@skyvern/client/1.0.6",
|
|
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)));
|
|
@@ -368,6 +363,7 @@ class SkyvernClient {
|
|
|
368
363
|
* page_size: 1,
|
|
369
364
|
* only_saved_tasks: true,
|
|
370
365
|
* only_workflows: true,
|
|
366
|
+
* only_templates: true,
|
|
371
367
|
* search_key: "search_key",
|
|
372
368
|
* title: "title",
|
|
373
369
|
* folder_id: "folder_id",
|
|
@@ -380,7 +376,7 @@ class SkyvernClient {
|
|
|
380
376
|
__getWorkflows() {
|
|
381
377
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
382
378
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
383
|
-
const { page, page_size: pageSize, only_saved_tasks: onlySavedTasks, only_workflows: onlyWorkflows, search_key: searchKey, title, folder_id: folderId, status, template, } = request;
|
|
379
|
+
const { page, page_size: pageSize, only_saved_tasks: onlySavedTasks, only_workflows: onlyWorkflows, only_templates: onlyTemplates, search_key: searchKey, title, folder_id: folderId, status, template, } = request;
|
|
384
380
|
const _queryParams = {};
|
|
385
381
|
if (page != null) {
|
|
386
382
|
_queryParams.page = page.toString();
|
|
@@ -394,6 +390,9 @@ class SkyvernClient {
|
|
|
394
390
|
if (onlyWorkflows != null) {
|
|
395
391
|
_queryParams.only_workflows = onlyWorkflows.toString();
|
|
396
392
|
}
|
|
393
|
+
if (onlyTemplates != null) {
|
|
394
|
+
_queryParams.only_templates = onlyTemplates.toString();
|
|
395
|
+
}
|
|
397
396
|
if (searchKey != null) {
|
|
398
397
|
_queryParams.search_key = searchKey;
|
|
399
398
|
}
|
|
@@ -784,6 +783,7 @@ class SkyvernClient {
|
|
|
784
783
|
* Retry sending the webhook for a run
|
|
785
784
|
*
|
|
786
785
|
* @param {string} runId - The id of the task run or the workflow run.
|
|
786
|
+
* @param {Skyvern.RetryRunWebhookRequest} request
|
|
787
787
|
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
788
788
|
*
|
|
789
789
|
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
@@ -791,10 +791,10 @@ class SkyvernClient {
|
|
|
791
791
|
* @example
|
|
792
792
|
* await client.retryRunWebhook("tsk_123")
|
|
793
793
|
*/
|
|
794
|
-
retryRunWebhook(runId, requestOptions) {
|
|
795
|
-
return core.HttpResponsePromise.fromPromise(this.__retryRunWebhook(runId, requestOptions));
|
|
794
|
+
retryRunWebhook(runId, request, requestOptions) {
|
|
795
|
+
return core.HttpResponsePromise.fromPromise(this.__retryRunWebhook(runId, request, requestOptions));
|
|
796
796
|
}
|
|
797
|
-
__retryRunWebhook(runId, requestOptions) {
|
|
797
|
+
__retryRunWebhook(runId, request, requestOptions) {
|
|
798
798
|
return __awaiter(this, void 0, void 0, function* () {
|
|
799
799
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
800
800
|
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);
|
|
@@ -802,7 +802,10 @@ class SkyvernClient {
|
|
|
802
802
|
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/runs/${core.url.encodePathParam(runId)}/retry_webhook`),
|
|
803
803
|
method: "POST",
|
|
804
804
|
headers: _headers,
|
|
805
|
+
contentType: "application/json",
|
|
805
806
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
807
|
+
requestType: "json",
|
|
808
|
+
body: request != null ? request : undefined,
|
|
806
809
|
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,
|
|
807
810
|
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,
|
|
808
811
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -904,6 +907,72 @@ class SkyvernClient {
|
|
|
904
907
|
}
|
|
905
908
|
});
|
|
906
909
|
}
|
|
910
|
+
/**
|
|
911
|
+
* @param {Skyvern.BodyUploadFileV1UploadFilePost} request
|
|
912
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
913
|
+
*
|
|
914
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
915
|
+
*
|
|
916
|
+
* @example
|
|
917
|
+
* import { createReadStream } from "fs";
|
|
918
|
+
* await client.uploadFile({
|
|
919
|
+
* file: fs.createReadStream("/path/to/your/file")
|
|
920
|
+
* })
|
|
921
|
+
*/
|
|
922
|
+
uploadFile(request, requestOptions) {
|
|
923
|
+
return core.HttpResponsePromise.fromPromise(this.__uploadFile(request, requestOptions));
|
|
924
|
+
}
|
|
925
|
+
__uploadFile(request, requestOptions) {
|
|
926
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
927
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
928
|
+
const _request = yield core.newFormData();
|
|
929
|
+
yield _request.appendFile("file", request.file);
|
|
930
|
+
const _maybeEncodedRequest = yield _request.getRequest();
|
|
931
|
+
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "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 }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
932
|
+
const _response = yield core.fetcher({
|
|
933
|
+
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/upload_file"),
|
|
934
|
+
method: "POST",
|
|
935
|
+
headers: _headers,
|
|
936
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
937
|
+
requestType: "file",
|
|
938
|
+
duplex: _maybeEncodedRequest.duplex,
|
|
939
|
+
body: _maybeEncodedRequest.body,
|
|
940
|
+
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,
|
|
941
|
+
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,
|
|
942
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
943
|
+
});
|
|
944
|
+
if (_response.ok) {
|
|
945
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
946
|
+
}
|
|
947
|
+
if (_response.error.reason === "status-code") {
|
|
948
|
+
switch (_response.error.statusCode) {
|
|
949
|
+
case 422:
|
|
950
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
951
|
+
default:
|
|
952
|
+
throw new errors.SkyvernError({
|
|
953
|
+
statusCode: _response.error.statusCode,
|
|
954
|
+
body: _response.error.body,
|
|
955
|
+
rawResponse: _response.rawResponse,
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
switch (_response.error.reason) {
|
|
960
|
+
case "non-json":
|
|
961
|
+
throw new errors.SkyvernError({
|
|
962
|
+
statusCode: _response.error.statusCode,
|
|
963
|
+
body: _response.error.rawBody,
|
|
964
|
+
rawResponse: _response.rawResponse,
|
|
965
|
+
});
|
|
966
|
+
case "timeout":
|
|
967
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/upload_file.");
|
|
968
|
+
case "unknown":
|
|
969
|
+
throw new errors.SkyvernError({
|
|
970
|
+
message: _response.error.errorMessage,
|
|
971
|
+
rawResponse: _response.rawResponse,
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
}
|
|
907
976
|
/**
|
|
908
977
|
* Get all browser profiles for the organization
|
|
909
978
|
*
|
|
@@ -1804,6 +1873,70 @@ class SkyvernClient {
|
|
|
1804
1873
|
}
|
|
1805
1874
|
});
|
|
1806
1875
|
}
|
|
1876
|
+
/**
|
|
1877
|
+
* Download a file from a website by navigating and clicking download buttons
|
|
1878
|
+
*
|
|
1879
|
+
* @param {Skyvern.DownloadFilesRequest} request
|
|
1880
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1881
|
+
*
|
|
1882
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
1883
|
+
*
|
|
1884
|
+
* @example
|
|
1885
|
+
* await client.downloadFiles({
|
|
1886
|
+
* navigation_goal: "navigation_goal"
|
|
1887
|
+
* })
|
|
1888
|
+
*/
|
|
1889
|
+
downloadFiles(request, requestOptions) {
|
|
1890
|
+
return core.HttpResponsePromise.fromPromise(this.__downloadFiles(request, requestOptions));
|
|
1891
|
+
}
|
|
1892
|
+
__downloadFiles(request, requestOptions) {
|
|
1893
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1894
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1895
|
+
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);
|
|
1896
|
+
const _response = yield core.fetcher({
|
|
1897
|
+
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"),
|
|
1898
|
+
method: "POST",
|
|
1899
|
+
headers: _headers,
|
|
1900
|
+
contentType: "application/json",
|
|
1901
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1902
|
+
requestType: "json",
|
|
1903
|
+
body: request,
|
|
1904
|
+
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,
|
|
1905
|
+
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,
|
|
1906
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1907
|
+
});
|
|
1908
|
+
if (_response.ok) {
|
|
1909
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1910
|
+
}
|
|
1911
|
+
if (_response.error.reason === "status-code") {
|
|
1912
|
+
switch (_response.error.statusCode) {
|
|
1913
|
+
case 422:
|
|
1914
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1915
|
+
default:
|
|
1916
|
+
throw new errors.SkyvernError({
|
|
1917
|
+
statusCode: _response.error.statusCode,
|
|
1918
|
+
body: _response.error.body,
|
|
1919
|
+
rawResponse: _response.rawResponse,
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
switch (_response.error.reason) {
|
|
1924
|
+
case "non-json":
|
|
1925
|
+
throw new errors.SkyvernError({
|
|
1926
|
+
statusCode: _response.error.statusCode,
|
|
1927
|
+
body: _response.error.rawBody,
|
|
1928
|
+
rawResponse: _response.rawResponse,
|
|
1929
|
+
});
|
|
1930
|
+
case "timeout":
|
|
1931
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/run/tasks/download_files.");
|
|
1932
|
+
case "unknown":
|
|
1933
|
+
throw new errors.SkyvernError({
|
|
1934
|
+
message: _response.error.errorMessage,
|
|
1935
|
+
rawResponse: _response.rawResponse,
|
|
1936
|
+
});
|
|
1937
|
+
}
|
|
1938
|
+
});
|
|
1939
|
+
}
|
|
1807
1940
|
/**
|
|
1808
1941
|
* Retrieves a paginated list of scripts for the current organization
|
|
1809
1942
|
*
|
|
@@ -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,6 +6,7 @@ import type * as Skyvern from "../../index.js";
|
|
|
6
6
|
* page_size: 1,
|
|
7
7
|
* only_saved_tasks: true,
|
|
8
8
|
* only_workflows: true,
|
|
9
|
+
* only_templates: true,
|
|
9
10
|
* search_key: "search_key",
|
|
10
11
|
* title: "title",
|
|
11
12
|
* folder_id: "folder_id",
|
|
@@ -17,6 +18,7 @@ export interface GetWorkflowsRequest {
|
|
|
17
18
|
page_size?: number;
|
|
18
19
|
only_saved_tasks?: boolean;
|
|
19
20
|
only_workflows?: boolean;
|
|
21
|
+
only_templates?: boolean;
|
|
20
22
|
/** Unified search across workflow title, folder name, and parameter metadata (key, description, default_value). */
|
|
21
23
|
search_key?: string;
|
|
22
24
|
/** Deprecated: use search_key instead. */
|
|
@@ -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` */
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
export type { BodyUploadFileV1UploadFilePost } from "./BodyUploadFileV1UploadFilePost.js";
|
|
1
2
|
export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.js";
|
|
2
3
|
export type { CreateBrowserSessionRequest } from "./CreateBrowserSessionRequest.js";
|
|
3
4
|
export type { CreateCredentialRequest } from "./CreateCredentialRequest.js";
|
|
4
5
|
export type { CreateScriptRequest } from "./CreateScriptRequest.js";
|
|
5
6
|
export type { CreateWorkflowRequest } from "./CreateWorkflowRequest.js";
|
|
6
7
|
export type { DeployScriptRequest } from "./DeployScriptRequest.js";
|
|
8
|
+
export type { DownloadFilesRequest } from "./DownloadFilesRequest.js";
|
|
7
9
|
export type { GetCredentialsRequest } from "./GetCredentialsRequest.js";
|
|
8
10
|
export type { GetRunArtifactsRequest } from "./GetRunArtifactsRequest.js";
|
|
9
11
|
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 = {}));
|