@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.
Files changed (64) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +3 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +2 -2
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/apple-iap-contract.d.ts +24 -2
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/order-refs.d.ts +12 -3
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forms/src/extensions.d.ts +83 -1
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +146 -23
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +8 -5
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +147 -24
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forms.mjs +19 -0
  10. package/dist/cli.mjs +2455 -2166
  11. package/fixtures/wix-canned.json +14 -7
  12. package/guides/getting-started.md +17 -1
  13. package/guides/headless-loop.md +7 -1
  14. package/guides/himi-skill.md +17 -1
  15. package/guides/himi-test.md +95 -7
  16. package/guides/iap-pricing.md +1 -1
  17. package/guides/iap-products.md +2 -2
  18. package/guides/iap-screen-adoption.md +1 -1
  19. package/guides/index.json +1 -1
  20. package/guides/sdk-reference.json +82 -4
  21. package/guides/skill.md +16 -0
  22. package/package.json +2 -2
  23. package/templates/beauty-salon/config.ts +13 -0
  24. package/templates/beauty-salon/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
  25. package/templates/beauty-salon/tier5-src/_shared/iap-worker.ts +1 -1
  26. package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +1 -1
  27. package/templates/branded-lite/config.ts +13 -0
  28. package/templates/branded-lite/dev/index.ts +1338 -2011
  29. package/templates/branded-lite/tier5-src/_shared/branded-form.ts +262 -0
  30. package/templates/branded-lite/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
  31. package/templates/branded-lite/tier5-src/_shared/iap-worker.ts +1 -1
  32. package/templates/branded-lite/tier5-src/himi-branded-lite-form/index.ts +399 -0
  33. package/templates/branded-lite/tier5-src/himi-branded-lite-forms/index.ts +22 -7
  34. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +1 -1
  35. package/templates/community-club/config.ts +13 -0
  36. package/templates/community-club/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
  37. package/templates/community-club/tier5-src/_shared/iap-worker.ts +1 -1
  38. package/templates/events-meetups/config.ts +13 -0
  39. package/templates/events-meetups/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
  40. package/templates/events-meetups/tier5-src/_shared/iap-worker.ts +1 -1
  41. package/templates/gym-fitness/config.ts +13 -0
  42. package/templates/gym-fitness/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
  43. package/templates/gym-fitness/tier5-src/_shared/iap-worker.ts +1 -1
  44. package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +1 -1
  45. package/templates/nonprofit-cause/config.ts +13 -0
  46. package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
  47. package/templates/nonprofit-cause/tier5-src/_shared/iap-worker.ts +1 -1
  48. package/templates/podcast-creator/config.ts +13 -0
  49. package/templates/podcast-creator/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
  50. package/templates/podcast-creator/tier5-src/_shared/iap-worker.ts +1 -1
  51. package/templates/portfolio-creative/config.ts +13 -0
  52. package/templates/portfolio-creative/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
  53. package/templates/portfolio-creative/tier5-src/_shared/iap-worker.ts +1 -1
  54. package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +1 -1
  55. package/templates/restaurant/config.ts +13 -0
  56. package/templates/restaurant/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
  57. package/templates/restaurant/tier5-src/_shared/iap-worker.ts +1 -1
  58. package/templates/retail-store/config.ts +13 -0
  59. package/templates/retail-store/tier5-src/_shared/iap-worker.ts +1 -1
  60. package/templates/retail-store/tier5-src/himi-store-product/index.ts +1 -1
  61. package/templates/yoga-studio/config.ts +13 -0
  62. package/templates/yoga-studio/tier5-src/_shared/iap-attendance-purchase.ts +1 -1
  63. package/templates/yoga-studio/tier5-src/_shared/iap-worker.ts +1 -1
  64. 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`, "Get access"),
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 = { ...iapPurchaseCopy(prefix), buy: copyParam(`${prefix}.appleBuyCta`, options.kind === "bookingsService" ? "Book with Apple" : "Buy ticket with Apple"), buyAnother: copyParam(`${prefix}.buyAnotherCta`, options.kind === "bookingsService" ? "Book again" : "Buy another ticket") };
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`, "Get access"),
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 = { ...iapPurchaseCopy(prefix), buy: copyParam(`${prefix}.appleBuyCta`, options.kind === "bookingsService" ? "Book with Apple" : "Buy ticket with Apple"), buyAnother: copyParam(`${prefix}.buyAnotherCta`, options.kind === "bookingsService" ? "Book again" : "Buy another ticket") };
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`, "Get access"),
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 = { ...iapPurchaseCopy("product"), buy: copyParam("product.buyCta", "Buy") };
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 = { ...iapPurchaseCopy(prefix), buy: copyParam(`${prefix}.appleBuyCta`, options.kind === "bookingsService" ? "Book with Apple" : "Buy ticket with Apple"), buyAnother: copyParam(`${prefix}.buyAnotherCta`, options.kind === "bookingsService" ? "Book again" : "Buy another ticket") };
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`, "Get access"),
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`, "Get access"),
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 = { ...iapPurchaseCopy("product"), buy: copyParam("product.buyCta", "Buy") };
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 = { ...iapPurchaseCopy(prefix), buy: copyParam(`${prefix}.appleBuyCta`, options.kind === "bookingsService" ? "Book with Apple" : "Buy ticket with Apple"), buyAnother: copyParam(`${prefix}.buyAnotherCta`, options.kind === "bookingsService" ? "Book again" : "Buy another ticket") };
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`, "Get access"),
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 };