# `SuperPi.Artifacts.Store`
[🔗](https://github.com/oleksandr/super-pi-beam/blob/v0.1.0/lib/super_pi/artifacts/store.ex#L1)

Backend contract for `SuperPi.Artifacts`. Validation (name, size) happens before a call, so a
backend only stores and fetches. Implement it for another store, such as an S3-compatible bucket.

# `delete`

```elixir
@callback delete(conversation_id :: integer(), name :: String.t()) ::
  :ok | {:error, term()}
```

# `get`

```elixir
@callback get(conversation_id :: integer(), name :: String.t()) ::
  {:ok, %{data: binary(), content_type: String.t(), size: non_neg_integer()}}
  | {:error, :not_found | term()}
```

# `list`

```elixir
@callback list(conversation_id :: integer()) :: [
  %{name: String.t(), size: non_neg_integer(), content_type: String.t()}
]
```

# `put`

```elixir
@callback put(
  conversation_id :: integer(),
  name :: String.t(),
  data :: binary(),
  content_type :: String.t()
) :: {:ok, %{name: String.t(), size: non_neg_integer()}} | {:error, term()}
```

---

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