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

piopiy

v1.2.0

Published

The official Node.js SDK for Piopiy Voice Orchestrator APIs. Build AI voice agents, direct voice calls, PCMO flows, and flow-based call routing.

Readme

Piopiy Node.js SDK

Production-ready Node.js SDK for Piopiy Voice Orchestrator APIs. Build AI voice agents, direct voice calls, PCMO flows, and flow-based call routing.

Prerequisites

Installation

npm install piopiy

Quick Start

const { Piopiy } = require('piopiy');

const client = new Piopiy(process.env.PIOPIY_TOKEN || "YOUR_BEARER_TOKEN");

Main Examples

1) AI Single Call

async function main() {
    const response = await client.ai.call({
        caller_id: "919999999999",
        to_number: "918888888888",
        agent_id: "bdd32bcb-767c-40a5-be4a-5f45eeb348a6"
    });
    console.log(response);
}

main().catch(console.error);

Example code: example/ai_agent/02_ai_call_minimal.js

2) AI Call With Failover

async function main() {
    const response = await client.ai.call({
        caller_id: "919999999999",
        to_number: "918888888888",
        agent_id: "bdd32bcb-767c-40a5-be4a-5f45eeb348a6",
        app_id: "your_app_id",
        failover: {
            agent_id: "2f2ae3ad-7ff6-4011-b10e-9ca1f8f8d1a2",
            ring_timeout_sec: 20,
            machine_detection: true
        }
    });
    console.log(response);
}

main().catch(console.error);

Failover rules:

  • app_id is required when failover is used.
  • failover.agent_id is required.
  • Failover agent must differ from primary agent_id.
  • failover.strategy is optional.

Example code: example/ai_agent/04_ai_call_with_failover.js

3) Voice Direct Call

async function main() {
    const response = await client.voice.call({
        caller_id: "919999999999",
        to_number: "918888888888",
        app_id: "your_app_id"
    });
    console.log(response);
}

main().catch(console.error);

Example code: example/voice_call/01_voice_call_direct.js

4) PCMO Simple Call

async function main() {
    const pipeline = client.pcmo.pipeline()
        .connect(
            { caller_id: "919999999999" },
            [{ type: "pstn", number: "918888888888" }]
        )
        .build();

    const response = await client.pcmo.call({
        caller_id: "919999999999",
        to_number: "918888888888",
        app_id: "your_app_id",
        pipeline
    });
    console.log(response);
}

main().catch(console.error);

Example code: example/pcmo_call/02_pcmo_call_minimal.js

5) Flow Call (Minimal)

async function main() {
    const response = await client.flow.call({
        flow_id: "7f4d89c7-3485-45c5-9016-f45a47cd885c",
        org_id: "f89dd77d-c226-4ff2-b88c-6d7e4f5a88e2",
        caller_id: "919999999999",
        to_number: "918888888888",
        app_id: "your_app_id"
    });
    console.log(response);
}

main().catch(console.error);

Example code: example/flow_call.js

Other Actions And Full Docs

Extra Example Code Indexes

Legacy Action Helpers

This package also exports legacy helpers used by older integrations:

  • PiopiyAction
  • StreamAction
  • PipelineBuilder