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

@nexapi/sdk

v1.0.0

Published

Official SDK for APIFlow - AI-powered API automation platform

Readme

NexAPI SDK

Official TypeScript/JavaScript SDK for NexAPI - the AI-powered API automation platform.

Installation

npm install @nexapi/sdk

Quick Start

import NexAPISDK from '@nexapi/sdk';

const nexapi = new NexAPISDK({
  apiKey: 'your-api-key-here',
  baseURL: 'https://api.nexapi.com' // optional
});

// Create a new automation flow
const flow = await nexapi.createFlow('Send SMS when Stripe payment received');

// Execute a test
const testResult = await nexapi.executeTest(flow.id, {
  mockData: { amount: 100, currency: 'USD' }
});

// Deploy the flow
const deployment = await nexapi.deployFlow(flow.id, 'replit');

Configuration

Basic Configuration

const nexapi = new NexAPISDK({
  apiKey: 'your-api-key-here'
});

Advanced Configuration

const nexapi = new NexAPISDK({
  apiKey: 'your-api-key-here',
  baseURL: 'https://api.nexapi.com',
  timeout: 30000 // 30 seconds
});

Flow Management

Create a Flow

const flow = await nexapi.createFlow('Send email when new GitHub issue created');
console.log(flow.id, flow.intent, flow.apis);

Get Flow Details

const flow = await nexapi.getFlow('flow-id');
console.log(flow.name, flow.status, flow.code);

List All Flows

const flows = await nexapi.listFlows();
flows.forEach(flow => console.log(flow.name));

Update Flow

const updatedFlow = await apiflow.updateFlow('flow-id', {
  name: 'Updated Flow Name',
  status: 'active'
});

Delete Flow

await apiflow.deleteFlow('flow-id');

API Discovery

Search APIs

const apis = await apiflow.searchAPIs('payment', ['webhook', 'processing']);
apis.forEach(api => console.log(api.name, api.category));

Get API Details

const api = await apiflow.getAPI(123);
console.log(api.name, api.documentation, api.capabilities);

List All APIs

const apis = await apiflow.listAPIs();
console.log(`Found ${apis.length} APIs`);

Templates

Get Templates

const templates = await apiflow.getTemplates();
templates.forEach(template => console.log(template.name, template.category));

Get Template by ID

const template = await apiflow.getTemplate(1);
console.log(template.prompt, template.usageCount);

Get Templates by Category

const ecommerceTemplates = await apiflow.getTemplatesByCategory('E-commerce');

Testing

Execute Test

const testExecution = await apiflow.executeTest(flowId, {
  apiKeys: {
    stripe: 'sk_test_...',
    twilio: 'AC...'
  },
  mockData: {
    amount: 100,
    currency: 'USD',
    customer: 'cus_...'
  }
});

Get Test Results

const testResult = await apiflow.getTestExecution(testId);
console.log(testResult.status, testResult.results, testResult.logs);

Get All Test Executions for Flow

const tests = await apiflow.getTestExecutions(flowId);
tests.forEach(test => console.log(test.status, test.duration));

Deployment

Deploy Flow

const deployment = await apiflow.deployFlow(flowId, 'replit');
console.log(deployment.status, deployment.url);

Get Deployment Status

const deployment = await apiflow.getDeployment(deploymentId);
console.log(deployment.status, deployment.logs);

Get All Deployments for Flow

const deployments = await apiflow.getDeployments(flowId);
deployments.forEach(dep => console.log(dep.platform, dep.status));

Subflows (Reusable Components)

Get Subflows

const subflows = await apiflow.getSubflows();
subflows.forEach(subflow => console.log(subflow.name, subflow.category));

Create Subflow

const subflow = await apiflow.createSubflow({
  name: 'Email Notification',
  description: 'Send email with template',
  category: 'Communication',
  isPublic: true,
  steps: [
    { type: 'email', template: 'notification', to: '{{email}}' }
  ]
});

Update Subflow

const updatedSubflow = await apiflow.updateSubflow(subflowId, {
  description: 'Updated description',
  isPublic: false
});

Plugins

Get Available Plugins

const plugins = await apiflow.getPlugins();
plugins.forEach(plugin => console.log(plugin.name, plugin.category));

Install Plugin

const plugin = await apiflow.installPlugin('plugin-id');
console.log(`Installed ${plugin.name}`);

Uninstall Plugin

await apiflow.uninstallPlugin('plugin-id');

Usage & Billing

Get Usage Metrics

const usage = await apiflow.getUsage('30d');
console.log(usage.usage.flows, usage.limits.flows);

Get Billing Plans

const plans = await apiflow.getBillingPlans();
plans.forEach(plan => console.log(plan.plan, plan.price));

Webhooks

Create Webhook

const webhook = await apiflow.createWebhook('https://your-app.com/webhook', [
  'flow.created',
  'flow.executed',
  'test.completed'
]);

Get Webhooks

const webhooks = await apiflow.getWebhooks();
webhooks.forEach(webhook => console.log(webhook.url, webhook.events));

Delete Webhook

await apiflow.deleteWebhook('webhook-id');

Utility Methods

Validate API Key

const isValid = await apiflow.validateAPIKey();
if (!isValid) {
  console.error('Invalid API key');
}

Check Service Health

const health = await apiflow.getHealth();
console.log(health.status, health.uptime);

Error Handling

try {
  const flow = await apiflow.createFlow('Invalid prompt');
} catch (error) {
  if (error.response?.status === 400) {
    console.error('Bad request:', error.response.data.message);
  } else if (error.response?.status === 401) {
    console.error('Unauthorized: Check your API key');
  } else {
    console.error('Unexpected error:', error.message);
  }
}

TypeScript Support

The SDK is written in TypeScript and includes full type definitions:

import NexAPISDK, { Flow, API, Template } from '@nexapi/sdk';

const nexapi = new NexAPISDK({ apiKey: 'your-key' });

// Full typing support
const flow: Flow = await nexapi.createFlow('prompt');
const apis: API[] = await nexapi.searchAPIs('query');
const templates: Template[] = await nexapi.getTemplates();

Authentication

Get your API key from the NexAPI Dashboard.

Rate Limits

  • Free plan: 100 requests per hour
  • Pro plan: 1,000 requests per hour
  • Enterprise plan: 10,000 requests per hour

Support

  • Documentation: https://docs.nexapi.com
  • GitHub Issues: https://github.com/nexapi/sdk/issues
  • Email: [email protected]

License

MIT License - see LICENSE file for details.