# `Insider.Observability.Trigger`
[🔗](https://github.com/hiivemarkets/insider/blob/v0.1.0/lib/insider/observability/trigger.ex#L1)

A bounded, vendor-neutral request for local incident handling.

A trigger is inert data. It may request only a local freeze or follow-up and
carries host-produced correlation fingerprints. Raw external identifiers,
secrets, and customer data must not enter this artifact. It contains no runtime policy,
environment, authority, target, collection scope, redaction choice, callback,
endpoint, credential, or transport instruction.

The content-addressed `id` is also the idempotency key for the exact request.
It does not authorize an operation or attest that one was performed.

# `operation`

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

# `t`

```elixir
@type t() :: %Insider.Observability.Trigger{
  external_event_fingerprint: String.t(),
  external_incident_fingerprint: String.t(),
  id: String.t(),
  operation: operation(),
  provider: String.t(),
  schema: String.t()
}
```

# `canonical_binary`

```elixir
@spec canonical_binary(term()) ::
  {:ok, binary()} | {:error, Insider.Protocol.Error.t()}
```

# `decode`

```elixir
@spec decode(binary()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

# `decode_map`

```elixir
@spec decode_map(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

# `idempotency_key`

```elixir
@spec idempotency_key(term()) ::
  {:ok, String.t()} | {:error, Insider.Protocol.Error.t()}
```

Returns the deterministic idempotency key for a valid trigger.

# `new`

```elixir
@spec new(keyword()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

# `to_wire_map`

```elixir
@spec to_wire_map(t()) :: map()
```

# `validate`

```elixir
@spec validate(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

---

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