Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / STOREFRONT_API_PATHS

Variable: STOREFRONT_API_PATHS

const STOREFRONT_API_PATHS: object

Where a theme mounts each of createStorefrontRoutes' routes (src/pages/api/…), and where its browser scripts call them: one table, keyed like StorefrontRoutes, so the route files and the scripts never drift. Defaults, not requirements: every browser helper still takes its endpoint. :wilayaId and :productId mark a route's one parameter. orderStatus has no path here: a theme follows an order through its orderStatus action, not a route.

Type Declaration

abandonedConvert

readonly abandonedConvert: "/api/abandoned/convert"

abandonedUpsert

readonly abandonedUpsert: "/api/abandoned/upsert"

cartValidate

readonly cartValidate: "/api/cart/validate"

communes

readonly communes: "/api/communes/:wilayaId"

otpSend

readonly otpSend: "/api/otp/send"

otpVerify

readonly otpVerify: "/api/otp/verify"

reviewEligibility

readonly reviewEligibility: "/api/reviews/eligibility"

reviewsList

readonly reviewsList: "/api/reviews/:productId"

reviewSubmit

readonly reviewSubmit: "/api/reviews/submit"

reviewUpload

readonly reviewUpload: "/api/reviews/upload"