Inttegro.MessageTemplates.SafetyResult (inttegro v0.2.0)

Copy Markdown View Source

Represents Safety Result data in the MessageTemplates API.

Inttegro decodes API responses into this struct. Required fields are always present; optional fields are nil when they do not apply or were not returned. Follow the linked types in t/0 for nested domain values.

Manages reusable email and SMS templates for Chimes.

Templates separate reviewed message content from recipient data supplied at send time. Render a preview before publishing, and treat safety results as part of the template lifecycle rather than as proof that a downstream carrier accepted a message.

Summary

Types

t()

The decoded safety result value.

Functions

Builds a Inttegro.MessageTemplates.SafetyResult and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.MessageTemplates.SafetyResult{
  content_hash: String.t(),
  links: [Inttegro.MessageTemplates.ScannedLink.t()] | nil,
  normalized_text: String.t(),
  quarantine_notes: String.t() | nil,
  reason_codes: [String.t()] | nil,
  sanitized_html: String.t() | nil,
  scanner: String.t(),
  status: Inttegro.MessageTemplates.ContentSafetyStatus.t()
}

The decoded safety result value.

Functions

new!(attrs \\ %{})

@spec new!(map() | keyword()) :: t()

Builds a Inttegro.MessageTemplates.SafetyResult and raises KeyError when a required field is missing.