---
url: https://talkjs.com/docs/UI_Components/Other_types
title: 'Other types'

minidoc-source: js
minidoc-lib: components
---

## BackButtonClickEvent
/** An event object dispatched by the ChatboxProps.onBackButtonClick event. */
export declare interface BackButtonClickEvent  {
currentUser: UserSnapshot;
}

## BrowserPermission
/** A string that is one of `"notifications"|"microphone"|"geolocation"`.
Note that more possible values may be added in the future, so make sure your handler can deal with unknown permission types gracefully. */
export declare type BrowserPermission = "notifications"|"microphone"|"geolocation";

## BrowserPermissionRequest
/** Passed to ChatboxProps.beforeBrowserPermissionPrompt when a browser permission dialog needs to be shown to the user. */
export declare interface BrowserPermissionRequest  {
/** Cancel whatever user action caused the permission to be requested.
For example, if a user wants to share their location for the first time so that this event is triggered, then if you call `cancel()`, no permission will be requested from the browser, the location sharing will be cancelled, and TalkJS will continue as if the location sharing button had not been clicked at all.
This may be useful if you're using this event to show custom UI elements that nudge users towards granting permission, and this UI has a "cancel" button. */
cancel(): void;
/** Show the browser permission prompt that lets the user allow or deny this permission.
When the user clicks "Allow", then the user action that triggered the browser permission request will proceed and the return value resolves to `"granted"`.
When the user clicks "Deny", then the user action is cancelled, the `onMissingBrowserPermission` event is triggered, and the return value resolves to `"denied"`. */
showPrompt(): Promise<"granted"|"denied">;
/** The type of permission requested.
Note that more possible values may be added in the future, so make sure your handler can deal with unknown permission types gracefully. */
type: BrowserPermission;
}

## DeleteMessageEvent
/** An event object dispatched by the ChatboxProps.onDeleteMessage event. */
export declare interface DeleteMessageEvent  {
/** The conversation that the message used to be in. */
conversation: ConversationSnapshot;
currentUser: UserSnapshot;
/** The message that was just deleted. */
message: MessageSnapshot;
}

## MissingBrowserPermissionEvent
/** Sent by ChatboxProps.onMissingBrowserPermission when the user tried to do an action that require explicit browser permission, but that permission has been denied.
This event is meant to let you show a message to the user if an action (eg sharing a location, or enabling notifications) can't proceed because the browser permission for that has been denied.
If you want to control when to show the browser permissions prompt, use ChatboxProps.beforeBrowserPermissionPrompt.
This event is emitted both when the user has denied this permission in the past, and when a user action just triggered a browser permissions prompt which the user then denied. If you need to differentiate between these two cases, use `beforeBrowserPermissionPrompt`, and inspect the return value of BrowserPermissionRequest.showPrompt. */
export declare interface MissingBrowserPermissionEvent  {
/** The type of permission that was denied.
Note that more possible values may be added in the future, so make sure your handler can deal with unknown permission types gracefully. */
type: BrowserPermission;
}

## SelectConversationEvent
/** An event object dispatched by the ConversationListProps.onSelectConversation event. */
export declare interface SelectConversationEvent  {
/** The newly-selected conversation, or `null` if a conversation was de-selected. */
conversation: ConversationSnapshot|null;
currentUser: UserSnapshot;
/** The message that was scrolled into view within the conversation */
focusedMessage?: MessageSnapshot;
}

## SendMessageEvent
/** An event object dispatched by the ChatboxProps.onSendMessage event. */
export declare interface SendMessageEvent  {
/** The conversation the message was sent in. */
conversation: ConversationSnapshot;
currentUser: UserSnapshot;
/** The message that was just sent. */
message: MessageSnapshot;
}

## MessageActionEvent
/** An event object dispatched by the ChatboxProps.onMessageAction event. */
export declare interface MessageActionEvent  {
/** The name of the action that was triggered. */
action: string;
/** The current conversation. */
conversation: ConversationSnapshot;
/** The message that contained the action link or action button. */
message: MessageSnapshot;
/** The parameters of the action that was triggered, if any. */
params: Record<string, string>;
}

## FocusMessageEvent
/** An event object dispatched by the ChatboxProps.onFocusMessage event. */
export declare interface FocusMessageEvent  {
/** The message that was focused (or `null` if the focus was cleared) */
message: MessageSnapshot|null;
}