# `Ltix.LaunchClaims.DeepLinkingSettings`
[🔗](https://github.com/DecoyLex/ltix/blob/main/lib/ltix/launch_claims/deep_linking_settings.ex#L1)

Platform preferences for a Deep Linking content selection.

Sent by the platform in an `LtiDeepLinkingRequest` launch to tell the tool
what kinds of content items are accepted.

## Required fields

  * `:deep_link_return_url` — where the tool posts the response JWT
  * `:accept_types` — content item types the platform accepts
    (e.g., `["ltiResourceLink", "link"]`)
  * `:accept_presentation_document_targets` — how the content may be
    presented (e.g., `["iframe", "window"]`)

## Optional fields

  * `:accept_media_types` — comma-separated MIME types for `file` items
  * `:accept_multiple` — whether multiple items may be returned
  * `:accept_lineitem` — whether the platform will create line items
  * `:auto_create` — whether the platform will auto-create resources
  * `:title` — suggested title for the content selection UI
  * `:text` — suggested description for the content selection UI
  * `:data` — opaque value the tool must echo back in the response

See the [Deep Linking](deep-linking.md) guide for using these settings.

# `t`

```elixir
@type t() :: %Ltix.LaunchClaims.DeepLinkingSettings{
  accept_lineitem: boolean(),
  accept_media_types: binary(),
  accept_multiple: boolean(),
  accept_presentation_document_targets: [binary()],
  accept_types: [binary()],
  auto_create: boolean(),
  data: binary(),
  deep_link_return_url: binary(),
  text: binary(),
  title: binary()
}
```

# `from_json`

```elixir
@spec from_json(map()) :: {:ok, t()} | {:error, Exception.t()}
```

Parse a deep linking settings claim from a JSON map.

## Examples

    iex> json = %{
    ...>   "deep_link_return_url" => "https://example.com/return",
    ...>   "accept_types" => ["link"],
    ...>   "accept_presentation_document_targets" => ["iframe"]
    ...> }
    iex> {:ok, settings} = Ltix.LaunchClaims.DeepLinkingSettings.from_json(json)
    iex> settings.deep_link_return_url
    "https://example.com/return"
    iex> settings.accept_types
    ["link"]

---

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