The client configuration: tokens, base URL, timeout and HTTP adapter.
Create it with Lettermint.new/1 or Lettermint.new/2 and pass it as the
first argument to every SDK function. The struct is immutable, holds no
message state and is safe to share between processes; create it once.
The tokens are kept inside closures, so they appear in no debug output:
inspect/2 (also with structs: false), :io_lib.format("~p", ...),
Jason.encode/1 and crash reports show "[redacted]" or a function
reference instead.
Summary
Functions
Classifies a token by its format: lm_team_ followed by letters and digits
is a team token, lm_ followed by letters and digits a sending token. The
team pattern is checked first, because every team token also starts with
lm_. Raises Lettermint.ConfigError for any other format; the message
never contains the token.
Types
Functions
@spec detect(term()) :: :team | :sending
Classifies a token by its format: lm_team_ followed by letters and digits
is a team token, lm_ followed by letters and digits a sending token. The
team pattern is checked first, because every team token also starts with
lm_. Raises Lettermint.ConfigError for any other format; the message
never contains the token.