npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-checkr

v0.0.6

Published

API wrapper for checkr.io

Downloads

7

Readme

node-checkr

Note: This client is in alpha stage

Node Checkr is an unofficial, promise-based client for interacting with the Checkr.io platform.

Documentation for the Checkr API can be found here.

Getting started

yarn add node-checkr

Create a new account with Checkr and get you API_key from you account's settings.

import checkr from 'node-checkr';
const Checkr = new checkr(API_KEY);

Objects

Candidates

create(params)

Creates a candidate do run screenings on. Required parameters might change with the screening to be run. Check the official docs for details.

Supported params:

| Param | Type | Required | Notes | |:---------------------:|:-------------:|:--------:|:-------------:| | first_name | string | x | | | middle_name | string | | | | last_name | string | x | | | email | string | x | | | phone | alpha-numeric | | | | zipcode | alpha-numeric | | | | dob | string | | date of birth | | ssn | alpha-numeric | | | | driver_license_number | string | | | | driver_license_state | string | | ||

  checkr.Candidates
    .create({
      first_name: 'John',
      middle_name: 'Smith',
      email: '[email protected]',
      last_name: 'Doe',
      dob: '1970-01-22',
      driver_license_number: 'F211165',
      driver_license_state: 'CA'
    })
    .then(candidate => console.log(candidate))
    .catch(err => console.log(err));
update(id, params)

Updates a candidate's information, given the id. Same params as createCandidate.

  checkr.Candidates
    .update('ABC123', {
      first_name: 'John',
      last_name: 'Doe',
    })
    .then(res => console.log(res))
    .catch(err => console.log(err));

Screenings

ssn_trace(id)

Retrieves an existing SSN trace.

  checkr.Screenings
    .ssn_trace('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
sex_offender(id)

Retrieves an existing Sex Offender search.

  checkr.Screenings
    .sex_offender('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
global_watchlist(id)

Retrieves an existing global watchlist search.

  checkr.Screenings
    .global_watchlist('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
national_criminal(id)

Retrieves an existing national criminal search.

  checkr.Screenings
    .national_criminal('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
county_criminal(id)

Retrieves an existing county criminal search.

  checkr.Screenings
    .county_criminal('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
state_criminal(id)

Retrieves an existing state criminal search.

  checkr.Screenings
    .state_criminal('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
motor_vehicle(id)

Retrieves an existing Motor Vehicle Report.

  checkr.Screenings
    .motor_vehicle('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
education_verifications(id)

Retrieves an existing education verification.

  checkr.Screenings
    .education_verifications('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
employment_verifications(id)

Retrieves an existing employment verification.

  checkr.Screenings
    .employment_verifications('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));

Packages

list()

Returns the list of packages available on your account.

  checkr.Packages
    .list()
    .then(res => console.log(res))
    .catch(err => console.log(err));
retrieve(id)

Retrieves a particular package, given the id.

  checkr.Packages
    .retrieve('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
create(params)

Creates a package. Required parameters might change, check the official docs for details.

Supported params:

| Param | Type | Required | |:---------------------:|:-------------:|:--------:| | name | string | x |
| slug | string | x |
| screenings | Array(screenings) | x ||

  checkr.Packages
    .create({
      name: 'Motor Vehicle Report',
      slug: 'mvr_only',
      screenings: [{ type: 'motor_vehicle_report', subtype: null }]
    })
    .then(res => console.log(res))
    .catch(err => console.log(err));

Reports

retrieve(id)

Retrieves a particular report, given the id.

  checkr.Reports
    .retrieve('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
create(package_slug, candidate_id)

Creates a report for the candidate specified, using the package.

  checkr.Reports
    .create('mvr_only', 'ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
update(id, params)

Updates a report.

Supported params:

| Param | Type | |:---------------------:|:-------------:| | package | string |
| adjudication | string |
Either package or adjudication is required.

  checkr.Packages
    .update('ABC123', {
      package: 'mvr_only'
    })
    .then(res => console.log(res))
    .catch(err => console.log(err));

To do

  • Tests for screenings [ ]

Testing & Development

  • Clone repository
  git clone https://github.com/franciscofsales/node-checkr.git
  • Install dependencies
  yarn install
  • Setup API Key
  • copy .env.example into .env and input your API key.
  • Run test set
  yarn run test

Develop and keep tests green.

NOTE: packages cannot be created multiple times with the same slug, take that into account on package related tests.

License

This Library is licensed under the MIT license.