99 PlatformType ,
1010 TenantPlans ,
1111} from '@crowd/types'
12- import { EnrichmentParams , IEnrichmentResponse } from '@crowd/types/premium'
1312import { svc } from '../main'
1413import {
1514 IOrganizationData ,
@@ -300,17 +299,14 @@ async function prepareIdentities(
300299 * @param enrichmentInput - The object that contains organization enrichment attributes
301300 * @returns the PDL company response
302301 */
303- async function getEnrichment (
304- { name, website, locality } : EnrichmentParams ,
305- log : Logger ,
306- ) : Promise < any > {
302+ async function getEnrichment ( { name, website, locality } : any , log : Logger ) : Promise < any > {
307303 const PDLJSModule = await import ( 'peopledatalabs' )
308304 const PDLClient = new PDLJSModule . default ( {
309305 apiKey : process . env [ 'CROWD_ORGANIZATION_ENRICHMENT_API_KEY' ] ,
310306 } )
311- let data : null | IEnrichmentResponse
307+ let data : null | any
312308 try {
313- const payload : Partial < EnrichmentParams > = { }
309+ const payload : any = { }
314310
315311 if ( name ) {
316312 payload . name = name
@@ -320,7 +316,7 @@ async function getEnrichment(
320316 payload . website = website
321317 }
322318
323- data = await PDLClient . company . enrichment ( payload as EnrichmentParams )
319+ data = await PDLClient . company . enrichment ( payload )
324320
325321 if ( data . website === 'undefined.es' ) {
326322 return null
@@ -339,10 +335,7 @@ async function getEnrichment(
339335 return data
340336}
341337
342- function convertEnrichedDataToOrg (
343- pdlData : Awaited < IEnrichmentResponse > ,
344- existingIdentities : IOrganizationIdentity [ ] ,
345- ) : any {
338+ function convertEnrichedDataToOrg ( pdlData : any , existingIdentities : IOrganizationIdentity [ ] ) : any {
346339 let data = < IEnrichableOrganization > renameKeys ( pdlData , {
347340 summary : 'description' ,
348341 employee_count_by_country : 'employeeCountByCountry' ,
@@ -474,8 +467,8 @@ function sanitize(data: any): any {
474467function enrichSocialNetworks (
475468 data : IEnrichableOrganization ,
476469 socialNetworks : {
477- profiles : IEnrichmentResponse [ 'profiles' ]
478- linkedin_id : IEnrichmentResponse [ 'linkedin_id' ]
470+ profiles : any
471+ linkedin_id : any
479472 } ,
480473) : IEnrichableOrganization {
481474 const socials = socialNetworks . profiles . reduce ( ( acc , social ) => {
0 commit comments