Types
Common types for signal_bot_framework.
- class signal_bot_framework.types.AccountNumber
A Signal account phone number with a
+and country code. Actually astr.alias of
str
- class signal_bot_framework.types.AccountUUID
A Signal account UUID. Actually a
str.alias of
str
- class signal_bot_framework.types.GroupId
A Signal group ID. Actually a
strof a base-64 encoded identifier.alias of
str
- class signal_bot_framework.types.NotificationFrame
Bases:
TypedDictRaw JSON-RPC notification frame (type hint only, will be raw dict).
-
jsonrpc:
Literal['2.0'] JSON-RPC Version. Always 2.0.
-
method:
str The JSON-RPC method.
-
params:
Any JSON-RPC method parameters.
-
id:
UnionType[str,int,None] Notification ID.
-
jsonrpc:
- class signal_bot_framework.types.ErrorFrame
Bases:
TypedDictRaw JSON-RPC error frame (type hint only, will be raw dict at runtime).
-
code:
int
-
message:
str
-
data:
Any
-
code:
- class signal_bot_framework.types.ResponseFrame
Bases:
TypedDictRaw JSON-RPC response frame (type hint only, will be raw dict at runtime).
-
jsonrpc:
Literal['2.0']
-
error:
ErrorFrame
-
result:
Any
-
id:
UnionType[str,int,None]
-
jsonrpc:
- class signal_bot_framework.types.Response(frame)
Bases:
objectRealized JSON-RPC response.
-
result:
Any
- async classmethod from_future_frame(frame)
Create a future
Responsefrom a futureResponseFrame.- Parameters:
frame¶ (
Future[ResponseFrame]) – The frame to create a response from.
-
result:
- class signal_bot_framework.types.GroupInfoFrame
Bases:
TypedDictRaw signal-cli GroupInfo frame (type hint only, will be raw dict at runtime).
-
groupId:
str
-
type:
Literal['UPDATE','DELIVER']
-
groupId:
- class signal_bot_framework.types.DataMessageFrame
Bases:
TypedDictRaw signal-cli DataMessage frame (type hint only, will be raw dict at runtime).
-
timestamp:
int
-
message:
Optional[str]
-
expiresInSeconds:
int
-
viewOnce:
bool
-
reaction:
Any
-
quote:
Any
-
payment:
Any
-
mentions:
list[Any]
-
previews:
list[Any]
-
attachments:
list[Any]
-
sticker:
Any
-
remoteDelete:
Any
-
contacts:
list[Any]
-
textStyles:
list[Any]
-
groupInfo:
GroupInfoFrame
-
storyContext:
Any
-
timestamp:
- class signal_bot_framework.types.EnvelopeFrame
Bases:
TypedDictRaw signal-cli Envelope frame (type hint only, will be raw dict at runtime).
-
source:
str
-
sourceNumber:
Optional[NewType(AccountNumber,str)]
-
sourceUuid:
NewType(AccountUUID,str)
-
sourceName:
str
-
sourceDevice:
int
-
timestamp:
int
-
dataMessage:
DataMessageFrame
-
editMessage:
Any
-
storymessage:
Any
-
syncMessage:
Any
-
callMessage:
Any
-
receiptMessage:
Any
-
typingMessage:
dict
-
source:
- class signal_bot_framework.types.MentionFrame
Bases:
TypedDictAn @mention in a DataMessage.
-
name:
str
-
number:
Optional[NewType(AccountNumber,str)]
-
uuid:
NewType(AccountUUID,str)
-
start:
int
-
length:
int
-
name:
- class signal_bot_framework.types.DataMessage(frame)
Bases:
objectA realized DataMessage.
-
message:
Optional[str]
-
view_once:
Optional[bool]
-
reaction:
Optional[Any]
-
quote:
Optional[Any]
-
payment:
Optional[Any]
-
mentions:
Optional[list[MentionFrame]]
-
previews:
Optional[list[Any]]
-
attachments:
Optional[list[Any]]
-
sticker:
Optional[Any]
-
remote_delete:
Optional[Any]
-
contacts:
Optional[list[Any]]
-
text_styles:
Optional[list[Any]]
-
group_info:
Optional[GroupInfoFrame]
-
story_context:
Optional[Any]
-
timestamp:
datetime The parsed time at which this message was sent.
-
unix_timestamp:
int
-
sender:
Union[NewType(AccountNumber,str),NewType(AccountUUID,str),None]
-
sender_name:
str
-
sender_uuid:
NewType(AccountUUID,str)
-
expires_in:
timedelta
-
message: