@phylaco/contracts
v0.1.0
Published
Shared event contracts and TypeScript types for Phylaco SDKs.
Readme
@phylaco/contracts
Shared event contracts and TypeScript types for Phylaco SDKs.
This package defines the canonical structure of events sent from SDKs to the Phylaco backend.
🚀 Purpose
- Define event schema
- Ensure consistency across SDKs (browser, node, future Python/Go)
- Provide type safety
📦 Installation
npm install @phylaco/contracts📊 Example Usage
import type { PhylacoEvent } from "@phylaco/contracts";
const event: PhylacoEvent = {
eventId: "uuid",
type: "api_error",
timestamp: new Date().toISOString(),
properties: {
status: 500
}
};🧠 Notes
- This package contains only types and lightweight helpers
- No runtime logic
- Used internally by all Phylaco SDKs
📄 License
MIT
