# `SquatchMail.Source`
[🔗](https://github.com/Axio-Intelligence/Squatch-Mail/blob/v0.1.0/lib/squatch_mail/source.ex#L1)

The (single-row) SES connection configuration.

Holds the AWS region, configuration set, SNS topic, per-source webhook token,
credentials, cached quota, and retention/tracking preferences. In the
embeddable library there is exactly one source row.

# `t`

```elixir
@type t() :: %SquatchMail.Source{
  __meta__: term(),
  access_key_id: term(),
  configuration_set: term(),
  credentials_mode: term(),
  id: term(),
  inserted_at: term(),
  quota: term(),
  quota_checked_at: term(),
  region: term(),
  retention_days: term(),
  secret_access_key: term(),
  sns_topic_arn: term(),
  tracking_enabled: term(),
  updated_at: term(),
  webhook_token: term()
}
```

# `changeset`

```elixir
@spec changeset(t(), map()) :: Ecto.Changeset.t()
```

Builds a changeset for the source. A `webhook_token` is generated when absent.

# `credentials_modes`

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

Returns the list of valid credentials modes.

---

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