Module itinera/event

Events: the record of what happens in a journey and what only events carry.

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}`;
}
AdapterSource
ByAdapter
ByAdapterForKey
ByPolicy
ByProvider
ByProviderForKey
ByRescueStep
ByStep
ByStepHook
ByWorkflowHook
ContributionCommitted
DataOverwritten
DecidingHook
EmittedByHook
EmittedByStep
FixedFields
GlobalMetadataSet
HookFailed
InputAdapterFailed
InputAdapterSupplied
InvalidLifecycle
JourneyAborted
JourneyFailedByHook
JourneyFailedWithError
JourneyFailedWithReason
JourneyStarted
JourneySucceeded
MissingFailure
MissingKey
NotAValueInDetails
NotAValueInEvent
NotAValueInServiceProvided
NotAValueUnderKey
OptionalInputAbsent
PolicyCouldNotBeBuilt
ProviderSource
ReporterFailed
RequiredDataMissing
RescueSkipped
ReservedMetadataKey
ServiceProvided
ServiceProviderFailed
StepAbnormalTermination
StepCouldNotBeBuilt
StepFailed
StepFields
StepGivenUpByDefault
StepGivenUpByHook
StepHookCalled
StepHookSource
StepRescued
StepRescuing
StepRetrying
StepSkipped
StepSource
UnexpectedResult
WorkflowHookCalled
WrongType
AttemptStarted
ContributionsDiscarded
ContributionSource
DecidedBy
EmittedKind
EmitterSource
Event
EventKind
FailureRequester
GiveUpHook
HookCalled
HookSource
JourneyAbort
JourneyError
JourneyFailed
JourneyInfo
JourneyWarning
MetadataSource
MissingData
NotAValue
Requester
RequestSource
RescueCause
StepError
StepGivenUp
StepInfo
StepSucceeded
StepWarning
Timestamp
EventKind
RescueCause