# `PhoenixKitAI.GuardEvent`
[🔗](https://github.com/BeamLabEU/phoenix_kit_ai/blob/v0.26.1/lib/phoenix_kit_ai/guard_event.ex#L1)

Something the AI task guard noticed (`phoenix_kit_ai_guard_events`, this
module's migration chain), written by `PhoenixKitAI.GuardEvents`.

`kind` is one of `kinds/0`. `dedupe_key`, when set, is unique: an event
that should be signalled once per window carries a key naming that window,
and only the insert that went through signals. `ref` holds what the kind
needs (the scope, unit and period of a limit). `reason` is never sent in a
notification.

# `t`

```elixir
@type t() :: %PhoenixKitAI.GuardEvent{
  __meta__: term(),
  actor_uuid: term(),
  dedupe_key: term(),
  endpoint_uuid: term(),
  inserted_at: term(),
  kind: term(),
  reason: term(),
  ref: term(),
  request_uuid: term(),
  task_key: term(),
  user_uuid: term(),
  uuid: term()
}
```

# `kinds`

```elixir
@spec kinds() :: [String.t()]
```

Every kind the table takes (its CHECK constraint).

---

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