Skip to content
Back to News
Changelog

SDK 2.0.0 — Working events feed + environment-scoped event log

sdkeventswebhooksapi

We released @getpeppr/sdk v2.0.0.

⚠️ Breaking change — EventEntry

EventEntry now matches what the API actually returns:

interface EventEntry {
  id: string;
  eventType: string;        // e.g. "invoice.sent", "inbound.invoice.received"
  documentId: string | null;
  metadata: Record<string, unknown> | null;
  createdAt: string;
}

The previous fields (name, text, notes, invoice, contact) described a legacy shape the gateway never returned — so events.list() was handing back empty name/text values. If your code reads those fields, switch to eventType / documentId / metadata. Because the old fields were always empty at runtime, this is a compile-time update only — no behaviour you relied on changes.

Fixed — events.list() and events.listAll()

The usage event feed now returns real data for every event (id, type, related document, metadata, timestamp) instead of blank fields.

New — environment-scoped event feed

GET /v1/events (and events.list()) are now scoped to the environment of the API key you use: a sandbox key returns only sandbox events, a production key only production events. No more mixed sandbox/production feeds.

New — webhook event types

peppol_identifier.verified and peppol_identifier.verification_failed are now part of the WebhookEventType union (they were already emitted by the gateway and selectable in the console webhooks dashboard).

Update

npm install @getpeppr/sdk@latest

The @getpeppr/cli (v0.4.7) bundles this SDK release.