-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.d.ts
More file actions
104 lines (98 loc) · 2.6 KB
/
index.d.ts
File metadata and controls
104 lines (98 loc) · 2.6 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
export interface ConfigurationOptions {
rootApiKey?: string;
apiKey?: string;
local?: boolean;
serverEmailConfig?: {
host: string;
port: number;
secure: boolean;
auth: {
user: string;
pass: string;
};
};
rules?: {
email: {
mode: Mode;
deny: string[];
};
ip: {
mode: Mode;
deny: string[];
};
phone: {
mode: Mode;
deny: string[];
};
sensitiveInfo: {
mode: Mode;
deny: string[];
};
waf: {
mode: Mode;
allowBots: string[];
deny: string[];
};
};
}
type Mode = "LIVE" | "DRY_RUN";
//@ts-ignore
declare module "dymo-api" {
class DymoAPI {
private rootApiKey: string | null;
private apiKey: string | null;
private tokensResponse: { root: boolean; api: boolean; } | null;
private lastFetchTime: Date | null;
private serverEmailConfig?: {
host: string;
port: number;
secure: boolean;
auth: {
user: string;
pass: string;
};
};
private rules?: {
email: {
mode: Mode;
deny: string[];
};
ip: {
mode: Mode;
deny: string[];
};
phone: {
mode: Mode;
deny: string[];
};
sensitiveInfo: {
mode: Mode;
deny: string[];
};
waf: {
mode: Mode;
allowBots: string[];
deny: string[];
};
};
private local: boolean;
constructor(configuration?: ConfigurationOptions);
initializeTokens(): Promise<void>;
// Data Validation.
isValidData(data: any): Promise<any>;
isValidDataRaw(data: any): Promise<any>;
isValidEmail(data: any): Promise<any>;
isValidIP(data: any): Promise<any>;
isValidPhone(data: any): Promise<any>;
// Data Protection.
protectReq(data: any): Promise<any>;
getRandom(data: any): Promise<any>;
extractWithTextly(data: any): Promise<any>;
getPrayerTimes(data: any): Promise<any>;
inputSatinizer(data: any): Promise<any>;
isValidPwd(data: any): Promise<any>;
newURLEncrypt(data: any): Promise<any>;
sendEmail(data: any): Promise<any>;
}
export default DymoAPI;
}