@wix/himalaya-cli 0.1543.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 (228) 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/auth-providers/wix/src/index.d.ts +3 -2
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/activity-counters-v1/src/index.d.ts +19 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ai-site-chat/src/index.d.ts +19 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/analytics/src/index.d.ts +42 -2
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/async-jobs/src/index.d.ts +19 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/automations-v1/src/index.d.ts +19 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/badges-v2/src/index.d.ts +19 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/billing-tax-v1/src/index.d.ts +19 -0
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/extensions.d.ts +5 -4
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/index.d.ts +19 -0
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +4 -4
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/index.d.ts +19 -0
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-feed/src/index.d.ts +11 -0
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-tools-v1/src/index.d.ts +19 -0
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/chat-web/src/index.d.ts +22 -1
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/index.d.ts +19 -0
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/contacts/src/index.d.ts +19 -0
  21. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/coupons/src/index.d.ts +24 -2
  22. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/crm-tasks/src/index.d.ts +11 -0
  23. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/dashboard-setup/src/index.d.ts +11 -0
  24. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/data-collections-v1/src/index.d.ts +19 -0
  25. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/donations/src/index.d.ts +19 -0
  26. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/extensions.d.ts +6 -5
  27. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/index.d.ts +19 -0
  28. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/email-marketing-v1/src/index.d.ts +19 -0
  29. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +24 -2
  30. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/faq-v2/src/index.d.ts +19 -0
  31. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forms/src/index.d.ts +19 -0
  32. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forum/src/index.d.ts +19 -0
  33. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/genie-chat/src/index.d.ts +11 -0
  34. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/gift-cards/src/index.d.ts +19 -0
  35. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/index.d.ts +19 -0
  36. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/inbox/src/extensions.d.ts +2 -1
  37. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/inbox/src/index.d.ts +19 -0
  38. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/invoices/src/index.d.ts +24 -2
  39. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/loyalty/src/index.d.ts +28 -4
  40. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/marketing-v1/src/index.d.ts +19 -0
  41. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-feed-viewer/src/index.d.ts +23 -1
  42. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +25 -3
  43. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/new-releases/src/index.d.ts +23 -1
  44. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/notification-preferences/src/index.d.ts +23 -2
  45. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/notifications-v3/src/index.d.ts +19 -0
  46. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/online-programs/src/index.d.ts +25 -3
  47. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/portfolio/src/index.d.ts +25 -3
  48. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/pricing-plans/src/index.d.ts +28 -6
  49. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/redirects-v1/src/index.d.ts +19 -0
  50. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/restaurants/src/extensions.d.ts +2 -2
  51. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/restaurants/src/index.d.ts +19 -0
  52. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/reviews/src/index.d.ts +24 -2
  53. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/seo-v1/src/index.d.ts +19 -0
  54. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-list/src/index.d.ts +19 -0
  55. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-media/src/index.d.ts +11 -0
  56. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/social-feed/src/index.d.ts +23 -1
  57. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-collections/src/display.d.ts +3 -2
  58. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-collections/src/index.d.ts +27 -3
  59. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/catalog.d.ts +7 -7
  60. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +4 -3
  61. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/extensions.d.ts +2 -1
  62. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/index.d.ts +19 -0
  63. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/table-reservations/src/index.d.ts +25 -3
  64. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/users/src/index.d.ts +23 -1
  65. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/video/src/index.d.ts +19 -0
  66. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/wix-data/src/index.d.ts +27 -3
  67. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/workflows-v1/src/index.d.ts +19 -0
  68. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/_shared/runtime.generated.d.ts +8 -0
  69. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/checkout.mjs +12 -4
  70. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +36 -11
  71. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +206 -12
  72. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-activity-counters.mjs +19 -5
  73. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ai-site-chat.mjs +19 -5
  74. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-analytics.mjs +21 -7
  75. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-async-jobs.mjs +19 -5
  76. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-automations.mjs +19 -5
  77. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-badges.mjs +19 -5
  78. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-billing-tax.mjs +19 -5
  79. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-blog.mjs +31 -14
  80. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +26 -12
  81. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-business-tools.mjs +20 -6
  82. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-chat-web.mjs +29 -7
  83. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +28 -5
  84. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-contacts.mjs +19 -5
  85. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-coupons.mjs +14 -6
  86. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data-collections.mjs +19 -5
  87. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data.mjs +15 -5
  88. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-donations.mjs +19 -5
  89. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +33 -16
  90. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-email-marketing.mjs +19 -5
  91. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +14 -6
  92. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-faq.mjs +20 -6
  93. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forms.mjs +19 -5
  94. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forum.mjs +19 -5
  95. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-gift-cards.mjs +19 -5
  96. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-groups.mjs +19 -5
  97. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-inbox.mjs +21 -7
  98. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-invoices.mjs +14 -6
  99. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-loyalty.mjs +16 -8
  100. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-marketing.mjs +19 -5
  101. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members-feed-viewer.mjs +21 -10
  102. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +17 -8
  103. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-new-releases.mjs +17 -5
  104. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-notification-preferences.mjs +20 -6
  105. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-notifications.mjs +19 -5
  106. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-online-programs.mjs +16 -8
  107. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-portfolio.mjs +16 -8
  108. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-pricing-plans.mjs +22 -14
  109. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-redirects.mjs +19 -5
  110. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-restaurants.mjs +22 -7
  111. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-reviews.mjs +14 -6
  112. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-rich-content-editor.mjs +3 -0
  113. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-seo.mjs +19 -5
  114. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-site-list.mjs +19 -5
  115. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-social-feed.mjs +15 -5
  116. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores-collections.mjs +20 -10
  117. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +116 -83
  118. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-table-reservations.mjs +16 -8
  119. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-users.mjs +15 -5
  120. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-video.mjs +9 -1
  121. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-workflows.mjs +19 -5
  122. package/dist/cli.mjs +90 -57
  123. package/dist/preview-assets.generated.bin +0 -0
  124. package/fixtures/wix-canned.json +8 -8
  125. package/guides/dynamic-list.service.ts +38 -29
  126. package/guides/form-submit.service.ts +2 -1
  127. package/guides/index.json +6 -0
  128. package/guides/offline-reading.md +63 -0
  129. package/guides/one-app-to-himi-app.md +5 -3
  130. package/guides/recipe-dynamic-list.md +2 -0
  131. package/guides/recipe-four-state.md +1 -0
  132. package/guides/sdk-reference.json +225 -99
  133. package/guides/testing-himi-apps.md +2 -0
  134. package/guides/tier-5-add-a-screen.md +2 -0
  135. package/guides/wix-api-usage.md +9 -2
  136. package/package.json +2 -2
  137. package/templates/beauty-salon/dev/index.ts +4 -3
  138. package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +6 -9
  139. package/templates/beauty-salon/tier5-src/_shared/iap-presentation.ts +7 -3
  140. package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +1 -1
  141. package/templates/beauty-salon/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  142. package/templates/beauty-salon-owner/dev/index.ts +19 -19
  143. package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +6 -9
  144. package/templates/beauty-salon-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  145. package/templates/branded-lite/dev/index.ts +38 -20
  146. package/templates/branded-lite/tier5-src/_shared/collection-query-legacy.ts +194 -0
  147. package/templates/branded-lite/tier5-src/_shared/collection-query.ts +158 -99
  148. package/templates/branded-lite/tier5-src/_shared/collection-service.ts +31 -11
  149. package/templates/branded-lite/tier5-src/_shared/iap-presentation.ts +7 -3
  150. package/templates/branded-lite/tier5-src/_shared/read-service.ts +255 -0
  151. package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +1 -1
  152. package/templates/branded-lite/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  153. package/templates/branded-lite/tier5-src/himi-branded-lite-shop/index.ts +202 -159
  154. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +130 -201
  155. package/templates/community-club/dev/index.ts +4 -4
  156. package/templates/community-club/tier5-src/_shared/collection-service.ts +6 -9
  157. package/templates/community-club/tier5-src/_shared/iap-presentation.ts +7 -3
  158. package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +1 -1
  159. package/templates/community-club-owner/dev/index.ts +19 -19
  160. package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +6 -9
  161. package/templates/community-club-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  162. package/templates/events-meetups/dev/index.ts +3 -3
  163. package/templates/events-meetups/tier5-src/_shared/collection-service.ts +6 -9
  164. package/templates/events-meetups/tier5-src/_shared/iap-presentation.ts +7 -3
  165. package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +1 -1
  166. package/templates/events-meetups-owner/dev/index.ts +17 -17
  167. package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +6 -9
  168. package/templates/events-meetups-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  169. package/templates/gym-fitness/dev/index.ts +5 -4
  170. package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +6 -9
  171. package/templates/gym-fitness/tier5-src/_shared/iap-presentation.ts +7 -3
  172. package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +1 -1
  173. package/templates/gym-fitness/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  174. package/templates/gym-fitness-owner/dev/index.ts +20 -20
  175. package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +6 -9
  176. package/templates/gym-fitness-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  177. package/templates/nonprofit-cause/dev/index.ts +4 -4
  178. package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +6 -9
  179. package/templates/nonprofit-cause/tier5-src/_shared/iap-presentation.ts +7 -3
  180. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +1 -1
  181. package/templates/nonprofit-cause-owner/dev/index.ts +18 -18
  182. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +6 -9
  183. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  184. package/templates/owner-lite/dev/index.ts +20 -20
  185. package/templates/owner-lite/tier5-src/_shared/collection-service.ts +6 -9
  186. package/templates/owner-lite/tier5-src/_shared/owner-module-data.ts +1 -1
  187. package/templates/podcast-creator/dev/index.ts +4 -4
  188. package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +6 -9
  189. package/templates/podcast-creator/tier5-src/_shared/iap-presentation.ts +7 -3
  190. package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +1 -1
  191. package/templates/podcast-creator-owner/dev/index.ts +19 -19
  192. package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +6 -9
  193. package/templates/podcast-creator-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  194. package/templates/portfolio-creative/dev/index.ts +5 -4
  195. package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +6 -9
  196. package/templates/portfolio-creative/tier5-src/_shared/iap-presentation.ts +7 -3
  197. package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +1 -1
  198. package/templates/portfolio-creative/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  199. package/templates/portfolio-creative-owner/dev/index.ts +19 -19
  200. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +6 -9
  201. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  202. package/templates/restaurant/dev/index.ts +3 -3
  203. package/templates/restaurant/tier5-src/_shared/collection-service.ts +6 -9
  204. package/templates/restaurant/tier5-src/_shared/iap-presentation.ts +7 -3
  205. package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +1 -1
  206. package/templates/restaurant-owner/dev/index.ts +20 -20
  207. package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +6 -9
  208. package/templates/restaurant-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  209. package/templates/retail-store/dev/index.ts +19 -1
  210. package/templates/retail-store/tier5-src/_shared/collection-query-legacy.ts +194 -0
  211. package/templates/retail-store/tier5-src/_shared/collection-query.ts +158 -99
  212. package/templates/retail-store/tier5-src/_shared/collection-service.ts +31 -11
  213. package/templates/retail-store/tier5-src/_shared/iap-presentation.ts +7 -3
  214. package/templates/retail-store/tier5-src/_shared/read-service.ts +255 -0
  215. package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +1 -1
  216. package/templates/retail-store/tier5-src/himi-branded-lite-orders/index.ts +3 -0
  217. package/templates/retail-store/tier5-src/himi-branded-lite-shop/index.ts +202 -159
  218. package/templates/retail-store/tier5-src/himi-store-product/index.ts +130 -201
  219. package/templates/retail-store-owner/dev/index.ts +18 -18
  220. package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +6 -9
  221. package/templates/retail-store-owner/tier5-src/_shared/owner-module-data.ts +1 -1
  222. package/templates/yoga-studio/dev/index.ts +4 -4
  223. package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +6 -9
  224. package/templates/yoga-studio/tier5-src/_shared/iap-presentation.ts +7 -3
  225. package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +1 -1
  226. package/templates/yoga-studio-owner/dev/index.ts +18 -18
  227. package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +6 -9
  228. package/templates/yoga-studio-owner/tier5-src/_shared/owner-module-data.ts +1 -1
@@ -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
  export interface WixPaging {
9
31
  limit?: number;
10
32
  offset?: number;
@@ -92,9 +114,9 @@ export interface WixDeleteCouponResponse {
92
114
  }
93
115
  /** Query coupons — POST /stores/v2/coupons/query. The request is wrapped as
94
116
  * `{ query }` (Wix QueryV2 convention). */
95
- export declare function queryCoupons(req?: WixCouponsQueryRequest): Promise<WixQueryCouponsResponse>;
117
+ export declare function queryCoupons(req?: WixCouponsQueryRequest, readOptions?: WixCallOptions): Promise<WixQueryCouponsResponse>;
96
118
  /** Get a single coupon — GET /stores/v2/coupons/{id}. */
97
- export declare function getCoupon(id: string): Promise<WixGetCouponResponse>;
119
+ export declare function getCoupon(id: string, options?: WixCallOptions): Promise<WixGetCouponResponse>;
98
120
  /** Create a coupon — POST /stores/v2/coupons. The editable fields are wrapped
99
121
  * as `{ specification }`; `code` + a discount behavior (e.g. percentOffRate) are
100
122
  * required. Returns the new coupon id. */
@@ -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
  }
@@ -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
  }
@@ -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,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 WixDonationCampaign {
@@ -1,9 +1,10 @@
1
+ import type { WixCallOptions } from "./index.js";
1
2
  import type { WixOrder } from "./index.js";
2
3
  export interface WixGetOrderResponse {
3
4
  order: WixOrder;
4
5
  }
5
6
  /** Fetch a single order by id — the detail screen's data source. */
6
- export declare function getOrder(orderId: string): Promise<WixGetOrderResponse>;
7
+ export declare function getOrder(orderId: string, options?: WixCallOptions): Promise<WixGetOrderResponse>;
7
8
  /** Archive an order — POST /ecom/v1/orders/{id}/archive → { order }. Verified
8
9
  * live (2026-06-06). Reversible via .../unarchive. Used by the order detail's
9
10
  * Archive action AND the orders list's row-swipe Archive (#43). */
@@ -116,7 +117,7 @@ export declare function isOrdersForbiddenError(error: unknown): boolean;
116
117
  * sum `(cart.lineItems ?? [])` and the cart screen additionally takes
117
118
  * `cart.subtotal?.formattedAmount ?? ""` and `(await getCurrentCart()).id || ""` —
118
119
  * all three degrade to empty/0 on an absent field, so no caller special-cases it. */
119
- export declare function getCurrentCart(): Promise<WixCartDetail>;
120
+ export declare function getCurrentCart(opts?: WixCallOptions): Promise<WixCartDetail>;
120
121
  /** Add a coupon to the visitor/member's current cart — POST
121
122
  * /ecom/v2/carts/current/add-coupon. Wix validates it against the current cart.
122
123
  * @scope visitor — uses the active shopper's cart; Wix rejects an invalid coupon. */
@@ -319,10 +320,10 @@ export interface WixCreateMemberAddressResponse {
319
320
  * in the patch; `""` is, and clears that field. */
320
321
  export declare function memberAddressFieldMask(patch: WixMemberAddress): string;
321
322
  /** The signed-in member's saved addresses + which one is the default. */
322
- export declare function listMemberAddresses(): Promise<WixListMemberAddressesResponse>;
323
+ export declare function listMemberAddresses(options?: WixCallOptions): Promise<WixListMemberAddressesResponse>;
323
324
  /** One saved address by id, and whether it is the member's default. An unknown id
324
325
  * rejects with 404 `cant_find_address_by_id`. */
325
- export declare function getMemberAddress(addressId: string): Promise<WixGetMemberAddressResponse>;
326
+ export declare function getMemberAddress(addressId: string, options?: WixCallOptions): Promise<WixGetMemberAddressResponse>;
326
327
  /** The member's default address — `{}` when they have none. */
327
328
  export declare function getDefaultMemberAddress(): Promise<WixGetDefaultMemberAddressResponse>;
328
329
  /** Save a new address → its id. The member's first address becomes the default
@@ -379,7 +380,7 @@ export interface WixListSavedPaymentMethodsResponse {
379
380
  export declare function listMySavedPaymentMethods(opts?: {
380
381
  cursor?: string;
381
382
  limit?: number;
382
- }): Promise<WixListSavedPaymentMethodsResponse>;
383
+ }, options?: WixCallOptions): Promise<WixListSavedPaymentMethodsResponse>;
383
384
  /** Remove a saved payment method. Wix makes another one primary when this one was. */
384
385
  export declare function deleteSavedPaymentMethod(savedPaymentMethodId: string): Promise<Record<string, never>>;
385
386
  /** Make a saved payment method the member's primary one. The service declares this
@@ -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: `searchOrders(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 WixEcomCursorPaging {
@@ -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
  export interface WixEventImage {
9
31
  id?: string;
10
32
  url?: string;
@@ -133,7 +155,7 @@ export declare function decodeEvent(raw: WixEvent): WixEvent;
133
155
  * **Visitor-readable**: works with a visitor/consumer token (`WixConsumerAuthProvider`),
134
156
  * not just an owner session. (NOT the owner-only GET /events-in-clubs/chunked-events,
135
157
  * which returns an HTML error page for a visitor token.) */
136
- export declare function queryEvents(opts?: WixQueryEventsOptions): Promise<WixGetEventListResponse>;
158
+ export declare function queryEvents(opts?: WixQueryEventsOptions, readOptions?: WixCallOptions): Promise<WixGetEventListResponse>;
137
159
  /** Events v3 response fieldsets (`RequestedFields`). A bare read returns the base fieldset;
138
160
  * each value adds fields: `DETAILS` → `shortDescription`, `mainImage`, `calendarUrls`;
139
161
  * `TEXTS` → the Ricos `description`; `REGISTRATION` → `registration`; `URLS` → `eventPageUrl`;
@@ -154,7 +176,7 @@ export interface WixEventRichContent {
154
176
  * `opts.fields` requests extra v3 fieldsets; `["TEXTS"]` returns `description`. */
155
177
  export declare function getEvent(eventId: string, opts?: {
156
178
  fields?: WixEventFieldset[];
157
- }): Promise<WixGetEventResponse>;
179
+ }, readOptions?: WixCallOptions): Promise<WixGetEventResponse>;
158
180
  /** Delete an event — DELETE /events/v3/events/{eventId}. */
159
181
  export declare function deleteEvent(eventId: string): Promise<WixDeleteEventResponse>;
160
182
  /** Write shape for create/update (Events v3). Verified-minimal: a create needs
@@ -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,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,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 WixForumPaging {
@@ -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
  }
@@ -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,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 {
@@ -1,3 +1,4 @@
1
+ import { type WixCallOptions } from "./index.js";
1
2
  import type { WixConversation, WixPaging, WixMetadata } from "./index.js";
2
3
  declare module "./index" {
3
4
  interface WixConversation {
@@ -19,4 +20,4 @@ export interface WixListConversationsResponse {
19
20
  * for sites with no conversations / no Inbox app provisioned. */
20
21
  export declare function listConversations(req?: {
21
22
  paging?: WixPaging;
22
- }): Promise<WixListConversationsResponse>;
23
+ }, opts?: WixCallOptions): Promise<WixListConversationsResponse>;
@@ -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
  export interface WixInvoiceContactDetails {
9
31
  firstName?: string;
10
32
  lastName?: string;
@@ -74,12 +96,12 @@ export interface WixQueryInvoicesResponse {
74
96
  pagingMetadata?: WixInvoicesPagingMetadata;
75
97
  }
76
98
  /** List/query invoices — POST /invoices/v4/invoices/query. The list screen's source. */
77
- export declare function queryInvoices(req?: WixQueryInvoicesRequest): Promise<WixQueryInvoicesResponse>;
99
+ export declare function queryInvoices(req?: WixQueryInvoicesRequest, readOptions?: WixCallOptions): Promise<WixQueryInvoicesResponse>;
78
100
  export interface WixGetInvoiceResponse {
79
101
  invoice: WixInvoice;
80
102
  }
81
103
  /** Fetch a single invoice by id — GET /invoices/v4/invoices/{id}. Detail source. */
82
- export declare function getInvoice(invoiceId: string): Promise<WixGetInvoiceResponse>;
104
+ export declare function getInvoice(invoiceId: string, options?: WixCallOptions): Promise<WixGetInvoiceResponse>;
83
105
  export interface WixPublishInvoiceResponse {
84
106
  invoice?: WixInvoice;
85
107
  }