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

verity-api

v1.0.1

Published

TypeScript/JavaScript SDK for Verity API - Medicare coverage policies and prior authorization

Readme

Verity TypeScript SDK

Official TypeScript and JavaScript client for the Verity API: Medicare coverage policies, medical code intelligence, prior authorization checks, claim validation, compliance review, and drug formulary evidence.

The SDK is Promise-based, fully typed, and uses native fetch with an Effect-backed request layer for response parsing, timeouts, and safe retries.

Installation

The current public npm package is [email protected]. This repository is prepared for the next 1.0.1 release with the Effect-backed request layer and release automation.

npm install verity-api

Requires Node.js 18 or newer, or a modern browser runtime with fetch.

Quick Start

import { VerityClient } from 'verity-api';

const client = new VerityClient(process.env.VERITY_API_KEY!);

const code = await client.lookupCode({
  code: '76942',
  include: ['rvu', 'policies'],
});

console.log(code.data?.description);

const priorAuth = await client.checkPriorAuth({
  procedureCodes: ['76942'],
  diagnosisCodes: ['M54.5'],
  state: 'TX',
  payer: 'medicare',
});

console.log(priorAuth.data?.pa_required);

Get an API key from the Verity dashboard.

Core Workflows

Code Lookup

const result = await client.lookupCode({
  code: '76942',
  codeSystem: 'CPT',
  jurisdiction: 'JM',
  include: ['rvu', 'policies', 'rates'],
  fuzzy: true,
});

Policy Search and Retrieval

const policies = await client.listPolicies({
  q: 'ultrasound guidance',
  mode: 'keyword',
  policyType: 'LCD',
  status: 'active',
  limit: 25,
});

const policy = await client.getPolicy('L33831', {
  include: ['criteria', 'codes'],
});

Prior Authorization and Claim Validation

const priorAuth = await client.checkPriorAuth({
  procedureCodes: ['76942'],
  diagnosisCodes: ['M54.5'],
  state: 'TX',
  payer: 'medicare',
});

const claim = await client.validateClaim({
  procedureCodes: ['99213'],
  diagnosisCodes: ['E11.9'],
  payer: 'Medicare',
  state: 'TX',
  dateOfService: '2026-05-23',
});

console.log(claim.data?.coverage_status, claim.data?.denial_risk);
console.log(claim.data?.issues, claim.data?.matched_policies);

Coverage, Spending, and Compliance

const criteria = await client.searchCriteria({
  q: 'diabetes',
  section: 'indications',
  limit: 10,
});
console.log(criteria.data?.[0]?.policy_id, criteria.data?.[0]?.policy_title);

const spending = await client.getSpendingByCode({
  codes: ['T1019', 'T1020'],
  year: 2023,
});

const changes = await client.listUnreviewedChanges({ limit: 10 });
const stats = await client.getComplianceStats();

Drug Formulary Evidence

const formulary = await client.searchDrugFormularyEvidence({
  q: 'ozempic',
  payer: 'all',
  limit: 5,
});

Error Handling

import {
  AuthenticationError,
  NotFoundError,
  RateLimitError,
  ValidationError,
  VerityError,
} from 'verity-api';

try {
  const result = await client.lookupCode({ code: '76942' });
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.error('Invalid API key');
  } else if (error instanceof ValidationError) {
    console.error('Invalid request:', error.message);
  } else if (error instanceof NotFoundError) {
    console.error('Resource not found');
  } else if (error instanceof RateLimitError) {
    console.error('Rate limit exceeded:', error.reset);
  } else if (error instanceof VerityError) {
    console.error('Verity API error:', error.message);
  }
}

Configuration

const client = new VerityClient({
  apiKey: process.env.VERITY_API_KEY!,
  baseUrl: 'https://verity.backworkai.com/api/v1',
  timeout: 30_000,
});

Browser Usage

<script type="module">
  import { VerityClient } from 'https://cdn.skypack.dev/verity-api';

  const client = new VerityClient('vrt_live_YOUR_API_KEY');
  const result = await client.lookupCode({ code: '76942' });
  console.log(result.data);
</script>

Development

npm install
npm run lint
npm run format:check
npm run build
npm test

Release

The package publishes to npm as verity-api.

  1. Configure npm Trusted Publishing for backworkai/verity-ts, workflow release.yml, environment npm, package verity-api.
  2. Update package.json to the new version.
  3. Push a matching tag, for example v1.0.1.
  4. The release workflow installs with npm ci, runs lint/format/build/tests, runs npm pack --dry-run, and publishes with npm provenance.

npm test runs a structure check by default. Set VERITY_API_KEY to run live API smoke checks.

Support

  • Documentation: https://verity.backworkai.com/docs
  • Issues: https://github.com/backworkai/verity-ts/issues
  • Email: [email protected]

License

MIT