Skip to content

Commit fe0ca5d

Browse files
author
Uroš Marolt
committed
linting fix
1 parent fd7d574 commit fe0ca5d

4 files changed

Lines changed: 15 additions & 76 deletions

File tree

services/apps/premium/organizations_enrichment_worker/src/activities/organizationEnrichment.ts

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
PlatformType,
1010
TenantPlans,
1111
} from '@crowd/types'
12-
import { EnrichmentParams, IEnrichmentResponse } from '@crowd/types/premium'
1312
import { svc } from '../main'
1413
import {
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 {
474467
function 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) => {

services/libs/types/src/premium/enrichment/organization.ts

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
export * from './enrichment/member'
2-
export * from './enrichment/organization'

services/scripts/lint_apps.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ for app_dir in $CLI_HOME/../apps/*/; do
1212
(cd "$app_dir" && pnpm run lint && pnpm run format-check && pnpm run tsc-check && say "App $app: linter, prettier and typescript checked!" && nl)
1313
fi
1414
done
15+
16+
for app_dir in $CLI_HOME/../apps/premium/*/; do
17+
if [ -f "${app_dir}package.json" ]; then
18+
app=$(basename $app_dir)
19+
yell "Checking linting, prettier and typescript for app: $app!"
20+
(cd "$app_dir" && pnpm run lint && pnpm run format-check && pnpm run tsc-check && say "App $app: linter, prettier and typescript checked!" && nl)
21+
fi
22+
done

0 commit comments

Comments
 (0)