@wix/auto_sdk_events_tickets 1.0.16 → 1.0.17

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.
@@ -0,0 +1,1168 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.typings.ts
21
+ var index_typings_exports = {};
22
+ __export(index_typings_exports, {
23
+ ChannelType: () => ChannelType,
24
+ OrderStatus: () => OrderStatus,
25
+ State: () => State,
26
+ SubdivisionType: () => SubdivisionType,
27
+ TicketFieldset: () => TicketFieldset,
28
+ WebhookIdentityType: () => WebhookIdentityType,
29
+ bulkUpdateTickets: () => bulkUpdateTickets2,
30
+ checkInTickets: () => checkInTickets,
31
+ deleteTicketCheckIns: () => deleteTicketCheckIns,
32
+ getTicket: () => getTicket2,
33
+ listTickets: () => listTickets2,
34
+ updateTicket: () => updateTicket2
35
+ });
36
+ module.exports = __toCommonJS(index_typings_exports);
37
+
38
+ // src/events-v1-ticket-tickets.universal.ts
39
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
40
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
41
+
42
+ // src/events-v1-ticket-tickets.http.ts
43
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
44
+ var import_float = require("@wix/sdk-runtime/transformations/float");
45
+ var import_float2 = require("@wix/sdk-runtime/transformations/float");
46
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
47
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
48
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
49
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
50
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
51
+ function resolveWixEventsTicketingTicketManagementUrl(opts) {
52
+ const domainToMappings = {
53
+ "events._base_domain_": [
54
+ {
55
+ srcPath: "",
56
+ destPath: ""
57
+ },
58
+ {
59
+ srcPath: "/_api/wix-events-web",
60
+ destPath: "/api"
61
+ }
62
+ ],
63
+ "www.wixevents.com": [
64
+ {
65
+ srcPath: "/_api/wix-events-web",
66
+ destPath: "/api"
67
+ },
68
+ {
69
+ srcPath: "/api",
70
+ destPath: "/api"
71
+ },
72
+ {
73
+ srcPath: "/viewEvent",
74
+ destPath: "/viewEvent"
75
+ },
76
+ {
77
+ srcPath: "/viewRsvpDashboard",
78
+ destPath: "/viewRsvpDashboard"
79
+ },
80
+ {
81
+ srcPath: "/viewOrderDashboard",
82
+ destPath: "/viewOrderDashboard"
83
+ },
84
+ {
85
+ srcPath: "/viewSummarySubscription",
86
+ destPath: "/viewSummarySubscription"
87
+ },
88
+ {
89
+ srcPath: "/check-in",
90
+ destPath: "/check-in"
91
+ },
92
+ {
93
+ srcPath: "/v2",
94
+ destPath: "/v2"
95
+ },
96
+ {
97
+ srcPath: "/export",
98
+ destPath: "/export"
99
+ },
100
+ {
101
+ srcPath: "/tickets",
102
+ destPath: "/tickets"
103
+ },
104
+ {
105
+ srcPath: "/payment-redirect",
106
+ destPath: "/payment-redirect"
107
+ },
108
+ {
109
+ srcPath: "/admin",
110
+ destPath: "/admin"
111
+ },
112
+ {
113
+ srcPath: "/ticket",
114
+ destPath: "/ticket"
115
+ },
116
+ {
117
+ srcPath: "/media",
118
+ destPath: "/media"
119
+ }
120
+ ],
121
+ "api._api_base_domain_": [
122
+ {
123
+ srcPath: "/wix-events-web",
124
+ destPath: ""
125
+ }
126
+ ],
127
+ "events.wixapps.net": [
128
+ {
129
+ srcPath: "/_api/wix-events-web",
130
+ destPath: "/api"
131
+ },
132
+ {
133
+ srcPath: "/events",
134
+ destPath: ""
135
+ }
136
+ ],
137
+ "www._base_domain_": [
138
+ {
139
+ srcPath: "/_api/wix-events-web",
140
+ destPath: "/api"
141
+ },
142
+ {
143
+ srcPath: "/_api/wix-events-web/v2",
144
+ destPath: "/v2"
145
+ },
146
+ {
147
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
148
+ destPath: "/v1/bulk-async/categories"
149
+ },
150
+ {
151
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
152
+ destPath: "/v1/bulk/categories"
153
+ },
154
+ {
155
+ srcPath: "/_api/wix-events-web/v1/categories",
156
+ destPath: "/v1/categories"
157
+ },
158
+ {
159
+ srcPath: "/_api/wix-events-web/v1/events",
160
+ destPath: "/v1/events"
161
+ },
162
+ {
163
+ srcPath: "/_api/wix-events-web/v1/orders",
164
+ destPath: "/v1/orders"
165
+ },
166
+ {
167
+ srcPath: "/_api/wix-events-web/v1/tickets",
168
+ destPath: "/v1/tickets"
169
+ }
170
+ ],
171
+ "apps._base_domain_": [
172
+ {
173
+ srcPath: "/_api/wix-events-web",
174
+ destPath: "/api"
175
+ },
176
+ {
177
+ srcPath: "/events",
178
+ destPath: ""
179
+ }
180
+ ],
181
+ "manage._base_domain_": [
182
+ {
183
+ srcPath: "/_api/wix-events-web",
184
+ destPath: "/api"
185
+ },
186
+ {
187
+ srcPath: "/_api/wix-events-web/v1/events",
188
+ destPath: "/v1/events"
189
+ },
190
+ {
191
+ srcPath: "/_api/wix-events-web/v1/categories",
192
+ destPath: "/v1/categories"
193
+ },
194
+ {
195
+ srcPath: "/_api/wix-events-web/v2/events",
196
+ destPath: "/v2/events"
197
+ },
198
+ {
199
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
200
+ destPath: "/v1/bulk/categories"
201
+ },
202
+ {
203
+ srcPath: "/_api/wix-events-web/v1/bulk/events",
204
+ destPath: "/v1/bulk/events"
205
+ },
206
+ {
207
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
208
+ destPath: "/v1/bulk-async/categories"
209
+ },
210
+ {
211
+ srcPath: "/_api/wix-events-web/v1/tickets",
212
+ destPath: "/v1/tickets"
213
+ },
214
+ {
215
+ srcPath: "/events/v1/events",
216
+ destPath: "/v1/events"
217
+ },
218
+ {
219
+ srcPath: "/events/v1/categories",
220
+ destPath: "/v1/categories"
221
+ },
222
+ {
223
+ srcPath: "/events/v1/bulk/categories",
224
+ destPath: "/v1/bulk/categories"
225
+ },
226
+ {
227
+ srcPath: "/events/v1/bulk-async/categories",
228
+ destPath: "/v1/bulk-async/categories"
229
+ },
230
+ {
231
+ srcPath: "/events/v1/bulk/events",
232
+ destPath: "/v1/bulk/events"
233
+ },
234
+ {
235
+ srcPath: "/events/v1/reports",
236
+ destPath: "/v1/reports"
237
+ },
238
+ {
239
+ srcPath: "/events/v1/tickets",
240
+ destPath: "/v1/tickets"
241
+ },
242
+ {
243
+ srcPath: "/events/v1/orders",
244
+ destPath: "/v1/orders"
245
+ },
246
+ {
247
+ srcPath: "/events/v1/web",
248
+ destPath: "/v1/web"
249
+ },
250
+ {
251
+ srcPath: "/events/v2/tickets",
252
+ destPath: "/v2/tickets"
253
+ },
254
+ {
255
+ srcPath: "/events/v2/events",
256
+ destPath: "/v2/events"
257
+ }
258
+ ],
259
+ "www.wixapis.com": [
260
+ {
261
+ srcPath: "/events/v1/events",
262
+ destPath: "/v1/events"
263
+ },
264
+ {
265
+ srcPath: "/events/v1/tickets",
266
+ destPath: "/v1/tickets"
267
+ },
268
+ {
269
+ srcPath: "/events/v1/categories",
270
+ destPath: "/v1/categories"
271
+ },
272
+ {
273
+ srcPath: "/events/v1/orders",
274
+ destPath: "/v1/orders"
275
+ },
276
+ {
277
+ srcPath: "/events/v1/bulk/categories",
278
+ destPath: "/v1/bulk/categories"
279
+ },
280
+ {
281
+ srcPath: "/events/v2/events",
282
+ destPath: "/v2/events"
283
+ },
284
+ {
285
+ srcPath: "/events/v1/bulk-async/categories",
286
+ destPath: "/v1/bulk-async/categories"
287
+ }
288
+ ],
289
+ "api._base_domain_": [
290
+ {
291
+ srcPath: "/events/v2",
292
+ destPath: "/v2"
293
+ },
294
+ {
295
+ srcPath: "/events/v1/bulk-async/categories",
296
+ destPath: "/v1/bulk-async/categories"
297
+ },
298
+ {
299
+ srcPath: "/events/v1/bulk/categories",
300
+ destPath: "/v1/bulk/categories"
301
+ },
302
+ {
303
+ srcPath: "/events/v1/categories",
304
+ destPath: "/v1/categories"
305
+ },
306
+ {
307
+ srcPath: "/events/v1/events",
308
+ destPath: "/v1/events"
309
+ },
310
+ {
311
+ srcPath: "/events/v1/orders",
312
+ destPath: "/v1/orders"
313
+ },
314
+ {
315
+ srcPath: "/events/v1/tickets",
316
+ destPath: "/v1/tickets"
317
+ }
318
+ ],
319
+ _: [
320
+ {
321
+ srcPath: "/_api/wix-events-web/v2",
322
+ destPath: "/v2"
323
+ },
324
+ {
325
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
326
+ destPath: "/v1/bulk-async/categories"
327
+ },
328
+ {
329
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
330
+ destPath: "/v1/bulk/categories"
331
+ },
332
+ {
333
+ srcPath: "/_api/wix-events-web/v1/categories",
334
+ destPath: "/v1/categories"
335
+ },
336
+ {
337
+ srcPath: "/_api/wix-events-web/v1/events",
338
+ destPath: "/v1/events"
339
+ },
340
+ {
341
+ srcPath: "/_api/wix-events-web/v1/orders",
342
+ destPath: "/v1/orders"
343
+ },
344
+ {
345
+ srcPath: "/_api/wix-events-web/v1/tickets",
346
+ destPath: "/v1/tickets"
347
+ }
348
+ ],
349
+ "editor.wixapps.net": [
350
+ {
351
+ srcPath: "/events/v2/events",
352
+ destPath: "/v2/events"
353
+ },
354
+ {
355
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
356
+ destPath: "/v1/bulk-async/categories"
357
+ },
358
+ {
359
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
360
+ destPath: "/v1/bulk/categories"
361
+ },
362
+ {
363
+ srcPath: "/_api/wix-events-web/v1/categories",
364
+ destPath: "/v1/categories"
365
+ },
366
+ {
367
+ srcPath: "/_api/wix-events-web/v1/events",
368
+ destPath: "/v1/events"
369
+ },
370
+ {
371
+ srcPath: "/_api/wix-events-web/v1/orders",
372
+ destPath: "/v1/orders"
373
+ },
374
+ {
375
+ srcPath: "/_api/wix-events-web/v1/tickets",
376
+ destPath: "/v1/tickets"
377
+ }
378
+ ],
379
+ "*.dev.wix-code.com": [
380
+ {
381
+ srcPath: "/_api/wix-events-web/v2",
382
+ destPath: "/v2"
383
+ },
384
+ {
385
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
386
+ destPath: "/v1/bulk-async/categories"
387
+ },
388
+ {
389
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
390
+ destPath: "/v1/bulk/categories"
391
+ },
392
+ {
393
+ srcPath: "/_api/wix-events-web/v1/categories",
394
+ destPath: "/v1/categories"
395
+ },
396
+ {
397
+ srcPath: "/_api/wix-events-web/v1/events",
398
+ destPath: "/v1/events"
399
+ },
400
+ {
401
+ srcPath: "/_api/wix-events-web/v1/orders",
402
+ destPath: "/v1/orders"
403
+ },
404
+ {
405
+ srcPath: "/_api/wix-events-web/v1/tickets",
406
+ destPath: "/v1/tickets"
407
+ }
408
+ ],
409
+ "*.pub.wix-code.com": [
410
+ {
411
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
412
+ destPath: "/v1/bulk-async/categories"
413
+ },
414
+ {
415
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
416
+ destPath: "/v1/bulk/categories"
417
+ },
418
+ {
419
+ srcPath: "/_api/wix-events-web/v1/categories",
420
+ destPath: "/v1/categories"
421
+ },
422
+ {
423
+ srcPath: "/_api/wix-events-web/v1/events",
424
+ destPath: "/v1/events"
425
+ },
426
+ {
427
+ srcPath: "/_api/wix-events-web/v1/orders",
428
+ destPath: "/v1/orders"
429
+ },
430
+ {
431
+ srcPath: "/_api/wix-events-web/v1/tickets",
432
+ destPath: "/v1/tickets"
433
+ }
434
+ ],
435
+ "editor-flow.wixapps.net": [
436
+ {
437
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
438
+ destPath: "/v1/bulk-async/categories"
439
+ },
440
+ {
441
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
442
+ destPath: "/v1/bulk/categories"
443
+ },
444
+ {
445
+ srcPath: "/_api/wix-events-web/v1/categories",
446
+ destPath: "/v1/categories"
447
+ },
448
+ {
449
+ srcPath: "/_api/wix-events-web/v1/events",
450
+ destPath: "/v1/events"
451
+ },
452
+ {
453
+ srcPath: "/_api/wix-events-web/v1/orders",
454
+ destPath: "/v1/orders"
455
+ },
456
+ {
457
+ srcPath: "/_api/wix-events-web/v1/tickets",
458
+ destPath: "/v1/tickets"
459
+ }
460
+ ],
461
+ "editor._base_domain_": [
462
+ {
463
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
464
+ destPath: "/v1/bulk-async/categories"
465
+ },
466
+ {
467
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
468
+ destPath: "/v1/bulk/categories"
469
+ },
470
+ {
471
+ srcPath: "/_api/wix-events-web/v1/categories",
472
+ destPath: "/v1/categories"
473
+ },
474
+ {
475
+ srcPath: "/_api/wix-events-web/v1/events",
476
+ destPath: "/v1/events"
477
+ },
478
+ {
479
+ srcPath: "/_api/wix-events-web/v1/orders",
480
+ destPath: "/v1/orders"
481
+ },
482
+ {
483
+ srcPath: "/_api/wix-events-web/v1/tickets",
484
+ destPath: "/v1/tickets"
485
+ }
486
+ ],
487
+ "blocks._base_domain_": [
488
+ {
489
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
490
+ destPath: "/v1/bulk-async/categories"
491
+ },
492
+ {
493
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
494
+ destPath: "/v1/bulk/categories"
495
+ },
496
+ {
497
+ srcPath: "/_api/wix-events-web/v1/categories",
498
+ destPath: "/v1/categories"
499
+ },
500
+ {
501
+ srcPath: "/_api/wix-events-web/v1/events",
502
+ destPath: "/v1/events"
503
+ },
504
+ {
505
+ srcPath: "/_api/wix-events-web/v1/orders",
506
+ destPath: "/v1/orders"
507
+ },
508
+ {
509
+ srcPath: "/_api/wix-events-web/v1/tickets",
510
+ destPath: "/v1/tickets"
511
+ }
512
+ ],
513
+ "create.editorx": [
514
+ {
515
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
516
+ destPath: "/v1/bulk-async/categories"
517
+ },
518
+ {
519
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
520
+ destPath: "/v1/bulk/categories"
521
+ },
522
+ {
523
+ srcPath: "/_api/wix-events-web/v1/categories",
524
+ destPath: "/v1/categories"
525
+ },
526
+ {
527
+ srcPath: "/_api/wix-events-web/v1/events",
528
+ destPath: "/v1/events"
529
+ },
530
+ {
531
+ srcPath: "/_api/wix-events-web/v1/orders",
532
+ destPath: "/v1/orders"
533
+ },
534
+ {
535
+ srcPath: "/_api/wix-events-web/v1/tickets",
536
+ destPath: "/v1/tickets"
537
+ }
538
+ ]
539
+ };
540
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
541
+ }
542
+ var PACKAGE_NAME = "@wix/auto_sdk_events_tickets";
543
+ function listTickets(payload) {
544
+ function __listTickets({ host }) {
545
+ const metadata = {
546
+ entityFqdn: "wix.events.v1.ticket",
547
+ method: "GET",
548
+ methodFqn: "wix.events.ticketing.TicketManagement.ListTickets",
549
+ packageName: PACKAGE_NAME,
550
+ url: resolveWixEventsTicketingTicketManagementUrl({
551
+ protoPath: "/v1/events/{eventId}/tickets",
552
+ data: payload,
553
+ host
554
+ }),
555
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
556
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
557
+ {
558
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
559
+ paths: [
560
+ { path: "tickets.checkIn.created" },
561
+ { path: "tickets.guestDetails.form.inputValues.dateTime" }
562
+ ]
563
+ },
564
+ {
565
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
566
+ paths: [
567
+ { path: "tickets.guestDetails.form.inputValues.number" },
568
+ {
569
+ path: "tickets.guestDetails.form.inputValues.address.address.geocode.latitude"
570
+ },
571
+ {
572
+ path: "tickets.guestDetails.form.inputValues.address.address.geocode.longitude"
573
+ }
574
+ ]
575
+ }
576
+ ]),
577
+ fallback: [
578
+ {
579
+ method: "GET",
580
+ url: resolveWixEventsTicketingTicketManagementUrl({
581
+ protoPath: "/v1/events/{eventId}/tickets",
582
+ data: payload,
583
+ host
584
+ }),
585
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
586
+ }
587
+ ]
588
+ };
589
+ return metadata;
590
+ }
591
+ return __listTickets;
592
+ }
593
+ function getTicket(payload) {
594
+ function __getTicket({ host }) {
595
+ const metadata = {
596
+ entityFqdn: "wix.events.v1.ticket",
597
+ method: "GET",
598
+ methodFqn: "wix.events.ticketing.TicketManagement.GetTicket",
599
+ packageName: PACKAGE_NAME,
600
+ url: resolveWixEventsTicketingTicketManagementUrl({
601
+ protoPath: "/v1/events/{eventId}/tickets/{ticketNumber}",
602
+ data: payload,
603
+ host
604
+ }),
605
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
606
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
607
+ {
608
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
609
+ paths: [
610
+ { path: "ticket.checkIn.created" },
611
+ { path: "ticket.guestDetails.form.inputValues.dateTime" }
612
+ ]
613
+ },
614
+ {
615
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
616
+ paths: [
617
+ { path: "ticket.guestDetails.form.inputValues.number" },
618
+ {
619
+ path: "ticket.guestDetails.form.inputValues.address.address.geocode.latitude"
620
+ },
621
+ {
622
+ path: "ticket.guestDetails.form.inputValues.address.address.geocode.longitude"
623
+ }
624
+ ]
625
+ }
626
+ ])
627
+ };
628
+ return metadata;
629
+ }
630
+ return __getTicket;
631
+ }
632
+ function checkInTicket(payload) {
633
+ function __checkInTicket({ host }) {
634
+ const metadata = {
635
+ entityFqdn: "wix.events.v1.ticket",
636
+ method: "POST",
637
+ methodFqn: "wix.events.ticketing.TicketManagement.CheckInTicket",
638
+ packageName: PACKAGE_NAME,
639
+ url: resolveWixEventsTicketingTicketManagementUrl({
640
+ protoPath: "/v1/tickets/check-in",
641
+ data: payload,
642
+ host
643
+ }),
644
+ data: payload,
645
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
646
+ {
647
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
648
+ paths: [
649
+ { path: "tickets.checkIn.created" },
650
+ { path: "tickets.guestDetails.form.inputValues.dateTime" }
651
+ ]
652
+ },
653
+ {
654
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
655
+ paths: [
656
+ { path: "tickets.guestDetails.form.inputValues.number" },
657
+ {
658
+ path: "tickets.guestDetails.form.inputValues.address.address.geocode.latitude"
659
+ },
660
+ {
661
+ path: "tickets.guestDetails.form.inputValues.address.address.geocode.longitude"
662
+ }
663
+ ]
664
+ }
665
+ ])
666
+ };
667
+ return metadata;
668
+ }
669
+ return __checkInTicket;
670
+ }
671
+ function deleteTicketCheckIn(payload) {
672
+ function __deleteTicketCheckIn({ host }) {
673
+ const metadata = {
674
+ entityFqdn: "wix.events.v1.ticket",
675
+ method: "DELETE",
676
+ methodFqn: "wix.events.ticketing.TicketManagement.DeleteTicketCheckIn",
677
+ packageName: PACKAGE_NAME,
678
+ url: resolveWixEventsTicketingTicketManagementUrl({
679
+ protoPath: "/v1/tickets/check-in",
680
+ data: payload,
681
+ host
682
+ }),
683
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
684
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
685
+ {
686
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
687
+ paths: [
688
+ { path: "tickets.checkIn.created" },
689
+ { path: "tickets.guestDetails.form.inputValues.dateTime" }
690
+ ]
691
+ },
692
+ {
693
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
694
+ paths: [
695
+ { path: "tickets.guestDetails.form.inputValues.number" },
696
+ {
697
+ path: "tickets.guestDetails.form.inputValues.address.address.geocode.latitude"
698
+ },
699
+ {
700
+ path: "tickets.guestDetails.form.inputValues.address.address.geocode.longitude"
701
+ }
702
+ ]
703
+ }
704
+ ])
705
+ };
706
+ return metadata;
707
+ }
708
+ return __deleteTicketCheckIn;
709
+ }
710
+ function updateTicket(payload) {
711
+ function __updateTicket({ host }) {
712
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
713
+ {
714
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
715
+ paths: [{ path: "fields" }]
716
+ },
717
+ {
718
+ transformFn: import_float.transformSDKFloatToRESTFloat,
719
+ paths: [
720
+ { path: "checkoutForm.inputValues.number" },
721
+ { path: "checkoutForm.inputValues.address.address.geocode.latitude" },
722
+ {
723
+ path: "checkoutForm.inputValues.address.address.geocode.longitude"
724
+ },
725
+ { path: "guestDetails.form.inputValues.number" },
726
+ {
727
+ path: "guestDetails.form.inputValues.address.address.geocode.latitude"
728
+ },
729
+ {
730
+ path: "guestDetails.form.inputValues.address.address.geocode.longitude"
731
+ }
732
+ ]
733
+ },
734
+ {
735
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
736
+ paths: [
737
+ { path: "checkoutForm.inputValues.dateTime" },
738
+ { path: "guestDetails.form.inputValues.dateTime" }
739
+ ]
740
+ }
741
+ ]);
742
+ const metadata = {
743
+ entityFqdn: "wix.events.v1.ticket",
744
+ method: "PATCH",
745
+ methodFqn: "wix.events.ticketing.TicketManagement.UpdateTicket",
746
+ packageName: PACKAGE_NAME,
747
+ url: resolveWixEventsTicketingTicketManagementUrl({
748
+ protoPath: "/v1/events/{eventId}/tickets/{ticketNumber}",
749
+ data: serializedData,
750
+ host
751
+ }),
752
+ data: serializedData,
753
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
754
+ {
755
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
756
+ paths: [
757
+ { path: "ticket.checkIn.created" },
758
+ { path: "ticket.guestDetails.form.inputValues.dateTime" }
759
+ ]
760
+ },
761
+ {
762
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
763
+ paths: [
764
+ { path: "ticket.guestDetails.form.inputValues.number" },
765
+ {
766
+ path: "ticket.guestDetails.form.inputValues.address.address.geocode.latitude"
767
+ },
768
+ {
769
+ path: "ticket.guestDetails.form.inputValues.address.address.geocode.longitude"
770
+ }
771
+ ]
772
+ }
773
+ ])
774
+ };
775
+ return metadata;
776
+ }
777
+ return __updateTicket;
778
+ }
779
+ function bulkUpdateTickets(payload) {
780
+ function __bulkUpdateTickets({ host }) {
781
+ const metadata = {
782
+ entityFqdn: "wix.events.v1.ticket",
783
+ method: "PATCH",
784
+ methodFqn: "wix.events.ticketing.TicketManagement.BulkUpdateTickets",
785
+ packageName: PACKAGE_NAME,
786
+ url: resolveWixEventsTicketingTicketManagementUrl({
787
+ protoPath: "/v1/events/{eventId}/tickets",
788
+ data: payload,
789
+ host
790
+ }),
791
+ data: payload,
792
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
793
+ {
794
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
795
+ paths: [
796
+ { path: "tickets.checkIn.created" },
797
+ { path: "tickets.guestDetails.form.inputValues.dateTime" }
798
+ ]
799
+ },
800
+ {
801
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
802
+ paths: [
803
+ { path: "tickets.guestDetails.form.inputValues.number" },
804
+ {
805
+ path: "tickets.guestDetails.form.inputValues.address.address.geocode.latitude"
806
+ },
807
+ {
808
+ path: "tickets.guestDetails.form.inputValues.address.address.geocode.longitude"
809
+ }
810
+ ]
811
+ }
812
+ ])
813
+ };
814
+ return metadata;
815
+ }
816
+ return __bulkUpdateTickets;
817
+ }
818
+
819
+ // src/events-v1-ticket-tickets.universal.ts
820
+ var import_address = require("@wix/sdk-runtime/transformations/address");
821
+ var import_address2 = require("@wix/sdk-runtime/transformations/address");
822
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
823
+ var OrderStatus = /* @__PURE__ */ ((OrderStatus2) => {
824
+ OrderStatus2["NA_ORDER_STATUS"] = "NA_ORDER_STATUS";
825
+ OrderStatus2["FREE"] = "FREE";
826
+ OrderStatus2["PENDING"] = "PENDING";
827
+ OrderStatus2["PAID"] = "PAID";
828
+ OrderStatus2["OFFLINE_PENDING"] = "OFFLINE_PENDING";
829
+ OrderStatus2["INITIATED"] = "INITIATED";
830
+ OrderStatus2["CANCELED"] = "CANCELED";
831
+ OrderStatus2["DECLINED"] = "DECLINED";
832
+ OrderStatus2["AUTHORIZED"] = "AUTHORIZED";
833
+ OrderStatus2["VOIDED"] = "VOIDED";
834
+ OrderStatus2["PARTIALLY_PAID"] = "PARTIALLY_PAID";
835
+ return OrderStatus2;
836
+ })(OrderStatus || {});
837
+ var SubdivisionType = /* @__PURE__ */ ((SubdivisionType2) => {
838
+ SubdivisionType2["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
839
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
840
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
841
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
842
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
843
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
844
+ SubdivisionType2["COUNTRY"] = "COUNTRY";
845
+ return SubdivisionType2;
846
+ })(SubdivisionType || {});
847
+ var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
848
+ ChannelType2["ONLINE"] = "ONLINE";
849
+ ChannelType2["OFFLINE_POS"] = "OFFLINE_POS";
850
+ return ChannelType2;
851
+ })(ChannelType || {});
852
+ var TicketFieldset = /* @__PURE__ */ ((TicketFieldset2) => {
853
+ TicketFieldset2["GUEST_DETAILS"] = "GUEST_DETAILS";
854
+ TicketFieldset2["TICKET_DETAILS"] = "TICKET_DETAILS";
855
+ TicketFieldset2["GUEST_FORM"] = "GUEST_FORM";
856
+ return TicketFieldset2;
857
+ })(TicketFieldset || {});
858
+ var State = /* @__PURE__ */ ((State2) => {
859
+ State2["ORDER_ARCHIVED"] = "ORDER_ARCHIVED";
860
+ State2["ORDER_ACTIVE"] = "ORDER_ACTIVE";
861
+ State2["TICKET_ARCHIVED"] = "TICKET_ARCHIVED";
862
+ State2["TICKET_ACTIVE"] = "TICKET_ACTIVE";
863
+ State2["CHECKED_IN"] = "CHECKED_IN";
864
+ State2["NON_CHECKED_IN"] = "NON_CHECKED_IN";
865
+ State2["FREE"] = "FREE";
866
+ State2["PAID"] = "PAID";
867
+ State2["MEMBER"] = "MEMBER";
868
+ return State2;
869
+ })(State || {});
870
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
871
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
872
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
873
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
874
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
875
+ WebhookIdentityType2["APP"] = "APP";
876
+ return WebhookIdentityType2;
877
+ })(WebhookIdentityType || {});
878
+ async function listTickets2(eventId, options) {
879
+ const { httpClient, sideEffects } = arguments[2];
880
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
881
+ eventId,
882
+ offset: options?.offset,
883
+ limit: options?.limit,
884
+ orderNumber: options?.orderNumber,
885
+ ticketNumber: options?.ticketNumber,
886
+ searchPhrase: options?.searchPhrase,
887
+ orderStatus: options?.orderStatus,
888
+ fieldset: options?.fieldset,
889
+ state: options?.state,
890
+ memberId: options?.memberId,
891
+ facet: options?.facet,
892
+ sort: options?.sort,
893
+ contactId: options?.contactId,
894
+ ticketDefinitionId: options?.ticketDefinitionId,
895
+ seatId: options?.seatId
896
+ });
897
+ const reqOpts = listTickets(payload);
898
+ sideEffects?.onSiteCall?.();
899
+ try {
900
+ const result = await httpClient.request(reqOpts);
901
+ sideEffects?.onSuccess?.(result);
902
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
903
+ (0, import_transform_paths2.transformPaths)(result.data, [
904
+ {
905
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
906
+ paths: [
907
+ { path: "tickets.guestDetails.form.inputValues.address.address" }
908
+ ]
909
+ }
910
+ ])
911
+ );
912
+ } catch (err) {
913
+ const transformedError = (0, import_transform_error.transformError)(
914
+ err,
915
+ {
916
+ spreadPathsToArguments: {},
917
+ explicitPathsToArguments: {
918
+ eventId: "$[0]",
919
+ offset: "$[1].offset",
920
+ limit: "$[1].limit",
921
+ orderNumber: "$[1].orderNumber",
922
+ ticketNumber: "$[1].ticketNumber",
923
+ searchPhrase: "$[1].searchPhrase",
924
+ orderStatus: "$[1].orderStatus",
925
+ fieldset: "$[1].fieldset",
926
+ state: "$[1].state",
927
+ memberId: "$[1].memberId",
928
+ facet: "$[1].facet",
929
+ sort: "$[1].sort",
930
+ contactId: "$[1].contactId",
931
+ ticketDefinitionId: "$[1].ticketDefinitionId",
932
+ seatId: "$[1].seatId"
933
+ },
934
+ singleArgumentUnchanged: false
935
+ },
936
+ ["eventId", "options"]
937
+ );
938
+ sideEffects?.onError?.(err);
939
+ throw transformedError;
940
+ }
941
+ }
942
+ async function getTicket2(identifiers, options) {
943
+ const { httpClient, sideEffects } = arguments[2];
944
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
945
+ eventId: identifiers?.eventId,
946
+ ticketNumber: identifiers?.ticketNumber,
947
+ fieldset: options?.fieldset
948
+ });
949
+ const reqOpts = getTicket(payload);
950
+ sideEffects?.onSiteCall?.();
951
+ try {
952
+ const result = await httpClient.request(reqOpts);
953
+ sideEffects?.onSuccess?.(result);
954
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
955
+ (0, import_transform_paths2.transformPaths)(result.data, [
956
+ {
957
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
958
+ paths: [
959
+ { path: "ticket.guestDetails.form.inputValues.address.address" }
960
+ ]
961
+ }
962
+ ])
963
+ )?.ticket;
964
+ } catch (err) {
965
+ const transformedError = (0, import_transform_error.transformError)(
966
+ err,
967
+ {
968
+ spreadPathsToArguments: {},
969
+ explicitPathsToArguments: {
970
+ eventId: "$[0].eventId",
971
+ ticketNumber: "$[0].ticketNumber",
972
+ fieldset: "$[1].fieldset"
973
+ },
974
+ singleArgumentUnchanged: false
975
+ },
976
+ ["identifiers", "options"]
977
+ );
978
+ sideEffects?.onError?.(err);
979
+ throw transformedError;
980
+ }
981
+ }
982
+ async function checkInTickets(eventId, options) {
983
+ const { httpClient, sideEffects } = arguments[2];
984
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
985
+ eventId,
986
+ ticketNumber: options?.ticketNumber
987
+ });
988
+ const reqOpts = checkInTicket(payload);
989
+ sideEffects?.onSiteCall?.();
990
+ try {
991
+ const result = await httpClient.request(reqOpts);
992
+ sideEffects?.onSuccess?.(result);
993
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
994
+ (0, import_transform_paths2.transformPaths)(result.data, [
995
+ {
996
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
997
+ paths: [
998
+ { path: "tickets.guestDetails.form.inputValues.address.address" }
999
+ ]
1000
+ }
1001
+ ])
1002
+ );
1003
+ } catch (err) {
1004
+ const transformedError = (0, import_transform_error.transformError)(
1005
+ err,
1006
+ {
1007
+ spreadPathsToArguments: {},
1008
+ explicitPathsToArguments: {
1009
+ eventId: "$[0]",
1010
+ ticketNumber: "$[1].ticketNumber"
1011
+ },
1012
+ singleArgumentUnchanged: false
1013
+ },
1014
+ ["eventId", "options"]
1015
+ );
1016
+ sideEffects?.onError?.(err);
1017
+ throw transformedError;
1018
+ }
1019
+ }
1020
+ async function deleteTicketCheckIns(eventId, options) {
1021
+ const { httpClient, sideEffects } = arguments[2];
1022
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1023
+ eventId,
1024
+ ticketNumber: options?.ticketNumber
1025
+ });
1026
+ const reqOpts = deleteTicketCheckIn(payload);
1027
+ sideEffects?.onSiteCall?.();
1028
+ try {
1029
+ const result = await httpClient.request(reqOpts);
1030
+ sideEffects?.onSuccess?.(result);
1031
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1032
+ (0, import_transform_paths2.transformPaths)(result.data, [
1033
+ {
1034
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1035
+ paths: [
1036
+ { path: "tickets.guestDetails.form.inputValues.address.address" }
1037
+ ]
1038
+ }
1039
+ ])
1040
+ );
1041
+ } catch (err) {
1042
+ const transformedError = (0, import_transform_error.transformError)(
1043
+ err,
1044
+ {
1045
+ spreadPathsToArguments: {},
1046
+ explicitPathsToArguments: {
1047
+ eventId: "$[0]",
1048
+ ticketNumber: "$[1].ticketNumber"
1049
+ },
1050
+ singleArgumentUnchanged: false
1051
+ },
1052
+ ["eventId", "options"]
1053
+ );
1054
+ sideEffects?.onError?.(err);
1055
+ throw transformedError;
1056
+ }
1057
+ }
1058
+ async function updateTicket2(identifiers, options) {
1059
+ const { httpClient, sideEffects } = arguments[2];
1060
+ const payload = (0, import_transform_paths2.transformPaths)(
1061
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1062
+ eventId: identifiers?.eventId,
1063
+ ticketNumber: identifiers?.ticketNumber,
1064
+ fields: options?.fields,
1065
+ archived: options?.archived,
1066
+ guestDetails: options?.guestDetails
1067
+ }),
1068
+ [
1069
+ {
1070
+ transformFn: import_address.transformSDKAddressToRESTAddress,
1071
+ paths: [
1072
+ { path: "checkoutForm.inputValues.address.address" },
1073
+ { path: "guestDetails.form.inputValues.address.address" }
1074
+ ]
1075
+ }
1076
+ ]
1077
+ );
1078
+ const reqOpts = updateTicket(payload);
1079
+ sideEffects?.onSiteCall?.();
1080
+ try {
1081
+ const result = await httpClient.request(reqOpts);
1082
+ sideEffects?.onSuccess?.(result);
1083
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1084
+ (0, import_transform_paths2.transformPaths)(result.data, [
1085
+ {
1086
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1087
+ paths: [
1088
+ { path: "ticket.guestDetails.form.inputValues.address.address" }
1089
+ ]
1090
+ }
1091
+ ])
1092
+ );
1093
+ } catch (err) {
1094
+ const transformedError = (0, import_transform_error.transformError)(
1095
+ err,
1096
+ {
1097
+ spreadPathsToArguments: {},
1098
+ explicitPathsToArguments: {
1099
+ eventId: "$[0].eventId",
1100
+ ticketNumber: "$[0].ticketNumber",
1101
+ fields: "$[1].fields",
1102
+ archived: "$[1].archived",
1103
+ guestDetails: "$[1].guestDetails"
1104
+ },
1105
+ singleArgumentUnchanged: false
1106
+ },
1107
+ ["identifiers", "options"]
1108
+ );
1109
+ sideEffects?.onError?.(err);
1110
+ throw transformedError;
1111
+ }
1112
+ }
1113
+ async function bulkUpdateTickets2(eventId, options) {
1114
+ const { httpClient, sideEffects } = arguments[2];
1115
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1116
+ eventId,
1117
+ ticketNumber: options?.ticketNumber,
1118
+ archived: options?.archived
1119
+ });
1120
+ const reqOpts = bulkUpdateTickets(payload);
1121
+ sideEffects?.onSiteCall?.();
1122
+ try {
1123
+ const result = await httpClient.request(reqOpts);
1124
+ sideEffects?.onSuccess?.(result);
1125
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1126
+ (0, import_transform_paths2.transformPaths)(result.data, [
1127
+ {
1128
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
1129
+ paths: [
1130
+ { path: "tickets.guestDetails.form.inputValues.address.address" }
1131
+ ]
1132
+ }
1133
+ ])
1134
+ );
1135
+ } catch (err) {
1136
+ const transformedError = (0, import_transform_error.transformError)(
1137
+ err,
1138
+ {
1139
+ spreadPathsToArguments: {},
1140
+ explicitPathsToArguments: {
1141
+ eventId: "$[0]",
1142
+ ticketNumber: "$[1].ticketNumber",
1143
+ archived: "$[1].archived"
1144
+ },
1145
+ singleArgumentUnchanged: false
1146
+ },
1147
+ ["eventId", "options"]
1148
+ );
1149
+ sideEffects?.onError?.(err);
1150
+ throw transformedError;
1151
+ }
1152
+ }
1153
+ // Annotate the CommonJS export names for ESM import in node:
1154
+ 0 && (module.exports = {
1155
+ ChannelType,
1156
+ OrderStatus,
1157
+ State,
1158
+ SubdivisionType,
1159
+ TicketFieldset,
1160
+ WebhookIdentityType,
1161
+ bulkUpdateTickets,
1162
+ checkInTickets,
1163
+ deleteTicketCheckIns,
1164
+ getTicket,
1165
+ listTickets,
1166
+ updateTicket
1167
+ });
1168
+ //# sourceMappingURL=index.typings.js.map