@wix/himalaya-cli 0.1723.0 → 0.1724.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 (59) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +1 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +2 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/godot/src/index.d.ts +3 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/attendance-classifier.d.ts +1 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +3 -39
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +10 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/index.d.ts +2 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/preview-surfaces.d.ts +24 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-web-sdk.d.ts +37 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-web-sdk.generated.d.ts +1 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/wrapped-app-link.d.ts +13 -0
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/checkout-source.d.ts +2 -3
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-order-backend.d.ts +0 -2
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance.d.ts +2 -8
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/index.d.ts +4 -13
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +175 -1
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +46 -502
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +5 -26
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +64 -648
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -0
  21. package/dist/browser-plane/assets.json +5 -5
  22. package/dist/browser-plane/package-reader.js +4 -4
  23. package/dist/browser-plane/preview-deferred/{74e5b76ecf38392d7eb3f9a9512d60a0675de85d411c9c56293e123152b3f70b.bin → a6e25c06d2a17ab2b5e34bf2b5965fa3ddd76ce3da32a036e546a60938130d7b.bin} +1 -1
  24. package/dist/browser-plane/sw.js +9 -9
  25. package/dist/cli.mjs +1275 -408
  26. package/dist/preview-assets.generated.bin +0 -0
  27. package/guides/himi-json-output.md +6 -2
  28. package/guides/iap-screen-adoption.md +4 -4
  29. package/guides/sdk-reference.json +11 -74
  30. package/guides/webview-page-sdk.md +14 -0
  31. package/guides/wix-business-context.md +24 -0
  32. package/guides/wix-site-to-himi-app.md +2 -1
  33. package/package.json +2 -2
  34. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +2 -2
  35. package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +5 -8
  36. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +2 -2
  37. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +5 -8
  38. package/templates/brandy/README.md +13 -0
  39. package/templates/brandy/config.ts +15 -1
  40. package/templates/brandy/dev/index.ts +10 -7
  41. package/templates/community-club/tier5-src/himi-store-account/index.ts +2 -2
  42. package/templates/conference/tier5-src/himi-store-account/index.ts +2 -2
  43. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +2 -2
  44. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +2 -2
  45. package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +5 -8
  46. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +2 -2
  47. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +2 -2
  48. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +2 -2
  49. package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +5 -8
  50. package/templates/restaurant/tier5-src/himi-store-account/index.ts +2 -2
  51. package/templates/retail-store/tier5-src/himi-store-account/index.ts +2 -2
  52. package/templates/retail-store/tier5-src/himi-store-product/index.ts +5 -8
  53. package/templates/salon-spa/tier5-src/himi-store-account/index.ts +2 -2
  54. package/templates/wholesale-store/tier5-src/himi-store-account/index.ts +2 -2
  55. package/templates/wholesale-store/tier5-src/himi-store-product/index.ts +5 -8
  56. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +2 -2
  57. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance-orders.d.ts +0 -10
  58. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/online-programs-orders.d.ts +0 -2
  59. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/pricing-plans-orders.d.ts +0 -2
@@ -2,7 +2,7 @@ import { withOnlineWrites, offlineWritesEnabled, offlineWriteMessage } from "../
2
2
  import { defineService as registerState } from "@himalaya/state";
3
3
  // Tier-5 bundle: himi-store — product detail.
4
4
  import { withIapPresentation } from "../_shared/iap-presentation.js";
5
- import { storesAppleSalesEnabled, storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
5
+ import { storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
6
6
  import { iapPriceCopy, iapPurchaseCopy } from "../_shared/iap-worker.js";
7
7
  import { share as shareSheet } from "@himalaya/share";
8
8
  import { addToCurrentCart, getCurrentCart } from "@himalaya/wix-ecom";
@@ -466,10 +466,8 @@ function derive(s: S): S {
466
466
  // read answering late — must not replace the badge the add set (#3468 review).
467
467
  let cartBadgeEpoch = 0;
468
468
 
469
- // A digital product with no options sells through the App Store once the platform sells Wix Stores
470
- // items there (`storesAppleSalesEnabled`): wix-iap StartItemPayment places and charges its order.
471
- // Until then, and for any other product, an App Store route only blocks the regular checkout.
472
- const SELLS_THROUGH_APPLE = storesAppleSalesEnabled();
469
+ // A digital product with no options sells through the App Store: wix-iap StartItemPayment places and
470
+ // charges its order. For any other product, an App Store route only blocks the regular checkout.
473
471
  const WIX_STORES_APP = "215238eb-22a5-4c36-9e7b-e7c08025e04e";
474
472
  const NOT_APPLE: IapPurchaseFields = { appleRoute: false, accessReady: false, buyLabel: "", buyDisabled: true, buyBusy: false, buyNote: "" };
475
473
 
@@ -477,7 +475,7 @@ let productPricing: IapCommerce;
477
475
  let checkoutEntered = false;
478
476
  const defineService = withIapPresentation<S>({
479
477
  register: withOnlineWrites(registerState, ["beginAdd", "addToCart", "buy"], { derive, messageFields: action => action === "buy" ? ["buyNote"] : ["cartHint"] }),
480
- adapters: SELLS_THROUGH_APPLE ? [storesProductOrders] : [],
478
+ adapters: [storesProductOrders],
481
479
  onCreate: commerce => { productPricing = commerce; }, prefix: "product",
482
480
  transientKeys: ["optionValidationTarget", "optionValidationRequest", "opt1ScrollRequest", "opt2ScrollRequest", "opt3ScrollRequest", "galleryIndex", "price", "optionsIncomplete", "cartHint", "cartHidden", "buyHidden", "buyLabel", "buyDisabled", "buyNote", "purchasedNote", "addedSheetPresented", "shareHint"], contentActions: ["load", "paintCached"], concurrentPublishActions: ["buy"],
483
481
  items: state => inputId() ? [{ reference: { kind: "storesProduct", id: inputId() }, commerceDisplayPrice: state.price }] : [],
@@ -508,7 +506,7 @@ const defineService = withIapPresentation<S>({
508
506
  function applePurchase(state: S): IapPurchaseFields {
509
507
  const id = inputId();
510
508
  const loaded = !!id && lastLoadedId === id;
511
- const sellable = SELLS_THROUGH_APPLE && loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
509
+ const sellable = loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
512
510
  const copy = iapPurchaseCopy("product");
513
511
  const fields = sellable ? productPricing.purchaseFields({ kind: "storesProduct", id }, copy) : NOT_APPLE;
514
512
  return fields.appleRoute ? fields : NOT_APPLE;
@@ -516,7 +514,6 @@ function applePurchase(state: S): IapPurchaseFields {
516
514
 
517
515
  /** On every entry: the first starts the checkout (recovering held purchases), later ones reconcile. */
518
516
  function enterCheckout(): void {
519
- if (!SELLS_THROUGH_APPLE) return;
520
517
  void (checkoutEntered ? productPricing.reconcile() : productPricing.start());
521
518
  checkoutEntered = true;
522
519
  }
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -2,7 +2,7 @@ import { withOnlineWrites, offlineWritesEnabled, offlineWriteMessage } from "../
2
2
  import { defineService as registerState } from "@himalaya/state";
3
3
  // Tier-5 bundle: himi-store — product detail.
4
4
  import { withIapPresentation } from "../_shared/iap-presentation.js";
5
- import { storesAppleSalesEnabled, storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
5
+ import { storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
6
6
  import { iapPriceCopy, iapPurchaseCopy } from "../_shared/iap-worker.js";
7
7
  import { share as shareSheet } from "@himalaya/share";
8
8
  import { addToCurrentCart, getCurrentCart } from "@himalaya/wix-ecom";
@@ -466,10 +466,8 @@ function derive(s: S): S {
466
466
  // read answering late — must not replace the badge the add set (#3468 review).
467
467
  let cartBadgeEpoch = 0;
468
468
 
469
- // A digital product with no options sells through the App Store once the platform sells Wix Stores
470
- // items there (`storesAppleSalesEnabled`): wix-iap StartItemPayment places and charges its order.
471
- // Until then, and for any other product, an App Store route only blocks the regular checkout.
472
- const SELLS_THROUGH_APPLE = storesAppleSalesEnabled();
469
+ // A digital product with no options sells through the App Store: wix-iap StartItemPayment places and
470
+ // charges its order. For any other product, an App Store route only blocks the regular checkout.
473
471
  const WIX_STORES_APP = "215238eb-22a5-4c36-9e7b-e7c08025e04e";
474
472
  const NOT_APPLE: IapPurchaseFields = { appleRoute: false, accessReady: false, buyLabel: "", buyDisabled: true, buyBusy: false, buyNote: "" };
475
473
 
@@ -477,7 +475,7 @@ let productPricing: IapCommerce;
477
475
  let checkoutEntered = false;
478
476
  const defineService = withIapPresentation<S>({
479
477
  register: withOnlineWrites(registerState, ["beginAdd", "addToCart", "buy"], { derive, messageFields: action => action === "buy" ? ["buyNote"] : ["cartHint"] }),
480
- adapters: SELLS_THROUGH_APPLE ? [storesProductOrders] : [],
478
+ adapters: [storesProductOrders],
481
479
  onCreate: commerce => { productPricing = commerce; }, prefix: "product",
482
480
  transientKeys: ["optionValidationTarget", "optionValidationRequest", "opt1ScrollRequest", "opt2ScrollRequest", "opt3ScrollRequest", "galleryIndex", "price", "optionsIncomplete", "cartHint", "cartHidden", "buyHidden", "buyLabel", "buyDisabled", "buyNote", "purchasedNote", "addedSheetPresented", "shareHint"], contentActions: ["load", "paintCached"], concurrentPublishActions: ["buy"],
483
481
  items: state => inputId() ? [{ reference: { kind: "storesProduct", id: inputId() }, commerceDisplayPrice: state.price }] : [],
@@ -508,7 +506,7 @@ const defineService = withIapPresentation<S>({
508
506
  function applePurchase(state: S): IapPurchaseFields {
509
507
  const id = inputId();
510
508
  const loaded = !!id && lastLoadedId === id;
511
- const sellable = SELLS_THROUGH_APPLE && loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
509
+ const sellable = loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
512
510
  const copy = iapPurchaseCopy("product");
513
511
  const fields = sellable ? productPricing.purchaseFields({ kind: "storesProduct", id }, copy) : NOT_APPLE;
514
512
  return fields.appleRoute ? fields : NOT_APPLE;
@@ -516,7 +514,6 @@ function applePurchase(state: S): IapPurchaseFields {
516
514
 
517
515
  /** On every entry: the first starts the checkout (recovering held purchases), later ones reconcile. */
518
516
  function enterCheckout(): void {
519
- if (!SELLS_THROUGH_APPLE) return;
520
517
  void (checkoutEntered ? productPricing.reconcile() : productPricing.start());
521
518
  checkoutEntered = true;
522
519
  }
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -3,7 +3,7 @@ import { withOnlineWrites, offlineWritesEnabled, offlineWriteMessage } from "../
3
3
  import { defineService as registerState } from "@himalaya/state";
4
4
  // Tier-5 bundle: himi-store — product detail.
5
5
  import { withIapPresentation } from "../_shared/iap-presentation.js";
6
- import { storesAppleSalesEnabled, storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
6
+ import { storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
7
7
  import { iapPriceCopy, iapPurchaseCopy } from "../_shared/iap-worker.js";
8
8
  import { share as shareSheet } from "@himalaya/share";
9
9
  import { addToCurrentCart, getCurrentCart } from "@himalaya/wix-ecom";
@@ -451,10 +451,8 @@ function derive(s: S): S {
451
451
  // read answering late — must not replace the badge the add set (#3468 review).
452
452
  let cartBadgeEpoch = 0;
453
453
 
454
- // A digital product with no options sells through the App Store once the platform sells Wix Stores
455
- // items there (`storesAppleSalesEnabled`): wix-iap StartItemPayment places and charges its order.
456
- // Until then, and for any other product, an App Store route only blocks the regular checkout.
457
- const SELLS_THROUGH_APPLE = storesAppleSalesEnabled();
454
+ // A digital product with no options sells through the App Store: wix-iap StartItemPayment places and
455
+ // charges its order. For any other product, an App Store route only blocks the regular checkout.
458
456
  const WIX_STORES_APP = "215238eb-22a5-4c36-9e7b-e7c08025e04e";
459
457
  const NOT_APPLE: IapPurchaseFields = { appleRoute: false, accessReady: false, buyLabel: "", buyDisabled: true, buyBusy: false, buyNote: "" };
460
458
 
@@ -462,7 +460,7 @@ let productPricing: IapCommerce;
462
460
  let checkoutEntered = false;
463
461
  const registerProduct = withIapPresentation<S>({
464
462
  register: withOnlineWrites(registerState, ["beginAdd", "addToCart", "buy"], { derive, messageFields: action => action === "buy" ? ["buyNote"] : ["cartHint"] }),
465
- adapters: SELLS_THROUGH_APPLE ? [storesProductOrders] : [],
463
+ adapters: [storesProductOrders],
466
464
  onCreate: commerce => { productPricing = commerce; }, prefix: "product",
467
465
  transientKeys: ["optionValidationTarget", "optionValidationRequest", "opt1ScrollRequest", "opt2ScrollRequest", "opt3ScrollRequest", "galleryIndex", "price", "optionsIncomplete", "cartHint", "cartHidden", "buyHidden", "buyLabel", "buyDisabled", "buyNote", "purchasedNote", "addedSheetPresented", "shareHint"], contentActions: ["load", "readChanged"], concurrentPublishActions: ["buy"],
468
466
  items: state => inputId() ? [{ reference: { kind: "storesProduct", id: inputId() }, commerceDisplayPrice: state.price }] : [],
@@ -513,7 +511,7 @@ const defineService = withReadLifecycle(registerProduct, "load", {
513
511
  function applePurchase(state: S): IapPurchaseFields {
514
512
  const id = inputId();
515
513
  const loaded = !!id && lastLoadedId === id;
516
- const sellable = SELLS_THROUGH_APPLE && loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
514
+ const sellable = loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
517
515
  const copy = iapPurchaseCopy("product");
518
516
  const fields = sellable ? productPricing.purchaseFields({ kind: "storesProduct", id }, copy) : NOT_APPLE;
519
517
  return fields.appleRoute ? fields : NOT_APPLE;
@@ -521,7 +519,6 @@ function applePurchase(state: S): IapPurchaseFields {
521
519
 
522
520
  /** On every entry: the first starts the checkout (recovering held purchases), later ones reconcile. */
523
521
  function enterCheckout(): void {
524
- if (!SELLS_THROUGH_APPLE) return;
525
522
  void (checkoutEntered ? productPricing.reconcile() : productPricing.start());
526
523
  checkoutEntered = true;
527
524
  }
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -3,7 +3,7 @@ import { withOnlineWrites, offlineWritesEnabled, offlineWriteMessage } from "../
3
3
  import { defineService as registerState } from "@himalaya/state";
4
4
  // Tier-5 bundle: himi-store — product detail.
5
5
  import { withIapPresentation } from "../_shared/iap-presentation.js";
6
- import { storesAppleSalesEnabled, storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
6
+ import { storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
7
7
  import { iapPriceCopy, iapPurchaseCopy } from "../_shared/iap-worker.js";
8
8
  import { share as shareSheet } from "@himalaya/share";
9
9
  import { addToCurrentCart, getCurrentCart } from "@himalaya/wix-ecom";
@@ -451,10 +451,8 @@ function derive(s: S): S {
451
451
  // read answering late — must not replace the badge the add set (#3468 review).
452
452
  let cartBadgeEpoch = 0;
453
453
 
454
- // A digital product with no options sells through the App Store once the platform sells Wix Stores
455
- // items there (`storesAppleSalesEnabled`): wix-iap StartItemPayment places and charges its order.
456
- // Until then, and for any other product, an App Store route only blocks the regular checkout.
457
- const SELLS_THROUGH_APPLE = storesAppleSalesEnabled();
454
+ // A digital product with no options sells through the App Store: wix-iap StartItemPayment places and
455
+ // charges its order. For any other product, an App Store route only blocks the regular checkout.
458
456
  const WIX_STORES_APP = "215238eb-22a5-4c36-9e7b-e7c08025e04e";
459
457
  const NOT_APPLE: IapPurchaseFields = { appleRoute: false, accessReady: false, buyLabel: "", buyDisabled: true, buyBusy: false, buyNote: "" };
460
458
 
@@ -462,7 +460,7 @@ let productPricing: IapCommerce;
462
460
  let checkoutEntered = false;
463
461
  const registerProduct = withIapPresentation<S>({
464
462
  register: withOnlineWrites(registerState, ["beginAdd", "addToCart", "buy"], { derive, messageFields: action => action === "buy" ? ["buyNote"] : ["cartHint"] }),
465
- adapters: SELLS_THROUGH_APPLE ? [storesProductOrders] : [],
463
+ adapters: [storesProductOrders],
466
464
  onCreate: commerce => { productPricing = commerce; }, prefix: "product",
467
465
  transientKeys: ["optionValidationTarget", "optionValidationRequest", "opt1ScrollRequest", "opt2ScrollRequest", "opt3ScrollRequest", "galleryIndex", "price", "optionsIncomplete", "cartHint", "cartHidden", "buyHidden", "buyLabel", "buyDisabled", "buyNote", "purchasedNote", "addedSheetPresented", "shareHint"], contentActions: ["load", "readChanged"], concurrentPublishActions: ["buy"],
468
466
  items: state => inputId() ? [{ reference: { kind: "storesProduct", id: inputId() }, commerceDisplayPrice: state.price }] : [],
@@ -513,7 +511,7 @@ const defineService = withReadLifecycle(registerProduct, "load", {
513
511
  function applePurchase(state: S): IapPurchaseFields {
514
512
  const id = inputId();
515
513
  const loaded = !!id && lastLoadedId === id;
516
- const sellable = SELLS_THROUGH_APPLE && loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
514
+ const sellable = loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
517
515
  const copy = iapPurchaseCopy("product");
518
516
  const fields = sellable ? productPricing.purchaseFields({ kind: "storesProduct", id }, copy) : NOT_APPLE;
519
517
  return fields.appleRoute ? fields : NOT_APPLE;
@@ -521,7 +519,6 @@ function applePurchase(state: S): IapPurchaseFields {
521
519
 
522
520
  /** On every entry: the first starts the checkout (recovering held purchases), later ones reconcile. */
523
521
  function enterCheckout(): void {
524
- if (!SELLS_THROUGH_APPLE) return;
525
522
  void (checkoutEntered ? productPricing.reconcile() : productPricing.start());
526
523
  checkoutEntered = true;
527
524
  }
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -1,10 +0,0 @@
1
- import type { IapOrderAdapter } from "../apple-iap-contract.js";
2
- export declare function attendanceClientOrdersWith(options: {
3
- bookingsEnabled: boolean;
4
- eventsEnabled: boolean;
5
- now?: () => number;
6
- }): {
7
- bookingOrders: IapOrderAdapter;
8
- eventTicketOrders: IapOrderAdapter;
9
- };
10
- export declare const bookingClientOrders: IapOrderAdapter, eventTicketClientOrders: IapOrderAdapter;
@@ -1,2 +0,0 @@
1
- import type { IapOrderAdapter } from "../apple-iap-contract.js";
2
- export declare const onlineProgramClientOrders: IapOrderAdapter;
@@ -1,2 +0,0 @@
1
- import type { IapOrderAdapter } from "../apple-iap-contract.js";
2
- export declare const pricingPlanClientOrders: IapOrderAdapter;