Entry point for TypeScript path helper code generation.
Orchestrates the generation of TypeScript path helper functions from typed controller routes configured in the DSL.
Summary
Functions
Collects all exports for a list of route infos (for namespace re-export files).
Collects all per-route Valibot schemas from typed controller routes.
Collects all per-route Zod schemas from typed controller routes.
Whether a route gets a generated fetch function (in addition to its path helper).
Generates typed controller TypeScript content for the multi-file architecture.
Generates a namespace re-export file for the given namespace and route infos.
Groups route infos by resolved namespace.
Returns the route's primary exported function name: its fetch function when it
has one (see fetch_function?/1), otherwise its path helper. Used by both
manifest generators.
Returns the exported input type name of a mutation route's fetch function.
Returns the exported result type name for a route that declares returns.
Returns the exported Valibot schema name for a route, honoring the route's
valibot_schema_name override.
Returns the exported Zod schema name for a route, honoring the route's
zod_schema_name override.
Functions
Collects all exports for a list of route infos (for namespace re-export files).
Returns a list of {name, kind} tuples where kind is :value, :type, :zod_value,
or :valibot_value.
Collects all per-route Valibot schemas from typed controller routes.
Returns a list of Valibot schema strings (one per mutation route that has non-path arguments).
These are meant to be passed to SharedSchemaGenerator as :additional_schemas.
Collects all per-route Zod schemas from typed controller routes.
Returns a list of Zod schema strings (one per mutation route that has non-path arguments).
These are meant to be passed to SharedSchemaGenerator as :additional_schemas.
Whether a route gets a generated fetch function (in addition to its path helper).
Only in :full mode: every mutation route, and GET routes that declare
returns — those are JSON endpoints, whereas other GET routes typically
render pages and are navigated to rather than fetched.
Single source of truth for the rule — used by RouteRenderer,
collect_route_exports/1, and both manifest generators.
Generates typed controller TypeScript content for the multi-file architecture.
This generates the controller routes file with imports from shared types file. No inline types, no Zod schemas — those live in ash_types.ts and ash_zod.ts.
Parameters
opts- Options keyword list::router- Phoenix router module:import_paths-%{types: path}for import resolution (types only, no Zod)
Generates a namespace re-export file for the given namespace and route infos.
Used by the Orchestrator to generate namespace files with proper import paths.
Groups route infos by resolved namespace.
Returns a map of %{namespace => [route_info]} where namespace is a string or nil.
Returns the route's primary exported function name: its fetch function when it
has one (see fetch_function?/1), otherwise its path helper. Used by both
manifest generators.
Returns the exported input type name of a mutation route's fetch function.
Single source of truth for the name — used by RouteRenderer,
collect_route_exports/1, and both manifest generators.
Returns the exported result type name for a route that declares returns.
Single source of truth for the name — used by RouteRenderer (the export and
the action function's return type), collect_route_exports/1, and both
manifest generators.
Returns the exported Valibot schema name for a route, honoring the route's
valibot_schema_name override.
Single source of truth for the name — used by RouteRenderer.render_valibot_schema/1
(the export itself), collect_route_exports/1 (namespace re-exports), and
JsonManifestGenerator (the advertised name), so they cannot drift.
Returns the exported Zod schema name for a route, honoring the route's
zod_schema_name override.
Single source of truth for the name — used by RouteRenderer.render_zod_schema/1
(the export itself), collect_route_exports/1 (namespace re-exports), and
JsonManifestGenerator (the advertised name), so they cannot drift.