@skyvern/client 0.2.21 → 0.2.23
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 +33 -5
- package/dist/cjs/Client.js +134 -37
- package/dist/cjs/api/client/requests/CreateWorkflowRequest.d.ts +13 -0
- package/dist/cjs/api/client/requests/CreateWorkflowRequest.js +3 -0
- package/dist/cjs/api/client/requests/GetWorkflowsRequest.d.ts +6 -1
- package/dist/cjs/api/client/requests/RunSdkActionRequest.d.ts +22 -0
- package/dist/cjs/api/client/requests/RunSdkActionRequest.js +3 -0
- package/dist/cjs/api/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/browserProfiles/client/Client.d.ts +69 -0
- package/dist/cjs/api/resources/browserProfiles/client/Client.js +309 -0
- package/dist/cjs/api/resources/browserProfiles/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/browserProfiles/client/index.js +17 -0
- package/dist/cjs/api/resources/browserProfiles/client/requests/CreateBrowserProfileRequest.d.ts +16 -0
- package/dist/cjs/api/resources/browserProfiles/client/requests/CreateBrowserProfileRequest.js +3 -0
- package/dist/cjs/api/resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.d.ts +10 -0
- package/dist/cjs/api/resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.js +3 -0
- package/dist/cjs/api/resources/browserProfiles/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/browserProfiles/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/browserProfiles/index.d.ts +1 -0
- package/dist/cjs/api/resources/browserProfiles/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/index.js +8 -1
- package/dist/cjs/api/resources/scripts/client/Client.js +1 -1
- package/dist/cjs/api/resources/workflows/client/Client.d.ts +108 -0
- package/dist/cjs/api/resources/workflows/client/Client.js +465 -0
- package/dist/cjs/api/resources/workflows/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/workflows/client/index.js +17 -0
- package/dist/cjs/api/resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.d.ts +10 -0
- package/dist/cjs/api/resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/FolderCreate.d.ts +12 -0
- package/dist/cjs/api/resources/workflows/client/requests/FolderCreate.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/FolderUpdate.d.ts +10 -0
- package/dist/cjs/api/resources/workflows/client/requests/FolderUpdate.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.d.ts +16 -0
- package/dist/cjs/api/resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/UpdateWorkflowFolderRequest.d.ts +8 -0
- package/dist/cjs/api/resources/workflows/client/requests/UpdateWorkflowFolderRequest.js +3 -0
- package/dist/cjs/api/resources/workflows/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/workflows/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/workflows/index.d.ts +1 -0
- package/dist/cjs/api/resources/workflows/index.js +17 -0
- package/dist/cjs/api/types/ActAction.d.ts +15 -0
- package/dist/cjs/api/types/ActAction.js +3 -0
- package/dist/cjs/api/types/Action.d.ts +1 -0
- package/dist/cjs/api/types/BrowserProfile.d.ts +9 -0
- package/dist/cjs/api/types/BrowserProfile.js +3 -0
- package/dist/cjs/api/types/ClickAction.d.ts +19 -0
- package/dist/cjs/api/types/ClickAction.js +3 -0
- package/dist/cjs/api/types/ClickContext.d.ts +4 -0
- package/dist/cjs/api/types/ClickContext.js +3 -0
- package/dist/cjs/api/types/ExtractAction.d.ts +25 -0
- package/dist/cjs/api/types/ExtractAction.js +3 -0
- package/dist/cjs/api/types/Folder.d.ts +15 -0
- package/dist/cjs/api/types/Folder.js +3 -0
- package/dist/cjs/api/types/InputOrSelectContext.d.ts +1 -0
- package/dist/cjs/api/types/InputTextAction.d.ts +25 -0
- package/dist/cjs/api/types/InputTextAction.js +3 -0
- package/dist/cjs/api/types/RunSdkActionRequestAction.d.ts +25 -0
- package/dist/cjs/api/types/RunSdkActionRequestAction.js +3 -0
- package/dist/cjs/api/types/RunSdkActionResponse.d.ts +9 -0
- package/dist/cjs/api/types/RunSdkActionResponse.js +3 -0
- package/dist/cjs/api/types/SelectOptionAction.d.ts +21 -0
- package/dist/cjs/api/types/SelectOptionAction.js +3 -0
- package/dist/cjs/api/types/TaskRunResponse.d.ts +2 -0
- package/dist/cjs/api/types/UploadFileAction.d.ts +21 -0
- package/dist/cjs/api/types/UploadFileAction.js +3 -0
- package/dist/cjs/api/types/Workflow.d.ts +2 -0
- package/dist/cjs/api/types/WorkflowCreateYamlRequest.d.ts +1 -0
- package/dist/cjs/api/types/WorkflowRunRequest.d.ts +2 -0
- package/dist/cjs/api/types/WorkflowRunResponse.d.ts +2 -0
- package/dist/cjs/api/types/WorkflowStatus.d.ts +2 -0
- package/dist/cjs/api/types/WorkflowStatus.js +2 -0
- package/dist/cjs/api/types/index.d.ts +11 -0
- package/dist/cjs/api/types/index.js +11 -0
- package/dist/cjs/environments.d.ts +3 -3
- package/dist/cjs/environments.js +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +33 -5
- package/dist/esm/Client.mjs +132 -35
- package/dist/esm/api/client/requests/CreateWorkflowRequest.d.mts +13 -0
- package/dist/esm/api/client/requests/CreateWorkflowRequest.mjs +2 -0
- package/dist/esm/api/client/requests/GetWorkflowsRequest.d.mts +6 -1
- package/dist/esm/api/client/requests/RunSdkActionRequest.d.mts +22 -0
- package/dist/esm/api/client/requests/RunSdkActionRequest.mjs +2 -0
- package/dist/esm/api/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/browserProfiles/client/Client.d.mts +69 -0
- package/dist/esm/api/resources/browserProfiles/client/Client.mjs +272 -0
- package/dist/esm/api/resources/browserProfiles/client/index.d.mts +1 -0
- package/dist/esm/api/resources/browserProfiles/client/index.mjs +1 -0
- package/dist/esm/api/resources/browserProfiles/client/requests/CreateBrowserProfileRequest.d.mts +16 -0
- package/dist/esm/api/resources/browserProfiles/client/requests/CreateBrowserProfileRequest.mjs +2 -0
- package/dist/esm/api/resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.d.mts +10 -0
- package/dist/esm/api/resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.mjs +2 -0
- package/dist/esm/api/resources/browserProfiles/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/browserProfiles/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/browserProfiles/index.d.mts +1 -0
- package/dist/esm/api/resources/browserProfiles/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/index.mjs +4 -0
- package/dist/esm/api/resources/scripts/client/Client.mjs +1 -1
- package/dist/esm/api/resources/workflows/client/Client.d.mts +108 -0
- package/dist/esm/api/resources/workflows/client/Client.mjs +428 -0
- package/dist/esm/api/resources/workflows/client/index.d.mts +1 -0
- package/dist/esm/api/resources/workflows/client/index.mjs +1 -0
- package/dist/esm/api/resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.d.mts +10 -0
- package/dist/esm/api/resources/workflows/client/requests/DeleteFolderV1FoldersFolderIdDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/FolderCreate.d.mts +12 -0
- package/dist/esm/api/resources/workflows/client/requests/FolderCreate.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/FolderUpdate.d.mts +10 -0
- package/dist/esm/api/resources/workflows/client/requests/FolderUpdate.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.d.mts +16 -0
- package/dist/esm/api/resources/workflows/client/requests/GetFoldersV1FoldersGetRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/UpdateWorkflowFolderRequest.d.mts +8 -0
- package/dist/esm/api/resources/workflows/client/requests/UpdateWorkflowFolderRequest.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/workflows/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/workflows/index.d.mts +1 -0
- package/dist/esm/api/resources/workflows/index.mjs +1 -0
- package/dist/esm/api/types/ActAction.d.mts +15 -0
- package/dist/esm/api/types/ActAction.mjs +2 -0
- package/dist/esm/api/types/Action.d.mts +1 -0
- package/dist/esm/api/types/BrowserProfile.d.mts +9 -0
- package/dist/esm/api/types/BrowserProfile.mjs +2 -0
- package/dist/esm/api/types/ClickAction.d.mts +19 -0
- package/dist/esm/api/types/ClickAction.mjs +2 -0
- package/dist/esm/api/types/ClickContext.d.mts +4 -0
- package/dist/esm/api/types/ClickContext.mjs +2 -0
- package/dist/esm/api/types/ExtractAction.d.mts +25 -0
- package/dist/esm/api/types/ExtractAction.mjs +2 -0
- package/dist/esm/api/types/Folder.d.mts +15 -0
- package/dist/esm/api/types/Folder.mjs +2 -0
- package/dist/esm/api/types/InputOrSelectContext.d.mts +1 -0
- package/dist/esm/api/types/InputTextAction.d.mts +25 -0
- package/dist/esm/api/types/InputTextAction.mjs +2 -0
- package/dist/esm/api/types/RunSdkActionRequestAction.d.mts +25 -0
- package/dist/esm/api/types/RunSdkActionRequestAction.mjs +2 -0
- package/dist/esm/api/types/RunSdkActionResponse.d.mts +9 -0
- package/dist/esm/api/types/RunSdkActionResponse.mjs +2 -0
- package/dist/esm/api/types/SelectOptionAction.d.mts +21 -0
- package/dist/esm/api/types/SelectOptionAction.mjs +2 -0
- package/dist/esm/api/types/TaskRunResponse.d.mts +2 -0
- package/dist/esm/api/types/UploadFileAction.d.mts +21 -0
- package/dist/esm/api/types/UploadFileAction.mjs +2 -0
- package/dist/esm/api/types/Workflow.d.mts +2 -0
- package/dist/esm/api/types/WorkflowCreateYamlRequest.d.mts +1 -0
- package/dist/esm/api/types/WorkflowRunRequest.d.mts +2 -0
- package/dist/esm/api/types/WorkflowRunResponse.d.mts +2 -0
- package/dist/esm/api/types/WorkflowStatus.d.mts +2 -0
- package/dist/esm/api/types/WorkflowStatus.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +11 -0
- package/dist/esm/api/types/index.mjs +11 -0
- package/dist/esm/environments.d.mts +3 -3
- package/dist/esm/environments.mjs +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +12 -3
- package/reference.md +657 -11
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import * as Skyvern from "../../../index.js";
|
|
4
|
+
export declare namespace BrowserProfiles {
|
|
5
|
+
interface Options extends BaseClientOptions {
|
|
6
|
+
}
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class BrowserProfiles {
|
|
11
|
+
protected readonly _options: BrowserProfiles.Options;
|
|
12
|
+
constructor(_options?: BrowserProfiles.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Get all browser profiles for the organization
|
|
15
|
+
*
|
|
16
|
+
* @param {Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest} request
|
|
17
|
+
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.browserProfiles.listBrowserProfiles({
|
|
23
|
+
* include_deleted: true
|
|
24
|
+
* })
|
|
25
|
+
*/
|
|
26
|
+
listBrowserProfiles(request?: Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest, requestOptions?: BrowserProfiles.RequestOptions): core.HttpResponsePromise<Skyvern.BrowserProfile[]>;
|
|
27
|
+
private __listBrowserProfiles;
|
|
28
|
+
/**
|
|
29
|
+
* @param {Skyvern.CreateBrowserProfileRequest} request
|
|
30
|
+
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.browserProfiles.createBrowserProfile({
|
|
36
|
+
* name: "name"
|
|
37
|
+
* })
|
|
38
|
+
*/
|
|
39
|
+
createBrowserProfile(request: Skyvern.CreateBrowserProfileRequest, requestOptions?: BrowserProfiles.RequestOptions): core.HttpResponsePromise<Skyvern.BrowserProfile>;
|
|
40
|
+
private __createBrowserProfile;
|
|
41
|
+
/**
|
|
42
|
+
* Get a specific browser profile by ID
|
|
43
|
+
*
|
|
44
|
+
* @param {string} profileId - The ID of the browser profile. browser_profile_id starts with `bp_`
|
|
45
|
+
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
|
+
*
|
|
47
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
48
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* await client.browserProfiles.getBrowserProfile("bp_123456")
|
|
52
|
+
*/
|
|
53
|
+
getBrowserProfile(profileId: string, requestOptions?: BrowserProfiles.RequestOptions): core.HttpResponsePromise<Skyvern.BrowserProfile>;
|
|
54
|
+
private __getBrowserProfile;
|
|
55
|
+
/**
|
|
56
|
+
* Delete a browser profile (soft delete)
|
|
57
|
+
*
|
|
58
|
+
* @param {string} profileId - The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
|
59
|
+
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
62
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.browserProfiles.deleteBrowserProfile("bp_123456")
|
|
66
|
+
*/
|
|
67
|
+
deleteBrowserProfile(profileId: string, requestOptions?: BrowserProfiles.RequestOptions): core.HttpResponsePromise<void>;
|
|
68
|
+
private __deleteBrowserProfile;
|
|
69
|
+
}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.BrowserProfiles = void 0;
|
|
47
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
48
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
50
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
51
|
+
const Skyvern = __importStar(require("../../../index.js"));
|
|
52
|
+
class BrowserProfiles {
|
|
53
|
+
constructor(_options = {}) {
|
|
54
|
+
this._options = _options;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get all browser profiles for the organization
|
|
58
|
+
*
|
|
59
|
+
* @param {Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest} request
|
|
60
|
+
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.browserProfiles.listBrowserProfiles({
|
|
66
|
+
* include_deleted: true
|
|
67
|
+
* })
|
|
68
|
+
*/
|
|
69
|
+
listBrowserProfiles(request = {}, requestOptions) {
|
|
70
|
+
return core.HttpResponsePromise.fromPromise(this.__listBrowserProfiles(request, requestOptions));
|
|
71
|
+
}
|
|
72
|
+
__listBrowserProfiles() {
|
|
73
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
74
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
75
|
+
const { include_deleted: includeDeleted } = request;
|
|
76
|
+
const _queryParams = {};
|
|
77
|
+
if (includeDeleted != null) {
|
|
78
|
+
_queryParams.include_deleted = includeDeleted.toString();
|
|
79
|
+
}
|
|
80
|
+
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);
|
|
81
|
+
const _response = yield core.fetcher({
|
|
82
|
+
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"),
|
|
83
|
+
method: "GET",
|
|
84
|
+
headers: _headers,
|
|
85
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
86
|
+
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,
|
|
87
|
+
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,
|
|
88
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
89
|
+
});
|
|
90
|
+
if (_response.ok) {
|
|
91
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
92
|
+
}
|
|
93
|
+
if (_response.error.reason === "status-code") {
|
|
94
|
+
switch (_response.error.statusCode) {
|
|
95
|
+
case 422:
|
|
96
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
97
|
+
default:
|
|
98
|
+
throw new errors.SkyvernError({
|
|
99
|
+
statusCode: _response.error.statusCode,
|
|
100
|
+
body: _response.error.body,
|
|
101
|
+
rawResponse: _response.rawResponse,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
switch (_response.error.reason) {
|
|
106
|
+
case "non-json":
|
|
107
|
+
throw new errors.SkyvernError({
|
|
108
|
+
statusCode: _response.error.statusCode,
|
|
109
|
+
body: _response.error.rawBody,
|
|
110
|
+
rawResponse: _response.rawResponse,
|
|
111
|
+
});
|
|
112
|
+
case "timeout":
|
|
113
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/browser_profiles.");
|
|
114
|
+
case "unknown":
|
|
115
|
+
throw new errors.SkyvernError({
|
|
116
|
+
message: _response.error.errorMessage,
|
|
117
|
+
rawResponse: _response.rawResponse,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @param {Skyvern.CreateBrowserProfileRequest} request
|
|
124
|
+
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
125
|
+
*
|
|
126
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* await client.browserProfiles.createBrowserProfile({
|
|
130
|
+
* name: "name"
|
|
131
|
+
* })
|
|
132
|
+
*/
|
|
133
|
+
createBrowserProfile(request, requestOptions) {
|
|
134
|
+
return core.HttpResponsePromise.fromPromise(this.__createBrowserProfile(request, requestOptions));
|
|
135
|
+
}
|
|
136
|
+
__createBrowserProfile(request, requestOptions) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
139
|
+
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);
|
|
140
|
+
const _response = yield core.fetcher({
|
|
141
|
+
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"),
|
|
142
|
+
method: "POST",
|
|
143
|
+
headers: _headers,
|
|
144
|
+
contentType: "application/json",
|
|
145
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
146
|
+
requestType: "json",
|
|
147
|
+
body: request,
|
|
148
|
+
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,
|
|
149
|
+
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,
|
|
150
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
151
|
+
});
|
|
152
|
+
if (_response.ok) {
|
|
153
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
154
|
+
}
|
|
155
|
+
if (_response.error.reason === "status-code") {
|
|
156
|
+
switch (_response.error.statusCode) {
|
|
157
|
+
case 422:
|
|
158
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
159
|
+
default:
|
|
160
|
+
throw new errors.SkyvernError({
|
|
161
|
+
statusCode: _response.error.statusCode,
|
|
162
|
+
body: _response.error.body,
|
|
163
|
+
rawResponse: _response.rawResponse,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
switch (_response.error.reason) {
|
|
168
|
+
case "non-json":
|
|
169
|
+
throw new errors.SkyvernError({
|
|
170
|
+
statusCode: _response.error.statusCode,
|
|
171
|
+
body: _response.error.rawBody,
|
|
172
|
+
rawResponse: _response.rawResponse,
|
|
173
|
+
});
|
|
174
|
+
case "timeout":
|
|
175
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/browser_profiles.");
|
|
176
|
+
case "unknown":
|
|
177
|
+
throw new errors.SkyvernError({
|
|
178
|
+
message: _response.error.errorMessage,
|
|
179
|
+
rawResponse: _response.rawResponse,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Get a specific browser profile by ID
|
|
186
|
+
*
|
|
187
|
+
* @param {string} profileId - The ID of the browser profile. browser_profile_id starts with `bp_`
|
|
188
|
+
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
189
|
+
*
|
|
190
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
191
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* await client.browserProfiles.getBrowserProfile("bp_123456")
|
|
195
|
+
*/
|
|
196
|
+
getBrowserProfile(profileId, requestOptions) {
|
|
197
|
+
return core.HttpResponsePromise.fromPromise(this.__getBrowserProfile(profileId, requestOptions));
|
|
198
|
+
}
|
|
199
|
+
__getBrowserProfile(profileId, requestOptions) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
202
|
+
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);
|
|
203
|
+
const _response = yield core.fetcher({
|
|
204
|
+
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)}`),
|
|
205
|
+
method: "GET",
|
|
206
|
+
headers: _headers,
|
|
207
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
208
|
+
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,
|
|
209
|
+
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,
|
|
210
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
211
|
+
});
|
|
212
|
+
if (_response.ok) {
|
|
213
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
214
|
+
}
|
|
215
|
+
if (_response.error.reason === "status-code") {
|
|
216
|
+
switch (_response.error.statusCode) {
|
|
217
|
+
case 404:
|
|
218
|
+
throw new Skyvern.NotFoundError(_response.error.body, _response.rawResponse);
|
|
219
|
+
case 422:
|
|
220
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
221
|
+
default:
|
|
222
|
+
throw new errors.SkyvernError({
|
|
223
|
+
statusCode: _response.error.statusCode,
|
|
224
|
+
body: _response.error.body,
|
|
225
|
+
rawResponse: _response.rawResponse,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
switch (_response.error.reason) {
|
|
230
|
+
case "non-json":
|
|
231
|
+
throw new errors.SkyvernError({
|
|
232
|
+
statusCode: _response.error.statusCode,
|
|
233
|
+
body: _response.error.rawBody,
|
|
234
|
+
rawResponse: _response.rawResponse,
|
|
235
|
+
});
|
|
236
|
+
case "timeout":
|
|
237
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/browser_profiles/{profile_id}.");
|
|
238
|
+
case "unknown":
|
|
239
|
+
throw new errors.SkyvernError({
|
|
240
|
+
message: _response.error.errorMessage,
|
|
241
|
+
rawResponse: _response.rawResponse,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Delete a browser profile (soft delete)
|
|
248
|
+
*
|
|
249
|
+
* @param {string} profileId - The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
|
250
|
+
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
|
251
|
+
*
|
|
252
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
253
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
254
|
+
*
|
|
255
|
+
* @example
|
|
256
|
+
* await client.browserProfiles.deleteBrowserProfile("bp_123456")
|
|
257
|
+
*/
|
|
258
|
+
deleteBrowserProfile(profileId, requestOptions) {
|
|
259
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteBrowserProfile(profileId, requestOptions));
|
|
260
|
+
}
|
|
261
|
+
__deleteBrowserProfile(profileId, requestOptions) {
|
|
262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
264
|
+
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);
|
|
265
|
+
const _response = yield core.fetcher({
|
|
266
|
+
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)}`),
|
|
267
|
+
method: "DELETE",
|
|
268
|
+
headers: _headers,
|
|
269
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
270
|
+
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,
|
|
271
|
+
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,
|
|
272
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
273
|
+
});
|
|
274
|
+
if (_response.ok) {
|
|
275
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
276
|
+
}
|
|
277
|
+
if (_response.error.reason === "status-code") {
|
|
278
|
+
switch (_response.error.statusCode) {
|
|
279
|
+
case 404:
|
|
280
|
+
throw new Skyvern.NotFoundError(_response.error.body, _response.rawResponse);
|
|
281
|
+
case 422:
|
|
282
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
283
|
+
default:
|
|
284
|
+
throw new errors.SkyvernError({
|
|
285
|
+
statusCode: _response.error.statusCode,
|
|
286
|
+
body: _response.error.body,
|
|
287
|
+
rawResponse: _response.rawResponse,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
switch (_response.error.reason) {
|
|
292
|
+
case "non-json":
|
|
293
|
+
throw new errors.SkyvernError({
|
|
294
|
+
statusCode: _response.error.statusCode,
|
|
295
|
+
body: _response.error.rawBody,
|
|
296
|
+
rawResponse: _response.rawResponse,
|
|
297
|
+
});
|
|
298
|
+
case "timeout":
|
|
299
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling DELETE /v1/browser_profiles/{profile_id}.");
|
|
300
|
+
case "unknown":
|
|
301
|
+
throw new errors.SkyvernError({
|
|
302
|
+
message: _response.error.errorMessage,
|
|
303
|
+
rawResponse: _response.rawResponse,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
exports.BrowserProfiles = BrowserProfiles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
package/dist/cjs/api/resources/browserProfiles/client/requests/CreateBrowserProfileRequest.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* name: "name"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface CreateBrowserProfileRequest {
|
|
8
|
+
/** Name for the browser profile */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Optional profile description */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Persistent browser session to convert into a profile */
|
|
13
|
+
browser_session_id?: string;
|
|
14
|
+
/** Workflow run whose persisted session should be captured */
|
|
15
|
+
workflow_run_id?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1 +1,5 @@
|
|
|
1
|
+
export * from "./browserProfiles/client/requests/index.js";
|
|
2
|
+
export * as browserProfiles from "./browserProfiles/index.js";
|
|
1
3
|
export * as scripts from "./scripts/index.js";
|
|
4
|
+
export * from "./workflows/client/requests/index.js";
|
|
5
|
+
export * as workflows from "./workflows/index.js";
|
|
@@ -15,6 +15,9 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
18
21
|
var __importStar = (this && this.__importStar) || (function () {
|
|
19
22
|
var ownKeys = function(o) {
|
|
20
23
|
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
@@ -33,5 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
36
|
};
|
|
34
37
|
})();
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.scripts = void 0;
|
|
39
|
+
exports.workflows = exports.scripts = exports.browserProfiles = void 0;
|
|
40
|
+
__exportStar(require("./browserProfiles/client/requests/index.js"), exports);
|
|
41
|
+
exports.browserProfiles = __importStar(require("./browserProfiles/index.js"));
|
|
37
42
|
exports.scripts = __importStar(require("./scripts/index.js"));
|
|
43
|
+
__exportStar(require("./workflows/client/requests/index.js"), exports);
|
|
44
|
+
exports.workflows = __importStar(require("./workflows/index.js"));
|
|
@@ -72,7 +72,7 @@ class Scripts {
|
|
|
72
72
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
73
73
|
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);
|
|
74
74
|
const _response = yield core.fetcher({
|
|
75
|
-
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.
|
|
75
|
+
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/scripts/${core.url.encodePathParam(scriptId)}/run`),
|
|
76
76
|
method: "POST",
|
|
77
77
|
headers: _headers,
|
|
78
78
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import * as Skyvern from "../../../index.js";
|
|
4
|
+
export declare namespace Workflows {
|
|
5
|
+
interface Options extends BaseClientOptions {
|
|
6
|
+
}
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class Workflows {
|
|
11
|
+
protected readonly _options: Workflows.Options;
|
|
12
|
+
constructor(_options?: Workflows.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Get all folders for the organization
|
|
15
|
+
*
|
|
16
|
+
* @param {Skyvern.GetFoldersV1FoldersGetRequest} request
|
|
17
|
+
* @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.workflows.getFolders({
|
|
23
|
+
* page: 1,
|
|
24
|
+
* page_size: 1,
|
|
25
|
+
* search: "search"
|
|
26
|
+
* })
|
|
27
|
+
*/
|
|
28
|
+
getFolders(request?: Skyvern.GetFoldersV1FoldersGetRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<Skyvern.Folder[]>;
|
|
29
|
+
private __getFolders;
|
|
30
|
+
/**
|
|
31
|
+
* Create a new folder to organize workflows
|
|
32
|
+
*
|
|
33
|
+
* @param {Skyvern.FolderCreate} request
|
|
34
|
+
* @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
|
+
*
|
|
36
|
+
* @throws {@link Skyvern.BadRequestError}
|
|
37
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* await client.workflows.createFolder({
|
|
41
|
+
* title: "title"
|
|
42
|
+
* })
|
|
43
|
+
*/
|
|
44
|
+
createFolder(request: Skyvern.FolderCreate, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<Skyvern.Folder>;
|
|
45
|
+
private __createFolder;
|
|
46
|
+
/**
|
|
47
|
+
* Get a specific folder by ID
|
|
48
|
+
*
|
|
49
|
+
* @param {string} folderId - Folder ID
|
|
50
|
+
* @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
53
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await client.workflows.getFolder("fld_123")
|
|
57
|
+
*/
|
|
58
|
+
getFolder(folderId: string, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<Skyvern.Folder>;
|
|
59
|
+
private __getFolder;
|
|
60
|
+
/**
|
|
61
|
+
* Update a folder's title or description
|
|
62
|
+
*
|
|
63
|
+
* @param {string} folderId - Folder ID
|
|
64
|
+
* @param {Skyvern.FolderUpdate} request
|
|
65
|
+
* @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
68
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.workflows.updateFolder("fld_123")
|
|
72
|
+
*/
|
|
73
|
+
updateFolder(folderId: string, request?: Skyvern.FolderUpdate, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<Skyvern.Folder>;
|
|
74
|
+
private __updateFolder;
|
|
75
|
+
/**
|
|
76
|
+
* Delete a folder. Optionally delete all workflows in the folder.
|
|
77
|
+
*
|
|
78
|
+
* @param {string} folderId - Folder ID
|
|
79
|
+
* @param {Skyvern.DeleteFolderV1FoldersFolderIdDeleteRequest} request
|
|
80
|
+
* @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
83
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* await client.workflows.deleteFolder("fld_123", {
|
|
87
|
+
* delete_workflows: true
|
|
88
|
+
* })
|
|
89
|
+
*/
|
|
90
|
+
deleteFolder(folderId: string, request?: Skyvern.DeleteFolderV1FoldersFolderIdDeleteRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
91
|
+
private __deleteFolder;
|
|
92
|
+
/**
|
|
93
|
+
* Update a workflow's folder assignment for the latest version
|
|
94
|
+
*
|
|
95
|
+
* @param {string} workflowPermanentId - Workflow permanent ID
|
|
96
|
+
* @param {Skyvern.UpdateWorkflowFolderRequest} request
|
|
97
|
+
* @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link Skyvern.BadRequestError}
|
|
100
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
101
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* await client.workflows.updateWorkflowFolder("wpid_123")
|
|
105
|
+
*/
|
|
106
|
+
updateWorkflowFolder(workflowPermanentId: string, request?: Skyvern.UpdateWorkflowFolderRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise<Skyvern.Workflow>;
|
|
107
|
+
private __updateWorkflowFolder;
|
|
108
|
+
}
|