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

@debugger_supreme/dunbapi

v0.0.1-beta.3

Published

<p align="center"> <h1> Dun & Bradstreet Tanzania Credit Bureau (TZ) API Wrapper for Nodejs (still in beta) </h1> </p>

Downloads

8

Readme

The Unofficial Dun & Bradstreet Tanzania Credit Bureau API wrapper for Nodejs.

  • WSDL (requires authentication)

Installation

Install via npm

npm i @debugger_supreme/dunbapi

or install a particular beta version

npm install --save @debugger_supreme/[email protected]

Configuration

Authentication

Configure your api username and password in .env file as follows

DUNB_USERNAME=your_api_username
DUNB_PASSWORD=your_api_password

URL

The package config file comes with default API url pointing to production.

DUNB_WSDL=https://cweb.dnbtanzania.com/TanWebsite/Services/LiveRequestService.svc?wsdl

To point to test environment set the DUNB_WSDL key in your .env file to point to test url given. (See below)

DUNB_WSDL=url

Remember

  • The WSDL url should end with a ?wsdl suffix, don't forget to add this if you haven't already.
  • You need to first configure correct Authentication details above for your respective environment.

Usage

  1. searchMultiHit Consumer Report done
  2. singleHit Consumer Report developing

SearchMultiHit

Method searchMultiHit(params) queries client information by


export enum PURPOSE_OF_INQUIRY {
    "New Credit Application" = 1,
    "New Guarantor",
    "Review of Existing Customer",
    "Regulatory Audit",

}

export type _PURPOSE_OF_INQUIRY = 1 | 2 | 3 | 4;

interface SEARCH_PARAMETERS {
    NAME: string;
    IDENTIFIER_NUMBER?: string;
    MOBILE?: string;
    SURROGATES: {
        NATIONALITY: NATIONALITIES;
        DATEOFBIRTH: string;
    },
    ACCOUNTNUMBER?: string,
    CUSTOMERID?: string,
    PURPOSE_OF_INQUIRY: _PURPOSE_OF_INQUIRY

}
import DB from "@debugger_supreme/dunbapi";

const client = new DB({
  username: proces.env.CREDIT_INFO_USERNAME,
  password: process.env.CREDIT_INFO_PASSWORD,
});

// 1
client
  .searchConsumerMultiHit({
    NAME: "Paul SIRIL MINJA",
    PURPOSE_OF_INQUIRY: 1,
    SURROGATES: {
        NATIONALITY: "TZ",
        DATEOFBIRTH: "15-Jun-1972"
    }
  })
  .then(function (results) {
    console.log({ results  });
  });

SingleHit

// 2: Pull report for a client using entity key and search request id from step 1

client.getReportConsumer({
    ENTITY_KEY: '1856250',
    SEARCH_REQUEST_ID: '3024716'
}).then(response => {
    console.log({
      response
    })
})

TODO

  1. [ ] expose types
  2. [x] SearchMultiHit Report
  3. [x] SingleHit Report
  4. [ ] Error Handling
  5. [ ] Commercial Search