# ash_typescript v0.14.1 - Table of Contents Generate type-safe TypeScript clients directly from your Ash resources and actions, ensuring end-to-end type safety between your backend and frontend. ## GUIDES - [Home](readme.md) - Getting Started - [Installation](installation.md) - [Your First RPC Action](first-rpc-action.md) - [Frontend Frameworks](frontend-frameworks.md) - Guides - [CRUD Operations](crud-operations.md) - [Field Selection](field-selection.md) - [Querying Data](querying-data.md) - [Typed Queries](typed-queries.md) - [Error Handling](error-handling.md) - [Form Validation](form-validation.md) - Features - [RPC Action Options](rpc-action-options.md) - [Phoenix Channel-based RPC Actions](phoenix-channels.md) - [Lifecycle Hooks](lifecycle-hooks.md) - [Multitenancy Support](multitenancy.md) - [Action Metadata Support](action-metadata.md) - [Developer Experience Features](developer-experience.md) - Advanced - [Union Types](union-types.md) - [Embedded Resources](embedded-resources.md) - [Custom Fetch Functions](custom-fetch.md) - [Custom Types](custom-types.md) - [Field and Argument Name Mapping](field-name-mapping.md) - Reference - [Configuration Reference](configuration.md) - [Mix Tasks Reference](mix-tasks.md) - [Troubleshooting](troubleshooting.md) - DSLs - [AshTypescript.Rpc](dsl-ashtypescript-rpc.md) - [AshTypescript.Resource](dsl-ashtypescript-resource.md) - About AshTypescript - [Change Log](changelog.md) ## Modules - [AshTypescript.Codegen](AshTypescript.Codegen.md): Main code generation module for TypeScript types and schemas from Ash resources. - [AshTypescript.Codegen.FilterTypes](AshTypescript.Codegen.FilterTypes.md): Generates TypeScript filter types for Ash resources. - [AshTypescript.Codegen.Helpers](AshTypescript.Codegen.Helpers.md): Shared helper functions for code generation. - [AshTypescript.Codegen.ResourceSchemas](AshTypescript.Codegen.ResourceSchemas.md): Generates TypeScript schemas for Ash resources. - [AshTypescript.Codegen.TypeAliases](AshTypescript.Codegen.TypeAliases.md): Generates TypeScript type aliases for Ash types (e.g., UUID, Decimal, DateTime, etc.). - [AshTypescript.Codegen.TypeDiscovery](AshTypescript.Codegen.TypeDiscovery.md): Discovers all types that need TypeScript definitions generated. - [AshTypescript.Codegen.TypeMapper](AshTypescript.Codegen.TypeMapper.md): Maps Ash types to TypeScript types using unified type-driven dispatch. - [AshTypescript.FieldFormatter](AshTypescript.FieldFormatter.md): Handles field name formatting for input parameters, output fields, and TypeScript generation. - [AshTypescript.Helpers](AshTypescript.Helpers.md): Utility functions for string manipulation and transformations. - [AshTypescript.Resource](AshTypescript.Resource.md): Spark DSL extension for configuring TypeScript generation on Ash resources. - [AshTypescript.Resource.Info](AshTypescript.Resource.Info.md): Provides introspection functions for AshTypescript.Resource configuration. - [AshTypescript.Resource.Verifiers.VerifyFieldNames](AshTypescript.Resource.Verifiers.VerifyFieldNames.md): Verifies that resource field names are valid for TypeScript generation. - [AshTypescript.Resource.Verifiers.VerifyMapFieldNames](AshTypescript.Resource.Verifiers.VerifyMapFieldNames.md): Verifies that field names in map, keyword, and tuple type constraints are valid for TypeScript. - [AshTypescript.Resource.Verifiers.VerifyMappedFieldNames](AshTypescript.Resource.Verifiers.VerifyMappedFieldNames.md): Verifies that field_names configuration is valid. - [AshTypescript.Resource.Verifiers.VerifyUniqueTypeNames](AshTypescript.Resource.Verifiers.VerifyUniqueTypeNames.md): Checks that all resources using AshTypescript.Resource have unique type_name values. - [AshTypescript.Rpc.Codegen](AshTypescript.Rpc.Codegen.md): Generates TypeScript code for interacting with Ash resources via Rpc. - [AshTypescript.Rpc.Codegen.FunctionGenerators.ChannelRenderer](AshTypescript.Rpc.Codegen.FunctionGenerators.ChannelRenderer.md): Renders Channel-specific TypeScript functions (handler-based, Phoenix channels). - [AshTypescript.Rpc.Codegen.FunctionGenerators.FunctionCore](AshTypescript.Rpc.Codegen.FunctionGenerators.FunctionCore.md): Builds the common "shape" of RPC functions, independent of transport. - [AshTypescript.Rpc.Codegen.FunctionGenerators.HttpRenderer](AshTypescript.Rpc.Codegen.FunctionGenerators.HttpRenderer.md): Renders HTTP-specific TypeScript functions (Promise-based, fetch). - [AshTypescript.Rpc.Codegen.FunctionGenerators.JsdocGenerator](AshTypescript.Rpc.Codegen.FunctionGenerators.JsdocGenerator.md): Generates JSDoc comments for RPC functions. - [AshTypescript.Rpc.Codegen.FunctionGenerators.TypeBuilders](AshTypescript.Rpc.Codegen.FunctionGenerators.TypeBuilders.md): Builds TypeScript type definitions for RPC function results and configurations. - [AshTypescript.Rpc.Codegen.FunctionGenerators.TypedQueries](AshTypescript.Rpc.Codegen.FunctionGenerators.TypedQueries.md): Generates TypeScript typed query types and field constants. - [AshTypescript.Rpc.Codegen.Helpers.ActionIntrospection](AshTypescript.Rpc.Codegen.Helpers.ActionIntrospection.md): Provides helper functions for analyzing Ash actions. - [AshTypescript.Rpc.Codegen.Helpers.ConfigBuilder](AshTypescript.Rpc.Codegen.Helpers.ConfigBuilder.md): Builds TypeScript configuration field definitions for RPC functions. - [AshTypescript.Rpc.Codegen.Helpers.PayloadBuilder](AshTypescript.Rpc.Codegen.Helpers.PayloadBuilder.md): Builds TypeScript payload field definitions for RPC function implementations. - [AshTypescript.Rpc.Codegen.ManifestGenerator](AshTypescript.Rpc.Codegen.ManifestGenerator.md): Generates a Markdown manifest of all RPC actions for discoverability. - [AshTypescript.Rpc.Codegen.RpcConfigCollector](AshTypescript.Rpc.Codegen.RpcConfigCollector.md): Collects RPC configuration from domains including resources, actions, and typed queries. - [AshTypescript.Rpc.Codegen.TypeGenerators.InputTypes](AshTypescript.Rpc.Codegen.TypeGenerators.InputTypes.md): Generates TypeScript input types for RPC actions. - [AshTypescript.Rpc.Codegen.TypeGenerators.MetadataTypes](AshTypescript.Rpc.Codegen.TypeGenerators.MetadataTypes.md): Generates TypeScript metadata types for RPC actions. - [AshTypescript.Rpc.Codegen.TypeGenerators.PaginationTypes](AshTypescript.Rpc.Codegen.TypeGenerators.PaginationTypes.md): Generates TypeScript pagination result types for RPC actions. - [AshTypescript.Rpc.Codegen.TypeGenerators.RestrictedSchema](AshTypescript.Rpc.Codegen.TypeGenerators.RestrictedSchema.md): Generates restricted resource schemas based on allowed_loads/denied_loads options. - [AshTypescript.Rpc.Codegen.TypeGenerators.ResultTypes](AshTypescript.Rpc.Codegen.TypeGenerators.ResultTypes.md): Generates TypeScript result types for RPC actions. - [AshTypescript.Rpc.Codegen.TypescriptStatic](AshTypescript.Rpc.Codegen.TypescriptStatic.md): Generates static TypeScript code that doesn't depend on specific resources. - [AshTypescript.Rpc.DefaultErrorHandler](AshTypescript.Rpc.DefaultErrorHandler.md): Default error handler for RPC operations. - [AshTypescript.Rpc.Error](AshTypescript.Rpc.Error.md): Protocol for extracting minimal information from exceptions for RPC responses. - [AshTypescript.Rpc.ErrorBuilder](AshTypescript.Rpc.ErrorBuilder.md): Comprehensive error handling and message generation for the new RPC pipeline. - [AshTypescript.Rpc.ErrorHandler](AshTypescript.Rpc.ErrorHandler.md): Behaviour for custom RPC error handlers. - [AshTypescript.Rpc.Errors](AshTypescript.Rpc.Errors.md): Central error processing module for RPC operations. - [AshTypescript.Rpc.FieldExtractor](AshTypescript.Rpc.FieldExtractor.md): Unified field extraction for different data structures. - [AshTypescript.Rpc.FieldProcessing.Atomizer](AshTypescript.Rpc.FieldProcessing.Atomizer.md): Handles preprocessing of requested fields, converting map keys to atoms while preserving field name strings for later reverse mapping lookup. - [AshTypescript.Rpc.FieldProcessing.FieldSelector](AshTypescript.Rpc.FieldProcessing.FieldSelector.md): Unified field selection processor using type-driven recursive dispatch. - [AshTypescript.Rpc.FieldProcessing.FieldSelector.Validation](AshTypescript.Rpc.FieldProcessing.FieldSelector.Validation.md): Field validation helpers for the FieldSelector module. - [AshTypescript.Rpc.Info](AshTypescript.Rpc.Info.md): Provides introspection functions for AshTypescript.Rpc configuration. - [AshTypescript.Rpc.InputFormatter](AshTypescript.Rpc.InputFormatter.md): Formats input data from client format to internal format. - [AshTypescript.Rpc.OutputFormatter](AshTypescript.Rpc.OutputFormatter.md): Formats output data from internal format to client format. - [AshTypescript.Rpc.Pipeline](AshTypescript.Rpc.Pipeline.md): Implements the four-stage pipeline: 1. parse_request/3 - Parse and validate input with fail-fast 2. execute_ash_action/1 - Execute Ash operations 3. filter_result_fields/2 - Apply field selection 4. format_output/2 - Format for client consumption - [AshTypescript.Rpc.Request](AshTypescript.Rpc.Request.md): Request data structure for the new RPC pipeline. - [AshTypescript.Rpc.RequestedFieldsProcessor](AshTypescript.Rpc.RequestedFieldsProcessor.md): Processes requested fields for Ash resources, determining which fields should be selected vs loaded, and building extraction templates for result processing. - [AshTypescript.Rpc.Resource](AshTypescript.Rpc.Resource.md): Struct representing a resource's RPC configuration. - [AshTypescript.Rpc.ResultProcessor](AshTypescript.Rpc.ResultProcessor.md): Extracts requested fields from RPC results using type-driven dispatch. - [AshTypescript.Rpc.RpcAction](AshTypescript.Rpc.RpcAction.md): Struct representing an RPC action configuration. - [AshTypescript.Rpc.TypedQuery](AshTypescript.Rpc.TypedQuery.md): Struct representing a typed query configuration. - [AshTypescript.Rpc.ValidationErrorSchemas](AshTypescript.Rpc.ValidationErrorSchemas.md): Generates validation error schemas for TypeScript RPC clients. - [AshTypescript.Rpc.ValueFormatter](AshTypescript.Rpc.ValueFormatter.md): Unified value formatting for RPC input/output. - [AshTypescript.Rpc.Verifiers.VerifyActionTypes](AshTypescript.Rpc.Verifiers.VerifyActionTypes.md): Verifies that field names in action return types and argument types are valid for TypeScript. - [AshTypescript.Rpc.Verifiers.VerifyIdentities](AshTypescript.Rpc.Verifiers.VerifyIdentities.md): Verifies that all identities listed in RPC actions actually exist on the resource. - [AshTypescript.Rpc.Verifiers.VerifyMetadataFieldNames](AshTypescript.Rpc.Verifiers.VerifyMetadataFieldNames.md): Verifies that metadata field names in RPC actions are valid TypeScript identifiers and don't conflict with existing resource field names. - [AshTypescript.Rpc.Verifiers.VerifyTypedQueryFields](AshTypescript.Rpc.Verifiers.VerifyTypedQueryFields.md): Verifies that all requested fields in typed queries reference valid, public fields on the resource and that the field selections are structurally correct. - [AshTypescript.Rpc.Verifiers.VerifyUniqueInputFieldNames](AshTypescript.Rpc.Verifiers.VerifyUniqueInputFieldNames.md): Verifies that all input fields for each RPC action have unique client names. - [AshTypescript.Rpc.VerifyRpc](AshTypescript.Rpc.VerifyRpc.md): Checks that all RPC actions and typed queries reference existing resource actions, and validates that names don't contain invalid patterns. - [AshTypescript.Rpc.VerifyRpcWarnings](AshTypescript.Rpc.VerifyRpcWarnings.md): Outputs warnings for potentially misconfigured RPC resources during compilation. - [AshTypescript.Rpc.ZodSchemaGenerator](AshTypescript.Rpc.ZodSchemaGenerator.md): Generates Zod validation schemas for Ash resources and actions. - [AshTypescript.TypeSystem.Introspection](AshTypescript.TypeSystem.Introspection.md): Core type introspection and classification for Ash types. - [AshTypescript.TypeSystem.ResourceFields](AshTypescript.TypeSystem.ResourceFields.md): Provides unified resource field type lookup. - [AshTypescript.VerifierChecker](AshTypescript.VerifierChecker.md): Checks if any verifiers have failed for resources and domains. ## Mix Tasks - [mix ash_typescript.codegen](Mix.Tasks.AshTypescript.Codegen.md): Generates TypeScript types for Ash Rpc-calls. - [mix ash_typescript.install](Mix.Tasks.AshTypescript.Install.md): Installs AshTypescript into a project. Should be called with `mix igniter.install ash_typescript`