@bondi-labs/integration-sdk - v0.0.2
    Preparing search index...

    Interface TriggerDefinition<TSchema>

    A trigger your integration can fire — Bondi receives the event via the public HMAC-signed /integrations/custom/:wsId/:slug/emit endpoint and runs any subscribed workflows.

    The generic TSchema parameter makes emit() payloads strongly typed when paired with BondiTriggerBase (NestJS adapter) or client.bind().

    const contactCreated = defineTrigger({
    name: "contact.created",
    label: "Contact Created",
    payload: z.object({ id: z.string(), email: z.string().email() }),
    });
    interface TriggerDefinition<TSchema extends ZodTypeAny = ZodTypeAny> {
        description?: string;
        label: string;
        name: string;
        payload: TSchema;
    }

    Type Parameters

    • TSchema extends ZodTypeAny = ZodTypeAny
    Index

    Properties

    description?: string

    Optional longer description.

    label: string

    Human-readable label shown in the Bondi Studio trigger picker.

    name: string

    Stable identifier sent in the x-bondi-action header.

    payload: TSchema

    Zod schema describing the event payload — converted to JSON Schema at sync.