/** * 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 Files { 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 `/files` and `/files/{id}` endpoints to manage individual file assets. */ export declare class Files { protected readonly _options: Files.Options; constructor(_options?: Files.Options); /** * Retrieves a paginated list of all files associated with the current project. * * @param {Ittybit.FilesListRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.files.list() */ list(request?: Ittybit.FilesListRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __list; /** * Creates a new file from a publicly accessible or signed URL. * * @param {Ittybit.FilesCreateRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.files.create({ * url: "https://ittyb.it/sample.mp4", * folder: "ittybit/samples", * filename: "video.mp4", * metadata: { * "customKey": "your custom value" * } * }) */ create(request: Ittybit.FilesCreateRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieve the file object for a file with the given ID. * * @param {string} id * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.files.get("file_abcdefgh1234") */ get(id: string, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __get; /** * Permanently removes a file from the system. This action cannot be undone. * * @param {string} id * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.files.delete("file_abcdefgh1234") */ delete(id: string, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __delete; /** * Update a file's `filename`, `folder`, `ref`, or `metadata`. Only the specified fields will be updated. * * @param {string} id * @param {Ittybit.FilesUpdateRequest} request * @param {Files.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.files.update("file_abcdefgh1234", { * folder: "updated/folder", * filename: "new_filename.mp4", * metadata: { * "customKey": "a different custom value" * } * }) */ update(id: string, request?: Ittybit.FilesUpdateRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise; private __update; protected _getAuthorizationHeader(): Promise; }