# `Squidie.Inspection.DynamicWorkPreview`
[🔗](https://github.com/dark-trench/squidie/blob/main/lib/squidie/inspection/dynamic_work_preview.ex#L1)

Validated, read-only preview of one dynamic work record.

Preview values are intended for dashboards, CLIs, and visual editors that need
to inspect the graph impact of a dynamic work payload before appending a
durable journal fact.

# `t`

```elixir
@type t() :: %Squidie.Inspection.DynamicWorkPreview{
  added_edge_ids: [String.t()],
  added_node_ids: [String.t()],
  duplicate?: boolean(),
  dynamic_work: map(),
  graph: Squidie.Inspection.GraphInspection.t(),
  origin_node_id: String.t() | nil,
  recordable?: boolean(),
  run_id: String.t(),
  warnings: [atom()]
}
```

# `new`

```elixir
@spec new(String.t(), map(), boolean(), Squidie.Inspection.GraphInspection.t()) :: t()
```

Builds a preview for proposed dynamic work and the resulting run graph.

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

Converts a dynamic work preview to a plain map for JSON encoding.

---

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