Variable definitions for document templates.
Variables are {{ variable_name }} placeholders in Google Docs templates that
get substituted with actual values via the Google Docs replaceAllText API.
Summary
Functions
Builds Variable structs from a list of variable names, guessing types from names.
Extracts variable names from text by scanning for {{ variable_name }} patterns.
Guesses the variable type from its name.
Converts an underscore_name to a human-readable label.
Types
@type t() :: %PhoenixKitDocumentCreator.Variable{ default: String.t() | nil, label: String.t(), name: String.t(), required: boolean(), type: variable_type() }
@type variable_type() :: :text | :date | :currency | :multiline
Functions
Builds Variable structs from a list of variable names, guessing types from names.
Extracts variable names from text by scanning for {{ variable_name }} patterns.
Returns a sorted list of unique variable names (strings).
Guesses the variable type from its name.
Converts an underscore_name to a human-readable label.