UNPKG

stream-chat

Version:

JS SDK for the Stream Chat API

17 lines (16 loc) 1.22 kB
import type { MessageComposer } from '../../messageComposer'; import type { CommandResponse, UserResponse } from '../../../types'; import type { CommandSendability } from '../../configuration'; import type { CommandSearchSource } from './commands'; export declare function escapeCommandRegExp(text: string): string; export declare const getRawCommandName: (text?: string) => string | undefined; export declare const getCompleteCommandInString: (text: string) => string | null; export declare const stripCommandFromText: (text: string, commandName: string) => string; export declare const stripMentionTokens: (text: string, mentionedUsersInText: UserResponse[], trigger?: string) => string; export declare const getMentionedUsersInText: (text: string, mentionedUsers: UserResponse[]) => UserResponse[]; export declare const getCommandByName: (searchSource: CommandSearchSource, commandName?: string) => CommandResponse | undefined; export declare const notifyCommandDisabled: (composer: MessageComposer, command: CommandResponse) => true | undefined; export declare const notifyCommandNotReady: ({ composer, sendability, }: { composer: MessageComposer; sendability: CommandSendability; }) => true | undefined;