@skyvern/client 1.0.55 → 1.0.57
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 +19 -0
- package/dist/cjs/Client.js +76 -2
- package/dist/cjs/api/client/requests/CreateBrowserSessionRequest.d.ts +1 -1
- package/dist/cjs/api/client/requests/ExtendBrowserSessionRequest.d.ts +10 -0
- package/dist/cjs/api/client/requests/ExtendBrowserSessionRequest.js +3 -0
- package/dist/cjs/api/client/requests/TotpCodeCreate.d.ts +1 -1
- package/dist/cjs/api/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/schedules/client/Client.d.ts +20 -2
- package/dist/cjs/api/resources/schedules/client/Client.js +66 -2
- package/dist/cjs/api/types/ArtifactType.d.ts +8 -0
- package/dist/cjs/api/types/ArtifactType.js +8 -0
- package/dist/cjs/api/types/ClickContext.d.ts +1 -0
- package/dist/cjs/api/types/CodeBlock.d.ts +8 -0
- package/dist/cjs/api/types/CodeBlockYaml.d.ts +8 -0
- package/dist/cjs/api/types/CreateCredentialRequest.d.ts +2 -0
- package/dist/cjs/api/types/GetRunResponse.d.ts +4 -1
- package/dist/cjs/api/types/HumanInteractionBlockYaml.d.ts +4 -4
- package/dist/cjs/api/types/OneTimeDispatchStatus.d.ts +7 -0
- package/dist/cjs/api/types/OneTimeDispatchStatus.js +10 -0
- package/dist/cjs/api/types/OrganizationScheduleItem.d.ts +7 -1
- package/dist/cjs/api/types/RunEngine.d.ts +1 -0
- package/dist/cjs/api/types/RunEngine.js +1 -0
- package/dist/cjs/api/types/RunStatus.d.ts +1 -0
- package/dist/cjs/api/types/RunStatus.js +1 -0
- package/dist/cjs/api/types/RunType.d.ts +1 -0
- package/dist/cjs/api/types/RunType.js +1 -0
- package/dist/cjs/api/types/SendEmailBlock.d.ts +4 -0
- package/dist/cjs/api/types/SendEmailBlockYaml.d.ts +8 -4
- package/dist/cjs/api/types/TotpCode.d.ts +1 -1
- package/dist/cjs/api/types/TotpType.d.ts +1 -0
- package/dist/cjs/api/types/TotpType.js +1 -0
- package/dist/cjs/api/types/WorkflowSchedule.d.ts +7 -1
- package/dist/cjs/api/types/WorkflowScheduleUpsertRequest.d.ts +7 -1
- 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 +19 -0
- package/dist/esm/Client.mjs +76 -2
- package/dist/esm/api/client/requests/CreateBrowserSessionRequest.d.mts +1 -1
- package/dist/esm/api/client/requests/ExtendBrowserSessionRequest.d.mts +10 -0
- package/dist/esm/api/client/requests/ExtendBrowserSessionRequest.mjs +2 -0
- package/dist/esm/api/client/requests/TotpCodeCreate.d.mts +1 -1
- package/dist/esm/api/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/schedules/client/Client.d.mts +20 -2
- package/dist/esm/api/resources/schedules/client/Client.mjs +66 -2
- package/dist/esm/api/types/ArtifactType.d.mts +8 -0
- package/dist/esm/api/types/ArtifactType.mjs +8 -0
- package/dist/esm/api/types/ClickContext.d.mts +1 -0
- package/dist/esm/api/types/CodeBlock.d.mts +8 -0
- package/dist/esm/api/types/CodeBlockYaml.d.mts +8 -0
- package/dist/esm/api/types/CreateCredentialRequest.d.mts +2 -0
- package/dist/esm/api/types/GetRunResponse.d.mts +4 -1
- package/dist/esm/api/types/HumanInteractionBlockYaml.d.mts +4 -4
- package/dist/esm/api/types/OneTimeDispatchStatus.d.mts +7 -0
- package/dist/esm/api/types/OneTimeDispatchStatus.mjs +7 -0
- package/dist/esm/api/types/OrganizationScheduleItem.d.mts +7 -1
- package/dist/esm/api/types/RunEngine.d.mts +1 -0
- package/dist/esm/api/types/RunEngine.mjs +1 -0
- package/dist/esm/api/types/RunStatus.d.mts +1 -0
- package/dist/esm/api/types/RunStatus.mjs +1 -0
- package/dist/esm/api/types/RunType.d.mts +1 -0
- package/dist/esm/api/types/RunType.mjs +1 -0
- package/dist/esm/api/types/SendEmailBlock.d.mts +4 -0
- package/dist/esm/api/types/SendEmailBlockYaml.d.mts +8 -4
- package/dist/esm/api/types/TotpCode.d.mts +1 -1
- package/dist/esm/api/types/TotpType.d.mts +1 -0
- package/dist/esm/api/types/TotpType.mjs +1 -0
- package/dist/esm/api/types/WorkflowSchedule.d.mts +7 -1
- package/dist/esm/api/types/WorkflowScheduleUpsertRequest.d.mts +7 -1
- 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 +9 -6
- package/reference.md +113 -2
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import type * as Skyvern from "../index.js";
|
|
1
2
|
export interface WorkflowSchedule {
|
|
2
3
|
workflow_schedule_id: string;
|
|
3
4
|
organization_id: string;
|
|
4
5
|
workflow_permanent_id: string;
|
|
5
|
-
cron_expression
|
|
6
|
+
cron_expression?: string;
|
|
7
|
+
interval_seconds?: number;
|
|
8
|
+
first_fire_at?: string;
|
|
9
|
+
run_at?: string;
|
|
10
|
+
dispatch_status?: Skyvern.OneTimeDispatchStatus;
|
|
11
|
+
workflow_run_id?: string;
|
|
6
12
|
timezone: string;
|
|
7
13
|
enabled: boolean;
|
|
8
14
|
parameters?: Record<string, unknown>;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export interface WorkflowScheduleUpsertRequest {
|
|
2
|
-
cron_expression
|
|
2
|
+
cron_expression?: string;
|
|
3
|
+
/** Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression. */
|
|
4
|
+
interval_seconds?: number;
|
|
5
|
+
/** First run of an interval schedule; later runs follow every interval_seconds from it. Must be in the future when changed. Defaults to one interval after creation. */
|
|
6
|
+
first_fire_at?: string;
|
|
7
|
+
/** Run the agent once at this instant, ISO 8601 with a UTC offset, at least 60 seconds in the future. Mutually exclusive with cron_expression and interval_seconds; the schedule can be edited or canceled only until it fires. */
|
|
8
|
+
run_at?: string;
|
|
3
9
|
timezone: string;
|
|
4
10
|
enabled?: boolean;
|
|
5
11
|
parameters?: Record<string, unknown>;
|
|
@@ -112,6 +112,7 @@ export * from "./NonEmptyCreditCardCredential.js";
|
|
|
112
112
|
export * from "./NonEmptyPasswordCredential.js";
|
|
113
113
|
export * from "./OnePasswordCredentialParameter.js";
|
|
114
114
|
export * from "./OnePasswordCredentialParameterYaml.js";
|
|
115
|
+
export * from "./OneTimeDispatchStatus.js";
|
|
115
116
|
export * from "./OrganizationScheduleItem.js";
|
|
116
117
|
export * from "./OrganizationScheduleListResponse.js";
|
|
117
118
|
export * from "./OtpType.js";
|
|
@@ -128,6 +128,7 @@ __exportStar(require("./NonEmptyCreditCardCredential.js"), exports);
|
|
|
128
128
|
__exportStar(require("./NonEmptyPasswordCredential.js"), exports);
|
|
129
129
|
__exportStar(require("./OnePasswordCredentialParameter.js"), exports);
|
|
130
130
|
__exportStar(require("./OnePasswordCredentialParameterYaml.js"), exports);
|
|
131
|
+
__exportStar(require("./OneTimeDispatchStatus.js"), exports);
|
|
131
132
|
__exportStar(require("./OrganizationScheduleItem.js"), exports);
|
|
132
133
|
__exportStar(require("./OrganizationScheduleListResponse.js"), exports);
|
|
133
134
|
__exportStar(require("./OtpType.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.55";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.d.mts
CHANGED
|
@@ -690,6 +690,25 @@ export declare class SkyvernClient {
|
|
|
690
690
|
*/
|
|
691
691
|
closeBrowserSession(browserSessionId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
692
692
|
private __closeBrowserSession;
|
|
693
|
+
/**
|
|
694
|
+
* Extend a live browser session by a number of minutes. Sessions are created with a timeout of at most 240 minutes and can be extended, one or more times, up to a total lifetime of 360 minutes (6 hours). The minutes are added to the session's current deadline. A request for more than the remaining headroom is granted the remainder, and the response carries a warning. The response's `timeout` is the session's new total budget in minutes, counted from when the session started.
|
|
695
|
+
*
|
|
696
|
+
* @param {string} browserSessionId - The ID of the browser session. browser_session_id starts with `pbs_`
|
|
697
|
+
* @param {Skyvern.ExtendBrowserSessionRequest} request
|
|
698
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
699
|
+
*
|
|
700
|
+
* @throws {@link Skyvern.ForbiddenError}
|
|
701
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
702
|
+
* @throws {@link Skyvern.ConflictError}
|
|
703
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
704
|
+
*
|
|
705
|
+
* @example
|
|
706
|
+
* await client.extendBrowserSession("pbs_123456", {
|
|
707
|
+
* additional_minutes: 1
|
|
708
|
+
* })
|
|
709
|
+
*/
|
|
710
|
+
extendBrowserSession(browserSessionId: string, request: Skyvern.ExtendBrowserSessionRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.BrowserSessionResponse>;
|
|
711
|
+
private __extendBrowserSession;
|
|
693
712
|
/**
|
|
694
713
|
* Get details about a specific browser session, including the browser address for cdp connection.
|
|
695
714
|
*
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -34,8 +34,8 @@ export class SkyvernClient {
|
|
|
34
34
|
"x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
|
|
35
35
|
"X-Fern-Language": "JavaScript",
|
|
36
36
|
"X-Fern-SDK-Name": "@skyvern/client",
|
|
37
|
-
"X-Fern-SDK-Version": "1.0.
|
|
38
|
-
"User-Agent": "@skyvern/client/1.0.
|
|
37
|
+
"X-Fern-SDK-Version": "1.0.55",
|
|
38
|
+
"User-Agent": "@skyvern/client/1.0.55",
|
|
39
39
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
40
40
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
41
41
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -2984,6 +2984,80 @@ export class SkyvernClient {
|
|
|
2984
2984
|
}
|
|
2985
2985
|
});
|
|
2986
2986
|
}
|
|
2987
|
+
/**
|
|
2988
|
+
* Extend a live browser session by a number of minutes. Sessions are created with a timeout of at most 240 minutes and can be extended, one or more times, up to a total lifetime of 360 minutes (6 hours). The minutes are added to the session's current deadline. A request for more than the remaining headroom is granted the remainder, and the response carries a warning. The response's `timeout` is the session's new total budget in minutes, counted from when the session started.
|
|
2989
|
+
*
|
|
2990
|
+
* @param {string} browserSessionId - The ID of the browser session. browser_session_id starts with `pbs_`
|
|
2991
|
+
* @param {Skyvern.ExtendBrowserSessionRequest} request
|
|
2992
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2993
|
+
*
|
|
2994
|
+
* @throws {@link Skyvern.ForbiddenError}
|
|
2995
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
2996
|
+
* @throws {@link Skyvern.ConflictError}
|
|
2997
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
2998
|
+
*
|
|
2999
|
+
* @example
|
|
3000
|
+
* await client.extendBrowserSession("pbs_123456", {
|
|
3001
|
+
* additional_minutes: 1
|
|
3002
|
+
* })
|
|
3003
|
+
*/
|
|
3004
|
+
extendBrowserSession(browserSessionId, request, requestOptions) {
|
|
3005
|
+
return core.HttpResponsePromise.fromPromise(this.__extendBrowserSession(browserSessionId, request, requestOptions));
|
|
3006
|
+
}
|
|
3007
|
+
__extendBrowserSession(browserSessionId, request, requestOptions) {
|
|
3008
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3009
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3010
|
+
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);
|
|
3011
|
+
const _response = yield core.fetcher({
|
|
3012
|
+
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_sessions/${core.url.encodePathParam(browserSessionId)}/extend`),
|
|
3013
|
+
method: "POST",
|
|
3014
|
+
headers: _headers,
|
|
3015
|
+
contentType: "application/json",
|
|
3016
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
3017
|
+
requestType: "json",
|
|
3018
|
+
body: request,
|
|
3019
|
+
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,
|
|
3020
|
+
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,
|
|
3021
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
3022
|
+
});
|
|
3023
|
+
if (_response.ok) {
|
|
3024
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
3025
|
+
}
|
|
3026
|
+
if (_response.error.reason === "status-code") {
|
|
3027
|
+
switch (_response.error.statusCode) {
|
|
3028
|
+
case 403:
|
|
3029
|
+
throw new Skyvern.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
3030
|
+
case 404:
|
|
3031
|
+
throw new Skyvern.NotFoundError(_response.error.body, _response.rawResponse);
|
|
3032
|
+
case 409:
|
|
3033
|
+
throw new Skyvern.ConflictError(_response.error.body, _response.rawResponse);
|
|
3034
|
+
case 422:
|
|
3035
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
3036
|
+
default:
|
|
3037
|
+
throw new errors.SkyvernError({
|
|
3038
|
+
statusCode: _response.error.statusCode,
|
|
3039
|
+
body: _response.error.body,
|
|
3040
|
+
rawResponse: _response.rawResponse,
|
|
3041
|
+
});
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
switch (_response.error.reason) {
|
|
3045
|
+
case "non-json":
|
|
3046
|
+
throw new errors.SkyvernError({
|
|
3047
|
+
statusCode: _response.error.statusCode,
|
|
3048
|
+
body: _response.error.rawBody,
|
|
3049
|
+
rawResponse: _response.rawResponse,
|
|
3050
|
+
});
|
|
3051
|
+
case "timeout":
|
|
3052
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/browser_sessions/{browser_session_id}/extend.");
|
|
3053
|
+
case "unknown":
|
|
3054
|
+
throw new errors.SkyvernError({
|
|
3055
|
+
message: _response.error.errorMessage,
|
|
3056
|
+
rawResponse: _response.rawResponse,
|
|
3057
|
+
});
|
|
3058
|
+
}
|
|
3059
|
+
});
|
|
3060
|
+
}
|
|
2987
3061
|
/**
|
|
2988
3062
|
* Get details about a specific browser session, including the browser address for cdp connection.
|
|
2989
3063
|
*
|
|
@@ -6,7 +6,7 @@ import type * as Skyvern from "../../index.mjs";
|
|
|
6
6
|
export interface CreateBrowserSessionRequest {
|
|
7
7
|
/** Optional URL to open when the standalone browser session starts. */
|
|
8
8
|
url?: string;
|
|
9
|
-
/** Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and
|
|
9
|
+
/** Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 240. Defaults to 60. */
|
|
10
10
|
timeout?: number;
|
|
11
11
|
/**
|
|
12
12
|
* Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* additional_minutes: 1
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface ExtendBrowserSessionRequest {
|
|
8
|
+
/** Minutes to add to the session's current deadline. A session can be extended, one or more times, up to a total lifetime of 360 minutes (6 hours) counted from when it started; a request for more than the remaining headroom is granted the remainder and the response carries a warning. */
|
|
9
|
+
additional_minutes: number;
|
|
10
|
+
}
|
|
@@ -21,6 +21,6 @@ export interface TotpCodeCreate {
|
|
|
21
21
|
content: string;
|
|
22
22
|
/** The timestamp when the TOTP code expires */
|
|
23
23
|
expired_at?: string;
|
|
24
|
-
/**
|
|
24
|
+
/** Deprecated compatibility field. Skyvern auto-detects the OTP type from content, so this value does not constrain extraction. */
|
|
25
25
|
type?: Skyvern.OtpType;
|
|
26
26
|
}
|
|
@@ -11,6 +11,7 @@ export type { CustomLlmUpdateRequest } from "./CustomLlmUpdateRequest.mjs";
|
|
|
11
11
|
export type { DeleteFolderRequest } from "./DeleteFolderRequest.mjs";
|
|
12
12
|
export type { DeployScriptRequest } from "./DeployScriptRequest.mjs";
|
|
13
13
|
export type { DownloadFilesRequest } from "./DownloadFilesRequest.mjs";
|
|
14
|
+
export type { ExtendBrowserSessionRequest } from "./ExtendBrowserSessionRequest.mjs";
|
|
14
15
|
export type { FolderCreate } from "./FolderCreate.mjs";
|
|
15
16
|
export type { FolderUpdate } from "./FolderUpdate.mjs";
|
|
16
17
|
export type { GetCredentialsRequest } from "./GetCredentialsRequest.mjs";
|
|
@@ -38,6 +38,8 @@ export declare class Schedules {
|
|
|
38
38
|
list(workflowPermanentId: string, requestOptions?: Schedules.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowScheduleListResponse>;
|
|
39
39
|
private __list;
|
|
40
40
|
/**
|
|
41
|
+
* Create a cron, fixed-interval or one-time schedule that runs the given agent automatically with a fixed set of parameters. An interval schedule first runs at first_fire_at, or one interval after creation. A one-time schedule runs once at run_at. Returns the stored schedule and its next upcoming run times.
|
|
42
|
+
*
|
|
41
43
|
* @param {string} workflowPermanentId
|
|
42
44
|
* @param {Skyvern.WorkflowScheduleUpsertRequest} request
|
|
43
45
|
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -46,13 +48,14 @@ export declare class Schedules {
|
|
|
46
48
|
*
|
|
47
49
|
* @example
|
|
48
50
|
* await client.schedules.create("workflow_permanent_id", {
|
|
49
|
-
* cron_expression: "cron_expression",
|
|
50
51
|
* timezone: "timezone"
|
|
51
52
|
* })
|
|
52
53
|
*/
|
|
53
54
|
create(workflowPermanentId: string, request: Skyvern.WorkflowScheduleUpsertRequest, requestOptions?: Schedules.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowScheduleResponse>;
|
|
54
55
|
private __create;
|
|
55
56
|
/**
|
|
57
|
+
* Fetch one schedule belonging to an agent. Returns the schedule's cron expression or interval, timezone, parameters, enabled state, and next upcoming run times.
|
|
58
|
+
*
|
|
56
59
|
* @param {string} workflowPermanentId
|
|
57
60
|
* @param {string} workflowScheduleId
|
|
58
61
|
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -65,6 +68,8 @@ export declare class Schedules {
|
|
|
65
68
|
get(workflowPermanentId: string, workflowScheduleId: string, requestOptions?: Schedules.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowScheduleResponse>;
|
|
66
69
|
private __get;
|
|
67
70
|
/**
|
|
71
|
+
* Replace a schedule's cron expression, interval or one-time run_at, timezone, run parameters, and enabled state. A one-time schedule stays one-time and can change only until it fires; afterwards this returns 409. Returns the updated schedule and its next upcoming run times.
|
|
72
|
+
*
|
|
68
73
|
* @param {string} workflowPermanentId
|
|
69
74
|
* @param {string} workflowScheduleId
|
|
70
75
|
* @param {Skyvern.WorkflowScheduleUpsertRequest} request
|
|
@@ -74,7 +79,6 @@ export declare class Schedules {
|
|
|
74
79
|
*
|
|
75
80
|
* @example
|
|
76
81
|
* await client.schedules.update("workflow_permanent_id", "workflow_schedule_id", {
|
|
77
|
-
* cron_expression: "cron_expression",
|
|
78
82
|
* timezone: "timezone"
|
|
79
83
|
* })
|
|
80
84
|
*/
|
|
@@ -116,4 +120,18 @@ export declare class Schedules {
|
|
|
116
120
|
*/
|
|
117
121
|
disable(workflowPermanentId: string, workflowScheduleId: string, requestOptions?: Schedules.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowScheduleResponse>;
|
|
118
122
|
private __disable;
|
|
123
|
+
/**
|
|
124
|
+
* Cancel a one-time schedule that has not fired yet. The schedule stays readable with dispatch_status canceled. Returns 409 once it has fired or was already canceled, and 422 for a recurring schedule.
|
|
125
|
+
*
|
|
126
|
+
* @param {string} workflowPermanentId
|
|
127
|
+
* @param {string} workflowScheduleId
|
|
128
|
+
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
|
+
*
|
|
130
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* await client.schedules.cancel("workflow_permanent_id", "workflow_schedule_id")
|
|
134
|
+
*/
|
|
135
|
+
cancel(workflowPermanentId: string, workflowScheduleId: string, requestOptions?: Schedules.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowScheduleResponse>;
|
|
136
|
+
private __cancel;
|
|
119
137
|
}
|
|
@@ -154,6 +154,8 @@ export class Schedules {
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
|
+
* Create a cron, fixed-interval or one-time schedule that runs the given agent automatically with a fixed set of parameters. An interval schedule first runs at first_fire_at, or one interval after creation. A one-time schedule runs once at run_at. Returns the stored schedule and its next upcoming run times.
|
|
158
|
+
*
|
|
157
159
|
* @param {string} workflowPermanentId
|
|
158
160
|
* @param {Skyvern.WorkflowScheduleUpsertRequest} request
|
|
159
161
|
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -162,7 +164,6 @@ export class Schedules {
|
|
|
162
164
|
*
|
|
163
165
|
* @example
|
|
164
166
|
* await client.schedules.create("workflow_permanent_id", {
|
|
165
|
-
* cron_expression: "cron_expression",
|
|
166
167
|
* timezone: "timezone"
|
|
167
168
|
* })
|
|
168
169
|
*/
|
|
@@ -218,6 +219,8 @@ export class Schedules {
|
|
|
218
219
|
});
|
|
219
220
|
}
|
|
220
221
|
/**
|
|
222
|
+
* Fetch one schedule belonging to an agent. Returns the schedule's cron expression or interval, timezone, parameters, enabled state, and next upcoming run times.
|
|
223
|
+
*
|
|
221
224
|
* @param {string} workflowPermanentId
|
|
222
225
|
* @param {string} workflowScheduleId
|
|
223
226
|
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -276,6 +279,8 @@ export class Schedules {
|
|
|
276
279
|
});
|
|
277
280
|
}
|
|
278
281
|
/**
|
|
282
|
+
* Replace a schedule's cron expression, interval or one-time run_at, timezone, run parameters, and enabled state. A one-time schedule stays one-time and can change only until it fires; afterwards this returns 409. Returns the updated schedule and its next upcoming run times.
|
|
283
|
+
*
|
|
279
284
|
* @param {string} workflowPermanentId
|
|
280
285
|
* @param {string} workflowScheduleId
|
|
281
286
|
* @param {Skyvern.WorkflowScheduleUpsertRequest} request
|
|
@@ -285,7 +290,6 @@ export class Schedules {
|
|
|
285
290
|
*
|
|
286
291
|
* @example
|
|
287
292
|
* await client.schedules.update("workflow_permanent_id", "workflow_schedule_id", {
|
|
288
|
-
* cron_expression: "cron_expression",
|
|
289
293
|
* timezone: "timezone"
|
|
290
294
|
* })
|
|
291
295
|
*/
|
|
@@ -514,4 +518,64 @@ export class Schedules {
|
|
|
514
518
|
}
|
|
515
519
|
});
|
|
516
520
|
}
|
|
521
|
+
/**
|
|
522
|
+
* Cancel a one-time schedule that has not fired yet. The schedule stays readable with dispatch_status canceled. Returns 409 once it has fired or was already canceled, and 422 for a recurring schedule.
|
|
523
|
+
*
|
|
524
|
+
* @param {string} workflowPermanentId
|
|
525
|
+
* @param {string} workflowScheduleId
|
|
526
|
+
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
|
|
527
|
+
*
|
|
528
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
529
|
+
*
|
|
530
|
+
* @example
|
|
531
|
+
* await client.schedules.cancel("workflow_permanent_id", "workflow_schedule_id")
|
|
532
|
+
*/
|
|
533
|
+
cancel(workflowPermanentId, workflowScheduleId, requestOptions) {
|
|
534
|
+
return core.HttpResponsePromise.fromPromise(this.__cancel(workflowPermanentId, workflowScheduleId, requestOptions));
|
|
535
|
+
}
|
|
536
|
+
__cancel(workflowPermanentId, workflowScheduleId, requestOptions) {
|
|
537
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
538
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
539
|
+
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);
|
|
540
|
+
const _response = yield core.fetcher({
|
|
541
|
+
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/agents/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}/cancel`),
|
|
542
|
+
method: "POST",
|
|
543
|
+
headers: _headers,
|
|
544
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
545
|
+
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,
|
|
546
|
+
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,
|
|
547
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
548
|
+
});
|
|
549
|
+
if (_response.ok) {
|
|
550
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
551
|
+
}
|
|
552
|
+
if (_response.error.reason === "status-code") {
|
|
553
|
+
switch (_response.error.statusCode) {
|
|
554
|
+
case 422:
|
|
555
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
556
|
+
default:
|
|
557
|
+
throw new errors.SkyvernError({
|
|
558
|
+
statusCode: _response.error.statusCode,
|
|
559
|
+
body: _response.error.body,
|
|
560
|
+
rawResponse: _response.rawResponse,
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
switch (_response.error.reason) {
|
|
565
|
+
case "non-json":
|
|
566
|
+
throw new errors.SkyvernError({
|
|
567
|
+
statusCode: _response.error.statusCode,
|
|
568
|
+
body: _response.error.rawBody,
|
|
569
|
+
rawResponse: _response.rawResponse,
|
|
570
|
+
});
|
|
571
|
+
case "timeout":
|
|
572
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/agents/{workflow_permanent_id}/schedules/{workflow_schedule_id}/cancel.");
|
|
573
|
+
case "unknown":
|
|
574
|
+
throw new errors.SkyvernError({
|
|
575
|
+
message: _response.error.errorMessage,
|
|
576
|
+
rawResponse: _response.rawResponse,
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
}
|
|
517
581
|
}
|
|
@@ -2,13 +2,19 @@ export declare const ArtifactType: {
|
|
|
2
2
|
readonly Recording: "recording";
|
|
3
3
|
readonly Audio: "audio";
|
|
4
4
|
readonly SessionReplay: "session_replay";
|
|
5
|
+
readonly EvalScore: "eval_score";
|
|
6
|
+
readonly EvalTrajectory: "eval_trajectory";
|
|
7
|
+
readonly EvalRubrics: "eval_rubrics";
|
|
5
8
|
readonly BrowserConsoleLog: "browser_console_log";
|
|
9
|
+
readonly BrowserSessionActionLog: "browser_session_action_log";
|
|
6
10
|
readonly SkyvernLog: "skyvern_log";
|
|
7
11
|
readonly SkyvernLogRaw: "skyvern_log_raw";
|
|
8
12
|
readonly Screenshot: "screenshot";
|
|
9
13
|
readonly ScreenshotLlm: "screenshot_llm";
|
|
10
14
|
readonly ScreenshotAction: "screenshot_action";
|
|
11
15
|
readonly ScreenshotFinal: "screenshot_final";
|
|
16
|
+
readonly ScreenshotProxy: "screenshot_proxy";
|
|
17
|
+
readonly ScreenshotPreSubmit: "screenshot_pre_submit";
|
|
12
18
|
readonly LlmPrompt: "llm_prompt";
|
|
13
19
|
readonly LlmRequest: "llm_request";
|
|
14
20
|
readonly LlmResponse: "llm_response";
|
|
@@ -24,6 +30,7 @@ export declare const ArtifactType: {
|
|
|
24
30
|
readonly Html: "html";
|
|
25
31
|
readonly HtmlScrape: "html_scrape";
|
|
26
32
|
readonly HtmlAction: "html_action";
|
|
33
|
+
readonly HtmlPreSubmit: "html_pre_submit";
|
|
27
34
|
readonly Trace: "trace";
|
|
28
35
|
readonly Har: "har";
|
|
29
36
|
readonly ScriptFile: "script_file";
|
|
@@ -31,5 +38,6 @@ export declare const ArtifactType: {
|
|
|
31
38
|
readonly StepArchive: "step_archive";
|
|
32
39
|
readonly TaskArchive: "task_archive";
|
|
33
40
|
readonly Download: "download";
|
|
41
|
+
readonly Unknown: "unknown";
|
|
34
42
|
};
|
|
35
43
|
export type ArtifactType = (typeof ArtifactType)[keyof typeof ArtifactType];
|
|
@@ -3,13 +3,19 @@ export const ArtifactType = {
|
|
|
3
3
|
Recording: "recording",
|
|
4
4
|
Audio: "audio",
|
|
5
5
|
SessionReplay: "session_replay",
|
|
6
|
+
EvalScore: "eval_score",
|
|
7
|
+
EvalTrajectory: "eval_trajectory",
|
|
8
|
+
EvalRubrics: "eval_rubrics",
|
|
6
9
|
BrowserConsoleLog: "browser_console_log",
|
|
10
|
+
BrowserSessionActionLog: "browser_session_action_log",
|
|
7
11
|
SkyvernLog: "skyvern_log",
|
|
8
12
|
SkyvernLogRaw: "skyvern_log_raw",
|
|
9
13
|
Screenshot: "screenshot",
|
|
10
14
|
ScreenshotLlm: "screenshot_llm",
|
|
11
15
|
ScreenshotAction: "screenshot_action",
|
|
12
16
|
ScreenshotFinal: "screenshot_final",
|
|
17
|
+
ScreenshotProxy: "screenshot_proxy",
|
|
18
|
+
ScreenshotPreSubmit: "screenshot_pre_submit",
|
|
13
19
|
LlmPrompt: "llm_prompt",
|
|
14
20
|
LlmRequest: "llm_request",
|
|
15
21
|
LlmResponse: "llm_response",
|
|
@@ -25,6 +31,7 @@ export const ArtifactType = {
|
|
|
25
31
|
Html: "html",
|
|
26
32
|
HtmlScrape: "html_scrape",
|
|
27
33
|
HtmlAction: "html_action",
|
|
34
|
+
HtmlPreSubmit: "html_pre_submit",
|
|
28
35
|
Trace: "trace",
|
|
29
36
|
Har: "har",
|
|
30
37
|
ScriptFile: "script_file",
|
|
@@ -32,4 +39,5 @@ export const ArtifactType = {
|
|
|
32
39
|
StepArchive: "step_archive",
|
|
33
40
|
TaskArchive: "task_archive",
|
|
34
41
|
Download: "download",
|
|
42
|
+
Unknown: "unknown",
|
|
35
43
|
};
|
|
@@ -14,4 +14,12 @@ export interface CodeBlock {
|
|
|
14
14
|
parameters?: Skyvern.CodeBlockParametersItem[];
|
|
15
15
|
prompt?: string;
|
|
16
16
|
steps?: Skyvern.CodeBlockStep[];
|
|
17
|
+
/** JSON schema of the object this block's return produces; keys match the return keys; null when the block returns nothing */
|
|
18
|
+
data_schema?: CodeBlock.DataSchema;
|
|
19
|
+
}
|
|
20
|
+
export declare namespace CodeBlock {
|
|
21
|
+
/**
|
|
22
|
+
* JSON schema of the object this block's return produces; keys match the return keys; null when the block returns nothing
|
|
23
|
+
*/
|
|
24
|
+
type DataSchema = Record<string, unknown> | unknown[] | string;
|
|
17
25
|
}
|
|
@@ -12,4 +12,12 @@ export interface CodeBlockYaml {
|
|
|
12
12
|
parameter_keys?: string[];
|
|
13
13
|
prompt?: string;
|
|
14
14
|
steps?: Skyvern.CodeBlockStepYaml[];
|
|
15
|
+
/** JSON schema of the object this block's return produces; keys match the return keys; null when the block returns nothing */
|
|
16
|
+
data_schema?: CodeBlockYaml.DataSchema;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace CodeBlockYaml {
|
|
19
|
+
/**
|
|
20
|
+
* JSON schema of the object this block's return produces; keys match the return keys; null when the block returns nothing
|
|
21
|
+
*/
|
|
22
|
+
type DataSchema = Record<string, unknown> | unknown[] | string;
|
|
15
23
|
}
|
|
@@ -17,6 +17,8 @@ export interface CreateCredentialRequest {
|
|
|
17
17
|
proxy_session_id?: string;
|
|
18
18
|
/** Rotate the Skyvern-managed proxy sticky-session id when updating this credential. */
|
|
19
19
|
rotate_proxy_session_id?: boolean;
|
|
20
|
+
/** Login page URL used during the credential test */
|
|
21
|
+
tested_url?: string;
|
|
20
22
|
}
|
|
21
23
|
export declare namespace CreateCredentialRequest {
|
|
22
24
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as Skyvern from "../index.mjs";
|
|
2
|
-
export type GetRunResponse = Skyvern.GetRunResponse.TaskV1 | Skyvern.GetRunResponse.TaskV2 | Skyvern.GetRunResponse.OpenaiCua | Skyvern.GetRunResponse.AnthropicCua | Skyvern.GetRunResponse.UiTars | Skyvern.GetRunResponse.YutoriNavigator | Skyvern.GetRunResponse.WorkflowRun;
|
|
2
|
+
export type GetRunResponse = Skyvern.GetRunResponse.TaskV1 | Skyvern.GetRunResponse.TaskV2 | Skyvern.GetRunResponse.OpenaiCua | Skyvern.GetRunResponse.AnthropicCua | Skyvern.GetRunResponse.UiTars | Skyvern.GetRunResponse.YutoriNavigator | Skyvern.GetRunResponse.TaskV3 | Skyvern.GetRunResponse.WorkflowRun;
|
|
3
3
|
export declare namespace GetRunResponse {
|
|
4
4
|
interface TaskV1 extends Skyvern.TaskRunResponse {
|
|
5
5
|
run_type: "task_v1";
|
|
@@ -19,6 +19,9 @@ export declare namespace GetRunResponse {
|
|
|
19
19
|
interface YutoriNavigator extends Skyvern.TaskRunResponse {
|
|
20
20
|
run_type: "yutori_navigator";
|
|
21
21
|
}
|
|
22
|
+
interface TaskV3 extends Skyvern.TaskRunResponse {
|
|
23
|
+
run_type: "task_v3";
|
|
24
|
+
}
|
|
22
25
|
interface WorkflowRun extends Skyvern.WorkflowRunResponse {
|
|
23
26
|
run_type: "workflow_run";
|
|
24
27
|
}
|
|
@@ -10,9 +10,9 @@ export interface HumanInteractionBlockYaml {
|
|
|
10
10
|
instructions?: string;
|
|
11
11
|
positive_descriptor?: string;
|
|
12
12
|
negative_descriptor?: string;
|
|
13
|
-
timeout_seconds
|
|
14
|
-
sender
|
|
13
|
+
timeout_seconds?: number;
|
|
14
|
+
sender?: string;
|
|
15
15
|
recipients: string[];
|
|
16
|
-
subject
|
|
17
|
-
body
|
|
16
|
+
subject?: string;
|
|
17
|
+
body?: string;
|
|
18
18
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const OneTimeDispatchStatus: {
|
|
2
|
+
readonly Pending: "pending";
|
|
3
|
+
readonly Fired: "fired";
|
|
4
|
+
readonly Canceled: "canceled";
|
|
5
|
+
readonly Failed: "failed";
|
|
6
|
+
};
|
|
7
|
+
export type OneTimeDispatchStatus = (typeof OneTimeDispatchStatus)[keyof typeof OneTimeDispatchStatus];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as Skyvern from "../index.mjs";
|
|
1
2
|
/**
|
|
2
3
|
* Compact schedule projection for the org-wide list endpoint.
|
|
3
4
|
*
|
|
@@ -11,7 +12,12 @@ export interface OrganizationScheduleItem {
|
|
|
11
12
|
organization_id: string;
|
|
12
13
|
workflow_permanent_id: string;
|
|
13
14
|
workflow_title: string;
|
|
14
|
-
cron_expression
|
|
15
|
+
cron_expression?: string;
|
|
16
|
+
interval_seconds?: number;
|
|
17
|
+
first_fire_at?: string;
|
|
18
|
+
run_at?: string;
|
|
19
|
+
dispatch_status?: Skyvern.OneTimeDispatchStatus;
|
|
20
|
+
workflow_run_id?: string;
|
|
15
21
|
timezone: string;
|
|
16
22
|
enabled: boolean;
|
|
17
23
|
parameters?: Record<string, unknown>;
|