> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Reporter events

> Reference the domain events emitted by Lerian Reporter — template, report, and deadline lifecycle — with full payloads, topics, and delivery semantics.

Reporter emits domain events as **CloudEvents 1.0** messages in binary content mode. Unlike Midaz and the other Kafka producers, Reporter publishes over **RabbitMQ**: every event is routed to the exchange named by `RABBITMQ_REPORT_EVENTS_EXCHANGE` with the event key as the AMQP routing key (`report.finished` routes as `report.finished`). The envelope is identical to the rest of the platform — see the [shared envelope](/en/reference/events/overview) — and the `topic` value in the manifest is a logical identifier derived from the source, not a broker destination.

Every event carries `ce-schemaversion` `1.0.0`. Payload keys are `snake_case`. Fields marked `?` are optional or `null`-able. Emission is post-commit and never fails the underlying work. **Critical** events are outbox-backed — written to a durable outbox and replayed through broker outages; **Important** events publish directly, falling back to the outbox when the broker circuit opens. For concepts, the manifest operation, and consumer guidance, read the [Reporter events guide](/en/reporter/reporter-events); the machine-readable catalog is served at [`GET /v1/streaming/events`](/en/reference/reporter/get-streaming-events).

## Template events

All Important.

| Event (`ce-type`)                | Fires when                                      | Key payload                                                                                                               |
| -------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `studio.lerian.template.created` | A template is uploaded and persisted.           | `template_id`, `output_format`, `description`, `file_name`, `mapped_datasource_keys`, `mapped_fields_count`, `created_at` |
| `studio.lerian.template.updated` | A template's file or metadata changes.          | `template_id`, `output_format`, `description`, `updated_fields`, `file_replaced`, `updated_at`                            |
| `studio.lerian.template.deleted` | A template is deleted, cascading its deadlines. | `template_id`, `hard_delete`, `cascaded_deadlines_deleted`, `deleted_at`                                                  |

## Report events

`report.requested` is Important; the three terminal events are Critical.

| Event (`ce-type`)                | Fires when                                                                                                                                                                                                                                   | Key payload                                                                                                                                                                                       |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `studio.lerian.report.requested` | A report request is accepted and durably queued (status `Processing`), before the worker picks it up.                                                                                                                                        | `report_id`, `template_id`, `output_format`, `status`, `request_id`, `filter_datasource_count`, `template_description`                                                                            |
| `studio.lerian.report.finished`  | Every data section succeeded and the artifact is stored.                                                                                                                                                                                     | `report_id`, `template_id`, `output_format`, `status`, `artifact_object_key`, `artifact_content_type`, `artifact_ttl`?, `completed_at`, `duration_ms`, `section_count`                            |
| `studio.lerian.report.partial`   | At least one section failed but an artifact exists. `section_failures` carries canonical error codes only.                                                                                                                                   | `report_id`, `template_id`, `output_format`, `status`, `artifact_object_key`, `artifact_content_type`, `section_failures`, `completed_at`, `duration_ms`, `section_count`, `failed_section_count` |
| `studio.lerian.report.errored`   | The report ends in error — either the worker dispatch failed or generation failed. `error_code` is a fixed vocabulary (`report_generation_failed`, `report_generation_timeout`, `report_generation_canceled`); raw error text never travels. | `report_id`, `template_id`?, `output_format`?, `status`, `error_code`, `error_summary`, `completed_at`, `duration_ms`?                                                                            |

`report.errored` can originate from the manager (dispatch failure) or the worker (generation failure). Both share the deterministic `ce-id` `reporter.report.error.<report_id>`, so duplicates collapse at the consumer.

## Deadline events

`deadline.delivered` and `deadline.delivery_reverted` are Critical; the rest are Important.

| Event (`ce-type`)                          | Fires when                                                                         | Key payload                                                                                                                                                                         |
| ------------------------------------------ | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `studio.lerian.deadline.created`           | A regulatory deadline is created.                                                  | `deadline_id`, `name`, `type`, `template_id`?, `template_name`, `due_date`, `frequency`, `months_of_year`, `active`, `notify_days_before`, `color`, `status_snapshot`, `created_at` |
| `studio.lerian.deadline.updated`           | A deadline changes.                                                                | `deadline_id`, `updated_fields`, `template_id`?, `template_name`, `due_date`, `frequency`, `months_of_year`, `active`, `status_snapshot`, `updated_at`                              |
| `studio.lerian.deadline.deleted`           | A deadline is soft-deleted.                                                        | `deadline_id`, `soft_delete`, `deleted_at`                                                                                                                                          |
| `studio.lerian.deadline.delivered`         | A deadline is marked delivered. `next_occurrence` is `null` for one-off deadlines. | `deadline_id`, `template_id`?, `template_name`, `type`, `due_date`, `delivered_at`?, `status_snapshot`, `frequency`, `next_occurrence`?, `updated_at`                               |
| `studio.lerian.deadline.delivery_reverted` | A delivery mark is cleared.                                                        | `deadline_id`, `template_id`?, `template_name`, `type`, `due_date`, `reverted_at`, `previous_delivered_at`?, `status_snapshot`, `frequency`, `updated_at`                           |

## Events consumed

Reporter consumes no platform events — this channel is publish-only. The manager-to-worker report generation traffic runs on an internal RabbitMQ work queue that is not part of the public event contract.
