@twentyhq/people-data-labs 1.0.0

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 (341) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/.nvmrc +1 -0
  3. package/.oxlintrc.json +58 -0
  4. package/.yarnrc.yml +1 -0
  5. package/README.md +16 -0
  6. package/package.json +37 -0
  7. package/public/gallery/cover.png +0 -0
  8. package/public/people-data-labs-icon.png +0 -0
  9. package/src/__tests__/global-setup.ts +87 -0
  10. package/src/__tests__/people-data-labs.integration-test.ts +25 -0
  11. package/src/application-config.ts +18 -0
  12. package/src/command-menu-items/enrich-companies.ts +14 -0
  13. package/src/command-menu-items/enrich-people.ts +14 -0
  14. package/src/constants/__tests__/select-option-constants.spec.ts +142 -0
  15. package/src/constants/billing-margin-multiplier.ts +1 -0
  16. package/src/constants/company-match-cost-dollars.ts +1 -0
  17. package/src/constants/company-type-options.ts +46 -0
  18. package/src/constants/enrichment-status-options.ts +19 -0
  19. package/src/constants/enrichment-workflow-seeds.ts +27 -0
  20. package/src/constants/funding-stage-options.ts +195 -0
  21. package/src/constants/industry-options.ts +1033 -0
  22. package/src/constants/inferred-salary-options.ts +81 -0
  23. package/src/constants/job-role-options.ts +172 -0
  24. package/src/constants/job-title-class-options.ts +39 -0
  25. package/src/constants/job-title-sub-role-options.ts +746 -0
  26. package/src/constants/location-continent-options.ts +53 -0
  27. package/src/constants/metro-options.ts +2692 -0
  28. package/src/constants/mic-exchange-options.ts +494 -0
  29. package/src/constants/micro-credits-per-dollar.ts +1 -0
  30. package/src/constants/pdl-base-url.ts +1 -0
  31. package/src/constants/person-match-cost-dollars.ts +1 -0
  32. package/src/constants/seniority-options.ts +74 -0
  33. package/src/constants/sex-options.ts +18 -0
  34. package/src/constants/size-options.ts +60 -0
  35. package/src/constants/universal-identifiers.ts +1516 -0
  36. package/src/constants/update-fields-option-values.ts +5 -0
  37. package/src/constants/update-fields-options.ts +7 -0
  38. package/src/fields/company/pdl-affiliated-profiles.field.ts +20 -0
  39. package/src/fields/company/pdl-alternative-domains.field.ts +20 -0
  40. package/src/fields/company/pdl-alternative-names.field.ts +20 -0
  41. package/src/fields/company/pdl-company-type.field.ts +28 -0
  42. package/src/fields/company/pdl-employee-count-by-country.field.ts +21 -0
  43. package/src/fields/company/pdl-employee-count.field.ts +19 -0
  44. package/src/fields/company/pdl-enrichment-status.field.ts +29 -0
  45. package/src/fields/company/pdl-facebook-url.field.ts +19 -0
  46. package/src/fields/company/pdl-founded-year.field.ts +19 -0
  47. package/src/fields/company/pdl-funding-stages.field.ts +28 -0
  48. package/src/fields/company/pdl-headline.field.ts +19 -0
  49. package/src/fields/company/pdl-id.field.ts +19 -0
  50. package/src/fields/company/pdl-industry-detail.field.ts +20 -0
  51. package/src/fields/company/pdl-industry.field.ts +28 -0
  52. package/src/fields/company/pdl-last-enriched-at.field.ts +20 -0
  53. package/src/fields/company/pdl-last-funding-date.field.ts +20 -0
  54. package/src/fields/company/pdl-latest-funding-stage.field.ts +29 -0
  55. package/src/fields/company/pdl-legal-name.field.ts +19 -0
  56. package/src/fields/company/pdl-linkedin-id.field.ts +19 -0
  57. package/src/fields/company/pdl-location-continent.field.ts +29 -0
  58. package/src/fields/company/pdl-location-metro.field.ts +28 -0
  59. package/src/fields/company/pdl-mic-exchange.field.ts +28 -0
  60. package/src/fields/company/pdl-naics.field.ts +19 -0
  61. package/src/fields/company/pdl-number-funding-rounds.field.ts +20 -0
  62. package/src/fields/company/pdl-raw-payload.field.ts +19 -0
  63. package/src/fields/company/pdl-sic.field.ts +19 -0
  64. package/src/fields/company/pdl-size-range.field.ts +28 -0
  65. package/src/fields/company/pdl-summary.field.ts +19 -0
  66. package/src/fields/company/pdl-tags.field.ts +19 -0
  67. package/src/fields/company/pdl-ticker.field.ts +19 -0
  68. package/src/fields/company/pdl-total-funding.field.ts +19 -0
  69. package/src/fields/company/pdl-twitter-url.field.ts +19 -0
  70. package/src/fields/person/pdl-birth-date.field.ts +19 -0
  71. package/src/fields/person/pdl-birth-year.field.ts +19 -0
  72. package/src/fields/person/pdl-certifications.field.ts +19 -0
  73. package/src/fields/person/pdl-education.field.ts +19 -0
  74. package/src/fields/person/pdl-enrichment-status.field.ts +29 -0
  75. package/src/fields/person/pdl-experience.field.ts +19 -0
  76. package/src/fields/person/pdl-facebook-url.field.ts +19 -0
  77. package/src/fields/person/pdl-github-url.field.ts +19 -0
  78. package/src/fields/person/pdl-headline.field.ts +19 -0
  79. package/src/fields/person/pdl-id.field.ts +19 -0
  80. package/src/fields/person/pdl-industry.field.ts +28 -0
  81. package/src/fields/person/pdl-inferred-salary.field.ts +28 -0
  82. package/src/fields/person/pdl-interests.field.ts +19 -0
  83. package/src/fields/person/pdl-job-onet-code.field.ts +19 -0
  84. package/src/fields/person/pdl-job-role.field.ts +28 -0
  85. package/src/fields/person/pdl-job-start-date.field.ts +19 -0
  86. package/src/fields/person/pdl-job-summary.field.ts +19 -0
  87. package/src/fields/person/pdl-job-title-class.field.ts +28 -0
  88. package/src/fields/person/pdl-job-title-sub-role.field.ts +29 -0
  89. package/src/fields/person/pdl-languages.field.ts +19 -0
  90. package/src/fields/person/pdl-last-enriched-at.field.ts +19 -0
  91. package/src/fields/person/pdl-likelihood.field.ts +19 -0
  92. package/src/fields/person/pdl-linkedin-connections.field.ts +20 -0
  93. package/src/fields/person/pdl-linkedin-username.field.ts +20 -0
  94. package/src/fields/person/pdl-location-metro.field.ts +28 -0
  95. package/src/fields/person/pdl-location.field.ts +19 -0
  96. package/src/fields/person/pdl-name-aliases.field.ts +19 -0
  97. package/src/fields/person/pdl-profiles.field.ts +19 -0
  98. package/src/fields/person/pdl-raw-payload.field.ts +19 -0
  99. package/src/fields/person/pdl-seniority.field.ts +28 -0
  100. package/src/fields/person/pdl-sex.field.ts +28 -0
  101. package/src/fields/person/pdl-skills.field.ts +19 -0
  102. package/src/fields/person/pdl-summary.field.ts +19 -0
  103. package/src/fields/person/pdl-twitter-url.field.ts +19 -0
  104. package/src/fields/person/pdl-years-experience.field.ts +21 -0
  105. package/src/front-components/enrich-companies-component-effect.tsx +21 -0
  106. package/src/front-components/enrich-people-component-effect.tsx +21 -0
  107. package/src/front-components/utils/call-enrich-logic-function.utils.ts +21 -0
  108. package/src/logic-functions/__mocks__/company-node.mock.ts +11 -0
  109. package/src/logic-functions/__mocks__/create-core-api-client-mock.ts +35 -0
  110. package/src/logic-functions/__mocks__/pdl-company-data.mock.ts +27 -0
  111. package/src/logic-functions/__mocks__/pdl-person-data.mock.ts +23 -0
  112. package/src/logic-functions/__mocks__/person-node.mock.ts +12 -0
  113. package/src/logic-functions/enrich-companies.function.ts +76 -0
  114. package/src/logic-functions/enrich-company.function.ts +73 -0
  115. package/src/logic-functions/enrich-people.function.ts +76 -0
  116. package/src/logic-functions/enrich-person.function.ts +73 -0
  117. package/src/logic-functions/errors/__tests__/pdl-config-error.spec.ts +16 -0
  118. package/src/logic-functions/errors/__tests__/pdl-invalid-input-error.spec.ts +16 -0
  119. package/src/logic-functions/errors/__tests__/pdl-operation-error.spec.ts +16 -0
  120. package/src/logic-functions/errors/__tests__/pdl-record-not-found-error.spec.ts +21 -0
  121. package/src/logic-functions/errors/pdl-config-error.ts +8 -0
  122. package/src/logic-functions/errors/pdl-error-code.ts +8 -0
  123. package/src/logic-functions/errors/pdl-error.ts +12 -0
  124. package/src/logic-functions/errors/pdl-invalid-input-error.ts +8 -0
  125. package/src/logic-functions/errors/pdl-operation-error.ts +8 -0
  126. package/src/logic-functions/errors/pdl-record-not-found-error.ts +22 -0
  127. package/src/logic-functions/handlers/__tests__/enrich-companies.spec.ts +159 -0
  128. package/src/logic-functions/handlers/__tests__/enrich-company.spec.ts +147 -0
  129. package/src/logic-functions/handlers/__tests__/enrich-people.spec.ts +313 -0
  130. package/src/logic-functions/handlers/__tests__/enrich-person.spec.ts +198 -0
  131. package/src/logic-functions/handlers/__tests__/post-install.spec.ts +153 -0
  132. package/src/logic-functions/handlers/company-enrichment-adapter.ts +42 -0
  133. package/src/logic-functions/handlers/company-single-enrichment-adapter.ts +15 -0
  134. package/src/logic-functions/handlers/enrich-companies.ts +15 -0
  135. package/src/logic-functions/handlers/enrich-company.ts +19 -0
  136. package/src/logic-functions/handlers/enrich-people.ts +15 -0
  137. package/src/logic-functions/handlers/enrich-person.ts +19 -0
  138. package/src/logic-functions/handlers/person-enrichment-adapter.ts +29 -0
  139. package/src/logic-functions/handlers/person-single-enrichment-adapter.ts +15 -0
  140. package/src/logic-functions/handlers/post-install.ts +69 -0
  141. package/src/logic-functions/post-install.function.ts +17 -0
  142. package/src/logic-functions/utils/__tests__/aggregate-bulk-enrich-result.spec.ts +52 -0
  143. package/src/logic-functions/utils/__tests__/build-address.spec.ts +30 -0
  144. package/src/logic-functions/utils/__tests__/build-allowed-values.spec.ts +16 -0
  145. package/src/logic-functions/utils/__tests__/build-bulk-records-trigger.spec.ts +26 -0
  146. package/src/logic-functions/utils/__tests__/build-company-create-data.spec.ts +37 -0
  147. package/src/logic-functions/utils/__tests__/build-company-match-keys.spec.ts +35 -0
  148. package/src/logic-functions/utils/__tests__/build-company-matched-data.spec.ts +56 -0
  149. package/src/logic-functions/utils/__tests__/build-currency-from-usd.spec.ts +17 -0
  150. package/src/logic-functions/utils/__tests__/build-emails.spec.ts +23 -0
  151. package/src/logic-functions/utils/__tests__/build-error-result.spec.ts +16 -0
  152. package/src/logic-functions/utils/__tests__/build-full-name.spec.ts +64 -0
  153. package/src/logic-functions/utils/__tests__/build-links.spec.ts +25 -0
  154. package/src/logic-functions/utils/__tests__/build-logic-function-step.spec.ts +33 -0
  155. package/src/logic-functions/utils/__tests__/build-matched-result.spec.ts +33 -0
  156. package/src/logic-functions/utils/__tests__/build-not-found-result.spec.ts +15 -0
  157. package/src/logic-functions/utils/__tests__/build-person-matched-data.spec.ts +117 -0
  158. package/src/logic-functions/utils/__tests__/build-person-name-param.spec.ts +17 -0
  159. package/src/logic-functions/utils/__tests__/build-phones.spec.ts +32 -0
  160. package/src/logic-functions/utils/__tests__/build-skipped-result.spec.ts +17 -0
  161. package/src/logic-functions/utils/__tests__/capitalize-name.spec.ts +26 -0
  162. package/src/logic-functions/utils/__tests__/capitalize-name.test.ts +17 -0
  163. package/src/logic-functions/utils/__tests__/charge-matched-enrichments.spec.ts +56 -0
  164. package/src/logic-functions/utils/__tests__/chunk.spec.ts +25 -0
  165. package/src/logic-functions/utils/__tests__/enrich-companies.spec.ts +26 -0
  166. package/src/logic-functions/utils/__tests__/enrich-company.spec.ts +54 -0
  167. package/src/logic-functions/utils/__tests__/enrich-people.spec.ts +32 -0
  168. package/src/logic-functions/utils/__tests__/enrich-person.spec.ts +62 -0
  169. package/src/logic-functions/utils/__tests__/extract-company-match-params.spec.ts +86 -0
  170. package/src/logic-functions/utils/__tests__/extract-pdl-error-message.spec.ts +17 -0
  171. package/src/logic-functions/utils/__tests__/extract-person-match-params.spec.ts +75 -0
  172. package/src/logic-functions/utils/__tests__/extract-record-ids.spec.ts +32 -0
  173. package/src/logic-functions/utils/__tests__/find-company-id-by-filter.spec.ts +42 -0
  174. package/src/logic-functions/utils/__tests__/find-company-id.spec.ts +118 -0
  175. package/src/logic-functions/utils/__tests__/find-existing-workflow-id.spec.ts +26 -0
  176. package/src/logic-functions/utils/__tests__/find-or-create-current-company.spec.ts +203 -0
  177. package/src/logic-functions/utils/__tests__/get-pdl-api-key.spec.ts +38 -0
  178. package/src/logic-functions/utils/__tests__/is-empty-address.spec.ts +20 -0
  179. package/src/logic-functions/utils/__tests__/is-empty-emails.spec.ts +14 -0
  180. package/src/logic-functions/utils/__tests__/is-empty-full-name.spec.ts +14 -0
  181. package/src/logic-functions/utils/__tests__/is-empty-links.spec.ts +14 -0
  182. package/src/logic-functions/utils/__tests__/is-empty-phones.spec.ts +14 -0
  183. package/src/logic-functions/utils/__tests__/is-empty-text.spec.ts +15 -0
  184. package/src/logic-functions/utils/__tests__/map-company.spec.ts +48 -0
  185. package/src/logic-functions/utils/__tests__/map-person.spec.ts +81 -0
  186. package/src/logic-functions/utils/__tests__/normalize-domain.spec.ts +19 -0
  187. package/src/logic-functions/utils/__tests__/normalize-linkedin-url.spec.ts +22 -0
  188. package/src/logic-functions/utils/__tests__/now-iso.spec.ts +9 -0
  189. package/src/logic-functions/utils/__tests__/parse-geo.spec.ts +21 -0
  190. package/src/logic-functions/utils/__tests__/parse-partial-date.spec.ts +29 -0
  191. package/src/logic-functions/utils/__tests__/parse-pdl-item.spec.ts +88 -0
  192. package/src/logic-functions/utils/__tests__/pick-multi-select.spec.ts +28 -0
  193. package/src/logic-functions/utils/__tests__/pick-select.spec.ts +38 -0
  194. package/src/logic-functions/utils/__tests__/pick-writable-standard.spec.ts +37 -0
  195. package/src/logic-functions/utils/__tests__/post-pdl-enrich.spec.ts +192 -0
  196. package/src/logic-functions/utils/__tests__/post-pdl-single-enrich.spec.ts +172 -0
  197. package/src/logic-functions/utils/__tests__/read-companies.spec.ts +39 -0
  198. package/src/logic-functions/utils/__tests__/read-people.spec.ts +40 -0
  199. package/src/logic-functions/utils/__tests__/resolve-logic-function-id.spec.ts +25 -0
  200. package/src/logic-functions/utils/__tests__/resolve-update-fields-mode.spec.ts +34 -0
  201. package/src/logic-functions/utils/__tests__/run-batch-enrichment.spec.ts +524 -0
  202. package/src/logic-functions/utils/__tests__/salary-transform.spec.ts +15 -0
  203. package/src/logic-functions/utils/__tests__/seed-enrichment-workflow.spec.ts +136 -0
  204. package/src/logic-functions/utils/__tests__/size-transform.spec.ts +18 -0
  205. package/src/logic-functions/utils/__tests__/to-json-array.spec.ts +16 -0
  206. package/src/logic-functions/utils/__tests__/to-json-object.spec.ts +18 -0
  207. package/src/logic-functions/utils/__tests__/to-number.spec.ts +17 -0
  208. package/src/logic-functions/utils/__tests__/to-string-array.spec.ts +17 -0
  209. package/src/logic-functions/utils/__tests__/to-text.spec.ts +20 -0
  210. package/src/logic-functions/utils/__tests__/update-companies-status.spec.ts +32 -0
  211. package/src/logic-functions/utils/__tests__/update-company-record.spec.ts +25 -0
  212. package/src/logic-functions/utils/__tests__/update-people-status.spec.ts +32 -0
  213. package/src/logic-functions/utils/__tests__/update-person-record.spec.ts +25 -0
  214. package/src/logic-functions/utils/aggregate-bulk-enrich-result.ts +21 -0
  215. package/src/logic-functions/utils/build-address.ts +40 -0
  216. package/src/logic-functions/utils/build-allowed-values.ts +5 -0
  217. package/src/logic-functions/utils/build-bulk-records-trigger.ts +25 -0
  218. package/src/logic-functions/utils/build-company-create-data.ts +35 -0
  219. package/src/logic-functions/utils/build-company-match-keys.ts +16 -0
  220. package/src/logic-functions/utils/build-company-matched-data.ts +56 -0
  221. package/src/logic-functions/utils/build-currency-from-usd.ts +16 -0
  222. package/src/logic-functions/utils/build-emails.ts +34 -0
  223. package/src/logic-functions/utils/build-error-result.ts +18 -0
  224. package/src/logic-functions/utils/build-full-name.ts +38 -0
  225. package/src/logic-functions/utils/build-links.ts +23 -0
  226. package/src/logic-functions/utils/build-logic-function-step.ts +30 -0
  227. package/src/logic-functions/utils/build-matched-result.ts +21 -0
  228. package/src/logic-functions/utils/build-not-found-result.ts +9 -0
  229. package/src/logic-functions/utils/build-person-matched-data.ts +78 -0
  230. package/src/logic-functions/utils/build-person-name-param.ts +19 -0
  231. package/src/logic-functions/utils/build-phones.ts +40 -0
  232. package/src/logic-functions/utils/build-skipped-result.ts +15 -0
  233. package/src/logic-functions/utils/capitalize-name.ts +8 -0
  234. package/src/logic-functions/utils/charge-matched-enrichments.ts +29 -0
  235. package/src/logic-functions/utils/chunk.ts +18 -0
  236. package/src/logic-functions/utils/enrich-chunk.ts +361 -0
  237. package/src/logic-functions/utils/enrich-companies.ts +21 -0
  238. package/src/logic-functions/utils/enrich-company.ts +23 -0
  239. package/src/logic-functions/utils/enrich-people.ts +22 -0
  240. package/src/logic-functions/utils/enrich-person.ts +24 -0
  241. package/src/logic-functions/utils/extract-company-match-params.ts +52 -0
  242. package/src/logic-functions/utils/extract-pdl-error-message.ts +47 -0
  243. package/src/logic-functions/utils/extract-person-match-params.ts +59 -0
  244. package/src/logic-functions/utils/extract-record-ids.ts +18 -0
  245. package/src/logic-functions/utils/find-company-id-by-filter.ts +28 -0
  246. package/src/logic-functions/utils/find-company-id.ts +59 -0
  247. package/src/logic-functions/utils/find-existing-workflow-id.ts +18 -0
  248. package/src/logic-functions/utils/find-or-create-current-company.ts +108 -0
  249. package/src/logic-functions/utils/get-pdl-api-key.ts +15 -0
  250. package/src/logic-functions/utils/internal-field-names.ts +6 -0
  251. package/src/logic-functions/utils/is-empty-address.ts +20 -0
  252. package/src/logic-functions/utils/is-empty-emails.ts +13 -0
  253. package/src/logic-functions/utils/is-empty-full-name.ts +13 -0
  254. package/src/logic-functions/utils/is-empty-links.ts +13 -0
  255. package/src/logic-functions/utils/is-empty-phones.ts +13 -0
  256. package/src/logic-functions/utils/is-empty-text.ts +4 -0
  257. package/src/logic-functions/utils/map-company.ts +115 -0
  258. package/src/logic-functions/utils/map-person.ts +136 -0
  259. package/src/logic-functions/utils/normalize-domain.ts +22 -0
  260. package/src/logic-functions/utils/normalize-linkedin-url.ts +23 -0
  261. package/src/logic-functions/utils/now-iso.ts +1 -0
  262. package/src/logic-functions/utils/parse-geo.ts +33 -0
  263. package/src/logic-functions/utils/parse-partial-date.ts +33 -0
  264. package/src/logic-functions/utils/parse-pdl-item.ts +82 -0
  265. package/src/logic-functions/utils/pick-multi-select.ts +32 -0
  266. package/src/logic-functions/utils/pick-select.ts +30 -0
  267. package/src/logic-functions/utils/pick-writable-standard.ts +27 -0
  268. package/src/logic-functions/utils/post-pdl-enrich.ts +89 -0
  269. package/src/logic-functions/utils/post-pdl-single-enrich.ts +59 -0
  270. package/src/logic-functions/utils/read-companies.ts +53 -0
  271. package/src/logic-functions/utils/read-people.ts +48 -0
  272. package/src/logic-functions/utils/resolve-logic-function-id.ts +11 -0
  273. package/src/logic-functions/utils/resolve-min-likelihood.ts +12 -0
  274. package/src/logic-functions/utils/resolve-update-fields-mode.ts +16 -0
  275. package/src/logic-functions/utils/run-batch-enrichment.ts +50 -0
  276. package/src/logic-functions/utils/run-single-enrichment.ts +44 -0
  277. package/src/logic-functions/utils/salary-transform.ts +18 -0
  278. package/src/logic-functions/utils/seed-enrichment-workflow.ts +131 -0
  279. package/src/logic-functions/utils/size-transform.ts +15 -0
  280. package/src/logic-functions/utils/to-bulk-enrich-input.ts +14 -0
  281. package/src/logic-functions/utils/to-json-array.ts +4 -0
  282. package/src/logic-functions/utils/to-json-object.ts +22 -0
  283. package/src/logic-functions/utils/to-number.ts +4 -0
  284. package/src/logic-functions/utils/to-string-array.ts +28 -0
  285. package/src/logic-functions/utils/to-text.ts +11 -0
  286. package/src/logic-functions/utils/update-companies-status.ts +18 -0
  287. package/src/logic-functions/utils/update-company-record.ts +15 -0
  288. package/src/logic-functions/utils/update-people-status.ts +18 -0
  289. package/src/logic-functions/utils/update-person-record.ts +15 -0
  290. package/src/roles/default-function.role.ts +41 -0
  291. package/src/types/address-parts.ts +9 -0
  292. package/src/types/address-value.ts +10 -0
  293. package/src/types/batch-enrichment-adapter.ts +43 -0
  294. package/src/types/bulk-enrich-input.ts +9 -0
  295. package/src/types/bulk-enrich-result.ts +11 -0
  296. package/src/types/company-id-by-match-key-cache.ts +1 -0
  297. package/src/types/company-match-keys.ts +6 -0
  298. package/src/types/company-node.ts +16 -0
  299. package/src/types/currency-value.ts +4 -0
  300. package/src/types/emails-value.ts +4 -0
  301. package/src/types/enrich-result.ts +11 -0
  302. package/src/types/enrich-status.ts +1 -0
  303. package/src/types/enrichment-workflow-seed.ts +9 -0
  304. package/src/types/full-name-value.ts +4 -0
  305. package/src/types/links-value.ts +5 -0
  306. package/src/types/mapped-record.ts +4 -0
  307. package/src/types/pdl-company-data.ts +50 -0
  308. package/src/types/pdl-company-enrich-params.ts +7 -0
  309. package/src/types/pdl-enrich-result.ts +4 -0
  310. package/src/types/pdl-person-data.ts +65 -0
  311. package/src/types/pdl-person-enrich-params.ts +8 -0
  312. package/src/types/person-node.ts +11 -0
  313. package/src/types/phones-value.ts +12 -0
  314. package/src/types/post-install-result.ts +5 -0
  315. package/src/types/seed-enrichment-workflow-result.ts +7 -0
  316. package/src/types/select-option-meta.ts +9 -0
  317. package/src/types/single-enrich-input.ts +7 -0
  318. package/src/types/tag-color.ts +26 -0
  319. package/src/types/update-fields-option.ts +4 -0
  320. package/src/types/workflow-bulk-records-trigger.ts +15 -0
  321. package/src/types/workflow-logic-function-step.ts +18 -0
  322. package/src/utils/__tests__/build-select-options.spec.ts +20 -0
  323. package/src/utils/__tests__/is-defined.spec.ts +16 -0
  324. package/src/utils/__tests__/is-unique-violation-error.spec.ts +71 -0
  325. package/src/utils/__tests__/normalize-enum-value.spec.ts +28 -0
  326. package/src/utils/__tests__/prune-undefined.spec.ts +22 -0
  327. package/src/utils/__tests__/strip-separators.spec.ts +13 -0
  328. package/src/utils/__tests__/to-error-message.spec.ts +13 -0
  329. package/src/utils/build-select-options.ts +16 -0
  330. package/src/utils/is-defined.ts +5 -0
  331. package/src/utils/is-unique-violation-error.ts +74 -0
  332. package/src/utils/normalize-enum-value.ts +15 -0
  333. package/src/utils/prune-undefined.ts +15 -0
  334. package/src/utils/strip-separators.ts +4 -0
  335. package/src/utils/to-error-message.ts +2 -0
  336. package/src/views/enriched-companies.view.ts +69 -0
  337. package/src/views/enriched-people.view.ts +74 -0
  338. package/tsconfig.json +42 -0
  339. package/tsconfig.spec.json +9 -0
  340. package/vitest.config.ts +31 -0
  341. package/vitest.unit.config.ts +14 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "enabledMcpjsonServers": [
3
+ "postgres",
4
+ "playwright",
5
+ "context7"
6
+ ]
7
+ }
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 24.5.0
package/.oxlintrc.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "extends": ["../../.oxlintrc.base.json"],
4
+ "plugins": ["react", "typescript", "import", "unicorn"],
5
+ "categories": {
6
+ "correctness": "off"
7
+ },
8
+ "ignorePatterns": ["node_modules", "dist"],
9
+ "rules": {
10
+ "func-style": ["error", "declaration", { "allowArrowFunctions": true }],
11
+ "no-console": "off",
12
+ "no-control-regex": "off",
13
+ "no-debugger": "error",
14
+ "no-duplicate-imports": "error",
15
+ "no-undef": "off",
16
+ "no-unused-vars": "off",
17
+ "no-redeclare": "off",
18
+ "import/no-duplicates": "error",
19
+ "typescript/no-redeclare": "error",
20
+ "typescript/ban-ts-comment": "error",
21
+ "typescript/consistent-type-imports": [
22
+ "error",
23
+ {
24
+ "prefer": "type-imports",
25
+ "fixStyle": "inline-type-imports"
26
+ }
27
+ ],
28
+ "typescript/explicit-function-return-type": "off",
29
+ "typescript/explicit-module-boundary-types": "off",
30
+ "typescript/no-empty-object-type": [
31
+ "error",
32
+ {
33
+ "allowInterfaces": "with-single-extends"
34
+ }
35
+ ],
36
+ "typescript/no-empty-function": "off",
37
+ "typescript/no-explicit-any": "off",
38
+ "typescript/no-unused-vars": [
39
+ "warn",
40
+ {
41
+ "vars": "all",
42
+ "varsIgnorePattern": "^_",
43
+ "args": "after-used",
44
+ "argsIgnorePattern": "^_"
45
+ }
46
+ ],
47
+ "react/no-unescaped-entities": "off",
48
+ "react/prop-types": "off",
49
+ "react/jsx-key": "off",
50
+ "react/display-name": "off",
51
+ "react/jsx-uses-react": "off",
52
+ "react/react-in-jsx-scope": "off",
53
+ "react/jsx-no-useless-fragment": "off",
54
+ "react/jsx-props-no-spreading": ["error", { "explicitSpread": "ignore" }],
55
+ "react-hooks/rules-of-hooks": "error",
56
+ "react-hooks/exhaustive-deps": "warn"
57
+ }
58
+ }
package/.yarnrc.yml ADDED
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # People Data Labs
2
+
3
+ **Turn a name into a full profile — enrich any Person or Company in one click.**
4
+
5
+ ## ✨ What you get
6
+
7
+ - **+30 rich data fields** per Person and Company — seniority, skills, firmographics, funding, socials & more
8
+ - **Run it anywhere** — from the command menu, as a workflow step, or straight from AI chat
9
+ - **Smart matching** — finds the right profile from a LinkedIn, email, or domain, and only writes confident matches
10
+
11
+ ## 💳 Billing
12
+
13
+ Pay only for matches, in Twenty credits — **not found and skipped records are free.**
14
+
15
+ - **Person match:** $0.336
16
+ - **Company match:** $0.12
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@twentyhq/people-data-labs",
3
+ "version": "1.0.0",
4
+ "description": "People Data Labs enrichment app for Twenty",
5
+ "license": "MIT",
6
+ "engines": {
7
+ "node": "^24.5.0",
8
+ "npm": "please-use-yarn",
9
+ "yarn": ">=4.0.2"
10
+ },
11
+ "keywords": [
12
+ "twenty-app"
13
+ ],
14
+ "packageManager": "yarn@4.13.0",
15
+ "scripts": {
16
+ "twenty": "twenty",
17
+ "lint": "oxlint -c .oxlintrc.json .",
18
+ "lint:fix": "oxlint --fix -c .oxlintrc.json .",
19
+ "typecheck": "tsgo --noEmit -p tsconfig.spec.json",
20
+ "test": "vitest run",
21
+ "test:watch": "vitest",
22
+ "test:unit": "vitest run --config vitest.unit.config.ts"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^24.7.2",
26
+ "@types/react": "^18.2.0",
27
+ "@typescript/native-preview": "^7.0.0-dev.20260116.1",
28
+ "oxlint": "^0.16.0",
29
+ "react": "^18.2.0",
30
+ "react-dom": "^18.2.0",
31
+ "twenty-client-sdk": "^2.16.0",
32
+ "twenty-sdk": "^2.16.0",
33
+ "typescript": "^5.9.3",
34
+ "vite-tsconfig-paths": "^4.2.1",
35
+ "vitest": "^4.0.0"
36
+ }
37
+ }
Binary file
Binary file
@@ -0,0 +1,87 @@
1
+ import * as fs from 'fs';
2
+ import * as os from 'os';
3
+ import * as path from 'path';
4
+
5
+ import { appDevOnce, appUninstall } from 'twenty-sdk/cli';
6
+
7
+ const APP_PATH = process.cwd();
8
+ const CONFIG_DIR = path.join(os.homedir(), '.twenty');
9
+
10
+ function validateEnv(): { apiUrl: string; apiKey: string } {
11
+ const apiUrl = process.env.TWENTY_API_URL;
12
+ const apiKey = process.env.TWENTY_API_KEY;
13
+
14
+ if (!apiUrl || !apiKey) {
15
+ throw new Error(
16
+ 'TWENTY_API_URL and TWENTY_API_KEY must be set.\n' +
17
+ 'Start a local server: yarn twenty docker:start\n' +
18
+ 'Or set them in vitest env config.',
19
+ );
20
+ }
21
+
22
+ return { apiUrl, apiKey };
23
+ }
24
+
25
+ async function checkServer(apiUrl: string) {
26
+ let response: Response;
27
+
28
+ try {
29
+ response = await fetch(`${apiUrl}/healthz`);
30
+ } catch {
31
+ throw new Error(
32
+ `Twenty server is not reachable at ${apiUrl}. ` +
33
+ 'Make sure the server is running before executing integration tests.',
34
+ );
35
+ }
36
+
37
+ if (!response.ok) {
38
+ throw new Error(`Server at ${apiUrl} returned ${response.status}`);
39
+ }
40
+ }
41
+
42
+ function writeConfig(apiUrl: string, apiKey: string) {
43
+ const payload = JSON.stringify(
44
+ {
45
+ remotes: {
46
+ local: { apiUrl, apiKey, accessToken: apiKey },
47
+ },
48
+ defaultRemote: 'local',
49
+ },
50
+ null,
51
+ 2,
52
+ );
53
+
54
+ fs.mkdirSync(CONFIG_DIR, { recursive: true });
55
+ fs.writeFileSync(path.join(CONFIG_DIR, 'config.test.json'), payload);
56
+ }
57
+
58
+ export async function setup() {
59
+ const { apiUrl, apiKey } = validateEnv();
60
+
61
+ await checkServer(apiUrl);
62
+
63
+ writeConfig(apiUrl, apiKey);
64
+
65
+ await appUninstall({ appPath: APP_PATH }).catch(() => {});
66
+
67
+ const result = await appDevOnce({
68
+ appPath: APP_PATH,
69
+ onProgress: (message: string) => console.log(`[dev] ${message}`),
70
+ });
71
+
72
+ if (!result.success) {
73
+ throw new Error(
74
+ `Dev sync failed: ${result.error?.message ?? 'Unknown error'}`,
75
+ );
76
+ }
77
+ }
78
+
79
+ export async function teardown() {
80
+ const uninstallResult = await appUninstall({ appPath: APP_PATH });
81
+
82
+ if (!uninstallResult.success) {
83
+ console.warn(
84
+ `App uninstall failed: ${uninstallResult.error?.message ?? 'Unknown error'}`,
85
+ );
86
+ }
87
+ }
@@ -0,0 +1,25 @@
1
+ import { MetadataApiClient } from 'twenty-client-sdk/metadata';
2
+ import { describe, expect, it } from 'vitest';
3
+
4
+ import { APPLICATION_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';
5
+
6
+ describe('People Data Labs app installation', () => {
7
+ it('should find the installed People Data Labs app in the applications list', async () => {
8
+ const client = new MetadataApiClient();
9
+
10
+ const result = await client.query({
11
+ findManyApplications: {
12
+ id: true,
13
+ name: true,
14
+ universalIdentifier: true,
15
+ },
16
+ });
17
+
18
+ const matchingApplication = result.findManyApplications.find(
19
+ (application: { universalIdentifier: string }) =>
20
+ application.universalIdentifier === APPLICATION_UNIVERSAL_IDENTIFIER,
21
+ );
22
+
23
+ expect(matchingApplication).toBeDefined();
24
+ });
25
+ });
@@ -0,0 +1,18 @@
1
+ import { defineApplication } from 'twenty-sdk/define';
2
+
3
+ import { APPLICATION_UNIVERSAL_IDENTIFIER } from 'src/constants/universal-identifiers';
4
+
5
+ export default defineApplication({
6
+ universalIdentifier: APPLICATION_UNIVERSAL_IDENTIFIER,
7
+ displayName: 'People Data Labs',
8
+ description: 'Enrich People and Companies with People Data Labs data.',
9
+ logoUrl: 'public/people-data-labs-icon.png',
10
+ screenshots: ['public/gallery/cover.png'],
11
+ serverVariables: {
12
+ PDL_API_KEY: {
13
+ description: 'People Data Labs API key',
14
+ isSecret: true,
15
+ isRequired: true,
16
+ },
17
+ },
18
+ });
@@ -0,0 +1,14 @@
1
+ import { defineCommandMenuItem, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from 'twenty-sdk/define';
2
+ import {
3
+ PDL_COMMAND_MENU_ITEM_UNIVERSAL_IDENTIFIERS,
4
+ PDL_FRONT_COMPONENT_UNIVERSAL_IDENTIFIERS
5
+ } from 'src/constants/universal-identifiers';
6
+
7
+ export default defineCommandMenuItem({
8
+ universalIdentifier: PDL_COMMAND_MENU_ITEM_UNIVERSAL_IDENTIFIERS.enrichCompanies,
9
+ availabilityObjectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.company.universalIdentifier,
10
+ frontComponentUniversalIdentifier:
11
+ PDL_FRONT_COMPONENT_UNIVERSAL_IDENTIFIERS.enrichCompanies,
12
+ label: 'Enrich companies',
13
+ availabilityType: 'RECORD_SELECTION',
14
+ });
@@ -0,0 +1,14 @@
1
+ import { defineCommandMenuItem, STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS } from 'twenty-sdk/define';
2
+ import {
3
+ PDL_COMMAND_MENU_ITEM_UNIVERSAL_IDENTIFIERS,
4
+ PDL_FRONT_COMPONENT_UNIVERSAL_IDENTIFIERS
5
+ } from 'src/constants/universal-identifiers';
6
+
7
+ export default defineCommandMenuItem({
8
+ universalIdentifier: PDL_COMMAND_MENU_ITEM_UNIVERSAL_IDENTIFIERS.enrichPeople,
9
+ availabilityObjectUniversalIdentifier: STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.person.universalIdentifier,
10
+ frontComponentUniversalIdentifier:
11
+ PDL_FRONT_COMPONENT_UNIVERSAL_IDENTIFIERS.enrichPeople,
12
+ label: 'Enrich people',
13
+ availabilityType: 'RECORD_SELECTION',
14
+ });
@@ -0,0 +1,142 @@
1
+ import { describe, expect, it } from 'vitest';
2
+
3
+ import { COMPANY_TYPE_OPTIONS } from 'src/constants/company-type-options';
4
+ import { ENRICHMENT_STATUS_OPTIONS } from 'src/constants/enrichment-status-options';
5
+ import { FUNDING_STAGE_OPTIONS } from 'src/constants/funding-stage-options';
6
+ import { INDUSTRY_OPTIONS } from 'src/constants/industry-options';
7
+ import { INFERRED_SALARY_OPTIONS } from 'src/constants/inferred-salary-options';
8
+ import { JOB_ROLE_OPTIONS } from 'src/constants/job-role-options';
9
+ import { JOB_TITLE_CLASS_OPTIONS } from 'src/constants/job-title-class-options';
10
+ import { JOB_TITLE_SUB_ROLE_OPTIONS } from 'src/constants/job-title-sub-role-options';
11
+ import { LOCATION_CONTINENT_OPTIONS } from 'src/constants/location-continent-options';
12
+ import { METRO_OPTIONS } from 'src/constants/metro-options';
13
+ import { MIC_EXCHANGE_OPTIONS } from 'src/constants/mic-exchange-options';
14
+ import { SENIORITY_OPTIONS } from 'src/constants/seniority-options';
15
+ import { SEX_OPTIONS } from 'src/constants/sex-options';
16
+ import { SIZE_OPTIONS } from 'src/constants/size-options';
17
+ import {
18
+ APPLICATION_UNIVERSAL_IDENTIFIER,
19
+ DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
20
+ PDL_FIELD_UNIVERSAL_IDENTIFIERS,
21
+ PDL_LOGIC_FUNCTION_CONSTANTS,
22
+ PDL_SELECT_OPTION_UNIVERSAL_IDENTIFIERS,
23
+ PDL_VIEW_UNIVERSAL_IDENTIFIERS
24
+ } from 'src/constants/universal-identifiers';
25
+ import { type SelectOptionMeta } from 'src/types/select-option-meta';
26
+ import { normalizeEnumValue } from 'src/utils/normalize-enum-value';
27
+
28
+ import companyEnrichmentStatusField from 'src/fields/company/pdl-enrichment-status.field';
29
+ import companyFundingStagesField from 'src/fields/company/pdl-funding-stages.field';
30
+ import companyIndustryField from 'src/fields/company/pdl-industry.field';
31
+ import companyLatestFundingStageField from 'src/fields/company/pdl-latest-funding-stage.field';
32
+ import companyLocationContinentField from 'src/fields/company/pdl-location-continent.field';
33
+ import companyLocationMetroField from 'src/fields/company/pdl-location-metro.field';
34
+ import companyMicExchangeField from 'src/fields/company/pdl-mic-exchange.field';
35
+ import companySizeRangeField from 'src/fields/company/pdl-size-range.field';
36
+ import companyTypeField from 'src/fields/company/pdl-company-type.field';
37
+ import personEnrichmentStatusField from 'src/fields/person/pdl-enrichment-status.field';
38
+ import personIndustryField from 'src/fields/person/pdl-industry.field';
39
+ import personInferredSalaryField from 'src/fields/person/pdl-inferred-salary.field';
40
+ import personJobRoleField from 'src/fields/person/pdl-job-role.field';
41
+ import personJobTitleClassField from 'src/fields/person/pdl-job-title-class.field';
42
+ import personJobTitleSubRoleField from 'src/fields/person/pdl-job-title-sub-role.field';
43
+ import personLocationMetroField from 'src/fields/person/pdl-location-metro.field';
44
+ import personSeniorityField from 'src/fields/person/pdl-seniority.field';
45
+ import personSexField from 'src/fields/person/pdl-sex.field';
46
+
47
+ type FieldOption = { id?: string; value: string };
48
+
49
+ const fieldOptions = (field: unknown): FieldOption[] =>
50
+ (field as { config?: { options?: FieldOption[] } }).config?.options ?? [];
51
+
52
+ const selectFieldCases: {
53
+ name: string;
54
+ field: unknown;
55
+ options: readonly SelectOptionMeta[];
56
+ }[] = [
57
+ { name: 'person.pdlSeniority', field: personSeniorityField, options: SENIORITY_OPTIONS },
58
+ { name: 'person.pdlJobRole', field: personJobRoleField, options: JOB_ROLE_OPTIONS },
59
+ { name: 'person.pdlJobTitleClass', field: personJobTitleClassField, options: JOB_TITLE_CLASS_OPTIONS },
60
+ { name: 'person.pdlJobTitleSubRole', field: personJobTitleSubRoleField, options: JOB_TITLE_SUB_ROLE_OPTIONS },
61
+ { name: 'person.pdlSex', field: personSexField, options: SEX_OPTIONS },
62
+ { name: 'person.pdlInferredSalary', field: personInferredSalaryField, options: INFERRED_SALARY_OPTIONS },
63
+ { name: 'person.pdlIndustry', field: personIndustryField, options: INDUSTRY_OPTIONS },
64
+ { name: 'person.pdlLocationMetro', field: personLocationMetroField, options: METRO_OPTIONS },
65
+ { name: 'person.pdlEnrichmentStatus', field: personEnrichmentStatusField, options: ENRICHMENT_STATUS_OPTIONS },
66
+ { name: 'company.pdlCompanyType', field: companyTypeField, options: COMPANY_TYPE_OPTIONS },
67
+ { name: 'company.pdlLocationContinent', field: companyLocationContinentField, options: LOCATION_CONTINENT_OPTIONS },
68
+ { name: 'company.pdlMicExchange', field: companyMicExchangeField, options: MIC_EXCHANGE_OPTIONS },
69
+ { name: 'company.pdlIndustry', field: companyIndustryField, options: INDUSTRY_OPTIONS },
70
+ { name: 'company.pdlLocationMetro', field: companyLocationMetroField, options: METRO_OPTIONS },
71
+ { name: 'company.pdlSizeRange', field: companySizeRangeField, options: SIZE_OPTIONS },
72
+ { name: 'company.pdlLatestFundingStage', field: companyLatestFundingStageField, options: FUNDING_STAGE_OPTIONS },
73
+ { name: 'company.pdlFundingStages', field: companyFundingStagesField, options: FUNDING_STAGE_OPTIONS },
74
+ { name: 'company.pdlEnrichmentStatus', field: companyEnrichmentStatusField, options: ENRICHMENT_STATUS_OPTIONS },
75
+ ];
76
+
77
+ describe.each(selectFieldCases)('$name options', ({ field, options }) => {
78
+ it('resolves a universalIdentifier for every option', () => {
79
+ expect(fieldOptions(field).every((option) => Boolean(option.id))).toBe(true);
80
+ });
81
+
82
+ it('exposes exactly the values from its source constant', () => {
83
+ expect(fieldOptions(field).map((option) => option.value)).toEqual(
84
+ options.map((option) => option.value),
85
+ );
86
+ });
87
+
88
+ it('uses option values that are normalizeEnumValue fixed points', () => {
89
+ for (const option of fieldOptions(field)) {
90
+ expect(normalizeEnumValue(option.value)).toBe(option.value);
91
+ }
92
+ });
93
+
94
+ it('has option ids that are unique within the field', () => {
95
+ const ids = fieldOptions(field).map((option) => option.id);
96
+ expect(new Set(ids).size).toBe(ids.length);
97
+ });
98
+ });
99
+
100
+ describe('select fields collectively', () => {
101
+ it('never reuses an option id across two different fields', () => {
102
+ const everyOptionId = selectFieldCases.flatMap(({ field }) =>
103
+ fieldOptions(field).map((option) => option.id),
104
+ );
105
+
106
+ expect(new Set(everyOptionId).size).toBe(everyOptionId.length);
107
+ });
108
+ });
109
+
110
+ const UUID_V4_REGEX =
111
+ /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
112
+
113
+ const collectUuids = (value: unknown): string[] => {
114
+ if (typeof value === 'string') {
115
+ return [value];
116
+ }
117
+ if (value !== null && typeof value === 'object') {
118
+ return Object.values(value).flatMap(collectUuids);
119
+ }
120
+ return [];
121
+ };
122
+
123
+ describe('universal-identifier registry', () => {
124
+ const registryUuids = collectUuids([
125
+ APPLICATION_UNIVERSAL_IDENTIFIER,
126
+ DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
127
+ PDL_LOGIC_FUNCTION_CONSTANTS,
128
+ PDL_FIELD_UNIVERSAL_IDENTIFIERS,
129
+ PDL_VIEW_UNIVERSAL_IDENTIFIERS,
130
+ PDL_SELECT_OPTION_UNIVERSAL_IDENTIFIERS,
131
+ ]);
132
+
133
+ it('contains only valid v4 UUIDs', () => {
134
+ expect(registryUuids.filter((uuid) => !UUID_V4_REGEX.test(uuid))).toEqual(
135
+ [],
136
+ );
137
+ });
138
+
139
+ it('contains no duplicate UUIDs across the whole registry', () => {
140
+ expect(new Set(registryUuids).size).toBe(registryUuids.length);
141
+ });
142
+ });
@@ -0,0 +1 @@
1
+ export const BILLING_MARGIN_MULTIPLIER = 1.2;
@@ -0,0 +1 @@
1
+ export const COMPANY_MATCH_COST_DOLLARS = 0.1;
@@ -0,0 +1,46 @@
1
+ import { type SelectOptionMeta } from 'src/types/select-option-meta';
2
+
3
+ export const COMPANY_TYPE_OPTIONS: readonly SelectOptionMeta[] = [
4
+ {
5
+ key: 'public',
6
+ value: 'PUBLIC',
7
+ label: 'Public',
8
+ color: 'blue',
9
+ position: 0,
10
+ },
11
+ {
12
+ key: 'private',
13
+ value: 'PRIVATE',
14
+ label: 'Private',
15
+ color: 'red',
16
+ position: 1,
17
+ },
18
+ {
19
+ key: 'publicSubsidiary',
20
+ value: 'PUBLIC_SUBSIDIARY',
21
+ label: 'Public Subsidiary',
22
+ color: 'green',
23
+ position: 2,
24
+ },
25
+ {
26
+ key: 'educational',
27
+ value: 'EDUCATIONAL',
28
+ label: 'Educational',
29
+ color: 'orange',
30
+ position: 3,
31
+ },
32
+ {
33
+ key: 'government',
34
+ value: 'GOVERNMENT',
35
+ label: 'Government',
36
+ color: 'purple',
37
+ position: 4,
38
+ },
39
+ {
40
+ key: 'nonprofit',
41
+ value: 'NONPROFIT',
42
+ label: 'Nonprofit',
43
+ color: 'yellow',
44
+ position: 5,
45
+ },
46
+ ];
@@ -0,0 +1,19 @@
1
+ import { type SelectOptionMeta } from 'src/types/select-option-meta';
2
+
3
+ export const ENRICHMENT_STATUS_OPTIONS: readonly SelectOptionMeta[] = [
4
+ {
5
+ key: 'matched',
6
+ value: 'MATCHED',
7
+ label: 'Matched',
8
+ color: 'green',
9
+ position: 0,
10
+ },
11
+ {
12
+ key: 'notFound',
13
+ value: 'NOT_FOUND',
14
+ label: 'No Match',
15
+ color: 'gray',
16
+ position: 1,
17
+ },
18
+ { key: 'error', value: 'ERROR', label: 'Error', color: 'red', position: 2 },
19
+ ];
@@ -0,0 +1,27 @@
1
+ import { PDL_LOGIC_FUNCTION_CONSTANTS } from 'src/constants/universal-identifiers';
2
+ import { type EnrichmentWorkflowSeed } from 'src/types/enrichment-workflow-seed';
3
+
4
+ const ENRICHMENT_ICON = 'IconSparkles';
5
+
6
+ export const ENRICHMENT_WORKFLOW_SEEDS: EnrichmentWorkflowSeed[] = [
7
+ {
8
+ objectNameSingular: 'company',
9
+ workflowName: 'Enrich companies with People Data Labs',
10
+ triggerName: 'When companies are selected',
11
+ icon: ENRICHMENT_ICON,
12
+ stepName: 'Enrich Companies',
13
+ logicFunctionUniversalIdentifier:
14
+ PDL_LOGIC_FUNCTION_CONSTANTS.enrichCompanies.universalIdentifier,
15
+ logicFunctionInput: { records: '{{trigger.companies}}' },
16
+ },
17
+ {
18
+ objectNameSingular: 'person',
19
+ workflowName: 'Enrich people with People Data Labs',
20
+ triggerName: 'When people are selected',
21
+ icon: ENRICHMENT_ICON,
22
+ stepName: 'Enrich People',
23
+ logicFunctionUniversalIdentifier:
24
+ PDL_LOGIC_FUNCTION_CONSTANTS.enrichPeople.universalIdentifier,
25
+ logicFunctionInput: { records: '{{trigger.people}}' },
26
+ },
27
+ ];