@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;
        integrationId?: string;
        payload: T;
        prompt?: string;
        type: string;
    }

    Type Parameters

    • T = unknown
    Index
    id: string

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

    integrationId?: string

    The integration the event came from. Agent automations bound to integrations match on it.

    payload: T

    Arbitrary, JSON-serializable event payload.

    prompt?: string

    The prompt an agent automation listening to the event runs its agent with, in place of its default one.

    type: string

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