Quickstart

Receive your first event with the TypeScript SDK in under five minutes.

import { Nevo } from "nevo-sdk";

const client = new Nevo({ token: process.env.NEVO_API_KEY! });

client.on(async (event) => {
  console.log(event.type, event.id, event.channel.label);

  if (event.email) {
    console.log("from:", event.email.from, "|", event.email.subject);
  } else if (event.webhook) {
    console.log(event.webhook.method, event.webhook.path);
  }
});

await client.run();

Environment

export NEVO_API_KEY=nvo_live_...
node --env-file=.env handler.ts

Handler rules

  • client.on takes one async handler. Register it once; branch on event.type inside.
  • Returning = event handled.
  • Throwing or exceeding handlerTimeout (default 30s) → logged, stream continues. The event is not re-delivered to the SDK — replay from the dashboard if you need to.

Reconnects

Automatic, with exponential jittered backoff capped at reconnectMaxBackoff (default 30s). Events that arrive while your client is disconnected are available via dashboard replay.

Next

  • Events — the Event object in full.
  • Replies — send responses.
  • Errors — exception hierarchy and retry semantics.