@wix/himalaya-cli 0.1588.0 → 0.1590.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 (220) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +2 -1
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/torch/src/index.d.ts +39 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/webview-page/src/capabilities.generated.d.ts +2 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +13 -2
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/extensions.d.ts +28 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +9 -5
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -0
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -0
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -0
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -0
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -0
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/torch.mjs +78 -0
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-groups.mjs +14 -0
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +9 -8
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +4 -0
  20. package/dist/cli.mjs +121 -50
  21. package/dist/preview-assets.generated.bin +0 -0
  22. package/fixtures/wix-canned.json +16 -0
  23. package/guides/app-config.md +1 -1
  24. package/guides/importable-sdks.md +1 -0
  25. package/guides/one-app-to-himi-app.md +18 -4
  26. package/guides/qa-builds.md +12 -0
  27. package/guides/sdk-reference.json +101 -2
  28. package/guides/web-page-sdk-reference.md +1 -0
  29. package/package.json +2 -2
  30. package/templates/beauty-salon/tier5-src/_shared/app-locale.ts +61 -0
  31. package/templates/beauty-salon/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  32. package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +5 -3
  33. package/templates/beauty-salon/tier5-src/_shared/group-member-count.ts +15 -0
  34. package/templates/beauty-salon/tier5-src/_shared/himi-bookings.ts +54 -13
  35. package/templates/beauty-salon/tier5-src/_shared/himi-copy.ts +10 -2
  36. package/templates/beauty-salon/tier5-src/_shared/himi-restaurants.ts +2 -2
  37. package/templates/beauty-salon/tier5-src/_shared/restaurant-ordering.ts +1 -1
  38. package/templates/beauty-salon/tier5-src/_shared/wix-service-price.ts +2 -2
  39. package/templates/beauty-salon/tier5-src/himi-booking-services/index.ts +8 -3
  40. package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +1 -1
  41. package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +2 -1
  42. package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +1 -1
  43. package/templates/beauty-salon-owner/tier5-src/_shared/app-locale.ts +61 -0
  44. package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +5 -3
  45. package/templates/beauty-salon-owner/tier5-src/_shared/himi-copy.ts +10 -2
  46. package/templates/branded-lite/config.ts +7 -0
  47. package/templates/branded-lite/dev/index.ts +469 -0
  48. package/templates/branded-lite/himalaya.content.json +3 -0
  49. package/templates/branded-lite/tier5-src/_shared/app-locale.ts +61 -0
  50. package/templates/branded-lite/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  51. package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +5 -3
  52. package/templates/branded-lite/tier5-src/_shared/group-member-count.ts +15 -0
  53. package/templates/branded-lite/tier5-src/_shared/himi-bookings.ts +54 -13
  54. package/templates/branded-lite/tier5-src/_shared/himi-copy.ts +10 -2
  55. package/templates/branded-lite/tier5-src/_shared/himi-restaurants.ts +2 -2
  56. package/templates/branded-lite/tier5-src/_shared/restaurant-ordering.ts +1 -1
  57. package/templates/branded-lite/tier5-src/_shared/wix-service-price.ts +2 -2
  58. package/templates/branded-lite/tier5-src/himi-booking-services/index.ts +8 -3
  59. package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +1 -1
  60. package/templates/branded-lite/tier5-src/himi-branded-lite-group/index.ts +9 -3
  61. package/templates/branded-lite/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
  62. package/templates/branded-lite/tier5-src/himi-branded-lite-groups/index.ts +6 -2
  63. package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +2 -1
  64. package/templates/branded-lite/tier5-src/himi-branded-lite-loyalty/index.ts +3 -2
  65. package/templates/branded-lite/tier5-src/himi-branded-lite-my-groups/index.ts +237 -0
  66. package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +1 -1
  67. package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +1 -1
  68. package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +5 -5
  69. package/templates/branded-lite/tier5-src/wix-spaces-member-detail/index.ts +5 -1
  70. package/templates/brandy/tier5-src/_shared/app-locale.ts +61 -0
  71. package/templates/brandy/tier5-src/_shared/himi-copy.ts +10 -2
  72. package/templates/community-club/config.ts +7 -0
  73. package/templates/community-club/dev/index.ts +469 -0
  74. package/templates/community-club/himalaya.content.json +3 -0
  75. package/templates/community-club/tier5-src/_shared/app-locale.ts +61 -0
  76. package/templates/community-club/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  77. package/templates/community-club/tier5-src/_shared/engine-intl.ts +5 -3
  78. package/templates/community-club/tier5-src/_shared/group-member-count.ts +15 -0
  79. package/templates/community-club/tier5-src/_shared/himi-copy.ts +10 -2
  80. package/templates/community-club/tier5-src/_shared/himi-restaurants.ts +2 -2
  81. package/templates/community-club/tier5-src/_shared/wix-service-price.ts +2 -2
  82. package/templates/community-club/tier5-src/himi-branded-lite-group/index.ts +9 -3
  83. package/templates/community-club/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
  84. package/templates/community-club/tier5-src/himi-branded-lite-groups/index.ts +6 -2
  85. package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +2 -1
  86. package/templates/community-club/tier5-src/himi-branded-lite-my-groups/index.ts +237 -0
  87. package/templates/community-club/tier5-src/himi-events-detail/index.ts +5 -5
  88. package/templates/community-club-owner/tier5-src/_shared/app-locale.ts +61 -0
  89. package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +5 -3
  90. package/templates/community-club-owner/tier5-src/_shared/himi-copy.ts +10 -2
  91. package/templates/events-meetups/config.ts +7 -0
  92. package/templates/events-meetups/dev/index.ts +469 -0
  93. package/templates/events-meetups/himalaya.content.json +3 -0
  94. package/templates/events-meetups/tier5-src/_shared/app-locale.ts +61 -0
  95. package/templates/events-meetups/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  96. package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +5 -3
  97. package/templates/events-meetups/tier5-src/_shared/group-member-count.ts +15 -0
  98. package/templates/events-meetups/tier5-src/_shared/himi-copy.ts +10 -2
  99. package/templates/events-meetups/tier5-src/_shared/himi-restaurants.ts +2 -2
  100. package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +2 -2
  101. package/templates/events-meetups/tier5-src/himi-branded-lite-group/index.ts +9 -3
  102. package/templates/events-meetups/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
  103. package/templates/events-meetups/tier5-src/himi-branded-lite-groups/index.ts +6 -2
  104. package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +2 -1
  105. package/templates/events-meetups/tier5-src/himi-branded-lite-my-groups/index.ts +237 -0
  106. package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +5 -5
  107. package/templates/events-meetups-owner/tier5-src/_shared/app-locale.ts +61 -0
  108. package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +5 -3
  109. package/templates/events-meetups-owner/tier5-src/_shared/himi-copy.ts +10 -2
  110. package/templates/gym-fitness/tier5-src/_shared/app-locale.ts +61 -0
  111. package/templates/gym-fitness/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  112. package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +5 -3
  113. package/templates/gym-fitness/tier5-src/_shared/group-member-count.ts +15 -0
  114. package/templates/gym-fitness/tier5-src/_shared/himi-bookings.ts +54 -13
  115. package/templates/gym-fitness/tier5-src/_shared/himi-copy.ts +10 -2
  116. package/templates/gym-fitness/tier5-src/_shared/himi-restaurants.ts +2 -2
  117. package/templates/gym-fitness/tier5-src/_shared/restaurant-ordering.ts +1 -1
  118. package/templates/gym-fitness/tier5-src/_shared/wix-service-price.ts +2 -2
  119. package/templates/gym-fitness/tier5-src/himi-booking-services/index.ts +8 -3
  120. package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +1 -1
  121. package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +2 -1
  122. package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +1 -1
  123. package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +5 -5
  124. package/templates/gym-fitness-owner/tier5-src/_shared/app-locale.ts +61 -0
  125. package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +5 -3
  126. package/templates/gym-fitness-owner/tier5-src/_shared/himi-copy.ts +10 -2
  127. package/templates/himi-chat/tier5-src/_shared/app-locale.ts +61 -0
  128. package/templates/himi-chat/tier5-src/_shared/himi-copy.ts +10 -2
  129. package/templates/nonprofit-cause/config.ts +7 -0
  130. package/templates/nonprofit-cause/dev/index.ts +469 -0
  131. package/templates/nonprofit-cause/himalaya.content.json +3 -0
  132. package/templates/nonprofit-cause/tier5-src/_shared/app-locale.ts +61 -0
  133. package/templates/nonprofit-cause/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  134. package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +5 -3
  135. package/templates/nonprofit-cause/tier5-src/_shared/group-member-count.ts +15 -0
  136. package/templates/nonprofit-cause/tier5-src/_shared/himi-copy.ts +10 -2
  137. package/templates/nonprofit-cause/tier5-src/_shared/himi-restaurants.ts +2 -2
  138. package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +2 -2
  139. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group/index.ts +9 -3
  140. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group-about/index.ts +2 -1
  141. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-groups/index.ts +6 -2
  142. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +2 -1
  143. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-my-groups/index.ts +237 -0
  144. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +1 -1
  145. package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +5 -5
  146. package/templates/nonprofit-cause-owner/tier5-src/_shared/app-locale.ts +61 -0
  147. package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +5 -3
  148. package/templates/nonprofit-cause-owner/tier5-src/_shared/himi-copy.ts +10 -2
  149. package/templates/owner-lite/tier5-src/_shared/app-locale.ts +61 -0
  150. package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +5 -3
  151. package/templates/owner-lite/tier5-src/_shared/himi-copy.ts +10 -2
  152. package/templates/podcast-creator/tier5-src/_shared/app-locale.ts +61 -0
  153. package/templates/podcast-creator/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  154. package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +5 -3
  155. package/templates/podcast-creator/tier5-src/_shared/group-member-count.ts +15 -0
  156. package/templates/podcast-creator/tier5-src/_shared/himi-copy.ts +10 -2
  157. package/templates/podcast-creator/tier5-src/_shared/himi-restaurants.ts +2 -2
  158. package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +2 -2
  159. package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +2 -1
  160. package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +1 -1
  161. package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +5 -5
  162. package/templates/podcast-creator-owner/tier5-src/_shared/app-locale.ts +61 -0
  163. package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +5 -3
  164. package/templates/podcast-creator-owner/tier5-src/_shared/himi-copy.ts +10 -2
  165. package/templates/portfolio-creative/tier5-src/_shared/app-locale.ts +61 -0
  166. package/templates/portfolio-creative/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  167. package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +5 -3
  168. package/templates/portfolio-creative/tier5-src/_shared/group-member-count.ts +15 -0
  169. package/templates/portfolio-creative/tier5-src/_shared/himi-copy.ts +10 -2
  170. package/templates/portfolio-creative/tier5-src/_shared/himi-restaurants.ts +2 -2
  171. package/templates/portfolio-creative/tier5-src/_shared/restaurant-ordering.ts +1 -1
  172. package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +2 -2
  173. package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +1 -1
  174. package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +2 -1
  175. package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +5 -5
  176. package/templates/portfolio-creative-owner/tier5-src/_shared/app-locale.ts +61 -0
  177. package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +5 -3
  178. package/templates/portfolio-creative-owner/tier5-src/_shared/himi-copy.ts +10 -2
  179. package/templates/restaurant/tier5-src/_shared/app-locale.ts +61 -0
  180. package/templates/restaurant/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  181. package/templates/restaurant/tier5-src/_shared/engine-intl.ts +5 -3
  182. package/templates/restaurant/tier5-src/_shared/group-member-count.ts +15 -0
  183. package/templates/restaurant/tier5-src/_shared/himi-copy.ts +10 -2
  184. package/templates/restaurant/tier5-src/_shared/himi-restaurants.ts +2 -2
  185. package/templates/restaurant/tier5-src/_shared/restaurant-ordering.ts +1 -1
  186. package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +2 -2
  187. package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +2 -1
  188. package/templates/restaurant/tier5-src/himi-events-detail/index.ts +5 -5
  189. package/templates/restaurant-owner/tier5-src/_shared/app-locale.ts +61 -0
  190. package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +5 -3
  191. package/templates/restaurant-owner/tier5-src/_shared/himi-copy.ts +10 -2
  192. package/templates/retail-store/tier5-src/_shared/app-locale.ts +61 -0
  193. package/templates/retail-store/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  194. package/templates/retail-store/tier5-src/_shared/engine-intl.ts +5 -3
  195. package/templates/retail-store/tier5-src/_shared/group-member-count.ts +15 -0
  196. package/templates/retail-store/tier5-src/_shared/himi-copy.ts +10 -2
  197. package/templates/retail-store/tier5-src/_shared/himi-restaurants.ts +2 -2
  198. package/templates/retail-store/tier5-src/_shared/restaurant-ordering.ts +1 -1
  199. package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +2 -2
  200. package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +1 -1
  201. package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +2 -1
  202. package/templates/retail-store-owner/tier5-src/_shared/app-locale.ts +61 -0
  203. package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +5 -3
  204. package/templates/retail-store-owner/tier5-src/_shared/himi-copy.ts +10 -2
  205. package/templates/yoga-studio/tier5-src/_shared/app-locale.ts +61 -0
  206. package/templates/yoga-studio/tier5-src/_shared/branded-lite-hosted.ts +1 -0
  207. package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +5 -3
  208. package/templates/yoga-studio/tier5-src/_shared/group-member-count.ts +15 -0
  209. package/templates/yoga-studio/tier5-src/_shared/himi-bookings.ts +54 -13
  210. package/templates/yoga-studio/tier5-src/_shared/himi-copy.ts +10 -2
  211. package/templates/yoga-studio/tier5-src/_shared/himi-restaurants.ts +2 -2
  212. package/templates/yoga-studio/tier5-src/_shared/wix-service-price.ts +2 -2
  213. package/templates/yoga-studio/tier5-src/himi-booking-services/index.ts +8 -3
  214. package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +2 -1
  215. package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +1 -1
  216. package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +1 -1
  217. package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +5 -5
  218. package/templates/yoga-studio-owner/tier5-src/_shared/app-locale.ts +61 -0
  219. package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +5 -3
  220. package/templates/yoga-studio-owner/tier5-src/_shared/himi-copy.ts +10 -2
@@ -38,12 +38,13 @@ export declare const CAPABILITY_REGISTRY: {
38
38
  readonly system_intents: readonly ["donate", "refreshShortcuts"];
39
39
  readonly tasks: readonly ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"];
40
40
  readonly theme: readonly ["applyOverlay", "clearOverlay", "surfaces"];
41
+ readonly torch: readonly ["off", "on", "status", "toggle"];
41
42
  readonly ui: readonly ["alert", "snackbar"];
42
43
  readonly wix_cashier: readonly ["isAvailable", "proceedToPayment"];
43
44
  readonly wix_chat: readonly ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"];
44
45
  };
45
46
  /** A capability id backed by an @himalaya/* SDK binding. */
46
- export type SdkCapability = "app_info" | "audio_record" | "base44" | "biometrics" | "browser_auth" | "calendar" | "calls" | "camera" | "clipboard" | "contacts" | "file_picker" | "files" | "godot" | "haptic" | "health" | "himi_apps" | "iap" | "keyboard" | "live_activity" | "local_database" | "location" | "media_playback" | "motion" | "network" | "on_device_ai" | "open_url" | "pdf" | "photos" | "presigned_upload" | "push" | "release_control" | "secure_storage" | "share" | "speaker_diarization" | "speech" | "system_intents" | "tasks" | "theme" | "ui" | "wix_cashier" | "wix_chat";
47
+ export type SdkCapability = "app_info" | "audio_record" | "base44" | "biometrics" | "browser_auth" | "calendar" | "calls" | "camera" | "clipboard" | "contacts" | "file_picker" | "files" | "godot" | "haptic" | "health" | "himi_apps" | "iap" | "keyboard" | "live_activity" | "local_database" | "location" | "media_playback" | "motion" | "network" | "on_device_ai" | "open_url" | "pdf" | "photos" | "presigned_upload" | "push" | "release_control" | "secure_storage" | "share" | "speaker_diarization" | "speech" | "system_intents" | "tasks" | "theme" | "torch" | "ui" | "wix_cashier" | "wix_chat";
47
48
  /** All `capability.<id>.<verb>` action ids, flattened (the worker-bridge wire vocabulary). */
48
49
  export declare const CAPABILITY_ACTION_IDS: readonly string[];
49
50
  /** Capability id → the @himalaya/* package(s) a worker imports to reach it — every dispatch
@@ -0,0 +1,39 @@
1
+ /** The torch right now. `level` is 0..1 while lit, `null` while off or when unknown. */
2
+ export interface TorchStatus {
3
+ /** Does this device have a torch the app can drive? */
4
+ available: boolean;
5
+ /** Is the torch lit? */
6
+ on: boolean;
7
+ /** Brightness 0..1 while lit (1 = the brightest the device allows), else `null`. */
8
+ level: number | null;
9
+ /** Why the torch is unavailable, when it is. */
10
+ reason?: string;
11
+ }
12
+ export interface TorchOnOptions {
13
+ /** Brightness in 0..1 (default 1). Values outside the range are clamped; 0 turns the torch off.
14
+ * A device without adjustable strength (Android below API 33, or a single-level flash) lights at
15
+ * full brightness and reports `level: 1`. */
16
+ level?: number;
17
+ }
18
+ export type TorchErrorCode = "unavailable" | "invalid_argument" | "failed";
19
+ /** What every torch verb throws when the native/web arm reports a typed error. */
20
+ export interface TorchError extends Error {
21
+ code: TorchErrorCode;
22
+ }
23
+ /** Build a [TorchError]. */
24
+ export declare function torchError(code: TorchErrorCode, message: string): TorchError;
25
+ /** Narrow a caught value: `catch (e) { if (isTorchError(e) && e.code === "unavailable") … }`. */
26
+ export declare function isTorchError(e: unknown): e is TorchError;
27
+ /**
28
+ * Turn the torch on, at `level` (0..1, default 1). Resolves with the resulting status.
29
+ * Rejects `unavailable` on a device with no torch, `invalid_argument` for a non-numeric level.
30
+ */
31
+ export declare function on(opts?: TorchOnOptions): Promise<TorchStatus>;
32
+ /** Turn the torch off. Idempotent — resolves (never rejects `unavailable`) when there is no torch. */
33
+ export declare function off(): Promise<TorchStatus>;
34
+ /** Flip the torch: off → on at full brightness, on → off. Rejects `unavailable` with no torch. */
35
+ export declare function toggle(): Promise<TorchStatus>;
36
+ /** Read the torch's availability and state. Never rejects for a missing torch. */
37
+ export declare function status(): Promise<TorchStatus>;
38
+ /** Capability version, for bundles that gate on a min binary version. */
39
+ export declare const version = 1;
@@ -36,6 +36,7 @@ import type * as SpeechSdk from "@wix/himalaya/speech";
36
36
  import type * as SystemIntentsSdk from "@wix/himalaya/system-intents";
37
37
  import type * as TasksSdk from "@wix/himalaya/tasks";
38
38
  import type * as ThemeSdk from "@wix/himalaya/theme";
39
+ import type * as TorchSdk from "@wix/himalaya/torch";
39
40
  import type * as UiSdk from "@wix/himalaya/ui";
40
41
  import type * as WixCashierSdk from "@wix/himalaya/wix-cashier";
41
42
  import type * as WixChatSdk from "@wix/himalaya/wix-chat";
@@ -89,6 +90,7 @@ export interface HimalayaPageCapabilities {
89
90
  readonly "system_intents": PageModule<typeof SystemIntentsSdk> & PageEvents;
90
91
  readonly "tasks": PageModule<typeof TasksSdk> & PageEvents;
91
92
  readonly "theme": PageModule<typeof ThemeSdk> & PageEvents;
93
+ readonly "torch": PageModule<typeof TorchSdk> & PageEvents;
92
94
  readonly "ui": PageModule<typeof UiSdk> & PageEvents;
93
95
  readonly "wix_cashier": PageModule<typeof WixCashierSdk> & PageEvents;
94
96
  readonly "wix_chat": PageModule<typeof WixChatSdk> & PageEvents;
@@ -638,8 +638,19 @@ export interface PushConfig {
638
638
  /** A `tier5.<service>.<action>` dispatched on EVERY notification — receipt or tap
639
639
  * — so a worker can keep a badge count or refresh a feed without navigating. It
640
640
  * receives `templateId`, `topic`, `metaSiteId`, `notificationId`, `link`,
641
- * `resolvedLink` and `tapped` (all as strings, the dispatch bridge's contract). */
641
+ * `resolvedLink` and `tapped`, plus (#4710) `title` and `body` — the strings the
642
+ * notification DISPLAYS, after rich-template interpolation — and `payloadJson`, the
643
+ * raw payload as a JSON object string (APNs `aps` removed, a nested Ping `data`
644
+ * merged in, every value a string). Over 16 KB, `payloadJson` keeps the entries that
645
+ * fit and `payloadTruncated` is `"true"`. All values are strings, per the dispatch
646
+ * bridge's contract. A notification-button press carries the same params. */
642
647
  observerAction?: string;
648
+ /** Foreground presentation of a remote push (#4710). "banner" (default) shows the
649
+ * system notification; "silent" shows none while the app is in the foreground, for
650
+ * an app that already surfaces the event in-app. iOS presents with the badge only;
651
+ * Android posts nothing but applies the badge. The observer still receives the
652
+ * receipt. Background delivery is unchanged. */
653
+ foreground?: "banner" | "silent";
643
654
  }
644
655
  export type IapProductType = "subscription" | "nonConsumable" | "consumable";
645
656
  export interface IapProduct {
@@ -837,7 +848,7 @@ export interface OrientationEnvelope {
837
848
  export declare const DEFAULT_ORIENTATION_ENVELOPE: Required<OrientationEnvelope>;
838
849
  /** Fill in the absent families. Total, so callers never branch on `undefined`. */
839
850
  export declare function resolveOrientationEnvelope(env?: OrientationEnvelope): Required<OrientationEnvelope>;
840
- export type Capability = "camera" | "barcode_scanner" | "biometrics" | "secure_storage" | "share" | "push" | "file_picker" | "files" | "open_url" | "pdf" | "clipboard" | "theme" | "l10n" | "photos" | "presigned_upload" | "ui" | "calendar" | "contacts" | "tasks" | "audio_record" | "audio_record_background" | "calls" | "location" | "location_background" | "motion" | "health" | "media_playback" | "webview" | "browser_auth" | "haptic" | "himi_apps" | "iap" | "keyboard" | "network" | "wix_cashier" | "wix_chat" | "live_activity" | "local_database" | "speech" | "speaker_diarization" | "system_intents" | "on_device_ai" | "app_info" | "release_control" | "godot" | "base44" | "animation";
851
+ export type Capability = "camera" | "barcode_scanner" | "biometrics" | "secure_storage" | "share" | "push" | "file_picker" | "files" | "open_url" | "pdf" | "clipboard" | "theme" | "l10n" | "photos" | "presigned_upload" | "ui" | "calendar" | "contacts" | "tasks" | "audio_record" | "audio_record_background" | "calls" | "location" | "location_background" | "motion" | "health" | "media_playback" | "webview" | "browser_auth" | "haptic" | "himi_apps" | "iap" | "keyboard" | "torch" | "network" | "wix_cashier" | "wix_chat" | "live_activity" | "local_database" | "speech" | "speaker_diarization" | "system_intents" | "on_device_ai" | "app_info" | "release_control" | "godot" | "base44" | "animation";
841
852
  /** `defineApp({ wixIap })` — the purchases-service app a build binds this app to. */
842
853
  export interface WixIapConfig {
843
854
  /** The purchases service's app UUID, registered on the app's own auth site. Not a secret. */
@@ -31,6 +31,34 @@ export interface WixListGroupRulesResponse {
31
31
  * is unconfirmed — needsLiveProbe. A group with no rules answers an empty `rules`.
32
32
  */
33
33
  export declare function listRules(groupId: string, opts?: WixCallOptions): Promise<WixListGroupRulesResponse>;
34
+ export type WixGroupMembershipStatus = "UNKNOWN_STATUS" | "JOINED" | "PENDING";
35
+ export interface WixGroupMembership {
36
+ groupId?: string;
37
+ status?: WixGroupMembershipStatus | string;
38
+ /** Empty unless the membership is JOINED. */
39
+ role?: {
40
+ value?: "MEMBER" | "ADMIN" | string;
41
+ };
42
+ }
43
+ export interface WixListMembershipsResponse {
44
+ memberships?: WixGroupMembership[];
45
+ metadata?: {
46
+ count?: number;
47
+ offset?: number;
48
+ total?: number;
49
+ tooManyToCount?: boolean;
50
+ };
51
+ }
52
+ /**
53
+ * List a member's group memberships — GET /social-groups-proxy/members/v2/members/{memberId}/memberships.
54
+ *
55
+ * @scope member — a signed-in member lists their own memberships only; an owner-scoped token lists
56
+ * anyone's. Sorted by `groupId` descending by default. `limit` is at most 100.
57
+ */
58
+ export declare function listMemberships(memberId: string, paging?: {
59
+ limit?: number;
60
+ offset?: number;
61
+ }, opts?: WixCallOptions): Promise<WixListMembershipsResponse>;
34
62
  export interface WixGroupCoverImage {
35
63
  /** A previously-uploaded Wix Media file id (from site-media generate-upload-url + PUT). */
36
64
  mediaId?: string;
@@ -200,8 +200,9 @@ export interface WixActivityCountersQueryResponse {
200
200
  activityCounters?: WixActivityCounter[];
201
201
  }
202
202
  export interface WixFollowCounts {
203
- followers: number;
204
- following: number;
203
+ /** `null` when Wix returned no total for this direction: unavailable, never an assumed 0. */
204
+ followers: number | null;
205
+ following: number | null;
205
206
  }
206
207
  export interface WixMemberConnection {
207
208
  memberId?: string;
@@ -212,9 +213,12 @@ export interface WixMyConnectionsResponse {
212
213
  connectedMembers?: WixMemberConnection[];
213
214
  }
214
215
  /** Followers / following totals for a member — POST
215
- * /members/v1/activity-counters/query. Requires explicit nonnegative safe integer
216
- * totals for this member's Followers-app entry. Missing/invalid totals reject,
217
- * as do permission failures; callers should hide unavailable counts, never invent zero. */
216
+ * /members/v1/activity-counters/query. Wix keeps ONE counter per direction and creates it on the
217
+ * first change (live, amit1: a followed member's entry holds only `followerCount`, the follower's
218
+ * only `followingCount`), so each direction is reported on its own: an explicit nonnegative safe
219
+ * integer, or `null` when Wix returned none. A counter that is present but malformed makes the
220
+ * whole answer untrusted and rejects, as does an entry with neither counter or a permission
221
+ * failure. Callers hide an unavailable counter; a missing one is never shown as zero. */
218
222
  export declare function getFollowCounts(memberId: string, options?: WixCallOptions): Promise<WixFollowCounts>;
219
223
  /** Whether the signed-in member follows `targetId` — POST
220
224
  * /members/v3/followers/my/connections. Returns false on any miss. May 403 →
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
53
53
  "system_intents": ["donate", "refreshShortcuts"],
54
54
  "tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
55
55
  "theme": ["applyOverlay", "clearOverlay", "surfaces"],
56
+ "torch": ["off", "on", "status", "toggle"],
56
57
  "ui": ["alert", "snackbar"],
57
58
  "wix_cashier": ["isAvailable", "proceedToPayment"],
58
59
  "wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
53
53
  "system_intents": ["donate", "refreshShortcuts"],
54
54
  "tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
55
55
  "theme": ["applyOverlay", "clearOverlay", "surfaces"],
56
+ "torch": ["off", "on", "status", "toggle"],
56
57
  "ui": ["alert", "snackbar"],
57
58
  "wix_cashier": ["isAvailable", "proceedToPayment"],
58
59
  "wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
53
53
  "system_intents": ["donate", "refreshShortcuts"],
54
54
  "tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
55
55
  "theme": ["applyOverlay", "clearOverlay", "surfaces"],
56
+ "torch": ["off", "on", "status", "toggle"],
56
57
  "ui": ["alert", "snackbar"],
57
58
  "wix_cashier": ["isAvailable", "proceedToPayment"],
58
59
  "wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
53
53
  "system_intents": ["donate", "refreshShortcuts"],
54
54
  "tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
55
55
  "theme": ["applyOverlay", "clearOverlay", "surfaces"],
56
+ "torch": ["off", "on", "status", "toggle"],
56
57
  "ui": ["alert", "snackbar"],
57
58
  "wix_cashier": ["isAvailable", "proceedToPayment"],
58
59
  "wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
53
53
  "system_intents": ["donate", "refreshShortcuts"],
54
54
  "tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
55
55
  "theme": ["applyOverlay", "clearOverlay", "surfaces"],
56
+ "torch": ["off", "on", "status", "toggle"],
56
57
  "ui": ["alert", "snackbar"],
57
58
  "wix_cashier": ["isAvailable", "proceedToPayment"],
58
59
  "wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
53
53
  "system_intents": ["donate", "refreshShortcuts"],
54
54
  "tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
55
55
  "theme": ["applyOverlay", "clearOverlay", "surfaces"],
56
+ "torch": ["off", "on", "status", "toggle"],
56
57
  "ui": ["alert", "snackbar"],
57
58
  "wix_cashier": ["isAvailable", "proceedToPayment"],
58
59
  "wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
53
53
  "system_intents": ["donate", "refreshShortcuts"],
54
54
  "tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
55
55
  "theme": ["applyOverlay", "clearOverlay", "surfaces"],
56
+ "torch": ["off", "on", "status", "toggle"],
56
57
  "ui": ["alert", "snackbar"],
57
58
  "wix_cashier": ["isAvailable", "proceedToPayment"],
58
59
  "wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
@@ -38,6 +38,7 @@ var CAPABILITY_REGISTRY = {
38
38
  "system_intents": ["donate", "refreshShortcuts"],
39
39
  "tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
40
40
  "theme": ["applyOverlay", "clearOverlay", "surfaces"],
41
+ "torch": ["off", "on", "status", "toggle"],
41
42
  "ui": ["alert", "snackbar"],
42
43
  "wix_cashier": ["isAvailable", "proceedToPayment"],
43
44
  "wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
@@ -53,6 +53,7 @@ var CAPABILITY_REGISTRY = {
53
53
  "system_intents": ["donate", "refreshShortcuts"],
54
54
  "tasks": ["backend", "create", "getPermissionStatus", "list", "remove", "requestPermission", "setCompleted"],
55
55
  "theme": ["applyOverlay", "clearOverlay", "surfaces"],
56
+ "torch": ["off", "on", "status", "toggle"],
56
57
  "ui": ["alert", "snackbar"],
57
58
  "wix_cashier": ["isAvailable", "proceedToPayment"],
58
59
  "wix_chat": ["getRealtimeStatus", "subscribeRealtime", "unsubscribeRealtime"]
@@ -0,0 +1,78 @@
1
+ // ../../core/sdk/dispatch/src/index.ts
2
+ function dispatch(handlerId, params, _options) {
3
+ const himalaya = globalThis.himalaya;
4
+ if (!himalaya) {
5
+ return Promise.reject(
6
+ new Error("@himalaya/dispatch: called outside a Himalaya runtime. This bundle must run inside a JSWorker (Tier 5).")
7
+ );
8
+ }
9
+ const stringParams = {};
10
+ if (params) {
11
+ for (const [k, v] of Object.entries(params)) stringParams[k] = String(v);
12
+ }
13
+ return himalaya.dispatch(handlerId, stringParams);
14
+ }
15
+
16
+ // ../../core/sdk/torch/src/index.ts
17
+ var ERROR_CODES = ["unavailable", "invalid_argument", "failed"];
18
+ function torchError(code, message) {
19
+ const e = new Error(message);
20
+ e.name = "TorchError";
21
+ e.code = code;
22
+ return e;
23
+ }
24
+ function isTorchError(e) {
25
+ if (!(e instanceof Error)) return false;
26
+ const code = e.code;
27
+ return typeof code === "string" && ERROR_CODES.includes(code);
28
+ }
29
+ function unwrap(r) {
30
+ const err = r?.error;
31
+ if (err && typeof err === "object") {
32
+ const code = ERROR_CODES.includes(err.code ?? "") ? err.code : "failed";
33
+ throw torchError(code, err.message ?? code);
34
+ }
35
+ return r;
36
+ }
37
+ function toStatus(r) {
38
+ const o = r ?? {};
39
+ const on2 = o.on === true || o.on === "true";
40
+ const lvl = typeof o.level === "number" ? o.level : typeof o.level === "string" && o.level !== "" ? Number(o.level) : null;
41
+ const status2 = {
42
+ available: o.available === true || o.available === "true",
43
+ on: on2,
44
+ level: on2 && lvl !== null && Number.isFinite(lvl) ? lvl : null
45
+ };
46
+ if (typeof o.reason === "string" && o.reason) status2.reason = o.reason;
47
+ return status2;
48
+ }
49
+ async function on(opts = {}) {
50
+ const params = {};
51
+ if (opts.level !== void 0) {
52
+ if (typeof opts.level !== "number" || !Number.isFinite(opts.level)) {
53
+ throw torchError("invalid_argument", `level must be a number in 0..1, got ${String(opts.level)}`);
54
+ }
55
+ params.level = String(Math.min(1, Math.max(0, opts.level)));
56
+ }
57
+ return toStatus(unwrap(await dispatch("capability.torch.on", params)));
58
+ }
59
+ async function off() {
60
+ return toStatus(unwrap(await dispatch("capability.torch.off", {})));
61
+ }
62
+ async function toggle() {
63
+ return toStatus(unwrap(await dispatch("capability.torch.toggle", {})));
64
+ }
65
+ async function status() {
66
+ return toStatus(unwrap(await dispatch("capability.torch.status", {})));
67
+ }
68
+ var version = 1;
69
+ export {
70
+ isTorchError,
71
+ off,
72
+ on,
73
+ status,
74
+ toggle,
75
+ torchError,
76
+ version
77
+ };
78
+ //# sourceMappingURL=torch.mjs.map
@@ -10,6 +10,19 @@ function listRules(groupId, opts) {
10
10
  if (!groupId) throw new Error("listRules: groupId is required");
11
11
  return wixCall("GET", `/social-groups/v2/rules/${encodeURIComponent(groupId)}`, void 0, opts);
12
12
  }
13
+ function listMemberships(memberId, paging = {}, opts) {
14
+ if (!memberId) throw new Error("listMemberships: memberId is required");
15
+ const params = [
16
+ paging.limit !== void 0 ? `limit=${Math.max(0, Math.min(100, Math.trunc(paging.limit)))}` : "",
17
+ paging.offset !== void 0 ? `offset=${Math.max(0, Math.trunc(paging.offset))}` : ""
18
+ ].filter(Boolean).join("&");
19
+ return wixCall(
20
+ "GET",
21
+ `/social-groups-proxy/members/v2/members/${encodeURIComponent(memberId)}/memberships${params ? `?${params}` : ""}`,
22
+ void 0,
23
+ opts
24
+ );
25
+ }
13
26
  function createGroup(group) {
14
27
  return wixCall("POST", "/social-groups-proxy/groups/v2/groups", { group });
15
28
  }
@@ -106,6 +119,7 @@ export {
106
119
  joinGroup,
107
120
  leaveGroup,
108
121
  listJoinGroupRequests,
122
+ listMemberships,
109
123
  listRules,
110
124
  queryGroups,
111
125
  queryMembers,
@@ -87,15 +87,16 @@ async function getFollowCounts(memberId, options) {
87
87
  const entry = (res.activityCounters ?? []).find((c) => c.appId === MEMBERS_FOLLOWERS_APP_ID && c.memberId === memberId);
88
88
  const counters = entry?.counters;
89
89
  const value = (key) => Array.isArray(counters) ? counters.find((counter) => counter?.key === key)?.count : counters?.[key]?.count;
90
- const followers = value("followerCount");
91
- const following = value("followingCount");
92
- if (typeof followers !== "number" || !Number.isSafeInteger(followers) || followers < 0 || typeof following !== "number" || !Number.isSafeInteger(following) || following < 0) {
93
- throw new Error("getFollowCounts: explicit member totals are unavailable");
94
- }
95
- return {
96
- followers,
97
- following
90
+ const total = (key) => {
91
+ const count = value(key);
92
+ if (count === void 0 || count === null) return null;
93
+ if (typeof count !== "number" || !Number.isSafeInteger(count) || count < 0) throw new Error("getFollowCounts: a member total is malformed");
94
+ return count;
98
95
  };
96
+ const followers = total("followerCount");
97
+ const following = total("followingCount");
98
+ if (followers === null && following === null) throw new Error("getFollowCounts: explicit member totals are unavailable");
99
+ return { followers, following };
99
100
  }
100
101
  async function isFollowingMember(targetId) {
101
102
  if (!targetId) throw new Error("isFollowingMember: targetId is required");
@@ -254,6 +254,10 @@
254
254
  "types": "./dist/_types/core/sdk/time/src/index.d.ts",
255
255
  "import": "./dist/time.mjs"
256
256
  },
257
+ "./torch": {
258
+ "types": "./dist/_types/core/sdk/torch/src/index.d.ts",
259
+ "import": "./dist/torch.mjs"
260
+ },
257
261
  "./ui": {
258
262
  "types": "./dist/_types/core/sdk/ui/src/index.d.ts",
259
263
  "import": "./dist/ui.mjs"