@wix/events 1.0.154 → 1.0.156

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 (283) hide show
  1. package/build/cjs/context.d.ts +11 -0
  2. package/build/cjs/context.js +38 -0
  3. package/build/cjs/context.js.map +1 -0
  4. package/build/cjs/index.d.ts +4 -4
  5. package/build/cjs/index.js +5 -5
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/index.typings.d.ts +4 -4
  8. package/build/cjs/index.typings.js +5 -5
  9. package/build/cjs/index.typings.js.map +1 -1
  10. package/build/cjs/meta.d.ts +4 -4
  11. package/build/cjs/meta.js +5 -5
  12. package/build/cjs/meta.js.map +1 -1
  13. package/build/cjs/src/events-guests-v1-guest.context.d.ts +3 -0
  14. package/build/cjs/src/events-guests-v1-guest.context.js +16 -0
  15. package/build/cjs/src/events-guests-v1-guest.context.js.map +1 -0
  16. package/build/cjs/src/events-guests-v1-guest.universal.d.ts +4 -6
  17. package/build/cjs/src/events-guests-v1-guest.universal.js +5 -8
  18. package/build/cjs/src/events-guests-v1-guest.universal.js.map +1 -1
  19. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.context.d.ts +5 -0
  20. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.context.js +38 -0
  21. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.context.js.map +1 -0
  22. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.d.ts +9 -60
  23. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js +9 -60
  24. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js.map +1 -1
  25. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.d.ts +0 -12
  26. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js +1 -23
  27. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js.map +1 -1
  28. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.context.d.ts +11 -0
  29. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.context.js +104 -0
  30. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.context.js.map +1 -0
  31. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.d.ts +9 -60
  32. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.js +9 -60
  33. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.js.map +1 -1
  34. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.d.ts +0 -33
  35. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.js +1 -49
  36. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.js.map +1 -1
  37. package/build/cjs/src/events-v1-category.context.d.ts +15 -0
  38. package/build/cjs/src/events-v1-category.context.js +148 -0
  39. package/build/cjs/src/events-v1-category.context.js.map +1 -0
  40. package/build/cjs/src/events-v1-category.universal.d.ts +0 -6
  41. package/build/cjs/src/events-v1-category.universal.js +1 -26
  42. package/build/cjs/src/events-v1-category.universal.js.map +1 -1
  43. package/build/cjs/src/events-v1-form.context.d.ts +9 -0
  44. package/build/cjs/src/events-v1-form.context.js +82 -0
  45. package/build/cjs/src/events-v1-form.context.js.map +1 -0
  46. package/build/cjs/src/events-v1-form.http.d.ts +25 -0
  47. package/build/cjs/src/events-v1-form.http.js +403 -0
  48. package/build/cjs/src/events-v1-form.http.js.map +1 -0
  49. package/build/cjs/src/events-v1-form.meta.d.ts +35 -0
  50. package/build/cjs/src/{events-v1-order-orders.meta.js → events-v1-form.meta.js} +57 -38
  51. package/build/cjs/src/events-v1-form.meta.js.map +1 -0
  52. package/build/cjs/src/events-v1-form.public.d.ts +91 -0
  53. package/build/cjs/src/events-v1-form.public.js +62 -0
  54. package/build/cjs/src/events-v1-form.public.js.map +1 -0
  55. package/build/cjs/src/events-v1-form.types.d.ts +1775 -0
  56. package/build/cjs/src/events-v1-form.types.js +159 -0
  57. package/build/cjs/src/events-v1-form.types.js.map +1 -0
  58. package/build/cjs/src/events-v1-form.universal.d.ts +1923 -0
  59. package/build/cjs/src/events-v1-form.universal.js +676 -0
  60. package/build/cjs/src/events-v1-form.universal.js.map +1 -0
  61. package/build/cjs/src/events-v1-order.context.d.ts +16 -0
  62. package/build/cjs/src/events-v1-order.context.js +159 -0
  63. package/build/cjs/src/events-v1-order.context.js.map +1 -0
  64. package/build/cjs/src/{events-v1-order-orders.http.d.ts → events-v1-order.http.d.ts} +1 -1
  65. package/build/cjs/src/{events-v1-order-orders.http.js → events-v1-order.http.js} +1 -1
  66. package/build/cjs/src/events-v1-order.http.js.map +1 -0
  67. package/build/{es/src/events-v1-order-checkout.meta.d.ts → cjs/src/events-v1-order.meta.d.ts} +18 -2
  68. package/build/cjs/src/{events-v1-order-checkout.meta.js → events-v1-order.meta.js} +117 -3
  69. package/build/cjs/src/events-v1-order.meta.js.map +1 -0
  70. package/build/cjs/src/{events-v1-order-orders.public.d.ts → events-v1-order.public.d.ts} +27 -19
  71. package/build/cjs/src/events-v1-order.public.js +105 -0
  72. package/build/cjs/src/events-v1-order.public.js.map +1 -0
  73. package/build/cjs/src/{events-v1-order-orders.types.js → events-v1-order.types.js} +1 -1
  74. package/build/cjs/src/events-v1-order.types.js.map +1 -0
  75. package/build/{es/src/events-v1-order-checkout.universal.d.ts → cjs/src/events-v1-order.universal.d.ts} +225 -6
  76. package/build/cjs/src/{events-v1-order-checkout.universal.js → events-v1-order.universal.js} +511 -24
  77. package/build/cjs/src/events-v1-order.universal.js.map +1 -0
  78. package/build/cjs/src/events-v1-rsvp.context.d.ts +11 -0
  79. package/build/cjs/src/events-v1-rsvp.context.js +104 -0
  80. package/build/cjs/src/events-v1-rsvp.context.js.map +1 -0
  81. package/build/cjs/src/events-v1-rsvp.http.js +235 -5
  82. package/build/cjs/src/events-v1-rsvp.http.js.map +1 -1
  83. package/build/cjs/src/events-v1-rsvp.universal.d.ts +18 -6
  84. package/build/cjs/src/events-v1-rsvp.universal.js +19 -23
  85. package/build/cjs/src/events-v1-rsvp.universal.js.map +1 -1
  86. package/build/cjs/src/events-v1-ticket-definition.context.d.ts +9 -0
  87. package/build/cjs/src/events-v1-ticket-definition.context.js +82 -0
  88. package/build/cjs/src/events-v1-ticket-definition.context.js.map +1 -0
  89. package/build/cjs/src/events-v1-ticket-definition.public.d.ts +1 -1
  90. package/build/cjs/src/events-v1-ticket-definition.types.d.ts +2 -2
  91. package/build/cjs/src/events-v1-ticket-definition.universal.d.ts +19 -8
  92. package/build/cjs/src/events-v1-ticket-definition.universal.js +18 -21
  93. package/build/cjs/src/events-v1-ticket-definition.universal.js.map +1 -1
  94. package/build/cjs/src/events-v1-ticket.context.d.ts +8 -0
  95. package/build/cjs/src/events-v1-ticket.context.js +71 -0
  96. package/build/cjs/src/events-v1-ticket.context.js.map +1 -0
  97. package/build/cjs/src/events-v1-ticket.universal.d.ts +12 -6
  98. package/build/cjs/src/events-v1-ticket.universal.js +13 -20
  99. package/build/cjs/src/events-v1-ticket.universal.js.map +1 -1
  100. package/build/cjs/src/events-v2-policy.context.d.ts +8 -0
  101. package/build/cjs/src/events-v2-policy.context.js +71 -0
  102. package/build/cjs/src/events-v2-policy.context.js.map +1 -0
  103. package/build/cjs/src/events-v2-policy.universal.d.ts +14 -6
  104. package/build/cjs/src/events-v2-policy.universal.js +15 -19
  105. package/build/cjs/src/events-v2-policy.universal.js.map +1 -1
  106. package/build/cjs/src/events-v3-event.context.d.ts +15 -0
  107. package/build/cjs/src/events-v3-event.context.js +148 -0
  108. package/build/cjs/src/events-v3-event.context.js.map +1 -0
  109. package/build/cjs/src/events-v3-event.http.js +6 -0
  110. package/build/cjs/src/events-v3-event.http.js.map +1 -1
  111. package/build/cjs/src/events-v3-event.public.d.ts +6 -6
  112. package/build/cjs/src/events-v3-event.public.js +8 -1
  113. package/build/cjs/src/events-v3-event.public.js.map +1 -1
  114. package/build/cjs/src/events-v3-event.types.d.ts +485 -38
  115. package/build/cjs/src/events-v3-event.types.js +78 -1
  116. package/build/cjs/src/events-v3-event.types.js.map +1 -1
  117. package/build/cjs/src/events-v3-event.universal.d.ts +523 -48
  118. package/build/cjs/src/events-v3-event.universal.js +154 -56
  119. package/build/cjs/src/events-v3-event.universal.js.map +1 -1
  120. package/build/es/context.d.ts +11 -0
  121. package/build/es/context.js +12 -0
  122. package/build/es/context.js.map +1 -0
  123. package/build/es/index.d.ts +4 -4
  124. package/build/es/index.js +4 -4
  125. package/build/es/index.js.map +1 -1
  126. package/build/es/index.typings.d.ts +4 -4
  127. package/build/es/index.typings.js +4 -4
  128. package/build/es/index.typings.js.map +1 -1
  129. package/build/es/meta.d.ts +4 -4
  130. package/build/es/meta.js +4 -4
  131. package/build/es/meta.js.map +1 -1
  132. package/build/es/src/events-guests-v1-guest.context.d.ts +3 -0
  133. package/build/es/src/events-guests-v1-guest.context.js +12 -0
  134. package/build/es/src/events-guests-v1-guest.context.js.map +1 -0
  135. package/build/es/src/events-guests-v1-guest.universal.d.ts +4 -6
  136. package/build/es/src/events-guests-v1-guest.universal.js +4 -7
  137. package/build/es/src/events-guests-v1-guest.universal.js.map +1 -1
  138. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.context.d.ts +5 -0
  139. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.context.js +32 -0
  140. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.context.js.map +1 -0
  141. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.d.ts +9 -60
  142. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js +9 -60
  143. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js.map +1 -1
  144. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.d.ts +0 -12
  145. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js +0 -22
  146. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js.map +1 -1
  147. package/build/es/src/events-schedule-v1-schedule-item-schedule.context.d.ts +11 -0
  148. package/build/es/src/events-schedule-v1-schedule-item-schedule.context.js +92 -0
  149. package/build/es/src/events-schedule-v1-schedule-item-schedule.context.js.map +1 -0
  150. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.d.ts +9 -60
  151. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.js +9 -60
  152. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.js.map +1 -1
  153. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.d.ts +0 -33
  154. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.js +0 -48
  155. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.js.map +1 -1
  156. package/build/es/src/events-v1-category.context.d.ts +15 -0
  157. package/build/es/src/events-v1-category.context.js +132 -0
  158. package/build/es/src/events-v1-category.context.js.map +1 -0
  159. package/build/es/src/events-v1-category.universal.d.ts +0 -6
  160. package/build/es/src/events-v1-category.universal.js +0 -25
  161. package/build/es/src/events-v1-category.universal.js.map +1 -1
  162. package/build/es/src/events-v1-form.context.d.ts +9 -0
  163. package/build/es/src/events-v1-form.context.js +72 -0
  164. package/build/es/src/events-v1-form.context.js.map +1 -0
  165. package/build/es/src/events-v1-form.http.d.ts +25 -0
  166. package/build/es/src/events-v1-form.http.js +393 -0
  167. package/build/es/src/events-v1-form.http.js.map +1 -0
  168. package/build/es/src/events-v1-form.meta.d.ts +35 -0
  169. package/build/es/src/events-v1-form.meta.js +128 -0
  170. package/build/es/src/events-v1-form.meta.js.map +1 -0
  171. package/build/es/src/events-v1-form.public.d.ts +91 -0
  172. package/build/es/src/events-v1-form.public.js +39 -0
  173. package/build/es/src/events-v1-form.public.js.map +1 -0
  174. package/build/es/src/events-v1-form.types.d.ts +1775 -0
  175. package/build/es/src/events-v1-form.types.js +156 -0
  176. package/build/es/src/events-v1-form.types.js.map +1 -0
  177. package/build/es/src/events-v1-form.universal.d.ts +1923 -0
  178. package/build/es/src/events-v1-form.universal.js +643 -0
  179. package/build/es/src/events-v1-form.universal.js.map +1 -0
  180. package/build/es/src/events-v1-order.context.d.ts +16 -0
  181. package/build/es/src/events-v1-order.context.js +142 -0
  182. package/build/es/src/events-v1-order.context.js.map +1 -0
  183. package/build/es/src/{events-v1-order-orders.http.d.ts → events-v1-order.http.d.ts} +1 -1
  184. package/build/es/src/{events-v1-order-orders.http.js → events-v1-order.http.js} +1 -1
  185. package/build/es/src/events-v1-order.http.js.map +1 -0
  186. package/build/{cjs/src/events-v1-order-checkout.meta.d.ts → es/src/events-v1-order.meta.d.ts} +18 -2
  187. package/build/es/src/{events-v1-order-checkout.meta.js → events-v1-order.meta.js} +110 -2
  188. package/build/es/src/events-v1-order.meta.js.map +1 -0
  189. package/build/es/src/{events-v1-order-orders.public.d.ts → events-v1-order.public.d.ts} +27 -19
  190. package/build/es/src/events-v1-order.public.js +74 -0
  191. package/build/es/src/events-v1-order.public.js.map +1 -0
  192. package/build/es/src/{events-v1-order-orders.types.js → events-v1-order.types.js} +1 -1
  193. package/build/es/src/events-v1-order.types.js.map +1 -0
  194. package/build/{cjs/src/events-v1-order-checkout.universal.d.ts → es/src/events-v1-order.universal.d.ts} +225 -6
  195. package/build/es/src/{events-v1-order-checkout.universal.js → events-v1-order.universal.js} +504 -23
  196. package/build/es/src/events-v1-order.universal.js.map +1 -0
  197. package/build/es/src/events-v1-rsvp.context.d.ts +11 -0
  198. package/build/es/src/events-v1-rsvp.context.js +92 -0
  199. package/build/es/src/events-v1-rsvp.context.js.map +1 -0
  200. package/build/es/src/events-v1-rsvp.http.js +235 -5
  201. package/build/es/src/events-v1-rsvp.http.js.map +1 -1
  202. package/build/es/src/events-v1-rsvp.universal.d.ts +18 -6
  203. package/build/es/src/events-v1-rsvp.universal.js +18 -22
  204. package/build/es/src/events-v1-rsvp.universal.js.map +1 -1
  205. package/build/es/src/events-v1-ticket-definition.context.d.ts +9 -0
  206. package/build/es/src/events-v1-ticket-definition.context.js +72 -0
  207. package/build/es/src/events-v1-ticket-definition.context.js.map +1 -0
  208. package/build/es/src/events-v1-ticket-definition.public.d.ts +1 -1
  209. package/build/es/src/events-v1-ticket-definition.types.d.ts +2 -2
  210. package/build/es/src/events-v1-ticket-definition.universal.d.ts +19 -8
  211. package/build/es/src/events-v1-ticket-definition.universal.js +17 -20
  212. package/build/es/src/events-v1-ticket-definition.universal.js.map +1 -1
  213. package/build/es/src/events-v1-ticket.context.d.ts +8 -0
  214. package/build/es/src/events-v1-ticket.context.js +62 -0
  215. package/build/es/src/events-v1-ticket.context.js.map +1 -0
  216. package/build/es/src/events-v1-ticket.universal.d.ts +12 -6
  217. package/build/es/src/events-v1-ticket.universal.js +12 -19
  218. package/build/es/src/events-v1-ticket.universal.js.map +1 -1
  219. package/build/es/src/events-v2-policy.context.d.ts +8 -0
  220. package/build/es/src/events-v2-policy.context.js +62 -0
  221. package/build/es/src/events-v2-policy.context.js.map +1 -0
  222. package/build/es/src/events-v2-policy.universal.d.ts +14 -6
  223. package/build/es/src/events-v2-policy.universal.js +14 -18
  224. package/build/es/src/events-v2-policy.universal.js.map +1 -1
  225. package/build/es/src/events-v3-event.context.d.ts +15 -0
  226. package/build/es/src/events-v3-event.context.js +132 -0
  227. package/build/es/src/events-v3-event.context.js.map +1 -0
  228. package/build/es/src/events-v3-event.http.js +6 -0
  229. package/build/es/src/events-v3-event.http.js.map +1 -1
  230. package/build/es/src/events-v3-event.public.d.ts +6 -6
  231. package/build/es/src/events-v3-event.public.js +1 -1
  232. package/build/es/src/events-v3-event.public.js.map +1 -1
  233. package/build/es/src/events-v3-event.types.d.ts +485 -38
  234. package/build/es/src/events-v3-event.types.js +77 -0
  235. package/build/es/src/events-v3-event.types.js.map +1 -1
  236. package/build/es/src/events-v3-event.universal.d.ts +523 -48
  237. package/build/es/src/events-v3-event.universal.js +153 -55
  238. package/build/es/src/events-v3-event.universal.js.map +1 -1
  239. package/context/package.json +6 -0
  240. package/package.json +6 -4
  241. package/build/cjs/src/events-v1-order-checkout.http.d.ts +0 -89
  242. package/build/cjs/src/events-v1-order-checkout.http.js +0 -1083
  243. package/build/cjs/src/events-v1-order-checkout.http.js.map +0 -1
  244. package/build/cjs/src/events-v1-order-checkout.meta.js.map +0 -1
  245. package/build/cjs/src/events-v1-order-checkout.public.d.ts +0 -15
  246. package/build/cjs/src/events-v1-order-checkout.public.js +0 -69
  247. package/build/cjs/src/events-v1-order-checkout.public.js.map +0 -1
  248. package/build/cjs/src/events-v1-order-checkout.types.js +0 -145
  249. package/build/cjs/src/events-v1-order-checkout.types.js.map +0 -1
  250. package/build/cjs/src/events-v1-order-checkout.universal.js.map +0 -1
  251. package/build/cjs/src/events-v1-order-orders.http.js.map +0 -1
  252. package/build/cjs/src/events-v1-order-orders.meta.d.ts +0 -28
  253. package/build/cjs/src/events-v1-order-orders.meta.js.map +0 -1
  254. package/build/cjs/src/events-v1-order-orders.public.js +0 -57
  255. package/build/cjs/src/events-v1-order-orders.public.js.map +0 -1
  256. package/build/cjs/src/events-v1-order-orders.types.js.map +0 -1
  257. package/build/cjs/src/events-v1-order-orders.universal.d.ts +0 -3620
  258. package/build/cjs/src/events-v1-order-orders.universal.js +0 -679
  259. package/build/cjs/src/events-v1-order-orders.universal.js.map +0 -1
  260. package/build/es/src/events-v1-order-checkout.http.d.ts +0 -89
  261. package/build/es/src/events-v1-order-checkout.http.js +0 -1066
  262. package/build/es/src/events-v1-order-checkout.http.js.map +0 -1
  263. package/build/es/src/events-v1-order-checkout.meta.js.map +0 -1
  264. package/build/es/src/events-v1-order-checkout.public.d.ts +0 -15
  265. package/build/es/src/events-v1-order-checkout.public.js +0 -44
  266. package/build/es/src/events-v1-order-checkout.public.js.map +0 -1
  267. package/build/es/src/events-v1-order-checkout.types.d.ts +0 -3631
  268. package/build/es/src/events-v1-order-checkout.types.js +0 -142
  269. package/build/es/src/events-v1-order-checkout.types.js.map +0 -1
  270. package/build/es/src/events-v1-order-checkout.universal.js.map +0 -1
  271. package/build/es/src/events-v1-order-orders.http.js.map +0 -1
  272. package/build/es/src/events-v1-order-orders.meta.d.ts +0 -28
  273. package/build/es/src/events-v1-order-orders.meta.js +0 -110
  274. package/build/es/src/events-v1-order-orders.meta.js.map +0 -1
  275. package/build/es/src/events-v1-order-orders.public.js +0 -34
  276. package/build/es/src/events-v1-order-orders.public.js.map +0 -1
  277. package/build/es/src/events-v1-order-orders.types.d.ts +0 -3631
  278. package/build/es/src/events-v1-order-orders.types.js.map +0 -1
  279. package/build/es/src/events-v1-order-orders.universal.d.ts +0 -3620
  280. package/build/es/src/events-v1-order-orders.universal.js +0 -647
  281. package/build/es/src/events-v1-order-orders.universal.js.map +0 -1
  282. /package/build/cjs/src/{events-v1-order-checkout.types.d.ts → events-v1-order.types.d.ts} +0 -0
  283. /package/build/{cjs/src/events-v1-order-orders.types.d.ts → es/src/events-v1-order.types.d.ts} +0 -0
@@ -0,0 +1,676 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.discardDraft = exports.publishDraft = exports.updateMessages = exports.deleteControl = exports.updateControl = exports.addControl = exports.getForm = exports.State = exports.ConferenceType = exports.VisitorType = exports.TaxType = exports.RsvpStatusOptions = exports.RegistrationStatus = exports.EventType = exports.EventStatus = exports.Status = exports.SubdivisionType = exports.LocationType = exports.ValueType = exports.InputControlType = void 0;
36
+ const velo_1 = require("@wix/metro-runtime/velo");
37
+ const transform_error_1 = require("@wix/sdk-runtime/transform-error");
38
+ const ambassadorWixEventsV1Form = __importStar(require("./events-v1-form.http"));
39
+ const _toVeloEntity = '$';
40
+ const _fromVeloEntity = '$';
41
+ var InputControlType;
42
+ (function (InputControlType) {
43
+ /** Single text value field. */
44
+ InputControlType["INPUT"] = "INPUT";
45
+ /** Single text value field. */
46
+ InputControlType["TEXTAREA"] = "TEXTAREA";
47
+ /** Single-choice field of predefined values. */
48
+ InputControlType["DROPDOWN"] = "DROPDOWN";
49
+ /** Single-choice field of predefined values. */
50
+ InputControlType["RADIO"] = "RADIO";
51
+ /** Multiple-choice field of predefined values. */
52
+ InputControlType["CHECKBOX"] = "CHECKBOX";
53
+ /** First and last name fields. */
54
+ InputControlType["NAME"] = "NAME";
55
+ /** Additional guests and respective guest names fields. */
56
+ InputControlType["GUEST_CONTROL"] = "GUEST_CONTROL";
57
+ /** Single-line address field. */
58
+ InputControlType["ADDRESS_SHORT"] = "ADDRESS_SHORT";
59
+ /** Full address field. */
60
+ InputControlType["ADDRESS_FULL"] = "ADDRESS_FULL";
61
+ /** Year, month and day fields. */
62
+ InputControlType["DATE"] = "DATE";
63
+ })(InputControlType || (exports.InputControlType = InputControlType = {}));
64
+ var ValueType;
65
+ (function (ValueType) {
66
+ ValueType["TEXT"] = "TEXT";
67
+ ValueType["NUMBER"] = "NUMBER";
68
+ ValueType["TEXT_ARRAY"] = "TEXT_ARRAY";
69
+ ValueType["DATE_TIME"] = "DATE_TIME";
70
+ ValueType["ADDRESS"] = "ADDRESS";
71
+ })(ValueType || (exports.ValueType = ValueType = {}));
72
+ var LocationType;
73
+ (function (LocationType) {
74
+ LocationType["VENUE"] = "VENUE";
75
+ LocationType["ONLINE"] = "ONLINE";
76
+ })(LocationType || (exports.LocationType = LocationType = {}));
77
+ var SubdivisionType;
78
+ (function (SubdivisionType) {
79
+ SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
80
+ /** State */
81
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
82
+ /** County */
83
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
84
+ /** City/town */
85
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
86
+ /** Neighborhood/quarter */
87
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
88
+ /** Street/block */
89
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
90
+ /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
91
+ SubdivisionType["COUNTRY"] = "COUNTRY";
92
+ })(SubdivisionType || (exports.SubdivisionType = SubdivisionType = {}));
93
+ var Status;
94
+ (function (Status) {
95
+ /** Event occurs only once. */
96
+ Status["ONE_TIME"] = "ONE_TIME";
97
+ /** Event is recurring. */
98
+ Status["RECURRING"] = "RECURRING";
99
+ /** Marks the next upcoming occurrence of the recurring event. */
100
+ Status["RECURRING_NEXT"] = "RECURRING_NEXT";
101
+ /** Marks the most recent ended occurrence of the recurring event. */
102
+ Status["RECURRING_LAST_ENDED"] = "RECURRING_LAST_ENDED";
103
+ /** Marks the most recent canceled occurrence of the recurring event. */
104
+ Status["RECURRING_LAST_CANCELED"] = "RECURRING_LAST_CANCELED";
105
+ })(Status || (exports.Status = Status = {}));
106
+ var EventStatus;
107
+ (function (EventStatus) {
108
+ /** Event is public and scheduled to start */
109
+ EventStatus["SCHEDULED"] = "SCHEDULED";
110
+ /** Event has started */
111
+ EventStatus["STARTED"] = "STARTED";
112
+ /** Event has ended */
113
+ EventStatus["ENDED"] = "ENDED";
114
+ /** Event was canceled */
115
+ EventStatus["CANCELED"] = "CANCELED";
116
+ /** Event is not public and needs to be published */
117
+ EventStatus["DRAFT"] = "DRAFT";
118
+ })(EventStatus || (exports.EventStatus = EventStatus = {}));
119
+ var EventType;
120
+ (function (EventType) {
121
+ /** Type not available for this request fieldset */
122
+ EventType["NA_EVENT_TYPE"] = "NA_EVENT_TYPE";
123
+ /** Registration via RSVP */
124
+ EventType["RSVP"] = "RSVP";
125
+ /** Registration via ticket purchase */
126
+ EventType["TICKETS"] = "TICKETS";
127
+ /** External registration */
128
+ EventType["EXTERNAL"] = "EXTERNAL";
129
+ /** Registration not available */
130
+ EventType["NO_REGISTRATION"] = "NO_REGISTRATION";
131
+ })(EventType || (exports.EventType = EventType = {}));
132
+ var RegistrationStatus;
133
+ (function (RegistrationStatus) {
134
+ /** Registration status is not applicable */
135
+ RegistrationStatus["NA_REGISTRATION_STATUS"] = "NA_REGISTRATION_STATUS";
136
+ /** Registration to event is closed */
137
+ RegistrationStatus["CLOSED"] = "CLOSED";
138
+ /** Registration to event is closed manually */
139
+ RegistrationStatus["CLOSED_MANUALLY"] = "CLOSED_MANUALLY";
140
+ /** Registration is open via RSVP */
141
+ RegistrationStatus["OPEN_RSVP"] = "OPEN_RSVP";
142
+ /** Registration to event waitlist is open via RSVP */
143
+ RegistrationStatus["OPEN_RSVP_WAITLIST"] = "OPEN_RSVP_WAITLIST";
144
+ /** Registration is open via ticket purchase */
145
+ RegistrationStatus["OPEN_TICKETS"] = "OPEN_TICKETS";
146
+ /** Registration is open via external URL */
147
+ RegistrationStatus["OPEN_EXTERNAL"] = "OPEN_EXTERNAL";
148
+ /** Registration will be open via RSVP */
149
+ RegistrationStatus["SCHEDULED_RSVP"] = "SCHEDULED_RSVP";
150
+ })(RegistrationStatus || (exports.RegistrationStatus = RegistrationStatus = {}));
151
+ var RsvpStatusOptions;
152
+ (function (RsvpStatusOptions) {
153
+ /** Only YES RSVP status is available for RSVP registration */
154
+ RsvpStatusOptions["YES_ONLY"] = "YES_ONLY";
155
+ /** YES and NO RSVP status options are available for the registration */
156
+ RsvpStatusOptions["YES_AND_NO"] = "YES_AND_NO";
157
+ })(RsvpStatusOptions || (exports.RsvpStatusOptions = RsvpStatusOptions = {}));
158
+ var TaxType;
159
+ (function (TaxType) {
160
+ /** Tax is included in the ticket price */
161
+ TaxType["INCLUDED"] = "INCLUDED";
162
+ /** Tax is added to the order at the checkout */
163
+ TaxType["ADDED"] = "ADDED";
164
+ /** Tax is added to the final total at the checkout */
165
+ TaxType["ADDED_AT_CHECKOUT"] = "ADDED_AT_CHECKOUT";
166
+ })(TaxType || (exports.TaxType = TaxType = {}));
167
+ var VisitorType;
168
+ (function (VisitorType) {
169
+ /** Site visitor (including member) */
170
+ VisitorType["VISITOR"] = "VISITOR";
171
+ /** Site member */
172
+ VisitorType["MEMBER"] = "MEMBER";
173
+ /** Site visitor or member */
174
+ VisitorType["VISITOR_OR_MEMBER"] = "VISITOR_OR_MEMBER";
175
+ })(VisitorType || (exports.VisitorType = VisitorType = {}));
176
+ var ConferenceType;
177
+ (function (ConferenceType) {
178
+ /** Everyone in the meeting can publish and subscribe video and audio. */
179
+ ConferenceType["MEETING"] = "MEETING";
180
+ /** Guests can only subscribe to video and audio. */
181
+ ConferenceType["WEBINAR"] = "WEBINAR";
182
+ })(ConferenceType || (exports.ConferenceType = ConferenceType = {}));
183
+ var State;
184
+ (function (State) {
185
+ /** Created manually by the user. */
186
+ State["MANUAL"] = "MANUAL";
187
+ /** Created automatically. */
188
+ State["AUTO"] = "AUTO";
189
+ /** Created when publishing recurring events. */
190
+ State["RECURRING_EVENT"] = "RECURRING_EVENT";
191
+ /** Category is hidden. */
192
+ State["HIDDEN"] = "HIDDEN";
193
+ /** Category is used to store component events. */
194
+ State["COMPONENT"] = "COMPONENT";
195
+ })(State || (exports.State = State = {}));
196
+ const _addControlRequest = {};
197
+ const _addControlResponse = {};
198
+ const _deleteControlRequest = {};
199
+ const _deleteControlResponse = {};
200
+ const _discardDraftRequest = {};
201
+ const _discardDraftResponse = {};
202
+ const _getFormRequest = {};
203
+ const _getFormResponse = {};
204
+ const _publishDraftRequest = {};
205
+ const _publishDraftResponse = {};
206
+ const _updateControlRequest = {};
207
+ const _updateControlResponse = {};
208
+ const _updateMessagesRequest = {};
209
+ const _updateMessagesResponse = {};
210
+ /**
211
+ * Retrieves an event registration form (both the draft and published versions).
212
+ * @param eventId - Event ID.
213
+ * @public
214
+ * @documentationMaturity preview
215
+ * @requiredField eventId
216
+ * @permissionScope Read Events - all read permissions
217
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.READ-EVENTS
218
+ * @permissionScope Manage Bookings Services and Settings
219
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
220
+ * @permissionScope Manage Events - all permissions
221
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
222
+ * @permissionScope Read Events
223
+ * @permissionScopeId SCOPE.DC-EVENTS.READ-EVENTS
224
+ * @permissionScope Manage Guest List
225
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-GUEST-LIST
226
+ * @permissionScope Manage Events
227
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
228
+ * @applicableIdentity APP
229
+ * @applicableIdentity MEMBER
230
+ * @applicableIdentity VISITOR
231
+ * @returns Currently published event form.
232
+ * Published form is visible to site visitors.
233
+ */
234
+ function getForm(eventId) {
235
+ var _a, _b, _c;
236
+ return __awaiter(this, arguments, void 0, function* () {
237
+ const requestTransformation = { eventId: '$[0]' };
238
+ const responseTransformation = '$.form';
239
+ // @ts-ignore
240
+ const { httpClient, sideEffects } = arguments[1];
241
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
242
+ rootSchema: _getFormRequest,
243
+ depSchemas: {},
244
+ fqdnTransformation: {
245
+ paths: [],
246
+ transformation: _fromVeloEntity,
247
+ },
248
+ customTransformation: requestTransformation,
249
+ });
250
+ const { fromJSON } = (0, velo_1.serializer)({
251
+ rootSchema: _getFormResponse,
252
+ depSchemas: {},
253
+ fqdnTransformation: {
254
+ paths: [...['form', 'draftForm']],
255
+ transformation: _toVeloEntity,
256
+ },
257
+ customTransformation: responseTransformation,
258
+ });
259
+ const payload = toAmbassadorRequest([eventId]);
260
+ const reqOpts = ambassadorWixEventsV1Form.getForm(payload);
261
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
262
+ try {
263
+ const result = yield httpClient.request(reqOpts);
264
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
265
+ return fromJSON(result.data);
266
+ }
267
+ catch (err) {
268
+ const transformedError = (0, transform_error_1.transformError)(err, {
269
+ spreadPathsToArguments: {},
270
+ explicitPathsToArguments: { eventId: '$[0]' },
271
+ singleArgumentUnchanged: false,
272
+ }, ['eventId']);
273
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
274
+ throw transformedError;
275
+ }
276
+ });
277
+ }
278
+ exports.getForm = getForm;
279
+ /**
280
+ * Adds an input control to the draft form.
281
+ * @param eventId - Event ID.
282
+ * @public
283
+ * @documentationMaturity preview
284
+ * @requiredField eventId
285
+ * @permissionScope Manage Events - all permissions
286
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
287
+ * @permissionScope Manage Events
288
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
289
+ * @applicableIdentity APP
290
+ */
291
+ function addControl(eventId, options) {
292
+ var _a, _b, _c;
293
+ return __awaiter(this, arguments, void 0, function* () {
294
+ const requestTransformation = {
295
+ eventId: '$[0]',
296
+ phone: '$[1].phone',
297
+ address: '$[1].address',
298
+ date: '$[1].date',
299
+ additionalGuests: '$[1].additionalGuests',
300
+ dropdown: '$[1].dropdown',
301
+ checkbox: '$[1].checkbox',
302
+ text: '$[1].text',
303
+ radioButton: '$[1].radioButton',
304
+ };
305
+ const responseTransformation = '$';
306
+ // @ts-ignore
307
+ const { httpClient, sideEffects } = arguments[2];
308
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
309
+ rootSchema: _addControlRequest,
310
+ depSchemas: {},
311
+ fqdnTransformation: {
312
+ paths: [],
313
+ transformation: _fromVeloEntity,
314
+ },
315
+ customTransformation: requestTransformation,
316
+ });
317
+ const { fromJSON } = (0, velo_1.serializer)({
318
+ rootSchema: _addControlResponse,
319
+ depSchemas: {},
320
+ fqdnTransformation: {
321
+ paths: [...['form']],
322
+ transformation: _toVeloEntity,
323
+ },
324
+ customTransformation: responseTransformation,
325
+ });
326
+ const payload = toAmbassadorRequest([eventId, options]);
327
+ const reqOpts = ambassadorWixEventsV1Form.addControl(payload);
328
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
329
+ try {
330
+ const result = yield httpClient.request(reqOpts);
331
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
332
+ return fromJSON(result.data);
333
+ }
334
+ catch (err) {
335
+ const transformedError = (0, transform_error_1.transformError)(err, {
336
+ spreadPathsToArguments: {},
337
+ explicitPathsToArguments: {
338
+ eventId: '$[0]',
339
+ phone: '$[1].phone',
340
+ address: '$[1].address',
341
+ date: '$[1].date',
342
+ additionalGuests: '$[1].additionalGuests',
343
+ dropdown: '$[1].dropdown',
344
+ checkbox: '$[1].checkbox',
345
+ text: '$[1].text',
346
+ radioButton: '$[1].radioButton',
347
+ },
348
+ singleArgumentUnchanged: false,
349
+ }, ['eventId', 'options']);
350
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
351
+ throw transformedError;
352
+ }
353
+ });
354
+ }
355
+ exports.addControl = addControl;
356
+ /**
357
+ * Updates an existing input control in the draft form.
358
+ * @public
359
+ * @documentationMaturity preview
360
+ * @requiredField identifiers
361
+ * @requiredField identifiers.eventId
362
+ * @requiredField identifiers.id
363
+ * @permissionScope Manage Events - all permissions
364
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
365
+ * @permissionScope Manage Events
366
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
367
+ * @applicableIdentity APP
368
+ */
369
+ function updateControl(identifiers, options) {
370
+ var _a, _b, _c;
371
+ return __awaiter(this, arguments, void 0, function* () {
372
+ const requestTransformation = {
373
+ eventId: '$[0].eventId',
374
+ id: '$[0]._id',
375
+ orderIndex: '$[1].orderIndex',
376
+ phone: '$[1].phone',
377
+ address: '$[1].address',
378
+ date: '$[1].date',
379
+ additionalGuests: '$[1].additionalGuests',
380
+ dropdown: '$[1].dropdown',
381
+ checkbox: '$[1].checkbox',
382
+ text: '$[1].text',
383
+ name: '$[1].name',
384
+ email: '$[1].email',
385
+ radioButton: '$[1].radioButton',
386
+ };
387
+ const responseTransformation = '$';
388
+ // @ts-ignore
389
+ const { httpClient, sideEffects } = arguments[2];
390
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
391
+ rootSchema: _updateControlRequest,
392
+ depSchemas: {},
393
+ fqdnTransformation: {
394
+ paths: [],
395
+ transformation: _fromVeloEntity,
396
+ },
397
+ customTransformation: requestTransformation,
398
+ });
399
+ const { fromJSON } = (0, velo_1.serializer)({
400
+ rootSchema: _updateControlResponse,
401
+ depSchemas: {},
402
+ fqdnTransformation: {
403
+ paths: [...['form']],
404
+ transformation: _toVeloEntity,
405
+ },
406
+ customTransformation: responseTransformation,
407
+ });
408
+ const payload = toAmbassadorRequest([identifiers, options]);
409
+ const reqOpts = ambassadorWixEventsV1Form.updateControl(payload);
410
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
411
+ try {
412
+ const result = yield httpClient.request(reqOpts);
413
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
414
+ return fromJSON(result.data);
415
+ }
416
+ catch (err) {
417
+ const transformedError = (0, transform_error_1.transformError)(err, {
418
+ spreadPathsToArguments: {},
419
+ explicitPathsToArguments: {
420
+ eventId: '$[0].eventId',
421
+ id: '$[0]._id',
422
+ orderIndex: '$[1].orderIndex',
423
+ phone: '$[1].phone',
424
+ address: '$[1].address',
425
+ date: '$[1].date',
426
+ additionalGuests: '$[1].additionalGuests',
427
+ dropdown: '$[1].dropdown',
428
+ checkbox: '$[1].checkbox',
429
+ text: '$[1].text',
430
+ name: '$[1].name',
431
+ email: '$[1].email',
432
+ radioButton: '$[1].radioButton',
433
+ },
434
+ singleArgumentUnchanged: false,
435
+ }, ['identifiers', 'options']);
436
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
437
+ throw transformedError;
438
+ }
439
+ });
440
+ }
441
+ exports.updateControl = updateControl;
442
+ /**
443
+ * Deletes an input control from the draft form.
444
+ * @public
445
+ * @documentationMaturity preview
446
+ * @requiredField identifiers
447
+ * @requiredField identifiers.eventId
448
+ * @requiredField identifiers.id
449
+ * @permissionScope Manage Events - all permissions
450
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
451
+ * @permissionScope Manage Events
452
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
453
+ * @applicableIdentity APP
454
+ */
455
+ function deleteControl(identifiers) {
456
+ var _a, _b, _c;
457
+ return __awaiter(this, arguments, void 0, function* () {
458
+ const requestTransformation = { eventId: '$[0].eventId', id: '$[0]._id' };
459
+ const responseTransformation = '$';
460
+ // @ts-ignore
461
+ const { httpClient, sideEffects } = arguments[1];
462
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
463
+ rootSchema: _deleteControlRequest,
464
+ depSchemas: {},
465
+ fqdnTransformation: {
466
+ paths: [],
467
+ transformation: _fromVeloEntity,
468
+ },
469
+ customTransformation: requestTransformation,
470
+ });
471
+ const { fromJSON } = (0, velo_1.serializer)({
472
+ rootSchema: _deleteControlResponse,
473
+ depSchemas: {},
474
+ fqdnTransformation: {
475
+ paths: [...['form']],
476
+ transformation: _toVeloEntity,
477
+ },
478
+ customTransformation: responseTransformation,
479
+ });
480
+ const payload = toAmbassadorRequest([identifiers]);
481
+ const reqOpts = ambassadorWixEventsV1Form.deleteControl(payload);
482
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
483
+ try {
484
+ const result = yield httpClient.request(reqOpts);
485
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
486
+ return fromJSON(result.data);
487
+ }
488
+ catch (err) {
489
+ const transformedError = (0, transform_error_1.transformError)(err, {
490
+ spreadPathsToArguments: {},
491
+ explicitPathsToArguments: { eventId: '$[0].eventId', id: '$[0]._id' },
492
+ singleArgumentUnchanged: false,
493
+ }, ['identifiers']);
494
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
495
+ throw transformedError;
496
+ }
497
+ });
498
+ }
499
+ exports.deleteControl = deleteControl;
500
+ /**
501
+ * Updates draft form messages, as displayed in the Wix UI before, during, and after the registration flow.
502
+ * Configurable messages include form titles, response labels, "thank you" messages, and call-to-action texts.
503
+ * @param eventId - Event ID.
504
+ * @public
505
+ * @documentationMaturity preview
506
+ * @requiredField eventId
507
+ * @permissionScope Manage Events - all permissions
508
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
509
+ * @permissionScope Manage Events
510
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
511
+ * @applicableIdentity APP
512
+ */
513
+ function updateMessages(eventId, options) {
514
+ var _a, _b, _c;
515
+ return __awaiter(this, arguments, void 0, function* () {
516
+ const requestTransformation = { eventId: '$[0]', messages: '$[1].messages' };
517
+ const responseTransformation = '$';
518
+ // @ts-ignore
519
+ const { httpClient, sideEffects } = arguments[2];
520
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
521
+ rootSchema: _updateMessagesRequest,
522
+ depSchemas: {},
523
+ fqdnTransformation: {
524
+ paths: [],
525
+ transformation: _fromVeloEntity,
526
+ },
527
+ customTransformation: requestTransformation,
528
+ });
529
+ const { fromJSON } = (0, velo_1.serializer)({
530
+ rootSchema: _updateMessagesResponse,
531
+ depSchemas: {},
532
+ fqdnTransformation: {
533
+ paths: [...['form']],
534
+ transformation: _toVeloEntity,
535
+ },
536
+ customTransformation: responseTransformation,
537
+ });
538
+ const payload = toAmbassadorRequest([eventId, options]);
539
+ const reqOpts = ambassadorWixEventsV1Form.updateMessages(payload);
540
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
541
+ try {
542
+ const result = yield httpClient.request(reqOpts);
543
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
544
+ return fromJSON(result.data);
545
+ }
546
+ catch (err) {
547
+ const transformedError = (0, transform_error_1.transformError)(err, {
548
+ spreadPathsToArguments: {},
549
+ explicitPathsToArguments: {
550
+ eventId: '$[0]',
551
+ messages: '$[1].messages',
552
+ },
553
+ singleArgumentUnchanged: false,
554
+ }, ['eventId', 'options']);
555
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
556
+ throw transformedError;
557
+ }
558
+ });
559
+ }
560
+ exports.updateMessages = updateMessages;
561
+ /**
562
+ * Publishes the draft form.
563
+ * Sets event registration form equal to contents of draft form.
564
+ * @param eventId - Event ID.
565
+ * @public
566
+ * @documentationMaturity preview
567
+ * @requiredField eventId
568
+ * @permissionScope Manage Events - all permissions
569
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
570
+ * @permissionScope Manage Events
571
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
572
+ * @applicableIdentity APP
573
+ */
574
+ function publishDraft(eventId) {
575
+ var _a, _b, _c;
576
+ return __awaiter(this, arguments, void 0, function* () {
577
+ const requestTransformation = { eventId: '$[0]' };
578
+ const responseTransformation = '$';
579
+ // @ts-ignore
580
+ const { httpClient, sideEffects } = arguments[1];
581
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
582
+ rootSchema: _publishDraftRequest,
583
+ depSchemas: {},
584
+ fqdnTransformation: {
585
+ paths: [],
586
+ transformation: _fromVeloEntity,
587
+ },
588
+ customTransformation: requestTransformation,
589
+ });
590
+ const { fromJSON } = (0, velo_1.serializer)({
591
+ rootSchema: _publishDraftResponse,
592
+ depSchemas: {},
593
+ fqdnTransformation: {
594
+ paths: [...['form']],
595
+ transformation: _toVeloEntity,
596
+ },
597
+ customTransformation: responseTransformation,
598
+ });
599
+ const payload = toAmbassadorRequest([eventId]);
600
+ const reqOpts = ambassadorWixEventsV1Form.publishDraft(payload);
601
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
602
+ try {
603
+ const result = yield httpClient.request(reqOpts);
604
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
605
+ return fromJSON(result.data);
606
+ }
607
+ catch (err) {
608
+ const transformedError = (0, transform_error_1.transformError)(err, {
609
+ spreadPathsToArguments: {},
610
+ explicitPathsToArguments: { eventId: '$[0]' },
611
+ singleArgumentUnchanged: false,
612
+ }, ['eventId']);
613
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
614
+ throw transformedError;
615
+ }
616
+ });
617
+ }
618
+ exports.publishDraft = publishDraft;
619
+ /**
620
+ * Clears all changes to the draft form.
621
+ * (Does not affect the published form.)
622
+ * @param eventId - Event ID.
623
+ * @public
624
+ * @documentationMaturity preview
625
+ * @requiredField eventId
626
+ * @permissionScope Manage Events - all permissions
627
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
628
+ * @permissionScope Manage Events
629
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
630
+ * @applicableIdentity APP
631
+ */
632
+ function discardDraft(eventId) {
633
+ var _a, _b, _c;
634
+ return __awaiter(this, arguments, void 0, function* () {
635
+ const requestTransformation = { eventId: '$[0]' };
636
+ const responseTransformation = '$';
637
+ // @ts-ignore
638
+ const { httpClient, sideEffects } = arguments[1];
639
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
640
+ rootSchema: _discardDraftRequest,
641
+ depSchemas: {},
642
+ fqdnTransformation: {
643
+ paths: [],
644
+ transformation: _fromVeloEntity,
645
+ },
646
+ customTransformation: requestTransformation,
647
+ });
648
+ const { fromJSON } = (0, velo_1.serializer)({
649
+ rootSchema: _discardDraftResponse,
650
+ depSchemas: {},
651
+ fqdnTransformation: {
652
+ paths: [],
653
+ transformation: _toVeloEntity,
654
+ },
655
+ customTransformation: responseTransformation,
656
+ });
657
+ const payload = toAmbassadorRequest([eventId]);
658
+ const reqOpts = ambassadorWixEventsV1Form.discardDraft(payload);
659
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
660
+ try {
661
+ const result = yield httpClient.request(reqOpts);
662
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
663
+ }
664
+ catch (err) {
665
+ const transformedError = (0, transform_error_1.transformError)(err, {
666
+ spreadPathsToArguments: {},
667
+ explicitPathsToArguments: { eventId: '$[0]' },
668
+ singleArgumentUnchanged: false,
669
+ }, ['eventId']);
670
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
671
+ throw transformedError;
672
+ }
673
+ });
674
+ }
675
+ exports.discardDraft = discardDraft;
676
+ //# sourceMappingURL=events-v1-form.universal.js.map