zuotang.d.ts
2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
export type FileProps={
fileData: Blob | null;
setFileData: React.Dispatch<React.SetStateAction<Blob | null>>;
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
}
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;
};
}