interface IntegrationEventDefinition
Since 0.6.0

A named, versioned cross-service event contract.

Produced by defineIntegrationEvent; read by publishIntegrationEvent and onIntegrationEvent.

Type Parameters

The event payload type the contract's parser produces

Properties

readonly
type: string

The event's semantic name, carried in the envelope's type field.

readonly
version: number

The contract version. A bump is a breaking payload change.

readonly
topic: string

The transport topic the event is published to and consumed from.

readonly
parse: (value: unknown) => T

Narrows the delivered payload for the application handler. Runs on the consumer side only — never on publish.

Usage

import { type IntegrationEventDefinition } from "messaging-plugin/src/index.ts";