@wix/himalaya-cli 0.1496.0 → 0.1498.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 (138) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/attendance-classifier.d.ts +37 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/catalog-pricing-contract.d.ts +1 -1
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/index.d.ts +2 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +11 -3
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/apple-iap-contract.d.ts +27 -3
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/commerce-contract.d.ts +1 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance.d.ts +10 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/index.d.ts +1 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/index.d.ts +1 -1
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +33 -2
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +346 -26
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +132 -3
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +366 -48
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +5 -0
  15. package/dist/cli.mjs +817 -666
  16. package/guides/iap-products.md +7 -1
  17. package/package.json +2 -2
  18. package/templates/beauty-salon/dev/index.ts +394 -0
  19. package/templates/beauty-salon/tier5-src/_shared/iap-attendance-form.ts +106 -0
  20. package/templates/beauty-salon/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  21. package/templates/beauty-salon/tier5-src/_shared/iap-attendance.ts +38 -0
  22. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +52 -7
  23. package/templates/beauty-salon-owner/dev/index.ts +571 -0
  24. package/templates/beauty-salon-owner/himalaya.content.json +6 -0
  25. package/templates/beauty-salon-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  26. package/templates/beauty-salon-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  27. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  28. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  29. package/templates/branded-lite/dev/index.ts +1429 -278
  30. package/templates/branded-lite/tier5-src/_shared/business-chat-presenter.ts +46 -8
  31. package/templates/branded-lite/tier5-src/_shared/iap-attendance-form.ts +106 -0
  32. package/templates/branded-lite/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  33. package/templates/branded-lite/tier5-src/_shared/iap-attendance.ts +38 -0
  34. package/templates/branded-lite/tier5-src/business-chat/index.ts +3 -2
  35. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +52 -7
  36. package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +112 -21
  37. package/templates/community-club/dev/index.ts +397 -2
  38. package/templates/community-club/tier5-src/_shared/iap-attendance-form.ts +106 -0
  39. package/templates/community-club/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  40. package/templates/community-club/tier5-src/_shared/iap-attendance.ts +38 -0
  41. package/templates/community-club/tier5-src/himi-events-detail/index.ts +112 -21
  42. package/templates/community-club-owner/dev/index.ts +571 -0
  43. package/templates/community-club-owner/himalaya.content.json +6 -0
  44. package/templates/community-club-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  45. package/templates/community-club-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  46. package/templates/community-club-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  47. package/templates/community-club-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  48. package/templates/events-meetups/dev/index.ts +397 -2
  49. package/templates/events-meetups/tier5-src/_shared/iap-attendance-form.ts +106 -0
  50. package/templates/events-meetups/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  51. package/templates/events-meetups/tier5-src/_shared/iap-attendance.ts +38 -0
  52. package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +112 -21
  53. package/templates/events-meetups-owner/dev/index.ts +571 -0
  54. package/templates/events-meetups-owner/himalaya.content.json +6 -0
  55. package/templates/events-meetups-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  56. package/templates/events-meetups-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  57. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  58. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  59. package/templates/gym-fitness/dev/index.ts +828 -39
  60. package/templates/gym-fitness/tier5-src/_shared/iap-attendance-form.ts +106 -0
  61. package/templates/gym-fitness/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  62. package/templates/gym-fitness/tier5-src/_shared/iap-attendance.ts +38 -0
  63. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +52 -7
  64. package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +112 -21
  65. package/templates/gym-fitness-owner/dev/index.ts +571 -0
  66. package/templates/gym-fitness-owner/himalaya.content.json +6 -0
  67. package/templates/gym-fitness-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  68. package/templates/gym-fitness-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  69. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  70. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  71. package/templates/nonprofit-cause/dev/index.ts +397 -2
  72. package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance-form.ts +106 -0
  73. package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  74. package/templates/nonprofit-cause/tier5-src/_shared/iap-attendance.ts +38 -0
  75. package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +112 -21
  76. package/templates/nonprofit-cause-owner/dev/index.ts +571 -0
  77. package/templates/nonprofit-cause-owner/himalaya.content.json +6 -0
  78. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  79. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  80. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  81. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  82. package/templates/owner-lite/dev/index.ts +571 -0
  83. package/templates/owner-lite/himalaya.content.json +6 -0
  84. package/templates/owner-lite/tier5-src/_shared/owner-today-rollup.ts +307 -0
  85. package/templates/owner-lite/tier5-src/_shared/owner-widget-reads.ts +23 -0
  86. package/templates/owner-lite/tier5-src/himi-owner-lite-today/index.ts +8 -20
  87. package/templates/owner-lite/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  88. package/templates/podcast-creator/dev/index.ts +397 -2
  89. package/templates/podcast-creator/tier5-src/_shared/iap-attendance-form.ts +106 -0
  90. package/templates/podcast-creator/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  91. package/templates/podcast-creator/tier5-src/_shared/iap-attendance.ts +38 -0
  92. package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +112 -21
  93. package/templates/podcast-creator-owner/dev/index.ts +571 -0
  94. package/templates/podcast-creator-owner/himalaya.content.json +6 -0
  95. package/templates/podcast-creator-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  96. package/templates/podcast-creator-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  97. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  98. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  99. package/templates/portfolio-creative/dev/index.ts +397 -2
  100. package/templates/portfolio-creative/tier5-src/_shared/iap-attendance-form.ts +106 -0
  101. package/templates/portfolio-creative/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  102. package/templates/portfolio-creative/tier5-src/_shared/iap-attendance.ts +38 -0
  103. package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +112 -21
  104. package/templates/portfolio-creative-owner/dev/index.ts +571 -0
  105. package/templates/portfolio-creative-owner/himalaya.content.json +6 -0
  106. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  107. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  108. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  109. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  110. package/templates/restaurant/dev/index.ts +397 -2
  111. package/templates/restaurant/tier5-src/_shared/iap-attendance-form.ts +106 -0
  112. package/templates/restaurant/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  113. package/templates/restaurant/tier5-src/_shared/iap-attendance.ts +38 -0
  114. package/templates/restaurant/tier5-src/himi-events-detail/index.ts +112 -21
  115. package/templates/restaurant-owner/dev/index.ts +571 -0
  116. package/templates/restaurant-owner/himalaya.content.json +6 -0
  117. package/templates/restaurant-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  118. package/templates/restaurant-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  119. package/templates/restaurant-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  120. package/templates/restaurant-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  121. package/templates/retail-store-owner/dev/index.ts +571 -0
  122. package/templates/retail-store-owner/himalaya.content.json +6 -0
  123. package/templates/retail-store-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  124. package/templates/retail-store-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  125. package/templates/retail-store-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  126. package/templates/retail-store-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
  127. package/templates/yoga-studio/dev/index.ts +828 -39
  128. package/templates/yoga-studio/tier5-src/_shared/iap-attendance-form.ts +106 -0
  129. package/templates/yoga-studio/tier5-src/_shared/iap-attendance-purchase.ts +211 -0
  130. package/templates/yoga-studio/tier5-src/_shared/iap-attendance.ts +38 -0
  131. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +52 -7
  132. package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +112 -21
  133. package/templates/yoga-studio-owner/dev/index.ts +571 -0
  134. package/templates/yoga-studio-owner/himalaya.content.json +6 -0
  135. package/templates/yoga-studio-owner/tier5-src/_shared/owner-today-rollup.ts +307 -0
  136. package/templates/yoga-studio-owner/tier5-src/_shared/owner-widget-reads.ts +23 -0
  137. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-today/index.ts +8 -20
  138. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-today-rollup/index.ts +121 -0
@@ -21608,6 +21608,398 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
21608
21608
  "hiddenPath": "$service:himiEventDetail.hideTierPicker"
21609
21609
  }
21610
21610
  },
21611
+ {
21612
+ "id": "",
21613
+ "body": {
21614
+ "package": "himalaya",
21615
+ "type": "VStack",
21616
+ "props": {
21617
+ "spacing": 12,
21618
+ "alignment": "leading",
21619
+ "children": [
21620
+ {
21621
+ "id": "",
21622
+ "body": {
21623
+ "package": "himalaya",
21624
+ "type": "Text",
21625
+ "props": {
21626
+ "text": "$service:himiEventDetail.iapPrice",
21627
+ "style": "bodyEmphasis",
21628
+ "collapseWhenEmpty": true
21629
+ }
21630
+ }
21631
+ },
21632
+ {
21633
+ "id": "himi_event.apple.form",
21634
+ "body": {
21635
+ "package": "himalaya",
21636
+ "type": "Grid",
21637
+ "props": {
21638
+ "columns": 1,
21639
+ "spacing": 12,
21640
+ "itemsPath": "$service:himiEventDetail.iapFields",
21641
+ "items": [
21642
+ {
21643
+ "id": "",
21644
+ "body": {
21645
+ "package": "himalaya",
21646
+ "type": "VStack",
21647
+ "props": {
21648
+ "spacing": 8,
21649
+ "alignment": "leading",
21650
+ "children": [
21651
+ {
21652
+ "id": "",
21653
+ "body": {
21654
+ "package": "himalaya",
21655
+ "type": "Text",
21656
+ "props": {
21657
+ "text": "$item.sectionLabel",
21658
+ "style": "bodyEmphasis",
21659
+ "collapseWhenEmpty": true
21660
+ }
21661
+ }
21662
+ },
21663
+ {
21664
+ "id": "",
21665
+ "body": {
21666
+ "package": "himalaya",
21667
+ "type": "Text",
21668
+ "props": {
21669
+ "text": "$item.label",
21670
+ "style": "footnote"
21671
+ }
21672
+ }
21673
+ },
21674
+ {
21675
+ "id": "himi_event.apple.input.$item.id",
21676
+ "body": {
21677
+ "package": "himalaya",
21678
+ "type": "FragmentSlot",
21679
+ "props": {
21680
+ "casePath": "$item.kind",
21681
+ "defaultCase": "text",
21682
+ "cases": [
21683
+ {
21684
+ "id": "text",
21685
+ "content": {
21686
+ "id": "himi_event.apple.field.text.$item.id",
21687
+ "body": {
21688
+ "package": "himalaya",
21689
+ "type": "TextField",
21690
+ "props": {
21691
+ "placeholder": "$item.inputLabel",
21692
+ "value": "$item.value",
21693
+ "onChange": {
21694
+ "actionId": "tier5.himiEventDetail.setIapField",
21695
+ "params": {
21696
+ "id": "$item.fieldId"
21697
+ }
21698
+ },
21699
+ "validation": {},
21700
+ "errorText": "$item.error",
21701
+ "autoCapitalization": "words"
21702
+ }
21703
+ }
21704
+ }
21705
+ },
21706
+ {
21707
+ "id": "requiredText",
21708
+ "content": {
21709
+ "id": "himi_event.apple.field.requiredText.$item.id",
21710
+ "body": {
21711
+ "package": "himalaya",
21712
+ "type": "TextField",
21713
+ "props": {
21714
+ "placeholder": "$item.inputLabel",
21715
+ "value": "$item.value",
21716
+ "onChange": {
21717
+ "actionId": "tier5.himiEventDetail.setIapField",
21718
+ "params": {
21719
+ "id": "$item.fieldId"
21720
+ }
21721
+ },
21722
+ "validation": {
21723
+ "required": true
21724
+ },
21725
+ "errorText": "$item.error",
21726
+ "autoCapitalization": "words"
21727
+ }
21728
+ }
21729
+ }
21730
+ },
21731
+ {
21732
+ "id": "email",
21733
+ "content": {
21734
+ "id": "himi_event.apple.field.email.$item.id",
21735
+ "body": {
21736
+ "package": "himalaya",
21737
+ "type": "TextField",
21738
+ "props": {
21739
+ "placeholder": "$item.inputLabel",
21740
+ "value": "$item.value",
21741
+ "onChange": {
21742
+ "actionId": "tier5.himiEventDetail.setIapField",
21743
+ "params": {
21744
+ "id": "$item.fieldId"
21745
+ }
21746
+ },
21747
+ "validation": {
21748
+ "required": true,
21749
+ "type": "email"
21750
+ },
21751
+ "errorText": "$item.error",
21752
+ "autoCapitalization": "none"
21753
+ }
21754
+ }
21755
+ }
21756
+ },
21757
+ {
21758
+ "id": "number",
21759
+ "content": {
21760
+ "id": "himi_event.apple.field.number.$item.id",
21761
+ "body": {
21762
+ "package": "himalaya",
21763
+ "type": "TextField",
21764
+ "props": {
21765
+ "placeholder": "$item.inputLabel",
21766
+ "value": "$item.value",
21767
+ "onChange": {
21768
+ "actionId": "tier5.himiEventDetail.setIapField",
21769
+ "params": {
21770
+ "id": "$item.fieldId"
21771
+ }
21772
+ },
21773
+ "validation": {
21774
+ "type": "number"
21775
+ },
21776
+ "errorText": "$item.error",
21777
+ "autoCapitalization": "words"
21778
+ }
21779
+ }
21780
+ }
21781
+ },
21782
+ {
21783
+ "id": "choice",
21784
+ "content": {
21785
+ "id": "",
21786
+ "body": {
21787
+ "package": "himalaya",
21788
+ "type": "VStack",
21789
+ "props": {
21790
+ "spacing": 4,
21791
+ "children": [
21792
+ {
21793
+ "id": "himi_event.apple.options.choice",
21794
+ "body": {
21795
+ "package": "himalaya",
21796
+ "type": "Grid",
21797
+ "props": {
21798
+ "columns": 1,
21799
+ "spacing": 8,
21800
+ "itemsPath": "$item.options",
21801
+ "items": [
21802
+ {
21803
+ "id": "himi_event.apple.option.choice.$item.fieldId.$item.id",
21804
+ "body": {
21805
+ "package": "himalaya",
21806
+ "type": "Button",
21807
+ "props": {
21808
+ "title": "$item.displayLabel",
21809
+ "style": "secondary",
21810
+ "fullWidth": true,
21811
+ "action": {
21812
+ "actionId": "tier5.himiEventDetail.setIapField",
21813
+ "params": {
21814
+ "id": "$item.fieldId",
21815
+ "option": "$item.id"
21816
+ }
21817
+ }
21818
+ }
21819
+ }
21820
+ }
21821
+ ]
21822
+ }
21823
+ }
21824
+ },
21825
+ {
21826
+ "id": "",
21827
+ "body": {
21828
+ "package": "himalaya",
21829
+ "type": "FieldError",
21830
+ "props": {
21831
+ "text": "$item.error"
21832
+ }
21833
+ },
21834
+ "modifiers": {
21835
+ "hiddenPath": "$item.errorHidden"
21836
+ }
21837
+ }
21838
+ ]
21839
+ }
21840
+ }
21841
+ }
21842
+ },
21843
+ {
21844
+ "id": "multiple",
21845
+ "content": {
21846
+ "id": "",
21847
+ "body": {
21848
+ "package": "himalaya",
21849
+ "type": "VStack",
21850
+ "props": {
21851
+ "spacing": 4,
21852
+ "children": [
21853
+ {
21854
+ "id": "himi_event.apple.options.multiple",
21855
+ "body": {
21856
+ "package": "himalaya",
21857
+ "type": "Grid",
21858
+ "props": {
21859
+ "columns": 1,
21860
+ "spacing": 8,
21861
+ "itemsPath": "$item.options",
21862
+ "items": [
21863
+ {
21864
+ "id": "himi_event.apple.option.multiple.$item.fieldId.$item.id",
21865
+ "body": {
21866
+ "package": "himalaya",
21867
+ "type": "Button",
21868
+ "props": {
21869
+ "title": "$item.displayLabel",
21870
+ "style": "secondary",
21871
+ "fullWidth": true,
21872
+ "action": {
21873
+ "actionId": "tier5.himiEventDetail.setIapField",
21874
+ "params": {
21875
+ "id": "$item.fieldId",
21876
+ "option": "$item.id"
21877
+ }
21878
+ }
21879
+ }
21880
+ }
21881
+ }
21882
+ ]
21883
+ }
21884
+ }
21885
+ },
21886
+ {
21887
+ "id": "",
21888
+ "body": {
21889
+ "package": "himalaya",
21890
+ "type": "FieldError",
21891
+ "props": {
21892
+ "text": "$item.error"
21893
+ }
21894
+ },
21895
+ "modifiers": {
21896
+ "hiddenPath": "$item.errorHidden"
21897
+ }
21898
+ }
21899
+ ]
21900
+ }
21901
+ }
21902
+ }
21903
+ }
21904
+ ]
21905
+ }
21906
+ }
21907
+ }
21908
+ ]
21909
+ }
21910
+ }
21911
+ }
21912
+ ]
21913
+ }
21914
+ },
21915
+ "modifiers": {
21916
+ "hiddenPath": "$service:himiEventDetail.iapFormHidden"
21917
+ }
21918
+ },
21919
+ {
21920
+ "id": "",
21921
+ "body": {
21922
+ "package": "himalaya",
21923
+ "type": "FieldError",
21924
+ "props": {
21925
+ "text": "",
21926
+ "textPath": "$service:himiEventDetail.iapFormError"
21927
+ }
21928
+ }
21929
+ },
21930
+ {
21931
+ "id": "himi_event.apple.buy",
21932
+ "body": {
21933
+ "package": "himalaya",
21934
+ "type": "Button",
21935
+ "props": {
21936
+ "title": "$service:himiEventDetail.iapBuyLabel",
21937
+ "disabledPath": "$service:himiEventDetail.iapBuyDisabled",
21938
+ "style": "primary",
21939
+ "fullWidth": true,
21940
+ "action": {
21941
+ "actionId": "tier5.himiEventDetail.buyApple"
21942
+ }
21943
+ }
21944
+ }
21945
+ },
21946
+ {
21947
+ "id": "",
21948
+ "body": {
21949
+ "package": "himalaya",
21950
+ "type": "Text",
21951
+ "props": {
21952
+ "text": "$service:himiEventDetail.iapNote",
21953
+ "style": "footnote",
21954
+ "color": "textSecondary",
21955
+ "collapseWhenEmpty": true
21956
+ }
21957
+ }
21958
+ },
21959
+ {
21960
+ "id": "himi_event.apple.signin",
21961
+ "body": {
21962
+ "package": "himalaya",
21963
+ "type": "Button",
21964
+ "props": {
21965
+ "title": "Sign in to purchase",
21966
+ "style": "secondary",
21967
+ "action": {
21968
+ "actionId": "himi.open",
21969
+ "params": {
21970
+ "screenId": "himi_account"
21971
+ }
21972
+ }
21973
+ }
21974
+ },
21975
+ "modifiers": {
21976
+ "hiddenPath": "$service:himiEventDetail.iapSignInHidden"
21977
+ }
21978
+ },
21979
+ {
21980
+ "id": "himi_event.apple.retry",
21981
+ "body": {
21982
+ "package": "himalaya",
21983
+ "type": "Button",
21984
+ "props": {
21985
+ "title": "Refresh purchase status",
21986
+ "style": "secondary",
21987
+ "action": {
21988
+ "actionId": "tier5.himiEventDetail.iapRefresh"
21989
+ }
21990
+ }
21991
+ },
21992
+ "modifiers": {
21993
+ "hiddenPath": "$service:himiEventDetail.iapRetryHidden"
21994
+ }
21995
+ }
21996
+ ]
21997
+ }
21998
+ },
21999
+ "modifiers": {
22000
+ "hiddenPath": "$service:himiEventDetail.iapBuyHidden"
22001
+ }
22002
+ },
21611
22003
  {
21612
22004
  "id": "himi_event.tickets",
21613
22005
  "body": {
@@ -21617,6 +22009,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
21617
22009
  "title": "Get tickets",
21618
22010
  "style": "primary",
21619
22011
  "fullWidth": true,
22012
+ "disabledPath": "$service:himiEventDetail.ticketPurchaseBlocked",
21620
22013
  "action": {
21621
22014
  "actionId": "tier5.himiEventDetail.openRegistration"
21622
22015
  }
@@ -21626,7 +22019,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
21626
22019
  "cornerRadius": 8,
21627
22020
  "pressFeedback": "scale",
21628
22021
  "haptic": "medium",
21629
- "hiddenPath": "$service:himiEventDetail.hideTickets"
22022
+ "hiddenPath": "$service:himiEventDetail.regularTicketsHidden"
21630
22023
  }
21631
22024
  },
21632
22025
  {
@@ -21786,7 +22179,9 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
21786
22179
  "share",
21787
22180
  "wix_cashier",
21788
22181
  "local_database",
21789
- "wix_platform"
22182
+ "wix_platform",
22183
+ "app_info",
22184
+ "iap"
21790
22185
  ],
21791
22186
  "minBinaryVersion": "0.1.0",
21792
22187
  "bundleVersion": "0.0.1"
@@ -0,0 +1,106 @@
1
+ import { copyParam } from "./himi-copy.js";
2
+
3
+ export interface AttendanceField {
4
+ id: string;
5
+ label: string;
6
+ kind: string;
7
+ required: boolean;
8
+ value: string;
9
+ selectedIds: string[];
10
+ options: { id: string; label: string }[];
11
+ error: string;
12
+ maxLength?: number;
13
+ maxSize?: number;
14
+ }
15
+
16
+ const object = (v: unknown): Record<string, unknown> => v !== null && typeof v === "object" && !Array.isArray(v) ? v as Record<string, unknown> : {};
17
+ const text = (v: unknown): string => typeof v === "string" ? v : "";
18
+ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
19
+
20
+ export function createAttendanceForm(prefix: string) {
21
+ let fields: AttendanceField[] = [];
22
+ let supported = false;
23
+ const label = (name: string) => copyParam(`${prefix}.${name}Label`, name === "firstName" ? "First name" : name === "lastName" ? "Last name" : "Email");
24
+ const field = (scope: string, name: string, input: Record<string, unknown> = {}): AttendanceField => ({
25
+ id: `${scope}:${name}`, label: text(input.label) || label(name), required: input.mandatory === true,
26
+ kind: name === "email" ? "email" : input.type === "NUMBER" ? "number" : input.type === "TEXT_ARRAY" ? "multiple" : Array.isArray(input.options) && input.options.length ? "choice" : "text",
27
+ value: "", selectedIds: [], error: "",
28
+ options: Array.isArray(input.options) ? input.options.filter((o): o is string => typeof o === "string").map((o) => ({ id: o, label: o })) : [],
29
+ ...(typeof input.maxLength === "number" ? { maxLength: input.maxLength } : {}),
30
+ ...(typeof input.maxSize === "number" ? { maxSize: input.maxSize } : {}),
31
+ });
32
+ const contact = (scope: string) => ["firstName", "lastName", "email"].map((name) => field(scope, name, { mandatory: true }));
33
+
34
+ function event(raw: unknown): void {
35
+ fields = contact("buyer");
36
+ const controls = object(raw).controls;
37
+ supported = Array.isArray(controls) && controls.length > 0;
38
+ const names = new Set<string>();
39
+ for (const control of Array.isArray(controls) ? controls : []) {
40
+ const c = object(control);
41
+ if (c.deleted === true) continue;
42
+ if (!Array.isArray(c.inputs) || !c.inputs.length) { supported = false; continue; }
43
+ for (const rawInput of c.inputs) {
44
+ const input = object(rawInput);
45
+ const name = text(input.name);
46
+ if (!name || names.has(name) || !["TEXT", "NUMBER", "TEXT_ARRAY"].includes(text(input.type)) || (input.type === "TEXT_ARRAY" && (!Array.isArray(input.options) || !input.options.length))) { supported = false; continue; }
47
+ names.add(name);
48
+ fields.push(field("guest", name, { ...input, mandatory: input.mandatory === true || ["firstName", "lastName", "email"].includes(name) }));
49
+ }
50
+ }
51
+ if (!["firstName", "lastName", "email"].every((name) => names.has(name))) supported = false;
52
+ }
53
+
54
+ function booking(service: unknown): void {
55
+ fields = contact("buyer");
56
+ const id = text(object(object(service).form).id);
57
+ // Custom intake schemas need their own reader; never silently omit their required fields.
58
+ supported = id === "00000000-0000-0000-0000-000000000000";
59
+ }
60
+
61
+ function change(arg: unknown): void {
62
+ const a = object(arg);
63
+ const f = fields.find((candidate) => candidate.id === a.id);
64
+ if (!f) return;
65
+ if (typeof a.option === "string") {
66
+ if (f.kind === "multiple") f.selectedIds = f.selectedIds.includes(a.option) ? f.selectedIds.filter((v) => v !== a.option) : [...f.selectedIds, a.option];
67
+ else f.value = a.option;
68
+ f.error = "";
69
+ return;
70
+ }
71
+ f.value = text(a.value ?? a.text ?? a.selectedId);
72
+ f.selectedIds = Array.isArray(a.selectedIds) ? a.selectedIds.filter((v): v is string => typeof v === "string") : [];
73
+ f.error = "";
74
+ }
75
+
76
+ function valid(f: AttendanceField): boolean {
77
+ const value = f.value.trim();
78
+ const values = f.kind === "multiple" ? f.selectedIds : value ? [value] : [];
79
+ if (!values.length) return !f.required;
80
+ if (f.options.length && values.some((v) => !f.options.some((o) => o.id === v))) return false;
81
+ if (f.maxSize !== undefined && values.length > f.maxSize) return false;
82
+ if (f.maxLength !== undefined && values.some((v) => v.length > f.maxLength!)) return false;
83
+ return f.kind === "email" ? EMAIL.test(value) : f.kind !== "number" || /^-?\d+(?:\.\d+)?$/.test(value);
84
+ }
85
+
86
+ function validate(): boolean {
87
+ for (const f of fields) f.error = valid(f) ? "" : copyParam(`${prefix}.formInvalidText`, "Check this field.");
88
+ return supported && fields.every((f) => !f.error);
89
+ }
90
+
91
+ function buyer(): Record<string, string> {
92
+ return Object.fromEntries(fields.filter((f) => f.id.startsWith("buyer:")).map((f) => [f.id.slice(6), f.value.trim()]));
93
+ }
94
+
95
+ function ticket(definitionId: string) {
96
+ const inputValues = fields.filter((f) => f.id.startsWith("guest:") && (f.value.trim() || f.selectedIds.length)).map((f) => ({ inputName: f.id.slice(6), ...(f.kind === "multiple" ? { values: f.selectedIds.slice() } : { value: f.value.trim() }) }));
97
+ return { buyer: buyer(), guests: [{ ticketDefinitionId: definitionId, form: { inputValues } }] };
98
+ }
99
+
100
+ return {
101
+ event, booking, change, validate, buyer, ticket,
102
+ supported: () => supported,
103
+ rows: () => fields.map((f) => ({ ...f, selectedIds: f.selectedIds.slice(), kind: f.kind === "text" && f.required ? "requiredText" : f.kind })),
104
+ clear: () => { for (const f of fields) { f.value = ""; f.selectedIds = []; f.error = ""; } },
105
+ };
106
+ }