mindee
Version:
Mindee Client Library for Node.js
35 lines (34 loc) • 1.33 kB
TypeScript
import { InputSource } from "../../input/index.js";
import { ExecutionPriority } from "../../v1/parsing/common/index.js";
import { BaseHttpResponse } from "../../http/apiCore.js";
import { ApiSettingsV1 } from "./apiSettingsV1.js";
import { WorkflowParams } from "./httpParams.js";
/**
* Endpoint for a workflow.
*/
export declare class WorkflowEndpoint {
#private;
/** Settings relating to the API. */
settings: ApiSettingsV1;
/** Root of the URL for API calls. */
urlRoot: string;
constructor(settings: ApiSettingsV1, workflowId: string);
/**
* Sends a document to a workflow execution.
* Throws an error if the server's response contains one.
* @param {WorkflowParams} params parameters relating to prediction options.
* @category Synchronous
* @returns a `Promise` containing parsing results.
*/
executeWorkflow(params: WorkflowParams): Promise<BaseHttpResponse>;
/**
* Send a file to a prediction API.
* @param input
* @param alias
* @param priority
* @param fullText
* @param publicUrl
* @param rag
*/
protected sendFileForPrediction(input: InputSource, alias?: string | null, priority?: ExecutionPriority | null, fullText?: boolean, publicUrl?: string | null, rag?: boolean | null): Promise<BaseHttpResponse>;
}