@wix/himalaya-cli 0.1544.0 → 0.1545.0

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 (225) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/agent/src/index.d.ts +5 -2
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts +14 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/read.d.ts +60 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/activity-counters-v1/src/index.d.ts +19 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ai-site-chat/src/index.d.ts +19 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/analytics/src/index.d.ts +42 -2
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/async-jobs/src/index.d.ts +19 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/automations-v1/src/index.d.ts +19 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/badges-v2/src/index.d.ts +19 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/billing-tax-v1/src/index.d.ts +19 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/extensions.d.ts +5 -4
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/index.d.ts +19 -0
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +4 -4
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/index.d.ts +19 -0
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-feed/src/index.d.ts +11 -0
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-tools-v1/src/index.d.ts +19 -0
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/chat-web/src/index.d.ts +22 -1
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/index.d.ts +19 -0
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/contacts/src/index.d.ts +19 -0
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/coupons/src/index.d.ts +24 -2
  21. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/crm-tasks/src/index.d.ts +11 -0
  22. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/dashboard-setup/src/index.d.ts +11 -0
  23. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/data-collections-v1/src/index.d.ts +19 -0
  24. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/donations/src/index.d.ts +19 -0
  25. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/extensions.d.ts +6 -5
  26. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/index.d.ts +19 -0
  27. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/email-marketing-v1/src/index.d.ts +19 -0
  28. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +24 -2
  29. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/faq-v2/src/index.d.ts +19 -0
  30. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forms/src/index.d.ts +19 -0
  31. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forum/src/index.d.ts +19 -0
  32. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/genie-chat/src/index.d.ts +11 -0
  33. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/gift-cards/src/index.d.ts +19 -0
  34. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/index.d.ts +19 -0
  35. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/inbox/src/extensions.d.ts +2 -1
  36. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/inbox/src/index.d.ts +19 -0
  37. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/invoices/src/index.d.ts +24 -2
  38. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/loyalty/src/index.d.ts +28 -4
  39. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/marketing-v1/src/index.d.ts +19 -0
  40. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-feed-viewer/src/index.d.ts +23 -1
  41. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +25 -3
  42. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/new-releases/src/index.d.ts +23 -1
  43. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/notification-preferences/src/index.d.ts +23 -2
  44. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/notifications-v3/src/index.d.ts +19 -0
  45. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/online-programs/src/index.d.ts +25 -3
  46. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/portfolio/src/index.d.ts +25 -3
  47. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/pricing-plans/src/index.d.ts +28 -6
  48. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/redirects-v1/src/index.d.ts +19 -0
  49. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/restaurants/src/extensions.d.ts +2 -2
  50. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/restaurants/src/index.d.ts +19 -0
  51. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/reviews/src/index.d.ts +24 -2
  52. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/seo-v1/src/index.d.ts +19 -0
  53. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-list/src/index.d.ts +19 -0
  54. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-media/src/index.d.ts +11 -0
  55. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/social-feed/src/index.d.ts +23 -1
  56. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-collections/src/display.d.ts +3 -2
  57. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-collections/src/index.d.ts +27 -3
  58. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/catalog.d.ts +7 -7
  59. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +4 -3
  60. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/extensions.d.ts +2 -1
  61. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/index.d.ts +19 -0
  62. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/table-reservations/src/index.d.ts +25 -3
  63. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/users/src/index.d.ts +23 -1
  64. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/video/src/index.d.ts +19 -0
  65. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/wix-data/src/index.d.ts +27 -3
  66. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/workflows-v1/src/index.d.ts +19 -0
  67. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/_shared/runtime.generated.d.ts +8 -0
  68. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/checkout.mjs +12 -4
  69. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +36 -11
  70. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +206 -12
  71. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-activity-counters.mjs +19 -5
  72. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ai-site-chat.mjs +19 -5
  73. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-analytics.mjs +21 -7
  74. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-async-jobs.mjs +19 -5
  75. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-automations.mjs +19 -5
  76. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-badges.mjs +19 -5
  77. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-billing-tax.mjs +19 -5
  78. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-blog.mjs +31 -14
  79. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +26 -12
  80. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-business-tools.mjs +20 -6
  81. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-chat-web.mjs +29 -7
  82. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +28 -5
  83. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-contacts.mjs +19 -5
  84. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-coupons.mjs +14 -6
  85. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data-collections.mjs +19 -5
  86. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data.mjs +15 -5
  87. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-donations.mjs +19 -5
  88. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +33 -16
  89. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-email-marketing.mjs +19 -5
  90. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +14 -6
  91. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-faq.mjs +20 -6
  92. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forms.mjs +19 -5
  93. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forum.mjs +19 -5
  94. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-gift-cards.mjs +19 -5
  95. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-groups.mjs +19 -5
  96. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-inbox.mjs +21 -7
  97. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-invoices.mjs +14 -6
  98. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-loyalty.mjs +16 -8
  99. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-marketing.mjs +19 -5
  100. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members-feed-viewer.mjs +21 -10
  101. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +17 -8
  102. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-new-releases.mjs +17 -5
  103. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-notification-preferences.mjs +20 -6
  104. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-notifications.mjs +19 -5
  105. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-online-programs.mjs +16 -8
  106. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-portfolio.mjs +16 -8
  107. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-pricing-plans.mjs +22 -14
  108. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-redirects.mjs +19 -5
  109. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-restaurants.mjs +22 -7
  110. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-reviews.mjs +14 -6
  111. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-rich-content-editor.mjs +3 -0
  112. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-seo.mjs +19 -5
  113. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-site-list.mjs +19 -5
  114. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-social-feed.mjs +15 -5
  115. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores-collections.mjs +20 -10
  116. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +116 -83
  117. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-table-reservations.mjs +16 -8
  118. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-users.mjs +15 -5
  119. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-video.mjs +9 -1
  120. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-workflows.mjs +19 -5
  121. package/dist/cli.mjs +90 -57
  122. package/dist/preview-assets.generated.bin +0 -0
  123. package/fixtures/wix-canned.json +8 -8
  124. package/guides/dynamic-list.service.ts +38 -29
  125. package/guides/form-submit.service.ts +2 -1
  126. package/guides/index.json +6 -0
  127. package/guides/offline-reading.md +63 -0
  128. package/guides/recipe-dynamic-list.md +2 -0
  129. package/guides/recipe-four-state.md +1 -0
  130. package/guides/sdk-reference.json +225 -99
  131. package/guides/testing-himi-apps.md +2 -0
  132. package/guides/tier-5-add-a-screen.md +2 -0
  133. package/package.json +2 -2
  134. package/templates/beauty-salon/dev/index.ts +4 -3
  135. package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +6 -9
  136. package/templates/beauty-salon/tier5-src/_shared/iap-presentation.ts +7 -3
  137. package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +1 -1
  138. package/templates/beauty-salon/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  139. package/templates/beauty-salon-owner/dev/index.ts +19 -19
  140. package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +6 -9
  141. package/templates/beauty-salon-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  142. package/templates/branded-lite/dev/index.ts +38 -20
  143. package/templates/branded-lite/tier5-src/_shared/collection-query-legacy.ts +194 -0
  144. package/templates/branded-lite/tier5-src/_shared/collection-query.ts +158 -99
  145. package/templates/branded-lite/tier5-src/_shared/collection-service.ts +31 -11
  146. package/templates/branded-lite/tier5-src/_shared/iap-presentation.ts +7 -3
  147. package/templates/branded-lite/tier5-src/_shared/read-service.ts +255 -0
  148. package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +1 -1
  149. package/templates/branded-lite/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  150. package/templates/branded-lite/tier5-src/himi-branded-lite-shop/index.ts +202 -159
  151. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +130 -201
  152. package/templates/community-club/dev/index.ts +4 -4
  153. package/templates/community-club/tier5-src/_shared/collection-service.ts +6 -9
  154. package/templates/community-club/tier5-src/_shared/iap-presentation.ts +7 -3
  155. package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +1 -1
  156. package/templates/community-club-owner/dev/index.ts +19 -19
  157. package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +6 -9
  158. package/templates/community-club-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  159. package/templates/events-meetups/dev/index.ts +3 -3
  160. package/templates/events-meetups/tier5-src/_shared/collection-service.ts +6 -9
  161. package/templates/events-meetups/tier5-src/_shared/iap-presentation.ts +7 -3
  162. package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +1 -1
  163. package/templates/events-meetups-owner/dev/index.ts +17 -17
  164. package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +6 -9
  165. package/templates/events-meetups-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  166. package/templates/gym-fitness/dev/index.ts +5 -4
  167. package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +6 -9
  168. package/templates/gym-fitness/tier5-src/_shared/iap-presentation.ts +7 -3
  169. package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +1 -1
  170. package/templates/gym-fitness/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  171. package/templates/gym-fitness-owner/dev/index.ts +20 -20
  172. package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +6 -9
  173. package/templates/gym-fitness-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  174. package/templates/nonprofit-cause/dev/index.ts +4 -4
  175. package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +6 -9
  176. package/templates/nonprofit-cause/tier5-src/_shared/iap-presentation.ts +7 -3
  177. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +1 -1
  178. package/templates/nonprofit-cause-owner/dev/index.ts +18 -18
  179. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +6 -9
  180. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  181. package/templates/owner-lite/dev/index.ts +20 -20
  182. package/templates/owner-lite/tier5-src/_shared/collection-service.ts +6 -9
  183. package/templates/owner-lite/tier5-src/_shared/owner-module-data.ts +1 -1
  184. package/templates/podcast-creator/dev/index.ts +4 -4
  185. package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +6 -9
  186. package/templates/podcast-creator/tier5-src/_shared/iap-presentation.ts +7 -3
  187. package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +1 -1
  188. package/templates/podcast-creator-owner/dev/index.ts +19 -19
  189. package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +6 -9
  190. package/templates/podcast-creator-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  191. package/templates/portfolio-creative/dev/index.ts +5 -4
  192. package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +6 -9
  193. package/templates/portfolio-creative/tier5-src/_shared/iap-presentation.ts +7 -3
  194. package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +1 -1
  195. package/templates/portfolio-creative/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  196. package/templates/portfolio-creative-owner/dev/index.ts +19 -19
  197. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +6 -9
  198. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  199. package/templates/restaurant/dev/index.ts +3 -3
  200. package/templates/restaurant/tier5-src/_shared/collection-service.ts +6 -9
  201. package/templates/restaurant/tier5-src/_shared/iap-presentation.ts +7 -3
  202. package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +1 -1
  203. package/templates/restaurant-owner/dev/index.ts +20 -20
  204. package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +6 -9
  205. package/templates/restaurant-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  206. package/templates/retail-store/dev/index.ts +19 -1
  207. package/templates/retail-store/tier5-src/_shared/collection-query-legacy.ts +194 -0
  208. package/templates/retail-store/tier5-src/_shared/collection-query.ts +158 -99
  209. package/templates/retail-store/tier5-src/_shared/collection-service.ts +31 -11
  210. package/templates/retail-store/tier5-src/_shared/iap-presentation.ts +7 -3
  211. package/templates/retail-store/tier5-src/_shared/read-service.ts +255 -0
  212. package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +1 -1
  213. package/templates/retail-store/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  214. package/templates/retail-store/tier5-src/himi-branded-lite-shop/index.ts +202 -159
  215. package/templates/retail-store/tier5-src/himi-store-product/index.ts +130 -201
  216. package/templates/retail-store-owner/dev/index.ts +18 -18
  217. package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +6 -9
  218. package/templates/retail-store-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  219. package/templates/yoga-studio/dev/index.ts +4 -4
  220. package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +6 -9
  221. package/templates/yoga-studio/tier5-src/_shared/iap-presentation.ts +7 -3
  222. package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +1 -1
  223. package/templates/yoga-studio-owner/dev/index.ts +18 -18
  224. package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +6 -9
  225. package/templates/yoga-studio-owner/tier5-src/_shared/owner-module-data.ts +1 -1
@@ -2,10 +2,34 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
8
- export declare function wixCall<T>(method: string, path: string, body?: unknown): Promise<T>;
19
+ export interface WixCallOptions {
20
+ site?: string;
21
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
22
+ cache?: "default" | "only-if-cached" | "reload";
23
+ onCacheResult?: (metadata: {
24
+ source: "cache" | "network";
25
+ fetchedAt: number;
26
+ expiresAt?: number;
27
+ cacheable: boolean;
28
+ }) => void;
29
+ }
30
+ /** The per-call header map for `opts`, or undefined when there is nothing to add — so
31
+ * the no-options path calls the bridge with exactly the 3 arguments it always did. */
32
+ export declare function wixCall<T>(method: string, path: string, body?: unknown, readOptions?: WixCallOptions): Promise<T>;
9
33
  export interface WixLoyaltyProgram {
10
34
  id?: string;
11
35
  name?: string;
@@ -33,17 +57,17 @@ export interface WixLoyaltyTier {
33
57
  requiredPoints?: number;
34
58
  }
35
59
  /** GET /loyalty/v1/program → { loyaltyProgram }. */
36
- export declare function getLoyaltyProgram(): Promise<{
60
+ export declare function getLoyaltyProgram(readOptions?: WixCallOptions): Promise<{
37
61
  loyaltyProgram?: WixLoyaltyProgram;
38
62
  program?: WixLoyaltyProgram;
39
63
  }>;
40
64
  /** GET /loyalty/v1/rewards → { rewards }. */
41
- export declare function listLoyaltyRewards(): Promise<{
65
+ export declare function listLoyaltyRewards(readOptions?: WixCallOptions): Promise<{
42
66
  rewards?: WixLoyaltyReward[];
43
67
  }>;
44
68
  /** GET /loyalty/v1/tiers → { tiers }. The PUBLIC program tier ladder
45
69
  * (wix.loyalty.v1.tier) — NOT the private per-customer tiers-program dashboard. */
46
- export declare function listLoyaltyTiers(): Promise<{
70
+ export declare function listLoyaltyTiers(readOptions?: WixCallOptions): Promise<{
47
71
  tiers?: WixLoyaltyTier[];
48
72
  }>;
49
73
  export * from "./extensions.js";
@@ -2,6 +2,17 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
@@ -14,6 +25,14 @@ declare global {
14
25
  * it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
15
26
  export interface WixCallOptions {
16
27
  site?: string;
28
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
29
+ cache?: "default" | "only-if-cached" | "reload";
30
+ onCacheResult?: (metadata: {
31
+ source: "cache" | "network";
32
+ fetchedAt: number;
33
+ expiresAt?: number;
34
+ cacheable: boolean;
35
+ }) => void;
17
36
  }
18
37
  export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
19
38
  /** `path` with `req` appended as the query string Wix's RPC gateway reads a GET or
@@ -2,9 +2,31 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
19
+ export interface WixCallOptions {
20
+ site?: string;
21
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
22
+ cache?: "default" | "only-if-cached" | "reload";
23
+ onCacheResult?: (metadata: {
24
+ source: "cache" | "network";
25
+ fetchedAt: number;
26
+ expiresAt?: number;
27
+ cacheable: boolean;
28
+ }) => void;
29
+ }
8
30
  /** A deeplink/action target. The notification may carry an in-app route
9
31
  * (mobileData.data) and/or a web URL (webUrlData.webUrl). */
10
32
  export interface MfvLink {
@@ -43,7 +65,7 @@ export interface MfvNotification {
43
65
  /** Reset the learned route. Tests only — there is no runtime caller. */
44
66
  export declare function __resetMfvRouteForTests(): void;
45
67
  /** List the signed-in member's notifications, newest first. MOBILE channel. */
46
- export declare function queryNotifications(limit?: number): Promise<MfvNotification[]>;
68
+ export declare function queryNotifications(limit?: number, options?: WixCallOptions): Promise<MfvNotification[]>;
47
69
  /** Mark the given notification ids as READ (bulk, by-filter). */
48
70
  export declare function markRead(ids: string[]): Promise<void>;
49
71
  /** Mark ALL of the member's MOBILE notifications that aren't already READ as READ. */
@@ -2,9 +2,31 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
19
+ export interface WixCallOptions {
20
+ site?: string;
21
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
22
+ cache?: "default" | "only-if-cached" | "reload";
23
+ onCacheResult?: (metadata: {
24
+ source: "cache" | "network";
25
+ fetchedAt: number;
26
+ expiresAt?: number;
27
+ cacheable: boolean;
28
+ }) => void;
29
+ }
8
30
  export interface WixPaging {
9
31
  limit?: number;
10
32
  offset?: number;
@@ -99,9 +121,9 @@ export interface WixListCurrentMemberBlockingResponse {
99
121
  }
100
122
  /** List site members — POST /members/v1/members/query. Pass `{ query: { paging: { limit, offset? } } }`
101
123
  * (offset paging). Do not pass `cursorPaging` — that is a different Wix envelope and is not on this type. */
102
- export declare function queryMembers(req?: WixQueryMembersRequest): Promise<WixQueryMembersResponse>;
124
+ export declare function queryMembers(req?: WixQueryMembersRequest, readOptions?: WixCallOptions): Promise<WixQueryMembersResponse>;
103
125
  /** Fetch a single member by id — GET /members/v1/members/{id}?fieldsets=FULL. */
104
- export declare function getMember(id: string): Promise<WixGetMemberResponse>;
126
+ export declare function getMember(id: string, options?: WixCallOptions): Promise<WixGetMemberResponse>;
105
127
  /** Fetch the currently authenticated member — member-scoped, unlike the owner roster query.
106
128
  * @scope member — requires the signed-in site-member identity; an anonymous visitor cannot read this record.
107
129
  */
@@ -178,7 +200,7 @@ export interface WixMyConnectionsResponse {
178
200
  /** Followers / following totals for a member — POST
179
201
  * /members/v1/activity-counters/query. Parses the Followers-app counter entry;
180
202
  * defaults each total to 0 when absent. May 403 → caller should default. */
181
- export declare function getFollowCounts(memberId: string): Promise<WixFollowCounts>;
203
+ export declare function getFollowCounts(memberId: string, options?: WixCallOptions): Promise<WixFollowCounts>;
182
204
  /** Whether the signed-in member follows `targetId` — POST
183
205
  * /members/v3/followers/my/connections. Returns false on any miss. May 403 →
184
206
  * caller should default to false. */
@@ -2,9 +2,31 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
19
+ export interface WixCallOptions {
20
+ site?: string;
21
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
22
+ cache?: "default" | "only-if-cached" | "reload";
23
+ onCacheResult?: (metadata: {
24
+ source: "cache" | "network";
25
+ fetchedAt: number;
26
+ expiresAt?: number;
27
+ cacheable: boolean;
28
+ }) => void;
29
+ }
8
30
  export interface WixAnnouncementAsset {
9
31
  type?: string;
10
32
  url?: string;
@@ -26,4 +48,4 @@ export interface WixAnnouncementsResponse {
26
48
  announcements: WixAnnouncement[];
27
49
  total?: number;
28
50
  }
29
- export declare function listAnnouncements(limit?: number): Promise<WixAnnouncementsResponse>;
51
+ export declare function listAnnouncements(limit?: number, options?: WixCallOptions): Promise<WixAnnouncementsResponse>;
@@ -2,9 +2,30 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
19
+ /** Explicit read policy; business response payloads remain unchanged. */
20
+ export interface WixCallOptions {
21
+ cache?: "default" | "only-if-cached" | "reload";
22
+ onCacheResult?(metadata: {
23
+ source: "cache" | "network";
24
+ fetchedAt: number;
25
+ expiresAt?: number;
26
+ cacheable: boolean;
27
+ }): void;
28
+ }
8
29
  /**
9
30
  * The service's own mount, from the published swagger `host`
10
31
  * ("www.wixapis.com/notification-preferences") — the PATH half of it.
@@ -104,7 +125,7 @@ export declare function deliveredByTopic(prefs: readonly PreferenceInfo[], chann
104
125
  /** List the site's notification topics — `GET /v1/preferences/topics`
105
126
  * (GetNotificationTopicsDefinitions). Publicly mounted.
106
127
  * verify-live: source contract checked; live caller authorization remains untested. */
107
- export declare function getNotificationTopics(): Promise<GetNotificationTopicsResponse>;
128
+ export declare function getNotificationTopics(options?: WixCallOptions): Promise<GetNotificationTopicsResponse>;
108
129
  /**
109
130
  * The PUBLICLY mounted preferences read — `GET /v1/preferences`
110
131
  * (GetPreferencesByRecipient). It needs the recipient explicitly: `CONTACT` + a
@@ -124,7 +145,7 @@ export declare function getPreferencesForRecipient(recipient: {
124
145
  * (GetPreferencesByImplicitRecipient). NOT in the published public swagger; a 404 from
125
146
  * the public gateway is the expected outcome there, not a bug in this call.
126
147
  * verify-live: the implicit-recipient mount has not been verified for member callers. */
127
- export declare function getMyNotificationPreferences(): Promise<GetMyNotificationPreferencesResponse>;
148
+ export declare function getMyNotificationPreferences(options?: WixCallOptions): Promise<GetMyNotificationPreferencesResponse>;
128
149
  /** Upsert some of the signed-in recipient's preferences —
129
150
  * `POST /v1/preferences-by-implicit-recipient` (UpsertPreferencesByImplicitRecipient),
130
151
  * body `{ preferencesInfo }`. Pass only the rows that changed.
@@ -2,6 +2,17 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
@@ -14,6 +25,14 @@ declare global {
14
25
  * it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
15
26
  export interface WixCallOptions {
16
27
  site?: string;
28
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
29
+ cache?: "default" | "only-if-cached" | "reload";
30
+ onCacheResult?: (metadata: {
31
+ source: "cache" | "network";
32
+ fetchedAt: number;
33
+ expiresAt?: number;
34
+ cacheable: boolean;
35
+ }) => void;
17
36
  }
18
37
  export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
19
38
  export interface WixNotification {
@@ -2,9 +2,31 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
19
+ export interface WixCallOptions {
20
+ site?: string;
21
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
22
+ cache?: "default" | "only-if-cached" | "reload";
23
+ onCacheResult?: (metadata: {
24
+ source: "cache" | "network";
25
+ fetchedAt: number;
26
+ expiresAt?: number;
27
+ cacheable: boolean;
28
+ }) => void;
29
+ }
8
30
  /**
9
31
  * v3's rich `description` block — the SAME shape on the list and the detail response
10
32
  * (see the recorded pair in core/web-renderer/tests/fixtures/branded-lite/wix-responses.json).
@@ -70,7 +92,7 @@ export interface WixQueryProgramsResponse {
70
92
  };
71
93
  }
72
94
  /** POST /online-programs/v3/programs/query — list programs (cursor-paged). */
73
- export declare function queryPrograms(query: WixProgramQuery): Promise<WixQueryProgramsResponse>;
95
+ export declare function queryPrograms(query: WixProgramQuery, readOptions?: WixCallOptions): Promise<WixQueryProgramsResponse>;
74
96
  export interface WixProgramFull extends WixProgram {
75
97
  revision?: number;
76
98
  status?: string;
@@ -100,7 +122,7 @@ export interface WixGetProgramResponse {
100
122
  program?: WixProgramFull;
101
123
  }
102
124
  /** GET /online-programs/v3/programs/{id} — single program (management view). */
103
- export declare function getProgram(id: string): Promise<WixGetProgramResponse>;
125
+ export declare function getProgram(id: string, readOptions?: WixCallOptions): Promise<WixGetProgramResponse>;
104
126
  export interface WixParticipant {
105
127
  id: string;
106
128
  revision?: string;
@@ -140,7 +162,7 @@ export interface WixQueryParticipantsResponse {
140
162
  export declare function queryParticipants(programId: string, opts?: {
141
163
  progressStatus?: string;
142
164
  limit?: number;
143
- }): Promise<WixQueryParticipantsResponse>;
165
+ }, readOptions?: WixCallOptions): Promise<WixQueryParticipantsResponse>;
144
166
  /** Participant lifecycle state. */
145
167
  export type WixParticipantState = "JOINED" | "PAYMENT_PENDING" | "APPROVAL_PENDING" | "COMPLETED" | "INVITED" | "REMOVED" | string;
146
168
  export interface WixParticipantPaymentPending {
@@ -2,9 +2,31 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
19
+ export interface WixCallOptions {
20
+ site?: string;
21
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
22
+ cache?: "default" | "only-if-cached" | "reload";
23
+ onCacheResult?: (metadata: {
24
+ source: "cache" | "network";
25
+ fetchedAt: number;
26
+ expiresAt?: number;
27
+ cacheable: boolean;
28
+ }) => void;
29
+ }
8
30
  /** A Wix Portfolio media image — a project / collection cover or a project item's image. */
9
31
  export interface WixMediaImage {
10
32
  type?: string;
@@ -51,7 +73,7 @@ export interface WixListProjectsResponse {
51
73
  };
52
74
  }
53
75
  /** GET /portfolio/v1/projects — list projects (paged). */
54
- export declare function listProjects(limit?: number, cursor?: string): Promise<WixListProjectsResponse>;
76
+ export declare function listProjects(limit?: number, cursor?: string, readOptions?: WixCallOptions): Promise<WixListProjectsResponse>;
55
77
  export interface WixPortfolioCollection {
56
78
  id: string;
57
79
  title?: string;
@@ -73,7 +95,7 @@ export interface WixListCollectionsResponse {
73
95
  };
74
96
  }
75
97
  /** GET /portfolio/v1/collections — list collections (paged). */
76
- export declare function listCollections(limit?: number, cursor?: string): Promise<WixListCollectionsResponse>;
98
+ export declare function listCollections(limit?: number, cursor?: string, readOptions?: WixCallOptions): Promise<WixListCollectionsResponse>;
77
99
  export interface WixPortfolioProjectItem {
78
100
  id: string;
79
101
  projectId?: string;
@@ -118,4 +140,4 @@ export interface WixListProjectItemsResponse {
118
140
  * because a Wix query cursor already carries it. Items come back in the order Wix returns
119
141
  * them — sort on `sortOrder` for the author's order.
120
142
  */
121
- export declare function listProjectItems(projectId: string, limit?: number, cursor?: string): Promise<WixListProjectItemsResponse>;
143
+ export declare function listProjectItems(projectId: string, limit?: number, cursor?: string, readOptions?: WixCallOptions): Promise<WixListProjectItemsResponse>;
@@ -2,9 +2,31 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
19
+ export interface WixCallOptions {
20
+ site?: string;
21
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
22
+ cache?: "default" | "only-if-cached" | "reload";
23
+ onCacheResult?: (metadata: {
24
+ source: "cache" | "network";
25
+ fetchedAt: number;
26
+ expiresAt?: number;
27
+ cacheable: boolean;
28
+ }) => void;
29
+ }
8
30
  export interface WixMoney {
9
31
  /** Decimal string, e.g. "15", "0". */
10
32
  value?: string;
@@ -62,7 +84,7 @@ export interface WixListPlansResponse {
62
84
  }
63
85
  /** List pricing plans — GET /pricing-plans/v2/plans. The list screen's data
64
86
  * source. Returns public + hidden plans (archived excluded by default). */
65
- export declare function listPlans(): Promise<WixListPlansResponse>;
87
+ export declare function listPlans(readOptions?: WixCallOptions): Promise<WixListPlansResponse>;
66
88
  export interface WixListPublicPlansResponse {
67
89
  plans?: WixPlan[];
68
90
  pagingMetadata?: WixPlansPagingMetadata;
@@ -73,12 +95,12 @@ export interface WixListPublicPlansResponse {
73
95
  * management identity. Export name mirrors the generated pricing-plans-v2
74
96
  * client (stdlib/wix-sdk/pricing-plans-v2) — the canonical importable name
75
97
  * stays unversioned per RFC 0043 D2. */
76
- export declare function listPublicPlans(): Promise<WixListPublicPlansResponse>;
98
+ export declare function listPublicPlans(readOptions?: WixCallOptions): Promise<WixListPublicPlansResponse>;
77
99
  export interface WixGetPlanResponse {
78
100
  plan: WixPlan;
79
101
  }
80
102
  /** Fetch a single plan by id — GET /pricing-plans/v2/plans/{id}. Detail source. */
81
- export declare function getPlan(planId: string): Promise<WixGetPlanResponse>;
103
+ export declare function getPlan(planId: string, readOptions?: WixCallOptions): Promise<WixGetPlanResponse>;
82
104
  export interface WixArchivePlanResponse {
83
105
  plan?: WixPlan;
84
106
  }
@@ -145,7 +167,7 @@ export interface WixListPlanOrdersResponse {
145
167
  * entitlement question every gated app asks — call `listMyPlanOrders()`. Using
146
168
  * this one there silently fails closed: the 403 reads as "no orders", so a
147
169
  * PAYING member is locked out of what they bought, and no error surfaces. */
148
- export declare function listPlanOrders(): Promise<WixListPlanOrdersResponse>;
170
+ export declare function listPlanOrders(readOptions?: WixCallOptions): Promise<WixListPlanOrdersResponse>;
149
171
  export interface ListMyPlanOrdersOptions {
150
172
  /** Server-side status filter. Ask for `["ACTIVE"]` when the question is
151
173
  * entitlement — see why below. */
@@ -176,12 +198,12 @@ export interface ListMyPlanOrdersOptions {
176
198
  * (`statuses` is a real proto field, not a tolerated unknown: an invalid value
177
199
  * is rejected with 400 rather than ignored, so a typo fails loudly here instead
178
200
  * of quietly widening the gate.) */
179
- export declare function listMyPlanOrders(opts?: ListMyPlanOrdersOptions): Promise<WixListPlanOrdersResponse>;
201
+ export declare function listMyPlanOrders(opts?: ListMyPlanOrdersOptions, readOptions?: WixCallOptions): Promise<WixListPlanOrdersResponse>;
180
202
  export interface WixGetPlanOrderResponse {
181
203
  order: WixPlanOrder;
182
204
  }
183
205
  /** Fetch a single plan order — GET /pricing-plans/v2/orders/{id}. Detail source. */
184
- export declare function getPlanOrder(orderId: string): Promise<WixGetPlanOrderResponse>;
206
+ export declare function getPlanOrder(orderId: string, readOptions?: WixCallOptions): Promise<WixGetPlanOrderResponse>;
185
207
  export interface WixCancelPlanOrderResponse {
186
208
  }
187
209
  /** Cancel a subscription (plan order) — POST /pricing-plans/v2/orders/{id}/cancel.
@@ -2,6 +2,17 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
@@ -14,6 +25,14 @@ declare global {
14
25
  * it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
15
26
  export interface WixCallOptions {
16
27
  site?: string;
28
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
29
+ cache?: "default" | "only-if-cached" | "reload";
30
+ onCacheResult?: (metadata: {
31
+ source: "cache" | "network";
32
+ fetchedAt: number;
33
+ expiresAt?: number;
34
+ cacheable: boolean;
35
+ }) => void;
17
36
  }
18
37
  export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
19
38
  export interface WixRedirectSession {
@@ -1,4 +1,4 @@
1
- import { type WixMetadata, type WixPaging } from "./index.js";
1
+ import { type WixCallOptions, type WixMetadata, type WixPaging } from "./index.js";
2
2
  export interface WixSection {
3
3
  id: string;
4
4
  name?: string;
@@ -19,7 +19,7 @@ export interface WixQuerySectionsResponse {
19
19
  }
20
20
  /** POST /restaurants/menus/v1/sections/query — menu sections (perm
21
21
  * RESTAURANTS.SECTION_READ; visitor-readable on sites with the Menus app). */
22
- export declare function querySections(req?: WixSectionQueryRequest): Promise<WixQuerySectionsResponse>;
22
+ export declare function querySections(req?: WixSectionQueryRequest, opts?: WixCallOptions): Promise<WixQuerySectionsResponse>;
23
23
  /** An address as the Restaurants services return it. `subdivision` is ISO 3166-2 (`US-CA`). */
24
24
  export interface WixRestaurantsAddress {
25
25
  country?: string;
@@ -2,6 +2,17 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
@@ -14,6 +25,14 @@ declare global {
14
25
  * it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
15
26
  export interface WixCallOptions {
16
27
  site?: string;
28
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
29
+ cache?: "default" | "only-if-cached" | "reload";
30
+ onCacheResult?: (metadata: {
31
+ source: "cache" | "network";
32
+ fetchedAt: number;
33
+ expiresAt?: number;
34
+ cacheable: boolean;
35
+ }) => void;
17
36
  }
18
37
  export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
19
38
  export interface WixPaging {
@@ -2,9 +2,31 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
19
+ export interface WixCallOptions {
20
+ site?: string;
21
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
22
+ cache?: "default" | "only-if-cached" | "reload";
23
+ onCacheResult?: (metadata: {
24
+ source: "cache" | "network";
25
+ fetchedAt: number;
26
+ expiresAt?: number;
27
+ cacheable: boolean;
28
+ }) => void;
29
+ }
8
30
  /** moderationStatus: APPROVED | IN_MODERATION | REJECTED | SUBMITTED (UNKNOWN). */
9
31
  export type ReviewModerationStatus = "APPROVED" | "IN_MODERATION" | "REJECTED" | "SUBMITTED" | "UNKNOWN";
10
32
  export interface WixReviewImage {
@@ -79,10 +101,10 @@ export interface WixQueryReviewsResponse {
79
101
  }
80
102
  /** POST /reviews/v1/reviews/query — list reviews (cursor-paged WQL).
81
103
  * Pass returnPrivateReviews:true to include unpublished (pending/rejected) reviews. */
82
- export declare function queryReviews(query: WixReviewQuery, returnPrivateReviews?: boolean): Promise<WixQueryReviewsResponse>;
104
+ export declare function queryReviews(query: WixReviewQuery, returnPrivateReviews?: boolean, readOptions?: WixCallOptions): Promise<WixQueryReviewsResponse>;
83
105
  /** GET /reviews/v1/reviews/{id} — single review.
84
106
  * returnPrivateReviews=true is required to read a pending/rejected review. */
85
- export declare function getReview(id: string, returnPrivateReviews?: boolean): Promise<{
107
+ export declare function getReview(id: string, returnPrivateReviews?: boolean, readOptions?: WixCallOptions): Promise<{
86
108
  review?: WixReview;
87
109
  }>;
88
110
  /** POST /reviews/v1/reviews/count — counts (optionally filtered). */
@@ -2,6 +2,17 @@ declare global {
2
2
  var himalaya: {
3
3
  wixApi?: {
4
4
  call: (method: string, path: string, body?: unknown, headers?: Record<string, string>) => Promise<unknown>;
5
+ read?: (method: string, path: string, body: unknown, headers: Record<string, string> | undefined, options: {
6
+ cache: string;
7
+ }) => Promise<{
8
+ data: unknown;
9
+ cache: {
10
+ source: "cache" | "network";
11
+ fetchedAt: number;
12
+ expiresAt?: number;
13
+ cacheable: boolean;
14
+ };
15
+ }>;
5
16
  };
6
17
  };
7
18
  }
@@ -14,6 +25,14 @@ declare global {
14
25
  * it can be passed straight through: `someMethod(req, site.forSite(msid))`. */
15
26
  export interface WixCallOptions {
16
27
  site?: string;
28
+ /** Explicit cache reads never touch the network; reload waits for a server response. */
29
+ cache?: "default" | "only-if-cached" | "reload";
30
+ onCacheResult?: (metadata: {
31
+ source: "cache" | "network";
32
+ fetchedAt: number;
33
+ expiresAt?: number;
34
+ cacheable: boolean;
35
+ }) => void;
17
36
  }
18
37
  export declare function wixCall<T>(method: string, path: string, body?: unknown, opts?: WixCallOptions): Promise<T>;
19
38
  /** `path` with `req` appended as the query string Wix's RPC gateway reads a GET or