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

@oversai/sdk

v0.1.1

Published

JavaScript/TypeScript client library for integrating with Oversai APIs

Readme

Oversai SDK

A JavaScript/TypeScript client library for integrating with Oversai APIs.

Installation

npm install @oversai/sdk

Or using yarn:

yarn add @oversai/sdk

Quick Start

import { OversaiClient } from '@oversai/sdk';

// Initialize with API key
const client = new OversaiClient({ 
  apiKey: 'your_api_key'
});

// Or with JWT auth
const client = new OversaiClient({ 
  jwt: 'your_jwt_token'
});

// Use the Ontology API
const customers = await client.ontology.getObjects('customer', {
  limit: 10,
  filter: {
    field: 'status',
    operator: 'eq',
    value: 'active'
  }
});

// Create a new object
const newCustomer = await client.ontology.createObject('customer', {
  name: 'Acme Corporation',
  email: '[email protected]',
  status: 'active'
});

// Work with relationships
await client.ontology.createRelationship({
  sourceType: 'customer',
  sourceId: 'cust_123',
  relationshipType: 'placed',
  targetType: 'order',
  targetId: 'order_456'
});

Documentation

Ontology API

The Ontology API allows you to manage data objects and their relationships in your Oversai application.

Get Objects

Retrieve objects of a specific type:

// Get all customers
const response = await client.ontology.getObjects('customer');
const customers = response.data;

// With filtering
const response = await client.ontology.getObjects('customer', {
  filter: {
    field: 'status',
    operator: 'eq',
    value: 'active'
  }
});

// With pagination
const response = await client.ontology.getObjects('customer', {
  limit: 10,
  offset: 0
});

Get Object by ID

Retrieve a specific object by its ID:

const customerId = '12345';
const customer = await client.ontology.getObject('customer', customerId);

Create Object

Create a new object:

const newCustomer = {
  name: 'Acme Corporation',
  email: '[email protected]',
  industry: 'Technology',
  status: 'active'
};

const createdCustomer = await client.ontology.createObject('customer', newCustomer);

Update Object

Update an existing object:

const customerId = '12345';
const updates = {
  status: 'inactive',
  notes: 'Customer account paused on request'
};

const updatedCustomer = await client.ontology.updateObject('customer', customerId, updates);

Delete Object

Delete an object:

const customerId = '12345';
await client.ontology.deleteObject('customer', customerId);

Working with Relationships

// Get all orders for a customer
const customerId = '12345';
const orders = await client.ontology.getRelatedObjects('customer', customerId, 'orders');

// Create a relationship
await client.ontology.createRelationship({
  sourceType: 'customer',
  sourceId: '12345',
  relationshipType: 'placed',
  targetType: 'order',
  targetId: '67890'
});

// Delete a relationship
await client.ontology.deleteRelationship({
  sourceType: 'customer',
  sourceId: '12345',
  relationshipType: 'placed',
  targetType: 'order',
  targetId: '67890'
});

Bulk Operations

// Create multiple objects
const customers = await client.ontology.bulkCreateObjects('customer', [
  { name: 'Company A', email: '[email protected]' },
  { name: 'Company B', email: '[email protected]' }
]);

// Update multiple objects
const updatedCustomers = await client.ontology.bulkUpdateObjects('customer', [
  { id: 'cust_123', status: 'inactive' },
  { id: 'cust_456', status: 'inactive' }
]);

// Delete multiple objects
await client.ontology.bulkDeleteObjects('customer', ['cust_123', 'cust_456']);

Pagination with Async Iterators

The SDK provides helpers for paginating through large result sets:

// Iterate through all customers, 100 at a time
const iterator = client.ontology.getObjectsIterator('customer', {
  limit: 100,
  filter: { field: 'status', operator: 'eq', value: 'active' }
});

for await (const page of iterator) {
  for (const customer of page) {
    console.log(customer.id, customer.name);
  }
}

Error Handling

The SDK throws standardized errors that you can catch and handle in your application:

import { OversaiClient, ApiError } from '@oversai/sdk';

const client = new OversaiClient({ apiKey: 'your_api_key' });

try {
  const result = await client.ontology.getObject('customer', 'invalid-id');
} catch (error) {
  if (error instanceof ApiError) {
    console.error(`API Error: ${error.message}`);
    console.error(`Status code: ${error.statusCode}`);
    console.error(`Error code: ${error.code}`);
  } else {
    console.error('Unexpected error:', error);
  }
}

TypeScript Support

The SDK includes TypeScript definitions to improve your development experience:

import { OversaiClient } from '@oversai/sdk';
import type { Customer, Order } from '@oversai/sdk/types';

const client = new OversaiClient({ apiKey: 'your_api_key' });

// TypeScript will enforce the correct object structure
const newCustomer: Customer = {
  name: 'Acme Corp',
  email: '[email protected]',
  // ...other properties
};

const createdCustomer = await client.ontology.createObject<Customer>('customer', newCustomer);

License

MIT