@anumaan/adbis-live-client
v0.1.0
Published
Tiny browser client for ADBIS live event stream and API ingestion
Downloads
90
Maintainers
Readme
@anumaan/adbis-live-client
Minimal browser client for the ADBIS control-plane APIs.
Install
npm install @anumaan/adbis-live-clientFeatures
- Subscribe to live pipeline events over SSE (
/stream/events) - Ingest telemetry events (
/telemetry/ingest) - Query alerts (
/alerts)
API
new AdbisLiveClient({ baseUrl, authToken })client.stream({ replay, onEvent, onError })client.ingest(event)client.listAlerts({ limit, offset })client.close()
Quick usage
import { AdbisLiveClient } from "@anumaan/adbis-live-client";
const client = new AdbisLiveClient({ baseUrl: "http://localhost:8000" });
client.stream({
replay: 30,
onEvent: (event) => console.log("event", event.topic, event),
});
await client.ingest({
source: "custom-app",
user_id: "[email protected]",
ip: "203.0.113.55",
user_agent: "Mozilla/5.0",
event_type: "file_read",
resource: "finance/q2-forecast.xlsx",
sensitivity: "high",
access_count: 30,
timestamp: new Date().toISOString(),
});Notes
/alertsusually requires an authorization token with appropriate role claims./stream/eventsand/telemetry/ingestare useful for live demo wiring.
Local package checks
npm run check
npm run pack:checkPublish (maintainer)
npm login
npm publish --access public