@wix/auto_sdk_events_forms 1.0.22 → 1.0.24

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 (133) 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-form-forms.context.d.ts +17 -0
  11. package/build/cjs/src/events-v1-form-forms.context.js +67 -0
  12. package/build/cjs/src/events-v1-form-forms.context.js.map +1 -0
  13. package/build/cjs/src/events-v1-form-forms.http.d.ts +22 -0
  14. package/build/cjs/src/events-v1-form-forms.http.js +653 -0
  15. package/build/cjs/src/events-v1-form-forms.http.js.map +1 -0
  16. package/build/cjs/src/events-v1-form-forms.meta.d.ts +35 -0
  17. package/build/cjs/src/events-v1-form-forms.meta.js +161 -0
  18. package/build/cjs/src/events-v1-form-forms.meta.js.map +1 -0
  19. package/build/cjs/src/events-v1-form-forms.public.d.ts +72 -0
  20. package/build/cjs/src/events-v1-form-forms.public.js +202 -0
  21. package/build/cjs/src/events-v1-form-forms.public.js.map +1 -0
  22. package/build/cjs/src/events-v1-form-forms.types.d.ts +2991 -0
  23. package/build/cjs/src/events-v1-form-forms.types.js +488 -0
  24. package/build/cjs/src/events-v1-form-forms.types.js.map +1 -0
  25. package/build/{events-v1-form-forms.universal-DsBBfrf9.d.mts → cjs/src/events-v1-form-forms.universal.d.ts} +442 -251
  26. package/build/cjs/src/events-v1-form-forms.universal.js +867 -0
  27. package/build/cjs/src/events-v1-form-forms.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/src/events-v1-form-forms.context.d.ts +17 -0
  38. package/build/es/src/events-v1-form-forms.context.js +17 -0
  39. package/build/es/src/events-v1-form-forms.context.js.map +1 -0
  40. package/build/es/src/events-v1-form-forms.http.d.ts +22 -0
  41. package/build/es/src/events-v1-form-forms.http.js +643 -0
  42. package/build/es/src/events-v1-form-forms.http.js.map +1 -0
  43. package/build/es/src/events-v1-form-forms.meta.d.ts +35 -0
  44. package/build/es/src/events-v1-form-forms.meta.js +128 -0
  45. package/build/es/src/events-v1-form-forms.meta.js.map +1 -0
  46. package/build/es/src/events-v1-form-forms.public.d.ts +72 -0
  47. package/build/es/src/events-v1-form-forms.public.js +145 -0
  48. package/build/es/src/events-v1-form-forms.public.js.map +1 -0
  49. package/build/es/src/events-v1-form-forms.types.d.ts +2991 -0
  50. package/build/es/src/events-v1-form-forms.types.js +485 -0
  51. package/build/es/src/events-v1-form-forms.types.js.map +1 -0
  52. package/build/{events-v1-form-forms.universal-DsBBfrf9.d.ts → es/src/events-v1-form-forms.universal.d.ts} +442 -251
  53. package/build/es/src/events-v1-form-forms.universal.js +833 -0
  54. package/build/es/src/events-v1-form-forms.universal.js.map +1 -0
  55. package/build/internal/cjs/index.d.ts +1 -0
  56. package/build/internal/cjs/index.js +18 -0
  57. package/build/internal/cjs/index.js.map +1 -0
  58. package/build/internal/cjs/index.typings.d.ts +1 -0
  59. package/build/internal/cjs/index.typings.js +18 -0
  60. package/build/internal/cjs/index.typings.js.map +1 -0
  61. package/build/internal/cjs/meta.d.ts +1 -0
  62. package/build/internal/cjs/meta.js +18 -0
  63. package/build/internal/cjs/meta.js.map +1 -0
  64. package/build/internal/cjs/src/events-v1-form-forms.context.d.ts +17 -0
  65. package/build/internal/cjs/src/events-v1-form-forms.context.js +67 -0
  66. package/build/internal/cjs/src/events-v1-form-forms.context.js.map +1 -0
  67. package/build/internal/cjs/src/events-v1-form-forms.http.d.ts +22 -0
  68. package/build/internal/cjs/src/events-v1-form-forms.http.js +653 -0
  69. package/build/internal/cjs/src/events-v1-form-forms.http.js.map +1 -0
  70. package/build/internal/cjs/src/events-v1-form-forms.meta.d.ts +35 -0
  71. package/build/internal/cjs/src/events-v1-form-forms.meta.js +161 -0
  72. package/build/internal/cjs/src/events-v1-form-forms.meta.js.map +1 -0
  73. package/build/internal/cjs/src/events-v1-form-forms.public.d.ts +72 -0
  74. package/build/internal/cjs/src/events-v1-form-forms.public.js +202 -0
  75. package/build/internal/cjs/src/events-v1-form-forms.public.js.map +1 -0
  76. package/build/internal/cjs/src/events-v1-form-forms.types.d.ts +2991 -0
  77. package/build/internal/cjs/src/events-v1-form-forms.types.js +488 -0
  78. package/build/internal/cjs/src/events-v1-form-forms.types.js.map +1 -0
  79. package/build/internal/{events-v1-form-forms.universal-DsBBfrf9.d.mts → cjs/src/events-v1-form-forms.universal.d.ts} +442 -251
  80. package/build/internal/cjs/src/events-v1-form-forms.universal.js +867 -0
  81. package/build/internal/cjs/src/events-v1-form-forms.universal.js.map +1 -0
  82. package/build/internal/es/index.d.ts +1 -0
  83. package/build/internal/es/index.js +2 -0
  84. package/build/internal/es/index.js.map +1 -0
  85. package/build/internal/es/index.typings.d.ts +1 -0
  86. package/build/internal/es/index.typings.js +2 -0
  87. package/build/internal/es/index.typings.js.map +1 -0
  88. package/build/internal/es/meta.d.ts +1 -0
  89. package/build/internal/es/meta.js +2 -0
  90. package/build/internal/es/meta.js.map +1 -0
  91. package/build/internal/es/src/events-v1-form-forms.context.d.ts +17 -0
  92. package/build/internal/es/src/events-v1-form-forms.context.js +17 -0
  93. package/build/internal/es/src/events-v1-form-forms.context.js.map +1 -0
  94. package/build/internal/es/src/events-v1-form-forms.http.d.ts +22 -0
  95. package/build/internal/es/src/events-v1-form-forms.http.js +643 -0
  96. package/build/internal/es/src/events-v1-form-forms.http.js.map +1 -0
  97. package/build/internal/es/src/events-v1-form-forms.meta.d.ts +35 -0
  98. package/build/internal/es/src/events-v1-form-forms.meta.js +128 -0
  99. package/build/internal/es/src/events-v1-form-forms.meta.js.map +1 -0
  100. package/build/internal/es/src/events-v1-form-forms.public.d.ts +72 -0
  101. package/build/internal/es/src/events-v1-form-forms.public.js +145 -0
  102. package/build/internal/es/src/events-v1-form-forms.public.js.map +1 -0
  103. package/build/internal/es/src/events-v1-form-forms.types.d.ts +2991 -0
  104. package/build/internal/es/src/events-v1-form-forms.types.js +485 -0
  105. package/build/internal/es/src/events-v1-form-forms.types.js.map +1 -0
  106. package/build/internal/{events-v1-form-forms.universal-DsBBfrf9.d.ts → es/src/events-v1-form-forms.universal.d.ts} +442 -251
  107. package/build/internal/es/src/events-v1-form-forms.universal.js +833 -0
  108. package/build/internal/es/src/events-v1-form-forms.universal.js.map +1 -0
  109. package/package.json +11 -12
  110. package/build/index.d.mts +0 -84
  111. package/build/index.d.ts +0 -84
  112. package/build/index.js +0 -1512
  113. package/build/index.js.map +0 -1
  114. package/build/index.mjs +0 -1435
  115. package/build/index.mjs.map +0 -1
  116. package/build/internal/index.d.mts +0 -84
  117. package/build/internal/index.d.ts +0 -84
  118. package/build/internal/index.js +0 -1512
  119. package/build/internal/index.js.map +0 -1
  120. package/build/internal/index.mjs +0 -1435
  121. package/build/internal/index.mjs.map +0 -1
  122. package/build/internal/meta.d.mts +0 -648
  123. package/build/internal/meta.d.ts +0 -648
  124. package/build/internal/meta.js +0 -800
  125. package/build/internal/meta.js.map +0 -1
  126. package/build/internal/meta.mjs +0 -767
  127. package/build/internal/meta.mjs.map +0 -1
  128. package/build/meta.d.mts +0 -648
  129. package/build/meta.d.ts +0 -648
  130. package/build/meta.js +0 -800
  131. package/build/meta.js.map +0 -1
  132. package/build/meta.mjs +0 -767
  133. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,833 @@
1
+ import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
+ import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
+ import * as ambassadorWixEventsV1Form from './events-v1-form-forms.http.js';
4
+ export var InputControlType;
5
+ (function (InputControlType) {
6
+ /** Single text value field. */
7
+ InputControlType["INPUT"] = "INPUT";
8
+ /** Single text value field with multiple lines. */
9
+ InputControlType["TEXTAREA"] = "TEXTAREA";
10
+ /** Single-choice field with predefined values. */
11
+ InputControlType["DROPDOWN"] = "DROPDOWN";
12
+ /** Single-choice field with predefined values. */
13
+ InputControlType["RADIO"] = "RADIO";
14
+ /** Multiple-choice field with predefined values. */
15
+ InputControlType["CHECKBOX"] = "CHECKBOX";
16
+ /** Fields for entering first and last names. */
17
+ InputControlType["NAME"] = "NAME";
18
+ /** Fields for additional guests and their respective names. */
19
+ InputControlType["GUEST_CONTROL"] = "GUEST_CONTROL";
20
+ /** Single-line address field. */
21
+ InputControlType["ADDRESS_SHORT"] = "ADDRESS_SHORT";
22
+ /** Full address field with multiple lines. */
23
+ InputControlType["ADDRESS_FULL"] = "ADDRESS_FULL";
24
+ /** Fields for entering year, month, and day. */
25
+ InputControlType["DATE"] = "DATE";
26
+ })(InputControlType || (InputControlType = {}));
27
+ export var ValueType;
28
+ (function (ValueType) {
29
+ ValueType["TEXT"] = "TEXT";
30
+ ValueType["NUMBER"] = "NUMBER";
31
+ ValueType["TEXT_ARRAY"] = "TEXT_ARRAY";
32
+ ValueType["DATE_TIME"] = "DATE_TIME";
33
+ ValueType["ADDRESS"] = "ADDRESS";
34
+ })(ValueType || (ValueType = {}));
35
+ export var RequestedFields;
36
+ (function (RequestedFields) {
37
+ RequestedFields["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
38
+ /** Include soft deleted input controls in the response. */
39
+ RequestedFields["DELETED"] = "DELETED";
40
+ })(RequestedFields || (RequestedFields = {}));
41
+ export var LocationType;
42
+ (function (LocationType) {
43
+ LocationType["VENUE"] = "VENUE";
44
+ LocationType["ONLINE"] = "ONLINE";
45
+ })(LocationType || (LocationType = {}));
46
+ export var SubdivisionType;
47
+ (function (SubdivisionType) {
48
+ SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
49
+ /** State */
50
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
51
+ /** County */
52
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
53
+ /** City/town */
54
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
55
+ /** Neighborhood/quarter */
56
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
57
+ /** Street/block */
58
+ SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
59
+ /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
60
+ SubdivisionType["COUNTRY"] = "COUNTRY";
61
+ })(SubdivisionType || (SubdivisionType = {}));
62
+ export var Status;
63
+ (function (Status) {
64
+ /** Event occurs only once. */
65
+ Status["ONE_TIME"] = "ONE_TIME";
66
+ /** Event is recurring. */
67
+ Status["RECURRING"] = "RECURRING";
68
+ /** Marks the next upcoming occurrence of the recurring event. */
69
+ Status["RECURRING_NEXT"] = "RECURRING_NEXT";
70
+ /** Marks the most recent ended occurrence of the recurring event. */
71
+ Status["RECURRING_LAST_ENDED"] = "RECURRING_LAST_ENDED";
72
+ /** Marks the most recent canceled occurrence of the recurring event. */
73
+ Status["RECURRING_LAST_CANCELED"] = "RECURRING_LAST_CANCELED";
74
+ })(Status || (Status = {}));
75
+ export var EventStatus;
76
+ (function (EventStatus) {
77
+ /** Event is public and scheduled to start */
78
+ EventStatus["SCHEDULED"] = "SCHEDULED";
79
+ /** Event has started */
80
+ EventStatus["STARTED"] = "STARTED";
81
+ /** Event has ended */
82
+ EventStatus["ENDED"] = "ENDED";
83
+ /** Event was canceled */
84
+ EventStatus["CANCELED"] = "CANCELED";
85
+ })(EventStatus || (EventStatus = {}));
86
+ export var EventType;
87
+ (function (EventType) {
88
+ /** Type not available for this request fieldset */
89
+ EventType["NA_EVENT_TYPE"] = "NA_EVENT_TYPE";
90
+ /** Registration via RSVP */
91
+ EventType["RSVP"] = "RSVP";
92
+ /** Registration via ticket purchase */
93
+ EventType["TICKETS"] = "TICKETS";
94
+ /** External registration */
95
+ EventType["EXTERNAL"] = "EXTERNAL";
96
+ /** Registration not available */
97
+ EventType["NO_REGISTRATION"] = "NO_REGISTRATION";
98
+ })(EventType || (EventType = {}));
99
+ export var RegistrationStatus;
100
+ (function (RegistrationStatus) {
101
+ /** Registration status is not applicable */
102
+ RegistrationStatus["NA_REGISTRATION_STATUS"] = "NA_REGISTRATION_STATUS";
103
+ /** Registration to event is closed */
104
+ RegistrationStatus["CLOSED"] = "CLOSED";
105
+ /** Registration to event is closed manually */
106
+ RegistrationStatus["CLOSED_MANUALLY"] = "CLOSED_MANUALLY";
107
+ /** Registration is open via RSVP */
108
+ RegistrationStatus["OPEN_RSVP"] = "OPEN_RSVP";
109
+ /** Registration to event waitlist is open via RSVP */
110
+ RegistrationStatus["OPEN_RSVP_WAITLIST"] = "OPEN_RSVP_WAITLIST";
111
+ /** Registration is open via ticket purchase */
112
+ RegistrationStatus["OPEN_TICKETS"] = "OPEN_TICKETS";
113
+ /** Registration is open via external URL */
114
+ RegistrationStatus["OPEN_EXTERNAL"] = "OPEN_EXTERNAL";
115
+ /** Registration will be open via RSVP */
116
+ RegistrationStatus["SCHEDULED_RSVP"] = "SCHEDULED_RSVP";
117
+ })(RegistrationStatus || (RegistrationStatus = {}));
118
+ export var RsvpStatusOptions;
119
+ (function (RsvpStatusOptions) {
120
+ /** Only YES RSVP status is available for RSVP registration */
121
+ RsvpStatusOptions["YES_ONLY"] = "YES_ONLY";
122
+ /** YES and NO RSVP status options are available for the registration */
123
+ RsvpStatusOptions["YES_AND_NO"] = "YES_AND_NO";
124
+ })(RsvpStatusOptions || (RsvpStatusOptions = {}));
125
+ export var TaxType;
126
+ (function (TaxType) {
127
+ /** Tax is included in the ticket price. */
128
+ TaxType["INCLUDED"] = "INCLUDED";
129
+ /** Tax is added to the order at the checkout. */
130
+ TaxType["ADDED"] = "ADDED";
131
+ /** Tax is added to the final total at the checkout. */
132
+ TaxType["ADDED_AT_CHECKOUT"] = "ADDED_AT_CHECKOUT";
133
+ })(TaxType || (TaxType = {}));
134
+ export var VisitorType;
135
+ (function (VisitorType) {
136
+ /** Site visitor (including member) */
137
+ VisitorType["VISITOR"] = "VISITOR";
138
+ /** Site member */
139
+ VisitorType["MEMBER"] = "MEMBER";
140
+ /** Site visitor or member */
141
+ VisitorType["VISITOR_OR_MEMBER"] = "VISITOR_OR_MEMBER";
142
+ })(VisitorType || (VisitorType = {}));
143
+ export var ConferenceType;
144
+ (function (ConferenceType) {
145
+ /** Everyone in the meeting can publish and subscribe video and audio. */
146
+ ConferenceType["MEETING"] = "MEETING";
147
+ /** Guests can only subscribe to video and audio. */
148
+ ConferenceType["WEBINAR"] = "WEBINAR";
149
+ })(ConferenceType || (ConferenceType = {}));
150
+ export var State;
151
+ (function (State) {
152
+ /** Created manually by the user. */
153
+ State["MANUAL"] = "MANUAL";
154
+ /** Created automatically. */
155
+ State["AUTO"] = "AUTO";
156
+ /** Created when publishing recurring events. */
157
+ State["RECURRING_EVENT"] = "RECURRING_EVENT";
158
+ /** Category is hidden. */
159
+ State["HIDDEN"] = "HIDDEN";
160
+ })(State || (State = {}));
161
+ export var NodeType;
162
+ (function (NodeType) {
163
+ NodeType["PARAGRAPH"] = "PARAGRAPH";
164
+ NodeType["TEXT"] = "TEXT";
165
+ NodeType["HEADING"] = "HEADING";
166
+ NodeType["BULLETED_LIST"] = "BULLETED_LIST";
167
+ NodeType["ORDERED_LIST"] = "ORDERED_LIST";
168
+ NodeType["LIST_ITEM"] = "LIST_ITEM";
169
+ NodeType["BLOCKQUOTE"] = "BLOCKQUOTE";
170
+ NodeType["CODE_BLOCK"] = "CODE_BLOCK";
171
+ NodeType["VIDEO"] = "VIDEO";
172
+ NodeType["DIVIDER"] = "DIVIDER";
173
+ NodeType["FILE"] = "FILE";
174
+ NodeType["GALLERY"] = "GALLERY";
175
+ NodeType["GIF"] = "GIF";
176
+ NodeType["HTML"] = "HTML";
177
+ NodeType["IMAGE"] = "IMAGE";
178
+ NodeType["LINK_PREVIEW"] = "LINK_PREVIEW";
179
+ /** @deprecated */
180
+ NodeType["MAP"] = "MAP";
181
+ NodeType["POLL"] = "POLL";
182
+ NodeType["APP_EMBED"] = "APP_EMBED";
183
+ NodeType["BUTTON"] = "BUTTON";
184
+ NodeType["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
185
+ NodeType["TABLE"] = "TABLE";
186
+ NodeType["EMBED"] = "EMBED";
187
+ NodeType["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
188
+ NodeType["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
189
+ NodeType["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
190
+ NodeType["TABLE_CELL"] = "TABLE_CELL";
191
+ NodeType["TABLE_ROW"] = "TABLE_ROW";
192
+ NodeType["EXTERNAL"] = "EXTERNAL";
193
+ NodeType["AUDIO"] = "AUDIO";
194
+ NodeType["CAPTION"] = "CAPTION";
195
+ NodeType["LAYOUT"] = "LAYOUT";
196
+ NodeType["LAYOUT_CELL"] = "LAYOUT_CELL";
197
+ })(NodeType || (NodeType = {}));
198
+ export var WidthType;
199
+ (function (WidthType) {
200
+ /** Width matches the content width */
201
+ WidthType["CONTENT"] = "CONTENT";
202
+ /** Small Width */
203
+ WidthType["SMALL"] = "SMALL";
204
+ /** Width will match the original asset width */
205
+ WidthType["ORIGINAL"] = "ORIGINAL";
206
+ /** coast-to-coast display */
207
+ WidthType["FULL_WIDTH"] = "FULL_WIDTH";
208
+ })(WidthType || (WidthType = {}));
209
+ export var PluginContainerDataAlignment;
210
+ (function (PluginContainerDataAlignment) {
211
+ /** Center Alignment */
212
+ PluginContainerDataAlignment["CENTER"] = "CENTER";
213
+ /** Left Alignment */
214
+ PluginContainerDataAlignment["LEFT"] = "LEFT";
215
+ /** Right Alignment */
216
+ PluginContainerDataAlignment["RIGHT"] = "RIGHT";
217
+ })(PluginContainerDataAlignment || (PluginContainerDataAlignment = {}));
218
+ export var ButtonDataType;
219
+ (function (ButtonDataType) {
220
+ /** Regular link button */
221
+ ButtonDataType["LINK"] = "LINK";
222
+ /** Triggers custom action that is defined in plugin configuration by the consumer */
223
+ ButtonDataType["ACTION"] = "ACTION";
224
+ })(ButtonDataType || (ButtonDataType = {}));
225
+ export var Target;
226
+ (function (Target) {
227
+ /** Opens the linked document in the same frame as it was clicked (this is default) */
228
+ Target["SELF"] = "SELF";
229
+ /** Opens the linked document in a new window or tab */
230
+ Target["BLANK"] = "BLANK";
231
+ /** Opens the linked document in the parent frame */
232
+ Target["PARENT"] = "PARENT";
233
+ /** Opens the linked document in the full body of the window */
234
+ Target["TOP"] = "TOP";
235
+ })(Target || (Target = {}));
236
+ export var TextAlignment;
237
+ (function (TextAlignment) {
238
+ /** browser default, eqivalent to `initial` */
239
+ TextAlignment["AUTO"] = "AUTO";
240
+ /** Left align */
241
+ TextAlignment["LEFT"] = "LEFT";
242
+ /** Right align */
243
+ TextAlignment["RIGHT"] = "RIGHT";
244
+ /** Center align */
245
+ TextAlignment["CENTER"] = "CENTER";
246
+ /** Text is spaced to line up its left and right edges to the left and right edges of the line box, except for the last line */
247
+ TextAlignment["JUSTIFY"] = "JUSTIFY";
248
+ })(TextAlignment || (TextAlignment = {}));
249
+ export var LineStyle;
250
+ (function (LineStyle) {
251
+ /** Single Line */
252
+ LineStyle["SINGLE"] = "SINGLE";
253
+ /** Double Line */
254
+ LineStyle["DOUBLE"] = "DOUBLE";
255
+ /** Dashed Line */
256
+ LineStyle["DASHED"] = "DASHED";
257
+ /** Dotted Line */
258
+ LineStyle["DOTTED"] = "DOTTED";
259
+ })(LineStyle || (LineStyle = {}));
260
+ export var Width;
261
+ (function (Width) {
262
+ /** Large line */
263
+ Width["LARGE"] = "LARGE";
264
+ /** Medium line */
265
+ Width["MEDIUM"] = "MEDIUM";
266
+ /** Small line */
267
+ Width["SMALL"] = "SMALL";
268
+ })(Width || (Width = {}));
269
+ export var Alignment;
270
+ (function (Alignment) {
271
+ /** Center alignment */
272
+ Alignment["CENTER"] = "CENTER";
273
+ /** Left alignment */
274
+ Alignment["LEFT"] = "LEFT";
275
+ /** Right alignment */
276
+ Alignment["RIGHT"] = "RIGHT";
277
+ })(Alignment || (Alignment = {}));
278
+ export var ViewMode;
279
+ (function (ViewMode) {
280
+ /** No PDF view */
281
+ ViewMode["NONE"] = "NONE";
282
+ /** Full PDF view */
283
+ ViewMode["FULL"] = "FULL";
284
+ /** Mini PDF view */
285
+ ViewMode["MINI"] = "MINI";
286
+ })(ViewMode || (ViewMode = {}));
287
+ export var LayoutType;
288
+ (function (LayoutType) {
289
+ /** Collage type */
290
+ LayoutType["COLLAGE"] = "COLLAGE";
291
+ /** Masonry type */
292
+ LayoutType["MASONRY"] = "MASONRY";
293
+ /** Grid type */
294
+ LayoutType["GRID"] = "GRID";
295
+ /** Thumbnail type */
296
+ LayoutType["THUMBNAIL"] = "THUMBNAIL";
297
+ /** Slider type */
298
+ LayoutType["SLIDER"] = "SLIDER";
299
+ /** Slideshow type */
300
+ LayoutType["SLIDESHOW"] = "SLIDESHOW";
301
+ /** Panorama type */
302
+ LayoutType["PANORAMA"] = "PANORAMA";
303
+ /** Column type */
304
+ LayoutType["COLUMN"] = "COLUMN";
305
+ /** Magic type */
306
+ LayoutType["MAGIC"] = "MAGIC";
307
+ /** Fullsize images type */
308
+ LayoutType["FULLSIZE"] = "FULLSIZE";
309
+ })(LayoutType || (LayoutType = {}));
310
+ export var Orientation;
311
+ (function (Orientation) {
312
+ /** Rows Orientation */
313
+ Orientation["ROWS"] = "ROWS";
314
+ /** Columns Orientation */
315
+ Orientation["COLUMNS"] = "COLUMNS";
316
+ })(Orientation || (Orientation = {}));
317
+ export var Crop;
318
+ (function (Crop) {
319
+ /** Crop to fill */
320
+ Crop["FILL"] = "FILL";
321
+ /** Crop to fit */
322
+ Crop["FIT"] = "FIT";
323
+ })(Crop || (Crop = {}));
324
+ export var ThumbnailsAlignment;
325
+ (function (ThumbnailsAlignment) {
326
+ /** Top alignment */
327
+ ThumbnailsAlignment["TOP"] = "TOP";
328
+ /** Right alignment */
329
+ ThumbnailsAlignment["RIGHT"] = "RIGHT";
330
+ /** Bottom alignment */
331
+ ThumbnailsAlignment["BOTTOM"] = "BOTTOM";
332
+ /** Left alignment */
333
+ ThumbnailsAlignment["LEFT"] = "LEFT";
334
+ /** No thumbnail */
335
+ ThumbnailsAlignment["NONE"] = "NONE";
336
+ })(ThumbnailsAlignment || (ThumbnailsAlignment = {}));
337
+ export var GIFType;
338
+ (function (GIFType) {
339
+ GIFType["NORMAL"] = "NORMAL";
340
+ GIFType["STICKER"] = "STICKER";
341
+ })(GIFType || (GIFType = {}));
342
+ export var Source;
343
+ (function (Source) {
344
+ Source["HTML"] = "HTML";
345
+ Source["ADSENSE"] = "ADSENSE";
346
+ })(Source || (Source = {}));
347
+ export var Position;
348
+ (function (Position) {
349
+ /** Thumbnail positioned at the start (left in LTR layouts, right in RTL layouts) */
350
+ Position["START"] = "START";
351
+ /** Thumbnail positioned at the end (right in LTR layouts, left in RTL layouts) */
352
+ Position["END"] = "END";
353
+ /** Thumbnail positioned at the top */
354
+ Position["TOP"] = "TOP";
355
+ /** Thumbnail hidden and not displayed */
356
+ Position["HIDDEN"] = "HIDDEN";
357
+ })(Position || (Position = {}));
358
+ export var MapType;
359
+ (function (MapType) {
360
+ /** Roadmap map type */
361
+ MapType["ROADMAP"] = "ROADMAP";
362
+ /** Satellite map type */
363
+ MapType["SATELITE"] = "SATELITE";
364
+ /** Hybrid map type */
365
+ MapType["HYBRID"] = "HYBRID";
366
+ /** Terrain map type */
367
+ MapType["TERRAIN"] = "TERRAIN";
368
+ })(MapType || (MapType = {}));
369
+ export var ViewRole;
370
+ (function (ViewRole) {
371
+ /** Only Poll creator can view the results */
372
+ ViewRole["CREATOR"] = "CREATOR";
373
+ /** Anyone who voted can see the results */
374
+ ViewRole["VOTERS"] = "VOTERS";
375
+ /** Anyone can see the results, even if one didn't vote */
376
+ ViewRole["EVERYONE"] = "EVERYONE";
377
+ })(ViewRole || (ViewRole = {}));
378
+ export var VoteRole;
379
+ (function (VoteRole) {
380
+ /** Logged in member */
381
+ VoteRole["SITE_MEMBERS"] = "SITE_MEMBERS";
382
+ /** Anyone */
383
+ VoteRole["ALL"] = "ALL";
384
+ })(VoteRole || (VoteRole = {}));
385
+ export var PollLayoutType;
386
+ (function (PollLayoutType) {
387
+ /** List */
388
+ PollLayoutType["LIST"] = "LIST";
389
+ /** Grid */
390
+ PollLayoutType["GRID"] = "GRID";
391
+ })(PollLayoutType || (PollLayoutType = {}));
392
+ export var PollLayoutDirection;
393
+ (function (PollLayoutDirection) {
394
+ /** Left-to-right */
395
+ PollLayoutDirection["LTR"] = "LTR";
396
+ /** Right-to-left */
397
+ PollLayoutDirection["RTL"] = "RTL";
398
+ })(PollLayoutDirection || (PollLayoutDirection = {}));
399
+ export var BackgroundType;
400
+ (function (BackgroundType) {
401
+ /** Color background type */
402
+ BackgroundType["COLOR"] = "COLOR";
403
+ /** Image background type */
404
+ BackgroundType["IMAGE"] = "IMAGE";
405
+ /** Gradiant background type */
406
+ BackgroundType["GRADIENT"] = "GRADIENT";
407
+ })(BackgroundType || (BackgroundType = {}));
408
+ export var DecorationType;
409
+ (function (DecorationType) {
410
+ DecorationType["BOLD"] = "BOLD";
411
+ DecorationType["ITALIC"] = "ITALIC";
412
+ DecorationType["UNDERLINE"] = "UNDERLINE";
413
+ DecorationType["SPOILER"] = "SPOILER";
414
+ DecorationType["ANCHOR"] = "ANCHOR";
415
+ DecorationType["MENTION"] = "MENTION";
416
+ DecorationType["LINK"] = "LINK";
417
+ DecorationType["COLOR"] = "COLOR";
418
+ DecorationType["FONT_SIZE"] = "FONT_SIZE";
419
+ DecorationType["EXTERNAL"] = "EXTERNAL";
420
+ DecorationType["STRIKETHROUGH"] = "STRIKETHROUGH";
421
+ })(DecorationType || (DecorationType = {}));
422
+ export var FontType;
423
+ (function (FontType) {
424
+ FontType["PX"] = "PX";
425
+ FontType["EM"] = "EM";
426
+ })(FontType || (FontType = {}));
427
+ export var AppType;
428
+ (function (AppType) {
429
+ AppType["PRODUCT"] = "PRODUCT";
430
+ AppType["EVENT"] = "EVENT";
431
+ AppType["BOOKING"] = "BOOKING";
432
+ })(AppType || (AppType = {}));
433
+ export var InitialExpandedItems;
434
+ (function (InitialExpandedItems) {
435
+ /** First item will be expended initally */
436
+ InitialExpandedItems["FIRST"] = "FIRST";
437
+ /** All items will expended initally */
438
+ InitialExpandedItems["ALL"] = "ALL";
439
+ /** All items collapsed initally */
440
+ InitialExpandedItems["NONE"] = "NONE";
441
+ })(InitialExpandedItems || (InitialExpandedItems = {}));
442
+ export var Direction;
443
+ (function (Direction) {
444
+ /** Left-to-right */
445
+ Direction["LTR"] = "LTR";
446
+ /** Right-to-left */
447
+ Direction["RTL"] = "RTL";
448
+ })(Direction || (Direction = {}));
449
+ export var VerticalAlignment;
450
+ (function (VerticalAlignment) {
451
+ /** Top alignment */
452
+ VerticalAlignment["TOP"] = "TOP";
453
+ /** Middle alignment */
454
+ VerticalAlignment["MIDDLE"] = "MIDDLE";
455
+ /** Bottom alignment */
456
+ VerticalAlignment["BOTTOM"] = "BOTTOM";
457
+ })(VerticalAlignment || (VerticalAlignment = {}));
458
+ /**
459
+ * `NullValue` is a singleton enumeration to represent the null value for the
460
+ * `Value` type union.
461
+ *
462
+ * The JSON representation for `NullValue` is JSON `null`.
463
+ */
464
+ export var NullValue;
465
+ (function (NullValue) {
466
+ /** Null value. */
467
+ NullValue["NULL_VALUE"] = "NULL_VALUE";
468
+ })(NullValue || (NullValue = {}));
469
+ export var Type;
470
+ (function (Type) {
471
+ /** Unknown badge type. */
472
+ Type["UNKNOWN_BADGE_TYPE"] = "UNKNOWN_BADGE_TYPE";
473
+ /** 1st priority badge type. */
474
+ Type["FIRST_PRIORITY"] = "FIRST_PRIORITY";
475
+ /** 2nd priority badge type. */
476
+ Type["SECOND_PRIORITY"] = "SECOND_PRIORITY";
477
+ /** 3rd priority badge type. */
478
+ Type["THIRD_PRIORITY"] = "THIRD_PRIORITY";
479
+ })(Type || (Type = {}));
480
+ export var WebhookIdentityType;
481
+ (function (WebhookIdentityType) {
482
+ WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
483
+ WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
484
+ WebhookIdentityType["MEMBER"] = "MEMBER";
485
+ WebhookIdentityType["WIX_USER"] = "WIX_USER";
486
+ WebhookIdentityType["APP"] = "APP";
487
+ })(WebhookIdentityType || (WebhookIdentityType = {}));
488
+ /**
489
+ * Retrieves an event registration form.
490
+ *
491
+ * Retrieves both the draft and published versions.
492
+ * @param eventId - Event ID to which the form belongs.
493
+ * @public
494
+ * @requiredField eventId
495
+ * @param options - Optional fields.
496
+ * @permissionId WIX_EVENTS.READ_EVENTS
497
+ * @permissionScope Read Events - all read permissions
498
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.READ-EVENTS
499
+ * @permissionScope Manage Bookings Services and Settings
500
+ * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
501
+ * @permissionScope Manage Events - all permissions
502
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
503
+ * @permissionScope Manage Events
504
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
505
+ * @permissionScope Read Events
506
+ * @permissionScopeId SCOPE.DC-EVENTS.READ-EVENTS
507
+ * @permissionScope Manage Challenges
508
+ * @permissionScopeId SCOPE.CHALLENGES.MANAGE
509
+ * @permissionScope Manage Portfolio
510
+ * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
511
+ * @permissionScope Access Verticals by Automations
512
+ * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
513
+ * @permissionScope Manage Restaurants - all permissions
514
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
515
+ * @permissionScope Set Up Automations
516
+ * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
517
+ * @permissionScope Manage Guest List
518
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-GUEST-LIST
519
+ * @permissionScope Manage Events
520
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
521
+ * @applicableIdentity APP
522
+ * @applicableIdentity VISITOR
523
+ * @returns Currently published event form.
524
+ * Published form is visible to site visitors.
525
+ * @fqn wix.events.form.FormBuilder.GetForm
526
+ */
527
+ export async function getForm(eventId) {
528
+ // @ts-ignore
529
+ const { httpClient, sideEffects } = arguments[1];
530
+ const payload = renameKeysFromSDKRequestToRESTRequest({ eventId: eventId });
531
+ const reqOpts = ambassadorWixEventsV1Form.getForm(payload);
532
+ sideEffects?.onSiteCall?.();
533
+ try {
534
+ const result = await httpClient.request(reqOpts);
535
+ sideEffects?.onSuccess?.(result);
536
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.form;
537
+ }
538
+ catch (err) {
539
+ const transformedError = sdkTransformError(err, {
540
+ spreadPathsToArguments: {},
541
+ explicitPathsToArguments: { eventId: '$[0]' },
542
+ singleArgumentUnchanged: false,
543
+ }, ['eventId']);
544
+ sideEffects?.onError?.(err);
545
+ throw transformedError;
546
+ }
547
+ }
548
+ /**
549
+ * Adds an input control to the draft form.
550
+ * @param eventId - Event ID to which the form belongs.
551
+ * @public
552
+ * @requiredField eventId
553
+ * @requiredField options
554
+ * @requiredField options.control
555
+ * @param options - Optional fields.
556
+ * @permissionId WIX_EVENTS.MANAGE_EVENTS
557
+ * @permissionScope Manage Events - all permissions
558
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
559
+ * @permissionScope Manage Events
560
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
561
+ * @permissionScope Manage Events
562
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
563
+ * @applicableIdentity APP
564
+ * @fqn wix.events.form.FormBuilder.AddControl
565
+ */
566
+ export async function addControl(eventId, options) {
567
+ // @ts-ignore
568
+ const { httpClient, sideEffects } = arguments[2];
569
+ const payload = renameKeysFromSDKRequestToRESTRequest({
570
+ eventId: eventId,
571
+ phone: options?.phone,
572
+ address: options?.address,
573
+ date: options?.date,
574
+ additionalGuests: options?.additionalGuests,
575
+ dropdown: options?.dropdown,
576
+ checkbox: options?.checkbox,
577
+ text: options?.text,
578
+ radioButton: options?.radioButton,
579
+ });
580
+ const reqOpts = ambassadorWixEventsV1Form.addControl(payload);
581
+ sideEffects?.onSiteCall?.();
582
+ try {
583
+ const result = await httpClient.request(reqOpts);
584
+ sideEffects?.onSuccess?.(result);
585
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
586
+ }
587
+ catch (err) {
588
+ const transformedError = sdkTransformError(err, {
589
+ spreadPathsToArguments: {},
590
+ explicitPathsToArguments: {
591
+ eventId: '$[0]',
592
+ phone: '$[1].phone',
593
+ address: '$[1].address',
594
+ date: '$[1].date',
595
+ additionalGuests: '$[1].additionalGuests',
596
+ dropdown: '$[1].dropdown',
597
+ checkbox: '$[1].checkbox',
598
+ text: '$[1].text',
599
+ radioButton: '$[1].radioButton',
600
+ },
601
+ singleArgumentUnchanged: false,
602
+ }, ['eventId', 'options']);
603
+ sideEffects?.onError?.(err);
604
+ throw transformedError;
605
+ }
606
+ }
607
+ /**
608
+ * Updates an existing input control in the draft form.
609
+ * @public
610
+ * @requiredField identifiers
611
+ * @requiredField identifiers._id
612
+ * @requiredField identifiers.eventId
613
+ * @requiredField options.control
614
+ * @param options - Optional fields.
615
+ * @param identifiers - Identifies what form to update.
616
+ * @permissionId WIX_EVENTS.MANAGE_EVENTS
617
+ * @permissionScope Manage Events - all permissions
618
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
619
+ * @permissionScope Manage Events
620
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
621
+ * @permissionScope Manage Events
622
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
623
+ * @applicableIdentity APP
624
+ * @fqn wix.events.form.FormBuilder.UpdateControl
625
+ */
626
+ export async function updateControl(identifiers, options) {
627
+ // @ts-ignore
628
+ const { httpClient, sideEffects } = arguments[2];
629
+ const payload = renameKeysFromSDKRequestToRESTRequest({
630
+ eventId: identifiers?.eventId,
631
+ id: identifiers?._id,
632
+ orderIndex: options?.orderIndex,
633
+ phone: options?.phone,
634
+ address: options?.address,
635
+ date: options?.date,
636
+ additionalGuests: options?.additionalGuests,
637
+ dropdown: options?.dropdown,
638
+ checkbox: options?.checkbox,
639
+ text: options?.text,
640
+ name: options?.name,
641
+ email: options?.email,
642
+ radioButton: options?.radioButton,
643
+ });
644
+ const reqOpts = ambassadorWixEventsV1Form.updateControl(payload);
645
+ sideEffects?.onSiteCall?.();
646
+ try {
647
+ const result = await httpClient.request(reqOpts);
648
+ sideEffects?.onSuccess?.(result);
649
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
650
+ }
651
+ catch (err) {
652
+ const transformedError = sdkTransformError(err, {
653
+ spreadPathsToArguments: {},
654
+ explicitPathsToArguments: {
655
+ eventId: '$[0].eventId',
656
+ id: '$[0]._id',
657
+ orderIndex: '$[1].orderIndex',
658
+ phone: '$[1].phone',
659
+ address: '$[1].address',
660
+ date: '$[1].date',
661
+ additionalGuests: '$[1].additionalGuests',
662
+ dropdown: '$[1].dropdown',
663
+ checkbox: '$[1].checkbox',
664
+ text: '$[1].text',
665
+ name: '$[1].name',
666
+ email: '$[1].email',
667
+ radioButton: '$[1].radioButton',
668
+ },
669
+ singleArgumentUnchanged: false,
670
+ }, ['identifiers', 'options']);
671
+ sideEffects?.onError?.(err);
672
+ throw transformedError;
673
+ }
674
+ }
675
+ /**
676
+ * Deletes an input control from the draft form.
677
+ * @public
678
+ * @requiredField identifiers
679
+ * @requiredField identifiers._id
680
+ * @requiredField identifiers.eventId
681
+ * @param identifiers - Identifies what form to delete.
682
+ * @permissionId WIX_EVENTS.MANAGE_EVENTS
683
+ * @permissionScope Manage Events - all permissions
684
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
685
+ * @permissionScope Manage Events
686
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
687
+ * @permissionScope Manage Events
688
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
689
+ * @applicableIdentity APP
690
+ * @fqn wix.events.form.FormBuilder.DeleteControl
691
+ */
692
+ export async function deleteControl(identifiers) {
693
+ // @ts-ignore
694
+ const { httpClient, sideEffects } = arguments[1];
695
+ const payload = renameKeysFromSDKRequestToRESTRequest({
696
+ eventId: identifiers?.eventId,
697
+ id: identifiers?._id,
698
+ });
699
+ const reqOpts = ambassadorWixEventsV1Form.deleteControl(payload);
700
+ sideEffects?.onSiteCall?.();
701
+ try {
702
+ const result = await httpClient.request(reqOpts);
703
+ sideEffects?.onSuccess?.(result);
704
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
705
+ }
706
+ catch (err) {
707
+ const transformedError = sdkTransformError(err, {
708
+ spreadPathsToArguments: {},
709
+ explicitPathsToArguments: { eventId: '$[0].eventId', id: '$[0]._id' },
710
+ singleArgumentUnchanged: false,
711
+ }, ['identifiers']);
712
+ sideEffects?.onError?.(err);
713
+ throw transformedError;
714
+ }
715
+ }
716
+ /**
717
+ * Updates a set of defined form messages that are displayed to a site visitor before, during, and after the registration flow.
718
+ * Includes the configuration of form titles, response labels, "thank you" messages, and call-to-action texts.
719
+ * @param eventId - Event ID to which the form belongs.
720
+ * @public
721
+ * @requiredField eventId
722
+ * @param options - Optional fields.
723
+ * @permissionId WIX_EVENTS.MANAGE_EVENTS
724
+ * @permissionScope Manage Events - all permissions
725
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
726
+ * @permissionScope Manage Events
727
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
728
+ * @permissionScope Manage Events
729
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
730
+ * @applicableIdentity APP
731
+ * @fqn wix.events.form.FormBuilder.UpdateMessages
732
+ */
733
+ export async function updateMessages(eventId, options) {
734
+ // @ts-ignore
735
+ const { httpClient, sideEffects } = arguments[2];
736
+ const payload = renameKeysFromSDKRequestToRESTRequest({
737
+ eventId: eventId,
738
+ fields: options?.fields,
739
+ messages: options?.messages,
740
+ });
741
+ const reqOpts = ambassadorWixEventsV1Form.updateMessages(payload);
742
+ sideEffects?.onSiteCall?.();
743
+ try {
744
+ const result = await httpClient.request(reqOpts);
745
+ sideEffects?.onSuccess?.(result);
746
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
747
+ }
748
+ catch (err) {
749
+ const transformedError = sdkTransformError(err, {
750
+ spreadPathsToArguments: {},
751
+ explicitPathsToArguments: {
752
+ eventId: '$[0]',
753
+ fields: '$[1].fields',
754
+ messages: '$[1].messages',
755
+ },
756
+ singleArgumentUnchanged: false,
757
+ }, ['eventId', 'options']);
758
+ sideEffects?.onError?.(err);
759
+ throw transformedError;
760
+ }
761
+ }
762
+ /**
763
+ * Publishes the draft form.
764
+ * @param eventId - Event ID to which the form belongs.
765
+ * @public
766
+ * @requiredField eventId
767
+ * @permissionId WIX_EVENTS.MANAGE_EVENTS
768
+ * @permissionScope Manage Events - all permissions
769
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
770
+ * @permissionScope Manage Events
771
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
772
+ * @permissionScope Manage Events
773
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
774
+ * @applicableIdentity APP
775
+ * @fqn wix.events.form.FormBuilder.PublishDraft
776
+ */
777
+ export async function publishDraft(eventId) {
778
+ // @ts-ignore
779
+ const { httpClient, sideEffects } = arguments[1];
780
+ const payload = renameKeysFromSDKRequestToRESTRequest({ eventId: eventId });
781
+ const reqOpts = ambassadorWixEventsV1Form.publishDraft(payload);
782
+ sideEffects?.onSiteCall?.();
783
+ try {
784
+ const result = await httpClient.request(reqOpts);
785
+ sideEffects?.onSuccess?.(result);
786
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
787
+ }
788
+ catch (err) {
789
+ const transformedError = sdkTransformError(err, {
790
+ spreadPathsToArguments: {},
791
+ explicitPathsToArguments: { eventId: '$[0]' },
792
+ singleArgumentUnchanged: false,
793
+ }, ['eventId']);
794
+ sideEffects?.onError?.(err);
795
+ throw transformedError;
796
+ }
797
+ }
798
+ /**
799
+ * Clears all changes to the draft form.
800
+ * @param eventId - Event ID to which the form belongs.
801
+ * @public
802
+ * @requiredField eventId
803
+ * @permissionId WIX_EVENTS.MANAGE_EVENTS
804
+ * @permissionScope Manage Events - all permissions
805
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
806
+ * @permissionScope Manage Events
807
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
808
+ * @permissionScope Manage Events
809
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-EVENTS
810
+ * @applicableIdentity APP
811
+ * @fqn wix.events.form.FormBuilder.DiscardDraft
812
+ */
813
+ export async function discardDraft(eventId) {
814
+ // @ts-ignore
815
+ const { httpClient, sideEffects } = arguments[1];
816
+ const payload = renameKeysFromSDKRequestToRESTRequest({ eventId: eventId });
817
+ const reqOpts = ambassadorWixEventsV1Form.discardDraft(payload);
818
+ sideEffects?.onSiteCall?.();
819
+ try {
820
+ const result = await httpClient.request(reqOpts);
821
+ sideEffects?.onSuccess?.(result);
822
+ }
823
+ catch (err) {
824
+ const transformedError = sdkTransformError(err, {
825
+ spreadPathsToArguments: {},
826
+ explicitPathsToArguments: { eventId: '$[0]' },
827
+ singleArgumentUnchanged: false,
828
+ }, ['eventId']);
829
+ sideEffects?.onError?.(err);
830
+ throw transformedError;
831
+ }
832
+ }
833
+ //# sourceMappingURL=events-v1-form-forms.universal.js.map