Socket
Socket
Sign inDemoInstall

blockscore

Package Overview
Dependencies
0
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.2.0 to 4.0.0

test/candidates.js

76

lib/main.js

@@ -56,4 +56,4 @@ "use strict";

'Authorization': auth,
'Accept': 'application/vnd.blockscore+json;version=3',
'User-Agent': 'blockscore-node/3.2.0 (https://github.com/BlockScore/blockscore-node)',
'Accept': 'application/vnd.blockscore+json;version=4',
'User-Agent': 'blockscore-node/4.0.0 (https://github.com/BlockScore/blockscore-node)',
'Content-Type': 'application/json',

@@ -104,15 +104,15 @@ 'Content-Length': request_data.length

return {
verifications: {
people: {
create: function(data, cb) {
post("/verifications", data, cb);
post("/people", data, cb);
},
retrieve: function(verification_id, cb) {
if (!(verification_id && typeof verification_id === 'string')) {
return cb(new Error("verification_id required"));
retrieve: function(person_id, cb) {
if (!(person_id && typeof person_id === 'string')) {
return cb(new Error("person_id required"));
}
get("/verifications/" + encodeURIComponent(verification_id), {}, cb);
get("/people/" + encodeURIComponent(person_id), {}, cb);
},
list: function(count, offset, cb) {
var nArgs = normalizeArguments(arguments);
get("/verifications", {
get("/people", {
count: nArgs.count,

@@ -123,12 +123,12 @@ offset: nArgs.offset

},
questions: {
create: function(verification_id, cb) {
if (!(verification_id && typeof verification_id === 'string')) {
return cb(new Error("verification_id required"));
question_sets: {
create: function(person_id, cb) {
if (!(person_id && typeof person_id === 'string')) {
return cb(new Error("person_id required"));
}
var data = { verification_id: verification_id };
post("/questions", data, cb);
var data = { person_id: person_id };
post("/question_sets", data, cb);
},
score: function(data, cb) {
post("/questions/score", data, cb);
post("/question_sets/" + encodeURIComponent(data.id) + "/score", data, cb);
},

@@ -139,24 +139,24 @@ retrieve: function(question_set_id, cb) {

}
get("/questions/" + encodeURIComponent(question_set_id), {}, cb);
get("/question_sets/" + encodeURIComponent(question_set_id), {}, cb);
}
},
watchlist_candidates: {
candidates: {
create: function(data, cb) {
post("/watchlist_candidates", data, cb);
post("/candidates", data, cb);
},
update: function (watchlist_candidate_id, data, cb) {
patch('/watchlist_candidates/' + watchlist_candidate_id, data, cb);
update: function (candidate_id, data, cb) {
patch('/candidates/' + candidate_id, data, cb);
},
del: function(watchlist_candidate_id, cb) {
del('/watchlist_candidates/' + encodeURIComponent(watchlist_candidate_id), {}, cb);
del: function(candidate_id, cb) {
del('/candidates/' + encodeURIComponent(candidate_id), {}, cb);
},
retrieve: function(watchlist_candidate_id, cb) {
if (!(watchlist_candidate_id && typeof watchlist_candidate_id === 'string')) {
return cb(new Error("watchlist_candidate_id required"));
retrieve: function(candidate_id, cb) {
if (!(candidate_id && typeof candidate_id === 'string')) {
return cb(new Error("candidate_id required"));
}
get("/watchlist_candidates/" + encodeURIComponent(watchlist_candidate_id), {}, cb);
get("/candidates/" + encodeURIComponent(candidate_id), {}, cb);
},
list: function(count, offset, cb) {
var nArgs = normalizeArguments(arguments);
get("/watchlist_candidates/", {
get("/candidates/", {
count: nArgs.count,

@@ -166,13 +166,13 @@ offset: nArgs.offset

},
history: function (watchlist_candidate_id, cb) {
if (!(watchlist_candidate_id && typeof watchlist_candidate_id === 'string')) {
return cb(new Error("watchlist_candidate_id required"));
history: function (candidate_id, cb) {
if (!(candidate_id && typeof candidate_id === 'string')) {
return cb(new Error("candidate_id required"));
}
get("/watchlist_candidates/" + encodeURIComponent(watchlist_candidate_id) + '/history', {}, cb);
get("/candidates/" + encodeURIComponent(candidate_id) + '/history', {}, cb);
},
hits: function (watchlist_candidate_id, cb) {
if (!(watchlist_candidate_id && typeof watchlist_candidate_id === 'string')) {
return cb(new Error("watchlist_candidate_id required"));
hits: function (candidate_id, cb) {
if (!(candidate_id && typeof candidate_id === 'string')) {
return cb(new Error("candidate_id required"));
}
get("/watchlist_candidates/" + encodeURIComponent(watchlist_candidate_id) + '/hits', {}, cb);
get("/candidates/" + encodeURIComponent(candidate_id) + '/hits', {}, cb);
}

@@ -182,4 +182,4 @@ },

search: function (data, cb) {
if (!(data.watchlist_candidate_id && typeof data.watchlist_candidate_id === 'string')) {
return cb(new Error("watchlist_candidate_id required"));
if (!(data.candidate_id && typeof data.candidate_id === 'string')) {
return cb(new Error("candidate_id required"));
}

@@ -186,0 +186,0 @@ post("/watchlists", data, cb);

@@ -14,5 +14,8 @@ {

"know your customer",
"verification"
"verification",
"id verification",
"watchlist scanning",
"watchlists"
],
"version": "3.2.0",
"version": "4.0.0",
"homepage": "https://github.com/blockscore/blockscore-node",

@@ -19,0 +22,0 @@ "repository": {

# blockscore-node
This is the official library for Node.JS clients of the BlockScore API. [Click here to read the full documentation](https://manage.blockscore.com/docs).
This is the official library for Node.JS clients of the BlockScore API. [Click here to read the full documentation](http://docs.blockscore.com/v4.0/node/).

@@ -21,14 +21,14 @@ ## Install

## Verifications
## People
### List all verifications
### List all people
```javascript
blockscore.verifications.list({}, callback);
blockscore.people.list({}, callback);
```
### List `5` verifications
### List `5` people
```javascript
blockscore.verifications.list({
blockscore.people.list({
count: 5

@@ -38,27 +38,24 @@ }, callback);

### View a verification by ID
### View a person by ID
```javascript
blockscore.verifications.retrieve(verification_id, callback);
blockscore.people.retrieve(person_id, callback);
```
### Create a new verification
### Create a new person
```javascript
blockscore.verifications.create({
date_of_birth: '1993-08-23',
identification: {
ssn: "0000"
},
address: {
street1: "1 Infinite Loop",
city: "Cupertino",
state: "CA",
postal_code: "95014",
country_code: "US"
},
name: {
first: "Alain",
last: "Meier"
}
blockscore.people.create({
name_first: "John",
name_last: "Doe",
birth_year: '1993',
birth_month: '01',
birth_day: '13',
document_type: "ssn",
document_value: "0000",
address_street1: "3515 Woodridge Lane",
address_city: "Memphis",
address_subdivision: "TN",
address_postal_code: "38115",
address_country_code: "US"
}, callback);

@@ -72,3 +69,3 @@ ```

```javascript
blockscore.questions.create(verification_id, callback);
blockscore.question_sets.create(person_id, callback);
```

@@ -80,3 +77,3 @@

var data = {
verification_id: response.verification_id,
person_id: response.person_id,
question_set_id: response.id,

@@ -106,3 +103,3 @@ answers: [

};
blockscore.questions.score(data, callback);
blockscore.question_sets.score(data, callback);
```

@@ -136,42 +133,37 @@

blockscore.companies.create({
"entity_name": "BlockScore",
"tax_id": "123410000",
"incorp_date": "1980-08-25",
"incorp_state": "DE",
"incorp_country_code": "US",
"incorp_type": "corporation",
"dbas": "BitRemit",
"registration_number": "123123123",
"email": "test@example.com",
"url": "https://blockscore.com",
"phone_number": "6505555555",
"ip_address": "67.160.8.182",
"address": {
"street1": "123 Fake Streets",
"street2": null,
"city": "Stanford",
"state": "CA",
"postal_code": "94305",
"country_code": "US"
},
"details": {
"entity_name": "match",
"tax_id": "match",
"ofac": "no_match"
}
"entity_name": "BlockScore",
"tax_id": "123410000",
"incorporation_year": "1980",
"incorporation_month": "8",
"incorporation_day": "25",
"incorporation_state": "DE",
"incorporation_country_code": "US",
"incorporation_type": "corporation",
"dbas": "BitRemit",
"registration_number": "123123123",
"email": "test@example.com",
"url": "https://blockscore.com",
"phone_number": "6505555555",
"ip_address": "67.160.8.182",
"address_street1": "123 Fake Streets",
"address_street2": null,
"address_city": "Stanford",
"address_subdivision": "CA",
"address_postal_code": "94305",
"address_country_code": "US"
}, callback);
```
## Watchlist Candidates
## Candidates
### List all watchlist candidates
### List all candidates
```javascript
blockscore.watchlist_candidates.list({}, callback);
blockscore.candidates.list({}, callback);
```
### List `3` watchlist candidates
### List `3` candidates
```javascript
blockscore.watchlist_candidates.list({
blockscore.candidates.list({
count: 3

@@ -181,31 +173,25 @@ }, callback);

### View a watchlist candidate by ID
### View a candidate by ID
```javascript
blockscore.watchlist_candidates.retrieve(watchlist_candidate_id, callback);
blockscore.candidates.retrieve(candidate_id, callback);
```
### Create a new watchlist candidate
### Create a new candidate
```javascript
blockscore.watchlist_candidates.create({
date_of_birth: '1993-08-23',
identification: {
ssn: "0000"
},
address: {
street1: "1 Infinite Loop",
city: "Cupertino",
state: "CA",
postal_code: "95014",
country_code: "US"
},
name: {
first: "Alain",
last: "Meier"
}
blockscore.candidates.create({
date_of_birth: '1993-01-13',
ssn: "0000",
address_street1: "3515 Woodridge Lane",
address_city: "Memphis",
address_state: "TN",
address_postal_code: "38115",
address_country_code: "US",
name_first: "Joe",
name_last: "Schmo"
}, callback);
```
### Update a watchlist candidate
### Update a candidate

@@ -215,3 +201,3 @@ Only the information you send us will be updated - the rest will remain the same.

```javascript
blockscore.watchlist_candidates.update(watchlist_candidate.id, {
blockscore.candidates.update(candidate.id, {
address_state:'CA',

@@ -221,17 +207,17 @@ }, callback);

### View a watchlist candidate's past hits
### View a candidate's past hits
```javascript
blockscore.watchlist_candidates.hits(watchlist_candidate.id, callback);
blockscore.candidates.hits(candidate.id, callback);
```
### Delete a watchlist candidate from scan list
### Delete a candidate from scan list
```javascript
blockscore.watchlist_candidates.del(watchlist_candidate.id, callback);
blockscore.candidates.del(candidate.id, callback);
```
### View a watchlist candidate's revision history
### View a candidate's revision history
```javascript
blockscore.watchlist_candidates.history(watchlist_candidate.id, callback);
blockscore.candidates.history(candidate.id, callback);
```

@@ -243,7 +229,7 @@

Creates a new verification, runs it through our verification process, and returns a list of all associated matches.
Creates a new person, runs it through our verification process, and returns a list of all associated matches.
```javascript
blockscore.watchlists.search({
watchlist_candidate_id: id, // required
candidate_id: id, // required
match_type: type // optional

@@ -250,0 +236,0 @@ }, callback);

@@ -21,6 +21,8 @@ var vows = require('vows'),

"tax_id": "123410000",
"incorp_date": "1980-08-25",
"incorp_state": "DE",
"incorp_country_code": "US",
"incorp_type": "corporation",
"incorporation_year": "1980",
"incorporation_month": "8",
"incorporation_day": "25",
"incorporation_state": "DE",
"incorporation_country_code": "US",
"incorporation_type": "corporation",
"dbas": "BitRemit",

@@ -32,15 +34,8 @@ "registration_number": "123123123",

"ip_address": "67.160.8.182",
"address": {
"street1": "123 Fake Streets",
"street2": null,
"city": "Stanford",
"state": "CA",
"postal_code": "94305",
"country_code": "US"
},
"details": {
"entity_name": "match",
"tax_id": "match",
"ofac": "no_match"
}
"address_street1": "123 Fake Streets",
"address_street2": null,
"address_city": "Stanford",
"address_subdivision": "CA",
"address_postal_code": "94305",
"address_country_code": "US"
}, this.callback);

@@ -72,4 +67,4 @@ },

'when listed with no parameters': function(err, result) {
assert.instanceOf(result, Array);
assert.isNotZero(result.length);
assert.instanceOf(result.data, Array);
assert.isNotZero(result.data.length);
}

@@ -84,5 +79,5 @@ },

'when given count of one': function(err, result) {
assert.isNotZero(result.length);
assert.isTrue(result.length === 1);
assert.isDefined(result[0].id);
assert.isNotZero(result.data.length);
assert.isTrue(result.data.length === 1);
assert.isDefined(result.data[0].id);
}

@@ -89,0 +84,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc