@wix/himalaya-cli 0.1492.0 → 0.1494.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 (64) 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/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +52 -2
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/index.d.ts +180 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +4 -2
  5. package/dist/cli.mjs +30 -29
  6. package/dist/preview-assets.generated.bin +0 -0
  7. package/guides/qa-builds.md +14 -2
  8. package/guides/sdk-reference.json +256 -11
  9. package/package.json +2 -2
  10. package/templates/beauty-salon/dev/index.ts +2273 -520
  11. package/templates/beauty-salon/himalaya.content.json +3 -0
  12. package/templates/beauty-salon/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  13. package/templates/beauty-salon/tier5-src/_shared/wix-service-price.ts +18 -0
  14. package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +514 -117
  15. package/templates/beauty-salon/tier5-src/himi-branded-lite-place-summary/index.ts +208 -0
  16. package/templates/beauty-salon/tokens.json +6 -0
  17. package/templates/branded-lite/dev/index.ts +2037 -277
  18. package/templates/branded-lite/himalaya.content.json +3 -0
  19. package/templates/branded-lite/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  20. package/templates/branded-lite/tier5-src/_shared/wix-service-price.ts +18 -0
  21. package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +514 -117
  22. package/templates/branded-lite/tier5-src/himi-branded-lite-place-summary/index.ts +208 -0
  23. package/templates/branded-lite/tokens.json +1 -0
  24. package/templates/community-club/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  25. package/templates/community-club/tier5-src/_shared/wix-service-price.ts +18 -0
  26. package/templates/community-club/tokens.json +6 -0
  27. package/templates/events-meetups/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  28. package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +18 -0
  29. package/templates/events-meetups/tokens.json +6 -0
  30. package/templates/gym-fitness/dev/index.ts +2273 -520
  31. package/templates/gym-fitness/himalaya.content.json +3 -0
  32. package/templates/gym-fitness/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  33. package/templates/gym-fitness/tier5-src/_shared/wix-service-price.ts +18 -0
  34. package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +514 -117
  35. package/templates/gym-fitness/tier5-src/himi-branded-lite-place-summary/index.ts +208 -0
  36. package/templates/gym-fitness/tokens.json +6 -0
  37. package/templates/nonprofit-cause/dev/index.ts +399 -0
  38. package/templates/nonprofit-cause/himalaya.content.json +3 -0
  39. package/templates/nonprofit-cause/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  40. package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +18 -0
  41. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-place-summary/index.ts +208 -0
  42. package/templates/nonprofit-cause/tokens.json +6 -0
  43. package/templates/podcast-creator/dev/index.ts +399 -0
  44. package/templates/podcast-creator/himalaya.content.json +3 -0
  45. package/templates/podcast-creator/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  46. package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +18 -0
  47. package/templates/podcast-creator/tier5-src/himi-branded-lite-place-summary/index.ts +208 -0
  48. package/templates/podcast-creator/tokens.json +6 -0
  49. package/templates/portfolio-creative/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  50. package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +18 -0
  51. package/templates/portfolio-creative/tokens.json +6 -0
  52. package/templates/restaurant/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  53. package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +18 -0
  54. package/templates/restaurant/tokens.json +6 -0
  55. package/templates/retail-store/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  56. package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +18 -0
  57. package/templates/retail-store/tokens.json +6 -0
  58. package/templates/yoga-studio/dev/index.ts +2868 -1115
  59. package/templates/yoga-studio/himalaya.content.json +3 -0
  60. package/templates/yoga-studio/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  61. package/templates/yoga-studio/tier5-src/_shared/wix-service-price.ts +18 -0
  62. package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +514 -117
  63. package/templates/yoga-studio/tier5-src/himi-branded-lite-place-summary/index.ts +208 -0
  64. package/templates/yoga-studio/tokens.json +6 -0
@@ -61,6 +61,9 @@
61
61
  "himi_orders": {
62
62
  "displayName": "Orders"
63
63
  },
64
+ "himi_place_summary": {
65
+ "displayName": "Place Summary"
66
+ },
64
67
  "himi_plan": {
65
68
  "displayName": "Plan"
66
69
  },
@@ -112,6 +112,7 @@ export const HOSTED_SCREEN_VERTICALS: Readonly<Record<string, readonly BrandedLi
112
112
  himi_notifications: ["notifications"],
113
113
  himi_orders: ["store"],
114
114
  himi_photo_album: ["galleries"],
115
+ himi_place_summary: ["bookings", "plans"],
115
116
  himi_plan: ["plans"],
116
117
  himi_plans: ["plans"],
117
118
  himi_podcast: ["podcasts"],
@@ -99,6 +99,24 @@ export function serviceIsChargeable(service: unknown): boolean {
99
99
  return amount != null && amount > 0;
100
100
  }
101
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, "en", Number.isInteger(amount) ? 0 : undefined);
115
+ } catch {
116
+ return `${amount}`;
117
+ }
118
+ }
119
+
102
120
  /**
103
121
  * Format a Wix Bookings service's price for display, e.g. "₪111" / "$20".
104
122
  *