dymo-api 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/dymo-api.cjs
CHANGED
|
@@ -57,22 +57,15 @@ class DymoAPI {
|
|
|
57
57
|
* apiKey: "4c8b7675-6b69-4f8d-9f43-5a6f7f02c6c5"
|
|
58
58
|
* });
|
|
59
59
|
*/
|
|
60
|
-
constructor({ rootApiKey = null, apiKey = null, baseUrl = "https://api.tpeoficial.com", serverEmailConfig = undefined, rules = {
|
|
61
|
-
|
|
62
|
-
deny: [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
sensitiveInfo: {
|
|
67
|
-
deny: [
|
|
68
|
-
"EMAIL", "PHONE", "CREDIT_CARD"
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
} } = {}) {
|
|
60
|
+
constructor({ rootApiKey = null, apiKey = null, baseUrl = "https://api.tpeoficial.com", serverEmailConfig = undefined, rules = {} } = {}) {
|
|
61
|
+
this.rules = {
|
|
62
|
+
email: { deny: ["FRAUD", "INVALID", "NO_MX_RECORDS", "NO_REPLY_EMAIL"] },
|
|
63
|
+
sensitiveInfo: { deny: ["EMAIL", "PHONE", "CREDIT_CARD"] },
|
|
64
|
+
...rules
|
|
65
|
+
};
|
|
72
66
|
this.rootApiKey = rootApiKey;
|
|
73
67
|
this.apiKey = apiKey;
|
|
74
68
|
this.serverEmailConfig = serverEmailConfig;
|
|
75
|
-
this.rules = rules;
|
|
76
69
|
this.baseUrl = baseUrl;
|
|
77
70
|
(0, config_1.setBaseUrl)(baseUrl);
|
|
78
71
|
}
|
package/dist/esm/dymo-api.js
CHANGED
|
@@ -22,22 +22,15 @@ class DymoAPI {
|
|
|
22
22
|
* apiKey: "4c8b7675-6b69-4f8d-9f43-5a6f7f02c6c5"
|
|
23
23
|
* });
|
|
24
24
|
*/
|
|
25
|
-
constructor({ rootApiKey = null, apiKey = null, baseUrl = "https://api.tpeoficial.com", serverEmailConfig = undefined, rules = {
|
|
26
|
-
|
|
27
|
-
deny: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
sensitiveInfo: {
|
|
32
|
-
deny: [
|
|
33
|
-
"EMAIL", "PHONE", "CREDIT_CARD"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
} } = {}) {
|
|
25
|
+
constructor({ rootApiKey = null, apiKey = null, baseUrl = "https://api.tpeoficial.com", serverEmailConfig = undefined, rules = {} } = {}) {
|
|
26
|
+
this.rules = {
|
|
27
|
+
email: { deny: ["FRAUD", "INVALID", "NO_MX_RECORDS", "NO_REPLY_EMAIL"] },
|
|
28
|
+
sensitiveInfo: { deny: ["EMAIL", "PHONE", "CREDIT_CARD"] },
|
|
29
|
+
...rules
|
|
30
|
+
};
|
|
37
31
|
this.rootApiKey = rootApiKey;
|
|
38
32
|
this.apiKey = apiKey;
|
|
39
33
|
this.serverEmailConfig = serverEmailConfig;
|
|
40
|
-
this.rules = rules;
|
|
41
34
|
this.baseUrl = baseUrl;
|
|
42
35
|
setBaseUrl(baseUrl);
|
|
43
36
|
}
|
|
@@ -23,13 +23,7 @@ export type EmailValidator = Email;
|
|
|
23
23
|
* ⚠️ NO_MX_RECORDS, PROXIED_EMAIL, FREE_SUBDOMAIN, CORPORATE, and HIGH_RISK_SCORE are premium features.
|
|
24
24
|
*/
|
|
25
25
|
export type NegativeEmailRules = "FRAUD" | "INVALID" | "NO_MX_RECORDS" | "PROXIED_EMAIL" | "FREE_SUBDOMAIN" | "PERSONAL_EMAIL" | "CORPORATE_EMAIL" | "NO_REPLY_EMAIL" | "ROLE_ACCOUNT" | "NO_REACHABLE" | "HIGH_RISK_SCORE";
|
|
26
|
-
export interface EmailValidatorRules {
|
|
27
|
-
deny: NegativeEmailRules[];
|
|
28
|
-
}
|
|
29
26
|
export type NegativeSensitiveInfoRules = "EMAIL" | "PHONE" | "CREDIT_CARD" | "URL" | "DOMAIN" | "IP" | "WALLET" | "USER_AGENT";
|
|
30
|
-
export interface SensitiveInfoRules {
|
|
31
|
-
deny: NegativeSensitiveInfoRules[];
|
|
32
|
-
}
|
|
33
27
|
export type EmailValidatorResponse = {
|
|
34
28
|
email: string;
|
|
35
29
|
allow: boolean;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { NegativeEmailRules, NegativeSensitiveInfoRules } from "./data-verifier";
|
|
2
|
+
export interface EmailValidatorRules {
|
|
3
|
+
deny: NegativeEmailRules[];
|
|
4
|
+
}
|
|
5
|
+
export interface SensitiveInfoRules {
|
|
6
|
+
deny: NegativeSensitiveInfoRules[];
|
|
7
|
+
}
|
|
2
8
|
export interface Rules {
|
|
3
|
-
email
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
sensitiveInfo: {
|
|
7
|
-
deny: NegativeSensitiveInfoRules[];
|
|
8
|
-
};
|
|
9
|
+
email?: EmailValidatorRules;
|
|
10
|
+
sensitiveInfo?: SensitiveInfoRules;
|
|
9
11
|
}
|