import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient"; import * as core from "../../../../core"; import * as Extend from "../../../index"; export declare namespace WorkflowsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class WorkflowsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options: WorkflowsClient.Options); /** * List all workflows. Returns a paginated list of workflow summaries. * * @param {Extend.WorkflowsListRequest} request * @param {WorkflowsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.workflows.list({ * nextPageToken: "xK9mLPqRtN3vS8wF5hB2cQ==:zWvUxYjM4nKpL7aDgE9HbTcR2mAyX3/Q+CNkfBSw1dZ=" * }) */ list(request?: Extend.WorkflowsListRequest, requestOptions?: WorkflowsClient.RequestOptions): core.HttpResponsePromise; private __list; /** * Create a new workflow. Optionally provide `steps` to define the workflow's step graph. * * When `steps` is omitted, the workflow is created with default steps (`TRIGGER` → `PARSE`). When `steps` is provided, the step graph is validated and the draft version is populated with the given steps. * * **Note:** The default steps may change in the future. If your integration depends on a specific step graph, provide `steps` explicitly. * * @param {Extend.WorkflowsCreateRequest} request * @param {WorkflowsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.workflows.create({ * name: "Invoice Processing" * }) * * @example * await client.workflows.create({ * name: "Invoice Processing", * steps: [{ * type: "TRIGGER", * name: "name" * }, { * type: "PARSE", * name: "name" * }, { * type: "EXTRACT", * name: "name" * }, { * type: "HUMAN_REVIEW", * name: "name" * }] * }) * * @example * await client.workflows.create({ * name: "Document Routing", * steps: [{ * type: "TRIGGER", * name: "name" * }, { * type: "PARSE", * name: "name" * }, { * type: "CLASSIFY", * name: "name" * }, { * type: "EXTRACT", * name: "name" * }, { * type: "EXTRACT", * name: "name" * }, { * type: "HUMAN_REVIEW", * name: "name" * }] * }) */ create(request: Extend.WorkflowsCreateRequest, requestOptions?: WorkflowsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Get details of a workflow, including its draft version and steps. * * @param {string} id - The ID of the workflow. * @param {WorkflowsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.workflows.retrieve("workflow_abc123") */ retrieve(id: string, requestOptions?: WorkflowsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Update a workflow's draft. You can update the name, the steps, or both. * * When `steps` is provided, the draft version's steps are replaced with the new set. Steps with matching names from the previous draft preserve their internal identity. * * @param {string} id - The ID of the workflow to update. * @param {Extend.WorkflowsUpdateRequest} request * @param {WorkflowsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Extend.BadRequestError} * @throws {@link Extend.UnauthorizedError} * @throws {@link Extend.PaymentRequiredError} * @throws {@link Extend.ForbiddenError} * @throws {@link Extend.NotFoundError} * @throws {@link Extend.UnprocessableEntityError} * @throws {@link Extend.TooManyRequestsError} * @throws {@link Extend.InternalServerError} * * @example * await client.workflows.update("workflow_abc123", { * name: "Updated Invoice Processing" * }) * * @example * await client.workflows.update("workflow_abc123", { * steps: [{ * type: "TRIGGER", * name: "name" * }, { * type: "PARSE", * name: "name" * }] * }) */ update(id: string, request?: Extend.WorkflowsUpdateRequest, requestOptions?: WorkflowsClient.RequestOptions): core.HttpResponsePromise; private __update; }