@salla.sa/twilight-theme-engine 1.0.71 → 1.0.72

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 (258) hide show
  1. package/dist/{AddToCartForm-XA5X2C5K.js → AddToCartForm-5KE3LZSE.js} +5 -5
  2. package/dist/AddToCartForm-5KE3LZSE.js.map +1 -0
  3. package/dist/{BlogAuthorPage-YWR52G5S.js → BlogAuthorPage-ZE2H4IIQ.js} +22 -22
  4. package/dist/BlogAuthorPage-ZE2H4IIQ.js.map +1 -0
  5. package/dist/{BlogCategoryPage-N644DZTN.js → BlogCategoryPage-Y5GBZV2E.js} +20 -20
  6. package/dist/{BlogCategoryPage-N644DZTN.js.map → BlogCategoryPage-Y5GBZV2E.js.map} +1 -1
  7. package/dist/{BlogPage-5Z4X3Y2H.js → BlogPage-WJ46QFWA.js} +18 -18
  8. package/dist/{BlogPage-5Z4X3Y2H.js.map → BlogPage-WJ46QFWA.js.map} +1 -1
  9. package/dist/{BlogSinglePage-NSNVBBUS.js → BlogSinglePage-TWAW5FYE.js} +18 -18
  10. package/dist/{BlogSinglePage-NSNVBBUS.js.map → BlogSinglePage-TWAW5FYE.js.map} +1 -1
  11. package/dist/{BlogTagPage-GRYZRHDL.js → BlogTagPage-GDSNBEUM.js} +20 -20
  12. package/dist/{BlogTagPage-GRYZRHDL.js.map → BlogTagPage-GDSNBEUM.js.map} +1 -1
  13. package/dist/{BrandsPage-3Q4ZYOT7.js → BrandsPage-S5J5LPBJ.js} +19 -19
  14. package/dist/{BrandsPage-3Q4ZYOT7.js.map → BrandsPage-S5J5LPBJ.js.map} +1 -1
  15. package/dist/{Breadcrumb-WNSVFI75.js → Breadcrumb-JID6FMRH.js} +18 -18
  16. package/dist/{Breadcrumb-WNSVFI75.js.map → Breadcrumb-JID6FMRH.js.map} +1 -1
  17. package/dist/{CartItem-A66ZG64I.js → CartItem-65SS67V5.js} +18 -18
  18. package/dist/{CartItem-A66ZG64I.js.map → CartItem-65SS67V5.js.map} +1 -1
  19. package/dist/{CartSummary-BQC2IGQD.js → CartSummary-N4JVOPO5.js} +18 -18
  20. package/dist/{CartSummary-BQC2IGQD.js.map → CartSummary-N4JVOPO5.js.map} +1 -1
  21. package/dist/{Copyright-UNROFFOC.js → Copyright-KMWFNZEF.js} +4 -4
  22. package/dist/{Copyright-UNROFFOC.js.map → Copyright-KMWFNZEF.js.map} +1 -1
  23. package/dist/{CustomerLayout-TKS5QZMJ.js → CustomerLayout-RFFISOFD.js} +18 -18
  24. package/dist/{CustomerLayout-TKS5QZMJ.js.map → CustomerLayout-RFFISOFD.js.map} +1 -1
  25. package/dist/{Footer-2WD77PFB.js → Footer-NDSP2GVD.js} +18 -18
  26. package/dist/{Footer-2WD77PFB.js.map → Footer-NDSP2GVD.js.map} +1 -1
  27. package/dist/{Header-3BANLNYK.js → Header-524EF77Y.js} +7 -7
  28. package/dist/{Header-3BANLNYK.js.map → Header-524EF77Y.js.map} +1 -1
  29. package/dist/{ImageModal-LHFSYPSU.js → ImageModal-4FNL5UC5.js} +3 -3
  30. package/dist/{ImageModal-LHFSYPSU.js.map → ImageModal-4FNL5UC5.js.map} +1 -1
  31. package/dist/{LoyaltyPage-OAGJLFD2.js → LoyaltyPage-4BTICEVT.js} +18 -18
  32. package/dist/{LoyaltyPage-OAGJLFD2.js.map → LoyaltyPage-4BTICEVT.js.map} +1 -1
  33. package/dist/{LoyaltyPointsPage-G5FB2QTQ.js → LoyaltyPointsPage-D6S4DMGL.js} +6 -6
  34. package/dist/{LoyaltyPointsPage-G5FB2QTQ.js.map → LoyaltyPointsPage-D6S4DMGL.js.map} +1 -1
  35. package/dist/{MainMenu-FFLJR2EK.js → MainMenu-KXNWUVAF.js} +6 -6
  36. package/dist/{MainMenu-FFLJR2EK.js.map → MainMenu-KXNWUVAF.js.map} +1 -1
  37. package/dist/{MasterLayout-H54QAUUY.js → MasterLayout-4PV6RJJN.js} +18 -18
  38. package/dist/{MasterLayout-H54QAUUY.js.map → MasterLayout-4PV6RJJN.js.map} +1 -1
  39. package/dist/{MobileMenu-OVAY7EFJ.js → MobileMenu-VJJ7BG56.js} +19 -19
  40. package/dist/{MobileMenu-OVAY7EFJ.js.map → MobileMenu-VJJ7BG56.js.map} +1 -1
  41. package/dist/{NotificationsPage-SEAEJEE7.js → NotificationsPage-PCWYS2WC.js} +18 -18
  42. package/dist/{NotificationsPage-SEAEJEE7.js.map → NotificationsPage-PCWYS2WC.js.map} +1 -1
  43. package/dist/{OrderSinglePage-L7OCFF7N.js → OrderSinglePage-6MS5Q5GD.js} +19 -19
  44. package/dist/{OrderSinglePage-L7OCFF7N.js.map → OrderSinglePage-6MS5Q5GD.js.map} +1 -1
  45. package/dist/{OrdersPage-IOEC2JR2.js → OrdersPage-UBGWPLRU.js} +18 -18
  46. package/dist/{OrdersPage-IOEC2JR2.js.map → OrdersPage-UBGWPLRU.js.map} +1 -1
  47. package/dist/{PageSingle-YYUIJVFP.js → PageSingle-YFIFFSON.js} +4 -4
  48. package/dist/{PageSingle-YYUIJVFP.js.map → PageSingle-YFIFFSON.js.map} +1 -1
  49. package/dist/{ProductDetails-KSB3OC25.js → ProductDetails-PYWNF2YH.js} +8 -9
  50. package/dist/ProductDetails-PYWNF2YH.js.map +1 -0
  51. package/dist/{ProfilePage-SVQRTF55.js → ProfilePage-F72TLSO5.js} +18 -18
  52. package/dist/{ProfilePage-SVQRTF55.js.map → ProfilePage-F72TLSO5.js.map} +1 -1
  53. package/dist/{SeoCartWidget-G4Y4NRMH.js → SeoCartWidget-TK2BVDFT.js} +18 -18
  54. package/dist/{SeoCartWidget-G4Y4NRMH.js.map → SeoCartWidget-TK2BVDFT.js.map} +1 -1
  55. package/dist/{SettingsPage-ZVBMBGZL.js → SettingsPage-4W5YIWPU.js} +18 -18
  56. package/dist/{SettingsPage-ZVBMBGZL.js.map → SettingsPage-4W5YIWPU.js.map} +1 -1
  57. package/dist/{StoreClosedNotification-PRXVWUV7.js → StoreClosedNotification-IV2JTVDU.js} +19 -19
  58. package/dist/{StoreClosedNotification-PRXVWUV7.js.map → StoreClosedNotification-IV2JTVDU.js.map} +1 -1
  59. package/dist/{TestimonialsPage-QENPQ2JK.js → TestimonialsPage-YOQJQ2HD.js} +4 -4
  60. package/dist/{TestimonialsPage-QENPQ2JK.js.map → TestimonialsPage-YOQJQ2HD.js.map} +1 -1
  61. package/dist/{ThankYouPage-GB6M5I4Z.js → ThankYouPage-CRSSRVY7.js} +18 -18
  62. package/dist/{ThankYouPage-GB6M5I4Z.js.map → ThankYouPage-CRSSRVY7.js.map} +1 -1
  63. package/dist/{WalletPage-IG5B33XQ.js → WalletPage-26HBCIHR.js} +19 -19
  64. package/dist/{WalletPage-IG5B33XQ.js.map → WalletPage-26HBCIHR.js.map} +1 -1
  65. package/dist/WidgetHead-BCRIXIJQ.js +7 -0
  66. package/dist/{WidgetHead-RWL7D3CT.js.map → WidgetHead-BCRIXIJQ.js.map} +1 -1
  67. package/dist/{WishlistPage-SYNLUIGO.js → WishlistPage-AZ3DGIYV.js} +20 -20
  68. package/dist/{WishlistPage-SYNLUIGO.js.map → WishlistPage-AZ3DGIYV.js.map} +1 -1
  69. package/dist/api/apps.js +2 -2
  70. package/dist/api/blog.js +12 -0
  71. package/dist/api/blog.js.map +1 -0
  72. package/dist/api/brands.js +2 -2
  73. package/dist/api/cart.js +2 -2
  74. package/dist/api/category.js +2 -2
  75. package/dist/api/client.d.ts +0 -6
  76. package/dist/api/client.d.ts.map +1 -1
  77. package/dist/api/client.js +1 -1
  78. package/dist/api/home.js +2 -2
  79. package/dist/api/loyalty.js +2 -2
  80. package/dist/api/menu.js +2 -2
  81. package/dist/api/notification.js +2 -2
  82. package/dist/api/order.js +2 -2
  83. package/dist/api/page.js +2 -2
  84. package/dist/api/product.js +2 -2
  85. package/dist/api/profile.js +1 -1
  86. package/dist/api/store.js +2 -2
  87. package/dist/api/translations.js +2 -2
  88. package/dist/api/types.d.ts +5 -0
  89. package/dist/api/types.d.ts.map +1 -1
  90. package/dist/api/user.js +2 -2
  91. package/dist/api/wallet.js +9 -0
  92. package/dist/api/wallet.js.map +1 -0
  93. package/dist/api/wishlist.js +3 -3
  94. package/dist/{chunk-7PYHB3PP.js → chunk-25FWAL3O.js} +3 -3
  95. package/dist/{chunk-7PYHB3PP.js.map → chunk-25FWAL3O.js.map} +1 -1
  96. package/dist/{chunk-USN5NHJ5.js → chunk-2ALN2BPM.js} +3 -3
  97. package/dist/{chunk-USN5NHJ5.js.map → chunk-2ALN2BPM.js.map} +1 -1
  98. package/dist/{chunk-GVJHDJW7.js → chunk-34VXOUQT.js} +10 -10
  99. package/dist/chunk-34VXOUQT.js.map +1 -0
  100. package/dist/{chunk-5HOD4BKK.js → chunk-3CYIB6BL.js} +3 -3
  101. package/dist/{chunk-5HOD4BKK.js.map → chunk-3CYIB6BL.js.map} +1 -1
  102. package/dist/{chunk-VYJDRAWX.js → chunk-3EE62REP.js} +3 -3
  103. package/dist/{chunk-VYJDRAWX.js.map → chunk-3EE62REP.js.map} +1 -1
  104. package/dist/{chunk-R2BAI6QI.js → chunk-4S3XHNUG.js} +5 -5
  105. package/dist/{chunk-R2BAI6QI.js.map → chunk-4S3XHNUG.js.map} +1 -1
  106. package/dist/{chunk-P6EOXGUE.js → chunk-52ETYODY.js} +4 -4
  107. package/dist/{chunk-P6EOXGUE.js.map → chunk-52ETYODY.js.map} +1 -1
  108. package/dist/{chunk-N3BSUMD7.js → chunk-5AFTFN72.js} +3 -3
  109. package/dist/{chunk-N3BSUMD7.js.map → chunk-5AFTFN72.js.map} +1 -1
  110. package/dist/{chunk-GTG22RZG.js → chunk-5DPR7GWH.js} +3 -3
  111. package/dist/{chunk-GTG22RZG.js.map → chunk-5DPR7GWH.js.map} +1 -1
  112. package/dist/{chunk-Q7VWURUR.js → chunk-5XDPAKF5.js} +3 -3
  113. package/dist/{chunk-Q7VWURUR.js.map → chunk-5XDPAKF5.js.map} +1 -1
  114. package/dist/chunk-7V5HOZW4.js +10 -0
  115. package/dist/{chunk-CUG6VOLM.js.map → chunk-7V5HOZW4.js.map} +1 -1
  116. package/dist/{chunk-LDMLFJGQ.js → chunk-7VYI6EF4.js} +4 -4
  117. package/dist/{chunk-LDMLFJGQ.js.map → chunk-7VYI6EF4.js.map} +1 -1
  118. package/dist/{chunk-7W7SLN5M.js → chunk-B5FDWE4U.js} +3 -3
  119. package/dist/{chunk-7W7SLN5M.js.map → chunk-B5FDWE4U.js.map} +1 -1
  120. package/dist/{chunk-BQURS54V.js → chunk-BD4V56PZ.js} +13 -13
  121. package/dist/{chunk-BQURS54V.js.map → chunk-BD4V56PZ.js.map} +1 -1
  122. package/dist/chunk-DRMTTDZU.js +14 -0
  123. package/dist/{chunk-IHZVVSPW.js.map → chunk-DRMTTDZU.js.map} +1 -1
  124. package/dist/{chunk-VX2T7JCB.js → chunk-EXBH6RGD.js} +5 -5
  125. package/dist/chunk-EXBH6RGD.js.map +1 -0
  126. package/dist/{chunk-GU2KUQVD.js → chunk-GCPEMNSU.js} +14 -3
  127. package/dist/chunk-GCPEMNSU.js.map +1 -0
  128. package/dist/{chunk-C5X6CVXC.js → chunk-HI5V5X3S.js} +4 -7
  129. package/dist/chunk-HI5V5X3S.js.map +1 -0
  130. package/dist/{chunk-ILMX45PO.js → chunk-IO77BQGI.js} +6 -6
  131. package/dist/{chunk-ILMX45PO.js.map → chunk-IO77BQGI.js.map} +1 -1
  132. package/dist/{chunk-DY5WGKDX.js → chunk-JZ7BOB4G.js} +3 -3
  133. package/dist/{chunk-DY5WGKDX.js.map → chunk-JZ7BOB4G.js.map} +1 -1
  134. package/dist/{chunk-FGROIU3Y.js → chunk-L5K7VBOH.js} +3 -3
  135. package/dist/{chunk-FGROIU3Y.js.map → chunk-L5K7VBOH.js.map} +1 -1
  136. package/dist/chunk-LOMFLRJI.js +21 -0
  137. package/dist/{chunk-DZDSTTHW.js.map → chunk-LOMFLRJI.js.map} +1 -1
  138. package/dist/{chunk-5O6PTKI5.js → chunk-MEPYG77L.js} +6 -4
  139. package/dist/chunk-MEPYG77L.js.map +1 -0
  140. package/dist/{chunk-6F5QZKIY.js → chunk-MFR2WJBJ.js} +8 -13
  141. package/dist/chunk-MFR2WJBJ.js.map +1 -0
  142. package/dist/chunk-MVT5AF2A.js +94 -0
  143. package/dist/chunk-MVT5AF2A.js.map +1 -0
  144. package/dist/{chunk-2JL4S2LE.js → chunk-N56EGFBC.js} +6 -6
  145. package/dist/{chunk-2JL4S2LE.js.map → chunk-N56EGFBC.js.map} +1 -1
  146. package/dist/{chunk-LGT3T7VF.js → chunk-NZOXKPCW.js} +3 -3
  147. package/dist/{chunk-LGT3T7VF.js.map → chunk-NZOXKPCW.js.map} +1 -1
  148. package/dist/{chunk-A32NANNC.js → chunk-OYP5CGHU.js} +3 -3
  149. package/dist/{chunk-A32NANNC.js.map → chunk-OYP5CGHU.js.map} +1 -1
  150. package/dist/{chunk-NFE2H5JE.js → chunk-RO6KBURF.js} +3 -3
  151. package/dist/{chunk-NFE2H5JE.js.map → chunk-RO6KBURF.js.map} +1 -1
  152. package/dist/{chunk-GBWCXUPD.js → chunk-RSVAPXXI.js} +39 -16
  153. package/dist/chunk-RSVAPXXI.js.map +1 -0
  154. package/dist/{chunk-MSUGP566.js → chunk-UAY6LTWB.js} +3 -3
  155. package/dist/{chunk-MSUGP566.js.map → chunk-UAY6LTWB.js.map} +1 -1
  156. package/dist/{chunk-RJPPO3ET.js → chunk-V2ZDTY6H.js} +3 -3
  157. package/dist/{chunk-RJPPO3ET.js.map → chunk-V2ZDTY6H.js.map} +1 -1
  158. package/dist/{chunk-H2DXJCJP.js → chunk-VFYT2VWC.js} +3 -3
  159. package/dist/{chunk-H2DXJCJP.js.map → chunk-VFYT2VWC.js.map} +1 -1
  160. package/dist/{chunk-IXG6BF2M.js → chunk-WNGLJJVH.js} +7 -7
  161. package/dist/{chunk-IXG6BF2M.js.map → chunk-WNGLJJVH.js.map} +1 -1
  162. package/dist/{chunk-5H4NIOTY.js → chunk-WSXRUOI2.js} +3 -3
  163. package/dist/{chunk-5H4NIOTY.js.map → chunk-WSXRUOI2.js.map} +1 -1
  164. package/dist/{chunk-7BGEGHAI.js → chunk-XVNXXF67.js} +3 -3
  165. package/dist/{chunk-7BGEGHAI.js.map → chunk-XVNXXF67.js.map} +1 -1
  166. package/dist/{chunk-HX3YKS5W.js → chunk-YA6ABQB7.js} +16 -10
  167. package/dist/chunk-YA6ABQB7.js.map +1 -0
  168. package/dist/{chunk-4YHSQSM6.js → chunk-YKFGUVF7.js} +3 -3
  169. package/dist/{chunk-4YHSQSM6.js.map → chunk-YKFGUVF7.js.map} +1 -1
  170. package/dist/{chunk-E7PYHBCX.js → chunk-YLSG4MEK.js} +3 -3
  171. package/dist/{chunk-E7PYHBCX.js.map → chunk-YLSG4MEK.js.map} +1 -1
  172. package/dist/components/cart/index.js +1 -1
  173. package/dist/components/common/Image.d.ts.map +1 -1
  174. package/dist/components/common/index.js +2 -2
  175. package/dist/components/drawer/index.js +16 -16
  176. package/dist/components/home/index.js +20 -20
  177. package/dist/components/layout/index.js +4 -4
  178. package/dist/components/modal/Modal.d.ts.map +1 -1
  179. package/dist/components/modal/index.js +2 -2
  180. package/dist/components/product/ProductDetails.d.ts.map +1 -1
  181. package/dist/components/product/index.js +17 -17
  182. package/dist/components/store/index.js +18 -18
  183. package/dist/components/toast/index.js +8 -6
  184. package/dist/components/toast/index.js.map +1 -1
  185. package/dist/components/toast/useToast.d.ts.map +1 -1
  186. package/dist/components/tracking/index.js +1 -1
  187. package/dist/contexts/CartContext.d.ts +14 -6
  188. package/dist/contexts/CartContext.d.ts.map +1 -1
  189. package/dist/contexts/index.js.map +1 -1
  190. package/dist/{document-class-7U45CO5V.js → document-class-FIAXRNEM.js} +8 -8
  191. package/dist/{document-class-7U45CO5V.js.map → document-class-FIAXRNEM.js.map} +1 -1
  192. package/dist/hooks/HookRegistry.d.ts +3 -1
  193. package/dist/hooks/HookRegistry.d.ts.map +1 -1
  194. package/dist/hooks/HookRegistry.js +1 -1
  195. package/dist/hooks/HookSlot.js +2 -2
  196. package/dist/hooks/index.js +16 -16
  197. package/dist/hooks/useGtm.js +16 -16
  198. package/dist/hooks/useHook.d.ts.map +1 -1
  199. package/dist/hooks/useHook.js +2 -2
  200. package/dist/hooks/useMoney.js +16 -16
  201. package/dist/hooks/useStore.js +16 -16
  202. package/dist/hooks/useUser.js +3 -3
  203. package/dist/hooks/useWishlist.d.ts.map +1 -1
  204. package/dist/hooks/useWishlist.js +3 -1
  205. package/dist/index.js +16 -16
  206. package/dist/{not-found-W7RACNK7.js → not-found-SCNJYKWP.js} +19 -19
  207. package/dist/{not-found-W7RACNK7.js.map → not-found-SCNJYKWP.js.map} +1 -1
  208. package/dist/providers/index.js +16 -16
  209. package/dist/routes/account/orders/index.d.ts.map +1 -1
  210. package/dist/routes/account/orders.js +3 -3
  211. package/dist/routes/account.js +12 -12
  212. package/dist/routes/blog/loader.d.ts.map +1 -1
  213. package/dist/routes/blog.js +23 -13
  214. package/dist/routes/blog.js.map +1 -1
  215. package/dist/routes/brands/types.d.ts +16 -2
  216. package/dist/routes/brands/types.d.ts.map +1 -1
  217. package/dist/routes/brands.js +3 -3
  218. package/dist/routes/cart.js +24 -24
  219. package/dist/routes/home.js +21 -21
  220. package/dist/routes/loyalty.js +4 -4
  221. package/dist/routes/page.js +3 -3
  222. package/dist/routes/product/ProductPage.d.ts.map +1 -1
  223. package/dist/routes/product-listing/loader.d.ts.map +1 -1
  224. package/dist/routes/product-listing.js +24 -23
  225. package/dist/routes/product-listing.js.map +1 -1
  226. package/dist/routes/product.js +23 -25
  227. package/dist/routes/product.js.map +1 -1
  228. package/dist/routes/testimonials.js +1 -1
  229. package/dist/routes/thank-you.js +3 -3
  230. package/dist/skeleton.js +21 -21
  231. package/dist/tanstack.js +7 -7
  232. package/dist/types/hooks.d.ts +61 -1
  233. package/dist/types/hooks.d.ts.map +1 -1
  234. package/dist/types/hooks.js +1 -1
  235. package/dist/types/index.d.ts +626 -53
  236. package/dist/types/index.d.ts.map +1 -1
  237. package/dist/types/index.js +1 -1
  238. package/dist/vite/adapters/tanstack.adapter.d.ts.map +1 -1
  239. package/dist/vite/index.js +11 -3
  240. package/dist/vite/index.js.map +1 -1
  241. package/package.json +9 -1
  242. package/dist/AddToCartForm-XA5X2C5K.js.map +0 -1
  243. package/dist/BlogAuthorPage-YWR52G5S.js.map +0 -1
  244. package/dist/ProductDetails-KSB3OC25.js.map +0 -1
  245. package/dist/WidgetHead-RWL7D3CT.js +0 -7
  246. package/dist/chunk-5O6PTKI5.js.map +0 -1
  247. package/dist/chunk-6F5QZKIY.js.map +0 -1
  248. package/dist/chunk-C5X6CVXC.js.map +0 -1
  249. package/dist/chunk-CUG6VOLM.js +0 -10
  250. package/dist/chunk-DZDSTTHW.js +0 -21
  251. package/dist/chunk-GBWCXUPD.js.map +0 -1
  252. package/dist/chunk-GU2KUQVD.js.map +0 -1
  253. package/dist/chunk-GVJHDJW7.js.map +0 -1
  254. package/dist/chunk-HX3YKS5W.js.map +0 -1
  255. package/dist/chunk-IHZVVSPW.js +0 -14
  256. package/dist/chunk-TP3LCGE7.js +0 -34
  257. package/dist/chunk-TP3LCGE7.js.map +0 -1
  258. package/dist/chunk-VX2T7JCB.js.map +0 -1
@@ -7,13 +7,17 @@ export type JsonObject = {
7
7
  [key: string]: {};
8
8
  };
9
9
  export interface Language {
10
+ /** Language name written in that language. */
10
11
  name: string;
12
+ /** Language code. */
11
13
  code: string;
12
- /** Same as `code` — the SDK's salla-localization-modal reads `iso_code`, not `code` */
14
+ /** Same as `code` — the SDK's salla-localization-modal reads `iso_code`, not `code`. */
13
15
  iso_code?: string;
14
- /** Flag icon URL (e.g., "https://assets.salla.sa/images/flags/ar.svg") - NOT the store URL */
16
+ /** Flag icon URL (e.g., "https://assets.salla.sa/images/flags/ar.svg") - NOT the store URL. */
15
17
  url: string;
18
+ /** Whether the language is written right to left. */
16
19
  is_rtl: boolean;
20
+ /** Country code used to pick the flag. */
17
21
  country_code: string;
18
22
  /**
19
23
  * Whether this store has its own wording for this language.
@@ -30,175 +34,396 @@ export interface Language {
30
34
  has_custom_translations?: boolean;
31
35
  }
32
36
  export interface Store {
37
+ /** Store id. */
33
38
  id: number;
39
+ /** Store name, as the merchant typed it. */
34
40
  name: string;
41
+ /** Store username. */
35
42
  username: string;
43
+ /** Store description, as HTML rather than plain text. */
36
44
  description: string;
45
+ /** Store slogan. */
37
46
  slogan?: string;
47
+ /** Logo image URL. */
38
48
  logo: string;
49
+ /** Store home URL. On a multilingual store it ends with the language prefix (`/ar/`). */
39
50
  url: string;
51
+ /** Base URL of the store API. */
40
52
  api?: string;
53
+ /** Icon image URL. */
41
54
  icon: string;
55
+ /** Favicon URL. Marked for removal. */
42
56
  favicon?: string;
57
+ /** Longer "about the store" text. */
43
58
  about?: string;
59
+ /** When the store was created. */
44
60
  created_at?: string;
61
+ /** When the store was last updated. */
45
62
  updated_at?: string;
63
+ /** Default SEO values for pages that set none. Empty strings when the merchant set none. */
46
64
  meta?: {
65
+ /** Default page title. */
47
66
  title?: string;
67
+ /** Default page description. */
48
68
  description?: string;
69
+ /** Default page keywords. */
49
70
  keywords?: string;
50
71
  };
51
- /** Store-level settings (auth, cart, product, etc.) */
72
+ /** Store-level settings (auth, cart, product, ratings and so on). */
52
73
  settings: StoreSettings;
74
+ /** Contact details the store shows to customers. */
53
75
  contacts: StoreContacts;
76
+ /** Links to the store's social media profiles. */
54
77
  social: StoreSocial;
55
- /** Store's default country code (uppercase ISO, e.g., "SA") */
78
+ /** Store's default country code (uppercase ISO, e.g., "SA"). */
56
79
  country: string;
57
- /** Store's configured country for operations (uppercase ISO, e.g., "SA") */
80
+ /** Country the store operates in (uppercase ISO, e.g., "SA"). */
58
81
  store_country?: string;
82
+ /** Internal platform request value; nothing in a theme should depend on it. */
59
83
  ray?: number;
84
+ /** Platform feature flags that are on for this store. */
60
85
  features?: string[];
61
- /** Mobile app download links */
86
+ /** Mobile app download links. */
62
87
  apps?: StoreApps;
88
+ /** Reserved by the platform; usually null. */
63
89
  template?: string | null;
90
+ /** The selected market or branch, or null when the store has none. */
64
91
  scope?: StoreScope | null;
92
+ /** Whether the visitor is the merchant. Marked for removal: rely on `theme.mode` instead. */
65
93
  is_merchant?: boolean;
94
+ /** Whether the store offers pickup (mirrors `shipping.support_pickup`). */
95
+ support_pickup?: boolean;
96
+ /** Shipping and delivery options the store offers. */
97
+ shipping?: StoreShipping;
98
+ /** Store-wide rating summary. */
99
+ rating?: {
100
+ /** Number of ratings the store has received. */
101
+ total: number;
102
+ /** Average star rating. */
103
+ stars: number;
104
+ };
105
+ /** Rating distribution: how many ratings gave each star value. */
106
+ ratings?: {
107
+ /** The star value (for example 5). */
108
+ stars: number;
109
+ /** Number of ratings that gave this star value. */
110
+ total: number;
111
+ }[];
112
+ /** Order confirmation page messages (HTML strings). */
113
+ order_instruction?: StoreOrderInstruction;
114
+ }
115
+ export interface StoreShipping {
116
+ /** Delivery location details, or null when the store has none. */
117
+ delivery_location?: unknown | null;
118
+ /** Express-delivery promise details, or null when the store has none. */
119
+ express_delivery_promise?: unknown | null;
120
+ /** Whether the store offers pickup. */
121
+ support_pickup?: boolean;
122
+ /** Whether products show the fast-delivery ("bullet") tag. */
123
+ has_bullet_delivery_tag?: boolean;
124
+ }
125
+ export interface StoreOrderInstruction {
126
+ /** Heading of the order confirmation page. */
127
+ thank_title?: string;
128
+ /** Message shown while the order waits for payment. */
129
+ order_instructions_payment_waiting?: string;
130
+ /** Message shown while the order is under review. */
131
+ order_instructions_under_review?: string;
132
+ /** Message shown once the order is completed. */
133
+ order_instructions_completed?: string;
66
134
  }
67
135
  /** Mobile app download URLs for the store */
68
136
  export interface StoreApps {
137
+ /** App Store link. */
69
138
  appstore?: string;
139
+ /** Google Play link. */
70
140
  googleplay?: string;
71
141
  }
72
142
  export interface StoreContacts {
143
+ /** Mobile number. */
73
144
  mobile?: string;
145
+ /** Phone number. */
74
146
  phone?: string;
147
+ /** Support email address. */
75
148
  email?: string;
149
+ /** WhatsApp link or number. */
76
150
  whatsapp?: string;
151
+ /** Telegram link. */
77
152
  telegram?: string;
78
153
  }
79
154
  export interface StoreSocial {
155
+ /** Instagram profile link. */
80
156
  instagram?: string;
157
+ /** Snapchat profile link. */
81
158
  snapchat?: string;
159
+ /** X (Twitter) profile link. */
82
160
  twitter?: string;
161
+ /** YouTube channel link. */
83
162
  youtube?: string;
163
+ /** Facebook page link. */
84
164
  facebook?: string;
165
+ /** Pinterest profile link. */
85
166
  pinterest?: string;
167
+ /** Maroof page link. */
86
168
  maroof?: string;
169
+ /** WhatsApp link. */
87
170
  whatsapp?: string;
171
+ /** TikTok profile link. */
88
172
  tiktok?: string;
89
173
  }
90
174
  export interface StoreSettings {
175
+ /** Sign-in and registration options. */
91
176
  auth: {
177
+ /** Customers can sign in with email. */
92
178
  email_allowed: boolean;
179
+ /** Customers can sign in with a mobile number. */
93
180
  mobile_allowed: boolean;
181
+ /** Email is required when registering. */
94
182
  is_email_required: boolean;
183
+ /** Country codes allowed for mobile numbers, lowercase. */
95
184
  countries?: string[];
185
+ /** Visitors must sign in to browse the store. */
96
186
  force_login?: boolean;
187
+ /** Customers can sign in through WhatsApp. */
188
+ whatsapp_allowed?: boolean;
189
+ /** Country codes where WhatsApp sign-in is offered. */
190
+ whatsapp_countries?: string[];
191
+ /** Whether the merchant has enabled WhatsApp sign-in. */
192
+ whatsapp_merchant_allowed?: boolean;
193
+ /** Visitor's detected country (uppercase ISO), e.g. "DE". */
194
+ user_country?: string;
195
+ /** Extra sign-in configuration sent by the platform; its shape is not typed, and it is null when unused. */
196
+ config?: unknown | null;
97
197
  };
198
+ /** Cart options. */
98
199
  cart: {
200
+ /** Show the coupon field in the cart. */
99
201
  apply_coupon_enabled: boolean;
202
+ /** Platform flag for the cart layout. */
203
+ basket_gap?: boolean;
204
+ /** More than one coupon can be applied. */
205
+ multi_coupon?: boolean;
100
206
  };
207
+ /** Product page and listing options. */
101
208
  product: {
209
+ /** Show how many units were sold. It is 1 or 0, not a boolean. */
102
210
  total_sold_enabled: number;
211
+ /** Customers can type the quantity instead of using a stepper. */
103
212
  manual_quantity?: boolean;
213
+ /** How product images fill their frame; null when not set. */
104
214
  fit_type?: 'cover' | 'contain' | null;
215
+ /** Show related products. */
105
216
  related_products_enabled?: boolean;
106
- filters?: boolean | null;
217
+ /** Switches for the listing filters, one per filter (`{ category_id: true, price: true, ... }`). */
218
+ filters?: ProductFiltersSettings | boolean | null;
219
+ /** Kind of product recommendations to show. The key has hyphens, so read it with brackets. */
220
+ 'product-recommendation-type'?: string;
221
+ /** Show "bought together" products. */
222
+ bought_together?: boolean;
223
+ /** Show product comments. */
107
224
  show_comments?: boolean;
225
+ /** Customers can comment on products. */
108
226
  user_can_comment?: boolean;
227
+ /** Hide prices and show a dash instead. */
109
228
  show_price_as_dash?: boolean;
229
+ /** Offer "notify me" for sold-out options. */
110
230
  notify_options_availability?: boolean;
231
+ /** Show special offers on the product. */
111
232
  show_special_offers?: boolean;
233
+ /** Show the "show more" control. */
112
234
  show_more?: boolean;
235
+ /** Channels offered for "notify me when available", or null when the feature is off. */
113
236
  availability_notify?: {
237
+ /** Notify by email. */
114
238
  email: boolean;
239
+ /** Notify by SMS. */
115
240
  sms: boolean;
241
+ /** Notify by mobile notification. */
116
242
  mobile: boolean;
243
+ /** Notify by WhatsApp. */
117
244
  whatsapp: boolean;
118
245
  } | null;
119
246
  };
247
+ /** Category page options. */
120
248
  category: {
249
+ /** Show testimonials on category pages. */
121
250
  testimonial_enabled: boolean;
122
251
  };
252
+ /** Enabled payment methods. */
123
253
  payments?: string[];
254
+ /** Show Arabic-Indic digits. */
124
255
  arabic_numbers_enabled: boolean;
256
+ /** Content copy protection is on. */
125
257
  content_copyright?: boolean;
258
+ /** Show the Saudi riyal symbol instead of the currency code. */
126
259
  use_sar_symbol?: boolean;
260
+ /** The store offers more than one language. */
127
261
  is_multilingual: boolean;
262
+ /** The store offers more than one currency. */
128
263
  currencies_enabled: boolean;
264
+ /** Ratings are turned on for the store. */
129
265
  rating_enabled: boolean;
266
+ /** Rating and review options. */
130
267
  rating?: {
268
+ /** Ratings are on. */
131
269
  is_enabled: boolean;
270
+ /** Show ratings on category pages. */
132
271
  show_on_category: boolean;
272
+ /** Show ratings on product pages. */
133
273
  show_on_product: boolean;
274
+ /** Customers can rate the store. */
134
275
  can_rate_store: boolean;
276
+ /** Customers can rate products. */
135
277
  can_rate_product: boolean;
278
+ /** Customers can rate shipping. */
136
279
  can_rate_shipping: boolean;
280
+ /** Show the rating summary block. */
137
281
  show_rating_summary: boolean;
282
+ /** Show the "would you recommend" question. */
138
283
  show_recommendation: boolean;
284
+ /** Reviews can be liked. */
139
285
  allow_likes: boolean;
286
+ /** Reviews can include images. */
140
287
  allow_attach_images: boolean;
288
+ /** Show a contact-support action on reviews. */
141
289
  allow_contact_support: boolean;
290
+ /** Customers can edit their review. */
142
291
  allow_update: boolean;
292
+ /** Number of days a review can be edited. */
143
293
  update_period: number;
294
+ /** Reviewers can hide their name. */
144
295
  can_customer_hide_name: boolean;
296
+ /** Visitors who are not signed in can comment. */
145
297
  visitor_can_comment: boolean;
298
+ /** Page feedback is on. */
146
299
  page_feedback_enabled: boolean;
147
300
  };
301
+ /** Blog options. */
148
302
  blog?: {
303
+ /** The blog is on. */
149
304
  is_enabled: boolean;
305
+ /** Readers can like and comment on articles. */
150
306
  allow_likes_and_comments: boolean;
151
307
  };
308
+ /** The loyalty program is on. */
152
309
  is_loyalty_enabled?: boolean;
310
+ /** Public keys for third-party services. */
153
311
  keys?: {
312
+ /** Maps API key for the storefront. */
154
313
  maps?: string;
314
+ /** Google Tag Manager container ids. */
155
315
  gtm?: string[];
156
- /** Sift Science beacon key for fraud detection - TODO: add to API response */
316
+ /** Sift Science beacon key for fraud detection. Not yet sent by the API. */
157
317
  sift?: string;
158
318
  };
319
+ /** The store uses the Salla payment gateway. */
159
320
  is_salla_gateway?: boolean;
321
+ /** Maximum upload size. */
160
322
  upload_size?: number;
323
+ /** Tax details. */
161
324
  tax?: {
325
+ /** Tax registration number. */
162
326
  number?: string;
327
+ /** Tax certificate image URL, or null. */
163
328
  certificate?: string | null;
329
+ /** Prices include tax. */
164
330
  taxable_prices_enabled: boolean;
165
331
  };
332
+ /** Commerce certificate details, or null. */
166
333
  certificate?: {
334
+ /** Commerce certificate id. */
167
335
  id: string;
168
336
  } | null;
337
+ /** Show the "Made in KSA" mark. */
169
338
  made_in_ksa?: boolean;
339
+ /** Commercial registration number, or null. */
170
340
  commercial_number?: string | null;
341
+ /** Freelance license number, or null. */
171
342
  freelance_number?: string | null;
172
- buy_now?: string | null;
173
- installments?: string | null;
174
- quick_order?: string | null;
175
- bullet_delivery?: string | null;
343
+ /** Fast-checkout (Apple Pay style) configuration object, or null when off. Typed `string | null` in older releases; the API sends an object. */
344
+ buy_now?: BuyNowSettings | string | null;
345
+ /** Installment providers. An empty array means none, and an empty array is truthy. */
346
+ installments?: unknown[] | Record<string, unknown> | string | null;
347
+ /** Quick-order configuration, or null when off. */
348
+ quick_order?: Record<string, unknown> | string | null;
349
+ /** Fast ("bullet") delivery configuration, or null when off. */
350
+ bullet_delivery?: Record<string, unknown> | string | null;
351
+ /** Support tickets are on. */
176
352
  ticketing_system_enabled?: boolean;
177
- /** Opening hours configuration for receiving orders - TODO: add to API response */
353
+ /** Opening hours for receiving orders. Not yet sent by the API. */
178
354
  opening_hours?: OpeningHoursSettings;
179
- /** Feature flags - TODO: add to API response */
355
+ /** Feature flags. Not yet sent by the API. */
180
356
  features?: {
357
+ /** Customers can ask for a price quote. */
181
358
  price_quote?: boolean;
359
+ /** Pre-order campaigns are available. */
182
360
  'pre-order-campaigns'?: boolean;
183
361
  };
184
362
  }
363
+ export interface ProductFiltersSettings {
364
+ /** Filter by category. */
365
+ category_id?: boolean;
366
+ /** Filter by brand. */
367
+ brand_id?: boolean;
368
+ /** Filter by price range. */
369
+ price?: boolean;
370
+ /** Filter by product variants. */
371
+ variants?: boolean;
372
+ /** Filter by rating. */
373
+ rating?: boolean;
374
+ /** Filter by tag. */
375
+ tag_name?: boolean;
376
+ [filter: string]: boolean | undefined;
377
+ }
378
+ /** Shape of `store.settings.buy_now` when the fast-checkout button is on. */
379
+ export interface BuyNowSettings {
380
+ /** Button label. */
381
+ label?: string;
382
+ /** Store country code used by the payment sheet. */
383
+ countryCode?: string;
384
+ /** Countries the fast-checkout button supports. */
385
+ supportedCountries?: string[];
386
+ /** Card networks the payment sheet supports. */
387
+ supportedNetworks?: string[];
388
+ /** URL the merchant session is validated against. */
389
+ validateUri?: string;
390
+ /** Whether the MyFatoorah server-to-server flow is used. */
391
+ myfatoorahS2s?: boolean;
392
+ /** Currency code of the payment. */
393
+ currency?: string;
394
+ /** Card networks accepted. */
395
+ networks?: string[];
396
+ /** Countries where the button is offered. */
397
+ countries?: string[];
398
+ /** Whether the product is digital, so no shipping is needed. */
399
+ is_digital?: boolean;
400
+ /** Merchant identifier registered with the payment provider. */
401
+ merchant_identifier?: string;
402
+ [key: string]: unknown;
403
+ }
185
404
  /**
186
405
  * Opening hours settings for receiving orders.
187
406
  * Uses the Spatie\OpeningHours format (day names as keys).
188
407
  * TODO: add to API response
189
408
  */
190
409
  export interface OpeningHoursSettings {
191
- /** Whether the opening hours feature is enabled */
410
+ /** The store only takes orders during opening hours. */
192
411
  enabled?: boolean;
193
- /** Opening hours per day. Keys are lowercase day names (monday, tuesday, etc.) */
412
+ /** Time ranges per lowercase day name (monday, tuesday, ...). A day with no entry or an empty list is closed. */
194
413
  hours?: Record<string, string[]>;
195
414
  }
196
415
  export interface StoreScope {
416
+ /** Scope id. */
197
417
  id?: number;
418
+ /** Market or branch name. */
198
419
  name: string;
420
+ /** This scope is the active one. */
199
421
  selected?: boolean;
422
+ /** Scope type, such as a branch. */
200
423
  type?: string;
424
+ /** The scope is open. */
201
425
  is_open?: boolean;
426
+ /** How the scope selector is shown. */
202
427
  display_as: 'popup' | 'inline' | 'default';
203
428
  /** Available language codes (lowercase, e.g., ["ar", "en"]) */
204
429
  languages?: string[];
@@ -206,106 +431,184 @@ export interface StoreScope {
206
431
  currencies?: string[];
207
432
  /** Available country codes (uppercase ISO, e.g., ["SA", "AE"]) */
208
433
  countries?: string[];
434
+ /** Ask the visitor to choose a scope. */
209
435
  always_ask?: boolean;
436
+ /** Allocation details sent by the platform, or null; its shape is not typed. */
210
437
  allocation?: unknown | null;
211
438
  }
212
439
  export interface Theme {
213
- /** May be absent in some API responses; treat as optional. */
440
+ /** Theme id. Not sent by the settings API (absent on the demo store); treat as optional. */
214
441
  id?: number;
442
+ /** Theme name. The engine adds it to `<body>` as the class `salla-<name>`. */
215
443
  name: string;
444
+ /** The merchant's theme profile (the saved set of choices). */
216
445
  profile?: {
446
+ /** Profile id. */
217
447
  id: number;
448
+ /** Profile name, or null. */
218
449
  name: string | null;
219
450
  };
451
+ /** 'preview' while the merchant previews a draft (the engine adds the body class `preview-mode`), otherwise 'live'. */
220
452
  mode: 'live' | 'preview' | string;
453
+ /** Whether the theme reads right to left. */
221
454
  is_rtl: boolean;
455
+ /** Brand colors of the theme. */
222
456
  color: ThemeColor;
457
+ /** Merchant values for the theme's settings. */
223
458
  settings: ThemeSettings;
459
+ /** URL template of the theme's published files; `:path` stands for the file path. */
224
460
  assets?: string;
461
+ /** URL template of component bundles (`:bundle`, `:component`). */
225
462
  bundle_assets?: string;
463
+ /** The merchant's custom CSS and JS, as a URL or inline code. The engine loads them for you. */
226
464
  customization?: {
465
+ /** Custom CSS, or null. */
227
466
  css?: string | null;
467
+ /** Custom JS, or null. */
228
468
  js?: string | null;
229
469
  };
470
+ /** Whether the merchant turned on the side menu. */
230
471
  side_menu_enabled?: boolean | null;
231
472
  /** Platform-pinned twilight SDK release, served from the production CDN. */
232
473
  twilight?: {
474
+ /** The pinned SDK version, or null. */
233
475
  version?: string | null;
234
476
  };
477
+ /** The selected font. Can be missing. */
235
478
  font?: ThemeFont;
479
+ /** Not typed and empty on the demo store. Home blocks do not come from here. */
236
480
  components?: unknown[];
481
+ /** Sent by the platform, usually null. Use `color.is_dark` instead. */
237
482
  isDark?: boolean | null;
238
483
  /** Hash of current translations for cache invalidation */
239
484
  translations_hash?: string;
240
485
  }
241
486
  export interface ThemeColor {
487
+ /** Primary brand color. */
242
488
  primary: string;
489
+ /** Text color chosen for the theme. */
243
490
  text: string;
491
+ /** Dark color scheme. The engine adds `color-mode-dark` or `color-mode-light` to `<body>`. */
244
492
  is_dark: boolean;
493
+ /** The reverse counterpart of the primary color. */
245
494
  reverse_primary: string;
495
+ /** Text color to put on top of `primary`. */
246
496
  reverse_text: string;
247
497
  }
248
498
  export interface ThemeFont {
499
+ /** Font id. */
249
500
  id?: number;
501
+ /** Font family name. */
250
502
  name: string;
503
+ /** Relative path of the stylesheet that loads the font. */
251
504
  path?: string;
505
+ /** Stylesheet URL that loads the font. */
252
506
  url?: string;
507
+ /** Source of the font. `theme.font` sends a string, `theme.settings.font` a number. */
253
508
  type?: string | number;
509
+ /** CSS family name. Present on `settings.font`, not on `theme.font`. */
254
510
  family_name?: string;
255
511
  }
256
512
  export interface ThemeSettings {
513
+ /** The selected font. */
257
514
  font?: ThemeFont;
515
+ /** Zoom on the product gallery. */
258
516
  imageZoom?: boolean;
517
+ /** Show product tags. */
259
518
  show_tags?: boolean;
519
+ /** Brand color value. Platform-managed. */
260
520
  store_color?: string;
521
+ /** Whether the merchant has custom JS. Platform-managed. */
261
522
  is_custom_js?: boolean;
523
+ /** Whether the merchant has custom CSS. Platform-managed. */
524
+ is_custom_css?: boolean;
525
+ /** Kind of home page. Platform-managed. */
262
526
  homepage_type?: string;
527
+ /** Installed theme version. Platform-managed. */
263
528
  theme_version?: string;
529
+ /** Dark footer. Adds `footer-is-dark` or `footer-is-light` to `<body>`. */
264
530
  footer_is_dark?: boolean;
531
+ /** Dark top bar. Adds the body class `topnav-is-dark`. */
265
532
  topnav_is_dark?: boolean;
533
+ /** Show the Saudi riyal symbol instead of the currency code. */
266
534
  use_sar_symbol?: boolean;
535
+ /** Show the important-links block. Platform-managed. */
267
536
  important_links?: boolean;
537
+ /** Font type of the store. Platform-managed. */
268
538
  store_font_type?: string;
539
+ /** Footer menu variant. Platform-managed. */
269
540
  footer_menu_type?: string;
541
+ /** Keep the main menu at the top while scrolling. */
270
542
  header_is_sticky?: boolean;
271
- /** Breadcrumb trail on the product page / product list pages (default on). */
543
+ /** Breadcrumb trail on the product page (default on). */
272
544
  product_show_breadcrumbs?: boolean;
545
+ /** Breadcrumb trail on product list pages (default on). */
273
546
  product_index_show_breadcrumbs?: boolean;
274
547
  /** Out-of-stock cards offer "notify me when available" (default on). */
275
548
  notify_when_available_in_card?: boolean;
549
+ /** Header menu variant. Platform-managed. */
276
550
  header_menu_type?: string;
551
+ /** Header layout variant of the reference theme. */
277
552
  header_layout?: 'lite' | 'default';
553
+ /** Footer layout variant of the reference theme. */
278
554
  footer_layout?: 'columns' | 'centered';
555
+ /** Product card image ratio. Either shape can arrive. */
279
556
  product_card_img_ratio?: string | {
280
557
  value?: string;
281
558
  }[];
559
+ /** Name of the default font. Platform-managed. */
282
560
  default_font_name?: string;
561
+ /** Sticky add-to-cart bar on mobile. Adds `is-sticky-product-bar` to `<body>`. */
283
562
  sticky_add_to_cart?: boolean;
284
- customization_js_ver?: number;
563
+ /** Version of the merchant's custom JS, or null. Platform-managed. */
564
+ customization_js_ver?: number | null;
565
+ /** Version of the merchant's custom CSS, or null. Platform-managed. */
566
+ customization_css_ver?: number | null;
567
+ /** Hash of current translations (also sent at `theme.translations_hash`). */
568
+ translations_hash?: string;
569
+ /** The "All" button on home blocks. */
285
570
  is_more_button_enabled?: boolean;
571
+ /** How product gallery images fit their frame. */
286
572
  slider_background_size?: 'cover' | 'contain';
573
+ /** Show products in a vertical fixed layout. */
287
574
  vertical_fixed_products?: boolean;
575
+ /** Custom widgets are enabled. */
288
576
  is_custom_widgets_enabled?: boolean;
577
+ /** How images fit in the square-photos block. */
289
578
  squar_photo_bg_image_size?: 'cover' | 'contain';
579
+ /** Show the "more details" control. */
290
580
  is_show_more_detail_enabled?: boolean;
581
+ /** Breadcrumbs on or off. */
291
582
  is_breadcrumbs_enabled?: boolean;
292
583
  /** Image the SDK's product cards show when a product has none. */
293
584
  placeholder?: string;
585
+ /** Show a toast after adding to the cart. */
294
586
  enable_add_product_toast?: boolean;
587
+ /** Show the "More" menu. */
295
588
  enable_more_menu?: boolean;
296
589
  }
297
590
  export interface CurrencyConfig {
591
+ /** Currency code. */
298
592
  code: string;
593
+ /** Currency name. */
299
594
  name: string;
595
+ /** Currency symbol. */
300
596
  symbol: string;
597
+ /** Exchange rate against the store's base currency. */
301
598
  amount: number;
599
+ /** Country code of the currency's flag. */
302
600
  country_code: string;
303
601
  }
304
602
  export interface LanguageConfig {
603
+ /** Language name written in that language. */
305
604
  name: string;
605
+ /** Language code. */
306
606
  code: string;
607
+ /** URL of the language's flag icon, not a store page. */
307
608
  url: string;
609
+ /** Whether the language is written right to left. */
308
610
  is_rtl: boolean;
611
+ /** Country code used to pick the flag. */
309
612
  country_code: string;
310
613
  /** @see Language.has_custom_translations — the same field, same payload. */
311
614
  has_custom_translations?: boolean;
@@ -365,311 +668,551 @@ export interface BootData {
365
668
  swoole: string[];
366
669
  policy_url: string;
367
670
  }
671
+ /**
672
+ * `auth/user` needs a logged-in session, so the key names could not be checked against
673
+ * the public demo store. The user API test fixture (`tests/api/user.test.ts`) sends
674
+ * `currency` / `language`, while engine code (`useGtm`) reads `currency_code`. Both
675
+ * spellings are declared, optional, until the real response is confirmed.
676
+ */
368
677
  export interface UserPreferences {
369
- currency_code: string;
370
- language_code: string;
678
+ /** Currency the customer chose. */
679
+ currency_code?: string;
680
+ /** Language the customer chose. */
681
+ language_code?: string;
682
+ /** Currency the customer chose, under the other key the API may use. */
683
+ currency?: string;
684
+ /** Language the customer chose, under the other key the API may use. */
685
+ language?: string;
686
+ /** Whether the customer's name is visible to others. */
371
687
  name_visible: boolean;
688
+ /** Whether the customer accepts marketing messages. */
372
689
  notifications_enabled: boolean;
373
690
  }
374
691
  export interface UserSocialAccount {
692
+ /** The customer's id at that provider. */
375
693
  provider_id: string;
694
+ /** Provider name, such as "google". */
376
695
  provider: string;
696
+ /** Whether the account is currently linked. */
377
697
  linked: boolean;
378
698
  }
379
699
  export interface User {
700
+ /** Kind of customer. `useUser` only ever gives 'user'; a guest is null. */
380
701
  type: 'guest' | 'user';
702
+ /** Customer id. */
381
703
  id?: number;
704
+ /** First name. */
382
705
  first_name?: string;
706
+ /** Last name. */
383
707
  last_name?: string;
708
+ /** Email address. */
384
709
  email?: string;
710
+ /** Mobile number with the country prefix. */
385
711
  mobile?: string;
712
+ /** Avatar image URL. */
386
713
  avatar?: string;
714
+ /** Country of the customer. */
387
715
  country_code?: string;
716
+ /** Gender as saved in the profile. */
388
717
  gender?: string;
718
+ /** Birthday, or null. */
389
719
  birthday?: string | null;
720
+ /** When the account was created, as Unix seconds. */
390
721
  created_at?: number;
722
+ /** The customer's saved preferences. */
391
723
  preferences?: UserPreferences;
724
+ /** Linked social sign-in accounts. */
392
725
  social_accounts?: UserSocialAccount[];
393
726
  }
394
727
  export type ProductType = 'product' | 'service' | 'group_products' | 'codes' | 'digital' | 'food' | 'donating' | 'booking' | 'financial_support';
395
728
  export type ProductStatus = 'sale' | 'out' | 'out-and-notify' | 'hidden';
396
729
  export interface Product {
730
+ /** Product id. Number on `products/{id}/details`, but a numeric STRING on list responses (`products`, e.g. "677709975"). Typed `number`: use `Number(product.id)` when you compare ids from a list item. */
397
731
  id: number;
732
+ /** Product name in the current language. */
398
733
  name: string;
734
+ /** Product description, as HTML. May be empty. */
399
735
  description: string;
736
+ /** Absolute URL of the product page. */
400
737
  url: string;
738
+ /** Badge text the merchant set. Can be "" or null. */
401
739
  promotion_title?: string;
740
+ /** Short line under the name. */
402
741
  subtitle?: string;
742
+ /** Product type. */
403
743
  type: ProductType;
744
+ /** Product availability status. */
404
745
  status: ProductStatus;
746
+ /** Weight with its unit, as text. */
405
747
  weight?: string | null;
748
+ /** Calories, for food products. */
406
749
  calories?: number | null;
750
+ /** Merchant SKU. Can be "" or null. */
407
751
  sku?: string | null;
752
+ /** Barcode. Can be "" or null. */
408
753
  barcode?: string | null;
754
+ /** Manufacturer part number. Can be "" or null. */
409
755
  mpn?: string | null;
756
+ /** Global trade item number. Can be "" or null. */
410
757
  gtin?: string | null;
758
+ /** What the customer pays now. Show this when the product is not on sale. */
411
759
  price: number | string;
412
- sale_price: number;
760
+ /** The discounted price. `null` on list responses when the product is not on sale; `0` on `products/{id}/details` in the same case. Check `is_on_sale` rather than the truthiness of this field. */
761
+ sale_price: number | null;
762
+ /** The price before the discount. */
413
763
  regular_price: number;
764
+ /** Lowest SKU price of a product with variants, otherwise null. */
414
765
  starting_price?: number | null;
766
+ /** Price in the store's base currency. */
415
767
  base_currency_price: {
768
+ /** Currency code of the base currency. */
416
769
  currency: string;
770
+ /** Amount in the base currency. */
417
771
  amount: number;
418
772
  } | number;
773
+ /** Currency code of the prices. */
419
774
  currency: string;
775
+ /** Declared but never sent by the Salla API (absent on list and detail). Compute it from `regular_price` and `price`. */
420
776
  discount_percentage?: string;
777
+ /** Price as a plain float. */
421
778
  price_as_float?: number;
779
+ /** Price as a plain float, as used for payment. */
422
780
  price_as_float_for_payment?: number;
781
+ /** Currency code used for payment. */
423
782
  currency_for_payment?: string;
783
+ /** Stock on hand. `-1` means UNLIMITED stock (what `products/{id}/details` sends for products without a tracked quantity), not "one short". List responses send `null` and expose `unlimited_quantity` instead. */
424
784
  quantity?: number | null;
785
+ /** Units sold. Absent or null when not shown. */
425
786
  sold_quantity?: number;
787
+ /** Most the customer can add to the cart. Null on list responses. */
426
788
  max_quantity: number;
789
+ /** When the discount ends. */
427
790
  discount_ends?: string;
791
+ /** Reviews summary. Null on the demo store. */
428
792
  rating?: ProductRating;
793
+ /** The product's category. */
429
794
  category?: ProductCategory;
795
+ /** The product's brand. */
430
796
  brand?: ProductBrand;
797
+ /** The product's tags. Empty when there are none. */
431
798
  tags?: ProductTag[];
799
+ /** The main image. On list items it has only `url`. */
432
800
  image: ProductImage;
801
+ /** The image gallery. Detail responses only. */
433
802
  images?: ProductImage[];
803
+ /** Options the customer picks, such as size or color. Detail responses only. */
434
804
  options?: ProductOption[];
805
+ /** Variant rows. Present only when requested with `with[]=skus`. */
435
806
  skus?: ProductSku[];
807
+ /** "Notify me when available" settings and subscription state. Detail responses only. */
436
808
  notify_availability?: NotifyAvailability;
809
+ /** Donation progress, for products of type 'donating'. */
437
810
  donation?: ProductDonation;
811
+ /** Tax applies to the product. */
438
812
  is_taxable: boolean;
813
+ /** The description is long: collapse it behind "Read more". */
439
814
  has_read_more: boolean;
815
+ /** The add-to-cart form shows a note field. */
440
816
  can_add_note: boolean;
817
+ /** Whether to show `quantity` to customers. */
441
818
  can_show_remained_quantity: boolean;
819
+ /** Declared but never sent by the Salla API (absent on list and detail). */
442
820
  can_show_sold?: boolean;
821
+ /** The add-to-cart form shows a file upload. */
443
822
  can_upload_file: boolean;
823
+ /** The merchant added a custom form to the product. */
444
824
  has_custom_form: boolean;
825
+ /** The product has extra spec data. */
445
826
  has_metadata: boolean;
827
+ /** The product has options. */
446
828
  has_options?: boolean;
829
+ /** The product is a bundle of other products. */
447
830
  has_bundle_products?: boolean;
831
+ /** A discount is active. */
448
832
  is_on_sale: boolean;
449
- is_hidden_quantity: boolean;
833
+ /** The quantity input is hidden (the customer buys one). Sent on `products/{id}/details` only. List responses use the misspelled `is_hidded_quantity`. */
834
+ is_hidden_quantity?: boolean;
835
+ /** The API's own (misspelled) name for `is_hidden_quantity` on list responses. */
836
+ is_hidded_quantity?: boolean;
837
+ /** The product can be bought. */
450
838
  is_available: boolean;
839
+ /** Whether the product is in the wishlist. Prefer `useWishlist` over reading this. */
451
840
  is_in_wishlist?: boolean;
841
+ /** The customer cannot buy it now. */
452
842
  is_out_of_stock: boolean;
843
+ /** The product needs shipping. */
453
844
  is_require_shipping: boolean;
845
+ /** The product has a 3D image. */
454
846
  has_3d_image?: boolean;
847
+ /** A size guide exists for the product. */
455
848
  has_size_guide: boolean;
849
+ /** The product can be bought as a gift. */
456
850
  giftable?: boolean;
851
+ /** Show a "buy now" button. */
457
852
  can_quick_buy?: boolean;
853
+ /** Show the product's availability state. */
458
854
  show_availability?: boolean;
855
+ /** A pre-order campaign is active. */
459
856
  has_preorder_campaign?: boolean;
857
+ /** The product is a wallet gift card. Sent on `products/{id}/details`. */
858
+ is_wallet_gift_card?: boolean;
859
+ /** The product can be picked up. */
860
+ supports_pickup?: boolean;
861
+ /** The product can be delivered. */
862
+ supports_delivery?: boolean;
863
+ /** Products bundled into this one (bundle products); `null`/absent otherwise. */
864
+ included_products?: Product[] | null;
865
+ /** Custom add-to-cart button label. Not sent by the demo store. */
460
866
  add_to_cart_label?: string;
867
+ /** The customer's note for the product. */
461
868
  notes?: string;
869
+ /** File settings of a digital product. */
462
870
  digital_files_settings?: JsonObject;
871
+ /** Pre-order details; `preorder.label` is shown as the card badge. */
463
872
  preorder?: JsonObject;
464
873
  }
465
874
  export interface ProductRating {
875
+ /** Number of ratings. */
466
876
  count: number;
877
+ /** Average star rating. */
467
878
  stars: number;
468
879
  }
469
880
  export interface ProductCategory {
881
+ /** Category id. */
470
882
  id?: number;
883
+ /** Category name. Can be null on list responses. */
471
884
  name: string;
885
+ /** Category page URL. Can be null on list responses. */
472
886
  url: string;
887
+ /** CSS icon class of the category. */
473
888
  icon?: string;
889
+ /** Category image URL, or null. */
474
890
  image?: string | null;
891
+ /** Child categories. */
475
892
  sub_categories?: Category[];
476
893
  }
477
894
  export interface ProductBrand {
895
+ /** Brand id. A slug string on the demo store. */
478
896
  id: number;
897
+ /** Brand name. */
479
898
  name?: string;
899
+ /** Brand description. */
480
900
  description?: string;
901
+ /** Brand page URL. */
481
902
  url?: string;
903
+ /** Brand logo URL. */
482
904
  logo?: string;
483
905
  }
484
906
  export interface ProductTag {
907
+ /** Tag id. */
485
908
  id?: number;
909
+ /** Tag text. */
486
910
  name: string;
911
+ /** Tag page URL. */
487
912
  url: string;
488
913
  }
489
914
  export interface ProductImage {
915
+ /** Image id. */
490
916
  id?: number;
917
+ /** Image URL. */
491
918
  url?: string;
919
+ /** Alt text; usually the product name. */
492
920
  alt?: string;
921
+ /** Video URL when the item is a video, otherwise null. */
493
922
  video_url?: string;
923
+ /** Media kind. The API also sends '3d-image' for a 3D main image. */
494
924
  type?: 'image' | 'video';
925
+ /** `.glb` 3D model URL, or "" when none. */
495
926
  three_d_image_url?: string;
927
+ /** True for the main image. */
496
928
  main?: boolean;
929
+ /** Position in the gallery. */
497
930
  sort?: number;
498
931
  }
499
932
  export interface ProductOption {
933
+ /** Option id. */
500
934
  id: number;
935
+ /** Option label. */
501
936
  name: string;
502
- type: 'text' | 'textarea' | 'radio' | 'checkbox' | 'select' | 'image' | 'color' | string;
937
+ /** Kind of input. Unknown types should be treated as a plain list. */
938
+ type: 'text' | 'textarea' | 'radio' | 'checkbox' | 'select' | 'image' | 'color' | 'thumbnail' | 'single-option' | string;
939
+ /** The customer must choose a value. */
503
940
  required: boolean;
504
- /** Listing shape. Absent on `products/{id}/details`, which sends `details` instead. */
941
+ /** Values in the older listing shape. Absent on `products/{id}/details`, which sends `details` instead. */
505
942
  values?: ProductOptionValue[];
943
+ /** Values on a detail response. */
506
944
  details?: ProductOptionDetail[];
507
945
  }
508
946
  export interface ProductOptionDetail {
947
+ /** Value id. This is what a SKU's `related_option_values` lists. */
509
948
  id: number;
949
+ /** Value label. */
510
950
  name: string;
951
+ /** Id of the option the value belongs to. */
511
952
  option_id: number;
953
+ /** Extra price when this value is picked. */
512
954
  additional_price: number;
955
+ /** The raw value: a color hex, an image id, or "". */
513
956
  option_value: string;
957
+ /** Image URL, or the hex for a color. */
514
958
  image: string;
959
+ /** Color hex for `color` options. */
515
960
  color: string;
961
+ /** Merchant code of the value. */
516
962
  code: string;
963
+ /** This value is out of stock. */
517
964
  is_out: boolean;
965
+ /** 1 for the preselected value, otherwise 0. */
518
966
  is_default: 0 | 1;
967
+ /** SKU id to in-stock flag, for the SKUs that use this value. */
519
968
  skus_availability: Record<string, boolean>;
520
969
  }
521
970
  /** Variant rows from `products/{id}/details?with[]=skus`. */
522
971
  export interface ProductSku {
972
+ /** SKU id. */
523
973
  id: number;
974
+ /** Id of the parent product. */
524
975
  product_id: number;
976
+ /** SKU price as a `{ amount, currency }` object. */
525
977
  price: Money;
978
+ /** SKU price before any discount. */
526
979
  regular_price: Money;
980
+ /** Discounted SKU price, or null when not discounted. */
527
981
  sale_price: Money | null;
982
+ /** A discount applies to this SKU. */
528
983
  has_special_price: boolean;
984
+ /** Stock on hand, or null when unlimited. */
529
985
  stock_quantity: number | null;
986
+ /** Stock is not tracked. */
530
987
  unlimited_quantity: boolean;
988
+ /** This is the default SKU. */
531
989
  is_default: boolean;
990
+ /** Ids of the options the SKU is made of. */
532
991
  related_options: number[];
992
+ /** Ids of the option values that select this SKU. */
533
993
  related_option_values: number[];
534
994
  }
535
995
  export interface ProductOptionValue {
996
+ /** Value id. */
536
997
  id: number;
998
+ /** Value label. */
537
999
  name: string;
1000
+ /** Extra price when this value is picked. */
538
1001
  price?: number;
1002
+ /** Image URL of the value. */
539
1003
  image_url?: string;
1004
+ /** Image URL of the value. */
540
1005
  image?: string;
1006
+ /** This value is preselected. */
541
1007
  is_selected?: boolean;
542
1008
  }
543
1009
  export interface NotifyAvailability {
1010
+ /** Channels the customer can be notified through. */
544
1011
  channels: ('sms' | 'email' | string)[];
1012
+ /** The customer has asked to be notified. */
545
1013
  subscribed: boolean;
1014
+ /** Options the customer subscribed to, when they subscribed per option. */
546
1015
  subscribed_options?: number[] | JsonObject;
1016
+ /** Whether subscription is offered per option. */
547
1017
  options?: boolean;
548
1018
  }
549
1019
  export interface ProductDonation {
1020
+ /** Message shown with the donation goal. */
550
1021
  target_message?: string;
1022
+ /** Amount collected so far. */
551
1023
  collected_amount: number;
1024
+ /** Amount the donation aims to collect. */
552
1025
  target_amount: number;
1026
+ /** Progress towards the goal, as a percentage. */
553
1027
  target_percent: number;
1028
+ /** When the donation campaign ends. */
554
1029
  target_end_date?: string;
1030
+ /** Donations are currently accepted. `ProductCard` hides the price when this is true. */
555
1031
  can_donate: boolean;
556
1032
  }
557
1033
  export interface Cart {
558
- /** Twig: string — matches API string cart ID (SDK CartSummary incorrectly types this as number) */
1034
+ /** Cart id. Twig: string — matches API string cart ID (SDK CartSummary incorrectly types this as number) */
559
1035
  id: string;
560
- /** Present in SDK CartSummary; not documented in Twig docblock */
1036
+ /** Number of items. Present in SDK CartSummary; not documented in Twig docblock */
561
1037
  count: number;
1038
+ /** The cart lines. An empty array means an empty cart. */
562
1039
  items: CartItem[];
1040
+ /** Items total, the first row of the order summary. */
563
1041
  sub_total: number;
1042
+ /** Final amount. */
564
1043
  total: number | string;
1044
+ /** Discount amount. */
565
1045
  discount: number;
1046
+ /** Applied coupon code, or null. */
566
1047
  coupon?: string | null;
1048
+ /** Tax amount. */
567
1049
  tax_amount: number;
1050
+ /** Whether anything in the cart needs shipping. */
568
1051
  is_require_shipping?: boolean;
1052
+ /** Whether a shipping cost applies now. */
569
1053
  has_shipping: boolean;
1054
+ /** The shipping cost. */
570
1055
  real_shipping_cost: number;
1056
+ /** Progress towards free shipping. Null or missing when the store does not offer it. */
571
1057
  free_shipping_bar?: FreeShippingBar | null;
1058
+ /** Order-level options. */
572
1059
  options: CartOption[];
1060
+ /** Total price of the order-level options. */
573
1061
  options_total?: number | null;
1062
+ /** Discount row of the order summary. Often 0, null or missing: test with `!!`. */
574
1063
  total_discount?: number | null;
575
1064
  /** React-only runtime flag — triggers a client-side cart re-fetch after mutations */
576
1065
  should_refresh?: boolean;
577
- /**
578
- * Twig exposes `gift` as a top-level page variable, not nested inside `cart`.
579
- * The REST API returns it inside the cart object, so the loader maps it here.
580
- */
1066
+ /** Gifting settings, or null. Twig exposes `gift` as a top-level page variable, not nested inside `cart`; the REST API returns it inside the cart object, so the loader maps it here. */
581
1067
  gift?: {
1068
+ /** Gifting is on. */
582
1069
  enabled: boolean;
1070
+ /** Gift message text. */
583
1071
  text?: string;
1072
+ /** Gift type. */
584
1073
  type?: string;
585
1074
  } | null;
586
- /**
587
- * Twig exposes `loyalty` as a top-level page variable, not nested inside `cart`.
588
- * The REST API returns it inside the cart object, so the loader maps it here.
589
- */
1075
+ /** The loyalty reward the customer can win, or null. Twig exposes `loyalty` as a top-level page variable, not nested inside `cart`; the REST API returns it inside the cart object, so the loader maps it here. */
590
1076
  loyalty?: {
1077
+ /** The reward. */
591
1078
  prize: {
1079
+ /** Points the reward costs. */
592
1080
  points: number;
1081
+ /** Reward title. */
593
1082
  title: string;
594
1083
  };
595
1084
  } | null;
596
1085
  }
597
1086
  export interface CartItem {
598
- /** Twig docblock says `int`; API returns numeric string IDs — kept as string for safe attribute binding */
1087
+ /** Line id. Use it to update or remove the line, not `product_id`. Twig docblock says `int`; API returns numeric string IDs — kept as string for safe attribute binding */
599
1088
  id: string;
1089
+ /** Id of the product. */
600
1090
  product_id: number;
1091
+ /** Product name. */
601
1092
  product_name: string;
1093
+ /** Image URL (a plain string, not an image object). */
602
1094
  product_image: string;
1095
+ /** Product page URL. */
603
1096
  url: string;
1097
+ /** Quantity in the cart. */
604
1098
  quantity: number;
1099
+ /** Most the customer can buy. */
605
1100
  max_quantity?: number;
1101
+ /** Product type, such as "product" or "donating". */
606
1102
  type: ProductType | string;
1103
+ /** Unit price the customer pays. */
607
1104
  price: number | Money;
1105
+ /** Unit price of the product. */
608
1106
  product_price: number | Money;
1107
+ /** Price before a sale. */
609
1108
  original_price?: number | Money;
1109
+ /** Line total. */
610
1110
  total: number | Money;
1111
+ /** Line total after tiered offers. */
611
1112
  total_special_price?: number | Money;
1113
+ /** Readable weight, such as "2 kg". */
612
1114
  weight_label?: string;
1115
+ /** The customer's note. */
613
1116
  notes?: string;
1117
+ /** False when the product is out of stock. */
614
1118
  is_available: boolean;
1119
+ /** When true, show the quantity as text instead of a stepper. */
615
1120
  is_hidden_quantity: boolean;
1121
+ /** A sale price applies. */
616
1122
  is_on_sale?: boolean;
1123
+ /** A discount applies. */
617
1124
  has_discount?: boolean;
1125
+ /** The product accepts a note. */
618
1126
  can_add_note: boolean;
1127
+ /** The product accepts file attachments. */
619
1128
  can_upload_file: boolean;
1129
+ /** A simple offer on this line, or null. */
620
1130
  offer?: CartItemOffer | null;
1131
+ /** Detailed offers, shown by the offers component. */
621
1132
  detailed_offers?: JsonObject[] | null;
1133
+ /** Donation data when `type` is "donating". */
622
1134
  donation?: JsonObject | null;
1135
+ /** Files the customer uploaded. */
623
1136
  attachments?: CartItemAttachment[];
1137
+ /** The options the customer picked. */
624
1138
  options?: CartItemOption[];
625
- /** TODO: add to API response — indicates item has an active pre-order campaign */
1139
+ /** Item has an active pre-order campaign. TODO: add to API response */
626
1140
  has_pre_order_campaign?: boolean;
627
1141
  }
628
1142
  export interface CartItemOption {
1143
+ /** Option id. */
629
1144
  id: number;
1145
+ /** Option name. */
630
1146
  name?: string;
1147
+ /** Chosen value. */
631
1148
  value?: string;
1149
+ /** Quantity, when the option has one. */
632
1150
  quantity?: number;
1151
+ /** Nested option details. */
633
1152
  options?: Record<string, string | number | boolean>[];
634
1153
  }
635
1154
  export interface CartItemOffer {
1155
+ /** Discount amount. */
636
1156
  discount: number;
1157
+ /** The item is free. */
637
1158
  is_free: boolean;
1159
+ /** Offer name to show. */
638
1160
  names?: string;
639
1161
  }
640
1162
  export interface CartItemAttachment {
1163
+ /** Attachment id. */
641
1164
  id: number;
1165
+ /** File URL. */
642
1166
  url: string;
1167
+ /** Product the file belongs to. */
643
1168
  product_id: number;
1169
+ /** Cart line the file belongs to. */
644
1170
  item_id: number;
645
- /** Twig docblock incorrectly types this as `int` — it is a filename string */
1171
+ /** File name. Twig docblock incorrectly types this as `int` — it is a filename string */
646
1172
  name: string;
647
1173
  }
648
1174
  export interface FreeShippingBar {
1175
+ /** Cart value needed for free shipping. */
649
1176
  minimum_amount: number;
1177
+ /** True once the customer has reached it. */
650
1178
  has_free_shipping: boolean;
1179
+ /** Progress from 0 to 100, ready for a bar width. */
651
1180
  percent: number;
1181
+ /** Amount still missing. It is a plain number: format it yourself. */
652
1182
  remaining: number;
653
1183
  }
654
1184
  export interface CartOption {
1185
+ /** Option id. */
655
1186
  id: number;
1187
+ /** Option name. */
656
1188
  name?: string;
1189
+ /** Chosen value. */
657
1190
  value?: string;
1191
+ /** Quantity, when the option has one. */
658
1192
  quantity?: number;
1193
+ /** Nested option details. */
659
1194
  options?: Record<string, string | number | boolean>[];
660
1195
  }
661
1196
  export interface Money {
1197
+ /** The amount as a number. */
662
1198
  amount: number;
1199
+ /** Currency code. */
663
1200
  currency: string;
1201
+ /** Ready-made text, when the API sends one. */
664
1202
  formatted?: string;
665
1203
  }
666
1204
  export interface Breadcrumb {
1205
+ /** Label. */
667
1206
  name: string;
1207
+ /** Link target. */
668
1208
  url: string;
669
1209
  }
670
1210
  export interface Page {
1211
+ /** Page title. */
671
1212
  title: string;
1213
+ /** Route id of the page, such as "product.single". */
672
1214
  slug: string;
1215
+ /** Page description. */
673
1216
  description?: string;
674
1217
  /** Entity ID associated with the page (e.g. category ID on a category page). */
675
1218
  id?: string | number;
@@ -677,38 +1220,48 @@ export interface Page {
677
1220
  url?: string;
678
1221
  /** Parent entity, if any. */
679
1222
  parent?: {
1223
+ /** Parent entity id. */
680
1224
  id: string | number;
1225
+ /** Parent entity name. */
681
1226
  name: string;
1227
+ /** Parent entity URL. */
682
1228
  url: string;
683
1229
  } | null;
684
1230
  /** Breadcrumb trail built by the route loader. If omitted, useBreadcrumbs provides a fallback. */
685
1231
  breadcrumbs?: Breadcrumb[];
686
1232
  }
687
1233
  export interface Category {
688
- /** Hashed string ID as returned by the API, e.g. "xzjvNQ" */
1234
+ /** Id as the API sends it, a hashed string such as "xzjvNQ". */
689
1235
  id: number | string;
690
- /** Raw numeric ID, e.g. 868669273 */
1236
+ /** The raw numeric id, e.g. 868669273. */
691
1237
  id_?: number;
1238
+ /** Category name. */
692
1239
  name: string;
1240
+ /** Category description. */
693
1241
  description?: string;
1242
+ /** Full URL of the category page. */
694
1243
  url: string;
695
- /** CSS icon class, e.g. "sicon-store", or null */
1244
+ /** CSS icon class, e.g. "sicon-store", or null. */
696
1245
  icon?: string | null;
697
- /**
698
- * Flat image URL string (NOT a nested ProductImage object).
699
- * Aligns with both the API response and Twig which treat this as a plain URL.
700
- */
1246
+ /** Flat image URL string (NOT a nested ProductImage object), or null. Aligns with both the API response and Twig. */
701
1247
  image?: string | null;
1248
+ /** Number of products in the category. */
702
1249
  products_count?: number;
1250
+ /** Child categories, possibly empty. */
703
1251
  sub_categories?: Category[];
704
- /** Always null from the API; reserved for future use */
705
- items?: null;
1252
+ /** Mirror of `sub_categories` on parent categories (an array, possibly empty); `null` on some root categories without children. */
1253
+ items?: Category[] | null;
706
1254
  }
707
1255
  export interface Slider {
1256
+ /** Slide id. */
708
1257
  id: number;
1258
+ /** Slide image URL. */
709
1259
  image: string;
1260
+ /** URL the slide links to. */
710
1261
  link?: string;
1262
+ /** Slide title. */
711
1263
  title?: string;
1264
+ /** Slide text. */
712
1265
  description?: string;
713
1266
  }
714
1267
  export interface HomeComponentConfig {
@@ -740,26 +1293,33 @@ export interface ComponentDefinition {
740
1293
  }
741
1294
  export * from './hooks';
742
1295
  export interface Brand {
743
- id: number;
1296
+ /** Brand id. Number on `brands` list responses; the brands route type declares a string. */
1297
+ id: number | string;
1298
+ /** Brand name. */
744
1299
  name: string;
1300
+ /** Brand logo image URL. */
745
1301
  logo: string;
1302
+ /** Brand page URL. */
746
1303
  url: string;
747
1304
  }
748
1305
  export interface Feature {
1306
+ /** Icon class or URL of the feature. */
749
1307
  icon: string;
1308
+ /** Feature title. */
750
1309
  title: string;
751
- /**
752
- * Subtitle text for the feature. Internally mapped from the raw API / Twig
753
- * field `text` (which is `items[].text` in `store-features.twig`).
754
- * The mapping happens in `StoreFeatures.tsx`.
755
- */
1310
+ /** Subtitle text for the feature. Internally mapped from the raw API / Twig field `text` (which is `items[].text` in `store-features.twig`). The mapping happens in `StoreFeatures.tsx`. */
756
1311
  description?: string;
757
1312
  }
758
1313
  export interface Testimonial {
1314
+ /** Testimonial id. */
759
1315
  id: number;
1316
+ /** Name of the customer who wrote it. */
760
1317
  name: string;
1318
+ /** Testimonial text. */
761
1319
  content: string;
1320
+ /** Star rating the customer gave. */
762
1321
  rating?: number;
1322
+ /** Customer image URL. */
763
1323
  image?: string;
764
1324
  }
765
1325
  import type { ReactNode } from 'react';
@@ -777,12 +1337,25 @@ export interface LayoutProps {
777
1337
  * Menu item structure from Salla API
778
1338
  */
779
1339
  export interface MenuItem {
1340
+ /** Item id. Built-in links use a word, such as "offers" or "blog". */
780
1341
  id: number | string;
1342
+ /** Text to show. */
781
1343
  title: string;
1344
+ /** Link URL. */
782
1345
  url: string;
783
1346
  /** Root-level image the merchant attached in the menu builder, when there is one. */
784
1347
  image?: string | null;
1348
+ /** Sub-items. Missing on some items: use `children ?? []`. */
785
1349
  children?: MenuItem[];
1350
+ /** Whether there are sub-items. Missing on some items. */
786
1351
  has_children?: boolean;
1352
+ /** Link target, e.g. "_self". */
1353
+ target?: string;
1354
+ /** Sort position. */
1355
+ order?: number;
1356
+ /** Raw HTML attribute string for the item element (e.g. ` id="offers"`). */
1357
+ attrs?: string;
1358
+ /** Raw HTML attribute string for the anchor (e.g. ` target="_self" class="offers-link"`). */
1359
+ link_attrs?: string;
787
1360
  }
788
1361
  //# sourceMappingURL=index.d.ts.map