dymo-api 1.2.7 → 1.2.8

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.
@@ -43,8 +43,14 @@ const isValidEmail = async (axiosClient, email, rules) => {
43
43
  ]
44
44
  }, { headers: { "Content-Type": "application/json" } })).data.email;
45
45
  let reasons = [];
46
- if (rules.deny.includes("INVALID") && !responseEmail.valid)
47
- reasons.push("INVALID");
46
+ if (rules.deny.includes("INVALID") && !responseEmail.valid) {
47
+ return {
48
+ email: responseEmail.email,
49
+ allow: false,
50
+ reasons: ["INVALID"],
51
+ response: responseEmail
52
+ };
53
+ }
48
54
  if (rules.deny.includes("FRAUD") && responseEmail.fraud)
49
55
  reasons.push("FRAUD");
50
56
  if (rules.deny.includes("PROXIED_EMAIL") && responseEmail.proxiedEmail)
@@ -40,8 +40,14 @@ export const isValidEmail = async (axiosClient, email, rules) => {
40
40
  ]
41
41
  }, { headers: { "Content-Type": "application/json" } })).data.email;
42
42
  let reasons = [];
43
- if (rules.deny.includes("INVALID") && !responseEmail.valid)
44
- reasons.push("INVALID");
43
+ if (rules.deny.includes("INVALID") && !responseEmail.valid) {
44
+ return {
45
+ email: responseEmail.email,
46
+ allow: false,
47
+ reasons: ["INVALID"],
48
+ response: responseEmail
49
+ };
50
+ }
45
51
  if (rules.deny.includes("FRAUD") && responseEmail.fraud)
46
52
  reasons.push("FRAUD");
47
53
  if (rules.deny.includes("PROXIED_EMAIL") && responseEmail.proxiedEmail)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dymo-api",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "Flow system for Dymo API.",
5
5
  "main": "dist/cjs/dymo-api.js",
6
6
  "module": "dist/esm/dymo-api.js",