Merge branch 'master' into f/directory-integration-plan

This commit is contained in:
spaced4ndy
2026-09-17 13:34:26 +04:00
316 changed files with 33588 additions and 2956 deletions
@@ -5,5 +5,5 @@ Bump both together for normal releases. For wrapper-only fixes use a PEP 440
post-release: __version__ = "6.5.2.post1", LIBS_VERSION unchanged.
"""
__version__ = "7.1.0b1" # PEP 440 — read by hatchling for wheel metadata
LIBS_VERSION = "7.1.0-beta.1" # simplex-chat-libs release tag (no 'v' prefix)
__version__ = "7.1.0b3" # PEP 440 — read by hatchling for wheel metadata
LIBS_VERSION = "7.1.0-beta.3" # simplex-chat-libs release tag (no 'v' prefix)
@@ -56,7 +56,7 @@ class APISetProfileAddress(TypedDict):
def APISetProfileAddress_cmd_string(self: APISetProfileAddress) -> str:
return '/_profile_address ' + str(self['userId']) + ' ' + ('on' if self['enable'] else 'off')
APISetProfileAddress_Response = CR.UserProfileUpdated | CR.ChatCmdError
APISetProfileAddress_Response = CR.UserProfileUpdated | CR.UserProfileNoChange | CR.ChatCmdError
# Set bot address settings.
@@ -156,7 +156,7 @@ class APIShareMyAddress(TypedDict):
def APIShareMyAddress_cmd_string(self: APIShareMyAddress) -> str:
return '/_share address' + T.ChatRef_cmd_string(self['toSendRef'])
return '/_share address ' + T.ChatRef_cmd_string(self['toSendRef'])
APIShareMyAddress_Response = CR.ChatMsgContent
@@ -513,7 +513,16 @@ class Connect(TypedDict):
def Connect_cmd_string(self: Connect) -> str:
return '/connect' + ((' ' + self.get('connTarget_')) if self.get('connTarget_') is not None else '')
Connect_Response = CR.SentConfirmation | CR.ContactAlreadyExists | CR.SentInvitation | CR.ChatCmdError
Connect_Response = (
CR.SentConfirmation
| CR.ContactAlreadyExists
| CR.SentInvitation
| CR.ConnectionPlan
| CR.SentInvitationToContact
| CR.StartedConnectionToContact
| CR.StartedConnectionToGroup
| CR.ChatCmdError
)
# Accept contact request.
@@ -575,12 +584,12 @@ APIListGroups_Response = CR.GroupsList | CR.ChatCmdError
class APIGetChats(TypedDict):
userId: int # int64
pendingConnections: bool
pagination: "T.PaginationByTime"
pagination: NotRequired["T.PaginationByTime"]
query: "T.ChatListQuery"
def APIGetChats_cmd_string(self: APIGetChats) -> str:
return '/_get chats ' + str(self['userId']) + (' pcc=on' if self['pendingConnections'] else '') + ' ' + T.PaginationByTime_cmd_string(self['pagination']) + ' ' + json.dumps(self['query'])
return '/_get chats ' + str(self['userId']) + (' pcc=on' if self['pendingConnections'] else '') + ((' ' + T.PaginationByTime_cmd_string(self.get('pagination'))) if self.get('pagination') is not None else '') + ' ' + json.dumps(self['query'])
APIGetChats_Response = CR.ApiChats | CR.ChatCmdError
@@ -759,6 +768,20 @@ def APISendServiceResponse_cmd_string(self: APISendServiceResponse) -> str:
APISendServiceResponse_Response = CR.ServiceReplyAccepted | CR.ChatCmdError
# Reject a received service request. With a reason the requester fails fast; without it the request is dropped and the requester waits out its timeout.
# Network usage: background.
class APIRejectServiceRequest(TypedDict):
userId: int # int64
requestId: str
rejectionReason: NotRequired[str]
def APIRejectServiceRequest_cmd_string(self: APIRejectServiceRequest) -> str:
return '/_reject_service_request ' + str(self['userId']) + ' ' + self['requestId'] + ((' ' + self.get('rejectionReason')) if self.get('rejectionReason') is not None else '')
APIRejectServiceRequest_Response = CR.CmdOk | CR.ChatCmdError
# Chat management
# These commands should not be used with CLI-based bots
@@ -787,3 +810,30 @@ def APIStopChat_cmd_string(self: APIStopChat) -> str:
APIStopChat_Response = CR.ChatStopped
# Remote control commands
# Allows a bot to accept an incoming remote control session from a SimpleX Desktop client, giving the desktop live access to the bot's SimpleX instance.
# Connect to a remote controller using an OOB invitation link.
# Network usage: interactive.
class ConnectRemoteCtrl(TypedDict):
remoteInvitation: str
def ConnectRemoteCtrl_cmd_string(self: ConnectRemoteCtrl) -> str:
return '/crc ' + self['remoteInvitation']
ConnectRemoteCtrl_Response = CR.RemoteCtrlConnecting | CR.ChatCmdError
# Verify the remote controller session code to complete the connection.
# Network usage: no.
class VerifyRemoteCtrlSession(TypedDict):
sessionCode: str
def VerifyRemoteCtrlSession_cmd_string(self: VerifyRemoteCtrlSession) -> str:
return '/verify remote ctrl ' + self['sessionCode']
VerifyRemoteCtrlSession_Response = CR.RemoteCtrlConnected | CR.ChatCmdError
@@ -314,6 +314,16 @@ class ServiceReplySent(TypedDict):
type: Literal["serviceReplySent"]
connectionId: str
class RemoteCtrlSessionCode(TypedDict):
type: Literal["remoteCtrlSessionCode"]
remoteCtrl_: NotRequired["T.RemoteCtrlInfo"]
sessionCode: str
class RemoteCtrlStopped(TypedDict):
type: Literal["remoteCtrlStopped"]
rcsState: "T.RemoteCtrlSessionState"
rcStopReason: "T.RemoteCtrlStopReason"
class MessageError(TypedDict):
type: Literal["messageError"]
user: "T.User"
@@ -377,12 +387,14 @@ ChatEvent = (
| SubscriptionStatus
| ServiceRequest
| ServiceReplySent
| RemoteCtrlSessionCode
| RemoteCtrlStopped
| MessageError
| ChatError
| ChatErrors
)
ChatEvent_Tag = Literal["contactConnected", "contactUpdated", "contactDeletedByContact", "receivedContactRequest", "newMemberContactReceivedInv", "contactSndReady", "newChatItems", "chatItemReaction", "chatItemsDeleted", "chatItemUpdated", "groupChatItemsDeleted", "chatItemsStatusesUpdated", "receivedGroupInvitation", "userJoinedGroup", "groupUpdated", "joinedGroupMember", "memberRole", "deletedMember", "leftMember", "deletedMemberUser", "groupDeleted", "connectedToGroupMember", "memberAcceptedByOther", "memberBlockedForAll", "groupMemberUpdated", "groupLinkDataUpdated", "groupRelayUpdated", "rcvFileDescrReady", "rcvFileComplete", "sndFileCompleteXFTP", "rcvFileStart", "rcvFileSndCancelled", "rcvFileAccepted", "rcvFileError", "rcvFileWarning", "sndFileError", "sndFileWarning", "acceptingContactRequest", "acceptingBusinessRequest", "contactConnecting", "businessLinkConnecting", "joinedGroupMemberConnecting", "groupLinkConnecting", "hostConnected", "hostDisconnected", "subscriptionStatus", "serviceRequest", "serviceReplySent", "messageError", "chatError", "chatErrors"]
ChatEvent_Tag = Literal["contactConnected", "contactUpdated", "contactDeletedByContact", "receivedContactRequest", "newMemberContactReceivedInv", "contactSndReady", "newChatItems", "chatItemReaction", "chatItemsDeleted", "chatItemUpdated", "groupChatItemsDeleted", "chatItemsStatusesUpdated", "receivedGroupInvitation", "userJoinedGroup", "groupUpdated", "joinedGroupMember", "memberRole", "deletedMember", "leftMember", "deletedMemberUser", "groupDeleted", "connectedToGroupMember", "memberAcceptedByOther", "memberBlockedForAll", "groupMemberUpdated", "groupLinkDataUpdated", "groupRelayUpdated", "rcvFileDescrReady", "rcvFileComplete", "sndFileCompleteXFTP", "rcvFileStart", "rcvFileSndCancelled", "rcvFileAccepted", "rcvFileError", "rcvFileWarning", "sndFileError", "sndFileWarning", "acceptingContactRequest", "acceptingBusinessRequest", "contactConnecting", "businessLinkConnecting", "joinedGroupMemberConnecting", "groupLinkConnecting", "hostConnected", "hostDisconnected", "subscriptionStatus", "serviceRequest", "serviceReplySent", "remoteCtrlSessionCode", "remoteCtrlStopped", "messageError", "chatError", "chatErrors"]
class OnEventDecorator(Protocol):
@@ -681,6 +693,18 @@ class OnEventDecorator(Protocol):
Callable[["ServiceReplySent"], Awaitable[None]],
]: ...
@overload
def __call__(self, event: Literal["remoteCtrlSessionCode"], /) -> Callable[
[Callable[["RemoteCtrlSessionCode"], Awaitable[None]]],
Callable[["RemoteCtrlSessionCode"], Awaitable[None]],
]: ...
@overload
def __call__(self, event: Literal["remoteCtrlStopped"], /) -> Callable[
[Callable[["RemoteCtrlStopped"], Awaitable[None]]],
Callable[["RemoteCtrlStopped"], Awaitable[None]],
]: ...
@overload
def __call__(self, event: Literal["messageError"], /) -> Callable[
[Callable[["MessageError"], Awaitable[None]]],
@@ -103,6 +103,7 @@ class GroupDeletedUser(TypedDict):
user: "T.User"
groupInfo: "T.GroupInfo"
msgSigned: bool
localDeletion: bool
class GroupLink(TypedDict):
type: Literal["groupLink"]
@@ -239,6 +240,17 @@ class RcvFileCancelled(TypedDict):
chatItem_: NotRequired["T.AChatItem"]
rcvFileTransfer: "T.RcvFileTransfer"
class RemoteCtrlConnected(TypedDict):
type: Literal["remoteCtrlConnected"]
remoteCtrl: "T.RemoteCtrlInfo"
compression: bool
class RemoteCtrlConnecting(TypedDict):
type: Literal["remoteCtrlConnecting"]
remoteCtrl_: NotRequired["T.RemoteCtrlInfo"]
ctrlAppInfo: "T.CtrlAppInfo"
appVersion: str
class SentConfirmation(TypedDict):
type: Literal["sentConfirmation"]
user: "T.User"
@@ -258,6 +270,12 @@ class SentInvitation(TypedDict):
connection: "T.PendingContactConnection"
customUserProfile: NotRequired["T.Profile"]
class SentInvitationToContact(TypedDict):
type: Literal["sentInvitationToContact"]
user: "T.User"
contact: "T.Contact"
customUserProfile: NotRequired["T.Profile"]
class ServiceReplyAccepted(TypedDict):
type: Literal["serviceReplyAccepted"]
user: "T.User"
@@ -270,6 +288,19 @@ class SndFileCancelled(TypedDict):
fileTransferMeta: "T.FileTransferMeta"
sndFileTransfers: list["T.SndFileTransfer"]
class StartedConnectionToContact(TypedDict):
type: Literal["startedConnectionToContact"]
user: "T.User"
contact: "T.Contact"
customUserProfile: NotRequired["T.Profile"]
class StartedConnectionToGroup(TypedDict):
type: Literal["startedConnectionToGroup"]
user: "T.User"
groupInfo: "T.GroupInfo"
customUserProfile: NotRequired["T.Profile"]
relayResults: list["T.RelayConnectionResult"]
class UserAcceptedGroupSent(TypedDict):
type: Literal["userAcceptedGroupSent"]
user: "T.User"
@@ -367,11 +398,16 @@ ChatResponse = (
| RcvFileAccepted
| RcvFileAcceptedSndCancelled
| RcvFileCancelled
| RemoteCtrlConnected
| RemoteCtrlConnecting
| SentConfirmation
| SentGroupInvitation
| SentInvitation
| SentInvitationToContact
| ServiceReplyAccepted
| SndFileCancelled
| StartedConnectionToContact
| StartedConnectionToGroup
| UserAcceptedGroupSent
| UserContactLink
| UserContactLinkCreated
@@ -384,4 +420,4 @@ ChatResponse = (
| ApiChats
)
ChatResponse_Tag = Literal["acceptingContactRequest", "activeUser", "chatItemNotChanged", "chatItemReaction", "chatItemUpdated", "chatItemsDeleted", "chatMsgContent", "chatRunning", "chatStarted", "chatStopped", "cmdOk", "chatCmdError", "connectionPlan", "contactAlreadyExists", "contactConnectionDeleted", "contactDeleted", "contactPrefsUpdated", "contactRequestRejected", "contactsList", "groupDeletedUser", "groupLink", "groupLinkCreated", "groupLinkDeleted", "groupCreated", "publicGroupCreated", "publicGroupCreationFailed", "groupRelays", "groupRelaysAdded", "groupRelaysAddFailed", "relayGroupAllowed", "groupMembers", "groupUpdated", "groupsList", "groupDomainVerified", "invitation", "leftMemberUser", "memberAccepted", "membersBlockedForAllUser", "membersRoleUser", "newChatItems", "rcvFileAccepted", "rcvFileAcceptedSndCancelled", "rcvFileCancelled", "sentConfirmation", "sentGroupInvitation", "sentInvitation", "serviceReplyAccepted", "sndFileCancelled", "userAcceptedGroupSent", "userContactLink", "userContactLinkCreated", "userContactLinkDeleted", "userContactLinkUpdated", "userDeletedMembers", "userProfileUpdated", "userProfileNoChange", "usersList", "apiChats"]
ChatResponse_Tag = Literal["acceptingContactRequest", "activeUser", "chatItemNotChanged", "chatItemReaction", "chatItemUpdated", "chatItemsDeleted", "chatMsgContent", "chatRunning", "chatStarted", "chatStopped", "cmdOk", "chatCmdError", "connectionPlan", "contactAlreadyExists", "contactConnectionDeleted", "contactDeleted", "contactPrefsUpdated", "contactRequestRejected", "contactsList", "groupDeletedUser", "groupLink", "groupLinkCreated", "groupLinkDeleted", "groupCreated", "publicGroupCreated", "publicGroupCreationFailed", "groupRelays", "groupRelaysAdded", "groupRelaysAddFailed", "relayGroupAllowed", "groupMembers", "groupUpdated", "groupsList", "groupDomainVerified", "invitation", "leftMemberUser", "memberAccepted", "membersBlockedForAllUser", "membersRoleUser", "newChatItems", "rcvFileAccepted", "rcvFileAcceptedSndCancelled", "rcvFileCancelled", "remoteCtrlConnected", "remoteCtrlConnecting", "sentConfirmation", "sentGroupInvitation", "sentInvitation", "sentInvitationToContact", "serviceReplyAccepted", "sndFileCancelled", "startedConnectionToContact", "startedConnectionToGroup", "userAcceptedGroupSent", "userContactLink", "userContactLinkCreated", "userContactLinkDeleted", "userContactLinkUpdated", "userDeletedMembers", "userProfileUpdated", "userProfileNoChange", "usersList", "apiChats"]
@@ -165,12 +165,18 @@ AgentServiceError = (
AgentServiceError_Tag = Literal["rejected", "timeout", "noPendingRequest", "notDRAddress", "badSignature"]
# Remote controller app version range (min and max as version strings).
class AppVersionRange(TypedDict):
minVersion: str
maxVersion: str
class AutoAccept(TypedDict):
acceptIncognito: bool
class BadgeInfo(TypedDict):
badgeType: "BadgeType"
badgeExpiry: NotRequired[str] # ISO-8601 timestamp
badgeExpiry: str # ISO-8601 timestamp
badgeExtra: str
class BadgeProof(TypedDict):
@@ -179,6 +185,119 @@ class BadgeProof(TypedDict):
proof: str
badgeInfo: "BadgeInfo"
class BadgeRedeemError_invalidCode(TypedDict):
type: Literal["invalidCode"]
class BadgeRedeemError_serviceNotConfigured(TypedDict):
type: Literal["serviceNotConfigured"]
class BadgeRedeemError_badgeActive(TypedDict):
type: Literal["badgeActive"]
class BadgeRedeemError_serviceError(TypedDict):
type: Literal["serviceError"]
serviceError: "BadgeServiceErrorCode"
class BadgeRedeemError_invalidResponse(TypedDict):
type: Literal["invalidResponse"]
message: str
class BadgeRedeemError_unknownKeyIndex(TypedDict):
type: Literal["unknownKeyIndex"]
class BadgeRedeemError_credentialNotVerified(TypedDict):
type: Literal["credentialNotVerified"]
BadgeRedeemError = (
BadgeRedeemError_invalidCode
| BadgeRedeemError_serviceNotConfigured
| BadgeRedeemError_badgeActive
| BadgeRedeemError_serviceError
| BadgeRedeemError_invalidResponse
| BadgeRedeemError_unknownKeyIndex
| BadgeRedeemError_credentialNotVerified
)
BadgeRedeemError_Tag = Literal["invalidCode", "serviceNotConfigured", "badgeActive", "serviceError", "invalidResponse", "unknownKeyIndex", "credentialNotVerified"]
class BadgeServiceErrorCode_badRequest(TypedDict):
type: Literal["badRequest"]
class BadgeServiceErrorCode_unsupportedVersion(TypedDict):
type: Literal["unsupportedVersion"]
class BadgeServiceErrorCode_unknownPurchaseKey(TypedDict):
type: Literal["unknownPurchaseKey"]
class BadgeServiceErrorCode_unknownOfferId(TypedDict):
type: Literal["unknownOfferId"]
class BadgeServiceErrorCode_offerDisabled(TypedDict):
type: Literal["offerDisabled"]
class BadgeServiceErrorCode_offerMismatch(TypedDict):
type: Literal["offerMismatch"]
class BadgeServiceErrorCode_productUnavailable(TypedDict):
type: Literal["productUnavailable"]
class BadgeServiceErrorCode_paymentNotEntitled(TypedDict):
type: Literal["paymentNotEntitled"]
class BadgeServiceErrorCode_paymentPending(TypedDict):
type: Literal["paymentPending"]
class BadgeServiceErrorCode_providerUnavailable(TypedDict):
type: Literal["providerUnavailable"]
class BadgeServiceErrorCode_rateLimited(TypedDict):
type: Literal["rateLimited"]
class BadgeServiceErrorCode_codeInvalid(TypedDict):
type: Literal["codeInvalid"]
class BadgeServiceErrorCode_codeUsed(TypedDict):
type: Literal["codeUsed"]
class BadgeServiceErrorCode_codeExpired(TypedDict):
type: Literal["codeExpired"]
class BadgeServiceErrorCode_receiptInvalid(TypedDict):
type: Literal["receiptInvalid"]
class BadgeServiceErrorCode_receiptUsed(TypedDict):
type: Literal["receiptUsed"]
class BadgeServiceErrorCode_internal(TypedDict):
type: Literal["internal"]
class BadgeServiceErrorCode_unknown(TypedDict):
type: Literal["unknown"]
: str
BadgeServiceErrorCode = (
BadgeServiceErrorCode_badRequest
| BadgeServiceErrorCode_unsupportedVersion
| BadgeServiceErrorCode_unknownPurchaseKey
| BadgeServiceErrorCode_unknownOfferId
| BadgeServiceErrorCode_offerDisabled
| BadgeServiceErrorCode_offerMismatch
| BadgeServiceErrorCode_productUnavailable
| BadgeServiceErrorCode_paymentNotEntitled
| BadgeServiceErrorCode_paymentPending
| BadgeServiceErrorCode_providerUnavailable
| BadgeServiceErrorCode_rateLimited
| BadgeServiceErrorCode_codeInvalid
| BadgeServiceErrorCode_codeUsed
| BadgeServiceErrorCode_codeExpired
| BadgeServiceErrorCode_receiptInvalid
| BadgeServiceErrorCode_receiptUsed
| BadgeServiceErrorCode_internal
| BadgeServiceErrorCode_unknown
)
BadgeServiceErrorCode_Tag = Literal["badRequest", "unsupportedVersion", "unknownPurchaseKey", "unknownOfferId", "offerDisabled", "offerMismatch", "productUnavailable", "paymentNotEntitled", "paymentPending", "providerUnavailable", "rateLimited", "codeInvalid", "codeUsed", "codeExpired", "receiptInvalid", "receiptUsed", "internal", "unknown"]
BadgeStatus = Literal["active", "expired", "expiredOld", "failed", "unknownKey"]
BadgeType = Literal["supporter", "legend", "investor"]
@@ -481,6 +600,8 @@ class CIFile(TypedDict):
fileSource: NotRequired["CryptoFile"]
fileStatus: "CIFileStatus"
fileProtocol: "FileProtocol"
fileExpires: NotRequired[str] # ISO-8601 timestamp
fileProhibited: NotRequired["FileProhibited"]
class CIFileStatus_sndStored(TypedDict):
type: Literal["sndStored"]
@@ -1021,6 +1142,10 @@ class ChatErrorType_commandError(TypedDict):
type: Literal["commandError"]
message: str
class ChatErrorType_badgeRedeemError(TypedDict):
type: Literal["badgeRedeemError"]
badgeRedeemError: "BadgeRedeemError"
class ChatErrorType_agentCommandError(TypedDict):
type: Literal["agentCommandError"]
message: str
@@ -1119,6 +1244,7 @@ ChatErrorType = (
| ChatErrorType_agentVersion
| ChatErrorType_agentNoSubResult
| ChatErrorType_commandError
| ChatErrorType_badgeRedeemError
| ChatErrorType_agentCommandError
| ChatErrorType_invalidFileDescription
| ChatErrorType_connectionIncognitoChangeProhibited
@@ -1129,7 +1255,7 @@ ChatErrorType = (
| ChatErrorType_exception
)
ChatErrorType_Tag = Literal["noActiveUser", "noConnectionUser", "noSndFileUser", "noRcvFileUser", "userUnknown", "userExists", "chatRelayExists", "differentActiveUser", "cantDeleteActiveUser", "cantDeleteLastUser", "cantHideLastUser", "hiddenUserAlwaysMuted", "emptyUserPassword", "userAlreadyHidden", "userNotHidden", "invalidDisplayName", "chatNotStarted", "chatNotStopped", "chatStoreChanged", "invalidConnReq", "simplexDomainNotReady", "notResolvedLocally", "unsupportedConnReq", "connReqMessageProhibited", "contactNotReady", "contactNotActive", "contactDisabled", "connectionDisabled", "groupUserRole", "groupMemberInitialRole", "contactIncognitoCantInvite", "groupIncognitoCantInvite", "groupContactRole", "groupDuplicateMember", "groupDuplicateMemberId", "groupNotJoined", "groupMemberNotActive", "cantBlockMemberForSelf", "groupMemberUserRemoved", "groupMemberNotFound", "groupCantResendInvitation", "groupInternal", "fileNotFound", "fileSize", "fileAlreadyReceiving", "fileCancelled", "fileCancel", "fileAlreadyExists", "fileWrite", "fileSend", "fileRcvChunk", "fileInternal", "fileImageType", "fileImageSize", "fileNotReceived", "fileNotApproved", "fallbackToSMPProhibited", "inlineFileProhibited", "invalidForward", "invalidChatItemUpdate", "invalidChatItemDelete", "hasCurrentCall", "noCurrentCall", "callContact", "directMessagesProhibited", "agentVersion", "agentNoSubResult", "commandError", "agentCommandError", "invalidFileDescription", "connectionIncognitoChangeProhibited", "connectionUserChangeProhibited", "peerChatVRangeIncompatible", "relayTestError", "internalError", "exception"]
ChatErrorType_Tag = Literal["noActiveUser", "noConnectionUser", "noSndFileUser", "noRcvFileUser", "userUnknown", "userExists", "chatRelayExists", "differentActiveUser", "cantDeleteActiveUser", "cantDeleteLastUser", "cantHideLastUser", "hiddenUserAlwaysMuted", "emptyUserPassword", "userAlreadyHidden", "userNotHidden", "invalidDisplayName", "chatNotStarted", "chatNotStopped", "chatStoreChanged", "invalidConnReq", "simplexDomainNotReady", "notResolvedLocally", "unsupportedConnReq", "connReqMessageProhibited", "contactNotReady", "contactNotActive", "contactDisabled", "connectionDisabled", "groupUserRole", "groupMemberInitialRole", "contactIncognitoCantInvite", "groupIncognitoCantInvite", "groupContactRole", "groupDuplicateMember", "groupDuplicateMemberId", "groupNotJoined", "groupMemberNotActive", "cantBlockMemberForSelf", "groupMemberUserRemoved", "groupMemberNotFound", "groupCantResendInvitation", "groupInternal", "fileNotFound", "fileSize", "fileAlreadyReceiving", "fileCancelled", "fileCancel", "fileAlreadyExists", "fileWrite", "fileSend", "fileRcvChunk", "fileInternal", "fileImageType", "fileImageSize", "fileNotReceived", "fileNotApproved", "fallbackToSMPProhibited", "inlineFileProhibited", "invalidForward", "invalidChatItemUpdate", "invalidChatItemDelete", "hasCurrentCall", "noCurrentCall", "callContact", "directMessagesProhibited", "agentVersion", "agentNoSubResult", "commandError", "badgeRedeemError", "agentCommandError", "invalidFileDescription", "connectionIncognitoChangeProhibited", "connectionUserChangeProhibited", "peerChatVRangeIncompatible", "relayTestError", "internalError", "exception"]
ChatFeature = Literal["timedMessages", "fullDelete", "reactions", "voice", "files", "calls", "sessions"]
@@ -1559,6 +1685,13 @@ class CryptoFileArgs(TypedDict):
fileKey: str
fileNonce: str
# Remote controller application info.
class CtrlAppInfo(TypedDict):
appVersionRange: "AppVersionRange"
deviceName: str
compression: bool
class DroppedMsg(TypedDict):
brokerTs: str # ISO-8601 timestamp
attempts: int # int
@@ -1711,6 +1844,11 @@ class FileInvitation(TypedDict):
fileConnReq: NotRequired[str]
fileInline: NotRequired["InlineFileMode"]
fileDescr: NotRequired["FileDescr"]
fileBadge: NotRequired["BadgeProof"]
class FileProhibited(TypedDict):
maxSize: int # int64
badgeStatus: NotRequired["BadgeStatus"]
FileProtocol = Literal["SMP", "XFTP", "LOCAL"]
@@ -1897,8 +2035,7 @@ class GroupInfo(TypedDict):
groupDomainVerified: NotRequired[bool]
class GroupKeys(TypedDict):
publicGroupId: str
groupRootKey: "GroupRootKey"
publicGroupKeys: NotRequired["PublicGroupKeys"]
memberPrivKey: str
class GroupLink(TypedDict):
@@ -2489,6 +2626,10 @@ class PublicGroupAccess(TypedDict):
class PublicGroupData(TypedDict):
publicMemberCount: int # int64
class PublicGroupKeys(TypedDict):
publicGroupId: str
groupRootKey: "GroupRootKey"
class PublicGroupProfile(TypedDict):
groupType: "GroupType"
groupLink: str
@@ -2653,6 +2794,7 @@ class RcvFileTransfer(TypedDict):
fileId: int # int64
xftpRcvFile: NotRequired["XFTPRcvFile"]
fileInvitation: "FileInvitation"
fileProhibited: NotRequired["FileProhibited"]
fileStatus: "RcvFileStatus"
fileType: "FileType"
rcvFileInline: NotRequired["InlineFileMode"]
@@ -2766,6 +2908,10 @@ RcvMsgError_Tag = Literal["dropped", "parseError"]
class RelayCapabilities(TypedDict):
webDomain: NotRequired[str]
class RelayConnectionResult(TypedDict):
relayMember: "GroupMember"
relayError: NotRequired["ChatError"]
class RelayProfile(TypedDict):
displayName: str
fullName: str
@@ -2774,6 +2920,62 @@ class RelayProfile(TypedDict):
RelayStatus = Literal["new", "invited", "accepted", "acknowledgedRoster", "active", "inactive", "rejected"]
class RemoteCtrlInfo(TypedDict):
remoteCtrlId: int # int64
ctrlDeviceName: str
sessionState: NotRequired["RemoteCtrlSessionState"]
class RemoteCtrlSessionState_starting(TypedDict):
type: Literal["starting"]
class RemoteCtrlSessionState_searching(TypedDict):
type: Literal["searching"]
class RemoteCtrlSessionState_connecting(TypedDict):
type: Literal["connecting"]
class RemoteCtrlSessionState_pendingConfirmation(TypedDict):
type: Literal["pendingConfirmation"]
sessionCode: str
class RemoteCtrlSessionState_connected(TypedDict):
type: Literal["connected"]
sessionCode: str
RemoteCtrlSessionState = (
RemoteCtrlSessionState_starting
| RemoteCtrlSessionState_searching
| RemoteCtrlSessionState_connecting
| RemoteCtrlSessionState_pendingConfirmation
| RemoteCtrlSessionState_connected
)
RemoteCtrlSessionState_Tag = Literal["starting", "searching", "connecting", "pendingConfirmation", "connected"]
class RemoteCtrlStopReason_discoveryFailed(TypedDict):
type: Literal["discoveryFailed"]
chatError: "ChatError"
class RemoteCtrlStopReason_connectionFailed(TypedDict):
type: Literal["connectionFailed"]
chatError: "ChatError"
class RemoteCtrlStopReason_setupFailed(TypedDict):
type: Literal["setupFailed"]
chatError: "ChatError"
class RemoteCtrlStopReason_disconnected(TypedDict):
type: Literal["disconnected"]
RemoteCtrlStopReason = (
RemoteCtrlStopReason_discoveryFailed
| RemoteCtrlStopReason_connectionFailed
| RemoteCtrlStopReason_setupFailed
| RemoteCtrlStopReason_disconnected
)
RemoteCtrlStopReason_Tag = Literal["discoveryFailed", "connectionFailed", "setupFailed", "disconnected"]
ReportReason = Literal["spam", "content", "community", "profile", "other"]
class RoleGroupPreference(TypedDict):