Bump version to 1.0.45 (#7167)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Shuchang Zheng 2026-07-07 15:18:31 -07:00 committed by GitHub
parent d0094d3568
commit 632b8ec501
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
125 changed files with 9604 additions and 4848 deletions

View file

@ -8301,6 +8301,62 @@
],
"title": "Source Browser Type"
},
"proxy_location": {
"anyOf": [
{
"$ref": "#/components/schemas/ProxyLocation"
},
{
"$ref": "#/components/schemas/GeoTarget"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Proxy Location"
},
"proxy_session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Proxy Session Id"
},
"is_managed": {
"type": "boolean",
"title": "Is Managed",
"default": false
},
"workflow_permanent_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Workflow Permanent Id"
},
"browser_profile_key_digest": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Browser Profile Key Digest"
},
"created_at": {
"type": "string",
"format": "date-time",
@ -9255,6 +9311,37 @@
],
"title": "Workflow Run Id",
"description": "Workflow run whose persisted session should be captured. Omit for a blank profile."
},
"proxy_location": {
"anyOf": [
{
"$ref": "#/components/schemas/ProxyLocation"
},
{
"$ref": "#/components/schemas/GeoTarget"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Proxy Location",
"description": "Optional proxy location for this profile's pinned proxy identity."
},
"proxy_session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Proxy Session Id",
"description": "Explicit sticky-session id for this profile's pinned proxy identity."
}
},
"type": "object",
@ -9394,10 +9481,48 @@
],
"description": "Which vault to store this credential in. If omitted, uses the instance default. Use this to mix Skyvern-hosted and custom credentials within the same organization.",
"examples": [
"skyvern",
"custom",
"azure_vault",
"bitwarden"
]
},
"proxy_location": {
"anyOf": [
{
"$ref": "#/components/schemas/ProxyLocation"
},
{
"$ref": "#/components/schemas/GeoTarget"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Proxy Location",
"description": "Optional proxy location for this credential's pinned proxy identity."
},
"proxy_session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Proxy Session Id",
"description": "Optional advanced reuse key for this credential's pinned proxy identity."
},
"rotate_proxy_session_id": {
"type": "boolean",
"title": "Rotate Proxy Session Id",
"description": "Rotate the Skyvern-managed proxy sticky-session id when updating this credential.",
"default": false
}
},
"type": "object",
@ -20340,6 +20465,43 @@
],
"title": "Description",
"description": "New description for the browser profile"
},
"proxy_location": {
"anyOf": [
{
"$ref": "#/components/schemas/ProxyLocation"
},
{
"$ref": "#/components/schemas/GeoTarget"
},
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Proxy Location",
"description": "Optional proxy location for this profile's pinned proxy identity."
},
"proxy_session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Proxy Session Id",
"description": "Opaque Skyvern-managed proxy sticky-session id."
},
"rotate_proxy_session_id": {
"type": "boolean",
"title": "Rotate Proxy Session Id",
"description": "Rotate the Skyvern-managed proxy sticky-session id for this profile.",
"default": false
}
},
"type": "object",

View file

@ -1,6 +1,6 @@
[project]
name = "skyvern-ui"
version = "1.0.44"
version = "1.0.45"
description = "Prebuilt Skyvern UI assets for the Skyvern CLI"
authors = [{ name = "Skyvern AI", email = "info@skyvern.com" }]
requires-python = ">=3.11,<3.14"

View file

@ -1,6 +1,6 @@
[project]
name = "skyvern"
version = "1.0.44"
version = "1.0.45"
description = ""
authors = [{ name = "Skyvern AI", email = "info@skyvern.com" }]
requires-python = ">=3.11,<3.14"

View file

@ -7,6 +7,9 @@ rm -fr skyvern/client
mkdir -p skyvern/client
cp -rf fern/.preview/fern-python-sdk/src/skyvern/* skyvern/client/
# Post-processing: Reapply manual patches (circular imports, forward-ref KeyError)
python3 scripts/patch_generated_client.py || exit 1
# Post-processing: Patch version.py to handle missing metadata gracefully
VERSION_FILE="skyvern/client/version.py"
if [ -f "$VERSION_FILE" ]; then

View file

@ -0,0 +1,132 @@
#!/usr/bin/env python3
"""Reapply manual patches to the Fern-generated Python client.
Run automatically by scripts/fern_build_python_sdk.sh after every regen.
Idempotent: running it twice leaves the files unchanged.
Patches:
1. Loop-block circular imports Fern v4.31.1 emits bottom-cross-imports that
deadlock at module load (for_loop <-> while_loop <-> *_loop_blocks_item).
Wrap them in try/except ImportError; the symmetric *_loop_blocks_item module
back-resolves once both unions are fully defined.
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.
"""
from __future__ import annotations
import sys
from pathlib import Path
CLIENT = Path(__file__).resolve().parent.parent / "skyvern" / "client"
LOOP_BLOCK_PATCHES = {
"types/for_loop_block.py": (
"""from .while_loop_block import WhileLoopBlock # noqa: E402, F401, I001
from .for_loop_block_loop_blocks_item import ForLoopBlockLoopBlocksItem # noqa: E402, F401, I001""",
"""
# Manual patch: Fern v4.31.1 emits bottom-cross-imports that deadlock at module
# load (for_loop <-> while_loop <-> *_loop_blocks_item). Catch the mid-load
# ImportError; the symmetric *_loop_blocks_item module back-resolves once both
# unions are fully defined. Reapplied on every regen by scripts/patch_generated_client.py.
try:
from .while_loop_block import WhileLoopBlock # noqa: E402, F401, I001
from .for_loop_block_loop_blocks_item import ForLoopBlockLoopBlocksItem # noqa: E402, F401, I001
except ImportError:
pass""",
),
"types/while_loop_block.py": (
"""from .for_loop_block import ForLoopBlock # noqa: E402, F401, I001
from .while_loop_block_loop_blocks_item import WhileLoopBlockLoopBlocksItem # noqa: E402, F401, I001""",
"""
# Manual patch: Fern v4.31.1 emits bottom-cross-imports that deadlock at module
# load. See for_loop_block.py for the explanation.
try:
from .for_loop_block import ForLoopBlock # noqa: E402, F401, I001
from .while_loop_block_loop_blocks_item import WhileLoopBlockLoopBlocksItem # noqa: E402, F401, I001
except ImportError:
pass""",
),
"types/for_loop_block_yaml.py": (
"""from .while_loop_block_yaml import WhileLoopBlockYaml # noqa: E402, F401, I001
from .for_loop_block_yaml_loop_blocks_item import ForLoopBlockYamlLoopBlocksItem # noqa: E402, F401, I001""",
"""
# Manual patch: Fern v4.31.1 emits bottom-cross-imports that deadlock at module
# load. See for_loop_block.py for the explanation.
try:
from .while_loop_block_yaml import WhileLoopBlockYaml # noqa: E402, F401, I001
from .for_loop_block_yaml_loop_blocks_item import ForLoopBlockYamlLoopBlocksItem # noqa: E402, F401, I001
except ImportError:
pass""",
),
"types/while_loop_block_yaml.py": (
"""from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402, F401, I001
from .while_loop_block_yaml_loop_blocks_item import WhileLoopBlockYamlLoopBlocksItem # noqa: E402, F401, I001""",
"""
# Manual patch: Fern v4.31.1 emits bottom-cross-imports that deadlock at module
# load. See for_loop_block.py for the explanation.
try:
from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402, F401, I001
from .while_loop_block_yaml_loop_blocks_item import WhileLoopBlockYamlLoopBlocksItem # noqa: E402, F401, I001
except ImportError:
pass""",
),
}
FORWARD_REFS_OLD = """def update_forward_refs(model: Type["Model"], **localns: Any) -> None:
if IS_PYDANTIC_V2:
model.model_rebuild(raise_errors=False) # type: ignore[attr-defined]
else:
model.update_forward_refs(**localns)"""
FORWARD_REFS_NEW = """def update_forward_refs(model: Type["Model"], **localns: Any) -> None:
if IS_PYDANTIC_V2:
try:
model.model_rebuild(raise_errors=False) # type: ignore[attr-defined]
except KeyError as exc:
# Manual patch (reapplied by scripts/patch_generated_client.py):
# Pydantic v2 can still raise internal schema-gathering KeyErrors
# for Fern-generated recursive unions even with raise_errors=False.
# Match on the "definitions" key rather than the exact args tuple so a
# Pydantic format change that adds context can't reintroduce the crash.
if "definitions" not in exc.args:
raise
else:
model.update_forward_refs(**localns)"""
def patch_file(rel_path: str, old: str, new: str) -> str:
path = CLIENT / rel_path
text = path.read_text()
if new in text:
return "already patched"
if old not in text:
return "PATTERN NOT FOUND"
path.write_text(text.replace(old, new, 1))
return "patched"
def main() -> int:
failed = False
for rel_path, (old, new) in LOOP_BLOCK_PATCHES.items():
result = patch_file(rel_path, old, new)
print(f"{rel_path}: {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"
if failed:
print(
"ERROR: some patch patterns no longer match the generated code. "
"The Fern generator output changed shape - update this script.",
file=sys.stderr,
)
return 1
return 0
if __name__ == "__main__":
raise SystemExit(main())

View file

@ -1,5 +0,0 @@
# Supply chain protection: do not run lifecycle scripts (preinstall, install,
# postinstall) on npm install. Blocks worms like "Shai-Hulud" from executing
# on a compromised dependency before we notice. If a package genuinely needs
# its install script, use @lavamoat/allow-scripts to allowlist it.
ignore-scripts=true

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "@skyvern/client",
"version": "1.0.44",
"version": "1.0.45",
"private": false,
"repository": {
"type": "git",
@ -52,7 +52,7 @@
"devDependencies": {
"webpack": "^5.97.1",
"ts-loader": "^9.5.1",
"vitest": "^3.2.6",
"vitest": "^3.2.4",
"msw": "2.11.2",
"@types/node": "^18.19.70",
"typescript": "~5.7.2",
@ -73,13 +73,5 @@
"publishConfig": {
"access": "public",
"provenance": true
},
"pnpm": {
"overrides": {
"fast-uri": ">=3.1.2",
"rollup": ">=4.59.0",
"serialize-javascript": ">=7.0.3",
"vite": ">=7.3.5"
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
# Reference
<details><summary><code>client.<a href="/src/Client.ts">runSdkAction</a>({ ...params }) -> Skyvern.RunSdkActionResponse</code></summary>
<details><summary><code>client.<a href="/src/Client.ts">getWorkflowVersions</a>(workflowPermanentId, { ...params }) -> Skyvern.Workflow[]</code></summary>
<dl>
<dd>
@ -11,7 +11,7 @@
<dl>
<dd>
Execute a single SDK action with the specified parameters
Get all versions of a workflow by its permanent ID.
</dd>
</dl>
</dd>
@ -26,11 +26,8 @@ Execute a single SDK action with the specified parameters
<dd>
```typescript
await client.runSdkAction({
url: "url",
action: {
type: "ai_act"
}
await client.getWorkflowVersions("workflow_permanent_id", {
template: true
});
```
@ -47,7 +44,15 @@ await client.runSdkAction({
<dl>
<dd>
**request:** `Skyvern.RunSdkActionRequest`
**workflowPermanentId:** `string`
</dd>
</dl>
<dl>
<dd>
**request:** `Skyvern.GetWorkflowVersionsRequest`
</dd>
</dl>
@ -128,126 +133,6 @@ await client.artifacts.getArtifactContent("artifact_id");
</dl>
</dd>
</dl>
</details>
## Server
<details><summary><code>client.server.<a href="/src/api/resources/server/client/Client.ts">getVersion</a>() -> Record&lt;string, string&gt;</code></summary>
<dl>
<dd>
#### 📝 Description
<dl>
<dd>
<dl>
<dd>
Returns the current Skyvern server version (git SHA for official builds).
</dd>
</dl>
</dd>
</dl>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.server.getVersion();
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**requestOptions:** `Server.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>
## Workflows
<details><summary><code>client.workflows.<a href="/src/api/resources/workflows/client/Client.ts">resetWorkflowBrowserProfile</a>(workflowPermanentId) -> void</code></summary>
<dl>
<dd>
#### 📝 Description
<dl>
<dd>
<dl>
<dd>
Clear the persisted browser profile for a workflow that uses `Save & Reuse Session`. The next run will start from a fresh browser state. Use when a saved profile is corrupted.
</dd>
</dl>
</dd>
</dl>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.workflows.resetWorkflowBrowserProfile("wpid_123");
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**workflowPermanentId:** `string` — The permanent ID of the workflow. Starts with `wpid_`.
</dd>
</dl>
<dl>
<dd>
**requestOptions:** `Workflows.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>
@ -772,6 +657,70 @@ await client.schedules.disable("workflow_permanent_id", "workflow_schedule_id");
</dl>
</dd>
</dl>
</details>
## Agents
<details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">resetWorkflowBrowserProfile</a>(workflowPermanentId) -> void</code></summary>
<dl>
<dd>
#### 📝 Description
<dl>
<dd>
<dl>
<dd>
Clear the persisted browser profile for a workflow that uses `Save & Reuse Session`. The next run will start from a fresh browser state. Use when a saved profile is corrupted.
</dd>
</dl>
</dd>
</dl>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.agents.resetWorkflowBrowserProfile("wpid_123");
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**workflowPermanentId:** `string` — The permanent ID of the workflow. Starts with `wpid_`.
</dd>
</dl>
<dl>
<dd>
**requestOptions:** `Agents.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
// This file was auto-generated by Fern from our API Definition.
/**
* @example
* {
* workflow_permanent_ids: "workflow_permanent_ids"
* }
*/
export interface BatchGetWorkflowTagsRequest {
/** Comma-separated workflow permanent IDs */
workflow_permanent_ids?: string;
}

View file

@ -1,5 +1,7 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../../index.js";
/**
* @example
* {
@ -11,8 +13,19 @@ export interface CreateBrowserProfileRequest {
name: string;
/** Optional profile description */
description?: string;
/** Persistent browser session to convert into a profile */
/** Persistent browser session to convert into a profile. Omit for a blank profile. */
browser_session_id?: string;
/** Workflow run whose persisted session should be captured */
/** Workflow run whose persisted session should be captured. Omit for a blank profile. */
workflow_run_id?: string;
/** Optional proxy location for this profile's pinned proxy identity. */
proxy_location?: CreateBrowserProfileRequest.ProxyLocation;
/** Explicit sticky-session id for this profile's pinned proxy identity. */
proxy_session_id?: string;
}
export namespace CreateBrowserProfileRequest {
/**
* Optional proxy location for this profile's pinned proxy identity.
*/
export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
}

View file

@ -52,6 +52,8 @@ export interface CreateBrowserSessionRequest {
browser_type?: Skyvern.PersistentBrowserType;
/** ID of a browser profile to load into this session (restores cookies, localStorage, etc.). browser_profile_id starts with `bp_`. */
browser_profile_id?: string;
/** When true, the session's browser profile (cookies, localStorage, etc.) is saved to storage when the session ends so it can be turned into a reusable browser profile. Defaults to false to avoid storing profiles for sessions that never need them. Sessions started with a browser_profile_id always persist their profile regardless of this flag. */
generate_browser_profile?: boolean;
}
export namespace CreateBrowserSessionRequest {

View file

@ -7,7 +7,9 @@ import type * as Skyvern from "../../index.js";
* {
* page: 1,
* page_size: 10,
* vault_type: "bitwarden"
* vault_type: "skyvern",
* credential_type: "password",
* search: "search"
* }
*/
export interface GetCredentialsRequest {
@ -17,4 +19,8 @@ export interface GetCredentialsRequest {
page_size?: number;
/** Filter credentials by vault type (e.g. 'skyvern', 'custom', 'bitwarden', 'azure_vault') */
vault_type?: Skyvern.CredentialVaultType;
/** Filter credentials by type (e.g. 'password', 'credit_card', 'secret') */
credential_type?: Skyvern.SkyvernForgeSdkSchemasCredentialsCredentialType;
/** Case-insensitive search across credential name, username, secret label, and card details */
search?: string;
}

View file

@ -0,0 +1,18 @@
// This file was auto-generated by Fern from our API Definition.
/**
* @example
* {
* limit: 1,
* since: "2024-01-15T09:30:00Z",
* key: "key"
* }
*/
export interface GetWorkflowTagHistoryRequest {
/** Max events to return */
limit?: number;
/** Only return events at or after this timestamp */
since?: string;
/** Filter to events for a single tag key */
key?: string;
}

View file

@ -29,5 +29,7 @@ export interface GetWorkflowsRequest {
/** Filter workflows by folder ID */
folder_id?: string;
status?: Skyvern.WorkflowStatus | Skyvern.WorkflowStatus[];
/** Filter by tags. Each term is a label (`production`), a group (`env:*`), or a group:label (`env:prod`). Repeat the param or comma-separate (`?tags=env:prod,env:staging`). AND across distinct terms, OR within a group's labels (`?tags=customer:acme,env:prod,env:staging` -> customer=acme AND env in (prod, staging)). A label term matches the value across any/no group. Matches current tag values only. Not supported with `template=true`. */
tags?: string | string[];
template?: boolean;
}

View file

@ -0,0 +1,14 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../../index.js";
/**
* @example
* {}
*/
export interface TagApplyRequest {
/** Tags to set (overwrite). List of {key?, value} objects. */
tags?: Skyvern.TagInput[];
/** Tags to soft-delete. List of {key?, value?} targets. */
tags_to_delete?: Skyvern.TagDeleteInput[];
}

View file

@ -0,0 +1,10 @@
// This file was auto-generated by Fern from our API Definition.
/**
* @example
* {}
*/
export interface TagKeyUpdate {
/** Free-form description (max 500 chars). Pass null to clear. */
description?: string;
}

View file

@ -1,5 +1,7 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../../index.js";
/**
* @example
* {}
@ -9,4 +11,17 @@ export interface UpdateBrowserProfileRequest {
name?: string;
/** New description for the browser profile */
description?: string;
/** Optional proxy location for this profile's pinned proxy identity. */
proxy_location?: UpdateBrowserProfileRequest.ProxyLocation;
/** Opaque Skyvern-managed proxy sticky-session id. */
proxy_session_id?: string;
/** Rotate the Skyvern-managed proxy sticky-session id for this profile. */
rotate_proxy_session_id?: boolean;
}
export namespace UpdateBrowserProfileRequest {
/**
* Optional proxy location for this profile's pinned proxy identity.
*/
export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
}

View file

@ -0,0 +1,12 @@
// This file was auto-generated by Fern from our API Definition.
/**
* @example
* {
* generate_browser_profile: true
* }
*/
export interface UpdateBrowserSessionRequest {
/** 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. */
generate_browser_profile: boolean;
}

View file

@ -8,15 +8,15 @@ import type * as Skyvern from "../../index.js";
* "x-max-steps-override": 1,
* "x-user-agent": "x-user-agent",
* template: true,
* workflow_id: "wpid_123"
* agent_id: "wpid_123"
* }
*/
export interface WorkflowRunRequestInput {
template?: boolean;
"x-max-steps-override"?: number;
"x-user-agent"?: string;
/** ID of the workflow to run. Workflow ID starts with `wpid_`. */
workflow_id: string;
/** ID of the agent to run. Starts with `wpid_`. `workflow_id` is accepted as an alias. */
agent_id: string;
/** Parameters to pass to the workflow */
parameters?: Record<string, unknown>;
/** The title for this workflow run */
@ -74,7 +74,7 @@ export interface WorkflowRunRequestInput {
browser_profile_id?: string;
/** The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot. */
max_screenshot_scrolls?: number;
/** Timeout this workflow run after the configured elapsed runtime in minutes. Maximum runtime is 4 hours. */
/** Timeout this workflow run after the configured elapsed runtime in minutes. When omitted, the platform default is 240 minutes. The maximum configurable value is 480 minutes. */
max_elapsed_time_minutes?: number;
/** The extra HTTP headers for the requests in browser. */
extra_http_headers?: Record<string, string | undefined>;

View file

@ -0,0 +1,10 @@
// This file was auto-generated by Fern from our API Definition.
/**
* @example
* {}
*/
export interface WorkflowTagsBatchRequest {
/** Workflow permanent IDs to fetch tags for. */
workflow_permanent_ids?: string[];
}

View file

@ -1,3 +1,4 @@
export type { BatchGetWorkflowTagsRequest } from "./BatchGetWorkflowTagsRequest.js";
export type { BodyUploadFileV1UploadFilePost } from "./BodyUploadFileV1UploadFilePost.js";
export type { BulkCancelRunsRequest } from "./BulkCancelRunsRequest.js";
export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.js";
@ -18,13 +19,18 @@ export type { GetWorkflowRequest } from "./GetWorkflowRequest.js";
export type { GetWorkflowRunsByIdRequest } from "./GetWorkflowRunsByIdRequest.js";
export type { GetWorkflowRunsRequest } from "./GetWorkflowRunsRequest.js";
export type { GetWorkflowsRequest } from "./GetWorkflowsRequest.js";
export type { GetWorkflowTagHistoryRequest } from "./GetWorkflowTagHistoryRequest.js";
export type { GetWorkflowVersionsRequest } from "./GetWorkflowVersionsRequest.js";
export type { ListBrowserProfilesRequest } from "./ListBrowserProfilesRequest.js";
export type { LoginRequest } from "./LoginRequest.js";
export type { RetryWorkflowRunRequest } from "./RetryWorkflowRunRequest.js";
export type { RunSdkActionRequest } from "./RunSdkActionRequest.js";
export type { TagApplyRequest } from "./TagApplyRequest.js";
export type { TagKeyUpdate } from "./TagKeyUpdate.js";
export type { TaskRunRequestInput } from "./TaskRunRequestInput.js";
export type { TotpCodeCreate } from "./TotpCodeCreate.js";
export type { UpdateBrowserProfileRequest } from "./UpdateBrowserProfileRequest.js";
export type { UpdateBrowserSessionRequest } from "./UpdateBrowserSessionRequest.js";
export type { UpdateWorkflowFolderRequest } from "./UpdateWorkflowFolderRequest.js";
export type { WorkflowRunRequestInput } from "./WorkflowRunRequestInput.js";
export type { WorkflowTagsBatchRequest } from "./WorkflowTagsBatchRequest.js";

View file

@ -7,16 +7,16 @@ import * as environments from "../../../../environments.js";
import * as errors from "../../../../errors/index.js";
import * as Skyvern from "../../../index.js";
export declare namespace Workflows {
export declare namespace Agents {
export interface Options extends BaseClientOptions {}
export interface RequestOptions extends BaseRequestOptions {}
}
export class Workflows {
protected readonly _options: Workflows.Options;
export class Agents {
protected readonly _options: Agents.Options;
constructor(_options: Workflows.Options = {}) {
constructor(_options: Agents.Options = {}) {
this._options = _options;
}
@ -24,18 +24,18 @@ export class Workflows {
* Clear the persisted browser profile for a workflow that uses `Save & Reuse Session`. The next run will start from a fresh browser state. Use when a saved profile is corrupted.
*
* @param {string} workflowPermanentId - The permanent ID of the workflow. Starts with `wpid_`.
* @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.NotFoundError}
* @throws {@link Skyvern.UnprocessableEntityError}
* @throws {@link Skyvern.InternalServerError}
*
* @example
* await client.workflows.resetWorkflowBrowserProfile("wpid_123")
* await client.agents.resetWorkflowBrowserProfile("wpid_123")
*/
public resetWorkflowBrowserProfile(
workflowPermanentId: string,
requestOptions?: Workflows.RequestOptions,
requestOptions?: Agents.RequestOptions,
): core.HttpResponsePromise<void> {
return core.HttpResponsePromise.fromPromise(
this.__resetWorkflowBrowserProfile(workflowPermanentId, requestOptions),
@ -44,7 +44,7 @@ export class Workflows {
private async __resetWorkflowBrowserProfile(
workflowPermanentId: string,
requestOptions?: Workflows.RequestOptions,
requestOptions?: Agents.RequestOptions,
): Promise<core.WithRawResponse<void>> {
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
@ -56,7 +56,7 @@ export class Workflows {
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/browser_session/reset_profile`,
`v1/agents/${core.url.encodePathParam(workflowPermanentId)}/browser_session/reset_profile`,
),
method: "POST",
headers: _headers,
@ -95,7 +95,7 @@ export class Workflows {
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling POST /v1/workflows/{workflow_permanent_id}/browser_session/reset_profile.",
"Timeout exceeded when calling POST /v1/agents/{workflow_permanent_id}/browser_session/reset_profile.",
);
case "unknown":
throw new errors.SkyvernError({

View file

@ -1,7 +1,6 @@
export * as agents from "./agents/index.js";
export * as artifacts from "./artifacts/index.js";
export * from "./schedules/client/requests/index.js";
export * as schedules from "./schedules/index.js";
export * from "./schedules/types/index.js";
export * as scripts from "./scripts/index.js";
export * as server from "./server/index.js";
export * as workflows from "./workflows/index.js";

View file

@ -149,7 +149,7 @@ export class Schedules {
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules`,
`v1/agents/${core.url.encodePathParam(workflowPermanentId)}/schedules`,
),
method: "GET",
headers: _headers,
@ -184,7 +184,7 @@ export class Schedules {
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling GET /v1/workflows/{workflow_permanent_id}/schedules.",
"Timeout exceeded when calling GET /v1/agents/{workflow_permanent_id}/schedules.",
);
case "unknown":
throw new errors.SkyvernError({
@ -230,7 +230,7 @@ export class Schedules {
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules`,
`v1/agents/${core.url.encodePathParam(workflowPermanentId)}/schedules`,
),
method: "POST",
headers: _headers,
@ -268,7 +268,7 @@ export class Schedules {
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling POST /v1/workflows/{workflow_permanent_id}/schedules.",
"Timeout exceeded when calling POST /v1/agents/{workflow_permanent_id}/schedules.",
);
case "unknown":
throw new errors.SkyvernError({
@ -313,7 +313,7 @@ export class Schedules {
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}`,
`v1/agents/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}`,
),
method: "GET",
headers: _headers,
@ -348,7 +348,7 @@ export class Schedules {
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling GET /v1/workflows/{workflow_permanent_id}/schedules/{workflow_schedule_id}.",
"Timeout exceeded when calling GET /v1/agents/{workflow_permanent_id}/schedules/{workflow_schedule_id}.",
);
case "unknown":
throw new errors.SkyvernError({
@ -399,7 +399,7 @@ export class Schedules {
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}`,
`v1/agents/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}`,
),
method: "PUT",
headers: _headers,
@ -437,7 +437,7 @@ export class Schedules {
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling PUT /v1/workflows/{workflow_permanent_id}/schedules/{workflow_schedule_id}.",
"Timeout exceeded when calling PUT /v1/agents/{workflow_permanent_id}/schedules/{workflow_schedule_id}.",
);
case "unknown":
throw new errors.SkyvernError({
@ -482,7 +482,7 @@ export class Schedules {
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}`,
`v1/agents/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}`,
),
method: "DELETE",
headers: _headers,
@ -517,7 +517,7 @@ export class Schedules {
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling DELETE /v1/workflows/{workflow_permanent_id}/schedules/{workflow_schedule_id}.",
"Timeout exceeded when calling DELETE /v1/agents/{workflow_permanent_id}/schedules/{workflow_schedule_id}.",
);
case "unknown":
throw new errors.SkyvernError({
@ -562,7 +562,7 @@ export class Schedules {
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}/enable`,
`v1/agents/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}/enable`,
),
method: "POST",
headers: _headers,
@ -597,7 +597,7 @@ export class Schedules {
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling POST /v1/workflows/{workflow_permanent_id}/schedules/{workflow_schedule_id}/enable.",
"Timeout exceeded when calling POST /v1/agents/{workflow_permanent_id}/schedules/{workflow_schedule_id}/enable.",
);
case "unknown":
throw new errors.SkyvernError({
@ -642,7 +642,7 @@ export class Schedules {
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}/disable`,
`v1/agents/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}/disable`,
),
method: "POST",
headers: _headers,
@ -677,7 +677,7 @@ export class Schedules {
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling POST /v1/workflows/{workflow_permanent_id}/schedules/{workflow_schedule_id}/disable.",
"Timeout exceeded when calling POST /v1/agents/{workflow_permanent_id}/schedules/{workflow_schedule_id}/disable.",
);
case "unknown":
throw new errors.SkyvernError({

View file

@ -1,84 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js";
import * as core from "../../../../core/index.js";
import * as environments from "../../../../environments.js";
import * as errors from "../../../../errors/index.js";
export declare namespace Server {
export interface Options extends BaseClientOptions {}
export interface RequestOptions extends BaseRequestOptions {}
}
export class Server {
protected readonly _options: Server.Options;
constructor(_options: Server.Options = {}) {
this._options = _options;
}
/**
* Returns the current Skyvern server version (git SHA for official builds).
*
* @param {Server.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
* await client.server.getVersion()
*/
public getVersion(requestOptions?: Server.RequestOptions): core.HttpResponsePromise<Record<string, string>> {
return core.HttpResponsePromise.fromPromise(this.__getVersion(requestOptions));
}
private async __getVersion(
requestOptions?: Server.RequestOptions,
): Promise<core.WithRawResponse<Record<string, string>>> {
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/version",
),
method: "GET",
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 Record<string, string>, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
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 GET /v1/version.");
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
}

View file

@ -1 +0,0 @@
export * from "./client/index.js";

View file

@ -34,6 +34,8 @@ export interface ActionBlock {
include_action_history_in_verification?: boolean;
download_timeout?: number;
include_extracted_text?: boolean;
selector?: string;
ai_fallback?: Skyvern.AiFallbackMode;
}
export namespace ActionBlock {

View file

@ -15,6 +15,8 @@ export interface ActionBlockYaml {
title?: string;
engine?: Skyvern.RunEngine;
navigation_goal?: string;
selector?: string;
ai_fallback?: Skyvern.AiFallbackMode;
error_code_mapping?: Record<string, string | undefined>;
max_retries?: number;
parameter_keys?: string[];

View file

@ -15,6 +15,8 @@ export const ActionType = {
Complete: "complete",
ReloadPage: "reload_page",
ClosePage: "close_page",
NewTab: "new_tab",
SwitchTab: "switch_tab",
Extract: "extract",
VerificationCode: "verification_code",
GotoUrl: "goto_url",

View file

@ -0,0 +1,16 @@
// This file was auto-generated by Fern from our API Definition.
/**
* Controls how an action block uses a CSS/XPath selector relative to AI.
*
* - `fallback`: attempt the selector first; fall back to AI on failure.
* - `proactive`: always use AI; the selector (if any) is a hint only.
*
* When `selector` is None, both modes degrade to AI-only the difference
* is purely semantic (whether the author expected to have a selector here).
*/
export const AiFallbackMode = {
Fallback: "fallback",
Proactive: "proactive",
} as const;
export type AiFallbackMode = (typeof AiFallbackMode)[keyof typeof AiFallbackMode];

View file

@ -2,6 +2,8 @@
export const ArtifactType = {
Recording: "recording",
Audio: "audio",
SessionReplay: "session_replay",
BrowserConsoleLog: "browser_console_log",
SkyvernLog: "skyvern_log",
SkyvernLogRaw: "skyvern_log_raw",

View file

@ -1,12 +1,23 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../index.js";
export interface BrowserProfile {
browser_profile_id: string;
organization_id: string;
name: string;
description?: string;
source_browser_type?: string;
proxy_location?: BrowserProfile.ProxyLocation;
proxy_session_id?: string;
is_managed?: boolean;
workflow_permanent_id?: string;
browser_profile_key_digest?: string;
created_at: string;
modified_at: string;
deleted_at?: string;
}
export namespace BrowserProfile {
export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
}

View file

@ -28,6 +28,8 @@ export interface BrowserSessionResponse {
browser_type?: Skyvern.PersistentBrowserType;
/** ID of the browser profile loaded into this session, if any. browser_profile_id starts with `bp_`. */
browser_profile_id?: string;
/** Whether this session's browser profile will be saved when it ends so it can become a reusable browser profile. */
generate_browser_profile?: boolean;
/** Whether the browser session supports VNC streaming */
vnc_streaming_supported?: boolean;
/** The path where the browser session downloads files */

View file

@ -14,6 +14,12 @@ export interface CreateCredentialRequest {
credential: CreateCredentialRequest.Credential;
/** Which vault to store this credential in. If omitted, uses the instance default. Use this to mix Skyvern-hosted and custom credentials within the same organization. */
vault_type?: Skyvern.CredentialVaultType;
/** Optional proxy location for this credential's pinned proxy identity. */
proxy_location?: CreateCredentialRequest.ProxyLocation;
/** Optional advanced reuse key for this credential's pinned proxy identity. */
proxy_session_id?: string;
/** Rotate the Skyvern-managed proxy sticky-session id when updating this credential. */
rotate_proxy_session_id?: boolean;
}
export namespace CreateCredentialRequest {
@ -24,4 +30,8 @@ export namespace CreateCredentialRequest {
| Skyvern.NonEmptyPasswordCredential
| Skyvern.NonEmptyCreditCardCredential
| Skyvern.SecretCredential;
/**
* Optional proxy location for this credential's pinned proxy identity.
*/
export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
}

View file

@ -24,6 +24,8 @@ export interface CredentialResponse {
user_context?: string;
/** Whether the user intends to save a browser session, regardless of test outcome */
save_browser_session_intent?: boolean;
/** ID of the credential folder this credential belongs to, if any */
folder_id?: string;
}
export namespace CredentialResponse {

View file

@ -3,5 +3,6 @@
export const FileStorageType = {
S3: "s3",
Azure: "azure",
GoogleDrive: "google_drive",
} as const;
export type FileStorageType = (typeof FileStorageType)[keyof typeof FileStorageType];

View file

@ -21,5 +21,7 @@ export interface FileUploadBlock {
azure_storage_account_name?: string;
azure_storage_account_key?: string;
azure_blob_container_name?: string;
google_credential_id?: string;
google_drive_folder_id?: string;
path?: string;
}

View file

@ -20,5 +20,7 @@ export interface FileUploadBlockYaml {
azure_storage_account_key?: string;
azure_blob_container_name?: string;
azure_folder_path?: string;
google_credential_id?: string;
google_drive_folder_id?: string;
path?: string;
}

View file

@ -34,6 +34,7 @@ export interface LoginBlock {
include_action_history_in_verification?: boolean;
download_timeout?: number;
include_extracted_text?: boolean;
skip_saved_profile?: boolean;
}
export namespace LoginBlock {

View file

@ -25,4 +25,5 @@ export interface LoginBlockYaml {
complete_criterion?: string;
terminate_criterion?: string;
complete_verification?: boolean;
skip_saved_profile?: boolean;
}

View file

@ -0,0 +1,12 @@
// This file was auto-generated by Fern from our API Definition.
/**
* One tag to soft-delete: a grouped tag by its ``key``, or a standalone label
* by its ``value`` (omit the key).
*/
export interface TagDeleteInput {
/** Group (key) to delete. Use for grouped tags. */
key?: string;
/** Label (value) to delete. Use for standalone labels. */
value?: string;
}

View file

@ -0,0 +1,15 @@
// This file was auto-generated by Fern from our API Definition.
/**
* One row from ``GET /v1/workflows/{wpid}/tags/history``.
*/
export interface TagHistoryItem {
tag_event_id: string;
key?: string;
value?: string;
event_type: string;
source: string;
set_at: string;
set_by: string;
superseded_at?: string;
}

View file

@ -0,0 +1,8 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../index.js";
export interface TagHistoryResponse {
workflow_permanent_id: string;
events: Skyvern.TagHistoryItem[];
}

View file

@ -0,0 +1,12 @@
// This file was auto-generated by Fern from our API Definition.
/**
* One tag to set. ``value`` is the required label; ``key`` is the optional
* group null for a standalone label, set for a grouped label (e.g. env:prod).
*/
export interface TagInput {
/** Optional group (key). Omit for a standalone label. */
key?: string;
/** Label (value). Always required. */
value: string;
}

View file

@ -0,0 +1,10 @@
// This file was auto-generated by Fern from our API Definition.
/**
* A single tag (key + label) without per-tag attribution. ``key`` is null
* for a standalone label.
*/
export interface TagItem {
key?: string;
value: string;
}

View file

@ -0,0 +1,10 @@
// This file was auto-generated by Fern from our API Definition.
/**
* Tag-key registry entry.
*/
export interface TagKey {
key: string;
description?: string;
workflow_count?: number;
}

View file

@ -0,0 +1,9 @@
// This file was auto-generated by Fern from our API Definition.
/**
* Response for ``DELETE /v1/tag-keys/{key}``.
*/
export interface TagKeyDeleteResponse {
key: string;
removed_from_workflow_count: number;
}

View file

@ -0,0 +1,13 @@
// This file was auto-generated by Fern from our API Definition.
/**
* Current state of one tag (``GET /v1/workflows/{wpid}/tags`` row).
* ``key`` is null for a standalone label.
*/
export interface TagResponse {
key?: string;
value: string;
source: string;
set_at: string;
set_by: string;
}

View file

@ -0,0 +1,12 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../index.js";
/**
* Current tags for a workflow. A list (not a key-map) so standalone labels,
* which have no key, are representable.
*/
export interface TagsResponse {
workflow_permanent_id: string;
tags: Skyvern.TagResponse[];
}

View file

@ -39,6 +39,8 @@ export interface Workflow {
created_at: string;
modified_at: string;
deleted_at?: string;
/** Alias of `workflow_permanent_id` — the stable agent identifier (starts with `wpid_`). */
agent_id?: string;
}
export namespace Workflow {

View file

@ -3,7 +3,7 @@
import type * as Skyvern from "../index.js";
export interface WorkflowRunRequestOutput {
/** ID of the workflow to run. Workflow ID starts with `wpid_`. */
/** ID of the agent to run. Starts with `wpid_`. `workflow_id` is accepted as an alias. */
workflow_id: string;
/** Parameters to pass to the workflow */
parameters?: Record<string, unknown>;
@ -62,7 +62,7 @@ export interface WorkflowRunRequestOutput {
browser_profile_id?: string;
/** The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot. */
max_screenshot_scrolls?: number;
/** Timeout this workflow run after the configured elapsed runtime in minutes. Maximum runtime is 4 hours. */
/** Timeout this workflow run after the configured elapsed runtime in minutes. When omitted, the platform default is 240 minutes. The maximum configurable value is 480 minutes. */
max_elapsed_time_minutes?: number;
/** The extra HTTP headers for the requests in browser. */
extra_http_headers?: Record<string, string | undefined>;

View file

@ -0,0 +1,14 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../index.js";
/**
* Response for the batch endpoint.
*
* Workflows with no tags are present with an empty list so the frontend can
* distinguish "fetched, none set" from "not fetched" without a second call.
* Workflows outside the caller's org are silently absent (no leakage).
*/
export interface WorkflowTagsBatchResponse {
workflow_tags: Record<string, Skyvern.TagItem[]>;
}

View file

@ -5,6 +5,7 @@ export * from "./ActionBlockParametersItem.js";
export * from "./ActionBlockYaml.js";
export * from "./ActionStatus.js";
export * from "./ActionType.js";
export * from "./AiFallbackMode.js";
export * from "./Artifact.js";
export * from "./ArtifactType.js";
export * from "./AwsSecretParameter.js";
@ -132,6 +133,15 @@ export * from "./SendEmailBlock.js";
export * from "./SendEmailBlockYaml.js";
export * from "./SkyvernForgeSdkSchemasCredentialsCredentialType.js";
export * from "./SkyvernSchemasCredentialTypeCredentialType.js";
export * from "./TagDeleteInput.js";
export * from "./TagHistoryItem.js";
export * from "./TagHistoryResponse.js";
export * from "./TagInput.js";
export * from "./TagItem.js";
export * from "./TagKey.js";
export * from "./TagKeyDeleteResponse.js";
export * from "./TagResponse.js";
export * from "./TagsResponse.js";
export * from "./TaskBlock.js";
export * from "./TaskBlockParametersItem.js";
export * from "./TaskBlockYaml.js";
@ -194,6 +204,7 @@ export * from "./WorkflowScheduleListResponse.js";
export * from "./WorkflowScheduleResponse.js";
export * from "./WorkflowScheduleUpsertRequest.js";
export * from "./WorkflowStatus.js";
export * from "./WorkflowTagsBatchResponse.js";
export * from "./WorkflowTriggerBlock.js";
export * from "./WorkflowTriggerBlockParametersItem.js";
export * from "./WorkflowTriggerBlockYaml.js";

View file

@ -17,12 +17,12 @@ export interface SkyvernOptions extends BaseClientOptions {
apiKey: string;
}
export interface RunTaskOptions extends SkyvernApi.RunTaskRequest {
export interface RunTaskOptions extends SkyvernApi.TaskRunRequestInput {
waitForCompletion?: boolean;
timeout?: number;
}
export interface RunWorkflowOptions extends SkyvernApi.RunWorkflowRequest {
export interface RunWorkflowOptions extends SkyvernApi.WorkflowRunRequestInput {
waitForCompletion?: boolean;
timeout?: number;
}

View file

@ -64,21 +64,19 @@ export class SkyvernBrowserPageAgent {
const taskRun = await this._browser.skyvern.runTask({
"x-user-agent": "skyvern-sdk",
body: {
prompt: prompt,
engine: options?.engine,
model: options?.model,
url: options?.url ?? this._getPageUrl(),
webhook_url: options?.webhookUrl,
totp_identifier: options?.totpIdentifier,
totp_url: options?.totpUrl,
title: options?.title,
error_code_mapping: options?.errorCodeMapping,
data_extraction_schema: options?.dataExtractionSchema,
max_steps: options?.maxSteps,
browser_session_id: this._browser.browserSessionId,
browser_address: this._browser.browserAddress,
},
prompt: prompt,
engine: options?.engine,
model: options?.model,
url: options?.url ?? this._getPageUrl(),
webhook_url: options?.webhookUrl,
totp_identifier: options?.totpIdentifier,
totp_url: options?.totpUrl,
title: options?.title,
error_code_mapping: options?.errorCodeMapping,
data_extraction_schema: options?.dataExtractionSchema,
max_steps: options?.maxSteps,
browser_session_id: this._browser.browserSessionId,
browser_address: this._browser.browserAddress,
});
if (this._browser.skyvern.environment === SkyvernEnvironment.Cloud) {
@ -191,7 +189,7 @@ export class SkyvernBrowserPageAgent {
},
): Promise<Skyvern.WorkflowRunResponse>;
async login(
credentialType: Skyvern.SkyvernSchemasRunBlocksCredentialType,
credentialType: Skyvern.SkyvernSchemasCredentialTypeCredentialType,
options: {
url?: string;
credentialId?: string;
@ -350,16 +348,14 @@ export class SkyvernBrowserPageAgent {
{
"x-user-agent": "skyvern-sdk",
template: options?.template,
body: {
workflow_id: workflowId,
parameters: options?.parameters,
title: options?.title,
webhook_url: options?.webhookUrl,
totp_url: options?.totpUrl,
totp_identifier: options?.totpIdentifier,
browser_session_id: this._browser.browserSessionId,
browser_address: this._browser.browserAddress,
},
agent_id: workflowId,
parameters: options?.parameters,
title: options?.title,
webhook_url: options?.webhookUrl,
totp_url: options?.totpUrl,
totp_identifier: options?.totpIdentifier,
browser_session_id: this._browser.browserSessionId,
browser_address: this._browser.browserAddress,
},
{
headers: { "x-user-agent": "skyvern-sdk" },

View file

@ -1 +1 @@
export const SDK_VERSION = "1.0.37";
export const SDK_VERSION = "1.0.45";

View file

@ -4,19 +4,19 @@ import * as Skyvern from "../../src/api/index";
import { SkyvernClient } from "../../src/Client";
import { mockServerPool } from "../mock-server/MockServerPool";
describe("Workflows", () => {
describe("Agents", () => {
test("reset_workflow_browser_profile (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
server
.mockEndpoint()
.post("/v1/workflows/wpid_123/browser_session/reset_profile")
.post("/v1/agents/wpid_123/browser_session/reset_profile")
.respondWith()
.statusCode(200)
.build();
const response = await client.workflows.resetWorkflowBrowserProfile("wpid_123");
const response = await client.agents.resetWorkflowBrowserProfile("wpid_123");
expect(response).toEqual(undefined);
});
@ -27,14 +27,14 @@ describe("Workflows", () => {
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/v1/workflows/workflow_permanent_id/browser_session/reset_profile")
.post("/v1/agents/workflow_permanent_id/browser_session/reset_profile")
.respondWith()
.statusCode(404)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.workflows.resetWorkflowBrowserProfile("workflow_permanent_id");
return await client.agents.resetWorkflowBrowserProfile("workflow_permanent_id");
}).rejects.toThrow(Skyvern.NotFoundError);
});
@ -45,14 +45,14 @@ describe("Workflows", () => {
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/v1/workflows/workflow_permanent_id/browser_session/reset_profile")
.post("/v1/agents/workflow_permanent_id/browser_session/reset_profile")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.workflows.resetWorkflowBrowserProfile("workflow_permanent_id");
return await client.agents.resetWorkflowBrowserProfile("workflow_permanent_id");
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
@ -63,14 +63,14 @@ describe("Workflows", () => {
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/v1/workflows/workflow_permanent_id/browser_session/reset_profile")
.post("/v1/agents/workflow_permanent_id/browser_session/reset_profile")
.respondWith()
.statusCode(500)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.workflows.resetWorkflowBrowserProfile("workflow_permanent_id");
return await client.agents.resetWorkflowBrowserProfile("workflow_permanent_id");
}).rejects.toThrow(Skyvern.InternalServerError);
});
});

File diff suppressed because it is too large Load diff

View file

@ -102,7 +102,7 @@ describe("Schedules", () => {
};
server
.mockEndpoint()
.get("/v1/workflows/workflow_permanent_id/schedules")
.get("/v1/agents/workflow_permanent_id/schedules")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
@ -139,7 +139,7 @@ describe("Schedules", () => {
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.get("/v1/workflows/workflow_permanent_id/schedules")
.get("/v1/agents/workflow_permanent_id/schedules")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
@ -174,7 +174,7 @@ describe("Schedules", () => {
};
server
.mockEndpoint()
.post("/v1/workflows/workflow_permanent_id/schedules")
.post("/v1/agents/workflow_permanent_id/schedules")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(200)
@ -214,7 +214,7 @@ describe("Schedules", () => {
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/v1/workflows/workflow_permanent_id/schedules")
.post("/v1/agents/workflow_permanent_id/schedules")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(422)
@ -253,7 +253,7 @@ describe("Schedules", () => {
};
server
.mockEndpoint()
.get("/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.get("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
@ -289,7 +289,7 @@ describe("Schedules", () => {
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.get("/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.get("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
@ -324,7 +324,7 @@ describe("Schedules", () => {
};
server
.mockEndpoint()
.put("/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.put("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(200)
@ -364,7 +364,7 @@ describe("Schedules", () => {
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.put("/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.put("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(422)
@ -386,7 +386,7 @@ describe("Schedules", () => {
const rawResponseBody = { ok: true };
server
.mockEndpoint()
.delete("/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.delete("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
@ -405,7 +405,7 @@ describe("Schedules", () => {
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.delete("/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.delete("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
@ -440,7 +440,7 @@ describe("Schedules", () => {
};
server
.mockEndpoint()
.post("/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id/enable")
.post("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id/enable")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
@ -476,7 +476,7 @@ describe("Schedules", () => {
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id/enable")
.post("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id/enable")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
@ -511,7 +511,7 @@ describe("Schedules", () => {
};
server
.mockEndpoint()
.post("/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id/disable")
.post("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id/disable")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
@ -547,7 +547,7 @@ describe("Schedules", () => {
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id/disable")
.post("/v1/agents/workflow_permanent_id/schedules/workflow_schedule_id/disable")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)

View file

@ -1,19 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
import { SkyvernClient } from "../../src/Client";
import { mockServerPool } from "../mock-server/MockServerPool";
describe("Server", () => {
test("getVersion", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server.mockEndpoint().get("/v1/version").respondWith().statusCode(200).jsonBody(rawResponseBody).build();
const response = await client.server.getVersion();
expect(response).toEqual({
key: "value",
});
});
});

View file

@ -28,6 +28,7 @@ if typing.TYPE_CHECKING:
ActionOutput,
ActionStatus,
ActionType,
AiFallbackMode,
Artifact,
ArtifactType,
AwsSecretParameter,
@ -50,6 +51,7 @@ if typing.TYPE_CHECKING:
BranchCriteriaYaml,
BranchCriteriaYamlCriteriaType,
BrowserProfile,
BrowserProfileProxyLocation,
BrowserSessionResponse,
BulkCancelRunsResponse,
ClickAction,
@ -86,9 +88,11 @@ if typing.TYPE_CHECKING:
ContextParameterSource_Workflow,
ContextParameterValue,
ContextParameterYaml,
CreateBrowserProfileRequestProxyLocation,
CreateBrowserSessionRequestProxyLocation,
CreateCredentialRequest,
CreateCredentialRequestCredential,
CreateCredentialRequestProxyLocation,
CreateScriptResponse,
CredentialParameter,
CredentialParameterYaml,
@ -379,6 +383,15 @@ if typing.TYPE_CHECKING:
SendEmailBlockYaml,
SkyvernForgeSdkSchemasCredentialsCredentialType,
SkyvernSchemasCredentialTypeCredentialType,
TagDeleteInput,
TagHistoryItem,
TagHistoryResponse,
TagInput,
TagItem,
TagKey,
TagKeyDeleteResponse,
TagResponse,
TagsResponse,
TaskBlock,
TaskBlockDataSchema,
TaskBlockParametersItem,
@ -424,6 +437,7 @@ if typing.TYPE_CHECKING:
ThoughtType,
TotpCode,
TotpType,
UpdateBrowserProfileRequestProxyLocation,
UploadFileAction,
UploadFileActionData,
UploadFileResponse,
@ -649,6 +663,7 @@ if typing.TYPE_CHECKING:
WorkflowScheduleResponse,
WorkflowScheduleUpsertRequest,
WorkflowStatus,
WorkflowTagsBatchResponse,
WorkflowTriggerBlock,
WorkflowTriggerBlockParametersItem,
WorkflowTriggerBlockParametersItem_AwsSecret,
@ -673,7 +688,7 @@ if typing.TYPE_CHECKING:
RangeNotSatisfiableError,
UnprocessableEntityError,
)
from . import artifacts, schedules, scripts, server, workflows
from . import agents, artifacts, schedules, scripts
from .client import AsyncSkyvern, Skyvern
from .environment import SkyvernEnvironment
from .schedules import SchedulesListAllRequestStatus
@ -700,6 +715,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ActionOutput": ".types",
"ActionStatus": ".types",
"ActionType": ".types",
"AiFallbackMode": ".types",
"Artifact": ".types",
"ArtifactType": ".types",
"AsyncSkyvern": ".client",
@ -724,6 +740,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"BranchCriteriaYaml": ".types",
"BranchCriteriaYamlCriteriaType": ".types",
"BrowserProfile": ".types",
"BrowserProfileProxyLocation": ".types",
"BrowserSessionResponse": ".types",
"BulkCancelRunsResponse": ".types",
"ClickAction": ".types",
@ -761,9 +778,11 @@ _dynamic_imports: typing.Dict[str, str] = {
"ContextParameterSource_Workflow": ".types",
"ContextParameterValue": ".types",
"ContextParameterYaml": ".types",
"CreateBrowserProfileRequestProxyLocation": ".types",
"CreateBrowserSessionRequestProxyLocation": ".types",
"CreateCredentialRequest": ".types",
"CreateCredentialRequestCredential": ".types",
"CreateCredentialRequestProxyLocation": ".types",
"CreateScriptResponse": ".types",
"CredentialParameter": ".types",
"CredentialParameterYaml": ".types",
@ -1061,6 +1080,15 @@ _dynamic_imports: typing.Dict[str, str] = {
"SkyvernEnvironment": ".environment",
"SkyvernForgeSdkSchemasCredentialsCredentialType": ".types",
"SkyvernSchemasCredentialTypeCredentialType": ".types",
"TagDeleteInput": ".types",
"TagHistoryItem": ".types",
"TagHistoryResponse": ".types",
"TagInput": ".types",
"TagItem": ".types",
"TagKey": ".types",
"TagKeyDeleteResponse": ".types",
"TagResponse": ".types",
"TagsResponse": ".types",
"TaskBlock": ".types",
"TaskBlockDataSchema": ".types",
"TaskBlockParametersItem": ".types",
@ -1107,6 +1135,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"TotpCode": ".types",
"TotpType": ".types",
"UnprocessableEntityError": ".errors",
"UpdateBrowserProfileRequestProxyLocation": ".types",
"UploadFileAction": ".types",
"UploadFileActionData": ".types",
"UploadFileResponse": ".types",
@ -1332,6 +1361,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowScheduleResponse": ".types",
"WorkflowScheduleUpsertRequest": ".types",
"WorkflowStatus": ".types",
"WorkflowTagsBatchResponse": ".types",
"WorkflowTriggerBlock": ".types",
"WorkflowTriggerBlockParametersItem": ".types",
"WorkflowTriggerBlockParametersItem_AwsSecret": ".types",
@ -1347,11 +1377,10 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowTriggerBlockParametersItem_Workflow": ".types",
"WorkflowTriggerBlockYaml": ".types",
"__version__": ".version",
"agents": ".agents",
"artifacts": ".artifacts",
"schedules": ".schedules",
"scripts": ".scripts",
"server": ".server",
"workflows": ".workflows",
}
@ -1398,6 +1427,7 @@ __all__ = [
"ActionOutput",
"ActionStatus",
"ActionType",
"AiFallbackMode",
"Artifact",
"ArtifactType",
"AsyncSkyvern",
@ -1422,6 +1452,7 @@ __all__ = [
"BranchCriteriaYaml",
"BranchCriteriaYamlCriteriaType",
"BrowserProfile",
"BrowserProfileProxyLocation",
"BrowserSessionResponse",
"BulkCancelRunsResponse",
"ClickAction",
@ -1459,9 +1490,11 @@ __all__ = [
"ContextParameterSource_Workflow",
"ContextParameterValue",
"ContextParameterYaml",
"CreateBrowserProfileRequestProxyLocation",
"CreateBrowserSessionRequestProxyLocation",
"CreateCredentialRequest",
"CreateCredentialRequestCredential",
"CreateCredentialRequestProxyLocation",
"CreateScriptResponse",
"CredentialParameter",
"CredentialParameterYaml",
@ -1759,6 +1792,15 @@ __all__ = [
"SkyvernEnvironment",
"SkyvernForgeSdkSchemasCredentialsCredentialType",
"SkyvernSchemasCredentialTypeCredentialType",
"TagDeleteInput",
"TagHistoryItem",
"TagHistoryResponse",
"TagInput",
"TagItem",
"TagKey",
"TagKeyDeleteResponse",
"TagResponse",
"TagsResponse",
"TaskBlock",
"TaskBlockDataSchema",
"TaskBlockParametersItem",
@ -1805,6 +1847,7 @@ __all__ = [
"TotpCode",
"TotpType",
"UnprocessableEntityError",
"UpdateBrowserProfileRequestProxyLocation",
"UploadFileAction",
"UploadFileActionData",
"UploadFileResponse",
@ -2030,6 +2073,7 @@ __all__ = [
"WorkflowScheduleResponse",
"WorkflowScheduleUpsertRequest",
"WorkflowStatus",
"WorkflowTagsBatchResponse",
"WorkflowTriggerBlock",
"WorkflowTriggerBlockParametersItem",
"WorkflowTriggerBlockParametersItem_AwsSecret",
@ -2045,9 +2089,8 @@ __all__ = [
"WorkflowTriggerBlockParametersItem_Workflow",
"WorkflowTriggerBlockYaml",
"__version__",
"agents",
"artifacts",
"schedules",
"scripts",
"server",
"workflows",
]

View file

@ -4,21 +4,21 @@ import typing
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from .raw_client import AsyncRawWorkflowsClient, RawWorkflowsClient
from .raw_client import AsyncRawAgentsClient, RawAgentsClient
class WorkflowsClient:
class AgentsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._raw_client = RawWorkflowsClient(client_wrapper=client_wrapper)
self._raw_client = RawAgentsClient(client_wrapper=client_wrapper)
@property
def with_raw_response(self) -> RawWorkflowsClient:
def with_raw_response(self) -> RawAgentsClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
RawWorkflowsClient
RawAgentsClient
"""
return self._raw_client
@ -47,7 +47,7 @@ class WorkflowsClient:
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.workflows.reset_workflow_browser_profile(
client.agents.reset_workflow_browser_profile(
workflow_permanent_id="wpid_123",
)
"""
@ -57,18 +57,18 @@ class WorkflowsClient:
return _response.data
class AsyncWorkflowsClient:
class AsyncAgentsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._raw_client = AsyncRawWorkflowsClient(client_wrapper=client_wrapper)
self._raw_client = AsyncRawAgentsClient(client_wrapper=client_wrapper)
@property
def with_raw_response(self) -> AsyncRawWorkflowsClient:
def with_raw_response(self) -> AsyncRawAgentsClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
AsyncRawWorkflowsClient
AsyncRawAgentsClient
"""
return self._raw_client
@ -102,7 +102,7 @@ class AsyncWorkflowsClient:
async def main() -> None:
await client.workflows.reset_workflow_browser_profile(
await client.agents.reset_workflow_browser_profile(
workflow_permanent_id="wpid_123",
)

View file

@ -14,7 +14,7 @@ from ..errors.not_found_error import NotFoundError
from ..errors.unprocessable_entity_error import UnprocessableEntityError
class RawWorkflowsClient:
class RawAgentsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
@ -37,7 +37,7 @@ class RawWorkflowsClient:
HttpResponse[None]
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/browser_session/reset_profile",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/browser_session/reset_profile",
method="POST",
request_options=request_options,
)
@ -83,7 +83,7 @@ class RawWorkflowsClient:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawWorkflowsClient:
class AsyncRawAgentsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
@ -106,7 +106,7 @@ class AsyncRawWorkflowsClient:
AsyncHttpResponse[None]
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/browser_session/reset_profile",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/browser_session/reset_profile",
method="POST",
request_options=request_options,
)

File diff suppressed because it is too large Load diff

View file

@ -22,10 +22,10 @@ class BaseClientWrapper:
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"User-Agent": "skyvern/1.0.37",
"User-Agent": "skyvern/1.0.45",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "skyvern",
"X-Fern-SDK-Version": "1.0.37",
"X-Fern-SDK-Version": "1.0.45",
**(self.get_custom_headers() or {}),
}
if self._api_key is not None:

View file

@ -209,6 +209,7 @@ def update_forward_refs(model: Type["Model"], **localns: Any) -> None:
try:
model.model_rebuild(raise_errors=False) # type: ignore[attr-defined]
except KeyError as exc:
# Manual patch (reapplied by scripts/patch_generated_client.py):
# Pydantic v2 can still raise internal schema-gathering KeyErrors
# for Fern-generated recursive unions even with raise_errors=False.
# Match on the "definitions" key rather than the exact args tuple so a

File diff suppressed because it is too large Load diff

View file

@ -108,7 +108,7 @@ class RawSchedulesClient:
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules",
method="GET",
request_options=request_options,
)
@ -176,7 +176,7 @@ class RawSchedulesClient:
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules",
method="POST",
json={
"cron_expression": cron_expression,
@ -241,7 +241,7 @@ class RawSchedulesClient:
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
method="GET",
request_options=request_options,
)
@ -312,7 +312,7 @@ class RawSchedulesClient:
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
method="PUT",
json={
"cron_expression": cron_expression,
@ -377,7 +377,7 @@ class RawSchedulesClient:
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
method="DELETE",
request_options=request_options,
)
@ -430,7 +430,7 @@ class RawSchedulesClient:
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/enable",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/enable",
method="POST",
request_options=request_options,
)
@ -483,7 +483,7 @@ class RawSchedulesClient:
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/disable",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/disable",
method="POST",
request_options=request_options,
)
@ -602,7 +602,7 @@ class AsyncRawSchedulesClient:
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules",
method="GET",
request_options=request_options,
)
@ -670,7 +670,7 @@ class AsyncRawSchedulesClient:
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules",
method="POST",
json={
"cron_expression": cron_expression,
@ -735,7 +735,7 @@ class AsyncRawSchedulesClient:
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
method="GET",
request_options=request_options,
)
@ -806,7 +806,7 @@ class AsyncRawSchedulesClient:
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
method="PUT",
json={
"cron_expression": cron_expression,
@ -871,7 +871,7 @@ class AsyncRawSchedulesClient:
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}",
method="DELETE",
request_options=request_options,
)
@ -924,7 +924,7 @@ class AsyncRawSchedulesClient:
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/enable",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/enable",
method="POST",
request_options=request_options,
)
@ -977,7 +977,7 @@ class AsyncRawSchedulesClient:
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/workflows/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/disable",
f"v1/agents/{jsonable_encoder(workflow_permanent_id)}/schedules/{jsonable_encoder(workflow_schedule_id)}/disable",
method="POST",
request_options=request_options,
)

View file

@ -1,99 +0,0 @@
# 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 AsyncRawServerClient, RawServerClient
class ServerClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._raw_client = RawServerClient(client_wrapper=client_wrapper)
@property
def with_raw_response(self) -> RawServerClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
RawServerClient
"""
return self._raw_client
def get_version(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Dict[str, str]:
"""
Returns the current Skyvern server version (git SHA for official builds).
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.Dict[str, str]
Current server version
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.server.get_version()
"""
_response = self._raw_client.get_version(request_options=request_options)
return _response.data
class AsyncServerClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._raw_client = AsyncRawServerClient(client_wrapper=client_wrapper)
@property
def with_raw_response(self) -> AsyncRawServerClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
AsyncRawServerClient
"""
return self._raw_client
async def get_version(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Dict[str, str]:
"""
Returns the current Skyvern server version (git SHA for official builds).
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.Dict[str, str]
Current server version
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.server.get_version()
asyncio.run(main())
"""
_response = await self._raw_client.get_version(request_options=request_options)
return _response.data

View file

@ -1,92 +0,0 @@
# 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.pydantic_utilities import parse_obj_as
from ..core.request_options import RequestOptions
class RawServerClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
def get_version(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[typing.Dict[str, str]]:
"""
Returns the current Skyvern server version (git SHA for official builds).
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[typing.Dict[str, str]]
Current server version
"""
_response = self._client_wrapper.httpx_client.request(
"v1/version",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
typing.Dict[str, str],
parse_obj_as(
type_=typing.Dict[str, str], # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
_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 AsyncRawServerClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
async def get_version(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[typing.Dict[str, str]]:
"""
Returns the current Skyvern server version (git SHA for official builds).
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[typing.Dict[str, str]]
Current server version
"""
_response = await self._client_wrapper.httpx_client.request(
"v1/version",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
typing.Dict[str, str],
parse_obj_as(
type_=typing.Dict[str, str], # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
_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)

View file

@ -29,6 +29,7 @@ if typing.TYPE_CHECKING:
from .action_output import ActionOutput
from .action_status import ActionStatus
from .action_type import ActionType
from .ai_fallback_mode import AiFallbackMode
from .artifact import Artifact
from .artifact_type import ArtifactType
from .aws_secret_parameter import AwsSecretParameter
@ -53,6 +54,7 @@ if typing.TYPE_CHECKING:
from .branch_criteria_yaml import BranchCriteriaYaml
from .branch_criteria_yaml_criteria_type import BranchCriteriaYamlCriteriaType
from .browser_profile import BrowserProfile
from .browser_profile_proxy_location import BrowserProfileProxyLocation
from .browser_session_response import BrowserSessionResponse
from .bulk_cancel_runs_response import BulkCancelRunsResponse
from .click_action import ClickAction
@ -93,9 +95,11 @@ if typing.TYPE_CHECKING:
)
from .context_parameter_value import ContextParameterValue
from .context_parameter_yaml import ContextParameterYaml
from .create_browser_profile_request_proxy_location import CreateBrowserProfileRequestProxyLocation
from .create_browser_session_request_proxy_location import CreateBrowserSessionRequestProxyLocation
from .create_credential_request import CreateCredentialRequest
from .create_credential_request_credential import CreateCredentialRequestCredential
from .create_credential_request_proxy_location import CreateCredentialRequestProxyLocation
from .create_script_response import CreateScriptResponse
from .credential_parameter import CredentialParameter
from .credential_parameter_yaml import CredentialParameterYaml
@ -414,6 +418,15 @@ if typing.TYPE_CHECKING:
from .send_email_block_yaml import SendEmailBlockYaml
from .skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
from .skyvern_schemas_credential_type_credential_type import SkyvernSchemasCredentialTypeCredentialType
from .tag_delete_input import TagDeleteInput
from .tag_history_item import TagHistoryItem
from .tag_history_response import TagHistoryResponse
from .tag_input import TagInput
from .tag_item import TagItem
from .tag_key import TagKey
from .tag_key_delete_response import TagKeyDeleteResponse
from .tag_response import TagResponse
from .tags_response import TagsResponse
from .task_block import TaskBlock
from .task_block_data_schema import TaskBlockDataSchema
from .task_block_parameters_item import (
@ -463,6 +476,7 @@ if typing.TYPE_CHECKING:
from .thought_type import ThoughtType
from .totp_code import TotpCode
from .totp_type import TotpType
from .update_browser_profile_request_proxy_location import UpdateBrowserProfileRequestProxyLocation
from .upload_file_action import UploadFileAction
from .upload_file_action_data import UploadFileActionData
from .upload_file_response import UploadFileResponse
@ -708,6 +722,7 @@ if typing.TYPE_CHECKING:
from .workflow_schedule_response import WorkflowScheduleResponse
from .workflow_schedule_upsert_request import WorkflowScheduleUpsertRequest
from .workflow_status import WorkflowStatus
from .workflow_tags_batch_response import WorkflowTagsBatchResponse
from .workflow_trigger_block import WorkflowTriggerBlock
from .workflow_trigger_block_parameters_item import (
WorkflowTriggerBlockParametersItem,
@ -746,6 +761,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ActionOutput": ".action_output",
"ActionStatus": ".action_status",
"ActionType": ".action_type",
"AiFallbackMode": ".ai_fallback_mode",
"Artifact": ".artifact",
"ArtifactType": ".artifact_type",
"AwsSecretParameter": ".aws_secret_parameter",
@ -768,6 +784,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"BranchCriteriaYaml": ".branch_criteria_yaml",
"BranchCriteriaYamlCriteriaType": ".branch_criteria_yaml_criteria_type",
"BrowserProfile": ".browser_profile",
"BrowserProfileProxyLocation": ".browser_profile_proxy_location",
"BrowserSessionResponse": ".browser_session_response",
"BulkCancelRunsResponse": ".bulk_cancel_runs_response",
"ClickAction": ".click_action",
@ -804,9 +821,11 @@ _dynamic_imports: typing.Dict[str, str] = {
"ContextParameterSource_Workflow": ".context_parameter_source",
"ContextParameterValue": ".context_parameter_value",
"ContextParameterYaml": ".context_parameter_yaml",
"CreateBrowserProfileRequestProxyLocation": ".create_browser_profile_request_proxy_location",
"CreateBrowserSessionRequestProxyLocation": ".create_browser_session_request_proxy_location",
"CreateCredentialRequest": ".create_credential_request",
"CreateCredentialRequestCredential": ".create_credential_request_credential",
"CreateCredentialRequestProxyLocation": ".create_credential_request_proxy_location",
"CreateScriptResponse": ".create_script_response",
"CredentialParameter": ".credential_parameter",
"CredentialParameterYaml": ".credential_parameter_yaml",
@ -1097,6 +1116,15 @@ _dynamic_imports: typing.Dict[str, str] = {
"SendEmailBlockYaml": ".send_email_block_yaml",
"SkyvernForgeSdkSchemasCredentialsCredentialType": ".skyvern_forge_sdk_schemas_credentials_credential_type",
"SkyvernSchemasCredentialTypeCredentialType": ".skyvern_schemas_credential_type_credential_type",
"TagDeleteInput": ".tag_delete_input",
"TagHistoryItem": ".tag_history_item",
"TagHistoryResponse": ".tag_history_response",
"TagInput": ".tag_input",
"TagItem": ".tag_item",
"TagKey": ".tag_key",
"TagKeyDeleteResponse": ".tag_key_delete_response",
"TagResponse": ".tag_response",
"TagsResponse": ".tags_response",
"TaskBlock": ".task_block",
"TaskBlockDataSchema": ".task_block_data_schema",
"TaskBlockParametersItem": ".task_block_parameters_item",
@ -1142,6 +1170,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ThoughtType": ".thought_type",
"TotpCode": ".totp_code",
"TotpType": ".totp_type",
"UpdateBrowserProfileRequestProxyLocation": ".update_browser_profile_request_proxy_location",
"UploadFileAction": ".upload_file_action",
"UploadFileActionData": ".upload_file_action_data",
"UploadFileResponse": ".upload_file_response",
@ -1367,6 +1396,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowScheduleResponse": ".workflow_schedule_response",
"WorkflowScheduleUpsertRequest": ".workflow_schedule_upsert_request",
"WorkflowStatus": ".workflow_status",
"WorkflowTagsBatchResponse": ".workflow_tags_batch_response",
"WorkflowTriggerBlock": ".workflow_trigger_block",
"WorkflowTriggerBlockParametersItem": ".workflow_trigger_block_parameters_item",
"WorkflowTriggerBlockParametersItem_AwsSecret": ".workflow_trigger_block_parameters_item",
@ -1427,6 +1457,7 @@ __all__ = [
"ActionOutput",
"ActionStatus",
"ActionType",
"AiFallbackMode",
"Artifact",
"ArtifactType",
"AwsSecretParameter",
@ -1449,6 +1480,7 @@ __all__ = [
"BranchCriteriaYaml",
"BranchCriteriaYamlCriteriaType",
"BrowserProfile",
"BrowserProfileProxyLocation",
"BrowserSessionResponse",
"BulkCancelRunsResponse",
"ClickAction",
@ -1485,9 +1517,11 @@ __all__ = [
"ContextParameterSource_Workflow",
"ContextParameterValue",
"ContextParameterYaml",
"CreateBrowserProfileRequestProxyLocation",
"CreateBrowserSessionRequestProxyLocation",
"CreateCredentialRequest",
"CreateCredentialRequestCredential",
"CreateCredentialRequestProxyLocation",
"CreateScriptResponse",
"CredentialParameter",
"CredentialParameterYaml",
@ -1778,6 +1812,15 @@ __all__ = [
"SendEmailBlockYaml",
"SkyvernForgeSdkSchemasCredentialsCredentialType",
"SkyvernSchemasCredentialTypeCredentialType",
"TagDeleteInput",
"TagHistoryItem",
"TagHistoryResponse",
"TagInput",
"TagItem",
"TagKey",
"TagKeyDeleteResponse",
"TagResponse",
"TagsResponse",
"TaskBlock",
"TaskBlockDataSchema",
"TaskBlockParametersItem",
@ -1823,6 +1866,7 @@ __all__ = [
"ThoughtType",
"TotpCode",
"TotpType",
"UpdateBrowserProfileRequestProxyLocation",
"UploadFileAction",
"UploadFileActionData",
"UploadFileResponse",
@ -2048,6 +2092,7 @@ __all__ = [
"WorkflowScheduleResponse",
"WorkflowScheduleUpsertRequest",
"WorkflowStatus",
"WorkflowTagsBatchResponse",
"WorkflowTriggerBlock",
"WorkflowTriggerBlockParametersItem",
"WorkflowTriggerBlockParametersItem_AwsSecret",

View file

@ -8,6 +8,7 @@ import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
from .action_block_data_schema import ActionBlockDataSchema
from .action_block_parameters_item import ActionBlockParametersItem
from .ai_fallback_mode import AiFallbackMode
from .output_parameter import OutputParameter
from .run_engine import RunEngine
@ -50,6 +51,8 @@ class ActionBlock(UniversalBaseModel):
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
include_extracted_text: typing.Optional[bool] = None
selector: typing.Optional[str] = None
ai_fallback: typing.Optional[AiFallbackMode] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View file

@ -4,6 +4,7 @@ import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .ai_fallback_mode import AiFallbackMode
from .run_engine import RunEngine
@ -26,6 +27,8 @@ class ActionBlockYaml(UniversalBaseModel):
title: typing.Optional[str] = None
engine: typing.Optional[RunEngine] = None
navigation_goal: typing.Optional[str] = None
selector: typing.Optional[str] = None
ai_fallback: typing.Optional[AiFallbackMode] = None
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
max_retries: typing.Optional[int] = None
parameter_keys: typing.Optional[typing.List[str]] = None

View file

@ -18,6 +18,8 @@ ActionType = typing.Union[
"complete",
"reload_page",
"close_page",
"new_tab",
"switch_tab",
"extract",
"verification_code",
"goto_url",

View file

@ -0,0 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
import typing
AiFallbackMode = typing.Union[typing.Literal["fallback", "proactive"], typing.Any]

View file

@ -5,6 +5,8 @@ import typing
ArtifactType = typing.Union[
typing.Literal[
"recording",
"audio",
"session_replay",
"browser_console_log",
"skyvern_log",
"skyvern_log_raw",

View file

@ -5,7 +5,7 @@ import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .proxy_location import ProxyLocation
from .browser_profile_proxy_location import BrowserProfileProxyLocation
class BrowserProfile(UniversalBaseModel):
@ -14,8 +14,11 @@ class BrowserProfile(UniversalBaseModel):
name: str
description: typing.Optional[str] = None
source_browser_type: typing.Optional[str] = None
proxy_location: typing.Optional[ProxyLocation] = None
proxy_location: typing.Optional[BrowserProfileProxyLocation] = None
proxy_session_id: typing.Optional[str] = None
is_managed: typing.Optional[bool] = None
workflow_permanent_id: typing.Optional[str] = None
browser_profile_key_digest: typing.Optional[str] = None
created_at: dt.datetime
modified_at: dt.datetime
deleted_at: typing.Optional[dt.datetime] = None

View file

@ -0,0 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from .geo_target import GeoTarget
from .proxy_location import ProxyLocation
BrowserProfileProxyLocation = typing.Union[ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]]]

View file

@ -70,6 +70,11 @@ class BrowserSessionResponse(UniversalBaseModel):
ID of the browser profile loaded into this session, if any. browser_profile_id starts with `bp_`.
"""
generate_browser_profile: typing.Optional[bool] = pydantic.Field(default=None)
"""
Whether this session's browser profile will be saved when it ends so it can become a reusable browser profile.
"""
vnc_streaming_supported: typing.Optional[bool] = pydantic.Field(default=None)
"""
Whether the browser session supports VNC streaming

View file

@ -0,0 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from .geo_target import GeoTarget
from .proxy_location import ProxyLocation
CreateBrowserProfileRequestProxyLocation = typing.Union[
ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]]
]

View file

@ -5,6 +5,7 @@ import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .create_credential_request_credential import CreateCredentialRequestCredential
from .create_credential_request_proxy_location import CreateCredentialRequestProxyLocation
from .credential_vault_type import CredentialVaultType
from .skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
@ -34,6 +35,21 @@ class CreateCredentialRequest(UniversalBaseModel):
Which vault to store this credential in. If omitted, uses the instance default. Use this to mix Skyvern-hosted and custom credentials within the same organization.
"""
proxy_location: typing.Optional[CreateCredentialRequestProxyLocation] = pydantic.Field(default=None)
"""
Optional proxy location for this credential's pinned proxy identity.
"""
proxy_session_id: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional advanced reuse key for this credential's pinned proxy identity.
"""
rotate_proxy_session_id: typing.Optional[bool] = pydantic.Field(default=None)
"""
Rotate the Skyvern-managed proxy sticky-session id when updating this credential.
"""
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

View file

@ -0,0 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from .geo_target import GeoTarget
from .proxy_location import ProxyLocation
CreateCredentialRequestProxyLocation = typing.Union[
ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]]
]

View file

@ -13,8 +13,6 @@ class CredentialParameter(UniversalBaseModel):
credential_parameter_id: str
workflow_id: str
credential_id: str
credential_ids: typing.Optional[typing.List[str]] = None
selection_strategy: typing.Optional[str] = None
created_at: dt.datetime
modified_at: dt.datetime
deleted_at: typing.Optional[dt.datetime] = None

View file

@ -10,8 +10,6 @@ class CredentialParameterYaml(UniversalBaseModel):
key: str
description: typing.Optional[str] = None
credential_id: str
credential_ids: typing.Optional[typing.List[str]] = None
selection_strategy: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View file

@ -7,7 +7,6 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .credential_response_credential import CredentialResponseCredential
from .credential_type_output import CredentialTypeOutput
from .credential_vault_type import CredentialVaultType
from .proxy_location import ProxyLocation
class CredentialResponse(UniversalBaseModel):
@ -45,16 +44,6 @@ class CredentialResponse(UniversalBaseModel):
Browser profile ID linked to this credential
"""
proxy_location: typing.Optional[ProxyLocation] = pydantic.Field(default=None)
"""
Optional proxy location for this credential's pinned proxy identity.
"""
proxy_session_id: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional advanced reuse key for this credential's pinned proxy identity.
"""
tested_url: typing.Optional[str] = pydantic.Field(default=None)
"""
Login page URL used during the credential test
@ -70,6 +59,11 @@ class CredentialResponse(UniversalBaseModel):
Whether the user intends to save a browser session, regardless of test outcome
"""
folder_id: typing.Optional[str] = pydantic.Field(default=None)
"""
ID of the credential folder this credential belongs to, if any
"""
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

View file

@ -2,4 +2,4 @@
import typing
FileType = typing.Union[typing.Literal["auto_detect", "csv", "excel", "pdf", "image", "docx", "zip"], typing.Any]
FileType = typing.Union[typing.Literal["auto_detect", "csv", "excel", "pdf", "image", "docx"], typing.Any]

View file

@ -47,9 +47,9 @@ class ForLoopBlock(UniversalBaseModel):
from .context_parameter import ContextParameter # noqa: E402, F401, I001
# Manual patch: Fern v4.31.1 emits bottom-cross-imports that deadlock at module
# load (for_loop ↔ while_loop ↔ *_loop_blocks_item). Catch the mid-load
# load (for_loop <-> while_loop <-> *_loop_blocks_item). Catch the mid-load
# ImportError; the symmetric *_loop_blocks_item module back-resolves once both
# unions are fully defined. Reapply on every regen — see fern_build_python_sdk.sh.
# unions are fully defined. Reapplied on every regen by scripts/patch_generated_client.py.
try:
from .while_loop_block import WhileLoopBlock # noqa: E402, F401, I001
from .for_loop_block_loop_blocks_item import ForLoopBlockLoopBlocksItem # noqa: E402, F401, I001

View file

@ -10,6 +10,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update
from ..core.serialization import FieldMetadata
from .action_block_data_schema import ActionBlockDataSchema
from .action_block_parameters_item import ActionBlockParametersItem
from .ai_fallback_mode import AiFallbackMode
from .aws_secret_parameter import AwsSecretParameter
from .branch_condition import BranchCondition
from .code_block_parameters_item import CodeBlockParametersItem
@ -77,6 +78,8 @@ class ForLoopBlockLoopBlocksItem_Action(UniversalBaseModel):
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
include_extracted_text: typing.Optional[bool] = None
selector: typing.Optional[str] = None
ai_fallback: typing.Optional[AiFallbackMode] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@ -532,6 +535,7 @@ class ForLoopBlockLoopBlocksItem_Login(UniversalBaseModel):
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
include_extracted_text: typing.Optional[bool] = None
skip_saved_profile: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@ -931,65 +935,24 @@ ForLoopBlockLoopBlocksItem = typing.Union[
ForLoopBlockLoopBlocksItem_WhileLoop,
ForLoopBlockLoopBlocksItem_WorkflowTrigger,
]
# Manual patch: see for_loop_block.py header note. The cross-import below fails
# when this module is loaded mid-chain via while_loop_block_loop_blocks_item.
# The other side back-resolves us once it finishes loading.
try:
from .while_loop_block_loop_blocks_item import WhileLoopBlockLoopBlocksItem # noqa: E402, F401, I001
except ImportError:
pass
else:
for _cls in (
ForLoopBlockLoopBlocksItem_Action,
ForLoopBlockLoopBlocksItem_Code,
ForLoopBlockLoopBlocksItem_Extraction,
ForLoopBlockLoopBlocksItem_FileDownload,
ForLoopBlockLoopBlocksItem_ForLoop,
ForLoopBlockLoopBlocksItem_GoogleSheetsRead,
ForLoopBlockLoopBlocksItem_GoogleSheetsWrite,
ForLoopBlockLoopBlocksItem_GotoUrl,
ForLoopBlockLoopBlocksItem_HttpRequest,
ForLoopBlockLoopBlocksItem_HumanInteraction,
ForLoopBlockLoopBlocksItem_Login,
ForLoopBlockLoopBlocksItem_Navigation,
ForLoopBlockLoopBlocksItem_PrintPage,
ForLoopBlockLoopBlocksItem_Task,
ForLoopBlockLoopBlocksItem_TextPrompt,
ForLoopBlockLoopBlocksItem_Validation,
ForLoopBlockLoopBlocksItem_Wait,
ForLoopBlockLoopBlocksItem_WhileLoop,
ForLoopBlockLoopBlocksItem_WorkflowTrigger,
):
update_forward_refs(_cls)
from . import while_loop_block_loop_blocks_item as _wllb
_wllb.ForLoopBlockLoopBlocksItem = ForLoopBlockLoopBlocksItem # type: ignore[attr-defined]
for _cls in (
_wllb.WhileLoopBlockLoopBlocksItem_Action,
_wllb.WhileLoopBlockLoopBlocksItem_Code,
_wllb.WhileLoopBlockLoopBlocksItem_Extraction,
_wllb.WhileLoopBlockLoopBlocksItem_FileDownload,
_wllb.WhileLoopBlockLoopBlocksItem_ForLoop,
_wllb.WhileLoopBlockLoopBlocksItem_GoogleSheetsRead,
_wllb.WhileLoopBlockLoopBlocksItem_GoogleSheetsWrite,
_wllb.WhileLoopBlockLoopBlocksItem_GotoUrl,
_wllb.WhileLoopBlockLoopBlocksItem_HttpRequest,
_wllb.WhileLoopBlockLoopBlocksItem_HumanInteraction,
_wllb.WhileLoopBlockLoopBlocksItem_Login,
_wllb.WhileLoopBlockLoopBlocksItem_Navigation,
_wllb.WhileLoopBlockLoopBlocksItem_PrintPage,
_wllb.WhileLoopBlockLoopBlocksItem_Task,
_wllb.WhileLoopBlockLoopBlocksItem_TextPrompt,
_wllb.WhileLoopBlockLoopBlocksItem_Validation,
_wllb.WhileLoopBlockLoopBlocksItem_Wait,
_wllb.WhileLoopBlockLoopBlocksItem_WhileLoop,
_wllb.WhileLoopBlockLoopBlocksItem_WorkflowTrigger,
):
update_forward_refs(_cls)
from . import for_loop_block as _flb
_flb.ForLoopBlockLoopBlocksItem = ForLoopBlockLoopBlocksItem # type: ignore[attr-defined]
_flb.WhileLoopBlockLoopBlocksItem = WhileLoopBlockLoopBlocksItem # type: ignore[attr-defined]
update_forward_refs(_flb.ForLoopBlock)
from . import while_loop_block as _wlb
_wlb.ForLoopBlockLoopBlocksItem = ForLoopBlockLoopBlocksItem # type: ignore[attr-defined]
_wlb.WhileLoopBlockLoopBlocksItem = WhileLoopBlockLoopBlocksItem # type: ignore[attr-defined]
update_forward_refs(_wlb.WhileLoopBlock)
from .while_loop_block_loop_blocks_item import WhileLoopBlockLoopBlocksItem # noqa: E402, F401, I001
update_forward_refs(ForLoopBlockLoopBlocksItem_Action)
update_forward_refs(ForLoopBlockLoopBlocksItem_Code)
update_forward_refs(ForLoopBlockLoopBlocksItem_Extraction)
update_forward_refs(ForLoopBlockLoopBlocksItem_FileDownload)
update_forward_refs(ForLoopBlockLoopBlocksItem_ForLoop)
update_forward_refs(ForLoopBlockLoopBlocksItem_GoogleSheetsRead)
update_forward_refs(ForLoopBlockLoopBlocksItem_GoogleSheetsWrite)
update_forward_refs(ForLoopBlockLoopBlocksItem_GotoUrl)
update_forward_refs(ForLoopBlockLoopBlocksItem_HttpRequest)
update_forward_refs(ForLoopBlockLoopBlocksItem_HumanInteraction)
update_forward_refs(ForLoopBlockLoopBlocksItem_Login)
update_forward_refs(ForLoopBlockLoopBlocksItem_Navigation)
update_forward_refs(ForLoopBlockLoopBlocksItem_PrintPage)
update_forward_refs(ForLoopBlockLoopBlocksItem_Task)
update_forward_refs(ForLoopBlockLoopBlocksItem_TextPrompt)
update_forward_refs(ForLoopBlockLoopBlocksItem_Validation)
update_forward_refs(ForLoopBlockLoopBlocksItem_Wait)
update_forward_refs(ForLoopBlockLoopBlocksItem_WhileLoop)
update_forward_refs(ForLoopBlockLoopBlocksItem_WorkflowTrigger)

View file

@ -40,6 +40,7 @@ class ForLoopBlockYaml(UniversalBaseModel):
extra = pydantic.Extra.allow
# Manual patch: Fern v4.31.1 emits bottom-cross-imports that deadlock at module
# load. See for_loop_block.py for the explanation.
try:

View file

@ -8,6 +8,7 @@ import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
from ..core.serialization import FieldMetadata
from .ai_fallback_mode import AiFallbackMode
from .branch_condition_yaml import BranchConditionYaml
from .branch_criteria_yaml import BranchCriteriaYaml
from .extraction_block_yaml_data_schema import ExtractionBlockYamlDataSchema
@ -308,6 +309,8 @@ class ForLoopBlockYamlLoopBlocksItem_Action(UniversalBaseModel):
title: typing.Optional[str] = None
engine: typing.Optional[RunEngine] = None
navigation_goal: typing.Optional[str] = None
selector: typing.Optional[str] = None
ai_fallback: typing.Optional[AiFallbackMode] = None
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
max_retries: typing.Optional[int] = None
parameter_keys: typing.Optional[typing.List[str]] = None
@ -413,6 +416,7 @@ class ForLoopBlockYamlLoopBlocksItem_Login(UniversalBaseModel):
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None
complete_verification: typing.Optional[bool] = None
skip_saved_profile: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@ -751,23 +755,7 @@ ForLoopBlockYamlLoopBlocksItem = typing.Union[
ForLoopBlockYamlLoopBlocksItem_GoogleSheetsRead,
ForLoopBlockYamlLoopBlocksItem_GoogleSheetsWrite,
]
# Manual patch: see for_loop_block.py header note.
try:
from .while_loop_block_yaml_loop_blocks_item import WhileLoopBlockYamlLoopBlocksItem # noqa: E402, F401, I001
except ImportError:
pass
else:
update_forward_refs(ForLoopBlockYamlLoopBlocksItem_ForLoop)
update_forward_refs(ForLoopBlockYamlLoopBlocksItem_WhileLoop)
from . import while_loop_block_yaml_loop_blocks_item as _wlylb
_wlylb.ForLoopBlockYamlLoopBlocksItem = ForLoopBlockYamlLoopBlocksItem # type: ignore[attr-defined]
update_forward_refs(_wlylb.WhileLoopBlockYamlLoopBlocksItem_ForLoop)
update_forward_refs(_wlylb.WhileLoopBlockYamlLoopBlocksItem_WhileLoop)
from . import for_loop_block_yaml as _flby
_flby.ForLoopBlockYamlLoopBlocksItem = ForLoopBlockYamlLoopBlocksItem # type: ignore[attr-defined]
_flby.WhileLoopBlockYamlLoopBlocksItem = WhileLoopBlockYamlLoopBlocksItem # type: ignore[attr-defined]
update_forward_refs(_flby.ForLoopBlockYaml)
from . import while_loop_block_yaml as _wlby
_wlby.ForLoopBlockYamlLoopBlocksItem = ForLoopBlockYamlLoopBlocksItem # type: ignore[attr-defined]
_wlby.WhileLoopBlockYamlLoopBlocksItem = WhileLoopBlockYamlLoopBlocksItem # type: ignore[attr-defined]
update_forward_refs(_wlby.WhileLoopBlockYaml)
from .while_loop_block_yaml_loop_blocks_item import WhileLoopBlockYamlLoopBlocksItem # noqa: E402, F401, I001
update_forward_refs(ForLoopBlockYamlLoopBlocksItem_ForLoop)
update_forward_refs(ForLoopBlockYamlLoopBlocksItem_WhileLoop)

View file

@ -50,6 +50,7 @@ class LoginBlock(UniversalBaseModel):
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
include_extracted_text: typing.Optional[bool] = None
skip_saved_profile: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View file

@ -36,6 +36,7 @@ class LoginBlockYaml(UniversalBaseModel):
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None
complete_verification: typing.Optional[bool] = None
skip_saved_profile: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View file

@ -41,26 +41,6 @@ class NonEmptyCreditCardCredential(UniversalBaseModel):
The name of the card holder (must not be empty)
"""
billing_address: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(default=None)
"""
Optional billing address associated with the card
"""
billing_email: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional billing email address
"""
billing_phone: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional billing phone number
"""
metadata: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
"""
Optional additional credit card metadata fields
"""
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

Some files were not shown because too many files have changed in this diff Show more