@wix/events 1.0.13 → 1.0.15

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 (199) hide show
  1. package/build/cjs/index.d.ts +6 -1
  2. package/build/cjs/index.js +7 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/events-guests-v1-guest.http.d.ts +1 -4
  5. package/build/cjs/src/events-guests-v1-guest.http.js +27 -5
  6. package/build/cjs/src/events-guests-v1-guest.http.js.map +1 -1
  7. package/build/cjs/src/events-guests-v1-guest.public.d.ts +2 -2
  8. package/build/cjs/src/events-guests-v1-guest.public.js +2 -2
  9. package/build/cjs/src/events-guests-v1-guest.public.js.map +1 -1
  10. package/build/cjs/src/events-guests-v1-guest.types.d.ts +58 -44
  11. package/build/cjs/src/events-guests-v1-guest.types.js +9 -9
  12. package/build/cjs/src/events-guests-v1-guest.types.js.map +1 -1
  13. package/build/cjs/src/events-guests-v1-guest.universal.d.ts +61 -47
  14. package/build/cjs/src/events-guests-v1-guest.universal.js +12 -12
  15. package/build/cjs/src/events-guests-v1-guest.universal.js.map +1 -1
  16. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.d.ts +49 -0
  17. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js +485 -0
  18. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js.map +1 -0
  19. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.d.ts +318 -0
  20. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js +27 -0
  21. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js.map +1 -0
  22. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js +1 -1
  23. package/build/cjs/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js.map +1 -1
  24. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.d.ts +49 -0
  25. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.js +485 -0
  26. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.http.js.map +1 -0
  27. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.types.d.ts +318 -0
  28. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.types.js +27 -0
  29. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.types.js.map +1 -0
  30. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.js +1 -1
  31. package/build/cjs/src/events-schedule-v1-schedule-item-schedule.universal.js.map +1 -1
  32. package/build/cjs/src/events-v1-event.types.d.ts +1 -1
  33. package/build/cjs/src/events-v1-event.universal.d.ts +1 -1
  34. package/build/cjs/src/events-v1-order-checkout.http.d.ts +65 -0
  35. package/build/cjs/src/events-v1-order-checkout.http.js +1026 -0
  36. package/build/cjs/src/events-v1-order-checkout.http.js.map +1 -0
  37. package/build/cjs/src/events-v1-order-checkout.public.d.ts +12 -0
  38. package/build/cjs/src/events-v1-order-checkout.public.js +68 -0
  39. package/build/cjs/src/events-v1-order-checkout.public.js.map +1 -0
  40. package/build/cjs/src/events-v1-order-checkout.types.d.ts +1271 -0
  41. package/build/cjs/src/events-v1-order-checkout.types.js +145 -0
  42. package/build/cjs/src/events-v1-order-checkout.types.js.map +1 -0
  43. package/build/cjs/src/events-v1-order-checkout.universal.d.ts +1439 -0
  44. package/build/cjs/src/events-v1-order-checkout.universal.js +698 -0
  45. package/build/cjs/src/events-v1-order-checkout.universal.js.map +1 -0
  46. package/build/cjs/src/events-v1-order-orders.http.d.ts +79 -0
  47. package/build/cjs/src/events-v1-order-orders.http.js +1040 -0
  48. package/build/cjs/src/events-v1-order-orders.http.js.map +1 -0
  49. package/build/cjs/src/events-v1-order-orders.public.d.ts +10 -0
  50. package/build/cjs/src/events-v1-order-orders.public.js +56 -0
  51. package/build/cjs/src/events-v1-order-orders.public.js.map +1 -0
  52. package/build/cjs/src/events-v1-order-orders.types.d.ts +1271 -0
  53. package/build/cjs/src/events-v1-order-orders.types.js +145 -0
  54. package/build/cjs/src/events-v1-order-orders.types.js.map +1 -0
  55. package/build/cjs/src/events-v1-order-orders.universal.d.ts +1397 -0
  56. package/build/cjs/src/events-v1-order-orders.universal.js +599 -0
  57. package/build/cjs/src/events-v1-order-orders.universal.js.map +1 -0
  58. package/build/cjs/src/events-v1-rsvp.http.d.ts +20 -0
  59. package/build/cjs/src/events-v1-rsvp.http.js +577 -0
  60. package/build/cjs/src/events-v1-rsvp.http.js.map +1 -0
  61. package/build/cjs/src/events-v1-rsvp.public.d.ts +13 -0
  62. package/build/cjs/src/events-v1-rsvp.public.js +64 -0
  63. package/build/cjs/src/events-v1-rsvp.public.js.map +1 -0
  64. package/build/cjs/src/events-v1-rsvp.types.d.ts +453 -0
  65. package/build/cjs/src/events-v1-rsvp.types.js +44 -0
  66. package/build/cjs/src/events-v1-rsvp.types.js.map +1 -0
  67. package/build/cjs/src/events-v1-rsvp.universal.d.ts +652 -0
  68. package/build/cjs/src/events-v1-rsvp.universal.js +632 -0
  69. package/build/cjs/src/events-v1-rsvp.universal.js.map +1 -0
  70. package/build/cjs/src/events-v1-ticket-definition.http.d.ts +42 -0
  71. package/build/cjs/src/events-v1-ticket-definition.http.js +472 -0
  72. package/build/cjs/src/events-v1-ticket-definition.http.js.map +1 -0
  73. package/build/cjs/src/events-v1-ticket-definition.public.d.ts +11 -0
  74. package/build/cjs/src/events-v1-ticket-definition.public.js +55 -0
  75. package/build/cjs/src/events-v1-ticket-definition.public.js.map +1 -0
  76. package/build/cjs/src/events-v1-ticket-definition.types.d.ts +435 -0
  77. package/build/cjs/src/events-v1-ticket-definition.types.js +54 -0
  78. package/build/cjs/src/events-v1-ticket-definition.types.js.map +1 -0
  79. package/build/cjs/src/events-v1-ticket-definition.universal.d.ts +619 -0
  80. package/build/cjs/src/events-v1-ticket-definition.universal.js +527 -0
  81. package/build/cjs/src/events-v1-ticket-definition.universal.js.map +1 -0
  82. package/build/cjs/src/events-v1-ticket.http.d.ts +31 -0
  83. package/build/cjs/src/events-v1-ticket.http.js +496 -0
  84. package/build/cjs/src/events-v1-ticket.http.js.map +1 -0
  85. package/build/cjs/src/events-v1-ticket.public.d.ts +10 -0
  86. package/build/cjs/src/events-v1-ticket.public.js +47 -0
  87. package/build/cjs/src/events-v1-ticket.public.js.map +1 -0
  88. package/build/cjs/src/events-v1-ticket.types.d.ts +448 -0
  89. package/build/cjs/src/events-v1-ticket.types.js +76 -0
  90. package/build/cjs/src/events-v1-ticket.types.js.map +1 -0
  91. package/build/cjs/src/events-v1-ticket.universal.d.ts +590 -0
  92. package/build/cjs/src/events-v1-ticket.universal.js +552 -0
  93. package/build/cjs/src/events-v1-ticket.universal.js.map +1 -0
  94. package/build/cjs/src/events-v2-policy.http.d.ts +28 -7
  95. package/build/cjs/src/events-v2-policy.http.js +28 -7
  96. package/build/cjs/src/events-v2-policy.http.js.map +1 -1
  97. package/build/cjs/src/events-v2-policy.universal.d.ts +53 -37
  98. package/build/cjs/src/events-v2-policy.universal.js +21 -7
  99. package/build/cjs/src/events-v2-policy.universal.js.map +1 -1
  100. package/build/es/index.d.ts +6 -1
  101. package/build/es/index.js +6 -1
  102. package/build/es/index.js.map +1 -1
  103. package/build/es/src/events-guests-v1-guest.http.d.ts +1 -4
  104. package/build/es/src/events-guests-v1-guest.http.js +27 -5
  105. package/build/es/src/events-guests-v1-guest.http.js.map +1 -1
  106. package/build/es/src/events-guests-v1-guest.public.d.ts +2 -2
  107. package/build/es/src/events-guests-v1-guest.public.js +1 -1
  108. package/build/es/src/events-guests-v1-guest.public.js.map +1 -1
  109. package/build/es/src/events-guests-v1-guest.types.d.ts +58 -44
  110. package/build/es/src/events-guests-v1-guest.types.js +8 -8
  111. package/build/es/src/events-guests-v1-guest.types.js.map +1 -1
  112. package/build/es/src/events-guests-v1-guest.universal.d.ts +61 -47
  113. package/build/es/src/events-guests-v1-guest.universal.js +11 -11
  114. package/build/es/src/events-guests-v1-guest.universal.js.map +1 -1
  115. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.d.ts +49 -0
  116. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js +470 -0
  117. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.http.js.map +1 -0
  118. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.d.ts +318 -0
  119. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js +24 -0
  120. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.types.js.map +1 -0
  121. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js +1 -1
  122. package/build/es/src/events-schedule-v1-schedule-item-schedule-bookmarks.universal.js.map +1 -1
  123. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.d.ts +49 -0
  124. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.js +470 -0
  125. package/build/es/src/events-schedule-v1-schedule-item-schedule.http.js.map +1 -0
  126. package/build/es/src/events-schedule-v1-schedule-item-schedule.types.d.ts +318 -0
  127. package/build/es/src/events-schedule-v1-schedule-item-schedule.types.js +24 -0
  128. package/build/es/src/events-schedule-v1-schedule-item-schedule.types.js.map +1 -0
  129. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.js +1 -1
  130. package/build/es/src/events-schedule-v1-schedule-item-schedule.universal.js.map +1 -1
  131. package/build/es/src/events-v1-event.types.d.ts +1 -1
  132. package/build/es/src/events-v1-event.universal.d.ts +1 -1
  133. package/build/es/src/events-v1-order-checkout.http.d.ts +65 -0
  134. package/build/es/src/events-v1-order-checkout.http.js +1009 -0
  135. package/build/es/src/events-v1-order-checkout.http.js.map +1 -0
  136. package/build/es/src/events-v1-order-checkout.public.d.ts +12 -0
  137. package/build/es/src/events-v1-order-checkout.public.js +43 -0
  138. package/build/es/src/events-v1-order-checkout.public.js.map +1 -0
  139. package/build/es/src/events-v1-order-checkout.types.d.ts +1271 -0
  140. package/build/es/src/events-v1-order-checkout.types.js +142 -0
  141. package/build/es/src/events-v1-order-checkout.types.js.map +1 -0
  142. package/build/es/src/events-v1-order-checkout.universal.d.ts +1439 -0
  143. package/build/es/src/events-v1-order-checkout.universal.js +668 -0
  144. package/build/es/src/events-v1-order-checkout.universal.js.map +1 -0
  145. package/build/es/src/events-v1-order-orders.http.d.ts +79 -0
  146. package/build/es/src/events-v1-order-orders.http.js +1023 -0
  147. package/build/es/src/events-v1-order-orders.http.js.map +1 -0
  148. package/build/es/src/events-v1-order-orders.public.d.ts +10 -0
  149. package/build/es/src/events-v1-order-orders.public.js +33 -0
  150. package/build/es/src/events-v1-order-orders.public.js.map +1 -0
  151. package/build/es/src/events-v1-order-orders.types.d.ts +1271 -0
  152. package/build/es/src/events-v1-order-orders.types.js +142 -0
  153. package/build/es/src/events-v1-order-orders.types.js.map +1 -0
  154. package/build/es/src/events-v1-order-orders.universal.d.ts +1397 -0
  155. package/build/es/src/events-v1-order-orders.universal.js +571 -0
  156. package/build/es/src/events-v1-order-orders.universal.js.map +1 -0
  157. package/build/es/src/events-v1-rsvp.http.d.ts +20 -0
  158. package/build/es/src/events-v1-rsvp.http.js +565 -0
  159. package/build/es/src/events-v1-rsvp.http.js.map +1 -0
  160. package/build/es/src/events-v1-rsvp.public.d.ts +13 -0
  161. package/build/es/src/events-v1-rsvp.public.js +48 -0
  162. package/build/es/src/events-v1-rsvp.public.js.map +1 -0
  163. package/build/es/src/events-v1-rsvp.types.d.ts +453 -0
  164. package/build/es/src/events-v1-rsvp.types.js +41 -0
  165. package/build/es/src/events-v1-rsvp.types.js.map +1 -0
  166. package/build/es/src/events-v1-rsvp.universal.d.ts +652 -0
  167. package/build/es/src/events-v1-rsvp.universal.js +601 -0
  168. package/build/es/src/events-v1-rsvp.universal.js.map +1 -0
  169. package/build/es/src/events-v1-ticket-definition.http.d.ts +42 -0
  170. package/build/es/src/events-v1-ticket-definition.http.js +462 -0
  171. package/build/es/src/events-v1-ticket-definition.http.js.map +1 -0
  172. package/build/es/src/events-v1-ticket-definition.public.d.ts +11 -0
  173. package/build/es/src/events-v1-ticket-definition.public.js +38 -0
  174. package/build/es/src/events-v1-ticket-definition.public.js.map +1 -0
  175. package/build/es/src/events-v1-ticket-definition.types.d.ts +435 -0
  176. package/build/es/src/events-v1-ticket-definition.types.js +51 -0
  177. package/build/es/src/events-v1-ticket-definition.types.js.map +1 -0
  178. package/build/es/src/events-v1-ticket-definition.universal.d.ts +619 -0
  179. package/build/es/src/events-v1-ticket-definition.universal.js +498 -0
  180. package/build/es/src/events-v1-ticket-definition.universal.js.map +1 -0
  181. package/build/es/src/events-v1-ticket.http.d.ts +31 -0
  182. package/build/es/src/events-v1-ticket.http.js +487 -0
  183. package/build/es/src/events-v1-ticket.http.js.map +1 -0
  184. package/build/es/src/events-v1-ticket.public.d.ts +10 -0
  185. package/build/es/src/events-v1-ticket.public.js +33 -0
  186. package/build/es/src/events-v1-ticket.public.js.map +1 -0
  187. package/build/es/src/events-v1-ticket.types.d.ts +448 -0
  188. package/build/es/src/events-v1-ticket.types.js +73 -0
  189. package/build/es/src/events-v1-ticket.types.js.map +1 -0
  190. package/build/es/src/events-v1-ticket.universal.d.ts +590 -0
  191. package/build/es/src/events-v1-ticket.universal.js +524 -0
  192. package/build/es/src/events-v1-ticket.universal.js.map +1 -0
  193. package/build/es/src/events-v2-policy.http.d.ts +28 -7
  194. package/build/es/src/events-v2-policy.http.js +28 -7
  195. package/build/es/src/events-v2-policy.http.js.map +1 -1
  196. package/build/es/src/events-v2-policy.universal.d.ts +53 -37
  197. package/build/es/src/events-v2-policy.universal.js +21 -7
  198. package/build/es/src/events-v2-policy.universal.js.map +1 -1
  199. package/package.json +2 -2
@@ -0,0 +1,1023 @@
1
+ import { toURLSearchParams } from '@wix/metro-runtime';
2
+ import { serializer } from '@wix/metro-runtime/ambassador';
3
+ import { resolveUrl } from '@wix/metro-runtime';
4
+ const _address = { geocode: '_addressLocation' };
5
+ const _addressLocation = {
6
+ latitude: 'google.protobuf.DoubleValue',
7
+ longitude: 'google.protobuf.DoubleValue',
8
+ };
9
+ const _bulkUpdateOrdersRequest = { fields: 'google.protobuf.FieldMask' };
10
+ const _bulkUpdateOrdersResponse = { orders: '_order' };
11
+ const _cancelReservationRequest = {};
12
+ const _cancelReservationResponse = {};
13
+ const _checkIn = { created: 'google.protobuf.Timestamp' };
14
+ const _checkoutRequest = {
15
+ overrideRequestTime: 'google.protobuf.Timestamp',
16
+ guests: '_guest',
17
+ };
18
+ const _checkoutResponse = {
19
+ expires: 'google.protobuf.Timestamp',
20
+ order: '_order',
21
+ reservations: '_ticketReservation',
22
+ };
23
+ const _confirmOrderRequest = {};
24
+ const _confirmOrderResponse = { orders: '_order' };
25
+ const _createReservationRequest = {
26
+ overrideRequestTime: 'google.protobuf.Timestamp',
27
+ };
28
+ const _createReservationResponse = {
29
+ expires: 'google.protobuf.Timestamp',
30
+ reservations: '_ticketReservation',
31
+ };
32
+ const _formattedAddress = { address: '_address' };
33
+ const _formResponse = { inputValues: '_inputValue' };
34
+ const _getCheckoutOptionsRequest = {};
35
+ const _getCheckoutOptionsResponse = {};
36
+ const _getInvoiceRequest = {};
37
+ const _getInvoiceResponse = {
38
+ expires: 'google.protobuf.Timestamp',
39
+ reservations: '_ticketReservation',
40
+ };
41
+ const _getOrderRequest = {};
42
+ const _getOrderResponse = { order: '_order' };
43
+ const _getSummaryRequest = {};
44
+ const _getSummaryResponse = {};
45
+ const _guest = { form: '_formResponse' };
46
+ const _guestDetails = { form: '_formResponse' };
47
+ const _inputValue = {
48
+ number: 'google.protobuf.DoubleValue',
49
+ dateTime: 'google.protobuf.Timestamp',
50
+ address: '_formattedAddress',
51
+ };
52
+ const _listAvailableTicketsRequest = {
53
+ overrideRequestTime: 'google.protobuf.Timestamp',
54
+ };
55
+ const _listAvailableTicketsResponse = { definitions: '_ticketDefinition' };
56
+ const _listOrdersRequest = {};
57
+ const _listOrdersResponse = { orders: '_order' };
58
+ const _order = {
59
+ created: 'google.protobuf.Timestamp',
60
+ checkoutForm: '_formResponse',
61
+ tickets: '_ticketingTicket',
62
+ };
63
+ const _queryAvailableTicketsRequest = {};
64
+ const _queryAvailableTicketsResponse = { definitions: '_ticketDefinition' };
65
+ const _ticketDefinition = { salePeriod: '_ticketSalePeriod' };
66
+ const _ticketingTicket = { checkIn: '_checkIn', guestDetails: '_guestDetails' };
67
+ const _ticketReservation = { ticket: '_ticketDefinition' };
68
+ const _ticketSalePeriod = {
69
+ startDate: 'google.protobuf.Timestamp',
70
+ endDate: 'google.protobuf.Timestamp',
71
+ };
72
+ const _updateCheckoutRequest = { guests: '_guest' };
73
+ const _updateCheckoutResponse = { order: '_order' };
74
+ const _updateOrderRequest = {
75
+ fields: 'google.protobuf.FieldMask',
76
+ checkoutForm: '_formResponse',
77
+ };
78
+ const _updateOrderResponse = { order: '_order' };
79
+ function resolveWixEventsTicketingCheckoutServiceUrl(opts) {
80
+ const domainToMappings = {
81
+ 'events._base_domain_': [
82
+ {
83
+ srcPath: '',
84
+ destPath: '',
85
+ },
86
+ {
87
+ srcPath: '/_api/wix-events-web',
88
+ destPath: '/api',
89
+ },
90
+ ],
91
+ 'www.wixevents.com': [
92
+ {
93
+ srcPath: '',
94
+ destPath: '',
95
+ },
96
+ {
97
+ srcPath: '/_api/wix-events-web',
98
+ destPath: '/api',
99
+ },
100
+ ],
101
+ 'api._api_base_domain_': [
102
+ {
103
+ srcPath: '/wix-events-web',
104
+ destPath: '',
105
+ },
106
+ ],
107
+ 'events.wixapps.net': [
108
+ {
109
+ srcPath: '/_api/wix-events-web',
110
+ destPath: '/api',
111
+ },
112
+ {
113
+ srcPath: '/events',
114
+ destPath: '',
115
+ },
116
+ ],
117
+ 'www._base_domain_': [
118
+ {
119
+ srcPath: '/_api/wix-events-web',
120
+ destPath: '/api',
121
+ },
122
+ {
123
+ srcPath: '/_api/wix-events-web/v1',
124
+ destPath: '/v1',
125
+ },
126
+ ],
127
+ 'api._base_domain_': [
128
+ {
129
+ srcPath: '/events/v1',
130
+ destPath: '/v1',
131
+ },
132
+ {
133
+ srcPath: '/events/v2',
134
+ destPath: '/v2',
135
+ },
136
+ ],
137
+ 'apps._base_domain_': [
138
+ {
139
+ srcPath: '/_api/wix-events-web',
140
+ destPath: '/api',
141
+ },
142
+ {
143
+ srcPath: '/events',
144
+ destPath: '',
145
+ },
146
+ ],
147
+ 'editor._base_domain_': [
148
+ {
149
+ srcPath: '/_api/wix-events-web/v1',
150
+ destPath: '/v1',
151
+ },
152
+ ],
153
+ 'blocks._base_domain_': [
154
+ {
155
+ srcPath: '/_api/wix-events-web/v1',
156
+ destPath: '/v1',
157
+ },
158
+ ],
159
+ 'create.editorx': [
160
+ {
161
+ srcPath: '/_api/wix-events-web/v1',
162
+ destPath: '/v1',
163
+ },
164
+ ],
165
+ _: [
166
+ {
167
+ srcPath: '/_api/wix-events-web/v1',
168
+ destPath: '/v1',
169
+ },
170
+ {
171
+ srcPath: '/_api/wix-events-web/v2',
172
+ destPath: '/v2',
173
+ },
174
+ ],
175
+ '*.dev.wix-code.com': [
176
+ {
177
+ srcPath: '/_api/wix-events-web/v1',
178
+ destPath: '/v1',
179
+ },
180
+ ],
181
+ '*.pub.wix-code.com': [
182
+ {
183
+ srcPath: '/_api/wix-events-web/v1',
184
+ destPath: '/v1',
185
+ },
186
+ ],
187
+ 'manage._base_domain_': [
188
+ {
189
+ srcPath: '/_api/wix-events-web',
190
+ destPath: '/api',
191
+ },
192
+ {
193
+ srcPath: '/_api/wix-events-web/v1/events',
194
+ destPath: '/v1/events',
195
+ },
196
+ {
197
+ srcPath: '/_api/wix-events-web/v1/categories',
198
+ destPath: '/v1/categories',
199
+ },
200
+ {
201
+ srcPath: '/_api/wix-events-web/v2/events',
202
+ destPath: '/v2/events',
203
+ },
204
+ {
205
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
206
+ destPath: '/v1/bulk/categories',
207
+ },
208
+ {
209
+ srcPath: '/_api/wix-events-web/v1/bulk/events',
210
+ destPath: '/v1/bulk/events',
211
+ },
212
+ {
213
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
214
+ destPath: '/v1/bulk-async/categories',
215
+ },
216
+ {
217
+ srcPath: '/_api/wix-events-web/v1/tickets',
218
+ destPath: '/v1/tickets',
219
+ },
220
+ {
221
+ srcPath: '/events/v1/events',
222
+ destPath: '/v1/events',
223
+ },
224
+ {
225
+ srcPath: '/events/v1/categories',
226
+ destPath: '/v1/categories',
227
+ },
228
+ {
229
+ srcPath: '/events/v1/bulk/categories',
230
+ destPath: '/v1/bulk/categories',
231
+ },
232
+ {
233
+ srcPath: '/events/v1/bulk-async/categories',
234
+ destPath: '/v1/bulk-async/categories',
235
+ },
236
+ {
237
+ srcPath: '/events/v1/bulk/events',
238
+ destPath: '/v1/bulk/events',
239
+ },
240
+ {
241
+ srcPath: '/events/v1/notifications',
242
+ destPath: '/v1/notifications',
243
+ },
244
+ {
245
+ srcPath: '/events/v1/reports',
246
+ destPath: '/v1/reports',
247
+ },
248
+ {
249
+ srcPath: '/events/v1/checkout',
250
+ destPath: '/v1/checkout',
251
+ },
252
+ {
253
+ srcPath: '/events/v1/tickets',
254
+ destPath: '/v1/tickets',
255
+ },
256
+ {
257
+ srcPath: '/events/v1/orders',
258
+ destPath: '/v1/orders',
259
+ },
260
+ {
261
+ srcPath: '/events/v1/site',
262
+ destPath: '/v1/site',
263
+ },
264
+ {
265
+ srcPath: '/events/v1/web',
266
+ destPath: '/v1/web',
267
+ },
268
+ {
269
+ srcPath: '/events/v2/tickets',
270
+ destPath: '/v2/tickets',
271
+ },
272
+ {
273
+ srcPath: '/events/v2/events',
274
+ destPath: '/v2/events',
275
+ },
276
+ ],
277
+ 'www.wixapis.com': [
278
+ {
279
+ srcPath: '/events/v1/events',
280
+ destPath: '/v1/events',
281
+ },
282
+ {
283
+ srcPath: '/events/v1/tickets',
284
+ destPath: '/v1/tickets',
285
+ },
286
+ {
287
+ srcPath: '/events/v1/categories',
288
+ destPath: '/v1/categories',
289
+ },
290
+ {
291
+ srcPath: '/events/v1/orders',
292
+ destPath: '/v1/orders',
293
+ },
294
+ {
295
+ srcPath: '/events/v1/bulk/categories',
296
+ destPath: '/v1/bulk/categories',
297
+ },
298
+ {
299
+ srcPath: '/events/v2/events',
300
+ destPath: '/v2/events',
301
+ },
302
+ {
303
+ srcPath: '/events/v1/bulk-async/categories',
304
+ destPath: '/v1/bulk-async/categories',
305
+ },
306
+ ],
307
+ 'editor-flow.wixapps.net': [
308
+ {
309
+ srcPath: '/_api/wix-events-web/v1',
310
+ destPath: '/v1',
311
+ },
312
+ ],
313
+ 'editor.wixapps.net': [
314
+ {
315
+ srcPath: '/_api/wix-events-web/v1',
316
+ destPath: '/v1',
317
+ },
318
+ {
319
+ srcPath: '/events/v2/events',
320
+ destPath: '/v2/events',
321
+ },
322
+ ],
323
+ };
324
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
325
+ }
326
+ function resolveWixEventsTicketingOrderManagementUrl(opts) {
327
+ const domainToMappings = {
328
+ 'events._base_domain_': [
329
+ {
330
+ srcPath: '',
331
+ destPath: '',
332
+ },
333
+ {
334
+ srcPath: '/_api/wix-events-web',
335
+ destPath: '/api',
336
+ },
337
+ ],
338
+ 'www.wixevents.com': [
339
+ {
340
+ srcPath: '',
341
+ destPath: '',
342
+ },
343
+ {
344
+ srcPath: '/_api/wix-events-web',
345
+ destPath: '/api',
346
+ },
347
+ ],
348
+ 'api._api_base_domain_': [
349
+ {
350
+ srcPath: '/wix-events-web',
351
+ destPath: '',
352
+ },
353
+ ],
354
+ 'events.wixapps.net': [
355
+ {
356
+ srcPath: '/_api/wix-events-web',
357
+ destPath: '/api',
358
+ },
359
+ {
360
+ srcPath: '/events',
361
+ destPath: '',
362
+ },
363
+ ],
364
+ 'www._base_domain_': [
365
+ {
366
+ srcPath: '/_api/wix-events-web',
367
+ destPath: '/api',
368
+ },
369
+ {
370
+ srcPath: '/_api/wix-events-web/v1',
371
+ destPath: '/v1',
372
+ },
373
+ ],
374
+ 'api._base_domain_': [
375
+ {
376
+ srcPath: '/events/v1',
377
+ destPath: '/v1',
378
+ },
379
+ {
380
+ srcPath: '/events/v2',
381
+ destPath: '/v2',
382
+ },
383
+ ],
384
+ 'apps._base_domain_': [
385
+ {
386
+ srcPath: '/_api/wix-events-web',
387
+ destPath: '/api',
388
+ },
389
+ {
390
+ srcPath: '/events',
391
+ destPath: '',
392
+ },
393
+ ],
394
+ 'editor._base_domain_': [
395
+ {
396
+ srcPath: '/_api/wix-events-web/v1',
397
+ destPath: '/v1',
398
+ },
399
+ ],
400
+ 'blocks._base_domain_': [
401
+ {
402
+ srcPath: '/_api/wix-events-web/v1',
403
+ destPath: '/v1',
404
+ },
405
+ ],
406
+ 'create.editorx': [
407
+ {
408
+ srcPath: '/_api/wix-events-web/v1',
409
+ destPath: '/v1',
410
+ },
411
+ ],
412
+ _: [
413
+ {
414
+ srcPath: '/_api/wix-events-web/v1',
415
+ destPath: '/v1',
416
+ },
417
+ {
418
+ srcPath: '/_api/wix-events-web/v2',
419
+ destPath: '/v2',
420
+ },
421
+ ],
422
+ '*.dev.wix-code.com': [
423
+ {
424
+ srcPath: '/_api/wix-events-web/v1',
425
+ destPath: '/v1',
426
+ },
427
+ ],
428
+ '*.pub.wix-code.com': [
429
+ {
430
+ srcPath: '/_api/wix-events-web/v1',
431
+ destPath: '/v1',
432
+ },
433
+ ],
434
+ 'manage._base_domain_': [
435
+ {
436
+ srcPath: '/_api/wix-events-web',
437
+ destPath: '/api',
438
+ },
439
+ {
440
+ srcPath: '/_api/wix-events-web/v1/events',
441
+ destPath: '/v1/events',
442
+ },
443
+ {
444
+ srcPath: '/_api/wix-events-web/v1/categories',
445
+ destPath: '/v1/categories',
446
+ },
447
+ {
448
+ srcPath: '/_api/wix-events-web/v2/events',
449
+ destPath: '/v2/events',
450
+ },
451
+ {
452
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
453
+ destPath: '/v1/bulk/categories',
454
+ },
455
+ {
456
+ srcPath: '/_api/wix-events-web/v1/bulk/events',
457
+ destPath: '/v1/bulk/events',
458
+ },
459
+ {
460
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
461
+ destPath: '/v1/bulk-async/categories',
462
+ },
463
+ {
464
+ srcPath: '/_api/wix-events-web/v1/tickets',
465
+ destPath: '/v1/tickets',
466
+ },
467
+ {
468
+ srcPath: '/events/v1/events',
469
+ destPath: '/v1/events',
470
+ },
471
+ {
472
+ srcPath: '/events/v1/categories',
473
+ destPath: '/v1/categories',
474
+ },
475
+ {
476
+ srcPath: '/events/v1/bulk/categories',
477
+ destPath: '/v1/bulk/categories',
478
+ },
479
+ {
480
+ srcPath: '/events/v1/bulk-async/categories',
481
+ destPath: '/v1/bulk-async/categories',
482
+ },
483
+ {
484
+ srcPath: '/events/v1/bulk/events',
485
+ destPath: '/v1/bulk/events',
486
+ },
487
+ {
488
+ srcPath: '/events/v1/notifications',
489
+ destPath: '/v1/notifications',
490
+ },
491
+ {
492
+ srcPath: '/events/v1/reports',
493
+ destPath: '/v1/reports',
494
+ },
495
+ {
496
+ srcPath: '/events/v1/checkout',
497
+ destPath: '/v1/checkout',
498
+ },
499
+ {
500
+ srcPath: '/events/v1/tickets',
501
+ destPath: '/v1/tickets',
502
+ },
503
+ {
504
+ srcPath: '/events/v1/orders',
505
+ destPath: '/v1/orders',
506
+ },
507
+ {
508
+ srcPath: '/events/v1/site',
509
+ destPath: '/v1/site',
510
+ },
511
+ {
512
+ srcPath: '/events/v1/web',
513
+ destPath: '/v1/web',
514
+ },
515
+ {
516
+ srcPath: '/events/v2/tickets',
517
+ destPath: '/v2/tickets',
518
+ },
519
+ {
520
+ srcPath: '/events/v2/events',
521
+ destPath: '/v2/events',
522
+ },
523
+ ],
524
+ 'www.wixapis.com': [
525
+ {
526
+ srcPath: '/events/v1/events',
527
+ destPath: '/v1/events',
528
+ },
529
+ {
530
+ srcPath: '/events/v1/tickets',
531
+ destPath: '/v1/tickets',
532
+ },
533
+ {
534
+ srcPath: '/events/v1/categories',
535
+ destPath: '/v1/categories',
536
+ },
537
+ {
538
+ srcPath: '/events/v1/orders',
539
+ destPath: '/v1/orders',
540
+ },
541
+ {
542
+ srcPath: '/events/v1/bulk/categories',
543
+ destPath: '/v1/bulk/categories',
544
+ },
545
+ {
546
+ srcPath: '/events/v2/events',
547
+ destPath: '/v2/events',
548
+ },
549
+ {
550
+ srcPath: '/events/v1/bulk-async/categories',
551
+ destPath: '/v1/bulk-async/categories',
552
+ },
553
+ ],
554
+ 'editor-flow.wixapps.net': [
555
+ {
556
+ srcPath: '/_api/wix-events-web/v1',
557
+ destPath: '/v1',
558
+ },
559
+ ],
560
+ 'editor.wixapps.net': [
561
+ {
562
+ srcPath: '/_api/wix-events-web/v1',
563
+ destPath: '/v1',
564
+ },
565
+ {
566
+ srcPath: '/events/v2/events',
567
+ destPath: '/v2/events',
568
+ },
569
+ ],
570
+ };
571
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
572
+ }
573
+ /**
574
+ * Retrieves a list of orders, including ticket data, with basic filter support.
575
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
576
+ */
577
+ export function listOrders(payload) {
578
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_listOrdersRequest, {});
579
+ const { fromJSON: fromRes } = serializer(_listOrdersResponse, {
580
+ _address,
581
+ _addressLocation,
582
+ _checkIn,
583
+ _formResponse,
584
+ _formattedAddress,
585
+ _guestDetails,
586
+ _inputValue,
587
+ _order,
588
+ _ticketingTicket,
589
+ });
590
+ function __listOrders({ host }) {
591
+ const serializedData = toReq(payload);
592
+ const metadata = {
593
+ method: 'GET',
594
+ url: resolveWixEventsTicketingOrderManagementUrl({
595
+ protoPath: '/v1/orders',
596
+ data: serializedData,
597
+ host,
598
+ }),
599
+ params: toURLSearchParams(serializedData),
600
+ transformResponse: fromRes,
601
+ };
602
+ return metadata;
603
+ }
604
+ __listOrders.fromReq = fromReq;
605
+ return __listOrders;
606
+ }
607
+ /**
608
+ * Retrieves an order, including ticket data.
609
+ * >The fieldsets in this function are restricted and only run if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
610
+ */
611
+ export function getOrder(payload) {
612
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_getOrderRequest, {});
613
+ const { fromJSON: fromRes } = serializer(_getOrderResponse, {
614
+ _address,
615
+ _addressLocation,
616
+ _checkIn,
617
+ _formResponse,
618
+ _formattedAddress,
619
+ _guestDetails,
620
+ _inputValue,
621
+ _order,
622
+ _ticketingTicket,
623
+ });
624
+ function __getOrder({ host }) {
625
+ const serializedData = toReq(payload);
626
+ const metadata = {
627
+ method: 'GET',
628
+ url: resolveWixEventsTicketingOrderManagementUrl({
629
+ protoPath: '/v1/events/{eventId}/orders/{orderNumber}',
630
+ data: serializedData,
631
+ host,
632
+ }),
633
+ params: toURLSearchParams(serializedData),
634
+ transformResponse: fromRes,
635
+ };
636
+ return metadata;
637
+ }
638
+ __getOrder.fromReq = fromReq;
639
+ return __getOrder;
640
+ }
641
+ /**
642
+ * Updates an order's `checkoutForm` and/or `archived` status.
643
+ * >Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
644
+ */
645
+ export function updateOrder(payload) {
646
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateOrderRequest, {
647
+ _address,
648
+ _addressLocation,
649
+ _formResponse,
650
+ _formattedAddress,
651
+ _inputValue,
652
+ });
653
+ const { fromJSON: fromRes } = serializer(_updateOrderResponse, {
654
+ _address,
655
+ _addressLocation,
656
+ _checkIn,
657
+ _formResponse,
658
+ _formattedAddress,
659
+ _guestDetails,
660
+ _inputValue,
661
+ _order,
662
+ _ticketingTicket,
663
+ });
664
+ function __updateOrder({ host }) {
665
+ const serializedData = toReq(payload);
666
+ const metadata = {
667
+ method: 'PATCH',
668
+ url: resolveWixEventsTicketingOrderManagementUrl({
669
+ protoPath: '/v1/events/{eventId}/orders/{orderNumber}',
670
+ data: serializedData,
671
+ host,
672
+ }),
673
+ data: serializedData,
674
+ transformResponse: fromRes,
675
+ };
676
+ return metadata;
677
+ }
678
+ __updateOrder.fromReq = fromReq;
679
+ return __updateOrder;
680
+ }
681
+ /**
682
+ * Updates multiple orders' `archived` status.
683
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
684
+ */
685
+ export function bulkUpdateOrders(payload) {
686
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_bulkUpdateOrdersRequest, {});
687
+ const { fromJSON: fromRes } = serializer(_bulkUpdateOrdersResponse, {
688
+ _address,
689
+ _addressLocation,
690
+ _checkIn,
691
+ _formResponse,
692
+ _formattedAddress,
693
+ _guestDetails,
694
+ _inputValue,
695
+ _order,
696
+ _ticketingTicket,
697
+ });
698
+ function __bulkUpdateOrders({ host }) {
699
+ const serializedData = toReq(payload);
700
+ const metadata = {
701
+ method: 'PATCH',
702
+ url: resolveWixEventsTicketingOrderManagementUrl({
703
+ protoPath: '/v1/events/{eventId}/orders',
704
+ data: serializedData,
705
+ host,
706
+ }),
707
+ data: serializedData,
708
+ transformResponse: fromRes,
709
+ };
710
+ return metadata;
711
+ }
712
+ __bulkUpdateOrders.fromReq = fromReq;
713
+ return __bulkUpdateOrders;
714
+ }
715
+ /**
716
+ * Changes order status from "INITIATED, "PENDING", or "OFFLINE_PENDING" to "PAID". Previously confirmed orders (with status "PAID" or "FREE") are not changed. Confirming previously "INITIATED" or "PENDING" orders triggers an email with the tickets to the buyer (and to additional guests, if relevant and provided).
717
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
718
+ */
719
+ export function confirmOrder(payload) {
720
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_confirmOrderRequest, {});
721
+ const { fromJSON: fromRes } = serializer(_confirmOrderResponse, {
722
+ _address,
723
+ _addressLocation,
724
+ _checkIn,
725
+ _formResponse,
726
+ _formattedAddress,
727
+ _guestDetails,
728
+ _inputValue,
729
+ _order,
730
+ _ticketingTicket,
731
+ });
732
+ function __confirmOrder({ host }) {
733
+ const serializedData = toReq(payload);
734
+ const metadata = {
735
+ method: 'POST',
736
+ url: resolveWixEventsTicketingOrderManagementUrl({
737
+ protoPath: '/v1/events/{eventId}/orders/confirm',
738
+ data: serializedData,
739
+ host,
740
+ }),
741
+ data: serializedData,
742
+ transformResponse: fromRes,
743
+ };
744
+ return metadata;
745
+ }
746
+ __confirmOrder.fromReq = fromReq;
747
+ return __confirmOrder;
748
+ }
749
+ /**
750
+ * Retrieves a summary of total ticket sales.
751
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
752
+ */
753
+ export function getSummary(payload) {
754
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_getSummaryRequest, {});
755
+ const { fromJSON: fromRes } = serializer(_getSummaryResponse, {});
756
+ function __getSummary({ host }) {
757
+ const serializedData = toReq(payload);
758
+ const metadata = {
759
+ method: 'GET',
760
+ url: resolveWixEventsTicketingOrderManagementUrl({
761
+ protoPath: '/v1/orders/summary',
762
+ data: serializedData,
763
+ host,
764
+ }),
765
+ params: toURLSearchParams(serializedData),
766
+ transformResponse: fromRes,
767
+ };
768
+ return metadata;
769
+ }
770
+ __getSummary.fromReq = fromReq;
771
+ return __getSummary;
772
+ }
773
+ /**
774
+ * Returns checkout meta data used in checkout UX.
775
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
776
+ */
777
+ export function getCheckoutOptions(payload) {
778
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_getCheckoutOptionsRequest, {});
779
+ const { fromJSON: fromRes } = serializer(_getCheckoutOptionsResponse, {});
780
+ function __getCheckoutOptions({ host }) {
781
+ const serializedData = toReq(payload);
782
+ const metadata = {
783
+ method: 'GET',
784
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
785
+ protoPath: '/v1/checkout/options',
786
+ data: serializedData,
787
+ host,
788
+ }),
789
+ params: toURLSearchParams(serializedData),
790
+ transformResponse: fromRes,
791
+ };
792
+ return metadata;
793
+ }
794
+ __getCheckoutOptions.fromReq = fromReq;
795
+ return __getCheckoutOptions;
796
+ }
797
+ /**
798
+ * Returns tickets available to reserve.
799
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
800
+ */
801
+ export function listAvailableTickets(payload) {
802
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_listAvailableTicketsRequest, {});
803
+ const { fromJSON: fromRes } = serializer(_listAvailableTicketsResponse, {
804
+ _ticketDefinition,
805
+ _ticketSalePeriod,
806
+ });
807
+ function __listAvailableTickets({ host }) {
808
+ const serializedData = toReq(payload);
809
+ const metadata = {
810
+ method: 'GET',
811
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
812
+ protoPath: '/v1/tickets/available',
813
+ data: serializedData,
814
+ host,
815
+ }),
816
+ params: toURLSearchParams(serializedData),
817
+ transformResponse: fromRes,
818
+ };
819
+ return metadata;
820
+ }
821
+ __listAvailableTickets.fromReq = fromReq;
822
+ return __listAvailableTickets;
823
+ }
824
+ /**
825
+ * Returns tickets available to reserve.
826
+ * > Note: The fieldsets in this function are restricted and only run if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
827
+ */
828
+ export function queryAvailableTickets(payload) {
829
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_queryAvailableTicketsRequest, {});
830
+ const { fromJSON: fromRes } = serializer(_queryAvailableTicketsResponse, {
831
+ _ticketDefinition,
832
+ _ticketSalePeriod,
833
+ });
834
+ function __queryAvailableTickets({ host }) {
835
+ const serializedData = toReq(payload);
836
+ const metadata = {
837
+ method: 'POST',
838
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
839
+ protoPath: '/v1/tickets/available/query',
840
+ data: serializedData,
841
+ host,
842
+ }),
843
+ data: serializedData,
844
+ transformResponse: fromRes,
845
+ };
846
+ return metadata;
847
+ }
848
+ __queryAvailableTickets.fromReq = fromReq;
849
+ return __queryAvailableTickets;
850
+ }
851
+ /**
852
+ * Reserves tickets for 20 minutes.
853
+ * Reserved tickets are deducted from tickets stock and cannot be bought by another party.
854
+ * When the reservation expires, the tickets are added back in the stock.
855
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
856
+ */
857
+ export function createReservation(payload) {
858
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_createReservationRequest, {});
859
+ const { fromJSON: fromRes } = serializer(_createReservationResponse, {
860
+ _ticketDefinition,
861
+ _ticketReservation,
862
+ _ticketSalePeriod,
863
+ });
864
+ function __createReservation({ host }) {
865
+ const serializedData = toReq(payload);
866
+ const metadata = {
867
+ method: 'POST',
868
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
869
+ protoPath: '/v1/events/{eventId}/tickets/reservation',
870
+ data: serializedData,
871
+ host,
872
+ }),
873
+ data: serializedData,
874
+ transformResponse: fromRes,
875
+ };
876
+ return metadata;
877
+ }
878
+ __createReservation.fromReq = fromReq;
879
+ return __createReservation;
880
+ }
881
+ /**
882
+ * Cancels ticket reservation and returns tickets to stock.
883
+ *
884
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
885
+ */
886
+ export function cancelReservation(payload) {
887
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_cancelReservationRequest, {});
888
+ const { fromJSON: fromRes } = serializer(_cancelReservationResponse, {});
889
+ function __cancelReservation({ host }) {
890
+ const serializedData = toReq(payload);
891
+ const metadata = {
892
+ method: 'DELETE',
893
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
894
+ protoPath: '/v1/events/{eventId}/tickets/reservation/{id}',
895
+ data: serializedData,
896
+ host,
897
+ }),
898
+ params: toURLSearchParams(serializedData),
899
+ transformResponse: fromRes,
900
+ };
901
+ return metadata;
902
+ }
903
+ __cancelReservation.fromReq = fromReq;
904
+ return __cancelReservation;
905
+ }
906
+ /**
907
+ * Generates a preview of a reservation invoice, including the given coupon or pricing plan.
908
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
909
+ */
910
+ export function getInvoice(payload) {
911
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_getInvoiceRequest, {});
912
+ const { fromJSON: fromRes } = serializer(_getInvoiceResponse, {
913
+ _ticketDefinition,
914
+ _ticketReservation,
915
+ _ticketSalePeriod,
916
+ });
917
+ function __getInvoice({ host }) {
918
+ const serializedData = toReq(payload);
919
+ const metadata = {
920
+ method: 'POST',
921
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
922
+ protoPath: '/v1/events/{eventId}/tickets/reservation/{reservationId}/invoice',
923
+ data: serializedData,
924
+ host,
925
+ }),
926
+ data: serializedData,
927
+ transformResponse: fromRes,
928
+ };
929
+ return metadata;
930
+ }
931
+ __getInvoice.fromReq = fromReq;
932
+ return __getInvoice;
933
+ }
934
+ /**
935
+ * Checkout reserved tickets.
936
+ * Creates order and associates it with a site contact.
937
+ * Guest details must be sent according to Registration Form input fields.
938
+ * (To change an existing "INITIATED, "PENDING", or "OFFLINE_PENDING" order, call the [Update Checkout](https://dev.wix.com/api/rest/wix-events/wix-events/checkout/update-checkout) endpoint).
939
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
940
+ */
941
+ export function checkout(payload) {
942
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_checkoutRequest, {
943
+ _address,
944
+ _addressLocation,
945
+ _formResponse,
946
+ _formattedAddress,
947
+ _guest,
948
+ _inputValue,
949
+ });
950
+ const { fromJSON: fromRes } = serializer(_checkoutResponse, {
951
+ _address,
952
+ _addressLocation,
953
+ _checkIn,
954
+ _formResponse,
955
+ _formattedAddress,
956
+ _guestDetails,
957
+ _inputValue,
958
+ _order,
959
+ _ticketDefinition,
960
+ _ticketReservation,
961
+ _ticketSalePeriod,
962
+ _ticketingTicket,
963
+ });
964
+ function __checkout({ host }) {
965
+ const serializedData = toReq(payload);
966
+ const metadata = {
967
+ method: 'POST',
968
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
969
+ protoPath: '/v1/events/{eventId}/tickets/checkout',
970
+ data: serializedData,
971
+ host,
972
+ }),
973
+ data: serializedData,
974
+ transformResponse: fromRes,
975
+ };
976
+ return metadata;
977
+ }
978
+ __checkout.fromReq = fromReq;
979
+ return __checkout;
980
+ }
981
+ /**
982
+ * Updates order and tickets (supported only for unconfirmed orders).
983
+ * Guest details must be sent according to Registration Form input fields.
984
+ * > Note: This function is restricted and only runs if you elevate permissions using the [wix-auth.elevate()](https://www.wix.com/velo/reference/wix-auth/elevate) function.
985
+ */
986
+ export function updateCheckout(payload) {
987
+ const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateCheckoutRequest, {
988
+ _address,
989
+ _addressLocation,
990
+ _formResponse,
991
+ _formattedAddress,
992
+ _guest,
993
+ _inputValue,
994
+ });
995
+ const { fromJSON: fromRes } = serializer(_updateCheckoutResponse, {
996
+ _address,
997
+ _addressLocation,
998
+ _checkIn,
999
+ _formResponse,
1000
+ _formattedAddress,
1001
+ _guestDetails,
1002
+ _inputValue,
1003
+ _order,
1004
+ _ticketingTicket,
1005
+ });
1006
+ function __updateCheckout({ host }) {
1007
+ const serializedData = toReq(payload);
1008
+ const metadata = {
1009
+ method: 'PATCH',
1010
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
1011
+ protoPath: '/v1/events/{eventId}/tickets/checkout/{orderNumber}',
1012
+ data: serializedData,
1013
+ host,
1014
+ }),
1015
+ data: serializedData,
1016
+ transformResponse: fromRes,
1017
+ };
1018
+ return metadata;
1019
+ }
1020
+ __updateCheckout.fromReq = fromReq;
1021
+ return __updateCheckout;
1022
+ }
1023
+ //# sourceMappingURL=events-v1-order-orders.http.js.map