Baileys-aligned USync query builder and result parser.
Reference:
dev/reference/Baileys-master/src/WAUSync/USyncQuery.tsdev/reference/Baileys-master/src/WAUSync/USyncUser.tsdev/reference/Baileys-master/src/WAUSync/Protocols/*.ts
Summary
Functions
A fast-path method for generating a complete USync query node from raw details.
Creates a new empty USync query configuration struct.
Deserializes the query IQ response into structural data maps.
Marshals the USync struct builder mapping to a final send-able WABinary.
Modifies the invocation context context tag.
Modifies the USync node query mapping string mode value.
Appends an explicit feature protocol string to the USync query.
Appends a user resolution request payload to the USync query.
Types
@type context() :: :interactive | :background | :message | :notification
@type mode() :: :query | :delta
@type protocol() :: :devices | :contact | :status | :disappearing_mode | :lid | :bot
@type result() :: %{list: [user_result()], side_list: [user_result()]}
@type t() :: %BaileysEx.Protocol.USync{ context: context(), mode: mode(), protocols: [protocol()], users: [BaileysEx.Protocol.USync.User.t()] }
Functions
@spec build_query( [protocol() | :device], [BaileysEx.Protocol.USync.User.t() | map()], keyword() ) :: {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}
A fast-path method for generating a complete USync query node from raw details.
Creates a new empty USync query configuration struct.
@spec parse_result(t(), BaileysEx.BinaryNode.t()) :: {:ok, result()} | {:error, term()}
Deserializes the query IQ response into structural data maps.
@spec to_node(t(), String.t()) :: {:ok, BaileysEx.BinaryNode.t()} | {:error, term()}
Marshals the USync struct builder mapping to a final send-able WABinary.
Modifies the invocation context context tag.
Modifies the USync node query mapping string mode value.
Appends an explicit feature protocol string to the USync query.
@spec with_user(t(), BaileysEx.Protocol.USync.User.t() | map()) :: t()
Appends a user resolution request payload to the USync query.