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

@enochmk/cbs-client

v1.0.0

Published

CBS (Core Billing System) SOAP API client for AirtelTigo

Readme

@enochmk/cbs-client

CBS (Core Billing System) SOAP API client for AirtelTigo.

Installation

npm install @enochmk/cbs-client

Quick Start

import { CbsClient } from '@enochmk/cbs-client';

const client = new CbsClient({
  baseUrl: 'http://10.76.130.100:7782',
  username: 'your-username',
  password: 'your-password',
});

API

integrationEnquiry(msisdn, options?)

Query subscriber balance, state, products, and services.

const result = await client.integrationEnquiry('271004887');

// Access balance records
const balances = result.IntegrationEnquiryResult?.BalanceRecordList?.BalanceRecord;

// Access subscriber state
const state = result.IntegrationEnquiryResult?.SubscriberState;

// Access products
const products = result.IntegrationEnquiryResult?.SubscriberInfo?.Product;

createSubscriber(msisdn, options?)

Create a new subscriber.

const result = await client.createSubscriber('271004887', {
  lang: 1,
  paidMode: '0',
  mainProductId: '2018254719',
});

deleteSubscriber(msisdn, options?)

Delete a subscriber.

const result = await client.deleteSubscriber('271004887');

queryBasicInfo(msisdn, options?)

Query basic subscriber information.

const result = await client.queryBasicInfo('271004887');
const customer = result.QueryBasicInfoResult?.Customer;

Options

CbsClientOptions

| Property | Type | Required | Description | | ------------- | -------- | -------- | ---------------------------------------------------------------------- | | baseUrl | string | Yes | CBS server base URL (e.g., http://10.76.130.100:7782) | | username | string | Yes | Authentication username | | password | string | Yes | Authentication password | | timeout | number | No | Request timeout in ms (default: 15000) | | successCode | string | No | Success result code (default: 405000000) | | logger | Logger | No | Logger object with info, warn, error, debug, verbose methods |

MSISDN Format

MSISDNs are automatically normalized to 9 digits. Accepts:

  • 9 digits: 271004887
  • 10 digits: 2710048870
  • 12 digits: 233271004887

Types

All response types are fully typed:

import type {
  IntegrationEnquiryResponse,
  NewSubscriberResponse,
  DeleteSubscriberResponse,
  QueryBasicInfoResponse,
  BalanceRecord,
  Subscriber,
  Product,
  Service,
  Customer,
} from '@enochmk/cbs-client';

Error Handling

The client throws HttpError on failures:

try {
  const result = await client.integrationEnquiry('271004887');
} catch (err: any) {
  if (err.status === 400) {
    // Invalid MSISDN
  } else if (err.status === 422) {
    // CBS error (check err.message for details)
  } else if (err.status === 502) {
    // Network or SOAP error
  }
}

License

MIT