@wix/himalaya-cli 0.1929.0 → 0.1931.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 (187) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +2 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/icon-catalog.generated.d.ts +1 -1
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +7 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/chat-web/src/index.d.ts +12 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +77 -1
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +6 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-chat-web.mjs +19 -9
  8. package/dist/browser-plane/assets.json +5 -5
  9. package/dist/browser-plane/preview-deferred/{95a3ae045bad903e458ea7a5800e60e1044f0f754a65d7127de66ba62e897068.bin → eff56fd2ab5972c0c1053a214225f9d2858768f8e24845a6b99e17a2bf244fd4.bin} +1 -1
  10. package/dist/browser-plane/sw.js +9 -9
  11. package/dist/cli.mjs +332 -73
  12. package/dist/preview-assets.generated.bin +0 -0
  13. package/guides/component-index.md +1 -1
  14. package/guides/component-reference.json +1 -1
  15. package/guides/component-reference.md +7 -0
  16. package/guides/headless-loop.md +1 -1
  17. package/guides/sdk-reference.json +2 -2
  18. package/package.json +2 -2
  19. package/templates/bare-fashion/tier5-src/_shared/owner-load-error.ts +1 -1
  20. package/templates/beauty-salon/tier5-src/_shared/owner-load-error.ts +1 -1
  21. package/templates/beauty-salon-owner/dev/index.ts +169 -139
  22. package/templates/beauty-salon-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  23. package/templates/beauty-salon-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  24. package/templates/beauty-salon-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  25. package/templates/beauty-salon-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  26. package/templates/beauty-salon-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  27. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  28. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  29. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  30. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  31. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  32. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  33. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  34. package/templates/beauty-salon-owner/tier5-src/wix-owner-booking/index.ts +4 -1
  35. package/templates/branded-lite/tier5-src/_shared/owner-load-error.ts +1 -1
  36. package/templates/brandy/tier5-src/_shared/owner-load-error.ts +1 -1
  37. package/templates/community-club/tier5-src/_shared/owner-load-error.ts +1 -1
  38. package/templates/community-club-owner/dev/index.ts +167 -132
  39. package/templates/community-club-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  40. package/templates/community-club-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  41. package/templates/community-club-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  42. package/templates/community-club-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  43. package/templates/community-club-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  44. package/templates/community-club-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  45. package/templates/community-club-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  46. package/templates/community-club-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  47. package/templates/community-club-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  48. package/templates/community-club-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  49. package/templates/community-club-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  50. package/templates/community-club-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  51. package/templates/conference/tier5-src/_shared/owner-load-error.ts +1 -1
  52. package/templates/events-meetups/tier5-src/_shared/owner-load-error.ts +1 -1
  53. package/templates/events-meetups-owner/dev/index.ts +165 -125
  54. package/templates/events-meetups-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  55. package/templates/events-meetups-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  56. package/templates/events-meetups-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  57. package/templates/events-meetups-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  58. package/templates/events-meetups-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  59. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  60. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  61. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  62. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  63. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  64. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  65. package/templates/fitness-gym/tier5-src/_shared/owner-load-error.ts +1 -1
  66. package/templates/gym-fitness/tier5-src/_shared/owner-load-error.ts +1 -1
  67. package/templates/gym-fitness-owner/dev/index.ts +169 -139
  68. package/templates/gym-fitness-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  69. package/templates/gym-fitness-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  70. package/templates/gym-fitness-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  71. package/templates/gym-fitness-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  72. package/templates/gym-fitness-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  73. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  74. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  75. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  76. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  77. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  78. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  79. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  80. package/templates/gym-fitness-owner/tier5-src/wix-owner-booking/index.ts +4 -1
  81. package/templates/himi-chat/tier5-src/_shared/owner-load-error.ts +1 -1
  82. package/templates/medical-services/tier5-src/_shared/owner-load-error.ts +1 -1
  83. package/templates/nonprofit-cause/tier5-src/_shared/owner-load-error.ts +1 -1
  84. package/templates/nonprofit-cause-owner/dev/index.ts +167 -132
  85. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  86. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  87. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  88. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  89. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  90. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  91. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  92. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  93. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  94. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  95. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  96. package/templates/nonprofit-cause-owner/tier5-src/wix-owner-booking/index.ts +4 -1
  97. package/templates/owner-lite/dev/index.ts +171 -141
  98. package/templates/owner-lite/himalaya.content.json +1 -1
  99. package/templates/owner-lite/tier5-src/_shared/owner-load-error.ts +1 -1
  100. package/templates/owner-lite/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  101. package/templates/owner-lite/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  102. package/templates/owner-lite/tier5-src/_shared/owner-selected-site.ts +15 -0
  103. package/templates/owner-lite/tier5-src/_shared/owner-widget-reads.ts +7 -0
  104. package/templates/owner-lite/tier5-src/himi-owner-lite-home/index.ts +30 -8
  105. package/templates/owner-lite/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  106. package/templates/owner-lite/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  107. package/templates/owner-lite/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  108. package/templates/owner-lite/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  109. package/templates/owner-lite/tier5-src/himi-owner-lite-order/index.ts +4 -1
  110. package/templates/owner-lite/tier5-src/himi-owner-lite-record/index.ts +7 -1
  111. package/templates/owner-lite/tier5-src/wix-owner-booking/index.ts +4 -1
  112. package/templates/personal-fitness-trainer/tier5-src/_shared/owner-load-error.ts +1 -1
  113. package/templates/podcast-creator/tier5-src/_shared/owner-load-error.ts +1 -1
  114. package/templates/podcast-creator-owner/dev/index.ts +167 -132
  115. package/templates/podcast-creator-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  116. package/templates/podcast-creator-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  117. package/templates/podcast-creator-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  118. package/templates/podcast-creator-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  119. package/templates/podcast-creator-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  120. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  121. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  122. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  123. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  124. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  125. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  126. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  127. package/templates/portfolio-creative/tier5-src/_shared/owner-load-error.ts +1 -1
  128. package/templates/portfolio-creative-owner/dev/index.ts +169 -139
  129. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  130. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  131. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  132. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  133. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  134. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  135. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  136. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  137. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  138. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  139. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  140. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  141. package/templates/portfolio-creative-owner/tier5-src/wix-owner-booking/index.ts +4 -1
  142. package/templates/professional-services/tier5-src/_shared/owner-load-error.ts +1 -1
  143. package/templates/restaurant/tier5-src/_shared/owner-load-error.ts +1 -1
  144. package/templates/restaurant-owner/dev/index.ts +169 -139
  145. package/templates/restaurant-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  146. package/templates/restaurant-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  147. package/templates/restaurant-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  148. package/templates/restaurant-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  149. package/templates/restaurant-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  150. package/templates/restaurant-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  151. package/templates/restaurant-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  152. package/templates/restaurant-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  153. package/templates/restaurant-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  154. package/templates/restaurant-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  155. package/templates/restaurant-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  156. package/templates/restaurant-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  157. package/templates/restaurant-owner/tier5-src/wix-owner-booking/index.ts +4 -1
  158. package/templates/retail-store/tier5-src/_shared/owner-load-error.ts +1 -1
  159. package/templates/retail-store-owner/dev/index.ts +167 -132
  160. package/templates/retail-store-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  161. package/templates/retail-store-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  162. package/templates/retail-store-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  163. package/templates/retail-store-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  164. package/templates/retail-store-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  165. package/templates/retail-store-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  166. package/templates/retail-store-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  167. package/templates/retail-store-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  168. package/templates/retail-store-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  169. package/templates/retail-store-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  170. package/templates/retail-store-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  171. package/templates/retail-store-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  172. package/templates/salon-spa/tier5-src/_shared/owner-load-error.ts +1 -1
  173. package/templates/wholesale-store/tier5-src/_shared/owner-load-error.ts +1 -1
  174. package/templates/yoga-studio/tier5-src/_shared/owner-load-error.ts +1 -1
  175. package/templates/yoga-studio-owner/dev/index.ts +167 -132
  176. package/templates/yoga-studio-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  177. package/templates/yoga-studio-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  178. package/templates/yoga-studio-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  179. package/templates/yoga-studio-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  180. package/templates/yoga-studio-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  181. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  182. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  183. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  184. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  185. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  186. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  187. package/templates/yoga-studio-owner/tier5-src/wix-owner-booking/index.ts +4 -1
@@ -2,7 +2,7 @@ import { defineService } from '@himalaya/state';
2
2
  import { getOwnerRecord, ownerModuleError, type OwnerRecord } from '../_shared/owner-module-data.js';
3
3
  import { ownerInput, inputOwnerModule, openOwnerDashboard } from '../_shared/owner-module-runtime.js';
4
4
  import { stashCopy, copyParam } from '../_shared/himi-copy.js';
5
- import { askMaestroHidden } from '../_shared/owner-maestro-tab.js';
5
+ import { askMaestroHidden, askMaestroNav } from '../_shared/owner-maestro-tab.js';
6
6
  const moduleId = inputOwnerModule();
7
7
  interface State {
8
8
  /** The record on screen, so the screen can name it to another screen. */
@@ -18,6 +18,12 @@ const svc = defineService('himiOwnerRecord', {
18
18
  state: { id: '', askMaestroHidden: 'true', status: 'loading', title: '', subtitle: '', image: '', noImage: true, statusLabel: '', fields: [], error: '',
19
19
  notLoading: false, notErrored: true, hideContent: true, handoffError: '' } as State,
20
20
  actions: {
21
+ // "Ask Maestro": the chat opens on the Maestro tab, about this record.
22
+ // The screen says what kind of record this is (only a contact's detail has the button). No
23
+ // subject: a contact's title is a person's name, which the Maestro worker reads itself.
24
+ askMaestro(state: State, arg?: unknown): State {
25
+ return askMaestroNav(state, { kind: (arg as { kind?: unknown } | undefined)?.kind, id: state.id });
26
+ },
21
27
  async load(state: State, arg?: unknown): Promise<State | undefined> {
22
28
  stashCopy(arg);
23
29
  const revision = ++generation;
@@ -13,7 +13,7 @@ import { formatWeekdayDateTime } from "../_shared/engine-intl.js";
13
13
  import { ownerLoadError, isBridgeUnavailable, isOwnerPreviewDemo } from "../_shared/owner-load-error.js";
14
14
  import { DEMO_APPOINTMENTS, DEMO_NOTE, demoAppointmentWindow } from "../_shared/owner-preview-demo.js";
15
15
  import { copyParam } from "../_shared/himi-copy.js";
16
- import { askMaestroHidden } from "../_shared/owner-maestro-tab.js";
16
+ import { askMaestroHidden, askMaestroNav } from "../_shared/owner-maestro-tab.js";
17
17
 
18
18
  interface ActionRow { id: string; label: string; action: string; url: string; screen: string; title: string; }
19
19
  interface KV { id: string; label: string; value: string; }
@@ -206,9 +206,12 @@ const svc = defineService<BookingState, {
206
206
  markPaid: (s: BookingState) => Promise<BookingState>;
207
207
  setAttended: (s: BookingState) => Promise<BookingState>;
208
208
  setNoShow: (s: BookingState) => Promise<BookingState>;
209
+ askMaestro: (s: BookingState) => BookingState;
209
210
  }>("ownerBooking", {
210
211
  state: { id: "", askMaestroHidden: "true", status: "loading", title: "", subtitle: "", initial: "?", when: "—", ends: "—", participants: "—", email: "—", phone: "—", staff: "—", location: "", locationHeader: "", videoLabel: "", videoUrl: "", intakeHeader: "", intake: "", actions: [], bookingStatus: "—", payment: "—", statusRaw: "", paymentRaw: "", orderId: "", isClass: false, attendedRaw: false, hideConfirm: true, hideMarkPaid: true, hideAttendance: true, hideDecline: true, hideCancel: true, revision: "", actionError: "", error: "", demoNote: "", notDemo: true },
211
212
  actions: {
213
+ // "Ask Maestro": the chat opens on the Maestro tab, about this booking.
214
+ askMaestro: (s) => askMaestroNav(s, { kind: "booking", id: s.id, subject: s.title }),
212
215
  load: async (s) => {
213
216
  try { return { ...(await fetchInto(s)), id: bookingId(), askMaestroHidden: askMaestroHidden() }; }
214
217
  catch (e) {