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

@vxtor/js-sdk

v0.0.14

Published

This SDK allows you to easily interact with the Vxtor API using TypeScript.

Readme

Vxtor SDK

This SDK allows you to easily interact with the Vxtor API using TypeScript.

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 Vxtor SDK, you first need to install it:

npm install @vxtor/js-sdk

Usage

First, initialize the Vxtor SDK with your API key:

import { createClient } from '@vxtor/js-sdk';

const vxtor = 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:

collectText

Description: Collect texts from websites or documents

Example:

const { data, error } = await vxtor.collectText(data);

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

regenerateEmbeddings

Description: Regenerate paragraphs embeddings

Example:

const { data, error } = await vxtor.regenerateEmbeddings(data);

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

searchParagraphs

Description: Search paragraphs

Example:

const { data, error } = await vxtor.searchParagraphs(data);

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

updateEmbedding

Description: Update embedding

Example:

const { data, error } = await vxtor.updateEmbedding(data);

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

createEmbedding

Description: Create embedding

Example:

const { data, error } = await vxtor.createEmbedding(data);

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

createCollection

Description: Create collection

Example:

const { data, error } = await vxtor.createCollection(data);

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

findCollections

Description: Find collections

Example:

const { data, error } = await vxtor.findCollections(title, _limit);

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

findOneCollection

Description: Find one collection

Example:

const { data, error } = await vxtor.findOneCollection(id);

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

updateCollection

Description: Update one collection

Example:

const { data, error } = await vxtor.updateCollection(id, data);

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

deleteCollection

Description: Delete one collection

Example:

const { data, error } = await vxtor.deleteCollection(id);

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

createDocument

Description: Create new document

Example:

const { data, error } = await vxtor.createDocument(data);

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

findDocuments

Description: Find all documents

Example:

const { data, error } = await vxtor.findDocuments(title, _limit);

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

findOneDocument

Description: Get document by ID

Example:

const { data, error } = await vxtor.findOneDocument(id);

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

updateDocument

Description: Update one document

Example:

const { data, error } = await vxtor.updateDocument(id, data);

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

deleteDocument

Description: Delete one document

Example:

const { data, error } = await vxtor.deleteDocument(id);

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

createParagraph

Description: Add new paragraph to document

Example:

const { data, error } = await vxtor.createParagraph(data);

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

findParagraphs

Description: Find all paragraphs

Example:

const { data, error } = await vxtor.findParagraphs(text, documentId, _limit);

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

findOneParagraph

Description: Find one paragraph

Example:

const { data, error } = await vxtor.findOneParagraph(id);

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

updateParagraph

Description: Update one paragraph

Example:

const { data, error } = await vxtor.updateParagraph(id, data);

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

deleteParagraph

Description: Delete one paragraph

Example:

const { data, error } = await vxtor.deleteParagraph(id);

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

Error Handling

Each method in the Vxtor 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 Vxtor 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.