ConnectorTriggerContext interface

Context object delivered to connector trigger handlers. Wraps the AI Gateway trigger callback payload with typed access to items.

Properties

items

The items delivered by the connector trigger (convenience accessor for payload.body.value).

payload

The normalized trigger callback envelope, combining all items in a polling batch.

rawPayload

The original parsed payload object or polling envelope array (before envelope extraction). Use this when you need to persist the full trigger data (e.g., to blob storage).

Methods

toJSON()

Serialises the full trigger payload to a JSON string. Convenience method for output bindings.

Property Details

items

The items delivered by the connector trigger (convenience accessor for payload.body.value).

items: TItem[]

Property Value

TItem[]

payload

The normalized trigger callback envelope, combining all items in a polling batch.

payload: TriggerCallbackPayload<TItem>

Property Value

rawPayload

The original parsed payload object or polling envelope array (before envelope extraction). Use this when you need to persist the full trigger data (e.g., to blob storage).

rawPayload: unknown

Property Value

unknown

Method Details

toJSON()

Serialises the full trigger payload to a JSON string. Convenience method for output bindings.

function toJSON(): string

Returns

string