@squidcloud/backend
    Preparing search index...

    Interface TriggerEvent<T>

    A generic event that can be emitted with squid.events().emit and handled by one or more subscribers declared with the backend @eventHandler decorator. Events are delivered over core's internal event stream (not the public queue API), at-least-once and with no ordering guarantee.

    interface TriggerEvent<T = unknown> {
        id: string;
        payload: T;
        type: string;
    }

    Type Parameters

    • T = unknown
    Index

    Properties

    Properties

    id: string

    Unique event id (e.g. generateUUID()).

    payload: T

    Arbitrary, JSON-serializable event payload.

    type: string

    The event type. Determines which @eventHandler subscribers receive the event.