@valantic/spartacus-mock
Version:
This project offers you the possibility to mock the OCC Endpoints of your Composable Storefront (Spartacus). It uses the Mock Service Worker to mock the API calls.
18 lines (17 loc) • 750 B
TypeScript
import { Occ } from '@spartacus/core';
import { ContentPages, MockConfig, Page } from '../../types';
import { PageFactoryService } from './page-factory.service';
/**
* The PageService takes the custom Pages provided from the MockConfig and merges them with the default pages
*/
export declare class PageService {
private config;
private pageFactoryService;
customContentPages?: ContentPages;
customHomePage?: Page;
customProductDetailPage?: Page;
customProductCategoryPage?: Page;
constructor(config: MockConfig, pageFactoryService: PageFactoryService);
getMockPage(pageType?: string, pageLabelOrId?: string, productCode?: string): Occ.CMSPage | null;
getSanitizedPageLabelOrId(pageLabelOrId: string): string;
}