A whole domain: the top-level IR produced by compilation.
Summary
Functions
The first entity that declares an authenticatable block, or nil
if none do. Caravela currently supports a single authenticatable
entity per domain.
True if the domain has an authenticatable entity.
The fallback policy for entities without a declared policy block.
:deny (default): scope filters to zero rows, every field hidden,
every write gate denies. :allow: legacy permissive behavior.
Lookup an entity by its DSL name.
Does the domain declare a hook for action on entity?
Is the domain multi-tenant (row-level scoped by tenant_id)?
Policy entry for entity, or nil if none was declared.
Explicit API version declared via version "v1" in the DSL. Returns
the raw string (e.g. "v1") or nil when no version was declared.
Camelized version segment usable as a module name suffix
("v1" → "V1"). Returns nil when no version is declared.
Types
@type t() :: %Caravela.Schema.Domain{ entities: [Caravela.Schema.Entity.t()], hooks: [Caravela.Schema.Hook.t()], module: module(), opts: keyword(), policies: [Caravela.Policy.Entry.t()], relations: [Caravela.Schema.Relation.t()] }
Functions
The first entity that declares an authenticatable block, or nil
if none do. Caravela currently supports a single authenticatable
entity per domain.
True if the domain has an authenticatable entity.
The fallback policy for entities without a declared policy block.
:deny (default): scope filters to zero rows, every field hidden,
every write gate denies. :allow: legacy permissive behavior.
Lookup an entity by its DSL name.
Does the domain declare a hook for action on entity?
Is the domain multi-tenant (row-level scoped by tenant_id)?
Policy entry for entity, or nil if none was declared.
Explicit API version declared via version "v1" in the DSL. Returns
the raw string (e.g. "v1") or nil when no version was declared.
Camelized version segment usable as a module name suffix
("v1" → "V1"). Returns nil when no version is declared.