Skip to navigation

pending

View as MarkdownOpen in Claude

Return the requests a call has noted, oldest first, read from the SWAIG request’s global_data.

Parameters

raw_data
Mapping[str, Any] | NoneRequired

The SWAIG request, as a tool handler receives it.

Returns

list[dict[str, str]] — Each request as {"kind": ..., "about": ...}. Empty when nothing is noted.

Example

from signalwire import FunctionResult
from signalwire.patterns import RequestList
later = RequestList("later")
def count_requests(args, raw_data):
return FunctionResult(f"{len(later.pending(raw_data))} requests are waiting.")