export type TryonCategory = 'auto' | 'tops' | 'bottoms' | 'one-pieces'; export type TryonMode = 'performance' | 'balanced' | 'quality'; export type TryonGarmentPhotoType = 'auto' | 'flat-lay' | 'model'; export interface TryonParams { model_image: string; garment_image: string; category?: TryonCategory; mode?: TryonMode; garment_photo_type?: TryonGarmentPhotoType; num_samples?: number; output_format?: 'png' | 'jpeg'; seed?: number; } export interface FashnRunResponse { id: string; status: string; } export interface FashnStatusResponse { id: string; status: 'starting' | 'processing' | 'completed' | 'failed'; output?: string[]; error?: { name: string; message: string; }; } export interface PollOptions { interval?: number; timeout?: number; onProgress?: (status: string) => void; } export declare class FashnClient { private client; constructor(apiKey: string); /** * 提交虚拟试穿任务 */ run(params: TryonParams): Promise; /** * 获取任务状态 */ getStatus(id: string): Promise; /** * 轮询等待结果 */ poll(id: string, options?: PollOptions): Promise; /** * 将本地图像转换为 base64 data URL */ imageToBase64(filePath: string): Promise; /** * 下载图像到本地 */ downloadImage(url: string, outputDir: string, filename?: string): Promise; private sleep; } //# sourceMappingURL=fashn-api.d.ts.map