UNPKG

@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.

90 lines (89 loc) 2.94 kB
import { HttpHandler } from 'msw'; import { LocalStorageService } from '../local-storage'; import { PageFactoryService, PageService } from '../mock-data'; import { MockConfig } from '../types'; /** * The HandlerService is responsible for returning all handlers for the Spartacus Mock Server. */ export declare class HandlerService { protected config: MockConfig; protected pageFactoryService: PageFactoryService; protected pageService: PageService; protected localStorageService: LocalStorageService; readonly routes: { baseSites: string; languages: string; currencies: string; titles: string; countries: string; regions: string; i18n: string; authLogin: string; authRevoke: string; users: string; user: string; userTemp: string; consentTemplates: string; anonymousConsentTemplates: string; notificationPreferences: string; productInterests: string; customerCoupons: string; addresses: string; payments: string; addressVerification: string; pages: string; components: string; productReferences: string; productReviews: string; productSearch: string; searchSuggestions: string; product: string; carts: string; cart: string; addEntries: string; updateEntries: string; removeEntries: string; deleteCart: string; addEmail: string; cartVoucher: string; cartVoucherRemove: string; validate: string; saveCart: string; setDeliveryAddress: string; createDeliveryAddress: string; removeDeliveryAddress: string; deliveryMode: string; deliveryModes: string; cardTypes: string; paymentProviderSubInfo: string; createPaymentDetails: string; setCartPaymentDetails: string; sopMockProcess: string; placeOrder: string; orderHistory: string; orderDetail: string; cancelOrder: string; returnOrder: string; orderReturns: string; orderReturnDetail: string; cancelReturn: string; restoreSavedCart: string; cloneSavedCart: string; savedCart: string; addressDetail: string; paymentDetail: string; userUpdatePassword: string; userUpdateLoginId: string; consentDetail: string; consents: string; anonymousConsents: string; notificationPreference: string; storescounts: string; stores: string; store: string; }; constructor(config: MockConfig, pageFactoryService: PageFactoryService, pageService: PageService, localStorageService: LocalStorageService); getAllHandlers(): HttpHandler[]; getTranslationsHandler(): HttpHandler[]; getPagesHandler(): HttpHandler[]; }