@wix/himalaya-cli 0.1387.0 → 0.1389.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 (149) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/commerce-contract.d.ts +24 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/commerce-core.d.ts +3 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/index.d.ts +1 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/video/src/display.d.ts +66 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/video/src/index.d.ts +185 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +57 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +57 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-video.mjs +324 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +4 -0
  10. package/dist/cli.mjs +10 -5
  11. package/guides/iap-screen-adoption.md +53 -1
  12. package/guides/importable-sdks.md +1 -0
  13. package/guides/sdk-reference.json +261 -2
  14. package/package.json +2 -2
  15. package/templates/beauty-salon/dev/index.ts +193 -1
  16. package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +1 -1
  17. package/templates/beauty-salon/tier5-src/_shared/iap-worker.ts +84 -3
  18. package/templates/beauty-salon/tier5-src/_shared/video-caption.ts +21 -0
  19. package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +31 -1
  20. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +36 -1
  21. package/templates/beauty-salon-owner/config.ts +11 -0
  22. package/templates/beauty-salon-owner/dev/index.ts +540 -0
  23. package/templates/beauty-salon-owner/himalaya.content.json +6 -0
  24. package/templates/beauty-salon-owner/platforms.json +2 -1
  25. package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +1 -1
  26. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  27. package/templates/branded-lite/dev/index.ts +1212 -54
  28. package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +1 -1
  29. package/templates/branded-lite/tier5-src/_shared/iap-worker.ts +84 -3
  30. package/templates/branded-lite/tier5-src/_shared/video-caption.ts +21 -0
  31. package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +31 -1
  32. package/templates/branded-lite/tier5-src/himi-branded-lite-video/index.ts +23 -32
  33. package/templates/branded-lite/tier5-src/himi-branded-lite-videos/index.ts +44 -38
  34. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +36 -1
  35. package/templates/community-club/dev/index.ts +193 -1
  36. package/templates/community-club/tier5-src/_shared/collection-contract.ts +1 -1
  37. package/templates/community-club/tier5-src/_shared/iap-worker.ts +84 -3
  38. package/templates/community-club/tier5-src/_shared/video-caption.ts +21 -0
  39. package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +31 -1
  40. package/templates/community-club/tier5-src/himi-store-account/index.ts +36 -1
  41. package/templates/community-club-owner/config.ts +11 -0
  42. package/templates/community-club-owner/dev/index.ts +540 -0
  43. package/templates/community-club-owner/himalaya.content.json +6 -0
  44. package/templates/community-club-owner/platforms.json +2 -1
  45. package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +1 -1
  46. package/templates/community-club-owner/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  47. package/templates/events-meetups/dev/index.ts +193 -1
  48. package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +1 -1
  49. package/templates/events-meetups/tier5-src/_shared/iap-worker.ts +84 -3
  50. package/templates/events-meetups/tier5-src/_shared/video-caption.ts +21 -0
  51. package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +31 -1
  52. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +36 -1
  53. package/templates/events-meetups-owner/config.ts +11 -0
  54. package/templates/events-meetups-owner/dev/index.ts +540 -0
  55. package/templates/events-meetups-owner/himalaya.content.json +6 -0
  56. package/templates/events-meetups-owner/platforms.json +2 -1
  57. package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +1 -1
  58. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  59. package/templates/gym-fitness/dev/index.ts +193 -1
  60. package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +1 -1
  61. package/templates/gym-fitness/tier5-src/_shared/iap-worker.ts +84 -3
  62. package/templates/gym-fitness/tier5-src/_shared/video-caption.ts +21 -0
  63. package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +31 -1
  64. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +36 -1
  65. package/templates/gym-fitness-owner/config.ts +11 -0
  66. package/templates/gym-fitness-owner/dev/index.ts +540 -0
  67. package/templates/gym-fitness-owner/himalaya.content.json +6 -0
  68. package/templates/gym-fitness-owner/platforms.json +2 -1
  69. package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +1 -1
  70. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  71. package/templates/nonprofit-cause/dev/index.ts +193 -1
  72. package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +1 -1
  73. package/templates/nonprofit-cause/tier5-src/_shared/iap-worker.ts +84 -3
  74. package/templates/nonprofit-cause/tier5-src/_shared/video-caption.ts +21 -0
  75. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +31 -1
  76. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +36 -1
  77. package/templates/nonprofit-cause-owner/config.ts +11 -0
  78. package/templates/nonprofit-cause-owner/dev/index.ts +540 -0
  79. package/templates/nonprofit-cause-owner/himalaya.content.json +6 -0
  80. package/templates/nonprofit-cause-owner/platforms.json +2 -1
  81. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +1 -1
  82. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  83. package/templates/owner-lite/config.ts +11 -0
  84. package/templates/owner-lite/dev/index.ts +540 -0
  85. package/templates/owner-lite/himalaya.content.json +6 -0
  86. package/templates/owner-lite/platforms.json +2 -1
  87. package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +1 -1
  88. package/templates/owner-lite/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  89. package/templates/podcast-creator/dev/index.ts +193 -1
  90. package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +1 -1
  91. package/templates/podcast-creator/tier5-src/_shared/iap-worker.ts +84 -3
  92. package/templates/podcast-creator/tier5-src/_shared/video-caption.ts +21 -0
  93. package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +31 -1
  94. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +36 -1
  95. package/templates/podcast-creator-owner/config.ts +11 -0
  96. package/templates/podcast-creator-owner/dev/index.ts +540 -0
  97. package/templates/podcast-creator-owner/himalaya.content.json +6 -0
  98. package/templates/podcast-creator-owner/platforms.json +2 -1
  99. package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +1 -1
  100. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  101. package/templates/portfolio-creative/dev/index.ts +193 -1
  102. package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +1 -1
  103. package/templates/portfolio-creative/tier5-src/_shared/iap-worker.ts +84 -3
  104. package/templates/portfolio-creative/tier5-src/_shared/video-caption.ts +21 -0
  105. package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +31 -1
  106. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +36 -1
  107. package/templates/portfolio-creative-owner/config.ts +11 -0
  108. package/templates/portfolio-creative-owner/dev/index.ts +540 -0
  109. package/templates/portfolio-creative-owner/himalaya.content.json +6 -0
  110. package/templates/portfolio-creative-owner/platforms.json +2 -1
  111. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +1 -1
  112. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  113. package/templates/restaurant/dev/index.ts +193 -1
  114. package/templates/restaurant/tier5-src/_shared/collection-contract.ts +1 -1
  115. package/templates/restaurant/tier5-src/_shared/iap-worker.ts +84 -3
  116. package/templates/restaurant/tier5-src/_shared/video-caption.ts +21 -0
  117. package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +31 -1
  118. package/templates/restaurant/tier5-src/himi-store-account/index.ts +36 -1
  119. package/templates/restaurant-owner/config.ts +11 -0
  120. package/templates/restaurant-owner/dev/index.ts +540 -0
  121. package/templates/restaurant-owner/himalaya.content.json +6 -0
  122. package/templates/restaurant-owner/platforms.json +2 -1
  123. package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +1 -1
  124. package/templates/restaurant-owner/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  125. package/templates/retail-store/dev/index.ts +193 -1
  126. package/templates/retail-store/tier5-src/_shared/collection-contract.ts +1 -1
  127. package/templates/retail-store/tier5-src/_shared/iap-worker.ts +84 -3
  128. package/templates/retail-store/tier5-src/_shared/video-caption.ts +21 -0
  129. package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +31 -1
  130. package/templates/retail-store/tier5-src/himi-store-account/index.ts +36 -1
  131. package/templates/retail-store-owner/config.ts +11 -0
  132. package/templates/retail-store-owner/dev/index.ts +540 -0
  133. package/templates/retail-store-owner/himalaya.content.json +6 -0
  134. package/templates/retail-store-owner/platforms.json +2 -1
  135. package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +1 -1
  136. package/templates/retail-store-owner/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  137. package/templates/yoga-studio/dev/index.ts +193 -1
  138. package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +1 -1
  139. package/templates/yoga-studio/tier5-src/_shared/iap-worker.ts +84 -3
  140. package/templates/yoga-studio/tier5-src/_shared/video-caption.ts +21 -0
  141. package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +31 -1
  142. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +36 -1
  143. package/templates/yoga-studio-owner/config.ts +11 -0
  144. package/templates/yoga-studio-owner/dev/index.ts +540 -0
  145. package/templates/yoga-studio-owner/himalaya.content.json +6 -0
  146. package/templates/yoga-studio-owner/platforms.json +2 -1
  147. package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +1 -1
  148. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-wrist/index.ts +350 -0
  149. package/templates/branded-lite/tier5-src/_shared/vod.ts +0 -71
@@ -0,0 +1,21 @@
1
+ // The video carousel's two looks: the caption ON the cover (a brand label chip over the
2
+ // image) or UNDER it. Every slide carries both placements; the descriptor's
3
+ // `videoCaption` appear param picks one, and these flags hide the other
4
+ // (`hiddenWhen` hides on TRUE). So a screen switches look by changing ONE param,
5
+ // with no second carousel and no change to the slide tree.
6
+ export type VideoCaption = "overlay" | "below";
7
+
8
+ /** The placement a param asks for. Anything but "below" is the default, "overlay". */
9
+ export function videoCaptionOf(value: unknown): VideoCaption {
10
+ return value === "below" ? "below" : "overlay";
11
+ }
12
+
13
+ export interface CaptionFlags {
14
+ captionOnImage: boolean;
15
+ captionBelow: boolean;
16
+ }
17
+
18
+ /** Stamp each card with the gates its slide reads (`$item.captionOnImage` / `$item.captionBelow`). */
19
+ export function withCaption<T extends object>(cards: T[], caption: VideoCaption): (T & CaptionFlags)[] {
20
+ return cards.map((card) => ({ ...card, captionOnImage: caption === "overlay", captionBelow: caption === "below" }));
21
+ }
@@ -22,12 +22,18 @@ import { formatDateMedium } from "../_shared/engine-intl.js";
22
22
  import { readSavedProducts, type SavedProduct } from "../_shared/himi-store-saved.js";
23
23
  import { readSavedIds } from "../_shared/himi-blog-saved.js";
24
24
  import { wixMediaUrl } from "@himalaya/wix-media";
25
+ import { isWixVideoWebRefusal, listLatestVideos, videoCard, type WixVideoCard } from "@himalaya/wix-video";
26
+ import { videoCaptionOf, withCaption, type CaptionFlags } from "../_shared/video-caption.js";
25
27
 
26
28
  /** Latched once the member feed is refused because of WHERE the app is running rather
27
29
  * than because of the request — see the catch in `loadExtras`. Module scope, so it
28
30
  * survives every refresh of this worker and is reset only by a fresh boot. */
29
31
  let feedSurfaceRefused = false;
30
32
 
33
+ /** The same latch for Wix Video: its gateway is reachable from the native apps only, so a
34
+ * web bridge's refusal is permanent for this boot and the rail stays collapsed. */
35
+ let videoSurfaceRefused = false;
36
+
31
37
  /** True for the one refusal that can never change while the app keeps running: the web
32
38
  * bridge reporting that this host is not reachable from a browser at all. Deliberately
33
39
  * narrower than `isBridgeUnavailable` — a 502/503 is an outage worth retrying, and only
@@ -292,6 +298,10 @@ interface State {
292
298
  noNextEvent: boolean;
293
299
  homePrograms: ProgramCard[];
294
300
  noHomePrograms: boolean;
301
+ /** The videos module's carousel — the newest ready Wix Video videos, the channels
302
+ * taking turns. Guarded on `videos`; same silent-fail contract. */
303
+ homeVideos: (WixVideoCard & CaptionFlags)[];
304
+ noHomeVideos: boolean;
295
305
  feedHighlights: FeedHighlight[];
296
306
  noFeedHighlights: boolean;
297
307
  /** communityPulse member strip — the author directory of the SAME feed read
@@ -529,6 +539,7 @@ interface ExtrasSignal {
529
539
  upcomingEvents: EventEntry[];
530
540
  nextEventCards: NextEventCard[];
531
541
  homePrograms: ProgramCard[];
542
+ homeVideos: (WixVideoCard & CaptionFlags)[];
532
543
  feedHighlights: FeedHighlight[];
533
544
  memberAvatars: CoachAvatar[];
534
545
  groupCards: GroupCard[];
@@ -539,7 +550,7 @@ interface ExtrasSignal {
539
550
  }
540
551
 
541
552
  function emptyExtrasSignal(): ExtrasSignal {
542
- return { upcomingEvents: [], nextEventCards: [], homePrograms: [], feedHighlights: [], memberAvatars: [], groupCards: [], announcementTitle: "", postCards: [], popularDishes: [], menuCategories: [] };
553
+ return { upcomingEvents: [], nextEventCards: [], homePrograms: [], homeVideos: [], feedHighlights: [], memberAvatars: [], groupCards: [], announcementTitle: "", postCards: [], popularDishes: [], menuCategories: [] };
543
554
  }
544
555
 
545
556
  /** Cover URL probe for a blog post — the himi-blog-feed imageUrl fallbacks
@@ -679,6 +690,18 @@ async function fetchHomePrograms(): Promise<ProgramCard[]> {
679
690
  }
680
691
  }
681
692
 
693
+ /** ONE Wix Video read for the videos module. A failure collapses the module; the web
694
+ * bridges' refusal of the gateway also latches it off for the rest of this boot. */
695
+ async function fetchHomeVideos(): Promise<WixVideoCard[]> {
696
+ try {
697
+ const untitled = copyParam("home.videoFallbackTitle", "Video");
698
+ return (await listLatestVideos({ limit: 8 })).map((entry) => videoCard(entry, untitled));
699
+ } catch (error) {
700
+ if (isWixVideoWebRefusal(error)) videoSurfaceRefused = true;
701
+ return [];
702
+ }
703
+ }
704
+
682
705
  function homeFeedText(item: WixFeedItem): string {
683
706
  const blocks = item.content?.blocks;
684
707
  if (Array.isArray(blocks)) {
@@ -731,6 +754,10 @@ async function fetchExtrasSignal(arg: unknown): Promise<ExtrasSignal> {
731
754
  if (verticals.includes("programs")) {
732
755
  jobs.push(fetchHomePrograms().then((cards) => { extras.homePrograms = cards; }));
733
756
  }
757
+ if (verticals.includes("videos") && !videoSurfaceRefused) {
758
+ const caption = videoCaptionOf(paramValue(arg, "videoCaption"));
759
+ jobs.push(fetchHomeVideos().then((cards) => { extras.homeVideos = withCaption(cards, caption); }));
760
+ }
734
761
  if (verticals.includes("blog")) {
735
762
  // ONE limit-8 posts query feeds BOTH the communityPulse announcement
736
763
  // (posts[0].title — the frozen contract) and the showcaseFirst/episodeFirst
@@ -847,6 +874,7 @@ function derive(state: State): State {
847
874
  noUpcomingEvents: state.upcomingEvents.length === 0,
848
875
  noNextEvent: state.nextEventCards.length === 0,
849
876
  noHomePrograms: state.homePrograms.length === 0,
877
+ noHomeVideos: state.homeVideos.length === 0,
850
878
  noFeedHighlights: state.feedHighlights.length === 0,
851
879
  noMemberAvatars: state.memberAvatars.length === 0,
852
880
  noGroupCards: state.groupCards.length === 0,
@@ -938,6 +966,8 @@ function baseState(): State {
938
966
  noNextEvent: true,
939
967
  homePrograms: [],
940
968
  noHomePrograms: true,
969
+ homeVideos: [],
970
+ noHomeVideos: true,
941
971
  feedHighlights: [],
942
972
  noFeedHighlights: true,
943
973
  memberAvatars: [],
@@ -14,6 +14,8 @@ import { searchOrders, type WixOrder } from "@himalaya/wix-ecom";
14
14
  import { guestProfile, loadMemberProfile, strOf, fmtDate, titleCase, type AccountActivityRow } from "../_shared/himi-account";
15
15
  import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
16
16
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
17
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
18
+ import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
17
19
 
18
20
  interface AuthRouteInput {
19
21
  intent?: string;
@@ -152,7 +154,7 @@ function authHeadline(s: S, isRegistering: boolean, isRecovering: boolean): { au
152
154
  }
153
155
  }
154
156
 
155
- interface S {
157
+ interface S extends IapRestoreFields {
156
158
  status: "loading" | "ready";
157
159
  isMember: boolean;
158
160
  notMember: boolean;
@@ -214,6 +216,27 @@ interface S {
214
216
  noMemberAddresses: boolean;
215
217
  /** Hides My Wallet where this runtime cannot reach saved cards. */
216
218
  noMemberWallet: boolean;
219
+ /** Set once a descriptor asks for the Restore purchases row (appear param
220
+ * `restorePurchases: "1"`). Only then does the worker reach the App Store layer, so a
221
+ * descriptor that renders no such row need not declare `iap`. */
222
+ restorePurchases: boolean;
223
+ }
224
+
225
+ // Restore purchases (App Review 3.1.1) for every vertical the app sells through the App Store. The
226
+ // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
227
+ // guest too: the restore itself asks them to sign in.
228
+ const commerce = createIapCommerce({
229
+ adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
230
+ onChange: () => { void svc.restorePublish(); },
231
+ });
232
+ const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
233
+ let commerceEntered = false;
234
+
235
+ /** The first entry reads readiness and recovers held purchases; later ones reconcile, as on any
236
+ * screen that sells. */
237
+ function enterCommerce(): void {
238
+ void (commerceEntered ? commerce.reconcile() : commerce.start());
239
+ commerceEntered = true;
217
240
  }
218
241
 
219
242
  function derive(s: S): S {
@@ -234,6 +257,7 @@ function derive(s: S): S {
234
257
  hideSignInChoices: isRegistering || isRecovering,
235
258
  hasActivity,
236
259
  noActivity: !hasActivity,
260
+ ...restore.fields(s.restorePurchases && commerce.readiness().status === "ready"),
237
261
  authTitle: headline.authTitle,
238
262
  authBody: headline.authBody,
239
263
  hasReturnPath,
@@ -288,6 +312,8 @@ async function probe(s: S, arg?: unknown): Promise<S> {
288
312
  const intent = authIntentFromArg(arg, s);
289
313
  const profile = await loadMemberProfile(copyParam("storeAccount.guestDetail", "Sign in to keep your cart and orders connected."));
290
314
  const memberAccountLinks = s.memberAccountLinks || strField(arg, "memberAccountLinks") === "1";
315
+ const restorePurchases = s.restorePurchases || strField(arg, "restorePurchases") === "1";
316
+ if (restorePurchases) enterCommerce();
291
317
  const routes = memberAccountLinks ? await memberAccountRoutes() : { addresses: false, wallet: false };
292
318
  let activityRows: AccountActivityRow[] = [];
293
319
  if (profile.isMember) {
@@ -313,6 +339,7 @@ async function probe(s: S, arg?: unknown): Promise<S> {
313
339
  email: profile.memberEmail || s.email,
314
340
  message: "",
315
341
  memberAccountLinks,
342
+ restorePurchases,
316
343
  noMemberAddresses: !routes.addresses,
317
344
  noMemberWallet: !routes.wallet,
318
345
  activityRows,
@@ -365,7 +392,10 @@ const svc = defineService<S, {
365
392
  signIn: (s: S) => Promise<S | undefined>;
366
393
  register: (s: S) => Promise<S | undefined>;
367
394
  signOut: (s: S) => Promise<S>;
395
+ restorePublish: (s: S) => S;
396
+ iapRestore: (s: S) => Promise<undefined>;
368
397
  }>("himiStoreAccount", {
398
+ notHydrated: [...IAP_RESTORE_KEYS],
369
399
  state: derive({
370
400
  status: "loading",
371
401
  isMember: false,
@@ -411,6 +441,8 @@ const svc = defineService<S, {
411
441
  memberAccountLinks: false,
412
442
  noMemberAddresses: true,
413
443
  noMemberWallet: true,
444
+ restorePurchases: false,
445
+ ...NO_IAP_RESTORE,
414
446
  }),
415
447
  actions: {
416
448
  load: (s, arg) => { stashCopy(arg); return probe(s, arg); },
@@ -503,8 +535,11 @@ const svc = defineService<S, {
503
535
  };
504
536
  return derive(cleared);
505
537
  },
538
+ restorePublish: (s) => derive(s),
539
+ iapRestore: async () => { await restore.run(); return undefined; },
506
540
  },
507
541
  });
508
542
 
543
+ resetUnhydratedKeysOnOlderRuntime(svc, { ...svc.getState(), ...NO_IAP_RESTORE }, IAP_RESTORE_KEYS);
509
544
  svc.load();
510
545
  export { svc };
@@ -41,6 +41,17 @@ export default defineApp({
41
41
  designTokensPath: "./tokens.json",
42
42
  navigation: {
43
43
  "navKind": "responsive",
44
+ "surfaces": {
45
+ "watch": {
46
+ "destinations": [
47
+ "home"
48
+ ],
49
+ "navKind": "single",
50
+ "screenIds": {
51
+ "home": "himi_owner_lite_wrist_home"
52
+ }
53
+ }
54
+ },
44
55
  "scheme": "himalaya-__HIMI_APP_SLUG__",
45
56
  "deepLinkPatterns": [],
46
57
  "linkableScreens": [