-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtypings.d.ts
74 lines (69 loc) · 1.29 KB
/
typings.d.ts
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
69
70
71
72
73
74
declare enum Types {
Aliyun = 'aliyun',
Qiniu = 'qiniu',
Tencent = 'tencent',
Debug = 'debug',
}
declare interface Config {
rules: Rule[];
environment:
| Environment.Aliyun
| Environment.Qiniu
| Environment.Tencent
| Environment.Debug;
environments?: {
[k: string]:
| Environment.Aliyun
| Environment.Qiniu
| Environment.Tencent
| Environment.Debug;
};
}
declare interface File {
from: string;
to: string;
isLastUpload: boolean;
isNoCache: boolean;
}
declare interface Rule {
from: string;
to: string;
ignore: string[];
noCache: string[];
lastUpload: string[];
files: File[];
}
declare namespace Environment {
type Aliyun = {
type: Types.Aliyun;
region: string;
bucket: string;
accessKeyId: string;
accessKeySecret: string;
domain: string;
};
type Qiniu = {
type: Types.Qiniu;
region: string;
bucket: string;
accessKey: string;
secretKey: string;
domain: string;
};
type Tencent = {
type: Types.Tencent;
region: string;
bucket: string;
appId: string;
secretId: string;
secretKey: string;
domain: string;
};
type Debug = {
type: Types.Debug;
domain: string;
};
}
declare interface Upload {
upload(files: File[]): Promise<void>;
}