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

@nodesty/api-client

v3.1.0

Published

Generated, type-safe Node.js client for the Nodesty API.

Readme

Nodesty API Client

Type-safe Node.js client generated from the Nodesty OpenAPI schema.

Installation

npm install @nodesty/api-client

Node.js 18.18 or newer is required. The client also works in runtimes that provide the standard Fetch API.

Quick start

import { NodestyApiClient } from '@nodesty/api-client';

const client = new NodestyApiClient({
    accessToken: process.env.NODESTY_ACCESS_TOKEN,
});

const result = await client.user.getCurrentUser();

if (result.error) {
    console.error(result.error.message);
} else {
    console.log(result.data);
}

Keep personal access tokens in environment variables. Never commit them to source control.

Resources

Operations are grouped by their OpenAPI category:

  • client.user
  • client.billing
  • client.virtualServer
  • client.dedicatedServer
  • client.firewall
  • client.mailHosting

Path parameters are positional. A request body is passed as the final data argument:

await client.billing.addOrder('group-id', 'product-id', {
    domain: 'example.com',
    billingCycle: 'Monthly',
});

await client.virtualServer.performAction('service-id', {
    action: 'start',
});

await client.firewall.getAttackLogs('service-id', '203.0.113.10');

All parameters, request bodies, response data, and documented errors are fully typed from OpenAPI.

Responses

Methods return the parsed API body together with the standard Fetch API Request and Response objects.

Successful response (200)

{
    data: { /* endpoint response */ },
    request: Request,
    response: Response, // response.status === 200
}

List endpoints return an array in data.

Successful response without content (204)

{
    data: undefined,
    request: Request,
    response: Response, // response.status === 204
}

Error response

{
    error: {
        error: true,
        message: 'Service not found',
        statusCode: 404,
        statusMessage: 'Not Found',
        url: '/api/services/example/vps/info',
    },
    request: Request,
    response: Response, // response.status === 404
}

The exact error fields depend on the endpoint. To throw the parsed API error instead of returning it, pass throwOnError in the final options argument:

const user = await client.user.getCurrentUser({ throwOnError: true });

await client.virtualServer.performAction('service-id', { action: 'start' }, { throwOnError: true });

Configuration

The constructor accepts standard Fetch options and supports custom implementations for testing or proxies:

const client = new NodestyApiClient({
    accessToken: process.env.NODESTY_ACCESS_TOKEN,
    baseUrl: 'https://nodesty.com',
    headers: {
        'User-Agent': 'my-application/1.0.0',
    },
    fetch: customFetch,
});

The generated low-level SDK functions and request/response types are also exported for advanced integrations.

License

MIT