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 🙏

© 2026 – Pkg Stats / Ryan Hefner

deputy-api-gateway

v1.0.0-dev.8

Published

A Gateway to the Deputy.com API.

Readme

deputy-api-gateway

Build Status Bundle Size Requirements Status

A Gateway to the Deputy.com API.

Works with the current version (v1) of the API.

The module provides a class for executing HTTP requests against the Deputy.com API.

Installation

npm

npm i deputy-api-gateway

Git

git clone https://github.com/jfavrod/deputy-api-gateway.git

Usage

To use the DeputyGateway class, provide the constructor with your company's Deputy.com subdomain and your permanent access token.

Get Request

const deputy = new DeputyGateway('mycompany.na.deputy.com',
    process.env.DEPUTY_TOKEN);

deputy.get('my/location')
.then(data => console.log(data);

Response

{
    "Id": 4,
    "Portfolio": null,
    "Code": "ZCF",
    "Active": true,
    "ParentCompany": 0,
    "CompanyName": "Zen Coffee",
    "TradingName": null,
    "BusinessNumber": null,
    "CompanyNumber": null,
    "IsWorkplace": true,
    "IsPayrollEntity": true,
    "PayrollExportCode": null,
    "Address": 53,
    "Contact": null,
    "Creator": 69,
    "Created": "2012-12-21T11:19:30+11:00",
    "Modified": "2016-05-27T04:14:27+10:00",
    "_DPMetaData": {
	"System": "Company",
	"CreatorInfo": {
	    "Id": 69,
	    "DisplayName": "Ashik Ahmed",
	    "EmployeeProfile": 69,
	    "Employee": 69,
	    "Photo": "https://d1m66yh0amo3la.cloudfront.net/deputec_my_deputy/-135x135_eea8be7cebad8d1cf7b924f8d18a5545.jpg?Expires=1550994802&Key-Pair-Id=APKAINP5UVPK4IGBHXOQ&Signature=EkeOr48op2d94BTaY2zY7G2CIBH4l~SgnFWuji~zuM8A5Gew0RHhUqKnVJmClA3w6mvJ7iEzYEdKiOMfjCDPavn3XkXOMVcPKooXSiKySEZfoHwCMKfGekO5cu93mmfkmjvOUw2ZNuh8jk85mhS~mq4l2VRKXOXfbmFygfyqNmA_"
	},
	"AddressObject": {
	    "Id": 53,
	    "ContactName": null,
	    "UnitNo": null,
	    "StreetNo": null,
	    "SuiteNo": null,
	    "PoBox": null,
	    "Street1": "43 Kembla St ,Wollongong",
	    "Street2": null,
	    "City": null,
	    "State": "150",
	    "Postcode": null,
	    "Country": 13,
	    "Phone": null,
	    "Notes": "Used for AppStore testing! Don't remove",
	    "Format": null,
	    "Saved": null,
	    "Creator": 34,
	    "Created": "2016-04-13T08:06:35+10:00",
	    "Modified": "2016-04-13T08:06:35+10:00",
	    "Print": "43 Kembla St ,Wollongong\n"
	},
	"Geo": {
	    "Id": 1081,
	    "Orm": "DeputecCompany",
	    "RecId": 4,
	    "Longitude": 150.89800956273,
	    "Latitude": -34.422948808035,
	    "No": null,
	    "Street": null,
	    "Suburb": null,
	    "State": null,
	    "Postcode": null,
	    "Country": null,
	    "Creator": 69,
	    "Created": "2016-05-27T05:30:42+10:00",
	    "Modified": "2016-05-27T05:30:42+10:00"
	},
	"CustomData": {
	    "GooglePlaceId": null
	}
    }
}

POST Request

const deputy = new DeputyGateway('mycompany.na.deputy.com',
    process.env.DEPUTY_TOKEN);

deputy.post('/resource/Employee/10', {"Active": false})
.then(data => console.log(data);

Response

 {
   "Id": 10,
   "Company": 1,
   "FirstName": "Employee",
   "LastName": "Ten",
   "DisplayName": "Employee Ten",
   "OtherName": null,
   "Salutation": null,
   "MainAddress": null,
   "PostalAddress": null,
   "Contact": 1176,
   "EmergencyAddress": null,
   "DateOfBirth": null,
   "Gender": 1,
   "Photo": 931,
   "UserId": 1,
   "JobAppId": null,
   "Active": false,
   "StartDate": "2017-11-07T00:00:00-08:00",
   "TerminationDate": null,
   "StressProfile": 6,
   "Position": null,
   "HigherDuty": null,
   "Role": 1,
   "AllowAppraisal": true,
   "HistoryId": 5233,
   "CustomFieldData": null,
   "Creator": 1,
   "Created": "2017-11-06T12:04:00-08:00",
   "Modified": "2019-01-21T11:33:28-08:00"
 }

TypeScript

import DeputyGateway from "deputy-api-gateway";

const deputy = new DeputyGateway('mycompany.na.deputy.com',
    process.env.DEPUTY_TOKEN);

deputy.get('my/location')
.then(data => console.log(data);