@skyvern/client 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/cjs/Client.d.ts +60 -3
  2. package/dist/cjs/Client.js +266 -11
  3. package/dist/cjs/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.d.ts → client/requests/ListBrowserProfilesRequest.d.ts} +1 -1
  4. package/dist/cjs/api/client/requests/LoginRequest.d.ts +2 -0
  5. package/dist/cjs/api/client/requests/index.d.ts +2 -0
  6. package/dist/cjs/api/errors/ConflictError.d.ts +5 -0
  7. package/dist/cjs/api/errors/ConflictError.js +50 -0
  8. package/dist/cjs/api/errors/index.d.ts +1 -0
  9. package/dist/cjs/api/errors/index.js +1 -0
  10. package/dist/cjs/api/resources/index.d.ts +0 -2
  11. package/dist/cjs/api/resources/index.js +4 -6
  12. package/dist/cjs/api/types/ActionBlock.d.ts +3 -1
  13. package/dist/cjs/api/types/ActionBlockYaml.d.ts +3 -1
  14. package/dist/cjs/api/types/BlockType.d.ts +1 -0
  15. package/dist/cjs/api/types/BlockType.js +1 -0
  16. package/dist/cjs/api/types/BranchCondition.d.ts +10 -0
  17. package/dist/cjs/api/{resources/browserProfiles/client/requests/index.js → types/BranchCondition.js} +1 -0
  18. package/dist/cjs/api/types/BranchCriteria.d.ts +8 -0
  19. package/dist/cjs/api/types/BranchCriteria.js +3 -0
  20. package/dist/cjs/api/types/CodeBlock.d.ts +3 -0
  21. package/dist/cjs/api/types/CodeBlockYaml.d.ts +3 -0
  22. package/dist/cjs/api/types/ConditionalBlock.d.ts +15 -0
  23. package/dist/cjs/api/types/ConditionalBlock.js +3 -0
  24. package/dist/cjs/api/types/DownloadToS3Block.d.ts +3 -0
  25. package/dist/cjs/api/types/DownloadToS3BlockYaml.d.ts +3 -0
  26. package/dist/cjs/api/types/ExtractionBlock.d.ts +3 -1
  27. package/dist/cjs/api/types/ExtractionBlockYaml.d.ts +3 -1
  28. package/dist/cjs/api/types/FileDownloadBlock.d.ts +3 -1
  29. package/dist/cjs/api/types/FileDownloadBlockYaml.d.ts +3 -1
  30. package/dist/cjs/api/types/FileParserBlock.d.ts +3 -0
  31. package/dist/cjs/api/types/FileParserBlockYaml.d.ts +3 -0
  32. package/dist/cjs/api/types/FileUploadBlock.d.ts +3 -0
  33. package/dist/cjs/api/types/FileUploadBlockYaml.d.ts +3 -0
  34. package/dist/cjs/api/types/ForLoopBlock.d.ts +3 -0
  35. package/dist/cjs/api/types/ForLoopBlockLoopBlocksItem.d.ts +4 -1
  36. package/dist/cjs/api/types/ForLoopBlockYaml.d.ts +3 -0
  37. package/dist/cjs/api/types/GeoTarget.d.ts +21 -0
  38. package/dist/cjs/api/types/GeoTarget.js +3 -0
  39. package/dist/cjs/api/types/HttpRequestBlock.d.ts +3 -0
  40. package/dist/cjs/api/types/HttpRequestBlockYaml.d.ts +3 -0
  41. package/dist/cjs/api/types/HumanInteractionBlock.d.ts +3 -1
  42. package/dist/cjs/api/types/HumanInteractionBlockYaml.d.ts +3 -0
  43. package/dist/cjs/api/types/LocateElementAction.d.ts +7 -0
  44. package/dist/cjs/api/types/LocateElementAction.js +3 -0
  45. package/dist/cjs/api/types/LoginBlock.d.ts +3 -1
  46. package/dist/cjs/api/types/LoginBlockYaml.d.ts +3 -1
  47. package/dist/cjs/api/types/NavigationBlock.d.ts +3 -1
  48. package/dist/cjs/api/types/NavigationBlockYaml.d.ts +3 -1
  49. package/dist/cjs/api/types/NonEmptyPasswordCredential.d.ts +2 -0
  50. package/dist/cjs/api/types/PasswordCredentialResponse.d.ts +2 -0
  51. package/dist/cjs/api/types/PdfParserBlock.d.ts +3 -0
  52. package/dist/cjs/api/types/PdfParserBlockYaml.d.ts +3 -0
  53. package/dist/cjs/api/types/RunSdkActionRequestAction.d.ts +4 -1
  54. package/dist/cjs/api/types/SendEmailBlock.d.ts +3 -0
  55. package/dist/cjs/api/types/SendEmailBlockYaml.d.ts +3 -0
  56. package/dist/cjs/api/types/TaskBlock.d.ts +3 -1
  57. package/dist/cjs/api/types/TaskBlockYaml.d.ts +3 -1
  58. package/dist/cjs/api/types/TaskRunRequest.d.ts +29 -1
  59. package/dist/cjs/api/types/TaskV2Block.d.ts +3 -0
  60. package/dist/cjs/api/types/TaskV2BlockYaml.d.ts +3 -0
  61. package/dist/cjs/api/types/TextPromptBlock.d.ts +3 -0
  62. package/dist/cjs/api/types/TextPromptBlockYaml.d.ts +3 -0
  63. package/dist/cjs/api/types/UploadToS3Block.d.ts +3 -0
  64. package/dist/cjs/api/types/UploadToS3BlockYaml.d.ts +3 -0
  65. package/dist/cjs/api/types/UrlBlock.d.ts +3 -1
  66. package/dist/cjs/api/types/UrlBlockYaml.d.ts +3 -0
  67. package/dist/cjs/api/types/ValidationBlock.d.ts +3 -1
  68. package/dist/cjs/api/types/ValidationBlockYaml.d.ts +3 -0
  69. package/dist/cjs/api/types/WaitBlock.d.ts +3 -0
  70. package/dist/cjs/api/types/WaitBlockYaml.d.ts +3 -0
  71. package/dist/cjs/api/types/Workflow.d.ts +4 -1
  72. package/dist/cjs/api/types/WorkflowCreateYamlRequest.d.ts +4 -1
  73. package/dist/cjs/api/types/WorkflowDefinition.d.ts +1 -0
  74. package/dist/cjs/api/types/WorkflowDefinitionBlocksItem.d.ts +4 -1
  75. package/dist/cjs/api/types/WorkflowDefinitionYaml.d.ts +1 -0
  76. package/dist/cjs/api/types/WorkflowRunRequest.d.ts +31 -1
  77. package/dist/cjs/api/types/index.d.ts +5 -0
  78. package/dist/cjs/api/types/index.js +5 -0
  79. package/dist/cjs/version.d.ts +1 -1
  80. package/dist/cjs/version.js +1 -1
  81. package/dist/esm/Client.d.mts +60 -3
  82. package/dist/esm/Client.mjs +262 -7
  83. package/dist/esm/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.d.mts → client/requests/ListBrowserProfilesRequest.d.mts} +1 -1
  84. package/dist/esm/api/client/requests/LoginRequest.d.mts +2 -0
  85. package/dist/esm/api/client/requests/index.d.mts +2 -0
  86. package/dist/esm/api/errors/ConflictError.d.mts +5 -0
  87. package/dist/esm/api/errors/ConflictError.mjs +13 -0
  88. package/dist/esm/api/errors/index.d.mts +1 -0
  89. package/dist/esm/api/errors/index.mjs +1 -0
  90. package/dist/esm/api/resources/index.d.mts +0 -2
  91. package/dist/esm/api/resources/index.mjs +0 -2
  92. package/dist/esm/api/types/ActionBlock.d.mts +3 -1
  93. package/dist/esm/api/types/ActionBlockYaml.d.mts +3 -1
  94. package/dist/esm/api/types/BlockType.d.mts +1 -0
  95. package/dist/esm/api/types/BlockType.mjs +1 -0
  96. package/dist/esm/api/types/BranchCondition.d.mts +10 -0
  97. package/dist/esm/api/types/BranchCondition.mjs +2 -0
  98. package/dist/esm/api/types/BranchCriteria.d.mts +8 -0
  99. package/dist/esm/api/types/BranchCriteria.mjs +2 -0
  100. package/dist/esm/api/types/CodeBlock.d.mts +3 -0
  101. package/dist/esm/api/types/CodeBlockYaml.d.mts +3 -0
  102. package/dist/esm/api/types/ConditionalBlock.d.mts +15 -0
  103. package/dist/esm/api/types/ConditionalBlock.mjs +2 -0
  104. package/dist/esm/api/types/DownloadToS3Block.d.mts +3 -0
  105. package/dist/esm/api/types/DownloadToS3BlockYaml.d.mts +3 -0
  106. package/dist/esm/api/types/ExtractionBlock.d.mts +3 -1
  107. package/dist/esm/api/types/ExtractionBlockYaml.d.mts +3 -1
  108. package/dist/esm/api/types/FileDownloadBlock.d.mts +3 -1
  109. package/dist/esm/api/types/FileDownloadBlockYaml.d.mts +3 -1
  110. package/dist/esm/api/types/FileParserBlock.d.mts +3 -0
  111. package/dist/esm/api/types/FileParserBlockYaml.d.mts +3 -0
  112. package/dist/esm/api/types/FileUploadBlock.d.mts +3 -0
  113. package/dist/esm/api/types/FileUploadBlockYaml.d.mts +3 -0
  114. package/dist/esm/api/types/ForLoopBlock.d.mts +3 -0
  115. package/dist/esm/api/types/ForLoopBlockLoopBlocksItem.d.mts +4 -1
  116. package/dist/esm/api/types/ForLoopBlockYaml.d.mts +3 -0
  117. package/dist/esm/api/types/GeoTarget.d.mts +21 -0
  118. package/dist/esm/api/types/GeoTarget.mjs +2 -0
  119. package/dist/esm/api/types/HttpRequestBlock.d.mts +3 -0
  120. package/dist/esm/api/types/HttpRequestBlockYaml.d.mts +3 -0
  121. package/dist/esm/api/types/HumanInteractionBlock.d.mts +3 -1
  122. package/dist/esm/api/types/HumanInteractionBlockYaml.d.mts +3 -0
  123. package/dist/esm/api/types/LocateElementAction.d.mts +7 -0
  124. package/dist/esm/api/types/LocateElementAction.mjs +2 -0
  125. package/dist/esm/api/types/LoginBlock.d.mts +3 -1
  126. package/dist/esm/api/types/LoginBlockYaml.d.mts +3 -1
  127. package/dist/esm/api/types/NavigationBlock.d.mts +3 -1
  128. package/dist/esm/api/types/NavigationBlockYaml.d.mts +3 -1
  129. package/dist/esm/api/types/NonEmptyPasswordCredential.d.mts +2 -0
  130. package/dist/esm/api/types/PasswordCredentialResponse.d.mts +2 -0
  131. package/dist/esm/api/types/PdfParserBlock.d.mts +3 -0
  132. package/dist/esm/api/types/PdfParserBlockYaml.d.mts +3 -0
  133. package/dist/esm/api/types/RunSdkActionRequestAction.d.mts +4 -1
  134. package/dist/esm/api/types/SendEmailBlock.d.mts +3 -0
  135. package/dist/esm/api/types/SendEmailBlockYaml.d.mts +3 -0
  136. package/dist/esm/api/types/TaskBlock.d.mts +3 -1
  137. package/dist/esm/api/types/TaskBlockYaml.d.mts +3 -1
  138. package/dist/esm/api/types/TaskRunRequest.d.mts +29 -1
  139. package/dist/esm/api/types/TaskV2Block.d.mts +3 -0
  140. package/dist/esm/api/types/TaskV2BlockYaml.d.mts +3 -0
  141. package/dist/esm/api/types/TextPromptBlock.d.mts +3 -0
  142. package/dist/esm/api/types/TextPromptBlockYaml.d.mts +3 -0
  143. package/dist/esm/api/types/UploadToS3Block.d.mts +3 -0
  144. package/dist/esm/api/types/UploadToS3BlockYaml.d.mts +3 -0
  145. package/dist/esm/api/types/UrlBlock.d.mts +3 -1
  146. package/dist/esm/api/types/UrlBlockYaml.d.mts +3 -0
  147. package/dist/esm/api/types/ValidationBlock.d.mts +3 -1
  148. package/dist/esm/api/types/ValidationBlockYaml.d.mts +3 -0
  149. package/dist/esm/api/types/WaitBlock.d.mts +3 -0
  150. package/dist/esm/api/types/WaitBlockYaml.d.mts +3 -0
  151. package/dist/esm/api/types/Workflow.d.mts +4 -1
  152. package/dist/esm/api/types/WorkflowCreateYamlRequest.d.mts +4 -1
  153. package/dist/esm/api/types/WorkflowDefinition.d.mts +1 -0
  154. package/dist/esm/api/types/WorkflowDefinitionBlocksItem.d.mts +4 -1
  155. package/dist/esm/api/types/WorkflowDefinitionYaml.d.mts +1 -0
  156. package/dist/esm/api/types/WorkflowRunRequest.d.mts +31 -1
  157. package/dist/esm/api/types/index.d.mts +5 -0
  158. package/dist/esm/api/types/index.mjs +5 -0
  159. package/dist/esm/version.d.mts +1 -1
  160. package/dist/esm/version.mjs +1 -1
  161. package/package.json +1 -1
  162. package/reference.md +0 -243
  163. package/dist/cjs/api/resources/browserProfiles/client/Client.d.ts +0 -69
  164. package/dist/cjs/api/resources/browserProfiles/client/Client.js +0 -309
  165. package/dist/cjs/api/resources/browserProfiles/client/index.d.ts +0 -1
  166. package/dist/cjs/api/resources/browserProfiles/client/index.js +0 -17
  167. package/dist/cjs/api/resources/browserProfiles/client/requests/index.d.ts +0 -2
  168. package/dist/cjs/api/resources/browserProfiles/index.d.ts +0 -1
  169. package/dist/cjs/api/resources/browserProfiles/index.js +0 -17
  170. package/dist/esm/api/resources/browserProfiles/client/Client.d.mts +0 -69
  171. package/dist/esm/api/resources/browserProfiles/client/Client.mjs +0 -272
  172. package/dist/esm/api/resources/browserProfiles/client/index.d.mts +0 -1
  173. package/dist/esm/api/resources/browserProfiles/client/index.mjs +0 -1
  174. package/dist/esm/api/resources/browserProfiles/client/requests/index.d.mts +0 -2
  175. package/dist/esm/api/resources/browserProfiles/client/requests/index.mjs +0 -1
  176. package/dist/esm/api/resources/browserProfiles/index.d.mts +0 -1
  177. package/dist/esm/api/resources/browserProfiles/index.mjs +0 -1
  178. /package/dist/cjs/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.d.ts +0 -0
  179. /package/dist/cjs/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.js +0 -0
  180. /package/dist/cjs/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.js → client/requests/ListBrowserProfilesRequest.js} +0 -0
  181. /package/dist/esm/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.d.mts +0 -0
  182. /package/dist/esm/api/{resources/browserProfiles/client → client}/requests/CreateBrowserProfileRequest.mjs +0 -0
  183. /package/dist/esm/api/{resources/browserProfiles/client/requests/ListBrowserProfilesV1BrowserProfilesGetRequest.mjs → client/requests/ListBrowserProfilesRequest.mjs} +0 -0
@@ -1,69 +0,0 @@
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
- }
@@ -1,309 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export * from "./requests/index.js";
@@ -1,17 +0,0 @@
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);
@@ -1,2 +0,0 @@
1
- export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.js";
2
- export type { ListBrowserProfilesV1BrowserProfilesGetRequest } from "./ListBrowserProfilesV1BrowserProfilesGetRequest.js";
@@ -1 +0,0 @@
1
- export * from "./client/index.js";
@@ -1,17 +0,0 @@
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,69 +0,0 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import * as core from "../../../../core/index.mjs";
3
- import * as Skyvern from "../../../index.mjs";
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
- }