import type { Query } from './Query'; import type { Sort } from './Sort'; /** * @type PaginatedSearchResult: Document representing a generic search result. Each search resource should extend this to define what is returned in the `hits`. * * @property query: * * @property sorts: The sorting that was applied to the result. * * @property hits: The sorted array of search hits. Can be empty. * * @property offset: The zero-based index of the first hit/data to include in the result. * * @property limit: Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter `limit` of the endpoint returning this schema. * * @property total: The total number of hits that match the search\'s criteria. This can be greater than the number of results returned as search results are pagenated. * */ export type PaginatedSearchResult = { query: Query; sorts?: Array; hits?: Array; offset: number; limit: number; total: number; } & { [key: string]: any; };