AshTypescript.Rpc.Codegen.RpcConfigCollector (ash_typescript v0.17.2)

Copy Markdown View Source

Collects RPC configuration from domains including resources, actions, and typed queries.

Summary

Functions

Gets RPC configuration grouped by domain.

Gets all RPC resources and their actions from an OTP application.

Gets RPC actions grouped by namespace.

Gets all typed queries from an OTP application.

Resolves the namespace for an RPC action.

Functions

get_rpc_config_by_domain(otp_app)

Gets RPC configuration grouped by domain.

Returns a list of tuples: {domain, rpc_config} where rpc_config contains resources with their rpc_actions and typed_queries.

Used by the manifest generator to organize actions by domain.

get_rpc_resources_and_actions(otp_app)

Gets all RPC resources and their actions from an OTP application.

Returns a list of tuples: {resource, action, rpc_action}

get_rpc_resources_by_namespace(otp_app)

Gets RPC actions grouped by namespace.

Returns a map where keys are namespaces (atoms or nil for no namespace) and values are lists of {resource, action, rpc_action, domain, resource_config} tuples.

get_typed_queries(otp_app)

Gets all typed queries from an OTP application.

Returns a list of tuples: {resource, action, typed_query}

resolve_namespace(domain, resource_config, rpc_action)

Resolves the namespace for an RPC action.

Namespace precedence: action > resource > domain. Returns nil if no namespace is configured at any level.