Interface StepHookCalled

A hook of a step policy returned without failing.

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 StepHookCalled {
    journeyId: JourneyId;
    kind: "hook_called";
    lifecycle?: Lifecycle;
    sequence: number;
    source: StepHookSource;
    timestamp: Timestamp;
    workflow: WorkflowName;
}

Hierarchy (View Summary)

Index

journeyId: JourneyId

The journey's ID.

kind: "hook_called"

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

lifecycle?: Lifecycle

The lifecycle it returned; none when it kept the default.

sequence: number

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

The hook, with the step and attempt that triggered it.

timestamp: Timestamp

When the event was emitted.

workflow: WorkflowName

The workflow's name.