Rebuild fern client sdk to 1.06 (#4331)

This commit is contained in:
Marc Kelechava
2025-12-19 12:16:02 -08:00
committed by GitHub
parent 08ca5a0b45
commit 9788138861
50 changed files with 2169 additions and 909 deletions

View File

@@ -0,0 +1,13 @@
// This file was auto-generated by Fern from our API Definition.
import type * as core from "../../../core/index.js";
/**
* @example
* {
* file: fs.createReadStream("/path/to/your/file")
* }
*/
export interface BodyUploadFileV1UploadFilePost {
file: core.file.Uploadable;
}

View File

@@ -1,3 +1,4 @@
export type { BodyUploadFileV1UploadFilePost } from "./BodyUploadFileV1UploadFilePost.js";
export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.js";
export type { CreateBrowserSessionRequest } from "./CreateBrowserSessionRequest.js";
export type { CreateCredentialRequest } from "./CreateCredentialRequest.js";

View File

@@ -1,3 +1 @@
export * as scripts from "./scripts/index.js";
export * from "./workflows/client/requests/index.js";
export * as workflows from "./workflows/index.js";

View File

@@ -1,112 +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 Workflows {
export interface Options extends BaseClientOptions {}
export interface RequestOptions extends BaseRequestOptions {}
}
export class Workflows {
protected readonly _options: Workflows.Options;
constructor(_options: Workflows.Options = {}) {
this._options = _options;
}
/**
* Set or unset a workflow as a template.
*
* Template status is stored at the workflow_permanent_id level (not per-version),
* meaning all versions of a workflow share the same template status.
*
* @param {string} workflowPermanentId
* @param {Skyvern.SetWorkflowTemplateStatusV1WorkflowsWorkflowPermanentIdTemplatePutRequest} request
* @param {Workflows.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Skyvern.UnprocessableEntityError}
*
* @example
* await client.workflows.setWorkflowTemplateStatus("workflow_permanent_id", {
* is_template: true
* })
*/
public setWorkflowTemplateStatus(
workflowPermanentId: string,
request: Skyvern.SetWorkflowTemplateStatusV1WorkflowsWorkflowPermanentIdTemplatePutRequest,
requestOptions?: Workflows.RequestOptions,
): core.HttpResponsePromise<Record<string, unknown>> {
return core.HttpResponsePromise.fromPromise(
this.__setWorkflowTemplateStatus(workflowPermanentId, request, requestOptions),
);
}
private async __setWorkflowTemplateStatus(
workflowPermanentId: string,
request: Skyvern.SetWorkflowTemplateStatusV1WorkflowsWorkflowPermanentIdTemplatePutRequest,
requestOptions?: Workflows.RequestOptions,
): Promise<core.WithRawResponse<Record<string, unknown>>> {
const { is_template: isTemplate } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
_queryParams.is_template = isTemplate.toString();
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/workflows/${core.url.encodePathParam(workflowPermanentId)}/template`,
),
method: "PUT",
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 Record<string, unknown>, 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 /v1/workflows/{workflow_permanent_id}/template.",
);
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,11 +0,0 @@
// This file was auto-generated by Fern from our API Definition.
/**
* @example
* {
* is_template: true
* }
*/
export interface SetWorkflowTemplateStatusV1WorkflowsWorkflowPermanentIdTemplatePutRequest {
is_template: boolean;
}

View File

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

View File

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

View File

@@ -7,7 +7,7 @@ export interface PromptAction {
/** The prompt to send to the LLM */
prompt: string;
/** Optional JSON schema to structure the response */
schema?: Record<string, unknown>;
response_schema?: Record<string, unknown>;
/** Optional model configuration */
model?: Record<string, unknown>;
}

View File

@@ -0,0 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
export interface RetryRunWebhookRequest {
/** Optional webhook URL to send the payload to instead of the stored configuration */
webhook_url?: string;
}

View File

@@ -0,0 +1,8 @@
// This file was auto-generated by Fern from our API Definition.
export interface UploadFileResponse {
/** S3 URI where the file was uploaded */
s3_uri: string;
/** Presigned URL to access the uploaded file */
presigned_url: string;
}

View File

@@ -96,6 +96,7 @@ export * from "./PdfParserBlockYaml.js";
export * from "./PromptAction.js";
export * from "./PromptBranchCriteria.js";
export * from "./ProxyLocation.js";
export * from "./RetryRunWebhookRequest.js";
export * from "./RunEngine.js";
export * from "./RunSdkActionRequestAction.js";
export * from "./RunSdkActionResponse.js";
@@ -127,6 +128,7 @@ export * from "./ThoughtType.js";
export * from "./TotpCode.js";
export * from "./TotpType.js";
export * from "./UploadFileAction.js";
export * from "./UploadFileResponse.js";
export * from "./UploadToS3Block.js";
export * from "./UploadToS3BlockYaml.js";
export * from "./UrlBlock.js";