@wix/himalaya-cli 0.1659.0 → 0.1661.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 (67) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/attendance-classifier.d.ts +3 -1
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/delivery-contract.d.ts +3 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/index.d.ts +7 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +19 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-wire.d.ts +2 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +1 -1
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/apple-iap-contract.d.ts +33 -7
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/commerce-contract.d.ts +4 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-order-backend.d.ts +5 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance-orders.d.ts +10 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance.d.ts +4 -5
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/index.d.ts +13 -3
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/online-programs-orders.d.ts +2 -0
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/online-programs.d.ts +2 -2
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/pricing-plans-orders.d.ts +2 -0
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/pricing-plans.d.ts +4 -2
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/shared.d.ts +3 -1
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/order-refs.d.ts +8 -4
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -1
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -1
  21. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -1
  22. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -1
  23. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +622 -197
  24. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +52 -8
  25. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -1
  26. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -1
  27. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -1
  28. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +500 -119
  29. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -1
  30. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -1
  31. package/dist/browser-plane/assets.json +5 -5
  32. package/dist/browser-plane/preview-deferred/{c04dd5fc5ad48e6b19678d4313159302e9a513ada94bfe515d8dfd5a54d46f5d.bin → fcafca348b6b973cfc2eadc938ddec3c515c641874cbca1667a43b22e1bf7a39.bin} +1 -1
  33. package/dist/browser-plane/sw.js +1 -1
  34. package/dist/cli.mjs +203 -56
  35. package/dist/preview-assets.generated.bin +0 -0
  36. package/guides/himi-json-output.md +26 -1
  37. package/guides/qa-builds.md +27 -4
  38. package/guides/sdk-reference.json +82 -12
  39. package/guides/skill.md +2 -2
  40. package/guides/web-page-sdk-reference.md +1 -1
  41. package/package.json +2 -2
  42. package/templates/beauty-salon/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  43. package/templates/beauty-salon/tier5-src/_shared/iap-worker.ts +2 -0
  44. package/templates/branded-lite/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  45. package/templates/branded-lite/tier5-src/_shared/iap-worker.ts +2 -0
  46. package/templates/community-club/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  47. package/templates/community-club/tier5-src/_shared/iap-worker.ts +2 -0
  48. package/templates/conference/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  49. package/templates/conference/tier5-src/_shared/iap-worker.ts +2 -0
  50. package/templates/events-meetups/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  51. package/templates/events-meetups/tier5-src/_shared/iap-worker.ts +2 -0
  52. package/templates/gym-fitness/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  53. package/templates/gym-fitness/tier5-src/_shared/iap-worker.ts +2 -0
  54. package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  55. package/templates/nonprofit-cause/tier5-src/_shared/iap-worker.ts +2 -0
  56. package/templates/podcast-creator/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  57. package/templates/podcast-creator/tier5-src/_shared/iap-worker.ts +2 -0
  58. package/templates/portfolio-creative/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  59. package/templates/portfolio-creative/tier5-src/_shared/iap-worker.ts +2 -0
  60. package/templates/restaurant/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  61. package/templates/restaurant/tier5-src/_shared/iap-worker.ts +2 -0
  62. package/templates/retail-store/tier5-src/_shared/iap-worker.ts +2 -0
  63. package/templates/salon-spa/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  64. package/templates/salon-spa/tier5-src/_shared/iap-worker.ts +2 -0
  65. package/templates/wholesale-store/tier5-src/_shared/iap-worker.ts +2 -0
  66. package/templates/yoga-studio/tier5-src/_shared/iap-attendance-purchase.ts +6 -1
  67. package/templates/yoga-studio/tier5-src/_shared/iap-worker.ts +2 -0
@@ -26,6 +26,8 @@ export const ATTENDANCE_INITIAL: AttendancePurchaseFields = {
26
26
  };
27
27
  export const ATTENDANCE_NOT_HYDRATED = [...Object.keys(ATTENDANCE_INITIAL), "_poll"] as (keyof AttendancePurchaseFields & string)[];
28
28
 
29
+ const CORRECTABLE = new Set(["orderRefused", "productChanged", "memberDetailsRequired", "bookingNotOwned"]);
30
+
29
31
  export function createAttendancePurchase(options: { kind: "bookingsService" | "eventsTicket"; prefix: string; pollAction: string; onChange(): void }) {
30
32
  const { prefix } = options;
31
33
  let form = createAttendanceForm(prefix);
@@ -187,7 +189,10 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
187
189
  if (reference) {
188
190
  for (const [target, attempt] of attempts) {
189
191
  const item = `${reference.kind}:${reference.id}#${encodeURIComponent(attempt)}`;
190
- const canCorrect = state.phase === "cancelled" || (state.phase === "refused" && (state.failure === "orderRefused" || state.failure === "productChanged"));
192
+ // Refusals that leave nothing to pay: the member may fix the details (a profile, a booking the
193
+ // server did not attribute to them) and start a fresh attempt. A transient failure keeps the
194
+ // attempt, so its next tap reopens the same order instead of booking twice.
195
+ const canCorrect = state.phase === "cancelled" || (state.phase === "refused" && CORRECTABLE.has(state.failure ?? ""));
191
196
  if (canCorrect && state.item === item) { attempts.delete(target); submittedForms.delete(`${reference.kind}:${reference.id}`); }
192
197
  }
193
198
  const referencePrefix = `${reference.kind}:${reference.id}:`;
@@ -27,6 +27,8 @@ export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
27
27
  unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
28
28
  signInRequired: copyParam(`${prefix}.purchaseSignInText`, "Sign in to buy."),
29
29
  sitePaymentUnavailable: paymentSetupMessage(prefix),
30
+ memberDetailsRequired: copyParam(`${prefix}.purchaseMemberDetailsText`, "Add your first name, last name and email to your profile, then try again."),
31
+ alreadySubscribed: copyParam(`${prefix}.purchaseAlreadySubscribedText`, "You already have a subscription in this app."),
30
32
  retry: copyParam(`${prefix}.purchaseRetryText`, "Something went wrong. Try again."),
31
33
  priceChanged: copyParam(`${prefix}.purchasePriceChangedText`, "The price changed. Check it and try again."),
32
34
  support: copyParam(`${prefix}.purchaseSupportText`, "We couldn't finish this purchase. Contact support."),
@@ -26,6 +26,8 @@ export const ATTENDANCE_INITIAL: AttendancePurchaseFields = {
26
26
  };
27
27
  export const ATTENDANCE_NOT_HYDRATED = [...Object.keys(ATTENDANCE_INITIAL), "_poll"] as (keyof AttendancePurchaseFields & string)[];
28
28
 
29
+ const CORRECTABLE = new Set(["orderRefused", "productChanged", "memberDetailsRequired", "bookingNotOwned"]);
30
+
29
31
  export function createAttendancePurchase(options: { kind: "bookingsService" | "eventsTicket"; prefix: string; pollAction: string; onChange(): void }) {
30
32
  const { prefix } = options;
31
33
  let form = createAttendanceForm(prefix);
@@ -187,7 +189,10 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
187
189
  if (reference) {
188
190
  for (const [target, attempt] of attempts) {
189
191
  const item = `${reference.kind}:${reference.id}#${encodeURIComponent(attempt)}`;
190
- const canCorrect = state.phase === "cancelled" || (state.phase === "refused" && (state.failure === "orderRefused" || state.failure === "productChanged"));
192
+ // Refusals that leave nothing to pay: the member may fix the details (a profile, a booking the
193
+ // server did not attribute to them) and start a fresh attempt. A transient failure keeps the
194
+ // attempt, so its next tap reopens the same order instead of booking twice.
195
+ const canCorrect = state.phase === "cancelled" || (state.phase === "refused" && CORRECTABLE.has(state.failure ?? ""));
191
196
  if (canCorrect && state.item === item) { attempts.delete(target); submittedForms.delete(`${reference.kind}:${reference.id}`); }
192
197
  }
193
198
  const referencePrefix = `${reference.kind}:${reference.id}:`;
@@ -27,6 +27,8 @@ export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
27
27
  unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
28
28
  signInRequired: copyParam(`${prefix}.purchaseSignInText`, "Sign in to buy."),
29
29
  sitePaymentUnavailable: paymentSetupMessage(prefix),
30
+ memberDetailsRequired: copyParam(`${prefix}.purchaseMemberDetailsText`, "Add your first name, last name and email to your profile, then try again."),
31
+ alreadySubscribed: copyParam(`${prefix}.purchaseAlreadySubscribedText`, "You already have a subscription in this app."),
30
32
  retry: copyParam(`${prefix}.purchaseRetryText`, "Something went wrong. Try again."),
31
33
  priceChanged: copyParam(`${prefix}.purchasePriceChangedText`, "The price changed. Check it and try again."),
32
34
  support: copyParam(`${prefix}.purchaseSupportText`, "We couldn't finish this purchase. Contact support."),
@@ -26,6 +26,8 @@ export const ATTENDANCE_INITIAL: AttendancePurchaseFields = {
26
26
  };
27
27
  export const ATTENDANCE_NOT_HYDRATED = [...Object.keys(ATTENDANCE_INITIAL), "_poll"] as (keyof AttendancePurchaseFields & string)[];
28
28
 
29
+ const CORRECTABLE = new Set(["orderRefused", "productChanged", "memberDetailsRequired", "bookingNotOwned"]);
30
+
29
31
  export function createAttendancePurchase(options: { kind: "bookingsService" | "eventsTicket"; prefix: string; pollAction: string; onChange(): void }) {
30
32
  const { prefix } = options;
31
33
  let form = createAttendanceForm(prefix);
@@ -187,7 +189,10 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
187
189
  if (reference) {
188
190
  for (const [target, attempt] of attempts) {
189
191
  const item = `${reference.kind}:${reference.id}#${encodeURIComponent(attempt)}`;
190
- const canCorrect = state.phase === "cancelled" || (state.phase === "refused" && (state.failure === "orderRefused" || state.failure === "productChanged"));
192
+ // Refusals that leave nothing to pay: the member may fix the details (a profile, a booking the
193
+ // server did not attribute to them) and start a fresh attempt. A transient failure keeps the
194
+ // attempt, so its next tap reopens the same order instead of booking twice.
195
+ const canCorrect = state.phase === "cancelled" || (state.phase === "refused" && CORRECTABLE.has(state.failure ?? ""));
191
196
  if (canCorrect && state.item === item) { attempts.delete(target); submittedForms.delete(`${reference.kind}:${reference.id}`); }
192
197
  }
193
198
  const referencePrefix = `${reference.kind}:${reference.id}:`;
@@ -27,6 +27,8 @@ export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
27
27
  unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
28
28
  signInRequired: copyParam(`${prefix}.purchaseSignInText`, "Sign in to buy."),
29
29
  sitePaymentUnavailable: paymentSetupMessage(prefix),
30
+ memberDetailsRequired: copyParam(`${prefix}.purchaseMemberDetailsText`, "Add your first name, last name and email to your profile, then try again."),
31
+ alreadySubscribed: copyParam(`${prefix}.purchaseAlreadySubscribedText`, "You already have a subscription in this app."),
30
32
  retry: copyParam(`${prefix}.purchaseRetryText`, "Something went wrong. Try again."),
31
33
  priceChanged: copyParam(`${prefix}.purchasePriceChangedText`, "The price changed. Check it and try again."),
32
34
  support: copyParam(`${prefix}.purchaseSupportText`, "We couldn't finish this purchase. Contact support."),
@@ -27,6 +27,8 @@ export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
27
27
  unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
28
28
  signInRequired: copyParam(`${prefix}.purchaseSignInText`, "Sign in to buy."),
29
29
  sitePaymentUnavailable: paymentSetupMessage(prefix),
30
+ memberDetailsRequired: copyParam(`${prefix}.purchaseMemberDetailsText`, "Add your first name, last name and email to your profile, then try again."),
31
+ alreadySubscribed: copyParam(`${prefix}.purchaseAlreadySubscribedText`, "You already have a subscription in this app."),
30
32
  retry: copyParam(`${prefix}.purchaseRetryText`, "Something went wrong. Try again."),
31
33
  priceChanged: copyParam(`${prefix}.purchasePriceChangedText`, "The price changed. Check it and try again."),
32
34
  support: copyParam(`${prefix}.purchaseSupportText`, "We couldn't finish this purchase. Contact support."),
@@ -26,6 +26,8 @@ export const ATTENDANCE_INITIAL: AttendancePurchaseFields = {
26
26
  };
27
27
  export const ATTENDANCE_NOT_HYDRATED = [...Object.keys(ATTENDANCE_INITIAL), "_poll"] as (keyof AttendancePurchaseFields & string)[];
28
28
 
29
+ const CORRECTABLE = new Set(["orderRefused", "productChanged", "memberDetailsRequired", "bookingNotOwned"]);
30
+
29
31
  export function createAttendancePurchase(options: { kind: "bookingsService" | "eventsTicket"; prefix: string; pollAction: string; onChange(): void }) {
30
32
  const { prefix } = options;
31
33
  let form = createAttendanceForm(prefix);
@@ -187,7 +189,10 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
187
189
  if (reference) {
188
190
  for (const [target, attempt] of attempts) {
189
191
  const item = `${reference.kind}:${reference.id}#${encodeURIComponent(attempt)}`;
190
- const canCorrect = state.phase === "cancelled" || (state.phase === "refused" && (state.failure === "orderRefused" || state.failure === "productChanged"));
192
+ // Refusals that leave nothing to pay: the member may fix the details (a profile, a booking the
193
+ // server did not attribute to them) and start a fresh attempt. A transient failure keeps the
194
+ // attempt, so its next tap reopens the same order instead of booking twice.
195
+ const canCorrect = state.phase === "cancelled" || (state.phase === "refused" && CORRECTABLE.has(state.failure ?? ""));
191
196
  if (canCorrect && state.item === item) { attempts.delete(target); submittedForms.delete(`${reference.kind}:${reference.id}`); }
192
197
  }
193
198
  const referencePrefix = `${reference.kind}:${reference.id}:`;
@@ -27,6 +27,8 @@ export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
27
27
  unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
28
28
  signInRequired: copyParam(`${prefix}.purchaseSignInText`, "Sign in to buy."),
29
29
  sitePaymentUnavailable: paymentSetupMessage(prefix),
30
+ memberDetailsRequired: copyParam(`${prefix}.purchaseMemberDetailsText`, "Add your first name, last name and email to your profile, then try again."),
31
+ alreadySubscribed: copyParam(`${prefix}.purchaseAlreadySubscribedText`, "You already have a subscription in this app."),
30
32
  retry: copyParam(`${prefix}.purchaseRetryText`, "Something went wrong. Try again."),
31
33
  priceChanged: copyParam(`${prefix}.purchasePriceChangedText`, "The price changed. Check it and try again."),
32
34
  support: copyParam(`${prefix}.purchaseSupportText`, "We couldn't finish this purchase. Contact support."),
@@ -27,6 +27,8 @@ export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
27
27
  unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
28
28
  signInRequired: copyParam(`${prefix}.purchaseSignInText`, "Sign in to buy."),
29
29
  sitePaymentUnavailable: paymentSetupMessage(prefix),
30
+ memberDetailsRequired: copyParam(`${prefix}.purchaseMemberDetailsText`, "Add your first name, last name and email to your profile, then try again."),
31
+ alreadySubscribed: copyParam(`${prefix}.purchaseAlreadySubscribedText`, "You already have a subscription in this app."),
30
32
  retry: copyParam(`${prefix}.purchaseRetryText`, "Something went wrong. Try again."),
31
33
  priceChanged: copyParam(`${prefix}.purchasePriceChangedText`, "The price changed. Check it and try again."),
32
34
  support: copyParam(`${prefix}.purchaseSupportText`, "We couldn't finish this purchase. Contact support."),
@@ -26,6 +26,8 @@ export const ATTENDANCE_INITIAL: AttendancePurchaseFields = {
26
26
  };
27
27
  export const ATTENDANCE_NOT_HYDRATED = [...Object.keys(ATTENDANCE_INITIAL), "_poll"] as (keyof AttendancePurchaseFields & string)[];
28
28
 
29
+ const CORRECTABLE = new Set(["orderRefused", "productChanged", "memberDetailsRequired", "bookingNotOwned"]);
30
+
29
31
  export function createAttendancePurchase(options: { kind: "bookingsService" | "eventsTicket"; prefix: string; pollAction: string; onChange(): void }) {
30
32
  const { prefix } = options;
31
33
  let form = createAttendanceForm(prefix);
@@ -187,7 +189,10 @@ export function createAttendancePurchase(options: { kind: "bookingsService" | "e
187
189
  if (reference) {
188
190
  for (const [target, attempt] of attempts) {
189
191
  const item = `${reference.kind}:${reference.id}#${encodeURIComponent(attempt)}`;
190
- const canCorrect = state.phase === "cancelled" || (state.phase === "refused" && (state.failure === "orderRefused" || state.failure === "productChanged"));
192
+ // Refusals that leave nothing to pay: the member may fix the details (a profile, a booking the
193
+ // server did not attribute to them) and start a fresh attempt. A transient failure keeps the
194
+ // attempt, so its next tap reopens the same order instead of booking twice.
195
+ const canCorrect = state.phase === "cancelled" || (state.phase === "refused" && CORRECTABLE.has(state.failure ?? ""));
191
196
  if (canCorrect && state.item === item) { attempts.delete(target); submittedForms.delete(`${reference.kind}:${reference.id}`); }
192
197
  }
193
198
  const referencePrefix = `${reference.kind}:${reference.id}:`;
@@ -27,6 +27,8 @@ export function iapPurchaseCopy(prefix: string): IapPurchaseCopy {
27
27
  unavailable: copyParam(`${prefix}.purchaseTemporarilyUnavailableText`, "Purchasing is temporarily unavailable."),
28
28
  signInRequired: copyParam(`${prefix}.purchaseSignInText`, "Sign in to buy."),
29
29
  sitePaymentUnavailable: paymentSetupMessage(prefix),
30
+ memberDetailsRequired: copyParam(`${prefix}.purchaseMemberDetailsText`, "Add your first name, last name and email to your profile, then try again."),
31
+ alreadySubscribed: copyParam(`${prefix}.purchaseAlreadySubscribedText`, "You already have a subscription in this app."),
30
32
  retry: copyParam(`${prefix}.purchaseRetryText`, "Something went wrong. Try again."),
31
33
  priceChanged: copyParam(`${prefix}.purchasePriceChangedText`, "The price changed. Check it and try again."),
32
34
  support: copyParam(`${prefix}.purchaseSupportText`, "We couldn't finish this purchase. Contact support."),