# Published Action Registry — Contract

> **Documentation contract only.** No Action Registry database or APIs are implemented.  
> Architecture: [published-resource-architecture.md](../architecture/published-resource-architecture.md) · [ADR-022](../architecture/adr/ADR-022.md)  
> Contract version: `published-action.v1` (additive; open registry)

---

## 1. Purpose

Every **Published Resource** may expose zero or more **Published Actions**. Actions are **service-independent** contracts: the owning business service registers and executes the action; Experience owns presentation/publishing metadata that *references* actions by `action_key` + `publish_id`.

Future services register new actions **without modifying Experience**.

---

## 2. Action Registry entry

| Field | Meaning |
| --- | --- |
| `action_key` | Stable string key (open registry) |
| `display_name` | Human label (localizable later) |
| `owning_service` | Service that owns business execution |
| `permission` | Permission string required to invoke (or public sentinel) |
| `capability` | Capability / feature discovery key |
| `feature_toggle` | Optional toggle key coordinating enablement |
| `supported_resource_types` | Open list of `resource_type` keys (or `*` for any) |

Logical record (no schema):

```
PublishedActionDefinition {
  action_key
  display_name
  owning_service
  permission
  capability
  feature_toggle?
  supported_resource_types[]
}
```

Binding to a resource (conceptual):

```
PublishedResourceAction {
  publish_id
  action_key
  enabled
  config_ref?          # opaque; owned by owning_service
}
```

---

## 3. Open action keys (examples only — not closed)

| Example `action_key` | Typical owning_service |
| --- | --- |
| `view` | experience |
| `submit` | experience / crm |
| `book` | booking / sports_center / hospitality |
| `reserve` | hospitality / sports_center |
| `pay` | payment |
| `donate` | payment |
| `register` | experience / crm / sports_center |
| `download` | experience / storage |
| `open_chat` | live_chat / communication |
| `send_message` | communication |
| `share` | experience |
| `copy_link` | short_link / experience |
| `generate_qr` | qr / experience |
| `scan_qr` | qr |
| `call` | communication |
| `navigate` | experience |
| `add_to_calendar` | experience |
| `automation_trigger` | automation |
| `webhook_trigger` | automation |
| *future.*\* | any registered service |

The registry **MUST remain open**. New keys do not require Experience code changes.

---

## 4. Rules

1. Actions are described **only by contracts** until a registered implementation phase.
2. Invocation from public surfaces passes **`publish_id`** + `action_key` (+ tenant context).
3. Experience **must not** own Payment capture, OTP delivery, Loyalty membership evaluation, or Identity authentication for actions.
4. Capability discovery MAY advertise available action keys per `publish_id` (additive; not implemented here).
5. Backward compatible: existing Published Resource contracts remain valid with zero actions.

---

## 5. Related

- [Public Access Contract](public-access-contract.md)
- [Embed Contract](embed-contract.md)
- [Published Resource Contracts](published-resource-contracts.md)
