AshPhoenixGenApi.Resource.SharedTypes (ash_phoenix_gen_api v1.0.3)

Copy Markdown View Source

Shared type definitions for ActionConfig and MfaConfig.

This module centralizes the type definitions used across both configuration structs, avoiding duplication and ensuring consistency.

Summary

Types

choose_node_mode()

@type choose_node_mode() :: :random | :hash | {:hash, String.t()} | :round_robin

gen_api_type()

@type gen_api_type() ::
  :string
  | {:string, pos_integer()}
  | :num
  | :boolean
  | :datetime
  | :naive_datetime
  | :map
  | {:map, pos_integer()}
  | :list
  | {:list, pos_integer()}
  | {:list_string, pos_integer(), pos_integer()}
  | {:list_num, pos_integer()}

node_config()

@type node_config() :: [atom()] | {module(), atom(), [any()]} | :local

permission_callback()

@type permission_callback() :: {module(), atom(), [any()]} | nil

permission_mode()

@type permission_mode() ::
  false | :any_authenticated | {:arg, String.t()} | {:role, [String.t()]}

result_encoder()

@type result_encoder() :: :struct | :map | {module(), atom(), [any()]} | nil

retry_config()

@type retry_config() ::
  nil
  | pos_integer()
  | {:same_node, pos_integer()}
  | {:all_nodes, pos_integer()}