Skip to content

Automate browser based workflows with AI

Regenerate the Python and TS SDK clients with Fern (#8760)

Shuchang Zheng74f07a62ade2
diff --git a/.gitignore b/.gitignore
index 1df97b9de..5e3128085 100644
--- a/.gitignore
+++ b/.gitignore
@@ -166,9 +166,11 @@ credential_vault/
videos/
skyvern/artifacts/
artifacts/
-# The bare artifacts/ rule above is unanchored and would otherwise swallow the
-# Fern-generated TS SDK resource of the same name, breaking the npm release build.
+# The bare artifacts/ rule above is unanchored, so it would otherwise swallow the
+# Fern-generated SDK resources of the same name in BOTH clients, breaking the npm
+# release build and leaving skyvern.client.artifacts unimportable in CI.
!skyvern-ts/client/src/api/resources/artifacts/
+!skyvern/client/artifacts/
traces/
*.pkl
har/
diff --git a/fern/openapi/skyvern_openapi.json b/fern/openapi/skyvern_openapi.json
index 0fc752d12..43d927a7a 100644
--- a/fern/openapi/skyvern_openapi.json
+++ b/fern/openapi/skyvern_openapi.json
@@ -10150,6 +10150,17 @@
}
],
"title": "Single Option Click"
+ },
+ "desired_state": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Desired State"
}
},
"type": "object",
@@ -11117,6 +11128,18 @@
"title": "Rotate Proxy Session Id",
"description": "Rotate the Skyvern-managed proxy sticky-session id when updating this credential.",
"default": false
+ },
+ "tested_url": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Tested Url",
+ "description": "Login page URL used during the credential test"
}
},
"type": "object",
@@ -20546,6 +20569,52 @@
"type": "array",
"title": "File Attachments",
"default": []
+ },
+ "custom_smtp_host": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Custom Smtp Host"
+ },
+ "custom_smtp_port": {
+ "anyOf": [
+ {
+ "type": "integer",
+ "maximum": 65535.0,
+ "minimum": 1.0
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Custom Smtp Port"
+ },
+ "custom_smtp_username": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Custom Smtp Username"
+ },
+ "custom_smtp_password": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Custom Smtp Password"
}
},
"type": "object",
@@ -20659,6 +20728,52 @@
],
"title": "Smtp Password Secret Parameter Key"
},
+ "custom_smtp_host": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Custom Smtp Host"
+ },
+ "custom_smtp_port": {
+ "anyOf": [
+ {
+ "type": "integer",
+ "maximum": 65535.0,
+ "minimum": 1.0
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Custom Smtp Port"
+ },
+ "custom_smtp_username": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Custom Smtp Username"
+ },
+ "custom_smtp_password": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "Custom Smtp Password"
+ },
"sender": {
"type": "string",
"title": "Sender"
diff --git a/scripts/patch_generated_client.py b/scripts/patch_generated_client.py
index de6cd8a6d..87670f433 100644
--- a/scripts/patch_generated_client.py
+++ b/scripts/patch_generated_client.py
@@ -12,6 +12,10 @@ Patches:
2. update_forward_refs — Pydantic v2 can raise internal schema-gathering
KeyErrors for Fern-generated recursive unions even with raise_errors=False.
Suppress KeyErrors that mention the "definitions" key.
+3. context_parameter_source cross-import — Fern emits `from .context_parameter
+ import ContextParameter` mid-file, so entering context_parameter_source as the
+ entry point sees a partially initialized context_parameter. Move the import
+ below the union definition so both entry orders resolve.
"""
from __future__ import annotations
@@ -96,6 +100,41 @@ FORWARD_REFS_NEW = """def update_forward_refs(model: Type["Model"], **localns: A
model.update_forward_refs(**localns)"""
+CONTEXT_PARAMETER_SOURCE = "types/context_parameter_source.py"
+
+# Two edits to one file: drop Fern's mid-file cross-import, then re-add it after
+# the union is defined. Applied in order.
+CONTEXT_PARAMETER_SOURCE_PATCHES: tuple[tuple[str, str], ...] = (
+ (
+ """ extra = pydantic.Extra.allow
+
+
+from .context_parameter import ContextParameter # noqa: E402, F401, I001
+
+
+class ContextParameterSource_AwsSecret(UniversalBaseModel):""",
+ """ extra = pydantic.Extra.allow
+
+
+class ContextParameterSource_AwsSecret(UniversalBaseModel):""",
+ ),
+ (
+ """ ContextParameterSource_Credential,
+]
+update_forward_refs(ContextParameterSource_Context)""",
+ """ ContextParameterSource_Credential,
+]
+
+# Manual patch: Fern v4.31.1 emits this cross-import mid-file, so entering
+# context_parameter_source first sees a partially initialized context_parameter.
+# Importing after the union is defined makes both entry orders resolve.
+from .context_parameter import ContextParameter # noqa: E402, F401, I001
+
+update_forward_refs(ContextParameterSource_Context)""",
+ ),
+)
+
+
def patch_file(rel_path: str, old: str, new: str) -> str:
path = CLIENT / rel_path
text = path.read_text()
@@ -114,6 +153,11 @@ def main() -> int:
print(f"{rel_path}: {result}")
failed |= result == "PATTERN NOT FOUND"
+ for index, (old, new) in enumerate(CONTEXT_PARAMETER_SOURCE_PATCHES, start=1):
+ result = patch_file(CONTEXT_PARAMETER_SOURCE, old, new)
+ print(f"{CONTEXT_PARAMETER_SOURCE} [{index}/{len(CONTEXT_PARAMETER_SOURCE_PATCHES)}]: {result}")
+ failed |= result == "PATTERN NOT FOUND"
+
result = patch_file("core/pydantic_utilities.py", FORWARD_REFS_OLD, FORWARD_REFS_NEW)
print(f"core/pydantic_utilities.py: {result}")
failed |= result == "PATTERN NOT FOUND"
diff --git a/skyvern-ts/client/reference.md b/skyvern-ts/client/reference.md
index d5f6f5b23..963184e9e 100644
--- a/skyvern-ts/client/reference.md
+++ b/skyvern-ts/client/reference.md
@@ -309,6 +309,20 @@ await client.schedules.list("workflow_permanent_id");
<dl>
<dd>
+#### 📝 Description
+
+<dl>
+<dd>
+
+<dl>
+<dd>
+
+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.
+</dd>
+</dl>
+</dd>
+</dl>
+
#### 🔌 Usage
<dl>
@@ -319,7 +333,6 @@ await client.schedules.list("workflow_permanent_id");
```typescript
await client.schedules.create("workflow_permanent_id", {
- cron_expression: "cron_expression",
timezone: "timezone"
});
@@ -369,6 +382,20 @@ await client.schedules.create("workflow_permanent_id", {
<dl>
<dd>
+#### 📝 Description
+
+<dl>
+<dd>
+
+<dl>
+<dd>
+
+Fetch one schedule belonging to an agent. Returns the schedule's cron expression or interval, timezone, parameters, enabled state, and next upcoming run times.
+</dd>
+</dl>
+</dd>
+</dl>
+
#### 🔌 Usage
<dl>
@@ -426,6 +453,20 @@ await client.schedules.get("workflow_permanent_id", "workflow_schedule_id");
<dl>
<dd>
+#### 📝 Description
+
+<dl>
+<dd>
+
+<dl>
+<dd>
+
+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.
+</dd>
+</dl>
+</dd>
+</dl>
+
#### 🔌 Usage
<dl>
@@ -436,7 +477,6 @@ await client.schedules.get("workflow_permanent_id", "workflow_schedule_id");
```typescript
await client.schedules.update("workflow_permanent_id", "workflow_schedule_id", {
- cron_expression: "cron_expression",
timezone: "timezone"
});
@@ -657,6 +697,77 @@ await client.schedules.disable("workflow_permanent_id", "workflow_schedule_id");
</dl>
+</dd>
+</dl>
+</details>
+
+<details><summary><code>client.schedules.<a href="/src/api/resources/schedules/client/Client.ts">cancel</a>(workflowPermanentId, workflowScheduleId) -> Skyvern.WorkflowScheduleResponse</code></summary>
+<dl>
+<dd>
+
+#### 📝 Description
+
+<dl>
+<dd>
+
+<dl>
+<dd>
+
+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.
+</dd>
+</dl>
+</dd>
+</dl>
+
+#### 🔌 Usage
+
+<dl>
+<dd>
+
+<dl>
+<dd>
+
+```typescript
+await client.schedules.cancel("workflow_permanent_id", "workflow_schedule_id");
+
+```
+</dd>
+</dl>
+</dd>
+</dl>
+
+#### ⚙️ Parameters
+
+<dl>
+<dd>
+
+<dl>
+<dd>
+
+**workflowPermanentId:** `string`
+
+</dd>
+</dl>
+
+<dl>
+<dd>
+
+**workflowScheduleId:** `string`
+
+</dd>
+</dl>
+
+<dl>
+<dd>
+
+**requestOptions:** `Schedules.RequestOptions`
+
+</dd>
+</dl>
+</dd>
+</dl>
+
+
</dd>
</dl>
</details>
diff --git a/skyvern-ts/client/src/Client.ts b/skyvern-ts/client/src/Client.ts
index 32590a614..c6958aa8f 100644
--- a/skyvern-ts/client/src/Client.ts
+++ b/skyvern-ts/client/src/Client.ts
@@ -32,8 +32,8 @@ export class SkyvernClient {
"x-api-key": _options?.apiKey,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@skyvern/client",
- "X-Fern-SDK-Version": "1.0.47",
- "User-Agent": "@skyvern/client/1.0.47",
+ "X-Fern-SDK-Version": "1.0.55",
+ "User-Agent": "@skyvern/client/1.0.55",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -3753,6 +3753,102 @@ export class SkyvernClient {
}
}
+ /**
+ * 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.
+ *
+ * @param {string} browserSessionId - The ID of the browser session. browser_session_id starts with `pbs_`
+ * @param {Skyvern.ExtendBrowserSessionRequest} request
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Skyvern.ForbiddenError}
+ * @throws {@link Skyvern.NotFoundError}
+ * @throws {@link Skyvern.ConflictError}
+ * @throws {@link Skyvern.UnprocessableEntityError}
+ *
+ * @example
+ * await client.extendBrowserSession("pbs_123456", {
+ * additional_minutes: 1
+ * })
+ */
+ public extendBrowserSession(
+ browserSessionId: string,
+ request: Skyvern.ExtendBrowserSessionRequest,
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): core.HttpResponsePromise<Skyvern.BrowserSessionResponse> {
+ return core.HttpResponsePromise.fromPromise(
+ this.__extendBrowserSession(browserSessionId, request, requestOptions),
+ );
+ }
+
+ private async __extendBrowserSession(
+ browserSessionId: string,
+ request: Skyvern.ExtendBrowserSessionRequest,
+ requestOptions?: SkyvernClient.RequestOptions,
+ ): Promise<core.WithRawResponse<Skyvern.BrowserSessionResponse>> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.SkyvernEnvironment.Cloud,
+ `v1/browser_sessions/${core.url.encodePathParam(browserSessionId)}/extend`,
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryParameters: requestOptions?.queryParams,
+ requestType: "json",
+ body: request,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return { data: _response.body as Skyvern.BrowserSessionResponse, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 403:
+ throw new Skyvern.ForbiddenError(_response.error.body as unknown, _response.rawResponse);
+ case 404:
+ throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
+ case 409:
+ throw new Skyvern.ConflictError(_response.error.body as unknown, _response.rawResponse);
+ case 422:
+ throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SkyvernTimeoutError(
+ "Timeout exceeded when calling POST /v1/browser_sessions/{browser_session_id}/extend.",
+ );
+ case "unknown":
+ throw new errors.SkyvernError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
/**
* Get details about a specific browser session, including the browser address for cdp connection.
*
diff --git a/skyvern-ts/client/src/api/client/requests/CreateBrowserSessionRequest.ts b/skyvern-ts/client/src/api/client/requests/CreateBrowserSessionRequest.ts
index 64bc46fb5..c95649933 100644
--- a/skyvern-ts/client/src/api/client/requests/CreateBrowserSessionRequest.ts
+++ b/skyvern-ts/client/src/api/client/requests/CreateBrowserSessionRequest.ts
@@ -9,7 +9,7 @@ import type * as Skyvern from "../../index.js";
export interface CreateBrowserSessionRequest {
/** Optional URL to open when the standalone browser session starts. */
url?: string;
- /** Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 1440. Defaults to 60. */
+ /** Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 240. Defaults to 60. */
timeout?: number;
/**
* Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
diff --git a/skyvern-ts/client/src/api/client/requests/ExtendBrowserSessionRequest.ts b/skyvern-ts/client/src/api/client/requests/ExtendBrowserSessionRequest.ts
new file mode 100644
index 000000000..93dc3b91f
--- /dev/null
+++ b/skyvern-ts/client/src/api/client/requests/ExtendBrowserSessionRequest.ts
@@ -0,0 +1,12 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * @example
+ * {
+ * additional_minutes: 1
+ * }
+ */
+export interface ExtendBrowserSessionRequest {
+ /** 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. */
+ additional_minutes: number;
+}
diff --git a/skyvern-ts/client/src/api/client/requests/TotpCodeCreate.ts b/skyvern-ts/client/src/api/client/requests/TotpCodeCreate.ts
index 97791837c..50b561f46 100644
--- a/skyvern-ts/client/src/api/client/requests/TotpCodeCreate.ts
+++ b/skyvern-ts/client/src/api/client/requests/TotpCodeCreate.ts
@@ -24,6 +24,6 @@ export interface TotpCodeCreate {
content: string;
/** The timestamp when the TOTP code expires */
expired_at?: string;
- /** Optional. If provided, forces extraction of this specific OTP type (totp or magic_link). Use this when the content contains multiple OTP types and you want to specify which one to extract. */
+ /** Deprecated compatibility field. Skyvern auto-detects the OTP type from content, so this value does not constrain extraction. */
type?: Skyvern.OtpType;
}
diff --git a/skyvern-ts/client/src/api/client/requests/index.ts b/skyvern-ts/client/src/api/client/requests/index.ts
index cbc856ed8..97ded36d8 100644
--- a/skyvern-ts/client/src/api/client/requests/index.ts
+++ b/skyvern-ts/client/src/api/client/requests/index.ts
@@ -11,6 +11,7 @@ export type { CustomLlmUpdateRequest } from "./CustomLlmUpdateRequest.js";
export type { DeleteFolderRequest } from "./DeleteFolderRequest.js";
export type { DeployScriptRequest } from "./DeployScriptRequest.js";
export type { DownloadFilesRequest } from "./DownloadFilesRequest.js";
+export type { ExtendBrowserSessionRequest } from "./ExtendBrowserSessionRequest.js";
export type { FolderCreate } from "./FolderCreate.js";
export type { FolderUpdate } from "./FolderUpdate.js";
export type { GetCredentialsRequest } from "./GetCredentialsRequest.js";
diff --git a/skyvern-ts/client/src/api/resources/schedules/client/Client.ts b/skyvern-ts/client/src/api/resources/schedules/client/Client.ts
index 5e715bfdf..7e6b02f63 100644
--- a/skyvern-ts/client/src/api/resources/schedules/client/Client.ts
+++ b/skyvern-ts/client/src/api/resources/schedules/client/Client.ts
@@ -195,6 +195,8 @@ export class Schedules {
}
/**
+ * 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.
+ *
* @param {string} workflowPermanentId
* @param {Skyvern.WorkflowScheduleUpsertRequest} request
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
@@ -203,7 +205,6 @@ export class Schedules {
*
* @example
* await client.schedules.create("workflow_permanent_id", {
- * cron_expression: "cron_expression",
* timezone: "timezone"
* })
*/
@@ -279,6 +280,8 @@ export class Schedules {
}
/**
+ * Fetch one schedule belonging to an agent. Returns the schedule's cron expression or interval, timezone, parameters, enabled state, and next upcoming run times.
+ *
* @param {string} workflowPermanentId
* @param {string} workflowScheduleId
* @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
@@ -359,6 +362,8 @@ export class Schedules {
}
/**
+ * 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.
+ *
* @param {string} workflowPermanentId
* @param {string} workflowScheduleId
* @param {Skyvern.WorkflowScheduleUpsertRequest} request
@@ -368,7 +373,6 @@ export class Schedules {
*
* @example
* await client.schedules.update("workflow_permanent_id", "workflow_schedule_id", {
- * cron_expression: "cron_expression",
* timezone: "timezone"
* })
*/
@@ -686,4 +690,86 @@ export class Schedules {
});
}
}
+
+ /**
+ * 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.
+ *
+ * @param {string} workflowPermanentId
+ * @param {string} workflowScheduleId
+ * @param {Schedules.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link Skyvern.UnprocessableEntityError}
+ *
+ * @example
+ * await client.schedules.cancel("workflow_permanent_id", "workflow_schedule_id")
+ */
+ public cancel(
+ workflowPermanentId: string,
+ workflowScheduleId: string,
+ requestOptions?: Schedules.RequestOptions,
+ ): core.HttpResponsePromise<Skyvern.WorkflowScheduleResponse> {
+ return core.HttpResponsePromise.fromPromise(
+ this.__cancel(workflowPermanentId, workflowScheduleId, requestOptions),
+ );
+ }
+
+ private async __cancel(
+ workflowPermanentId: string,
+ workflowScheduleId: string,
+ requestOptions?: Schedules.RequestOptions,
+ ): Promise<core.WithRawResponse<Skyvern.WorkflowScheduleResponse>> {
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
+ requestOptions?.headers,
+ );
+ const _response = await core.fetcher({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)) ??
+ environments.SkyvernEnvironment.Cloud,
+ `v1/agents/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}/cancel`,
+ ),
+ method: "POST",
+ headers: _headers,
+ queryParameters: requestOptions?.queryParams,
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return { data: _response.body as Skyvern.WorkflowScheduleResponse, rawResponse: _response.rawResponse };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 422:
+ throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
+ default:
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SkyvernError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SkyvernTimeoutError(
+ "Timeout exceeded when calling POST /v1/agents/{workflow_permanent_id}/schedules/{workflow_schedule_id}/cancel.",
+ );
+ case "unknown":
+ throw new errors.SkyvernError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
}
diff --git a/skyvern-ts/client/src/api/types/ArtifactType.ts b/skyvern-ts/client/src/api/types/ArtifactType.ts
index 5f980a03c..8e979ca75 100644
--- a/skyvern-ts/client/src/api/types/ArtifactType.ts
+++ b/skyvern-ts/client/src/api/types/ArtifactType.ts
@@ -4,13 +4,19 @@ export const ArtifactType = {
Recording: "recording",
Audio: "audio",
SessionReplay: "session_replay",
+ EvalScore: "eval_score",
+ EvalTrajectory: "eval_trajectory",
+ EvalRubrics: "eval_rubrics",
BrowserConsoleLog: "browser_console_log",
+ BrowserSessionActionLog: "browser_session_action_log",
SkyvernLog: "skyvern_log",
SkyvernLogRaw: "skyvern_log_raw",
Screenshot: "screenshot",
ScreenshotLlm: "screenshot_llm",
ScreenshotAction: "screenshot_action",
ScreenshotFinal: "screenshot_final",
+ ScreenshotProxy: "screenshot_proxy",
+ ScreenshotPreSubmit: "screenshot_pre_submit",
LlmPrompt: "llm_prompt",
LlmRequest: "llm_request",
LlmResponse: "llm_response",
@@ -26,6 +32,7 @@ export const ArtifactType = {
Html: "html",
HtmlScrape: "html_scrape",
HtmlAction: "html_action",
+ HtmlPreSubmit: "html_pre_submit",
Trace: "trace",
Har: "har",
ScriptFile: "script_file",
@@ -33,5 +40,6 @@ export const ArtifactType = {
StepArchive: "step_archive",
TaskArchive: "task_archive",
Download: "download",
+ Unknown: "unknown",
} as const;
export type ArtifactType = (typeof ArtifactType)[keyof typeof ArtifactType];
diff --git a/skyvern-ts/client/src/api/types/ClickContext.ts b/skyvern-ts/client/src/api/types/ClickContext.ts
index b8fbb35bc..aecf424fd 100644
--- a/skyvern-ts/client/src/api/types/ClickContext.ts
+++ b/skyvern-ts/client/src/api/types/ClickContext.ts
@@ -3,4 +3,5 @@
export interface ClickContext {
thought?: string;
single_option_click?: boolean;
+ desired_state?: boolean;
}
diff --git a/skyvern-ts/client/src/api/types/CodeBlock.ts b/skyvern-ts/client/src/api/types/CodeBlock.ts
index 3844358eb..ad16e2b72 100644
--- a/skyvern-ts/client/src/api/types/CodeBlock.ts
+++ b/skyvern-ts/client/src/api/types/CodeBlock.ts
@@ -17,4 +17,13 @@ export interface CodeBlock {
parameters?: Skyvern.CodeBlockParametersItem[];
prompt?: string;
steps?: Skyvern.CodeBlockStep[];
+ /** JSON schema of the object this block's return produces; keys match the return keys; null when the block returns nothing */
+ data_schema?: CodeBlock.DataSchema;
+}
+
+export namespace CodeBlock {
+ /**
+ * JSON schema of the object this block's return produces; keys match the return keys; null when the block returns nothing
+ */
+ export type DataSchema = Record<string, unknown> | unknown[] | string;
}
diff --git a/skyvern-ts/client/src/api/types/CodeBlockYaml.ts b/skyvern-ts/client/src/api/types/CodeBlockYaml.ts
index 13b59a536..c016e85ab 100644
--- a/skyvern-ts/client/src/api/types/CodeBlockYaml.ts
+++ b/skyvern-ts/client/src/api/types/CodeBlockYaml.ts
@@ -15,4 +15,13 @@ export interface CodeBlockYaml {
parameter_keys?: string[];
prompt?: string;
steps?: Skyvern.CodeBlockStepYaml[];
+ /** JSON schema of the object this block's return produces; keys match the return keys; null when the block returns nothing */
+ data_schema?: CodeBlockYaml.DataSchema;
+}
+
+export namespace CodeBlockYaml {
+ /**
+ * JSON schema of the object this block's return produces; keys match the return keys; null when the block returns nothing
+ */
+ export type DataSchema = Record<string, unknown> | unknown[] | string;
}
diff --git a/skyvern-ts/client/src/api/types/CreateCredentialRequest.ts b/skyvern-ts/client/src/api/types/CreateCredentialRequest.ts
index b0a34d9ab..8fa78b127 100644
--- a/skyvern-ts/client/src/api/types/CreateCredentialRequest.ts
+++ b/skyvern-ts/client/src/api/types/CreateCredentialRequest.ts
@@ -20,6 +20,8 @@ export interface CreateCredentialRequest {
proxy_session_id?: string;
/** Rotate the Skyvern-managed proxy sticky-session id when updating this credential. */
rotate_proxy_session_id?: boolean;
+ /** Login page URL used during the credential test */
+ tested_url?: string;
}
export namespace CreateCredentialRequest {
diff --git a/skyvern-ts/client/src/api/types/GetRunResponse.ts b/skyvern-ts/client/src/api/types/GetRunResponse.ts
index 44a715588..95a662a24 100644
--- a/skyvern-ts/client/src/api/types/GetRunResponse.ts
+++ b/skyvern-ts/client/src/api/types/GetRunResponse.ts
@@ -9,6 +9,7 @@ export type GetRunResponse =
| Skyvern.GetRunResponse.AnthropicCua
| Skyvern.GetRunResponse.UiTars
| Skyvern.GetRunResponse.YutoriNavigator
+ | Skyvern.GetRunResponse.TaskV3
| Skyvern.GetRunResponse.WorkflowRun;
export namespace GetRunResponse {
@@ -36,6 +37,10 @@ export namespace GetRunResponse {
run_type: "yutori_navigator";
}
+ export interface TaskV3 extends Skyvern.TaskRunResponse {
+ run_type: "task_v3";
+ }
+
export interface WorkflowRun extends Skyvern.WorkflowRunResponse {
run_type: "workflow_run";
}
diff --git a/skyvern-ts/client/src/api/types/HumanInteractionBlockYaml.ts b/skyvern-ts/client/src/api/types/HumanInteractionBlockYaml.ts
index 59f7ede92..e25bb7062 100644
--- a/skyvern-ts/client/src/api/types/HumanInteractionBlockYaml.ts
+++ b/skyvern-ts/client/src/api/types/HumanInteractionBlockYaml.ts
@@ -12,9 +12,9 @@ export interface HumanInteractionBlockYaml {
instructions?: string;
positive_descriptor?: string;
negative_descriptor?: string;
- timeout_seconds: number;
- sender: string;
+ timeout_seconds?: number;
+ sender?: string;
recipients: string[];
- subject: string;
- body: string;
+ subject?: string;
+ body?: string;
}
diff --git a/skyvern-ts/client/src/api/types/OneTimeDispatchStatus.ts b/skyvern-ts/client/src/api/types/OneTimeDispatchStatus.ts
new file mode 100644
index 000000000..c676b2daf
--- /dev/null
+++ b/skyvern-ts/client/src/api/types/OneTimeDispatchStatus.ts
@@ -0,0 +1,9 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export const OneTimeDispatchStatus = {
+ Pending: "pending",
+ Fired: "fired",
+ Canceled: "canceled",
+ Failed: "failed",
+} as const;
+export type OneTimeDispatchStatus = (typeof OneTimeDispatchStatus)[keyof typeof OneTimeDispatchStatus];
diff --git a/skyvern-ts/client/src/api/types/OrganizationScheduleItem.ts b/skyvern-ts/client/src/api/types/OrganizationScheduleItem.ts
index 958ddc874..8c9bc15ce 100644
--- a/skyvern-ts/client/src/api/types/OrganizationScheduleItem.ts
+++ b/skyvern-ts/client/src/api/types/OrganizationScheduleItem.ts
@@ -1,5 +1,7 @@
// This file was auto-generated by Fern from our API Definition.
+import type * as Skyvern from "../index.js";
+
/**
* Compact schedule projection for the org-wide list endpoint.
*
@@ -13,7 +15,12 @@ export interface OrganizationScheduleItem {
organization_id: string;
workflow_permanent_id: string;
workflow_title: string;
- cron_expression: string;
+ cron_expression?: string;
+ interval_seconds?: number;
+ first_fire_at?: string;
+ run_at?: string;
+ dispatch_status?: Skyvern.OneTimeDispatchStatus;
+ workflow_run_id?: string;
timezone: string;
enabled: boolean;
parameters?: Record<string, unknown>;
diff --git a/skyvern-ts/client/src/api/types/RunEngine.ts b/skyvern-ts/client/src/api/types/RunEngine.ts
index 1fe4d1385..db852dea5 100644
--- a/skyvern-ts/client/src/api/types/RunEngine.ts
+++ b/skyvern-ts/client/src/api/types/RunEngine.ts
@@ -3,6 +3,7 @@
export const RunEngine = {
Skyvern10: "skyvern-1.0",
Skyvern20: "skyvern-2.0",
+ Skyvern30: "skyvern-3.0",
OpenaiCua: "openai-cua",
AnthropicCua: "anthropic-cua",
UiTars: "ui-tars",
diff --git a/skyvern-ts/client/src/api/types/RunStatus.ts b/skyvern-ts/client/src/api/types/RunStatus.ts
index 3f7d5d0e7..27909185e 100644
--- a/skyvern-ts/client/src/api/types/RunStatus.ts
+++ b/skyvern-ts/client/src/api/types/RunStatus.ts
@@ -4,6 +4,7 @@ export const RunStatus = {
Created: "created",
Queued: "queued",
Running: "running",
+ Paused: "paused",
TimedOut: "timed_out",
Failed: "failed",
Terminated: "terminated",
diff --git a/skyvern-ts/client/src/api/types/RunType.ts b/skyvern-ts/client/src/api/types/RunType.ts
index e54f14aad..e42fa6a90 100644
--- a/skyvern-ts/client/src/api/types/RunType.ts
+++ b/skyvern-ts/client/src/api/types/RunType.ts
@@ -3,6 +3,7 @@
export const RunType = {
TaskV1: "task_v1",
TaskV2: "task_v2",
+ TaskV3: "task_v3",
WorkflowRun: "workflow_run",
OpenaiCua: "openai_cua",
AnthropicCua: "anthropic_cua",
diff --git a/skyvern-ts/client/src/api/types/SendEmailBlock.ts b/skyvern-ts/client/src/api/types/SendEmailBlock.ts
index 0a58b243d..91819249b 100644
--- a/skyvern-ts/client/src/api/types/SendEmailBlock.ts
+++ b/skyvern-ts/client/src/api/types/SendEmailBlock.ts
@@ -22,4 +22,8 @@ export interface SendEmailBlock {
subject: string;
body: string;
file_attachments?: string[];
+ custom_smtp_host?: string;
+ custom_smtp_port?: number;
+ custom_smtp_username?: string;
+ custom_smtp_password?: string;
}
diff --git a/skyvern-ts/client/src/api/types/SendEmailBlockYaml.ts b/skyvern-ts/client/src/api/types/SendEmailBlockYaml.ts
index 8341c856d..e089a11ee 100644
--- a/skyvern-ts/client/src/api/types/SendEmailBlockYaml.ts
+++ b/skyvern-ts/client/src/api/types/SendEmailBlockYaml.ts
@@ -9,10 +9,14 @@ export interface SendEmailBlockYaml {
model?: Record<string, unknown>;
ignore_workflow_system_prompt?: boolean;
next_loop_on_failure?: boolean;
- smtp_host_secret_parameter_key: string;
- smtp_port_secret_parameter_key: string;
- smtp_username_secret_parameter_key: string;
- smtp_password_secret_parameter_key: string;
+ smtp_host_secret_parameter_key?: string;
+ smtp_port_secret_parameter_key?: string;
+ smtp_username_secret_parameter_key?: string;
+ smtp_password_secret_parameter_key?: string;
+ custom_smtp_host?: string;
+ custom_smtp_port?: number;
+ custom_smtp_username?: string;
+ custom_smtp_password?: string;
sender: string;
recipients: string[];
subject: string;
diff --git a/skyvern-ts/client/src/api/types/TotpCode.ts b/skyvern-ts/client/src/api/types/TotpCode.ts
index 7501db33c..809c64f34 100644
--- a/skyvern-ts/client/src/api/types/TotpCode.ts
+++ b/skyvern-ts/client/src/api/types/TotpCode.ts
@@ -17,7 +17,7 @@ export interface TotpCode {
content: string;
/** The timestamp when the TOTP code expires */
expired_at?: string;
- /** Optional. If provided, forces extraction of this specific OTP type (totp or magic_link). Use this when the content contains multiple OTP types and you want to specify which one to extract. */
+ /** Deprecated compatibility field. Skyvern auto-detects the OTP type from content, so this value does not constrain extraction. */
type?: Skyvern.OtpType;
/** The skyvern ID of the TOTP code. */
totp_code_id: string;
diff --git a/skyvern-ts/client/src/api/types/TotpType.ts b/skyvern-ts/client/src/api/types/TotpType.ts
index 4d5ed3c18..9d494f4de 100644
--- a/skyvern-ts/client/src/api/types/TotpType.ts
+++ b/skyvern-ts/client/src/api/types/TotpType.ts
@@ -5,6 +5,7 @@ export const TotpType = {
Authenticator: "authenticator",
Email: "email",
Text: "text",
+ Passkey: "passkey",
None: "none",
} as const;
export type TotpType = (typeof TotpType)[keyof typeof TotpType];
diff --git a/skyvern-ts/client/src/api/types/WorkflowSchedule.ts b/skyvern-ts/client/src/api/types/WorkflowSchedule.ts
index 7f1beda0e..014aa3318 100644
--- a/skyvern-ts/client/src/api/types/WorkflowSchedule.ts
+++ b/skyvern-ts/client/src/api/types/WorkflowSchedule.ts
@@ -1,10 +1,17 @@
// This file was auto-generated by Fern from our API Definition.
+import type * as Skyvern from "../index.js";
+
export interface WorkflowSchedule {
workflow_schedule_id: string;
organization_id: string;
workflow_permanent_id: string;
- cron_expression: string;
+ cron_expression?: string;
+ interval_seconds?: number;
+ first_fire_at?: string;
+ run_at?: string;
+ dispatch_status?: Skyvern.OneTimeDispatchStatus;
+ workflow_run_id?: string;
timezone: string;
enabled: boolean;
parameters?: Record<string, unknown>;
diff --git a/skyvern-ts/client/src/api/types/WorkflowScheduleUpsertRequest.ts b/skyvern-ts/client/src/api/types/WorkflowScheduleUpsertRequest.ts
index c2081ac6a..4f78acdb6 100644
--- a/skyvern-ts/client/src/api/types/WorkflowScheduleUpsertRequest.ts
+++ b/skyvern-ts/client/src/api/types/WorkflowScheduleUpsertRequest.ts
@@ -1,7 +1,13 @@
// This file was auto-generated by Fern from our API Definition.
export interface WorkflowScheduleUpsertRequest {
- cron_expression: string;
+ cron_expression?: string;
+ /** Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression. */
+ interval_seconds?: number;
+ /** 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. */
+ first_fire_at?: string;
+ /** 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. */
+ run_at?: string;
timezone: string;
enabled?: boolean;
parameters?: Record<string, unknown>;
diff --git a/skyvern-ts/client/src/api/types/index.ts b/skyvern-ts/client/src/api/types/index.ts
index 1af1bb314..f6b463602 100644
--- a/skyvern-ts/client/src/api/types/index.ts
+++ b/skyvern-ts/client/src/api/types/index.ts
@@ -112,6 +112,7 @@ export * from "./NonEmptyCreditCardCredential.js";
export * from "./NonEmptyPasswordCredential.js";
export * from "./OnePasswordCredentialParameter.js";
export * from "./OnePasswordCredentialParameterYaml.js";
+export * from "./OneTimeDispatchStatus.js";
export * from "./OrganizationScheduleItem.js";
export * from "./OrganizationScheduleListResponse.js";
export * from "./OtpType.js";
diff --git a/skyvern-ts/client/src/version.ts b/skyvern-ts/client/src/version.ts
index 6836c5fc2..3ed2ed5fe 100644
--- a/skyvern-ts/client/src/version.ts
+++ b/skyvern-ts/client/src/version.ts
@@ -1 +1 @@
-export const SDK_VERSION = "1.0.47";
+export const SDK_VERSION = "1.0.55";
diff --git a/skyvern-ts/client/tests/wire/main.test.ts b/skyvern-ts/client/tests/wire/main.test.ts
index 53e3f8ec6..ef20b645b 100644
--- a/skyvern-ts/client/tests/wire/main.test.ts
+++ b/skyvern-ts/client/tests/wire/main.test.ts
@@ -3681,6 +3681,190 @@ describe("SkyvernClient", () => {
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
+ test("extend_browser_session (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { additional_minutes: 1 };
+ const rawResponseBody = {
+ browser_session_id: "pbs_123456",
+ organization_id: "organization_id",
+ status: "status",
+ runnable_type: "runnable_type",
+ runnable_id: "runnable_id",
+ timeout: 1,
+ browser_address: "browser_address",
+ app_url: "app_url",
+ extensions: ["ad-blocker"],
+ browser_type: "msedge",
+ browser_profile_id: "browser_profile_id",
+ generate_browser_profile: true,
+ vnc_streaming_supported: true,
+ download_path: "download_path",
+ downloaded_files: [
+ {
+ url: "url",
+ checksum: "checksum",
+ filename: "filename",
+ file_size: 1,
+ modified_at: "2024-01-15T09:30:00Z",
+ artifact_id: "artifact_id",
+ },
+ ],
+ recordings: [
+ {
+ url: "url",
+ checksum: "checksum",
+ filename: "filename",
+ file_size: 1,
+ modified_at: "2024-01-15T09:30:00Z",
+ artifact_id: "artifact_id",
+ },
+ ],
+ started_at: "2024-01-15T09:30:00Z",
+ completed_at: "2024-01-15T09:30:00Z",
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ deleted_at: "2024-01-15T09:30:00Z",
+ };
+ server
+ .mockEndpoint()
+ .post("/v1/browser_sessions/pbs_123456/extend")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.extendBrowserSession("pbs_123456", {
+ additional_minutes: 1,
+ });
+ expect(response).toEqual({
+ browser_session_id: "pbs_123456",
+ organization_id: "organization_id",
+ status: "status",
+ runnable_type: "runnable_type",
+ runnable_id: "runnable_id",
+ timeout: 1,
+ browser_address: "browser_address",
+ app_url: "app_url",
+ extensions: ["ad-blocker"],
+ browser_type: "msedge",
+ browser_profile_id: "browser_profile_id",
+ generate_browser_profile: true,
+ vnc_streaming_supported: true,
+ download_path: "download_path",
+ downloaded_files: [
+ {
+ url: "url",
+ checksum: "checksum",
+ filename: "filename",
+ file_size: 1,
+ modified_at: "2024-01-15T09:30:00Z",
+ artifact_id: "artifact_id",
+ },
+ ],
+ recordings: [
+ {
+ url: "url",
+ checksum: "checksum",
+ filename: "filename",
+ file_size: 1,
+ modified_at: "2024-01-15T09:30:00Z",
+ artifact_id: "artifact_id",
+ },
+ ],
+ started_at: "2024-01-15T09:30:00Z",
+ completed_at: "2024-01-15T09:30:00Z",
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ deleted_at: "2024-01-15T09:30:00Z",
+ });
+ });
+
+ test("extend_browser_session (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { additional_minutes: 1 };
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/v1/browser_sessions/browser_session_id/extend")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(403)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.extendBrowserSession("browser_session_id", {
+ additional_minutes: 1,
+ });
+ }).rejects.toThrow(Skyvern.ForbiddenError);
+ });
+
+ test("extend_browser_session (3)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { additional_minutes: 1 };
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/v1/browser_sessions/browser_session_id/extend")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(404)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.extendBrowserSession("browser_session_id", {
+ additional_minutes: 1,
+ });
+ }).rejects.toThrow(Skyvern.NotFoundError);
+ });
+
+ test("extend_browser_session (4)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { additional_minutes: 1 };
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/v1/browser_sessions/browser_session_id/extend")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(409)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.extendBrowserSession("browser_session_id", {
+ additional_minutes: 1,
+ });
+ }).rejects.toThrow(Skyvern.ConflictError);
+ });
+
+ test("extend_browser_session (5)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+ const rawRequestBody = { additional_minutes: 1 };
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/v1/browser_sessions/browser_session_id/extend")
+ .jsonBody(rawRequestBody)
+ .respondWith()
+ .statusCode(422)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.extendBrowserSession("browser_session_id", {
+ additional_minutes: 1,
+ });
+ }).rejects.toThrow(Skyvern.UnprocessableEntityError);
+ });
+
test("get_browser_session (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
diff --git a/skyvern-ts/client/tests/wire/schedules.test.ts b/skyvern-ts/client/tests/wire/schedules.test.ts
index b295b43ce..a5998c2ce 100644
--- a/skyvern-ts/client/tests/wire/schedules.test.ts
+++ b/skyvern-ts/client/tests/wire/schedules.test.ts
@@ -17,6 +17,11 @@ describe("Schedules", () => {
workflow_permanent_id: "workflow_permanent_id",
workflow_title: "workflow_title",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
@@ -47,6 +52,11 @@ describe("Schedules", () => {
workflow_permanent_id: "workflow_permanent_id",
workflow_title: "workflow_title",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: {
@@ -88,6 +98,11 @@ describe("Schedules", () => {
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
@@ -116,6 +131,11 @@ describe("Schedules", () => {
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: {
@@ -153,13 +173,18 @@ describe("Schedules", () => {
test("create (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
- const rawRequestBody = { cron_expression: "cron_expression", timezone: "timezone" };
+ const rawRequestBody = { timezone: "timezone" };
const rawResponseBody = {
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
@@ -182,7 +207,6 @@ describe("Schedules", () => {
.build();
const response = await client.schedules.create("workflow_permanent_id", {
- cron_expression: "cron_expression",
timezone: "timezone",
});
expect(response).toEqual({
@@ -191,6 +215,11 @@ describe("Schedules", () => {
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: {
@@ -210,7 +239,7 @@ describe("Schedules", () => {
test("create (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
- const rawRequestBody = { cron_expression: "cron_expression", timezone: "timezone" };
+ const rawRequestBody = { timezone: "timezone" };
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
@@ -223,7 +252,6 @@ describe("Schedules", () => {
await expect(async () => {
return await client.schedules.create("workflow_permanent_id", {
- cron_expression: "cron_expression",
timezone: "timezone",
});
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
@@ -239,6 +267,11 @@ describe("Schedules", () => {
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
@@ -266,6 +299,11 @@ describe("Schedules", () => {
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: {
@@ -303,13 +341,18 @@ describe("Schedules", () => {
test("update (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
- const rawRequestBody = { cron_expression: "cron_expression", timezone: "timezone" };
+ const rawRequestBody = { timezone: "timezone" };
const rawResponseBody = {
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
@@ -332,7 +375,6 @@ describe("Schedules", () => {
.build();
const response = await client.schedules.update("workflow_permanent_id", "workflow_schedule_id", {
- cron_expression: "cron_expression",
timezone: "timezone",
});
expect(response).toEqual({
@@ -341,6 +383,11 @@ describe("Schedules", () => {
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: {
@@ -360,7 +407,7 @@ describe("Schedules", () => {
test("update (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
- const rawRequestBody = { cron_expression: "cron_expression", timezone: "timezone" };
+ const rawRequestBody = { timezone: "timezone" };
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
@@ -373,7 +420,6 @@ describe("Schedules", () => {
await expect(async () => {
return await client.schedules.update("workflow_permanent_id", "workflow_schedule_id", {
- cron_expression: "cron_expression",
timezone: "timezone",
});
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
@@ -426,6 +472,11 @@ describe("Schedules", () => {
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
@@ -453,6 +504,11 @@ describe("Schedules", () => {
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: {
@@ -497,6 +553,11 @@ describe("Schedules", () => {
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
@@ -524,6 +585,11 @@ describe("Schedules", () => {
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
timezone: "timezone",
enabled: true,
parameters: {
@@ -557,4 +623,85 @@ describe("Schedules", () => {
return await client.schedules.disable("workflow_permanent_id", "workflow_schedule_id");
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
+
+ test("cancel (1)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = {
+ schedule: {
+ workflow_schedule_id: "workflow_schedule_id",
+ organization_id: "organization_id",
+ workflow_permanent_id: "workflow_permanent_id",
+ cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
+ timezone: "timezone",
+ enabled: true,
+ parameters: { key: "value" },
+ temporal_schedule_id: "temporal_schedule_id",
+ name: "name",
+ description: "description",
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ deleted_at: "2024-01-15T09:30:00Z",
+ },
+ next_runs: ["2024-01-15T09:30:00Z"],
+ };
+ server
+ .mockEndpoint()
+ .post("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id/cancel")
+ .respondWith()
+ .statusCode(200)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ const response = await client.schedules.cancel("workflow_permanent_id", "workflow_schedule_id");
+ expect(response).toEqual({
+ schedule: {
+ workflow_schedule_id: "workflow_schedule_id",
+ organization_id: "organization_id",
+ workflow_permanent_id: "workflow_permanent_id",
+ cron_expression: "cron_expression",
+ interval_seconds: 1,
+ first_fire_at: "2024-01-15T09:30:00Z",
+ run_at: "2024-01-15T09:30:00Z",
+ dispatch_status: "pending",
+ workflow_run_id: "workflow_run_id",
+ timezone: "timezone",
+ enabled: true,
+ parameters: {
+ key: "value",
+ },
+ temporal_schedule_id: "temporal_schedule_id",
+ name: "name",
+ description: "description",
+ created_at: "2024-01-15T09:30:00Z",
+ modified_at: "2024-01-15T09:30:00Z",
+ deleted_at: "2024-01-15T09:30:00Z",
+ },
+ next_runs: ["2024-01-15T09:30:00Z"],
+ });
+ });
+
+ test("cancel (2)", async () => {
+ const server = mockServerPool.createServer();
+ const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
+
+ const rawResponseBody = { key: "value" };
+ server
+ .mockEndpoint()
+ .post("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id/cancel")
+ .respondWith()
+ .statusCode(422)
+ .jsonBody(rawResponseBody)
+ .build();
+
+ await expect(async () => {
+ return await client.schedules.cancel("workflow_permanent_id", "workflow_schedule_id");
+ }).rejects.toThrow(Skyvern.UnprocessableEntityError);
+ });
});
diff --git a/skyvern/client/__init__.py b/skyvern/client/__init__.py
index 2a372965a..3cb516907 100644
--- a/skyvern/client/__init__.py
+++ b/skyvern/client/__init__.py
@@ -774,7 +774,7 @@ if typing.TYPE_CHECKING:
RangeNotSatisfiableError,
UnprocessableEntityError,
)
- from . import agents, schedules, scripts
+ from . import agents, artifacts, schedules, scripts
from .client import AsyncSkyvern, Skyvern
from .environment import SkyvernEnvironment
from .schedules import SchedulesListAllRequestStatus
@@ -1550,6 +1550,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowTriggerBlockYaml": ".types",
"__version__": ".version",
"agents": ".agents",
+ "artifacts": ".artifacts",
"schedules": ".schedules",
"scripts": ".scripts",
}
@@ -2347,6 +2348,7 @@ __all__ = [
"WorkflowTriggerBlockYaml",
"__version__",
"agents",
+ "artifacts",
"schedules",
"scripts",
]
diff --git a/skyvern/client/artifacts/__init__.py b/skyvern/client/artifacts/__init__.py
new file mode 100644
index 000000000..5cde0202d
--- /dev/null
+++ b/skyvern/client/artifacts/__init__.py
@@ -0,0 +1,4 @@
+# This file was auto-generated by Fern from our API Definition.
+
+# isort: skip_file
+
diff --git a/skyvern/client/artifacts/client.py b/skyvern/client/artifacts/client.py
new file mode 100644
index 000000000..b4f47a70a
--- /dev/null
+++ b/skyvern/client/artifacts/client.py
@@ -0,0 +1,111 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.request_options import RequestOptions
+from .raw_client import AsyncRawArtifactsClient, RawArtifactsClient
+
+
+class ArtifactsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._raw_client = RawArtifactsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> RawArtifactsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ RawArtifactsClient
+ """
+ return self._raw_client
+
+ def get_artifact_content(
+ self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> typing.Optional[typing.Any]:
+ """
+ Download the raw content of an artifact (supports bundled artifacts).
+
+ Parameters
+ ----------
+ artifact_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.Optional[typing.Any]
+ Raw artifact content
+
+ Examples
+ --------
+ from skyvern import Skyvern
+
+ client = Skyvern(
+ api_key="YOUR_API_KEY",
+ )
+ client.artifacts.get_artifact_content(
+ artifact_id="artifact_id",
+ )
+ """
+ _response = self._raw_client.get_artifact_content(artifact_id, request_options=request_options)
+ return _response.data
+
+
+class AsyncArtifactsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._raw_client = AsyncRawArtifactsClient(client_wrapper=client_wrapper)
+
+ @property
+ def with_raw_response(self) -> AsyncRawArtifactsClient:
+ """
+ Retrieves a raw implementation of this client that returns raw responses.
+
+ Returns
+ -------
+ AsyncRawArtifactsClient
+ """
+ return self._raw_client
+
+ async def get_artifact_content(
+ self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> typing.Optional[typing.Any]:
+ """
+ Download the raw content of an artifact (supports bundled artifacts).
+
+ Parameters
+ ----------
+ artifact_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ typing.Optional[typing.Any]
+ Raw artifact content
+
+ Examples
+ --------
+ import asyncio
+
+ from skyvern import AsyncSkyvern
+
+ client = AsyncSkyvern(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.artifacts.get_artifact_content(
+ artifact_id="artifact_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_artifact_content(artifact_id, request_options=request_options)
+ return _response.data
diff --git a/skyvern/client/artifacts/raw_client.py b/skyvern/client/artifacts/raw_client.py
new file mode 100644
index 000000000..efc9c2c1a
--- /dev/null
+++ b/skyvern/client/artifacts/raw_client.py
@@ -0,0 +1,193 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+from json.decoder import JSONDecodeError
+
+from ..core.api_error import ApiError
+from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
+from ..core.http_response import AsyncHttpResponse, HttpResponse
+from ..core.jsonable_encoder import jsonable_encoder
+from ..core.pydantic_utilities import parse_obj_as
+from ..core.request_options import RequestOptions
+from ..errors.forbidden_error import ForbiddenError
+from ..errors.not_found_error import NotFoundError
+from ..errors.range_not_satisfiable_error import RangeNotSatisfiableError
+from ..errors.unprocessable_entity_error import UnprocessableEntityError
+
+
+class RawArtifactsClient:
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ def get_artifact_content(
+ self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[typing.Optional[typing.Any]]:
+ """
+ Download the raw content of an artifact (supports bundled artifacts).
+
+ Parameters
+ ----------
+ artifact_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[typing.Optional[typing.Any]]
+ Raw artifact content
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"v1/artifacts/{jsonable_encoder(artifact_id)}/content",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if _response is None or not _response.text.strip():
+ return HttpResponse(response=_response, data=None)
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 416:
+ raise RangeNotSatisfiableError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
+
+
+class AsyncRawArtifactsClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def get_artifact_content(
+ self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
+ """
+ Download the raw content of an artifact (supports bundled artifacts).
+
+ Parameters
+ ----------
+ artifact_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[typing.Optional[typing.Any]]
+ Raw artifact content
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"v1/artifacts/{jsonable_encoder(artifact_id)}/content",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if _response is None or not _response.text.strip():
+ return AsyncHttpResponse(response=_response, data=None)
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 416:
+ raise RangeNotSatisfiableError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 422:
+ raise UnprocessableEntityError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
diff --git a/skyvern/client/client.py b/skyvern/client/client.py
index cec1bf2d2..360cba0f8 100644
--- a/skyvern/client/client.py
+++ b/skyvern/client/client.py
@@ -74,6 +74,7 @@ from .types.workflow_tags_batch_response import WorkflowTagsBatchResponse
if typing.TYPE_CHECKING:
from .agents.client import AgentsClient, AsyncAgentsClient
+ from .artifacts.client import ArtifactsClient, AsyncArtifactsClient
from .schedules.client import AsyncSchedulesClient, SchedulesClient
from .scripts.client import AsyncScriptsClient, ScriptsClient
# this is used as the default value for optional parameters
@@ -146,6 +147,7 @@ class Skyvern:
timeout=_defaulted_timeout,
)
self._raw_client = RawSkyvern(client_wrapper=self._client_wrapper)
+ self._artifacts: typing.Optional[ArtifactsClient] = None
self._scripts: typing.Optional[ScriptsClient] = None
self._schedules: typing.Optional[SchedulesClient] = None
self._agents: typing.Optional[AgentsClient] = None
@@ -2269,24 +2271,31 @@ class Skyvern:
_response = self._raw_client.close_browser_session(browser_session_id, request_options=request_options)
return _response.data
- def get_browser_session(
- self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ def extend_browser_session(
+ self,
+ browser_session_id: str,
+ *,
+ additional_minutes: int,
+ request_options: typing.Optional[RequestOptions] = None,
) -> BrowserSessionResponse:
"""
- Get details about a specific browser session, including the browser address for cdp connection.
+ 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.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
+ additional_minutes : int
+ 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.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserSessionResponse
- Successfully retrieved browser session details
+ Successfully extended browser session
Examples
--------
@@ -2295,38 +2304,34 @@ class Skyvern:
client = Skyvern(
api_key="YOUR_API_KEY",
)
- client.get_browser_session(
+ client.extend_browser_session(
browser_session_id="pbs_123456",
+ additional_minutes=1,
)
"""
- _response = self._raw_client.get_browser_session(browser_session_id, request_options=request_options)
+ _response = self._raw_client.extend_browser_session(
+ browser_session_id, additional_minutes=additional_minutes, request_options=request_options
+ )
return _response.data
- def update_browser_session(
- self,
- browser_session_id: str,
- *,
- generate_browser_profile: bool,
- request_options: typing.Optional[RequestOptions] = None,
+ def get_browser_session(
+ self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> BrowserSessionResponse:
"""
- Update a live browser session. Currently supports toggling generate_browser_profile, which is read when the session ends to decide whether to save its browser profile.
+ Get details about a specific browser session, including the browser address for cdp connection.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
- generate_browser_profile : bool
- Enable or disable saving this session's browser profile when it ends. Can be toggled while the session is still alive; the value is read at session teardown.
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserSessionResponse
- Successfully updated browser session
+ Successfully retrieved browser session details
Examples
--------
@@ -2335,33 +2340,30 @@ class Skyvern:
client = Skyvern(
api_key="YOUR_API_KEY",
)
- client.update_browser_session(
+ client.get_browser_session(
browser_session_id="pbs_123456",
- generate_browser_profile=True,
)
"""
- _response = self._raw_client.update_browser_session(
- browser_session_id, generate_browser_profile=generate_browser_profile, request_options=request_options
- )
+ _response = self._raw_client.get_browser_session(browser_session_id, request_options=request_options)
return _response.data
- def extend_browser_session(
+ def update_browser_session(
self,
browser_session_id: str,
*,
- additional_minutes: int,
+ generate_browser_profile: bool,
request_options: typing.Optional[RequestOptions] = None,
) -> BrowserSessionResponse:
"""
- 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). 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.
+ Update a live browser session. Currently supports toggling generate_browser_profile, which is read when the session ends to decide whether to save its browser profile.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
- additional_minutes : int
- Minutes to add to the session's timeout. 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.
+ generate_browser_profile : bool
+ Enable or disable saving this session's browser profile when it ends. Can be toggled while the session is still alive; the value is read at session teardown.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -2369,7 +2371,7 @@ class Skyvern:
Returns
-------
BrowserSessionResponse
- Successfully extended browser session
+ Successfully updated browser session
Examples
--------
@@ -2378,13 +2380,13 @@ class Skyvern:
client = Skyvern(
api_key="YOUR_API_KEY",
)
- client.extend_browser_session(
+ client.update_browser_session(
browser_session_id="pbs_123456",
- additional_minutes=30,
+ generate_browser_profile=True,
)
"""
- _response = self._raw_client.extend_browser_session(
- browser_session_id, additional_minutes=additional_minutes, request_options=request_options
+ _response = self._raw_client.update_browser_session(
+ browser_session_id, generate_browser_profile=generate_browser_profile, request_options=request_options
)
return _response.data
@@ -3913,6 +3915,14 @@ class Skyvern:
)
return _response.data
+ @property
+ def artifacts(self):
+ if self._artifacts is None:
+ from .artifacts.client import ArtifactsClient # noqa: E402
+
+ self._artifacts = ArtifactsClient(client_wrapper=self._client_wrapper)
+ return self._artifacts
+
@property
def scripts(self):
if self._scripts is None:
@@ -4004,6 +4014,7 @@ class AsyncSkyvern:
timeout=_defaulted_timeout,
)
self._raw_client = AsyncRawSkyvern(client_wrapper=self._client_wrapper)
+ self._artifacts: typing.Optional[AsyncArtifactsClient] = None
self._scripts: typing.Optional[AsyncScriptsClient] = None
self._schedules: typing.Optional[AsyncSchedulesClient] = None
self._agents: typing.Optional[AsyncAgentsClient] = None
@@ -6474,24 +6485,31 @@ class AsyncSkyvern:
_response = await self._raw_client.close_browser_session(browser_session_id, request_options=request_options)
return _response.data
- async def get_browser_session(
- self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ async def extend_browser_session(
+ self,
+ browser_session_id: str,
+ *,
+ additional_minutes: int,
+ request_options: typing.Optional[RequestOptions] = None,
) -> BrowserSessionResponse:
"""
- Get details about a specific browser session, including the browser address for cdp connection.
+ 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.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
+ additional_minutes : int
+ 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.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserSessionResponse
- Successfully retrieved browser session details
+ Successfully extended browser session
Examples
--------
@@ -6505,41 +6523,37 @@ class AsyncSkyvern:
async def main() -> None:
- await client.get_browser_session(
+ await client.extend_browser_session(
browser_session_id="pbs_123456",
+ additional_minutes=1,
)
asyncio.run(main())
"""
- _response = await self._raw_client.get_browser_session(browser_session_id, request_options=request_options)
+ _response = await self._raw_client.extend_browser_session(
+ browser_session_id, additional_minutes=additional_minutes, request_options=request_options
+ )
return _response.data
- async def update_browser_session(
- self,
- browser_session_id: str,
- *,
- generate_browser_profile: bool,
- request_options: typing.Optional[RequestOptions] = None,
+ async def get_browser_session(
+ self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> BrowserSessionResponse:
"""
- Update a live browser session. Currently supports toggling generate_browser_profile, which is read when the session ends to decide whether to save its browser profile.
+ Get details about a specific browser session, including the browser address for cdp connection.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
- generate_browser_profile : bool
- Enable or disable saving this session's browser profile when it ends. Can be toggled while the session is still alive; the value is read at session teardown.
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserSessionResponse
- Successfully updated browser session
+ Successfully retrieved browser session details
Examples
--------
@@ -6553,36 +6567,33 @@ class AsyncSkyvern:
async def main() -> None:
- await client.update_browser_session(
+ await client.get_browser_session(
browser_session_id="pbs_123456",
- generate_browser_profile=True,
)
asyncio.run(main())
"""
- _response = await self._raw_client.update_browser_session(
- browser_session_id, generate_browser_profile=generate_browser_profile, request_options=request_options
- )
+ _response = await self._raw_client.get_browser_session(browser_session_id, request_options=request_options)
return _response.data
- async def extend_browser_session(
+ async def update_browser_session(
self,
browser_session_id: str,
*,
- additional_minutes: int,
+ generate_browser_profile: bool,
request_options: typing.Optional[RequestOptions] = None,
) -> BrowserSessionResponse:
"""
- 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). 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.
+ Update a live browser session. Currently supports toggling generate_browser_profile, which is read when the session ends to decide whether to save its browser profile.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
- additional_minutes : int
- Minutes to add to the session's timeout. 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.
+ generate_browser_profile : bool
+ Enable or disable saving this session's browser profile when it ends. Can be toggled while the session is still alive; the value is read at session teardown.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -6590,7 +6601,7 @@ class AsyncSkyvern:
Returns
-------
BrowserSessionResponse
- Successfully extended browser session
+ Successfully updated browser session
Examples
--------
@@ -6604,16 +6615,16 @@ class AsyncSkyvern:
async def main() -> None:
- await client.extend_browser_session(
+ await client.update_browser_session(
browser_session_id="pbs_123456",
- additional_minutes=30,
+ generate_browser_profile=True,
)
asyncio.run(main())
"""
- _response = await self._raw_client.extend_browser_session(
- browser_session_id, additional_minutes=additional_minutes, request_options=request_options
+ _response = await self._raw_client.update_browser_session(
+ browser_session_id, generate_browser_profile=generate_browser_profile, request_options=request_options
)
return _response.data
@@ -8364,6 +8375,14 @@ class AsyncSkyvern:
)
return _response.data
+ @property
+ def artifacts(self):
+ if self._artifacts is None:
+ from .artifacts.client import AsyncArtifactsClient # noqa: E402
+
+ self._artifacts = AsyncArtifactsClient(client_wrapper=self._client_wrapper)
+ return self._artifacts
+
@property
def scripts(self):
if self._scripts is None:
diff --git a/skyvern/client/core/client_wrapper.py b/skyvern/client/core/client_wrapper.py
index 7c02341d1..0f2483dc8 100644
--- a/skyvern/client/core/client_wrapper.py
+++ b/skyvern/client/core/client_wrapper.py
@@ -22,10 +22,10 @@ class BaseClientWrapper:
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "skyvern/1.0.47",
+ "User-Agent": "skyvern/1.0.55",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "skyvern",
- "X-Fern-SDK-Version": "1.0.47",
+ "X-Fern-SDK-Version": "1.0.55",
**(self.get_custom_headers() or {}),
}
if self._api_key is not None:
diff --git a/skyvern/client/raw_client.py b/skyvern/client/raw_client.py
index 494cbd3a2..4a37da716 100644
--- a/skyvern/client/raw_client.py
+++ b/skyvern/client/raw_client.py
@@ -3417,29 +3417,43 @@ class RawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def get_browser_session(
- self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ def extend_browser_session(
+ self,
+ browser_session_id: str,
+ *,
+ additional_minutes: int,
+ request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BrowserSessionResponse]:
"""
- Get details about a specific browser session, including the browser address for cdp connection.
+ 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.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
+ additional_minutes : int
+ 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.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[BrowserSessionResponse]
- Successfully retrieved browser session details
+ Successfully extended browser session
"""
_response = self._client_wrapper.httpx_client.request(
- f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}",
- method="GET",
+ f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}/extend",
+ method="POST",
+ json={
+ "additional_minutes": additional_minutes,
+ },
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
@@ -3473,6 +3487,17 @@ class RawSkyvern:
),
),
)
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -3489,43 +3514,29 @@ class RawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def update_browser_session(
- self,
- browser_session_id: str,
- *,
- generate_browser_profile: bool,
- request_options: typing.Optional[RequestOptions] = None,
+ def get_browser_session(
+ self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[BrowserSessionResponse]:
"""
- Update a live browser session. Currently supports toggling generate_browser_profile, which is read when the session ends to decide whether to save its browser profile.
+ Get details about a specific browser session, including the browser address for cdp connection.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
- generate_browser_profile : bool
- Enable or disable saving this session's browser profile when it ends. Can be toggled while the session is still alive; the value is read at session teardown.
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[BrowserSessionResponse]
- Successfully updated browser session
+ Successfully retrieved browser session details
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}",
- method="PATCH",
- json={
- "generate_browser_profile": generate_browser_profile,
- },
- headers={
- "content-type": "application/json",
- },
+ method="GET",
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
@@ -3559,17 +3570,6 @@ class RawSkyvern:
),
),
)
- if _response.status_code == 409:
- raise ConflictError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -3586,23 +3586,23 @@ class RawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- def extend_browser_session(
+ def update_browser_session(
self,
browser_session_id: str,
*,
- additional_minutes: int,
+ generate_browser_profile: bool,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BrowserSessionResponse]:
"""
- 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). 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.
+ Update a live browser session. Currently supports toggling generate_browser_profile, which is read when the session ends to decide whether to save its browser profile.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
- additional_minutes : int
- Minutes to add to the session's timeout. 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.
+ generate_browser_profile : bool
+ Enable or disable saving this session's browser profile when it ends. Can be toggled while the session is still alive; the value is read at session teardown.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -3610,13 +3610,13 @@ class RawSkyvern:
Returns
-------
HttpResponse[BrowserSessionResponse]
- Successfully extended browser session
+ Successfully updated browser session
"""
_response = self._client_wrapper.httpx_client.request(
- f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}/extend",
- method="POST",
+ f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}",
+ method="PATCH",
json={
- "additional_minutes": additional_minutes,
+ "generate_browser_profile": generate_browser_profile,
},
headers={
"content-type": "application/json",
@@ -9119,29 +9119,43 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def get_browser_session(
- self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ async def extend_browser_session(
+ self,
+ browser_session_id: str,
+ *,
+ additional_minutes: int,
+ request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BrowserSessionResponse]:
"""
- Get details about a specific browser session, including the browser address for cdp connection.
+ 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.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
+ additional_minutes : int
+ 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.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[BrowserSessionResponse]
- Successfully retrieved browser session details
+ Successfully extended browser session
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}",
- method="GET",
+ f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}/extend",
+ method="POST",
+ json={
+ "additional_minutes": additional_minutes,
+ },
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
@@ -9175,6 +9189,17 @@ class AsyncRawSkyvern:
),
),
)
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ typing.Optional[typing.Any],
+ parse_obj_as(
+ type_=typing.Optional[typing.Any], # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -9191,43 +9216,29 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def update_browser_session(
- self,
- browser_session_id: str,
- *,
- generate_browser_profile: bool,
- request_options: typing.Optional[RequestOptions] = None,
+ async def get_browser_session(
+ self, browser_session_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[BrowserSessionResponse]:
"""
- Update a live browser session. Currently supports toggling generate_browser_profile, which is read when the session ends to decide whether to save its browser profile.
+ Get details about a specific browser session, including the browser address for cdp connection.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
- generate_browser_profile : bool
- Enable or disable saving this session's browser profile when it ends. Can be toggled while the session is still alive; the value is read at session teardown.
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[BrowserSessionResponse]
- Successfully updated browser session
+ Successfully retrieved browser session details
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}",
- method="PATCH",
- json={
- "generate_browser_profile": generate_browser_profile,
- },
- headers={
- "content-type": "application/json",
- },
+ method="GET",
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
@@ -9261,17 +9272,6 @@ class AsyncRawSkyvern:
),
),
)
- if _response.status_code == 409:
- raise ConflictError(
- headers=dict(_response.headers),
- body=typing.cast(
- typing.Optional[typing.Any],
- parse_obj_as(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
@@ -9288,23 +9288,23 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
- async def extend_browser_session(
+ async def update_browser_session(
self,
browser_session_id: str,
*,
- additional_minutes: int,
+ generate_browser_profile: bool,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BrowserSessionResponse]:
"""
- 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). 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.
+ Update a live browser session. Currently supports toggling generate_browser_profile, which is read when the session ends to decide whether to save its browser profile.
Parameters
----------
browser_session_id : str
The ID of the browser session. browser_session_id starts with `pbs_`
- additional_minutes : int
- Minutes to add to the session's timeout. 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.
+ generate_browser_profile : bool
+ Enable or disable saving this session's browser profile when it ends. Can be toggled while the session is still alive; the value is read at session teardown.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -9312,13 +9312,13 @@ class AsyncRawSkyvern:
Returns
-------
AsyncHttpResponse[BrowserSessionResponse]
- Successfully extended browser session
+ Successfully updated browser session
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}/extend",
- method="POST",
+ f"v1/browser_sessions/{jsonable_encoder(browser_session_id)}",
+ method="PATCH",
json={
- "additional_minutes": additional_minutes,
+ "generate_browser_profile": generate_browser_profile,
},
headers={
"content-type": "application/json",
diff --git a/skyvern/client/schedules/client.py b/skyvern/client/schedules/client.py
index ad2f0d723..70f52795c 100644
--- a/skyvern/client/schedules/client.py
+++ b/skyvern/client/schedules/client.py
@@ -114,11 +114,11 @@ class SchedulesClient:
self,
workflow_permanent_id: str,
*,
+ timezone: str,
cron_expression: typing.Optional[str] = OMIT,
interval_seconds: typing.Optional[int] = OMIT,
first_fire_at: typing.Optional[dt.datetime] = OMIT,
run_at: typing.Optional[dt.datetime] = OMIT,
- timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
@@ -126,19 +126,24 @@ class SchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
+ timezone : str
+
cron_expression : typing.Optional[str]
interval_seconds : typing.Optional[int]
+ Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression.
first_fire_at : typing.Optional[dt.datetime]
+ 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.
run_at : typing.Optional[dt.datetime]
-
- timezone : str
+ 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.
enabled : typing.Optional[bool]
@@ -165,17 +170,16 @@ class SchedulesClient:
)
client.schedules.create(
workflow_permanent_id="workflow_permanent_id",
- cron_expression="cron_expression",
timezone="timezone",
)
"""
_response = self._raw_client.create(
workflow_permanent_id,
+ timezone=timezone,
cron_expression=cron_expression,
interval_seconds=interval_seconds,
first_fire_at=first_fire_at,
run_at=run_at,
- timezone=timezone,
enabled=enabled,
parameters=parameters,
name=name,
@@ -192,6 +196,8 @@ class SchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
+ Fetch one schedule belonging to an agent. Returns the schedule's cron expression or interval, timezone, parameters, enabled state, and next upcoming run times.
+
Parameters
----------
workflow_permanent_id : str
@@ -226,11 +232,11 @@ class SchedulesClient:
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
+ timezone: str,
cron_expression: typing.Optional[str] = OMIT,
interval_seconds: typing.Optional[int] = OMIT,
first_fire_at: typing.Optional[dt.datetime] = OMIT,
run_at: typing.Optional[dt.datetime] = OMIT,
- timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
@@ -238,21 +244,26 @@ class SchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
+ timezone : str
+
cron_expression : typing.Optional[str]
interval_seconds : typing.Optional[int]
+ Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression.
first_fire_at : typing.Optional[dt.datetime]
+ 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.
run_at : typing.Optional[dt.datetime]
-
- timezone : str
+ 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.
enabled : typing.Optional[bool]
@@ -280,18 +291,17 @@ class SchedulesClient:
client.schedules.update(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
- cron_expression="cron_expression",
timezone="timezone",
)
"""
_response = self._raw_client.update(
workflow_permanent_id,
workflow_schedule_id,
+ timezone=timezone,
cron_expression=cron_expression,
interval_seconds=interval_seconds,
first_fire_at=first_fire_at,
run_at=run_at,
- timezone=timezone,
enabled=enabled,
parameters=parameters,
name=name,
@@ -425,6 +435,8 @@ class SchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
@@ -571,11 +583,11 @@ class AsyncSchedulesClient:
self,
workflow_permanent_id: str,
*,
+ timezone: str,
cron_expression: typing.Optional[str] = OMIT,
interval_seconds: typing.Optional[int] = OMIT,
first_fire_at: typing.Optional[dt.datetime] = OMIT,
run_at: typing.Optional[dt.datetime] = OMIT,
- timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
@@ -583,19 +595,24 @@ class AsyncSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
+ timezone : str
+
cron_expression : typing.Optional[str]
interval_seconds : typing.Optional[int]
+ Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression.
first_fire_at : typing.Optional[dt.datetime]
+ 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.
run_at : typing.Optional[dt.datetime]
-
- timezone : str
+ 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.
enabled : typing.Optional[bool]
@@ -627,7 +644,6 @@ class AsyncSchedulesClient:
async def main() -> None:
await client.schedules.create(
workflow_permanent_id="workflow_permanent_id",
- cron_expression="cron_expression",
timezone="timezone",
)
@@ -636,11 +652,11 @@ class AsyncSchedulesClient:
"""
_response = await self._raw_client.create(
workflow_permanent_id,
+ timezone=timezone,
cron_expression=cron_expression,
interval_seconds=interval_seconds,
first_fire_at=first_fire_at,
run_at=run_at,
- timezone=timezone,
enabled=enabled,
parameters=parameters,
name=name,
@@ -657,6 +673,8 @@ class AsyncSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
+ Fetch one schedule belonging to an agent. Returns the schedule's cron expression or interval, timezone, parameters, enabled state, and next upcoming run times.
+
Parameters
----------
workflow_permanent_id : str
@@ -701,11 +719,11 @@ class AsyncSchedulesClient:
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
+ timezone: str,
cron_expression: typing.Optional[str] = OMIT,
interval_seconds: typing.Optional[int] = OMIT,
first_fire_at: typing.Optional[dt.datetime] = OMIT,
run_at: typing.Optional[dt.datetime] = OMIT,
- timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
@@ -713,21 +731,26 @@ class AsyncSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
+ timezone : str
+
cron_expression : typing.Optional[str]
interval_seconds : typing.Optional[int]
+ Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression.
first_fire_at : typing.Optional[dt.datetime]
+ 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.
run_at : typing.Optional[dt.datetime]
-
- timezone : str
+ 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.
enabled : typing.Optional[bool]
@@ -760,7 +783,6 @@ class AsyncSchedulesClient:
await client.schedules.update(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
- cron_expression="cron_expression",
timezone="timezone",
)
@@ -770,11 +792,11 @@ class AsyncSchedulesClient:
_response = await self._raw_client.update(
workflow_permanent_id,
workflow_schedule_id,
+ timezone=timezone,
cron_expression=cron_expression,
interval_seconds=interval_seconds,
first_fire_at=first_fire_at,
run_at=run_at,
- timezone=timezone,
enabled=enabled,
parameters=parameters,
name=name,
@@ -924,7 +946,6 @@ class AsyncSchedulesClient:
)
return _response.data
-
async def cancel(
self,
workflow_permanent_id: str,
@@ -933,6 +954,8 @@ class AsyncSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
diff --git a/skyvern/client/schedules/raw_client.py b/skyvern/client/schedules/raw_client.py
index a46fcb111..6d6227ba6 100644
--- a/skyvern/client/schedules/raw_client.py
+++ b/skyvern/client/schedules/raw_client.py
@@ -143,11 +143,11 @@ class RawSchedulesClient:
self,
workflow_permanent_id: str,
*,
+ timezone: str,
cron_expression: typing.Optional[str] = OMIT,
interval_seconds: typing.Optional[int] = OMIT,
first_fire_at: typing.Optional[dt.datetime] = OMIT,
run_at: typing.Optional[dt.datetime] = OMIT,
- timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
@@ -155,19 +155,24 @@ class RawSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[WorkflowScheduleResponse]:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
+ timezone : str
+
cron_expression : typing.Optional[str]
interval_seconds : typing.Optional[int]
+ Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression.
first_fire_at : typing.Optional[dt.datetime]
+ 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.
run_at : typing.Optional[dt.datetime]
-
- timezone : str
+ 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.
enabled : typing.Optional[bool]
@@ -239,6 +244,8 @@ class RawSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[WorkflowScheduleResponse]:
"""
+ Fetch one schedule belonging to an agent. Returns the schedule's cron expression or interval, timezone, parameters, enabled state, and next upcoming run times.
+
Parameters
----------
workflow_permanent_id : str
@@ -289,11 +296,11 @@ class RawSchedulesClient:
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
+ timezone: str,
cron_expression: typing.Optional[str] = OMIT,
interval_seconds: typing.Optional[int] = OMIT,
first_fire_at: typing.Optional[dt.datetime] = OMIT,
run_at: typing.Optional[dt.datetime] = OMIT,
- timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
@@ -301,21 +308,26 @@ class RawSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[WorkflowScheduleResponse]:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
+ timezone : str
+
cron_expression : typing.Optional[str]
interval_seconds : typing.Optional[int]
+ Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression.
first_fire_at : typing.Optional[dt.datetime]
+ 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.
run_at : typing.Optional[dt.datetime]
-
- timezone : str
+ 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.
enabled : typing.Optional[bool]
@@ -546,6 +558,8 @@ class RawSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[WorkflowScheduleResponse]:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
@@ -714,11 +728,11 @@ class AsyncRawSchedulesClient:
self,
workflow_permanent_id: str,
*,
+ timezone: str,
cron_expression: typing.Optional[str] = OMIT,
interval_seconds: typing.Optional[int] = OMIT,
first_fire_at: typing.Optional[dt.datetime] = OMIT,
run_at: typing.Optional[dt.datetime] = OMIT,
- timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
@@ -726,19 +740,24 @@ class AsyncRawSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[WorkflowScheduleResponse]:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
+ timezone : str
+
cron_expression : typing.Optional[str]
interval_seconds : typing.Optional[int]
+ Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression.
first_fire_at : typing.Optional[dt.datetime]
+ 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.
run_at : typing.Optional[dt.datetime]
-
- timezone : str
+ 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.
enabled : typing.Optional[bool]
@@ -810,6 +829,8 @@ class AsyncRawSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[WorkflowScheduleResponse]:
"""
+ Fetch one schedule belonging to an agent. Returns the schedule's cron expression or interval, timezone, parameters, enabled state, and next upcoming run times.
+
Parameters
----------
workflow_permanent_id : str
@@ -860,11 +881,11 @@ class AsyncRawSchedulesClient:
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
+ timezone: str,
cron_expression: typing.Optional[str] = OMIT,
interval_seconds: typing.Optional[int] = OMIT,
first_fire_at: typing.Optional[dt.datetime] = OMIT,
run_at: typing.Optional[dt.datetime] = OMIT,
- timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
@@ -872,21 +893,26 @@ class AsyncRawSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[WorkflowScheduleResponse]:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
+ timezone : str
+
cron_expression : typing.Optional[str]
interval_seconds : typing.Optional[int]
+ Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression.
first_fire_at : typing.Optional[dt.datetime]
+ 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.
run_at : typing.Optional[dt.datetime]
-
- timezone : str
+ 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.
enabled : typing.Optional[bool]
@@ -1109,7 +1135,6 @@ class AsyncRawSchedulesClient:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
async def cancel(
self,
workflow_permanent_id: str,
@@ -1118,6 +1143,8 @@ class AsyncRawSchedulesClient:
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[WorkflowScheduleResponse]:
"""
+ 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.
+
Parameters
----------
workflow_permanent_id : str
diff --git a/skyvern/client/types/code_block.py b/skyvern/client/types/code_block.py
index 419f11e8b..7dac9e66c 100644
--- a/skyvern/client/types/code_block.py
+++ b/skyvern/client/types/code_block.py
@@ -33,7 +33,10 @@ class CodeBlock(UniversalBaseModel):
parameters: typing.Optional[typing.List[CodeBlockParametersItem]] = None
prompt: typing.Optional[str] = None
steps: typing.Optional[typing.List[CodeBlockStep]] = None
- data_schema: typing.Optional[CodeBlockDataSchema] = None
+ data_schema: typing.Optional[CodeBlockDataSchema] = pydantic.Field(default=None)
+ """
+ JSON schema of the object this block's return produces; keys match the return keys; null when the block returns nothing
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/skyvern/client/types/code_block_yaml.py b/skyvern/client/types/code_block_yaml.py
index d77c0489d..2ef760601 100644
--- a/skyvern/client/types/code_block_yaml.py
+++ b/skyvern/client/types/code_block_yaml.py
@@ -27,7 +27,10 @@ class CodeBlockYaml(UniversalBaseModel):
parameter_keys: typing.Optional[typing.List[str]] = None
prompt: typing.Optional[str] = None
steps: typing.Optional[typing.List[CodeBlockStepYaml]] = None
- data_schema: typing.Optional[CodeBlockYamlDataSchema] = None
+ data_schema: typing.Optional[CodeBlockYamlDataSchema] = pydantic.Field(default=None)
+ """
+ JSON schema of the object this block's return produces; keys match the return keys; null when the block returns nothing
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/skyvern/client/types/for_loop_block_loop_blocks_item.py b/skyvern/client/types/for_loop_block_loop_blocks_item.py
index 5cdf6a52e..66c477c47 100644
--- a/skyvern/client/types/for_loop_block_loop_blocks_item.py
+++ b/skyvern/client/types/for_loop_block_loop_blocks_item.py
@@ -731,15 +731,15 @@ class ForLoopBlockLoopBlocksItem_SendEmail(UniversalBaseModel):
smtp_port: AwsSecretParameter
smtp_username: AwsSecretParameter
smtp_password: AwsSecretParameter
- custom_smtp_host: typing.Optional[str] = None
- custom_smtp_port: typing.Optional[int] = None
- custom_smtp_username: typing.Optional[str] = None
- custom_smtp_password: typing.Optional[str] = None
sender: str
recipients: typing.List[str]
subject: str
body: str
file_attachments: typing.Optional[typing.List[str]] = None
+ custom_smtp_host: typing.Optional[str] = None
+ custom_smtp_port: typing.Optional[int] = None
+ custom_smtp_username: typing.Optional[str] = None
+ custom_smtp_password: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/skyvern/client/types/get_run_response.py b/skyvern/client/types/get_run_response.py
index 7169c675d..3730c0310 100644
--- a/skyvern/client/types/get_run_response.py
+++ b/skyvern/client/types/get_run_response.py
@@ -84,8 +84,8 @@ class GetRunResponse_TaskV2(UniversalBaseModel):
extra = pydantic.Extra.allow
-class GetRunResponse_TaskV3(UniversalBaseModel):
- run_type: typing.Literal["task_v3"] = "task_v3"
+class GetRunResponse_OpenaiCua(UniversalBaseModel):
+ run_type: typing.Literal["openai_cua"] = "openai_cua"
run_id: str
status: RunStatus
output: typing.Optional[TaskRunResponseOutput] = None
@@ -118,8 +118,8 @@ class GetRunResponse_TaskV3(UniversalBaseModel):
extra = pydantic.Extra.allow
-class GetRunResponse_OpenaiCua(UniversalBaseModel):
- run_type: typing.Literal["openai_cua"] = "openai_cua"
+class GetRunResponse_AnthropicCua(UniversalBaseModel):
+ run_type: typing.Literal["anthropic_cua"] = "anthropic_cua"
run_id: str
status: RunStatus
output: typing.Optional[TaskRunResponseOutput] = None
@@ -152,8 +152,8 @@ class GetRunResponse_OpenaiCua(UniversalBaseModel):
extra = pydantic.Extra.allow
-class GetRunResponse_AnthropicCua(UniversalBaseModel):
- run_type: typing.Literal["anthropic_cua"] = "anthropic_cua"
+class GetRunResponse_UiTars(UniversalBaseModel):
+ run_type: typing.Literal["ui_tars"] = "ui_tars"
run_id: str
status: RunStatus
output: typing.Optional[TaskRunResponseOutput] = None
@@ -186,8 +186,8 @@ class GetRunResponse_AnthropicCua(UniversalBaseModel):
extra = pydantic.Extra.allow
-class GetRunResponse_UiTars(UniversalBaseModel):
- run_type: typing.Literal["ui_tars"] = "ui_tars"
+class GetRunResponse_YutoriNavigator(UniversalBaseModel):
+ run_type: typing.Literal["yutori_navigator"] = "yutori_navigator"
run_id: str
status: RunStatus
output: typing.Optional[TaskRunResponseOutput] = None
@@ -220,8 +220,8 @@ class GetRunResponse_UiTars(UniversalBaseModel):
extra = pydantic.Extra.allow
-class GetRunResponse_YutoriNavigator(UniversalBaseModel):
- run_type: typing.Literal["yutori_navigator"] = "yutori_navigator"
+class GetRunResponse_TaskV3(UniversalBaseModel):
+ run_type: typing.Literal["task_v3"] = "task_v3"
run_id: str
status: RunStatus
output: typing.Optional[TaskRunResponseOutput] = None
@@ -294,10 +294,10 @@ class GetRunResponse_WorkflowRun(UniversalBaseModel):
GetRunResponse = typing.Union[
GetRunResponse_TaskV1,
GetRunResponse_TaskV2,
- GetRunResponse_TaskV3,
GetRunResponse_OpenaiCua,
GetRunResponse_AnthropicCua,
GetRunResponse_UiTars,
GetRunResponse_YutoriNavigator,
+ GetRunResponse_TaskV3,
GetRunResponse_WorkflowRun,
]
diff --git a/skyvern/client/types/run_status.py b/skyvern/client/types/run_status.py
index a306a4052..a2ce78112 100644
--- a/skyvern/client/types/run_status.py
+++ b/skyvern/client/types/run_status.py
@@ -3,6 +3,8 @@
import typing
RunStatus = typing.Union[
- typing.Literal["created", "queued", "running", "paused", "timed_out", "failed", "terminated", "completed", "canceled"],
+ typing.Literal[
+ "created", "queued", "running", "paused", "timed_out", "failed", "terminated", "completed", "canceled"
+ ],
typing.Any,
]
diff --git a/skyvern/client/types/run_type.py b/skyvern/client/types/run_type.py
index aa553c2a7..810217591 100644
--- a/skyvern/client/types/run_type.py
+++ b/skyvern/client/types/run_type.py
@@ -3,6 +3,8 @@
import typing
RunType = typing.Union[
- typing.Literal["task_v1", "task_v2", "task_v3", "workflow_run", "openai_cua", "anthropic_cua", "ui_tars", "yutori_navigator"],
+ typing.Literal[
+ "task_v1", "task_v2", "task_v3", "workflow_run", "openai_cua", "anthropic_cua", "ui_tars", "yutori_navigator"
+ ],
typing.Any,
]
diff --git a/skyvern/client/types/send_email_block.py b/skyvern/client/types/send_email_block.py
index 22aedffae..d4ed32828 100644
--- a/skyvern/client/types/send_email_block.py
+++ b/skyvern/client/types/send_email_block.py
@@ -29,15 +29,15 @@ class SendEmailBlock(UniversalBaseModel):
smtp_port: AwsSecretParameter
smtp_username: AwsSecretParameter
smtp_password: AwsSecretParameter
- custom_smtp_host: typing.Optional[str] = None
- custom_smtp_port: typing.Optional[int] = None
- custom_smtp_username: typing.Optional[str] = None
- custom_smtp_password: typing.Optional[str] = None
sender: str
recipients: typing.List[str]
subject: str
body: str
file_attachments: typing.Optional[typing.List[str]] = None
+ custom_smtp_host: typing.Optional[str] = None
+ custom_smtp_port: typing.Optional[int] = None
+ custom_smtp_username: typing.Optional[str] = None
+ custom_smtp_password: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/skyvern/client/types/while_loop_block_loop_blocks_item.py b/skyvern/client/types/while_loop_block_loop_blocks_item.py
index 15171366b..82c5351c0 100644
--- a/skyvern/client/types/while_loop_block_loop_blocks_item.py
+++ b/skyvern/client/types/while_loop_block_loop_blocks_item.py
@@ -731,15 +731,15 @@ class WhileLoopBlockLoopBlocksItem_SendEmail(UniversalBaseModel):
smtp_port: AwsSecretParameter
smtp_username: AwsSecretParameter
smtp_password: AwsSecretParameter
- custom_smtp_host: typing.Optional[str] = None
- custom_smtp_port: typing.Optional[int] = None
- custom_smtp_username: typing.Optional[str] = None
- custom_smtp_password: typing.Optional[str] = None
sender: str
recipients: typing.List[str]
subject: str
body: str
file_attachments: typing.Optional[typing.List[str]] = None
+ custom_smtp_host: typing.Optional[str] = None
+ custom_smtp_port: typing.Optional[int] = None
+ custom_smtp_username: typing.Optional[str] = None
+ custom_smtp_password: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/skyvern/client/types/workflow_definition_blocks_item.py b/skyvern/client/types/workflow_definition_blocks_item.py
index 5f055c7bb..4af563986 100644
--- a/skyvern/client/types/workflow_definition_blocks_item.py
+++ b/skyvern/client/types/workflow_definition_blocks_item.py
@@ -734,15 +734,15 @@ class WorkflowDefinitionBlocksItem_SendEmail(UniversalBaseModel):
smtp_port: AwsSecretParameter
smtp_username: AwsSecretParameter
smtp_password: AwsSecretParameter
- custom_smtp_host: typing.Optional[str] = None
- custom_smtp_port: typing.Optional[int] = None
- custom_smtp_username: typing.Optional[str] = None
- custom_smtp_password: typing.Optional[str] = None
sender: str
recipients: typing.List[str]
subject: str
body: str
file_attachments: typing.Optional[typing.List[str]] = None
+ custom_smtp_host: typing.Optional[str] = None
+ custom_smtp_port: typing.Optional[int] = None
+ custom_smtp_username: typing.Optional[str] = None
+ custom_smtp_password: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/skyvern/client/types/workflow_schedule_upsert_request.py b/skyvern/client/types/workflow_schedule_upsert_request.py
index 49b5ed3e2..c314c925d 100644
--- a/skyvern/client/types/workflow_schedule_upsert_request.py
+++ b/skyvern/client/types/workflow_schedule_upsert_request.py
@@ -9,9 +9,21 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class WorkflowScheduleUpsertRequest(UniversalBaseModel):
cron_expression: typing.Optional[str] = None
- interval_seconds: typing.Optional[int] = None
- first_fire_at: typing.Optional[dt.datetime] = None
- run_at: typing.Optional[dt.datetime] = None
+ interval_seconds: typing.Optional[int] = pydantic.Field(default=None)
+ """
+ Fixed elapsed interval between runs, in seconds. Mutually exclusive with cron_expression.
+ """
+
+ first_fire_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
+ """
+ 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.
+ """
+
+ run_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
+ """
+ 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.
+ """
+
timezone: str
enabled: typing.Optional[bool] = None
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None