Shared value types, enums, and validators used across the wire protocol.
These mirror the constrained types in the Python SDK's guava.types module.
Summary
Types
A DTMF keypad digit.
An E.164 phone number, e.g. "+14155550123".
A structured-collection field type.
Spoken language for the agent.
Reason a bot session ended.
Functions
Valid DTMF digits.
Supported field types.
Supported languages.
Supported outreach modalities.
Valid termination reasons.
Returns true when value is a valid E.164 phone number string.
Raises ArgumentError unless value is a valid E.164 phone number.
Types
@type dtmf_digit() :: String.t()
A DTMF keypad digit.
@type e164() :: String.t()
An E.164 phone number, e.g. "+14155550123".
@type field_type() :: String.t()
A structured-collection field type.
@type language() :: String.t()
Spoken language for the agent.
@type termination_reason() :: :user_hangup | :bot_hangup | :bot_failure | :bot_transfer | :voicemail | String.t()
Reason a bot session ended.
Functions
@spec dtmf_digits() :: [String.t()]
Valid DTMF digits.
@spec field_types() :: [String.t()]
Supported field types.
@spec languages() :: [String.t()]
Supported languages.
@spec outreach_modalities() :: [String.t()]
Supported outreach modalities.
@spec termination_reasons() :: [String.t()]
Valid termination reasons.
Returns true when value is a valid E.164 phone number string.
Raises ArgumentError unless value is a valid E.164 phone number.