Jido.Chat.WebhookRequest (Jido Chat v1.0.0)

Copy Markdown View Source

Typed webhook request envelope used for adapter verification and parsing.

Summary

Functions

Builds webhook request from serialized data.

Gets a normalized request header value.

Creates a typed webhook request from raw map or HTTP-style request fields.

Returns the Zoi schema for WebhookRequest.

Serializes webhook request into plain map with type marker.

Types

t()

@type t() :: %Jido.Chat.WebhookRequest{
  adapter_name: nil | nil | atom(),
  headers: map(),
  metadata: map(),
  method: binary(),
  path: nil | nil | binary(),
  payload: map(),
  query: map(),
  raw: nil | nil | any()
}

Functions

from_map(map)

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

Builds webhook request from serialized data.

header(request, key)

@spec header(t(), String.t()) :: String.t() | nil

Gets a normalized request header value.

new(attrs)

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

Creates a typed webhook request from raw map or HTTP-style request fields.

schema()

Returns the Zoi schema for WebhookRequest.

to_map(request)

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

Serializes webhook request into plain map with type marker.