AshTypescript.Codegen.FilterTypes (ash_typescript v0.17.3)

Copy Markdown View Source

Generates TypeScript filter types for Ash resources.

Generates:

  • {ResourceName}FilterInput — full typed filter objects with per-field operators
  • {resourceName}FilterFields — runtime as const array of filterable field names
  • {ResourceName}FilterField — union type derived from the array

Summary

Functions

generate_all_filter_types(otp_app)

generate_filter_field_array(resource)

generate_filter_field_arrays(resources)

Generates as const arrays and derived union types for filterable field names.

For each resource, emits:

  • {resourceName}FilterFields — runtime array of field name strings
  • {ResourceName}FilterField — union type derived from the array

Includes attributes, calculations (field?: true), all aggregates, and relationships.

generate_filter_type(resource)

generate_filter_type(resource, allowed_resources)

generate_filter_types(resources)

generate_filter_types(resources, allowed_resources)