/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Flatfile from "../../../index"; export declare namespace Threads { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-Disable-Hooks header */ xDisableHooks?: "true"; 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; /** Override the X-Disable-Hooks header */ xDisableHooks?: "true"; /** Additional headers to include in the request. */ headers?: Record; } } export declare class Threads { protected readonly _options: Threads.Options; constructor(_options?: Threads.Options); /** * Create a new thread * * @param {Flatfile.ThreadApiCreateData} request * @param {Threads.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.ForbiddenError} * * @example * await client.threads.createThread({ * resourceId: "resourceId", * status: "ready" * }) */ createThread(request: Flatfile.ThreadApiCreateData, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise; private __createThread; /** * Get threads with optional filtering by resource * * @param {Flatfile.GetThreadsRequest} request * @param {Threads.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.ForbiddenError} * * @example * await client.threads.getThreads() */ getThreads(request?: Flatfile.GetThreadsRequest, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise; private __getThreads; /** * Get a specific thread by ID * * @param {Flatfile.ThreadId} threadId * @param {Threads.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.NotFoundError} * @throws {@link Flatfile.ForbiddenError} * * @example * await client.threads.getThread("threadId") */ getThread(threadId: Flatfile.ThreadId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise; private __getThread; /** * Update a thread * * @param {Flatfile.ThreadId} threadId * @param {Flatfile.ThreadApiUpdateData} request * @param {Threads.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * @throws {@link Flatfile.ForbiddenError} * * @example * await client.threads.updateThread("threadId", {}) */ updateThread(threadId: Flatfile.ThreadId, request: Flatfile.ThreadApiUpdateData, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise; private __updateThread; /** * Soft delete a thread * * @param {Flatfile.ThreadId} threadId * @param {Threads.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.NotFoundError} * @throws {@link Flatfile.ForbiddenError} * * @example * await client.threads.deleteThread("threadId") */ deleteThread(threadId: Flatfile.ThreadId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise; private __deleteThread; protected _getAuthorizationHeader(): Promise; }