@wix/auto_sdk_events_forms 1.0.34 → 1.0.36

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,1332 @@
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
+ Alignment: () => Alignment,
24
+ AppType: () => AppType,
25
+ BackgroundType: () => BackgroundType,
26
+ ButtonDataType: () => ButtonDataType,
27
+ ConferenceType: () => ConferenceType,
28
+ Crop: () => Crop,
29
+ DecorationType: () => DecorationType,
30
+ Direction: () => Direction,
31
+ EventStatus: () => EventStatus,
32
+ EventType: () => EventType,
33
+ FontType: () => FontType,
34
+ GIFType: () => GIFType,
35
+ InitialExpandedItems: () => InitialExpandedItems,
36
+ InputControlType: () => InputControlType,
37
+ LayoutType: () => LayoutType,
38
+ LineStyle: () => LineStyle,
39
+ LocationType: () => LocationType,
40
+ MapType: () => MapType,
41
+ NodeType: () => NodeType,
42
+ NullValue: () => NullValue,
43
+ Orientation: () => Orientation,
44
+ PluginContainerDataAlignment: () => PluginContainerDataAlignment,
45
+ PollLayoutDirection: () => PollLayoutDirection,
46
+ PollLayoutType: () => PollLayoutType,
47
+ Position: () => Position,
48
+ RegistrationStatus: () => RegistrationStatus,
49
+ RequestedFields: () => RequestedFields,
50
+ RsvpStatusOptions: () => RsvpStatusOptions,
51
+ Source: () => Source,
52
+ State: () => State,
53
+ Status: () => Status,
54
+ SubdivisionType: () => SubdivisionType,
55
+ Target: () => Target,
56
+ TaxType: () => TaxType,
57
+ TextAlignment: () => TextAlignment,
58
+ ThumbnailsAlignment: () => ThumbnailsAlignment,
59
+ Type: () => Type,
60
+ ValueType: () => ValueType,
61
+ VerticalAlignment: () => VerticalAlignment,
62
+ ViewMode: () => ViewMode,
63
+ ViewRole: () => ViewRole,
64
+ VisitorType: () => VisitorType,
65
+ VoteRole: () => VoteRole,
66
+ WebhookIdentityType: () => WebhookIdentityType,
67
+ Width: () => Width,
68
+ WidthType: () => WidthType,
69
+ addControl: () => addControl2,
70
+ deleteControl: () => deleteControl2,
71
+ discardDraft: () => discardDraft2,
72
+ getForm: () => getForm2,
73
+ publishDraft: () => publishDraft2,
74
+ updateControl: () => updateControl2,
75
+ updateMessages: () => updateMessages2
76
+ });
77
+ module.exports = __toCommonJS(index_typings_exports);
78
+
79
+ // src/events-v1-form-forms.universal.ts
80
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
81
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
82
+
83
+ // src/events-v1-form-forms.http.ts
84
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
85
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
86
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
87
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
88
+ function resolveWixEventsFormFormBuilderUrl(opts) {
89
+ const domainToMappings = {
90
+ "events._base_domain_": [
91
+ {
92
+ srcPath: "",
93
+ destPath: ""
94
+ },
95
+ {
96
+ srcPath: "/_api/wix-events-web",
97
+ destPath: "/api"
98
+ }
99
+ ],
100
+ "www.wixevents.com": [
101
+ {
102
+ srcPath: "/_api/wix-events-web",
103
+ destPath: "/api"
104
+ },
105
+ {
106
+ srcPath: "/api",
107
+ destPath: "/api"
108
+ },
109
+ {
110
+ srcPath: "/viewEvent",
111
+ destPath: "/viewEvent"
112
+ },
113
+ {
114
+ srcPath: "/viewRsvpDashboard",
115
+ destPath: "/viewRsvpDashboard"
116
+ },
117
+ {
118
+ srcPath: "/viewOrderDashboard",
119
+ destPath: "/viewOrderDashboard"
120
+ },
121
+ {
122
+ srcPath: "/viewSummarySubscription",
123
+ destPath: "/viewSummarySubscription"
124
+ },
125
+ {
126
+ srcPath: "/check-in",
127
+ destPath: "/check-in"
128
+ },
129
+ {
130
+ srcPath: "/v2",
131
+ destPath: "/v2"
132
+ },
133
+ {
134
+ srcPath: "/export",
135
+ destPath: "/export"
136
+ },
137
+ {
138
+ srcPath: "/tickets",
139
+ destPath: "/tickets"
140
+ },
141
+ {
142
+ srcPath: "/payment-redirect",
143
+ destPath: "/payment-redirect"
144
+ },
145
+ {
146
+ srcPath: "/admin",
147
+ destPath: "/admin"
148
+ },
149
+ {
150
+ srcPath: "/ticket",
151
+ destPath: "/ticket"
152
+ },
153
+ {
154
+ srcPath: "/media",
155
+ destPath: "/media"
156
+ }
157
+ ],
158
+ "api._api_base_domain_": [
159
+ {
160
+ srcPath: "/wix-events-web",
161
+ destPath: ""
162
+ }
163
+ ],
164
+ "events.wixapps.net": [
165
+ {
166
+ srcPath: "/_api/wix-events-web",
167
+ destPath: "/api"
168
+ },
169
+ {
170
+ srcPath: "/events",
171
+ destPath: ""
172
+ }
173
+ ],
174
+ "www._base_domain_": [
175
+ {
176
+ srcPath: "/_api/wix-events-web",
177
+ destPath: "/api"
178
+ },
179
+ {
180
+ srcPath: "/_api/wix-events-web/v2",
181
+ destPath: "/v2"
182
+ },
183
+ {
184
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
185
+ destPath: "/v1/bulk-async/categories"
186
+ },
187
+ {
188
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
189
+ destPath: "/v1/bulk/categories"
190
+ },
191
+ {
192
+ srcPath: "/_api/wix-events-web/v1/categories",
193
+ destPath: "/v1/categories"
194
+ },
195
+ {
196
+ srcPath: "/_api/wix-events-web/v1/events",
197
+ destPath: "/v1/events"
198
+ },
199
+ {
200
+ srcPath: "/_api/wix-events-web/v1/orders",
201
+ destPath: "/v1/orders"
202
+ },
203
+ {
204
+ srcPath: "/_api/wix-events-web/v1/tickets",
205
+ destPath: "/v1/tickets"
206
+ }
207
+ ],
208
+ "apps._base_domain_": [
209
+ {
210
+ srcPath: "/_api/wix-events-web",
211
+ destPath: "/api"
212
+ },
213
+ {
214
+ srcPath: "/events",
215
+ destPath: ""
216
+ }
217
+ ],
218
+ "manage._base_domain_": [
219
+ {
220
+ srcPath: "/_api/wix-events-web",
221
+ destPath: "/api"
222
+ },
223
+ {
224
+ srcPath: "/_api/wix-events-web/v1/events",
225
+ destPath: "/v1/events"
226
+ },
227
+ {
228
+ srcPath: "/_api/wix-events-web/v1/categories",
229
+ destPath: "/v1/categories"
230
+ },
231
+ {
232
+ srcPath: "/_api/wix-events-web/v2/events",
233
+ destPath: "/v2/events"
234
+ },
235
+ {
236
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
237
+ destPath: "/v1/bulk/categories"
238
+ },
239
+ {
240
+ srcPath: "/_api/wix-events-web/v1/bulk/events",
241
+ destPath: "/v1/bulk/events"
242
+ },
243
+ {
244
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
245
+ destPath: "/v1/bulk-async/categories"
246
+ },
247
+ {
248
+ srcPath: "/_api/wix-events-web/v1/tickets",
249
+ destPath: "/v1/tickets"
250
+ },
251
+ {
252
+ srcPath: "/events/v1/events",
253
+ destPath: "/v1/events"
254
+ },
255
+ {
256
+ srcPath: "/events/v1/categories",
257
+ destPath: "/v1/categories"
258
+ },
259
+ {
260
+ srcPath: "/events/v1/bulk/categories",
261
+ destPath: "/v1/bulk/categories"
262
+ },
263
+ {
264
+ srcPath: "/events/v1/bulk-async/categories",
265
+ destPath: "/v1/bulk-async/categories"
266
+ },
267
+ {
268
+ srcPath: "/events/v1/bulk/events",
269
+ destPath: "/v1/bulk/events"
270
+ },
271
+ {
272
+ srcPath: "/events/v1/reports",
273
+ destPath: "/v1/reports"
274
+ },
275
+ {
276
+ srcPath: "/events/v1/tickets",
277
+ destPath: "/v1/tickets"
278
+ },
279
+ {
280
+ srcPath: "/events/v1/orders",
281
+ destPath: "/v1/orders"
282
+ },
283
+ {
284
+ srcPath: "/events/v1/web",
285
+ destPath: "/v1/web"
286
+ },
287
+ {
288
+ srcPath: "/events/v2/tickets",
289
+ destPath: "/v2/tickets"
290
+ },
291
+ {
292
+ srcPath: "/events/v2/events",
293
+ destPath: "/v2/events"
294
+ }
295
+ ],
296
+ "www.wixapis.com": [
297
+ {
298
+ srcPath: "/events/v1/events",
299
+ destPath: "/v1/events"
300
+ },
301
+ {
302
+ srcPath: "/events/v1/tickets",
303
+ destPath: "/v1/tickets"
304
+ },
305
+ {
306
+ srcPath: "/events/v1/categories",
307
+ destPath: "/v1/categories"
308
+ },
309
+ {
310
+ srcPath: "/events/v1/orders",
311
+ destPath: "/v1/orders"
312
+ },
313
+ {
314
+ srcPath: "/events/v1/bulk/categories",
315
+ destPath: "/v1/bulk/categories"
316
+ },
317
+ {
318
+ srcPath: "/events/v2/events",
319
+ destPath: "/v2/events"
320
+ },
321
+ {
322
+ srcPath: "/events/v1/bulk-async/categories",
323
+ destPath: "/v1/bulk-async/categories"
324
+ }
325
+ ],
326
+ "api._base_domain_": [
327
+ {
328
+ srcPath: "/events/v2",
329
+ destPath: "/v2"
330
+ },
331
+ {
332
+ srcPath: "/events/v1/bulk-async/categories",
333
+ destPath: "/v1/bulk-async/categories"
334
+ },
335
+ {
336
+ srcPath: "/events/v1/bulk/categories",
337
+ destPath: "/v1/bulk/categories"
338
+ },
339
+ {
340
+ srcPath: "/events/v1/categories",
341
+ destPath: "/v1/categories"
342
+ },
343
+ {
344
+ srcPath: "/events/v1/events",
345
+ destPath: "/v1/events"
346
+ },
347
+ {
348
+ srcPath: "/events/v1/orders",
349
+ destPath: "/v1/orders"
350
+ },
351
+ {
352
+ srcPath: "/events/v1/tickets",
353
+ destPath: "/v1/tickets"
354
+ }
355
+ ],
356
+ _: [
357
+ {
358
+ srcPath: "/_api/wix-events-web/v2",
359
+ destPath: "/v2"
360
+ },
361
+ {
362
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
363
+ destPath: "/v1/bulk-async/categories"
364
+ },
365
+ {
366
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
367
+ destPath: "/v1/bulk/categories"
368
+ },
369
+ {
370
+ srcPath: "/_api/wix-events-web/v1/categories",
371
+ destPath: "/v1/categories"
372
+ },
373
+ {
374
+ srcPath: "/_api/wix-events-web/v1/events",
375
+ destPath: "/v1/events"
376
+ },
377
+ {
378
+ srcPath: "/_api/wix-events-web/v1/orders",
379
+ destPath: "/v1/orders"
380
+ },
381
+ {
382
+ srcPath: "/_api/wix-events-web/v1/tickets",
383
+ destPath: "/v1/tickets"
384
+ }
385
+ ],
386
+ "editor.wixapps.net": [
387
+ {
388
+ srcPath: "/events/v2/events",
389
+ destPath: "/v2/events"
390
+ },
391
+ {
392
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
393
+ destPath: "/v1/bulk-async/categories"
394
+ },
395
+ {
396
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
397
+ destPath: "/v1/bulk/categories"
398
+ },
399
+ {
400
+ srcPath: "/_api/wix-events-web/v1/categories",
401
+ destPath: "/v1/categories"
402
+ },
403
+ {
404
+ srcPath: "/_api/wix-events-web/v1/events",
405
+ destPath: "/v1/events"
406
+ },
407
+ {
408
+ srcPath: "/_api/wix-events-web/v1/orders",
409
+ destPath: "/v1/orders"
410
+ },
411
+ {
412
+ srcPath: "/_api/wix-events-web/v1/tickets",
413
+ destPath: "/v1/tickets"
414
+ }
415
+ ],
416
+ "*.dev.wix-code.com": [
417
+ {
418
+ srcPath: "/_api/wix-events-web/v2",
419
+ destPath: "/v2"
420
+ },
421
+ {
422
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
423
+ destPath: "/v1/bulk-async/categories"
424
+ },
425
+ {
426
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
427
+ destPath: "/v1/bulk/categories"
428
+ },
429
+ {
430
+ srcPath: "/_api/wix-events-web/v1/categories",
431
+ destPath: "/v1/categories"
432
+ },
433
+ {
434
+ srcPath: "/_api/wix-events-web/v1/events",
435
+ destPath: "/v1/events"
436
+ },
437
+ {
438
+ srcPath: "/_api/wix-events-web/v1/orders",
439
+ destPath: "/v1/orders"
440
+ },
441
+ {
442
+ srcPath: "/_api/wix-events-web/v1/tickets",
443
+ destPath: "/v1/tickets"
444
+ }
445
+ ],
446
+ "*.pub.wix-code.com": [
447
+ {
448
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
449
+ destPath: "/v1/bulk-async/categories"
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/categories",
457
+ destPath: "/v1/categories"
458
+ },
459
+ {
460
+ srcPath: "/_api/wix-events-web/v1/events",
461
+ destPath: "/v1/events"
462
+ },
463
+ {
464
+ srcPath: "/_api/wix-events-web/v1/orders",
465
+ destPath: "/v1/orders"
466
+ },
467
+ {
468
+ srcPath: "/_api/wix-events-web/v1/tickets",
469
+ destPath: "/v1/tickets"
470
+ }
471
+ ],
472
+ "editor-flow.wixapps.net": [
473
+ {
474
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
475
+ destPath: "/v1/bulk-async/categories"
476
+ },
477
+ {
478
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
479
+ destPath: "/v1/bulk/categories"
480
+ },
481
+ {
482
+ srcPath: "/_api/wix-events-web/v1/categories",
483
+ destPath: "/v1/categories"
484
+ },
485
+ {
486
+ srcPath: "/_api/wix-events-web/v1/events",
487
+ destPath: "/v1/events"
488
+ },
489
+ {
490
+ srcPath: "/_api/wix-events-web/v1/orders",
491
+ destPath: "/v1/orders"
492
+ },
493
+ {
494
+ srcPath: "/_api/wix-events-web/v1/tickets",
495
+ destPath: "/v1/tickets"
496
+ }
497
+ ],
498
+ "editor._base_domain_": [
499
+ {
500
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
501
+ destPath: "/v1/bulk-async/categories"
502
+ },
503
+ {
504
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
505
+ destPath: "/v1/bulk/categories"
506
+ },
507
+ {
508
+ srcPath: "/_api/wix-events-web/v1/categories",
509
+ destPath: "/v1/categories"
510
+ },
511
+ {
512
+ srcPath: "/_api/wix-events-web/v1/events",
513
+ destPath: "/v1/events"
514
+ },
515
+ {
516
+ srcPath: "/_api/wix-events-web/v1/orders",
517
+ destPath: "/v1/orders"
518
+ },
519
+ {
520
+ srcPath: "/_api/wix-events-web/v1/tickets",
521
+ destPath: "/v1/tickets"
522
+ }
523
+ ],
524
+ "blocks._base_domain_": [
525
+ {
526
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
527
+ destPath: "/v1/bulk-async/categories"
528
+ },
529
+ {
530
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
531
+ destPath: "/v1/bulk/categories"
532
+ },
533
+ {
534
+ srcPath: "/_api/wix-events-web/v1/categories",
535
+ destPath: "/v1/categories"
536
+ },
537
+ {
538
+ srcPath: "/_api/wix-events-web/v1/events",
539
+ destPath: "/v1/events"
540
+ },
541
+ {
542
+ srcPath: "/_api/wix-events-web/v1/orders",
543
+ destPath: "/v1/orders"
544
+ },
545
+ {
546
+ srcPath: "/_api/wix-events-web/v1/tickets",
547
+ destPath: "/v1/tickets"
548
+ }
549
+ ],
550
+ "create.editorx": [
551
+ {
552
+ srcPath: "/_api/wix-events-web/v1/bulk-async/categories",
553
+ destPath: "/v1/bulk-async/categories"
554
+ },
555
+ {
556
+ srcPath: "/_api/wix-events-web/v1/bulk/categories",
557
+ destPath: "/v1/bulk/categories"
558
+ },
559
+ {
560
+ srcPath: "/_api/wix-events-web/v1/categories",
561
+ destPath: "/v1/categories"
562
+ },
563
+ {
564
+ srcPath: "/_api/wix-events-web/v1/events",
565
+ destPath: "/v1/events"
566
+ },
567
+ {
568
+ srcPath: "/_api/wix-events-web/v1/orders",
569
+ destPath: "/v1/orders"
570
+ },
571
+ {
572
+ srcPath: "/_api/wix-events-web/v1/tickets",
573
+ destPath: "/v1/tickets"
574
+ }
575
+ ]
576
+ };
577
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
578
+ }
579
+ var PACKAGE_NAME = "@wix/auto_sdk_events_forms";
580
+ function getForm(payload) {
581
+ function __getForm({ host }) {
582
+ const metadata = {
583
+ entityFqdn: "wix.events.v1.form",
584
+ method: "GET",
585
+ methodFqn: "wix.events.form.FormBuilder.GetForm",
586
+ packageName: PACKAGE_NAME,
587
+ url: resolveWixEventsFormFormBuilderUrl({
588
+ protoPath: "/v1/events/{eventId}/form",
589
+ data: payload,
590
+ host
591
+ }),
592
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
593
+ };
594
+ return metadata;
595
+ }
596
+ return __getForm;
597
+ }
598
+ function addControl(payload) {
599
+ function __addControl({ host }) {
600
+ const metadata = {
601
+ entityFqdn: "wix.events.v1.form",
602
+ method: "POST",
603
+ methodFqn: "wix.events.form.FormBuilder.AddControl",
604
+ packageName: PACKAGE_NAME,
605
+ url: resolveWixEventsFormFormBuilderUrl({
606
+ protoPath: "/v1/events/{eventId}/form/control",
607
+ data: payload,
608
+ host
609
+ }),
610
+ data: payload
611
+ };
612
+ return metadata;
613
+ }
614
+ return __addControl;
615
+ }
616
+ function updateControl(payload) {
617
+ function __updateControl({ host }) {
618
+ const metadata = {
619
+ entityFqdn: "wix.events.v1.form",
620
+ method: "PUT",
621
+ methodFqn: "wix.events.form.FormBuilder.UpdateControl",
622
+ packageName: PACKAGE_NAME,
623
+ url: resolveWixEventsFormFormBuilderUrl({
624
+ protoPath: "/v1/events/{eventId}/form/controls/{id}",
625
+ data: payload,
626
+ host
627
+ }),
628
+ data: payload
629
+ };
630
+ return metadata;
631
+ }
632
+ return __updateControl;
633
+ }
634
+ function deleteControl(payload) {
635
+ function __deleteControl({ host }) {
636
+ const metadata = {
637
+ entityFqdn: "wix.events.v1.form",
638
+ method: "DELETE",
639
+ methodFqn: "wix.events.form.FormBuilder.DeleteControl",
640
+ packageName: PACKAGE_NAME,
641
+ url: resolveWixEventsFormFormBuilderUrl({
642
+ protoPath: "/v1/events/{eventId}/form/controls/{id}",
643
+ data: payload,
644
+ host
645
+ }),
646
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
647
+ };
648
+ return metadata;
649
+ }
650
+ return __deleteControl;
651
+ }
652
+ function updateMessages(payload) {
653
+ function __updateMessages({ host }) {
654
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
655
+ {
656
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
657
+ paths: [{ path: "fields" }]
658
+ }
659
+ ]);
660
+ const metadata = {
661
+ entityFqdn: "wix.events.v1.form",
662
+ method: "PATCH",
663
+ methodFqn: "wix.events.form.FormBuilder.UpdateMessages",
664
+ packageName: PACKAGE_NAME,
665
+ url: resolveWixEventsFormFormBuilderUrl({
666
+ protoPath: "/v1/events/{eventId}/form/messages",
667
+ data: serializedData,
668
+ host
669
+ }),
670
+ data: serializedData
671
+ };
672
+ return metadata;
673
+ }
674
+ return __updateMessages;
675
+ }
676
+ function publishDraft(payload) {
677
+ function __publishDraft({ host }) {
678
+ const metadata = {
679
+ entityFqdn: "wix.events.v1.form",
680
+ method: "POST",
681
+ methodFqn: "wix.events.form.FormBuilder.PublishDraft",
682
+ packageName: PACKAGE_NAME,
683
+ url: resolveWixEventsFormFormBuilderUrl({
684
+ protoPath: "/v1/events/{eventId}/form/publish",
685
+ data: payload,
686
+ host
687
+ }),
688
+ data: payload
689
+ };
690
+ return metadata;
691
+ }
692
+ return __publishDraft;
693
+ }
694
+ function discardDraft(payload) {
695
+ function __discardDraft({ host }) {
696
+ const metadata = {
697
+ entityFqdn: "wix.events.v1.form",
698
+ method: "DELETE",
699
+ methodFqn: "wix.events.form.FormBuilder.DiscardDraft",
700
+ packageName: PACKAGE_NAME,
701
+ url: resolveWixEventsFormFormBuilderUrl({
702
+ protoPath: "/v1/events/{eventId}/form",
703
+ data: payload,
704
+ host
705
+ }),
706
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
707
+ };
708
+ return metadata;
709
+ }
710
+ return __discardDraft;
711
+ }
712
+
713
+ // src/events-v1-form-forms.universal.ts
714
+ var InputControlType = /* @__PURE__ */ ((InputControlType2) => {
715
+ InputControlType2["INPUT"] = "INPUT";
716
+ InputControlType2["TEXTAREA"] = "TEXTAREA";
717
+ InputControlType2["DROPDOWN"] = "DROPDOWN";
718
+ InputControlType2["RADIO"] = "RADIO";
719
+ InputControlType2["CHECKBOX"] = "CHECKBOX";
720
+ InputControlType2["NAME"] = "NAME";
721
+ InputControlType2["GUEST_CONTROL"] = "GUEST_CONTROL";
722
+ InputControlType2["ADDRESS_SHORT"] = "ADDRESS_SHORT";
723
+ InputControlType2["ADDRESS_FULL"] = "ADDRESS_FULL";
724
+ InputControlType2["DATE"] = "DATE";
725
+ return InputControlType2;
726
+ })(InputControlType || {});
727
+ var ValueType = /* @__PURE__ */ ((ValueType2) => {
728
+ ValueType2["TEXT"] = "TEXT";
729
+ ValueType2["NUMBER"] = "NUMBER";
730
+ ValueType2["TEXT_ARRAY"] = "TEXT_ARRAY";
731
+ ValueType2["DATE_TIME"] = "DATE_TIME";
732
+ ValueType2["ADDRESS"] = "ADDRESS";
733
+ return ValueType2;
734
+ })(ValueType || {});
735
+ var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
736
+ RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
737
+ RequestedFields2["DELETED"] = "DELETED";
738
+ return RequestedFields2;
739
+ })(RequestedFields || {});
740
+ var LocationType = /* @__PURE__ */ ((LocationType2) => {
741
+ LocationType2["VENUE"] = "VENUE";
742
+ LocationType2["ONLINE"] = "ONLINE";
743
+ return LocationType2;
744
+ })(LocationType || {});
745
+ var SubdivisionType = /* @__PURE__ */ ((SubdivisionType2) => {
746
+ SubdivisionType2["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
747
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
748
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
749
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
750
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
751
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
752
+ SubdivisionType2["COUNTRY"] = "COUNTRY";
753
+ return SubdivisionType2;
754
+ })(SubdivisionType || {});
755
+ var Status = /* @__PURE__ */ ((Status2) => {
756
+ Status2["ONE_TIME"] = "ONE_TIME";
757
+ Status2["RECURRING"] = "RECURRING";
758
+ Status2["RECURRING_NEXT"] = "RECURRING_NEXT";
759
+ Status2["RECURRING_LAST_ENDED"] = "RECURRING_LAST_ENDED";
760
+ Status2["RECURRING_LAST_CANCELED"] = "RECURRING_LAST_CANCELED";
761
+ return Status2;
762
+ })(Status || {});
763
+ var EventStatus = /* @__PURE__ */ ((EventStatus2) => {
764
+ EventStatus2["SCHEDULED"] = "SCHEDULED";
765
+ EventStatus2["STARTED"] = "STARTED";
766
+ EventStatus2["ENDED"] = "ENDED";
767
+ EventStatus2["CANCELED"] = "CANCELED";
768
+ return EventStatus2;
769
+ })(EventStatus || {});
770
+ var EventType = /* @__PURE__ */ ((EventType2) => {
771
+ EventType2["NA_EVENT_TYPE"] = "NA_EVENT_TYPE";
772
+ EventType2["RSVP"] = "RSVP";
773
+ EventType2["TICKETS"] = "TICKETS";
774
+ EventType2["EXTERNAL"] = "EXTERNAL";
775
+ EventType2["NO_REGISTRATION"] = "NO_REGISTRATION";
776
+ return EventType2;
777
+ })(EventType || {});
778
+ var RegistrationStatus = /* @__PURE__ */ ((RegistrationStatus2) => {
779
+ RegistrationStatus2["NA_REGISTRATION_STATUS"] = "NA_REGISTRATION_STATUS";
780
+ RegistrationStatus2["CLOSED"] = "CLOSED";
781
+ RegistrationStatus2["CLOSED_MANUALLY"] = "CLOSED_MANUALLY";
782
+ RegistrationStatus2["OPEN_RSVP"] = "OPEN_RSVP";
783
+ RegistrationStatus2["OPEN_RSVP_WAITLIST"] = "OPEN_RSVP_WAITLIST";
784
+ RegistrationStatus2["OPEN_TICKETS"] = "OPEN_TICKETS";
785
+ RegistrationStatus2["OPEN_EXTERNAL"] = "OPEN_EXTERNAL";
786
+ RegistrationStatus2["SCHEDULED_RSVP"] = "SCHEDULED_RSVP";
787
+ return RegistrationStatus2;
788
+ })(RegistrationStatus || {});
789
+ var RsvpStatusOptions = /* @__PURE__ */ ((RsvpStatusOptions2) => {
790
+ RsvpStatusOptions2["YES_ONLY"] = "YES_ONLY";
791
+ RsvpStatusOptions2["YES_AND_NO"] = "YES_AND_NO";
792
+ return RsvpStatusOptions2;
793
+ })(RsvpStatusOptions || {});
794
+ var TaxType = /* @__PURE__ */ ((TaxType2) => {
795
+ TaxType2["INCLUDED"] = "INCLUDED";
796
+ TaxType2["ADDED"] = "ADDED";
797
+ TaxType2["ADDED_AT_CHECKOUT"] = "ADDED_AT_CHECKOUT";
798
+ return TaxType2;
799
+ })(TaxType || {});
800
+ var VisitorType = /* @__PURE__ */ ((VisitorType2) => {
801
+ VisitorType2["VISITOR"] = "VISITOR";
802
+ VisitorType2["MEMBER"] = "MEMBER";
803
+ VisitorType2["VISITOR_OR_MEMBER"] = "VISITOR_OR_MEMBER";
804
+ return VisitorType2;
805
+ })(VisitorType || {});
806
+ var ConferenceType = /* @__PURE__ */ ((ConferenceType2) => {
807
+ ConferenceType2["MEETING"] = "MEETING";
808
+ ConferenceType2["WEBINAR"] = "WEBINAR";
809
+ return ConferenceType2;
810
+ })(ConferenceType || {});
811
+ var State = /* @__PURE__ */ ((State2) => {
812
+ State2["MANUAL"] = "MANUAL";
813
+ State2["AUTO"] = "AUTO";
814
+ State2["RECURRING_EVENT"] = "RECURRING_EVENT";
815
+ State2["HIDDEN"] = "HIDDEN";
816
+ return State2;
817
+ })(State || {});
818
+ var NodeType = /* @__PURE__ */ ((NodeType2) => {
819
+ NodeType2["PARAGRAPH"] = "PARAGRAPH";
820
+ NodeType2["TEXT"] = "TEXT";
821
+ NodeType2["HEADING"] = "HEADING";
822
+ NodeType2["BULLETED_LIST"] = "BULLETED_LIST";
823
+ NodeType2["ORDERED_LIST"] = "ORDERED_LIST";
824
+ NodeType2["LIST_ITEM"] = "LIST_ITEM";
825
+ NodeType2["BLOCKQUOTE"] = "BLOCKQUOTE";
826
+ NodeType2["CODE_BLOCK"] = "CODE_BLOCK";
827
+ NodeType2["VIDEO"] = "VIDEO";
828
+ NodeType2["DIVIDER"] = "DIVIDER";
829
+ NodeType2["FILE"] = "FILE";
830
+ NodeType2["GALLERY"] = "GALLERY";
831
+ NodeType2["GIF"] = "GIF";
832
+ NodeType2["HTML"] = "HTML";
833
+ NodeType2["IMAGE"] = "IMAGE";
834
+ NodeType2["LINK_PREVIEW"] = "LINK_PREVIEW";
835
+ NodeType2["MAP"] = "MAP";
836
+ NodeType2["POLL"] = "POLL";
837
+ NodeType2["APP_EMBED"] = "APP_EMBED";
838
+ NodeType2["BUTTON"] = "BUTTON";
839
+ NodeType2["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
840
+ NodeType2["TABLE"] = "TABLE";
841
+ NodeType2["EMBED"] = "EMBED";
842
+ NodeType2["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
843
+ NodeType2["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
844
+ NodeType2["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
845
+ NodeType2["TABLE_CELL"] = "TABLE_CELL";
846
+ NodeType2["TABLE_ROW"] = "TABLE_ROW";
847
+ NodeType2["EXTERNAL"] = "EXTERNAL";
848
+ NodeType2["AUDIO"] = "AUDIO";
849
+ NodeType2["CAPTION"] = "CAPTION";
850
+ NodeType2["LAYOUT"] = "LAYOUT";
851
+ NodeType2["LAYOUT_CELL"] = "LAYOUT_CELL";
852
+ return NodeType2;
853
+ })(NodeType || {});
854
+ var WidthType = /* @__PURE__ */ ((WidthType2) => {
855
+ WidthType2["CONTENT"] = "CONTENT";
856
+ WidthType2["SMALL"] = "SMALL";
857
+ WidthType2["ORIGINAL"] = "ORIGINAL";
858
+ WidthType2["FULL_WIDTH"] = "FULL_WIDTH";
859
+ return WidthType2;
860
+ })(WidthType || {});
861
+ var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignment2) => {
862
+ PluginContainerDataAlignment2["CENTER"] = "CENTER";
863
+ PluginContainerDataAlignment2["LEFT"] = "LEFT";
864
+ PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
865
+ return PluginContainerDataAlignment2;
866
+ })(PluginContainerDataAlignment || {});
867
+ var ButtonDataType = /* @__PURE__ */ ((ButtonDataType2) => {
868
+ ButtonDataType2["LINK"] = "LINK";
869
+ ButtonDataType2["ACTION"] = "ACTION";
870
+ return ButtonDataType2;
871
+ })(ButtonDataType || {});
872
+ var Target = /* @__PURE__ */ ((Target2) => {
873
+ Target2["SELF"] = "SELF";
874
+ Target2["BLANK"] = "BLANK";
875
+ Target2["PARENT"] = "PARENT";
876
+ Target2["TOP"] = "TOP";
877
+ return Target2;
878
+ })(Target || {});
879
+ var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
880
+ TextAlignment2["AUTO"] = "AUTO";
881
+ TextAlignment2["LEFT"] = "LEFT";
882
+ TextAlignment2["RIGHT"] = "RIGHT";
883
+ TextAlignment2["CENTER"] = "CENTER";
884
+ TextAlignment2["JUSTIFY"] = "JUSTIFY";
885
+ return TextAlignment2;
886
+ })(TextAlignment || {});
887
+ var LineStyle = /* @__PURE__ */ ((LineStyle2) => {
888
+ LineStyle2["SINGLE"] = "SINGLE";
889
+ LineStyle2["DOUBLE"] = "DOUBLE";
890
+ LineStyle2["DASHED"] = "DASHED";
891
+ LineStyle2["DOTTED"] = "DOTTED";
892
+ return LineStyle2;
893
+ })(LineStyle || {});
894
+ var Width = /* @__PURE__ */ ((Width2) => {
895
+ Width2["LARGE"] = "LARGE";
896
+ Width2["MEDIUM"] = "MEDIUM";
897
+ Width2["SMALL"] = "SMALL";
898
+ return Width2;
899
+ })(Width || {});
900
+ var Alignment = /* @__PURE__ */ ((Alignment2) => {
901
+ Alignment2["CENTER"] = "CENTER";
902
+ Alignment2["LEFT"] = "LEFT";
903
+ Alignment2["RIGHT"] = "RIGHT";
904
+ return Alignment2;
905
+ })(Alignment || {});
906
+ var ViewMode = /* @__PURE__ */ ((ViewMode2) => {
907
+ ViewMode2["NONE"] = "NONE";
908
+ ViewMode2["FULL"] = "FULL";
909
+ ViewMode2["MINI"] = "MINI";
910
+ return ViewMode2;
911
+ })(ViewMode || {});
912
+ var LayoutType = /* @__PURE__ */ ((LayoutType2) => {
913
+ LayoutType2["COLLAGE"] = "COLLAGE";
914
+ LayoutType2["MASONRY"] = "MASONRY";
915
+ LayoutType2["GRID"] = "GRID";
916
+ LayoutType2["THUMBNAIL"] = "THUMBNAIL";
917
+ LayoutType2["SLIDER"] = "SLIDER";
918
+ LayoutType2["SLIDESHOW"] = "SLIDESHOW";
919
+ LayoutType2["PANORAMA"] = "PANORAMA";
920
+ LayoutType2["COLUMN"] = "COLUMN";
921
+ LayoutType2["MAGIC"] = "MAGIC";
922
+ LayoutType2["FULLSIZE"] = "FULLSIZE";
923
+ return LayoutType2;
924
+ })(LayoutType || {});
925
+ var Orientation = /* @__PURE__ */ ((Orientation2) => {
926
+ Orientation2["ROWS"] = "ROWS";
927
+ Orientation2["COLUMNS"] = "COLUMNS";
928
+ return Orientation2;
929
+ })(Orientation || {});
930
+ var Crop = /* @__PURE__ */ ((Crop2) => {
931
+ Crop2["FILL"] = "FILL";
932
+ Crop2["FIT"] = "FIT";
933
+ return Crop2;
934
+ })(Crop || {});
935
+ var ThumbnailsAlignment = /* @__PURE__ */ ((ThumbnailsAlignment2) => {
936
+ ThumbnailsAlignment2["TOP"] = "TOP";
937
+ ThumbnailsAlignment2["RIGHT"] = "RIGHT";
938
+ ThumbnailsAlignment2["BOTTOM"] = "BOTTOM";
939
+ ThumbnailsAlignment2["LEFT"] = "LEFT";
940
+ ThumbnailsAlignment2["NONE"] = "NONE";
941
+ return ThumbnailsAlignment2;
942
+ })(ThumbnailsAlignment || {});
943
+ var GIFType = /* @__PURE__ */ ((GIFType2) => {
944
+ GIFType2["NORMAL"] = "NORMAL";
945
+ GIFType2["STICKER"] = "STICKER";
946
+ return GIFType2;
947
+ })(GIFType || {});
948
+ var Source = /* @__PURE__ */ ((Source2) => {
949
+ Source2["HTML"] = "HTML";
950
+ Source2["ADSENSE"] = "ADSENSE";
951
+ return Source2;
952
+ })(Source || {});
953
+ var Position = /* @__PURE__ */ ((Position2) => {
954
+ Position2["START"] = "START";
955
+ Position2["END"] = "END";
956
+ Position2["TOP"] = "TOP";
957
+ Position2["HIDDEN"] = "HIDDEN";
958
+ return Position2;
959
+ })(Position || {});
960
+ var MapType = /* @__PURE__ */ ((MapType2) => {
961
+ MapType2["ROADMAP"] = "ROADMAP";
962
+ MapType2["SATELITE"] = "SATELITE";
963
+ MapType2["HYBRID"] = "HYBRID";
964
+ MapType2["TERRAIN"] = "TERRAIN";
965
+ return MapType2;
966
+ })(MapType || {});
967
+ var ViewRole = /* @__PURE__ */ ((ViewRole2) => {
968
+ ViewRole2["CREATOR"] = "CREATOR";
969
+ ViewRole2["VOTERS"] = "VOTERS";
970
+ ViewRole2["EVERYONE"] = "EVERYONE";
971
+ return ViewRole2;
972
+ })(ViewRole || {});
973
+ var VoteRole = /* @__PURE__ */ ((VoteRole2) => {
974
+ VoteRole2["SITE_MEMBERS"] = "SITE_MEMBERS";
975
+ VoteRole2["ALL"] = "ALL";
976
+ return VoteRole2;
977
+ })(VoteRole || {});
978
+ var PollLayoutType = /* @__PURE__ */ ((PollLayoutType2) => {
979
+ PollLayoutType2["LIST"] = "LIST";
980
+ PollLayoutType2["GRID"] = "GRID";
981
+ return PollLayoutType2;
982
+ })(PollLayoutType || {});
983
+ var PollLayoutDirection = /* @__PURE__ */ ((PollLayoutDirection2) => {
984
+ PollLayoutDirection2["LTR"] = "LTR";
985
+ PollLayoutDirection2["RTL"] = "RTL";
986
+ return PollLayoutDirection2;
987
+ })(PollLayoutDirection || {});
988
+ var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
989
+ BackgroundType2["COLOR"] = "COLOR";
990
+ BackgroundType2["IMAGE"] = "IMAGE";
991
+ BackgroundType2["GRADIENT"] = "GRADIENT";
992
+ return BackgroundType2;
993
+ })(BackgroundType || {});
994
+ var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
995
+ DecorationType2["BOLD"] = "BOLD";
996
+ DecorationType2["ITALIC"] = "ITALIC";
997
+ DecorationType2["UNDERLINE"] = "UNDERLINE";
998
+ DecorationType2["SPOILER"] = "SPOILER";
999
+ DecorationType2["ANCHOR"] = "ANCHOR";
1000
+ DecorationType2["MENTION"] = "MENTION";
1001
+ DecorationType2["LINK"] = "LINK";
1002
+ DecorationType2["COLOR"] = "COLOR";
1003
+ DecorationType2["FONT_SIZE"] = "FONT_SIZE";
1004
+ DecorationType2["EXTERNAL"] = "EXTERNAL";
1005
+ DecorationType2["STRIKETHROUGH"] = "STRIKETHROUGH";
1006
+ DecorationType2["SUPERSCRIPT"] = "SUPERSCRIPT";
1007
+ DecorationType2["SUBSCRIPT"] = "SUBSCRIPT";
1008
+ return DecorationType2;
1009
+ })(DecorationType || {});
1010
+ var FontType = /* @__PURE__ */ ((FontType2) => {
1011
+ FontType2["PX"] = "PX";
1012
+ FontType2["EM"] = "EM";
1013
+ return FontType2;
1014
+ })(FontType || {});
1015
+ var AppType = /* @__PURE__ */ ((AppType2) => {
1016
+ AppType2["PRODUCT"] = "PRODUCT";
1017
+ AppType2["EVENT"] = "EVENT";
1018
+ AppType2["BOOKING"] = "BOOKING";
1019
+ return AppType2;
1020
+ })(AppType || {});
1021
+ var InitialExpandedItems = /* @__PURE__ */ ((InitialExpandedItems2) => {
1022
+ InitialExpandedItems2["FIRST"] = "FIRST";
1023
+ InitialExpandedItems2["ALL"] = "ALL";
1024
+ InitialExpandedItems2["NONE"] = "NONE";
1025
+ return InitialExpandedItems2;
1026
+ })(InitialExpandedItems || {});
1027
+ var Direction = /* @__PURE__ */ ((Direction2) => {
1028
+ Direction2["LTR"] = "LTR";
1029
+ Direction2["RTL"] = "RTL";
1030
+ return Direction2;
1031
+ })(Direction || {});
1032
+ var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
1033
+ VerticalAlignment2["TOP"] = "TOP";
1034
+ VerticalAlignment2["MIDDLE"] = "MIDDLE";
1035
+ VerticalAlignment2["BOTTOM"] = "BOTTOM";
1036
+ return VerticalAlignment2;
1037
+ })(VerticalAlignment || {});
1038
+ var NullValue = /* @__PURE__ */ ((NullValue2) => {
1039
+ NullValue2["NULL_VALUE"] = "NULL_VALUE";
1040
+ return NullValue2;
1041
+ })(NullValue || {});
1042
+ var Type = /* @__PURE__ */ ((Type2) => {
1043
+ Type2["UNKNOWN_BADGE_TYPE"] = "UNKNOWN_BADGE_TYPE";
1044
+ Type2["FIRST_PRIORITY"] = "FIRST_PRIORITY";
1045
+ Type2["SECOND_PRIORITY"] = "SECOND_PRIORITY";
1046
+ Type2["THIRD_PRIORITY"] = "THIRD_PRIORITY";
1047
+ return Type2;
1048
+ })(Type || {});
1049
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1050
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
1051
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
1052
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
1053
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1054
+ WebhookIdentityType2["APP"] = "APP";
1055
+ return WebhookIdentityType2;
1056
+ })(WebhookIdentityType || {});
1057
+ async function getForm2(eventId) {
1058
+ const { httpClient, sideEffects } = arguments[1];
1059
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ eventId });
1060
+ const reqOpts = getForm(payload);
1061
+ sideEffects?.onSiteCall?.();
1062
+ try {
1063
+ const result = await httpClient.request(reqOpts);
1064
+ sideEffects?.onSuccess?.(result);
1065
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.form;
1066
+ } catch (err) {
1067
+ const transformedError = (0, import_transform_error.transformError)(
1068
+ err,
1069
+ {
1070
+ spreadPathsToArguments: {},
1071
+ explicitPathsToArguments: { eventId: "$[0]" },
1072
+ singleArgumentUnchanged: false
1073
+ },
1074
+ ["eventId"]
1075
+ );
1076
+ sideEffects?.onError?.(err);
1077
+ throw transformedError;
1078
+ }
1079
+ }
1080
+ async function addControl2(eventId, options) {
1081
+ const { httpClient, sideEffects } = arguments[2];
1082
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1083
+ eventId,
1084
+ phone: options?.phone,
1085
+ address: options?.address,
1086
+ date: options?.date,
1087
+ additionalGuests: options?.additionalGuests,
1088
+ dropdown: options?.dropdown,
1089
+ checkbox: options?.checkbox,
1090
+ text: options?.text,
1091
+ radioButton: options?.radioButton
1092
+ });
1093
+ const reqOpts = addControl(payload);
1094
+ sideEffects?.onSiteCall?.();
1095
+ try {
1096
+ const result = await httpClient.request(reqOpts);
1097
+ sideEffects?.onSuccess?.(result);
1098
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1099
+ } catch (err) {
1100
+ const transformedError = (0, import_transform_error.transformError)(
1101
+ err,
1102
+ {
1103
+ spreadPathsToArguments: {},
1104
+ explicitPathsToArguments: {
1105
+ eventId: "$[0]",
1106
+ phone: "$[1].phone",
1107
+ address: "$[1].address",
1108
+ date: "$[1].date",
1109
+ additionalGuests: "$[1].additionalGuests",
1110
+ dropdown: "$[1].dropdown",
1111
+ checkbox: "$[1].checkbox",
1112
+ text: "$[1].text",
1113
+ radioButton: "$[1].radioButton"
1114
+ },
1115
+ singleArgumentUnchanged: false
1116
+ },
1117
+ ["eventId", "options"]
1118
+ );
1119
+ sideEffects?.onError?.(err);
1120
+ throw transformedError;
1121
+ }
1122
+ }
1123
+ async function updateControl2(identifiers, options) {
1124
+ const { httpClient, sideEffects } = arguments[2];
1125
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1126
+ eventId: identifiers?.eventId,
1127
+ id: identifiers?._id,
1128
+ orderIndex: options?.orderIndex,
1129
+ phone: options?.phone,
1130
+ address: options?.address,
1131
+ date: options?.date,
1132
+ additionalGuests: options?.additionalGuests,
1133
+ dropdown: options?.dropdown,
1134
+ checkbox: options?.checkbox,
1135
+ text: options?.text,
1136
+ name: options?.name,
1137
+ email: options?.email,
1138
+ radioButton: options?.radioButton
1139
+ });
1140
+ const reqOpts = updateControl(payload);
1141
+ sideEffects?.onSiteCall?.();
1142
+ try {
1143
+ const result = await httpClient.request(reqOpts);
1144
+ sideEffects?.onSuccess?.(result);
1145
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1146
+ } catch (err) {
1147
+ const transformedError = (0, import_transform_error.transformError)(
1148
+ err,
1149
+ {
1150
+ spreadPathsToArguments: {},
1151
+ explicitPathsToArguments: {
1152
+ eventId: "$[0].eventId",
1153
+ id: "$[0]._id",
1154
+ orderIndex: "$[1].orderIndex",
1155
+ phone: "$[1].phone",
1156
+ address: "$[1].address",
1157
+ date: "$[1].date",
1158
+ additionalGuests: "$[1].additionalGuests",
1159
+ dropdown: "$[1].dropdown",
1160
+ checkbox: "$[1].checkbox",
1161
+ text: "$[1].text",
1162
+ name: "$[1].name",
1163
+ email: "$[1].email",
1164
+ radioButton: "$[1].radioButton"
1165
+ },
1166
+ singleArgumentUnchanged: false
1167
+ },
1168
+ ["identifiers", "options"]
1169
+ );
1170
+ sideEffects?.onError?.(err);
1171
+ throw transformedError;
1172
+ }
1173
+ }
1174
+ async function deleteControl2(identifiers) {
1175
+ const { httpClient, sideEffects } = arguments[1];
1176
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1177
+ eventId: identifiers?.eventId,
1178
+ id: identifiers?._id
1179
+ });
1180
+ const reqOpts = deleteControl(payload);
1181
+ sideEffects?.onSiteCall?.();
1182
+ try {
1183
+ const result = await httpClient.request(reqOpts);
1184
+ sideEffects?.onSuccess?.(result);
1185
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1186
+ } catch (err) {
1187
+ const transformedError = (0, import_transform_error.transformError)(
1188
+ err,
1189
+ {
1190
+ spreadPathsToArguments: {},
1191
+ explicitPathsToArguments: { eventId: "$[0].eventId", id: "$[0]._id" },
1192
+ singleArgumentUnchanged: false
1193
+ },
1194
+ ["identifiers"]
1195
+ );
1196
+ sideEffects?.onError?.(err);
1197
+ throw transformedError;
1198
+ }
1199
+ }
1200
+ async function updateMessages2(eventId, options) {
1201
+ const { httpClient, sideEffects } = arguments[2];
1202
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1203
+ eventId,
1204
+ fields: options?.fields,
1205
+ messages: options?.messages
1206
+ });
1207
+ const reqOpts = updateMessages(payload);
1208
+ sideEffects?.onSiteCall?.();
1209
+ try {
1210
+ const result = await httpClient.request(reqOpts);
1211
+ sideEffects?.onSuccess?.(result);
1212
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1213
+ } catch (err) {
1214
+ const transformedError = (0, import_transform_error.transformError)(
1215
+ err,
1216
+ {
1217
+ spreadPathsToArguments: {},
1218
+ explicitPathsToArguments: {
1219
+ eventId: "$[0]",
1220
+ fields: "$[1].fields",
1221
+ messages: "$[1].messages"
1222
+ },
1223
+ singleArgumentUnchanged: false
1224
+ },
1225
+ ["eventId", "options"]
1226
+ );
1227
+ sideEffects?.onError?.(err);
1228
+ throw transformedError;
1229
+ }
1230
+ }
1231
+ async function publishDraft2(eventId) {
1232
+ const { httpClient, sideEffects } = arguments[1];
1233
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ eventId });
1234
+ const reqOpts = publishDraft(payload);
1235
+ sideEffects?.onSiteCall?.();
1236
+ try {
1237
+ const result = await httpClient.request(reqOpts);
1238
+ sideEffects?.onSuccess?.(result);
1239
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1240
+ } catch (err) {
1241
+ const transformedError = (0, import_transform_error.transformError)(
1242
+ err,
1243
+ {
1244
+ spreadPathsToArguments: {},
1245
+ explicitPathsToArguments: { eventId: "$[0]" },
1246
+ singleArgumentUnchanged: false
1247
+ },
1248
+ ["eventId"]
1249
+ );
1250
+ sideEffects?.onError?.(err);
1251
+ throw transformedError;
1252
+ }
1253
+ }
1254
+ async function discardDraft2(eventId) {
1255
+ const { httpClient, sideEffects } = arguments[1];
1256
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ eventId });
1257
+ const reqOpts = discardDraft(payload);
1258
+ sideEffects?.onSiteCall?.();
1259
+ try {
1260
+ const result = await httpClient.request(reqOpts);
1261
+ sideEffects?.onSuccess?.(result);
1262
+ } catch (err) {
1263
+ const transformedError = (0, import_transform_error.transformError)(
1264
+ err,
1265
+ {
1266
+ spreadPathsToArguments: {},
1267
+ explicitPathsToArguments: { eventId: "$[0]" },
1268
+ singleArgumentUnchanged: false
1269
+ },
1270
+ ["eventId"]
1271
+ );
1272
+ sideEffects?.onError?.(err);
1273
+ throw transformedError;
1274
+ }
1275
+ }
1276
+ // Annotate the CommonJS export names for ESM import in node:
1277
+ 0 && (module.exports = {
1278
+ Alignment,
1279
+ AppType,
1280
+ BackgroundType,
1281
+ ButtonDataType,
1282
+ ConferenceType,
1283
+ Crop,
1284
+ DecorationType,
1285
+ Direction,
1286
+ EventStatus,
1287
+ EventType,
1288
+ FontType,
1289
+ GIFType,
1290
+ InitialExpandedItems,
1291
+ InputControlType,
1292
+ LayoutType,
1293
+ LineStyle,
1294
+ LocationType,
1295
+ MapType,
1296
+ NodeType,
1297
+ NullValue,
1298
+ Orientation,
1299
+ PluginContainerDataAlignment,
1300
+ PollLayoutDirection,
1301
+ PollLayoutType,
1302
+ Position,
1303
+ RegistrationStatus,
1304
+ RequestedFields,
1305
+ RsvpStatusOptions,
1306
+ Source,
1307
+ State,
1308
+ Status,
1309
+ SubdivisionType,
1310
+ Target,
1311
+ TaxType,
1312
+ TextAlignment,
1313
+ ThumbnailsAlignment,
1314
+ Type,
1315
+ ValueType,
1316
+ VerticalAlignment,
1317
+ ViewMode,
1318
+ ViewRole,
1319
+ VisitorType,
1320
+ VoteRole,
1321
+ WebhookIdentityType,
1322
+ Width,
1323
+ WidthType,
1324
+ addControl,
1325
+ deleteControl,
1326
+ discardDraft,
1327
+ getForm,
1328
+ publishDraft,
1329
+ updateControl,
1330
+ updateMessages
1331
+ });
1332
+ //# sourceMappingURL=index.typings.js.map