/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as acrolinx from "../../../index"; import * as fs from "fs"; import { Blob } from "buffer"; export declare namespace StyleRewrites { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; token: core.Supplier; fetcher?: core.FetchFunction; } 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; /** Additional headers to include in the request. */ headers?: Record; } } /** * Includes all information from style suggestions, plus a rewrite of the text. */ export declare class StyleRewrites { protected readonly _options: StyleRewrites.Options; constructor(_options: StyleRewrites.Options); /** * Start a style and brand rewrite workflow. Returns a workflow ID to use for polling results. * * @param {File | fs.ReadStream | Blob} file_upload * @param {acrolinx.StyleRewritesCreateStyleRewriteRequest} request * @param {StyleRewrites.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link acrolinx.ContentTooLargeError} * @throws {@link acrolinx.UnprocessableEntityError} * @throws {@link acrolinx.InternalServerError} * * @example * await client.styleRewrites.createStyleRewrite(fs.createReadStream("/path/to/your/file"), { * dialect: "american_english", * tone: "academic", * style_guide: "style_guide" * }) */ createStyleRewrite(file_upload: File | fs.ReadStream | Blob, request: acrolinx.StyleRewritesCreateStyleRewriteRequest, requestOptions?: StyleRewrites.RequestOptions): core.HttpResponsePromise; private __createStyleRewrite; /** * Retrieve the results of a rewrite workflow. Returns `running` or `complete` status. * * @param {string} workflowId * @param {StyleRewrites.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link acrolinx.NotFoundError} * @throws {@link acrolinx.UnprocessableEntityError} * @throws {@link acrolinx.InternalServerError} * * @example * await client.styleRewrites.getStyleRewrite("workflow_id") */ getStyleRewrite(workflowId: string, requestOptions?: StyleRewrites.RequestOptions): core.HttpResponsePromise; private __getStyleRewrite; protected _getAuthorizationHeader(): Promise; }