Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

peopledatalabs

Package Overview
Dependencies
Maintainers
0
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

peopledatalabs - npm Package Compare versions

Comparing version 9.3.2 to 9.3.3

2

dist/index.modern.js

@@ -1,2 +0,2 @@

import e from"axios";import{copy as t}from"copy-anything";function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},a.apply(null,arguments)}const s=e=>{const t={rateLimitRemaining:e.headers["x-ratelimit-remaining"]?JSON.parse(e.headers["x-ratelimit-remaining"].replace(/'/g,'"')):void 0,rateLimitReset:e.headers["x-ratelimit-reset"]||void 0,rateLimitLimit:e.headers["x-ratelimit-limit"]?JSON.parse(e.headers["x-ratelimit-limit"].replace(/'/g,'"')):void 0,totalLimitOveragesRemaining:e.headers["x-totallimit-overages-remaining"]?Number(e.headers["x-totallimit-overages-remaining"]):void 0,totalLimitPurchasedRemaining:e.headers["x-totallimit-purchased-remaining"]?Number(e.headers["x-totallimit-purchased-remaining"]):void 0,totalLimitRemaining:e.headers["x-totallimit-remaining"]?Number(e.headers["x-totallimit-remaining"]):void 0,callCreditsType:e.headers["x-call-credits-type"]||void 0,callCreditsSpent:e.headers["x-call-credits-spent"]?Number(e.headers["x-call-credits-spent"]):void 0,lifetimeUsed:e.headers["x-lifetime-used"]?Number(e.headers["x-lifetime-used"]):void 0};return Array.isArray(e.data)?{items:e.data,rateLimit:t}:a({},e.data,{rateLimit:t})},i=(e,t,a,s,i)=>new Promise((n,r)=>{const o={};if(e||(o.message=`Missing ${s||"Params"}`,o.status=400,r(o)),"search"===i){const{searchQuery:t}=e;t||(o.message="Missing searchQuery",o.status=400,r(o))}if("retrieve"===i){const{id:t}=e;t||(o.message="Missing id",o.status=400,r(o))}if("autocomplete"===i){const{field:t}=e,a=["company","country","industry","location","major","region","role","school","sub_role","skill","title"];t?-1===a.indexOf(t)&&(o.message=`field should be one of: ${a}`,o.status=400,r(o)):(o.message="Missing field",o.status=400,r(o))}if("jobTitle"===i){const{jobTitle:t}=e;t||(o.message="Missing jobTitle",o.status=400,r(o))}if("skill"===i){const{skill:t}=e;t||(o.message="Missing skill",o.status=400,r(o))}if("ip"===i){const{ip:t}=e;t||(o.message="Missing ip",o.status=400,r(o))}t||(o.message="Missing API Base Path",o.status=400,r(o)),a&&64===a.length||(o.message="Invalid API Key",o.status=401,r(o)),n()}),n=e=>{const t={400:"Request contained either missing or invalid parameters",401:"Request contained a missing or invalid key",402:"Payment Required, You have hit your account maximum (all matches used)",404:"No records were found matching your request",405:"Request method is not allowed on the requested resource",429:"An error occurred due to requests hitting the API too quick",500:"The server encountered an unexpected condition which prevented it from fulfilling the request"};if(e.response){const{status:a}=e.response,i=a>=500&&a<600?500:a,{rateLimit:n}=s(e.response);return{status:i,message:t[i],rateLimit:n}}return{status:500,message:t[500]}};var r=(t,r,o,h)=>new Promise((c,l)=>{i(o,t,r,null,"cleaner").then(()=>{e.get(`${t}/${h}/clean`,{params:a({api_key:r},o),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&c(s(e))}).catch(e=>{l(n(e))})}).catch(e=>{l(e)})}),o=(a,r,o,h,c)=>new Promise((l,p)=>{i(h,a,o,null,"enrichment").then(()=>{const i=h.sandbox&&"person"===c?`${r}/${c}/enrich`:`${a}/${c}/enrich`,d=t(h),u=new URLSearchParams;delete d.sandbox,Object.entries(d).forEach(([e,t])=>{"profile"===e?Array.isArray(t)?u.append(e,JSON.stringify(t)):t&&u.append(e,t):"object"==typeof t?Array.isArray(t)?t.forEach(t=>{t&&u.append(e,t)}):t&&u.append(e,JSON.stringify(t)):t&&u.append(e,t)}),u.append("api_key",o),e.get(i,{params:u,headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&l(s(e))}).catch(e=>{p(n(e))})}).catch(e=>{p(e)})}),h=(t,a,r,o,h,c)=>new Promise((l,p)=>{i(h,t,r,null,"search").then(()=>{const{dataset:i,searchQuery:d,size:u,scroll_token:m,titlecase:y,pretty:g,sandbox:b}=h;e.post(b&&"person"===c?`${a}/person/search`:`${t}/${c}/search`,{titlecase:y||!1,dataset:i||"all",scroll_token:m||null,size:u||10,["sql"===o?"sql":"query"]:d,pretty:g||!1},{headers:{"Content-Type":"application/json","Accept-Encoding":"gzip","X-Api-Key":r,"User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&l(s(e))}).catch(e=>{p(n(e))})}).catch(e=>{p(e)})});class c{constructor({apiKey:c,basePath:l,sandboxBasePath:p,version:d}){this.apiKey=void 0,this.basePath=void 0,this.sandboxBasePath=void 0,this.person=void 0,this.company=void 0,this.school=void 0,this.location=void 0,this.autocomplete=void 0,this.skill=void 0,this.jobTitle=void 0,this.ip=void 0,this.apiKey=c,this.basePath=l||`https://api.peopledatalabs.com/${d||"v5"}`,this.sandboxBasePath=p||`https://sandbox.api.peopledatalabs.com/${d||"v5"}`,this.person={enrichment:e=>o(this.basePath,this.sandboxBasePath,this.apiKey,e,"person"),enrichmentPreview:a=>((a,r,o,h)=>new Promise((c,l)=>{i(h,a,o,null,"enrichment").then(()=>{const i=h.sandbox?`${r}/person/enrich/preview`:`${a}/person/enrich/preview`,p=t(h),d=new URLSearchParams;delete p.sandbox,Object.entries(p).forEach(([e,t])=>{"profile"===e?Array.isArray(t)?d.append(e,JSON.stringify(t)):t&&d.append(e,t):"object"==typeof t?Array.isArray(t)?t.forEach(t=>{t&&d.append(e,t)}):t&&d.append(e,JSON.stringify(t)):t&&d.append(e,t)}),d.append("api_key",o),e.get(i,{params:d,headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&c(s(e))}).catch(e=>{l(n(e))})}).catch(e=>{l(e)})}))(this.basePath,this.sandboxBasePath,this.apiKey,a),search:{elastic:e=>h(this.basePath,this.sandboxBasePath,this.apiKey,"elastic",e,"person"),sql:e=>h(this.basePath,this.sandboxBasePath,this.apiKey,"sql",e,"person")},bulk:{enrichment:t=>((t,a,r)=>{const o={"Content-Type":"application/json","Accept-Encoding":"gzip","X-Api-Key":a,"User-Agent":"PDL-JS-SDK"};return new Promise((h,c)=>{i(r,t,a,"Records","bulk").then(()=>{e.post(`${t}/person/bulk`,r,{headers:o}).then(e=>{h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})})})(this.basePath,this.apiKey,t),retrieve:t=>((t,r,o)=>{const h={"Content-Type":"application/json","Accept-Encoding":"gzip","X-Api-Key":r,"User-Agent":"PDL-JS-SDK"};return new Promise((c,l)=>{i(o,t,r,"Records","bulk").then(()=>{const i=(e=>{const t=e.filter_updated;return a({},e,null==t?{filter_updated:void 0}:{filter_updated:(Array.isArray(t)?t:[t]).join(",")})})(o);e.post(`${t}/person/retrieve/bulk`,i,{headers:h}).then(e=>{c(s(e))}).catch(e=>{l(n(e))})}).catch(e=>{l(e)})})})(this.basePath,this.apiKey,t)},identify:a=>((a,r,o,h)=>new Promise((c,l)=>{i(h,a,o,null,"identify").then(()=>{const i=h.sandbox?`${r}/person/identify`:`${a}/person/identify`,p=t(h),d=new URLSearchParams;delete p.sandbox,Object.entries(p).forEach(([e,t])=>{"profile"===e?Array.isArray(t)?d.append(e,JSON.stringify(t)):t&&d.append(e,t):"object"==typeof t?Array.isArray(t)?t.forEach(t=>{t&&d.append(e,t)}):t&&d.append(e,JSON.stringify(t)):t&&d.append(e,t)}),d.append("api_key",o),e.get(i,{params:d,headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&c(s(e))}).catch(e=>{l(n(e))})}).catch(e=>{l(e)})}))(this.basePath,this.sandboxBasePath,this.apiKey,a),retrieve:t=>((t,r,o)=>new Promise((h,c)=>{i(o,t,r,"ID","retrieve").then(()=>{const i=(e=>{const t=e.filter_updated;return a({},e,null==t?{filter_updated:void 0}:{filter_updated:(Array.isArray(t)?t:[t]).join(",")})})(o);e.get(`${t}/person/retrieve/${o.id}`,{params:a({api_key:r},i),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})}))(this.basePath,this.apiKey,t)},this.company={enrichment:e=>o(this.basePath,this.sandboxBasePath,this.apiKey,e,"company"),search:{elastic:e=>h(this.basePath,this.sandboxBasePath,this.apiKey,"elastic",e,"company"),sql:e=>h(this.basePath,this.sandboxBasePath,this.apiKey,"sql",e,"company")},bulk:{enrichment:t=>((t,a,r)=>{const o={"Content-Type":"application/json","Accept-Encoding":"gzip","X-Api-Key":a,"User-Agent":"PDL-JS-SDK"};return new Promise((h,c)=>{i(r,t,a,"Records","bulk").then(()=>{e.post(`${t}/company/enrich/bulk`,r,{headers:o}).then(e=>{h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})})})(this.basePath,this.apiKey,t)},cleaner:e=>r(this.basePath,this.apiKey,e,"company")},this.school={cleaner:e=>r(this.basePath,this.apiKey,e,"school")},this.location={cleaner:e=>r(this.basePath,this.apiKey,e,"location")},this.autocomplete=t=>((t,r,o)=>new Promise((h,c)=>{i(o,t,r,null,"autocomplete").then(()=>{const{field:i,text:l,size:p,pretty:d,titlecase:u}=o;e.get(`${t}/autocomplete`,{params:a({api_key:r},{field:i,text:l||"",size:p||10,pretty:d||!1,titlecase:u||!1}),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})}))(this.basePath,this.apiKey,t),this.jobTitle=t=>((t,r,o)=>new Promise((h,c)=>{i(o,t,r,null,"jobTitle").then(()=>{const{jobTitle:i,pretty:l}=o;e.get(`${t}/job_title/enrich`,{params:a({api_key:r},{job_title:i,pretty:l||!1}),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})}))(this.basePath,this.apiKey,t),this.skill=t=>((t,r,o)=>new Promise((h,c)=>{i(o,t,r,null,"skill").then(()=>{const{skill:i,pretty:l}=o;e.get(`${t}/skill/enrich`,{params:a({api_key:r},{skill:i,pretty:l||!1}),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})}))(this.basePath,this.apiKey,t),this.ip=t=>((t,r,o)=>new Promise((h,c)=>{i(o,t,r,null,"ip").then(()=>{e.get(`${t}/ip/enrich`,{params:a({api_key:r},o),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})}))(this.basePath,this.apiKey,t)}}export{c as default};
import e from"axios";import{copy as t}from"copy-anything";function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},a.apply(null,arguments)}const s=e=>{const t={rateLimitRemaining:e.headers["x-ratelimit-remaining"]?JSON.parse(e.headers["x-ratelimit-remaining"].replace(/'/g,'"')):void 0,rateLimitReset:e.headers["x-ratelimit-reset"]||void 0,rateLimitLimit:e.headers["x-ratelimit-limit"]?JSON.parse(e.headers["x-ratelimit-limit"].replace(/'/g,'"')):void 0,totalLimitOveragesRemaining:e.headers["x-totallimit-overages-remaining"]?Number(e.headers["x-totallimit-overages-remaining"]):void 0,totalLimitPurchasedRemaining:e.headers["x-totallimit-purchased-remaining"]?Number(e.headers["x-totallimit-purchased-remaining"]):void 0,totalLimitRemaining:e.headers["x-totallimit-remaining"]?Number(e.headers["x-totallimit-remaining"]):void 0,callCreditsType:e.headers["x-call-credits-type"]||void 0,callCreditsSpent:e.headers["x-call-credits-spent"]?Number(e.headers["x-call-credits-spent"]):void 0,lifetimeUsed:e.headers["x-lifetime-used"]?Number(e.headers["x-lifetime-used"]):void 0};return Array.isArray(e.data)?{items:e.data,rateLimit:t}:a({},e.data,{rateLimit:t})},i=(e,t,a,s,i)=>new Promise((n,r)=>{const o={};if(e||(o.message=`Missing ${s||"Params"}`,o.status=400,r(o)),"search"===i){const{searchQuery:t}=e;t||(o.message="Missing searchQuery",o.status=400,r(o))}if("retrieve"===i){const{id:t}=e;t||(o.message="Missing id",o.status=400,r(o))}if("autocomplete"===i){const{field:t}=e,a=["company","country","industry","location","major","region","role","school","sub_role","skill","title"];t?-1===a.indexOf(t)&&(o.message=`field should be one of: ${a}`,o.status=400,r(o)):(o.message="Missing field",o.status=400,r(o))}if("jobTitle"===i){const{jobTitle:t}=e;t||(o.message="Missing jobTitle",o.status=400,r(o))}if("skill"===i){const{skill:t}=e;t||(o.message="Missing skill",o.status=400,r(o))}if("ip"===i){const{ip:t}=e;t||(o.message="Missing ip",o.status=400,r(o))}t||(o.message="Missing API Base Path",o.status=400,r(o)),a&&64===a.length||(o.message="Invalid API Key",o.status=401,r(o)),n()}),n=e=>{const t={400:"Request contained either missing or invalid parameters",401:"Request contained a missing or invalid key",402:"Payment Required, You have hit your account maximum (all matches used)",404:"No records were found matching your request",405:"Request method is not allowed on the requested resource",429:"An error occurred due to requests hitting the API too quick",500:"The server encountered an unexpected condition which prevented it from fulfilling the request"};if(e.response){const{status:a}=e.response,i=a>=500&&a<600?500:a,{rateLimit:n}=s(e.response);return{status:i,message:t[i],rateLimit:n}}return{status:500,message:t[500]}};var r=(t,r,o,h)=>new Promise((c,l)=>{i(o,t,r,null,"cleaner").then(()=>{e.get(`${t}/${h}/clean`,{params:a({api_key:r},o),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&c(s(e))}).catch(e=>{l(n(e))})}).catch(e=>{l(e)})}),o=(a,r,o,h,c)=>new Promise((l,p)=>{i(h,a,o,null,"enrichment").then(()=>{const i=h.sandbox&&"person"===c?`${r}/${c}/enrich`:`${a}/${c}/enrich`,d=t(h),u=new URLSearchParams;delete d.sandbox,Object.entries(d).forEach(([e,t])=>{"profile"===e?Array.isArray(t)?u.append(e,JSON.stringify(t)):t&&u.append(e,t):"object"==typeof t?Array.isArray(t)?t.forEach(t=>{t&&u.append(e,t)}):t&&u.append(e,JSON.stringify(t)):t&&u.append(e,t)}),u.append("api_key",o),e.get(i,{params:u,headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&l(s(e))}).catch(e=>{p(n(e))})}).catch(e=>{p(e)})}),h=(t,a,r,o,h,c)=>new Promise((l,p)=>{i(h,t,r,null,"search").then(()=>{const{dataset:i,pretty:d,sandbox:u,scroll_token:m,searchQuery:y,size:g,titlecase:b}=h;e.post(u&&"person"===c?`${a}/person/search`:`${t}/${c}/search`,{titlecase:b||!1,dataset:i||"all",scroll_token:m||null,size:g||10,["sql"===o?"sql":"query"]:y,pretty:d||!1},{headers:{"Content-Type":"application/json","Accept-Encoding":"gzip","X-Api-Key":r,"User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&l(s(e))}).catch(e=>{p(n(e))})}).catch(e=>{p(e)})});class c{constructor({apiKey:c,basePath:l,sandboxBasePath:p,version:d}){this.apiKey=void 0,this.basePath=void 0,this.sandboxBasePath=void 0,this.person=void 0,this.company=void 0,this.school=void 0,this.location=void 0,this.autocomplete=void 0,this.skill=void 0,this.jobTitle=void 0,this.ip=void 0,this.apiKey=c,this.basePath=l||`https://api.peopledatalabs.com/${d||"v5"}`,this.sandboxBasePath=p||`https://sandbox.api.peopledatalabs.com/${d||"v5"}`,this.person={enrichment:e=>o(this.basePath,this.sandboxBasePath,this.apiKey,e,"person"),enrichmentPreview:a=>((a,r,o,h)=>new Promise((c,l)=>{i(h,a,o,null,"enrichment").then(()=>{const i=h.sandbox?`${r}/person/enrich/preview`:`${a}/person/enrich/preview`,p=t(h),d=new URLSearchParams;delete p.sandbox,Object.entries(p).forEach(([e,t])=>{"profile"===e?Array.isArray(t)?d.append(e,JSON.stringify(t)):t&&d.append(e,t):"object"==typeof t?Array.isArray(t)?t.forEach(t=>{t&&d.append(e,t)}):t&&d.append(e,JSON.stringify(t)):t&&d.append(e,t)}),d.append("api_key",o),e.get(i,{params:d,headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&c(s(e))}).catch(e=>{l(n(e))})}).catch(e=>{l(e)})}))(this.basePath,this.sandboxBasePath,this.apiKey,a),search:{elastic:e=>h(this.basePath,this.sandboxBasePath,this.apiKey,"elastic",e,"person"),sql:e=>h(this.basePath,this.sandboxBasePath,this.apiKey,"sql",e,"person")},bulk:{enrichment:t=>((t,a,r)=>{const o={"Content-Type":"application/json","Accept-Encoding":"gzip","X-Api-Key":a,"User-Agent":"PDL-JS-SDK"};return new Promise((h,c)=>{i(r,t,a,"Records","bulk").then(()=>{e.post(`${t}/person/bulk`,r,{headers:o}).then(e=>{h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})})})(this.basePath,this.apiKey,t),retrieve:t=>((t,r,o)=>{const h={"Content-Type":"application/json","Accept-Encoding":"gzip","X-Api-Key":r,"User-Agent":"PDL-JS-SDK"};return new Promise((c,l)=>{i(o,t,r,"Records","bulk").then(()=>{const i=(e=>{const t=e.filter_updated;return a({},e,null==t?{filter_updated:void 0}:{filter_updated:(Array.isArray(t)?t:[t]).join(",")})})(o);e.post(`${t}/person/retrieve/bulk`,i,{headers:h}).then(e=>{c(s(e))}).catch(e=>{l(n(e))})}).catch(e=>{l(e)})})})(this.basePath,this.apiKey,t)},identify:a=>((a,r,o,h)=>new Promise((c,l)=>{i(h,a,o,null,"identify").then(()=>{const i=h.sandbox?`${r}/person/identify`:`${a}/person/identify`,p=t(h),d=new URLSearchParams;delete p.sandbox,Object.entries(p).forEach(([e,t])=>{"profile"===e?Array.isArray(t)?d.append(e,JSON.stringify(t)):t&&d.append(e,t):"object"==typeof t?Array.isArray(t)?t.forEach(t=>{t&&d.append(e,t)}):t&&d.append(e,JSON.stringify(t)):t&&d.append(e,t)}),d.append("api_key",o),e.get(i,{params:d,headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&c(s(e))}).catch(e=>{l(n(e))})}).catch(e=>{l(e)})}))(this.basePath,this.sandboxBasePath,this.apiKey,a),retrieve:t=>((t,r,o)=>new Promise((h,c)=>{i(o,t,r,"ID","retrieve").then(()=>{const i=(e=>{const t=e.filter_updated;return a({},e,null==t?{filter_updated:void 0}:{filter_updated:(Array.isArray(t)?t:[t]).join(",")})})(o);e.get(`${t}/person/retrieve/${o.id}`,{params:a({api_key:r},i),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})}))(this.basePath,this.apiKey,t)},this.company={enrichment:e=>o(this.basePath,this.sandboxBasePath,this.apiKey,e,"company"),search:{elastic:e=>h(this.basePath,this.sandboxBasePath,this.apiKey,"elastic",e,"company"),sql:e=>h(this.basePath,this.sandboxBasePath,this.apiKey,"sql",e,"company")},bulk:{enrichment:t=>((t,a,r)=>{const o={"Content-Type":"application/json","Accept-Encoding":"gzip","X-Api-Key":a,"User-Agent":"PDL-JS-SDK"};return new Promise((h,c)=>{i(r,t,a,"Records","bulk").then(()=>{e.post(`${t}/company/enrich/bulk`,r,{headers:o}).then(e=>{h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})})})(this.basePath,this.apiKey,t)},cleaner:e=>r(this.basePath,this.apiKey,e,"company")},this.school={cleaner:e=>r(this.basePath,this.apiKey,e,"school")},this.location={cleaner:e=>r(this.basePath,this.apiKey,e,"location")},this.autocomplete=t=>((t,r,o)=>new Promise((h,c)=>{i(o,t,r,null,"autocomplete").then(()=>{const{field:i,pretty:l,size:p,text:d,titlecase:u}=o;e.get(`${t}/autocomplete`,{params:a({api_key:r},{field:i,text:d||"",size:p||10,pretty:l||!1,titlecase:u||!1}),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})}))(this.basePath,this.apiKey,t),this.jobTitle=t=>((t,r,o)=>new Promise((h,c)=>{i(o,t,r,null,"jobTitle").then(()=>{const{jobTitle:i,pretty:l}=o;e.get(`${t}/job_title/enrich`,{params:a({api_key:r},{job_title:i,pretty:l||!1}),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})}))(this.basePath,this.apiKey,t),this.skill=t=>((t,r,o)=>new Promise((h,c)=>{i(o,t,r,null,"skill").then(()=>{const{pretty:i,skill:l}=o;e.get(`${t}/skill/enrich`,{params:a({api_key:r},{skill:l,pretty:i||!1}),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})}))(this.basePath,this.apiKey,t),this.ip=t=>((t,r,o)=>new Promise((h,c)=>{i(o,t,r,null,"ip").then(()=>{e.get(`${t}/ip/enrich`,{params:a({api_key:r},o),headers:{"Accept-Encoding":"gzip","User-Agent":"PDL-JS-SDK"}}).then(e=>{var t;200===(null==e||null==(t=e.data)?void 0:t.status)&&h(s(e))}).catch(e=>{c(n(e))})}).catch(e=>{c(e)})}))(this.basePath,this.apiKey,t)}}export{c as default};
//# sourceMappingURL=index.modern.js.map

@@ -12,2 +12,3 @@ import { RateLimit } from './api-types.js';

titlecase?: boolean;
updated_title_roles?: boolean;
};

@@ -31,2 +32,3 @@ }

titlecase?: boolean;
updated_title_roles?: boolean;
};

@@ -33,0 +35,0 @@ }

@@ -53,3 +53,3 @@ export interface LocationResponse {

sub_role?: string | null;
};
} | null;
}

@@ -56,0 +56,0 @@ export interface PersonEducationResponse {

@@ -13,2 +13,3 @@ import { BaseResponse } from './api-types.js';

titlecase?: boolean;
updated_title_roles?: boolean;
}

@@ -15,0 +16,0 @@ export type PersonEnrichmentParams = EnrichmentAdditionalParams & Partial<{

@@ -31,2 +31,3 @@ import { BaseResponse } from './api-types.js';

titlecase: boolean;
updated_title_roles?: boolean;
}>;

@@ -33,0 +34,0 @@ export interface IdentifyResponse extends BaseResponse {

import { BaseResponse } from './api-types.js';
export interface IPParams {
ip: string;
min_confidence?: 'very high' | 'high' | 'moderate' | 'low' | 'very low';
pretty?: boolean;

@@ -10,2 +11,3 @@ return_if_unmatched?: boolean;

titlecase?: boolean;
updated_title_roles?: boolean;
}

@@ -12,0 +14,0 @@ export interface IPResponse extends BaseResponse {

@@ -8,2 +8,3 @@ import { BaseResponse } from './api-types.js';

titlecase?: boolean;
updated_title_roles?: boolean;
};

@@ -14,2 +15,3 @@ export type ApiRetrieveMetaParams = {

titlecase?: boolean;
updated_title_roles?: boolean;
};

@@ -16,0 +18,0 @@ export type RetrieveParams = {

@@ -12,2 +12,3 @@ import { BaseResponse } from './api-types.js';

titlecase?: boolean;
updated_title_roles?: boolean;
}

@@ -14,0 +15,0 @@ export interface BaseSearchResponse<T> extends BaseResponse {

{
"name": "peopledatalabs",
"version": "9.3.2",
"version": "9.3.3",
"description": "JavaScript client with TypeScript support for the People Data Labs API",

@@ -46,2 +46,3 @@ "type": "module",

"devDependencies": {
"@stylistic/eslint-plugin": "^2.8.0",
"@typescript-eslint/eslint-plugin": "7.18.0",

@@ -55,7 +56,9 @@ "@typescript-eslint/parser": "7.18.0",

"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-react": "^7.36.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sort-destructure-keys": "^2.0.0",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-typescript-sort-keys": "^3.2.0",

@@ -66,3 +69,3 @@ "eslint-plugin-unused-imports": "^3.2.0",

"mocha": "^10.7.3",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},

@@ -69,0 +72,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc