@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
package/dist/cjs/Client.d.ts
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/cjs/Client.js
CHANGED
|
@@ -70,8 +70,8 @@ class SkyvernClient {
|
|
|
70
70
|
"x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
|
|
71
71
|
"X-Fern-Language": "JavaScript",
|
|
72
72
|
"X-Fern-SDK-Name": "@skyvern/client",
|
|
73
|
-
"X-Fern-SDK-Version": "1.0.
|
|
74
|
-
"User-Agent": "@skyvern/client/1.0.
|
|
73
|
+
"X-Fern-SDK-Version": "1.0.55",
|
|
74
|
+
"User-Agent": "@skyvern/client/1.0.55",
|
|
75
75
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
76
76
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
77
77
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -3020,6 +3020,80 @@ class SkyvernClient {
|
|
|
3020
3020
|
}
|
|
3021
3021
|
});
|
|
3022
3022
|
}
|
|
3023
|
+
/**
|
|
3024
|
+
* 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.
|
|
3025
|
+
*
|
|
3026
|
+
* @param {string} browserSessionId - The ID of the browser session. browser_session_id starts with `pbs_`
|
|
3027
|
+
* @param {Skyvern.ExtendBrowserSessionRequest} request
|
|
3028
|
+
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3029
|
+
*
|
|
3030
|
+
* @throws {@link Skyvern.ForbiddenError}
|
|
3031
|
+
* @throws {@link Skyvern.NotFoundError}
|
|
3032
|
+
* @throws {@link Skyvern.ConflictError}
|
|
3033
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
3034
|
+
*
|
|
3035
|
+
* @example
|
|
3036
|
+
* await client.extendBrowserSession("pbs_123456", {
|
|
3037
|
+
* additional_minutes: 1
|
|
3038
|
+
* })
|
|
3039
|
+
*/
|
|
3040
|
+
extendBrowserSession(browserSessionId, request, requestOptions) {
|
|
3041
|
+
return core.HttpResponsePromise.fromPromise(this.__extendBrowserSession(browserSessionId, request, requestOptions));
|
|
3042
|
+
}
|
|
3043
|
+
__extendBrowserSession(browserSessionId, request, requestOptions) {
|
|
3044
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3045
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3046
|
+
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);
|
|
3047
|
+
const _response = yield core.fetcher({
|
|
3048
|
+
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`),
|
|
3049
|
+
method: "POST",
|
|
3050
|
+
headers: _headers,
|
|
3051
|
+
contentType: "application/json",
|
|
3052
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
3053
|
+
requestType: "json",
|
|
3054
|
+
body: request,
|
|
3055
|
+
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,
|
|
3056
|
+
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,
|
|
3057
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
3058
|
+
});
|
|
3059
|
+
if (_response.ok) {
|
|
3060
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
3061
|
+
}
|
|
3062
|
+
if (_response.error.reason === "status-code") {
|
|
3063
|
+
switch (_response.error.statusCode) {
|
|
3064
|
+
case 403:
|
|
3065
|
+
throw new Skyvern.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
3066
|
+
case 404:
|
|
3067
|
+
throw new Skyvern.NotFoundError(_response.error.body, _response.rawResponse);
|
|
3068
|
+
case 409:
|
|
3069
|
+
throw new Skyvern.ConflictError(_response.error.body, _response.rawResponse);
|
|
3070
|
+
case 422:
|
|
3071
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
3072
|
+
default:
|
|
3073
|
+
throw new errors.SkyvernError({
|
|
3074
|
+
statusCode: _response.error.statusCode,
|
|
3075
|
+
body: _response.error.body,
|
|
3076
|
+
rawResponse: _response.rawResponse,
|
|
3077
|
+
});
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
3080
|
+
switch (_response.error.reason) {
|
|
3081
|
+
case "non-json":
|
|
3082
|
+
throw new errors.SkyvernError({
|
|
3083
|
+
statusCode: _response.error.statusCode,
|
|
3084
|
+
body: _response.error.rawBody,
|
|
3085
|
+
rawResponse: _response.rawResponse,
|
|
3086
|
+
});
|
|
3087
|
+
case "timeout":
|
|
3088
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/browser_sessions/{browser_session_id}/extend.");
|
|
3089
|
+
case "unknown":
|
|
3090
|
+
throw new errors.SkyvernError({
|
|
3091
|
+
message: _response.error.errorMessage,
|
|
3092
|
+
rawResponse: _response.rawResponse,
|
|
3093
|
+
});
|
|
3094
|
+
}
|
|
3095
|
+
});
|
|
3096
|
+
}
|
|
3023
3097
|
/**
|
|
3024
3098
|
* Get details about a specific browser session, including the browser address for cdp connection.
|
|
3025
3099
|
*
|
|
@@ -6,7 +6,7 @@ import type * as Skyvern from "../../index.js";
|
|
|
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.js";
|
|
|
11
11
|
export type { DeleteFolderRequest } from "./DeleteFolderRequest.js";
|
|
12
12
|
export type { DeployScriptRequest } from "./DeployScriptRequest.js";
|
|
13
13
|
export type { DownloadFilesRequest } from "./DownloadFilesRequest.js";
|
|
14
|
+
export type { ExtendBrowserSessionRequest } from "./ExtendBrowserSessionRequest.js";
|
|
14
15
|
export type { FolderCreate } from "./FolderCreate.js";
|
|
15
16
|
export type { FolderUpdate } from "./FolderUpdate.js";
|
|
16
17
|
export type { GetCredentialsRequest } from "./GetCredentialsRequest.js";
|
|
@@ -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
|
}
|
|
@@ -190,6 +190,8 @@ class Schedules {
|
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
|
+
* 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.
|
|
194
|
+
*
|
|
193
195
|
* @param {string} workflowPermanentId
|
|
194
196
|
* @param {Skyvern.WorkflowScheduleUpsertRequest} request
|
|
195
197
|
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -198,7 +200,6 @@ class Schedules {
|
|
|
198
200
|
*
|
|
199
201
|
* @example
|
|
200
202
|
* await client.schedules.create("workflow_permanent_id", {
|
|
201
|
-
* cron_expression: "cron_expression",
|
|
202
203
|
* timezone: "timezone"
|
|
203
204
|
* })
|
|
204
205
|
*/
|
|
@@ -254,6 +255,8 @@ class Schedules {
|
|
|
254
255
|
});
|
|
255
256
|
}
|
|
256
257
|
/**
|
|
258
|
+
* Fetch one schedule belonging to an agent. Returns the schedule's cron expression or interval, timezone, parameters, enabled state, and next upcoming run times.
|
|
259
|
+
*
|
|
257
260
|
* @param {string} workflowPermanentId
|
|
258
261
|
* @param {string} workflowScheduleId
|
|
259
262
|
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -312,6 +315,8 @@ class Schedules {
|
|
|
312
315
|
});
|
|
313
316
|
}
|
|
314
317
|
/**
|
|
318
|
+
* 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.
|
|
319
|
+
*
|
|
315
320
|
* @param {string} workflowPermanentId
|
|
316
321
|
* @param {string} workflowScheduleId
|
|
317
322
|
* @param {Skyvern.WorkflowScheduleUpsertRequest} request
|
|
@@ -321,7 +326,6 @@ class Schedules {
|
|
|
321
326
|
*
|
|
322
327
|
* @example
|
|
323
328
|
* await client.schedules.update("workflow_permanent_id", "workflow_schedule_id", {
|
|
324
|
-
* cron_expression: "cron_expression",
|
|
325
329
|
* timezone: "timezone"
|
|
326
330
|
* })
|
|
327
331
|
*/
|
|
@@ -550,5 +554,65 @@ class Schedules {
|
|
|
550
554
|
}
|
|
551
555
|
});
|
|
552
556
|
}
|
|
557
|
+
/**
|
|
558
|
+
* 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.
|
|
559
|
+
*
|
|
560
|
+
* @param {string} workflowPermanentId
|
|
561
|
+
* @param {string} workflowScheduleId
|
|
562
|
+
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
|
|
563
|
+
*
|
|
564
|
+
* @throws {@link Skyvern.UnprocessableEntityError}
|
|
565
|
+
*
|
|
566
|
+
* @example
|
|
567
|
+
* await client.schedules.cancel("workflow_permanent_id", "workflow_schedule_id")
|
|
568
|
+
*/
|
|
569
|
+
cancel(workflowPermanentId, workflowScheduleId, requestOptions) {
|
|
570
|
+
return core.HttpResponsePromise.fromPromise(this.__cancel(workflowPermanentId, workflowScheduleId, requestOptions));
|
|
571
|
+
}
|
|
572
|
+
__cancel(workflowPermanentId, workflowScheduleId, requestOptions) {
|
|
573
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
574
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
575
|
+
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);
|
|
576
|
+
const _response = yield core.fetcher({
|
|
577
|
+
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`),
|
|
578
|
+
method: "POST",
|
|
579
|
+
headers: _headers,
|
|
580
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
581
|
+
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,
|
|
582
|
+
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,
|
|
583
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
584
|
+
});
|
|
585
|
+
if (_response.ok) {
|
|
586
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
587
|
+
}
|
|
588
|
+
if (_response.error.reason === "status-code") {
|
|
589
|
+
switch (_response.error.statusCode) {
|
|
590
|
+
case 422:
|
|
591
|
+
throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
592
|
+
default:
|
|
593
|
+
throw new errors.SkyvernError({
|
|
594
|
+
statusCode: _response.error.statusCode,
|
|
595
|
+
body: _response.error.body,
|
|
596
|
+
rawResponse: _response.rawResponse,
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
switch (_response.error.reason) {
|
|
601
|
+
case "non-json":
|
|
602
|
+
throw new errors.SkyvernError({
|
|
603
|
+
statusCode: _response.error.statusCode,
|
|
604
|
+
body: _response.error.rawBody,
|
|
605
|
+
rawResponse: _response.rawResponse,
|
|
606
|
+
});
|
|
607
|
+
case "timeout":
|
|
608
|
+
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/agents/{workflow_permanent_id}/schedules/{workflow_schedule_id}/cancel.");
|
|
609
|
+
case "unknown":
|
|
610
|
+
throw new errors.SkyvernError({
|
|
611
|
+
message: _response.error.errorMessage,
|
|
612
|
+
rawResponse: _response.rawResponse,
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
}
|
|
553
617
|
}
|
|
554
618
|
exports.Schedules = Schedules;
|
|
@@ -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];
|
|
@@ -6,13 +6,19 @@ exports.ArtifactType = {
|
|
|
6
6
|
Recording: "recording",
|
|
7
7
|
Audio: "audio",
|
|
8
8
|
SessionReplay: "session_replay",
|
|
9
|
+
EvalScore: "eval_score",
|
|
10
|
+
EvalTrajectory: "eval_trajectory",
|
|
11
|
+
EvalRubrics: "eval_rubrics",
|
|
9
12
|
BrowserConsoleLog: "browser_console_log",
|
|
13
|
+
BrowserSessionActionLog: "browser_session_action_log",
|
|
10
14
|
SkyvernLog: "skyvern_log",
|
|
11
15
|
SkyvernLogRaw: "skyvern_log_raw",
|
|
12
16
|
Screenshot: "screenshot",
|
|
13
17
|
ScreenshotLlm: "screenshot_llm",
|
|
14
18
|
ScreenshotAction: "screenshot_action",
|
|
15
19
|
ScreenshotFinal: "screenshot_final",
|
|
20
|
+
ScreenshotProxy: "screenshot_proxy",
|
|
21
|
+
ScreenshotPreSubmit: "screenshot_pre_submit",
|
|
16
22
|
LlmPrompt: "llm_prompt",
|
|
17
23
|
LlmRequest: "llm_request",
|
|
18
24
|
LlmResponse: "llm_response",
|
|
@@ -28,6 +34,7 @@ exports.ArtifactType = {
|
|
|
28
34
|
Html: "html",
|
|
29
35
|
HtmlScrape: "html_scrape",
|
|
30
36
|
HtmlAction: "html_action",
|
|
37
|
+
HtmlPreSubmit: "html_pre_submit",
|
|
31
38
|
Trace: "trace",
|
|
32
39
|
Har: "har",
|
|
33
40
|
ScriptFile: "script_file",
|
|
@@ -35,4 +42,5 @@ exports.ArtifactType = {
|
|
|
35
42
|
StepArchive: "step_archive",
|
|
36
43
|
TaskArchive: "task_archive",
|
|
37
44
|
Download: "download",
|
|
45
|
+
Unknown: "unknown",
|
|
38
46
|
};
|
|
@@ -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.js";
|
|
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];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OneTimeDispatchStatus = void 0;
|
|
5
|
+
exports.OneTimeDispatchStatus = {
|
|
6
|
+
Pending: "pending",
|
|
7
|
+
Fired: "fired",
|
|
8
|
+
Canceled: "canceled",
|
|
9
|
+
Failed: "failed",
|
|
10
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as Skyvern from "../index.js";
|
|
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>;
|
|
@@ -7,10 +7,14 @@ export interface SendEmailBlockYaml {
|
|
|
7
7
|
model?: Record<string, unknown>;
|
|
8
8
|
ignore_workflow_system_prompt?: boolean;
|
|
9
9
|
next_loop_on_failure?: boolean;
|
|
10
|
-
smtp_host_secret_parameter_key
|
|
11
|
-
smtp_port_secret_parameter_key
|
|
12
|
-
smtp_username_secret_parameter_key
|
|
13
|
-
smtp_password_secret_parameter_key
|
|
10
|
+
smtp_host_secret_parameter_key?: string;
|
|
11
|
+
smtp_port_secret_parameter_key?: string;
|
|
12
|
+
smtp_username_secret_parameter_key?: string;
|
|
13
|
+
smtp_password_secret_parameter_key?: string;
|
|
14
|
+
custom_smtp_host?: string;
|
|
15
|
+
custom_smtp_port?: number;
|
|
16
|
+
custom_smtp_username?: string;
|
|
17
|
+
custom_smtp_password?: string;
|
|
14
18
|
sender: string;
|
|
15
19
|
recipients: string[];
|
|
16
20
|
subject: string;
|
|
@@ -14,7 +14,7 @@ export interface TotpCode {
|
|
|
14
14
|
content: string;
|
|
15
15
|
/** The timestamp when the TOTP code expires */
|
|
16
16
|
expired_at?: string;
|
|
17
|
-
/**
|
|
17
|
+
/** Deprecated compatibility field. Skyvern auto-detects the OTP type from content, so this value does not constrain extraction. */
|
|
18
18
|
type?: Skyvern.OtpType;
|
|
19
19
|
/** The skyvern ID of the TOTP code. */
|
|
20
20
|
totp_code_id: string;
|