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

@silyze/telentir-sdk

v1.0.0

Published

SDK for the Telentir API

Readme

Telentir SDK

TypeScript client for interacting with the Telentir platform. It wraps the REST API, encrypted object stores and helper endpoints required to manage campaigns, contacts, knowledge bases, and more.

Installation

npm install @silyze/telentir-sdk

Then install the needed dependencies for BrowserCrypto or NodeCrypto:

# for BrowserCrypto
npm install jose

# for NodeCrypto
npm install jsonwebtoken

Quick Start

import "dotenv/config";
import { Telentir, crypto } from "@silyze/telentir-sdk";

async function main() {
  const telentir = await Telentir.connect({
    apiKey: process.env.TELENTIR_API_KEY!,
    crypto: new crypto.BrowserCrypto(await import("jose")),
    keyCache: new crypto.InMemoryKeyCache(), // optional
  });

  const contacts = await telentir.contacts.all();
  console.log(contacts);
}

void main();

Key Cache Implementations

Telentir ships with several cache adapters for reusing encryption keys across requests:

  • InMemoryKeyCache keeps data in process memory with optional TTL and max entries.

  • FsKeyCache persists encrypted material to disk. Pass Node's fs/promises and a directory, for example:

    import { promises as fs } from "fs";
    
    const keyCache = new crypto.FsKeyCache(fs, {
      directory: "./.telentir-keys",
      ttlMs: 15 * 60_000,
    });
  • StorageKeyCache targets Web Storage implementations like localStorage or sessionStorage:

    const keyCache = new crypto.StorageKeyCache(window.localStorage, {
      ttlMs: 5 * 60_000,
      maxEntries: 100,
    });

Working with Repositories

Contacts

const createdId = await telentir.contacts.create({
  name: "Simeon",
  phone: "+123456789",
  tags: ["vip"],
  status: "active",
});

const contact = await telentir.contacts.get(createdId);

await telentir.contacts.update(createdId, { ...contact, status: "inactive" });
await telentir.contacts.delete(createdId);

Fetching leads via /api/connect

await telentir.contacts.fetchLeads({
  credits: 25,
  industry: ["software"],
  country: ["US"],
});

Campaigns

const campaignId = await telentir.campaigns.create({
  name: "Spring Outreach",
  type: "prompt",
  prompt: { text: "Call and schedule a demo." },
  agents: [],
  contacts: { tags: ["warm"], items: [] },
  relations: {},
});

// Start the campaign (encrypts for the remote server and triggers jobs)
await telentir.campaigns.publish(campaignId);

// Stop it when needed
await telentir.campaigns.unpublish(campaignId);

Knowledge Bases

const kb = await telentir.knowledgeBases.create({
  name: "Support Playbook",
  description: "Support processes and scripts",
});

await telentir.knowledgeBases.uploadLinks(kb.id, [
  "https://example.com/process",
  "https://example.com/scripts",
]);

const results = await telentir.knowledgeBases.search(kb.id, "refund policy");
console.log(results);

Session Calls

Use telentir.sessions.call to generate the JWT and start the call in a single step (you can still access createCallJwt and startCall individually if needed).

await telentir.sessions.call({
  type: "prompt",
  prompt: "Reach out and collect feedback.",
  contact: {
    id: contactId,
    name: "Mihail",
    phone: "+111111111",
    tags: [],
    status: "active",
  },
  agent: {
    id: agentId,
    type: "ai",
    persona: "openai-verse",
    avatar: "",
    firstName: "Demo",
    lastName: "Agent",
    language: "en",
  },
});

Billing & Credits

const state = await telentir.billing.getState();
console.log(state.plan, state.usage);

Events Stream

const abort = new AbortController();

for await (const event of telentir.events.listen("object_created", undefined, {
  signal: abort.signal,
})) {
  console.log("object created", event);
}

abort.abort();