SDK
Server SDK (Node)

Server SDK (Node)

Coming soon@cobuntu/sdk will be a typed Node/TS wrapper around the REST API + a verifyWebhookSignature helper. Until it ships, calling the REST API directly via fetch works identically and is what orbis-entry + dddimo-entry do in production today.

Preview

import { Cobuntu } from "@cobuntu/sdk";
 
const cobuntu = new Cobuntu({
  apiKey: process.env.COBUNTU_SECRET_KEY!,
  communityTag: "my-community",
});
 
// List events
const events = await cobuntu.events.list({ upcomingOnly: true, limit: 10 });
 
// Verify a webhook
import { verifyWebhookSignature } from "@cobuntu/sdk";
 
app.post("/webhook", (req, res) => {
  const ok = verifyWebhookSignature({
    header: req.get("Cobuntu-Signature"),
    body: req.rawBody,
    secret: process.env.COBUNTU_WEBHOOK_SECRET!,
  });
  if (!ok) return res.status(401).end();
  // …
});

What's available today

  • @cobuntu/widgets on npm — the UI components (Widgets)
  • REST API directly via fetch — see REST API

The @cobuntu/sdk typed client is the next package to land.