@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
Binary file
@@ -195,8 +195,8 @@
195
195
  "title": "Pour-Over Masterclass",
196
196
  "slot": {
197
197
  "serviceId": "svc-0001",
198
- "startDate": "2026-08-08T10:00:00.000Z",
199
- "endDate": "2026-08-08T11:30:00.000Z"
198
+ "startDate": "2027-08-08T10:00:00.000Z",
199
+ "endDate": "2027-08-08T11:30:00.000Z"
200
200
  }
201
201
  }
202
202
  },
@@ -290,8 +290,8 @@
290
290
  "eventType": "RSVP",
291
291
  "scheduling": {
292
292
  "config": {
293
- "startDate": "2026-09-12T18:00:00.000Z",
294
- "endDate": "2026-09-12T20:00:00.000Z"
293
+ "startDate": "2027-09-12T18:00:00.000Z",
294
+ "endDate": "2027-09-12T20:00:00.000Z"
295
295
  },
296
296
  "formatted": {
297
297
  "dateAndTimeTbdMessage": ""
@@ -317,8 +317,8 @@
317
317
  "eventType": "TICKETS",
318
318
  "scheduling": {
319
319
  "config": {
320
- "startDate": "2026-10-03T19:00:00.000Z",
321
- "endDate": "2026-10-03T22:00:00.000Z"
320
+ "startDate": "2027-10-03T19:00:00.000Z",
321
+ "endDate": "2027-10-03T22:00:00.000Z"
322
322
  },
323
323
  "formatted": {
324
324
  "dateAndTimeTbdMessage": ""
@@ -1632,8 +1632,8 @@
1632
1632
  "eventType": "RSVP",
1633
1633
  "scheduling": {
1634
1634
  "config": {
1635
- "startDate": "2026-09-12T18:00:00.000Z",
1636
- "endDate": "2026-09-12T20:00:00.000Z"
1635
+ "startDate": "2027-09-12T18:00:00.000Z",
1636
+ "endDate": "2027-09-12T20:00:00.000Z"
1637
1637
  },
1638
1638
  "formatted": {
1639
1639
  "dateAndTimeTbdMessage": ""
@@ -12,8 +12,8 @@
12
12
  // Because this worker rides the Wix transport (globalThis.himalaya.wixApi), the
13
13
  // descriptor's logicBundle.declaredCapabilities MUST include "wix_api" (RFC 0043 D4).
14
14
 
15
- import { defineService } from "@wix/himalaya/state";
16
- import { productPrice, queryStoreProducts, type StoreProduct } from "@wix/himalaya/wix-stores";
15
+ import { defineService, createReadController, initialReadStatus, type ReadMetadata, type ReadStatus } from "@wix/himalaya/state";
16
+ import { productPrice, searchStoreProducts, type StoreProduct } from "@wix/himalaya/wix-stores";
17
17
 
18
18
  // FLAT strings only — the row template binds `$item.name`, never `$item.priceData.…`.
19
19
  // All shaping happens here in normalize(), not at the binding site.
@@ -30,6 +30,7 @@ type ErrorKind = "" | "offline" | "server" | "signIn" | "membership" | "permissi
30
30
  type ShownKind = Exclude<ErrorKind, "" | "signIn">;
31
31
 
32
32
  interface ProductsState {
33
+ readStatus: ReadStatus;
33
34
  status: "loading" | "ready" | "error";
34
35
  items: ProductRow[]; // ← itemsPath binds here; MUST initialize as an array
35
36
  errorKind: "" | ShownKind; // why the last load failed; "" unless status is "error"
@@ -64,10 +65,11 @@ function normalize(raw: StoreProduct): ProductRow {
64
65
  function shape(s: Partial<ProductsState>): ProductsState {
65
66
  const status = s.status ?? "ready";
66
67
  const items = s.items ?? [];
67
- const errorKind: "" | ShownKind = status === "error" ? (s.errorKind || "server") : "";
68
+ const errorKind: "" | ShownKind = s.errorKind ?? (status === "error" ? "server" : "");
68
69
  const blank = items.length === 0; // nothing on screen to keep
69
70
  return {
70
71
  status,
72
+ readStatus: s.readStatus ?? initialReadStatus(),
71
73
  items,
72
74
  errorKind,
73
75
  hideLoading: !(status === "loading" && blank),
@@ -81,8 +83,13 @@ function shape(s: Partial<ProductsState>): ProductsState {
81
83
  };
82
84
  }
83
85
 
84
- // The classifier below is `himi docs recipe-four-state`'s, VERBATIM — a test holds
85
- // the two byte-identical, so the rules an agent copies from here are the documented ones.
86
+ async function readProducts(cache: "only-if-cached" | "reload") {
87
+ let metadata: ReadMetadata | undefined;
88
+ const response = await searchStoreProducts({ limit: 50 }, { cache, onCacheResult: value => { metadata = value; } });
89
+ if (!metadata) throw new Error("Read provenance unavailable");
90
+ return { data: (response.products ?? []).filter(p => p?.id).map(normalize), metadata };
91
+ }
92
+
86
93
  // The HTTP status rides in the message: `HTTP 503: …` on a device, `Wix 503 for …`
87
94
  // under `himi test` / `himi render`.
88
95
  const STATUS = /\b(?:HTTP|Wix) (\d{3})\b/;
@@ -140,34 +147,36 @@ function shownKind(e: unknown): ShownKind {
140
147
  return kind === "signIn" ? "permission" : kind || "server";
141
148
  }
142
149
 
143
- async function loadList(s: Partial<ProductsState>): Promise<ProductsState> {
144
- try {
145
- const res = await queryStoreProducts(50);
146
- const items = (res.products ?? []).filter((p) => p?.id).map(normalize);
147
- return shape({ status: "ready", items, selectedId: s.selectedId });
148
- } catch (e) {
149
- const errorKind = shownKind(e);
150
- // Keep the rows on a refresh failure; clear them when access is gone.
151
- const lostAccess = errorKind === "membership" || errorKind === "permission";
152
- const items = lostAccess ? [] : s.items ?? [];
153
- return shape({ ...s, status: "error", items, errorKind });
154
- }
155
- }
150
+ // Keep the classified cause beside the controller's safe user message. Reclassifying
151
+ // that message would turn every transport failure into a generic server error.
152
+ let lastReadError: ShownKind = "server";
153
+ const reads = createReadController<ProductRow[]>({
154
+ cached: () => readProducts("only-if-cached"),
155
+ fetch: () => readProducts("reload"),
156
+ clearOnError: error => {
157
+ lastReadError = shownKind(error);
158
+ return lastReadError === "permission" || lastReadError === "membership";
159
+ },
160
+ publish(items, readStatus) { void svc.publishRead({ items, readStatus }); },
161
+ });
156
162
 
157
- const svc = defineService<ProductsState, {
158
- load: (s: ProductsState) => Promise<ProductsState>;
159
- retry: (s: ProductsState) => Promise<ProductsState>;
160
- open: (s: ProductsState, arg?: unknown) => ProductsState;
161
- }>("products", {
163
+ const svc = defineService("products", {
162
164
  state: shape({ status: "loading" }),
165
+ readLifecycle: { refreshAction: "refreshRead", statusPath: "readStatus" },
163
166
  actions: {
164
- load: async (s) => loadList(s),
165
- retry: async (s) => loadList(s),
166
- // Row tap — receives the template's params ({ id: "$item.id" }, substituted per row).
167
- // Stash the identity; wire real navigation per the tier-5 guide (detail screens).
168
- open: (s, arg) => ({ ...s, selectedId: String((arg as { id?: string })?.id ?? "") }),
167
+ load: async () => { await reads.load("products:first-50"); return undefined; },
168
+ refreshRead: async () => { await reads.refresh(); return undefined; },
169
+ retry: async () => { await reads.refresh(); return undefined; },
170
+ publishRead: (state: ProductsState, value: { items?: ProductRow[]; readStatus: ReadStatus }) => {
171
+ const read = value.readStatus;
172
+ const errorKind = read.error ? lastReadError : read.offline ? "offline" : "";
173
+ return shape({ ...state, items: value.items ?? (read.hasSnapshot ? state.items : []), readStatus: read, errorKind,
174
+ status: read.hasSnapshot ? "ready" : read.refreshing ? "loading" : "error",
175
+ });
176
+ },
177
+ open: (state: ProductsState, arg?: unknown) => ({ ...state, selectedId: String((arg as { id?: string })?.id ?? "") }),
169
178
  },
170
179
  });
171
180
 
172
- svc.load(); // kick the fetch at worker boot — the screen opens on the loading state
181
+ svc.load();
173
182
  export { svc };
@@ -12,7 +12,7 @@
12
12
  // The write rides the Wix transport → the descriptor's logicBundle MUST declare
13
13
  // "wix_api" (RFC 0043 D4).
14
14
 
15
- import { defineService } from "@wix/himalaya/state";
15
+ import { defineService, requireConnectivity } from "@wix/himalaya/state";
16
16
  import { createDraftPost, type WixDraftPostWrite, type WixRichContent } from "@wix/himalaya/wix-blog";
17
17
 
18
18
  interface PostFormState {
@@ -129,6 +129,7 @@ const svc = defineService<PostFormState, {
129
129
  const body = String(values?.body ?? "").trim();
130
130
  if (!title) return shape({ ...s, status: "error", error: "Title is required", savedMessage: "" });
131
131
  try {
132
+ requireConnectivity(); // Before optimistic state or a request; reconnect never submits.
132
133
  const r = await createDraftPost({
133
134
  title,
134
135
  richContent: toRichContent(body || title),
package/guides/index.json CHANGED
@@ -32,6 +32,12 @@
32
32
  "User-facing copy is CONFIGURATION, never hardcoded in a descriptor: route every string through a copy key with a stock fallback — `copyOf(key, fallback)` — and feed worker-emitted strings in as descriptor params, so any app/template consumer can retheme ALL copy without touching descriptors. Wire the seam yourself: declare a local `const COPY: Record<string,string> = {…}` in your content package plus `export const copyOf = (k, fallback) => COPY[k] ?? fallback;`, keyed `<screen>.<element>` so a later template publish is mechanical. Either way the rule is the same: no user-facing string baked into a descriptor literal."
33
33
  ],
34
34
  "guides": [
35
+ {
36
+ "id": "offline-reading",
37
+ "title": "Offline reading and recovery",
38
+ "category": "Tier-5 Screens",
39
+ "file": "offline-reading.md"
40
+ },
35
41
  {
36
42
  "id": "hhp",
37
43
  "title": "Responsive HTML to native Himi",
@@ -0,0 +1,63 @@
1
+ # Offline reading and recovery
2
+
3
+ Himalaya provides connectivity monitoring, an accessible shell bar, policy-controlled response caches, and a read lifecycle for generated screens. Offline support covers reading. Saving still requires connectivity and an explicit submission after reconnect.
4
+
5
+ ## User-facing states
6
+
7
+ | State | Behavior |
8
+ | --- | --- |
9
+ | Offline with an eligible snapshot | Keep the content, including a successfully loaded empty result. Show “You’re offline. Showing previously loaded content.” |
10
+ | Offline without an eligible snapshot | Show “This content isn’t available offline. Connect to load it.” Never infer an empty result from a failed request. |
11
+ | Reconnected | Keep the content while showing “Refreshing…”. Refresh the visible read participant in place. |
12
+ | Refresh failed | Keep the snapshot and show “Couldn’t refresh. Content may be outdated.” with Retry. Without a snapshot, show an unavailable state with Retry. |
13
+ | Refresh succeeded | Apply the server result and clear the stale/error indication. Connectivity alone never means content is current. |
14
+
15
+ The shared shell owns the bar and reserves layout space for it. Do not add app-owned banners, reload the application, reset navigation, or recreate workers on reconnect. Presented screens participate too. Recovery is deferred while a screen or application is inactive.
16
+
17
+ For steps to adopt this contract in another starter, see [Add offline reading to a starter template](offline-reading-template-adoption.md).
18
+
19
+ ## Register a safe read
20
+
21
+ Use `createReadController` from `@wix/himalaya/state` for a custom collection or detail screen. Register `readLifecycle: { refreshAction: "refreshRead", statusPath: "readStatus" }` on its service. Only the declared action participates in automatic recovery; it must perform reads only. Never register a submit, checkout, queue-draining, or generic action dispatcher as a refresh action.
22
+
23
+ The controller distinguishes `hasSnapshot` from the length of a list. Its status includes `refreshing`, `fromCache`, `stale`, `offline`, `lastSuccessAt`, and `error`. Publish status changes without clearing existing rows. Change its key when the route or server criteria change; never treat an unfiltered cached subset as a successful server search. Dispose the controller when its scope ends. Managed worker teardown and identity changes also notify controllers automatically.
24
+
25
+ The runnable dynamic-list example demonstrates keeping rows during a failed refresh. Shared starter collections additionally stage replacement pages using new cursors and commit the whole loaded depth together. A failed replacement leaves the previous pages, filters, and selection intact. Keep item IDs stable so renderers retain scroll anchors where those items still exist.
26
+
27
+ ## SDK reads and cache policy
28
+
29
+ Wix call options accept `cache: "only-if-cached"` and `cache: "reload"`, plus `onCacheResult(metadata)`. Business response payloads are unchanged. Existing calls without options retain their default behavior.
30
+
31
+ * `only-if-cached` never sends a network request. Ineligible, absent, expired, or insufficiently scoped entries reject with `OFFLINE_CACHE_MISS`.
32
+ * `reload` waits for the network. Use it for reconnect and Retry; another cache hit is not recovery.
33
+ * Metadata describes `source` (`cache` or `network`), `fetchedAt`, `expiresAt`, and `cacheable`. Cache-only snapshots need cache provenance, eligibility, and a future expiry. For a screen composed of multiple required reads, combine the earliest expiry and require eligibility for every response.
34
+
35
+ Initial loads can paint an eligible cache response before network revalidation. Keep the existing endpoint allowlist and retention limits. Optional enrichment can be omitted offline; a failed primary read must reject. Do not substitute sample data after errors. Explicitly selected sample previews remain separate from live data.
36
+
37
+ ## Identity and persistence
38
+
39
+ Use the host's response cache, scoped by app, site, principal, release, and request criteria. Do not persist network responses in unscoped local database rows or generic worker snapshots. Managed read services are excluded from worker persistence and hydration. Legacy worker snapshots are not hydrated by the new hosts. Unrelated local preferences and authored content remain local.
40
+
41
+ Clear private visible state on sign-out or access denial, and reject delayed results from a departed identity. Unknown identity is not permission to reuse the last signed-in user's cache. Ordinary transport/server failures retain content; access denial does not. Custom adapters should supply `clearOnError` for their typed authorization errors and invalidate their controller when their own scope changes.
42
+
43
+ ## Writes and runtime compatibility
44
+
45
+ Call `requireConnectivity()` before optimistic changes or queue insertion. Keep entered values on failure, explain that saving requires connectivity, and let the user submit again explicitly. Reconnect never submits a draft or drains a queue. Shared starter editor loads use the same read lifecycle while keeping an open draft and its concurrency revision together; recovery must not silently replace typed fields or rebase a draft onto a newer revision. A new unsaved form is explicitly local content, not a cached server response.
46
+
47
+ Services using the contract require `himalaya.readLifecycleVersion >= 1` and the Wix read bridge. The state SDK refuses unsupported runtimes with `READ_LIFECYCLE_UNSUPPORTED`; silently ignoring the contract would expose stale content. Ship the updated native runtime and web host before publishing starter bundles that use it. This does not make an unloaded browser application available offline.
48
+
49
+ ## Verification recipe
50
+
51
+ 1. Load a real list online, choose a filter, scroll, and load another page.
52
+ 2. Disconnect. Confirm the same content remains, with an accessible offline announcement and an unobstructed bar. A successful empty response must remain distinguishable from missing data.
53
+ 3. Open an uncached route or change server criteria. Confirm an honest unavailable state, with no demo rows or mismatched cached results.
54
+ 4. Change server data, reconnect, and confirm visible content updates without navigation, filter, selection, or page-depth reset. Repeat while backgrounded and with a presented detail screen.
55
+ 5. Reconnect to a failing backend. Confirm stale content and Retry remain until a successful network response. Rapid connectivity changes must coalesce reads and never replay writes.
56
+ 6. Relaunch native apps offline within cache retention. Check expiry, policy changes, app/site/account switches, sign-out during hydration or refresh, revoked access, and delayed responses.
57
+ 7. Submit a starter form offline. Confirm values remain, no optimistic record or success message appears, nothing is queued, and reconnect alone does not submit it.
58
+
59
+ Run controller, bridge/cache, identity, collection, starter-generation, and authoring tests. Drive iOS, Android, macOS, and web preview, and record native offline relaunch. Recovery telemetry uses the existing `offline_read_recovery` event with outcome only; never include response contents or user identifiers.
60
+
61
+ <!-- platform-lint-ok: This guide covers the native shared shells and loaded web preview requested by this change; React Native host adoption is outside this rollout. -->
62
+
63
+ Initial adoption is limited to product lists and product details in Branded Lite and Retail Store. Other screen adoption is deferred; see [the follow-up scope](offline-reading-follow-up.md).
@@ -414,10 +414,12 @@ auth: WixConsumerAuthProvider({
414
414
  ```
415
415
 
416
416
  Every surface reads the site with it: the native apps, the hosted draft preview, and
417
- `himi run`, `himi render --live` and `himi test --record`. It is a visitor: member
418
- sign-in still needs a Headless OAuth client.
417
+ `himi run`, `himi render --live` and `himi test --record`. On iOS and Android the same
418
+ binding also signs a site member in with email and password (the Branded app's own
419
+ member flow), still without a client. Google sign-in, registration, password reset and change, and member
420
+ sign-in on the web still need a Headless OAuth client.
419
421
 
420
- **Only when the site owner wants member sign-in now**, and with their agreement,
422
+ **Only when the site owner wants those (Google, registration, web member sign-in)**, and with their agreement,
421
423
  resolve the site's mobile OAuth client with the existing idempotent command (it is
422
424
  an owner-scoped write to the customer's site):
423
425
 
@@ -1,5 +1,7 @@
1
1
  # Recipe: dynamic list from worker data
2
2
 
3
+ For cached reads, unavailable offline states, safe reconnect actions, and failed-refresh retention, follow [Offline reading and recovery](../offline-reading.md) (also available as himi docs offline-reading). A refresh failure must preserve useful content; an empty result requires a successful read.
4
+
3
5
  Render a **live array from your Tier-5 worker** as a scrolling list — the single most
4
6
  common Himi screen shape (products, bookings, events, posts, contacts…). This recipe
5
7
  stitches together three pieces that are each documented separately but easy to miss as
@@ -1,5 +1,6 @@
1
1
  # Recipe: four screen states (loading / empty / error / ready)
2
2
 
3
+ For cached reads, unavailable offline states, safe reconnect actions, and failed-refresh retention, follow [Offline reading and recovery](../offline-reading.md) (also available as himi docs offline-reading). A refresh failure must preserve useful content; an empty result requires a successful read.
3
4
  **The rule every recipe follows:** a screen that loads or writes data shows a
4
5
  **loading state**, a **classified error state**, and a **recovery action where the
5
6
  user can fix the failure** — retry for an offline or a server failure, and for a failed