import { PostsArchiveFetchStrategy, PostsArchiveParams } from '../strategies/index.js'; import { HeadlessConfig } from '../../types.js'; import { PostEntity } from '../types/index.js'; import { QueryProps } from './types.js'; export type PageType = { /** * Regular post archive */ isPostArchive: boolean; /** * Search route */ isSearch: boolean; /** * Author Archive */ isAuthorArchive: boolean; /** * Custom Post Type Archive */ isPostTypeArchive: boolean; /** * Which post type this archive is for */ postType: string; /** * Category Archive */ isCategoryArchive: boolean; /** * Tag Archive */ isTagArchive: boolean; /** * Custom Taxonomy Archive */ isTaxonomyArchive: boolean; /** * Which taxonomy this archive is for */ taxonomy: string; }; /** * Builds the PageType object out of the query params * * @param queryParams * @param config * @returns */ export declare function getPageTypeForQuery(queryParams: PostsArchiveParams, config: HeadlessConfig): PageType; /** * The fetchPosts query function. * * @param params The list of params to pass to the fetch strategy. It overrides the ones in the URL. * @param options The options to pass to the swr hook. * @param path The path of the url to get url params from. * * @param query * @param _config * @param fetcher * @module fetchPosts * @category Data Fetching Hooks */ export declare function fetchPosts(query?: QueryProps

, _config?: HeadlessConfig | undefined, fetcher?: PostsArchiveFetchStrategy | undefined): Promise<{ data: { posts: (T & { author: import("../types/index.js").AuthorEntity[]; terms: Record; })[]; pageInfo: import("../types/index.js").PageInfo; queriedObject: import("../types/index.js").QueriedObject; }; pageType: PageType; isMainQuery: boolean; }>; export declare namespace fetchPosts { var fetcher: (sourceUrl?: string, defaultParams?: P) => PostsArchiveFetchStrategy; }