/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Vellum from "../../../index"; import * as stream from "stream"; import * as fs from "fs"; import { Blob } from "buffer"; export declare namespace Workflows { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-API-Version header */ apiVersion?: core.Supplier; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the X-API-Version header */ apiVersion?: Vellum.ApiVersionEnum | undefined; /** Additional headers to include in the request. */ headers?: Record; } } export declare class Workflows { protected readonly _options: Workflows.Options; constructor(_options: Workflows.Options); /** * @throws {@link Vellum.BadRequestError} */ pull(id: string, request?: Vellum.WorkflowsPullRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise; private __pull; /** * Retrieve the current state of a workflow execution. * * **Note:** Uses a base url of `https://predict.vellum.ai`. * * @param {string} spanId - The span ID of the workflow execution to retrieve state for * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.workflows.retrieveState("span_id") */ retrieveState(spanId: string, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise; private __retrieveState; /** * @param {Vellum.WorkflowRunNodeRequest} request * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * @throws {@link Vellum.InternalServerError} * * @example * await client.workflows.executeNode({ * files: { * "files": "files" * }, * node: "x" * }) */ executeNode(request: Vellum.WorkflowRunNodeRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise; private __executeNode; /** * Checks if a workflow execution is currently executing (not fulfilled, not rejected, and has no end time). * Uses the ClickHouse Prime summary materialized view. * * @param {string} executionId * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * @throws {@link Vellum.NotFoundError} * @throws {@link Vellum.InternalServerError} * * @example * await client.workflows.workflowExecutionStatus("execution_id") */ workflowExecutionStatus(executionId: string, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise; private __workflowExecutionStatus; /** * @param {File | fs.ReadStream | Blob | undefined} artifact * @param {Vellum.WorkflowPushRequest} request * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration. */ push(artifact: File | fs.ReadStream | Blob | undefined, request: Vellum.WorkflowPushRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise; private __push; /** * Serialize files * * @param {Vellum.SerializeWorkflowFilesRequest} request * @param {Workflows.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.workflows.serializeWorkflowFiles({ * files: { * "files": { * "key": "value" * } * } * }) */ serializeWorkflowFiles(request: Vellum.SerializeWorkflowFilesRequest, requestOptions?: Workflows.RequestOptions): core.HttpResponsePromise>; private __serializeWorkflowFiles; protected _getCustomAuthorizationHeaders(): Promise<{ "X-API-KEY": string; }>; }