@wix/himalaya-cli 0.1747.0 → 0.1749.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 (381) hide show
  1. package/bin/himi +16 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +3 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +9 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +34 -8
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +45 -18
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/l10n.mjs +1 -1
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +36 -14
  8. package/dist/browser-plane/assets.json +7 -7
  9. package/dist/browser-plane/preview-deferred/{63821bbb8f637899037252154a5587f0596e4b537173c7f50551f9e44f7c22c0.bin → b40ea5d0d6251898ff5617139fde8be008dd11e99a70b14c1052093685401700.bin} +1 -1
  10. package/dist/browser-plane/sw.js +6 -6
  11. package/dist/browser-plane/t5-frame.html +1 -1
  12. package/dist/browser-plane/t5-worker-frame.html +1 -1
  13. package/dist/cli.mjs +2616 -1883
  14. package/dist/preview-assets.generated.bin +0 -0
  15. package/guides/component-reference.json +1 -1
  16. package/guides/component-reference.md +9 -0
  17. package/guides/one-app-to-himi-app.md +11 -6
  18. package/guides/wix-business-context.md +25 -1
  19. package/guides/wix-site-to-himi-app.md +2 -1
  20. package/package.json +2 -2
  21. package/template-icons/medical-services.png +0 -0
  22. package/templates/beauty-salon/dev/index.ts +1 -0
  23. package/templates/beauty-salon/l10n/en.json +6 -0
  24. package/templates/beauty-salon/l10n/fr.json +36 -5
  25. package/templates/beauty-salon/l10n/he.json +29 -4
  26. package/templates/beauty-salon/recipes/blog-hero.json +95 -0
  27. package/templates/beauty-salon/recipes/blog-list-thumb-start.json +177 -147
  28. package/templates/beauty-salon/recipes/blog-list.json +172 -142
  29. package/templates/beauty-salon/recipes/events-inline-list.json +30 -5
  30. package/templates/beauty-salon/recipes/events-inline.json +30 -5
  31. package/templates/beauty-salon/recipes/faq-list.json +503 -0
  32. package/templates/beauty-salon/recipes/groups-list.json +196 -0
  33. package/templates/beauty-salon/recipes/products-carousel.json +141 -0
  34. package/templates/beauty-salon/recipes/products-grid.json +143 -0
  35. package/templates/beauty-salon/tier5-src/_shared/blog-list.ts +9 -9
  36. package/templates/beauty-salon/tier5-src/_shared/events-inline.ts +7 -5
  37. package/templates/beauty-salon/tier5-src/_shared/faq-list.ts +405 -0
  38. package/templates/beauty-salon/tier5-src/_shared/groups-section.ts +110 -0
  39. package/templates/beauty-salon/tier5-src/_shared/member-bookings.ts +17 -4
  40. package/templates/beauty-salon/tier5-src/_shared/member-row-extras.ts +10 -2
  41. package/templates/beauty-salon/tier5-src/_shared/members-directory.ts +9 -5
  42. package/templates/beauty-salon/tier5-src/_shared/products-section.ts +76 -0
  43. package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +2 -2
  44. package/templates/beauty-salon/tier5-src/_shared/staff-name.ts +18 -0
  45. package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +6 -2
  46. package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +7 -2
  47. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +6 -4
  48. package/templates/beauty-salon-owner/dev/index.ts +54 -0
  49. package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +30 -4
  50. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  51. package/templates/branded-lite/dev/index.ts +1 -0
  52. package/templates/branded-lite/l10n/fr.json +15 -5
  53. package/templates/branded-lite/l10n/he.json +12 -4
  54. package/templates/branded-lite/recipes/blog-hero.json +95 -0
  55. package/templates/branded-lite/recipes/blog-list-thumb-start.json +177 -147
  56. package/templates/branded-lite/recipes/blog-list.json +172 -142
  57. package/templates/branded-lite/recipes/events-inline-list.json +30 -5
  58. package/templates/branded-lite/recipes/events-inline.json +30 -5
  59. package/templates/branded-lite/recipes/faq-list.json +503 -0
  60. package/templates/branded-lite/recipes/groups-list.json +196 -0
  61. package/templates/branded-lite/recipes/products-carousel.json +141 -0
  62. package/templates/branded-lite/recipes/products-grid.json +143 -0
  63. package/templates/branded-lite/tier5-src/_shared/blog-list.ts +9 -9
  64. package/templates/branded-lite/tier5-src/_shared/events-inline.ts +7 -5
  65. package/templates/branded-lite/tier5-src/_shared/faq-list.ts +405 -0
  66. package/templates/branded-lite/tier5-src/_shared/groups-section.ts +110 -0
  67. package/templates/branded-lite/tier5-src/_shared/member-bookings.ts +17 -4
  68. package/templates/branded-lite/tier5-src/_shared/member-row-extras.ts +10 -2
  69. package/templates/branded-lite/tier5-src/_shared/members-directory.ts +9 -5
  70. package/templates/branded-lite/tier5-src/_shared/products-section.ts +76 -0
  71. package/templates/branded-lite/tier5-src/_shared/programs-section.ts +2 -2
  72. package/templates/branded-lite/tier5-src/_shared/staff-name.ts +18 -0
  73. package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +6 -2
  74. package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +7 -2
  75. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +6 -4
  76. package/templates/branded-lite/tier5-src/himi-branded-lite-faq/index.ts +5 -369
  77. package/templates/brandy/README.md +46 -5
  78. package/templates/brandy/config.ts +11 -0
  79. package/templates/brandy/himalaya.template.json +1 -1
  80. package/templates/community-club/dev/index.ts +1 -0
  81. package/templates/community-club/l10n/fr.json +25 -5
  82. package/templates/community-club/l10n/he.json +20 -4
  83. package/templates/community-club/recipes/blog-hero.json +95 -0
  84. package/templates/community-club/recipes/blog-list-thumb-start.json +177 -147
  85. package/templates/community-club/recipes/blog-list.json +172 -142
  86. package/templates/community-club/recipes/events-inline-list.json +30 -5
  87. package/templates/community-club/recipes/events-inline.json +30 -5
  88. package/templates/community-club/recipes/faq-list.json +503 -0
  89. package/templates/community-club/recipes/groups-list.json +196 -0
  90. package/templates/community-club/recipes/products-carousel.json +141 -0
  91. package/templates/community-club/recipes/products-grid.json +143 -0
  92. package/templates/community-club/tier5-src/_shared/blog-list.ts +9 -9
  93. package/templates/community-club/tier5-src/_shared/events-inline.ts +7 -5
  94. package/templates/community-club/tier5-src/_shared/faq-list.ts +405 -0
  95. package/templates/community-club/tier5-src/_shared/groups-section.ts +110 -0
  96. package/templates/community-club/tier5-src/_shared/member-bookings.ts +17 -4
  97. package/templates/community-club/tier5-src/_shared/member-row-extras.ts +10 -2
  98. package/templates/community-club/tier5-src/_shared/members-directory.ts +9 -5
  99. package/templates/community-club/tier5-src/_shared/products-section.ts +76 -0
  100. package/templates/community-club/tier5-src/_shared/programs-section.ts +2 -2
  101. package/templates/community-club-owner/dev/index.ts +54 -0
  102. package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +30 -4
  103. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  104. package/templates/conference/dev/index.ts +1 -0
  105. package/templates/events-meetups/dev/index.ts +1 -0
  106. package/templates/events-meetups/l10n/fr.json +25 -5
  107. package/templates/events-meetups/l10n/he.json +20 -4
  108. package/templates/events-meetups/recipes/blog-hero.json +95 -0
  109. package/templates/events-meetups/recipes/blog-list-thumb-start.json +177 -147
  110. package/templates/events-meetups/recipes/blog-list.json +172 -142
  111. package/templates/events-meetups/recipes/events-inline-list.json +30 -5
  112. package/templates/events-meetups/recipes/events-inline.json +30 -5
  113. package/templates/events-meetups/recipes/faq-list.json +503 -0
  114. package/templates/events-meetups/recipes/groups-list.json +196 -0
  115. package/templates/events-meetups/recipes/products-carousel.json +141 -0
  116. package/templates/events-meetups/recipes/products-grid.json +143 -0
  117. package/templates/events-meetups/tier5-src/_shared/blog-list.ts +9 -9
  118. package/templates/events-meetups/tier5-src/_shared/events-inline.ts +7 -5
  119. package/templates/events-meetups/tier5-src/_shared/faq-list.ts +405 -0
  120. package/templates/events-meetups/tier5-src/_shared/groups-section.ts +110 -0
  121. package/templates/events-meetups/tier5-src/_shared/member-bookings.ts +17 -4
  122. package/templates/events-meetups/tier5-src/_shared/member-row-extras.ts +10 -2
  123. package/templates/events-meetups/tier5-src/_shared/members-directory.ts +9 -5
  124. package/templates/events-meetups/tier5-src/_shared/products-section.ts +76 -0
  125. package/templates/events-meetups/tier5-src/_shared/programs-section.ts +2 -2
  126. package/templates/events-meetups-owner/dev/index.ts +54 -0
  127. package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +30 -4
  128. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  129. package/templates/gym-fitness/dev/index.ts +1 -0
  130. package/templates/gym-fitness/l10n/en.json +6 -0
  131. package/templates/gym-fitness/l10n/fr.json +36 -5
  132. package/templates/gym-fitness/l10n/he.json +29 -4
  133. package/templates/gym-fitness/recipes/blog-hero.json +95 -0
  134. package/templates/gym-fitness/recipes/blog-list-thumb-start.json +177 -147
  135. package/templates/gym-fitness/recipes/blog-list.json +172 -142
  136. package/templates/gym-fitness/recipes/events-inline-list.json +30 -5
  137. package/templates/gym-fitness/recipes/events-inline.json +30 -5
  138. package/templates/gym-fitness/recipes/faq-list.json +503 -0
  139. package/templates/gym-fitness/recipes/groups-list.json +196 -0
  140. package/templates/gym-fitness/recipes/products-carousel.json +141 -0
  141. package/templates/gym-fitness/recipes/products-grid.json +143 -0
  142. package/templates/gym-fitness/tier5-src/_shared/blog-list.ts +9 -9
  143. package/templates/gym-fitness/tier5-src/_shared/events-inline.ts +7 -5
  144. package/templates/gym-fitness/tier5-src/_shared/faq-list.ts +405 -0
  145. package/templates/gym-fitness/tier5-src/_shared/groups-section.ts +110 -0
  146. package/templates/gym-fitness/tier5-src/_shared/member-bookings.ts +17 -4
  147. package/templates/gym-fitness/tier5-src/_shared/member-row-extras.ts +10 -2
  148. package/templates/gym-fitness/tier5-src/_shared/members-directory.ts +9 -5
  149. package/templates/gym-fitness/tier5-src/_shared/products-section.ts +76 -0
  150. package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +2 -2
  151. package/templates/gym-fitness/tier5-src/_shared/staff-name.ts +18 -0
  152. package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +6 -2
  153. package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +7 -2
  154. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +6 -4
  155. package/templates/gym-fitness-owner/dev/index.ts +54 -0
  156. package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +30 -4
  157. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  158. package/templates/medical-services/README.md +53 -0
  159. package/templates/medical-services/config.ts +320 -0
  160. package/templates/medical-services/dev/index.ts +17783 -0
  161. package/templates/medical-services/himalaya.content.json +46 -0
  162. package/templates/medical-services/himalaya.template.json +14 -0
  163. package/templates/medical-services/icon.png +0 -0
  164. package/templates/medical-services/platforms.json +1 -0
  165. package/templates/medical-services/tier5-src/_shared/app-locale.ts +61 -0
  166. package/templates/medical-services/tier5-src/_shared/booking-location.ts +147 -0
  167. package/templates/medical-services/tier5-src/_shared/booking-session.ts +222 -0
  168. package/templates/medical-services/tier5-src/_shared/branded-lite-hosted.ts +280 -0
  169. package/templates/medical-services/tier5-src/_shared/branded-load-state.ts +109 -0
  170. package/templates/medical-services/tier5-src/_shared/business-chat-copy.ts +40 -0
  171. package/templates/medical-services/tier5-src/_shared/business-chat-history.ts +51 -0
  172. package/templates/medical-services/tier5-src/_shared/business-chat-message-model.ts +177 -0
  173. package/templates/medical-services/tier5-src/_shared/business-chat-model.ts +56 -0
  174. package/templates/medical-services/tier5-src/_shared/business-chat-presenter.ts +576 -0
  175. package/templates/medical-services/tier5-src/_shared/business-chat-transport.ts +148 -0
  176. package/templates/medical-services/tier5-src/_shared/collection-contract.ts +228 -0
  177. package/templates/medical-services/tier5-src/_shared/collection-query.ts +193 -0
  178. package/templates/medical-services/tier5-src/_shared/collection-service.ts +400 -0
  179. package/templates/medical-services/tier5-src/_shared/engine-intl.ts +523 -0
  180. package/templates/medical-services/tier5-src/_shared/faq-list.ts +405 -0
  181. package/templates/medical-services/tier5-src/_shared/himi-account.ts +194 -0
  182. package/templates/medical-services/tier5-src/_shared/himi-booking-saved.ts +88 -0
  183. package/templates/medical-services/tier5-src/_shared/himi-bookings.ts +318 -0
  184. package/templates/medical-services/tier5-src/_shared/himi-copy.ts +116 -0
  185. package/templates/medical-services/tier5-src/_shared/himi-store.ts +7 -0
  186. package/templates/medical-services/tier5-src/_shared/himi-text.ts +24 -0
  187. package/templates/medical-services/tier5-src/_shared/host-events.ts +66 -0
  188. package/templates/medical-services/tier5-src/_shared/hosted-checkout.ts +70 -0
  189. package/templates/medical-services/tier5-src/_shared/iap-attendance-form.ts +106 -0
  190. package/templates/medical-services/tier5-src/_shared/iap-attendance-purchase.ts +216 -0
  191. package/templates/medical-services/tier5-src/_shared/iap-attendance.ts +38 -0
  192. package/templates/medical-services/tier5-src/_shared/iap-worker.ts +127 -0
  193. package/templates/medical-services/tier5-src/_shared/inbox-rooms.ts +68 -0
  194. package/templates/medical-services/tier5-src/_shared/local-preferences.ts +38 -0
  195. package/templates/medical-services/tier5-src/_shared/member-access.ts +52 -0
  196. package/templates/medical-services/tier5-src/_shared/member-account-routes.ts +52 -0
  197. package/templates/medical-services/tier5-src/_shared/member-bookings.ts +107 -0
  198. package/templates/medical-services/tier5-src/_shared/member-screen.ts +99 -0
  199. package/templates/medical-services/tier5-src/_shared/notification-target.ts +141 -0
  200. package/templates/medical-services/tier5-src/_shared/offset-page.ts +10 -0
  201. package/templates/medical-services/tier5-src/_shared/online-actions.ts +76 -0
  202. package/templates/medical-services/tier5-src/_shared/owner-load-error.ts +348 -0
  203. package/templates/medical-services/tier5-src/_shared/payment-setup.ts +6 -0
  204. package/templates/medical-services/tier5-src/_shared/rich-body.ts +78 -0
  205. package/templates/medical-services/tier5-src/_shared/rich-content-link.ts +34 -0
  206. package/templates/medical-services/tier5-src/_shared/sign-in-sheet.ts +18 -0
  207. package/templates/medical-services/tier5-src/_shared/staff-name.ts +18 -0
  208. package/templates/medical-services/tier5-src/_shared/weekly-goal.ts +107 -0
  209. package/templates/medical-services/tier5-src/_shared/wix-bi.ts +85 -0
  210. package/templates/medical-services/tier5-src/_shared/wix-member-links.ts +114 -0
  211. package/templates/medical-services/tier5-src/_shared/wix-service-price.ts +146 -0
  212. package/templates/medical-services/tier5-src/business-chat/index.ts +732 -0
  213. package/templates/medical-services/tier5-src/himi-booking-account/index.ts +252 -0
  214. package/templates/medical-services/tier5-src/himi-booking-bookings/index.ts +468 -0
  215. package/templates/medical-services/tier5-src/himi-booking-service/index.ts +1190 -0
  216. package/templates/medical-services/tier5-src/himi-booking-services/index.ts +791 -0
  217. package/templates/medical-services/tier5-src/himi-booking-time/index.ts +1729 -0
  218. package/templates/medical-services/tier5-src/himi-branded-lite-faq/index.ts +6 -0
  219. package/templates/medical-services/tier5-src/himi-branded-lite-notifications/index.ts +256 -0
  220. package/templates/medical-services/tier5-src/himi-clinic-home/index.ts +389 -0
  221. package/templates/medical-services/tier5-src/himi-store-account/index.ts +998 -0
  222. package/templates/medical-services/tokens.json +418 -0
  223. package/templates/nonprofit-cause/dev/index.ts +1 -0
  224. package/templates/nonprofit-cause/l10n/fr.json +25 -5
  225. package/templates/nonprofit-cause/l10n/he.json +20 -4
  226. package/templates/nonprofit-cause/recipes/blog-hero.json +95 -0
  227. package/templates/nonprofit-cause/recipes/blog-list-thumb-start.json +177 -147
  228. package/templates/nonprofit-cause/recipes/blog-list.json +172 -142
  229. package/templates/nonprofit-cause/recipes/events-inline-list.json +30 -5
  230. package/templates/nonprofit-cause/recipes/events-inline.json +30 -5
  231. package/templates/nonprofit-cause/recipes/faq-list.json +503 -0
  232. package/templates/nonprofit-cause/recipes/groups-list.json +196 -0
  233. package/templates/nonprofit-cause/recipes/products-carousel.json +141 -0
  234. package/templates/nonprofit-cause/recipes/products-grid.json +143 -0
  235. package/templates/nonprofit-cause/tier5-src/_shared/blog-list.ts +9 -9
  236. package/templates/nonprofit-cause/tier5-src/_shared/events-inline.ts +7 -5
  237. package/templates/nonprofit-cause/tier5-src/_shared/faq-list.ts +405 -0
  238. package/templates/nonprofit-cause/tier5-src/_shared/groups-section.ts +110 -0
  239. package/templates/nonprofit-cause/tier5-src/_shared/member-bookings.ts +17 -4
  240. package/templates/nonprofit-cause/tier5-src/_shared/member-row-extras.ts +10 -2
  241. package/templates/nonprofit-cause/tier5-src/_shared/members-directory.ts +9 -5
  242. package/templates/nonprofit-cause/tier5-src/_shared/products-section.ts +76 -0
  243. package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +2 -2
  244. package/templates/nonprofit-cause-owner/dev/index.ts +54 -0
  245. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +30 -4
  246. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  247. package/templates/owner-lite/dev/index.ts +54 -0
  248. package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +30 -4
  249. package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  250. package/templates/podcast-creator/dev/index.ts +1 -0
  251. package/templates/podcast-creator/l10n/fr.json +35 -5
  252. package/templates/podcast-creator/l10n/he.json +28 -4
  253. package/templates/podcast-creator/recipes/blog-hero.json +95 -0
  254. package/templates/podcast-creator/recipes/blog-list-thumb-start.json +177 -147
  255. package/templates/podcast-creator/recipes/blog-list.json +172 -142
  256. package/templates/podcast-creator/recipes/events-inline-list.json +30 -5
  257. package/templates/podcast-creator/recipes/events-inline.json +30 -5
  258. package/templates/podcast-creator/recipes/faq-list.json +503 -0
  259. package/templates/podcast-creator/recipes/groups-list.json +196 -0
  260. package/templates/podcast-creator/recipes/products-carousel.json +141 -0
  261. package/templates/podcast-creator/recipes/products-grid.json +143 -0
  262. package/templates/podcast-creator/tier5-src/_shared/blog-list.ts +9 -9
  263. package/templates/podcast-creator/tier5-src/_shared/events-inline.ts +7 -5
  264. package/templates/podcast-creator/tier5-src/_shared/faq-list.ts +405 -0
  265. package/templates/podcast-creator/tier5-src/_shared/groups-section.ts +110 -0
  266. package/templates/podcast-creator/tier5-src/_shared/member-bookings.ts +17 -4
  267. package/templates/podcast-creator/tier5-src/_shared/member-row-extras.ts +10 -2
  268. package/templates/podcast-creator/tier5-src/_shared/members-directory.ts +9 -5
  269. package/templates/podcast-creator/tier5-src/_shared/products-section.ts +76 -0
  270. package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +2 -2
  271. package/templates/podcast-creator-owner/dev/index.ts +54 -0
  272. package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +30 -4
  273. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  274. package/templates/portfolio-creative/dev/index.ts +1 -0
  275. package/templates/portfolio-creative/l10n/fr.json +25 -5
  276. package/templates/portfolio-creative/l10n/he.json +20 -4
  277. package/templates/portfolio-creative/recipes/blog-hero.json +95 -0
  278. package/templates/portfolio-creative/recipes/blog-list-thumb-start.json +177 -147
  279. package/templates/portfolio-creative/recipes/blog-list.json +172 -142
  280. package/templates/portfolio-creative/recipes/events-inline-list.json +30 -5
  281. package/templates/portfolio-creative/recipes/events-inline.json +30 -5
  282. package/templates/portfolio-creative/recipes/faq-list.json +503 -0
  283. package/templates/portfolio-creative/recipes/groups-list.json +196 -0
  284. package/templates/portfolio-creative/recipes/products-carousel.json +141 -0
  285. package/templates/portfolio-creative/recipes/products-grid.json +143 -0
  286. package/templates/portfolio-creative/tier5-src/_shared/blog-list.ts +9 -9
  287. package/templates/portfolio-creative/tier5-src/_shared/events-inline.ts +7 -5
  288. package/templates/portfolio-creative/tier5-src/_shared/faq-list.ts +405 -0
  289. package/templates/portfolio-creative/tier5-src/_shared/groups-section.ts +110 -0
  290. package/templates/portfolio-creative/tier5-src/_shared/member-bookings.ts +17 -4
  291. package/templates/portfolio-creative/tier5-src/_shared/member-row-extras.ts +10 -2
  292. package/templates/portfolio-creative/tier5-src/_shared/members-directory.ts +9 -5
  293. package/templates/portfolio-creative/tier5-src/_shared/products-section.ts +76 -0
  294. package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +2 -2
  295. package/templates/portfolio-creative-owner/dev/index.ts +54 -0
  296. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +30 -4
  297. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  298. package/templates/restaurant/dev/index.ts +1 -0
  299. package/templates/restaurant/l10n/fr.json +35 -5
  300. package/templates/restaurant/l10n/he.json +28 -4
  301. package/templates/restaurant/recipes/blog-hero.json +95 -0
  302. package/templates/restaurant/recipes/blog-list-thumb-start.json +177 -147
  303. package/templates/restaurant/recipes/blog-list.json +172 -142
  304. package/templates/restaurant/recipes/events-inline-list.json +30 -5
  305. package/templates/restaurant/recipes/events-inline.json +30 -5
  306. package/templates/restaurant/recipes/faq-list.json +503 -0
  307. package/templates/restaurant/recipes/groups-list.json +196 -0
  308. package/templates/restaurant/recipes/products-carousel.json +141 -0
  309. package/templates/restaurant/recipes/products-grid.json +143 -0
  310. package/templates/restaurant/tier5-src/_shared/blog-list.ts +9 -9
  311. package/templates/restaurant/tier5-src/_shared/events-inline.ts +7 -5
  312. package/templates/restaurant/tier5-src/_shared/faq-list.ts +405 -0
  313. package/templates/restaurant/tier5-src/_shared/groups-section.ts +110 -0
  314. package/templates/restaurant/tier5-src/_shared/member-bookings.ts +17 -4
  315. package/templates/restaurant/tier5-src/_shared/member-row-extras.ts +10 -2
  316. package/templates/restaurant/tier5-src/_shared/members-directory.ts +9 -5
  317. package/templates/restaurant/tier5-src/_shared/products-section.ts +76 -0
  318. package/templates/restaurant/tier5-src/_shared/programs-section.ts +2 -2
  319. package/templates/restaurant-owner/dev/index.ts +54 -0
  320. package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +30 -4
  321. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  322. package/templates/retail-store/dev/index.ts +1 -0
  323. package/templates/retail-store/l10n/fr.json +25 -5
  324. package/templates/retail-store/l10n/he.json +20 -4
  325. package/templates/retail-store/recipes/blog-hero.json +95 -0
  326. package/templates/retail-store/recipes/blog-list-thumb-start.json +177 -147
  327. package/templates/retail-store/recipes/blog-list.json +172 -142
  328. package/templates/retail-store/recipes/events-inline-list.json +30 -5
  329. package/templates/retail-store/recipes/events-inline.json +30 -5
  330. package/templates/retail-store/recipes/faq-list.json +503 -0
  331. package/templates/retail-store/recipes/groups-list.json +196 -0
  332. package/templates/retail-store/recipes/products-carousel.json +141 -0
  333. package/templates/retail-store/recipes/products-grid.json +143 -0
  334. package/templates/retail-store/tier5-src/_shared/blog-list.ts +9 -9
  335. package/templates/retail-store/tier5-src/_shared/events-inline.ts +7 -5
  336. package/templates/retail-store/tier5-src/_shared/faq-list.ts +405 -0
  337. package/templates/retail-store/tier5-src/_shared/groups-section.ts +110 -0
  338. package/templates/retail-store/tier5-src/_shared/member-bookings.ts +17 -4
  339. package/templates/retail-store/tier5-src/_shared/member-row-extras.ts +10 -2
  340. package/templates/retail-store/tier5-src/_shared/members-directory.ts +9 -5
  341. package/templates/retail-store/tier5-src/_shared/products-section.ts +76 -0
  342. package/templates/retail-store/tier5-src/_shared/programs-section.ts +2 -2
  343. package/templates/retail-store-owner/dev/index.ts +54 -0
  344. package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +30 -4
  345. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  346. package/templates/salon-spa/dev/index.ts +1 -0
  347. package/templates/salon-spa/tier5-src/_shared/member-bookings.ts +17 -4
  348. package/templates/salon-spa/tier5-src/_shared/staff-name.ts +18 -0
  349. package/templates/salon-spa/tier5-src/himi-booking-bookings/index.ts +6 -2
  350. package/templates/salon-spa/tier5-src/himi-booking-service/index.ts +7 -2
  351. package/templates/salon-spa/tier5-src/himi-booking-time/index.ts +6 -4
  352. package/templates/wholesale-store/dev/index.ts +1 -0
  353. package/templates/yoga-studio/dev/index.ts +1 -0
  354. package/templates/yoga-studio/l10n/en.json +6 -0
  355. package/templates/yoga-studio/l10n/fr.json +46 -5
  356. package/templates/yoga-studio/l10n/he.json +37 -4
  357. package/templates/yoga-studio/recipes/blog-hero.json +95 -0
  358. package/templates/yoga-studio/recipes/blog-list-thumb-start.json +177 -147
  359. package/templates/yoga-studio/recipes/blog-list.json +172 -142
  360. package/templates/yoga-studio/recipes/events-inline-list.json +30 -5
  361. package/templates/yoga-studio/recipes/events-inline.json +30 -5
  362. package/templates/yoga-studio/recipes/faq-list.json +503 -0
  363. package/templates/yoga-studio/recipes/groups-list.json +196 -0
  364. package/templates/yoga-studio/recipes/products-carousel.json +141 -0
  365. package/templates/yoga-studio/recipes/products-grid.json +143 -0
  366. package/templates/yoga-studio/tier5-src/_shared/blog-list.ts +9 -9
  367. package/templates/yoga-studio/tier5-src/_shared/events-inline.ts +7 -5
  368. package/templates/yoga-studio/tier5-src/_shared/faq-list.ts +405 -0
  369. package/templates/yoga-studio/tier5-src/_shared/groups-section.ts +110 -0
  370. package/templates/yoga-studio/tier5-src/_shared/member-bookings.ts +17 -4
  371. package/templates/yoga-studio/tier5-src/_shared/member-row-extras.ts +10 -2
  372. package/templates/yoga-studio/tier5-src/_shared/members-directory.ts +9 -5
  373. package/templates/yoga-studio/tier5-src/_shared/products-section.ts +76 -0
  374. package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +2 -2
  375. package/templates/yoga-studio/tier5-src/_shared/staff-name.ts +18 -0
  376. package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +6 -2
  377. package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +7 -2
  378. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +6 -4
  379. package/templates/yoga-studio-owner/dev/index.ts +54 -0
  380. package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +30 -4
  381. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
@@ -0,0 +1,85 @@
1
+ // RN BI events whose fields exist only in a worker (epic #4973). The platform maps send every
2
+ // other RN event; these go through `wixPlatform.bi.log`, built inline with RN's own field names
3
+ // rather than by bundling a `@wix/bi-logger-*` package. The host owns every identity and common
4
+ // field (msid, uuid, installationId, contactId, _lv, ...), so none is named here.
5
+ import { bi, type BiLogEvent } from "@himalaya/wix-platform";
6
+
7
+ /** Sends one event without waiting for it and never throws: BI must not change a screen. A
8
+ * screen whose descriptor does not declare `wix_platform` is refused by the host, which is
9
+ * swallowed here like any other BI failure. */
10
+ export function logBi(event: BiLogEvent): void {
11
+ try {
12
+ void Promise.resolve(bi.log(event)).catch(() => undefined);
13
+ } catch {
14
+ /* BI is best-effort */
15
+ }
16
+ }
17
+
18
+ /** The HTTP status a Wix SDK error carries (`HTTP 429: ...`, or a `status` field), else 0. */
19
+ export function wixErrorStatus(error: unknown): number {
20
+ const own = Number((error as { status?: unknown; statusCode?: unknown } | null)?.status ?? (error as { statusCode?: unknown } | null)?.statusCode);
21
+ if (Number.isFinite(own) && own > 0) return own;
22
+ const match = /\bHTTP (\d{3})\b/.exec(String((error as Error | null)?.message ?? error ?? ""));
23
+ return match ? Number(match[1]) : 0;
24
+ }
25
+
26
+ function applicationErrorCode(body: unknown): string {
27
+ const o = body as { details?: { applicationError?: { code?: unknown } }; applicationError?: { code?: unknown }; code?: unknown } | null;
28
+ const code = o?.details?.applicationError?.code ?? o?.applicationError?.code ?? o?.code;
29
+ return typeof code === "string" ? code : "";
30
+ }
31
+
32
+ /** The code both native bridges put in an application error's message: `HTTP 400 [CODE]: description`
33
+ * (iOS JSWorker.swift `WixApiCapability.Error.application`, Android WebViewJSWorker.kt `Error.Application`). */
34
+ const BRIDGE_APPLICATION_CODE = /\bHTTP \d{3} \[([A-Za-z0-9_.:-]+)\]/;
35
+
36
+ /** The Wix application error code of a failed call (RN's `serializeError(e).code`): read from the
37
+ * error itself, else from the `[CODE]` the native bridges put after `HTTP <status> `, else from the
38
+ * JSON body after `HTTP <status>: ` (the bridges' raw-status arm and the web host's wixCall). ""
39
+ * when there is none. */
40
+ export function wixErrorCode(error: unknown): string {
41
+ const own = applicationErrorCode(error);
42
+ if (own) return own;
43
+ const message = String((error as Error | null)?.message ?? error ?? "");
44
+ const bracketed = BRIDGE_APPLICATION_CODE.exec(message);
45
+ if (bracketed) return bracketed[1];
46
+ const start = message.indexOf("{");
47
+ if (start < 0) return "";
48
+ try {
49
+ return applicationErrorCode(JSON.parse(message.slice(start)));
50
+ } catch {
51
+ return "";
52
+ }
53
+ }
54
+
55
+ // RN's `ErrorIndicationType` (mobile-apps-inbox services/errorIndications/errorIndications.type.ts).
56
+ const ERROR_INDICATIONS = new Set([
57
+ "ACCESS_TOKEN_EXPIRED", "ALLOWED_MESSAGING_TIME_WINDOW_EXPIRED", "ATTACHMENT_SIZE_EXCEEDS_ALLOWED_LIMIT", "CAMPAIGN_SUSPENDED",
58
+ "FACEBOOK_ALLOWED_WINDOW_EXPIRED", "GMAIL_ADV_PROTECTION", "INSTAGRAM_ALLOWED_WINDOW_EXPIRED", "INVALID_CHARACTERS",
59
+ "INVALID_PHONE_NUMBER", "INVALID_RECIPIENT_ADDRESS", "LANDLINE_OR_UNREACHABLE_CARRIER", "MESSAGE_FILTERED",
60
+ "MMS_NOT_SUPPORTED_RECEIVING_PHONE_NUMBER", "NETWORK_ISSUE", "NO_MATCHING_RECIPIENT_FOUND", "POLICY_VIOLATION", "QUOTA_EXCEEDED",
61
+ "RATE_LIMIT", "RATE_LIMIT_ERROR", "RECIPIENT_BLOCKED_MESSAGES", "RECIPIENT_NOT_AVAILABLE", "SERVICE_UNAVAILABLE",
62
+ "TELCO_LANDLINE_OR_UNREACHABLE_CARRIER", "TELCO_MEDIA_EXCEEDS_MESSAGING_PROVIDER_SIZE_LIMIT",
63
+ "TELCO_MESSAGE_DELIVERY_UNKNOWN_DESTINATION_HANDSET", "TELCO_MESSAGE_FILTERED", "TELCO_MESSAGE_FROM_NUMBER_STILL_BEING_CONFIGURED",
64
+ "TELCO_MESSAGE_FROM_UNREGISTERED_NUMBER", "TELCO_UNKNOWN_ERROR", "TELCO_UNREACHABLE_DESTINATION_HANDSET", "TOO_MANY_REQUESTS",
65
+ "TOTAL_ATTACHMENTS_SIZE_EXCEEDS_ALLOWED_LIMIT", "UNEXPECTED_ERROR_RETRY_LATER", "UNKNOWN_FAILED_CODE", "UNSUPPORTED",
66
+ "UNSUPPORTED_MESSAGE_TYPE", "USER_RATE_LIMIT",
67
+ ]);
68
+
69
+ /** 5:1604 inboxSendMessageErrorMsgShown (`@wix/bi-logger-crm-data` v2, endpoint ''), for a chat
70
+ * send that failed and said so. RN's `errorReason` is the failed message's indication code, and
71
+ * RN reports a code it does not know as UNSUPPORTED (`getErrorIndicationFromCode`); a send that
72
+ * never left the device is NETWORK_ISSUE and a 429 is RATE_LIMIT. */
73
+ export function logChatSendError(input: { chatroomId: string; contactId?: string; error: unknown; offline: boolean }): void {
74
+ const code = wixErrorCode(input.error);
75
+ const errorReason = input.offline ? "NETWORK_ISSUE"
76
+ : ERROR_INDICATIONS.has(code) ? code
77
+ : wixErrorStatus(input.error) === 429 ? "RATE_LIMIT"
78
+ : "UNSUPPORTED";
79
+ logBi({
80
+ evid: 1604,
81
+ src: 5,
82
+ endpoint: "",
83
+ params: { origin: "native", chatroomId: input.chatroomId, ...(input.contactId ? { contact_id: input.contactId } : {}), errorReason },
84
+ });
85
+ }
@@ -0,0 +1,114 @@
1
+ // The destination data the inbox tap needs from the Wix member-link catalog (the one an app's push taps use):
2
+ // which links a member notification carries, and the canonical Himi screen and param each one opens.
3
+ //
4
+ // This is a COPY, on purpose. A worker's shared helpers are copied into the starter app by the template
5
+ // generator, which follows only relative imports that stay inside the bundles source folder, so a worker
6
+ // cannot import the catalog from its own package without breaking `himi init`.
7
+ // The copy is pinned to the catalog by the notification-target parity test (every id, link, param and
8
+ // screen must match), so a catalog change fails that test until this file follows it.
9
+ //
10
+ // Generated from the catalog's `id`, `matches`, `screenParam` and `canonicalScreen`; `vertical`, `audience`
11
+ // and the commentary belong to the catalog and are not repeated here.
12
+
13
+ export interface MemberLinkDestination {
14
+ id: string;
15
+ /** Longest first, as in the catalog. */
16
+ matches: readonly string[];
17
+ /** The capture that names the item; absent for a list screen. */
18
+ screenParam?: string;
19
+ canonicalScreen: string;
20
+ }
21
+
22
+ export const MEMBER_LINK_DESTINATIONS: readonly MemberLinkDestination[] = [
23
+ {
24
+ id: "store.order",
25
+ matches: [
26
+ "my-account/:site/stores/orders/:orderId",
27
+ ],
28
+ screenParam: "orderId",
29
+ canonicalScreen: "himi_order",
30
+ },
31
+ {
32
+ id: "bookings.session",
33
+ matches: [
34
+ "bookings/app/:site/:businessId/:sessionId",
35
+ ],
36
+ canonicalScreen: "himi_bookings",
37
+ },
38
+ {
39
+ id: "groups.post",
40
+ matches: [
41
+ "clubs-member/club/:groupId/feed/post/:postId/:commentId",
42
+ "clubs-member/club/:groupId/feed/post/:postId",
43
+ ],
44
+ screenParam: "groupId",
45
+ canonicalScreen: "himi_group",
46
+ },
47
+ {
48
+ id: "forum.thread",
49
+ matches: [
50
+ "forum/post/:postId/:commentId/:replyId",
51
+ "forum/post/:postId/:commentId",
52
+ "forum/post/:postId",
53
+ ],
54
+ screenParam: "postId",
55
+ canonicalScreen: "himi_forum_post",
56
+ },
57
+ {
58
+ id: "forum.create",
59
+ matches: [
60
+ "forum/create-post",
61
+ ],
62
+ canonicalScreen: "himi_create_post",
63
+ },
64
+ {
65
+ id: "blog.post",
66
+ matches: [
67
+ "blog/post/:postId",
68
+ ],
69
+ screenParam: "postId",
70
+ canonicalScreen: "himi_blog_post",
71
+ },
72
+ {
73
+ id: "members.profile",
74
+ matches: [
75
+ "members-area/member-profile/:memberId",
76
+ ],
77
+ screenParam: "memberId",
78
+ canonicalScreen: "himi_member",
79
+ },
80
+ {
81
+ id: "events.event",
82
+ matches: [
83
+ "my-account/app/140603ad-af8d-84a5-2c80-a0f60cb47351/:instanceId/:eventId/guest-list/:path",
84
+ "my-account/app/140603ad-af8d-84a5-2c80-a0f60cb47351/:instanceId/:eventId/details",
85
+ ],
86
+ screenParam: "eventId",
87
+ canonicalScreen: "himi_event",
88
+ },
89
+ {
90
+ id: "galleries.shared",
91
+ matches: [
92
+ "shared-gallery/:site/preview/:itemId",
93
+ ],
94
+ canonicalScreen: "himi_galleries",
95
+ },
96
+ {
97
+ id: "galleries.album",
98
+ matches: [
99
+ "lists/:site/:listId/media/:itemId/:commentId",
100
+ "lists/:site/:listId/:tab/:commentId",
101
+ "spaces/lists/:site/:listId/:tab",
102
+ "lists/:site/:listId/:itemId",
103
+ ],
104
+ screenParam: "listId",
105
+ canonicalScreen: "himi_photo_album",
106
+ },
107
+ {
108
+ id: "notifications.list",
109
+ matches: [
110
+ "notifications/list/:site",
111
+ ],
112
+ canonicalScreen: "himi_notifications",
113
+ },
114
+ ];
@@ -0,0 +1,146 @@
1
+ // Shared Wix Bookings service-price formatter for himi workers (#816).
2
+ //
3
+ // One door for turning a Wix Bookings SERVICE payload into a display price
4
+ // string, so the four consuming workers (himi-booking-services,
5
+ // himi-booking-service, himi-booking-time, himi-branded-lite-home) can never
6
+ // drift apart again. Each used to read `payment.price ?? service.price` and
7
+ // default the currency to "USD" — but the live Bookings v2 payload nests the
8
+ // fixed price under `payment.fixed.price.{value,currency}` (Money; `value` is a
9
+ // decimal string), so on a real ILS site the amount rendered blank (the flat
10
+ // fields are absent) or, once decoded, in the wrong "$" currency (the ₪ was
11
+ // dropped). This helper reads the v2 nested shape FIRST and derives the currency
12
+ // FROM THE RECORD, falling back to the legacy/flat shapes for older payloads.
13
+ //
14
+ // Pure + dependency-free (structural `unknown` input, no SDK import) so it bundles
15
+ // into every worker and gen-templates copies it verbatim into each tier5-src.
16
+
17
+ import { formatCurrency } from "../_shared/engine-intl.js";
18
+ /** Coerce a number or numeric string to a finite number, else undefined. */
19
+ function numberOf(value: unknown): number | undefined {
20
+ if (typeof value === "number") return Number.isFinite(value) ? value : undefined;
21
+ if (typeof value === "string" && value.trim()) {
22
+ const n = Number(value);
23
+ return Number.isNaN(n) ? undefined : n;
24
+ }
25
+ return undefined;
26
+ }
27
+
28
+ /** Non-empty trimmed string, else "". */
29
+ function stringOf(value: unknown): string {
30
+ return typeof value === "string" ? value.trim() : "";
31
+ }
32
+
33
+ type LooseService = {
34
+ payment?: {
35
+ rateType?: unknown;
36
+ fixed?: { price?: { value?: unknown; amount?: unknown; currency?: unknown } };
37
+ price?: unknown;
38
+ currency?: unknown;
39
+ };
40
+ price?: unknown;
41
+ currency?: unknown;
42
+ };
43
+
44
+ /**
45
+ * The numeric price amount for a service, following the same v2-first priority
46
+ * as {@link formatServicePrice}. Returns undefined when there is no usable
47
+ * amount or the rate type is non-FIXED — callers use it for "is this a paid
48
+ * service?" decisions so the flag never disagrees with the rendered price.
49
+ */
50
+ export function serviceAmount(service: unknown): number | undefined {
51
+ const s = (service ?? {}) as LooseService;
52
+ const payment = s.payment ?? {};
53
+
54
+ // A declared non-FIXED rate type (VARIED/CUSTOM/NO_FEE) carries no single fixed
55
+ // amount. An ABSENT rateType (legacy/flat payloads) is NOT treated as non-FIXED.
56
+ const rateType = stringOf(payment.rateType).toUpperCase();
57
+ if (rateType && rateType !== "FIXED") return undefined;
58
+
59
+ const fixed = payment.fixed?.price;
60
+ return numberOf(fixed?.value ?? fixed?.amount ?? payment.price ?? s.price);
61
+ }
62
+
63
+ /**
64
+ * The currency for a service, derived FROM THE RECORD (v2 nested first, then
65
+ * legacy nested, then top-level). "USD" is only the absolute last resort when
66
+ * no currency is present anywhere — it never overrides one the record carries.
67
+ */
68
+ export function serviceCurrency(service: unknown): string {
69
+ const s = (service ?? {}) as LooseService;
70
+ const payment = s.payment ?? {};
71
+ return (
72
+ stringOf(payment.fixed?.price?.currency) ||
73
+ stringOf(payment.currency) ||
74
+ stringOf(s.currency) ||
75
+ "USD"
76
+ );
77
+ }
78
+
79
+ /**
80
+ * Whether money is due for this service — a MONEY decision, deliberately not the same
81
+ * predicate as "do we have a number to display".
82
+ *
83
+ * `serviceAmount` returns undefined for any non-FIXED rate type, which is right for
84
+ * display (there is no single figure to render) and wrong for routing: a VARIED or CUSTOM
85
+ * service is chargeable, it just has no fixed figure. Deriving "is this paid?" from
86
+ * `serviceAmount() > 0` therefore sent such a booking down the FREE branch — booked, never
87
+ * charged. `NO_FEE` is the one non-FIXED type that really is free.
88
+ *
89
+ * Fails toward charging: the checkout path already degrades gracefully when nothing is
90
+ * actually owed (no `paymentGatewayOrderId` ⇒ it completes the booking and stops), so a
91
+ * false positive costs nothing while a false negative gives the service away.
92
+ */
93
+ export function serviceIsChargeable(service: unknown): boolean {
94
+ const s = (service ?? {}) as LooseService;
95
+ const rateType = stringOf(s.payment?.rateType).toUpperCase();
96
+ if (rateType === "NO_FEE") return false;
97
+ if (rateType && rateType !== "FIXED") return true; // VARIED / CUSTOM: priced, just not fixed
98
+ const amount = serviceAmount(service);
99
+ return amount != null && amount > 0;
100
+ }
101
+
102
+ /**
103
+ * Format one Bookings v2 Money value (`{ value, currency }`, `value` a decimal string) — a
104
+ * price, a deposit, a VARIED minimum, a cancellation fee. A whole amount drops its cents
105
+ * ("₪90", not "₪90.00"), as the service screen shows it. "" when it carries no usable
106
+ * amount. The currency comes from the Money itself, then from `fallbackCurrency`.
107
+ */
108
+ export function formatServiceMoney(money: unknown, fallbackCurrency = "USD"): string {
109
+ const m = (money ?? {}) as { value?: unknown; amount?: unknown; currency?: unknown };
110
+ const amount = numberOf(m.value ?? m.amount);
111
+ if (amount == null) return "";
112
+ const currency = stringOf(m.currency) || fallbackCurrency;
113
+ try {
114
+ return formatCurrency(amount, currency, undefined, Number.isInteger(amount) ? 0 : undefined);
115
+ } catch {
116
+ return `${amount}`;
117
+ }
118
+ }
119
+
120
+ /**
121
+ * Format a Wix Bookings service's price for display, e.g. "₪111" / "$20" / "$19.50".
122
+ *
123
+ * Reads, in order of preference:
124
+ * 1. Bookings v2 fixed price — `payment.fixed.price.{value,currency}` (the
125
+ * live shape; `value`/`amount` is a decimal string, currency is real).
126
+ * 2. Legacy nested — `payment.price` / `payment.currency`.
127
+ * 3. Top-level — `service.price` / `service.currency`.
128
+ *
129
+ * The currency is ALWAYS derived from the record; "USD" is only the absolute
130
+ * last resort when no currency is present anywhere (so behavior is unchanged
131
+ * when the data simply carries none). A non-FIXED `rateType`
132
+ * (VARIED/CUSTOM/NO_FEE) has no single amount to show → returns "".
133
+ * Returns "" (never throws) when there is no usable numeric amount.
134
+ */
135
+ export function formatServicePrice(service: unknown): string {
136
+ const amount = serviceAmount(service);
137
+ if (amount == null) return "";
138
+ const currency = serviceCurrency(service);
139
+ try {
140
+ // A whole amount drops its cents ("₪70", not "₪70.00"), as formatServiceMoney and the service
141
+ // screen show it, so the same service reads the same price on every screen.
142
+ return formatCurrency(amount, currency, undefined, Number.isInteger(amount) ? 0 : undefined);
143
+ } catch {
144
+ return `${amount}`;
145
+ }
146
+ }