export type Channel = import('./types').Channel; export type Track = import('./types').Track; export type SdkResult = import('./types').SdkResult; export type TrackQuery = { /** * - Channel slugs, any case; tracks from any of them */ channels?: string[]; /** * - Tracks with all of these tags */ tags?: string[]; /** * - Tracks mentioning all of these slugs */ mentions?: string[]; /** * - Full-text search over title and description */ text?: string; }; /** * Read a search string: `@slug` is a channel, `#tag` a tag, `mention:@slug` a * mention, and the remaining words are free text. Tags and mentions follow the * same rule as the database, so `#Techno,` finds tracks tagged `techno`. * @param {string} input * @returns {Required} * @example * parseQuery('@ko002 #Techno #acid mention:@alice detroit') * // => {channels: ['ko002'], tags: ['techno', 'acid'], mentions: ['alice'], text: 'detroit'} */ export declare function parseQuery(input: string): Required; /** * Find tracks across all channels. Matching, ordering, paging and counting all * happen in the database, so `count` is the true total. * @param {TrackQuery | string} query - A {@link TrackQuery}, or a search string for {@link parseQuery} * @param {{limit?: number, offset?: number, order?: 'created_at' | 'updated_at' | 'title', ascending?: boolean}} [options] - Newest first by default * @returns {Promise>} */ export declare function searchTracks(query: TrackQuery | string, { limit, offset, order, ascending }?: { limit?: number; offset?: number; order?: 'created_at' | 'updated_at' | 'title'; ascending?: boolean; }): Promise>; /** * Find channels by name, slug or description, newest activity first. * @param {string} text * @param {{limit?: number, offset?: number}} [options] * @returns {Promise>} */ export declare function searchChannels(text: string, { limit, offset }?: { limit?: number; offset?: number; }): Promise>;