@wix/himalaya-cli 0.1551.0 → 0.1552.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/dev-server/src/builder.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/apple-iap-contract.d.ts +24 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/order-refs.d.ts +12 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forms/src/extensions.d.ts +83 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +146 -23
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +8 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +147 -24
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forms.mjs +19 -0
- package/dist/cli.mjs +2455 -2166
- package/fixtures/wix-canned.json +14 -7
- package/guides/getting-started.md +17 -1
- package/guides/headless-loop.md +7 -1
- package/guides/himi-skill.md +17 -1
- package/guides/himi-test.md +95 -7
- package/guides/iap-pricing.md +1 -1
- package/guides/iap-products.md +2 -2
- package/guides/iap-screen-adoption.md +1 -1
- package/guides/index.json +1 -1
- package/guides/sdk-reference.json +82 -4
- package/guides/skill.md +16 -0
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +13 -0
- package/templates/beauty-salon/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
- package/templates/beauty-salon/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +1 -1
- package/templates/branded-lite/config.ts +13 -0
- package/templates/branded-lite/dev/index.ts +1338 -2011
- package/templates/branded-lite/tier5-src/_shared/branded-form.ts +262 -0
- package/templates/branded-lite/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
- package/templates/branded-lite/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-form/index.ts +399 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-forms/index.ts +22 -7
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +1 -1
- package/templates/community-club/config.ts +13 -0
- package/templates/community-club/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
- package/templates/community-club/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/events-meetups/config.ts +13 -0
- package/templates/events-meetups/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
- package/templates/events-meetups/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/gym-fitness/config.ts +13 -0
- package/templates/gym-fitness/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
- package/templates/gym-fitness/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +1 -1
- package/templates/nonprofit-cause/config.ts +13 -0
- package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/podcast-creator/config.ts +13 -0
- package/templates/podcast-creator/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
- package/templates/podcast-creator/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/portfolio-creative/config.ts +13 -0
- package/templates/portfolio-creative/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +1 -1
- package/templates/restaurant/config.ts +13 -0
- package/templates/restaurant/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
- package/templates/restaurant/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/retail-store/config.ts +13 -0
- package/templates/retail-store/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +1 -1
- package/templates/yoga-studio/config.ts +13 -0
- package/templates/yoga-studio/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
- package/templates/yoga-studio/tier5-src/_shared/iap-worker.ts +1 -1
- package/templates/branded-lite/tier5-src/wix-spaces-form-detail/index.ts +0 -30
|
@@ -20,7 +20,7 @@ export function iapPriceCopy(prefix: string): IapPriceCopy {
|
|
|
20
20
|
* `iapPurchaseFields`. Customer copy only: no backend names, ids or diagnostics. */
|
|
21
21
|
export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
|
|
22
22
|
return {
|
|
23
|
-
buy: copyParam(`${prefix}.buyCta`, "
|
|
23
|
+
buy: copyParam(`${prefix}.buyCta`, "Buy now"),
|
|
24
24
|
processing: copyParam(`${prefix}.purchaseProcessingText`, "Processing your purchase…"),
|
|
25
25
|
awaitingApproval: copyParam(`${prefix}.purchaseAwaitingApprovalText`, "Waiting for approval"),
|
|
26
26
|
unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
|
|
@@ -38,6 +38,19 @@ export default defineApp({
|
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
40
|
capabilities: ["live_activity","push","share","secure_storage","open_url","calendar","local_database","media_playback","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme"],
|
|
41
|
+
cache: {
|
|
42
|
+
"rules": [
|
|
43
|
+
{
|
|
44
|
+
"method": "POST",
|
|
45
|
+
"pathPrefix": "/form-submission-service/v4/submissions",
|
|
46
|
+
"cacheable": false,
|
|
47
|
+
"ttl": 0,
|
|
48
|
+
"swr": 0,
|
|
49
|
+
"tag": "forms",
|
|
50
|
+
"queueOffline": true
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
41
54
|
designTokensPath: "./tokens.json",
|
|
42
55
|
navigation: {
|
|
43
56
|
"navKind": "responsive",
|
|
@@ -111,7 +111,7 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
111
111
|
const classified = classifyForApple(metadata, currency);
|
|
112
112
|
const candidate = platform === "ios" && classified === "appleIap";
|
|
113
113
|
const price = iapPriceFields(commerce.pricing.view(reference), iapPriceCopy(prefix));
|
|
114
|
-
const copy =
|
|
114
|
+
const copy = iapPurchaseCopy(prefix);
|
|
115
115
|
const purchase = commerce.purchaseFields(reference, copy);
|
|
116
116
|
const apple = candidate || (platform === "ios" && classified !== "wixPayments" && purchase.appleRoute);
|
|
117
117
|
const enabled = attendanceCheckoutRoute(metadata, currency, platform) === "appleIap";
|
|
@@ -20,7 +20,7 @@ export function iapPriceCopy(prefix: string): IapPriceCopy {
|
|
|
20
20
|
* `iapPurchaseFields`. Customer copy only: no backend names, ids or diagnostics. */
|
|
21
21
|
export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
|
|
22
22
|
return {
|
|
23
|
-
buy: copyParam(`${prefix}.buyCta`, "
|
|
23
|
+
buy: copyParam(`${prefix}.buyCta`, "Buy now"),
|
|
24
24
|
processing: copyParam(`${prefix}.purchaseProcessingText`, "Processing your purchase…"),
|
|
25
25
|
awaitingApproval: copyParam(`${prefix}.purchaseAwaitingApprovalText`, "Waiting for approval"),
|
|
26
26
|
unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
|
|
@@ -38,6 +38,19 @@ export default defineApp({
|
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
40
|
capabilities: ["live_activity","push","share","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","media_playback"],
|
|
41
|
+
cache: {
|
|
42
|
+
"rules": [
|
|
43
|
+
{
|
|
44
|
+
"method": "POST",
|
|
45
|
+
"pathPrefix": "/form-submission-service/v4/submissions",
|
|
46
|
+
"cacheable": false,
|
|
47
|
+
"ttl": 0,
|
|
48
|
+
"swr": 0,
|
|
49
|
+
"tag": "forms",
|
|
50
|
+
"queueOffline": true
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
41
54
|
designTokensPath: "./tokens.json",
|
|
42
55
|
navigation: {
|
|
43
56
|
"navKind": "responsive",
|
|
@@ -111,7 +111,7 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
111
111
|
const classified = classifyForApple(metadata, currency);
|
|
112
112
|
const candidate = platform === "ios" && classified === "appleIap";
|
|
113
113
|
const price = iapPriceFields(commerce.pricing.view(reference), iapPriceCopy(prefix));
|
|
114
|
-
const copy =
|
|
114
|
+
const copy = iapPurchaseCopy(prefix);
|
|
115
115
|
const purchase = commerce.purchaseFields(reference, copy);
|
|
116
116
|
const apple = candidate || (platform === "ios" && classified !== "wixPayments" && purchase.appleRoute);
|
|
117
117
|
const enabled = attendanceCheckoutRoute(metadata, currency, platform) === "appleIap";
|
|
@@ -20,7 +20,7 @@ export function iapPriceCopy(prefix: string): IapPriceCopy {
|
|
|
20
20
|
* `iapPurchaseFields`. Customer copy only: no backend names, ids or diagnostics. */
|
|
21
21
|
export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
|
|
22
22
|
return {
|
|
23
|
-
buy: copyParam(`${prefix}.buyCta`, "
|
|
23
|
+
buy: copyParam(`${prefix}.buyCta`, "Buy now"),
|
|
24
24
|
processing: copyParam(`${prefix}.purchaseProcessingText`, "Processing your purchase…"),
|
|
25
25
|
awaitingApproval: copyParam(`${prefix}.purchaseAwaitingApprovalText`, "Waiting for approval"),
|
|
26
26
|
unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
|
|
@@ -490,7 +490,7 @@ function applePurchase(state: S): IapPurchaseFields {
|
|
|
490
490
|
const id = inputId();
|
|
491
491
|
const loaded = !!id && lastLoadedId === id;
|
|
492
492
|
const sellable = SELLS_THROUGH_APPLE && loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
|
|
493
|
-
const copy =
|
|
493
|
+
const copy = iapPurchaseCopy("product");
|
|
494
494
|
const fields = sellable ? productPricing.purchaseFields({ kind: "storesProduct", id }, copy) : NOT_APPLE;
|
|
495
495
|
return fields.appleRoute ? fields : NOT_APPLE;
|
|
496
496
|
}
|
|
@@ -38,6 +38,19 @@ export default defineApp({
|
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
40
|
capabilities: ["live_activity","push","share","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme"],
|
|
41
|
+
cache: {
|
|
42
|
+
"rules": [
|
|
43
|
+
{
|
|
44
|
+
"method": "POST",
|
|
45
|
+
"pathPrefix": "/form-submission-service/v4/submissions",
|
|
46
|
+
"cacheable": false,
|
|
47
|
+
"ttl": 0,
|
|
48
|
+
"swr": 0,
|
|
49
|
+
"tag": "forms",
|
|
50
|
+
"queueOffline": true
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
41
54
|
designTokensPath: "./tokens.json",
|
|
42
55
|
navigation: {
|
|
43
56
|
"navKind": "drawer",
|
|
@@ -111,7 +111,7 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
111
111
|
const classified = classifyForApple(metadata, currency);
|
|
112
112
|
const candidate = platform === "ios" && classified === "appleIap";
|
|
113
113
|
const price = iapPriceFields(commerce.pricing.view(reference), iapPriceCopy(prefix));
|
|
114
|
-
const copy =
|
|
114
|
+
const copy = iapPurchaseCopy(prefix);
|
|
115
115
|
const purchase = commerce.purchaseFields(reference, copy);
|
|
116
116
|
const apple = candidate || (platform === "ios" && classified !== "wixPayments" && purchase.appleRoute);
|
|
117
117
|
const enabled = attendanceCheckoutRoute(metadata, currency, platform) === "appleIap";
|
|
@@ -20,7 +20,7 @@ export function iapPriceCopy(prefix: string): IapPriceCopy {
|
|
|
20
20
|
* `iapPurchaseFields`. Customer copy only: no backend names, ids or diagnostics. */
|
|
21
21
|
export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
|
|
22
22
|
return {
|
|
23
|
-
buy: copyParam(`${prefix}.buyCta`, "
|
|
23
|
+
buy: copyParam(`${prefix}.buyCta`, "Buy now"),
|
|
24
24
|
processing: copyParam(`${prefix}.purchaseProcessingText`, "Processing your purchase…"),
|
|
25
25
|
awaitingApproval: copyParam(`${prefix}.purchaseAwaitingApprovalText`, "Waiting for approval"),
|
|
26
26
|
unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
|
|
@@ -38,6 +38,19 @@ export default defineApp({
|
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
40
|
capabilities: ["live_activity","push","share","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme"],
|
|
41
|
+
cache: {
|
|
42
|
+
"rules": [
|
|
43
|
+
{
|
|
44
|
+
"method": "POST",
|
|
45
|
+
"pathPrefix": "/form-submission-service/v4/submissions",
|
|
46
|
+
"cacheable": false,
|
|
47
|
+
"ttl": 0,
|
|
48
|
+
"swr": 0,
|
|
49
|
+
"tag": "forms",
|
|
50
|
+
"queueOffline": true
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
41
54
|
designTokensPath: "./tokens.json",
|
|
42
55
|
navigation: {
|
|
43
56
|
"navKind": "responsive",
|
|
@@ -20,7 +20,7 @@ export function iapPriceCopy(prefix: string): IapPriceCopy {
|
|
|
20
20
|
* `iapPurchaseFields`. Customer copy only: no backend names, ids or diagnostics. */
|
|
21
21
|
export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
|
|
22
22
|
return {
|
|
23
|
-
buy: copyParam(`${prefix}.buyCta`, "
|
|
23
|
+
buy: copyParam(`${prefix}.buyCta`, "Buy now"),
|
|
24
24
|
processing: copyParam(`${prefix}.purchaseProcessingText`, "Processing your purchase…"),
|
|
25
25
|
awaitingApproval: copyParam(`${prefix}.purchaseAwaitingApprovalText`, "Waiting for approval"),
|
|
26
26
|
unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
|
|
@@ -481,7 +481,7 @@ function applePurchase(state: S): IapPurchaseFields {
|
|
|
481
481
|
const id = inputId();
|
|
482
482
|
const loaded = !!id && lastLoadedId === id;
|
|
483
483
|
const sellable = SELLS_THROUGH_APPLE && loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
|
|
484
|
-
const copy =
|
|
484
|
+
const copy = iapPurchaseCopy("product");
|
|
485
485
|
const fields = sellable ? productPricing.purchaseFields({ kind: "storesProduct", id }, copy) : NOT_APPLE;
|
|
486
486
|
return fields.appleRoute ? fields : NOT_APPLE;
|
|
487
487
|
}
|
|
@@ -38,6 +38,19 @@ export default defineApp({
|
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
40
|
capabilities: ["live_activity","push","share","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme"],
|
|
41
|
+
cache: {
|
|
42
|
+
"rules": [
|
|
43
|
+
{
|
|
44
|
+
"method": "POST",
|
|
45
|
+
"pathPrefix": "/form-submission-service/v4/submissions",
|
|
46
|
+
"cacheable": false,
|
|
47
|
+
"ttl": 0,
|
|
48
|
+
"swr": 0,
|
|
49
|
+
"tag": "forms",
|
|
50
|
+
"queueOffline": true
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
41
54
|
designTokensPath: "./tokens.json",
|
|
42
55
|
navigation: {
|
|
43
56
|
"navKind": "responsive",
|
|
@@ -111,7 +111,7 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
|
|
|
111
111
|
const classified = classifyForApple(metadata, currency);
|
|
112
112
|
const candidate = platform === "ios" && classified === "appleIap";
|
|
113
113
|
const price = iapPriceFields(commerce.pricing.view(reference), iapPriceCopy(prefix));
|
|
114
|
-
const copy =
|
|
114
|
+
const copy = iapPurchaseCopy(prefix);
|
|
115
115
|
const purchase = commerce.purchaseFields(reference, copy);
|
|
116
116
|
const apple = candidate || (platform === "ios" && classified !== "wixPayments" && purchase.appleRoute);
|
|
117
117
|
const enabled = attendanceCheckoutRoute(metadata, currency, platform) === "appleIap";
|
|
@@ -20,7 +20,7 @@ export function iapPriceCopy(prefix: string): IapPriceCopy {
|
|
|
20
20
|
* `iapPurchaseFields`. Customer copy only: no backend names, ids or diagnostics. */
|
|
21
21
|
export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
|
|
22
22
|
return {
|
|
23
|
-
buy: copyParam(`${prefix}.buyCta`, "
|
|
23
|
+
buy: copyParam(`${prefix}.buyCta`, "Buy now"),
|
|
24
24
|
processing: copyParam(`${prefix}.purchaseProcessingText`, "Processing your purchase…"),
|
|
25
25
|
awaitingApproval: copyParam(`${prefix}.purchaseAwaitingApprovalText`, "Waiting for approval"),
|
|
26
26
|
unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// Tier-5 bundle: Wix Spaces clone — Form detail (ON-DEVICE, site-scoped).
|
|
2
|
-
import { defineService } from "@himalaya/state";
|
|
3
|
-
import { getForm, type WixForm } from "@himalaya/wix-forms";
|
|
4
|
-
import { presence, presenceAfterError, detailInputId, type PresenceFlags } from "../_shared/detail-presence.js";
|
|
5
|
-
|
|
6
|
-
interface S extends PresenceFlags { status: "loading" | "ready"; name: string; subtitle: string; fields: string }
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const svc = defineService<S, { load: (s: S) => Promise<S> }>("spacesFormDetail", {
|
|
10
|
-
state: { status: "loading", name: "", subtitle: "", fields: "", ...presence("loading") },
|
|
11
|
-
actions: {
|
|
12
|
-
load: async (s) => {
|
|
13
|
-
const id = detailInputId();
|
|
14
|
-
if (!id) return { ...s, status: "ready", ...presence("missing") };
|
|
15
|
-
try {
|
|
16
|
-
const res = await getForm(id);
|
|
17
|
-
const f = (((res as unknown as { form?: WixForm }).form) ?? (res as unknown as WixForm)) as unknown as {
|
|
18
|
-
name?: string; title?: string;
|
|
19
|
-
fieldsV2?: Array<{ label?: string; inputOptions?: { label?: string } }>;
|
|
20
|
-
fields?: Array<{ label?: string }>;
|
|
21
|
-
};
|
|
22
|
-
const list = (f.fieldsV2 || f.fields || []) as Array<{ label?: string; inputOptions?: { label?: string } }>;
|
|
23
|
-
const fields = list.map((x) => `• ${x.label || x.inputOptions?.label || "Field"}`).join("\n");
|
|
24
|
-
return { status: "ready", name: f.name || f.title || "Form", subtitle: list.length ? `${list.length} fields` : "", fields, ...presence("found") };
|
|
25
|
-
} catch (e) { return { ...s, status: "ready", ...presenceAfterError(e) }; }
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
svc.load();
|
|
30
|
-
export { svc };
|