import { Client } from '../client'; import { Collection } from '../enums/collection'; export declare class Search { client: Client; constructor(client: Client); /** * The collections the tenant's installed apps have provisioned. * * @throws {RevenexxException} * @returns {Promise<{}>} */ searchListCollections(): Promise<{}>; /** * Full-text search within one collection using Typesense query parameters as the query string. * * @param {Collection} params.collection - Collection key (one the tenant has installed). * @param {string} params.q - Query text. Use `*` to match all. * @param {string} params.queryBy - Comma-separated fields to search. * @param {string} params.filterBy - Filter expression. * @param {string} params.sortBy - Sort expression. * @param {number} params.page - 1-based page. * @param {number} params.perPage - Hits per page (max 250). * @throws {RevenexxException} * @returns {Promise<{}>} */ searchSearchDocumentsGet(params: { collection: Collection; q?: string; queryBy?: string; filterBy?: string; sortBy?: string; page?: number; perPage?: number; }): Promise<{}>; /** * Full-text search within one collection using Typesense query parameters as the query string. * * @param {Collection} collection - Collection key (one the tenant has installed). * @param {string} q - Query text. Use `*` to match all. * @param {string} queryBy - Comma-separated fields to search. * @param {string} filterBy - Filter expression. * @param {string} sortBy - Sort expression. * @param {number} page - 1-based page. * @param {number} perPage - Hits per page (max 250). * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ searchSearchDocumentsGet(collection: Collection, q?: string, queryBy?: string, filterBy?: string, sortBy?: string, page?: number, perPage?: number): Promise<{}>; /** * Full-text search within one collection. The body holds Typesense search parameters. * * @param {Collection} params.collection - Collection key (one the tenant has installed). * @param {string} params.facetBy - Comma-separated fields to facet on. * @param {string} params.filterBy - Filter expression, e.g. `in_stock:=true`. * @param {number} params.page - * @param {number} params.perPage - * @param {string} params.q - Query text. Use `*` to match all. * @param {string} params.queryBy - Comma-separated fields to search. * @param {string} params.sortBy - Sort expression, e.g. `price:desc`. * @throws {RevenexxException} * @returns {Promise<{}>} */ searchSearchDocuments(params: { collection: Collection; facetBy?: string; filterBy?: string; page?: number; perPage?: number; q?: string; queryBy?: string; sortBy?: string; }): Promise<{}>; /** * Full-text search within one collection. The body holds Typesense search parameters. * * @param {Collection} collection - Collection key (one the tenant has installed). * @param {string} facetBy - Comma-separated fields to facet on. * @param {string} filterBy - Filter expression, e.g. `in_stock:=true`. * @param {number} page - * @param {number} perPage - * @param {string} q - Query text. Use `*` to match all. * @param {string} queryBy - Comma-separated fields to search. * @param {string} sortBy - Sort expression, e.g. `price:desc`. * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ searchSearchDocuments(collection: Collection, facetBy?: string, filterBy?: string, page?: number, perPage?: number, q?: string, queryBy?: string, sortBy?: string): Promise<{}>; /** * Fetch a single document by id from a collection the tenant has installed. * * @param {Collection} params.collection - Collection key (one the tenant has installed). * @param {string} params.documentId - Document id within the collection. * @throws {RevenexxException} * @returns {Promise<{}>} */ searchGetDocument(params: { collection: Collection; documentId: string; }): Promise<{}>; /** * Fetch a single document by id from a collection the tenant has installed. * * @param {Collection} collection - Collection key (one the tenant has installed). * @param {string} documentId - Document id within the collection. * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ searchGetDocument(collection: Collection, documentId: string): Promise<{}>; /** * Run several searches in one request (the InstantSearch adapter uses this). Each entry names its collection. * * @param {object[]} params.searches - * @throws {RevenexxException} * @returns {Promise<{}>} */ searchMultiSearch(params: { searches: object[]; }): Promise<{}>; /** * Run several searches in one request (the InstantSearch adapter uses this). Each entry names its collection. * * @param {object[]} searches - * @throws {RevenexxException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ searchMultiSearch(searches: object[]): Promise<{}>; }