Package-level declarations

Types

Link copied to clipboard
@Immutable
data class AgoraChannel(val channel: String)

Represents Agora channel information that contains available channel in a chat channel.

Link copied to clipboard
Link copied to clipboard
@Immutable
data class Answer(val id: String, val pollId: String, val text: String, val createdAt: Date, val updatedAt: Date, val user: User?)
Link copied to clipboard
@Immutable
data class App(val name: String, val fileUploadConfig: FileUploadConfig, val imageUploadConfig: FileUploadConfig)

The representation of the app, with its configurations.

Link copied to clipboard
@Immutable
data class AppSettings(val app: App)

App settings, as they are configured in the dashboard.

Link copied to clipboard
@Immutable
data class Attachment(val authorName: String? = null, val authorLink: String? = null, val titleLink: String? = null, val thumbUrl: String? = null, val imageUrl: String? = null, val assetUrl: String? = null, val ogUrl: String? = null, val mimeType: String? = null, val fileSize: Int = 0, val title: String? = null, val text: String? = null, val type: String? = null, val image: String? = null, val name: String? = null, val fallback: String? = null, val originalHeight: Int? = null, val originalWidth: Int? = null, val upload: File? = null, val uploadState: Attachment.UploadState? = null, val extraData: Map<String, Any> = mapOf()) : CustomObject

Represents an attachment. Most commonly these are files, images, videos and audio recordings, but the class is flexible enough that it can represent other things as well such as a date, a given location or other things.

Link copied to clipboard

Represents types of attachments.

Link copied to clipboard
Link copied to clipboard
@Immutable
data class BannedUser(val user: User, val bannedBy: User?, val channel: Channel?, val createdAt: Date?, val expires: Date?, val shadow: Boolean, val reason: String?)
Link copied to clipboard
@Immutable
data class BannedUsersSort(val createdAt: Date) : ComparableFieldProvider
Link copied to clipboard
@Immutable
data class Channel(val id: String = "", val type: String = "", val name: String = "", val image: String = "", val watcherCount: Int = 0, val frozen: Boolean = false, val lastMessageAt: Date? = null, val createdAt: Date? = null, val deletedAt: Date? = null, val updatedAt: Date? = null, val syncStatus: SyncStatus = SyncStatus.COMPLETED, val memberCount: Int = 0, val messages: List<Message> = listOf(), val members: List<Member> = listOf(), val watchers: List<User> = listOf(), val read: List<ChannelUserRead> = listOf(), val config: Config = Config(), val createdBy: User = User(), val unreadCount: Int = 0, val team: String = "", val hidden: Boolean? = null, val hiddenMessagesBefore: Date? = null, val cooldown: Int = 0, val pinnedMessages: List<Message> = listOf(), val ownCapabilities: Set<String> = setOf(), val membership: Member? = null, val cachedLatestMessages: List<Message> = emptyList(), val isInsideSearch: Boolean = false, val extraData: Map<String, Any> = mapOf()) : CustomObject, ComparableFieldProvider

Channel is where conversations take place between two or more chat users. It contains a list of messages and have a list of the member users that are participating in the conversation.

Link copied to clipboard

Predefined list of channel capabilities constants. Channel capabilities provide you information on which features are available for the current user. Channel capabilities are affected by a number of factors including:

Link copied to clipboard
@Immutable
data class ChannelConfig(val type: String, val config: Config)

Configuration of a channel.

Link copied to clipboard
@Immutable
data class ChannelData(val id: String, val type: String, val name: String = "", val image: String = "", val createdBy: User = User(), val cooldown: Int = 0, val frozen: Boolean = false, val createdAt: Date? = null, val updatedAt: Date? = null, val deletedAt: Date? = null, val memberCount: Int = 0, val team: String = "", val extraData: Map<String, Any> = mapOf(), val ownCapabilities: Set<String> = setOf(), val membership: Member? = null)

A class that only stores the channel data and not the channel state that changes a lot (for example messages, watchers, etc.).

Link copied to clipboard
@Immutable
data class ChannelInfo(val cid: String? = null, val id: String? = null, val type: String? = null, val memberCount: Int = 0, val name: String? = null, val image: String? = null)

A Channel object that contains less information. Used only internally.

Link copied to clipboard
@Immutable
data class ChannelMute(val user: User?, val channel: Channel?, val createdAt: Date, val updatedAt: Date, val expires: Date?)

Represents a channel mute.

Link copied to clipboard
@Immutable
data class ChannelUserRead(val user: User, val lastReceivedEventDate: Date, val unreadMessages: Int, val lastRead: Date, val lastReadMessageId: String?) : UserEntity

Information about how many messages are unread in the channel by a given user.

Link copied to clipboard
@Immutable
data class Command(val name: String, val description: String, val args: String, val set: String)
Link copied to clipboard
@Immutable
data class Config(val createdAt: Date? = null, val updatedAt: Date? = null, val name: String = "", val typingEventsEnabled: Boolean = true, val readEventsEnabled: Boolean = true, val connectEventsEnabled: Boolean = true, val searchEnabled: Boolean = true, val isReactionsEnabled: Boolean = true, val isThreadEnabled: Boolean = true, val muteEnabled: Boolean = true, val uploadsEnabled: Boolean = true, val urlEnrichmentEnabled: Boolean = true, val customEventsEnabled: Boolean = false, val pushNotificationsEnabled: Boolean = true, val pollsEnabled: Boolean = false, val messageRetention: String = "infinite", val maxMessageLength: Int = 5000, val automod: String = "disabled", val automodBehavior: String = "", val blocklistBehavior: String = "", val commands: List<Command> = mutableListOf())
Link copied to clipboard
@Immutable
data class ConnectionData(val user: User, val connectionId: String)
Link copied to clipboard
@Immutable
sealed class ConnectionState

Represents possible states of the WebSocket connection.

Link copied to clipboard
object Constants

Represents constants used across all SDKs.

Link copied to clipboard
Link copied to clipboard
sealed interface CustomObject
Link copied to clipboard
@Immutable
data class Device(val token: String, val pushProvider: PushProvider, val providerName: String?)

Device's information needed to register push notifications.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
object EventType

https://getstream.io/chat/docs/js/#event_object

Link copied to clipboard
Link copied to clipboard
@Immutable
data class FileUploadConfig(val allowedFileExtensions: List<String>, val allowedMimeTypes: List<String>, val blockedFileExtensions: List<String>, val blockedMimeTypes: List<String>, val sizeLimitInBytes: Long)

The configuration of file upload.

Link copied to clipboard
sealed class FilterObject

Filter object that specifies requests for backend queries.

Link copied to clipboard
object Filters

Stream supports a limited set of filters for querying channels, users and members. The example below shows how to filter for channels of type messaging where the current user is a member

Link copied to clipboard
@Immutable
data class Flag(val user: User, val targetUser: User?, val targetMessageId: String, val reviewedBy: String, val createdByAutomod: Boolean, val createdAt: Date?, val updatedAt: Date, val reviewedAt: Date?, val approvedAt: Date?, val rejectedAt: Date?)
Link copied to clipboard
Link copied to clipboard
@Immutable
data class GuestUser(val user: User, val token: String)
Link copied to clipboard
@Immutable
data class HMSRoom(val roomId: String, val roomName: String)

Represents HMS room information that contains available room in a chat channel.

Link copied to clipboard
Link copied to clipboard

The state of initialization process.

Link copied to clipboard
Link copied to clipboard
@Immutable
data class LinkPreview(val originUrl: String, val attachment: Attachment)

A data class that represents a link preview.

Link copied to clipboard
@Immutable
data class Member(val user: User, val createdAt: Date? = null, val updatedAt: Date? = null, val isInvited: Boolean? = null, val inviteAcceptedAt: Date? = null, val inviteRejectedAt: Date? = null, val shadowBanned: Boolean = false, val banned: Boolean = false, val channelRole: String? = null, val notificationsMuted: Boolean? = null, val status: String? = null, val banExpires: Date? = null) : UserEntity, ComparableFieldProvider

Represents a channel member.

Link copied to clipboard
@Immutable
data class Message(val id: String = "", val cid: String = "", val text: String = "", val html: String = "", val parentId: String? = null, val command: String? = null, val attachments: List<Attachment> = listOf(), val mentionedUsersIds: List<String> = listOf(), val mentionedUsers: List<User> = listOf(), val replyCount: Int = 0, val deletedReplyCount: Int = 0, val reactionCounts: Map<String, Int> = mapOf(), val reactionScores: Map<String, Int> = mapOf(), val reactionGroups: Map<String, ReactionGroup> = mapOf(), val syncStatus: SyncStatus = SyncStatus.COMPLETED, val type: String = "", val latestReactions: List<Reaction> = listOf(), val ownReactions: List<Reaction> = listOf(), val createdAt: Date? = null, val updatedAt: Date? = null, val deletedAt: Date? = null, val updatedLocallyAt: Date? = null, var createdLocallyAt: Date? = null, val user: User = User(), val extraData: Map<String, Any> = mapOf(), val silent: Boolean = false, val shadowed: Boolean = false, val i18n: Map<String, String> = mapOf(), val showInChannel: Boolean = false, val channelInfo: ChannelInfo? = null, val replyTo: Message? = null, val replyMessageId: String? = null, val pinned: Boolean = false, val pinnedAt: Date? = null, val pinExpires: Date? = null, val pinnedBy: User? = null, val threadParticipants: List<User> = emptyList(), val skipPushNotification: Boolean = false, val skipEnrichUrl: Boolean = false, val moderationDetails: MessageModerationDetails? = null, val messageTextUpdatedAt: Date? = null, val poll: Poll? = null) : CustomObject, ComparableFieldProvider
Link copied to clipboard
@Immutable
data class MessageModerationAction(val rawValue: String)

The type of moderation performed to a message.

Link copied to clipboard
@Immutable
data class MessageModerationDetails(val originalText: String, val action: MessageModerationAction, val errorMsg: String)

Describes the details of a message which was moderated.

Link copied to clipboard
@Immutable
sealed class MessagesState

Represents of possible state of messages for ChannelState.

Link copied to clipboard

Represents types of messages.

Link copied to clipboard
@Immutable
data class Mute(val user: User?, val target: User?, val createdAt: Date, val updatedAt: Date, val expires: Date?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Immutable
data class Option(val id: String, val text: String)

The Option object represents an answer option in a poll.

Link copied to clipboard
Link copied to clipboard
@Immutable
data class Poll(val id: String, val name: String, val description: String, val options: List<Option>, val votingVisibility: VotingVisibility, val enforceUniqueVote: Boolean, val maxVotesAllowed: Int, val allowUserSuggestedOptions: Boolean, val allowAnswers: Boolean, val voteCountsByOption: Map<String, Int>, val votes: List<Vote>, val ownVotes: List<Vote>, val createdAt: Date, val updatedAt: Date, val closed: Boolean, val answers: List<Answer> = emptyList())

The Poll object represents a poll in a channel.

Link copied to clipboard
data class PollConfig(val name: String, val options: List<String>, val description: String = "", val votingVisibility: VotingVisibility = VotingVisibility.PUBLIC, val enforceUniqueVote: Boolean = true, val maxVotesAllowed: Int = 1, val allowUserSuggestedOptions: Boolean = false, val allowAnswers: Boolean = false)

The PollConfig object is used to configure a poll.

Link copied to clipboard
@Immutable
data class PushMessage(val messageId: String, val channelId: String, val channelType: String, val getstream: Map<String, Any?>, val extraData: Map<String, Any?>, val metadata: Map<String, Any?>)
Link copied to clipboard

Push notifications provider type.

Link copied to clipboard
@Immutable
data class QueryThreadsResult(val threads: List<Thread>, val prev: String?, val next: String?)

Model representing the result of a 'Query Threads' operation.

Link copied to clipboard
@Immutable
data class Reaction(val messageId: String = "", val type: String = "", val score: Int = 0, val user: User? = null, val userId: String = "", val createdAt: Date? = null, val createdLocallyAt: Date? = null, val updatedAt: Date? = null, val deletedAt: Date? = null, val syncStatus: SyncStatus = SyncStatus.COMPLETED, val extraData: Map<String, Any> = mapOf(), val enforceUnique: Boolean = false) : CustomObject
Link copied to clipboard
data class ReactionGroup(val type: String, val count: Int, val sumScore: Int, val firstReactionAt: Date, val lastReactionAt: Date)

A group of reactions of the same type.

Link copied to clipboard

A comparator used to sort ReactionGroups.

Link copied to clipboard

Sorts ReactionGroups by their count.

Link copied to clipboard

Sorts ReactionGroups by the date of their first reaction.

Link copied to clipboard

Sorts ReactionGroups by the date of their last reaction.

Link copied to clipboard

Sorts ReactionGroups by the sum of their scores.

Link copied to clipboard
@Immutable
data class SearchMessagesResult(val messages: List<Message> = emptyList(), val next: String? = null, val previous: String? = null, val resultsWarning: SearchWarning? = null)
Link copied to clipboard
@Immutable
data class SearchWarning(val channelSearchCids: List<String>, val channelSearchCount: Int, val warningCode: Int, val warningDescription: String)

Represents a warning related to message search results. For example, if there are more than 500 channels that match the channel filter.

Link copied to clipboard

If the message has been sent to the servers.

Link copied to clipboard
@Immutable
data class Thread(val activeParticipantCount: Int, val cid: String, val channel: Channel?, val parentMessageId: String, val parentMessage: Message, val createdByUserId: String, val createdBy: User?, val participantCount: Int, val threadParticipants: List<ThreadParticipant>, val lastMessageAt: Date, val createdAt: Date, val updatedAt: Date, val deletedAt: Date?, val title: String, val latestReplies: List<Message>, val read: List<ChannelUserRead>)

Domain model for a thread. Holds all information related to a thread.

Link copied to clipboard
@Immutable
data class ThreadInfo(val activeParticipantCount: Int, val cid: String, val createdAt: Date, val createdBy: User?, val createdByUserId: String, val deletedAt: Date?, val lastMessageAt: Date?, val parentMessage: Message?, val parentMessageId: String, val participantCount: Int, val replyCount: Int, val title: String, val updatedAt: Date)

Domain model for thread info. Holds partial information related to a thread.

Link copied to clipboard
@Immutable
data class ThreadParticipant(val user: User) : UserEntity

Model holding info about a thread participant.

Link copied to clipboard

Represents the amount of time one instant of time is away from another instant.

Link copied to clipboard
@Immutable
data class TypingEvent(val channelId: String, val users: List<User>)
Link copied to clipboard

An enumeration of various network types used as a constraint in upload attachments worker.

Link copied to clipboard
@Immutable
data class UploadedFile @JvmOverloads constructor(val file: String, val thumbUrl: String? = null, val extraData: Map<String, Any> = emptyMap())

Represents a successfully uploaded file.

Link copied to clipboard
@Immutable
data class User(val id: String = "", val role: String = "", val name: String = "", val image: String = "", val invisible: Boolean? = null, val privacySettings: PrivacySettings? = null, val language: String = "", val banned: Boolean? = null, val devices: List<Device> = listOf(), val online: Boolean = false, val createdAt: Date? = null, val updatedAt: Date? = null, val lastActive: Date? = null, val totalUnreadCount: Int = 0, val unreadChannels: Int = 0, val unreadThreads: Int = 0, val mutes: List<Mute> = listOf(), val teams: List<String> = listOf(), val channelMutes: List<ChannelMute> = emptyList(), val extraData: Map<String, Any> = mapOf(), val deactivatedAt: Date? = null) : CustomObject, ComparableFieldProvider

Represents a person who uses a chat and can perform chat operations like viewing channels or sending messages.

Link copied to clipboard
data class UserBlock(val blockedBy: String, val userId: String, val blockedAt: Date)

Represents a user block.

Link copied to clipboard
sealed interface UserEntity
Link copied to clipboard
typealias UserId = String

Represents User.id String.

Link copied to clipboard
@Immutable
data class VideoCallInfo(val callId: String, val provider: String, val type: String, val agoraChannel: AgoraChannel, val hmsRoom: HMSRoom, val videoCallToken: VideoCallToken)

Represents currently available call information for Agora and HMS video calls.

Link copied to clipboard
@Immutable
data class VideoCallToken(val token: String, val agoraUid: Int?, val agoraAppId: String?)

A call token that is used in currently available video call integrations.

Link copied to clipboard
@Immutable
data class Vote(val id: String, val pollId: String, val optionId: String, val createdAt: Date, val updatedAt: Date, val user: User?)

The Vote object represents a vote in a poll.

Link copied to clipboard

The VotingVisibility enum represents the visibility of the votes.

Inherited functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Converts the channel to the channel data.