---
title: State Machine
description: State Machine protocol schemas
---

{/* ⚠️  AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}

<Callout type="info">
**Source:** `packages/spec/src/kernel/state-machine.zod.ts`
</Callout>

## TypeScript Usage

```typescript
import { Event } from '@objectstack/spec/kernel';
import type { Event } from '@objectstack/spec/kernel';

// Validate data
const result = Event.parse(data);
```

---

## Event

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | optional | Unique event identifier |
| **name** | `string` | ✅ | Event name (lowercase with dots, e.g., user.created, order.paid) |
| **payload** | `any` | ✅ | Event payload schema |
| **metadata** | `Object` | ✅ | Event metadata |


---

