@wix/himalaya-cli 0.1658.0 → 0.1660.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/attendance-classifier.d.ts +3 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/delivery-contract.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/index.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +19 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-wire.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/apple-iap-contract.d.ts +22 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/commerce-contract.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-order-backend.d.ts +5 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance-orders.d.ts +10 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance.d.ts +4 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/index.d.ts +13 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/online-programs-orders.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/online-programs.d.ts +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/pricing-plans-orders.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/pricing-plans.d.ts +4 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/shared.d.ts +3 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +545 -166
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +52 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +423 -88
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -1
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{c04dd5fc5ad48e6b19678d4313159302e9a513ada94bfe515d8dfd5a54d46f5d.bin → fcafca348b6b973cfc2eadc938ddec3c515c641874cbca1667a43b22e1bf7a39.bin} +1 -1
- package/dist/browser-plane/sw.js +1 -1
- package/dist/cli.mjs +1457 -228
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/himi-json-output.md +39 -0
- package/guides/qa-builds.md +20 -0
- package/guides/sdk-reference.json +79 -9
- package/guides/skill.md +3 -1
- package/guides/web-page-sdk-reference.md +1 -1
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/beauty-salon/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/branded-lite/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/branded-lite/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/community-club/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/community-club/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/conference/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/conference/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/events-meetups/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/events-meetups/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/gym-fitness/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/gym-fitness/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/nonprofit-cause/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/podcast-creator/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/podcast-creator/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/portfolio-creative/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/portfolio-creative/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/restaurant/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/restaurant/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/retail-store/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/salon-spa/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/salon-spa/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/wholesale-store/tier5-src/_shared/iap-worker.ts +2 -0
- package/templates/yoga-studio/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
- package/templates/yoga-studio/tier5-src/_shared/iap-worker.ts +2 -0
|
@@ -92,9 +92,18 @@ function createPurchaseCoordinator(deps) {
|
|
|
92
92
|
else if (result.status === "failed") failStore(result.code, false);
|
|
93
93
|
else if (result.status === "pending") {
|
|
94
94
|
if (!await awaitApproval(session, context)) return !disposed;
|
|
95
|
-
} else
|
|
95
|
+
} else {
|
|
96
|
+
setOutcome("cancelled");
|
|
97
|
+
void abandon(session, catalogRef);
|
|
98
|
+
}
|
|
96
99
|
return false;
|
|
97
100
|
}
|
|
101
|
+
async function abandon(session, catalogRef) {
|
|
102
|
+
try {
|
|
103
|
+
await deps.backend.abandonPurchase?.(session, catalogRef);
|
|
104
|
+
} catch {
|
|
105
|
+
}
|
|
106
|
+
}
|
|
98
107
|
async function deliverPurchase(session, transaction, context) {
|
|
99
108
|
const item = upsert(transaction, null);
|
|
100
109
|
applyDelivered(await deliver(session, [item], context));
|
|
@@ -673,6 +682,11 @@ var ONLINE_PROGRAM_SALE_RULE = { appProductId: (id) => id, productType: "NON_CON
|
|
|
673
682
|
var PRICING_PLAN_APPLE_SALES_ENABLED = true;
|
|
674
683
|
var PRICING_PLAN_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
|
|
675
684
|
var VIDEOS_APPLE_SALES_ENABLED = false;
|
|
685
|
+
var PRICING_PLAN_ITEM_PAYMENT_ENABLED = false;
|
|
686
|
+
var ONLINE_PROGRAM_ITEM_PAYMENT_ENABLED = false;
|
|
687
|
+
var BOOKINGS_ITEM_PAYMENT_ENABLED = false;
|
|
688
|
+
var EVENTS_ITEM_PAYMENT_ENABLED = false;
|
|
689
|
+
var CANCEL_PAYMENT_ENABLED = false;
|
|
676
690
|
var VIDEO_SALE_RULE = { appProductId: (id) => id, productType: "NON_CONSUMABLE" };
|
|
677
691
|
function appleSaleRules(options = {}) {
|
|
678
692
|
return {
|
|
@@ -1124,10 +1138,21 @@ function decodeStartedItem(raw, expected) {
|
|
|
1124
1138
|
if (!isObject3(raw)) return null;
|
|
1125
1139
|
const ecomOrderId = optionalId(raw.ecomOrderId);
|
|
1126
1140
|
const joinApplicationId = optionalId(raw.joinApplicationId);
|
|
1127
|
-
|
|
1141
|
+
const eventsOrderNumber = optionalOrderNumber(raw.eventsOrderNumber);
|
|
1142
|
+
if (ecomOrderId === null || joinApplicationId === null || eventsOrderNumber === null) return null;
|
|
1143
|
+
if (!ecomOrderId && !joinApplicationId && !eventsOrderNumber) return null;
|
|
1128
1144
|
const started = decodeStarted(raw, expected);
|
|
1129
1145
|
if (!started || started.payment.appProductId !== expected.catalogItemId) return null;
|
|
1130
|
-
return {
|
|
1146
|
+
return {
|
|
1147
|
+
...started,
|
|
1148
|
+
...ecomOrderId ? { ecomOrderId } : {},
|
|
1149
|
+
...joinApplicationId ? { joinApplicationId } : {},
|
|
1150
|
+
...eventsOrderNumber ? { eventsOrderNumber } : {}
|
|
1151
|
+
};
|
|
1152
|
+
}
|
|
1153
|
+
function optionalOrderNumber(value) {
|
|
1154
|
+
if (value === void 0 || value === "") return void 0;
|
|
1155
|
+
return typeof value === "string" && value.length <= 36 ? value : null;
|
|
1131
1156
|
}
|
|
1132
1157
|
function optionalId(value) {
|
|
1133
1158
|
if (value === void 0 || value === "") return void 0;
|
|
@@ -1428,7 +1453,8 @@ var START_ITEM_PAYMENT_CODES = [
|
|
|
1428
1453
|
"BILLING_COUNTRY_REQUIRED",
|
|
1429
1454
|
"APP_NOT_CONFIGURED",
|
|
1430
1455
|
"NOT_BOOKING_OWNER",
|
|
1431
|
-
"BOOKING_PAYMENT_PENDING"
|
|
1456
|
+
"BOOKING_PAYMENT_PENDING",
|
|
1457
|
+
"MEMBER_DETAILS_REQUIRED"
|
|
1432
1458
|
];
|
|
1433
1459
|
var CANCEL_PAYMENT_CODES = ["NOT_PENDING", "APP_NOT_CONFIGURED", "NOT_FOUND"];
|
|
1434
1460
|
var UNDECIDED = /* @__PURE__ */ new Set(["unavailable", "sessionChanged", "invalidResponse"]);
|
|
@@ -1549,15 +1575,18 @@ function ticketAttendanceOf(event, definition) {
|
|
|
1549
1575
|
function availableTicketAttendanceOf(event, ticket) {
|
|
1550
1576
|
const e = object(event);
|
|
1551
1577
|
const t = object(ticket);
|
|
1552
|
-
const
|
|
1578
|
+
const v3 = t.pricingMethod !== void 0;
|
|
1579
|
+
const pricing = object(v3 ? t.pricingMethod : t.pricing);
|
|
1553
1580
|
const fixed = object(pricing.fixedPrice);
|
|
1581
|
+
const amount = v3 ? fixed.value : fixed.amount;
|
|
1554
1582
|
const price = object(t.price);
|
|
1555
|
-
const
|
|
1556
|
-
const
|
|
1583
|
+
const listed = v3 ? t.hidden === false && t.state === void 0 : Array.isArray(t.state) && t.state.length === 0;
|
|
1584
|
+
const visible = listed && object(t.dashboard).hidden !== true && typeof t.id === "string" && t.id.length > 0 && typeof e.id === "string" && e.id.length > 0 && t.eventId === e.id;
|
|
1585
|
+
const fixedPrice = t.free === false && (!v3 || pricing.free === false) && pricing.pricingType === "STANDARD" && sameTicketAmount(amount, price.amount) && fixed.currency === price.currency;
|
|
1557
1586
|
return ticketAttendanceOf(e, {
|
|
1558
1587
|
hidden: visible ? false : void 0,
|
|
1559
1588
|
saleStatus: t.saleStatus,
|
|
1560
|
-
pricingMethod: { pricingType: fixedPrice ? "STANDARD" : void 0, fixedPrice: { value:
|
|
1589
|
+
pricingMethod: { pricingType: fixedPrice ? "STANDARD" : void 0, fixedPrice: { value: amount, currency: fixed.currency } }
|
|
1561
1590
|
});
|
|
1562
1591
|
}
|
|
1563
1592
|
function sameTicketAmount(left, right) {
|
|
@@ -1583,6 +1612,15 @@ async function getPaywallConfig() {
|
|
|
1583
1612
|
products: Array.isArray(r?.products) ? r.products : []
|
|
1584
1613
|
};
|
|
1585
1614
|
}
|
|
1615
|
+
async function storefrontCountryCode() {
|
|
1616
|
+
try {
|
|
1617
|
+
const r = await dispatch("capability.iap.storefront");
|
|
1618
|
+
const code = r?.countryCode;
|
|
1619
|
+
return typeof code === "string" && /^[A-Z]{3}$/.test(code) ? code : null;
|
|
1620
|
+
} catch {
|
|
1621
|
+
return null;
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1586
1624
|
async function getProducts(productIds) {
|
|
1587
1625
|
if (!productIds || productIds.length === 0) return [];
|
|
1588
1626
|
const r = await dispatch("capability.iap.getProducts", {
|
|
@@ -1707,12 +1745,17 @@ export {
|
|
|
1707
1745
|
APPLE_PROVISIONING_RULES,
|
|
1708
1746
|
APPLE_SALE_RULES,
|
|
1709
1747
|
BOOKINGS_APPLE_SALES_ENABLED,
|
|
1748
|
+
BOOKINGS_ITEM_PAYMENT_ENABLED,
|
|
1749
|
+
CANCEL_PAYMENT_ENABLED,
|
|
1710
1750
|
EVENTS_APPLE_SALES_ENABLED,
|
|
1751
|
+
EVENTS_ITEM_PAYMENT_ENABLED,
|
|
1711
1752
|
HIMALAYA_SERVE_IAP_ROUTE,
|
|
1712
1753
|
IAP_CATALOG_KINDS,
|
|
1713
1754
|
MAX_AUTOMATIC_ATTEMPTS,
|
|
1714
1755
|
MAX_RETRY_DELAY_MS,
|
|
1756
|
+
ONLINE_PROGRAM_ITEM_PAYMENT_ENABLED,
|
|
1715
1757
|
PRICING_PLAN_APPLE_SALES_ENABLED,
|
|
1758
|
+
PRICING_PLAN_ITEM_PAYMENT_ENABLED,
|
|
1716
1759
|
STORES_APPLE_SALES_ENABLED,
|
|
1717
1760
|
STORES_PRODUCT_SALE_RULE,
|
|
1718
1761
|
VIDEOS_APPLE_SALES_ENABLED,
|
|
@@ -1743,6 +1786,7 @@ export {
|
|
|
1743
1786
|
readIdentityBound,
|
|
1744
1787
|
restore,
|
|
1745
1788
|
sharedHostAppBindingSource,
|
|
1789
|
+
storefrontCountryCode,
|
|
1746
1790
|
ticketAttendanceOf,
|
|
1747
1791
|
version,
|
|
1748
1792
|
wixVideoItem
|
|
@@ -31,7 +31,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
31
31
|
"haptic": ["play", "sequence", "vibrate"],
|
|
32
32
|
"health": ["availability", "getPermissionStatus", "query", "requestPermission", "saveWorkout"],
|
|
33
33
|
"himi_apps": ["canOpen", "current", "hostInfo", "open"],
|
|
34
|
-
"iap": ["appBinding", "consume", "entitlements", "finishTransaction", "getPaywallConfig", "getProducts", "getUnfinishedTransactions", "purchase", "purchaseForVerification", "restore"],
|
|
34
|
+
"iap": ["appBinding", "consume", "entitlements", "finishTransaction", "getPaywallConfig", "getProducts", "getUnfinishedTransactions", "purchase", "purchaseForVerification", "restore", "storefront"],
|
|
35
35
|
"keyboard": ["dismiss"],
|
|
36
36
|
"legacy_import": ["ack", "read"],
|
|
37
37
|
"live_activity": ["end", "start", "update"],
|
|
@@ -31,7 +31,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
31
31
|
"haptic": ["play", "sequence", "vibrate"],
|
|
32
32
|
"health": ["availability", "getPermissionStatus", "query", "requestPermission", "saveWorkout"],
|
|
33
33
|
"himi_apps": ["canOpen", "current", "hostInfo", "open"],
|
|
34
|
-
"iap": ["appBinding", "consume", "entitlements", "finishTransaction", "getPaywallConfig", "getProducts", "getUnfinishedTransactions", "purchase", "purchaseForVerification", "restore"],
|
|
34
|
+
"iap": ["appBinding", "consume", "entitlements", "finishTransaction", "getPaywallConfig", "getProducts", "getUnfinishedTransactions", "purchase", "purchaseForVerification", "restore", "storefront"],
|
|
35
35
|
"keyboard": ["dismiss"],
|
|
36
36
|
"legacy_import": ["ack", "read"],
|
|
37
37
|
"live_activity": ["end", "start", "update"],
|
|
@@ -31,7 +31,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
31
31
|
"haptic": ["play", "sequence", "vibrate"],
|
|
32
32
|
"health": ["availability", "getPermissionStatus", "query", "requestPermission", "saveWorkout"],
|
|
33
33
|
"himi_apps": ["canOpen", "current", "hostInfo", "open"],
|
|
34
|
-
"iap": ["appBinding", "consume", "entitlements", "finishTransaction", "getPaywallConfig", "getProducts", "getUnfinishedTransactions", "purchase", "purchaseForVerification", "restore"],
|
|
34
|
+
"iap": ["appBinding", "consume", "entitlements", "finishTransaction", "getPaywallConfig", "getProducts", "getUnfinishedTransactions", "purchase", "purchaseForVerification", "restore", "storefront"],
|
|
35
35
|
"keyboard": ["dismiss"],
|
|
36
36
|
"legacy_import": ["ack", "read"],
|
|
37
37
|
"live_activity": ["end", "start", "update"],
|