UNPKG

@sendbird/uikit-utils

Version:

A collection of utility functions and constants for building chat UI components with Sendbird UIKit.

30 lines (29 loc) 1.58 kB
import type { SendbirdBaseChannel, SendbirdChannel, SendbirdGroupChannel, SendbirdGroupChannelCreateParams, SendbirdOpenChannel } from '../types'; /** * Diff utils for channel * @param {SendbirdBaseChannel} [a] * @param {SendbirdBaseChannel} [b] * @returns {boolean} * */ export declare function isDifferentChannel<T extends SendbirdBaseChannel>(a?: T, b?: T): boolean; export declare const getGroupChannelChatAvailableState: (channel: SendbirdGroupChannel) => { disabled: boolean; frozen: boolean; muted: boolean; }; export declare const getOpenChannelChatAvailableState: (channel: SendbirdOpenChannel, userId: string) => Promise<{ disabled: boolean; frozen: boolean; muted: boolean; }>; export declare const confirmAndMarkAsRead: (channels: SendbirdBaseChannel[], skipUnreadCountCheck?: boolean) => void; export declare const confirmAndMarkAsDelivered: (channels: SendbirdBaseChannel[]) => void; export declare function isDefaultCoverImage(coverUrl: string): boolean; export declare function getMembersExcludeMe(channel: SendbirdGroupChannel, currentUserId?: string): import("@sendbird/chat/groupChannel").Member[]; export declare function getGroupChannels(channels: SendbirdChannel[]): SendbirdGroupChannel[]; export declare function getOpenChannels(channels: SendbirdChannel[]): SendbirdOpenChannel[]; export declare function getChannelUniqId(channel: SendbirdChannel): string; export declare function getDefaultGroupChannelCreateParams(params: { invitedUserIds: string[]; currentUserId?: string; }): SendbirdGroupChannelCreateParams;