# `ExWapp.Domains.Contacts.Repository`
[🔗](https://github.com/elchemista/ex_wapp/blob/v0.1.5/lib/ex_wapp/contacts/repository.ex#L1)

Persists normalized contacts in an `ExWapp.Store`.

Every lookup and write canonicalizes the JID and removes legacy aliases, so
consumers see one contact record regardless of the identifier form received
from the wire.

# `delete`

```elixir
@spec delete(struct(), String.t()) :: :ok
```

Deletes a contact and every legacy alias for the same JID.

# `get`

```elixir
@spec get(struct(), String.t()) :: ExWapp.Contact.t() | nil
```

Fetches a contact by JID, including records stored under legacy aliases.

# `list`

```elixir
@spec list(struct()) :: [ExWapp.Contact.t()]
```

Lists all normalized contacts currently stored.

# `merge_from_sync`

```elixir
@spec merge_from_sync(struct(), String.t(), map()) :: :ok
```

Merges contact fields decoded from app-state synchronization.

# `put`

```elixir
@spec put(struct(), String.t(), ExWapp.Contact.t()) :: :ok
```

Stores a contact under its canonical JID and removes duplicate aliases.

# `update_push_name`

```elixir
@spec update_push_name(struct(), String.t(), String.t()) :: :ok
```

Updates the push name associated with a contact.

---

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