# `AshUi.ResourceBlueprint`
[🔗](https://github.com/hyperbob-labs/ash_ui/blob/main/lib/ash_ui/resource_blueprint.ex#L1)

Normalized resource contract consumed by the runtime and adapters.

`name` is retained as a stable alias of `id` .

# `action`

```elixir
@type action() :: %{
  name: atom(),
  type: atom(),
  when_variant: atom() | nil,
  arguments: [map()],
  set: [%{field: atom(), expr: Ash.Expr.t()}],
  changes: [map()]
}
```

# `attribute`

```elixir
@type attribute() :: %{
  :name =&gt; atom(),
  :type =&gt; atom(),
  :default =&gt; term(),
  optional(:route) =&gt; map() | nil,
  primary_key?: boolean(),
  required?: boolean(),
  public?: boolean()
}
```

# `calculation`

```elixir
@type calculation() :: %{
  name: atom(),
  type: atom(),
  constraints: keyword(),
  calculation: module() | {module(), keyword()} | nil,
  expr: Ash.Expr.t() | nil,
  allow_nil?: boolean()
}
```

# `relationship`

```elixir
@type relationship() :: %{
  :name =&gt; atom(),
  :type =&gt; :belongs_to | :has_many | :has_one,
  :destination =&gt; module(),
  :destination_kind =&gt; :static,
  :destination_resource =&gt; t() | nil,
  :source_attribute =&gt; atom() | nil,
  :destination_attribute =&gt; atom() | nil,
  :define_attribute? =&gt; boolean() | nil,
  :attribute_type =&gt; atom() | module() | nil,
  :allow_nil? =&gt; boolean() | nil,
  optional(:read_action) =&gt; atom() | nil,
  optional(:filter) =&gt; term(),
  optional(:sort) =&gt; term(),
  optional(:limit) =&gt; integer() | nil,
  optional(:offset) =&gt; non_neg_integer() | nil,
  optional(:no_attributes?) =&gt; boolean(),
  optional(:required_parent_attrs) =&gt; [atom()]
}
```

# `route`

```elixir
@type route() :: %{
  params: [%{name: atom(), type: atom(), default: term()}],
  queries: [%{name: atom(), default: term()}],
  states: [
    %{
      name: atom(),
      type: atom(),
      param: atom(),
      constraints: keyword(),
      default: term()
    }
  ]
}
```

# `t`

```elixir
@type t() :: %AshUi.ResourceBlueprint{
  actions: [action()],
  aggregates: [map()],
  attributes: [attribute()],
  calculations: [calculation()],
  client_drivers: [atom() | String.t()],
  data_layer: module() | atom() | nil,
  deferred_checks: [map()],
  domain: module() | nil,
  dynamic_map_props: [map()],
  extensions: [module()],
  id: atom(),
  module: module() | nil,
  name: atom() | nil,
  relationships: [relationship()],
  route: route(),
  source: term(),
  strict_expressions?: :off | :warn | :strict,
  stylesheets: [String.t()],
  view: map() | nil
}
```

---

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