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

@vertaaux/sdk

v2.0.0

Published

Official TypeScript SDK for VertaaUX.ai — AI-powered UX and accessibility auditing

Readme

VertaaUX SDK

Official TypeScript SDK for VertaaUX.ai -- AI-powered UX and accessibility auditing.

npm version TypeScript License: MIT

Installation

npm install @vertaaux/sdk

Quick Start

import { VertaaUX } from '@vertaaux/sdk';

const client = new VertaaUX({ apiKey: process.env.VERTAAUX_API_KEY! });

// Create an audit
const audit = await client.audits.create({
  url: 'https://example.com',
  mode: 'standard',
});

// Poll for results
let result = await client.audits.retrieve(audit.job_id);
while (result.status === 'queued' || result.status === 'running') {
  await new Promise((resolve) => setTimeout(resolve, 2000));
  result = await client.audits.retrieve(audit.job_id);
}

if (result.status === 'completed') {
  console.log('Overall score:', result.scores?.overall);
  console.log('Issues found:', result.issues?.length);
}

Configuration

const client = new VertaaUX({
  apiKey: 'vx_test_your_api_key',  // Required. Get yours at https://vertaaux.ai/dashboard/api-keys
  baseUrl: 'https://...',      // Optional. Defaults to https://vertaaux.ai/api/v1
  timeout: 30000,              // Optional. Request timeout in ms (default: 30000)
  maxRetries: 2,               // Optional. Auto-retry on 429/5xx (default: 2)
  fetch: customFetch,          // Optional. Custom fetch implementation
});

Resources

The SDK uses a Stripe-style resource architecture. All resources are accessed as properties on the client instance.

| Resource | Methods | Description | |----------|---------|-------------| | client.audits | create, retrieve, get, list, createWithLLM, listAutoPaginate | Create, retrieve, and list UX audits | | client.webhooks | create, list, delete | Manage webhook subscriptions for audit events | | client.schedules | create, retrieve, list, update, delete | Create and manage scheduled recurring audits | | client.quota | retrieve | Check API usage and plan limits | | client.engines | list | List available audit engine versions | | client.patches | generate | Generate remediation patches for issues | | client.verification | run | Verify patch effectiveness before applying |

Auto-Pagination

List endpoints support automatic pagination via listAutoPaginate():

// Iterate with for-await
for await (const audit of client.audits.listAutoPaginate({ status: 'completed' })) {
  console.log(audit.job_id, audit.scores?.overall);
}

// Collect into an array
const audits = await client.audits
  .listAutoPaginate({ status: 'completed' })
  .toArray({ maxItems: 100 });

Error Handling

All errors extend VertaaUXError and include type, statusCode, and requestId properties.

import {
  VertaaUX,
  VertaaUXError,
  AuthenticationError,
  RateLimitError,
  NotFoundError,
  ValidationError,
  APIError,
  IdempotencyError,
  ConnectionError,
  PermissionError,
  isVertaaUXError,
} from '@vertaaux/sdk';

try {
  const audit = await client.audits.create({ url: 'https://example.com' });
} catch (error) {
  if (error instanceof AuthenticationError) {
    // 401 - Invalid or missing API key
  } else if (error instanceof PermissionError) {
    // 403 - Insufficient permissions
  } else if (error instanceof NotFoundError) {
    // 404 - Resource not found
  } else if (error instanceof ValidationError) {
    // 400 - Invalid request parameters
    console.error(error.param, error.errors);
  } else if (error instanceof RateLimitError) {
    // 429 - Rate limit exceeded
    console.error('Retry after:', error.retryAfter, 'seconds');
  } else if (error instanceof IdempotencyError) {
    // 409 - Idempotency key conflict
  } else if (error instanceof ConnectionError) {
    // Network or timeout error
  } else if (error instanceof APIError) {
    // 5xx - Server error
  }

  // Type guard for any VertaaUX error
  if (isVertaaUXError(error)) {
    console.error(error.type, error.statusCode, error.requestId);
  }
}

| Error Class | Status | When | |-------------|--------|------| | AuthenticationError | 401 | Invalid or missing API key | | PermissionError | 403 | Insufficient permissions for the resource | | NotFoundError | 404 | Audit, webhook, or schedule not found | | ValidationError | 400 | Invalid request parameters | | RateLimitError | 429 | Too many requests (includes retryAfter) | | IdempotencyError | 409 | Idempotency key conflict | | ConnectionError | -- | Network failure or request timeout | | APIError | 5xx | Internal server error | | VertaaUXError | -- | Base class for all SDK errors |

CI Integration

GitHub Actions

name: Accessibility Check

on: [pull_request]

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Install SDK
        run: npm install @vertaaux/sdk

      - name: Run VertaaUX Audit
        uses: actions/github-script@v7
        env:
          VERTAAUX_API_KEY: ${{ secrets.VERTAAUX_API_KEY }}
        with:
          script: |
            const { VertaaUX } = require('@vertaaux/sdk');
            const client = new VertaaUX({ apiKey: process.env.VERTAAUX_API_KEY });

            const audit = await client.audits.create({
              url: 'https://your-preview-url.com',
              mode: 'standard',
            });

            let result = await client.audits.retrieve(audit.job_id);
            while (result.status === 'queued' || result.status === 'running') {
              await new Promise(r => setTimeout(r, 3000));
              result = await client.audits.retrieve(audit.job_id);
            }

            if (result.status === 'failed') {
              core.setFailed(`Audit failed: ${result.error}`);
              return;
            }

            const score = result.scores?.overall ?? 0;
            console.log(`Score: ${score}/100`);

            if (score < 80) {
              core.setFailed(`Accessibility score ${score} is below threshold 80`);
            }

TypeScript

Full type definitions are included. All API types are exported from the package root:

import type {
  Audit,
  AuditCreateParams,
  AuditScores,
  Issue,
  Finding,
  Webhook,
  Schedule,
  Quota,
  Engine,
  Patch,
  VerificationResult,
} from '@vertaaux/sdk';

Examples

See /examples for complete integration patterns:

License

MIT (c) Petri Lahdelma