medusa-storefront-data 2.5.3 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/segment-data/default-page-input.json +191 -0
- package/dist/src/config.d.ts +3 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +31 -0
- package/dist/src/cookies.d.ts +23 -0
- package/dist/src/cookies.d.ts.map +1 -0
- package/dist/src/cookies.js +140 -0
- package/dist/src/dynamic-config-schema/index.d.ts +103 -0
- package/dist/src/dynamic-config-schema/index.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/index.js +172 -0
- package/dist/src/dynamic-config-schema/sections/about-brand.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/about-brand.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/about-brand.js +30 -0
- package/dist/src/dynamic-config-schema/sections/baptism-picks.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/baptism-picks.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/baptism-picks.js +17 -0
- package/dist/src/dynamic-config-schema/sections/baptism.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/baptism.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/baptism.js +4 -0
- package/dist/src/dynamic-config-schema/sections/blog-posts.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/blog-posts.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/blog-posts.js +31 -0
- package/dist/src/dynamic-config-schema/sections/brand-marquee.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/brand-marquee.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/brand-marquee.js +9 -0
- package/dist/src/dynamic-config-schema/sections/brand-pillars.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/brand-pillars.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/brand-pillars.js +29 -0
- package/dist/src/dynamic-config-schema/sections/category-pills.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/category-pills.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/category-pills.js +4 -0
- package/dist/src/dynamic-config-schema/sections/celebrity-trust.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/celebrity-trust.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/celebrity-trust.js +4 -0
- package/dist/src/dynamic-config-schema/sections/features.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/features.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/features.js +12 -0
- package/dist/src/dynamic-config-schema/sections/hero.d.ts +6 -0
- package/dist/src/dynamic-config-schema/sections/hero.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/hero.js +9 -0
- package/dist/src/dynamic-config-schema/sections/index.d.ts +24 -0
- package/dist/src/dynamic-config-schema/sections/index.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/index.js +23 -0
- package/dist/src/dynamic-config-schema/sections/instagram-posts.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/instagram-posts.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/instagram-posts.js +30 -0
- package/dist/src/dynamic-config-schema/sections/loved-by-moms.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/loved-by-moms.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/loved-by-moms.js +4 -0
- package/dist/src/dynamic-config-schema/sections/luxe-favourites.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/luxe-favourites.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/luxe-favourites.js +4 -0
- package/dist/src/dynamic-config-schema/sections/new-arrivals-classic.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/new-arrivals-classic.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/new-arrivals-classic.js +12 -0
- package/dist/src/dynamic-config-schema/sections/new-arrivals.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/new-arrivals.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/new-arrivals.js +12 -0
- package/dist/src/dynamic-config-schema/sections/promo-announcements.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/promo-announcements.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/promo-announcements.js +16 -0
- package/dist/src/dynamic-config-schema/sections/promo-countdown.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/promo-countdown.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/promo-countdown.js +16 -0
- package/dist/src/dynamic-config-schema/sections/shop-by-age.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/shop-by-age.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/shop-by-age.js +4 -0
- package/dist/src/dynamic-config-schema/sections/shop-by-category.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/shop-by-category.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/shop-by-category.js +4 -0
- package/dist/src/dynamic-config-schema/sections/testimonials.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/testimonials.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/testimonials.js +9 -0
- package/dist/src/dynamic-config-schema/sections/theme-dresses.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/theme-dresses.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/theme-dresses.js +4 -0
- package/dist/src/dynamic-config-schema/sections/video-stories.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/video-stories.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/video-stories.js +24 -0
- package/dist/src/dynamic-config-schema/sections/why-choose-us.d.ts +5 -0
- package/dist/src/dynamic-config-schema/sections/why-choose-us.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/sections/why-choose-us.js +9 -0
- package/dist/src/dynamic-config-schema/shared.d.ts +35 -0
- package/dist/src/dynamic-config-schema/shared.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/shared.js +99 -0
- package/dist/src/dynamic-config-schema/site-configs.d.ts +11 -0
- package/dist/src/dynamic-config-schema/site-configs.d.ts.map +1 -0
- package/dist/src/dynamic-config-schema/site-configs.js +70 -0
- package/dist/src/edge.d.ts +3 -0
- package/dist/src/edge.d.ts.map +1 -0
- package/dist/src/edge.js +1 -0
- package/dist/src/middleware.d.ts +3 -0
- package/dist/src/middleware.d.ts.map +1 -0
- package/dist/src/middleware.js +1 -0
- package/dist/src/server/brand-pillars-from-categories.d.ts +8 -0
- package/dist/src/server/brand-pillars-from-categories.d.ts.map +1 -0
- package/dist/src/server/brand-pillars-from-categories.js +92 -0
- package/dist/src/server/cart.d.ts +96 -0
- package/dist/src/server/cart.d.ts.map +1 -0
- package/dist/src/server/cart.js +797 -0
- package/dist/src/server/categories.d.ts +4 -0
- package/dist/src/server/categories.d.ts.map +1 -0
- package/dist/src/server/categories.js +34 -0
- package/dist/src/server/collections.d.ts +8 -0
- package/dist/src/server/collections.d.ts.map +1 -0
- package/dist/src/server/collections.js +39 -0
- package/dist/src/server/config-merge.d.ts +3 -0
- package/dist/src/server/config-merge.d.ts.map +1 -0
- package/dist/src/server/config-merge.js +31 -0
- package/dist/src/server/contact.d.ts +34 -0
- package/dist/src/server/contact.d.ts.map +1 -0
- package/dist/src/server/contact.js +57 -0
- package/dist/src/server/customer-registration.d.ts +142 -0
- package/dist/src/server/customer-registration.d.ts.map +1 -0
- package/dist/src/server/customer-registration.js +295 -0
- package/dist/src/server/customer.d.ts +48 -0
- package/dist/src/server/customer.d.ts.map +1 -0
- package/dist/src/server/customer.js +413 -0
- package/dist/src/server/dynamic-config-api.d.ts +11 -0
- package/dist/src/server/dynamic-config-api.d.ts.map +1 -0
- package/dist/src/server/dynamic-config-api.js +46 -0
- package/dist/src/server/dynamic-config.d.ts +176 -0
- package/dist/src/server/dynamic-config.d.ts.map +1 -0
- package/dist/src/server/dynamic-config.js +648 -0
- package/dist/src/server/fulfillment.d.ts +5 -0
- package/dist/src/server/fulfillment.d.ts.map +1 -0
- package/dist/src/server/fulfillment.js +47 -0
- package/dist/src/server/guest.d.ts +81 -0
- package/dist/src/server/guest.d.ts.map +1 -0
- package/dist/src/server/guest.js +183 -0
- package/dist/src/server/help-faq-section-defaults.json +92 -0
- package/dist/src/server/help-sections/help-faq.d.ts +11 -0
- package/dist/src/server/help-sections/help-faq.d.ts.map +1 -0
- package/dist/src/server/help-sections/help-faq.js +6 -0
- package/dist/src/server/help-sections/index.d.ts +2 -0
- package/dist/src/server/help-sections/index.d.ts.map +1 -0
- package/dist/src/server/help-sections/index.js +1 -0
- package/dist/src/server/home-sections/about-brand.d.ts +9 -0
- package/dist/src/server/home-sections/about-brand.d.ts.map +1 -0
- package/dist/src/server/home-sections/about-brand.js +9 -0
- package/dist/src/server/home-sections/baptism-picks.d.ts +10 -0
- package/dist/src/server/home-sections/baptism-picks.d.ts.map +1 -0
- package/dist/src/server/home-sections/baptism-picks.js +27 -0
- package/dist/src/server/home-sections/baptism.d.ts +13 -0
- package/dist/src/server/home-sections/baptism.d.ts.map +1 -0
- package/dist/src/server/home-sections/baptism.js +43 -0
- package/dist/src/server/home-sections/blog-posts.d.ts +9 -0
- package/dist/src/server/home-sections/blog-posts.d.ts.map +1 -0
- package/dist/src/server/home-sections/blog-posts.js +9 -0
- package/dist/src/server/home-sections/brand-marquee.d.ts +8 -0
- package/dist/src/server/home-sections/brand-marquee.d.ts.map +1 -0
- package/dist/src/server/home-sections/brand-marquee.js +7 -0
- package/dist/src/server/home-sections/brand-pillars.d.ts +9 -0
- package/dist/src/server/home-sections/brand-pillars.d.ts.map +1 -0
- package/dist/src/server/home-sections/brand-pillars.js +9 -0
- package/dist/src/server/home-sections/category-pills.d.ts +9 -0
- package/dist/src/server/home-sections/category-pills.d.ts.map +1 -0
- package/dist/src/server/home-sections/category-pills.js +19 -0
- package/dist/src/server/home-sections/celebrity-trust.d.ts +12 -0
- package/dist/src/server/home-sections/celebrity-trust.d.ts.map +1 -0
- package/dist/src/server/home-sections/celebrity-trust.js +27 -0
- package/dist/src/server/home-sections/features.d.ts +9 -0
- package/dist/src/server/home-sections/features.d.ts.map +1 -0
- package/dist/src/server/home-sections/features.js +9 -0
- package/dist/src/server/home-sections/hero.d.ts +9 -0
- package/dist/src/server/home-sections/hero.d.ts.map +1 -0
- package/dist/src/server/home-sections/hero.js +9 -0
- package/dist/src/server/home-sections/instagram-posts.d.ts +9 -0
- package/dist/src/server/home-sections/instagram-posts.d.ts.map +1 -0
- package/dist/src/server/home-sections/instagram-posts.js +9 -0
- package/dist/src/server/home-sections/loved-by-moms.d.ts +12 -0
- package/dist/src/server/home-sections/loved-by-moms.d.ts.map +1 -0
- package/dist/src/server/home-sections/loved-by-moms.js +20 -0
- package/dist/src/server/home-sections/luxe-favourites.d.ts +11 -0
- package/dist/src/server/home-sections/luxe-favourites.d.ts.map +1 -0
- package/dist/src/server/home-sections/luxe-favourites.js +19 -0
- package/dist/src/server/home-sections/new-arrivals-classic.d.ts +8 -0
- package/dist/src/server/home-sections/new-arrivals-classic.d.ts.map +1 -0
- package/dist/src/server/home-sections/new-arrivals-classic.js +10 -0
- package/dist/src/server/home-sections/new-arrivals.d.ts +12 -0
- package/dist/src/server/home-sections/new-arrivals.d.ts.map +1 -0
- package/dist/src/server/home-sections/new-arrivals.js +28 -0
- package/dist/src/server/home-sections/promo-announcements.d.ts +7 -0
- package/dist/src/server/home-sections/promo-announcements.d.ts.map +1 -0
- package/dist/src/server/home-sections/promo-announcements.js +7 -0
- package/dist/src/server/home-sections/promo-countdown.d.ts +6 -0
- package/dist/src/server/home-sections/promo-countdown.d.ts.map +1 -0
- package/dist/src/server/home-sections/promo-countdown.js +5 -0
- package/dist/src/server/home-sections/shared.d.ts +10 -0
- package/dist/src/server/home-sections/shared.d.ts.map +1 -0
- package/dist/src/server/home-sections/shared.js +29 -0
- package/dist/src/server/home-sections/shop-by-age.d.ts +9 -0
- package/dist/src/server/home-sections/shop-by-age.d.ts.map +1 -0
- package/dist/src/server/home-sections/shop-by-age.js +17 -0
- package/dist/src/server/home-sections/shop-by-category.d.ts +10 -0
- package/dist/src/server/home-sections/shop-by-category.d.ts.map +1 -0
- package/dist/src/server/home-sections/shop-by-category.js +17 -0
- package/dist/src/server/home-sections/testimonials.d.ts +9 -0
- package/dist/src/server/home-sections/testimonials.d.ts.map +1 -0
- package/dist/src/server/home-sections/testimonials.js +9 -0
- package/dist/src/server/home-sections/theme-dresses.d.ts +12 -0
- package/dist/src/server/home-sections/theme-dresses.d.ts.map +1 -0
- package/dist/src/server/home-sections/theme-dresses.js +27 -0
- package/dist/src/server/home-sections/video-stories.d.ts +9 -0
- package/dist/src/server/home-sections/video-stories.d.ts.map +1 -0
- package/dist/src/server/home-sections/video-stories.js +9 -0
- package/dist/src/server/home-sections/why-choose-us.d.ts +9 -0
- package/dist/src/server/home-sections/why-choose-us.d.ts.map +1 -0
- package/dist/src/server/home-sections/why-choose-us.js +9 -0
- package/dist/src/server/home.d.ts +51 -0
- package/dist/src/server/home.d.ts.map +1 -0
- package/dist/src/server/home.js +1 -0
- package/dist/src/server/homepage-config.types.d.ts +294 -0
- package/dist/src/server/homepage-config.types.d.ts.map +1 -0
- package/dist/src/server/homepage-config.types.js +34 -0
- package/dist/src/server/homepage-section-defaults.d.ts +189 -0
- package/dist/src/server/homepage-section-defaults.d.ts.map +1 -0
- package/dist/src/server/homepage-section-defaults.js +190 -0
- package/dist/src/server/index.d.ts +25 -0
- package/dist/src/server/index.d.ts.map +1 -0
- package/dist/src/server/index.js +24 -0
- package/dist/src/server/locale-actions.d.ts +14 -0
- package/dist/src/server/locale-actions.d.ts.map +1 -0
- package/dist/src/server/locale-actions.js +58 -0
- package/dist/src/server/locales.d.ts +8 -0
- package/dist/src/server/locales.d.ts.map +1 -0
- package/dist/src/server/locales.js +12 -0
- package/dist/src/server/normalize-homepage-config.d.ts +7 -0
- package/dist/src/server/normalize-homepage-config.d.ts.map +1 -0
- package/dist/src/server/normalize-homepage-config.js +253 -0
- package/dist/src/server/notifications.d.ts +2 -0
- package/dist/src/server/notifications.d.ts.map +1 -0
- package/dist/src/server/notifications.js +20 -0
- package/dist/src/server/onboarding.d.ts +2 -0
- package/dist/src/server/onboarding.d.ts.map +1 -0
- package/dist/src/server/onboarding.js +8 -0
- package/dist/src/server/orders.d.ts +63 -0
- package/dist/src/server/orders.d.ts.map +1 -0
- package/dist/src/server/orders.js +230 -0
- package/dist/src/server/page-input.d.ts +19 -0
- package/dist/src/server/page-input.d.ts.map +1 -0
- package/dist/src/server/page-input.js +42 -0
- package/dist/src/server/payment-details.d.ts +5 -0
- package/dist/src/server/payment-details.d.ts.map +1 -0
- package/dist/src/server/payment-details.js +28 -0
- package/dist/src/server/payment.d.ts +3 -0
- package/dist/src/server/payment.d.ts.map +1 -0
- package/dist/src/server/payment.js +13 -0
- package/dist/src/server/pincode.d.ts +7 -0
- package/dist/src/server/pincode.d.ts.map +1 -0
- package/dist/src/server/pincode.js +30 -0
- package/dist/src/server/products.d.ts +54 -0
- package/dist/src/server/products.d.ts.map +1 -0
- package/dist/src/server/products.js +154 -0
- package/dist/src/server/regions.d.ts +5 -0
- package/dist/src/server/regions.d.ts.map +1 -0
- package/dist/src/server/regions.js +57 -0
- package/dist/src/server/resolve-home-segment-data.d.ts +25 -0
- package/dist/src/server/resolve-home-segment-data.d.ts.map +1 -0
- package/dist/src/server/resolve-home-segment-data.js +20 -0
- package/dist/src/server/returns.d.ts +29 -0
- package/dist/src/server/returns.d.ts.map +1 -0
- package/dist/src/server/returns.js +132 -0
- package/dist/src/server/shoppable-looks.d.ts +17 -0
- package/dist/src/server/shoppable-looks.d.ts.map +1 -0
- package/dist/src/server/shoppable-looks.js +136 -0
- package/dist/src/server/swaps.d.ts +15 -0
- package/dist/src/server/swaps.d.ts.map +1 -0
- package/dist/src/server/swaps.js +89 -0
- package/dist/src/server/variants.d.ts +3 -0
- package/dist/src/server/variants.d.ts.map +1 -0
- package/dist/src/server/variants.js +15 -0
- package/dist/src/server/wishlist.d.ts +11 -0
- package/dist/src/server/wishlist.d.ts.map +1 -0
- package/dist/src/server/wishlist.js +49 -0
- package/dist/src/util/get-locale-header.d.ts +4 -0
- package/dist/src/util/get-locale-header.d.ts.map +1 -0
- package/dist/src/util/get-locale-header.js +7 -0
- package/dist/src/util/medusa-error.d.ts +2 -0
- package/dist/src/util/medusa-error.d.ts.map +1 -0
- package/dist/src/util/medusa-error.js +18 -0
- package/dist/src/util/revalidate-cart.d.ts +2 -0
- package/dist/src/util/revalidate-cart.d.ts.map +1 -0
- package/dist/src/util/revalidate-cart.js +8 -0
- package/dist/src/util/sort-products.d.ts +3 -0
- package/dist/src/util/sort-products.d.ts.map +1 -0
- package/dist/src/util/sort-products.js +1 -0
- package/dist/src/util/store-client.d.ts +11 -0
- package/dist/src/util/store-client.d.ts.map +1 -0
- package/dist/src/util/store-client.js +75 -0
- package/package.json +115 -155
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
{
|
|
2
|
+
"logo": "/Logo.png",
|
|
3
|
+
"website-description": "Premium kids fashion for everyday wear and special occasions.",
|
|
4
|
+
"homepage-banner-array": [
|
|
5
|
+
{
|
|
6
|
+
"homepage-banner": {
|
|
7
|
+
"homepage-banner-image": "/newbanner.png",
|
|
8
|
+
"homepage-banner-title": "Premium Kids Shop",
|
|
9
|
+
"homepage-banner-subtitle": "Little Trends, Quality Kids Wear",
|
|
10
|
+
"homepage-banner-description": "Shop stylish kids wear for little ones and children of all years—from newborn up to 15 years.",
|
|
11
|
+
"homepage-banner-button-name": "Shop Kids Wear",
|
|
12
|
+
"homepage-banner-button-link": "/store"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"app-banner-array": [
|
|
17
|
+
{
|
|
18
|
+
"app-banner": {
|
|
19
|
+
"app-banner-image": "/appbanner.png",
|
|
20
|
+
"app-banner-title": "Premium Kids Shop",
|
|
21
|
+
"app-banner-subtitle": "Little Trends, Quality Kids Wear",
|
|
22
|
+
"app-banner-description": "Shop stylish kids wear for little ones and children of all years—from newborn up to 15 years.",
|
|
23
|
+
"app-banner-button-name": "Shop Kids Wear",
|
|
24
|
+
"app-banner-button-link": "/store"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"promo-bar": {
|
|
29
|
+
"promo-text": null,
|
|
30
|
+
"promo-code": null,
|
|
31
|
+
"promo-active": false
|
|
32
|
+
},
|
|
33
|
+
"contact-us": {
|
|
34
|
+
"contact-phone": "+1 000 000 0000",
|
|
35
|
+
"contact-email": "hello@yourstore.com",
|
|
36
|
+
"contact-address": "Your store address"
|
|
37
|
+
},
|
|
38
|
+
"social-links": [],
|
|
39
|
+
"faq-array": [],
|
|
40
|
+
"sections": {
|
|
41
|
+
"promoAnnouncements": {
|
|
42
|
+
"messages": [
|
|
43
|
+
"Free shipping on orders over a threshold",
|
|
44
|
+
"Worldwide shipping available",
|
|
45
|
+
"Selected products available with customisation",
|
|
46
|
+
"Need help choosing? Book a video call consultation"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"hero": {},
|
|
50
|
+
"categoryPills": {},
|
|
51
|
+
"newArrivals": {
|
|
52
|
+
"title": "New Arrivals",
|
|
53
|
+
"subtitle": "Fresh styles just landed",
|
|
54
|
+
"variant": "grid"
|
|
55
|
+
},
|
|
56
|
+
"newArrivalsClassic": {
|
|
57
|
+
"title": "New Arrivals",
|
|
58
|
+
"subtitle": "Fresh styles just landed",
|
|
59
|
+
"variant": "classic"
|
|
60
|
+
},
|
|
61
|
+
"promoCountdown": {
|
|
62
|
+
"code": "SAVE50",
|
|
63
|
+
"text": "Up to 50% off — shop your favourites before they're gone!",
|
|
64
|
+
"end-at": "2026-12-31T23:59:59.000Z",
|
|
65
|
+
"active": false,
|
|
66
|
+
"cta-label": "Shop Offers",
|
|
67
|
+
"cta-href": "/store"
|
|
68
|
+
},
|
|
69
|
+
"celebrityTrust": {
|
|
70
|
+
"title": "Trusted by Celebrities",
|
|
71
|
+
"text": "When the stars dress their little ones in our collections."
|
|
72
|
+
},
|
|
73
|
+
"luxeFavourites": {
|
|
74
|
+
"title": "Luxe Favourites"
|
|
75
|
+
},
|
|
76
|
+
"shopByCategory": {
|
|
77
|
+
"title": "Shop By Categories",
|
|
78
|
+
"description": "Browse by style and occasion"
|
|
79
|
+
},
|
|
80
|
+
"baptism": {
|
|
81
|
+
"title": "Baptism"
|
|
82
|
+
},
|
|
83
|
+
"baptismPicks": {
|
|
84
|
+
"title": "Baptism Picks",
|
|
85
|
+
"looks": []
|
|
86
|
+
},
|
|
87
|
+
"themeDresses": {
|
|
88
|
+
"title": "Theme",
|
|
89
|
+
"description": "Dress her in a dreamy theme outfit for her birthday celebration"
|
|
90
|
+
},
|
|
91
|
+
"brandMarquee": {
|
|
92
|
+
"text": "est. 2012"
|
|
93
|
+
},
|
|
94
|
+
"aboutBrand": {
|
|
95
|
+
"eyebrow": "Who We Are",
|
|
96
|
+
"title": "Discover what makes us different",
|
|
97
|
+
"description": "We offer stylish, comfortable, and high-quality clothing for children, crafted for everyday wear and special occasions.",
|
|
98
|
+
"readMoreHref": "/about",
|
|
99
|
+
"stats": [
|
|
100
|
+
{
|
|
101
|
+
"label": "Visit us in store",
|
|
102
|
+
"value": "Find a location"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"label": "Happy customers",
|
|
106
|
+
"value": "150k+"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"label": "Products",
|
|
110
|
+
"value": "3000+"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"testimonials": {
|
|
115
|
+
"title": "What Clients Talk About Us",
|
|
116
|
+
"description": "The Trust We've Earned",
|
|
117
|
+
"items": [
|
|
118
|
+
{
|
|
119
|
+
"text": "Amazing place if you are looking for a dress for ur little girl's special day.",
|
|
120
|
+
"name": "Greeshma thottippal shanmughan"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"text": "I frequently buy dresses for my baby from this store and I am extremely satisfied with the purchase.",
|
|
124
|
+
"name": "Priyanka Rajesh"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"instagramPosts": {
|
|
129
|
+
"title": "Follow Us on Instagram",
|
|
130
|
+
"handle": "yourbrand",
|
|
131
|
+
"profile-url": "https://www.instagram.com/yourbrand/",
|
|
132
|
+
"profile-image": "/Logo.png",
|
|
133
|
+
"posts": []
|
|
134
|
+
},
|
|
135
|
+
"brandPillars": {
|
|
136
|
+
"title": "This approach resulted in the beautiful structure",
|
|
137
|
+
"pillars": [
|
|
138
|
+
{
|
|
139
|
+
"title": "Your favorite kids destination",
|
|
140
|
+
"description": "Trendy, high-quality outfits for little ones.",
|
|
141
|
+
"image": "/features/store.jpg"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"features": {
|
|
146
|
+
"title": "Why shop with us",
|
|
147
|
+
"description": "Secure checkout, fast delivery, and easy exchanges",
|
|
148
|
+
"features": [
|
|
149
|
+
{
|
|
150
|
+
"name": "100% Secure",
|
|
151
|
+
"icon": "/secure.svg"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "Easy Exchanges",
|
|
155
|
+
"icon": "/exchnage.svg"
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"whyChooseUs": {
|
|
160
|
+
"title": "Why Choose Us?",
|
|
161
|
+
"features": [
|
|
162
|
+
{
|
|
163
|
+
"feature-name": "Premium Quality",
|
|
164
|
+
"feature-icon": "/icons/quality.svg"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"lovedByMoms": {
|
|
169
|
+
"title": "Loved by Moms",
|
|
170
|
+
"description": "Top-rated styles loved by parents and kids alike."
|
|
171
|
+
},
|
|
172
|
+
"shopByAge": {
|
|
173
|
+
"title": "Shop By Age"
|
|
174
|
+
},
|
|
175
|
+
"videoStories": {
|
|
176
|
+
"title": "Watch Stories & Reviews",
|
|
177
|
+
"video-urls": []
|
|
178
|
+
},
|
|
179
|
+
"blogPosts": {
|
|
180
|
+
"title": "Blog posts",
|
|
181
|
+
"posts": [
|
|
182
|
+
{
|
|
183
|
+
"title": "Which Theme Dress Matches Her Vibe?",
|
|
184
|
+
"href": "/blog/theme-dress-vibe",
|
|
185
|
+
"category": "Theme Dress",
|
|
186
|
+
"date": "May 24, 2026"
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AACA,OAAO,MAAiC,MAAM,kBAAkB,CAAA;AAShE,eAAO,MAAM,GAAG,QAId,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getLocaleHeader } from "./util/get-locale-header";
|
|
2
|
+
import Medusa from "@medusajs/js-sdk";
|
|
3
|
+
// Defaults to standard port for Medusa server
|
|
4
|
+
let MEDUSA_BACKEND_URL = "http://localhost:9000";
|
|
5
|
+
if (process.env.MEDUSA_BACKEND_URL) {
|
|
6
|
+
MEDUSA_BACKEND_URL = process.env.MEDUSA_BACKEND_URL;
|
|
7
|
+
}
|
|
8
|
+
export const sdk = new Medusa({
|
|
9
|
+
baseUrl: MEDUSA_BACKEND_URL,
|
|
10
|
+
debug: process.env.NODE_ENV === "development",
|
|
11
|
+
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
|
|
12
|
+
});
|
|
13
|
+
const originalFetch = sdk.client.fetch.bind(sdk.client);
|
|
14
|
+
sdk.client.fetch = async (input, init) => {
|
|
15
|
+
const headers = init?.headers ?? {};
|
|
16
|
+
let localeHeader;
|
|
17
|
+
try {
|
|
18
|
+
localeHeader = await getLocaleHeader();
|
|
19
|
+
headers["x-medusa-locale"] ??= localeHeader["x-medusa-locale"];
|
|
20
|
+
}
|
|
21
|
+
catch { }
|
|
22
|
+
const newHeaders = {
|
|
23
|
+
...localeHeader,
|
|
24
|
+
...headers,
|
|
25
|
+
};
|
|
26
|
+
init = {
|
|
27
|
+
...init,
|
|
28
|
+
headers: newHeaders,
|
|
29
|
+
};
|
|
30
|
+
return originalFetch(input, init);
|
|
31
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
export declare const getAuthHeaders: () => Promise<{
|
|
3
|
+
authorization: string;
|
|
4
|
+
} | {}>;
|
|
5
|
+
export declare const getGuestAuthHeaders: () => Promise<{
|
|
6
|
+
authorization: string;
|
|
7
|
+
} | {}>;
|
|
8
|
+
export declare const getCacheTag: (tag: string) => Promise<string>;
|
|
9
|
+
export declare const getCacheOptions: (tag: string) => Promise<{
|
|
10
|
+
tags: string[];
|
|
11
|
+
} | {}>;
|
|
12
|
+
export declare const setAuthToken: (token: string) => Promise<void>;
|
|
13
|
+
export declare const removeAuthToken: () => Promise<void>;
|
|
14
|
+
export declare const getCartId: () => Promise<string | undefined>;
|
|
15
|
+
export declare const setCartId: (cartId: string) => Promise<void>;
|
|
16
|
+
export declare const removeCartId: () => Promise<void>;
|
|
17
|
+
export declare const removeSyncLock: () => Promise<void>;
|
|
18
|
+
export declare const setHoldCartId: (cartId: string) => Promise<void>;
|
|
19
|
+
export declare const getHoldCartId: () => Promise<string | undefined>;
|
|
20
|
+
export declare const removeHoldCartId: () => Promise<void>;
|
|
21
|
+
export declare const setBuyNowCartId: (cartId: string) => Promise<void>;
|
|
22
|
+
export declare const removeBuyNowCartId: () => Promise<void>;
|
|
23
|
+
//# sourceMappingURL=cookies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookies.d.ts","sourceRoot":"","sources":["../../src/cookies.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAGpB,eAAO,MAAM,cAAc,QAAa,OAAO,CAC7C;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,GAAG,EAAE,CAc/B,CAAA;AAED,eAAO,MAAM,mBAAmB,QAAa,OAAO,CAClD;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,GAAG,EAAE,CAc/B,CAAA;AAED,eAAO,MAAM,WAAW,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,MAAM,CAa7D,CAAA;AAED,eAAO,MAAM,eAAe,GAC1B,KAAK,MAAM,KACV,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,EAAE,CAYjC,CAAA;AAED,eAAO,MAAM,YAAY,GAAU,OAAO,MAAM,kBAQ/C,CAAA;AAED,eAAO,MAAM,eAAe,qBAK3B,CAAA;AAED,eAAO,MAAM,SAAS,mCAsBrB,CAAA;AAED,eAAO,MAAM,SAAS,GAAU,QAAQ,MAAM,kBAQ7C,CAAA;AAED,eAAO,MAAM,YAAY,qBAKxB,CAAA;AAED,eAAO,MAAM,cAAc,qBAK1B,CAAA;AAED,eAAO,MAAM,aAAa,GAAU,QAAQ,MAAM,kBAQjD,CAAA;AAED,eAAO,MAAM,aAAa,mCAGzB,CAAA;AAED,eAAO,MAAM,gBAAgB,qBAK5B,CAAA;AAED,eAAO,MAAM,eAAe,GAAU,QAAQ,MAAM,kBAQnD,CAAA;AAED,eAAO,MAAM,kBAAkB,qBAK9B,CAAA"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { cookies as nextCookies, headers } from "next/headers";
|
|
3
|
+
export const getAuthHeaders = async () => {
|
|
4
|
+
try {
|
|
5
|
+
const cookies = await nextCookies();
|
|
6
|
+
const token = cookies.get("_medusa_jwt")?.value;
|
|
7
|
+
if (!token) {
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
10
|
+
return { authorization: `Bearer ${token}` };
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return {};
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export const getGuestAuthHeaders = async () => {
|
|
17
|
+
try {
|
|
18
|
+
const cookies = await nextCookies();
|
|
19
|
+
const token = cookies.get("_medusa_guest_jwt")?.value;
|
|
20
|
+
if (!token) {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
return { authorization: `Bearer ${token}` };
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export const getCacheTag = async (tag) => {
|
|
30
|
+
try {
|
|
31
|
+
const cookies = await nextCookies();
|
|
32
|
+
const cacheId = cookies.get("_medusa_cache_id")?.value;
|
|
33
|
+
if (!cacheId) {
|
|
34
|
+
return "";
|
|
35
|
+
}
|
|
36
|
+
return `${tag}-${cacheId}`;
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
return "";
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export const getCacheOptions = async (tag) => {
|
|
43
|
+
if (typeof window !== "undefined") {
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
const cacheTag = await getCacheTag(tag);
|
|
47
|
+
if (!cacheTag) {
|
|
48
|
+
return {};
|
|
49
|
+
}
|
|
50
|
+
return { tags: [`${cacheTag}`] };
|
|
51
|
+
};
|
|
52
|
+
export const setAuthToken = async (token) => {
|
|
53
|
+
const cookies = await nextCookies();
|
|
54
|
+
cookies.set("_medusa_jwt", token, {
|
|
55
|
+
maxAge: 60 * 60 * 24 * 7,
|
|
56
|
+
httpOnly: true,
|
|
57
|
+
sameSite: "strict",
|
|
58
|
+
secure: process.env.NODE_ENV === "production",
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
export const removeAuthToken = async () => {
|
|
62
|
+
const cookies = await nextCookies();
|
|
63
|
+
cookies.set("_medusa_jwt", "", {
|
|
64
|
+
maxAge: -1,
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
export const getCartId = async () => {
|
|
68
|
+
const cookies = await nextCookies();
|
|
69
|
+
const headerList = await headers();
|
|
70
|
+
// Check for x-cart-id header FIRST (as it's the most up-to-date from middleware)
|
|
71
|
+
const headerId = headerList.get("x-cart-id");
|
|
72
|
+
if (headerId) {
|
|
73
|
+
return headerId;
|
|
74
|
+
}
|
|
75
|
+
// Prioritize buy_now_cart_id if it exists
|
|
76
|
+
const buyNowId = cookies.get("buy_now_cart_id")?.value;
|
|
77
|
+
if (buyNowId) {
|
|
78
|
+
return buyNowId;
|
|
79
|
+
}
|
|
80
|
+
// Fallback to regular cart cookies
|
|
81
|
+
const id = cookies.get("_medusa_cart_id")?.value ||
|
|
82
|
+
cookies.get("cart_id")?.value ||
|
|
83
|
+
cookies.get("medusa_cart_id")?.value;
|
|
84
|
+
return id;
|
|
85
|
+
};
|
|
86
|
+
export const setCartId = async (cartId) => {
|
|
87
|
+
const cookies = await nextCookies();
|
|
88
|
+
cookies.set("_medusa_cart_id", cartId, {
|
|
89
|
+
maxAge: 60 * 60 * 24 * 7,
|
|
90
|
+
httpOnly: true,
|
|
91
|
+
sameSite: "strict",
|
|
92
|
+
secure: process.env.NODE_ENV === "production",
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
export const removeCartId = async () => {
|
|
96
|
+
const cookies = await nextCookies();
|
|
97
|
+
cookies.set("_medusa_cart_id", "", {
|
|
98
|
+
maxAge: -1,
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
export const removeSyncLock = async () => {
|
|
102
|
+
const cookies = await nextCookies();
|
|
103
|
+
cookies.set("_medusa_cart_synced", "", {
|
|
104
|
+
maxAge: -1,
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
export const setHoldCartId = async (cartId) => {
|
|
108
|
+
const cookies = await nextCookies();
|
|
109
|
+
cookies.set("_medusa_hold_cart_id", cartId, {
|
|
110
|
+
maxAge: 60 * 60 * 24,
|
|
111
|
+
httpOnly: true,
|
|
112
|
+
sameSite: "strict",
|
|
113
|
+
secure: process.env.NODE_ENV === "production",
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
export const getHoldCartId = async () => {
|
|
117
|
+
const cookies = await nextCookies();
|
|
118
|
+
return cookies.get("_medusa_hold_cart_id")?.value;
|
|
119
|
+
};
|
|
120
|
+
export const removeHoldCartId = async () => {
|
|
121
|
+
const cookies = await nextCookies();
|
|
122
|
+
cookies.set("_medusa_hold_cart_id", "", {
|
|
123
|
+
maxAge: -1,
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
export const setBuyNowCartId = async (cartId) => {
|
|
127
|
+
const cookies = await nextCookies();
|
|
128
|
+
cookies.set("buy_now_cart_id", cartId, {
|
|
129
|
+
maxAge: 60 * 60 * 24 * 7,
|
|
130
|
+
httpOnly: true,
|
|
131
|
+
sameSite: "strict",
|
|
132
|
+
secure: process.env.NODE_ENV === "production",
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
export const removeBuyNowCartId = async () => {
|
|
136
|
+
const cookies = await nextCookies();
|
|
137
|
+
cookies.set("buy_now_cart_id", "", {
|
|
138
|
+
maxAge: -1,
|
|
139
|
+
});
|
|
140
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storefront dynamic-config admin schemas for `medusa-plugin-dynamic-config`.
|
|
3
|
+
* Import in the Medusa backend and pass to `options.configs`.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { storefrontDynamicConfig } from "medusa-storefront-data/dynamic-config-schema"
|
|
8
|
+
* import { promoAnnouncementsHomepageSectionField } from "medusa-storefront-data/dynamic-config-schema/sections/promoAnnouncements"
|
|
9
|
+
*
|
|
10
|
+
* export const dynamicConfig = {
|
|
11
|
+
* ...storefrontDynamicConfig,
|
|
12
|
+
* "homepage-sections": {
|
|
13
|
+
* ...storefrontDynamicConfig["homepage-sections"],
|
|
14
|
+
* structure: [
|
|
15
|
+
* promoAnnouncementsHomepageSectionField,
|
|
16
|
+
* // …other sections you enable
|
|
17
|
+
* ],
|
|
18
|
+
* },
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
import type { HomepageConfig } from "../server/homepage-config.types";
|
|
23
|
+
import type { DynamicConfigStructureField } from "./shared";
|
|
24
|
+
export * from "./shared";
|
|
25
|
+
export * from "./site-configs";
|
|
26
|
+
export * from "./sections";
|
|
27
|
+
/** All homepage section fields for the `homepage-sections` admin tab. */
|
|
28
|
+
export declare const homepageSectionsStructure: DynamicConfigStructureField[];
|
|
29
|
+
export type StorefrontDynamicConfigEntry = {
|
|
30
|
+
id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
active: boolean;
|
|
33
|
+
structure: DynamicConfigStructureField[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Plugin `options.configs` — one admin tab per key (matches split storefront API keys).
|
|
37
|
+
*/
|
|
38
|
+
export declare const storefrontDynamicConfig: {
|
|
39
|
+
readonly "site-branding": {
|
|
40
|
+
readonly id: "site-branding";
|
|
41
|
+
readonly title: "Site & branding";
|
|
42
|
+
readonly active: true;
|
|
43
|
+
readonly structure: DynamicConfigStructureField[];
|
|
44
|
+
};
|
|
45
|
+
readonly contact: {
|
|
46
|
+
readonly id: "contact";
|
|
47
|
+
readonly title: "Contact";
|
|
48
|
+
readonly active: true;
|
|
49
|
+
readonly structure: DynamicConfigStructureField[];
|
|
50
|
+
};
|
|
51
|
+
readonly "social-links": {
|
|
52
|
+
readonly id: "social-links";
|
|
53
|
+
readonly title: "Social links";
|
|
54
|
+
readonly active: true;
|
|
55
|
+
readonly structure: DynamicConfigStructureField[];
|
|
56
|
+
};
|
|
57
|
+
readonly faqs: {
|
|
58
|
+
readonly id: "faqs";
|
|
59
|
+
readonly title: "FAQs";
|
|
60
|
+
readonly active: true;
|
|
61
|
+
readonly structure: DynamicConfigStructureField[];
|
|
62
|
+
};
|
|
63
|
+
readonly "hero-banners": {
|
|
64
|
+
readonly id: "hero-banners";
|
|
65
|
+
readonly title: "Hero banners";
|
|
66
|
+
readonly active: true;
|
|
67
|
+
readonly structure: DynamicConfigStructureField[];
|
|
68
|
+
};
|
|
69
|
+
readonly "homepage-sections": {
|
|
70
|
+
readonly id: "homepage-sections";
|
|
71
|
+
readonly title: "Homepage sections";
|
|
72
|
+
readonly active: true;
|
|
73
|
+
readonly structure: DynamicConfigStructureField[];
|
|
74
|
+
};
|
|
75
|
+
readonly "promo-bar": {
|
|
76
|
+
readonly id: "promo-bar";
|
|
77
|
+
readonly title: "Promo bar";
|
|
78
|
+
readonly active: true;
|
|
79
|
+
readonly structure: DynamicConfigStructureField[];
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export type StorefrontDynamicConfigShape = {
|
|
83
|
+
site?: {
|
|
84
|
+
logo?: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
contact?: Record<string, unknown>;
|
|
87
|
+
social?: unknown[];
|
|
88
|
+
faqs?: unknown[];
|
|
89
|
+
};
|
|
90
|
+
banners?: Record<string, unknown>;
|
|
91
|
+
sections?: Record<string, unknown>;
|
|
92
|
+
promoBar?: Record<string, unknown>;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Merges split `GET /store/dynamic-config` keys into simplified shape
|
|
96
|
+
* consumed by `normalizeHomepageConfig` / `homepageConfigFromDynamicResponse`.
|
|
97
|
+
*/
|
|
98
|
+
export declare function mergeStorefrontDynamicConfig(dynamicConfigResponse: Record<string, unknown>): StorefrontDynamicConfigShape;
|
|
99
|
+
/**
|
|
100
|
+
* Builds legacy `homepage-config` for existing storefront parsers.
|
|
101
|
+
*/
|
|
102
|
+
export declare function homepageConfigFromSplitDynamicConfig(dynamicConfigResponse: Record<string, unknown>): HomepageConfig;
|
|
103
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dynamic-config-schema/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AASrE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AA2B3D,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAE1B,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,EAAE,2BAA2B,EAwBlE,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,2BAA2B,EAAE,CAAA;CACzC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C6B,CAAA;AAEjE,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QACjC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;QAClB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAA;KACjB,CAAA;IACD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC,CAAA;AAaD;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7C,4BAA4B,CA+B9B;AAED;;GAEG;AACH,wBAAgB,oCAAoC,CAClD,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7C,cAAc,CAiChB"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storefront dynamic-config admin schemas for `medusa-plugin-dynamic-config`.
|
|
3
|
+
* Import in the Medusa backend and pass to `options.configs`.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { storefrontDynamicConfig } from "medusa-storefront-data/dynamic-config-schema"
|
|
8
|
+
* import { promoAnnouncementsHomepageSectionField } from "medusa-storefront-data/dynamic-config-schema/sections/promoAnnouncements"
|
|
9
|
+
*
|
|
10
|
+
* export const dynamicConfig = {
|
|
11
|
+
* ...storefrontDynamicConfig,
|
|
12
|
+
* "homepage-sections": {
|
|
13
|
+
* ...storefrontDynamicConfig["homepage-sections"],
|
|
14
|
+
* structure: [
|
|
15
|
+
* promoAnnouncementsHomepageSectionField,
|
|
16
|
+
* // …other sections you enable
|
|
17
|
+
* ],
|
|
18
|
+
* },
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
import { contactStructure, faqsStructure, heroBannersStructure, promoBarStructure, siteBrandingStructure, socialLinksStructure, } from "./site-configs";
|
|
23
|
+
import { aboutBrandHomepageSectionField, baptismHomepageSectionField, baptismPicksHomepageSectionField, blogPostsHomepageSectionField, brandMarqueeHomepageSectionField, brandPillarsHomepageSectionField, categoryPillsHomepageSectionField, celebrityTrustHomepageSectionField, featuresHomepageSectionField, heroHomepageSectionField, instagramPostsHomepageSectionField, lovedByMomsHomepageSectionField, luxeFavouritesHomepageSectionField, newArrivalsClassicHomepageSectionField, newArrivalsHomepageSectionField, promoAnnouncementsHomepageSectionField, promoCountdownHomepageSectionField, shopByAgeHomepageSectionField, shopByCategoryHomepageSectionField, testimonialsHomepageSectionField, themeDressesHomepageSectionField, videoStoriesHomepageSectionField, whyChooseUsHomepageSectionField, } from "./sections";
|
|
24
|
+
export * from "./shared";
|
|
25
|
+
export * from "./site-configs";
|
|
26
|
+
export * from "./sections";
|
|
27
|
+
/** All homepage section fields for the `homepage-sections` admin tab. */
|
|
28
|
+
export const homepageSectionsStructure = [
|
|
29
|
+
promoAnnouncementsHomepageSectionField,
|
|
30
|
+
heroHomepageSectionField,
|
|
31
|
+
categoryPillsHomepageSectionField,
|
|
32
|
+
newArrivalsHomepageSectionField,
|
|
33
|
+
newArrivalsClassicHomepageSectionField,
|
|
34
|
+
promoCountdownHomepageSectionField,
|
|
35
|
+
celebrityTrustHomepageSectionField,
|
|
36
|
+
luxeFavouritesHomepageSectionField,
|
|
37
|
+
shopByCategoryHomepageSectionField,
|
|
38
|
+
baptismHomepageSectionField,
|
|
39
|
+
baptismPicksHomepageSectionField,
|
|
40
|
+
themeDressesHomepageSectionField,
|
|
41
|
+
brandMarqueeHomepageSectionField,
|
|
42
|
+
aboutBrandHomepageSectionField,
|
|
43
|
+
testimonialsHomepageSectionField,
|
|
44
|
+
brandPillarsHomepageSectionField,
|
|
45
|
+
instagramPostsHomepageSectionField,
|
|
46
|
+
featuresHomepageSectionField,
|
|
47
|
+
shopByAgeHomepageSectionField,
|
|
48
|
+
whyChooseUsHomepageSectionField,
|
|
49
|
+
lovedByMomsHomepageSectionField,
|
|
50
|
+
videoStoriesHomepageSectionField,
|
|
51
|
+
blogPostsHomepageSectionField,
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* Plugin `options.configs` — one admin tab per key (matches split storefront API keys).
|
|
55
|
+
*/
|
|
56
|
+
export const storefrontDynamicConfig = {
|
|
57
|
+
"site-branding": {
|
|
58
|
+
id: "site-branding",
|
|
59
|
+
title: "Site & branding",
|
|
60
|
+
active: true,
|
|
61
|
+
structure: siteBrandingStructure,
|
|
62
|
+
},
|
|
63
|
+
contact: {
|
|
64
|
+
id: "contact",
|
|
65
|
+
title: "Contact",
|
|
66
|
+
active: true,
|
|
67
|
+
structure: contactStructure,
|
|
68
|
+
},
|
|
69
|
+
"social-links": {
|
|
70
|
+
id: "social-links",
|
|
71
|
+
title: "Social links",
|
|
72
|
+
active: true,
|
|
73
|
+
structure: socialLinksStructure,
|
|
74
|
+
},
|
|
75
|
+
faqs: {
|
|
76
|
+
id: "faqs",
|
|
77
|
+
title: "FAQs",
|
|
78
|
+
active: true,
|
|
79
|
+
structure: faqsStructure,
|
|
80
|
+
},
|
|
81
|
+
"hero-banners": {
|
|
82
|
+
id: "hero-banners",
|
|
83
|
+
title: "Hero banners",
|
|
84
|
+
active: true,
|
|
85
|
+
structure: heroBannersStructure,
|
|
86
|
+
},
|
|
87
|
+
"homepage-sections": {
|
|
88
|
+
id: "homepage-sections",
|
|
89
|
+
title: "Homepage sections",
|
|
90
|
+
active: true,
|
|
91
|
+
structure: homepageSectionsStructure,
|
|
92
|
+
},
|
|
93
|
+
"promo-bar": {
|
|
94
|
+
id: "promo-bar",
|
|
95
|
+
title: "Promo bar",
|
|
96
|
+
active: true,
|
|
97
|
+
structure: promoBarStructure,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
function asRecord(value) {
|
|
101
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
function asArray(value) {
|
|
107
|
+
return Array.isArray(value) ? value : undefined;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Merges split `GET /store/dynamic-config` keys into simplified shape
|
|
111
|
+
* consumed by `normalizeHomepageConfig` / `homepageConfigFromDynamicResponse`.
|
|
112
|
+
*/
|
|
113
|
+
export function mergeStorefrontDynamicConfig(dynamicConfigResponse) {
|
|
114
|
+
const legacy = asRecord(dynamicConfigResponse["homepage-config"]);
|
|
115
|
+
if (legacy) {
|
|
116
|
+
return legacy;
|
|
117
|
+
}
|
|
118
|
+
const branding = asRecord(dynamicConfigResponse["site-branding"]);
|
|
119
|
+
const contact = asRecord(dynamicConfigResponse["contact"]);
|
|
120
|
+
const socialRoot = asRecord(dynamicConfigResponse["social-links"]);
|
|
121
|
+
const faqsRoot = asRecord(dynamicConfigResponse["faqs"]);
|
|
122
|
+
const promoBar = asRecord(dynamicConfigResponse["promo-bar"]);
|
|
123
|
+
const social = asArray(socialRoot?.links) ??
|
|
124
|
+
asArray(dynamicConfigResponse["social-links"]) ??
|
|
125
|
+
[];
|
|
126
|
+
const faqs = asArray(faqsRoot?.items) ?? asArray(dynamicConfigResponse["faqs"]) ?? [];
|
|
127
|
+
return {
|
|
128
|
+
site: {
|
|
129
|
+
...branding,
|
|
130
|
+
contact,
|
|
131
|
+
social,
|
|
132
|
+
faqs,
|
|
133
|
+
},
|
|
134
|
+
banners: asRecord(dynamicConfigResponse["hero-banners"]),
|
|
135
|
+
sections: asRecord(dynamicConfigResponse["homepage-sections"]),
|
|
136
|
+
promoBar,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Builds legacy `homepage-config` for existing storefront parsers.
|
|
141
|
+
*/
|
|
142
|
+
export function homepageConfigFromSplitDynamicConfig(dynamicConfigResponse) {
|
|
143
|
+
const merged = mergeStorefrontDynamicConfig(dynamicConfigResponse);
|
|
144
|
+
const site = asRecord(merged.site);
|
|
145
|
+
const banners = asRecord(merged.banners);
|
|
146
|
+
const sections = asRecord(merged.sections);
|
|
147
|
+
const promoBar = asRecord(merged.promoBar);
|
|
148
|
+
const config = {
|
|
149
|
+
logo: site?.logo,
|
|
150
|
+
"website-description": site?.description,
|
|
151
|
+
sections: sections,
|
|
152
|
+
};
|
|
153
|
+
if (banners?.desktop) {
|
|
154
|
+
config["homepage-banner-array"] = banners.desktop;
|
|
155
|
+
}
|
|
156
|
+
if (banners?.mobile) {
|
|
157
|
+
config["app-banner-array"] = banners.mobile;
|
|
158
|
+
}
|
|
159
|
+
if (site?.contact) {
|
|
160
|
+
config["contact-us"] = site.contact;
|
|
161
|
+
}
|
|
162
|
+
if (Array.isArray(site?.social) && site.social.length) {
|
|
163
|
+
config["social-links"] = site.social;
|
|
164
|
+
}
|
|
165
|
+
if (Array.isArray(site?.faqs) && site.faqs.length) {
|
|
166
|
+
config["faq-array"] = site.faqs;
|
|
167
|
+
}
|
|
168
|
+
if (promoBar) {
|
|
169
|
+
config["promo-bar"] = promoBar;
|
|
170
|
+
}
|
|
171
|
+
return config;
|
|
172
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type DynamicConfigStructureField } from "../shared";
|
|
2
|
+
export declare const aboutBrandSectionId: "aboutBrand";
|
|
3
|
+
export declare const aboutBrandDynamicConfigStructure: DynamicConfigStructureField[];
|
|
4
|
+
export declare const aboutBrandHomepageSectionField: DynamicConfigStructureField;
|
|
5
|
+
//# sourceMappingURL=about-brand.d.ts.map
|