# `Cuerdo.Arazzo.Context`

Internal Arazzo Context. Stores workflows and steps inputs/outputs, request/response, etc.

# `t`

```elixir
@type t() :: %Cuerdo.Arazzo.Context{
  api_calls: term(),
  api_calls_global_ref: term(),
  cache: term(),
  client: term(),
  document: term(),
  inputs: term(),
  outputs: term(),
  resolver: term()
}
```

# `api_calls`

# `clear_api_calls`

# `fetch_source_description`

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

Fetch a source description by name. Returns `{:ok, source_description, updated_context}`
on success, or an error tuple

# `fetch_step_response`

# `from_base`

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

Creates a new Context, using an existing context as base

# `get_source_description_name`

```elixir
@spec get_source_description_name(String.t(), t()) :: String.t()
```

Returns the source description name for a given operation path or id

# `new`

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

Creates a new context

# `new!`

```elixir
@spec new!(map(), Keyword.t()) :: t()
```

Same as `new/2` but raises on error

# `put_inputs`

```elixir
@spec put_inputs(t(), String.t(), map()) :: t()
```

Puts a map of `%{input_name => value}` in the `workflow_id` inputs. Returns
the updated context

# `put_source_description`

```elixir
@spec put_source_description(t(), String.t(), map()) :: t()
```

Sets the source description value to the given schema. Returns the updated context

# `step_outputs`

```elixir
@spec step_outputs(t(), String.t(), String.t()) :: map()
```

Returns the outputs map for the given stepId, or an empty map if the step
does not define any outputs

# `workflow_outputs`

```elixir
@spec workflow_outputs(t(), String.t()) :: map()
```

Returns the outputs map for the given workflowId.

---

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