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

@renduo/sdk

v0.0.3

Published

Official Renduo SDK — generate PDFs from registered component-first templates

Downloads

16

Readme

@renduo/sdk

npm version

Official TypeScript/Node SDK for Renduo — generate PDFs from templates you registered with renduo push (see @renduo/cli).

Types generated from the live API spec; the client itself is a small hand-written layer over native fetch — no runtime dependencies.

Install

npm install @renduo/sdk

Requires Node ≥20 (native fetch, ESM only — see Module format below).

Need an API key? Free plan is 100 PDFs/month, no card required — see pricing and renduo.dev to sign up.

Quickstart

import { Renduo } from '@renduo/sdk'
import { writeFile } from 'node:fs/promises'

const renduo = new Renduo({ apiKey: process.env.RENDUO_API_KEY! })

const { pdf } = await renduo.generate({
  templateId: 'tpl_...', // renduo templates list, or Dashboard → Templates
  payload: { invoiceNumber: 'INV-001', customerName: 'Ada Lovelace' },
})

await writeFile('invoice.pdf', pdf)

Async generation

For high volume or background jobs, use mode: 'async' and either poll with waitForGeneration or listen for the generation.completed webhook registered in Dashboard → Settings → Webhooks (see Verifying webhooks).

const job = await renduo.generate({ templateId: 'tpl_...', payload, mode: 'async' })
// job: { jobId, status: 'queued' }

const result = await renduo.waitForGeneration(job.jobId)
// result.pdf is a Buffer, same as sync mode — waitForGeneration polls
// GET /v1/generate/:jobId and downloads the PDF once it's ready.

waitForGeneration throws RenduoGenerationError if the job ends in failed or timeout, with the job's errorMessage and status attached.

Templates

const { templates, total } = await renduo.templates.list()

const template = await renduo.templates.get(templates[0].id)
// template.versions: [{ version, status: 'active' | 'disabled', createdAt }, ...], newest first

Verifying webhooks

import { verifyWebhookSignature } from '@renduo/sdk'

const signature = request.headers.get('renduo-signature')
const rawBody = await request.text() // must be the raw body — not a re-serialized JSON.parse/stringify round trip

if (!verifyWebhookSignature(process.env.RENDUO_WEBHOOK_SECRET!, rawBody, signature!)) {
  return new Response('Invalid signature', { status: 401 })
}

Error handling

Every non-2xx response throws RenduoApiError — error/message/requestId from the API response, typed:

import { RenduoApiError } from '@renduo/sdk'

try {
  await renduo.generate({ templateId, payload })
} catch (err) {
  if (err instanceof RenduoApiError && err.code === 'QUOTA_EXCEEDED') {
    // handle plan quota exhausted (free plan only — paid plans accumulate overage instead)
  }
  throw err
}

Module format

ESM only, matching the rest of the Renduo monorepo. A CommonJS require('@renduo/sdk') won't work — use dynamic import('@renduo/sdk') from CommonJS code, or run your project as ESM ("type": "module" in package.json, or .mjs). Revisit if a real CJS consumer shows up; dual-publishing wasn't worth the added build complexity for a 0.x package with an all-TS/ESM audience.

Documentation

See renduo.dev/docs for the full API reference and guides.