Jido.Chat.Telegram.UpdateEnvelope (Jido Chat Telegram v1.0.0)

Copy Markdown View Source

Typed Telegram update envelope for extension-level ingest.

Summary

Functions

Builds update envelope from serialized map data.

Creates a Telegram update envelope.

Returns the Zoi schema for UpdateEnvelope.

Serializes update envelope into a plain map with type marker.

Types

t()

@type t() :: %Jido.Chat.Telegram.UpdateEnvelope{
  id: binary(),
  metadata: map(),
  payload: nil | any(),
  raw: map(),
  update_id: nil | integer(),
  update_type:
    :message
    | :edited_message
    | :channel_post
    | :edited_channel_post
    | :callback_query
    | :message_reaction
    | :noop
    | :unsupported
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds update envelope from serialized map data.

new(attrs)

@spec new(map()) :: t()

Creates a Telegram update envelope.

schema()

Returns the Zoi schema for UpdateEnvelope.

to_map(envelope)

@spec to_map(t()) :: map()

Serializes update envelope into a plain map with type marker.