Normalized outbound attachment used by post payloads and sent-message handles.
Summary
Functions
Creates an attachment struct from normalized map input.
Normalizes supported outbound attachment inputs into a canonical attachment struct.
Normalizes a list of attachment inputs.
Returns the Zoi schema for Attachment.
Types
@type input() :: t() | Jido.Chat.FileUpload.t() | Jido.Chat.Media.t() | Jido.Chat.Content.Image.t() | Jido.Chat.Content.Audio.t() | Jido.Chat.Content.Video.t() | Jido.Chat.Content.File.t() | map() | String.t()
@type t() :: %Jido.Chat.Attachment{ data: nil | nil | binary(), duration: nil | nil | integer(), filename: nil | nil | binary(), height: nil | nil | integer(), kind: :image | :audio | :video | :file, media_type: nil | nil | binary(), metadata: map(), path: nil | nil | binary(), size_bytes: nil | nil | integer(), url: nil | nil | binary(), width: nil | nil | integer() }
Functions
Creates an attachment struct from normalized map input.
Normalizes supported outbound attachment inputs into a canonical attachment struct.
Normalizes a list of attachment inputs.
Returns the Zoi schema for Attachment.