-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Insights Types, filter_updated param to retrieve, add bulk Retrie…
…ve and export Person/Company Response (#46) * add types for insights fields * add recommended_personal_email * update package version * add filter_updated * add gics_sector and mic_exchange * simplify types * add bulk retrieve * change to major version change * update dependencies * fix it for bulk retrieve test * fix tsconfig * lint rules * fix tsconfig * package updates * rename location for bulkEnrichment * upgrade note readme * fix docs link
- Loading branch information
1 parent
692c1e4
commit bbfbca8
Showing
29 changed files
with
667 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/endpoints/bulk/index.ts → src/endpoints/bulkEnrichment/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import axios from 'axios'; | ||
|
||
import { check, errorHandler } from '../../errors'; | ||
import { BulkPersonRetrieveParams, BulkPersonRetrieveResponse } from '../../types/bulk-retrieve-types'; | ||
import { parseRateLimitingResponse } from '../../utils/api-utils'; | ||
|
||
export default (basePath: string, apiKey: string, records: BulkPersonRetrieveParams) => { | ||
const headers = { | ||
'Content-Type': 'application/json', | ||
'Accept-Encoding': 'gzip', | ||
'X-Api-Key': apiKey, | ||
'User-Agent': 'PDL-JS-SDK', | ||
}; | ||
|
||
return new Promise<BulkPersonRetrieveResponse>((resolve, reject) => { | ||
check(records, basePath, apiKey, 'Records', 'bulk').then(() => { | ||
axios.post<BulkPersonRetrieveResponse>(`${basePath}/person/retrieve/bulk`, records, { headers }) | ||
.then((response) => { | ||
resolve(parseRateLimitingResponse(response)); | ||
}) | ||
.catch((error) => { | ||
reject(errorHandler(error)); | ||
}); | ||
}).catch((error) => { | ||
reject(error); | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import autocomplete from './autocomplete'; | ||
import bulk from './bulk'; | ||
import bulkEnrichment from './bulkEnrichment'; | ||
import bulkRetrieve from './bulkRetrieve'; | ||
import cleaner from './cleaner'; | ||
import enrichment from './enrichment'; | ||
import identify from './identify'; | ||
import jobTitle from './jobTitle'; | ||
import retrieve from './retrieve'; | ||
import search from './search'; | ||
import jobTitle from './jobTitle'; | ||
import skill from './skill'; | ||
|
||
export { | ||
autocomplete, bulk, cleaner, enrichment, identify, retrieve, search, jobTitle, skill, | ||
}; | ||
export { autocomplete, bulkEnrichment, bulkRetrieve, cleaner, enrichment, identify, jobTitle, retrieve, search, skill }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.