Fern: generated SDK post processing (#3840)

This commit is contained in:
Stanislav Novosad
2025-10-28 18:14:54 -06:00
committed by GitHub
parent d1008959b0
commit 12e83cdf9a
15 changed files with 182 additions and 10 deletions

View File

@@ -13,6 +13,7 @@ export const ActionType = {
Terminate: "terminate",
Complete: "complete",
ReloadPage: "reload_page",
ClosePage: "close_page",
Extract: "extract",
VerificationCode: "verification_code",
GotoUrl: "goto_url",

View File

@@ -21,5 +21,6 @@ export const BlockType = {
GotoUrl: "goto_url",
PdfParser: "pdf_parser",
HttpRequest: "http_request",
HumanInteraction: "human_interaction",
} as const;
export type BlockType = (typeof BlockType)[keyof typeof BlockType];

View File

@@ -13,6 +13,7 @@ export type ForLoopBlockLoopBlocksItem =
| Skyvern.ForLoopBlockLoopBlocksItem.ForLoop
| Skyvern.ForLoopBlockLoopBlocksItem.GotoUrl
| Skyvern.ForLoopBlockLoopBlocksItem.HttpRequest
| Skyvern.ForLoopBlockLoopBlocksItem.HumanInteraction
| Skyvern.ForLoopBlockLoopBlocksItem.Login
| Skyvern.ForLoopBlockLoopBlocksItem.Navigation
| Skyvern.ForLoopBlockLoopBlocksItem.PdfParser
@@ -65,6 +66,10 @@ export namespace ForLoopBlockLoopBlocksItem {
block_type: "http_request";
}
export interface HumanInteraction extends Skyvern.HumanInteractionBlock {
block_type: "human_interaction";
}
export interface Login extends Skyvern.LoginBlock {
block_type: "login";
}

View File

@@ -18,6 +18,7 @@ export type ForLoopBlockYamlLoopBlocksItem =
| Skyvern.ForLoopBlockYamlLoopBlocksItem.Extraction
| Skyvern.ForLoopBlockYamlLoopBlocksItem.Login
| Skyvern.ForLoopBlockYamlLoopBlocksItem.Wait
| Skyvern.ForLoopBlockYamlLoopBlocksItem.HumanInteraction
| Skyvern.ForLoopBlockYamlLoopBlocksItem.FileDownload
| Skyvern.ForLoopBlockYamlLoopBlocksItem.GotoUrl
| Skyvern.ForLoopBlockYamlLoopBlocksItem.PdfParser
@@ -85,6 +86,10 @@ export namespace ForLoopBlockYamlLoopBlocksItem {
block_type: "wait";
}
export interface HumanInteraction extends Skyvern.HumanInteractionBlockYaml {
block_type: "human_interaction";
}
export interface FileDownload extends Skyvern.FileDownloadBlockYaml {
block_type: "file_download";
}

View File

@@ -0,0 +1,55 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../index.js";
/**
* A block for human/agent interaction.
*
* For the first pass at this, the implicit behaviour is that the user is given a single binary
* choice (a go//no-go).
*
* If the human:
* - chooses positively, the workflow continues
* - chooses negatively, the workflow is terminated
* - does not respond within the timeout period, the workflow terminates
*/
export interface HumanInteractionBlock {
label: string;
output_parameter: Skyvern.OutputParameter;
continue_on_failure?: boolean;
model?: Record<string, unknown>;
disable_cache?: boolean;
task_type?: string;
url?: string;
title?: string;
engine?: Skyvern.RunEngine;
complete_criterion?: string;
terminate_criterion?: string;
navigation_goal?: string;
data_extraction_goal?: string;
data_schema?: HumanInteractionBlock.DataSchema;
error_code_mapping?: Record<string, string | undefined>;
max_retries?: number;
max_steps_per_run?: number;
parameters?: Skyvern.HumanInteractionBlockParametersItem[];
complete_on_download?: boolean;
download_suffix?: string;
totp_verification_url?: string;
totp_identifier?: string;
cache_actions?: boolean;
complete_verification?: boolean;
include_action_history_in_verification?: boolean;
download_timeout?: number;
instructions?: string;
positive_descriptor?: string;
negative_descriptor?: string;
timeout_seconds?: number;
sender?: string;
recipients?: string[];
subject?: string;
body?: string;
}
export namespace HumanInteractionBlock {
export type DataSchema = Record<string, unknown> | unknown[] | string;
}

View File

@@ -0,0 +1,62 @@
// This file was auto-generated by Fern from our API Definition.
import type * as Skyvern from "../index.js";
export type HumanInteractionBlockParametersItem =
| Skyvern.HumanInteractionBlockParametersItem.AwsSecret
| Skyvern.HumanInteractionBlockParametersItem.AzureSecret
| Skyvern.HumanInteractionBlockParametersItem.AzureVaultCredential
| Skyvern.HumanInteractionBlockParametersItem.BitwardenCreditCardData
| Skyvern.HumanInteractionBlockParametersItem.BitwardenLoginCredential
| Skyvern.HumanInteractionBlockParametersItem.BitwardenSensitiveInformation
| Skyvern.HumanInteractionBlockParametersItem.Context
| Skyvern.HumanInteractionBlockParametersItem.Credential
| Skyvern.HumanInteractionBlockParametersItem.Onepassword
| Skyvern.HumanInteractionBlockParametersItem.Output
| Skyvern.HumanInteractionBlockParametersItem.Workflow;
export namespace HumanInteractionBlockParametersItem {
export interface AwsSecret extends Skyvern.AwsSecretParameter {
parameter_type: "aws_secret";
}
export interface AzureSecret extends Skyvern.AzureSecretParameter {
parameter_type: "azure_secret";
}
export interface AzureVaultCredential extends Skyvern.AzureVaultCredentialParameter {
parameter_type: "azure_vault_credential";
}
export interface BitwardenCreditCardData extends Skyvern.BitwardenCreditCardDataParameter {
parameter_type: "bitwarden_credit_card_data";
}
export interface BitwardenLoginCredential extends Skyvern.BitwardenLoginCredentialParameter {
parameter_type: "bitwarden_login_credential";
}
export interface BitwardenSensitiveInformation extends Skyvern.BitwardenSensitiveInformationParameter {
parameter_type: "bitwarden_sensitive_information";
}
export interface Context extends Skyvern.ContextParameter {
parameter_type: "context";
}
export interface Credential extends Skyvern.CredentialParameter {
parameter_type: "credential";
}
export interface Onepassword extends Skyvern.OnePasswordCredentialParameter {
parameter_type: "onepassword";
}
export interface Output extends Skyvern.OutputParameter {
parameter_type: "output";
}
export interface Workflow extends Skyvern.WorkflowParameter {
parameter_type: "workflow";
}
}

View File

@@ -0,0 +1,15 @@
// This file was auto-generated by Fern from our API Definition.
export interface HumanInteractionBlockYaml {
label: string;
continue_on_failure?: boolean;
model?: Record<string, unknown>;
instructions?: string;
positive_descriptor?: string;
negative_descriptor?: string;
timeout_seconds: number;
sender: string;
recipients: string[];
subject: string;
body: string;
}

View File

@@ -13,6 +13,7 @@ export type WorkflowDefinitionBlocksItem =
| Skyvern.WorkflowDefinitionBlocksItem.ForLoop
| Skyvern.WorkflowDefinitionBlocksItem.GotoUrl
| Skyvern.WorkflowDefinitionBlocksItem.HttpRequest
| Skyvern.WorkflowDefinitionBlocksItem.HumanInteraction
| Skyvern.WorkflowDefinitionBlocksItem.Login
| Skyvern.WorkflowDefinitionBlocksItem.Navigation
| Skyvern.WorkflowDefinitionBlocksItem.PdfParser
@@ -65,6 +66,10 @@ export namespace WorkflowDefinitionBlocksItem {
block_type: "http_request";
}
export interface HumanInteraction extends Skyvern.HumanInteractionBlock {
block_type: "human_interaction";
}
export interface Login extends Skyvern.LoginBlock {
block_type: "login";
}

View File

@@ -13,6 +13,7 @@ export type WorkflowDefinitionYamlBlocksItem =
| Skyvern.WorkflowDefinitionYamlBlocksItem.ForLoop
| Skyvern.WorkflowDefinitionYamlBlocksItem.GotoUrl
| Skyvern.WorkflowDefinitionYamlBlocksItem.HttpRequest
| Skyvern.WorkflowDefinitionYamlBlocksItem.HumanInteraction
| Skyvern.WorkflowDefinitionYamlBlocksItem.Login
| Skyvern.WorkflowDefinitionYamlBlocksItem.Navigation
| Skyvern.WorkflowDefinitionYamlBlocksItem.PdfParser
@@ -65,6 +66,10 @@ export namespace WorkflowDefinitionYamlBlocksItem {
block_type: "http_request";
}
export interface HumanInteraction extends Skyvern.HumanInteractionBlockYaml {
block_type: "human_interaction";
}
export interface Login extends Skyvern.LoginBlockYaml {
block_type: "login";
}

View File

@@ -58,6 +58,9 @@ export * from "./HttpRequestBlock.js";
export * from "./HttpRequestBlockParametersItem.js";
export * from "./HttpRequestBlockYaml.js";
export * from "./HttpValidationError.js";
export * from "./HumanInteractionBlock.js";
export * from "./HumanInteractionBlockParametersItem.js";
export * from "./HumanInteractionBlockYaml.js";
export * from "./InputOrSelectContext.js";
export * from "./LoginBlock.js";
export * from "./LoginBlockParametersItem.js";