import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class Download extends APIResource { /** * Retrieve the status and the url of a batch download assets request */ getStatus(jobID: string, query?: DownloadGetStatusParams | null | undefined, options?: RequestOptions): APIPromise; /** * Request a link to download the given `assetId` in the given `targetFormat` */ request(assetID: string, params: DownloadRequestParams, options?: RequestOptions): APIPromise; /** * Request a link to batch download assets (batch limited to 1000 assets) */ requestBatch(params: DownloadRequestBatchParams, options?: RequestOptions): APIPromise; } export interface DownloadGetStatusResponse { /** * The job id associated with the download request */ jobId: string; /** * The current job status */ jobStatus: string; /** * The download url */ downloadUrl?: string; } export interface DownloadRequestResponse { /** * The signed URL to download the asset in the given format */ url: string; } export interface DownloadRequestBatchResponse { /** * The job id associated with the download request */ jobId: string; } export interface DownloadGetStatusParams { /** * The projectId used for ownership resource management. Either to assert ownership * or to set the owner of the resource(s) */ projectId?: string; } export interface DownloadRequestParams { /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; /** * Body param: The format to download the asset in */ targetFormat?: 'gif' | 'heif' | 'jpeg' | 'jpg' | 'png' | 'svg' | 'webp' | 'avif' | 'tif' | 'tiff' | 'glb' | 'fbx' | 'obj'; } export interface DownloadRequestBatchParams { /** * Body param */ options: DownloadRequestBatchParams.Options; /** * Body param */ query: DownloadRequestBatchParams.Query; /** * Query param: The projectId used for ownership resource management. Either to * assert ownership or to set the owner of the resource(s) */ projectId?: string; } export declare namespace DownloadRequestBatchParams { interface Options { /** * A file naming convention as a string with the following available parameters: * (seed used to generate the asset) (index of the asset in the * inference) (prompt of the inference) (prompt of the * generator) Example: "---" */ fileNameTemplate: string; /** * Flag to prevent grouping assets in directories and store them flat */ flat?: boolean; } interface Query { /** * Every individual assets specified will be included in the archive */ assetIds: Array; /** * All assets issued from the provided inference ids will be included in the * archive */ inferenceIds: Array; /** * All assets issued from the provided model ids will be included in the archive */ modelIds: Array; } } export declare namespace Download { export { type DownloadGetStatusResponse as DownloadGetStatusResponse, type DownloadRequestResponse as DownloadRequestResponse, type DownloadRequestBatchResponse as DownloadRequestBatchResponse, type DownloadGetStatusParams as DownloadGetStatusParams, type DownloadRequestParams as DownloadRequestParams, type DownloadRequestBatchParams as DownloadRequestBatchParams, }; } //# sourceMappingURL=download.d.ts.map