Events Dlq Events Dlq protocol schemas
Source: packages/spec/src/kernel/events/dlq.zod.ts
import { DeadLetterQueueEntrySchema, EventLogEntrySchema } from '@objectstack/spec/kernel' ;
import type { DeadLetterQueueEntry, EventLogEntry } from '@objectstack/spec/kernel' ;
// Validate data
const result = DeadLetterQueueEntrySchema. parse (data);
Property Type Required Description id string✅ Unique entry identifier event { id?: string; name: string; payload: any; metadata: object }✅ Original event error { message: string; stack?: string; code?: string }✅ Failure details retries integer✅ Number of retry attempts firstFailedAt string✅ When event first failed lastFailedAt string✅ When event last failed failedHandler stringoptional Handler ID that failed
Property Type Required Description id stringoptional Unique event identifier name string✅ Event name (dot notation by convention, e.g. user.created, order.paid; the platform-checked event vocabulary is the closed DataEventType / BulkDataEventType enums) payload any✅ Event payload schema metadata { source: string; timestamp: string; userId?: string; tenantId?: string; … }✅ Event metadata
Property Type Required Description message string✅ Error message stack stringoptional Error stack trace code stringoptional Error code
Property Type Required Description id string✅ Unique log entry identifier event { id?: string; name: string; payload: any; metadata: object }✅ The event status Enum<'pending' | 'processing' | 'completed' | 'failed'>✅ Processing status handlersExecuted { handlerId: string; status: Enum<'success' | 'failed' | 'timeout'>; durationMs?: integer; error?: string }[]optional Handlers that processed this event receivedAt string✅ When event was received processedAt stringoptional When event was processed totalDurationMs integeroptional Total processing time
Property Type Required Description id stringoptional Unique event identifier name string✅ Event name (dot notation by convention, e.g. user.created, order.paid; the platform-checked event vocabulary is the closed DataEventType / BulkDataEventType enums) payload any✅ Event payload schema metadata { source: string; timestamp: string; userId?: string; tenantId?: string; … }✅ Event metadata
Property Type Required Description handlerId string✅ Handler identifier status Enum<'success' | 'failed' | 'timeout'>✅ Handler execution status durationMs integeroptional Execution duration error stringoptional Error message if failed