# `MimirAnalytics.Row.EventRaw`
[🔗](https://github.com/cash-mckeeman/mimir/blob/mimir_analytics-v0.8.1/mimir_analytics/lib/mimir_analytics/row/event_raw.ex#L1)

One row of `events_raw` — a single raw event from either a Capture session
result or a gateway request log's `turn_events`, tagged by `source` so
downstream consumers can tell which shape `payload` carries, and by `domain`
(`llm | agent | workflow`) when the source event carries the typed vocabulary.

`ce_id`/`ce_source`/`ce_type` are the CloudEvents v1.0 envelope attributes,
populated only for gateway rows whose source entry was enveloped; they are
NULL for session/eval rows and for pre-envelope gateway history. `ts` is the
envelope's wall-clock `time` (UTC RFC3339) — NULL wherever no producer ever
emitted one. The source event's monotonic `ts` is never stored here; it
rides verbatim inside `payload`.

# `source`

```elixir
@type source() :: String.t()
```

# `t`

```elixir
@type t() :: %MimirAnalytics.Row.EventRaw{
  ce_id: String.t() | nil,
  ce_source: String.t() | nil,
  ce_type: String.t() | nil,
  domain: String.t() | nil,
  payload: map(),
  scope_id: String.t() | nil,
  seq: integer(),
  source: source(),
  source_file: String.t(),
  ts: String.t() | nil,
  type: String.t() | nil
}
```

# `new`

```elixir
@spec new(%{
  :scope_id =&gt; String.t() | nil,
  :seq =&gt; integer(),
  :ts =&gt; String.t() | nil,
  optional(:domain) =&gt; String.t() | nil,
  optional(:ce_id) =&gt; String.t() | nil,
  optional(:ce_source) =&gt; String.t() | nil,
  optional(:ce_type) =&gt; String.t() | nil,
  type: String.t() | nil,
  payload: map(),
  source: source(),
  source_file: String.t()
}) :: t()
```

Build a `t()` from the mapper-resolved context. `:domain` and the three
`:ce_*` envelope attributes are optional and default to `nil`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
