Guava.Types (Guava v0.34.0)

Copy Markdown View Source

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

dtmf_digit()

@type dtmf_digit() :: String.t()

A DTMF keypad digit.

e164()

@type e164() :: String.t()

An E.164 phone number, e.g. "+14155550123".

field_type()

@type field_type() :: String.t()

A structured-collection field type.

language()

@type language() :: String.t()

Spoken language for the agent.

termination_reason()

@type termination_reason() ::
  :user_hangup
  | :bot_hangup
  | :bot_failure
  | :bot_transfer
  | :voicemail
  | String.t()

Reason a bot session ended.

Functions

dtmf_digits()

@spec dtmf_digits() :: [String.t()]

Valid DTMF digits.

field_types()

@spec field_types() :: [String.t()]

Supported field types.

languages()

@spec languages() :: [String.t()]

Supported languages.

outreach_modalities()

@spec outreach_modalities() :: [String.t()]

Supported outreach modalities.

termination_reasons()

@spec termination_reasons() :: [String.t()]

Valid termination reasons.

valid_e164?(value)

@spec valid_e164?(term()) :: boolean()

Returns true when value is a valid E.164 phone number string.

validate_e164!(value)

@spec validate_e164!(String.t()) :: String.t()

Raises ArgumentError unless value is a valid E.164 phone number.