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

bullhorn-client

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bullhorn-client - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

71

lib/index.js

@@ -56,5 +56,26 @@ 'use strict';

}, {
key: 'associateCandidateToTeersheet',
value: function associateCandidateToTeersheet(teersheetId, candidateIds) {
var _this = this;
return this.setup().then(function (restToken) {
var deferred = _q2['default'].defer();
_superagent2['default'].put(_this.buildUrl('entity/Tearsheet/' + teersheetId + '/candidates/' + candidateIds.join(','))).query({
BhRestToken: restToken
}).end(function (error, res) {
if (error) {
deferred.reject(error);
} else {
deferred.resolve(res.body);
}
});
return deferred.promise;
});
}
}, {
key: 'createCandidate',
value: function createCandidate(candidate) {
var _this = this;
var _this2 = this;

@@ -64,3 +85,3 @@ return this.setup().then(function (restToken) {

_superagent2['default'].put(_this.buildUrl('entity/Candidate')).query({
_superagent2['default'].put(_this2.buildUrl('entity/Candidate')).query({
BhRestToken: restToken

@@ -81,3 +102,3 @@ }).send(candidate).end(function (error, res) {

value: function createJobSumission(jobSubmission) {
var _this2 = this;
var _this3 = this;

@@ -87,3 +108,3 @@ return this.setup().then(function (restToken) {

_superagent2['default'].put(_this2.buildUrl('entity/JobSubmission')).query({
_superagent2['default'].put(_this3.buildUrl('entity/JobSubmission')).query({
BhRestToken: restToken

@@ -104,3 +125,3 @@ }).send(jobSubmission).end(function (error, res) {

value: function createCandidateAndJobSubmission(jobId, candidate) {
var _this3 = this;
var _this4 = this;

@@ -111,3 +132,3 @@ return this.createCandidate((0, _lodashOmit2['default'])(candidate, ['file', 'fileName'])).then(function (res) {

promises.push(_this3.createJobSumission({
promises.push(_this4.createJobSumission({
candidate: {

@@ -124,3 +145,3 @@ id: candidateId

if (candidate.file) {
promises.push(_this3.sendFile('Candidate/' + candidateId, candidate.file, candidate.fileName));
promises.push(_this4.sendFile('Candidate/' + candidateId, candidate.file, candidate.fileName));
}

@@ -134,3 +155,3 @@

value: function login() {
var _this4 = this;
var _this5 = this;

@@ -140,4 +161,4 @@ return this.getAccessToken().then(function (accessToken) {

_superagent2['default'].get(_this4.options.apiRoot + 'login').query({
version: _this4.options.version,
_superagent2['default'].get(_this5.options.apiRoot + 'login').query({
version: _this5.options.version,
access_token: accessToken

@@ -148,5 +169,5 @@ }).end(function (error, res) {

} else {
_this4._loginAt = new Date().getTime();
_this4._restUrl = res.body.restUrl;
_this4._BhRestToken = res.body.BhRestToken;
_this5._loginAt = new Date().getTime();
_this5._restUrl = res.body.restUrl;
_this5._BhRestToken = res.body.BhRestToken;
deferred.resolve(res.body);

@@ -189,3 +210,3 @@ }

value: function getAccessToken() {
var _this5 = this;
var _this6 = this;

@@ -200,3 +221,3 @@ var type = arguments.length <= 0 || arguments[0] === undefined ? 'authorization_code' : arguments[0];

_superagent2['default'].post(_this5.options.authEndpoint + 'token').query({
_superagent2['default'].post(_this6.options.authEndpoint + 'token').query({
code: code,

@@ -210,3 +231,3 @@ client_id: client_id,

} else {
_this5._refreshToken = res.body.refresh_token;
_this6._refreshToken = res.body.refresh_token;
deferred.resolve(res.body.access_token);

@@ -222,3 +243,3 @@ }

value: function getOpenJobs() {
var _this6 = this;
var _this7 = this;

@@ -230,3 +251,3 @@ var fields = arguments.length <= 0 || arguments[0] === undefined ? ['*'] : arguments[0];

_superagent2['default'].get(_this6.buildUrl('query/JobOrder')).query({
_superagent2['default'].get(_this7.buildUrl('query/JobOrder')).query({
BhRestToken: restToken,

@@ -257,3 +278,3 @@ fields: fields.join(','),

value: function sendFile(entity, base64file, filename) {
var _this7 = this;
var _this8 = this;

@@ -263,3 +284,3 @@ return this.setup().then(function (restToken) {

_superagent2['default'].put(_this7.buildUrl('file/' + entity)).send({
_superagent2['default'].put(_this8.buildUrl('file/' + entity)).send({
externalID: 'cv',

@@ -298,10 +319,10 @@ fileContent: base64file,

value: function setup() {
var _this8 = this;
var _this9 = this;
return (0, _q2['default'])().then(function () {
var result;
if (_this8.shouldGetRestToken()) {
result = _this8.getRestToken();
if (_this9.shouldGetRestToken()) {
result = _this9.getRestToken();
} else {
result = _this8._BhRestToken;
result = _this9._BhRestToken;
}

@@ -318,2 +339,2 @@ return result;

module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OEJBQXFCLGlCQUFpQjs7OzswQkFDckIsYUFBYTs7OztpQkFDaEIsR0FBRzs7OzswQkFDRyxZQUFZOzs7O21CQUNoQixLQUFLOzs7O0lBRUEsY0FBYztBQUNyQixXQURPLGNBQWMsR0FDTjtRQUFkLE9BQU8seURBQUcsRUFBRTs7MEJBRE4sY0FBYzs7QUFFL0IsUUFBSSxDQUFDLE9BQU8sR0FBRyxpQ0FBUyxPQUFPLEVBQUU7QUFDL0Isa0JBQVksRUFBRSwwQ0FBMEM7QUFDeEQsYUFBTyxFQUFFLGtEQUFrRDtBQUMzRCxhQUFPLEVBQUUsS0FBSztBQUNkLGNBQVEsRUFBRSxFQUFFO0FBQ1osY0FBUSxFQUFFLEVBQUU7QUFDWixjQUFRLEVBQUUsRUFBRTtBQUNaLGtCQUFZLEVBQUUsRUFBRTtLQUNqQixDQUFDLENBQUM7R0FDSjs7ZUFYa0IsY0FBYzs7V0FheEIsa0JBQUMsSUFBSSxFQUFFO0FBQ2QsYUFBTyxJQUFJLENBQUMsUUFBUSxTQUFNLElBQUksQ0FBRSxDQUFDO0tBQ2xDOzs7V0FFZSx5QkFBQyxTQUFTLEVBQUU7OztBQUMxQixhQUFPLElBQUksQ0FDUixLQUFLLEVBQUUsQ0FDUCxJQUFJLENBQUMsVUFBQyxTQUFTLEVBQUs7QUFDbkIsWUFBTSxRQUFRLEdBQUcsZUFBRSxLQUFLLEVBQ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mVuZCgoZXJyb3IsIHJlcykgPT4ge1xuICAgICAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICAgIGRlZmVycmVkLnJlamVjdChlcnJvcik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHJlcy5ib2R5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIHJldHVybiBkZWZlcnJlZC5wcm9taXNlO1xuICAgICAgfSk7XG4gIH1cblxuICBjcmVhdGVKb2JTdW1pc3Npb24gKGpvYlN1Ym1pc3Npb24pIHtcbiAgICByZXR1cm4gdGhpc1xuICAgICAgLnNldHVwKClcbiAgICAgIC50aGVuKChyZXN0VG9rZW4pID0+IHtcbiAgICAgICAgY29uc3QgZGVmZXJyZWQgPSBRLmRlZmVyKCk7XG5cbiAgICAgICAgcmVxdWVzdFxuICAgICAgICAgIC5wdXQodGhpcy5idWlsZFVybCgnZW50aXR5L0pvYlN1Ym1pc3Npb24nKSlcbiAgICAgICAgICAucXVlcnkoe1xuICAgICAgICAgICAgQmhSZXN0VG9rZW46IHJlc3RUb2tlblxuICAgICAgICAgIH0pXG4gICAgICAgICAgLnNlbmQoam9iU3VibWlzc2lvbilcbiAgICAgICAgICAuZW5kKChlcnJvciwgcmVzKSA9PiB7XG4gICAgICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgZGVmZXJyZWQucmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUocmVzLmJvZHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBkZWZlcnJlZC5wcm9taXNlO1xuICAgICAgfSk7XG4gIH1cblxuICBjcmVhdGVDYW5kaWRhdGVBbmRKb2JTdWJtaXNzaW9uIChqb2JJZCwgY2FuZGlkYXRlKSB7XG4gIC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yAnbG9naW4nKVxuICAgICAgICAgIC5xdWVyeSh7XG4gICAgICAgICAgICB2ZXJzaW9uOiB0aGlzLm9wdGlvbnMudmVyc2lvbixcbiAgICAgICAgICAgIGFjY2Vzc190b2tlbjogYWNjZXNzVG9rZW5cbiAgICAgICAgICB9KVxuICAgICAgICAgIC5lbmQoKGVycm9yLCByZXMpID0+IHtcbiAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhpcy5fbG9naW5BdCA9IG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xuICAgICAgICAgICAgICB0aGlzLl9yZXN0VXJsID0gcmVzLmJvZHkucmVzdFVybDtcbiAgICAgICAgICAgICAgdGhpcy5fQmhSZXN0VG9rZW4gPSByZXMuYm9keS5CaFJlc3RUb2tlbjtcbiAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShyZXMuYm9keSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2U7XG4gICAgICB9KTtcblxuICB9XG5cbiAgZ2V0QXV0aG9yaXphdGlvbkNvZGUgKCkge1xuICAgIGNvbnN0IGRlZmVycmVkID0gUS5kZWZlcigpO1xuICAgIGNvbnN0IHt1c2VybmFtZSwgcGFzc3dvcmQsIGNsaWVudElkOiBjbGllbnRfaWR9ID0gdGhpcy5vcHRpb25zO1xuXG4gICAgcmVxdWVzdFxuICAgICAgLnBvc3QodGhpcy5vcHRpb25zLmF1dGhFbmRwb2ludCArICdhdXRob3JpemUnKVxuICAgICAgLnR5cGUoJ2Zvcm0nKVxuICAgICAgLnF1ZXJ5KHtcbiAgICAgICAgY2xpZW50X2lkLFxuICAgICAgICByZXNwb25zZV90eXBlOiAnY29kZScsXG4gICAgICAgIGFjdGlvbjogJ0xvZ2luJ1xuICAgICAgfSlcbiAgICAgIC5zZW5kKHtcbiAgICAgICAgdXNlcm5hbWUsXG4gICAgICAgIHBhc3N3b3JkXG4gICAgICB9KVxuICAgICAgLmVuZCgoZXJyb3IsIHJlcykgPT4ge1xuICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICBkZWZlcnJlZC5yZWplY3QoZXJyb3IpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGNvbnN0IGNvZGUgPSB1cmwucGFyc2UocmVzLnJlZGlyZWN0c1swXSwgdHJ1ZSkucXVlcnkuY29kZTtcbiAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKGNvZGUpO1xuICAgICAgICB9XG4gICAgICB9KTtcblxuICAgIHJldHVybiBkZWZlcnJlZC5wcm9taXNlO1xuICB9XG5cbiAgZ2V0QWNjZXNzVG9rZW4gKHR5cGUgPSAnYXV0aG9yaXphdGlvbl9jb2RlJykge1xuICAgIGNvbnN0IHtjbGllbnRJZDogY2xpZW50X2lkLCBjbGllbnRTZWNyZXQ6IGNsaWVudF9zZWNyZXR9ID0gdGhpcy5vcHRpb25zO1xuXG4gICAgcmV0dXJuIHRoaXNcbiAgICAgIC5nZXRBdXRob3JpemF0aW9uQ29kZSgpXG4gICAgICAudGhlbigoY29kZSkgPT4ge1xuICAgICAgICBjb25zdCBkZWZlcnJlZCA9IFEuZGVmZXIoKTtcblxuICAgICAgICByZXF1ZXN0XG4gICAgICAgICAgLnBvc3QodGhpcy5vcHRpb25zLmF1dGhFbmRwb2ludCArICd0b2tlbicpXG4gICAgICAgICAgLnF1ZXJ5KHtcbiAgICAgICAgICAgIGNvZGUsXG4gICAgICAgICAgICBjbGllbnRfaWQsXG4gICAgICAgICAgICBjbGllbnRfc2VjcmV0LFxuICAgICAgICAgICAgZ3JhbnRfdHlwZTogdHlwZVxuICAgICAgICAgIH0pXG4gICAgICAgICAgLmVuZCgoZXJyb3IsIHJlcykgPT4ge1xuICAgICAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICAgIGRlZmVycmVkLnJlamVjdChlcnJvcik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB0aGlzLl9yZWZyZXNoVG9rZW4gPSByZXMuYm9keS5yZWZyZXNoX3Rva2VuO1xuICAgICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHJlcy5ib2R5LmFjY2Vzc190b2tlbik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2U7XG4gICAgICB9KTtcbiAgfVxuXG4gIGdldE9wZW5Kb2JzIChmaWVsZHMgPSBbJyonXSkge1xuICAgIHJldHVybiB0aGlzXG4gICAgICAuc2V0dXAoKVxuICAgICAgLnRoZW4oKHJlc3RUb2tlbikgPT4ge1xuICAgICAgICB2YXIgZGVmZXJyZWQgPSBRLmRlZmVyKCk7XG5cbiAgICAgICAgcmVxdWVzdFxuICAgICAgICAgIC5nZXQodGhpcy5idWlsZFVybCgncXVlcnkvSm9iT3JkZXInKSlcbiAgICAgICAgICAucXVlcnkoe1xuICAgICAgICAgICAgQmhSZXN0VG9rZW46IHJlc3RUb2tlbixcbiAgICAgICAgICAgIGZpZWxkczogZmllbGRzLmpvaW4oJywnKSxcbiAgICAgICAgICAgIHdoZXJlOiAnaXNPcGVuPXRydWUnLFxuICAgICAgICAgICAgY291bnQ6IDQ5OVxuICAgICAgICAgIH0pXG4gICAgICAgICAgLmVuZCgoZXJyb3IsIHJlcykgPT4ge1xuICAgICAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICAgIGRlZmVycmVkLnJlamVjdChlcnJvcik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHJlcy5ib2R5LmRhdGEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBkZWZlcnJlZC5wcm9taXNlO1xuICAgICAgfSk7XG4gIH1cblxuICBnZXRSZXN0VG9rZW4gKCkge1xuICAgIHJldHVybiB0aGlzXG4gICAgICAubG9naW4oKVxuICAgICAgLnRoZW4oKHJlcykgPT4ge1xuICAgICAgICByZXR1cm4gcmVzLkJoUmVzdFRva2VuO1xuICAgICAgfSk7XG4gIH1cblxuICBzZW5kRmlsZSAoZW50aXR5LCBiYXNlNjRmaWxlLCBmaWxlbmFtZSkge1xuICAgIHJldHVybiB0aGlzXG4gICAgICAuc2V0dXAoKVxuICAgICAgLnRoZW4oKHJlc3RUb2tlbikgPT4ge1xuICAgICAgICBjb25zdCBkZWZlcnJlZCA9IFEuZGVmZXIoKTtcblxuICAgICAgICByZXF1ZXN0XG4gICAgICAgICAgLnB1dCh0aGlzLmJ1aWxkVXJsKCdmaWxlLycgKyBlbnRpdHkpKVxuICAgICAgICAgIC5zZW5kKHtcbiAgICAgICAgICAgIGV4dGVybmFsSUQ6ICdjdicsXG4gICAgICAgICAgICBmaWxlQ29udGVudDogYmFzZTY0ZmlsZSxcbiAgICAgICAgICAgIGZpbGVUeXBlOiAnU0FNUExFJyxcbiAgICAgICAgICAgIG5hbWU6IGZpbGVuYW1lXG4gICAgICAgICAgfSlcbiAgICAgICAgICAucXVlcnkoe1xuICAgICAgICAgICAgQmhSZXN0VG9rZW46IHJlc3RUb2tlblxuICAgICAgICAgIH0pXG4gICAgICAgICAgLmVuZCgoZXJyb3IsIHJlcykgPT4ge1xuICAgICAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICAgIGRlZmVycmVkLnJlamVjdChlcnJvcik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHJlcy5ib2R5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gZGVmZXJyZWQucHJvbWlzZTtcbiAgICAgIH0pO1xuICB9XG5cbiAgc2hvdWxkR2V0UmVzdFR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igpO1xuXG4gICAgICAgIHJlcXVlc3RcbiAgICAgICAgICAucHV0KHRoaXMuYnVpbGRVcmwoYGVudGl0eS9UZWFyc2hlZXQvJHt0ZWVyc2hlZXRJZH0vY2FuZGlkYXRlcy8ke2NhbmRpZGF0ZUlkcy5qb2luKCcsJyl9YCkpXG4gICAgICAgICAgLnF1ZXJ5KHtcbiAgICAgICAgICAgIEJoUmVzdFRva2VuOiByZXN0VG9rZW5cbiAgICAgICAgICB9KVxuICAgICAgICAgIC5lbmQoKGVycm9yLCByZXMpID0+IHtcbiAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShyZXMuYm9keSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2U7XG4gICAgICB9KTtcbiAgfVxuXG4gIGNyZWF0ZUNhbmRpZGF0ZSAoY2FuZGlkYXRlKSB7XG4gICAgcmV0dXJuIHRoaXNcbiAgICAgIC5zZXR1cCgpXG4gICAgICAudGhlbigocmVzdFRva2VuKSA9PiB7XG4gICAgICAgIGNvbnN0IGRlZmVycmVkID0gUS5kZWZlcigpO1xuXG4gICAgICAgIHJlcXVlc3RcbiAgICAgICAgICAucHV0KHRoaXMuYnVpbGRVcmwoJ2VudGl0eS9DYW5kaWRhdGUnKSlcbiAgICAgICAgICAucXVlcnkoe1xuICAgICAgICAgICAgQmhSZXN0VG9rZW46IHJlc3RUb2tlblxuICAgICAgICAgIH0pXG4gICAgICAgICAgLnNlbmQoY2FuZGlkYXRlKVxuICAgICAgICAgIC5lbmQoKGVycm9yLCByZXMpID0+IHtcbiAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QoZXJyb3IpO1xuICAgICAg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ICAgICAgICBhY2Nlc3NfdG9rZW46IGFjY2Vzc1Rva2VuXG4gICAgICAgICAgfSlcbiAgICAgICAgICAuZW5kKChlcnJvciwgcmVzKSA9PiB7XG4gICAgICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgZGVmZXJyZWQucmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRoaXMuX2xvZ2luQXQgPSBuZXcgRGF0ZSgpLmdldFRpbWUoKTtcbiAgICAgICAgICAgICAgdGhpcy5fcmVzdFVybCA9IHJlcy5ib2R5LnJlc3RVcmw7XG4gICAgICAgICAgICAgIHRoaXMuX0JoUmVzdFRva2VuID0gcmVzLmJvZHkuQmhSZXN0VG9rZW47XG4gICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUocmVzLmJvZHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBkZWZlcnJlZC5wcm9taXNlO1xuICAgICAgfSk7XG5cbiAgfVxuXG4gIGdldEF1dGhvcml6YXRpb25Db2RlICgpIHtcbiAgICBjb25zdCBkZWZlcnJlZCA9IFEuZGVmZXIoKTtcbiAgICBjb25zdCB7dXNlcm5hbWUsIHBhc3N3b3JkLCBjbGllbnRJZDogY2xpZW50X2lkfSA9IHRoaXMub3B0aW9ucztcblxuICAgIHJlcXVlc3RcbiAgICAgIC5wb3N0KHRoaXMub3B0aW9ucy5hdXRoRW5kcG9pbnQgKyAnYXV0aG9yaXplJylcbiAgICAgIC50eXBlKCdmb3JtJylcbiAgICAgIC5xdWVyeSh7XG4gICAgICAgIGNsaWVudF9pZCxcbiAgICAgICAgcmVzcG9uc2VfdHlwZTogJ2NvZGUnLFxuICAgICAgICBhY3Rpb246ICdMb2dpbidcbiAgICAgIH0pXG4gICAgICAuc2VuZCh7XG4gICAgICAgIHVzZXJuYW1lLFxuICAgICAgICBwYXNzd29yZFxuICAgICAgfSlcbiAgICAgIC5lbmQoKGVycm9yLCByZXMpID0+IHtcbiAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgZGVmZXJyZWQucmVqZWN0KGVycm9yKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjb25zdCBjb2RlID0gdXJsLnBhcnNlKHJlcy5yZWRpcmVjdHNbMF0sIHRydWUpLnF1ZXJ5LmNvZGU7XG4gICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShjb2RlKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICByZXR1cm4gZGVmZXJyZWQucHJvbWlzZTtcbiAgfVxuXG4gIGdldEFjY2Vzc1Rva2VuICh0eXBlID0gJ2F1dGhvcml6YXRpb25fY29kZScpIHtcbiAgICBjb25zdCB7Y2xpZW50SWQ6IGNsaWVudF9pZCwgY2xpZW50U2VjcmV0OiBjbGllbnRfc2VjcmV0fSA9IHRoaXMub3B0aW9ucztcblxuICAgIHJldHVybiB0aGlzXG4gICAgICAuZ2V0QXV0aG9yaXphdGlvbkNvZGUoKVxuICAgICAgLnRoZW4oKGNvZGUpID0+IHtcbiAgICAgICAgY29uc3QgZGVmZXJyZWQgPSBRLmRlZmVyKCk7XG5cbiAgICAgICAgcmVxdWVzdFxuICAgICAgICAgIC5wb3N0KHRoaXMub3B0aW9ucy5hdXRoRW5kcG9pbnQgKyAndG9rZW4nKVxuICAgICAgICAgIC5xdWVyeSh7XG4gICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgY2xpZW50X2lkLFxuICAgICAgICAgICAgY2xpZW50X3NlY3JldCxcbiAgICAgICAgICAgIGdyYW50X3R5cGU6IHR5cGVcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5lbmQoKGVycm9yLCByZXMpID0+IHtcbiAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhpcy5fcmVmcmVzaFRva2VuID0gcmVzLmJvZHkucmVmcmVzaF90b2tlbjtcbiAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShyZXMuYm9keS5hY2Nlc3NfdG9rZW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBkZWZlcnJlZC5wcm9taXNlO1xuICAgICAgfSk7XG4gIH1cblxuICBnZXRPcGVuSm9icyAoZmllbGRzID0gWycqJ10pIHtcbiAgICByZXR1cm4gdGhpc1xuICAgICAgLnNldHVwKClcbiAgICAgIC50aGVuKChyZXN0VG9rZW4pID0+IHtcbiAgICAgICAgdmFyIGRlZmVycmVkID0gUS5kZWZlcigpO1xuXG4gICAgICAgIHJlcXVlc3RcbiAgICAgICAgICAuZ2V0KHRoaXMuYnVpbGRVcmwoJ3F1ZXJ5L0pvYk9yZGVyJykpXG4gICAgICAgICAgLnF1ZXJ5KHtcbiAgICAgICAgICAgIEJoUmVzdFRva2VuOiByZXN0VG9rZW4sXG4gICAgICAgICAgICBmaWVsZHM6IGZpZWxkcy5qb2luKCcsJyksXG4gICAgICAgICAgICB3aGVyZTogJ2lzT3Blbj10cnVlJyxcbiAgICAgICAgICAgIGNvdW50OiA0OTlcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5lbmQoKGVycm9yLCByZXMpID0+IHtcbiAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShyZXMuYm9keS5kYXRhKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gZGVmZXJyZWQucHJvbWlzZTtcbiAgICAgIH0pO1xuICB9XG5cbiAgZ2V0UmVzdFRva2VuICgpIHtcbiAgICByZXR1cm4gdGhpc1xuICAgICAgLmxvZ2luKClcbiAgICAgIC50aGVuKChyZXMpID0+IHtcbiAgICAgICAgcmV0dXJuIHJlcy5CaFJlc3RUb2tlbjtcbiAgICAgIH0pO1xuICB9XG5cbiAgc2VuZEZpbGUgKGVudGl0eSwgYmFzZTY0ZmlsZSwgZmlsZW5hbWUpIHtcbiAgICByZXR1cm4gdGhpc1xuICAgICAgLnNldHVwKClcbiAgICAgIC50aGVuKChyZXN0VG9rZW4pID0+IHtcbiAgICAgICAgY29uc3QgZGVmZXJyZWQgPSBRLmRlZmVyKCk7XG5cbiAgICAgICAgcmVxdWVzdFxuICAgICAgICAgIC5wdXQodGhpcy5idWlsZFVybCgnZmlsZS8nICsgZW50aXR5KSlcbiAgICAgICAgICAuc2VuZCh7XG4gICAgICAgICAgICBleHRlcm5hbElEOiAnY3YnLFxuICAgICAgICAgICAgZmlsZUNvbnRlbnQ6IGJhc2U2NGZpbGUsXG4gICAgICAgICAgICBmaWxlVHlwZTogJ1NBTVBMRScsXG4gICAgICAgICAgICBuYW1lOiBmaWxlbmFtZVxuICAgICAgICAgIH0pXG4gICAgICAgICAgLnF1ZXJ5KHtcbiAgICAgICAgICAgIEJoUmVzdFRva2VuOiByZXN0VG9rZW5cbiAgICAgICAgICB9KVxuICAgICAgICAgIC5lbmQoKGVycm9yLCByZXMpID0+IHtcbiAgICAgICAgICAgIGlmIChlcnJvcikge1xuICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShyZXMuYm9keSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2U7XG4gICAgICB9KTtcbiAgfVxuXG4gIHNob3VsZEdldFJlc3RUb2tlbiAoKSB7XG4gICAgdmFyIHNob3VsZCA9IGZhbHNlO1xuICAgIGNvbnN0IG5vdyA9IG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xuXG4gICAgLy8gSWYgbW9yZSB0aGFuIDggbWludXRlcyBwYXNzZWQgd2Ugc2hvdWxkIGdldCBhIG5ldyB0b2tlblxuICAgIGlmICghdGhpcy5fbG9naW5BdCB8fCBub3cgLSB0aGlzLl9sb2dpbkF0ID4gOCAqIDYwICogMTAwMCkge1xuICAgICAgc2hvdWxkID0gdHJ1ZTtcbiAgICB9XG5cbiAgICByZXR1cm4gc2hvdWxkO1xuICB9XG5cbiAgc2V0dXAgKCkge1xuICAgIHJldHVybiBRKClcbiAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgdmFyIHJlc3VsdDtcbiAgICAgICAgaWYgKHRoaXMuc2hvdWxkR2V0UmVzdFRva2VuKCkpIHtcbiAgICAgICAgICByZXN1bHQgPSB0aGlzLmdldFJlc3RUb2tlbigpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJlc3VsdCA9IHRoaXMuX0JoUmVzdFRva2VuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICB9KTtcbiAgfVxuXG59XG4iXX0=
{
"name": "bullhorn-client",
"version": "1.0.1",
"version": "1.1.0",
"description": "Bullhorn client",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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