@absolutejs/engagement-apollo 0.0.2 → 0.0.3

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -38,11 +38,13 @@ var apolloSource = (options) => {
38
38
  };
39
39
  const normalizePerson = (person) => {
40
40
  const org = isRecord(person.organization) ? person.organization : null;
41
- const email = str(person.email);
41
+ const contact = isRecord(person.contact) ? person.contact : null;
42
+ const personalEmails = Array.isArray(person.personal_emails) ? person.personal_emails.map(str) : [];
43
+ const emails = Array.from(new Set([str(person.email), contact ? str(contact.email) : null, ...personalEmails].filter((value) => value !== null).filter((value) => !LOCKED_EMAIL.test(value))));
42
44
  return {
43
45
  company: org ? str(org.name) : null,
44
46
  companyDomain: org ? str(org.primary_domain) : null,
45
- email: email && !LOCKED_EMAIL.test(email) ? email : null,
47
+ emails,
46
48
  firstName: str(person.first_name),
47
49
  lastName: str(person.last_name),
48
50
  linkedinUrl: str(person.linkedin_url),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Alex Kahn",
3
3
  "description": "Apollo.io EngagementSource adapter for @absolutejs/engagement — person/company enrichment and outreach activity (emails sent/opened/replied) from the Apollo API.",
4
4
  "devDependencies": {
5
- "@absolutejs/engagement": "^0.0.2",
5
+ "@absolutejs/engagement": "^0.0.3",
6
6
  "@types/bun": "latest",
7
7
  "typescript": "5.8.3"
8
8
  },
@@ -39,5 +39,5 @@
39
39
  },
40
40
  "type": "module",
41
41
  "types": "./dist/index.d.ts",
42
- "version": "0.0.2"
42
+ "version": "0.0.3"
43
43
  }