UNPKG

stream-chat

Version:

JS SDK for the Stream Chat API

25 lines (24 loc) 880 B
export type SearchSourceState<T = any> = { hasNext: boolean; isActive: boolean; isLoading: boolean; items: T[] | undefined; searchQuery: string; lastQueryError?: Error; next?: string | null; offset?: number; }; export type SearchSourceOptions = { /** The number of milliseconds to debounce the search query. The default interval is 300ms. */ debounceMs?: number; pageSize?: number; /** When true, the source can execute queries with an empty search string. Defaults to false. */ allowEmptySearchString?: boolean; /** When true, previously loaded items are cleared at the start of a new search query. Defaults to true. */ resetOnNewSearchQuery?: boolean; }; export type SearchSourceType = 'channels' | 'users' | 'messages' | (string & {}); export type QueryReturnValue<T> = { items: T[]; next?: string | null; };