Bump version to 1.0.29 (#5347)
Some checks failed
Run tests and pre-commit / Run tests and pre-commit hooks (push) Waiting to run
Run tests and pre-commit / Frontend Lint and Build (push) Waiting to run
Publish Fern Docs / run (push) Waiting to run
Auto Create GitHub Release on Version Change / check-version-change (push) Has been cancelled
Build Skyvern SDK and publish to PyPI / check-version-change (push) Has been cancelled
Build Skyvern TS SDK and publish to npm / check-version-change (push) Has been cancelled
Auto Create GitHub Release on Version Change / create-release (push) Has been cancelled
Build Skyvern SDK and publish to PyPI / run-ci (push) Has been cancelled
Build Skyvern SDK and publish to PyPI / build-sdk (push) Has been cancelled
Build Skyvern TS SDK and publish to npm / build-and-publish-sdk (push) Has been cancelled

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Shuchang Zheng 2026-04-02 07:37:04 -07:00 committed by GitHub
parent 18811a7175
commit df94c4799a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
79 changed files with 4166 additions and 8945 deletions

View file

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

View file

@ -56,7 +56,7 @@ following namespace:
```typescript
import { Skyvern } from "@skyvern/client";
const request: Skyvern.ListOrganizationSchedulesApiV1SchedulesGetRequest = {
const request: Skyvern.RunTaskRequest = {
...
};
```

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "@skyvern/client",
"version": "1.0.28",
"version": "1.0.29",
"private": false,
"repository": {
"type": "git",

View file

@ -7,7 +7,7 @@ importers:
dependencies:
playwright:
specifier: ^1.48.0
version: 1.58.2
version: 1.59.1
devDependencies:
'@biomejs/biome':
specifier: 2.2.5
@ -656,12 +656,12 @@ packages:
picomatch@4.0.3:
resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==}
engines: {node: '>=12'}
playwright-core@1.58.2:
resolution: {integrity: sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==}
playwright-core@1.59.1:
resolution: {integrity: sha512-HBV/RJg81z5BiiZ9yPzIiClYV/QMsDCKUyogwH9p3MCP6IYjUFu/MActgYAvK0oWyV9NlwM3GLBjADyWgydVyg==}
engines: {node: '>=18'}
hasBin: true
playwright@1.58.2:
resolution: {integrity: sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==}
playwright@1.59.1:
resolution: {integrity: sha512-C8oWjPR3F81yljW9o5OxcWzfh6avkVwDD2VYdwIGqTkl+OGFISgypqzfu7dOe4QNLL2aqcWBmI3PMtLIK233lw==}
engines: {node: '>=18'}
hasBin: true
postcss@8.5.6:
@ -1401,10 +1401,10 @@ snapshots:
picocolors@1.1.1: {}
picomatch@2.3.1: {}
picomatch@4.0.3: {}
playwright-core@1.58.2: {}
playwright@1.58.2:
playwright-core@1.59.1: {}
playwright@1.59.1:
dependencies:
playwright-core: 1.58.2
playwright-core: 1.59.1
optionalDependencies:
fsevents: 2.3.2
postcss@8.5.6:

View file

@ -1,5 +1,5 @@
# Reference
<details><summary><code>client.<a href="/src/Client.ts">changeTierApiV1BillingChangeTierPost</a>({ ...params }) -> Skyvern.ChangeTierResponse</code></summary>
<details><summary><code>client.<a href="/src/Client.ts">runSdkAction</a>({ ...params }) -> Skyvern.RunSdkActionResponse</code></summary>
<dl>
<dd>
@ -11,10 +11,7 @@
<dl>
<dd>
Redirect to Stripe Portal for tier changes.
Portal handles proration based on configured settings:
- Upgrades: Immediate proration charge
- Downgrades: Apply at end of billing period
Execute a single SDK action with the specified parameters
</dd>
</dl>
</dd>
@ -29,8 +26,11 @@ Portal handles proration based on configured settings:
<dd>
```typescript
await client.changeTierApiV1BillingChangeTierPost({
tier: "free"
await client.runSdkAction({
url: "url",
action: {
type: "ai_act"
}
});
```
@ -47,7 +47,7 @@ await client.changeTierApiV1BillingChangeTierPost({
<dl>
<dd>
**request:** `Skyvern.ChangeTierRequest`
**request:** `Skyvern.RunSdkActionRequest`
</dd>
</dl>
@ -192,466 +192,6 @@ await client.scripts.runScript("s_abc123");
</dl>
</dd>
</dl>
</details>
## Agent
<details><summary><code>client.agent.<a href="/src/api/resources/agent/client/Client.ts">listOrganizationSchedules</a>({ ...params }) -> Skyvern.OrganizationScheduleListResponse</code></summary>
<dl>
<dd>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.agent.listOrganizationSchedules({
page: 1,
page_size: 1,
status: "active",
search: "search"
});
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**request:** `Skyvern.ListOrganizationSchedulesApiV1SchedulesGetRequest`
</dd>
</dl>
<dl>
<dd>
**requestOptions:** `Agent.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>
<details><summary><code>client.agent.<a href="/src/api/resources/agent/client/Client.ts">listWorkflowSchedules</a>(workflowPermanentId) -> Skyvern.WorkflowScheduleListResponse</code></summary>
<dl>
<dd>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.agent.listWorkflowSchedules("workflow_permanent_id");
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**workflowPermanentId:** `string`
</dd>
</dl>
<dl>
<dd>
**requestOptions:** `Agent.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>
<details><summary><code>client.agent.<a href="/src/api/resources/agent/client/Client.ts">createWorkflowSchedule</a>(workflowPermanentId, { ...params }) -> Skyvern.WorkflowScheduleResponse</code></summary>
<dl>
<dd>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.agent.createWorkflowSchedule("workflow_permanent_id", {
cron_expression: "cron_expression",
timezone: "timezone"
});
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**workflowPermanentId:** `string`
</dd>
</dl>
<dl>
<dd>
**request:** `Skyvern.WorkflowScheduleUpsertRequest`
</dd>
</dl>
<dl>
<dd>
**requestOptions:** `Agent.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>
<details><summary><code>client.agent.<a href="/src/api/resources/agent/client/Client.ts">getWorkflowSchedule</a>(workflowPermanentId, workflowScheduleId) -> Skyvern.WorkflowScheduleResponse</code></summary>
<dl>
<dd>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.agent.getWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id");
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**workflowPermanentId:** `string`
</dd>
</dl>
<dl>
<dd>
**workflowScheduleId:** `string`
</dd>
</dl>
<dl>
<dd>
**requestOptions:** `Agent.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>
<details><summary><code>client.agent.<a href="/src/api/resources/agent/client/Client.ts">updateWorkflowSchedule</a>(workflowPermanentId, workflowScheduleId, { ...params }) -> Skyvern.WorkflowScheduleResponse</code></summary>
<dl>
<dd>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.agent.updateWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id", {
cron_expression: "cron_expression",
timezone: "timezone"
});
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**workflowPermanentId:** `string`
</dd>
</dl>
<dl>
<dd>
**workflowScheduleId:** `string`
</dd>
</dl>
<dl>
<dd>
**request:** `Skyvern.WorkflowScheduleUpsertRequest`
</dd>
</dl>
<dl>
<dd>
**requestOptions:** `Agent.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>
<details><summary><code>client.agent.<a href="/src/api/resources/agent/client/Client.ts">deleteWorkflowScheduleRoute</a>(workflowPermanentId, workflowScheduleId) -> Record&lt;string, boolean&gt;</code></summary>
<dl>
<dd>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.agent.deleteWorkflowScheduleRoute("workflow_permanent_id", "workflow_schedule_id");
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**workflowPermanentId:** `string`
</dd>
</dl>
<dl>
<dd>
**workflowScheduleId:** `string`
</dd>
</dl>
<dl>
<dd>
**requestOptions:** `Agent.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>
<details><summary><code>client.agent.<a href="/src/api/resources/agent/client/Client.ts">enableWorkflowSchedule</a>(workflowPermanentId, workflowScheduleId) -> Skyvern.WorkflowScheduleResponse</code></summary>
<dl>
<dd>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.agent.enableWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id");
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**workflowPermanentId:** `string`
</dd>
</dl>
<dl>
<dd>
**workflowScheduleId:** `string`
</dd>
</dl>
<dl>
<dd>
**requestOptions:** `Agent.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>
<details><summary><code>client.agent.<a href="/src/api/resources/agent/client/Client.ts">disableWorkflowSchedule</a>(workflowPermanentId, workflowScheduleId) -> Skyvern.WorkflowScheduleResponse</code></summary>
<dl>
<dd>
#### 🔌 Usage
<dl>
<dd>
<dl>
<dd>
```typescript
await client.agent.disableWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id");
```
</dd>
</dl>
</dd>
</dl>
#### ⚙️ Parameters
<dl>
<dd>
<dl>
<dd>
**workflowPermanentId:** `string`
</dd>
</dl>
<dl>
<dd>
**workflowScheduleId:** `string`
</dd>
</dl>
<dl>
<dd>
**requestOptions:** `Agent.RequestOptions`
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</details>

View file

@ -1,7 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
import * as Skyvern from "./api/index.js";
import { Agent } from "./api/resources/agent/client/Client.js";
import { Artifacts } from "./api/resources/artifacts/client/Client.js";
import { Scripts } from "./api/resources/scripts/client/Client.js";
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
@ -20,7 +19,6 @@ export class SkyvernClient {
protected readonly _options: SkyvernClient.Options;
protected _artifacts: Artifacts | undefined;
protected _scripts: Scripts | undefined;
protected _agent: Agent | undefined;
constructor(_options: SkyvernClient.Options = {}) {
this._options = {
@ -30,8 +28,8 @@ export class SkyvernClient {
"x-api-key": _options?.apiKey,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@skyvern/client",
"X-Fern-SDK-Version": "1.0.28",
"User-Agent": "@skyvern/client/1.0.28",
"X-Fern-SDK-Version": "1.0.29",
"User-Agent": "@skyvern/client/1.0.29",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@ -48,10 +46,6 @@ export class SkyvernClient {
return (this._scripts ??= new Scripts(this._options));
}
public get agent(): Agent {
return (this._agent ??= new Agent(this._options));
}
/**
* Run a task
*
@ -1302,84 +1296,6 @@ export class SkyvernClient {
}
}
/**
* Get an artifact
*
* @param {string} artifactId
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.NotFoundError}
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.getArtifact("artifact_id")
*/
public getArtifact(
artifactId: string,
requestOptions?: SkyvernClient.RequestOptions,
): core.HttpResponsePromise<Skyvern.Artifact> {
return core.HttpResponsePromise.fromPromise(this.__getArtifact(artifactId, requestOptions));
}
private async __getArtifact(
artifactId: string,
requestOptions?: SkyvernClient.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.Artifact>> {
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/artifacts/${core.url.encodePathParam(artifactId)}`,
),
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 Skyvern.Artifact, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 404:
throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/artifacts/{artifact_id}.");
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* Get artifacts for a run
*
@ -1632,6 +1548,105 @@ export class SkyvernClient {
}
}
/**
* @param {Skyvern.GetRunsV2Request} request
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.getRunsV2({
* page: 1,
* page_size: 1,
* search_key: "search_key"
* })
*/
public getRunsV2(
request: Skyvern.GetRunsV2Request = {},
requestOptions?: SkyvernClient.RequestOptions,
): core.HttpResponsePromise<Skyvern.TaskRunListItem[]> {
return core.HttpResponsePromise.fromPromise(this.__getRunsV2(request, requestOptions));
}
private async __getRunsV2(
request: Skyvern.GetRunsV2Request = {},
requestOptions?: SkyvernClient.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.TaskRunListItem[]>> {
const { page, page_size: pageSize, status, search_key: searchKey } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (page != null) {
_queryParams.page = page.toString();
}
if (pageSize != null) {
_queryParams.page_size = pageSize.toString();
}
if (status != null) {
if (Array.isArray(status)) {
_queryParams.status = status.map((item) => item);
} else {
_queryParams.status = status;
}
}
if (searchKey != null) {
_queryParams.search_key = searchKey;
}
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/runs",
),
method: "GET",
headers: _headers,
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return { data: _response.body as Skyvern.TaskRunListItem[], rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/runs.");
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* List workflow runs across all workflows for the current organization.
*
@ -2774,7 +2789,8 @@ export class SkyvernClient {
* @example
* await client.getCredentials({
* page: 1,
* page_size: 10
* page_size: 10,
* vault_type: "bitwarden"
* })
*/
public getCredentials(
@ -2788,7 +2804,7 @@ export class SkyvernClient {
request: Skyvern.GetCredentialsRequest = {},
requestOptions?: SkyvernClient.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.CredentialResponse[]>> {
const { page, page_size: pageSize } = request;
const { page, page_size: pageSize, vault_type: vaultType } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (page != null) {
_queryParams.page = page.toString();
@ -2798,6 +2814,10 @@ export class SkyvernClient {
_queryParams.page_size = pageSize.toString();
}
if (vaultType != null) {
_queryParams.vault_type = vaultType;
}
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
@ -3753,329 +3773,4 @@ export class SkyvernClient {
});
}
}
/**
* Create a Stripe Checkout Session for subscribing to a tier.
*
* Frontend should redirect the user to the returned URL.
* After successful checkout, Stripe will send a webhook that we handle
* to store the subscription and initialize billing state.
*
* Returns 400 if org already has an active subscription (use portal instead).
*
* @param {Skyvern.CheckoutSubscriptionRequest} request
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.createCheckoutSessionApiV1BillingCheckoutPost({
* tier: "free"
* })
*/
public createCheckoutSessionApiV1BillingCheckoutPost(
request: Skyvern.CheckoutSubscriptionRequest,
requestOptions?: SkyvernClient.RequestOptions,
): core.HttpResponsePromise<Skyvern.CheckoutSessionResponse> {
return core.HttpResponsePromise.fromPromise(
this.__createCheckoutSessionApiV1BillingCheckoutPost(request, requestOptions),
);
}
private async __createCheckoutSessionApiV1BillingCheckoutPost(
request: Skyvern.CheckoutSubscriptionRequest,
requestOptions?: SkyvernClient.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.CheckoutSessionResponse>> {
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,
"api/v1/billing/checkout",
),
method: "POST",
headers: _headers,
contentType: "application/json",
queryParameters: requestOptions?.queryParams,
requestType: "json",
body: request,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return { data: _response.body as Skyvern.CheckoutSessionResponse, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /api/v1/billing/checkout.");
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* Create a Stripe Customer Portal session for managing subscription.
*
* Frontend should redirect the user to the returned URL.
* The portal allows users to:
* - Update payment methods
* - Upgrade/downgrade plans
* - Cancel subscription
* - View invoices
*
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.createPortalSessionApiV1BillingPortalPost()
*/
public createPortalSessionApiV1BillingPortalPost(
requestOptions?: SkyvernClient.RequestOptions,
): core.HttpResponsePromise<Skyvern.PortalSessionResponse> {
return core.HttpResponsePromise.fromPromise(this.__createPortalSessionApiV1BillingPortalPost(requestOptions));
}
private async __createPortalSessionApiV1BillingPortalPost(
requestOptions?: SkyvernClient.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.PortalSessionResponse>> {
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,
"api/v1/billing/portal",
),
method: "POST",
headers: _headers,
queryParameters: requestOptions?.queryParams,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return { data: _response.body as Skyvern.PortalSessionResponse, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /api/v1/billing/portal.");
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.getOrganizationBillingApiV1BillingStateGet()
*/
public getOrganizationBillingApiV1BillingStateGet(
requestOptions?: SkyvernClient.RequestOptions,
): core.HttpResponsePromise<Skyvern.BillingStateResponse | undefined> {
return core.HttpResponsePromise.fromPromise(this.__getOrganizationBillingApiV1BillingStateGet(requestOptions));
}
private async __getOrganizationBillingApiV1BillingStateGet(
requestOptions?: SkyvernClient.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.BillingStateResponse | undefined>> {
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,
"api/v1/billing/state",
),
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 Skyvern.BillingStateResponse | undefined,
rawResponse: _response.rawResponse,
};
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /api/v1/billing/state.");
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* Redirect to Stripe Portal for tier changes.
* Portal handles proration based on configured settings:
* - Upgrades: Immediate proration charge
* - Downgrades: Apply at end of billing period
*
* @param {Skyvern.ChangeTierRequest} request
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.changeTierApiV1BillingChangeTierPost({
* tier: "free"
* })
*/
public changeTierApiV1BillingChangeTierPost(
request: Skyvern.ChangeTierRequest,
requestOptions?: SkyvernClient.RequestOptions,
): core.HttpResponsePromise<Skyvern.ChangeTierResponse> {
return core.HttpResponsePromise.fromPromise(
this.__changeTierApiV1BillingChangeTierPost(request, requestOptions),
);
}
private async __changeTierApiV1BillingChangeTierPost(
request: Skyvern.ChangeTierRequest,
requestOptions?: SkyvernClient.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.ChangeTierResponse>> {
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,
"api/v1/billing/change-tier",
),
method: "POST",
headers: _headers,
contentType: "application/json",
queryParameters: requestOptions?.queryParams,
requestType: "json",
body: request,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return { data: _response.body as Skyvern.ChangeTierResponse, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /api/v1/billing/change-tier.");
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
}

View file

@ -1,13 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../../index.js";
/**
* @example
* {
* tier: "free"
* }
*/
export interface ChangeTierRequest {
tier: Skyvern.PlanTier;
}

View file

@ -1,13 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../../index.js";
/**
* @example
* {
* tier: "free"
* }
*/
export interface CheckoutSubscriptionRequest {
tier: Skyvern.PlanTier;
}

View file

@ -1,10 +1,13 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../../index.js";
/**
* @example
* {
* page: 1,
* page_size: 10
* page_size: 10,
* vault_type: "bitwarden"
* }
*/
export interface GetCredentialsRequest {
@ -12,4 +15,6 @@ export interface GetCredentialsRequest {
page?: number;
/** Number of items per page */
page_size?: number;
/** Filter credentials by vault type (e.g. 'custom', 'bitwarden', 'azure_vault') */
vault_type?: Skyvern.CredentialVaultType;
}

View file

@ -0,0 +1,19 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../../index.js";
/**
* @example
* {
* page: 1,
* page_size: 1,
* search_key: "search_key"
* }
*/
export interface GetRunsV2Request {
page?: number;
page_size?: number;
status?: Skyvern.RunStatus | Skyvern.RunStatus[];
/** Case-insensitive substring search (min 3 chars for trigram index). */
search_key?: string;
}

View file

@ -1,6 +1,4 @@
export type { BodyUploadFileV1UploadFilePost } from "./BodyUploadFileV1UploadFilePost.js";
export type { ChangeTierRequest } from "./ChangeTierRequest.js";
export type { CheckoutSubscriptionRequest } from "./CheckoutSubscriptionRequest.js";
export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.js";
export type { CreateBrowserSessionRequest } from "./CreateBrowserSessionRequest.js";
export type { CreateScriptRequest } from "./CreateScriptRequest.js";
@ -13,6 +11,7 @@ export type { FolderUpdate } from "./FolderUpdate.js";
export type { GetCredentialsRequest } from "./GetCredentialsRequest.js";
export type { GetFoldersRequest } from "./GetFoldersRequest.js";
export type { GetRunArtifactsRequest } from "./GetRunArtifactsRequest.js";
export type { GetRunsV2Request } from "./GetRunsV2Request.js";
export type { GetScriptsRequest } from "./GetScriptsRequest.js";
export type { GetWorkflowRequest } from "./GetWorkflowRequest.js";
export type { GetWorkflowRunsRequest } from "./GetWorkflowRunsRequest.js";

View file

@ -1,691 +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";
import * as Skyvern from "../../../index.js";
export declare namespace Agent {
export interface Options extends BaseClientOptions {}
export interface RequestOptions extends BaseRequestOptions {}
}
export class Agent {
protected readonly _options: Agent.Options;
constructor(_options: Agent.Options = {}) {
this._options = _options;
}
/**
* @param {Skyvern.ListOrganizationSchedulesApiV1SchedulesGetRequest} request
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.agent.listOrganizationSchedules({
* page: 1,
* page_size: 1,
* status: "active",
* search: "search"
* })
*/
public listOrganizationSchedules(
request: Skyvern.ListOrganizationSchedulesApiV1SchedulesGetRequest = {},
requestOptions?: Agent.RequestOptions,
): core.HttpResponsePromise<Skyvern.OrganizationScheduleListResponse> {
return core.HttpResponsePromise.fromPromise(this.__listOrganizationSchedules(request, requestOptions));
}
private async __listOrganizationSchedules(
request: Skyvern.ListOrganizationSchedulesApiV1SchedulesGetRequest = {},
requestOptions?: Agent.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.OrganizationScheduleListResponse>> {
const { page, page_size: pageSize, status, search } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (page != null) {
_queryParams.page = page.toString();
}
if (pageSize != null) {
_queryParams.page_size = pageSize.toString();
}
if (status != null) {
_queryParams.status = status;
}
if (search != null) {
_queryParams.search = search;
}
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,
"api/v1/schedules",
),
method: "GET",
headers: _headers,
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return {
data: _response.body as Skyvern.OrganizationScheduleListResponse,
rawResponse: _response.rawResponse,
};
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /api/v1/schedules.");
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* @param {string} workflowPermanentId
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.agent.listWorkflowSchedules("workflow_permanent_id")
*/
public listWorkflowSchedules(
workflowPermanentId: string,
requestOptions?: Agent.RequestOptions,
): core.HttpResponsePromise<Skyvern.WorkflowScheduleListResponse> {
return core.HttpResponsePromise.fromPromise(this.__listWorkflowSchedules(workflowPermanentId, requestOptions));
}
private async __listWorkflowSchedules(
workflowPermanentId: string,
requestOptions?: Agent.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.WorkflowScheduleListResponse>> {
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,
`api/v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules`,
),
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 Skyvern.WorkflowScheduleListResponse, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling GET /api/v1/workflows/{workflow_permanent_id}/schedules.",
);
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* @param {string} workflowPermanentId
* @param {Skyvern.WorkflowScheduleUpsertRequest} request
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.agent.createWorkflowSchedule("workflow_permanent_id", {
* cron_expression: "cron_expression",
* timezone: "timezone"
* })
*/
public createWorkflowSchedule(
workflowPermanentId: string,
request: Skyvern.WorkflowScheduleUpsertRequest,
requestOptions?: Agent.RequestOptions,
): core.HttpResponsePromise<Skyvern.WorkflowScheduleResponse> {
return core.HttpResponsePromise.fromPromise(
this.__createWorkflowSchedule(workflowPermanentId, request, requestOptions),
);
}
private async __createWorkflowSchedule(
workflowPermanentId: string,
request: Skyvern.WorkflowScheduleUpsertRequest,
requestOptions?: Agent.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.WorkflowScheduleResponse>> {
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
requestOptions?.headers,
);
const _response = await core.fetcher({
url: core.url.join(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`api/v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules`,
),
method: "POST",
headers: _headers,
contentType: "application/json",
queryParameters: requestOptions?.queryParams,
requestType: "json",
body: request,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return { data: _response.body as Skyvern.WorkflowScheduleResponse, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling POST /api/v1/workflows/{workflow_permanent_id}/schedules.",
);
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* @param {string} workflowPermanentId
* @param {string} workflowScheduleId
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.agent.getWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id")
*/
public getWorkflowSchedule(
workflowPermanentId: string,
workflowScheduleId: string,
requestOptions?: Agent.RequestOptions,
): core.HttpResponsePromise<Skyvern.WorkflowScheduleResponse> {
return core.HttpResponsePromise.fromPromise(
this.__getWorkflowSchedule(workflowPermanentId, workflowScheduleId, requestOptions),
);
}
private async __getWorkflowSchedule(
workflowPermanentId: string,
workflowScheduleId: string,
requestOptions?: Agent.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.WorkflowScheduleResponse>> {
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
requestOptions?.headers,
);
const _response = await core.fetcher({
url: core.url.join(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`api/v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}`,
),
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 Skyvern.WorkflowScheduleResponse, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling GET /api/v1/workflows/{workflow_permanent_id}/schedules/{workflow_schedule_id}.",
);
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* @param {string} workflowPermanentId
* @param {string} workflowScheduleId
* @param {Skyvern.WorkflowScheduleUpsertRequest} request
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.agent.updateWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id", {
* cron_expression: "cron_expression",
* timezone: "timezone"
* })
*/
public updateWorkflowSchedule(
workflowPermanentId: string,
workflowScheduleId: string,
request: Skyvern.WorkflowScheduleUpsertRequest,
requestOptions?: Agent.RequestOptions,
): core.HttpResponsePromise<Skyvern.WorkflowScheduleResponse> {
return core.HttpResponsePromise.fromPromise(
this.__updateWorkflowSchedule(workflowPermanentId, workflowScheduleId, request, requestOptions),
);
}
private async __updateWorkflowSchedule(
workflowPermanentId: string,
workflowScheduleId: string,
request: Skyvern.WorkflowScheduleUpsertRequest,
requestOptions?: Agent.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.WorkflowScheduleResponse>> {
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
requestOptions?.headers,
);
const _response = await core.fetcher({
url: core.url.join(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`api/v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}`,
),
method: "PUT",
headers: _headers,
contentType: "application/json",
queryParameters: requestOptions?.queryParams,
requestType: "json",
body: request,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return { data: _response.body as Skyvern.WorkflowScheduleResponse, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling PUT /api/v1/workflows/{workflow_permanent_id}/schedules/{workflow_schedule_id}.",
);
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* @param {string} workflowPermanentId
* @param {string} workflowScheduleId
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.agent.deleteWorkflowScheduleRoute("workflow_permanent_id", "workflow_schedule_id")
*/
public deleteWorkflowScheduleRoute(
workflowPermanentId: string,
workflowScheduleId: string,
requestOptions?: Agent.RequestOptions,
): core.HttpResponsePromise<Record<string, boolean>> {
return core.HttpResponsePromise.fromPromise(
this.__deleteWorkflowScheduleRoute(workflowPermanentId, workflowScheduleId, requestOptions),
);
}
private async __deleteWorkflowScheduleRoute(
workflowPermanentId: string,
workflowScheduleId: string,
requestOptions?: Agent.RequestOptions,
): Promise<core.WithRawResponse<Record<string, boolean>>> {
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,
`api/v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}`,
),
method: "DELETE",
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, boolean>, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling DELETE /api/v1/workflows/{workflow_permanent_id}/schedules/{workflow_schedule_id}.",
);
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* @param {string} workflowPermanentId
* @param {string} workflowScheduleId
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.agent.enableWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id")
*/
public enableWorkflowSchedule(
workflowPermanentId: string,
workflowScheduleId: string,
requestOptions?: Agent.RequestOptions,
): core.HttpResponsePromise<Skyvern.WorkflowScheduleResponse> {
return core.HttpResponsePromise.fromPromise(
this.__enableWorkflowSchedule(workflowPermanentId, workflowScheduleId, requestOptions),
);
}
private async __enableWorkflowSchedule(
workflowPermanentId: string,
workflowScheduleId: string,
requestOptions?: Agent.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.WorkflowScheduleResponse>> {
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
requestOptions?.headers,
);
const _response = await core.fetcher({
url: core.url.join(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`api/v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}/enable`,
),
method: "POST",
headers: _headers,
queryParameters: requestOptions?.queryParams,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return { data: _response.body as Skyvern.WorkflowScheduleResponse, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling POST /api/v1/workflows/{workflow_permanent_id}/schedules/{workflow_schedule_id}/enable.",
);
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
/**
* @param {string} workflowPermanentId
* @param {string} workflowScheduleId
* @param {Agent.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.agent.disableWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id")
*/
public disableWorkflowSchedule(
workflowPermanentId: string,
workflowScheduleId: string,
requestOptions?: Agent.RequestOptions,
): core.HttpResponsePromise<Skyvern.WorkflowScheduleResponse> {
return core.HttpResponsePromise.fromPromise(
this.__disableWorkflowSchedule(workflowPermanentId, workflowScheduleId, requestOptions),
);
}
private async __disableWorkflowSchedule(
workflowPermanentId: string,
workflowScheduleId: string,
requestOptions?: Agent.RequestOptions,
): Promise<core.WithRawResponse<Skyvern.WorkflowScheduleResponse>> {
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
requestOptions?.headers,
);
const _response = await core.fetcher({
url: core.url.join(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)) ??
environments.SkyvernEnvironment.Cloud,
`api/v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/schedules/${core.url.encodePathParam(workflowScheduleId)}/disable`,
),
method: "POST",
headers: _headers,
queryParameters: requestOptions?.queryParams,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return { data: _response.body as Skyvern.WorkflowScheduleResponse, rawResponse: _response.rawResponse };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
case 422:
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
default:
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}
}
switch (_response.error.reason) {
case "non-json":
throw new errors.SkyvernError({
statusCode: _response.error.statusCode,
body: _response.error.rawBody,
rawResponse: _response.rawResponse,
});
case "timeout":
throw new errors.SkyvernTimeoutError(
"Timeout exceeded when calling POST /api/v1/workflows/{workflow_permanent_id}/schedules/{workflow_schedule_id}/disable.",
);
case "unknown":
throw new errors.SkyvernError({
message: _response.error.errorMessage,
rawResponse: _response.rawResponse,
});
}
}
}

View file

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

View file

@ -1,21 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../../../../index.js";
/**
* @example
* {
* page: 1,
* page_size: 1,
* status: "active",
* search: "search"
* }
*/
export interface ListOrganizationSchedulesApiV1SchedulesGetRequest {
page?: number;
page_size?: number;
/** Filter by status: 'active' or 'paused' */
status?: Skyvern.ListOrganizationSchedulesApiV1SchedulesGetRequestStatus;
/** Search by workflow title or schedule name */
search?: string;
}

View file

@ -1 +0,0 @@
export type { ListOrganizationSchedulesApiV1SchedulesGetRequest } from "./ListOrganizationSchedulesApiV1SchedulesGetRequest.js";

View file

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

View file

@ -1,8 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
export const ListOrganizationSchedulesApiV1SchedulesGetRequestStatus = {
Active: "active",
Paused: "paused",
} as const;
export type ListOrganizationSchedulesApiV1SchedulesGetRequestStatus =
(typeof ListOrganizationSchedulesApiV1SchedulesGetRequestStatus)[keyof typeof ListOrganizationSchedulesApiV1SchedulesGetRequestStatus];

View file

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

View file

@ -1,5 +1,2 @@
export * from "./agent/client/requests/index.js";
export * as agent from "./agent/index.js";
export * from "./agent/types/index.js";
export * as artifacts from "./artifacts/index.js";
export * as scripts from "./scripts/index.js";

View file

@ -1,23 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../index.js";
export interface BillingStateResponse {
billing_id: string;
organization_id: string;
plan_tier: Skyvern.PlanTier;
current_period_start?: string;
current_period_end?: string;
included_credits_this_period: number;
credits_consumed_this_period: number;
cached_credits_consumed_this_period: number;
overage_enabled: boolean;
browser_uptime_seconds_consumed: number;
topup_credits_total: number;
topup_credits_used: number;
topup_credits_remaining: number;
credits_remaining: number;
cancel_at_period_end?: boolean;
created_at: string;
modified_at: string;
}

View file

@ -1,7 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
export interface ChangeTierResponse {
status: string;
tier: string;
redirect_url?: string;
}

View file

@ -1,6 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
export interface CheckoutSessionResponse {
id: string;
url: string;
}

View file

@ -12,6 +12,8 @@ export interface CreateCredentialRequest {
credential_type: Skyvern.SkyvernForgeSdkSchemasCredentialsCredentialType;
/** The credential data to store */
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;
}
export namespace CreateCredentialRequest {

View file

@ -14,12 +14,16 @@ export interface CredentialResponse {
credential_type: Skyvern.CredentialTypeOutput;
/** Name of the credential */
name: string;
/** Which vault stores this credential (e.g., 'bitwarden', 'azure_vault', 'custom') */
vault_type?: Skyvern.CredentialVaultType;
/** Browser profile ID linked to this credential */
browser_profile_id?: string;
/** Login page URL used during the credential test */
tested_url?: string;
/** User-provided context describing the login sequence (e.g., 'click SSO button first') */
user_context?: string;
/** Whether the user intends to save a browser session, regardless of test outcome */
save_browser_session_intent?: boolean;
}
export namespace CredentialResponse {

View file

@ -0,0 +1,8 @@
// This file was auto-generated by Fern from our API Definition.
export const CredentialVaultType = {
Bitwarden: "bitwarden",
AzureVault: "azure_vault",
Custom: "custom",
} as const;
export type CredentialVaultType = (typeof CredentialVaultType)[keyof typeof CredentialVaultType];

View file

@ -1,17 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
export interface OrganizationScheduleItem {
workflow_schedule_id: string;
organization_id: string;
workflow_permanent_id: string;
workflow_title: string;
cron_expression: string;
timezone: string;
enabled: boolean;
parameters?: Record<string, unknown>;
name?: string;
description?: string;
next_run?: string;
created_at: string;
modified_at: string;
}

View file

@ -1,10 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../index.js";
export interface OrganizationScheduleListResponse {
schedules: Skyvern.OrganizationScheduleItem[];
total_count: number;
page: number;
page_size: number;
}

View file

@ -5,7 +5,7 @@ import type * as Skyvern from "../index.js";
/**
* Response model for password credentials non-sensitive fields only.
*
* SECURITY: Must NEVER include password, TOTP secret, or TOTP identifier.
* SECURITY: Must NEVER include password or TOTP secret.
*/
export interface PasswordCredentialResponse {
/** The username associated with the credential */

View file

@ -1,10 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
/** Self-serve subscription tiers. Enterprise customers use manual billing (bypass). */
export const PlanTier = {
Free: "free",
Hobby: "hobby",
Pro: "pro",
Enterprise: "enterprise",
} as const;
export type PlanTier = (typeof PlanTier)[keyof typeof PlanTier];

View file

@ -1,5 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
export interface PortalSessionResponse {
url: string;
}

View file

@ -0,0 +1,17 @@
// This file was auto-generated by Fern from our API Definition.
/**
* Lightweight run-history item backed by the task_runs table.
*/
export interface TaskRunListItem {
task_run_id: string;
run_id: string;
task_run_type: string;
status: string;
title?: string;
started_at?: string;
finished_at?: string;
created_at: string;
workflow_permanent_id?: string;
script_run?: boolean;
}

View file

@ -93,7 +93,7 @@ export interface TaskRunRequest {
max_screenshot_scrolls?: number;
/** The CDP address for the task. */
browser_address?: string;
/** Whether to run the task with agent or code. */
/** Whether to run the task with agent or code. Null means use the default. */
run_with?: string;
}

View file

@ -25,6 +25,7 @@ export interface Workflow {
ai_fallback?: boolean;
cache_key?: string;
adaptive_caching?: boolean;
code_version?: number;
generate_script_on_terminal?: boolean;
run_sequentially?: boolean;
sequential_key?: string;

View file

@ -20,6 +20,7 @@ export interface WorkflowCreateYamlRequest {
ai_fallback?: boolean;
cache_key?: string;
adaptive_caching?: boolean;
code_version?: number;
generate_script_on_terminal?: boolean;
run_sequentially?: boolean;
sequential_key?: string;

View file

@ -18,6 +18,7 @@ export interface WorkflowRun {
totp_verification_url?: string;
totp_identifier?: string;
failure_reason?: string;
failure_category?: Record<string, unknown>[];
parent_workflow_run_id?: string;
workflow_title?: string;
max_screenshot_scrolls?: number;

View file

@ -65,7 +65,7 @@ export interface WorkflowRunRequest {
browser_address?: string;
/** Whether to fallback to AI if the workflow run fails. */
ai_fallback?: boolean;
/** Whether to run the workflow with agent, code, or code_v2 (adaptive caching). */
/** Whether to run the workflow with agent or code. Null inherits from the workflow setting. */
run_with?: string;
}

View file

@ -41,7 +41,7 @@ export interface WorkflowRunResponse {
errors?: Record<string, unknown>[];
/** Total number of steps executed in this run */
step_count?: number;
/** Whether the workflow run was executed with agent, code, or code_v2 (adaptive caching) */
/** Whether the workflow run was executed with agent or code */
run_with?: string;
/** Whether to fallback to AI if code run fails. */
ai_fallback?: boolean;

View file

@ -1,8 +1,17 @@
// This file was auto-generated by Fern from our API Definition.
/**
* How a workflow run was initiated.
*
* - manual: User clicked "Run" in the UI
* - api: Direct API call to the run endpoint
* - scheduled: Triggered by a cron schedule
* - webhook: Triggered by an external system via the webhook endpoint
*/
export const WorkflowRunTriggerType = {
Manual: "manual",
Api: "api",
Scheduled: "scheduled",
Webhook: "webhook",
} as const;
export type WorkflowRunTriggerType = (typeof WorkflowRunTriggerType)[keyof typeof WorkflowRunTriggerType];

View file

@ -1,17 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
export interface WorkflowSchedule {
workflow_schedule_id: string;
organization_id: string;
workflow_permanent_id: string;
cron_expression: string;
timezone: string;
enabled: boolean;
parameters?: Record<string, unknown>;
temporal_schedule_id?: string;
name?: string;
description?: string;
created_at: string;
modified_at: string;
deleted_at?: string;
}

View file

@ -1,7 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../index.js";
export interface WorkflowScheduleListResponse {
schedules: Skyvern.WorkflowSchedule[];
}

View file

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

View file

@ -1,10 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
export interface WorkflowScheduleUpsertRequest {
cron_expression: string;
timezone: string;
enabled?: boolean;
parameters?: Record<string, unknown>;
name?: string;
description?: string;
}

View file

@ -12,7 +12,6 @@ export * from "./AwsSecretParameterYaml.js";
export * from "./AzureSecretParameter.js";
export * from "./AzureVaultCredentialParameter.js";
export * from "./AzureVaultCredentialParameterYaml.js";
export * from "./BillingStateResponse.js";
export * from "./BitwardenCreditCardDataParameter.js";
export * from "./BitwardenCreditCardDataParameterYaml.js";
export * from "./BitwardenLoginCredentialParameter.js";
@ -26,8 +25,6 @@ export * from "./BranchConditionYaml.js";
export * from "./BranchCriteriaYaml.js";
export * from "./BrowserProfile.js";
export * from "./BrowserSessionResponse.js";
export * from "./ChangeTierResponse.js";
export * from "./CheckoutSessionResponse.js";
export * from "./ClickAction.js";
export * from "./ClickContext.js";
export * from "./CodeBlock.js";
@ -44,6 +41,7 @@ export * from "./CredentialParameter.js";
export * from "./CredentialParameterYaml.js";
export * from "./CredentialResponse.js";
export * from "./CredentialTypeOutput.js";
export * from "./CredentialVaultType.js";
export * from "./CreditCardCredentialResponse.js";
export * from "./DownloadToS3Block.js";
export * from "./DownloadToS3BlockYaml.js";
@ -93,8 +91,6 @@ export * from "./NonEmptyCreditCardCredential.js";
export * from "./NonEmptyPasswordCredential.js";
export * from "./OnePasswordCredentialParameter.js";
export * from "./OnePasswordCredentialParameterYaml.js";
export * from "./OrganizationScheduleItem.js";
export * from "./OrganizationScheduleListResponse.js";
export * from "./OtpType.js";
export * from "./OutputParameter.js";
export * from "./OutputParameterYaml.js";
@ -103,8 +99,6 @@ export * from "./PdfFormat.js";
export * from "./PdfParserBlock.js";
export * from "./PdfParserBlockYaml.js";
export * from "./PersistentBrowserType.js";
export * from "./PlanTier.js";
export * from "./PortalSessionResponse.js";
export * from "./PrintPageBlock.js";
export * from "./PrintPageBlockParametersItem.js";
export * from "./PrintPageBlockYaml.js";
@ -130,6 +124,7 @@ export * from "./SkyvernSchemasRunBlocksCredentialType.js";
export * from "./TaskBlock.js";
export * from "./TaskBlockParametersItem.js";
export * from "./TaskBlockYaml.js";
export * from "./TaskRunListItem.js";
export * from "./TaskRunRequest.js";
export * from "./TaskRunResponse.js";
export * from "./TaskV2Block.js";
@ -178,10 +173,6 @@ export * from "./WorkflowRunStatus.js";
export * from "./WorkflowRunTimeline.js";
export * from "./WorkflowRunTimelineType.js";
export * from "./WorkflowRunTriggerType.js";
export * from "./WorkflowSchedule.js";
export * from "./WorkflowScheduleListResponse.js";
export * from "./WorkflowScheduleResponse.js";
export * from "./WorkflowScheduleUpsertRequest.js";
export * from "./WorkflowStatus.js";
export * from "./WorkflowTriggerBlock.js";
export * from "./WorkflowTriggerBlockParametersItem.js";

View file

@ -1 +1 @@
export const SDK_VERSION = "1.0.28";
export const SDK_VERSION = "1.0.29";

View file

@ -1,563 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
import * as Skyvern from "../../src/api/index";
import { SkyvernClient } from "../../src/Client";
import { mockServerPool } from "../mock-server/MockServerPool";
describe("Agent", () => {
test("listOrganizationSchedules (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = {
schedules: [
{
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
workflow_title: "workflow_title",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
name: "name",
description: "description",
next_run: "2024-01-15T09:30:00Z",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
},
],
total_count: 1,
page: 1,
page_size: 1,
};
server.mockEndpoint().get("/api/v1/schedules").respondWith().statusCode(200).jsonBody(rawResponseBody).build();
const response = await client.agent.listOrganizationSchedules({
page: 1,
page_size: 1,
status: "active",
search: "search",
});
expect(response).toEqual({
schedules: [
{
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
workflow_title: "workflow_title",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: {
key: "value",
},
name: "name",
description: "description",
next_run: "2024-01-15T09:30:00Z",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
},
],
total_count: 1,
page: 1,
page_size: 1,
});
});
test("listOrganizationSchedules (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server.mockEndpoint().get("/api/v1/schedules").respondWith().statusCode(422).jsonBody(rawResponseBody).build();
await expect(async () => {
return await client.agent.listOrganizationSchedules();
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("listWorkflowSchedules (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = {
schedules: [
{
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
],
};
server
.mockEndpoint()
.get("/api/v1/workflows/workflow_permanent_id/schedules")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.agent.listWorkflowSchedules("workflow_permanent_id");
expect(response).toEqual({
schedules: [
{
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: {
key: "value",
},
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
],
});
});
test("listWorkflowSchedules (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.get("/api/v1/workflows/workflow_permanent_id/schedules")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.agent.listWorkflowSchedules("workflow_permanent_id");
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("createWorkflowSchedule (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawRequestBody = { cron_expression: "cron_expression", timezone: "timezone" };
const rawResponseBody = {
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
next_runs: ["2024-01-15T09:30:00Z"],
};
server
.mockEndpoint()
.post("/api/v1/workflows/workflow_permanent_id/schedules")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.agent.createWorkflowSchedule("workflow_permanent_id", {
cron_expression: "cron_expression",
timezone: "timezone",
});
expect(response).toEqual({
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: {
key: "value",
},
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
next_runs: ["2024-01-15T09:30:00Z"],
});
});
test("createWorkflowSchedule (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawRequestBody = { cron_expression: "cron_expression", timezone: "timezone" };
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/api/v1/workflows/workflow_permanent_id/schedules")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.agent.createWorkflowSchedule("workflow_permanent_id", {
cron_expression: "cron_expression",
timezone: "timezone",
});
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("getWorkflowSchedule (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = {
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
next_runs: ["2024-01-15T09:30:00Z"],
};
server
.mockEndpoint()
.get("/api/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.agent.getWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id");
expect(response).toEqual({
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: {
key: "value",
},
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
next_runs: ["2024-01-15T09:30:00Z"],
});
});
test("getWorkflowSchedule (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.get("/api/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.agent.getWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id");
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("updateWorkflowSchedule (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawRequestBody = { cron_expression: "cron_expression", timezone: "timezone" };
const rawResponseBody = {
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
next_runs: ["2024-01-15T09:30:00Z"],
};
server
.mockEndpoint()
.put("/api/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.agent.updateWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id", {
cron_expression: "cron_expression",
timezone: "timezone",
});
expect(response).toEqual({
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: {
key: "value",
},
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
next_runs: ["2024-01-15T09:30:00Z"],
});
});
test("updateWorkflowSchedule (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawRequestBody = { cron_expression: "cron_expression", timezone: "timezone" };
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.put("/api/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.agent.updateWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id", {
cron_expression: "cron_expression",
timezone: "timezone",
});
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("deleteWorkflowScheduleRoute (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: true };
server
.mockEndpoint()
.delete("/api/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.agent.deleteWorkflowScheduleRoute(
"workflow_permanent_id",
"workflow_schedule_id",
);
expect(response).toEqual({
key: true,
});
});
test("deleteWorkflowScheduleRoute (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.delete("/api/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.agent.deleteWorkflowScheduleRoute("workflow_permanent_id", "workflow_schedule_id");
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("enableWorkflowSchedule (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = {
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
next_runs: ["2024-01-15T09:30:00Z"],
};
server
.mockEndpoint()
.post("/api/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id/enable")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.agent.enableWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id");
expect(response).toEqual({
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: {
key: "value",
},
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
next_runs: ["2024-01-15T09:30:00Z"],
});
});
test("enableWorkflowSchedule (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/api/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id/enable")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.agent.enableWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id");
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("disableWorkflowSchedule (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = {
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: { key: "value" },
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
next_runs: ["2024-01-15T09:30:00Z"],
};
server
.mockEndpoint()
.post("/api/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id/disable")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.agent.disableWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id");
expect(response).toEqual({
schedule: {
workflow_schedule_id: "workflow_schedule_id",
organization_id: "organization_id",
workflow_permanent_id: "workflow_permanent_id",
cron_expression: "cron_expression",
timezone: "timezone",
enabled: true,
parameters: {
key: "value",
},
temporal_schedule_id: "temporal_schedule_id",
name: "name",
description: "description",
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
deleted_at: "2024-01-15T09:30:00Z",
},
next_runs: ["2024-01-15T09:30:00Z"],
});
});
test("disableWorkflowSchedule (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/api/v1/workflows/workflow_permanent_id/schedules/workflow_schedule_id/disable")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.agent.disableWorkflowSchedule("workflow_permanent_id", "workflow_schedule_id");
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
});

View file

@ -208,7 +208,7 @@ describe("SkyvernClient", () => {
script_run: { ai_fallback_triggered: true },
errors: [{ key: "value" }],
step_count: 1,
run_with: "run_with",
run_with: "agent",
ai_fallback: true,
run_request: {
workflow_id: "wpid_123",
@ -281,7 +281,7 @@ describe("SkyvernClient", () => {
},
],
step_count: 1,
run_with: "run_with",
run_with: "agent",
ai_fallback: true,
run_request: {
workflow_id: "wpid_123",
@ -588,6 +588,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -666,6 +667,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -744,6 +746,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -820,6 +823,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -906,6 +910,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -979,6 +984,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -1423,6 +1429,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -1496,6 +1503,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -1564,93 +1572,6 @@ describe("SkyvernClient", () => {
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("get_artifact (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = {
created_at: "2023-01-01T00:00:00Z",
modified_at: "2023-01-01T00:00:00Z",
artifact_id: "artifact_id",
artifact_type: "recording",
uri: "uri",
bundle_key: "bundle_key",
task_id: "task_id",
step_id: "step_id",
workflow_run_id: "workflow_run_id",
workflow_run_block_id: "workflow_run_block_id",
run_id: "run_id",
observer_cruise_id: "observer_cruise_id",
observer_thought_id: "observer_thought_id",
ai_suggestion_id: "ai_suggestion_id",
signed_url: "signed_url",
organization_id: "organization_id",
};
server
.mockEndpoint()
.get("/v1/artifacts/artifact_id")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.getArtifact("artifact_id");
expect(response).toEqual({
created_at: "2023-01-01T00:00:00Z",
modified_at: "2023-01-01T00:00:00Z",
artifact_id: "artifact_id",
artifact_type: "recording",
uri: "uri",
bundle_key: "bundle_key",
task_id: "task_id",
step_id: "step_id",
workflow_run_id: "workflow_run_id",
workflow_run_block_id: "workflow_run_block_id",
run_id: "run_id",
observer_cruise_id: "observer_cruise_id",
observer_thought_id: "observer_thought_id",
ai_suggestion_id: "ai_suggestion_id",
signed_url: "signed_url",
organization_id: "organization_id",
});
});
test("get_artifact (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.get("/v1/artifacts/artifact_id")
.respondWith()
.statusCode(404)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.getArtifact("artifact_id");
}).rejects.toThrow(Skyvern.NotFoundError);
});
test("get_artifact (3)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.get("/v1/artifacts/artifact_id")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.getArtifact("artifact_id");
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("get_run_artifacts (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
@ -1988,6 +1909,59 @@ describe("SkyvernClient", () => {
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("get_runs_v2 (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = [
{
task_run_id: "task_run_id",
run_id: "run_id",
task_run_type: "task_run_type",
status: "status",
title: "title",
started_at: "2024-01-15T09:30:00Z",
finished_at: "2024-01-15T09:30:00Z",
created_at: "2024-01-15T09:30:00Z",
workflow_permanent_id: "workflow_permanent_id",
script_run: true,
},
];
server.mockEndpoint().get("/v1/runs").respondWith().statusCode(200).jsonBody(rawResponseBody).build();
const response = await client.getRunsV2({
page: 1,
page_size: 1,
search_key: "search_key",
});
expect(response).toEqual([
{
task_run_id: "task_run_id",
run_id: "run_id",
task_run_type: "task_run_type",
status: "status",
title: "title",
started_at: "2024-01-15T09:30:00Z",
finished_at: "2024-01-15T09:30:00Z",
created_at: "2024-01-15T09:30:00Z",
workflow_permanent_id: "workflow_permanent_id",
script_run: true,
},
]);
});
test("get_runs_v2 (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server.mockEndpoint().get("/v1/runs").respondWith().statusCode(422).jsonBody(rawResponseBody).build();
await expect(async () => {
return await client.getRunsV2();
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("get_workflow_runs (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
@ -2009,6 +1983,7 @@ describe("SkyvernClient", () => {
totp_verification_url: "totp_verification_url",
totp_identifier: "totp_identifier",
failure_reason: "failure_reason",
failure_category: [{ key: "value" }],
parent_workflow_run_id: "parent_workflow_run_id",
workflow_title: "workflow_title",
max_screenshot_scrolls: 1,
@ -2056,6 +2031,11 @@ describe("SkyvernClient", () => {
totp_verification_url: "totp_verification_url",
totp_identifier: "totp_identifier",
failure_reason: "failure_reason",
failure_category: [
{
key: "value",
},
],
parent_workflow_run_id: "parent_workflow_run_id",
workflow_title: "workflow_title",
max_screenshot_scrolls: 1,
@ -2146,6 +2126,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -2221,6 +2202,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -2305,6 +2287,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -2381,6 +2364,7 @@ describe("SkyvernClient", () => {
ai_fallback: true,
cache_key: "cache_key",
adaptive_caching: true,
code_version: 1,
generate_script_on_terminal: true,
run_sequentially: true,
sequential_key: "sequential_key",
@ -3200,9 +3184,11 @@ describe("SkyvernClient", () => {
},
credential_type: "password",
name: "Amazon Login",
vault_type: "bitwarden",
browser_profile_id: "browser_profile_id",
tested_url: "tested_url",
user_context: "user_context",
save_browser_session_intent: true,
},
];
server.mockEndpoint().get("/v1/credentials").respondWith().statusCode(200).jsonBody(rawResponseBody).build();
@ -3210,6 +3196,7 @@ describe("SkyvernClient", () => {
const response = await client.getCredentials({
page: 1,
page_size: 10,
vault_type: "bitwarden",
});
expect(response).toEqual([
{
@ -3221,9 +3208,11 @@ describe("SkyvernClient", () => {
},
credential_type: "password",
name: "Amazon Login",
vault_type: "bitwarden",
browser_profile_id: "browser_profile_id",
tested_url: "tested_url",
user_context: "user_context",
save_browser_session_intent: true,
},
]);
});
@ -3257,9 +3246,11 @@ describe("SkyvernClient", () => {
},
credential_type: "password",
name: "Amazon Login",
vault_type: "bitwarden",
browser_profile_id: "browser_profile_id",
tested_url: "tested_url",
user_context: "user_context",
save_browser_session_intent: true,
};
server
.mockEndpoint()
@ -3287,9 +3278,11 @@ describe("SkyvernClient", () => {
},
credential_type: "password",
name: "Amazon Login",
vault_type: "bitwarden",
browser_profile_id: "browser_profile_id",
tested_url: "tested_url",
user_context: "user_context",
save_browser_session_intent: true,
});
});
@ -3340,9 +3333,11 @@ describe("SkyvernClient", () => {
},
credential_type: "password",
name: "Amazon Login",
vault_type: "bitwarden",
browser_profile_id: "browser_profile_id",
tested_url: "tested_url",
user_context: "user_context",
save_browser_session_intent: true,
};
server
.mockEndpoint()
@ -3370,9 +3365,11 @@ describe("SkyvernClient", () => {
},
credential_type: "password",
name: "Amazon Login",
vault_type: "bitwarden",
browser_profile_id: "browser_profile_id",
tested_url: "tested_url",
user_context: "user_context",
save_browser_session_intent: true,
});
});
@ -3447,9 +3444,11 @@ describe("SkyvernClient", () => {
},
credential_type: "password",
name: "Amazon Login",
vault_type: "bitwarden",
browser_profile_id: "browser_profile_id",
tested_url: "tested_url",
user_context: "user_context",
save_browser_session_intent: true,
};
server
.mockEndpoint()
@ -3469,9 +3468,11 @@ describe("SkyvernClient", () => {
},
credential_type: "password",
name: "Amazon Login",
vault_type: "bitwarden",
browser_profile_id: "browser_profile_id",
tested_url: "tested_url",
user_context: "user_context",
save_browser_session_intent: true,
});
});
@ -3519,7 +3520,7 @@ describe("SkyvernClient", () => {
script_run: { ai_fallback_triggered: true },
errors: [{ key: "value" }],
step_count: 1,
run_with: "run_with",
run_with: "agent",
ai_fallback: true,
run_request: {
workflow_id: "wpid_123",
@ -3585,7 +3586,7 @@ describe("SkyvernClient", () => {
},
],
step_count: 1,
run_with: "run_with",
run_with: "agent",
ai_fallback: true,
run_request: {
workflow_id: "wpid_123",
@ -3657,7 +3658,7 @@ describe("SkyvernClient", () => {
script_run: { ai_fallback_triggered: true },
errors: [{ key: "value" }],
step_count: 1,
run_with: "run_with",
run_with: "agent",
ai_fallback: true,
run_request: {
workflow_id: "wpid_123",
@ -3723,7 +3724,7 @@ describe("SkyvernClient", () => {
},
],
step_count: 1,
run_with: "run_with",
run_with: "agent",
ai_fallback: true,
run_request: {
workflow_id: "wpid_123",
@ -4082,201 +4083,4 @@ describe("SkyvernClient", () => {
});
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("create_checkout_session_api_v1_billing_checkout_post (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawRequestBody = { tier: "free" };
const rawResponseBody = { id: "id", url: "url" };
server
.mockEndpoint()
.post("/api/v1/billing/checkout")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.createCheckoutSessionApiV1BillingCheckoutPost({
tier: "free",
});
expect(response).toEqual({
id: "id",
url: "url",
});
});
test("create_checkout_session_api_v1_billing_checkout_post (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawRequestBody = { tier: "free" };
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/api/v1/billing/checkout")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.createCheckoutSessionApiV1BillingCheckoutPost({
tier: "free",
});
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("create_portal_session_api_v1_billing_portal_post (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { url: "url" };
server
.mockEndpoint()
.post("/api/v1/billing/portal")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.createPortalSessionApiV1BillingPortalPost();
expect(response).toEqual({
url: "url",
});
});
test("create_portal_session_api_v1_billing_portal_post (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/api/v1/billing/portal")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.createPortalSessionApiV1BillingPortalPost();
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("get_organization_billing_api_v1_billing_state_get (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = {
billing_id: "billing_id",
organization_id: "organization_id",
plan_tier: "free",
current_period_start: "2024-01-15T09:30:00Z",
current_period_end: "2024-01-15T09:30:00Z",
included_credits_this_period: 1,
credits_consumed_this_period: 1,
cached_credits_consumed_this_period: 1,
overage_enabled: true,
browser_uptime_seconds_consumed: 1,
topup_credits_total: 1,
topup_credits_used: 1,
topup_credits_remaining: 1,
credits_remaining: 1,
cancel_at_period_end: true,
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
};
server
.mockEndpoint()
.get("/api/v1/billing/state")
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.getOrganizationBillingApiV1BillingStateGet();
expect(response).toEqual({
billing_id: "billing_id",
organization_id: "organization_id",
plan_tier: "free",
current_period_start: "2024-01-15T09:30:00Z",
current_period_end: "2024-01-15T09:30:00Z",
included_credits_this_period: 1,
credits_consumed_this_period: 1,
cached_credits_consumed_this_period: 1,
overage_enabled: true,
browser_uptime_seconds_consumed: 1,
topup_credits_total: 1,
topup_credits_used: 1,
topup_credits_remaining: 1,
credits_remaining: 1,
cancel_at_period_end: true,
created_at: "2024-01-15T09:30:00Z",
modified_at: "2024-01-15T09:30:00Z",
});
});
test("get_organization_billing_api_v1_billing_state_get (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.get("/api/v1/billing/state")
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.getOrganizationBillingApiV1BillingStateGet();
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
test("change_tier_api_v1_billing_change_tier_post (1)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawRequestBody = { tier: "free" };
const rawResponseBody = { status: "status", tier: "tier", redirect_url: "redirect_url" };
server
.mockEndpoint()
.post("/api/v1/billing/change-tier")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(200)
.jsonBody(rawResponseBody)
.build();
const response = await client.changeTierApiV1BillingChangeTierPost({
tier: "free",
});
expect(response).toEqual({
status: "status",
tier: "tier",
redirect_url: "redirect_url",
});
});
test("change_tier_api_v1_billing_change_tier_post (2)", async () => {
const server = mockServerPool.createServer();
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
const rawRequestBody = { tier: "free" };
const rawResponseBody = { key: "value" };
server
.mockEndpoint()
.post("/api/v1/billing/change-tier")
.jsonBody(rawRequestBody)
.respondWith()
.statusCode(422)
.jsonBody(rawResponseBody)
.build();
await expect(async () => {
return await client.changeTierApiV1BillingChangeTierPost({
tier: "free",
});
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
});
});

View file

@ -34,7 +34,6 @@ if typing.TYPE_CHECKING:
AzureSecretParameter,
AzureVaultCredentialParameter,
AzureVaultCredentialParameterYaml,
BillingStateResponse,
BitwardenCreditCardDataParameter,
BitwardenCreditCardDataParameterYaml,
BitwardenLoginCredentialParameter,
@ -51,8 +50,6 @@ if typing.TYPE_CHECKING:
BranchCriteriaYamlCriteriaType,
BrowserProfile,
BrowserSessionResponse,
ChangeTierResponse,
CheckoutSessionResponse,
ClickAction,
ClickActionData,
ClickContext,
@ -95,6 +92,7 @@ if typing.TYPE_CHECKING:
CredentialResponse,
CredentialResponseCredential,
CredentialTypeOutput,
CredentialVaultType,
CreditCardCredentialResponse,
DownloadToS3Block,
DownloadToS3BlockYaml,
@ -286,8 +284,6 @@ if typing.TYPE_CHECKING:
NonEmptyPasswordCredential,
OnePasswordCredentialParameter,
OnePasswordCredentialParameterYaml,
OrganizationScheduleItem,
OrganizationScheduleListResponse,
OtpType,
OutputParameter,
OutputParameterYaml,
@ -296,8 +292,6 @@ if typing.TYPE_CHECKING:
PdfParserBlock,
PdfParserBlockYaml,
PersistentBrowserType,
PlanTier,
PortalSessionResponse,
PrintPageBlock,
PrintPageBlockParametersItem,
PrintPageBlockParametersItem_AwsSecret,
@ -357,6 +351,7 @@ if typing.TYPE_CHECKING:
TaskBlockParametersItem_Workflow,
TaskBlockYaml,
TaskBlockYamlDataSchema,
TaskRunListItem,
TaskRunRequest,
TaskRunRequestDataExtractionSchema,
TaskRunRequestProxyLocation,
@ -535,10 +530,6 @@ if typing.TYPE_CHECKING:
WorkflowRunTimeline,
WorkflowRunTimelineType,
WorkflowRunTriggerType,
WorkflowSchedule,
WorkflowScheduleListResponse,
WorkflowScheduleResponse,
WorkflowScheduleUpsertRequest,
WorkflowStatus,
WorkflowTriggerBlock,
WorkflowTriggerBlockParametersItem,
@ -556,8 +547,7 @@ if typing.TYPE_CHECKING:
WorkflowTriggerBlockYaml,
)
from .errors import BadRequestError, ConflictError, ForbiddenError, NotFoundError, UnprocessableEntityError
from . import agent, artifacts, scripts
from .agent import ListOrganizationSchedulesApiV1SchedulesGetRequestStatus
from . import artifacts, scripts
from .client import AsyncSkyvern, Skyvern
from .environment import SkyvernEnvironment
from .version import __version__
@ -591,7 +581,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"AzureVaultCredentialParameter": ".types",
"AzureVaultCredentialParameterYaml": ".types",
"BadRequestError": ".errors",
"BillingStateResponse": ".types",
"BitwardenCreditCardDataParameter": ".types",
"BitwardenCreditCardDataParameterYaml": ".types",
"BitwardenLoginCredentialParameter": ".types",
@ -608,8 +597,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"BranchCriteriaYamlCriteriaType": ".types",
"BrowserProfile": ".types",
"BrowserSessionResponse": ".types",
"ChangeTierResponse": ".types",
"CheckoutSessionResponse": ".types",
"ClickAction": ".types",
"ClickActionData": ".types",
"ClickContext": ".types",
@ -653,6 +640,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"CredentialResponse": ".types",
"CredentialResponseCredential": ".types",
"CredentialTypeOutput": ".types",
"CredentialVaultType": ".types",
"CreditCardCredentialResponse": ".types",
"DownloadToS3Block": ".types",
"DownloadToS3BlockYaml": ".types",
@ -810,7 +798,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"InputTextAction": ".types",
"InputTextActionData": ".types",
"JinjaBranchCriteria": ".types",
"ListOrganizationSchedulesApiV1SchedulesGetRequestStatus": ".agent",
"LocateElementAction": ".types",
"LoginBlock": ".types",
"LoginBlockDataSchema": ".types",
@ -847,8 +834,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"NotFoundError": ".errors",
"OnePasswordCredentialParameter": ".types",
"OnePasswordCredentialParameterYaml": ".types",
"OrganizationScheduleItem": ".types",
"OrganizationScheduleListResponse": ".types",
"OtpType": ".types",
"OutputParameter": ".types",
"OutputParameterYaml": ".types",
@ -857,8 +842,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"PdfParserBlock": ".types",
"PdfParserBlockYaml": ".types",
"PersistentBrowserType": ".types",
"PlanTier": ".types",
"PortalSessionResponse": ".types",
"PrintPageBlock": ".types",
"PrintPageBlockParametersItem": ".types",
"PrintPageBlockParametersItem_AwsSecret": ".types",
@ -920,6 +903,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"TaskBlockParametersItem_Workflow": ".types",
"TaskBlockYaml": ".types",
"TaskBlockYamlDataSchema": ".types",
"TaskRunListItem": ".types",
"TaskRunRequest": ".types",
"TaskRunRequestDataExtractionSchema": ".types",
"TaskRunRequestProxyLocation": ".types",
@ -1099,10 +1083,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowRunTimeline": ".types",
"WorkflowRunTimelineType": ".types",
"WorkflowRunTriggerType": ".types",
"WorkflowSchedule": ".types",
"WorkflowScheduleListResponse": ".types",
"WorkflowScheduleResponse": ".types",
"WorkflowScheduleUpsertRequest": ".types",
"WorkflowStatus": ".types",
"WorkflowTriggerBlock": ".types",
"WorkflowTriggerBlockParametersItem": ".types",
@ -1119,7 +1099,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowTriggerBlockParametersItem_Workflow": ".types",
"WorkflowTriggerBlockYaml": ".types",
"__version__": ".version",
"agent": ".agent",
"artifacts": ".artifacts",
"scripts": ".scripts",
}
@ -1176,7 +1155,6 @@ __all__ = [
"AzureVaultCredentialParameter",
"AzureVaultCredentialParameterYaml",
"BadRequestError",
"BillingStateResponse",
"BitwardenCreditCardDataParameter",
"BitwardenCreditCardDataParameterYaml",
"BitwardenLoginCredentialParameter",
@ -1193,8 +1171,6 @@ __all__ = [
"BranchCriteriaYamlCriteriaType",
"BrowserProfile",
"BrowserSessionResponse",
"ChangeTierResponse",
"CheckoutSessionResponse",
"ClickAction",
"ClickActionData",
"ClickContext",
@ -1238,6 +1214,7 @@ __all__ = [
"CredentialResponse",
"CredentialResponseCredential",
"CredentialTypeOutput",
"CredentialVaultType",
"CreditCardCredentialResponse",
"DownloadToS3Block",
"DownloadToS3BlockYaml",
@ -1395,7 +1372,6 @@ __all__ = [
"InputTextAction",
"InputTextActionData",
"JinjaBranchCriteria",
"ListOrganizationSchedulesApiV1SchedulesGetRequestStatus",
"LocateElementAction",
"LoginBlock",
"LoginBlockDataSchema",
@ -1432,8 +1408,6 @@ __all__ = [
"NotFoundError",
"OnePasswordCredentialParameter",
"OnePasswordCredentialParameterYaml",
"OrganizationScheduleItem",
"OrganizationScheduleListResponse",
"OtpType",
"OutputParameter",
"OutputParameterYaml",
@ -1442,8 +1416,6 @@ __all__ = [
"PdfParserBlock",
"PdfParserBlockYaml",
"PersistentBrowserType",
"PlanTier",
"PortalSessionResponse",
"PrintPageBlock",
"PrintPageBlockParametersItem",
"PrintPageBlockParametersItem_AwsSecret",
@ -1505,6 +1477,7 @@ __all__ = [
"TaskBlockParametersItem_Workflow",
"TaskBlockYaml",
"TaskBlockYamlDataSchema",
"TaskRunListItem",
"TaskRunRequest",
"TaskRunRequestDataExtractionSchema",
"TaskRunRequestProxyLocation",
@ -1684,10 +1657,6 @@ __all__ = [
"WorkflowRunTimeline",
"WorkflowRunTimelineType",
"WorkflowRunTriggerType",
"WorkflowSchedule",
"WorkflowScheduleListResponse",
"WorkflowScheduleResponse",
"WorkflowScheduleUpsertRequest",
"WorkflowStatus",
"WorkflowTriggerBlock",
"WorkflowTriggerBlockParametersItem",
@ -1704,7 +1673,6 @@ __all__ = [
"WorkflowTriggerBlockParametersItem_Workflow",
"WorkflowTriggerBlockYaml",
"__version__",
"agent",
"artifacts",
"scripts",
]

View file

@ -1,34 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
# isort: skip_file
import typing
from importlib import import_module
if typing.TYPE_CHECKING:
from .types import ListOrganizationSchedulesApiV1SchedulesGetRequestStatus
_dynamic_imports: typing.Dict[str, str] = {"ListOrganizationSchedulesApiV1SchedulesGetRequestStatus": ".types"}
def __getattr__(attr_name: str) -> typing.Any:
module_name = _dynamic_imports.get(attr_name)
if module_name is None:
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
try:
module = import_module(module_name, __package__)
if module_name == f".{attr_name}":
return module
else:
return getattr(module, attr_name)
except ImportError as e:
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
except AttributeError as e:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
def __dir__():
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)
__all__ = ["ListOrganizationSchedulesApiV1SchedulesGetRequestStatus"]

View file

@ -1,842 +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 ..types.organization_schedule_list_response import OrganizationScheduleListResponse
from ..types.workflow_schedule_list_response import WorkflowScheduleListResponse
from ..types.workflow_schedule_response import WorkflowScheduleResponse
from .raw_client import AsyncRawAgentClient, RawAgentClient
from .types.list_organization_schedules_api_v1schedules_get_request_status import (
ListOrganizationSchedulesApiV1SchedulesGetRequestStatus,
)
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
class AgentClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._raw_client = RawAgentClient(client_wrapper=client_wrapper)
@property
def with_raw_response(self) -> RawAgentClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
RawAgentClient
"""
return self._raw_client
def list_organization_schedules(
self,
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[ListOrganizationSchedulesApiV1SchedulesGetRequestStatus] = None,
search: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> OrganizationScheduleListResponse:
"""
Parameters
----------
page : typing.Optional[int]
page_size : typing.Optional[int]
status : typing.Optional[ListOrganizationSchedulesApiV1SchedulesGetRequestStatus]
Filter by status: 'active' or 'paused'
search : typing.Optional[str]
Search by workflow title or schedule name
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
OrganizationScheduleListResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.agent.list_organization_schedules(
page=1,
page_size=1,
status="active",
search="search",
)
"""
_response = self._raw_client.list_organization_schedules(
page=page, page_size=page_size, status=status, search=search, request_options=request_options
)
return _response.data
def list_workflow_schedules(
self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> WorkflowScheduleListResponse:
"""
Parameters
----------
workflow_permanent_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleListResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.agent.list_workflow_schedules(
workflow_permanent_id="workflow_permanent_id",
)
"""
_response = self._raw_client.list_workflow_schedules(workflow_permanent_id, request_options=request_options)
return _response.data
def create_workflow_schedule(
self,
workflow_permanent_id: str,
*,
cron_expression: str,
timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
description: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
Parameters
----------
workflow_permanent_id : str
cron_expression : str
timezone : str
enabled : typing.Optional[bool]
parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
name : typing.Optional[str]
description : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.agent.create_workflow_schedule(
workflow_permanent_id="workflow_permanent_id",
cron_expression="cron_expression",
timezone="timezone",
)
"""
_response = self._raw_client.create_workflow_schedule(
workflow_permanent_id,
cron_expression=cron_expression,
timezone=timezone,
enabled=enabled,
parameters=parameters,
name=name,
description=description,
request_options=request_options,
)
return _response.data
def get_workflow_schedule(
self,
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.agent.get_workflow_schedule(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
)
"""
_response = self._raw_client.get_workflow_schedule(
workflow_permanent_id, workflow_schedule_id, request_options=request_options
)
return _response.data
def update_workflow_schedule(
self,
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
cron_expression: str,
timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
description: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
cron_expression : str
timezone : str
enabled : typing.Optional[bool]
parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
name : typing.Optional[str]
description : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.agent.update_workflow_schedule(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
cron_expression="cron_expression",
timezone="timezone",
)
"""
_response = self._raw_client.update_workflow_schedule(
workflow_permanent_id,
workflow_schedule_id,
cron_expression=cron_expression,
timezone=timezone,
enabled=enabled,
parameters=parameters,
name=name,
description=description,
request_options=request_options,
)
return _response.data
def delete_workflow_schedule_route(
self,
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
request_options: typing.Optional[RequestOptions] = None,
) -> typing.Dict[str, bool]:
"""
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.Dict[str, bool]
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.agent.delete_workflow_schedule_route(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
)
"""
_response = self._raw_client.delete_workflow_schedule_route(
workflow_permanent_id, workflow_schedule_id, request_options=request_options
)
return _response.data
def enable_workflow_schedule(
self,
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.agent.enable_workflow_schedule(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
)
"""
_response = self._raw_client.enable_workflow_schedule(
workflow_permanent_id, workflow_schedule_id, request_options=request_options
)
return _response.data
def disable_workflow_schedule(
self,
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.agent.disable_workflow_schedule(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
)
"""
_response = self._raw_client.disable_workflow_schedule(
workflow_permanent_id, workflow_schedule_id, request_options=request_options
)
return _response.data
class AsyncAgentClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._raw_client = AsyncRawAgentClient(client_wrapper=client_wrapper)
@property
def with_raw_response(self) -> AsyncRawAgentClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
AsyncRawAgentClient
"""
return self._raw_client
async def list_organization_schedules(
self,
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[ListOrganizationSchedulesApiV1SchedulesGetRequestStatus] = None,
search: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> OrganizationScheduleListResponse:
"""
Parameters
----------
page : typing.Optional[int]
page_size : typing.Optional[int]
status : typing.Optional[ListOrganizationSchedulesApiV1SchedulesGetRequestStatus]
Filter by status: 'active' or 'paused'
search : typing.Optional[str]
Search by workflow title or schedule name
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
OrganizationScheduleListResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.agent.list_organization_schedules(
page=1,
page_size=1,
status="active",
search="search",
)
asyncio.run(main())
"""
_response = await self._raw_client.list_organization_schedules(
page=page, page_size=page_size, status=status, search=search, request_options=request_options
)
return _response.data
async def list_workflow_schedules(
self, workflow_permanent_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> WorkflowScheduleListResponse:
"""
Parameters
----------
workflow_permanent_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleListResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.agent.list_workflow_schedules(
workflow_permanent_id="workflow_permanent_id",
)
asyncio.run(main())
"""
_response = await self._raw_client.list_workflow_schedules(
workflow_permanent_id, request_options=request_options
)
return _response.data
async def create_workflow_schedule(
self,
workflow_permanent_id: str,
*,
cron_expression: str,
timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
description: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
Parameters
----------
workflow_permanent_id : str
cron_expression : str
timezone : str
enabled : typing.Optional[bool]
parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
name : typing.Optional[str]
description : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.agent.create_workflow_schedule(
workflow_permanent_id="workflow_permanent_id",
cron_expression="cron_expression",
timezone="timezone",
)
asyncio.run(main())
"""
_response = await self._raw_client.create_workflow_schedule(
workflow_permanent_id,
cron_expression=cron_expression,
timezone=timezone,
enabled=enabled,
parameters=parameters,
name=name,
description=description,
request_options=request_options,
)
return _response.data
async def get_workflow_schedule(
self,
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.agent.get_workflow_schedule(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
)
asyncio.run(main())
"""
_response = await self._raw_client.get_workflow_schedule(
workflow_permanent_id, workflow_schedule_id, request_options=request_options
)
return _response.data
async def update_workflow_schedule(
self,
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
cron_expression: str,
timezone: str,
enabled: typing.Optional[bool] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
name: typing.Optional[str] = OMIT,
description: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
cron_expression : str
timezone : str
enabled : typing.Optional[bool]
parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
name : typing.Optional[str]
description : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.agent.update_workflow_schedule(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
cron_expression="cron_expression",
timezone="timezone",
)
asyncio.run(main())
"""
_response = await self._raw_client.update_workflow_schedule(
workflow_permanent_id,
workflow_schedule_id,
cron_expression=cron_expression,
timezone=timezone,
enabled=enabled,
parameters=parameters,
name=name,
description=description,
request_options=request_options,
)
return _response.data
async def delete_workflow_schedule_route(
self,
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
request_options: typing.Optional[RequestOptions] = None,
) -> typing.Dict[str, bool]:
"""
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.Dict[str, bool]
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.agent.delete_workflow_schedule_route(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
)
asyncio.run(main())
"""
_response = await self._raw_client.delete_workflow_schedule_route(
workflow_permanent_id, workflow_schedule_id, request_options=request_options
)
return _response.data
async def enable_workflow_schedule(
self,
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.agent.enable_workflow_schedule(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
)
asyncio.run(main())
"""
_response = await self._raw_client.enable_workflow_schedule(
workflow_permanent_id, workflow_schedule_id, request_options=request_options
)
return _response.data
async def disable_workflow_schedule(
self,
workflow_permanent_id: str,
workflow_schedule_id: str,
*,
request_options: typing.Optional[RequestOptions] = None,
) -> WorkflowScheduleResponse:
"""
Parameters
----------
workflow_permanent_id : str
workflow_schedule_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
WorkflowScheduleResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.agent.disable_workflow_schedule(
workflow_permanent_id="workflow_permanent_id",
workflow_schedule_id="workflow_schedule_id",
)
asyncio.run(main())
"""
_response = await self._raw_client.disable_workflow_schedule(
workflow_permanent_id, workflow_schedule_id, request_options=request_options
)
return _response.data

File diff suppressed because it is too large Load diff

View file

@ -1,38 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
# isort: skip_file
import typing
from importlib import import_module
if typing.TYPE_CHECKING:
from .list_organization_schedules_api_v1schedules_get_request_status import (
ListOrganizationSchedulesApiV1SchedulesGetRequestStatus,
)
_dynamic_imports: typing.Dict[str, str] = {
"ListOrganizationSchedulesApiV1SchedulesGetRequestStatus": ".list_organization_schedules_api_v1schedules_get_request_status"
}
def __getattr__(attr_name: str) -> typing.Any:
module_name = _dynamic_imports.get(attr_name)
if module_name is None:
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
try:
module = import_module(module_name, __package__)
if module_name == f".{attr_name}":
return module
else:
return getattr(module, attr_name)
except ImportError as e:
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
except AttributeError as e:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
def __dir__():
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)
__all__ = ["ListOrganizationSchedulesApiV1SchedulesGetRequestStatus"]

View file

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

View file

@ -13,30 +13,28 @@ from .environment import SkyvernEnvironment
from .raw_client import AsyncRawSkyvern, RawSkyvern
from .types.artifact import Artifact
from .types.artifact_type import ArtifactType
from .types.billing_state_response import BillingStateResponse
from .types.browser_profile import BrowserProfile
from .types.browser_session_response import BrowserSessionResponse
from .types.change_tier_response import ChangeTierResponse
from .types.checkout_session_response import CheckoutSessionResponse
from .types.create_credential_request_credential import CreateCredentialRequestCredential
from .types.create_script_response import CreateScriptResponse
from .types.credential_response import CredentialResponse
from .types.credential_vault_type import CredentialVaultType
from .types.extensions import Extensions
from .types.folder import Folder
from .types.get_run_response import GetRunResponse
from .types.otp_type import OtpType
from .types.persistent_browser_type import PersistentBrowserType
from .types.plan_tier import PlanTier
from .types.portal_session_response import PortalSessionResponse
from .types.proxy_location import ProxyLocation
from .types.retry_run_webhook_request import RetryRunWebhookRequest
from .types.run_engine import RunEngine
from .types.run_sdk_action_request_action import RunSdkActionRequestAction
from .types.run_sdk_action_response import RunSdkActionResponse
from .types.run_status import RunStatus
from .types.script import Script
from .types.script_file_create import ScriptFileCreate
from .types.skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
from .types.skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType
from .types.task_run_list_item import TaskRunListItem
from .types.task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema
from .types.task_run_request_proxy_location import TaskRunRequestProxyLocation
from .types.task_run_response import TaskRunResponse
@ -52,7 +50,6 @@ from .types.workflow_run_timeline import WorkflowRunTimeline
from .types.workflow_status import WorkflowStatus
if typing.TYPE_CHECKING:
from .agent.client import AgentClient, AsyncAgentClient
from .artifacts.client import ArtifactsClient, AsyncArtifactsClient
from .scripts.client import AsyncScriptsClient, ScriptsClient
# this is used as the default value for optional parameters
@ -127,7 +124,6 @@ class Skyvern:
self._raw_client = RawSkyvern(client_wrapper=self._client_wrapper)
self._artifacts: typing.Optional[ArtifactsClient] = None
self._scripts: typing.Optional[ScriptsClient] = None
self._agent: typing.Optional[AgentClient] = None
@property
def with_raw_response(self) -> RawSkyvern:
@ -269,7 +265,7 @@ class Skyvern:
The CDP address for the task.
run_with : typing.Optional[str]
Whether to run the task with agent or code.
Whether to run the task with agent or code. Null means use the default.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -422,7 +418,7 @@ class Skyvern:
Whether to fallback to AI if the workflow run fails.
run_with : typing.Optional[str]
Whether to run the workflow with agent, code, or code_v2 (adaptive caching).
Whether to run the workflow with agent or code. Null inherits from the workflow setting.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -1007,36 +1003,6 @@ class Skyvern:
)
return _response.data
def get_artifact(self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Artifact:
"""
Get an artifact
Parameters
----------
artifact_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
Artifact
Successfully retrieved artifact
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.get_artifact(
artifact_id="artifact_id",
)
"""
_response = self._raw_client.get_artifact(artifact_id, request_options=request_options)
return _response.data
def get_run_artifacts(
self,
run_id: str,
@ -1151,6 +1117,53 @@ class Skyvern:
_response = self._raw_client.get_run_timeline(run_id, request_options=request_options)
return _response.data
def get_runs_v2(
self,
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[typing.Union[RunStatus, typing.Sequence[RunStatus]]] = None,
search_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> typing.List[TaskRunListItem]:
"""
Parameters
----------
page : typing.Optional[int]
page_size : typing.Optional[int]
status : typing.Optional[typing.Union[RunStatus, typing.Sequence[RunStatus]]]
search_key : typing.Optional[str]
Case-insensitive substring search (min 3 chars for trigram index).
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.List[TaskRunListItem]
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.get_runs_v2(
page=1,
page_size=1,
search_key="search_key",
)
"""
_response = self._raw_client.get_runs_v2(
page=page, page_size=page_size, status=status, search_key=search_key, request_options=request_options
)
return _response.data
def get_workflow_runs(
self,
*,
@ -1768,6 +1781,7 @@ class Skyvern:
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
vault_type: typing.Optional[CredentialVaultType] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> typing.List[CredentialResponse]:
"""
@ -1781,6 +1795,9 @@ class Skyvern:
page_size : typing.Optional[int]
Number of items per page
vault_type : typing.Optional[CredentialVaultType]
Filter credentials by vault type (e.g. 'custom', 'bitwarden', 'azure_vault')
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -1799,9 +1816,12 @@ class Skyvern:
client.get_credentials(
page=1,
page_size=10,
vault_type="bitwarden",
)
"""
_response = self._raw_client.get_credentials(page=page, page_size=page_size, request_options=request_options)
_response = self._raw_client.get_credentials(
page=page, page_size=page_size, vault_type=vault_type, request_options=request_options
)
return _response.data
def create_credential(
@ -1810,6 +1830,7 @@ class Skyvern:
name: str,
credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
credential: CreateCredentialRequestCredential,
vault_type: typing.Optional[CredentialVaultType] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CredentialResponse:
"""
@ -1826,6 +1847,9 @@ class Skyvern:
credential : CreateCredentialRequestCredential
The credential data to store
vault_type : typing.Optional[CredentialVaultType]
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.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -1851,7 +1875,11 @@ class Skyvern:
)
"""
_response = self._raw_client.create_credential(
name=name, credential_type=credential_type, credential=credential, request_options=request_options
name=name,
credential_type=credential_type,
credential=credential,
vault_type=vault_type,
request_options=request_options,
)
return _response.data
@ -1862,6 +1890,7 @@ class Skyvern:
name: str,
credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
credential: CreateCredentialRequestCredential,
vault_type: typing.Optional[CredentialVaultType] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CredentialResponse:
"""
@ -1881,6 +1910,9 @@ class Skyvern:
credential : CreateCredentialRequestCredential
The credential data to store
vault_type : typing.Optional[CredentialVaultType]
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.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -1911,6 +1943,7 @@ class Skyvern:
name=name,
credential_type=credential_type,
credential=credential,
vault_type=vault_type,
request_options=request_options,
)
return _response.data
@ -2443,144 +2476,6 @@ class Skyvern:
)
return _response.data
def create_checkout_session_api_v1billing_checkout_post(
self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
) -> CheckoutSessionResponse:
"""
Create a Stripe Checkout Session for subscribing to a tier.
Frontend should redirect the user to the returned URL.
After successful checkout, Stripe will send a webhook that we handle
to store the subscription and initialize billing state.
Returns 400 if org already has an active subscription (use portal instead).
Parameters
----------
tier : PlanTier
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
CheckoutSessionResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.create_checkout_session_api_v1billing_checkout_post(
tier="free",
)
"""
_response = self._raw_client.create_checkout_session_api_v1billing_checkout_post(
tier=tier, request_options=request_options
)
return _response.data
def create_portal_session_api_v1billing_portal_post(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> PortalSessionResponse:
"""
Create a Stripe Customer Portal session for managing subscription.
Frontend should redirect the user to the returned URL.
The portal allows users to:
- Update payment methods
- Upgrade/downgrade plans
- Cancel subscription
- View invoices
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
PortalSessionResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.create_portal_session_api_v1billing_portal_post()
"""
_response = self._raw_client.create_portal_session_api_v1billing_portal_post(request_options=request_options)
return _response.data
def get_organization_billing_api_v1billing_state_get(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> typing.Optional[BillingStateResponse]:
"""
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.Optional[BillingStateResponse]
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.get_organization_billing_api_v1billing_state_get()
"""
_response = self._raw_client.get_organization_billing_api_v1billing_state_get(request_options=request_options)
return _response.data
def change_tier_api_v1billing_change_tier_post(
self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
) -> ChangeTierResponse:
"""
Redirect to Stripe Portal for tier changes.
Portal handles proration based on configured settings:
- Upgrades: Immediate proration charge
- Downgrades: Apply at end of billing period
Parameters
----------
tier : PlanTier
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
ChangeTierResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.change_tier_api_v1billing_change_tier_post(
tier="free",
)
"""
_response = self._raw_client.change_tier_api_v1billing_change_tier_post(
tier=tier, request_options=request_options
)
return _response.data
@property
def artifacts(self):
if self._artifacts is None:
@ -2597,14 +2492,6 @@ class Skyvern:
self._scripts = ScriptsClient(client_wrapper=self._client_wrapper)
return self._scripts
@property
def agent(self):
if self._agent is None:
from .agent.client import AgentClient # noqa: E402
self._agent = AgentClient(client_wrapper=self._client_wrapper)
return self._agent
class AsyncSkyvern:
"""
@ -2674,7 +2561,6 @@ class AsyncSkyvern:
self._raw_client = AsyncRawSkyvern(client_wrapper=self._client_wrapper)
self._artifacts: typing.Optional[AsyncArtifactsClient] = None
self._scripts: typing.Optional[AsyncScriptsClient] = None
self._agent: typing.Optional[AsyncAgentClient] = None
@property
def with_raw_response(self) -> AsyncRawSkyvern:
@ -2816,7 +2702,7 @@ class AsyncSkyvern:
The CDP address for the task.
run_with : typing.Optional[str]
Whether to run the task with agent or code.
Whether to run the task with agent or code. Null means use the default.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -2977,7 +2863,7 @@ class AsyncSkyvern:
Whether to fallback to AI if the workflow run fails.
run_with : typing.Optional[str]
Whether to run the workflow with agent, code, or code_v2 (adaptive caching).
Whether to run the workflow with agent or code. Null inherits from the workflow setting.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -3666,46 +3552,6 @@ class AsyncSkyvern:
)
return _response.data
async def get_artifact(
self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> Artifact:
"""
Get an artifact
Parameters
----------
artifact_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
Artifact
Successfully retrieved artifact
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.get_artifact(
artifact_id="artifact_id",
)
asyncio.run(main())
"""
_response = await self._raw_client.get_artifact(artifact_id, request_options=request_options)
return _response.data
async def get_run_artifacts(
self,
run_id: str,
@ -3844,6 +3690,61 @@ class AsyncSkyvern:
_response = await self._raw_client.get_run_timeline(run_id, request_options=request_options)
return _response.data
async def get_runs_v2(
self,
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[typing.Union[RunStatus, typing.Sequence[RunStatus]]] = None,
search_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> typing.List[TaskRunListItem]:
"""
Parameters
----------
page : typing.Optional[int]
page_size : typing.Optional[int]
status : typing.Optional[typing.Union[RunStatus, typing.Sequence[RunStatus]]]
search_key : typing.Optional[str]
Case-insensitive substring search (min 3 chars for trigram index).
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.List[TaskRunListItem]
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.get_runs_v2(
page=1,
page_size=1,
search_key="search_key",
)
asyncio.run(main())
"""
_response = await self._raw_client.get_runs_v2(
page=page, page_size=page_size, status=status, search_key=search_key, request_options=request_options
)
return _response.data
async def get_workflow_runs(
self,
*,
@ -4565,6 +4466,7 @@ class AsyncSkyvern:
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
vault_type: typing.Optional[CredentialVaultType] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> typing.List[CredentialResponse]:
"""
@ -4578,6 +4480,9 @@ class AsyncSkyvern:
page_size : typing.Optional[int]
Number of items per page
vault_type : typing.Optional[CredentialVaultType]
Filter credentials by vault type (e.g. 'custom', 'bitwarden', 'azure_vault')
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -4601,13 +4506,14 @@ class AsyncSkyvern:
await client.get_credentials(
page=1,
page_size=10,
vault_type="bitwarden",
)
asyncio.run(main())
"""
_response = await self._raw_client.get_credentials(
page=page, page_size=page_size, request_options=request_options
page=page, page_size=page_size, vault_type=vault_type, request_options=request_options
)
return _response.data
@ -4617,6 +4523,7 @@ class AsyncSkyvern:
name: str,
credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
credential: CreateCredentialRequestCredential,
vault_type: typing.Optional[CredentialVaultType] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CredentialResponse:
"""
@ -4633,6 +4540,9 @@ class AsyncSkyvern:
credential : CreateCredentialRequestCredential
The credential data to store
vault_type : typing.Optional[CredentialVaultType]
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.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -4666,7 +4576,11 @@ class AsyncSkyvern:
asyncio.run(main())
"""
_response = await self._raw_client.create_credential(
name=name, credential_type=credential_type, credential=credential, request_options=request_options
name=name,
credential_type=credential_type,
credential=credential,
vault_type=vault_type,
request_options=request_options,
)
return _response.data
@ -4677,6 +4591,7 @@ class AsyncSkyvern:
name: str,
credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
credential: CreateCredentialRequestCredential,
vault_type: typing.Optional[CredentialVaultType] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CredentialResponse:
"""
@ -4696,6 +4611,9 @@ class AsyncSkyvern:
credential : CreateCredentialRequestCredential
The credential data to store
vault_type : typing.Optional[CredentialVaultType]
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.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -4734,6 +4652,7 @@ class AsyncSkyvern:
name=name,
credential_type=credential_type,
credential=credential,
vault_type=vault_type,
request_options=request_options,
)
return _response.data
@ -5340,180 +5259,6 @@ class AsyncSkyvern:
)
return _response.data
async def create_checkout_session_api_v1billing_checkout_post(
self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
) -> CheckoutSessionResponse:
"""
Create a Stripe Checkout Session for subscribing to a tier.
Frontend should redirect the user to the returned URL.
After successful checkout, Stripe will send a webhook that we handle
to store the subscription and initialize billing state.
Returns 400 if org already has an active subscription (use portal instead).
Parameters
----------
tier : PlanTier
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
CheckoutSessionResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.create_checkout_session_api_v1billing_checkout_post(
tier="free",
)
asyncio.run(main())
"""
_response = await self._raw_client.create_checkout_session_api_v1billing_checkout_post(
tier=tier, request_options=request_options
)
return _response.data
async def create_portal_session_api_v1billing_portal_post(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> PortalSessionResponse:
"""
Create a Stripe Customer Portal session for managing subscription.
Frontend should redirect the user to the returned URL.
The portal allows users to:
- Update payment methods
- Upgrade/downgrade plans
- Cancel subscription
- View invoices
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
PortalSessionResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.create_portal_session_api_v1billing_portal_post()
asyncio.run(main())
"""
_response = await self._raw_client.create_portal_session_api_v1billing_portal_post(
request_options=request_options
)
return _response.data
async def get_organization_billing_api_v1billing_state_get(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> typing.Optional[BillingStateResponse]:
"""
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.Optional[BillingStateResponse]
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.get_organization_billing_api_v1billing_state_get()
asyncio.run(main())
"""
_response = await self._raw_client.get_organization_billing_api_v1billing_state_get(
request_options=request_options
)
return _response.data
async def change_tier_api_v1billing_change_tier_post(
self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
) -> ChangeTierResponse:
"""
Redirect to Stripe Portal for tier changes.
Portal handles proration based on configured settings:
- Upgrades: Immediate proration charge
- Downgrades: Apply at end of billing period
Parameters
----------
tier : PlanTier
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
ChangeTierResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.change_tier_api_v1billing_change_tier_post(
tier="free",
)
asyncio.run(main())
"""
_response = await self._raw_client.change_tier_api_v1billing_change_tier_post(
tier=tier, request_options=request_options
)
return _response.data
@property
def artifacts(self):
if self._artifacts is None:
@ -5530,14 +5275,6 @@ class AsyncSkyvern:
self._scripts = AsyncScriptsClient(client_wrapper=self._client_wrapper)
return self._scripts
@property
def agent(self):
if self._agent is None:
from .agent.client import AsyncAgentClient # noqa: E402
self._agent = AsyncAgentClient(client_wrapper=self._client_wrapper)
return self._agent
def _get_base_url(*, base_url: typing.Optional[str] = None, environment: SkyvernEnvironment) -> str:
if base_url is not None:

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.28",
"User-Agent": "skyvern/1.0.29",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "skyvern",
"X-Fern-SDK-Version": "1.0.28",
"X-Fern-SDK-Version": "1.0.29",
**(self.get_custom_headers() or {}),
}
if self._api_key is not None:

View file

@ -19,30 +19,28 @@ from .errors.not_found_error import NotFoundError
from .errors.unprocessable_entity_error import UnprocessableEntityError
from .types.artifact import Artifact
from .types.artifact_type import ArtifactType
from .types.billing_state_response import BillingStateResponse
from .types.browser_profile import BrowserProfile
from .types.browser_session_response import BrowserSessionResponse
from .types.change_tier_response import ChangeTierResponse
from .types.checkout_session_response import CheckoutSessionResponse
from .types.create_credential_request_credential import CreateCredentialRequestCredential
from .types.create_script_response import CreateScriptResponse
from .types.credential_response import CredentialResponse
from .types.credential_vault_type import CredentialVaultType
from .types.extensions import Extensions
from .types.folder import Folder
from .types.get_run_response import GetRunResponse
from .types.otp_type import OtpType
from .types.persistent_browser_type import PersistentBrowserType
from .types.plan_tier import PlanTier
from .types.portal_session_response import PortalSessionResponse
from .types.proxy_location import ProxyLocation
from .types.retry_run_webhook_request import RetryRunWebhookRequest
from .types.run_engine import RunEngine
from .types.run_sdk_action_request_action import RunSdkActionRequestAction
from .types.run_sdk_action_response import RunSdkActionResponse
from .types.run_status import RunStatus
from .types.script import Script
from .types.script_file_create import ScriptFileCreate
from .types.skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
from .types.skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType
from .types.task_run_list_item import TaskRunListItem
from .types.task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema
from .types.task_run_request_proxy_location import TaskRunRequestProxyLocation
from .types.task_run_response import TaskRunResponse
@ -194,7 +192,7 @@ class RawSkyvern:
The CDP address for the task.
run_with : typing.Optional[str]
Whether to run the task with agent or code.
Whether to run the task with agent or code. Null means use the default.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -382,7 +380,7 @@ class RawSkyvern:
Whether to fallback to AI if the workflow run fails.
run_with : typing.Optional[str]
Whether to run the workflow with agent, code, or code_v2 (adaptive caching).
Whether to run the workflow with agent or code. Null inherits from the workflow setting.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -1312,66 +1310,6 @@ class RawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get_artifact(
self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[Artifact]:
"""
Get an artifact
Parameters
----------
artifact_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[Artifact]
Successfully retrieved artifact
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/artifacts/{jsonable_encoder(artifact_id)}",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
Artifact,
parse_obj_as(
type_=Artifact, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get_run_artifacts(
self,
run_id: str,
@ -1568,6 +1506,72 @@ class RawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get_runs_v2(
self,
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[typing.Union[RunStatus, typing.Sequence[RunStatus]]] = None,
search_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[typing.List[TaskRunListItem]]:
"""
Parameters
----------
page : typing.Optional[int]
page_size : typing.Optional[int]
status : typing.Optional[typing.Union[RunStatus, typing.Sequence[RunStatus]]]
search_key : typing.Optional[str]
Case-insensitive substring search (min 3 chars for trigram index).
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[typing.List[TaskRunListItem]]
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
"v1/runs",
method="GET",
params={
"page": page,
"page_size": page_size,
"status": status,
"search_key": search_key,
},
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
typing.List[TaskRunListItem],
parse_obj_as(
type_=typing.List[TaskRunListItem], # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get_workflow_runs(
self,
*,
@ -2532,6 +2536,7 @@ class RawSkyvern:
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
vault_type: typing.Optional[CredentialVaultType] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[typing.List[CredentialResponse]]:
"""
@ -2545,6 +2550,9 @@ class RawSkyvern:
page_size : typing.Optional[int]
Number of items per page
vault_type : typing.Optional[CredentialVaultType]
Filter credentials by vault type (e.g. 'custom', 'bitwarden', 'azure_vault')
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -2559,6 +2567,7 @@ class RawSkyvern:
params={
"page": page,
"page_size": page_size,
"vault_type": vault_type,
},
request_options=request_options,
)
@ -2594,6 +2603,7 @@ class RawSkyvern:
name: str,
credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
credential: CreateCredentialRequestCredential,
vault_type: typing.Optional[CredentialVaultType] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[CredentialResponse]:
"""
@ -2610,6 +2620,9 @@ class RawSkyvern:
credential : CreateCredentialRequestCredential
The credential data to store
vault_type : typing.Optional[CredentialVaultType]
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.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -2627,6 +2640,7 @@ class RawSkyvern:
"credential": convert_and_respect_annotation_metadata(
object_=credential, annotation=CreateCredentialRequestCredential, direction="write"
),
"vault_type": vault_type,
},
headers={
"content-type": "application/json",
@ -2667,6 +2681,7 @@ class RawSkyvern:
name: str,
credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
credential: CreateCredentialRequestCredential,
vault_type: typing.Optional[CredentialVaultType] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[CredentialResponse]:
"""
@ -2686,6 +2701,9 @@ class RawSkyvern:
credential : CreateCredentialRequestCredential
The credential data to store
vault_type : typing.Optional[CredentialVaultType]
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.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -2703,6 +2721,7 @@ class RawSkyvern:
"credential": convert_and_respect_annotation_metadata(
object_=credential, annotation=CreateCredentialRequestCredential, direction="write"
),
"vault_type": vault_type,
},
headers={
"content-type": "application/json",
@ -3444,228 +3463,6 @@ class RawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def create_checkout_session_api_v1billing_checkout_post(
self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[CheckoutSessionResponse]:
"""
Create a Stripe Checkout Session for subscribing to a tier.
Frontend should redirect the user to the returned URL.
After successful checkout, Stripe will send a webhook that we handle
to store the subscription and initialize billing state.
Returns 400 if org already has an active subscription (use portal instead).
Parameters
----------
tier : PlanTier
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[CheckoutSessionResponse]
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
"api/v1/billing/checkout",
method="POST",
json={
"tier": tier,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
CheckoutSessionResponse,
parse_obj_as(
type_=CheckoutSessionResponse, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def create_portal_session_api_v1billing_portal_post(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[PortalSessionResponse]:
"""
Create a Stripe Customer Portal session for managing subscription.
Frontend should redirect the user to the returned URL.
The portal allows users to:
- Update payment methods
- Upgrade/downgrade plans
- Cancel subscription
- View invoices
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[PortalSessionResponse]
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
"api/v1/billing/portal",
method="POST",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
PortalSessionResponse,
parse_obj_as(
type_=PortalSessionResponse, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get_organization_billing_api_v1billing_state_get(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[typing.Optional[BillingStateResponse]]:
"""
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[typing.Optional[BillingStateResponse]]
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
"api/v1/billing/state",
method="GET",
request_options=request_options,
)
try:
if _response is None or not _response.text.strip():
return HttpResponse(response=_response, data=None)
if 200 <= _response.status_code < 300:
_data = typing.cast(
typing.Optional[BillingStateResponse],
parse_obj_as(
type_=typing.Optional[BillingStateResponse], # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def change_tier_api_v1billing_change_tier_post(
self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[ChangeTierResponse]:
"""
Redirect to Stripe Portal for tier changes.
Portal handles proration based on configured settings:
- Upgrades: Immediate proration charge
- Downgrades: Apply at end of billing period
Parameters
----------
tier : PlanTier
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[ChangeTierResponse]
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
"api/v1/billing/change-tier",
method="POST",
json={
"tier": tier,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
ChangeTierResponse,
parse_obj_as(
type_=ChangeTierResponse, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawSkyvern:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@ -3800,7 +3597,7 @@ class AsyncRawSkyvern:
The CDP address for the task.
run_with : typing.Optional[str]
Whether to run the task with agent or code.
Whether to run the task with agent or code. Null means use the default.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -3988,7 +3785,7 @@ class AsyncRawSkyvern:
Whether to fallback to AI if the workflow run fails.
run_with : typing.Optional[str]
Whether to run the workflow with agent, code, or code_v2 (adaptive caching).
Whether to run the workflow with agent or code. Null inherits from the workflow setting.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -4918,66 +4715,6 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get_artifact(
self, artifact_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[Artifact]:
"""
Get an artifact
Parameters
----------
artifact_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[Artifact]
Successfully retrieved artifact
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/artifacts/{jsonable_encoder(artifact_id)}",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
Artifact,
parse_obj_as(
type_=Artifact, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get_run_artifacts(
self,
run_id: str,
@ -5174,6 +4911,72 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get_runs_v2(
self,
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
status: typing.Optional[typing.Union[RunStatus, typing.Sequence[RunStatus]]] = None,
search_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[typing.List[TaskRunListItem]]:
"""
Parameters
----------
page : typing.Optional[int]
page_size : typing.Optional[int]
status : typing.Optional[typing.Union[RunStatus, typing.Sequence[RunStatus]]]
search_key : typing.Optional[str]
Case-insensitive substring search (min 3 chars for trigram index).
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[typing.List[TaskRunListItem]]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
"v1/runs",
method="GET",
params={
"page": page,
"page_size": page_size,
"status": status,
"search_key": search_key,
},
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
typing.List[TaskRunListItem],
parse_obj_as(
type_=typing.List[TaskRunListItem], # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get_workflow_runs(
self,
*,
@ -6138,6 +5941,7 @@ class AsyncRawSkyvern:
*,
page: typing.Optional[int] = None,
page_size: typing.Optional[int] = None,
vault_type: typing.Optional[CredentialVaultType] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[typing.List[CredentialResponse]]:
"""
@ -6151,6 +5955,9 @@ class AsyncRawSkyvern:
page_size : typing.Optional[int]
Number of items per page
vault_type : typing.Optional[CredentialVaultType]
Filter credentials by vault type (e.g. 'custom', 'bitwarden', 'azure_vault')
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -6165,6 +5972,7 @@ class AsyncRawSkyvern:
params={
"page": page,
"page_size": page_size,
"vault_type": vault_type,
},
request_options=request_options,
)
@ -6200,6 +6008,7 @@ class AsyncRawSkyvern:
name: str,
credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
credential: CreateCredentialRequestCredential,
vault_type: typing.Optional[CredentialVaultType] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[CredentialResponse]:
"""
@ -6216,6 +6025,9 @@ class AsyncRawSkyvern:
credential : CreateCredentialRequestCredential
The credential data to store
vault_type : typing.Optional[CredentialVaultType]
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.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -6233,6 +6045,7 @@ class AsyncRawSkyvern:
"credential": convert_and_respect_annotation_metadata(
object_=credential, annotation=CreateCredentialRequestCredential, direction="write"
),
"vault_type": vault_type,
},
headers={
"content-type": "application/json",
@ -6273,6 +6086,7 @@ class AsyncRawSkyvern:
name: str,
credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
credential: CreateCredentialRequestCredential,
vault_type: typing.Optional[CredentialVaultType] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[CredentialResponse]:
"""
@ -6292,6 +6106,9 @@ class AsyncRawSkyvern:
credential : CreateCredentialRequestCredential
The credential data to store
vault_type : typing.Optional[CredentialVaultType]
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.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@ -6309,6 +6126,7 @@ class AsyncRawSkyvern:
"credential": convert_and_respect_annotation_metadata(
object_=credential, annotation=CreateCredentialRequestCredential, direction="write"
),
"vault_type": vault_type,
},
headers={
"content-type": "application/json",
@ -7049,225 +6867,3 @@ class AsyncRawSkyvern:
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)
async def create_checkout_session_api_v1billing_checkout_post(
self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[CheckoutSessionResponse]:
"""
Create a Stripe Checkout Session for subscribing to a tier.
Frontend should redirect the user to the returned URL.
After successful checkout, Stripe will send a webhook that we handle
to store the subscription and initialize billing state.
Returns 400 if org already has an active subscription (use portal instead).
Parameters
----------
tier : PlanTier
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[CheckoutSessionResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
"api/v1/billing/checkout",
method="POST",
json={
"tier": tier,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
CheckoutSessionResponse,
parse_obj_as(
type_=CheckoutSessionResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def create_portal_session_api_v1billing_portal_post(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[PortalSessionResponse]:
"""
Create a Stripe Customer Portal session for managing subscription.
Frontend should redirect the user to the returned URL.
The portal allows users to:
- Update payment methods
- Upgrade/downgrade plans
- Cancel subscription
- View invoices
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[PortalSessionResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
"api/v1/billing/portal",
method="POST",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
PortalSessionResponse,
parse_obj_as(
type_=PortalSessionResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get_organization_billing_api_v1billing_state_get(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[typing.Optional[BillingStateResponse]]:
"""
Parameters
----------
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[typing.Optional[BillingStateResponse]]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
"api/v1/billing/state",
method="GET",
request_options=request_options,
)
try:
if _response is None or not _response.text.strip():
return AsyncHttpResponse(response=_response, data=None)
if 200 <= _response.status_code < 300:
_data = typing.cast(
typing.Optional[BillingStateResponse],
parse_obj_as(
type_=typing.Optional[BillingStateResponse], # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def change_tier_api_v1billing_change_tier_post(
self, *, tier: PlanTier, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[ChangeTierResponse]:
"""
Redirect to Stripe Portal for tier changes.
Portal handles proration based on configured settings:
- Upgrades: Immediate proration charge
- Downgrades: Apply at end of billing period
Parameters
----------
tier : PlanTier
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[ChangeTierResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
"api/v1/billing/change-tier",
method="POST",
json={
"tier": tier,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
ChangeTierResponse,
parse_obj_as(
type_=ChangeTierResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

View file

@ -35,7 +35,6 @@ if typing.TYPE_CHECKING:
from .azure_secret_parameter import AzureSecretParameter
from .azure_vault_credential_parameter import AzureVaultCredentialParameter
from .azure_vault_credential_parameter_yaml import AzureVaultCredentialParameterYaml
from .billing_state_response import BillingStateResponse
from .bitwarden_credit_card_data_parameter import BitwardenCreditCardDataParameter
from .bitwarden_credit_card_data_parameter_yaml import BitwardenCreditCardDataParameterYaml
from .bitwarden_login_credential_parameter import BitwardenLoginCredentialParameter
@ -54,8 +53,6 @@ if typing.TYPE_CHECKING:
from .branch_criteria_yaml_criteria_type import BranchCriteriaYamlCriteriaType
from .browser_profile import BrowserProfile
from .browser_session_response import BrowserSessionResponse
from .change_tier_response import ChangeTierResponse
from .checkout_session_response import CheckoutSessionResponse
from .click_action import ClickAction
from .click_action_data import ClickActionData
from .click_context import ClickContext
@ -102,6 +99,7 @@ if typing.TYPE_CHECKING:
from .credential_response import CredentialResponse
from .credential_response_credential import CredentialResponseCredential
from .credential_type_output import CredentialTypeOutput
from .credential_vault_type import CredentialVaultType
from .credit_card_credential_response import CreditCardCredentialResponse
from .download_to_s3block import DownloadToS3Block
from .download_to_s3block_yaml import DownloadToS3BlockYaml
@ -313,8 +311,6 @@ if typing.TYPE_CHECKING:
from .non_empty_password_credential import NonEmptyPasswordCredential
from .one_password_credential_parameter import OnePasswordCredentialParameter
from .one_password_credential_parameter_yaml import OnePasswordCredentialParameterYaml
from .organization_schedule_item import OrganizationScheduleItem
from .organization_schedule_list_response import OrganizationScheduleListResponse
from .otp_type import OtpType
from .output_parameter import OutputParameter
from .output_parameter_yaml import OutputParameterYaml
@ -323,8 +319,6 @@ if typing.TYPE_CHECKING:
from .pdf_parser_block import PdfParserBlock
from .pdf_parser_block_yaml import PdfParserBlockYaml
from .persistent_browser_type import PersistentBrowserType
from .plan_tier import PlanTier
from .portal_session_response import PortalSessionResponse
from .print_page_block import PrintPageBlock
from .print_page_block_parameters_item import (
PrintPageBlockParametersItem,
@ -390,6 +384,7 @@ if typing.TYPE_CHECKING:
)
from .task_block_yaml import TaskBlockYaml
from .task_block_yaml_data_schema import TaskBlockYamlDataSchema
from .task_run_list_item import TaskRunListItem
from .task_run_request import TaskRunRequest
from .task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema
from .task_run_request_proxy_location import TaskRunRequestProxyLocation
@ -584,10 +579,6 @@ if typing.TYPE_CHECKING:
from .workflow_run_timeline import WorkflowRunTimeline
from .workflow_run_timeline_type import WorkflowRunTimelineType
from .workflow_run_trigger_type import WorkflowRunTriggerType
from .workflow_schedule import WorkflowSchedule
from .workflow_schedule_list_response import WorkflowScheduleListResponse
from .workflow_schedule_response import WorkflowScheduleResponse
from .workflow_schedule_upsert_request import WorkflowScheduleUpsertRequest
from .workflow_status import WorkflowStatus
from .workflow_trigger_block import WorkflowTriggerBlock
from .workflow_trigger_block_parameters_item import (
@ -633,7 +624,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"AzureSecretParameter": ".azure_secret_parameter",
"AzureVaultCredentialParameter": ".azure_vault_credential_parameter",
"AzureVaultCredentialParameterYaml": ".azure_vault_credential_parameter_yaml",
"BillingStateResponse": ".billing_state_response",
"BitwardenCreditCardDataParameter": ".bitwarden_credit_card_data_parameter",
"BitwardenCreditCardDataParameterYaml": ".bitwarden_credit_card_data_parameter_yaml",
"BitwardenLoginCredentialParameter": ".bitwarden_login_credential_parameter",
@ -650,8 +640,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"BranchCriteriaYamlCriteriaType": ".branch_criteria_yaml_criteria_type",
"BrowserProfile": ".browser_profile",
"BrowserSessionResponse": ".browser_session_response",
"ChangeTierResponse": ".change_tier_response",
"CheckoutSessionResponse": ".checkout_session_response",
"ClickAction": ".click_action",
"ClickActionData": ".click_action_data",
"ClickContext": ".click_context",
@ -694,6 +682,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"CredentialResponse": ".credential_response",
"CredentialResponseCredential": ".credential_response_credential",
"CredentialTypeOutput": ".credential_type_output",
"CredentialVaultType": ".credential_vault_type",
"CreditCardCredentialResponse": ".credit_card_credential_response",
"DownloadToS3Block": ".download_to_s3block",
"DownloadToS3BlockYaml": ".download_to_s3block_yaml",
@ -885,8 +874,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"NonEmptyPasswordCredential": ".non_empty_password_credential",
"OnePasswordCredentialParameter": ".one_password_credential_parameter",
"OnePasswordCredentialParameterYaml": ".one_password_credential_parameter_yaml",
"OrganizationScheduleItem": ".organization_schedule_item",
"OrganizationScheduleListResponse": ".organization_schedule_list_response",
"OtpType": ".otp_type",
"OutputParameter": ".output_parameter",
"OutputParameterYaml": ".output_parameter_yaml",
@ -895,8 +882,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"PdfParserBlock": ".pdf_parser_block",
"PdfParserBlockYaml": ".pdf_parser_block_yaml",
"PersistentBrowserType": ".persistent_browser_type",
"PlanTier": ".plan_tier",
"PortalSessionResponse": ".portal_session_response",
"PrintPageBlock": ".print_page_block",
"PrintPageBlockParametersItem": ".print_page_block_parameters_item",
"PrintPageBlockParametersItem_AwsSecret": ".print_page_block_parameters_item",
@ -956,6 +941,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"TaskBlockParametersItem_Workflow": ".task_block_parameters_item",
"TaskBlockYaml": ".task_block_yaml",
"TaskBlockYamlDataSchema": ".task_block_yaml_data_schema",
"TaskRunListItem": ".task_run_list_item",
"TaskRunRequest": ".task_run_request",
"TaskRunRequestDataExtractionSchema": ".task_run_request_data_extraction_schema",
"TaskRunRequestProxyLocation": ".task_run_request_proxy_location",
@ -1134,10 +1120,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowRunTimeline": ".workflow_run_timeline",
"WorkflowRunTimelineType": ".workflow_run_timeline_type",
"WorkflowRunTriggerType": ".workflow_run_trigger_type",
"WorkflowSchedule": ".workflow_schedule",
"WorkflowScheduleListResponse": ".workflow_schedule_list_response",
"WorkflowScheduleResponse": ".workflow_schedule_response",
"WorkflowScheduleUpsertRequest": ".workflow_schedule_upsert_request",
"WorkflowStatus": ".workflow_status",
"WorkflowTriggerBlock": ".workflow_trigger_block",
"WorkflowTriggerBlockParametersItem": ".workflow_trigger_block_parameters_item",
@ -1205,7 +1187,6 @@ __all__ = [
"AzureSecretParameter",
"AzureVaultCredentialParameter",
"AzureVaultCredentialParameterYaml",
"BillingStateResponse",
"BitwardenCreditCardDataParameter",
"BitwardenCreditCardDataParameterYaml",
"BitwardenLoginCredentialParameter",
@ -1222,8 +1203,6 @@ __all__ = [
"BranchCriteriaYamlCriteriaType",
"BrowserProfile",
"BrowserSessionResponse",
"ChangeTierResponse",
"CheckoutSessionResponse",
"ClickAction",
"ClickActionData",
"ClickContext",
@ -1266,6 +1245,7 @@ __all__ = [
"CredentialResponse",
"CredentialResponseCredential",
"CredentialTypeOutput",
"CredentialVaultType",
"CreditCardCredentialResponse",
"DownloadToS3Block",
"DownloadToS3BlockYaml",
@ -1457,8 +1437,6 @@ __all__ = [
"NonEmptyPasswordCredential",
"OnePasswordCredentialParameter",
"OnePasswordCredentialParameterYaml",
"OrganizationScheduleItem",
"OrganizationScheduleListResponse",
"OtpType",
"OutputParameter",
"OutputParameterYaml",
@ -1467,8 +1445,6 @@ __all__ = [
"PdfParserBlock",
"PdfParserBlockYaml",
"PersistentBrowserType",
"PlanTier",
"PortalSessionResponse",
"PrintPageBlock",
"PrintPageBlockParametersItem",
"PrintPageBlockParametersItem_AwsSecret",
@ -1528,6 +1504,7 @@ __all__ = [
"TaskBlockParametersItem_Workflow",
"TaskBlockYaml",
"TaskBlockYamlDataSchema",
"TaskRunListItem",
"TaskRunRequest",
"TaskRunRequestDataExtractionSchema",
"TaskRunRequestProxyLocation",
@ -1706,10 +1683,6 @@ __all__ = [
"WorkflowRunTimeline",
"WorkflowRunTimelineType",
"WorkflowRunTriggerType",
"WorkflowSchedule",
"WorkflowScheduleListResponse",
"WorkflowScheduleResponse",
"WorkflowScheduleUpsertRequest",
"WorkflowStatus",
"WorkflowTriggerBlock",
"WorkflowTriggerBlockParametersItem",

View file

@ -1,37 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import datetime as dt
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .plan_tier import PlanTier
class BillingStateResponse(UniversalBaseModel):
billing_id: str
organization_id: str
plan_tier: PlanTier
current_period_start: typing.Optional[dt.datetime] = None
current_period_end: typing.Optional[dt.datetime] = None
included_credits_this_period: int
credits_consumed_this_period: int
cached_credits_consumed_this_period: int
overage_enabled: bool
browser_uptime_seconds_consumed: int
topup_credits_total: int
topup_credits_used: int
topup_credits_remaining: int
credits_remaining: int
cancel_at_period_end: typing.Optional[bool] = None
created_at: dt.datetime
modified_at: dt.datetime
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow

View file

@ -1,21 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class ChangeTierResponse(UniversalBaseModel):
status: str
tier: str
redirect_url: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow

View file

@ -1,20 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class CheckoutSessionResponse(UniversalBaseModel):
id: str
url: str
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow

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 .credential_vault_type import CredentialVaultType
from .skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
@ -28,6 +29,11 @@ class CreateCredentialRequest(UniversalBaseModel):
The credential data to store
"""
vault_type: typing.Optional[CredentialVaultType] = pydantic.Field(default=None)
"""
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.
"""
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

View file

@ -6,6 +6,7 @@ import pydantic
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
class CredentialResponse(UniversalBaseModel):
@ -33,6 +34,11 @@ class CredentialResponse(UniversalBaseModel):
Name of the credential
"""
vault_type: typing.Optional[CredentialVaultType] = pydantic.Field(default=None)
"""
Which vault stores this credential (e.g., 'bitwarden', 'azure_vault', 'custom')
"""
browser_profile_id: typing.Optional[str] = pydantic.Field(default=None)
"""
Browser profile ID linked to this credential
@ -48,6 +54,11 @@ class CredentialResponse(UniversalBaseModel):
User-provided context describing the login sequence (e.g., 'click SSO button first')
"""
save_browser_session_intent: typing.Optional[bool] = pydantic.Field(default=None)
"""
Whether the user intends to save a browser session, regardless of test outcome
"""
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,5 @@
# This file was auto-generated by Fern from our API Definition.
import typing
CredentialVaultType = typing.Union[typing.Literal["bitwarden", "azure_vault", "custom"], typing.Any]

View file

@ -1,23 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .organization_schedule_item import OrganizationScheduleItem
class OrganizationScheduleListResponse(UniversalBaseModel):
schedules: typing.List[OrganizationScheduleItem]
total_count: int
page: int
page_size: int
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow

View file

@ -11,7 +11,7 @@ class PasswordCredentialResponse(UniversalBaseModel):
"""
Response model for password credentials non-sensitive fields only.
SECURITY: Must NEVER include password, TOTP secret, or TOTP identifier.
SECURITY: Must NEVER include password or TOTP secret.
"""
username: str = pydantic.Field()

View file

@ -1,5 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
PlanTier = typing.Union[typing.Literal["free", "hobby", "pro", "enterprise"], typing.Any]

View file

@ -1,19 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class PortalSessionResponse(UniversalBaseModel):
url: str
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow

View file

@ -7,20 +7,21 @@ import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class OrganizationScheduleItem(UniversalBaseModel):
workflow_schedule_id: str
organization_id: str
workflow_permanent_id: str
workflow_title: str
cron_expression: str
timezone: str
enabled: bool
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
name: typing.Optional[str] = None
description: typing.Optional[str] = None
next_run: typing.Optional[dt.datetime] = None
class TaskRunListItem(UniversalBaseModel):
"""
Lightweight run-history item backed by the task_runs table.
"""
task_run_id: str
run_id: str
task_run_type: str
status: str
title: typing.Optional[str] = None
started_at: typing.Optional[dt.datetime] = None
finished_at: typing.Optional[dt.datetime] = None
created_at: dt.datetime
modified_at: dt.datetime
workflow_permanent_id: typing.Optional[str] = None
script_run: 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

@ -144,7 +144,7 @@ class TaskRunRequest(UniversalBaseModel):
run_with: typing.Optional[str] = pydantic.Field(default=None)
"""
Whether to run the task with agent or code.
Whether to run the task with agent or code. Null means use the default.
"""
if IS_PYDANTIC_V2:

View file

@ -35,6 +35,7 @@ class Workflow(UniversalBaseModel):
ai_fallback: typing.Optional[bool] = None
cache_key: typing.Optional[str] = None
adaptive_caching: typing.Optional[bool] = None
code_version: typing.Optional[int] = None
generate_script_on_terminal: typing.Optional[bool] = None
run_sequentially: typing.Optional[bool] = None
sequential_key: typing.Optional[str] = None

View file

@ -29,6 +29,7 @@ class WorkflowCreateYamlRequest(UniversalBaseModel):
ai_fallback: typing.Optional[bool] = None
cache_key: typing.Optional[str] = None
adaptive_caching: typing.Optional[bool] = None
code_version: typing.Optional[int] = None
generate_script_on_terminal: typing.Optional[bool] = None
run_sequentially: typing.Optional[bool] = None
sequential_key: typing.Optional[str] = None

View file

@ -27,6 +27,7 @@ class WorkflowRun(UniversalBaseModel):
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
failure_reason: typing.Optional[str] = None
failure_category: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None
parent_workflow_run_id: typing.Optional[str] = None
workflow_title: typing.Optional[str] = None
max_screenshot_scrolls: typing.Optional[int] = None

View file

@ -108,7 +108,7 @@ class WorkflowRunRequest(UniversalBaseModel):
run_with: typing.Optional[str] = pydantic.Field(default=None)
"""
Whether to run the workflow with agent, code, or code_v2 (adaptive caching).
Whether to run the workflow with agent or code. Null inherits from the workflow setting.
"""
if IS_PYDANTIC_V2:

View file

@ -110,7 +110,7 @@ class WorkflowRunResponse(UniversalBaseModel):
run_with: typing.Optional[str] = pydantic.Field(default=None)
"""
Whether the workflow run was executed with agent, code, or code_v2 (adaptive caching)
Whether the workflow run was executed with agent or code
"""
ai_fallback: typing.Optional[bool] = pydantic.Field(default=None)

View file

@ -1,32 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import datetime as dt
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class WorkflowSchedule(UniversalBaseModel):
workflow_schedule_id: str
organization_id: str
workflow_permanent_id: str
cron_expression: str
timezone: str
enabled: bool
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
temporal_schedule_id: typing.Optional[str] = None
name: typing.Optional[str] = None
description: typing.Optional[str] = None
created_at: dt.datetime
modified_at: dt.datetime
deleted_at: typing.Optional[dt.datetime] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow

View file

@ -1,20 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .workflow_schedule import WorkflowSchedule
class WorkflowScheduleListResponse(UniversalBaseModel):
schedules: typing.List[WorkflowSchedule]
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow

View file

@ -1,22 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import datetime as dt
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .workflow_schedule import WorkflowSchedule
class WorkflowScheduleResponse(UniversalBaseModel):
schedule: WorkflowSchedule
next_runs: typing.Optional[typing.List[dt.datetime]] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow

View file

@ -1,24 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class WorkflowScheduleUpsertRequest(UniversalBaseModel):
cron_expression: str
timezone: str
enabled: typing.Optional[bool] = None
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
name: typing.Optional[str] = None
description: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow

5406
uv.lock generated

File diff suppressed because it is too large Load diff