@wix/himalaya-cli 0.1373.0 → 0.1375.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.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/checkout-source.d.ts +5 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +15 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +14 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +11 -1
- package/dist/cli.mjs +194 -54
- package/guides/himi-json-output.md +22 -0
- package/guides/iap-products.md +40 -5
- package/guides/iap-screen-adoption.md +7 -5
- package/guides/sdk-reference.json +29 -5
- package/package.json +2 -2
- package/template-icons/base44-podcast.png +0 -0
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +5 -5
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +5 -5
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +5 -5
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +5 -5
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +5 -5
|
@@ -41,21 +41,35 @@ export interface AppleSaleRule {
|
|
|
41
41
|
* Whether Wix Stores items sell through the App Store, through wix-iap StartItemPayment
|
|
42
42
|
* (catalyst-server #24496), which places the member's eCom order for one catalog item. OFF: that RPC
|
|
43
43
|
* is not deployed, the member's identity across Serve → wix-iap → eCom is unproven, and a paid Stores
|
|
44
|
-
* order is not yet proven to deliver the download.
|
|
45
|
-
* `APPLE_SALE_RULES
|
|
46
|
-
* checkout's path (`itemPaymentEnabled` in @himalaya/iap-checkout).
|
|
44
|
+
* order is not yet proven to deliver the download. Enabling this also enables the Stores rule in
|
|
45
|
+
* `APPLE_SALE_RULES` and selects `itemPaymentEnabled` in @himalaya/iap-checkout.
|
|
47
46
|
*/
|
|
48
47
|
export declare const STORES_ITEM_PAYMENT_ENABLED = false;
|
|
48
|
+
/**
|
|
49
|
+
* Whether Wix Stores items sell through the App Store at all: the Stores rule in `APPLE_SALE_RULES`
|
|
50
|
+
* and the product screen's Buy. With StartItemPayment off, a sale uses the app's own order: an eCom
|
|
51
|
+
* checkout and order, its `appleIAP` cashier charge, then StartPayment. ON for mapped digital
|
|
52
|
+
* products. Member checkout, the eCom IAP flag, cashier item identity and digital fulfillment
|
|
53
|
+
* remain unverified in Sandbox.
|
|
54
|
+
*/
|
|
55
|
+
export declare const STORES_APPLE_SALES_ENABLED = true;
|
|
49
56
|
/** StartItemPayment's CatalogReference: the purchases catalog sells a Stores product under its product
|
|
50
57
|
* id (eCom's `catalogItemId`). One-time unlocks only, whatever the backend also accepts. */
|
|
51
58
|
export declare const STORES_PRODUCT_SALE_RULE: AppleSaleRule;
|
|
59
|
+
/** Off until a member's plan order, its cashier item id and Sandbox fulfillment are proven live.
|
|
60
|
+
* Recurring and time-limited plans stay outside this rule; their Billing lifecycle is unfinished. */
|
|
61
|
+
export declare const PRICING_PLAN_APPLE_SALES_ENABLED = false;
|
|
52
62
|
/**
|
|
53
63
|
* The one definition `himi store iap connect` writes mappings by and the mapping source reads them by,
|
|
54
64
|
* keyed by catalog kind. wix-iap StartPayment maps the cashier order's single item id, and Online
|
|
55
65
|
* Programs builds that order with the program id as the item id; programs are one-time unlocks.
|
|
56
|
-
* Wix Stores
|
|
57
|
-
* established yet, so their items keep their own commerce.
|
|
66
|
+
* Wix Stores and one-time unlimited Pricing Plans join only with their independent switches.
|
|
58
67
|
*/
|
|
68
|
+
export declare function appleSaleRules(options?: {
|
|
69
|
+
storesAppleSalesEnabled?: boolean;
|
|
70
|
+
storesItemPaymentEnabled?: boolean;
|
|
71
|
+
pricingPlanAppleSalesEnabled?: boolean;
|
|
72
|
+
}): Readonly<Record<string, AppleSaleRule>>;
|
|
59
73
|
export declare const APPLE_SALE_RULES: Readonly<Record<string, AppleSaleRule>>;
|
|
60
74
|
/** Captured when a protected call starts. The native bridge checks it and never puts it on
|
|
61
75
|
* the HTTP request. */
|
|
@@ -6,8 +6,11 @@ export declare function appleIapCheckoutEnabled(): boolean;
|
|
|
6
6
|
/**
|
|
7
7
|
* Whether an item whose adapter names it in eCom's catalog (a Wix Stores product) is paid through
|
|
8
8
|
* wix-iap StartItemPayment, which places the member's eCom order server-side. The same switch as
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* `STORES_ITEM_PAYMENT_ENABLED` in @himalaya/iap; otherwise an enabled Stores sale uses the app's
|
|
10
|
+
* own order. Turning it off again stops only new attempts: stored
|
|
11
11
|
* ones are still held, completed and tracked (docs/iap-wix-checkout.md).
|
|
12
12
|
*/
|
|
13
13
|
export declare function itemPaymentEnabled(): boolean;
|
|
14
|
+
/** Whether Wix Stores items sell through the App Store, by either path: StartItemPayment when
|
|
15
|
+
* `itemPaymentEnabled`, otherwise the app's own eCom order (`STORES_APPLE_SALES_ENABLED`). */
|
|
16
|
+
export declare function storesAppleSalesEnabled(): boolean;
|
|
@@ -3,6 +3,6 @@ export { iapPurchaseFields } from "./purchase-fields.js";
|
|
|
3
3
|
export { createAppleIapCheckout } from "./apple-iap.js";
|
|
4
4
|
export { onlineProgramOrders, pricingPlanOrders, storesProductOrders, classifyCart } from "./iap-verticals/index.js";
|
|
5
5
|
export { createWorkerOrderRefStore } from "./order-refs.js";
|
|
6
|
-
export { itemPaymentEnabled } from "./checkout-source.js";
|
|
6
|
+
export { itemPaymentEnabled, storesAppleSalesEnabled } from "./checkout-source.js";
|
|
7
7
|
export type { AccessRead, AppleIapCheckout, AppleIapCheckoutDependencies, AppleIapCheckoutPhase, AppleIapCheckoutState, BridgeOutcome, BridgeRefusal, CashierRoute, IapEligibility, IapOrderAdapter, IapOrderItem, OrderAttempt, OrderFailureCode, OrderPartitionKey, OrderRef, OrderRefPartition, OrderRefStage, OrderRefStore, PaymentAccess, PaymentProgress, SessionBoundBridge, VerticalRef, WixBridge, } from "./apple-iap-contract.js";
|
|
8
8
|
export type { AppleIapCheckoutRoutes, IapCommerce, IapCommerceOptions, IapPurchaseCopy, IapPurchaseFields, IapPurchaseGap, IapPurchaseReadiness, } from "./commerce-contract.js";
|
|
@@ -686,9 +686,19 @@ var sameReference = (value, reference) => isObject2(value) && value.kind === ref
|
|
|
686
686
|
// ../../core/sdk/iap/src/wix-payments-contract.ts
|
|
687
687
|
var HIMALAYA_SERVE_IAP_ROUTE = { prefix: "/himalaya-serve/v1/iap" };
|
|
688
688
|
var STORES_ITEM_PAYMENT_ENABLED = false;
|
|
689
|
+
var STORES_APPLE_SALES_ENABLED = true;
|
|
689
690
|
var STORES_PRODUCT_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
|
|
690
691
|
var ONLINE_PROGRAM_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
|
|
691
|
-
var
|
|
692
|
+
var PRICING_PLAN_APPLE_SALES_ENABLED = false;
|
|
693
|
+
var PRICING_PLAN_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
|
|
694
|
+
function appleSaleRules(options = {}) {
|
|
695
|
+
return {
|
|
696
|
+
onlineProgram: ONLINE_PROGRAM_SALE_RULE,
|
|
697
|
+
...(options.storesAppleSalesEnabled ?? STORES_APPLE_SALES_ENABLED) || (options.storesItemPaymentEnabled ?? STORES_ITEM_PAYMENT_ENABLED) ? { storesProduct: STORES_PRODUCT_SALE_RULE } : {},
|
|
698
|
+
...options.pricingPlanAppleSalesEnabled ?? PRICING_PLAN_APPLE_SALES_ENABLED ? { pricingPlan: PRICING_PLAN_SALE_RULE } : {}
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
var APPLE_SALE_RULES = appleSaleRules();
|
|
692
702
|
|
|
693
703
|
// ../../core/sdk/iap/src/mapping-source.ts
|
|
694
704
|
function iapMappingSource() {
|
|
@@ -1432,6 +1442,9 @@ function appleIapCheckoutEnabled() {
|
|
|
1432
1442
|
function itemPaymentEnabled() {
|
|
1433
1443
|
return STORES_ITEM_PAYMENT_ENABLED;
|
|
1434
1444
|
}
|
|
1445
|
+
function storesAppleSalesEnabled() {
|
|
1446
|
+
return STORES_APPLE_SALES_ENABLED || STORES_ITEM_PAYMENT_ENABLED;
|
|
1447
|
+
}
|
|
1435
1448
|
|
|
1436
1449
|
// ../../stdlib/flows/iap-checkout/src/cashier-charges.ts
|
|
1437
1450
|
async function ensureAppleIapCharge(bridge, route, orderId) {
|
|
@@ -3036,6 +3049,7 @@ export {
|
|
|
3036
3049
|
itemPaymentEnabled,
|
|
3037
3050
|
onlineProgramOrders,
|
|
3038
3051
|
pricingPlanOrders,
|
|
3052
|
+
storesAppleSalesEnabled,
|
|
3039
3053
|
storesProductOrders
|
|
3040
3054
|
};
|
|
3041
3055
|
//# sourceMappingURL=iap-checkout.mjs.map
|
|
@@ -664,9 +664,19 @@ var IAP_CATALOG_KINDS = ["onlineProgram", "storesProduct", "pricingPlan"];
|
|
|
664
664
|
// ../../core/sdk/iap/src/wix-payments-contract.ts
|
|
665
665
|
var HIMALAYA_SERVE_IAP_ROUTE = { prefix: "/himalaya-serve/v1/iap" };
|
|
666
666
|
var STORES_ITEM_PAYMENT_ENABLED = false;
|
|
667
|
+
var STORES_APPLE_SALES_ENABLED = true;
|
|
667
668
|
var STORES_PRODUCT_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
|
|
668
669
|
var ONLINE_PROGRAM_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
|
|
669
|
-
var
|
|
670
|
+
var PRICING_PLAN_APPLE_SALES_ENABLED = false;
|
|
671
|
+
var PRICING_PLAN_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
|
|
672
|
+
function appleSaleRules(options = {}) {
|
|
673
|
+
return {
|
|
674
|
+
onlineProgram: ONLINE_PROGRAM_SALE_RULE,
|
|
675
|
+
...(options.storesAppleSalesEnabled ?? STORES_APPLE_SALES_ENABLED) || (options.storesItemPaymentEnabled ?? STORES_ITEM_PAYMENT_ENABLED) ? { storesProduct: STORES_PRODUCT_SALE_RULE } : {},
|
|
676
|
+
...options.pricingPlanAppleSalesEnabled ?? PRICING_PLAN_APPLE_SALES_ENABLED ? { pricingPlan: PRICING_PLAN_SALE_RULE } : {}
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
var APPLE_SALE_RULES = appleSaleRules();
|
|
670
680
|
|
|
671
681
|
// ../../core/sdk/iap/src/mapping-source.ts
|
|
672
682
|
function iapMappingSource() {
|
|
@@ -1469,9 +1479,12 @@ export {
|
|
|
1469
1479
|
IAP_CATALOG_KINDS,
|
|
1470
1480
|
MAX_AUTOMATIC_ATTEMPTS,
|
|
1471
1481
|
MAX_RETRY_DELAY_MS,
|
|
1482
|
+
PRICING_PLAN_APPLE_SALES_ENABLED,
|
|
1483
|
+
STORES_APPLE_SALES_ENABLED,
|
|
1472
1484
|
STORES_ITEM_PAYMENT_ENABLED,
|
|
1473
1485
|
STORES_PRODUCT_SALE_RULE,
|
|
1474
1486
|
appleManagedStore,
|
|
1487
|
+
appleSaleRules,
|
|
1475
1488
|
consume,
|
|
1476
1489
|
createHostSession,
|
|
1477
1490
|
createIapCatalogPricing,
|
|
@@ -939,9 +939,19 @@ var sameReference = (value, reference) => isObject2(value) && value.kind === ref
|
|
|
939
939
|
// ../../core/sdk/iap/src/wix-payments-contract.ts
|
|
940
940
|
var HIMALAYA_SERVE_IAP_ROUTE = { prefix: "/himalaya-serve/v1/iap" };
|
|
941
941
|
var STORES_ITEM_PAYMENT_ENABLED = false;
|
|
942
|
+
var STORES_APPLE_SALES_ENABLED = true;
|
|
942
943
|
var STORES_PRODUCT_SALE_RULE = { appProductId: (id2) => id2, productType: "NON_CONSUMABLE" };
|
|
943
944
|
var ONLINE_PROGRAM_SALE_RULE = { appProductId: (id2) => id2, productType: "NON_CONSUMABLE" };
|
|
944
|
-
var
|
|
945
|
+
var PRICING_PLAN_APPLE_SALES_ENABLED = false;
|
|
946
|
+
var PRICING_PLAN_SALE_RULE = { appProductId: (id2) => id2, productType: "NON_CONSUMABLE" };
|
|
947
|
+
function appleSaleRules(options = {}) {
|
|
948
|
+
return {
|
|
949
|
+
onlineProgram: ONLINE_PROGRAM_SALE_RULE,
|
|
950
|
+
...(options.storesAppleSalesEnabled ?? STORES_APPLE_SALES_ENABLED) || (options.storesItemPaymentEnabled ?? STORES_ITEM_PAYMENT_ENABLED) ? { storesProduct: STORES_PRODUCT_SALE_RULE } : {},
|
|
951
|
+
...options.pricingPlanAppleSalesEnabled ?? PRICING_PLAN_APPLE_SALES_ENABLED ? { pricingPlan: PRICING_PLAN_SALE_RULE } : {}
|
|
952
|
+
};
|
|
953
|
+
}
|
|
954
|
+
var APPLE_SALE_RULES = appleSaleRules();
|
|
945
955
|
|
|
946
956
|
// ../../core/sdk/iap/src/mapping-source.ts
|
|
947
957
|
function iapMappingSource() {
|