umari 0.3.0

SDK for building event-sourced WASM components for the Umari runtime
Documentation
package umari:common@0.1.0;

/// Shared types across all umari packages
interface types {
    /// JSON encoded as UTF-8 string
    /// The host passes JSON through without parsing, guest deserializes as needed
    type json = string;

    /// Unix timestamp in milliseconds since epoch (1970-01-01T00:00:00Z)
    type timestamp = s64;

    /// Event type identifier (e.g., "user.created", "order.placed")
    type event-type = string;

    type uuid = string;

    record event-query {
        items: list<event-filter>,
    }

    record event-filter {
        types: list<string>,
        tags: list<string>,
    }

    /// Event data as stored/retrieved from the event store
    record stored-event {
        id: uuid,
        position: s64,
        event-type: event-type,
        tags: list<string>,
        timestamp: timestamp,
        correlation-id: uuid,
        causation-id: uuid,
        triggering-event-id: option<uuid>,
        idempotency-key: option<uuid>,
        encryption-scope: option<string>,
        encryption-key-id: option<uuid>,
        data: json,
    }
}