import Client, { IClientArgs } from "./Client"; import { IFacetValue, IPageContent, ISearchResponse, ISection } from "./Types"; export interface IHomePageProps { sections: ISection[]; metadata: Record; groups: Record; } export type IContentPageProps = IPageContent; export interface ISearchPageProps { sections: ISection[]; loading: boolean; facets: Record; response: ISearchResponse; } export class Core { public client: Client; constructor(args: IClientArgs) { this.client = new Client(args); } public async getHomePageData(): Promise { const sections = await this.client.content.getSections(); const groups = await this.client.content.getAllGroups(); const metadata = { }; return { sections, metadata, groups }; } }