BaileysEx.WAM (baileys_ex v0.1.0-alpha.7)

Copy Markdown View Source

WhatsApp Analytics/Metrics helpers backed by the Baileys rc9 event registry.

Summary

Types

One event entry for a WAM buffer.

Ordered WAM key/value pairs.

Scalar values accepted by the WAM encoder.

Functions

Clear buffered events while preserving the current sequence.

Encode a WAM buffer into the rc9 binary wire format.

Build an ordered WAM event payload.

Increment the WAM buffer sequence.

Create a new WAM buffer.

Append a WAM event entry to the buffer.

Append a named WAM event to the buffer.

Types

event_input()

@type event_input() :: BaileysEx.WAM.BinaryInfo.event_input()

One event entry for a WAM buffer.

ordered_values()

@type ordered_values() :: BaileysEx.WAM.BinaryInfo.ordered_values()

Ordered WAM key/value pairs.

value()

@type value() :: BaileysEx.WAM.BinaryInfo.value()

Scalar values accepted by the WAM encoder.

Functions

clear_events(binary_info)

Clear buffered events while preserving the current sequence.

encode(binary_info)

@spec encode(BaileysEx.WAM.BinaryInfo.t()) :: binary()

Encode a WAM buffer into the rc9 binary wire format.

event(name, props \\ [], globals \\ [])

@spec event(String.t() | atom(), ordered_values(), ordered_values()) :: event_input()

Build an ordered WAM event payload.

increment_sequence(binary_info)

@spec increment_sequence(BaileysEx.WAM.BinaryInfo.t()) :: BaileysEx.WAM.BinaryInfo.t()

Increment the WAM buffer sequence.

new(opts \\ [])

Create a new WAM buffer.

put_event(binary_info, event_input)

Append a WAM event entry to the buffer.

put_event(binary_info, name, props, globals \\ [])

Append a named WAM event to the buffer.