export type PanelProps = { previewUrl: string | null; setPreviewUrl: React.Dispatch<React.SetStateAction<string | null>>; isLoading: boolean; setIsLoading: React.Dispatch<React.SetStateAction<boolean>>; }; export type LocalData = { date: string; maxDailyUses: string; pptMaxUses: string; }; export type CreateTaskResponse = { status: number; message: string; data: { task_id: string; }; maxDailyUses?: number; }; export type GetTaskResponse = { status: number; message: string; data: { err_info: string; //错误信息 image: string; //抠图完成后的图片URL image_height: number; //抠图完成后的图片高 image_width: number; //抠图完成后的图片宽 output_type: number; //返回图片 1为返回图片和蒙版 2为图片 3为蒙版 result_type: string; //图片前景类型 return_type: number; //返回图片的类型 1为图片URL 2为base64 type: string; //图片前景类型 task_id: string; //任务队列ID state: number; //任务状态码。1 为成功,大于 1 为处理中,小于 0 为失败。 state_detail: string; //结果为Completed表示转换完成 }; }; export type GetGenerateTaskResponse = { status: number; message: string; data: { /**错误信息 */ err_info: string; /**抠图完成后的图片URL */ image_1: string; /**抠图完成后的图片高 */ image_height: number; /**抠图完成后的图片宽 */ image_width: number; /**返回图片 1为返回图片和蒙版 2为图片 3为蒙版 */ output_type: number; /**图片前景类型 */ result_type: string; /**返回图片的类型 1为图片URL 2为base64 */ return_type: number; /**图片前景类型 */ type: string; /**任务队列ID */ task_id: string; state: number; //任务状态码。1 为成功,大于 1 为处理中,小于 0 为失败。 /**结果为Completed表示转换完成 */ state_detail: string; }; };