/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Ittybit from "../../../index.js"; export declare namespace Tasks { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey?: core.Supplier; /** Override the ACCEPT_VERSION header */ version?: core.Supplier; /** Additional headers to include in requests. */ headers?: Record | undefined>; 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 ACCEPT_VERSION header */ version?: string | undefined; /** Additional query string parameters to include in the request. */ queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; } } /** * You can use the `/tasks` and `/tasks/{id}` endpoints to manage processing tasks. */ export declare class Tasks { protected readonly _options: Tasks.Options; constructor(_options?: Tasks.Options); /** * Retrieves a paginated list of all tasks for the current project. * * @param {Ittybit.TasksListRequest} request * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.tasks.list() */ list(request?: Ittybit.TasksListRequest, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise; private __list; /** * Creates a new task item. See [Tasks](/docs/tasks) for detailed coverage of all available props and values. * * @param {unknown} request * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.tasks.create({ * "file_id": "file_abcdefgh1234", * "kind": "image", * "width": 320, * "format": "png", * "ref": "thumbnail" * }) */ create(request?: unknown, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves the task object for a task with the given ID. * * @param {string} id * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.tasks.get("task_abcdefgh1234") */ get(id: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise; private __get; protected _getAuthorizationHeader(): Promise; }