UNPKG

arvo-event-handler

Version:

A complete set of orthogonal event handler and orchestration primitives for Arvo based applications, featuring declarative state machines (XState), imperative resumables for agentic workflows, contract-based routing, OpenTelemetry observability, and in-me

13 lines (12 loc) 731 B
import type { Span } from '@opentelemetry/api'; import { type ArvoEvent, type ArvoOrchestrationSubjectContent } from 'arvo-core'; import type { SyncEventResource } from '../../SyncEventResource'; /** * Validates and parses an orchestration event's subject. * * Ensures the event subject is valid and matches the expected orchestrator source. * Returns null if validation fails, allowing graceful handling of mismatched events. * * @returns Parsed subject content or null if validation fails */ export declare const validateAndParseSubject: (event: ArvoEvent, expectedSource: string, syncEventResource: SyncEventResource<any>, span: Span, handlerType: "orchestrator" | "resumable") => ArvoOrchestrationSubjectContent | null;