Interface FixedFields<K>

The fields every event carries, whatever its kind.

import type { Event } from "itinera/event";

export function summary(event: Event): string {
if (event.kind === "step_failed") {
return `${event.step} failed: ${event.reason.code}`;
}
if (event.kind === "journey_aborted") {
return `aborted: ${event.abort.reason}`;
}
return `${event.kind} at ${event.timestamp}`;
}
interface FixedFields<K extends EventKind> {
    journeyId: JourneyId;
    kind: K;
    sequence: number;
    timestamp: Timestamp;
    workflow: WorkflowName;
}

Type Parameters

Hierarchy (View Summary)

Index

journeyId: JourneyId

The journey's ID.

kind: K

The event's kind, which tells what else it carries.

sequence: number

The event's position in its journey's event stream, from 1.

timestamp: Timestamp

When the event was emitted.

workflow: WorkflowName

The workflow's name.