Package org.inthewaves.kotlinsignald.clientprotocol.v1.structures

Types

AcceptInvitationRequest
Link copied to clipboard
common
data class AcceptInvitationRequest(account: String, groupID: String) : SignaldRequestBodyV1<AcceptInvitation, JsonGroupV2Info>
Accept a v2 group invitation.
Account
Link copied to clipboard
common
data class Account(address: JsonAddress?, deviceId: Int?, accountId: String?) : SignaldResponseBodyV1
A local account in signald
AccountList
Link copied to clipboard
common
data class AccountList(accounts: List<Account>) : SignaldResponseBodyV1
AddLinkedDeviceRequest
Link copied to clipboard
common
data class AddLinkedDeviceRequest(account: String, uri: String) : SignaldRequestBodyV1<AddDevice, EmptyResponse>
Link a new device to a local Signal account
AddServerRequest
Link copied to clipboard
common
data class AddServerRequest(server: Server) : SignaldRequestBodyV1<AddServer, String>
add a new server to connect to.
AllIdentityKeyList
Link copied to clipboard
common
data class AllIdentityKeyList(identityKeys: List<IdentityKeyList>) : SignaldResponseBodyV1
AnswerMessage
Link copied to clipboard
common
data class AnswerMessage(id: Long?, sdp: String?, opaque: String?)
ApproveMembershipRequest
Link copied to clipboard
common
data class ApproveMembershipRequest(account: String, groupID: String, members: List<JsonAddress>) : SignaldRequestBodyV1<ApproveMembership, JsonGroupV2Info>
approve a request to join a group
BusyMessage
Link copied to clipboard
common
data class BusyMessage(id: Long?)
CallMessage
Link copied to clipboard
common
data class CallMessage(offerMessage: OfferMessage?, answerMessage: AnswerMessage?, busyMessage: BusyMessage?, hangupMessage: HangupMessage?, iceUpdateMessage: List<IceUpdateMessage>, destinationDeviceId: Int?, multiRing: Boolean?)
Capabilities
Link copied to clipboard
common
data class Capabilities(gv2: Boolean?, storage: Boolean?, gv1Migration: Boolean?)
ClientMessageWrapper
Link copied to clipboard
common
sealed class ClientMessageWrapper
Wraps all incoming messages after a v1 subscribe request is issued Note that the type field has been removed.
CreateGroupRequest
Link copied to clipboard
common
data class CreateGroupRequest(account: String, title: String, avatar: String?, members: List<JsonAddress>, timer: Int?, memberRole: String?) : SignaldRequestBodyV1<CreateGroup, JsonGroupV2Info>
DeleteAccountRequest
Link copied to clipboard
common
data class DeleteAccountRequest(account: String, server: Boolean?) : SignaldRequestBodyV1<DeleteAccount, EmptyResponse>
delete all account data signald has on disk, and optionally delete the account from the server as well.
DeviceInfo
Link copied to clipboard
common
data class DeviceInfo(id: Long?, name: String?, created: Long?, lastSeen: Long?)
EmptyResponse
Link copied to clipboard
common
object EmptyResponse : SignaldResponseBodyV1
For requests that don't expect a response, representing {}.
ExceptionWrapper
Link copied to clipboard
common
data class ExceptionWrapper(version: String?, data: ExceptionWrapper.Data, error: Boolean?) : ClientMessageWrapper
An incoming message representing an error that can be sent by signald after a v1 subscribe request.
FinishLinkRequest
Link copied to clipboard
common
data class FinishLinkRequest(deviceName: String?, sessionId: String?) : SignaldRequestBodyV1<FinishLink, Account>
After a linking URI has been requested, finish_link must be called with the session_id provided with the URI.
GenerateLinkingURIRequest
Link copied to clipboard
common
data class GenerateLinkingURIRequest(server: String?) : SignaldRequestBodyV1<GenerateLinkingUri, LinkingURI>
Generate a linking URI.
GetAllIdentities
Link copied to clipboard
common
data class GetAllIdentities(account: String) : SignaldRequestBodyV1<GetAllIdentities, AllIdentityKeyList>
get all known identity keys
GetGroupRequest
Link copied to clipboard
common
data class GetGroupRequest(account: String, groupID: String, revision: Int?) : SignaldRequestBodyV1<GetGroup, JsonGroupV2Info>
Query the server for the latest state of a known group.
GetIdentitiesRequest
Link copied to clipboard
common
data class GetIdentitiesRequest(account: String, address: JsonAddress) : SignaldRequestBodyV1<GetIdentities, IdentityKeyList>
Get information about a known keys for a particular address
GetLinkedDevicesRequest
Link copied to clipboard
common
data class GetLinkedDevicesRequest(account: String) : SignaldRequestBodyV1<GetLinkedDevices, LinkedDevices>
list all linked devices on a Signal account
GetProfileRequest
Link copied to clipboard
common
data class GetProfileRequest(account: String, async: Boolean?, address: JsonAddress) : SignaldRequestBodyV1<GetProfile, Profile>
Get all information available about a user
GetServersRequest
Link copied to clipboard
common
class GetServersRequest : SignaldRequestBodyV1<GetServers, ServerList>
GroupAccessControl
Link copied to clipboard
common
data class GroupAccessControl(link: String?, attributes: String?, members: String?)
group access control settings.
GroupInfo
Link copied to clipboard
common
data class GroupInfo(v1: JsonGroupInfo?, v2: JsonGroupV2Info?) : SignaldResponseBodyV1
A generic type that is used when the group version is not known
GroupLinkInfoRequest
Link copied to clipboard
common
data class GroupLinkInfoRequest(account: String, uri: String) : SignaldRequestBodyV1<GroupLinkInfo, JsonGroupJoinInfo>
Get information about a group from a signal.
GroupList
Link copied to clipboard
common
data class GroupList(groups: List<JsonGroupV2Info>, legacyGroups: List<JsonGroupInfo>) : SignaldResponseBodyV1
GroupMember
Link copied to clipboard
common
data class GroupMember(uuid: String?, role: String?, joinedRevision: Int?)
HangupMessage
Link copied to clipboard
common
data class HangupMessage(id: Long?, type: String?, legacy: Boolean?, deviceId: Int?)
IceUpdateMessage
Link copied to clipboard
common
data class IceUpdateMessage(id: Long?, opaque: String?, sdp: String?)
IdentityKey
Link copied to clipboard
common
data class IdentityKey(added: Long?, safetyNumber: String?, qrCodeData: String?, trustLevel: String?)
IdentityKeyList
Link copied to clipboard
common
data class IdentityKeyList(address: JsonAddress?, identities: List<IdentityKey>) : SignaldResponseBodyV1
a list of identity keys associated with a particular address
IncomingMessage
Link copied to clipboard
common
data class IncomingMessage(version: String?, data: IncomingMessage.Data, error: Boolean?) : ClientMessageWrapper
JoinGroupRequest
Link copied to clipboard
common
data class JoinGroupRequest(account: String, uri: String) : SignaldRequestBodyV1<JoinGroup, JsonGroupJoinInfo>
Join a group using the a signal.group URL.
JsonAddress
Link copied to clipboard
common
data class JsonAddress(number: String?, uuid: String?, relay: String?) : SignaldResponseBodyV1
JsonBlockedListMessage
Link copied to clipboard
common
data class JsonBlockedListMessage(addresses: List<JsonAddress>, groupIds: List<String>)
JsonDataMessage
Link copied to clipboard
common
data class JsonDataMessage(timestamp: Long?, attachments: List<JsonAttachment>, body: String?, group: JsonGroupInfo?, groupV2: JsonGroupV2Info?, endSession: Boolean?, expiresInSeconds: Int?, profileKeyUpdate: Boolean?, quote: JsonQuote?, contacts: List<SharedContact>, previews: List<JsonPreview>, sticker: JsonSticker?, viewOnce: Boolean?, reaction: JsonReaction?, remoteDelete: RemoteDelete?, mentions: List<JsonMention>, payment: Payment?, groupCallUpdate: String?)
JsonGroupInfo
Link copied to clipboard
common
data class JsonGroupInfo(groupId: String?, members: List<JsonAddress>, name: String?, type: String?, avatarId: Long?)
information about a legacy group
JsonGroupJoinInfo
Link copied to clipboard
common
data class JsonGroupJoinInfo(groupID: String?, title: String?, memberCount: Int?, addFromInviteLink: Int?, revision: Int?, pendingAdminApproval: Boolean?) : SignaldResponseBodyV1
JsonGroupV2Info
Link copied to clipboard
common
data class JsonGroupV2Info(id: String?, revision: Int?, title: String?, description: String?, avatar: String?, timer: Int?, members: List<JsonAddress>, pendingMembers: List<JsonAddress>, requestingMembers: List<JsonAddress>, inviteLink: String?, accessControl: GroupAccessControl?, memberDetail: List<GroupMember>, pendingMemberDetail: List<GroupMember>) : SignaldResponseBodyV1
Information about a Signal group
JsonMention
Link copied to clipboard
common
data class JsonMention(uuid: String?, start: Int?, length: Int?)
JsonMessageEnvelope
Link copied to clipboard
common
data class JsonMessageEnvelope(username: String?, uuid: String?, source: JsonAddress?, sourceDevice: Int?, type: String?, relay: String?, timestamp: Long?, timestampISO: String?, serverTimestamp: Long?, serverDeliveredTimestamp: Long?, hasLegacyMessage: Boolean?, hasContent: Boolean?, isUnidentifiedSender: Boolean?, dataMessage: JsonDataMessage?, syncMessage: JsonSyncMessage?, callMessage: JsonCallMessage?, receipt: JsonReceiptMessage?, typing: JsonTypingMessage?)
JsonMessageRequestResponseMessage
Link copied to clipboard
common
data class JsonMessageRequestResponseMessage(person: JsonAddress?, groupId: String?, type: String?)
JsonQuote
Link copied to clipboard
common
data class JsonQuote(id: Long?, author: JsonAddress?, text: String?, attachments: List<JsonQuotedAttachment>, mentions: List<JsonMention>)
A quote is a reply to a previous message.
JsonReaction
Link copied to clipboard
common
data class JsonReaction(emoji: String?, remove: Boolean?, targetAuthor: JsonAddress?, targetSentTimestamp: Long?)
JsonReadMessage
Link copied to clipboard
common
data class JsonReadMessage(sender: JsonAddress?, timestamp: Long?)
JsonSendMessageResult
Link copied to clipboard
common
data class JsonSendMessageResult(address: JsonAddress?, success: Success?, networkFailure: Boolean?, unregisteredFailure: Boolean?, identityFailure: String?)
JsonSentTranscriptMessage
Link copied to clipboard
common
data class JsonSentTranscriptMessage(destination: JsonAddress?, timestamp: Long?, expirationStartTimestamp: Long?, message: JsonDataMessage?, unidentifiedStatus: Map<String, Boolean>?, isRecipientUpdate: Boolean?)
JsonSyncMessage
Link copied to clipboard
common
data class JsonSyncMessage(sent: JsonSentTranscriptMessage?, contacts: JsonAttachment?, contactsComplete: Boolean?, groups: JsonAttachment?, blockedList: JsonBlockedListMessage?, request: String?, readMessages: List<JsonReadMessage>, viewOnceOpen: JsonViewOnceOpenMessage?, verified: JsonVerifiedMessage?, configuration: ConfigurationMessage?, stickerPackOperations: List<JsonStickerPackOperationMessage>, fetchType: String?, messageRequestResponse: JsonMessageRequestResponseMessage?)
JsonVerifiedMessage
Link copied to clipboard
common
data class JsonVerifiedMessage(destination: JsonAddress?, identityKey: String?, verified: String?, timestamp: Long?)
JsonVersionMessage
Link copied to clipboard
common
data class JsonVersionMessage(name: String?, version: String?, branch: String?, commit: String?) : SignaldResponseBodyV1
JsonViewOnceOpenMessage
Link copied to clipboard
common
data class JsonViewOnceOpenMessage(sender: JsonAddress?, timestamp: Long?)
LeaveGroupRequest
Link copied to clipboard
common
data class LeaveGroupRequest(account: String, groupID: String) : SignaldRequestBodyV1<LeaveGroup, GroupInfo>
LinkedDevices
Link copied to clipboard
common
data class LinkedDevices(devices: List<DeviceInfo>) : SignaldResponseBodyV1
LinkingURI
Link copied to clipboard
common
data class LinkingURI(uri: String?, sessionId: String?) : SignaldResponseBodyV1
ListAccountsRequest
Link copied to clipboard
common
return all local accounts
ListContactsRequest
Link copied to clipboard
common
data class ListContactsRequest(account: String, async: Boolean?) : SignaldRequestBodyV1<ListContacts, ProfileList>
ListenerState
Link copied to clipboard
common
data class ListenerState(version: String?, data: ListenerState.Data, error: Boolean?) : ClientMessageWrapper
indicates when the incoming connection to the signal server has started or stopped
ListGroupsRequest
Link copied to clipboard
common
data class ListGroupsRequest(account: String) : SignaldRequestBodyV1<ListGroups, GroupList>
MarkReadRequest
Link copied to clipboard
common
data class MarkReadRequest(account: String, to: JsonAddress, timestamps: List<Long>, when: Long?) : SignaldRequestBodyV1<MarkRead, EmptyResponse>
OfferMessage
Link copied to clipboard
common
data class OfferMessage(id: Long?, sdp: String?, type: String?, opaque: String?)
Payment
Link copied to clipboard
common
data class Payment(receipt: String?, note: String?)
details about a MobileCoin payment
Profile
Link copied to clipboard
common
data class Profile(name: String?, avatar: String?, address: JsonAddress?, capabilities: Capabilities?, color: String?, about: String?, emoji: String?, profileName: String?, inboxPosition: Int?, expirationTime: Int?, mobilecoinAddress: String?) : SignaldResponseBodyV1
Information about a Signal user
ProfileList
Link copied to clipboard
common
data class ProfileList(profiles: List<Profile>) : SignaldResponseBodyV1
ReactRequest
Link copied to clipboard
common
data class ReactRequest(username: String, recipientAddress: JsonAddress?, recipientGroupId: String?, reaction: JsonReaction, timestamp: Long?) : SignaldRequestBodyV1<React, SendResponse>
react to a previous message
ReceiptMessage
Link copied to clipboard
common
data class ReceiptMessage(type: String?, timestamps: List<Long>, when: Long?)
RegisterRequest
Link copied to clipboard
common
data class RegisterRequest(account: String, voice: Boolean?, captcha: String?, server: String?) : SignaldRequestBodyV1<Register, Account>
begin the account registration process by requesting a phone number verification code.
RemoteDelete
Link copied to clipboard
common
data class RemoteDelete(targetSentTimestamp: Long?)
RemoteDeleteRequest
Link copied to clipboard
common
data class RemoteDeleteRequest(account: String, address: JsonAddress?, group: String?, timestamp: Long) : SignaldRequestBodyV1<RemoteDelete, SendResponse>
delete a message previously sent
RemoveLinkedDeviceRequest
Link copied to clipboard
common
data class RemoveLinkedDeviceRequest(account: String, deviceId: Long) : SignaldRequestBodyV1<RemoveLinkedDevice, EmptyResponse>
Remove a linked device from the Signal account.
RemoveServerRequest
Link copied to clipboard
common
data class RemoveServerRequest(uuid: String?) : SignaldRequestBodyV1<DeleteServer, EmptyResponse>
RequestSyncRequest
Link copied to clipboard
common
data class RequestSyncRequest(account: String, groups: Boolean?, configuration: Boolean?, contacts: Boolean?, blocked: Boolean?) : SignaldRequestBodyV1<RequestSync, EmptyResponse>
Request other devices on the account send us their group list, syncable config and contact list.
ResetSessionRequest
Link copied to clipboard
common
data class ResetSessionRequest(account: String, address: JsonAddress, timestamp: Long?) : SignaldRequestBodyV1<ResetSession, SendResponse>
reset a session with a particular user
ResolveAddressRequest
Link copied to clipboard
common
data class ResolveAddressRequest(account: String, partial: JsonAddress) : SignaldRequestBodyV1<ResolveAddress, JsonAddress>
Resolve a partial JsonAddress with only a number or UUID to one with both.
SendPaymentRequest
Link copied to clipboard
common
data class SendPaymentRequest(account: String, address: JsonAddress, payment: Payment, when: Long?) : SignaldRequestBodyV1<SendPayment, SendResponse>
send a mobilecoin payment
SendRequest
Link copied to clipboard
common
data class SendRequest(username: String, recipientAddress: JsonAddress?, recipientGroupId: String?, messageBody: String?, attachments: List<JsonAttachment>, quote: JsonQuote?, timestamp: Long?, mentions: List<JsonMention>) : SignaldRequestBodyV1<Send, SendResponse>
SendResponse
Link copied to clipboard
common
data class SendResponse(results: List<JsonSendMessageResult>, timestamp: Long?) : SignaldResponseBodyV1
Server
Link copied to clipboard
common
data class Server(uuid: String?, proxy: String?, ca: String?, serviceUrl: String?, cdnUrls: List<ServerCDN>, contactDiscoveryUrl: String?, keyBackupUrl: String?, storageUrl: String?, zkParam: String?, unidentifiedSenderRoot: String?)
a Signal server
ServerCDN
Link copied to clipboard
common
data class ServerCDN(number: Int?, url: String?)
ServerList
Link copied to clipboard
common
data class ServerList(servers: List<Server>) : SignaldResponseBodyV1
SetDeviceNameRequest
Link copied to clipboard
common
data class SetDeviceNameRequest(account: String, deviceName: String?) : SignaldRequestBodyV1<SetDeviceName, EmptyResponse>
set this device's name.
SetExpirationRequest
Link copied to clipboard
common
data class SetExpirationRequest(account: String, address: JsonAddress?, group: String?, expiration: Int) : SignaldRequestBodyV1<SetExpiration, SendResponse>
Set the message expiration timer for a thread.
SetProfile
Link copied to clipboard
common
data class SetProfile(account: String, name: String, avatarFile: String?, about: String?, emoji: String?, mobilecoinAddress: String?) : SignaldRequestBodyV1<SetProfile, EmptyResponse>
SignaldRequestBodyV1
Link copied to clipboard
common
A base class for requests.
SignaldResponseBodyV1
Link copied to clipboard
common
sealed class SignaldResponseBodyV1
SubscribeRequest
Link copied to clipboard
common
data class SubscribeRequest(account: String) : SignaldRequestBodyV1<Subscribe, SubscriptionResponse>
receive incoming messages.
SubscriptionResponse
Link copied to clipboard
common
data class SubscriptionResponse(messages: List<ClientMessageWrapper>) : SignaldResponseBodyV1
Responses from the subscribe / unsubscribe endpoint.
TrustRequest
Link copied to clipboard
common
data class TrustRequest(account: String, address: JsonAddress, safetyNumber: String?, qrCodeData: String?, trustLevel: String?) : SignaldRequestBodyV1<Trust, EmptyResponse>
Trust another user's safety number using either the QR code data or the safety number text
TypingMessage
Link copied to clipboard
common
data class TypingMessage(action: String?, timestamp: Long?, groupId: String?)
TypingRequest
Link copied to clipboard
common
data class TypingRequest(account: String, address: JsonAddress?, group: String?, typing: Boolean, when: Long?) : SignaldRequestBodyV1<Typing, EmptyResponse>
send a typing started or stopped message
UnsubscribeRequest
Link copied to clipboard
common
data class UnsubscribeRequest(account: String) : SignaldRequestBodyV1<Unsubscribe, SubscriptionResponse>
See subscribe for more info
UpdateContactRequest
Link copied to clipboard
common
data class UpdateContactRequest(account: String, address: JsonAddress, name: String?, color: String?, inboxPosition: Int?) : SignaldRequestBodyV1<UpdateContact, Profile>
update information about a local contact
UpdateGroupRequest
Link copied to clipboard
common
data class UpdateGroupRequest(account: String, groupID: String, title: String?, avatar: String?, updateTimer: Int?, addMembers: List<JsonAddress>, removeMembers: List<JsonAddress>, updateRole: GroupMember?, updateAccessControl: GroupAccessControl?, resetLink: Boolean?) : SignaldRequestBodyV1<UpdateGroup, GroupInfo>
modify a group.
VerifyRequest
Link copied to clipboard
common
data class VerifyRequest(account: String, code: String) : SignaldRequestBodyV1<Verify, Account>
verify an account's phone number with a code after registering, completing the account creation process
VersionRequest
Link copied to clipboard
common
class VersionRequest : SignaldRequestBodyV1<Version, JsonVersionMessage>