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

opxa-sdk

v0.0.24

Published

A typescript client for the PlatformAI API that enables building and deploying AI agent workflows. Supports agent creation, chat management, and thread persistence with TypeScript definitions.

Downloads

18

Readme

OPXA SDK

This SDK allows you to easily interact with the OPXA API using TypeScript. A typescript client for the PlatformAI API that enables building and deploying AI agent workflows. Supports agent creation, chat management, and thread persistence with TypeScript definitions.

Features

  • CRUD Operations: Manage collections, documents, and paragraphs easily.
  • Search: Perform searches across collections, documents, and paragraphs with relevance filtering.
  • Error Handling: All API calls return a data, error, and isBusy object to handle responses and errors gracefully.
  • TypeScript Support: Fully typed for TypeScript users.

Installation

To use the OPXA SDK, you first need to install it:

npm install opxa-sdk

Usage

First, initialize the OPXA SDK with your API key:

import { createClient } from 'opxa-sdk';

const opxa api = createClient({ apiKey: 'your-api-key-here' });

You can now use the SDK to interact with your API. Here's how you can use the functions available in the SDK:

login

Description: Login

Example:

const { data, error } = await opxa_api.login(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

createAccount

Description: User registration

Example:

const { data, error } = await opxa_api.createAccount(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

preConfirmAccount

Description: Pre-confirm account

Example:

const { data, error } = await opxa_api.preConfirmAccount(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

forgotPassword

Description: Forgot password

Example:

const { data, error } = await opxa_api.forgotPassword(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

resetPassword

Description: Reset password

Example:

const { data, error } = await opxa_api.resetPassword(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

anableAccount

Description: Enable account

Example:

const { data, error } = await opxa_api.anableAccount(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

disableAccount

Description: Disable account

Example:

const { data, error } = await opxa_api.disableAccount(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

register

Description: Register tenant

Example:

const { data, error } = await opxa_api.register(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getAll

Description: Get all call agents customers

Example:

const { data, error } = await opxa_api.getAll();

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

createServiceForCallAssistant

Description: Create new service for call assistant agent

Example:

const { data, error } = await opxa_api.createServiceForCallAssistant(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getAllServicesByAgentId

Description: Get all services by agent identifier

Example:

const { data, error } = await opxa_api.getAllServicesByAgentId(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

updateCallAssistantService

Description: Update service for call assistant agent

Example:

const { data, error } = await opxa_api.updateCallAssistantService(, , data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

deleteCallAssistantService

Description: Delete service for call assistant agent

Example:

const { data, error } = await opxa_api.deleteCallAssistantService(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

createFaqForCallAssistant

Description: Create new faq for call assistant agent

Example:

const { data, error } = await opxa_api.createFaqForCallAssistant(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getAllFaqsByAgentId

Description: Get all faqs by agent identifier

Example:

const { data, error } = await opxa_api.getAllFaqsByAgentId(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

updateCallAssistantFaq

Description: Update faq for call assistant agent

Example:

const { data, error } = await opxa_api.updateCallAssistantFaq(, , data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

deleteCallAssistantFaq

Description: Delete faq for call assistant agent

Example:

const { data, error } = await opxa_api.deleteCallAssistantFaq(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

createAgentAction

Description: Create new action for agent

Example:

const { data, error } = await opxa_api.createAgentAction(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getAllAgentActions

Description: Get all agent actions

Example:

const { data, error } = await opxa_api.getAllAgentActions(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

updateAgentAction

Description: Update agent action

Example:

const { data, error } = await opxa_api.updateAgentAction(, , data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

deleteAgentAction

Description: Delete agent action

Example:

const { data, error } = await opxa_api.deleteAgentAction(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

create

Description: Create new agent

Example:

const { data, error } = await opxa_api.create(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getAll

Description: Get all agents

Example:

const { data, error } = await opxa_api.getAll();

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getAvailableTools

Description: Get available agent tools

Example:

const { data, error } = await opxa_api.getAvailableTools();

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getById

Description: Get agent by identifier

Example:

const { data, error } = await opxa_api.getById(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

update

Description: Update agent

Example:

const { data, error } = await opxa_api.update(, , data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

delete

Description: Delete agent

Example:

const { data, error } = await opxa_api.delete(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

createKeyValueConfig

Description: Create new config key value

Example:

const { data, error } = await opxa_api.createKeyValueConfig(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getAllKeyValueConfigs

Description: Get all key value configs

Example:

const { data, error } = await opxa_api.getAllKeyValueConfigs();

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

updateKeyValueConfig

Description: Update key value config

Example:

const { data, error } = await opxa_api.updateKeyValueConfig(, , data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

deleteKeyValueConfig

Description: Delete key value config

Example:

const { data, error } = await opxa_api.deleteKeyValueConfig(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getById

Description: Get book by ID

Example:

const { data, error } = await opxa_api.getById(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

update

Description: Update book

Example:

const { data, error } = await opxa_api.update(, , data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

delete

Description: Delete book

Example:

const { data, error } = await opxa_api.delete(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getAll

Description: Get all books

Example:

const { data, error } = await opxa_api.getAll();

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

create

Description: Create new book

Example:

const { data, error } = await opxa_api.create(data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

getNotesById

Description: Get book notes

Example:

const { data, error } = await opxa_api.getNotesById(, );

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

match

Description: Get matching notes

Example:

const { data, error } = await opxa_api.match(, , data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

answer

Description: Answer questions about book content

Example:

const { data, error } = await opxa_api.answer(, , data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

insert

Description: Create new content

Example:

const { data, error } = await opxa_api.insert(, , data);

if (error) {
  console.error('Error:', error);
} else {
  console.log('Data:', data);
}

Error Handling

Each method in the OPXA SDK returns an object containing:

  • data: The response data from the API if successful.
  • error: An error message if the request fails.
  • isBusy: A boolean indicating whether the request is still in progress.

This allows you to handle API responses and errors effectively without worrying about exceptions being thrown.

Contributing

If you would like to contribute to the OPXA SDK, feel free to fork the repository, make your changes, and submit a pull request. We welcome all contributions!

License

This project is licensed under the MIT License.