@wix/auto_sdk_events_orders 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/events-v1-order-orders.context.d.ts +42 -0
  11. package/build/cjs/src/events-v1-order-orders.context.js +62 -0
  12. package/build/cjs/src/events-v1-order-orders.context.js.map +1 -0
  13. package/build/cjs/src/events-v1-order-orders.http.d.ts +97 -0
  14. package/build/cjs/src/events-v1-order-orders.http.js +1635 -0
  15. package/build/cjs/src/events-v1-order-orders.http.js.map +1 -0
  16. package/build/cjs/src/events-v1-order-orders.meta.d.ts +49 -0
  17. package/build/cjs/src/events-v1-order-orders.meta.js +351 -0
  18. package/build/cjs/src/events-v1-order-orders.meta.js.map +1 -0
  19. package/build/cjs/src/events-v1-order-orders.public.d.ts +202 -0
  20. package/build/cjs/src/events-v1-order-orders.public.js +248 -0
  21. package/build/cjs/src/events-v1-order-orders.public.js.map +1 -0
  22. package/build/cjs/src/events-v1-order-orders.types.d.ts +1854 -0
  23. package/build/cjs/src/events-v1-order-orders.types.js +178 -0
  24. package/build/cjs/src/events-v1-order-orders.types.js.map +1 -0
  25. package/build/cjs/src/events-v1-order-orders.universal.d.ts +2536 -0
  26. package/build/cjs/src/events-v1-order-orders.universal.js +1146 -0
  27. package/build/cjs/src/events-v1-order-orders.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/events-v1-order-orders.context.d.ts +42 -0
  39. package/build/es/src/events-v1-order-orders.context.js +42 -0
  40. package/build/es/src/events-v1-order-orders.context.js.map +1 -0
  41. package/build/es/src/events-v1-order-orders.http.d.ts +97 -0
  42. package/build/es/src/events-v1-order-orders.http.js +1615 -0
  43. package/build/es/src/events-v1-order-orders.http.js.map +1 -0
  44. package/build/es/src/events-v1-order-orders.meta.d.ts +49 -0
  45. package/build/es/src/events-v1-order-orders.meta.js +308 -0
  46. package/build/es/src/events-v1-order-orders.meta.js.map +1 -0
  47. package/build/es/src/events-v1-order-orders.public.d.ts +202 -0
  48. package/build/es/src/events-v1-order-orders.public.js +211 -0
  49. package/build/es/src/events-v1-order-orders.public.js.map +1 -0
  50. package/build/es/src/events-v1-order-orders.types.d.ts +1854 -0
  51. package/build/es/src/events-v1-order-orders.types.js +175 -0
  52. package/build/es/src/events-v1-order-orders.types.js.map +1 -0
  53. package/build/es/src/events-v1-order-orders.universal.d.ts +2536 -0
  54. package/build/es/src/events-v1-order-orders.universal.js +1103 -0
  55. package/build/es/src/events-v1-order-orders.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/events-v1-order-orders.context.d.ts +42 -0
  66. package/build/internal/cjs/src/events-v1-order-orders.context.js +62 -0
  67. package/build/internal/cjs/src/events-v1-order-orders.context.js.map +1 -0
  68. package/build/internal/cjs/src/events-v1-order-orders.http.d.ts +97 -0
  69. package/build/internal/cjs/src/events-v1-order-orders.http.js +1635 -0
  70. package/build/internal/cjs/src/events-v1-order-orders.http.js.map +1 -0
  71. package/build/internal/cjs/src/events-v1-order-orders.meta.d.ts +49 -0
  72. package/build/internal/cjs/src/events-v1-order-orders.meta.js +351 -0
  73. package/build/internal/cjs/src/events-v1-order-orders.meta.js.map +1 -0
  74. package/build/internal/cjs/src/events-v1-order-orders.public.d.ts +202 -0
  75. package/build/internal/cjs/src/events-v1-order-orders.public.js +248 -0
  76. package/build/internal/cjs/src/events-v1-order-orders.public.js.map +1 -0
  77. package/build/internal/cjs/src/events-v1-order-orders.types.d.ts +1854 -0
  78. package/build/internal/cjs/src/events-v1-order-orders.types.js +178 -0
  79. package/build/internal/cjs/src/events-v1-order-orders.types.js.map +1 -0
  80. package/build/internal/cjs/src/events-v1-order-orders.universal.d.ts +2536 -0
  81. package/build/internal/cjs/src/events-v1-order-orders.universal.js +1146 -0
  82. package/build/internal/cjs/src/events-v1-order-orders.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/events-v1-order-orders.context.d.ts +42 -0
  93. package/build/internal/es/src/events-v1-order-orders.context.js +42 -0
  94. package/build/internal/es/src/events-v1-order-orders.context.js.map +1 -0
  95. package/build/internal/es/src/events-v1-order-orders.http.d.ts +97 -0
  96. package/build/internal/es/src/events-v1-order-orders.http.js +1615 -0
  97. package/build/internal/es/src/events-v1-order-orders.http.js.map +1 -0
  98. package/build/internal/es/src/events-v1-order-orders.meta.d.ts +49 -0
  99. package/build/internal/es/src/events-v1-order-orders.meta.js +308 -0
  100. package/build/internal/es/src/events-v1-order-orders.meta.js.map +1 -0
  101. package/build/internal/es/src/events-v1-order-orders.public.d.ts +202 -0
  102. package/build/internal/es/src/events-v1-order-orders.public.js +211 -0
  103. package/build/internal/es/src/events-v1-order-orders.public.js.map +1 -0
  104. package/build/internal/es/src/events-v1-order-orders.types.d.ts +1854 -0
  105. package/build/internal/es/src/events-v1-order-orders.types.js +175 -0
  106. package/build/internal/es/src/events-v1-order-orders.types.js.map +1 -0
  107. package/build/internal/es/src/events-v1-order-orders.universal.d.ts +2536 -0
  108. package/build/internal/es/src/events-v1-order-orders.universal.js +1103 -0
  109. package/build/internal/es/src/events-v1-order-orders.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1615 @@
1
+ import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';
2
+ import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';
3
+ import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';
4
+ import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
5
+ import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
6
+ import { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';
7
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
8
+ import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
9
+ function resolveWixEventsTicketingCheckoutServiceUrl(opts) {
10
+ const domainToMappings = {
11
+ 'manage._base_domain_': [
12
+ {
13
+ srcPath: '/events/v1/ticket-definitions',
14
+ destPath: '/v1/ticket-definitions',
15
+ },
16
+ {
17
+ srcPath: '/events/v2/ticket-definitions',
18
+ destPath: '/v2/ticket-definitions',
19
+ },
20
+ {
21
+ srcPath: '/events/v1/tickets/available',
22
+ destPath: '/v1/tickets/available',
23
+ },
24
+ {
25
+ srcPath: '/events/v1/checkout',
26
+ destPath: '/v1/checkout',
27
+ },
28
+ {
29
+ srcPath: '/events/v1/pos-checkout',
30
+ destPath: '/v1/pos-checkout',
31
+ },
32
+ {
33
+ srcPath: '/_api/events/v1/ticket-definitions',
34
+ destPath: '/v1/ticket-definitions',
35
+ },
36
+ {
37
+ srcPath: '/_api/events/v2/ticket-definitions',
38
+ destPath: '/v2/ticket-definitions',
39
+ },
40
+ {
41
+ srcPath: '/_api/events/v1/tickets/available',
42
+ destPath: '/v1/tickets/available',
43
+ },
44
+ {
45
+ srcPath: '/_api/events/v1/pos-checkout',
46
+ destPath: '/v1/pos-checkout',
47
+ },
48
+ {
49
+ srcPath: '/_api/events/v1/checkout',
50
+ destPath: '/v1/checkout',
51
+ },
52
+ {
53
+ srcPath: '/_api/events-ticketing-v1-proxy',
54
+ destPath: '/api',
55
+ },
56
+ ],
57
+ 'www.wixapis.com': [
58
+ {
59
+ srcPath: '/events/v1/ticket-definitions',
60
+ destPath: '/v1/ticket-definitions',
61
+ },
62
+ {
63
+ srcPath: '/events/v2/ticket-definitions',
64
+ destPath: '/v2/ticket-definitions',
65
+ },
66
+ {
67
+ srcPath: '/events/v1/tickets/available',
68
+ destPath: '/v1/tickets/available',
69
+ },
70
+ {
71
+ srcPath: '/events/v1/checkout',
72
+ destPath: '/v1/checkout',
73
+ },
74
+ {
75
+ srcPath: '/events/v1/pos-checkout',
76
+ destPath: '/v1/pos-checkout',
77
+ },
78
+ ],
79
+ _: [
80
+ {
81
+ srcPath: '/_api/events/v1/ticket-definitions',
82
+ destPath: '/v1/ticket-definitions',
83
+ },
84
+ {
85
+ srcPath: '/_api/events/v2/ticket-definition',
86
+ destPath: '/v2/ticket-definitions',
87
+ },
88
+ {
89
+ srcPath: '/_api/events/v1/tickets/available',
90
+ destPath: '/v1/tickets/available',
91
+ },
92
+ {
93
+ srcPath: '/_api/events/v1/pos-checkout',
94
+ destPath: '/v1/pos-checkout',
95
+ },
96
+ {
97
+ srcPath: '/_api/events/v1/checkout',
98
+ destPath: '/v1/checkout',
99
+ },
100
+ {
101
+ srcPath: '/_api/events-ticketing-v1-proxy/v1',
102
+ destPath: '/v1',
103
+ },
104
+ {
105
+ srcPath: '/_api/events-ticketing-v1-proxy/v2',
106
+ destPath: '/v2',
107
+ },
108
+ {
109
+ srcPath: '/_api/wix-events-web/v1/checkout',
110
+ destPath: '/v1/checkout',
111
+ },
112
+ {
113
+ srcPath: '/_api/wix-events-web/v1/pos-checkout',
114
+ destPath: '/v1/pos-checkout',
115
+ },
116
+ {
117
+ srcPath: '/_api/wix-events-web/v1/ticket-definitions',
118
+ destPath: '/v1/ticket-definitions',
119
+ },
120
+ {
121
+ srcPath: '/_api/wix-events-web/v1/tickets/available',
122
+ destPath: '/v1/tickets/available',
123
+ },
124
+ ],
125
+ 'editor._base_domain_': [
126
+ {
127
+ srcPath: '/_api/events/v1/ticket-definitions',
128
+ destPath: '/v1/ticket-definitions',
129
+ },
130
+ {
131
+ srcPath: '/_api/events/v2/ticket-definitions',
132
+ destPath: '/v2/ticket-definitions',
133
+ },
134
+ {
135
+ srcPath: '/_api/events/v1/tickets/available',
136
+ destPath: '/v1/tickets/available',
137
+ },
138
+ {
139
+ srcPath: '/_api/events/v1/pos-checkout',
140
+ destPath: '/v1/pos-checkout',
141
+ },
142
+ {
143
+ srcPath: '/_api/events/v1/checkout',
144
+ destPath: '/v1/checkout',
145
+ },
146
+ {
147
+ srcPath: '/_api/wix-events-web/v1/checkout',
148
+ destPath: '/v1/checkout',
149
+ },
150
+ {
151
+ srcPath: '/_api/wix-events-web/v1/ticket-definitions',
152
+ destPath: '/v1/ticket-definitions',
153
+ },
154
+ {
155
+ srcPath: '/_api/wix-events-web/v1/tickets/available',
156
+ destPath: '/v1/tickets/available',
157
+ },
158
+ {
159
+ srcPath: '/_api/wix-events-web/v1/pos-checkout',
160
+ destPath: '/v1/pos-checkout',
161
+ },
162
+ ],
163
+ 'blocks._base_domain_': [
164
+ {
165
+ srcPath: '/_api/events/v1/ticket-definitions',
166
+ destPath: '/v1/ticket-definitions',
167
+ },
168
+ {
169
+ srcPath: '/_api/events/v2/ticket-definitions',
170
+ destPath: '/v2/ticket-definitions',
171
+ },
172
+ {
173
+ srcPath: '/_api/events/v1/tickets/available',
174
+ destPath: '/v1/tickets/available',
175
+ },
176
+ {
177
+ srcPath: '/_api/events/v1/pos-checkout',
178
+ destPath: '/v1/pos-checkout',
179
+ },
180
+ {
181
+ srcPath: '/_api/events/v1/checkout',
182
+ destPath: '/v1/checkout',
183
+ },
184
+ {
185
+ srcPath: '/_api/wix-events-web/v1/checkout',
186
+ destPath: '/v1/checkout',
187
+ },
188
+ {
189
+ srcPath: '/_api/wix-events-web/v1/ticket-definitions',
190
+ destPath: '/v1/ticket-definitions',
191
+ },
192
+ {
193
+ srcPath: '/_api/wix-events-web/v1/tickets/available',
194
+ destPath: '/v1/tickets/available',
195
+ },
196
+ {
197
+ srcPath: '/_api/wix-events-web/v1/pos-checkout',
198
+ destPath: '/v1/pos-checkout',
199
+ },
200
+ ],
201
+ 'create.editorx': [
202
+ {
203
+ srcPath: '/_api/events/v1/ticket-definitions',
204
+ destPath: '/v1/ticket-definitions',
205
+ },
206
+ {
207
+ srcPath: '/_api/events/v2/ticket-definitions',
208
+ destPath: '/v2/ticket-definitions',
209
+ },
210
+ {
211
+ srcPath: '/_api/events/v1/tickets/available',
212
+ destPath: '/v1/tickets/available',
213
+ },
214
+ {
215
+ srcPath: '/_api/events/v1/pos-checkout',
216
+ destPath: '/v1/pos-checkout',
217
+ },
218
+ {
219
+ srcPath: '/_api/events/v1/checkout',
220
+ destPath: '/v1/checkout',
221
+ },
222
+ {
223
+ srcPath: '/_api/wix-events-web/v1/checkout',
224
+ destPath: '/v1/checkout',
225
+ },
226
+ {
227
+ srcPath: '/_api/wix-events-web/v1/ticket-definitions',
228
+ destPath: '/v1/ticket-definitions',
229
+ },
230
+ {
231
+ srcPath: '/_api/wix-events-web/v1/tickets/available',
232
+ destPath: '/v1/tickets/available',
233
+ },
234
+ {
235
+ srcPath: '/_api/wix-events-web/v1/pos-checkout',
236
+ destPath: '/v1/pos-checkout',
237
+ },
238
+ ],
239
+ '*.dev.wix-code.com': [
240
+ {
241
+ srcPath: '/_api/wix-events-web/v1/checkout',
242
+ destPath: '/v1/checkout',
243
+ },
244
+ {
245
+ srcPath: '/_api/wix-events-web/v1/pos-checkout',
246
+ destPath: '/v1/pos-checkout',
247
+ },
248
+ {
249
+ srcPath: '/_api/wix-events-web/v1/ticket-definitions',
250
+ destPath: '/v1/ticket-definitions',
251
+ },
252
+ {
253
+ srcPath: '/_api/wix-events-web/v1/tickets/available',
254
+ destPath: '/v1/tickets/available',
255
+ },
256
+ ],
257
+ '*.pub.wix-code.com': [
258
+ {
259
+ srcPath: '/_api/wix-events-web/v1/checkout',
260
+ destPath: '/v1/checkout',
261
+ },
262
+ {
263
+ srcPath: '/_api/wix-events-web/v1/ticket-definitions',
264
+ destPath: '/v1/ticket-definitions',
265
+ },
266
+ {
267
+ srcPath: '/_api/wix-events-web/v1/tickets/available',
268
+ destPath: '/v1/tickets/available',
269
+ },
270
+ {
271
+ srcPath: '/_api/wix-events-web/v1/pos-checkout',
272
+ destPath: '/v1/pos-checkout',
273
+ },
274
+ ],
275
+ 'api._base_domain_': [
276
+ {
277
+ srcPath: '/events/v1/checkout',
278
+ destPath: '/v1/checkout',
279
+ },
280
+ {
281
+ srcPath: '/events/v1/ticket-definitions',
282
+ destPath: '/v1/ticket-definitions',
283
+ },
284
+ {
285
+ srcPath: '/events/v1/tickets/available',
286
+ destPath: '/v1/tickets/available',
287
+ },
288
+ {
289
+ srcPath: '/events/v1/pos-checkout',
290
+ destPath: '/v1/pos-checkout',
291
+ },
292
+ ],
293
+ 'editor-flow.wixapps.net': [
294
+ {
295
+ srcPath: '/_api/wix-events-web/v1/checkout',
296
+ destPath: '/v1/checkout',
297
+ },
298
+ {
299
+ srcPath: '/_api/wix-events-web/v1/ticket-definitions',
300
+ destPath: '/v1/ticket-definitions',
301
+ },
302
+ {
303
+ srcPath: '/_api/wix-events-web/v1/tickets/available',
304
+ destPath: '/v1/tickets/available',
305
+ },
306
+ {
307
+ srcPath: '/_api/wix-events-web/v1/pos-checkout',
308
+ destPath: '/v1/pos-checkout',
309
+ },
310
+ ],
311
+ 'editor.wixapps.net': [
312
+ {
313
+ srcPath: '/_api/wix-events-web/v1/checkout',
314
+ destPath: '/v1/checkout',
315
+ },
316
+ {
317
+ srcPath: '/_api/wix-events-web/v1/ticket-definitions',
318
+ destPath: '/v1/ticket-definitions',
319
+ },
320
+ {
321
+ srcPath: '/_api/wix-events-web/v1/tickets/available',
322
+ destPath: '/v1/tickets/available',
323
+ },
324
+ {
325
+ srcPath: '/_api/wix-events-web/v1/pos-checkout',
326
+ destPath: '/v1/pos-checkout',
327
+ },
328
+ ],
329
+ 'www._base_domain_': [
330
+ {
331
+ srcPath: '/_api/wix-events-web/v1/checkout',
332
+ destPath: '/v1/checkout',
333
+ },
334
+ {
335
+ srcPath: '/_api/wix-events-web/v1/ticket-definitions',
336
+ destPath: '/v1/ticket-definitions',
337
+ },
338
+ {
339
+ srcPath: '/_api/wix-events-web/v1/tickets/available',
340
+ destPath: '/v1/tickets/available',
341
+ },
342
+ {
343
+ srcPath: '/_api/wix-events-web/v1/pos-checkout',
344
+ destPath: '/v1/pos-checkout',
345
+ },
346
+ ],
347
+ };
348
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
349
+ }
350
+ function resolveWixEventsTicketingOrderManagementUrl(opts) {
351
+ const domainToMappings = {
352
+ 'events._base_domain_': [
353
+ {
354
+ srcPath: '',
355
+ destPath: '',
356
+ },
357
+ {
358
+ srcPath: '/_api/wix-events-web',
359
+ destPath: '/api',
360
+ },
361
+ ],
362
+ 'www.wixevents.com': [
363
+ {
364
+ srcPath: '/_api/wix-events-web',
365
+ destPath: '/api',
366
+ },
367
+ {
368
+ srcPath: '/api',
369
+ destPath: '/api',
370
+ },
371
+ {
372
+ srcPath: '/viewEvent',
373
+ destPath: '/viewEvent',
374
+ },
375
+ {
376
+ srcPath: '/viewRsvpDashboard',
377
+ destPath: '/viewRsvpDashboard',
378
+ },
379
+ {
380
+ srcPath: '/viewOrderDashboard',
381
+ destPath: '/viewOrderDashboard',
382
+ },
383
+ {
384
+ srcPath: '/viewSummarySubscription',
385
+ destPath: '/viewSummarySubscription',
386
+ },
387
+ {
388
+ srcPath: '/check-in',
389
+ destPath: '/check-in',
390
+ },
391
+ {
392
+ srcPath: '/v2',
393
+ destPath: '/v2',
394
+ },
395
+ {
396
+ srcPath: '/export',
397
+ destPath: '/export',
398
+ },
399
+ {
400
+ srcPath: '/tickets',
401
+ destPath: '/tickets',
402
+ },
403
+ {
404
+ srcPath: '/payment-redirect',
405
+ destPath: '/payment-redirect',
406
+ },
407
+ {
408
+ srcPath: '/admin',
409
+ destPath: '/admin',
410
+ },
411
+ {
412
+ srcPath: '/ticket',
413
+ destPath: '/ticket',
414
+ },
415
+ {
416
+ srcPath: '/media',
417
+ destPath: '/media',
418
+ },
419
+ ],
420
+ 'api._api_base_domain_': [
421
+ {
422
+ srcPath: '/wix-events-web',
423
+ destPath: '',
424
+ },
425
+ ],
426
+ 'events.wixapps.net': [
427
+ {
428
+ srcPath: '/_api/wix-events-web',
429
+ destPath: '/api',
430
+ },
431
+ {
432
+ srcPath: '/events',
433
+ destPath: '',
434
+ },
435
+ ],
436
+ 'www._base_domain_': [
437
+ {
438
+ srcPath: '/_api/wix-events-web',
439
+ destPath: '/api',
440
+ },
441
+ {
442
+ srcPath: '/_api/wix-events-web/v2',
443
+ destPath: '/v2',
444
+ },
445
+ {
446
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
447
+ destPath: '/v1/bulk-async/categories',
448
+ },
449
+ {
450
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
451
+ destPath: '/v1/bulk/categories',
452
+ },
453
+ {
454
+ srcPath: '/_api/wix-events-web/v1/categories',
455
+ destPath: '/v1/categories',
456
+ },
457
+ {
458
+ srcPath: '/_api/wix-events-web/v1/events',
459
+ destPath: '/v1/events',
460
+ },
461
+ {
462
+ srcPath: '/_api/wix-events-web/v1/orders',
463
+ destPath: '/v1/orders',
464
+ },
465
+ {
466
+ srcPath: '/_api/wix-events-web/v1/tickets',
467
+ destPath: '/v1/tickets',
468
+ },
469
+ ],
470
+ 'apps._base_domain_': [
471
+ {
472
+ srcPath: '/_api/wix-events-web',
473
+ destPath: '/api',
474
+ },
475
+ {
476
+ srcPath: '/events',
477
+ destPath: '',
478
+ },
479
+ ],
480
+ 'manage._base_domain_': [
481
+ {
482
+ srcPath: '/_api/wix-events-web',
483
+ destPath: '/api',
484
+ },
485
+ {
486
+ srcPath: '/_api/wix-events-web/v1/events',
487
+ destPath: '/v1/events',
488
+ },
489
+ {
490
+ srcPath: '/_api/wix-events-web/v1/categories',
491
+ destPath: '/v1/categories',
492
+ },
493
+ {
494
+ srcPath: '/_api/wix-events-web/v2/events',
495
+ destPath: '/v2/events',
496
+ },
497
+ {
498
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
499
+ destPath: '/v1/bulk/categories',
500
+ },
501
+ {
502
+ srcPath: '/_api/wix-events-web/v1/bulk/events',
503
+ destPath: '/v1/bulk/events',
504
+ },
505
+ {
506
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
507
+ destPath: '/v1/bulk-async/categories',
508
+ },
509
+ {
510
+ srcPath: '/_api/wix-events-web/v1/tickets',
511
+ destPath: '/v1/tickets',
512
+ },
513
+ {
514
+ srcPath: '/events/v1/events',
515
+ destPath: '/v1/events',
516
+ },
517
+ {
518
+ srcPath: '/events/v1/categories',
519
+ destPath: '/v1/categories',
520
+ },
521
+ {
522
+ srcPath: '/events/v1/bulk/categories',
523
+ destPath: '/v1/bulk/categories',
524
+ },
525
+ {
526
+ srcPath: '/events/v1/bulk-async/categories',
527
+ destPath: '/v1/bulk-async/categories',
528
+ },
529
+ {
530
+ srcPath: '/events/v1/bulk/events',
531
+ destPath: '/v1/bulk/events',
532
+ },
533
+ {
534
+ srcPath: '/events/v1/reports',
535
+ destPath: '/v1/reports',
536
+ },
537
+ {
538
+ srcPath: '/events/v1/tickets',
539
+ destPath: '/v1/tickets',
540
+ },
541
+ {
542
+ srcPath: '/events/v1/orders',
543
+ destPath: '/v1/orders',
544
+ },
545
+ {
546
+ srcPath: '/events/v1/web',
547
+ destPath: '/v1/web',
548
+ },
549
+ {
550
+ srcPath: '/events/v2/tickets',
551
+ destPath: '/v2/tickets',
552
+ },
553
+ {
554
+ srcPath: '/events/v2/events',
555
+ destPath: '/v2/events',
556
+ },
557
+ ],
558
+ 'www.wixapis.com': [
559
+ {
560
+ srcPath: '/events/v1/events',
561
+ destPath: '/v1/events',
562
+ },
563
+ {
564
+ srcPath: '/events/v1/tickets',
565
+ destPath: '/v1/tickets',
566
+ },
567
+ {
568
+ srcPath: '/events/v1/categories',
569
+ destPath: '/v1/categories',
570
+ },
571
+ {
572
+ srcPath: '/events/v1/orders',
573
+ destPath: '/v1/orders',
574
+ },
575
+ {
576
+ srcPath: '/events/v1/bulk/categories',
577
+ destPath: '/v1/bulk/categories',
578
+ },
579
+ {
580
+ srcPath: '/events/v2/events',
581
+ destPath: '/v2/events',
582
+ },
583
+ {
584
+ srcPath: '/events/v1/bulk-async/categories',
585
+ destPath: '/v1/bulk-async/categories',
586
+ },
587
+ ],
588
+ 'api._base_domain_': [
589
+ {
590
+ srcPath: '/events/v2',
591
+ destPath: '/v2',
592
+ },
593
+ {
594
+ srcPath: '/events/v1/bulk-async/categories',
595
+ destPath: '/v1/bulk-async/categories',
596
+ },
597
+ {
598
+ srcPath: '/events/v1/bulk/categories',
599
+ destPath: '/v1/bulk/categories',
600
+ },
601
+ {
602
+ srcPath: '/events/v1/categories',
603
+ destPath: '/v1/categories',
604
+ },
605
+ {
606
+ srcPath: '/events/v1/events',
607
+ destPath: '/v1/events',
608
+ },
609
+ {
610
+ srcPath: '/events/v1/orders',
611
+ destPath: '/v1/orders',
612
+ },
613
+ {
614
+ srcPath: '/events/v1/tickets',
615
+ destPath: '/v1/tickets',
616
+ },
617
+ ],
618
+ _: [
619
+ {
620
+ srcPath: '/_api/wix-events-web/v2',
621
+ destPath: '/v2',
622
+ },
623
+ {
624
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
625
+ destPath: '/v1/bulk-async/categories',
626
+ },
627
+ {
628
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
629
+ destPath: '/v1/bulk/categories',
630
+ },
631
+ {
632
+ srcPath: '/_api/wix-events-web/v1/categories',
633
+ destPath: '/v1/categories',
634
+ },
635
+ {
636
+ srcPath: '/_api/wix-events-web/v1/events',
637
+ destPath: '/v1/events',
638
+ },
639
+ {
640
+ srcPath: '/_api/wix-events-web/v1/orders',
641
+ destPath: '/v1/orders',
642
+ },
643
+ {
644
+ srcPath: '/_api/wix-events-web/v1/tickets',
645
+ destPath: '/v1/tickets',
646
+ },
647
+ ],
648
+ 'editor.wixapps.net': [
649
+ {
650
+ srcPath: '/events/v2/events',
651
+ destPath: '/v2/events',
652
+ },
653
+ {
654
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
655
+ destPath: '/v1/bulk-async/categories',
656
+ },
657
+ {
658
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
659
+ destPath: '/v1/bulk/categories',
660
+ },
661
+ {
662
+ srcPath: '/_api/wix-events-web/v1/categories',
663
+ destPath: '/v1/categories',
664
+ },
665
+ {
666
+ srcPath: '/_api/wix-events-web/v1/events',
667
+ destPath: '/v1/events',
668
+ },
669
+ {
670
+ srcPath: '/_api/wix-events-web/v1/orders',
671
+ destPath: '/v1/orders',
672
+ },
673
+ {
674
+ srcPath: '/_api/wix-events-web/v1/tickets',
675
+ destPath: '/v1/tickets',
676
+ },
677
+ ],
678
+ '*.dev.wix-code.com': [
679
+ {
680
+ srcPath: '/_api/wix-events-web/v2',
681
+ destPath: '/v2',
682
+ },
683
+ {
684
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
685
+ destPath: '/v1/bulk-async/categories',
686
+ },
687
+ {
688
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
689
+ destPath: '/v1/bulk/categories',
690
+ },
691
+ {
692
+ srcPath: '/_api/wix-events-web/v1/categories',
693
+ destPath: '/v1/categories',
694
+ },
695
+ {
696
+ srcPath: '/_api/wix-events-web/v1/events',
697
+ destPath: '/v1/events',
698
+ },
699
+ {
700
+ srcPath: '/_api/wix-events-web/v1/orders',
701
+ destPath: '/v1/orders',
702
+ },
703
+ {
704
+ srcPath: '/_api/wix-events-web/v1/tickets',
705
+ destPath: '/v1/tickets',
706
+ },
707
+ ],
708
+ '*.pub.wix-code.com': [
709
+ {
710
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
711
+ destPath: '/v1/bulk-async/categories',
712
+ },
713
+ {
714
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
715
+ destPath: '/v1/bulk/categories',
716
+ },
717
+ {
718
+ srcPath: '/_api/wix-events-web/v1/categories',
719
+ destPath: '/v1/categories',
720
+ },
721
+ {
722
+ srcPath: '/_api/wix-events-web/v1/events',
723
+ destPath: '/v1/events',
724
+ },
725
+ {
726
+ srcPath: '/_api/wix-events-web/v1/orders',
727
+ destPath: '/v1/orders',
728
+ },
729
+ {
730
+ srcPath: '/_api/wix-events-web/v1/tickets',
731
+ destPath: '/v1/tickets',
732
+ },
733
+ ],
734
+ 'editor-flow.wixapps.net': [
735
+ {
736
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
737
+ destPath: '/v1/bulk-async/categories',
738
+ },
739
+ {
740
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
741
+ destPath: '/v1/bulk/categories',
742
+ },
743
+ {
744
+ srcPath: '/_api/wix-events-web/v1/categories',
745
+ destPath: '/v1/categories',
746
+ },
747
+ {
748
+ srcPath: '/_api/wix-events-web/v1/events',
749
+ destPath: '/v1/events',
750
+ },
751
+ {
752
+ srcPath: '/_api/wix-events-web/v1/orders',
753
+ destPath: '/v1/orders',
754
+ },
755
+ {
756
+ srcPath: '/_api/wix-events-web/v1/tickets',
757
+ destPath: '/v1/tickets',
758
+ },
759
+ ],
760
+ 'editor._base_domain_': [
761
+ {
762
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
763
+ destPath: '/v1/bulk-async/categories',
764
+ },
765
+ {
766
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
767
+ destPath: '/v1/bulk/categories',
768
+ },
769
+ {
770
+ srcPath: '/_api/wix-events-web/v1/categories',
771
+ destPath: '/v1/categories',
772
+ },
773
+ {
774
+ srcPath: '/_api/wix-events-web/v1/events',
775
+ destPath: '/v1/events',
776
+ },
777
+ {
778
+ srcPath: '/_api/wix-events-web/v1/orders',
779
+ destPath: '/v1/orders',
780
+ },
781
+ {
782
+ srcPath: '/_api/wix-events-web/v1/tickets',
783
+ destPath: '/v1/tickets',
784
+ },
785
+ ],
786
+ 'blocks._base_domain_': [
787
+ {
788
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
789
+ destPath: '/v1/bulk-async/categories',
790
+ },
791
+ {
792
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
793
+ destPath: '/v1/bulk/categories',
794
+ },
795
+ {
796
+ srcPath: '/_api/wix-events-web/v1/categories',
797
+ destPath: '/v1/categories',
798
+ },
799
+ {
800
+ srcPath: '/_api/wix-events-web/v1/events',
801
+ destPath: '/v1/events',
802
+ },
803
+ {
804
+ srcPath: '/_api/wix-events-web/v1/orders',
805
+ destPath: '/v1/orders',
806
+ },
807
+ {
808
+ srcPath: '/_api/wix-events-web/v1/tickets',
809
+ destPath: '/v1/tickets',
810
+ },
811
+ ],
812
+ 'create.editorx': [
813
+ {
814
+ srcPath: '/_api/wix-events-web/v1/bulk-async/categories',
815
+ destPath: '/v1/bulk-async/categories',
816
+ },
817
+ {
818
+ srcPath: '/_api/wix-events-web/v1/bulk/categories',
819
+ destPath: '/v1/bulk/categories',
820
+ },
821
+ {
822
+ srcPath: '/_api/wix-events-web/v1/categories',
823
+ destPath: '/v1/categories',
824
+ },
825
+ {
826
+ srcPath: '/_api/wix-events-web/v1/events',
827
+ destPath: '/v1/events',
828
+ },
829
+ {
830
+ srcPath: '/_api/wix-events-web/v1/orders',
831
+ destPath: '/v1/orders',
832
+ },
833
+ {
834
+ srcPath: '/_api/wix-events-web/v1/tickets',
835
+ destPath: '/v1/tickets',
836
+ },
837
+ ],
838
+ };
839
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
840
+ }
841
+ const PACKAGE_NAME = '@wix/auto_sdk_events_orders';
842
+ /** Retrieves a list of orders, including ticket data. */
843
+ export function listOrders(payload) {
844
+ function __listOrders({ host }) {
845
+ const metadata = {
846
+ entityFqdn: 'wix.events.v1.order',
847
+ method: 'GET',
848
+ methodFqn: 'wix.events.ticketing.OrderManagement.ListOrders',
849
+ packageName: PACKAGE_NAME,
850
+ url: resolveWixEventsTicketingOrderManagementUrl({
851
+ protoPath: '/v1/orders',
852
+ data: payload,
853
+ host,
854
+ }),
855
+ params: toURLSearchParams(payload),
856
+ transformResponse: (payload) => transformPaths(payload, [
857
+ {
858
+ transformFn: transformRESTTimestampToSDKTimestamp,
859
+ paths: [
860
+ { path: 'orders.created' },
861
+ { path: 'orders.updated' },
862
+ { path: 'orders.checkoutForm.inputValues.dateTime' },
863
+ { path: 'orders.tickets.checkIn.created' },
864
+ { path: 'orders.tickets.guestDetails.form.inputValues.dateTime' },
865
+ {
866
+ path: 'orders.paymentDetails.transaction.scheduledActionExecutionDate',
867
+ },
868
+ ],
869
+ },
870
+ {
871
+ transformFn: transformRESTFloatToSDKFloat,
872
+ paths: [
873
+ { path: 'orders.checkoutForm.inputValues.number' },
874
+ {
875
+ path: 'orders.checkoutForm.inputValues.address.address.geocode.latitude',
876
+ },
877
+ {
878
+ path: 'orders.checkoutForm.inputValues.address.address.geocode.longitude',
879
+ },
880
+ { path: 'orders.tickets.guestDetails.form.inputValues.number' },
881
+ {
882
+ path: 'orders.tickets.guestDetails.form.inputValues.address.address.geocode.latitude',
883
+ },
884
+ {
885
+ path: 'orders.tickets.guestDetails.form.inputValues.address.address.geocode.longitude',
886
+ },
887
+ ],
888
+ },
889
+ ]),
890
+ };
891
+ return metadata;
892
+ }
893
+ return __listOrders;
894
+ }
895
+ /**
896
+ * Retrieves an order, including ticket data.
897
+ * <!--
898
+ * >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.
899
+ * -->
900
+ */
901
+ export function getOrder(payload) {
902
+ function __getOrder({ host }) {
903
+ const metadata = {
904
+ entityFqdn: 'wix.events.v1.order',
905
+ method: 'GET',
906
+ methodFqn: 'wix.events.ticketing.OrderManagement.GetOrder',
907
+ packageName: PACKAGE_NAME,
908
+ url: resolveWixEventsTicketingOrderManagementUrl({
909
+ protoPath: '/v1/events/{eventId}/orders/{orderNumber}',
910
+ data: payload,
911
+ host,
912
+ }),
913
+ params: toURLSearchParams(payload),
914
+ transformResponse: (payload) => transformPaths(payload, [
915
+ {
916
+ transformFn: transformRESTTimestampToSDKTimestamp,
917
+ paths: [
918
+ { path: 'order.created' },
919
+ { path: 'order.updated' },
920
+ { path: 'order.checkoutForm.inputValues.dateTime' },
921
+ { path: 'order.tickets.checkIn.created' },
922
+ { path: 'order.tickets.guestDetails.form.inputValues.dateTime' },
923
+ {
924
+ path: 'order.paymentDetails.transaction.scheduledActionExecutionDate',
925
+ },
926
+ ],
927
+ },
928
+ {
929
+ transformFn: transformRESTFloatToSDKFloat,
930
+ paths: [
931
+ { path: 'order.checkoutForm.inputValues.number' },
932
+ {
933
+ path: 'order.checkoutForm.inputValues.address.address.geocode.latitude',
934
+ },
935
+ {
936
+ path: 'order.checkoutForm.inputValues.address.address.geocode.longitude',
937
+ },
938
+ { path: 'order.tickets.guestDetails.form.inputValues.number' },
939
+ {
940
+ path: 'order.tickets.guestDetails.form.inputValues.address.address.geocode.latitude',
941
+ },
942
+ {
943
+ path: 'order.tickets.guestDetails.form.inputValues.address.address.geocode.longitude',
944
+ },
945
+ ],
946
+ },
947
+ ]),
948
+ };
949
+ return metadata;
950
+ }
951
+ return __getOrder;
952
+ }
953
+ /** Updates an order. */
954
+ export function updateOrder(payload) {
955
+ function __updateOrder({ host }) {
956
+ const serializedData = transformPaths(payload, [
957
+ {
958
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
959
+ paths: [{ path: 'fields' }],
960
+ },
961
+ {
962
+ transformFn: transformSDKTimestampToRESTTimestamp,
963
+ paths: [
964
+ { path: 'expires' },
965
+ { path: 'checkoutForm.inputValues.dateTime' },
966
+ ],
967
+ },
968
+ {
969
+ transformFn: transformSDKFloatToRESTFloat,
970
+ paths: [
971
+ { path: 'checkoutForm.inputValues.number' },
972
+ { path: 'checkoutForm.inputValues.address.address.geocode.latitude' },
973
+ {
974
+ path: 'checkoutForm.inputValues.address.address.geocode.longitude',
975
+ },
976
+ ],
977
+ },
978
+ ]);
979
+ const metadata = {
980
+ entityFqdn: 'wix.events.v1.order',
981
+ method: 'PATCH',
982
+ methodFqn: 'wix.events.ticketing.OrderManagement.UpdateOrder',
983
+ packageName: PACKAGE_NAME,
984
+ url: resolveWixEventsTicketingOrderManagementUrl({
985
+ protoPath: '/v1/events/{eventId}/orders/{orderNumber}',
986
+ data: serializedData,
987
+ host,
988
+ }),
989
+ data: serializedData,
990
+ transformResponse: (payload) => transformPaths(payload, [
991
+ {
992
+ transformFn: transformRESTTimestampToSDKTimestamp,
993
+ paths: [
994
+ { path: 'order.created' },
995
+ { path: 'order.updated' },
996
+ { path: 'order.checkoutForm.inputValues.dateTime' },
997
+ { path: 'order.tickets.checkIn.created' },
998
+ { path: 'order.tickets.guestDetails.form.inputValues.dateTime' },
999
+ {
1000
+ path: 'order.paymentDetails.transaction.scheduledActionExecutionDate',
1001
+ },
1002
+ ],
1003
+ },
1004
+ {
1005
+ transformFn: transformRESTFloatToSDKFloat,
1006
+ paths: [
1007
+ { path: 'order.checkoutForm.inputValues.number' },
1008
+ {
1009
+ path: 'order.checkoutForm.inputValues.address.address.geocode.latitude',
1010
+ },
1011
+ {
1012
+ path: 'order.checkoutForm.inputValues.address.address.geocode.longitude',
1013
+ },
1014
+ { path: 'order.tickets.guestDetails.form.inputValues.number' },
1015
+ {
1016
+ path: 'order.tickets.guestDetails.form.inputValues.address.address.geocode.latitude',
1017
+ },
1018
+ {
1019
+ path: 'order.tickets.guestDetails.form.inputValues.address.address.geocode.longitude',
1020
+ },
1021
+ ],
1022
+ },
1023
+ ]),
1024
+ };
1025
+ return metadata;
1026
+ }
1027
+ return __updateOrder;
1028
+ }
1029
+ /** Archives multiple orders. */
1030
+ export function bulkUpdateOrders(payload) {
1031
+ function __bulkUpdateOrders({ host }) {
1032
+ const serializedData = transformPaths(payload, [
1033
+ {
1034
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
1035
+ paths: [{ path: 'fields' }],
1036
+ },
1037
+ ]);
1038
+ const metadata = {
1039
+ entityFqdn: 'wix.events.v1.order',
1040
+ method: 'PATCH',
1041
+ methodFqn: 'wix.events.ticketing.OrderManagement.BulkUpdateOrders',
1042
+ packageName: PACKAGE_NAME,
1043
+ url: resolveWixEventsTicketingOrderManagementUrl({
1044
+ protoPath: '/v1/events/{eventId}/orders',
1045
+ data: serializedData,
1046
+ host,
1047
+ }),
1048
+ data: serializedData,
1049
+ transformResponse: (payload) => transformPaths(payload, [
1050
+ {
1051
+ transformFn: transformRESTTimestampToSDKTimestamp,
1052
+ paths: [
1053
+ { path: 'orders.created' },
1054
+ { path: 'orders.updated' },
1055
+ { path: 'orders.checkoutForm.inputValues.dateTime' },
1056
+ { path: 'orders.tickets.checkIn.created' },
1057
+ { path: 'orders.tickets.guestDetails.form.inputValues.dateTime' },
1058
+ {
1059
+ path: 'orders.paymentDetails.transaction.scheduledActionExecutionDate',
1060
+ },
1061
+ ],
1062
+ },
1063
+ {
1064
+ transformFn: transformRESTFloatToSDKFloat,
1065
+ paths: [
1066
+ { path: 'orders.checkoutForm.inputValues.number' },
1067
+ {
1068
+ path: 'orders.checkoutForm.inputValues.address.address.geocode.latitude',
1069
+ },
1070
+ {
1071
+ path: 'orders.checkoutForm.inputValues.address.address.geocode.longitude',
1072
+ },
1073
+ { path: 'orders.tickets.guestDetails.form.inputValues.number' },
1074
+ {
1075
+ path: 'orders.tickets.guestDetails.form.inputValues.address.address.geocode.latitude',
1076
+ },
1077
+ {
1078
+ path: 'orders.tickets.guestDetails.form.inputValues.address.address.geocode.longitude',
1079
+ },
1080
+ ],
1081
+ },
1082
+ ]),
1083
+ };
1084
+ return metadata;
1085
+ }
1086
+ return __bulkUpdateOrders;
1087
+ }
1088
+ /**
1089
+ * Confirms an order.
1090
+ *
1091
+ *
1092
+ * This function changes order status from `INITIATED`, `PENDING`, `OFFLINE_PENDING` to `PAID`.
1093
+ * Confirming orders with `INITIATED` or `PENDING` status triggers an email with the tickets to the buyer (and to additional guests, if provided).
1094
+ */
1095
+ export function confirmOrder(payload) {
1096
+ function __confirmOrder({ host }) {
1097
+ const metadata = {
1098
+ entityFqdn: 'wix.events.v1.order',
1099
+ method: 'POST',
1100
+ methodFqn: 'wix.events.ticketing.OrderManagement.ConfirmOrder',
1101
+ packageName: PACKAGE_NAME,
1102
+ url: resolveWixEventsTicketingOrderManagementUrl({
1103
+ protoPath: '/v1/events/{eventId}/orders/confirm',
1104
+ data: payload,
1105
+ host,
1106
+ }),
1107
+ data: payload,
1108
+ transformResponse: (payload) => transformPaths(payload, [
1109
+ {
1110
+ transformFn: transformRESTTimestampToSDKTimestamp,
1111
+ paths: [
1112
+ { path: 'orders.created' },
1113
+ { path: 'orders.updated' },
1114
+ { path: 'orders.checkoutForm.inputValues.dateTime' },
1115
+ { path: 'orders.tickets.checkIn.created' },
1116
+ { path: 'orders.tickets.guestDetails.form.inputValues.dateTime' },
1117
+ {
1118
+ path: 'orders.paymentDetails.transaction.scheduledActionExecutionDate',
1119
+ },
1120
+ ],
1121
+ },
1122
+ {
1123
+ transformFn: transformRESTFloatToSDKFloat,
1124
+ paths: [
1125
+ { path: 'orders.checkoutForm.inputValues.number' },
1126
+ {
1127
+ path: 'orders.checkoutForm.inputValues.address.address.geocode.latitude',
1128
+ },
1129
+ {
1130
+ path: 'orders.checkoutForm.inputValues.address.address.geocode.longitude',
1131
+ },
1132
+ { path: 'orders.tickets.guestDetails.form.inputValues.number' },
1133
+ {
1134
+ path: 'orders.tickets.guestDetails.form.inputValues.address.address.geocode.latitude',
1135
+ },
1136
+ {
1137
+ path: 'orders.tickets.guestDetails.form.inputValues.address.address.geocode.longitude',
1138
+ },
1139
+ ],
1140
+ },
1141
+ ]),
1142
+ };
1143
+ return metadata;
1144
+ }
1145
+ return __confirmOrder;
1146
+ }
1147
+ /**
1148
+ * Retrieves a summary of total ticket sales.
1149
+ * <!--
1150
+ * > 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.
1151
+ * -->
1152
+ */
1153
+ export function getSummary(payload) {
1154
+ function __getSummary({ host }) {
1155
+ const metadata = {
1156
+ entityFqdn: 'wix.events.v1.order',
1157
+ method: 'GET',
1158
+ methodFqn: 'wix.events.ticketing.OrderManagement.GetSummary',
1159
+ packageName: PACKAGE_NAME,
1160
+ url: resolveWixEventsTicketingOrderManagementUrl({
1161
+ protoPath: '/v1/orders/summary',
1162
+ data: payload,
1163
+ host,
1164
+ }),
1165
+ params: toURLSearchParams(payload),
1166
+ };
1167
+ return metadata;
1168
+ }
1169
+ return __getSummary;
1170
+ }
1171
+ /**
1172
+ * Captures authorized payment asynchronously.
1173
+ * Eventually order will become paid.
1174
+ * For orders with non-authorized payments request will fail.
1175
+ */
1176
+ export function captureAuthorizedPayment(payload) {
1177
+ function __captureAuthorizedPayment({ host }) {
1178
+ const metadata = {
1179
+ entityFqdn: 'wix.events.v1.order',
1180
+ method: 'POST',
1181
+ methodFqn: 'wix.events.ticketing.OrderManagement.CaptureAuthorizedPayment',
1182
+ packageName: PACKAGE_NAME,
1183
+ url: resolveWixEventsTicketingOrderManagementUrl({
1184
+ protoPath: '/v1/events/orders/{orderNumber}/capture',
1185
+ data: payload,
1186
+ host,
1187
+ }),
1188
+ data: payload,
1189
+ };
1190
+ return metadata;
1191
+ }
1192
+ return __captureAuthorizedPayment;
1193
+ }
1194
+ /**
1195
+ * Voids authorized payment asynchronously.
1196
+ * Eventually order will become voided.
1197
+ * For orders with non-authorized payments request will fail.
1198
+ */
1199
+ export function voidAuthorizedPayment(payload) {
1200
+ function __voidAuthorizedPayment({ host }) {
1201
+ const metadata = {
1202
+ entityFqdn: 'wix.events.v1.order',
1203
+ method: 'POST',
1204
+ methodFqn: 'wix.events.ticketing.OrderManagement.VoidAuthorizedPayment',
1205
+ packageName: PACKAGE_NAME,
1206
+ url: resolveWixEventsTicketingOrderManagementUrl({
1207
+ protoPath: '/v1/events/orders/{orderNumber}/void',
1208
+ data: payload,
1209
+ host,
1210
+ }),
1211
+ data: payload,
1212
+ };
1213
+ return metadata;
1214
+ }
1215
+ return __voidAuthorizedPayment;
1216
+ }
1217
+ /** Retrieves checkout details. */
1218
+ export function getCheckoutOptions(payload) {
1219
+ function __getCheckoutOptions({ host }) {
1220
+ const metadata = {
1221
+ entityFqdn: 'wix.events.v1.order',
1222
+ method: 'GET',
1223
+ methodFqn: 'wix.events.ticketing.CheckoutService.GetCheckoutOptions',
1224
+ packageName: PACKAGE_NAME,
1225
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
1226
+ protoPath: '/v1/checkout/options',
1227
+ data: payload,
1228
+ host,
1229
+ }),
1230
+ params: toURLSearchParams(payload),
1231
+ };
1232
+ return metadata;
1233
+ }
1234
+ return __getCheckoutOptions;
1235
+ }
1236
+ /**
1237
+ * Returns tickets available to reserve.
1238
+ * <!--
1239
+ * > 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.
1240
+ * -->
1241
+ */
1242
+ export function listAvailableTickets(payload) {
1243
+ function __listAvailableTickets({ host }) {
1244
+ const serializedData = transformPaths(payload, [
1245
+ {
1246
+ transformFn: transformSDKTimestampToRESTTimestamp,
1247
+ paths: [{ path: 'overrideRequestTime' }],
1248
+ },
1249
+ ]);
1250
+ const metadata = {
1251
+ entityFqdn: 'wix.events.v1.order',
1252
+ method: 'GET',
1253
+ methodFqn: 'wix.events.ticketing.CheckoutService.ListAvailableTickets',
1254
+ packageName: PACKAGE_NAME,
1255
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
1256
+ protoPath: '/v1/checkout/available-tickets',
1257
+ data: serializedData,
1258
+ host,
1259
+ }),
1260
+ params: toURLSearchParams(serializedData),
1261
+ transformResponse: (payload) => transformPaths(payload, [
1262
+ {
1263
+ transformFn: transformRESTTimestampToSDKTimestamp,
1264
+ paths: [
1265
+ { path: 'definitions.salePeriod.startDate' },
1266
+ { path: 'definitions.salePeriod.endDate' },
1267
+ ],
1268
+ },
1269
+ ]),
1270
+ };
1271
+ return metadata;
1272
+ }
1273
+ return __listAvailableTickets;
1274
+ }
1275
+ /**
1276
+ * Returns tickets available to reserve.
1277
+ * <!--
1278
+ * > 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.
1279
+ * -->
1280
+ */
1281
+ export function queryAvailableTickets(payload) {
1282
+ function __queryAvailableTickets({ host }) {
1283
+ const metadata = {
1284
+ entityFqdn: 'wix.events.v1.order',
1285
+ method: 'POST',
1286
+ methodFqn: 'wix.events.ticketing.CheckoutService.QueryAvailableTickets',
1287
+ packageName: PACKAGE_NAME,
1288
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
1289
+ protoPath: '/v1/checkout/available-tickets/query',
1290
+ data: payload,
1291
+ host,
1292
+ }),
1293
+ data: payload,
1294
+ transformResponse: (payload) => transformPaths(payload, [
1295
+ {
1296
+ transformFn: transformRESTTimestampToSDKTimestamp,
1297
+ paths: [
1298
+ { path: 'definitions.salePeriod.startDate' },
1299
+ { path: 'definitions.salePeriod.endDate' },
1300
+ ],
1301
+ },
1302
+ ]),
1303
+ };
1304
+ return metadata;
1305
+ }
1306
+ return __queryAvailableTickets;
1307
+ }
1308
+ /**
1309
+ * Reserves tickets for 20 minutes.
1310
+ *
1311
+ *
1312
+ * Reserved tickets are deducted from ticket stock and cannot be bought by another site visitor.
1313
+ * When the reservation expires, the tickets are added back to the stock.
1314
+ */
1315
+ export function createReservation(payload) {
1316
+ function __createReservation({ host }) {
1317
+ const serializedData = transformPaths(payload, [
1318
+ {
1319
+ transformFn: transformSDKTimestampToRESTTimestamp,
1320
+ paths: [{ path: 'overrideRequestTime' }],
1321
+ },
1322
+ ]);
1323
+ const metadata = {
1324
+ entityFqdn: 'wix.events.v1.order',
1325
+ method: 'POST',
1326
+ methodFqn: 'wix.events.ticketing.CheckoutService.CreateReservation',
1327
+ packageName: PACKAGE_NAME,
1328
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
1329
+ protoPath: '/v1/checkout/reservations',
1330
+ data: serializedData,
1331
+ host,
1332
+ }),
1333
+ data: serializedData,
1334
+ transformResponse: (payload) => transformPaths(payload, [
1335
+ {
1336
+ transformFn: transformRESTTimestampToSDKTimestamp,
1337
+ paths: [
1338
+ { path: 'expires' },
1339
+ { path: 'reservations.ticket.salePeriod.startDate' },
1340
+ { path: 'reservations.ticket.salePeriod.endDate' },
1341
+ ],
1342
+ },
1343
+ ]),
1344
+ };
1345
+ return metadata;
1346
+ }
1347
+ return __createReservation;
1348
+ }
1349
+ /**
1350
+ * Cancels ticket reservation and returns tickets to stock.
1351
+ * <!--
1352
+ * > 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.
1353
+ * -->
1354
+ */
1355
+ export function cancelReservation(payload) {
1356
+ function __cancelReservation({ host }) {
1357
+ const metadata = {
1358
+ entityFqdn: 'wix.events.v1.order',
1359
+ method: 'DELETE',
1360
+ methodFqn: 'wix.events.ticketing.CheckoutService.CancelReservation',
1361
+ packageName: PACKAGE_NAME,
1362
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
1363
+ protoPath: '/v1/checkout/reservations/{id}',
1364
+ data: payload,
1365
+ host,
1366
+ }),
1367
+ params: toURLSearchParams(payload),
1368
+ };
1369
+ return metadata;
1370
+ }
1371
+ return __cancelReservation;
1372
+ }
1373
+ /** Generates a preview of an invoice, including the given coupon or pricing plan. */
1374
+ export function getInvoice(payload) {
1375
+ function __getInvoice({ host }) {
1376
+ const metadata = {
1377
+ entityFqdn: 'wix.events.v1.order',
1378
+ method: 'POST',
1379
+ methodFqn: 'wix.events.ticketing.CheckoutService.GetInvoice',
1380
+ packageName: PACKAGE_NAME,
1381
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
1382
+ protoPath: '/v1/checkout/invoices/{reservationId}',
1383
+ data: payload,
1384
+ host,
1385
+ }),
1386
+ data: payload,
1387
+ transformResponse: (payload) => transformPaths(payload, [
1388
+ {
1389
+ transformFn: transformRESTTimestampToSDKTimestamp,
1390
+ paths: [
1391
+ { path: 'expires' },
1392
+ { path: 'reservations.ticket.salePeriod.startDate' },
1393
+ { path: 'reservations.ticket.salePeriod.endDate' },
1394
+ ],
1395
+ },
1396
+ ]),
1397
+ };
1398
+ return metadata;
1399
+ }
1400
+ return __getInvoice;
1401
+ }
1402
+ /**
1403
+ * Checkouts the reserved tickets.
1404
+ *
1405
+ *
1406
+ * Creates an order and associates it with a site visitor contact.
1407
+ * Guest details are received from the [Registration Form](https://www.wix.com/velo/reference/wix-events-v2/forms/introduction) input fields.
1408
+ *
1409
+ * There is a possibility to use a separate ready-made Wix checkout form where the user will be redirected from your non-Wix site or a custom ticket picker created with Velo.
1410
+ * To build the checkout form path, get your event base URL by using the [`getEvent()`](https://www.wix.com/velo/reference/wix-events-backend/wixevents/getevent) function and add the following path:
1411
+ * `/{{EVENT_PAGE_SLUG}}/{{SLUG}}/ticket-form?reservationId={{YOUR_RESERVATION_ID}}`
1412
+ *
1413
+ * Example: `https://johndoe.wixsite.com/weddings/event-details/doe-wedding/ticket-form?reservationId=2be6d34a-2a1e-459f-897b-b4a66e73f69a`
1414
+ */
1415
+ export function checkout(payload) {
1416
+ function __checkout({ host }) {
1417
+ const serializedData = transformPaths(payload, [
1418
+ {
1419
+ transformFn: transformSDKTimestampToRESTTimestamp,
1420
+ paths: [
1421
+ { path: 'overrideRequestTime' },
1422
+ { path: 'guests.form.inputValues.dateTime' },
1423
+ ],
1424
+ },
1425
+ {
1426
+ transformFn: transformSDKFloatToRESTFloat,
1427
+ paths: [
1428
+ { path: 'guests.form.inputValues.number' },
1429
+ { path: 'guests.form.inputValues.address.address.geocode.latitude' },
1430
+ { path: 'guests.form.inputValues.address.address.geocode.longitude' },
1431
+ ],
1432
+ },
1433
+ ]);
1434
+ const metadata = {
1435
+ entityFqdn: 'wix.events.v1.order',
1436
+ method: 'POST',
1437
+ methodFqn: 'wix.events.ticketing.CheckoutService.Checkout',
1438
+ packageName: PACKAGE_NAME,
1439
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
1440
+ protoPath: '/v1/checkout',
1441
+ data: serializedData,
1442
+ host,
1443
+ }),
1444
+ data: serializedData,
1445
+ transformResponse: (payload) => transformPaths(payload, [
1446
+ {
1447
+ transformFn: transformRESTTimestampToSDKTimestamp,
1448
+ paths: [
1449
+ { path: 'expires' },
1450
+ { path: 'order.created' },
1451
+ { path: 'order.updated' },
1452
+ { path: 'order.checkoutForm.inputValues.dateTime' },
1453
+ { path: 'order.tickets.checkIn.created' },
1454
+ { path: 'order.tickets.guestDetails.form.inputValues.dateTime' },
1455
+ {
1456
+ path: 'order.paymentDetails.transaction.scheduledActionExecutionDate',
1457
+ },
1458
+ { path: 'reservations.ticket.salePeriod.startDate' },
1459
+ { path: 'reservations.ticket.salePeriod.endDate' },
1460
+ ],
1461
+ },
1462
+ {
1463
+ transformFn: transformRESTFloatToSDKFloat,
1464
+ paths: [
1465
+ { path: 'order.checkoutForm.inputValues.number' },
1466
+ {
1467
+ path: 'order.checkoutForm.inputValues.address.address.geocode.latitude',
1468
+ },
1469
+ {
1470
+ path: 'order.checkoutForm.inputValues.address.address.geocode.longitude',
1471
+ },
1472
+ { path: 'order.tickets.guestDetails.form.inputValues.number' },
1473
+ {
1474
+ path: 'order.tickets.guestDetails.form.inputValues.address.address.geocode.latitude',
1475
+ },
1476
+ {
1477
+ path: 'order.tickets.guestDetails.form.inputValues.address.address.geocode.longitude',
1478
+ },
1479
+ ],
1480
+ },
1481
+ ]),
1482
+ };
1483
+ return metadata;
1484
+ }
1485
+ return __checkout;
1486
+ }
1487
+ /**
1488
+ * Updates order and tickets.
1489
+ *
1490
+ *
1491
+ * Only applicable for orders with `INITIATED`, `PENDING`, `OFFLINE_PENDING` statuses.
1492
+ */
1493
+ export function updateCheckout(payload) {
1494
+ function __updateCheckout({ host }) {
1495
+ const serializedData = transformPaths(payload, [
1496
+ {
1497
+ transformFn: transformSDKFloatToRESTFloat,
1498
+ paths: [
1499
+ { path: 'guests.form.inputValues.number' },
1500
+ { path: 'guests.form.inputValues.address.address.geocode.latitude' },
1501
+ { path: 'guests.form.inputValues.address.address.geocode.longitude' },
1502
+ ],
1503
+ },
1504
+ {
1505
+ transformFn: transformSDKTimestampToRESTTimestamp,
1506
+ paths: [{ path: 'guests.form.inputValues.dateTime' }],
1507
+ },
1508
+ ]);
1509
+ const metadata = {
1510
+ entityFqdn: 'wix.events.v1.order',
1511
+ method: 'PATCH',
1512
+ methodFqn: 'wix.events.ticketing.CheckoutService.UpdateCheckout',
1513
+ packageName: PACKAGE_NAME,
1514
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
1515
+ protoPath: '/v1/checkout/{orderNumber}',
1516
+ data: serializedData,
1517
+ host,
1518
+ }),
1519
+ data: serializedData,
1520
+ transformResponse: (payload) => transformPaths(payload, [
1521
+ {
1522
+ transformFn: transformRESTTimestampToSDKTimestamp,
1523
+ paths: [
1524
+ { path: 'order.created' },
1525
+ { path: 'order.updated' },
1526
+ { path: 'order.checkoutForm.inputValues.dateTime' },
1527
+ { path: 'order.tickets.checkIn.created' },
1528
+ { path: 'order.tickets.guestDetails.form.inputValues.dateTime' },
1529
+ {
1530
+ path: 'order.paymentDetails.transaction.scheduledActionExecutionDate',
1531
+ },
1532
+ ],
1533
+ },
1534
+ {
1535
+ transformFn: transformRESTFloatToSDKFloat,
1536
+ paths: [
1537
+ { path: 'order.checkoutForm.inputValues.number' },
1538
+ {
1539
+ path: 'order.checkoutForm.inputValues.address.address.geocode.latitude',
1540
+ },
1541
+ {
1542
+ path: 'order.checkoutForm.inputValues.address.address.geocode.longitude',
1543
+ },
1544
+ { path: 'order.tickets.guestDetails.form.inputValues.number' },
1545
+ {
1546
+ path: 'order.tickets.guestDetails.form.inputValues.address.address.geocode.latitude',
1547
+ },
1548
+ {
1549
+ path: 'order.tickets.guestDetails.form.inputValues.address.address.geocode.longitude',
1550
+ },
1551
+ ],
1552
+ },
1553
+ ]),
1554
+ };
1555
+ return metadata;
1556
+ }
1557
+ return __updateCheckout;
1558
+ }
1559
+ /** Creates order with payment details already initiated via Cashier Pay API. */
1560
+ export function posCheckout(payload) {
1561
+ function __posCheckout({ host }) {
1562
+ const metadata = {
1563
+ entityFqdn: 'wix.events.v1.order',
1564
+ method: 'POST',
1565
+ methodFqn: 'wix.events.ticketing.CheckoutService.PosCheckout',
1566
+ packageName: PACKAGE_NAME,
1567
+ url: resolveWixEventsTicketingCheckoutServiceUrl({
1568
+ protoPath: '/v1/pos-checkout',
1569
+ data: payload,
1570
+ host,
1571
+ }),
1572
+ data: payload,
1573
+ transformResponse: (payload) => transformPaths(payload, [
1574
+ {
1575
+ transformFn: transformRESTTimestampToSDKTimestamp,
1576
+ paths: [
1577
+ { path: 'expires' },
1578
+ { path: 'order.created' },
1579
+ { path: 'order.updated' },
1580
+ { path: 'order.checkoutForm.inputValues.dateTime' },
1581
+ { path: 'order.tickets.checkIn.created' },
1582
+ { path: 'order.tickets.guestDetails.form.inputValues.dateTime' },
1583
+ {
1584
+ path: 'order.paymentDetails.transaction.scheduledActionExecutionDate',
1585
+ },
1586
+ { path: 'reservations.ticket.salePeriod.startDate' },
1587
+ { path: 'reservations.ticket.salePeriod.endDate' },
1588
+ ],
1589
+ },
1590
+ {
1591
+ transformFn: transformRESTFloatToSDKFloat,
1592
+ paths: [
1593
+ { path: 'order.checkoutForm.inputValues.number' },
1594
+ {
1595
+ path: 'order.checkoutForm.inputValues.address.address.geocode.latitude',
1596
+ },
1597
+ {
1598
+ path: 'order.checkoutForm.inputValues.address.address.geocode.longitude',
1599
+ },
1600
+ { path: 'order.tickets.guestDetails.form.inputValues.number' },
1601
+ {
1602
+ path: 'order.tickets.guestDetails.form.inputValues.address.address.geocode.latitude',
1603
+ },
1604
+ {
1605
+ path: 'order.tickets.guestDetails.form.inputValues.address.address.geocode.longitude',
1606
+ },
1607
+ ],
1608
+ },
1609
+ ]),
1610
+ };
1611
+ return metadata;
1612
+ }
1613
+ return __posCheckout;
1614
+ }
1615
+ //# sourceMappingURL=events-v1-order-orders.http.js.map