@wix/himalaya-cli 0.1392.0 → 0.1393.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 (284) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +7 -5
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +4 -4
  3. package/dist/cli.mjs +31 -24
  4. package/dist/preview-assets.generated.bin +0 -0
  5. package/guides/sdk-reference.json +4 -4
  6. package/package.json +2 -2
  7. package/templates/beauty-salon/tier5-src/_shared/owner-load-error.ts +115 -12
  8. package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +52 -28
  9. package/templates/beauty-salon-owner/dev/index.ts +545 -100
  10. package/templates/beauty-salon-owner/himalaya.content.json +6 -0
  11. package/templates/beauty-salon-owner/tier5-src/_shared/owner-account.ts +6 -2
  12. package/templates/beauty-salon-owner/tier5-src/_shared/owner-booking-respond.ts +82 -0
  13. package/templates/beauty-salon-owner/tier5-src/_shared/owner-load-error.ts +115 -12
  14. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-account/index.ts +7 -4
  15. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-appointments/index.ts +2 -2
  16. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  17. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-home/index.ts +2 -2
  18. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-order/index.ts +3 -3
  19. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-orders/index.ts +2 -2
  20. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  21. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post/index.ts +60 -43
  22. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  23. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  24. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product/index.ts +31 -32
  25. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product-form/index.ts +23 -43
  26. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-products/index.ts +2 -2
  27. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-service/index.ts +18 -20
  28. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-service-form/index.ts +16 -29
  29. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-services/index.ts +2 -2
  30. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  31. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-today/index.ts +315 -0
  32. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
  33. package/templates/branded-lite/tier5-src/_shared/owner-load-error.ts +115 -12
  34. package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +52 -28
  35. package/templates/branded-lite/tier5-src/himi-branded-lite-group/index.ts +24 -24
  36. package/templates/community-club/tier5-src/_shared/owner-load-error.ts +115 -12
  37. package/templates/community-club/tier5-src/himi-branded-lite-group/index.ts +24 -24
  38. package/templates/community-club-owner/dev/index.ts +317 -100
  39. package/templates/community-club-owner/himalaya.content.json +6 -0
  40. package/templates/community-club-owner/tier5-src/_shared/owner-account.ts +6 -2
  41. package/templates/community-club-owner/tier5-src/_shared/owner-booking-respond.ts +82 -0
  42. package/templates/community-club-owner/tier5-src/_shared/owner-load-error.ts +115 -12
  43. package/templates/community-club-owner/tier5-src/himi-owner-lite-account/index.ts +7 -4
  44. package/templates/community-club-owner/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  45. package/templates/community-club-owner/tier5-src/himi-owner-lite-event/index.ts +18 -20
  46. package/templates/community-club-owner/tier5-src/himi-owner-lite-event-form/index.ts +20 -28
  47. package/templates/community-club-owner/tier5-src/himi-owner-lite-events/index.ts +2 -2
  48. package/templates/community-club-owner/tier5-src/himi-owner-lite-home/index.ts +2 -2
  49. package/templates/community-club-owner/tier5-src/himi-owner-lite-order/index.ts +3 -3
  50. package/templates/community-club-owner/tier5-src/himi-owner-lite-orders/index.ts +2 -2
  51. package/templates/community-club-owner/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  52. package/templates/community-club-owner/tier5-src/himi-owner-lite-post/index.ts +60 -43
  53. package/templates/community-club-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  54. package/templates/community-club-owner/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  55. package/templates/community-club-owner/tier5-src/himi-owner-lite-product/index.ts +31 -32
  56. package/templates/community-club-owner/tier5-src/himi-owner-lite-product-form/index.ts +23 -43
  57. package/templates/community-club-owner/tier5-src/himi-owner-lite-products/index.ts +2 -2
  58. package/templates/community-club-owner/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  59. package/templates/community-club-owner/tier5-src/himi-owner-lite-today/index.ts +315 -0
  60. package/templates/community-club-owner/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
  61. package/templates/events-meetups/tier5-src/_shared/owner-load-error.ts +115 -12
  62. package/templates/events-meetups/tier5-src/himi-branded-lite-group/index.ts +24 -24
  63. package/templates/events-meetups-owner/dev/index.ts +275 -100
  64. package/templates/events-meetups-owner/himalaya.content.json +6 -0
  65. package/templates/events-meetups-owner/tier5-src/_shared/owner-account.ts +6 -2
  66. package/templates/events-meetups-owner/tier5-src/_shared/owner-booking-respond.ts +82 -0
  67. package/templates/events-meetups-owner/tier5-src/_shared/owner-load-error.ts +115 -12
  68. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-account/index.ts +7 -4
  69. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  70. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event/index.ts +18 -20
  71. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event-form/index.ts +20 -28
  72. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-events/index.ts +2 -2
  73. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-home/index.ts +2 -2
  74. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  75. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post/index.ts +60 -43
  76. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  77. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  78. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  79. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-today/index.ts +315 -0
  80. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
  81. package/templates/gym-fitness/tier5-src/_shared/owner-load-error.ts +115 -12
  82. package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +52 -28
  83. package/templates/gym-fitness-owner/dev/index.ts +545 -100
  84. package/templates/gym-fitness-owner/himalaya.content.json +6 -0
  85. package/templates/gym-fitness-owner/tier5-src/_shared/owner-account.ts +6 -2
  86. package/templates/gym-fitness-owner/tier5-src/_shared/owner-booking-respond.ts +82 -0
  87. package/templates/gym-fitness-owner/tier5-src/_shared/owner-load-error.ts +115 -12
  88. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-account/index.ts +7 -4
  89. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-appointments/index.ts +2 -2
  90. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  91. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event/index.ts +18 -20
  92. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event-form/index.ts +20 -28
  93. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-events/index.ts +2 -2
  94. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-home/index.ts +2 -2
  95. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-order/index.ts +3 -3
  96. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-orders/index.ts +2 -2
  97. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  98. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post/index.ts +60 -43
  99. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  100. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  101. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product/index.ts +31 -32
  102. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product-form/index.ts +23 -43
  103. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-products/index.ts +2 -2
  104. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-service/index.ts +18 -20
  105. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-service-form/index.ts +16 -29
  106. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-services/index.ts +2 -2
  107. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  108. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-today/index.ts +315 -0
  109. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
  110. package/templates/himi-chat/tier5-src/_shared/owner-load-error.ts +115 -12
  111. package/templates/nonprofit-cause/tier5-src/_shared/owner-load-error.ts +115 -12
  112. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group/index.ts +24 -24
  113. package/templates/nonprofit-cause-owner/dev/index.ts +503 -100
  114. package/templates/nonprofit-cause-owner/himalaya.content.json +6 -0
  115. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-account.ts +6 -2
  116. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-booking-respond.ts +82 -0
  117. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-load-error.ts +115 -12
  118. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-account/index.ts +7 -4
  119. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-appointments/index.ts +2 -2
  120. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  121. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event/index.ts +18 -20
  122. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event-form/index.ts +20 -28
  123. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-events/index.ts +2 -2
  124. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-home/index.ts +2 -2
  125. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  126. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post/index.ts +60 -43
  127. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  128. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  129. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-service/index.ts +18 -20
  130. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-service-form/index.ts +16 -29
  131. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-services/index.ts +2 -2
  132. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  133. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-today/index.ts +315 -0
  134. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
  135. package/templates/owner-lite/dev/index.ts +545 -100
  136. package/templates/owner-lite/himalaya.content.json +6 -0
  137. package/templates/owner-lite/tier5-src/_shared/owner-account.ts +6 -2
  138. package/templates/owner-lite/tier5-src/_shared/owner-booking-respond.ts +82 -0
  139. package/templates/owner-lite/tier5-src/_shared/owner-load-error.ts +115 -12
  140. package/templates/owner-lite/tier5-src/himi-owner-lite-account/index.ts +7 -4
  141. package/templates/owner-lite/tier5-src/himi-owner-lite-appointments/index.ts +2 -2
  142. package/templates/owner-lite/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  143. package/templates/owner-lite/tier5-src/himi-owner-lite-event/index.ts +18 -20
  144. package/templates/owner-lite/tier5-src/himi-owner-lite-event-form/index.ts +20 -28
  145. package/templates/owner-lite/tier5-src/himi-owner-lite-events/index.ts +2 -2
  146. package/templates/owner-lite/tier5-src/himi-owner-lite-home/index.ts +2 -2
  147. package/templates/owner-lite/tier5-src/himi-owner-lite-order/index.ts +3 -3
  148. package/templates/owner-lite/tier5-src/himi-owner-lite-orders/index.ts +2 -2
  149. package/templates/owner-lite/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  150. package/templates/owner-lite/tier5-src/himi-owner-lite-post/index.ts +60 -43
  151. package/templates/owner-lite/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  152. package/templates/owner-lite/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  153. package/templates/owner-lite/tier5-src/himi-owner-lite-product/index.ts +31 -32
  154. package/templates/owner-lite/tier5-src/himi-owner-lite-product-form/index.ts +23 -43
  155. package/templates/owner-lite/tier5-src/himi-owner-lite-products/index.ts +2 -2
  156. package/templates/owner-lite/tier5-src/himi-owner-lite-service/index.ts +18 -20
  157. package/templates/owner-lite/tier5-src/himi-owner-lite-service-form/index.ts +16 -29
  158. package/templates/owner-lite/tier5-src/himi-owner-lite-services/index.ts +2 -2
  159. package/templates/owner-lite/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  160. package/templates/owner-lite/tier5-src/himi-owner-lite-today/index.ts +315 -0
  161. package/templates/owner-lite/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
  162. package/templates/podcast-creator/tier5-src/_shared/owner-load-error.ts +115 -12
  163. package/templates/podcast-creator-owner/dev/index.ts +317 -100
  164. package/templates/podcast-creator-owner/himalaya.content.json +6 -0
  165. package/templates/podcast-creator-owner/tier5-src/_shared/owner-account.ts +6 -2
  166. package/templates/podcast-creator-owner/tier5-src/_shared/owner-booking-respond.ts +82 -0
  167. package/templates/podcast-creator-owner/tier5-src/_shared/owner-load-error.ts +115 -12
  168. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-account/index.ts +7 -4
  169. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  170. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event/index.ts +18 -20
  171. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event-form/index.ts +20 -28
  172. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-events/index.ts +2 -2
  173. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-home/index.ts +2 -2
  174. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-order/index.ts +3 -3
  175. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-orders/index.ts +2 -2
  176. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  177. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post/index.ts +60 -43
  178. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  179. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  180. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product/index.ts +31 -32
  181. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product-form/index.ts +23 -43
  182. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-products/index.ts +2 -2
  183. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  184. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-today/index.ts +315 -0
  185. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
  186. package/templates/portfolio-creative/tier5-src/_shared/owner-load-error.ts +115 -12
  187. package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +52 -28
  188. package/templates/portfolio-creative-owner/dev/index.ts +545 -100
  189. package/templates/portfolio-creative-owner/himalaya.content.json +6 -0
  190. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-account.ts +6 -2
  191. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-booking-respond.ts +82 -0
  192. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-load-error.ts +115 -12
  193. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-account/index.ts +7 -4
  194. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-appointments/index.ts +2 -2
  195. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  196. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-home/index.ts +2 -2
  197. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-order/index.ts +3 -3
  198. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-orders/index.ts +2 -2
  199. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  200. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post/index.ts +60 -43
  201. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  202. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  203. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product/index.ts +31 -32
  204. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product-form/index.ts +23 -43
  205. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-products/index.ts +2 -2
  206. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-service/index.ts +18 -20
  207. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-service-form/index.ts +16 -29
  208. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-services/index.ts +2 -2
  209. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  210. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-today/index.ts +315 -0
  211. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
  212. package/templates/restaurant/tier5-src/_shared/owner-load-error.ts +115 -12
  213. package/templates/restaurant-owner/dev/index.ts +545 -100
  214. package/templates/restaurant-owner/himalaya.content.json +6 -0
  215. package/templates/restaurant-owner/tier5-src/_shared/owner-account.ts +6 -2
  216. package/templates/restaurant-owner/tier5-src/_shared/owner-booking-respond.ts +82 -0
  217. package/templates/restaurant-owner/tier5-src/_shared/owner-load-error.ts +115 -12
  218. package/templates/restaurant-owner/tier5-src/himi-owner-lite-account/index.ts +7 -4
  219. package/templates/restaurant-owner/tier5-src/himi-owner-lite-appointments/index.ts +2 -2
  220. package/templates/restaurant-owner/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  221. package/templates/restaurant-owner/tier5-src/himi-owner-lite-event/index.ts +18 -20
  222. package/templates/restaurant-owner/tier5-src/himi-owner-lite-event-form/index.ts +20 -28
  223. package/templates/restaurant-owner/tier5-src/himi-owner-lite-events/index.ts +2 -2
  224. package/templates/restaurant-owner/tier5-src/himi-owner-lite-home/index.ts +2 -2
  225. package/templates/restaurant-owner/tier5-src/himi-owner-lite-order/index.ts +3 -3
  226. package/templates/restaurant-owner/tier5-src/himi-owner-lite-orders/index.ts +2 -2
  227. package/templates/restaurant-owner/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  228. package/templates/restaurant-owner/tier5-src/himi-owner-lite-post/index.ts +60 -43
  229. package/templates/restaurant-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  230. package/templates/restaurant-owner/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  231. package/templates/restaurant-owner/tier5-src/himi-owner-lite-product/index.ts +31 -32
  232. package/templates/restaurant-owner/tier5-src/himi-owner-lite-product-form/index.ts +23 -43
  233. package/templates/restaurant-owner/tier5-src/himi-owner-lite-products/index.ts +2 -2
  234. package/templates/restaurant-owner/tier5-src/himi-owner-lite-service/index.ts +18 -20
  235. package/templates/restaurant-owner/tier5-src/himi-owner-lite-service-form/index.ts +16 -29
  236. package/templates/restaurant-owner/tier5-src/himi-owner-lite-services/index.ts +2 -2
  237. package/templates/restaurant-owner/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  238. package/templates/restaurant-owner/tier5-src/himi-owner-lite-today/index.ts +315 -0
  239. package/templates/restaurant-owner/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
  240. package/templates/retail-store/tier5-src/_shared/owner-load-error.ts +115 -12
  241. package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +52 -28
  242. package/templates/retail-store-owner/dev/index.ts +317 -100
  243. package/templates/retail-store-owner/himalaya.content.json +6 -0
  244. package/templates/retail-store-owner/tier5-src/_shared/owner-account.ts +6 -2
  245. package/templates/retail-store-owner/tier5-src/_shared/owner-booking-respond.ts +82 -0
  246. package/templates/retail-store-owner/tier5-src/_shared/owner-load-error.ts +115 -12
  247. package/templates/retail-store-owner/tier5-src/himi-owner-lite-account/index.ts +7 -4
  248. package/templates/retail-store-owner/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  249. package/templates/retail-store-owner/tier5-src/himi-owner-lite-home/index.ts +2 -2
  250. package/templates/retail-store-owner/tier5-src/himi-owner-lite-order/index.ts +3 -3
  251. package/templates/retail-store-owner/tier5-src/himi-owner-lite-orders/index.ts +2 -2
  252. package/templates/retail-store-owner/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  253. package/templates/retail-store-owner/tier5-src/himi-owner-lite-post/index.ts +60 -43
  254. package/templates/retail-store-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  255. package/templates/retail-store-owner/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  256. package/templates/retail-store-owner/tier5-src/himi-owner-lite-product/index.ts +31 -32
  257. package/templates/retail-store-owner/tier5-src/himi-owner-lite-product-form/index.ts +23 -43
  258. package/templates/retail-store-owner/tier5-src/himi-owner-lite-products/index.ts +2 -2
  259. package/templates/retail-store-owner/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  260. package/templates/retail-store-owner/tier5-src/himi-owner-lite-today/index.ts +315 -0
  261. package/templates/retail-store-owner/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
  262. package/templates/yoga-studio/tier5-src/_shared/owner-load-error.ts +115 -12
  263. package/templates/yoga-studio-owner/dev/index.ts +503 -100
  264. package/templates/yoga-studio-owner/himalaya.content.json +6 -0
  265. package/templates/yoga-studio-owner/tier5-src/_shared/owner-account.ts +6 -2
  266. package/templates/yoga-studio-owner/tier5-src/_shared/owner-booking-respond.ts +82 -0
  267. package/templates/yoga-studio-owner/tier5-src/_shared/owner-load-error.ts +115 -12
  268. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-account/index.ts +7 -4
  269. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-appointments/index.ts +2 -2
  270. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-ask/live.ts +3 -3
  271. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event/index.ts +18 -20
  272. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event-form/index.ts +20 -28
  273. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-events/index.ts +2 -2
  274. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-home/index.ts +2 -2
  275. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-overview/index.ts +2 -2
  276. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post/index.ts +60 -43
  277. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -23
  278. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-posts/index.ts +2 -2
  279. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-service/index.ts +18 -20
  280. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-service-form/index.ts +16 -29
  281. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-services/index.ts +2 -2
  282. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-sites/index.ts +2 -2
  283. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-today/index.ts +315 -0
  284. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-wrist/index.ts +42 -15
@@ -52184,106 +52184,6 @@ const SCREENS = runtimeSetting({
52184
52184
  ]
52185
52185
  }
52186
52186
  }
52187
- },
52188
- {
52189
- "id": "himi_owner_lite_account.role",
52190
- "body": {
52191
- "package": "himalaya",
52192
- "type": "HStack",
52193
- "props": {
52194
- "spacing": 0,
52195
- "children": [
52196
- {
52197
- "id": "",
52198
- "body": {
52199
- "package": "himalaya",
52200
- "type": "Text",
52201
- "props": {
52202
- "text": "Role",
52203
- "style": "footnote",
52204
- "color": "textSecondary"
52205
- }
52206
- },
52207
- "modifiers": {
52208
- "padding": {
52209
- "trailing": 10
52210
- }
52211
- }
52212
- },
52213
- {
52214
- "id": "",
52215
- "body": {
52216
- "package": "himalaya",
52217
- "type": "Spacer",
52218
- "props": {}
52219
- }
52220
- },
52221
- {
52222
- "id": "",
52223
- "body": {
52224
- "package": "himalaya",
52225
- "type": "Text",
52226
- "props": {
52227
- "text": "Shop owner",
52228
- "style": "bodyEmphasis",
52229
- "maxLines": 1,
52230
- "collapseWhenEmpty": true
52231
- }
52232
- }
52233
- }
52234
- ]
52235
- }
52236
- }
52237
- },
52238
- {
52239
- "id": "himi_owner_lite_account.plan",
52240
- "body": {
52241
- "package": "himalaya",
52242
- "type": "HStack",
52243
- "props": {
52244
- "spacing": 0,
52245
- "children": [
52246
- {
52247
- "id": "",
52248
- "body": {
52249
- "package": "himalaya",
52250
- "type": "Text",
52251
- "props": {
52252
- "text": "Plan",
52253
- "style": "footnote",
52254
- "color": "textSecondary"
52255
- }
52256
- },
52257
- "modifiers": {
52258
- "padding": {
52259
- "trailing": 10
52260
- }
52261
- }
52262
- },
52263
- {
52264
- "id": "",
52265
- "body": {
52266
- "package": "himalaya",
52267
- "type": "Spacer",
52268
- "props": {}
52269
- }
52270
- },
52271
- {
52272
- "id": "",
52273
- "body": {
52274
- "package": "himalaya",
52275
- "type": "Text",
52276
- "props": {
52277
- "text": "Business",
52278
- "style": "bodyEmphasis",
52279
- "maxLines": 1,
52280
- "collapseWhenEmpty": true
52281
- }
52282
- }
52283
- }
52284
- ]
52285
- }
52286
- }
52287
52187
  }
52288
52188
  ]
52289
52189
  }
@@ -52379,6 +52279,28 @@ const SCREENS = runtimeSetting({
52379
52279
  "modifiers": {
52380
52280
  "hiddenPath": "$service:himiOwnerLiteAccount.noTerms"
52381
52281
  }
52282
+ },
52283
+ {
52284
+ "id": "himi_owner_lite_account.deleteAccount",
52285
+ "body": {
52286
+ "package": "himalaya",
52287
+ "type": "Button",
52288
+ "props": {
52289
+ "title": "Delete account",
52290
+ "style": "plain",
52291
+ "fullWidth": true,
52292
+ "role": "destructive",
52293
+ "action": {
52294
+ "actionId": "tier5.himiOwnerLiteAccount.openLink",
52295
+ "params": {
52296
+ "kind": "deleteAccount"
52297
+ }
52298
+ }
52299
+ }
52300
+ },
52301
+ "modifiers": {
52302
+ "hiddenPath": "$service:himiOwnerLiteAccount.noDeleteAccount"
52303
+ }
52382
52304
  }
52383
52305
  ]
52384
52306
  }
@@ -52450,6 +52372,7 @@ const SCREENS = runtimeSetting({
52450
52372
  "supportUrl": "https://www.wix.com/support",
52451
52373
  "privacyUrl": "https://www.wix.com/about/privacy",
52452
52374
  "termsUrl": "https://www.wix.com/about/terms-of-use",
52375
+ "deleteAccountUrl": "https://manage.wix.com/account/account-settings",
52453
52376
  "businessName": "__HIMI_APP_NAME__",
52454
52377
  "copy": "{\"ownerAccount.roleValue\":\"Shop owner\",\"ownerAccount.subtitle\":\"Shop owner\"}"
52455
52378
  }
@@ -63726,6 +63649,300 @@ const SCREENS = runtimeSetting({
63726
63649
  "bundleVersion": "0.0.1"
63727
63650
  }
63728
63651
  },
63652
+ "himi_owner_lite_widget_today_small": {
63653
+ "screenId": "himi_owner_lite_widget_today_small",
63654
+ "renderer": "sdui_intent",
63655
+ "title": "Today widget (small)",
63656
+ "schemaVersion": 1,
63657
+ "cacheControl": {
63658
+ "maxAge": 0,
63659
+ "staleWhileRevalidate": 0
63660
+ },
63661
+ "telemetryScreenName": "himi_owner_lite_widget_today_small",
63662
+ "payload": {
63663
+ "id": "himi_owner_lite_widget_today_small.root",
63664
+ "body": {
63665
+ "package": "himalaya",
63666
+ "type": "VStack",
63667
+ "props": {
63668
+ "spacing": 4,
63669
+ "alignment": "leading",
63670
+ "children": [
63671
+ {
63672
+ "id": "owner_widget.small.header",
63673
+ "body": {
63674
+ "package": "himalaya",
63675
+ "type": "HStack",
63676
+ "props": {
63677
+ "spacing": 4,
63678
+ "children": [
63679
+ {
63680
+ "id": "owner_widget.small.icon",
63681
+ "body": {
63682
+ "package": "himalaya",
63683
+ "type": "Icon",
63684
+ "props": {
63685
+ "name": "calendar",
63686
+ "size": 12,
63687
+ "tint": "accentPrimary"
63688
+ }
63689
+ },
63690
+ "modifiers": {
63691
+ "accessibilityRole": "decorative"
63692
+ }
63693
+ },
63694
+ {
63695
+ "id": "owner_widget.small.title",
63696
+ "body": {
63697
+ "package": "himalaya",
63698
+ "type": "Text",
63699
+ "props": {
63700
+ "text": "Today",
63701
+ "style": "caption",
63702
+ "color": "textSecondary",
63703
+ "maxLines": 1
63704
+ }
63705
+ }
63706
+ }
63707
+ ]
63708
+ }
63709
+ }
63710
+ },
63711
+ {
63712
+ "id": "owner_widget.small.message",
63713
+ "body": {
63714
+ "package": "himalaya",
63715
+ "type": "Text",
63716
+ "props": {
63717
+ "text": "$service:ownerToday.message",
63718
+ "style": "footnote",
63719
+ "color": "textSecondary",
63720
+ "maxLines": 3
63721
+ }
63722
+ },
63723
+ "modifiers": {
63724
+ "hiddenPath": "$service:ownerToday.hideMessage"
63725
+ }
63726
+ },
63727
+ {
63728
+ "id": "owner_widget.small.spacer",
63729
+ "body": {
63730
+ "package": "himalaya",
63731
+ "type": "Spacer",
63732
+ "props": {}
63733
+ }
63734
+ },
63735
+ {
63736
+ "id": "owner_widget.small.counts",
63737
+ "body": {
63738
+ "package": "himalaya",
63739
+ "type": "Text",
63740
+ "props": {
63741
+ "text": "$service:ownerToday.countsShort",
63742
+ "style": "caption",
63743
+ "maxLines": 1,
63744
+ "monospacedDigits": true
63745
+ }
63746
+ },
63747
+ "modifiers": {
63748
+ "hiddenPath": "$service:ownerToday.message"
63749
+ }
63750
+ }
63751
+ ]
63752
+ }
63753
+ }
63754
+ },
63755
+ "input": {
63756
+ "verticals": "store"
63757
+ },
63758
+ "logicBundle": {
63759
+ "url": "http://localhost:8190/v1/bundles/himi-owner-lite-today",
63760
+ "integrity": "",
63761
+ "contentType": "application/javascript+ts-bundle",
63762
+ "declaredCapabilities": [
63763
+ "wix_api"
63764
+ ],
63765
+ "minBinaryVersion": "0.1.0",
63766
+ "bundleVersion": "0.0.1"
63767
+ }
63768
+ },
63769
+ "himi_owner_lite_widget_today_medium": {
63770
+ "screenId": "himi_owner_lite_widget_today_medium",
63771
+ "renderer": "sdui_intent",
63772
+ "title": "Today widget (medium)",
63773
+ "schemaVersion": 1,
63774
+ "cacheControl": {
63775
+ "maxAge": 0,
63776
+ "staleWhileRevalidate": 0
63777
+ },
63778
+ "telemetryScreenName": "himi_owner_lite_widget_today_medium",
63779
+ "payload": {
63780
+ "id": "himi_owner_lite_widget_today_medium.root",
63781
+ "body": {
63782
+ "package": "himalaya",
63783
+ "type": "VStack",
63784
+ "props": {
63785
+ "spacing": 6,
63786
+ "alignment": "leading",
63787
+ "children": [
63788
+ {
63789
+ "id": "owner_widget.medium.header_row",
63790
+ "body": {
63791
+ "package": "himalaya",
63792
+ "type": "HStack",
63793
+ "props": {
63794
+ "spacing": 4,
63795
+ "children": [
63796
+ {
63797
+ "id": "owner_widget.medium.icon",
63798
+ "body": {
63799
+ "package": "himalaya",
63800
+ "type": "Icon",
63801
+ "props": {
63802
+ "name": "calendar",
63803
+ "size": 12,
63804
+ "tint": "accentPrimary"
63805
+ }
63806
+ },
63807
+ "modifiers": {
63808
+ "accessibilityRole": "decorative"
63809
+ }
63810
+ },
63811
+ {
63812
+ "id": "owner_widget.medium.header",
63813
+ "body": {
63814
+ "package": "himalaya",
63815
+ "type": "Text",
63816
+ "props": {
63817
+ "text": "$service:ownerToday.header",
63818
+ "style": "caption",
63819
+ "color": "textSecondary",
63820
+ "maxLines": 1
63821
+ }
63822
+ }
63823
+ }
63824
+ ]
63825
+ }
63826
+ }
63827
+ },
63828
+ {
63829
+ "id": "owner_widget.medium.message",
63830
+ "body": {
63831
+ "package": "himalaya",
63832
+ "type": "Text",
63833
+ "props": {
63834
+ "text": "$service:ownerToday.message",
63835
+ "style": "footnote",
63836
+ "color": "textSecondary",
63837
+ "maxLines": 3
63838
+ }
63839
+ },
63840
+ "modifiers": {
63841
+ "hiddenPath": "$service:ownerToday.hideMessage"
63842
+ }
63843
+ },
63844
+ {
63845
+ "id": "owner_widget.medium.spacer",
63846
+ "body": {
63847
+ "package": "himalaya",
63848
+ "type": "Spacer",
63849
+ "props": {}
63850
+ }
63851
+ },
63852
+ {
63853
+ "id": "owner_widget.medium.divider",
63854
+ "body": {
63855
+ "package": "himalaya",
63856
+ "type": "Divider",
63857
+ "props": {}
63858
+ },
63859
+ "modifiers": {
63860
+ "hiddenPath": "$service:ownerToday.message"
63861
+ }
63862
+ },
63863
+ {
63864
+ "id": "owner_widget.medium.counts",
63865
+ "body": {
63866
+ "package": "himalaya",
63867
+ "type": "HStack",
63868
+ "props": {
63869
+ "spacing": 8,
63870
+ "children": [
63871
+ {
63872
+ "id": "owner_widget.medium.counts_spacer",
63873
+ "body": {
63874
+ "package": "himalaya",
63875
+ "type": "Spacer",
63876
+ "props": {}
63877
+ }
63878
+ },
63879
+ {
63880
+ "id": "owner_widget.medium.orders_row",
63881
+ "body": {
63882
+ "package": "himalaya",
63883
+ "type": "HStack",
63884
+ "props": {
63885
+ "spacing": 4,
63886
+ "children": [
63887
+ {
63888
+ "id": "owner_widget.medium.orders_icon",
63889
+ "body": {
63890
+ "package": "himalaya",
63891
+ "type": "Icon",
63892
+ "props": {
63893
+ "name": "bag",
63894
+ "size": 12,
63895
+ "tint": "accentPrimary"
63896
+ }
63897
+ },
63898
+ "modifiers": {
63899
+ "accessibilityRole": "decorative"
63900
+ }
63901
+ },
63902
+ {
63903
+ "id": "owner_widget.medium.orders",
63904
+ "body": {
63905
+ "package": "himalaya",
63906
+ "type": "Text",
63907
+ "props": {
63908
+ "text": "$service:ownerToday.orderLabel",
63909
+ "style": "footnote",
63910
+ "maxLines": 1
63911
+ }
63912
+ }
63913
+ }
63914
+ ]
63915
+ }
63916
+ },
63917
+ "modifiers": {
63918
+ "hiddenPath": "$service:ownerToday.hideOrders"
63919
+ }
63920
+ }
63921
+ ]
63922
+ }
63923
+ },
63924
+ "modifiers": {
63925
+ "hiddenPath": "$service:ownerToday.message"
63926
+ }
63927
+ }
63928
+ ]
63929
+ }
63930
+ }
63931
+ },
63932
+ "input": {
63933
+ "verticals": "store"
63934
+ },
63935
+ "logicBundle": {
63936
+ "url": "http://localhost:8190/v1/bundles/himi-owner-lite-today",
63937
+ "integrity": "",
63938
+ "contentType": "application/javascript+ts-bundle",
63939
+ "declaredCapabilities": [
63940
+ "wix_api"
63941
+ ],
63942
+ "minBinaryVersion": "0.1.0",
63943
+ "bundleVersion": "0.0.1"
63944
+ }
63945
+ },
63729
63946
  "himi_owner_lite_wrist_home": {
63730
63947
  "screenId": "himi_owner_lite_wrist_home",
63731
63948
  "renderer": "sdui_intent",
@@ -163,6 +163,12 @@
163
163
  "himi_owner_lite_sites": {
164
164
  "displayName": "Sites"
165
165
  },
166
+ "himi_owner_lite_widget_today_medium": {
167
+ "displayName": "Today widget (medium)"
168
+ },
169
+ "himi_owner_lite_widget_today_small": {
170
+ "displayName": "Today widget (small)"
171
+ },
166
172
  "himi_owner_lite_wrist_home": {
167
173
  "displayName": "Next up"
168
174
  },
@@ -15,10 +15,13 @@ export interface AccountState {
15
15
  supportUrl: string;
16
16
  privacyUrl: string;
17
17
  termsUrl: string;
18
+ /** Wix's own account-deletion destination (App Store 5.1.1(v)). */
19
+ deleteAccountUrl: string;
18
20
  /** hiddenPath flags — TRUE hides, so each is phrased negatively. */
19
21
  noSupport: boolean;
20
22
  noPrivacy: boolean;
21
23
  noTerms: boolean;
24
+ noDeleteAccount: boolean;
22
25
  }
23
26
 
24
27
  /** Only absolute http(s) URLs are openable; anything else is treated as absent. */
@@ -37,13 +40,14 @@ export function ownerLineOf(name: string, email: string): string {
37
40
 
38
41
  export function shapeAccount(s: Partial<AccountState>): AccountState {
39
42
  const supportUrl = safeUrl(s.supportUrl), privacyUrl = safeUrl(s.privacyUrl), termsUrl = safeUrl(s.termsUrl);
43
+ const deleteAccountUrl = safeUrl(s.deleteAccountUrl);
40
44
  return {
41
45
  status: s.status ?? "loading",
42
46
  businessName: s.businessName ?? "",
43
47
  ownerLine: s.ownerLine ?? "",
44
48
  versionLine: s.versionLine ?? "",
45
49
  error: s.error ?? "",
46
- supportUrl, privacyUrl, termsUrl,
47
- noSupport: !supportUrl, noPrivacy: !privacyUrl, noTerms: !termsUrl,
50
+ supportUrl, privacyUrl, termsUrl, deleteAccountUrl,
51
+ noSupport: !supportUrl, noPrivacy: !privacyUrl, noTerms: !termsUrl, noDeleteAccount: !deleteAccountUrl,
48
52
  };
49
53
  }
@@ -0,0 +1,82 @@
1
+ // Accept / Decline ONE booking request — the write shared by the two __HIMI_APP_NAME__ surfaces that
2
+ // answer a request without opening the booking screen: the paired watch (`himi-owner-lite-wrist`)
3
+ // and the notification's action buttons (`himi-owner-lite-nav`).
4
+ //
5
+ // Both follow the same rules:
6
+ // • the press names the business it was shown for, and is REFUSED unless that is the business
7
+ // the phone has active — a site switched between delivery and press must never confirm
8
+ // another business's booking;
9
+ // • the write itself is addressed at that business (`wix-site-id`), so even a switch that lands
10
+ // between the check and the request cannot move it;
11
+ // • only a request still pending is written, at the revision Wix last reported.
12
+
13
+ import { getBooking, confirmBooking, declineBooking } from "@himalaya/wix-bookings";
14
+
15
+ type Rec = Record<string, unknown>;
16
+
17
+ /** The statuses that are waiting on the owner. */
18
+ export const PENDING_BOOKING_STATUSES: ReadonlySet<string> = new Set(["PENDING", "PENDING_APPROVAL", "WAITING_LIST"]);
19
+
20
+ export type BookingResponse = "confirm" | "decline";
21
+
22
+ /** A press may write only for the business the phone has active. Fails CLOSED: a press that
23
+ * names no business, or a host that cannot say which one is active, writes nothing. */
24
+ export function isForActiveBusiness(siteId: string, activeSiteId: string): boolean {
25
+ return !!siteId && !!activeSiteId && siteId === activeSiteId;
26
+ }
27
+
28
+ /** Wix refused the write because the booking moved on (another revision, already handled). */
29
+ export function isStaleBookingWrite(e: unknown): boolean {
30
+ return /revision|\b409\b|ABORTED|conflict/i.test(String((e as Error)?.message ?? e));
31
+ }
32
+
33
+ /** Confirm or decline `bookingId` at `revision`, addressed at `siteId`. Rejects without a
34
+ * request when `siteId` is empty: an unaddressed write would land on whatever business the
35
+ * ambient bridge is scoped to. */
36
+ export function writeBookingResponse(kind: BookingResponse, bookingId: string, revision: string, siteId: string): Promise<unknown> {
37
+ const site = siteId.trim();
38
+ if (!site) return Promise.reject(new Error("writeBookingResponse: a booking write must name its business"));
39
+ const opts = { site };
40
+ return kind === "confirm" ? confirmBooking(bookingId, revision, opts) : declineBooking(bookingId, revision, false, opts);
41
+ }
42
+
43
+ export type BookingResponseOutcome =
44
+ | "confirmed" | "declined"
45
+ /** Not written: no booking id, or a press for a business other than the active one. */
46
+ | "refused"
47
+ /** Not written: the booking is no longer waiting on the owner (or no longer exists). */
48
+ | "notPending"
49
+ /** Not written: Wix reported a newer revision between the read and the write. */
50
+ | "stale"
51
+ /** Not written: the read or the write failed. */
52
+ | "failed";
53
+
54
+ function str(r: Rec | undefined, key: string): string {
55
+ const v = r?.[key];
56
+ return typeof v === "string" ? v : typeof v === "number" ? String(v) : "";
57
+ }
58
+
59
+ /** Answer a request known only by id — a notification carries no revision, so the booking is
60
+ * read first (from the business the press names) and written only while it is still pending. */
61
+ export async function respondToBookingById(
62
+ kind: BookingResponse,
63
+ bookingId: string,
64
+ siteId: string,
65
+ activeSiteId: string,
66
+ ): Promise<BookingResponseOutcome> {
67
+ if (!bookingId || !isForActiveBusiness(siteId, activeSiteId)) return "refused";
68
+ let booking: Rec | undefined;
69
+ try {
70
+ booking = ((await getBooking(bookingId, { site: siteId })) as unknown as { booking?: Rec } | undefined)?.booking;
71
+ } catch {
72
+ return "failed";
73
+ }
74
+ const revision = str(booking, "revision");
75
+ if (!booking || !revision || !PENDING_BOOKING_STATUSES.has(str(booking, "status"))) return "notPending";
76
+ try {
77
+ await writeBookingResponse(kind, bookingId, revision, siteId);
78
+ } catch (e) {
79
+ return isStaleBookingWrite(e) ? "stale" : "failed";
80
+ }
81
+ return kind === "confirm" ? "confirmed" : "declined";
82
+ }