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

@ovt-sdk/partners

v0.2.0

Published

Official TypeScript/JavaScript SDK for Ovation Partner Services API

Readme

@ovt-sdk/partners

Official TypeScript/JavaScript SDK for Ovation Partner Services API

npm version TypeScript License: MIT

Features

  • 🔐 OAuth2 Authentication - Secure token-based authentication
  • 🏢 Companies API - Full CRUD operations for company management
  • Built-in Validation - Request/response validation using Zod
  • 🔄 Auto Retry - Automatic retry logic with exponential backoff
  • 📝 TypeScript First - Full type definitions included
  • 🚀 ESM & CommonJS - Support for both module systems

Installation

npm install @ovt-sdk/partners

Quick Start

import Partners from '@ovt-sdk/partners'

// 1. Configure the SDK
Partners.configure({
  environment: 'sandbox',
  auth: {
    token: 'your-token',
    ovationId: 'your-partner-name'
  }
})

// 2. Get an access token
const tokenResponse = await Partners.OAuth2Api.getAccessTokenAsync({
  grant_type: 'client_credentials',
  scopes: ['admin']
})

// 3. Use the API
const companies = await Partners.CompanyApi.listAsync()
console.log(companies.data.companies)

Available APIs

OAuth2 API

// Get access token
const token = await Partners.OAuth2Api.getAccessTokenAsync({
  grant_type: 'client_credentials',
  scopes: ['admin'],
  company: '507f1f77bcf86cd799439011' // optional
})

Companies API

// Get company by ID
const company = await Partners.CompanyApi.getByIdAsync('507f1f77bcf86cd799439011')

// List companies
const companies = await Partners.CompanyApi.listAsync(
  { company_ids: ['507f1f77bcf86cd799439011'] },
  { limit: 50, skip: 0 }
)

// Create company
const newCompany = await Partners.CompanyApi.createAsync({
  name: 'Acme Restaurant',
  industry: 'restaurant',
  url: 'https://acme.com',
  logo: 'https://acme.com/logo.png',
  address_1: '123 Main St',
  city: 'New York',
  state: 'NY',
  zip: '10001',
  country: 'US',
  user: '507f1f77bcf86cd799439012'
})

// Update company
const updated = await Partners.CompanyApi.updateAsync(
  '507f1f77bcf86cd799439011',
  {
    set: {
      name: 'Acme Restaurant & Bar',
      disabled: false
    }
  }
)

// Retry phone verification
await Partners.CompanyApi.retryPhoneVerificationAsync('507f1f77bcf86cd799439011')

Documentation

📚 Complete API Documentation - Comprehensive guide with detailed examples

Key Topics

Configuration

Partners.configure({
  environment: 'production' | 'sandbox',
  auth: {
    token: string,        // Required: Bearer token or client credentials
    ovationId: string,    // Required: Your partner name (sets X-Ovation-Id header)
    apiKey?: string       // Optional: API Gateway key
  },
  headers?: {             // Optional: Custom headers
    [key: string]: string
  }
})

Environment URLs

| Environment | URL | |------------|-----| | Sandbox | https://partner-test.ovationup.com/partner-services/v2 | | Production | https://partner.ovationup.com/partner-services/v2 |

Error Handling

import { ValidationError, AuthenticationError, NotFoundError } from '@ovt-sdk/partners'

try {
  const company = await Partners.CompanyApi.getByIdAsync('invalid-id')
} catch (error) {
  if (error instanceof ValidationError) {
    console.error('Validation failed:', error.message)
  } else if (error instanceof AuthenticationError) {
    console.error('Authentication failed - refresh token')
  } else if (error instanceof NotFoundError) {
    console.error('Company not found')
  }
}

TypeScript

Full TypeScript support with comprehensive type definitions:

import type { 
  Company, 
  CompanyCreateData,
  CompanyUpdatePayload,
  OAuth2TokenRequest,
  OAuth2TokenResponse
} from '@ovt-sdk/partners'

const createData: CompanyCreateData = {
  name: 'My Company',
  industry: 'restaurant',
  // ... TypeScript will validate all fields
}

Examples

Complete Authentication Flow

// Get access token
const tokenResponse = await Partners.OAuth2Api.getAccessTokenAsync({
  grant_type: 'client_credentials',
  scopes: ['admin']
})

// Reconfigure with new token
Partners.configure({
  environment: 'production',
  auth: {
    token: tokenResponse.data.access_token,
    apiKey: tokenResponse.data.api_key,
    ovationId: 'your-partner-name'
  }
})

// Now use any API
const companies = await Partners.CompanyApi.listAsync()

Pagination

const allCompanies = []
let skip = 0
const limit = 100

while (true) {
  const response = await Partners.CompanyApi.listAsync({}, { limit, skip })
  allCompanies.push(...response.data.companies)
  
  if (response.data.companies.length < limit) break
  skip += limit
}

Requirements

  • Node.js >= 18.0.0
  • TypeScript >= 4.9.0 (for TypeScript projects)

Testing

# Run tests
npm test

# Run tests with coverage
npm test -- --coverage

Support

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

MIT © Ovation

Related Packages


View Full API Documentation →