/** * 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 Media { 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 `/media` and `/media/{id}` endpoints to manage media items. */ export declare class Media { protected readonly _options: Media.Options; constructor(_options?: Media.Options); /** * Retrieves a paginated list of all media for the current project. * * @param {Ittybit.MediaListRequest} request * @param {Media.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.media.list() */ list(request?: Ittybit.MediaListRequest, requestOptions?: Media.RequestOptions): core.HttpResponsePromise; private __list; /** * Creates a new media item. See [Media Object](/docs/media) for more details. * * @param {Ittybit.MediaCreateRequest} request * @param {Media.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.media.create({ * title: "My Video Example", * alt: "An example video used to demonstrate the ittybit API", * metadata: { * "customKey": "your custom value" * } * }) */ create(request?: Ittybit.MediaCreateRequest, requestOptions?: Media.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves the media object for a media with the given ID. * * @param {string} id * @param {Media.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.media.get("med_abcdefgh1234") */ get(id: string, requestOptions?: Media.RequestOptions): core.HttpResponsePromise; private __get; /** * Permanently removes a media object from the system. This action cannot be undone. * * @param {string} id * @param {Media.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.media.delete("med_abcdefgh1234") */ delete(id: string, requestOptions?: Media.RequestOptions): core.HttpResponsePromise; private __delete; /** * Updates a media object's `title`, `alt`, or `metadata`. Only the specified fields will be updated. * * @param {string} id * @param {Ittybit.MediaUpdateRequest} request * @param {Media.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.media.update("med_abcdefgh1234", { * title: "Updated Video Example", * alt: "An updated example video used to demonstrate the ittybit API", * metadata: { * "customKey": "a different custom value" * } * }) */ update(id: string, request?: Ittybit.MediaUpdateRequest, requestOptions?: Media.RequestOptions): core.HttpResponsePromise; private __update; protected _getAuthorizationHeader(): Promise; }