From 0b3a556c90a820f3277c1857179c14aab6731bf2 Mon Sep 17 00:00:00 2001 From: Varun Villait Date: Wed, 26 Apr 2023 15:05:38 -0700 Subject: [PATCH] add support for params in bulk (#52) * add support for params in bulk * update version * packages * update docs to async/await * cleanup * clean up * update to optional --- README.md | 236 +++++++----- package.json | 12 +- src/types/bulk-retrieve-types.ts | 1 + src/types/bulk-types.ts | 5 +- src/types/retrieve-types.ts | 1 + tests/index.test.js | 640 +++++++++++++++---------------- yarn.lock | 140 +++---- 7 files changed, 541 insertions(+), 494 deletions(-) diff --git a/README.md b/README.md index 43a7a86..971bd8d 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ First, create the PDLJS client: ```js import PDLJS from 'peopledatalabs'; -const PDLJSClient = new PDLJS({apiKey: "YOUR API KEY"}) +const PDLJSClient = new PDLJS({ apiKey: 'YOUR API KEY' }) ``` Then, send requests to any PDL API Endpoint: @@ -66,11 +66,13 @@ Then, send requests to any PDL API Endpoint: **Using Person APIs** ```js // By Enrichment -PDLJSClient.person.enrichment({ phone: '4155688415' }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.person.enrichment({ phone: '4155688415' }); + + console.log(response); +} catch (error) { console.log(error); -}); +} // By Bulk Enrichment const bulkEnrichmentRecords = { @@ -88,46 +90,54 @@ const bulkEnrichmentRecords = { ], }; -PDLJSClient.person.bulk.enrichment(bulkEnrichmentRecords).then((data) => { - console.log(data.items); -}).catch((error) => { +try { + const response = await PDLJSClient.person.bulk.enrichment(bulkEnrichmentRecords); + + console.log(response.items); +} catch (error) { console.log(error); -}); +} // By Search (SQL) const sqlQuery = "SELECT * FROM person WHERE location_country='mexico' AND job_title_role='health'AND phone_numbers IS NOT NULL;" -PDLJSClient.person.search.sql({ searchQuery: sqlQuery, size: 10 }).then((data) => { - console.log(data.total); -}).catch((error) => { +try { + const response = await PDLJSClient.person.search.sql({ searchQuery: sqlQuery, size: 10 }); + + console.log(response.total); +} catch (error) { console.log(error); -}); +} // By Search (Elasticsearch) const esQuery = { query: { bool: { must:[ - {term: {location_country: "mexico"}}, - {term: {job_title_role: "health"}}, - {exists: {field: "phone_numbers"}} + { term: { location_country: 'mexico' } }, + { term: { job_title_role: 'health' } }, + { exists: { field: 'phone_numbers' } } ] } } } -PDLJSClient.person.search.elastic({ searchQuery: esQuery, size: 10 }).then((data) => { - console.log(data.total); -}).catch((error) => { +try { + const response = await PDLJSClient.person.search.elastic({ searchQuery: esQuery, size: 10 }); + + console.log(response.total); +} catch (error) { console.log(error); -}); +} // By PDL_ID -PDLJSClient.person.retrieve({ id: 'qEnOZ5Oh0poWnQ1luFBfVw_0000' }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.person.retrieve({ id: 'qEnOZ5Oh0poWnQ1luFBfVw_0000' }); + + console.log(response); +} catch (error) { console.log(error); -}); +} // By Bulk Retrieve const bulkRetrieveRecords = { @@ -137,156 +147,186 @@ const bulkRetrieveRecords = { ], }; -PDLJSClient.person.bulk.retrieve(bulkRetrieveRecords).then((data) => { - console.log(data.items); -}).catch((error) => { +try { + const response = await PDLJSClient.person.bulk.retrieve(bulkRetrieveRecords); + + console.log(response.items); +} catch (error) { console.log(error); -}); +} // By Fuzzy Enrichment -PDLJSClient.person.identify({ name: 'sean thorne' }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.person.identify({ name: 'sean thorne' }); + + console.log(response); +} catch (error) { console.log(error); -}); +} ``` **Using Company APIs** ```js // By Enrichment -PDLJSClient.company.enrichment({ website: 'peopledatalabs.com' }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.company.enrichment({ website: 'peopledatalabs.com' }); + + console.log(response); +} catch (error) { console.log(error); -}); +} // By Search (SQL) const sqlQuery = "SELECT * FROM company WHERE tags='big data' AND industry='financial services' AND location.country='united states';" -PDLJSClient.company.search.sql({ searchQuery: sqlQuery, size: 10 }).then((data) => { - console.log(data.total); -}).catch((error) => { +try { + const response = await PDLJSClient.company.search.sql({ searchQuery: sqlQuery, size: 10 }); + + console.log(response.total); +} catch (error) { console.log(error); -}); +} // By Search (Elasticsearch) const esQuery = { query: { bool: { must:[ - {term: {tags: "big data"}}, - {term: {industry: "financial services"}}, - {term: {location_country: "united states"}} + { term: { tags: 'big data' } }, + { term: { industry: 'financial services' } }, + { term: { location_country: 'united states' } } ] } } } -PDLJSClient.company.search.elastic({ searchQuery: esQuery, size: 10 }).then((data) => { - console.log(data.total); -}).catch((error) => { +try { + const response = await PDLJSClient.company.search.elastic({ searchQuery: esQuery, size: 10 }); + + console.log(response.total); +} catch (error) { console.log(error); -}); +} ``` **Using Autocomplete API** ```js // Get Autocomplete Suggestions -PDLJSClient.autocomplete({ field: 'title', text: 'full', size: 10 }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.autocomplete({ field: 'title', text: 'full', size: 10 }); + + console.log(response); +} catch (error) { console.log(error); -}); +} ``` **Using Cleaner APIs** ```js // Clean Raw Company Strings -PDLJSClient.company.cleaner({ name: 'peOple DaTa LabS' }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.company.cleaner({ name: 'peOple DaTa LabS' }); + + console.log(response); +} catch (error) { console.log(error); -}); +} // Clean Raw Location Strings -PDLJSClient.location.cleaner({ location: '455 Market Street, San Francisco, California 94105, US' }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.location.cleaner({ location: '455 Market Street, San Francisco, California 94105, US' }); + + console.log(response); +} catch (error) { console.log(error); -}); +} // Clean Raw School Strings -PDLJSClient.school.cleaner({ name: 'university of oregon' }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.school.cleaner({ name: 'university of oregon' }); + + console.log(response); +} catch (error) { console.log(error); -}); +} ``` **Using Job Title Enrichment API** ```js // Enrich a Job Title -PDLJSClient.jobTitle({ jobTitle: 'software engineer' }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.jobTitle({ jobTitle: 'software engineer' }); + + console.log(response); +} catch (error) { console.log(error); -}); +} ``` **Using Skill Enrichment API** ```js // Enrich a Skill -PDLJSClient.skill({ skill: 'c++' }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.skill({ skill: 'c++' }); + + console.log(response); +} catch (error) { console.log(error); -}); +} ``` **Using Sandbox APIs** ```js // By Enrichment -PDLJSClient.person.enrichment({ email: 'irussell@example.org', sandbox: true }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.sandbox.person.enrichment({ email: 'irussell@example.org' }); + + console.log(response); +} catch (error) { console.log(error); -}); +} // By Search (SQL) -PDLJSClient.person.search.sql({ - searchQuery: "SELECT * FROM person WHERE location_country='mexico';", - size: 10, - sandbox: true, -}).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.sandbox.person.search.sql({ + searchQuery: "SELECT * FROM person WHERE location_country='mexico';", + size: 10, + sandbox: true, + }); + + console.log(response.total); +} catch (error) { console.log(error); -}); +} // By Search (Elasticsearch) const esQuery = { query: { bool: { must:[ - {term: {location_country: "mexico"}} + { term: { location_country: 'mexico' } } ] } } } -PDLJSClient.person.search.elastic({ searchQuery: esQuery, size: 10, sandbox: true }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = await PDLJSClient.sandbox.person.search.elastic({ searchQuery: esQuery, size: 10, sandbox: true }); + + console.log(response.total); +} catch (error) { console.log(error); -}); +} // By Fuzzy Enrichment -PDLJSClient.person.identify({ company: 'walmart', sandbox: true }).then((data) => { - console.log(data); -}).catch((error) => { +try { + const response = PDLJSClient.person.identify({ email: 'irussell@example.org', sandbox: true }); + + console.log(response); +} catch (error) { console.log(error); -}); +} ``` @@ -364,11 +404,13 @@ You can pass your query to these methods using the special `searchQuery` functio ```js const sqlQuery = "SELECT * FROM company WHERE website='peopledatalabs.com';" -PDLJSClient.company.search.sql({ searchQuery: sqlQuery, size: 10 }).then((data) => { - console.log(data.total); -}).catch((error) => { - console.log(error); -}); +try { + const response = await PDLJS.company.search.sql({ searchQuery: sqlQuery, size: 10 }); + + console.log(response.total) +} catch (error) { + console.log(error) +} ``` #### Upgrading to v5.X.X diff --git a/package.json b/package.json index 316378c..d87bdc8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "peopledatalabs", - "version": "5.0.2", + "version": "5.0.3", "description": "JavaScript client with TypeScript support for the People Data Labs API", "type": "module", "main": "dist/index.cjs", @@ -43,11 +43,11 @@ }, "homepage": "https://docs.peopledatalabs.com/docs/javascript-sdk", "devDependencies": { - "@typescript-eslint/eslint-plugin": "^5.57.0", - "@typescript-eslint/parser": "^5.57.0", + "@typescript-eslint/eslint-plugin": "^5.59.1", + "@typescript-eslint/parser": "^5.59.1", "chai": "^4.3.7", "dotenv": "^16.0.3", - "eslint": "^8.37.0", + "eslint": "^8.39.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-typescript": "^17.0.0", @@ -60,10 +60,10 @@ "esm": "^3.2.25", "microbundle": "^0.15.1", "mocha": "^10.2.0", - "typescript": "^5.0.3" + "typescript": "^5.0.4" }, "dependencies": { - "axios": "^1.3.4", + "axios": "^1.3.6", "copy-anything": "^3.0.3" } } diff --git a/src/types/bulk-retrieve-types.ts b/src/types/bulk-retrieve-types.ts index 2219636..4c86777 100644 --- a/src/types/bulk-retrieve-types.ts +++ b/src/types/bulk-retrieve-types.ts @@ -9,6 +9,7 @@ export type BulkPersonRetrieveRequest = { export interface BulkPersonRetrieveParams { requests: Array & { pretty?: boolean; + titlecase?: boolean; filter_updated?: 'job_change' | any; } } diff --git a/src/types/bulk-types.ts b/src/types/bulk-types.ts index df77272..19199c7 100644 --- a/src/types/bulk-types.ts +++ b/src/types/bulk-types.ts @@ -7,7 +7,10 @@ export interface BulkPersonEnrichmentRequest { } export interface BulkPersonEnrichmentParams { - requests: Array + requests: Array & { + pretty?: boolean; + titlecase?: boolean; + } } export interface BulkPersonEnrichmentResponseItem extends PersonEnrichmentResponse { diff --git a/src/types/retrieve-types.ts b/src/types/retrieve-types.ts index 6dd71ff..9374406 100644 --- a/src/types/retrieve-types.ts +++ b/src/types/retrieve-types.ts @@ -5,6 +5,7 @@ export type RetrieveParams = { id: string; } & { pretty?: boolean; + titlecase?: boolean; filter_updated?: 'job_change' | any; }; diff --git a/tests/index.test.js b/tests/index.test.js index 412842b..0da3a61 100644 --- a/tests/index.test.js +++ b/tests/index.test.js @@ -81,467 +81,467 @@ const skill = { skill: 'c++' }; const jobTitle = { jobTitle: 'software engineer' }; describe('Person Enrichment', () => { - it(`Should Return Person Record for ${phone}`, (done) => { - PDLJSClient.person.enrichment({ phone }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Person Record for ${phone}`, async () => { + try { + const response = await PDLJSClient.person.enrichment({ phone }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Person Enrichment', (done) => { - PDLJSClient.person.enrichment().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Person Enrichment', async () => { + try { + const response = await PDLJSClient.person.enrichment(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Person Bulk Enrichment', () => { - it(`Should Return Person Records for ${JSON.stringify(records)}`, (done) => { - PDLJSClient.person.bulk.enrichment(records).then((data) => { - expect(data.items.length).to.equal(2); - expect(data.items).to.be.a('array'); - done(); - }).catch((error) => { + it(`Should Return Person Records for ${JSON.stringify(records)}`, async () => { + try { + const response = await PDLJSClient.person.bulk.enrichment(records); + + expect(response.items.length).to.equal(2); + expect(response.items).to.be.a('array'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Person Bulk Enrichment', (done) => { - PDLJSClient.person.bulk.enrichment().then((data) => { - expect(data.items.length).to.equal(2); - expect(data.items).to.be.a('array'); - done(); - }).catch((error) => { + it('Should Error for Person Bulk Enrichment', async () => { + try { + const response = await PDLJSClient.person.bulk.enrichment(); + + expect(response.items.length).to.equal(2); + expect(response.items).to.be.a('array'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Person Identify', () => { - it(`Should Return Person Record for ${phone}`, (done) => { - PDLJSClient.person.identify({ phone: '4155688415' }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Person Record for ${phone}`, async () => { + try { + const response = await PDLJSClient.person.identify({ phone }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Person Identify', (done) => { - PDLJSClient.person.identify().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Person Identify', async () => { + try { + const response = await PDLJSClient.person.identify(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Person Search', () => { - it(`Should Return Person Records for ${personSQL}`, (done) => { - PDLJSClient.person.search.sql({ searchQuery: personSQL, size: 10 }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Person Records for ${personSQL}`, async () => { + try { + const response = PDLJSClient.person.search.sql({ searchQuery: personSQL, size: 10 }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Person Search (sql)', (done) => { - PDLJSClient.person.search.sql().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Person Search (sql)', async () => { + try { + const response = PDLJSClient.person.search.sql(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it(`Should Return Person Records for ${JSON.stringify(personElastic)}`, (done) => { - PDLJSClient.person.search.elastic({ searchQuery: personElastic, size: 10 }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Person Records for ${JSON.stringify(personElastic)}`, async () => { + try { + const response = PDLJSClient.person.search.elastic({ searchQuery: personElastic, size: 10 }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Person Search (elastic)', (done) => { - PDLJSClient.person.search.elastic().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Person Search (elastic)', async () => { + try { + const response = PDLJSClient.person.search.elastic(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Person Retrieve', () => { - it(`Should Return Person Record for ${personID}`, (done) => { - PDLJSClient.person.retrieve({ id: personID }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Person Record for ${personID}`, async () => { + try { + const response = await PDLJSClient.person.retrieve({ id: personID }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Person Retrieve', (done) => { - PDLJSClient.person.retrieve().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Person Retrieve', async () => { + try { + const response = await PDLJSClient.person.retrieve(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Bulk Person Retrieve', () => { - it(`Should Return Person Records for ${JSON.stringify(bulkRecords)}`, (done) => { - PDLJSClient.person.bulk.retrieve(bulkRecords).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Person Records for ${JSON.stringify(bulkRecords)}`, async () => { + try { + const response = await PDLJSClient.person.bulk.retrieve(bulkRecords); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Bulk Person Retrieve', (done) => { - PDLJSClient.person.bulk.retrieve().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Bulk Person Retrieve', async () => { + try { + const response = await PDLJSClient.person.bulk.retrieve(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Company Enrichment', () => { - it(`Should Return Company Record for ${website}`, (done) => { - PDLJSClient.company.enrichment({ website }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Company Record for ${website}`, async () => { + try { + const response = await PDLJSClient.company.enrichment({ website }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Company Enrichment', (done) => { - PDLJSClient.company.enrichment().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Company Enrichment', async () => { + try { + const response = await PDLJSClient.company.enrichment(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Company Search', () => { - it(`Should Return Company Records for ${companySQL}`, (done) => { - PDLJSClient.company.search.sql({ searchQuery: companySQL, size: 10 }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Company Records for ${companySQL}`, async () => { + try { + const response = await PDLJSClient.company.search.sql({ searchQuery: companySQL, size: 10 }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Company Search (sql)', (done) => { - PDLJSClient.company.search.sql().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Company Search (sql)', async () => { + try { + const response = await PDLJSClient.company.search.sql(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it(`Should Return Company Records for ${JSON.stringify(companyElastic)}`, (done) => { - PDLJSClient.company.search.elastic({ searchQuery: companyElastic, size: 10 }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Company Records for ${JSON.stringify(companyElastic)}`, async () => { + try { + const response = await PDLJSClient.company.search.elastic({ searchQuery: companyElastic, size: 10 }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Company Search (elastic)', (done) => { - PDLJSClient.company.search.elastic().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Company Search (elastic)', async () => { + try { + const response = await PDLJSClient.company.search.elastic(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Autocomplete', () => { - it(`Should Return Autocomplete Records for ${JSON.stringify(autocomplete)}`, (done) => { - PDLJSClient.autocomplete(autocomplete).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Autocomplete Records for ${JSON.stringify(autocomplete)}`, async () => { + try { + const response = await PDLJSClient.autocomplete(autocomplete); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Autocomplete', (done) => { - PDLJSClient.autocomplete().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Autocomplete', async () => { + try { + const response = await PDLJSClient.autocomplete(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Cleaner APIs', () => { - it(`Should Return Company Cleaner Records for ${JSON.stringify(company)}`, (done) => { - PDLJSClient.company.cleaner(company).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Company Cleaner Records for ${JSON.stringify(company)}`, async () => { + try { + const response = await PDLJSClient.company.cleaner(company); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Company Cleaner', (done) => { - PDLJSClient.company.cleaner().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Company Cleaner', async () => { + try { + const response = await PDLJSClient.company.cleaner(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it(`Should Return Location Cleaner Records for ${JSON.stringify(location)}`, (done) => { - PDLJSClient.location.cleaner(location).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Location Cleaner Records for ${JSON.stringify(location)}`, async () => { + try { + const response = await PDLJSClient.location.cleaner(location); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Location Cleaner', (done) => { - PDLJSClient.location.cleaner().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Location Cleaner', async () => { + try { + const response = await PDLJSClient.location.cleaner(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it(`Should Return School Cleaner Records for ${JSON.stringify(school)}`, (done) => { - PDLJSClient.school.cleaner(school).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return School Cleaner Records for ${JSON.stringify(school)}`, async () => { + try { + const response = await PDLJSClient.school.cleaner(school); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for School Cleaner', (done) => { - PDLJSClient.school.cleaner().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for School Cleaner', async () => { + try { + const response = await PDLJSClient.school.cleaner(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Skill API', () => { - it(`Should Return Skill Records for ${JSON.stringify(skill)}`, (done) => { - PDLJSClient.skill(skill).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Skill Records for ${JSON.stringify(skill)}`, async () => { + try { + const response = await PDLJSClient.skill(skill); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Skill', (done) => { - PDLJSClient.skill().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Skill', async () => { + try { + const response = await PDLJSClient.skill(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Job Title API', () => { - it(`Should Return Job Title Records for ${JSON.stringify(jobTitle)}`, (done) => { - PDLJSClient.jobTitle(jobTitle).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it(`Should Return Job Title Records for ${JSON.stringify(jobTitle)}`, async () => { + try { + const response = await PDLJSClient.jobTitle(jobTitle); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Job Title', (done) => { - PDLJSClient.jobTitle().then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Job Title', async () => { + try { + const response = await PDLJSClient.jobTitle(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); describe('Sandbox APIs', () => { - it('Should Return Sandbox Person Record for { email: \'irussell@example.org\' }', (done) => { - PDLJSClient.person.enrichment({ email: 'irussell@example.org', sandbox: true }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Return Sandbox Person Record for { email: \'irussell@example.org\' }', async () => { + try { + const response = await PDLJSClient.person.enrichment({ email: 'irussell@example.org', sandbox: true }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Sandbox Person Enrichment', (done) => { - PDLJSClient.person.enrichment({ sandbox: true }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Sandbox Person Enrichment', async () => { + try { + const response = await PDLJSClient.person.enrichment(); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Return Sandbox Person Records for "SELECT * FROM person WHERE location_country=\'mexico\';"', (done) => { - PDLJSClient.person.search.sql({ searchQuery: "SELECT * FROM person WHERE location_country='mexico';", size: 10, sandbox: true }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Return Sandbox Person Records for "SELECT * FROM person WHERE location_country=\'mexico\';"', async () => { + try { + const response = await PDLJSClient.person.search.sql({ searchQuery: 'SELECT * FROM person WHERE location_country=\'mexico\';', size: 10, sandbox: true }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Sandbox Person Search (sql)', (done) => { - PDLJSClient.person.search.sql({ sandbox: true }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Sandbox Person Search (sql)', async () => { + try { + const response = await PDLJSClient.person.search.sql({ sandbox: true }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Return Sandbox Person Records for { query: { bool: { must: [{term: {location_country: "mexico"}}] } } }', (done) => { - PDLJSClient.person.search.elastic({ searchQuery: { query: { bool: { must: [{ term: { location_country: 'mexico' } }] } } }, size: 10, sandbox: true }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Return Sandbox Person Records for { query: { bool: { must: [{term: {location_country: "mexico"}}] } } }', async () => { + try { + const response = await PDLJSClient.person.search.elastic({ searchQuery: { query: { bool: { must: [{ term: { location_country: 'mexico' } }] } } }, size: 10, sandbox: true }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Sandbox Person Search (elastic)', (done) => { - PDLJSClient.person.search.elastic({ sandbox: true }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Sandbox Person Search (elastic)', async () => { + try { + const response = await PDLJSClient.person.search.elastic({ sandbox: true }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Return Sandbox Identify Person Records for { company: \'walmart\' }', (done) => { - PDLJSClient.person.identify({ company: 'walmart', sandbox: true }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Return Sandbox Identify Person Records for { email: \'irussell@example.org\' }', async () => { + try { + const response = await PDLJSClient.person.identify({ email: 'irussell@example.org', sandbox: true }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); - it('Should Error for Sandbox Person Identify', (done) => { - PDLJSClient.person.identify({ sandbox: true }).then((data) => { - expect(data.status).to.equal(200); - expect(data).to.be.a('object'); - done(); - }).catch((error) => { + it('Should Error for Sandbox Person Identify', async () => { + try { + const response = await PDLJSClient.person.identify({ sandbox: true }); + + expect(response.status).to.equal(200); + expect(response).to.be.a('object'); + } catch (error) { expect(error).to.be.a('object'); - done(); - }); + } }); }); diff --git a/yarn.lock b/yarn.lock index 47693dd..15a1cc5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1020,10 +1020,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.37.0": - version "8.37.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.37.0.tgz#cf1b5fa24217fe007f6487a26d765274925efa7d" - integrity sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A== +"@eslint/js@8.39.0": + version "8.39.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.39.0.tgz#58b536bcc843f4cd1e02a7e6171da5c040f4d44b" + integrity sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng== "@humanwhocodes/config-array@^0.11.8": version "0.11.8" @@ -1234,15 +1234,15 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== -"@typescript-eslint/eslint-plugin@^5.57.0": - version "5.57.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.57.0.tgz#52c8a7a4512f10e7249ca1e2e61f81c62c34365c" - integrity sha512-itag0qpN6q2UMM6Xgk6xoHa0D0/P+M17THnr4SVgqn9Rgam5k/He33MA7/D7QoJcdMxHFyX7U9imaBonAX/6qA== +"@typescript-eslint/eslint-plugin@^5.59.1": + version "5.59.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.1.tgz#9b09ee1541bff1d2cebdcb87e7ce4a4003acde08" + integrity sha512-AVi0uazY5quFB9hlp2Xv+ogpfpk77xzsgsIEWyVS7uK/c7MZ5tw7ZPbapa0SbfkqE0fsAMkz5UwtgMLVk2BQAg== dependencies: "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.57.0" - "@typescript-eslint/type-utils" "5.57.0" - "@typescript-eslint/utils" "5.57.0" + "@typescript-eslint/scope-manager" "5.59.1" + "@typescript-eslint/type-utils" "5.59.1" + "@typescript-eslint/utils" "5.59.1" debug "^4.3.4" grapheme-splitter "^1.0.4" ignore "^5.2.0" @@ -1250,72 +1250,72 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.57.0": - version "5.57.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.57.0.tgz#f675bf2cd1a838949fd0de5683834417b757e4fa" - integrity sha512-orrduvpWYkgLCyAdNtR1QIWovcNZlEm6yL8nwH/eTxWLd8gsP+25pdLHYzL2QdkqrieaDwLpytHqycncv0woUQ== +"@typescript-eslint/parser@^5.59.1": + version "5.59.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.59.1.tgz#73c2c12127c5c1182d2e5b71a8fa2a85d215cbb4" + integrity sha512-nzjFAN8WEu6yPRDizIFyzAfgK7nybPodMNFGNH0M9tei2gYnYszRDqVA0xlnRjkl7Hkx2vYrEdb6fP2a21cG1g== dependencies: - "@typescript-eslint/scope-manager" "5.57.0" - "@typescript-eslint/types" "5.57.0" - "@typescript-eslint/typescript-estree" "5.57.0" + "@typescript-eslint/scope-manager" "5.59.1" + "@typescript-eslint/types" "5.59.1" + "@typescript-eslint/typescript-estree" "5.59.1" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.57.0": - version "5.57.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.57.0.tgz#79ccd3fa7bde0758059172d44239e871e087ea36" - integrity sha512-NANBNOQvllPlizl9LatX8+MHi7bx7WGIWYjPHDmQe5Si/0YEYfxSljJpoTyTWFTgRy3X8gLYSE4xQ2U+aCozSw== +"@typescript-eslint/scope-manager@5.59.1": + version "5.59.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.1.tgz#8a20222719cebc5198618a5d44113705b51fd7fe" + integrity sha512-mau0waO5frJctPuAzcxiNWqJR5Z8V0190FTSqRw1Q4Euop6+zTwHAf8YIXNwDOT29tyUDrQ65jSg9aTU/H0omA== dependencies: - "@typescript-eslint/types" "5.57.0" - "@typescript-eslint/visitor-keys" "5.57.0" + "@typescript-eslint/types" "5.59.1" + "@typescript-eslint/visitor-keys" "5.59.1" -"@typescript-eslint/type-utils@5.57.0": - version "5.57.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.57.0.tgz#98e7531c4e927855d45bd362de922a619b4319f2" - integrity sha512-kxXoq9zOTbvqzLbdNKy1yFrxLC6GDJFE2Yuo3KqSwTmDOFjUGeWSakgoXT864WcK5/NAJkkONCiKb1ddsqhLXQ== +"@typescript-eslint/type-utils@5.59.1": + version "5.59.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.1.tgz#63981d61684fd24eda2f9f08c0a47ecb000a2111" + integrity sha512-ZMWQ+Oh82jWqWzvM3xU+9y5U7MEMVv6GLioM3R5NJk6uvP47kZ7YvlgSHJ7ERD6bOY7Q4uxWm25c76HKEwIjZw== dependencies: - "@typescript-eslint/typescript-estree" "5.57.0" - "@typescript-eslint/utils" "5.57.0" + "@typescript-eslint/typescript-estree" "5.59.1" + "@typescript-eslint/utils" "5.59.1" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.57.0": - version "5.57.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.57.0.tgz#727bfa2b64c73a4376264379cf1f447998eaa132" - integrity sha512-mxsod+aZRSyLT+jiqHw1KK6xrANm19/+VFALVFP5qa/aiJnlP38qpyaTd0fEKhWvQk6YeNZ5LGwI1pDpBRBhtQ== +"@typescript-eslint/types@5.59.1": + version "5.59.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.1.tgz#03f3fedd1c044cb336ebc34cc7855f121991f41d" + integrity sha512-dg0ICB+RZwHlysIy/Dh1SP+gnXNzwd/KS0JprD3Lmgmdq+dJAJnUPe1gNG34p0U19HvRlGX733d/KqscrGC1Pg== -"@typescript-eslint/typescript-estree@5.57.0": - version "5.57.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.0.tgz#ebcd0ee3e1d6230e888d88cddf654252d41e2e40" - integrity sha512-LTzQ23TV82KpO8HPnWuxM2V7ieXW8O142I7hQTxWIHDcCEIjtkat6H96PFkYBQqGFLW/G/eVVOB9Z8rcvdY/Vw== +"@typescript-eslint/typescript-estree@5.59.1": + version "5.59.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz#4aa546d27fd0d477c618f0ca00b483f0ec84c43c" + integrity sha512-lYLBBOCsFltFy7XVqzX0Ju+Lh3WPIAWxYpmH/Q7ZoqzbscLiCW00LeYCdsUnnfnj29/s1WovXKh2gwCoinHNGA== dependencies: - "@typescript-eslint/types" "5.57.0" - "@typescript-eslint/visitor-keys" "5.57.0" + "@typescript-eslint/types" "5.59.1" + "@typescript-eslint/visitor-keys" "5.59.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.57.0": - version "5.57.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.57.0.tgz#eab8f6563a2ac31f60f3e7024b91bf75f43ecef6" - integrity sha512-ps/4WohXV7C+LTSgAL5CApxvxbMkl9B9AUZRtnEFonpIxZDIT7wC1xfvuJONMidrkB9scs4zhtRyIwHh4+18kw== +"@typescript-eslint/utils@5.59.1": + version "5.59.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.1.tgz#d89fc758ad23d2157cfae53f0b429bdf15db9473" + integrity sha512-MkTe7FE+K1/GxZkP5gRj3rCztg45bEhsd8HYjczBuYm+qFHP5vtZmjx3B0yUCDotceQ4sHgTyz60Ycl225njmA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.57.0" - "@typescript-eslint/types" "5.57.0" - "@typescript-eslint/typescript-estree" "5.57.0" + "@typescript-eslint/scope-manager" "5.59.1" + "@typescript-eslint/types" "5.59.1" + "@typescript-eslint/typescript-estree" "5.59.1" eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.57.0": - version "5.57.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.0.tgz#e2b2f4174aff1d15eef887ce3d019ecc2d7a8ac1" - integrity sha512-ery2g3k0hv5BLiKpPuwYt9KBkAp2ugT6VvyShXdLOkax895EC55sP0Tx5L0fZaQueiK3fBLvHVvEl3jFS5ia+g== +"@typescript-eslint/visitor-keys@5.59.1": + version "5.59.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz#0d96c36efb6560d7fb8eb85de10442c10d8f6058" + integrity sha512-6waEYwBTCWryx0VJmP7JaM4FpipLsFl9CvYf2foAE8Qh/Y0s+bxWysciwOs0LTBED4JCaNxTZ5rGadB14M6dwA== dependencies: - "@typescript-eslint/types" "5.57.0" + "@typescript-eslint/types" "5.59.1" eslint-visitor-keys "^3.3.0" acorn-jsx@^5.3.2: @@ -1502,10 +1502,10 @@ axe-core@^4.6.2: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.6.2.tgz#6e566ab2a3d29e415f5115bc0fd2597a5eb3e5e3" integrity sha512-b1WlTV8+XKLj9gZy2DZXgQiyDp9xkkoe2a6U6UbYccScq2wgH/YwCeI2/Jq2mgo0HzQxqJOjWZBLeA/mqsk5Mg== -axios@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.4.tgz#f5760cefd9cfb51fd2481acf88c05f67c4523024" - integrity sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ== +axios@^1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.6.tgz#1ace9a9fb994314b5f6327960918406fa92c6646" + integrity sha512-PEcdkk7JcdPiMDkvM4K6ZBRYq9keuVJsToxm2zQIM70Qqo2WHTdJZMXcG9X+RmRp2VPNUQC8W1RAGbgt6b1yMg== dependencies: follow-redirects "^1.15.0" form-data "^4.0.0" @@ -2410,10 +2410,10 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== +eslint-scope@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" + integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -2428,15 +2428,15 @@ eslint-visitor-keys@^3.4.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc" integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== -eslint@^8.37.0: - version "8.37.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.37.0.tgz#1f660ef2ce49a0bfdec0b0d698e0b8b627287412" - integrity sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw== +eslint@^8.39.0: + version "8.39.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.39.0.tgz#7fd20a295ef92d43809e914b70c39fd5a23cf3f1" + integrity sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.4.0" "@eslint/eslintrc" "^2.0.2" - "@eslint/js" "8.37.0" + "@eslint/js" "8.39.0" "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -2446,7 +2446,7 @@ eslint@^8.37.0: debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" + eslint-scope "^7.2.0" eslint-visitor-keys "^3.4.0" espree "^9.5.1" esquery "^1.4.2" @@ -4824,10 +4824,10 @@ typescript@^4.1.3: resolved "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz" integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg== -typescript@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.3.tgz#fe976f0c826a88d0a382007681cbb2da44afdedf" - integrity sha512-xv8mOEDnigb/tN9PSMTwSEqAnUvkoXMQlicOb0IUVDBSQCgBSaAAROUZYy2IcUy5qU6XajK5jjjO7TMWqBTKZA== +typescript@^5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== unbox-primitive@^1.0.1: version "1.0.1"