import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from "../../pagination.js"; export declare class Assets extends APIResource { /** * Creates a new custom asset. * * @example * ```ts * const asset = await client.customPages.assets.create({ * description: 'Custom 500 error page', * name: 'my_custom_error_page', * url: 'https://example.com/error.html', * account_id: 'account_id', * }); * ``` */ create(params: AssetCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Updates the configuration of an existing custom asset. * * @example * ```ts * const asset = await client.customPages.assets.update( * 'my_custom_error_page', * { * description: 'Custom 500 error page', * url: 'https://example.com/error.html', * account_id: 'account_id', * }, * ); * ``` */ update(assetName: string, params: AssetUpdateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Fetches all the custom assets. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const assetListResponse of client.customPages.assets.list( * { account_id: 'account_id' }, * )) { * // ... * } * ``` */ list(params?: AssetListParams, options?: Core.RequestOptions): Core.PagePromise; list(options?: Core.RequestOptions): Core.PagePromise; /** * Deletes an existing custom asset. * * @example * ```ts * await client.customPages.assets.delete( * 'my_custom_error_page', * { account_id: 'account_id' }, * ); * ``` */ delete(assetName: string, params?: AssetDeleteParams, options?: Core.RequestOptions): Core.APIPromise; delete(assetName: string, options?: Core.RequestOptions): Core.APIPromise; /** * Fetches the details of a custom asset. * * @example * ```ts * const asset = await client.customPages.assets.get( * 'my_custom_error_page', * { account_id: 'account_id' }, * ); * ``` */ get(assetName: string, params?: AssetGetParams, options?: Core.RequestOptions): Core.APIPromise; get(assetName: string, options?: Core.RequestOptions): Core.APIPromise; } export declare class AssetListResponsesV4PagePaginationArray extends V4PagePaginationArray { } export interface AssetCreateResponse { /** * A short description of the custom asset. */ description?: string; last_updated?: string; /** * The unique name of the custom asset. Can only contain letters (A-Z, a-z), * numbers (0-9), and underscores (\_). */ name?: string; /** * The size of the asset content in bytes. */ size_bytes?: number; /** * The URL where the asset content is fetched from. */ url?: string; } export interface AssetUpdateResponse { /** * A short description of the custom asset. */ description?: string; last_updated?: string; /** * The unique name of the custom asset. Can only contain letters (A-Z, a-z), * numbers (0-9), and underscores (\_). */ name?: string; /** * The size of the asset content in bytes. */ size_bytes?: number; /** * The URL where the asset content is fetched from. */ url?: string; } export interface AssetListResponse { /** * A short description of the custom asset. */ description?: string; last_updated?: string; /** * The unique name of the custom asset. Can only contain letters (A-Z, a-z), * numbers (0-9), and underscores (\_). */ name?: string; /** * The size of the asset content in bytes. */ size_bytes?: number; /** * The URL where the asset content is fetched from. */ url?: string; } export interface AssetGetResponse { /** * A short description of the custom asset. */ description?: string; last_updated?: string; /** * The unique name of the custom asset. Can only contain letters (A-Z, a-z), * numbers (0-9), and underscores (\_). */ name?: string; /** * The size of the asset content in bytes. */ size_bytes?: number; /** * The URL where the asset content is fetched from. */ url?: string; } export interface AssetCreateParams { /** * Body param: A short description of the custom asset. */ description: string; /** * Body param: The unique name of the custom asset. Can only contain letters (A-Z, * a-z), numbers (0-9), and underscores (\_). */ name: string; /** * Body param: The URL where the asset content is fetched from. */ url: string; /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the * Zone ID. */ account_id?: string; /** * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the * Account ID. */ zone_id?: string; } export interface AssetUpdateParams { /** * Body param: A short description of the custom asset. */ description: string; /** * Body param: The URL where the asset content is fetched from. */ url: string; /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the * Zone ID. */ account_id?: string; /** * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the * Account ID. */ zone_id?: string; } export interface AssetListParams extends V4PagePaginationArrayParams { /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the * Zone ID. */ account_id?: string; /** * Path param: The Zone ID to use for this endpoint. Mutually exclusive with the * Account ID. */ zone_id?: string; } export interface AssetDeleteParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ account_id?: string; /** * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zone_id?: string; } export interface AssetGetParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ account_id?: string; /** * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zone_id?: string; } export declare namespace Assets { export { type AssetCreateResponse as AssetCreateResponse, type AssetUpdateResponse as AssetUpdateResponse, type AssetListResponse as AssetListResponse, type AssetGetResponse as AssetGetResponse, AssetListResponsesV4PagePaginationArray as AssetListResponsesV4PagePaginationArray, type AssetCreateParams as AssetCreateParams, type AssetUpdateParams as AssetUpdateParams, type AssetListParams as AssetListParams, type AssetDeleteParams as AssetDeleteParams, type AssetGetParams as AssetGetParams, }; } //# sourceMappingURL=assets.d.ts.map