# `AshScim.Igniter`
[🔗](https://github.com/ash-project/ash_scim/blob/main/lib/ash_scim/igniter.ex#L6)

Igniter helpers used by `mix ash_scim.install` and friends. None of
these touch runtime introspection — they all read and write the
project's source files via `Igniter` so the installer can run before
the user's code is compiled.

# `add_scim_section`

```elixir
@spec add_scim_section(Igniter.t(), module(), String.t()) :: Igniter.t()
```

Adds a `scim do ... end` block with the given body to the resource if
one isn't already declared. Idempotent — re-running won't duplicate
the contents.

Uses `Spark.Igniter.update_dsl/5` to handle section creation: if
`scim do ... end` doesn't exist, Spark adds an empty one and walks
inside it; we then drop our parsed `body` AST in. If it already
exists, the existence check up front short-circuits, so we don't
risk appending duplicates.

# `ensure_scim_bypass`

```elixir
@spec ensure_scim_bypass(Igniter.t(), module()) :: Igniter.t()
```

Adds the `AshScim.Checks.AshScimInteraction` bypass policy to the
resource. Idempotent — re-running won't duplicate the bypass.

# `has_scim_section?`

```elixir
@spec has_scim_section?(Igniter.t(), module()) :: {Igniter.t(), boolean()}
```

Returns `{igniter, true}` if the resource already declares a `scim`
DSL block, `{igniter, false}` otherwise. Used to make the installer
idempotent.

---

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