Events Dlq schema — Kernel Protocol reference
Events Dlq schemas of the ObjectStack Kernel Protocol: DeadLetterQueueEntry, EventLogEntry — each property with its type, default and a TypeScript example.
Source: packages/spec/src/kernel/events/dlq.zod.ts
TypeScript Usage
import { DeadLetterQueueEntrySchema, EventLogEntrySchema } from '@objectstack/spec/kernel';
import type { DeadLetterQueueEntry, EventLogEntry } from '@objectstack/spec/kernel';
// Validate data
const result = DeadLetterQueueEntrySchema.parse(data);DeadLetterQueueEntry
Properties
| 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 | string | optional | Handler ID that failed |
Nested Shape: DeadLetterQueueEntry.event
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | optional | 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 |
Nested Shape: DeadLetterQueueEntry.error
| Property | Type | Required | Description |
|---|---|---|---|
| message | string | ✅ | Error message |
| stack | string | optional | Error stack trace |
| code | string | optional | Error code |
EventLogEntry
Properties
| 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 | string | optional | When event was processed |
| totalDurationMs | integer | optional | Total processing time |
Nested Shape: EventLogEntry.event
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | optional | 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 |
Nested Shape: EventLogEntry.handlersExecuted[number]
| Property | Type | Required | Description |
|---|---|---|---|
| handlerId | string | ✅ | Handler identifier |
| status | Enum<'success' | 'failed' | 'timeout'> | ✅ | Handler execution status |
| durationMs | integer | optional | Execution duration |
| error | string | optional | Error message if failed |
Events Core
Events Core schemas of the ObjectStack Kernel Protocol: Event, EventMetadata and 2 more — each property with its type, default and a TypeScript example.
Events Handlers
Events Handlers schemas of the ObjectStack Kernel Protocol: EventHandler and 2 more — each property with its type, default and a TypeScript example.