Package-level declarations

Types

Link copied to clipboard
data class Account(val uuid: UUID, val msisdn: Msisdn, val name: String)

Represents the end-user's account.

Link copied to clipboard
data class AccountInfo(val uuid: UUID, val name: String)

Represents the end-user's account information.

Link copied to clipboard
data class AccountKeyBundle(val identityKey: String, val deviceKeys: List<SessionInitDeviceKeyBundle> = emptyList())

Represents an account's key-bundle with his identityKey.

Link copied to clipboard
data class Contact(val uuid: UUID, val msisdn: Msisdn)

Represents a contact which is a minimal variant of the end-user's Account.

Link copied to clipboard
data class Device(val accountUuid: UUID, val registrationId: RegistrationId)

Represents a device which is linked to end-user's Account.

Link copied to clipboard
data class HubMessage(val type: Type, val content: String, val version: Version = V1)

Represents a message which holds either a PluginMessage or a NonSignalMessage. It's main purpose is to extend Message to support a model where it is convenient to transfer non-signal compliant messages.

Link copied to clipboard
data class Message(val messageType: MessageType, val sourceUuid: UUID, val sourceMsisdn: Msisdn, val sourceDeviceId: Int, val destination: UUID, val destinationDeviceId: Int, val destinationRegistrationId: RegistrationId, val content: String, val timestamp: Long)

Represents the message-dto, which a server-client sends.

Link copied to clipboard

Defines types of messages.

Link copied to clipboard
data class MessageWithId(val id: Int, val message: Message)

Represents a wrapper around message-dto with it's assigned id from the database.

Link copied to clipboard
data class NonSignalMessage(val text: String)

Represents a non-signal compliant message.

Link copied to clipboard
data class OneTimeKey(val keyId: Long, val publicKey: String)

Represents a signal-compliant OneTimeKey. It is used to allow both parties to agree on Bob's ratchet public key.

Link copied to clipboard

Defines an installable Plugin.

Link copied to clipboard
data class Plugin(val id: String)

Defines a plugin. Plugins can extend this message to support their own model.

Link copied to clipboard
data class PluginMessage(val plugin: Plugin, val text: String)

Represents a plugin message. Plugins are expected to extend this message to support their own model. By extension, this means it is required for plugin's model to be known beforehand.

Link copied to clipboard
data class ReceiptMessage(val type: ReceiptType)

Represents a receipt message. Through this type of message source can be notified if the message has been read (or not).

Link copied to clipboard

Defines different types of ReceiptMessage. Types represent different stages of message's state.

Link copied to clipboard
data class RegisterAccount(val msisdn: Msisdn, val name: String, val registrationId: RegistrationId)

Represents the account of the end-user's with its RegistrationId.

Link copied to clipboard
data class RejectedMessage(val id: Int, val rejectionDetails: RejectionDetails)

Represents a rejected message's id with the rejectionDetails.

Link copied to clipboard

Defines reasons why the message was rejected and specifies whether the operation is retryable or not and under which conditions.

Link copied to clipboard
data class RejectionDetails(val reason: RejectedReason, val cause: String)

Contains the cause and reason of the message's rejection.

Link copied to clipboard
data class ReplaceMasterDeviceRequest(val msisdn: Msisdn, val registrationId: RegistrationId)

The request to replace master device.

Link copied to clipboard

Represents the response dto when updating server-client's configuration.

Link copied to clipboard
data class SessionInitDeviceKeyBundle(val deviceId: Int, val registrationId: RegistrationId, val signedPreKey: SignedPreKey, val oneTimeKey: OneTimeKey?)

Represents a key-bundle which is used to return all the necessary keys for the session's (ratchet) initialization.

Link copied to clipboard
data class SetupDeviceKeyBundle(val accountUuid: UUID, val identityKey: String, val deviceId: Int, val signedPreKey: SignedPreKey, val oneTimeKeys: List<OneTimeKey> = emptyList())

Represents the key-bundle which the device is setting during the set-up-device phase.

Link copied to clipboard
data class SignedPreKey(val keyId: Long, val publicKey: String, val signature: String)

Represents a signal-compliant SignedPreKey.

Link copied to clipboard

Defines types of source server.

Link copied to clipboard
data class Type(val sourceServerType: SourceServerType, val messageType: MessageType)

Defines a union between source server type and the message's type. Based on this union the consumer can decide the serialization strategy.

Link copied to clipboard

Represents a typing message. This message can be used by clients to enable typing animation.

Link copied to clipboard

Represents the request dto to update the server-client's configuration.

Link copied to clipboard

Message's version, through this number is expressed the message's compatibility. Any increment on this number represents a non-backwards compatibility change.

Functions

Link copied to clipboard
@JvmName(name = "from")
fun accountFrom(uuid: UUID, msisdn: String, name: String): Account

A factory function for creating an Account.

Link copied to clipboard
@JvmName(name = "from")
fun contactFrom(uuid: UUID, msisdn: String): Contact

A factory function for creating a Contact.

Link copied to clipboard
@JvmName(name = "from")
fun createReplaceMasterRequest(msisdn: String, registrationId: Int): ReplaceMasterDeviceRequest

A factory function for creating a ReplaceMasterDeviceRequest.

Link copied to clipboard
@JvmName(name = "from")
fun deviceFrom(accountUuid: UUID, registrationId: Int): Device

A factory function for creating a Device.

Link copied to clipboard
@JvmName(name = "from")
fun messageFrom(messageTypeTag: Int, sourceUuid: UUID, sourceMsisdn: String, sourceDeviceId: Int, destination: UUID, destinationDeviceId: Int, destinationRegistrationId: Int, content: String, timestamp: Long): Message

A factory function for creating a Message.

Link copied to clipboard
@JvmName(name = "from")
fun registerAccountFrom(msisdn: String, name: String, registrationId: Int): RegisterAccount

A factory function for creating an RegisterAccount.

Link copied to clipboard
@JvmName(name = "createSessionInitDeviceKey")
fun sessionInitDeviceKeyFrom(deviceId: Int, registrationId: Int, signedPreKey: SignedPreKey, oneTimeKey: OneTimeKey?): SessionInitDeviceKeyBundle

A factory function for creating SessionInitDeviceKeyBundle.

Link copied to clipboard
@JvmName(name = "from")
fun RegisterAccount.toAccount(uuid: UUID): Account

Converts this RegisterAccount to an Account.

Link copied to clipboard
fun UpdateServerClientRequest(serverKeyAsString: String, serverClientConfigAsString: String, jwt: String): UpdateServerClientRequest

A factory function for creating an UpdateServerClientRequest.