import type { Impit } from "impit"; /** * Fetches a single page of Google Maps reviews using the experimental BOQ (Backend Query) endpoint. * * The BOQ endpoint returns a nested JSON structure wrapped in a `)]}'` security prefix, * which must be stripped before parsing. This function handles that prefix removal, * parses the response, and returns the raw deserialized data for further processing. * * @param placeId - The Google Maps Place ID to fetch reviews for. * @param sort - Sort order for reviews: `1` (Most Relevant), `2` (Newest), `3` (Highest Rating), `4` (Lowest Rating). * @param client - The HTTP client instance (Impit) used to make the fetch request. * @param paginationToken - An optional pagination token (default: `""`) returned from a previous BOQ response * to retrieve the next page of reviews. Pass `""` for the first page. * @returns The parsed JSON payload from the BOQ endpoint. * @throws Will throw if the HTTP response is not OK or if no valid JSON data is found after stripping the prefix. */ export declare function fetchBoqReviews(placeId: string, sort: 1 | 2 | 3 | 4, client: Impit, paginationToken?: string): Promise; /** * Paginates through multiple pages of BOQ reviews until the requested number of pages is reached * or there are no more pagination tokens available. * * The BOQ response nests review data at `response[1][10][2]`, with an optional pagination * continuation token at `response[1][10][6]`. This function handles extracting reviews from * that structure, paginating through subsequent pages, and optionally cleaning/parsing the * raw nested arrays into structured objects via `boqParser`. * * @param placeId - The Google Maps Place ID to fetch reviews for. * @param sort - Sort order for reviews: `1` (Most Relevant), `2` (Newest), `3` (Highest Rating), `4` (Lowest Rating). * @param pages - Number of pages to fetch. Each page yields ~10 reviews. Use the string `"max"` to fetch all available pages. * @param clean - If `true`, raw nested review arrays are parsed into structured objects using `boqParser`. * If `false`, the raw array data is returned as-is. * @param client - The HTTP client instance (Impit) used for all fetch requests. * @returns An array of reviews — either raw nested arrays (if `clean` is `false`) or parsed review objects (if `clean` is `true`). * Returns an empty array if no valid data is found or if an error occurs during pagination. */ export declare function paginateBoqReviews(placeId: string, sort: 1 | 2 | 3 | 4, pages: string | number, clean: boolean, client: Impit): Promise;