medusa-storefront-data 2.3.0 → 2.5.1

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.
Files changed (369) hide show
  1. package/HOMEPAGE_CONFIG.md +133 -0
  2. package/dist/segment-data/default-page-input.json +191 -0
  3. package/dist/src/config.d.ts.map +1 -0
  4. package/dist/src/cookies.d.ts.map +1 -0
  5. package/dist/src/dynamic-config-schema/index.d.ts +103 -0
  6. package/dist/src/dynamic-config-schema/index.d.ts.map +1 -0
  7. package/dist/src/dynamic-config-schema/index.js +172 -0
  8. package/dist/src/dynamic-config-schema/sections/about-brand.d.ts +5 -0
  9. package/dist/src/dynamic-config-schema/sections/about-brand.d.ts.map +1 -0
  10. package/dist/src/dynamic-config-schema/sections/about-brand.js +30 -0
  11. package/dist/src/dynamic-config-schema/sections/baptism-picks.d.ts +5 -0
  12. package/dist/src/dynamic-config-schema/sections/baptism-picks.d.ts.map +1 -0
  13. package/dist/src/dynamic-config-schema/sections/baptism-picks.js +17 -0
  14. package/dist/src/dynamic-config-schema/sections/baptism.d.ts +5 -0
  15. package/dist/src/dynamic-config-schema/sections/baptism.d.ts.map +1 -0
  16. package/dist/src/dynamic-config-schema/sections/baptism.js +4 -0
  17. package/dist/src/dynamic-config-schema/sections/blog-posts.d.ts +5 -0
  18. package/dist/src/dynamic-config-schema/sections/blog-posts.d.ts.map +1 -0
  19. package/dist/src/dynamic-config-schema/sections/blog-posts.js +31 -0
  20. package/dist/src/dynamic-config-schema/sections/brand-marquee.d.ts +5 -0
  21. package/dist/src/dynamic-config-schema/sections/brand-marquee.d.ts.map +1 -0
  22. package/dist/src/dynamic-config-schema/sections/brand-marquee.js +9 -0
  23. package/dist/src/dynamic-config-schema/sections/brand-pillars.d.ts +5 -0
  24. package/dist/src/dynamic-config-schema/sections/brand-pillars.d.ts.map +1 -0
  25. package/dist/src/dynamic-config-schema/sections/brand-pillars.js +29 -0
  26. package/dist/src/dynamic-config-schema/sections/category-pills.d.ts +5 -0
  27. package/dist/src/dynamic-config-schema/sections/category-pills.d.ts.map +1 -0
  28. package/dist/src/dynamic-config-schema/sections/category-pills.js +4 -0
  29. package/dist/src/dynamic-config-schema/sections/celebrity-trust.d.ts +5 -0
  30. package/dist/src/dynamic-config-schema/sections/celebrity-trust.d.ts.map +1 -0
  31. package/dist/src/dynamic-config-schema/sections/celebrity-trust.js +4 -0
  32. package/dist/src/dynamic-config-schema/sections/features.d.ts +5 -0
  33. package/dist/src/dynamic-config-schema/sections/features.d.ts.map +1 -0
  34. package/dist/src/dynamic-config-schema/sections/features.js +12 -0
  35. package/dist/src/dynamic-config-schema/sections/hero.d.ts +6 -0
  36. package/dist/src/dynamic-config-schema/sections/hero.d.ts.map +1 -0
  37. package/dist/src/dynamic-config-schema/sections/hero.js +9 -0
  38. package/dist/src/dynamic-config-schema/sections/index.d.ts +24 -0
  39. package/dist/src/dynamic-config-schema/sections/index.d.ts.map +1 -0
  40. package/dist/src/dynamic-config-schema/sections/index.js +23 -0
  41. package/dist/src/dynamic-config-schema/sections/instagram-posts.d.ts +5 -0
  42. package/dist/src/dynamic-config-schema/sections/instagram-posts.d.ts.map +1 -0
  43. package/dist/src/dynamic-config-schema/sections/instagram-posts.js +30 -0
  44. package/dist/src/dynamic-config-schema/sections/loved-by-moms.d.ts +5 -0
  45. package/dist/src/dynamic-config-schema/sections/loved-by-moms.d.ts.map +1 -0
  46. package/dist/src/dynamic-config-schema/sections/loved-by-moms.js +4 -0
  47. package/dist/src/dynamic-config-schema/sections/luxe-favourites.d.ts +5 -0
  48. package/dist/src/dynamic-config-schema/sections/luxe-favourites.d.ts.map +1 -0
  49. package/dist/src/dynamic-config-schema/sections/luxe-favourites.js +4 -0
  50. package/dist/src/dynamic-config-schema/sections/new-arrivals-classic.d.ts +5 -0
  51. package/dist/src/dynamic-config-schema/sections/new-arrivals-classic.d.ts.map +1 -0
  52. package/dist/src/dynamic-config-schema/sections/new-arrivals-classic.js +12 -0
  53. package/dist/src/dynamic-config-schema/sections/new-arrivals.d.ts +5 -0
  54. package/dist/src/dynamic-config-schema/sections/new-arrivals.d.ts.map +1 -0
  55. package/dist/src/dynamic-config-schema/sections/new-arrivals.js +12 -0
  56. package/dist/src/dynamic-config-schema/sections/promo-announcements.d.ts +5 -0
  57. package/dist/src/dynamic-config-schema/sections/promo-announcements.d.ts.map +1 -0
  58. package/dist/src/dynamic-config-schema/sections/promo-announcements.js +16 -0
  59. package/dist/src/dynamic-config-schema/sections/promo-countdown.d.ts +5 -0
  60. package/dist/src/dynamic-config-schema/sections/promo-countdown.d.ts.map +1 -0
  61. package/dist/src/dynamic-config-schema/sections/promo-countdown.js +16 -0
  62. package/dist/src/dynamic-config-schema/sections/shop-by-age.d.ts +5 -0
  63. package/dist/src/dynamic-config-schema/sections/shop-by-age.d.ts.map +1 -0
  64. package/dist/src/dynamic-config-schema/sections/shop-by-age.js +4 -0
  65. package/dist/src/dynamic-config-schema/sections/shop-by-category.d.ts +5 -0
  66. package/dist/src/dynamic-config-schema/sections/shop-by-category.d.ts.map +1 -0
  67. package/dist/src/dynamic-config-schema/sections/shop-by-category.js +4 -0
  68. package/dist/src/dynamic-config-schema/sections/testimonials.d.ts +5 -0
  69. package/dist/src/dynamic-config-schema/sections/testimonials.d.ts.map +1 -0
  70. package/dist/src/dynamic-config-schema/sections/testimonials.js +9 -0
  71. package/dist/src/dynamic-config-schema/sections/theme-dresses.d.ts +5 -0
  72. package/dist/src/dynamic-config-schema/sections/theme-dresses.d.ts.map +1 -0
  73. package/dist/src/dynamic-config-schema/sections/theme-dresses.js +4 -0
  74. package/dist/src/dynamic-config-schema/sections/video-stories.d.ts +5 -0
  75. package/dist/src/dynamic-config-schema/sections/video-stories.d.ts.map +1 -0
  76. package/dist/src/dynamic-config-schema/sections/video-stories.js +24 -0
  77. package/dist/src/dynamic-config-schema/sections/why-choose-us.d.ts +5 -0
  78. package/dist/src/dynamic-config-schema/sections/why-choose-us.d.ts.map +1 -0
  79. package/dist/src/dynamic-config-schema/sections/why-choose-us.js +9 -0
  80. package/dist/src/dynamic-config-schema/shared.d.ts +35 -0
  81. package/dist/src/dynamic-config-schema/shared.d.ts.map +1 -0
  82. package/dist/src/dynamic-config-schema/shared.js +99 -0
  83. package/dist/src/dynamic-config-schema/site-configs.d.ts +11 -0
  84. package/dist/src/dynamic-config-schema/site-configs.d.ts.map +1 -0
  85. package/dist/src/dynamic-config-schema/site-configs.js +70 -0
  86. package/dist/src/edge.d.ts.map +1 -0
  87. package/dist/src/middleware.d.ts.map +1 -0
  88. package/dist/src/server/brand-pillars-from-categories.d.ts +8 -0
  89. package/dist/src/server/brand-pillars-from-categories.d.ts.map +1 -0
  90. package/dist/src/server/brand-pillars-from-categories.js +92 -0
  91. package/dist/src/server/cart.d.ts.map +1 -0
  92. package/dist/{server → src/server}/cart.js +20 -20
  93. package/dist/src/server/categories.d.ts.map +1 -0
  94. package/dist/src/server/collections.d.ts.map +1 -0
  95. package/dist/src/server/config-merge.d.ts +3 -0
  96. package/dist/src/server/config-merge.d.ts.map +1 -0
  97. package/dist/src/server/config-merge.js +31 -0
  98. package/dist/src/server/contact.d.ts.map +1 -0
  99. package/dist/src/server/customer-registration.d.ts.map +1 -0
  100. package/dist/src/server/customer.d.ts.map +1 -0
  101. package/dist/{server → src/server}/customer.js +11 -11
  102. package/dist/src/server/dynamic-config-api.d.ts +11 -0
  103. package/dist/src/server/dynamic-config-api.d.ts.map +1 -0
  104. package/dist/src/server/dynamic-config-api.js +46 -0
  105. package/dist/src/server/dynamic-config.d.ts +157 -0
  106. package/dist/src/server/dynamic-config.d.ts.map +1 -0
  107. package/dist/src/server/dynamic-config.js +573 -0
  108. package/dist/src/server/fulfillment.d.ts.map +1 -0
  109. package/dist/{server → src/server}/fulfillment.js +3 -3
  110. package/dist/src/server/guest.d.ts.map +1 -0
  111. package/dist/src/server/home-sections/about-brand.d.ts +9 -0
  112. package/dist/src/server/home-sections/about-brand.d.ts.map +1 -0
  113. package/dist/src/server/home-sections/about-brand.js +9 -0
  114. package/dist/src/server/home-sections/baptism-picks.d.ts +10 -0
  115. package/dist/src/server/home-sections/baptism-picks.d.ts.map +1 -0
  116. package/dist/src/server/home-sections/baptism-picks.js +27 -0
  117. package/dist/src/server/home-sections/baptism.d.ts +13 -0
  118. package/dist/src/server/home-sections/baptism.d.ts.map +1 -0
  119. package/dist/src/server/home-sections/baptism.js +43 -0
  120. package/dist/src/server/home-sections/blog-posts.d.ts +9 -0
  121. package/dist/src/server/home-sections/blog-posts.d.ts.map +1 -0
  122. package/dist/src/server/home-sections/blog-posts.js +9 -0
  123. package/dist/src/server/home-sections/brand-marquee.d.ts +8 -0
  124. package/dist/src/server/home-sections/brand-marquee.d.ts.map +1 -0
  125. package/dist/src/server/home-sections/brand-marquee.js +7 -0
  126. package/dist/src/server/home-sections/brand-pillars.d.ts +9 -0
  127. package/dist/src/server/home-sections/brand-pillars.d.ts.map +1 -0
  128. package/dist/src/server/home-sections/brand-pillars.js +9 -0
  129. package/dist/src/server/home-sections/category-pills.d.ts +9 -0
  130. package/dist/src/server/home-sections/category-pills.d.ts.map +1 -0
  131. package/dist/src/server/home-sections/category-pills.js +19 -0
  132. package/dist/src/server/home-sections/celebrity-trust.d.ts +12 -0
  133. package/dist/src/server/home-sections/celebrity-trust.d.ts.map +1 -0
  134. package/dist/src/server/home-sections/celebrity-trust.js +27 -0
  135. package/dist/src/server/home-sections/features.d.ts +9 -0
  136. package/dist/src/server/home-sections/features.d.ts.map +1 -0
  137. package/dist/src/server/home-sections/features.js +9 -0
  138. package/dist/src/server/home-sections/hero.d.ts +9 -0
  139. package/dist/src/server/home-sections/hero.d.ts.map +1 -0
  140. package/dist/src/server/home-sections/hero.js +9 -0
  141. package/dist/src/server/home-sections/instagram-posts.d.ts +9 -0
  142. package/dist/src/server/home-sections/instagram-posts.d.ts.map +1 -0
  143. package/dist/src/server/home-sections/instagram-posts.js +9 -0
  144. package/dist/src/server/home-sections/loved-by-moms.d.ts +12 -0
  145. package/dist/src/server/home-sections/loved-by-moms.d.ts.map +1 -0
  146. package/dist/src/server/home-sections/loved-by-moms.js +20 -0
  147. package/dist/src/server/home-sections/luxe-favourites.d.ts +11 -0
  148. package/dist/src/server/home-sections/luxe-favourites.d.ts.map +1 -0
  149. package/dist/src/server/home-sections/luxe-favourites.js +19 -0
  150. package/dist/src/server/home-sections/new-arrivals-classic.d.ts +8 -0
  151. package/dist/src/server/home-sections/new-arrivals-classic.d.ts.map +1 -0
  152. package/dist/src/server/home-sections/new-arrivals-classic.js +10 -0
  153. package/dist/src/server/home-sections/new-arrivals.d.ts +12 -0
  154. package/dist/src/server/home-sections/new-arrivals.d.ts.map +1 -0
  155. package/dist/src/server/home-sections/new-arrivals.js +28 -0
  156. package/dist/src/server/home-sections/promo-announcements.d.ts +7 -0
  157. package/dist/src/server/home-sections/promo-announcements.d.ts.map +1 -0
  158. package/dist/src/server/home-sections/promo-announcements.js +7 -0
  159. package/dist/src/server/home-sections/promo-countdown.d.ts +6 -0
  160. package/dist/src/server/home-sections/promo-countdown.d.ts.map +1 -0
  161. package/dist/src/server/home-sections/promo-countdown.js +5 -0
  162. package/dist/src/server/home-sections/shared.d.ts +10 -0
  163. package/dist/src/server/home-sections/shared.d.ts.map +1 -0
  164. package/dist/src/server/home-sections/shared.js +29 -0
  165. package/dist/src/server/home-sections/shop-by-age.d.ts +9 -0
  166. package/dist/src/server/home-sections/shop-by-age.d.ts.map +1 -0
  167. package/dist/src/server/home-sections/shop-by-age.js +17 -0
  168. package/dist/src/server/home-sections/shop-by-category.d.ts +10 -0
  169. package/dist/src/server/home-sections/shop-by-category.d.ts.map +1 -0
  170. package/dist/src/server/home-sections/shop-by-category.js +17 -0
  171. package/dist/src/server/home-sections/testimonials.d.ts +9 -0
  172. package/dist/src/server/home-sections/testimonials.d.ts.map +1 -0
  173. package/dist/src/server/home-sections/testimonials.js +9 -0
  174. package/dist/src/server/home-sections/theme-dresses.d.ts +12 -0
  175. package/dist/src/server/home-sections/theme-dresses.d.ts.map +1 -0
  176. package/dist/src/server/home-sections/theme-dresses.js +27 -0
  177. package/dist/src/server/home-sections/video-stories.d.ts +9 -0
  178. package/dist/src/server/home-sections/video-stories.d.ts.map +1 -0
  179. package/dist/src/server/home-sections/video-stories.js +9 -0
  180. package/dist/src/server/home-sections/why-choose-us.d.ts +9 -0
  181. package/dist/src/server/home-sections/why-choose-us.d.ts.map +1 -0
  182. package/dist/src/server/home-sections/why-choose-us.js +9 -0
  183. package/dist/{server → src/server}/home.d.ts +18 -9
  184. package/dist/src/server/home.d.ts.map +1 -0
  185. package/dist/src/server/home.js +1 -0
  186. package/dist/src/server/homepage-config.types.d.ts +274 -0
  187. package/dist/src/server/homepage-config.types.d.ts.map +1 -0
  188. package/dist/src/server/homepage-config.types.js +33 -0
  189. package/dist/{server → src/server}/homepage-section-defaults.d.ts +35 -2
  190. package/dist/src/server/homepage-section-defaults.d.ts.map +1 -0
  191. package/dist/{server → src/server}/homepage-section-defaults.js +41 -2
  192. package/dist/{server → src/server}/index.d.ts +2 -0
  193. package/dist/src/server/index.d.ts.map +1 -0
  194. package/dist/{server → src/server}/index.js +2 -0
  195. package/dist/src/server/locale-actions.d.ts.map +1 -0
  196. package/dist/src/server/locales.d.ts.map +1 -0
  197. package/dist/src/server/normalize-homepage-config.d.ts +7 -0
  198. package/dist/src/server/normalize-homepage-config.d.ts.map +1 -0
  199. package/dist/src/server/normalize-homepage-config.js +213 -0
  200. package/dist/src/server/notifications.d.ts.map +1 -0
  201. package/dist/src/server/onboarding.d.ts.map +1 -0
  202. package/dist/src/server/orders.d.ts.map +1 -0
  203. package/dist/{server → src/server}/orders.js +6 -6
  204. package/dist/src/server/page-input.d.ts +19 -0
  205. package/dist/src/server/page-input.d.ts.map +1 -0
  206. package/dist/src/server/page-input.js +42 -0
  207. package/dist/src/server/payment-details.d.ts.map +1 -0
  208. package/dist/{server → src/server}/payment-details.js +5 -5
  209. package/dist/src/server/payment.d.ts.map +1 -0
  210. package/dist/{server → src/server}/payment.js +2 -2
  211. package/dist/src/server/pincode.d.ts.map +1 -0
  212. package/dist/src/server/products.d.ts.map +1 -0
  213. package/dist/src/server/regions.d.ts.map +1 -0
  214. package/dist/{server → src/server}/regions.js +2 -2
  215. package/dist/src/server/resolve-home-segment-data.d.ts +25 -0
  216. package/dist/src/server/resolve-home-segment-data.d.ts.map +1 -0
  217. package/dist/src/server/resolve-home-segment-data.js +20 -0
  218. package/dist/src/server/returns.d.ts.map +1 -0
  219. package/dist/src/server/shoppable-looks.d.ts +17 -0
  220. package/dist/src/server/shoppable-looks.d.ts.map +1 -0
  221. package/dist/src/server/shoppable-looks.js +136 -0
  222. package/dist/src/server/swaps.d.ts.map +1 -0
  223. package/dist/src/server/variants.d.ts.map +1 -0
  224. package/dist/src/server/wishlist.d.ts.map +1 -0
  225. package/dist/src/util/get-locale-header.d.ts.map +1 -0
  226. package/dist/src/util/medusa-error.d.ts.map +1 -0
  227. package/dist/src/util/revalidate-cart.d.ts.map +1 -0
  228. package/dist/src/util/sort-products.d.ts.map +1 -0
  229. package/dist/{util → src/util}/store-client.d.ts +0 -2
  230. package/dist/src/util/store-client.d.ts.map +1 -0
  231. package/dist/{util → src/util}/store-client.js +0 -2
  232. package/homepage-config.example.json +209 -0
  233. package/homepage-sections.example.json +55 -0
  234. package/package.json +120 -156
  235. package/segment-data/default-page-input.json +191 -0
  236. package/src/server/brand-pillars-from-categories.ts +156 -0
  237. package/src/server/cart.ts +20 -20
  238. package/src/server/config-merge.ts +31 -0
  239. package/src/server/customer.ts +11 -11
  240. package/src/server/dynamic-config.ts +507 -566
  241. package/src/server/fulfillment.ts +3 -3
  242. package/src/server/home-sections/about-brand.ts +24 -0
  243. package/src/server/home-sections/baptism-picks.ts +46 -0
  244. package/src/server/home-sections/baptism.ts +64 -0
  245. package/src/server/home-sections/blog-posts.ts +23 -0
  246. package/src/server/home-sections/brand-marquee.ts +17 -0
  247. package/src/server/home-sections/brand-pillars.ts +23 -0
  248. package/src/server/home-sections/category-pills.ts +32 -0
  249. package/src/server/home-sections/celebrity-trust.ts +42 -0
  250. package/src/server/home-sections/features.ts +23 -0
  251. package/src/server/home-sections/hero.ts +24 -0
  252. package/src/server/home-sections/instagram-posts.ts +23 -0
  253. package/src/server/home-sections/loved-by-moms.ts +34 -0
  254. package/src/server/home-sections/luxe-favourites.ts +30 -0
  255. package/src/server/home-sections/new-arrivals-classic.ts +21 -0
  256. package/src/server/home-sections/new-arrivals.ts +47 -0
  257. package/src/server/home-sections/promo-announcements.ts +17 -0
  258. package/src/server/home-sections/promo-countdown.ts +15 -0
  259. package/src/server/home-sections/shared.ts +44 -0
  260. package/src/server/home-sections/shop-by-age.ts +26 -0
  261. package/src/server/home-sections/shop-by-category.ts +28 -0
  262. package/src/server/home-sections/testimonials.ts +23 -0
  263. package/src/server/home-sections/theme-dresses.ts +49 -0
  264. package/src/server/home-sections/video-stories.ts +23 -0
  265. package/src/server/home-sections/why-choose-us.ts +23 -0
  266. package/src/server/home.ts +46 -207
  267. package/src/server/homepage-config.types.ts +335 -0
  268. package/src/server/homepage-section-defaults.ts +41 -2
  269. package/src/server/index.ts +2 -0
  270. package/src/server/normalize-homepage-config.ts +240 -0
  271. package/src/server/orders.ts +6 -6
  272. package/src/server/page-input.ts +66 -0
  273. package/src/server/payment-details.ts +5 -5
  274. package/src/server/payment.ts +2 -2
  275. package/src/server/regions.ts +2 -2
  276. package/src/server/resolve-home-segment-data.ts +63 -0
  277. package/src/server/shoppable-looks.ts +178 -0
  278. package/src/util/store-client.ts +0 -3
  279. package/dist/config.d.ts.map +0 -1
  280. package/dist/cookies.d.ts.map +0 -1
  281. package/dist/edge.d.ts.map +0 -1
  282. package/dist/middleware.d.ts.map +0 -1
  283. package/dist/server/cart.d.ts.map +0 -1
  284. package/dist/server/categories.d.ts.map +0 -1
  285. package/dist/server/collections.d.ts.map +0 -1
  286. package/dist/server/contact.d.ts.map +0 -1
  287. package/dist/server/customer-registration.d.ts.map +0 -1
  288. package/dist/server/customer.d.ts.map +0 -1
  289. package/dist/server/dynamic-config.d.ts +0 -202
  290. package/dist/server/dynamic-config.d.ts.map +0 -1
  291. package/dist/server/dynamic-config.js +0 -675
  292. package/dist/server/fulfillment.d.ts.map +0 -1
  293. package/dist/server/guest.d.ts.map +0 -1
  294. package/dist/server/home.d.ts.map +0 -1
  295. package/dist/server/home.js +0 -124
  296. package/dist/server/homepage-section-defaults.d.ts.map +0 -1
  297. package/dist/server/index.d.ts.map +0 -1
  298. package/dist/server/locale-actions.d.ts.map +0 -1
  299. package/dist/server/locales.d.ts.map +0 -1
  300. package/dist/server/notifications.d.ts.map +0 -1
  301. package/dist/server/onboarding.d.ts.map +0 -1
  302. package/dist/server/orders.d.ts.map +0 -1
  303. package/dist/server/payment-details.d.ts.map +0 -1
  304. package/dist/server/payment.d.ts.map +0 -1
  305. package/dist/server/pincode.d.ts.map +0 -1
  306. package/dist/server/products.d.ts.map +0 -1
  307. package/dist/server/regions.d.ts.map +0 -1
  308. package/dist/server/returns.d.ts.map +0 -1
  309. package/dist/server/swaps.d.ts.map +0 -1
  310. package/dist/server/variants.d.ts.map +0 -1
  311. package/dist/server/wishlist.d.ts.map +0 -1
  312. package/dist/util/get-locale-header.d.ts.map +0 -1
  313. package/dist/util/medusa-error.d.ts.map +0 -1
  314. package/dist/util/revalidate-cart.d.ts.map +0 -1
  315. package/dist/util/sort-products.d.ts.map +0 -1
  316. package/dist/util/store-client.d.ts.map +0 -1
  317. /package/dist/{config.d.ts → src/config.d.ts} +0 -0
  318. /package/dist/{config.js → src/config.js} +0 -0
  319. /package/dist/{cookies.d.ts → src/cookies.d.ts} +0 -0
  320. /package/dist/{cookies.js → src/cookies.js} +0 -0
  321. /package/dist/{edge.d.ts → src/edge.d.ts} +0 -0
  322. /package/dist/{edge.js → src/edge.js} +0 -0
  323. /package/dist/{middleware.d.ts → src/middleware.d.ts} +0 -0
  324. /package/dist/{middleware.js → src/middleware.js} +0 -0
  325. /package/dist/{server → src/server}/cart.d.ts +0 -0
  326. /package/dist/{server → src/server}/categories.d.ts +0 -0
  327. /package/dist/{server → src/server}/categories.js +0 -0
  328. /package/dist/{server → src/server}/collections.d.ts +0 -0
  329. /package/dist/{server → src/server}/collections.js +0 -0
  330. /package/dist/{server → src/server}/contact.d.ts +0 -0
  331. /package/dist/{server → src/server}/contact.js +0 -0
  332. /package/dist/{server → src/server}/customer-registration.d.ts +0 -0
  333. /package/dist/{server → src/server}/customer-registration.js +0 -0
  334. /package/dist/{server → src/server}/customer.d.ts +0 -0
  335. /package/dist/{server → src/server}/fulfillment.d.ts +0 -0
  336. /package/dist/{server → src/server}/guest.d.ts +0 -0
  337. /package/dist/{server → src/server}/guest.js +0 -0
  338. /package/dist/{server → src/server}/locale-actions.d.ts +0 -0
  339. /package/dist/{server → src/server}/locale-actions.js +0 -0
  340. /package/dist/{server → src/server}/locales.d.ts +0 -0
  341. /package/dist/{server → src/server}/locales.js +0 -0
  342. /package/dist/{server → src/server}/notifications.d.ts +0 -0
  343. /package/dist/{server → src/server}/notifications.js +0 -0
  344. /package/dist/{server → src/server}/onboarding.d.ts +0 -0
  345. /package/dist/{server → src/server}/onboarding.js +0 -0
  346. /package/dist/{server → src/server}/orders.d.ts +0 -0
  347. /package/dist/{server → src/server}/payment-details.d.ts +0 -0
  348. /package/dist/{server → src/server}/payment.d.ts +0 -0
  349. /package/dist/{server → src/server}/pincode.d.ts +0 -0
  350. /package/dist/{server → src/server}/pincode.js +0 -0
  351. /package/dist/{server → src/server}/products.d.ts +0 -0
  352. /package/dist/{server → src/server}/products.js +0 -0
  353. /package/dist/{server → src/server}/regions.d.ts +0 -0
  354. /package/dist/{server → src/server}/returns.d.ts +0 -0
  355. /package/dist/{server → src/server}/returns.js +0 -0
  356. /package/dist/{server → src/server}/swaps.d.ts +0 -0
  357. /package/dist/{server → src/server}/swaps.js +0 -0
  358. /package/dist/{server → src/server}/variants.d.ts +0 -0
  359. /package/dist/{server → src/server}/variants.js +0 -0
  360. /package/dist/{server → src/server}/wishlist.d.ts +0 -0
  361. /package/dist/{server → src/server}/wishlist.js +0 -0
  362. /package/dist/{util → src/util}/get-locale-header.d.ts +0 -0
  363. /package/dist/{util → src/util}/get-locale-header.js +0 -0
  364. /package/dist/{util → src/util}/medusa-error.d.ts +0 -0
  365. /package/dist/{util → src/util}/medusa-error.js +0 -0
  366. /package/dist/{util → src/util}/revalidate-cart.d.ts +0 -0
  367. /package/dist/{util → src/util}/revalidate-cart.js +0 -0
  368. /package/dist/{util → src/util}/sort-products.d.ts +0 -0
  369. /package/dist/{util → src/util}/sort-products.js +0 -0
@@ -55,7 +55,7 @@ import {
55
55
  medusaCustomerUpdateAddress,
56
56
  } from "medusa-services/customer"
57
57
  import { medusaPaymentSessionInitiate } from "medusa-services/payment"
58
- import { getStoreCartClientOptions } from "../util/store-client"
58
+ import { getStoreClientOptions } from "../util/store-client"
59
59
  import { revalidateCartTags } from "../util/revalidate-cart"
60
60
 
61
61
  import { cache } from "react"
@@ -86,7 +86,7 @@ export const retrieveCart = cache(
86
86
 
87
87
  // Skip metadata check if we are clearly in checkout to avoid extra API call
88
88
  if (!pathname.includes("/checkout")) {
89
- const options = await getStoreCartClientOptions()
89
+ const options = await getStoreClientOptions()
90
90
  const currentCart = await medusaCartRetrieve(id, options, { fields: "metadata" })
91
91
  .then(({ cart }) => cart)
92
92
  .catch(() => null)
@@ -143,7 +143,7 @@ export async function getOrSetCart(countryCode: string) {
143
143
  }
144
144
 
145
145
  let cart = await retrieveCart(undefined, "id,region_id")
146
- const options = await getStoreCartClientOptions()
146
+ const options = await getStoreClientOptions()
147
147
 
148
148
  if (!cart) {
149
149
  const locale = await getLocale()
@@ -176,7 +176,7 @@ export async function updateCart(data: HttpTypes.StoreUpdateCart) {
176
176
  }
177
177
 
178
178
  try {
179
- const options = await getStoreCartClientOptions()
179
+ const options = await getStoreClientOptions()
180
180
  const { cart } = await medusaCartUpdate(cartId, data as Record<string, unknown>, options)
181
181
  await revalidateCartTags()
182
182
  return cart as unknown as HttpTypes.StoreCart
@@ -205,7 +205,7 @@ export async function addToCart({
205
205
  }
206
206
 
207
207
  try {
208
- const options = await getStoreCartClientOptions()
208
+ const options = await getStoreClientOptions()
209
209
  await medusaCartAddLineItem(cart.id, { variant_id: variantId, quantity }, options)
210
210
  await revalidateCartTags()
211
211
  } catch (e) {
@@ -232,7 +232,7 @@ export async function buyNow({
232
232
  throw new Error(`Region not found for country code: ${countryCode}`)
233
233
  }
234
234
 
235
- const options = await getStoreCartClientOptions()
235
+ const options = await getStoreClientOptions()
236
236
  const locale = await getLocale()
237
237
 
238
238
  // 1. Create a NEW cart regardless of existing one
@@ -343,7 +343,7 @@ export async function updateLineItem({
343
343
  }
344
344
 
345
345
  try {
346
- const options = await getStoreCartClientOptions()
346
+ const options = await getStoreClientOptions()
347
347
  await medusaCartUpdateLineItem(cartId, lineId, { quantity }, options)
348
348
  await revalidateCartTags()
349
349
  } catch (e) {
@@ -363,7 +363,7 @@ export async function deleteLineItem(lineId: string) {
363
363
  }
364
364
 
365
365
  try {
366
- const options = await getStoreCartClientOptions()
366
+ const options = await getStoreClientOptions()
367
367
  await medusaCartRemoveLineItem(cartId, lineId, options)
368
368
  await revalidateCartTags()
369
369
  } catch (e) {
@@ -409,7 +409,7 @@ export async function setShippingMethod({
409
409
  shippingMethodId: string
410
410
  }) {
411
411
  try {
412
- const options = await getStoreCartClientOptions()
412
+ const options = await getStoreClientOptions()
413
413
  await medusaCartAddShippingMethod(cartId, shippingMethodId, options)
414
414
  const cartCacheTag = await getCacheTag("carts")
415
415
  revalidateTag(cartCacheTag)
@@ -429,7 +429,7 @@ export async function setShippingMethodSilently({
429
429
  shippingMethodId: string
430
430
  }) {
431
431
  try {
432
- const options = await getStoreCartClientOptions()
432
+ const options = await getStoreClientOptions()
433
433
  await medusaCartAddShippingMethod(cartId, shippingMethodId, options)
434
434
  return { success: true }
435
435
  } catch (e) {
@@ -490,13 +490,13 @@ export async function initiatePaymentSession(
490
490
  }
491
491
 
492
492
  if (Object.keys(addressUpdates).length > 0) {
493
- const options = await getStoreCartClientOptions()
493
+ const options = await getStoreClientOptions()
494
494
  await medusaCartUpdate(latestCart.id, addressUpdates, options)
495
495
  }
496
496
  }
497
497
 
498
498
  // 3. Final re-fetch (direct call to bypass any lib-level cache)
499
- const options = await getStoreCartClientOptions()
499
+ const options = await getStoreClientOptions()
500
500
  const { cart: finalCartRaw } = await medusaCartRetrieve(cart.id, options, {
501
501
  fields: "*shipping_address,*billing_address",
502
502
  })
@@ -552,7 +552,7 @@ export async function applyPromotions(codes: string[]) {
552
552
  }
553
553
 
554
554
  try {
555
- const options = await getStoreCartClientOptions()
555
+ const options = await getStoreClientOptions()
556
556
  const { cart } = await medusaCartApplyPromotions(cartId, codes, options)
557
557
  await revalidateCartTags()
558
558
  return cart as unknown as HttpTypes.StoreCart
@@ -668,7 +668,7 @@ export async function setAddresses(currentState: unknown, formData: FormData) {
668
668
  const authHeaders = await getAuthHeaders()
669
669
  if (authHeaders && "authorization" in authHeaders) {
670
670
  try {
671
- const options = await getStoreCartClientOptions()
671
+ const options = await getStoreClientOptions()
672
672
  const { customer } = await medusaCustomerRetrieve(options, { fields: "*addresses" })
673
673
 
674
674
  const addressExists = customer?.addresses?.some((a: any) =>
@@ -731,7 +731,7 @@ export async function placeOrder(cartId?: string) {
731
731
 
732
732
  let cartRes
733
733
  try {
734
- const options = await getStoreCartClientOptions()
734
+ const options = await getStoreClientOptions()
735
735
  cartRes = await medusaCartComplete(id, options)
736
736
  const cartCacheTag = await getCacheTag("carts")
737
737
  revalidateTag(cartCacheTag)
@@ -840,7 +840,7 @@ export async function addCustomerAddressToCart(currentState: unknown, formData:
840
840
  // 1. Add/Update Customer Address Book
841
841
  // We try/catch this separately so if it fails (e.g. user not logged in), we still try to proceed with checkout
842
842
  try {
843
- const options = await getStoreCartClientOptions()
843
+ const options = await getStoreClientOptions()
844
844
  if (addressId) {
845
845
  await medusaCustomerUpdateAddress(addressId, addressData, options)
846
846
  } else {
@@ -916,7 +916,7 @@ export async function updateAddressSilently(data: any) {
916
916
  }
917
917
  }
918
918
 
919
- const options = await getStoreCartClientOptions()
919
+ const options = await getStoreClientOptions()
920
920
  await medusaCartUpdate(cartId, payload, options)
921
921
 
922
922
  // Revalidate tags to ensure CartTotals gets new shipping info
@@ -935,7 +935,7 @@ export async function updateCartMetadataSilently(metadata: any) {
935
935
  if (!cartId) return
936
936
 
937
937
  try {
938
- const options = await getStoreCartClientOptions()
938
+ const options = await getStoreClientOptions()
939
939
  await medusaCartUpdate(cartId, { metadata }, options)
940
940
  // We intentionally DO NOT call revalidateTag here to prevent page refresh loops
941
941
  return { success: true }
@@ -953,7 +953,7 @@ export async function getAbandonedCarts() {
953
953
  }
954
954
 
955
955
  try {
956
- const options = await getStoreCartClientOptions()
956
+ const options = await getStoreClientOptions()
957
957
  const res = await medusaCartList(options, {
958
958
  fields: "*items, *items.product, *items.product.thumbnail, *items.variant, *items.metadata, +total",
959
959
  }).catch(() => null)
@@ -989,7 +989,7 @@ export async function resumeAbandonedCart(cartId: string, countryCode: string) {
989
989
 
990
990
  export async function deleteCart(cartId: string) {
991
991
  try {
992
- const options = await getStoreCartClientOptions()
992
+ const options = await getStoreClientOptions()
993
993
  await medusaCartDelete(cartId, options)
994
994
 
995
995
  revalidateTag("carts")
@@ -0,0 +1,31 @@
1
+ /** Merge CMS section block onto package defaults (override wins when set). */
2
+ export function mergeSectionBlock(
3
+ defaults: Record<string, unknown>,
4
+ override: Record<string, unknown> | null
5
+ ): Record<string, unknown> {
6
+ if (!override) return { ...defaults }
7
+ const merged = { ...defaults }
8
+ for (const [key, value] of Object.entries(override)) {
9
+ if (value === undefined || value === null) continue
10
+ if (Array.isArray(value)) {
11
+ if (value.length > 0) merged[key] = value
12
+ continue
13
+ }
14
+ if (typeof value === "string") {
15
+ if (value.trim()) merged[key] = value.trim()
16
+ continue
17
+ }
18
+ if (typeof value === "boolean" || typeof value === "number") {
19
+ merged[key] = value
20
+ continue
21
+ }
22
+ if (typeof value === "object") {
23
+ const base =
24
+ merged[key] && typeof merged[key] === "object" && !Array.isArray(merged[key])
25
+ ? (merged[key] as Record<string, unknown>)
26
+ : {}
27
+ merged[key] = mergeSectionBlock(base, value as Record<string, unknown>)
28
+ }
29
+ }
30
+ return merged
31
+ }
@@ -33,7 +33,7 @@ import { medusaCartMerge, medusaCartTransfer } from "medusa-services/cart"
33
33
  import {
34
34
  getAuthClientOptions,
35
35
  getMedusaBackendUrl,
36
- getStoreCartClientOptions,
36
+ getStoreClientOptions,
37
37
  } from "../util/store-client"
38
38
 
39
39
  import { cache } from "react"
@@ -52,7 +52,7 @@ export const retrieveCustomer = cache(
52
52
  if (!("authorization" in authHeaders)) return null
53
53
 
54
54
  try {
55
- const options = await getStoreCartClientOptions()
55
+ const options = await getStoreClientOptions()
56
56
  const { customer } = await medusaCustomerRetrieve(options, { fields: "*addresses" })
57
57
  return customer as unknown as HttpTypes.StoreCustomer
58
58
  } catch (error: unknown) {
@@ -68,7 +68,7 @@ export const retrieveCustomer = cache(
68
68
 
69
69
  export const updateCustomer = async (body: HttpTypes.StoreUpdateCustomer) => {
70
70
  try {
71
- const options = await getStoreCartClientOptions()
71
+ const options = await getStoreClientOptions()
72
72
  const { customer } = await medusaCustomerUpdate(body as Record<string, unknown>, options)
73
73
 
74
74
  const cacheTag = await getCacheTag("customers")
@@ -98,7 +98,7 @@ export async function signup(_currentState: unknown, formData: FormData) {
98
98
 
99
99
  await setAuthToken(token)
100
100
 
101
- const options = await getStoreCartClientOptions()
101
+ const options = await getStoreClientOptions()
102
102
  const { customer: createdCustomer } = await medusaCustomerCreate(customerForm, options)
103
103
 
104
104
  const loginToken = await medusaAuthLogin(
@@ -142,7 +142,7 @@ export async function login(
142
142
  cookieStore.set("_medusa_customer_email", email, { maxAge: 60 * 60 * 24 * 7, path: "/" })
143
143
 
144
144
  try {
145
- const options = await getStoreCartClientOptions()
145
+ const options = await getStoreClientOptions()
146
146
  await medusaCustomerRetrieve({
147
147
  ...options,
148
148
  authorization: `Bearer ${token}`,
@@ -219,7 +219,7 @@ export async function signout(countryCode: string) {
219
219
 
220
220
  export async function transferCart(token?: string) {
221
221
  const cartId = await getCartId()
222
- const options = await getStoreCartClientOptions()
222
+ const options = await getStoreClientOptions()
223
223
  const mergeOptions = token
224
224
  ? { ...options, authorization: `Bearer ${token}` }
225
225
  : options
@@ -285,7 +285,7 @@ export const addCustomerAddress = async (
285
285
  }
286
286
 
287
287
  try {
288
- const options = await getStoreCartClientOptions()
288
+ const options = await getStoreClientOptions()
289
289
  await medusaCustomerCreateAddress(address, options)
290
290
 
291
291
  const customerCacheTag = await getCacheTag("customers")
@@ -300,7 +300,7 @@ export const deleteCustomerAddress = async (
300
300
  addressId: string
301
301
  ): Promise<void> => {
302
302
  try {
303
- const options = await getStoreCartClientOptions()
303
+ const options = await getStoreClientOptions()
304
304
  await medusaCustomerDeleteAddress(addressId, options)
305
305
 
306
306
  const customerCacheTag = await getCacheTag("customers")
@@ -344,7 +344,7 @@ export const updateCustomerAddress = async (
344
344
  }
345
345
 
346
346
  try {
347
- const options = await getStoreCartClientOptions()
347
+ const options = await getStoreClientOptions()
348
348
  await medusaCustomerUpdateAddress(addressId, address, options)
349
349
 
350
350
  const customerCacheTag = await getCacheTag("customers")
@@ -357,7 +357,7 @@ export const updateCustomerAddress = async (
357
357
 
358
358
  export const setDefaultAddress = async (addressId: string) => {
359
359
  try {
360
- const options = await getStoreCartClientOptions()
360
+ const options = await getStoreClientOptions()
361
361
  await medusaCustomerUpdateAddress(addressId, { is_default_shipping: true }, options)
362
362
 
363
363
  const customerCacheTag = await getCacheTag("customers")
@@ -469,7 +469,7 @@ export async function handleGoogleCallback(token: string, email?: string, first_
469
469
  const cookieStore = await cookies()
470
470
  cookieStore.set("_medusa_customer_email", email, { maxAge: 60 * 60 * 24 * 7, path: "/" })
471
471
 
472
- const options = await getStoreCartClientOptions()
472
+ const options = await getStoreClientOptions()
473
473
  if (options.authorization) {
474
474
  try {
475
475
  await medusaCustomerCreate(