@skyvern/client 1.0.18 → 1.0.20
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/dist/cjs/Client.d.ts +13 -0
- package/dist/cjs/Client.js +61 -2
- package/dist/cjs/api/types/ClearCacheResponse.d.ts +9 -0
- package/dist/cjs/api/types/ClearCacheResponse.js +3 -0
- package/dist/cjs/api/types/CredentialResponse.d.ts +4 -0
- package/dist/cjs/api/types/WorkflowRun.d.ts +3 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +13 -0
- package/dist/esm/Client.mjs +61 -2
- package/dist/esm/api/types/ClearCacheResponse.d.mts +9 -0
- package/dist/esm/api/types/ClearCacheResponse.mjs +2 -0
- package/dist/esm/api/types/CredentialResponse.d.mts +4 -0
- package/dist/esm/api/types/WorkflowRun.d.mts +3 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -607,6 +607,19 @@ export declare class SkyvernClient {
|
|
|
607
607
|
*/
|
|
608
608
|
deployScript(scriptId: string, request: Skyvern.DeployScriptRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.CreateScriptResponse>;
|
|
609
609
|
private __deployScript;
|
|
610
|
+
/**
|
|
611
|
+
* Clear all cached scripts for a specific workflow. This will trigger script regeneration on subsequent runs.
|
|
612
|
+
*
|
|
613
|
+
* @param {string} workflowPermanentId - The workflow permanent ID to clear cache for
|
|
614
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
615
|
+
*
|
|
616
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
617
|
+
*
|
|
618
|
+
* @example
|
|
619
|
+
* await client.clearWorkflowCache("wpid_abc123")
|
|
620
|
+
*/
|
|
621
|
+
clearWorkflowCache(workflowPermanentId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.ClearCacheResponse>;
|
|
622
|
+
private __clearWorkflowCache;
|
|
610
623
|
/**
|
|
611
624
|
* Execute a single SDK action with the specified parameters
|
|
612
625
|
*
|
package/dist/cjs/Client.js
CHANGED
|
@@ -56,8 +56,8 @@ class SkyvernClient {
|
|
|
56
56
|
"x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
|
|
57
57
|
"X-Fern-Language": "JavaScript",
|
|
58
58
|
"X-Fern-SDK-Name": "@skyvern/client",
|
|
59
|
-
"X-Fern-SDK-Version": "1.0.
|
|
60
|
-
"User-Agent": "@skyvern/client/1.0.
|
|
59
|
+
"X-Fern-SDK-Version": "1.0.20",
|
|
60
|
+
"User-Agent": "@skyvern/client/1.0.20",
|
|
61
61
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
62
62
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
63
63
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -2515,6 +2515,65 @@ class SkyvernClient {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
});
|
|
2517
2517
|
}
|
|
2518
|
+
/**
|
|
2519
|
+
* Clear all cached scripts for a specific workflow. This will trigger script regeneration on subsequent runs.
|
|
2520
|
+
*
|
|
2521
|
+
* @param {string} workflowPermanentId - The workflow permanent ID to clear cache for
|
|
2522
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2523
|
+
*
|
|
2524
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
2525
|
+
*
|
|
2526
|
+
* @example
|
|
2527
|
+
* await client.clearWorkflowCache("wpid_abc123")
|
|
2528
|
+
*/
|
|
2529
|
+
clearWorkflowCache(workflowPermanentId, requestOptions) {
|
|
2530
|
+
return core.HttpResponsePromise.fromPromise(this.__clearWorkflowCache(workflowPermanentId, requestOptions));
|
|
2531
|
+
}
|
|
2532
|
+
__clearWorkflowCache(workflowPermanentId, requestOptions) {
|
|
2533
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2534
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2535
|
+
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);
|
|
2536
|
+
const _response = yield core.fetcher({
|
|
2537
|
+
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(workflowPermanentId)}/cache`),
|
|
2538
|
+
method: "DELETE",
|
|
2539
|
+
headers: _headers,
|
|
2540
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
2541
|
+
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,
|
|
2542
|
+
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,
|
|
2543
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2544
|
+
});
|
|
2545
|
+
if (_response.ok) {
|
|
2546
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
2547
|
+
}
|
|
2548
|
+
if (_response.error.reason === "status-code") {
|
|
2549
|
+
switch (_response.error.statusCode) {
|
|
2550
|
+
case 422:
|
|
2551
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
2552
|
+
default:
|
|
2553
|
+
throw new errors.SkyvernError({
|
|
2554
|
+
statusCode: _response.error.statusCode,
|
|
2555
|
+
body: _response.error.body,
|
|
2556
|
+
rawResponse: _response.rawResponse,
|
|
2557
|
+
});
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
switch (_response.error.reason) {
|
|
2561
|
+
case "non-json":
|
|
2562
|
+
throw new errors.SkyvernError({
|
|
2563
|
+
statusCode: _response.error.statusCode,
|
|
2564
|
+
body: _response.error.rawBody,
|
|
2565
|
+
rawResponse: _response.rawResponse,
|
|
2566
|
+
});
|
|
2567
|
+
case "timeout":
|
|
2568
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling DELETE /v1/scripts/{workflow_permanent_id}/cache.");
|
|
2569
|
+
case "unknown":
|
|
2570
|
+
throw new errors.SkyvernError({
|
|
2571
|
+
message: _response.error.errorMessage,
|
|
2572
|
+
rawResponse: _response.rawResponse,
|
|
2573
|
+
});
|
|
2574
|
+
}
|
|
2575
|
+
});
|
|
2576
|
+
}
|
|
2518
2577
|
/**
|
|
2519
2578
|
* Execute a single SDK action with the specified parameters
|
|
2520
2579
|
*
|
|
@@ -11,6 +11,10 @@ export interface CredentialResponse {
|
|
|
11
11
|
credential_type: Skyvern.CredentialTypeOutput;
|
|
12
12
|
/** Name of the credential */
|
|
13
13
|
name: string;
|
|
14
|
+
/** Browser profile ID linked to this credential */
|
|
15
|
+
browser_profile_id?: string;
|
|
16
|
+
/** Login page URL used during the credential test */
|
|
17
|
+
tested_url?: string;
|
|
14
18
|
}
|
|
15
19
|
export declare namespace CredentialResponse {
|
|
16
20
|
/**
|
|
@@ -26,6 +26,9 @@ export interface WorkflowRun {
|
|
|
26
26
|
sequential_key?: string;
|
|
27
27
|
ai_fallback?: boolean;
|
|
28
28
|
code_gen?: boolean;
|
|
29
|
+
waiting_for_verification_code?: boolean;
|
|
30
|
+
verification_code_identifier?: string;
|
|
31
|
+
verification_code_polling_started_at?: string;
|
|
29
32
|
queued_at?: string;
|
|
30
33
|
started_at?: string;
|
|
31
34
|
finished_at?: string;
|
|
@@ -28,6 +28,7 @@ export * from "./BrowserProfile.js";
|
|
|
28
28
|
export * from "./BrowserSessionResponse.js";
|
|
29
29
|
export * from "./ChangeTierResponse.js";
|
|
30
30
|
export * from "./CheckoutSessionResponse.js";
|
|
31
|
+
export * from "./ClearCacheResponse.js";
|
|
31
32
|
export * from "./ClickAction.js";
|
|
32
33
|
export * from "./ClickContext.js";
|
|
33
34
|
export * from "./CodeBlock.js";
|
|
@@ -44,6 +44,7 @@ __exportStar(require("./BrowserProfile.js"), exports);
|
|
|
44
44
|
__exportStar(require("./BrowserSessionResponse.js"), exports);
|
|
45
45
|
__exportStar(require("./ChangeTierResponse.js"), exports);
|
|
46
46
|
__exportStar(require("./CheckoutSessionResponse.js"), exports);
|
|
47
|
+
__exportStar(require("./ClearCacheResponse.js"), exports);
|
|
47
48
|
__exportStar(require("./ClickAction.js"), exports);
|
|
48
49
|
__exportStar(require("./ClickContext.js"), exports);
|
|
49
50
|
__exportStar(require("./CodeBlock.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.20";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.d.mts
CHANGED
|
@@ -607,6 +607,19 @@ export declare class SkyvernClient {
|
|
|
607
607
|
*/
|
|
608
608
|
deployScript(scriptId: string, request: Skyvern.DeployScriptRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.CreateScriptResponse>;
|
|
609
609
|
private __deployScript;
|
|
610
|
+
/**
|
|
611
|
+
* Clear all cached scripts for a specific workflow. This will trigger script regeneration on subsequent runs.
|
|
612
|
+
*
|
|
613
|
+
* @param {string} workflowPermanentId - The workflow permanent ID to clear cache for
|
|
614
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
615
|
+
*
|
|
616
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
617
|
+
*
|
|
618
|
+
* @example
|
|
619
|
+
* await client.clearWorkflowCache("wpid_abc123")
|
|
620
|
+
*/
|
|
621
|
+
clearWorkflowCache(workflowPermanentId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.ClearCacheResponse>;
|
|
622
|
+
private __clearWorkflowCache;
|
|
610
623
|
/**
|
|
611
624
|
* Execute a single SDK action with the specified parameters
|
|
612
625
|
*
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -20,8 +20,8 @@ export class SkyvernClient {
|
|
|
20
20
|
"x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
|
|
21
21
|
"X-Fern-Language": "JavaScript",
|
|
22
22
|
"X-Fern-SDK-Name": "@skyvern/client",
|
|
23
|
-
"X-Fern-SDK-Version": "1.0.
|
|
24
|
-
"User-Agent": "@skyvern/client/1.0.
|
|
23
|
+
"X-Fern-SDK-Version": "1.0.20",
|
|
24
|
+
"User-Agent": "@skyvern/client/1.0.20",
|
|
25
25
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
26
26
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
27
27
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -2479,6 +2479,65 @@ export class SkyvernClient {
|
|
|
2479
2479
|
}
|
|
2480
2480
|
});
|
|
2481
2481
|
}
|
|
2482
|
+
/**
|
|
2483
|
+
* Clear all cached scripts for a specific workflow. This will trigger script regeneration on subsequent runs.
|
|
2484
|
+
*
|
|
2485
|
+
* @param {string} workflowPermanentId - The workflow permanent ID to clear cache for
|
|
2486
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2487
|
+
*
|
|
2488
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
2489
|
+
*
|
|
2490
|
+
* @example
|
|
2491
|
+
* await client.clearWorkflowCache("wpid_abc123")
|
|
2492
|
+
*/
|
|
2493
|
+
clearWorkflowCache(workflowPermanentId, requestOptions) {
|
|
2494
|
+
return core.HttpResponsePromise.fromPromise(this.__clearWorkflowCache(workflowPermanentId, requestOptions));
|
|
2495
|
+
}
|
|
2496
|
+
__clearWorkflowCache(workflowPermanentId, requestOptions) {
|
|
2497
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2498
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2499
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
2500
|
+
const _response = yield core.fetcher({
|
|
2501
|
+
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(workflowPermanentId)}/cache`),
|
|
2502
|
+
method: "DELETE",
|
|
2503
|
+
headers: _headers,
|
|
2504
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
2505
|
+
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,
|
|
2506
|
+
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,
|
|
2507
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2508
|
+
});
|
|
2509
|
+
if (_response.ok) {
|
|
2510
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
2511
|
+
}
|
|
2512
|
+
if (_response.error.reason === "status-code") {
|
|
2513
|
+
switch (_response.error.statusCode) {
|
|
2514
|
+
case 422:
|
|
2515
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
2516
|
+
default:
|
|
2517
|
+
throw new errors.SkyvernError({
|
|
2518
|
+
statusCode: _response.error.statusCode,
|
|
2519
|
+
body: _response.error.body,
|
|
2520
|
+
rawResponse: _response.rawResponse,
|
|
2521
|
+
});
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
switch (_response.error.reason) {
|
|
2525
|
+
case "non-json":
|
|
2526
|
+
throw new errors.SkyvernError({
|
|
2527
|
+
statusCode: _response.error.statusCode,
|
|
2528
|
+
body: _response.error.rawBody,
|
|
2529
|
+
rawResponse: _response.rawResponse,
|
|
2530
|
+
});
|
|
2531
|
+
case "timeout":
|
|
2532
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling DELETE /v1/scripts/{workflow_permanent_id}/cache.");
|
|
2533
|
+
case "unknown":
|
|
2534
|
+
throw new errors.SkyvernError({
|
|
2535
|
+
message: _response.error.errorMessage,
|
|
2536
|
+
rawResponse: _response.rawResponse,
|
|
2537
|
+
});
|
|
2538
|
+
}
|
|
2539
|
+
});
|
|
2540
|
+
}
|
|
2482
2541
|
/**
|
|
2483
2542
|
* Execute a single SDK action with the specified parameters
|
|
2484
2543
|
*
|
|
@@ -11,6 +11,10 @@ export interface CredentialResponse {
|
|
|
11
11
|
credential_type: Skyvern.CredentialTypeOutput;
|
|
12
12
|
/** Name of the credential */
|
|
13
13
|
name: string;
|
|
14
|
+
/** Browser profile ID linked to this credential */
|
|
15
|
+
browser_profile_id?: string;
|
|
16
|
+
/** Login page URL used during the credential test */
|
|
17
|
+
tested_url?: string;
|
|
14
18
|
}
|
|
15
19
|
export declare namespace CredentialResponse {
|
|
16
20
|
/**
|
|
@@ -26,6 +26,9 @@ export interface WorkflowRun {
|
|
|
26
26
|
sequential_key?: string;
|
|
27
27
|
ai_fallback?: boolean;
|
|
28
28
|
code_gen?: boolean;
|
|
29
|
+
waiting_for_verification_code?: boolean;
|
|
30
|
+
verification_code_identifier?: string;
|
|
31
|
+
verification_code_polling_started_at?: string;
|
|
29
32
|
queued_at?: string;
|
|
30
33
|
started_at?: string;
|
|
31
34
|
finished_at?: string;
|
|
@@ -28,6 +28,7 @@ export * from "./BrowserProfile.mjs";
|
|
|
28
28
|
export * from "./BrowserSessionResponse.mjs";
|
|
29
29
|
export * from "./ChangeTierResponse.mjs";
|
|
30
30
|
export * from "./CheckoutSessionResponse.mjs";
|
|
31
|
+
export * from "./ClearCacheResponse.mjs";
|
|
31
32
|
export * from "./ClickAction.mjs";
|
|
32
33
|
export * from "./ClickContext.mjs";
|
|
33
34
|
export * from "./CodeBlock.mjs";
|
|
@@ -28,6 +28,7 @@ export * from "./BrowserProfile.mjs";
|
|
|
28
28
|
export * from "./BrowserSessionResponse.mjs";
|
|
29
29
|
export * from "./ChangeTierResponse.mjs";
|
|
30
30
|
export * from "./CheckoutSessionResponse.mjs";
|
|
31
|
+
export * from "./ClearCacheResponse.mjs";
|
|
31
32
|
export * from "./ClickAction.mjs";
|
|
32
33
|
export * from "./ClickContext.mjs";
|
|
33
34
|
export * from "./CodeBlock.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.20";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.0.
|
|
1
|
+
export const SDK_VERSION = "1.0.20";
|