Package-level declarations

Types

Link copied to clipboard
interface Action
Link copied to clipboard
interface Attachment
Link copied to clipboard
data class AttachmentMessage(val file: File, val captionText: String? = null) : AttachmentMessageBody

Represents an attachment message.

Link copied to clipboard

Facade for the AXP Messaging module.

Link copied to clipboard
interface ElementText

The text of the message body

Link copied to clipboard
Link copied to clipboard

Enumerates the possible states of a messaging stream event.

Link copied to clipboard
data class IdleTimeout(val date: OffsetDateTime, val gracePeriod: Int)
Link copied to clipboard
typealias IdleTimeoutCallbackListener = FieldChangedListener<IdleTimeout>
Link copied to clipboard

represent illegal or appropriate message body arguments

Link copied to clipboard
interface Item
Link copied to clipboard
Link copied to clipboard
interface LocationDetails
Link copied to clipboard
data class LocationMessage(val lat: Double, val long: Double, val address: String? = null, val name: String? = null) : MessageBody

Represents a location message.

Link copied to clipboard
interface Message

Represents a message in a conversation.

Link copied to clipboard
sealed interface MessageBody

Definition of the body element such as the type of element, the message text and format

Link copied to clipboard
data class MessagingStreamState(val state: EventState, val reason: String? = null, val updatedAt: OffsetDateTime = OffsetDateTime.now())

Represents the state of a messaging stream.

Link copied to clipboard
data class NotificationPayload(val eventDate: OffsetDateTime, val eventId: String, val conversationId: ConversationId, val sessionId: SessionId)

Data class representing the payload of a notification from Notification Server.

Link copied to clipboard
data class NotificationResult(val eventDate: OffsetDateTime?, val participant: Participant?, val message: Message?, val type: NotificationType)

Data class representing the result of a push notification.

Link copied to clipboard

Enum representing the type of a notification.

Link copied to clipboard
data class PostbackMessage(val text: String, val payload: String) : MessageBody

Represents a postback message.

Link copied to clipboard
data class ReplyMessage(val text: String, val payload: String, val iconUrl: URI? = null) : MessageBody

Represents a reply message.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias TypingStartedListener = FieldChangedListener<Participant>
Link copied to clipboard
typealias TypingStoppedListener = FieldChangedListener<Participant>
Link copied to clipboard
data class UploadedAttachment(val attachmentId: String, val name: String, val type: String, val size: Long)

Properties

Link copied to clipboard
val Conversation.messageArrivedFlow: SharedFlow<Message>

A SharedFlow that emits Message objects when a new message arrives from the server.

Link copied to clipboard
val Conversation.messageDeliveredFlow: SharedFlow<Message>

A SharedFlow that emits Message objects when a message is delivered on the server.

Link copied to clipboard
val Conversation.typingParticipantsFlow: StateFlow<Set<Participant>>

A StateFlow that emits the set of Participants who are currently typing in the conversation.

Functions

Link copied to clipboard
fun Conversation.addMessageArrivedListener(listener: MessageChangedListener)

Adds a listener for new messages arriving from the server.

Link copied to clipboard
fun Conversation.addMessageDeliveredListener(listener: MessageChangedListener)

Adds a listener for messages being successfully delivered to the server.

Link copied to clipboard

Adds a listener for typing started events.

Link copied to clipboard

Adds a listener for typing stopped events.

Link copied to clipboard
suspend fun Conversation.getMessages(pageSize: Int = 10): AxpResult<out PageIterator<Message>>

Retrieves messages in the chat session.

fun Conversation.getMessages(pageSize: Int = 10, responseHandler: ResponseHandler<PageIterator<Message>>)

Retrieves messages in the chat session asynchronously with a response handler.

Link copied to clipboard
fun Conversation.notifyUserTyping()

Notify the server that the local user is typing.

Link copied to clipboard
fun Conversation.removeMessageArrivedListener(listener: MessageChangedListener)

Removes a listener for new messages arriving from the server.

Link copied to clipboard
fun Conversation.removeMessageDeliveredListener(listener: MessageChangedListener)

Removes a listener for messages being successfully delivered to the server.

Link copied to clipboard

Removes a listener for typing started events.

Link copied to clipboard

Removes a listener for typing stopped events.

Link copied to clipboard
suspend fun Conversation.sendMessage(message: MessageBody, parentMessageId: MessageId? = null): AxpResult<Message>

Sends a message in the conversation.

suspend fun Conversation.sendMessage(message: String, parentMessageId: MessageId? = null): AxpResult<Message>

Sends a message in the session.

fun Conversation.sendMessage(message: MessageBody, responseHandler: ResponseHandler<Message>, parentMessageId: MessageId? = null)

Sends a message in the conversation asynchronously.

fun Conversation.sendMessage(message: String, parentMessageId: MessageId? = null, responseHandler: ResponseHandler<Message>)

Sends a message in the session asynchronously with a response handler.