@wix/auto_sdk_forms_submissions 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/forms-v4-submission-submissions.context.d.ts +64 -0
  11. package/build/cjs/src/forms-v4-submission-submissions.context.js +145 -0
  12. package/build/cjs/src/forms-v4-submission-submissions.context.js.map +1 -0
  13. package/build/cjs/src/forms-v4-submission-submissions.http.d.ts +127 -0
  14. package/build/cjs/src/forms-v4-submission-submissions.http.js +837 -0
  15. package/build/cjs/src/forms-v4-submission-submissions.http.js.map +1 -0
  16. package/build/cjs/src/forms-v4-submission-submissions.meta.d.ts +55 -0
  17. package/build/cjs/src/forms-v4-submission-submissions.meta.js +503 -0
  18. package/build/cjs/src/forms-v4-submission-submissions.meta.js.map +1 -0
  19. package/build/cjs/src/forms-v4-submission-submissions.public.d.ts +261 -0
  20. package/build/cjs/src/forms-v4-submission-submissions.public.js +302 -0
  21. package/build/cjs/src/forms-v4-submission-submissions.public.js.map +1 -0
  22. package/build/cjs/src/forms-v4-submission-submissions.types.d.ts +4322 -0
  23. package/build/cjs/src/forms-v4-submission-submissions.types.js +721 -0
  24. package/build/cjs/src/forms-v4-submission-submissions.types.js.map +1 -0
  25. package/build/cjs/src/forms-v4-submission-submissions.universal.d.ts +5117 -0
  26. package/build/cjs/src/forms-v4-submission-submissions.universal.js +1880 -0
  27. package/build/cjs/src/forms-v4-submission-submissions.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/forms-v4-submission-submissions.context.d.ts +64 -0
  39. package/build/es/src/forms-v4-submission-submissions.context.js +68 -0
  40. package/build/es/src/forms-v4-submission-submissions.context.js.map +1 -0
  41. package/build/es/src/forms-v4-submission-submissions.http.d.ts +127 -0
  42. package/build/es/src/forms-v4-submission-submissions.http.js +809 -0
  43. package/build/es/src/forms-v4-submission-submissions.http.js.map +1 -0
  44. package/build/es/src/forms-v4-submission-submissions.meta.d.ts +55 -0
  45. package/build/es/src/forms-v4-submission-submissions.meta.js +452 -0
  46. package/build/es/src/forms-v4-submission-submissions.meta.js.map +1 -0
  47. package/build/es/src/forms-v4-submission-submissions.public.d.ts +261 -0
  48. package/build/es/src/forms-v4-submission-submissions.public.js +200 -0
  49. package/build/es/src/forms-v4-submission-submissions.public.js.map +1 -0
  50. package/build/es/src/forms-v4-submission-submissions.types.d.ts +4322 -0
  51. package/build/es/src/forms-v4-submission-submissions.types.js +717 -0
  52. package/build/es/src/forms-v4-submission-submissions.types.js.map +1 -0
  53. package/build/es/src/forms-v4-submission-submissions.universal.d.ts +5117 -0
  54. package/build/es/src/forms-v4-submission-submissions.universal.js +1828 -0
  55. package/build/es/src/forms-v4-submission-submissions.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/forms-v4-submission-submissions.context.d.ts +68 -0
  66. package/build/internal/cjs/src/forms-v4-submission-submissions.context.js +145 -0
  67. package/build/internal/cjs/src/forms-v4-submission-submissions.context.js.map +1 -0
  68. package/build/internal/cjs/src/forms-v4-submission-submissions.http.d.ts +127 -0
  69. package/build/internal/cjs/src/forms-v4-submission-submissions.http.js +837 -0
  70. package/build/internal/cjs/src/forms-v4-submission-submissions.http.js.map +1 -0
  71. package/build/internal/cjs/src/forms-v4-submission-submissions.meta.d.ts +55 -0
  72. package/build/internal/cjs/src/forms-v4-submission-submissions.meta.js +503 -0
  73. package/build/internal/cjs/src/forms-v4-submission-submissions.meta.js.map +1 -0
  74. package/build/internal/cjs/src/forms-v4-submission-submissions.public.d.ts +279 -0
  75. package/build/internal/cjs/src/forms-v4-submission-submissions.public.js +302 -0
  76. package/build/internal/cjs/src/forms-v4-submission-submissions.public.js.map +1 -0
  77. package/build/internal/cjs/src/forms-v4-submission-submissions.types.d.ts +4322 -0
  78. package/build/internal/cjs/src/forms-v4-submission-submissions.types.js +721 -0
  79. package/build/internal/cjs/src/forms-v4-submission-submissions.types.js.map +1 -0
  80. package/build/internal/cjs/src/forms-v4-submission-submissions.universal.d.ts +5148 -0
  81. package/build/internal/cjs/src/forms-v4-submission-submissions.universal.js +1880 -0
  82. package/build/internal/cjs/src/forms-v4-submission-submissions.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/forms-v4-submission-submissions.context.d.ts +68 -0
  93. package/build/internal/es/src/forms-v4-submission-submissions.context.js +68 -0
  94. package/build/internal/es/src/forms-v4-submission-submissions.context.js.map +1 -0
  95. package/build/internal/es/src/forms-v4-submission-submissions.http.d.ts +127 -0
  96. package/build/internal/es/src/forms-v4-submission-submissions.http.js +809 -0
  97. package/build/internal/es/src/forms-v4-submission-submissions.http.js.map +1 -0
  98. package/build/internal/es/src/forms-v4-submission-submissions.meta.d.ts +55 -0
  99. package/build/internal/es/src/forms-v4-submission-submissions.meta.js +452 -0
  100. package/build/internal/es/src/forms-v4-submission-submissions.meta.js.map +1 -0
  101. package/build/internal/es/src/forms-v4-submission-submissions.public.d.ts +279 -0
  102. package/build/internal/es/src/forms-v4-submission-submissions.public.js +200 -0
  103. package/build/internal/es/src/forms-v4-submission-submissions.public.js.map +1 -0
  104. package/build/internal/es/src/forms-v4-submission-submissions.types.d.ts +4322 -0
  105. package/build/internal/es/src/forms-v4-submission-submissions.types.js +717 -0
  106. package/build/internal/es/src/forms-v4-submission-submissions.types.js.map +1 -0
  107. package/build/internal/es/src/forms-v4-submission-submissions.universal.d.ts +5148 -0
  108. package/build/internal/es/src/forms-v4-submission-submissions.universal.js +1828 -0
  109. package/build/internal/es/src/forms-v4-submission-submissions.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1828 @@
1
+ import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
+ import { queryBuilder } from '@wix/sdk-runtime/query-builder';
3
+ import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
4
+ import * as ambassadorWixFormsV4Submission from './forms-v4-submission-submissions.http.js';
5
+ export var SubmissionStatus;
6
+ (function (SubmissionStatus) {
7
+ SubmissionStatus["UNKNOWN_SUBMISSION_STATUS"] = "UNKNOWN_SUBMISSION_STATUS";
8
+ /** A submission is created, but has not yet been recorded in the Wix Forms collection. */
9
+ SubmissionStatus["PENDING"] = "PENDING";
10
+ /** A submission is recorded in the Wix Forms collection. */
11
+ SubmissionStatus["CONFIRMED"] = "CONFIRMED";
12
+ /** A form submission requiring payment is created. */
13
+ SubmissionStatus["PAYMENT_WAITING"] = "PAYMENT_WAITING";
14
+ /** An order of a form submission is canceled. */
15
+ SubmissionStatus["PAYMENT_CANCELED"] = "PAYMENT_CANCELED";
16
+ })(SubmissionStatus || (SubmissionStatus = {}));
17
+ export var OptInLevel;
18
+ (function (OptInLevel) {
19
+ /** Single confirmation. */
20
+ OptInLevel["SINGLE_CONFIRMATION"] = "SINGLE_CONFIRMATION";
21
+ /** Double confirmation. */
22
+ OptInLevel["DOUBLE_CONFIRMATION"] = "DOUBLE_CONFIRMATION";
23
+ })(OptInLevel || (OptInLevel = {}));
24
+ export var RequiredIndicator;
25
+ (function (RequiredIndicator) {
26
+ /** Unknown required indicator. */
27
+ RequiredIndicator["UNKNOWN_INDICATOR"] = "UNKNOWN_INDICATOR";
28
+ /** Asterisk (*). */
29
+ RequiredIndicator["ASTERISK"] = "ASTERISK";
30
+ /** Text (default: "Required"). */
31
+ RequiredIndicator["TEXT"] = "TEXT";
32
+ /** None. */
33
+ RequiredIndicator["NONE"] = "NONE";
34
+ })(RequiredIndicator || (RequiredIndicator = {}));
35
+ export var RequiredIndicatorPlacement;
36
+ (function (RequiredIndicatorPlacement) {
37
+ /** Unknown required indicator placement. */
38
+ RequiredIndicatorPlacement["UNKNOWN_PLACEMENT"] = "UNKNOWN_PLACEMENT";
39
+ /** After field title. */
40
+ RequiredIndicatorPlacement["AFTER_FIELD_TITLE"] = "AFTER_FIELD_TITLE";
41
+ /** Before field title. */
42
+ RequiredIndicatorPlacement["BEFORE_FIELD_TITLE"] = "BEFORE_FIELD_TITLE";
43
+ })(RequiredIndicatorPlacement || (RequiredIndicatorPlacement = {}));
44
+ export var FormatEnumFormat;
45
+ (function (FormatEnumFormat) {
46
+ FormatEnumFormat["UNDEFINED"] = "UNDEFINED";
47
+ FormatEnumFormat["DATE"] = "DATE";
48
+ FormatEnumFormat["TIME"] = "TIME";
49
+ FormatEnumFormat["DATE_TIME"] = "DATE_TIME";
50
+ FormatEnumFormat["EMAIL"] = "EMAIL";
51
+ FormatEnumFormat["URL"] = "URL";
52
+ FormatEnumFormat["UUID"] = "UUID";
53
+ FormatEnumFormat["PHONE"] = "PHONE";
54
+ FormatEnumFormat["URI"] = "URI";
55
+ FormatEnumFormat["HOSTNAME"] = "HOSTNAME";
56
+ FormatEnumFormat["COLOR_HEX"] = "COLOR_HEX";
57
+ FormatEnumFormat["CURRENCY"] = "CURRENCY";
58
+ FormatEnumFormat["LANGUAGE"] = "LANGUAGE";
59
+ FormatEnumFormat["DATE_OPTIONAL_TIME"] = "DATE_OPTIONAL_TIME";
60
+ })(FormatEnumFormat || (FormatEnumFormat = {}));
61
+ export var ValidationFormat;
62
+ (function (ValidationFormat) {
63
+ ValidationFormat["UNDEFINED"] = "UNDEFINED";
64
+ /** File upload validation. */
65
+ ValidationFormat["WIX_FILE"] = "WIX_FILE";
66
+ /** Payment validation. */
67
+ ValidationFormat["PAYMENT"] = "PAYMENT";
68
+ /** Multiline address. */
69
+ ValidationFormat["MULTILINE_ADDRESS"] = "MULTILINE_ADDRESS";
70
+ /** Scheduling validation. */
71
+ ValidationFormat["SCHEDULING"] = "SCHEDULING";
72
+ })(ValidationFormat || (ValidationFormat = {}));
73
+ export var ProductType;
74
+ (function (ProductType) {
75
+ /** Unknown product type. */
76
+ ProductType["UNKNOWN"] = "UNKNOWN";
77
+ /** Shippable (physical) product. */
78
+ ProductType["SHIPPABLE"] = "SHIPPABLE";
79
+ /** Digital product. */
80
+ ProductType["DIGITAL"] = "DIGITAL";
81
+ })(ProductType || (ProductType = {}));
82
+ export var PriceType;
83
+ (function (PriceType) {
84
+ /** Unknown price type. */
85
+ PriceType["UNKNOWN"] = "UNKNOWN";
86
+ /** Fixed price. */
87
+ PriceType["FIXED_PRICE"] = "FIXED_PRICE";
88
+ /** Dynamic price from price range. */
89
+ PriceType["DYNAMIC_PRICE"] = "DYNAMIC_PRICE";
90
+ })(PriceType || (PriceType = {}));
91
+ export var StringTypeFormatEnumFormat;
92
+ (function (StringTypeFormatEnumFormat) {
93
+ StringTypeFormatEnumFormat["UNDEFINED"] = "UNDEFINED";
94
+ StringTypeFormatEnumFormat["DATE"] = "DATE";
95
+ StringTypeFormatEnumFormat["TIME"] = "TIME";
96
+ StringTypeFormatEnumFormat["DATE_TIME"] = "DATE_TIME";
97
+ StringTypeFormatEnumFormat["EMAIL"] = "EMAIL";
98
+ StringTypeFormatEnumFormat["URL"] = "URL";
99
+ StringTypeFormatEnumFormat["UUID"] = "UUID";
100
+ StringTypeFormatEnumFormat["PHONE"] = "PHONE";
101
+ StringTypeFormatEnumFormat["URI"] = "URI";
102
+ StringTypeFormatEnumFormat["HOSTNAME"] = "HOSTNAME";
103
+ StringTypeFormatEnumFormat["COLOR_HEX"] = "COLOR_HEX";
104
+ StringTypeFormatEnumFormat["CURRENCY"] = "CURRENCY";
105
+ StringTypeFormatEnumFormat["LANGUAGE"] = "LANGUAGE";
106
+ StringTypeFormatEnumFormat["DATE_OPTIONAL_TIME"] = "DATE_OPTIONAL_TIME";
107
+ })(StringTypeFormatEnumFormat || (StringTypeFormatEnumFormat = {}));
108
+ export var StringComponentType;
109
+ (function (StringComponentType) {
110
+ StringComponentType["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
111
+ StringComponentType["TEXT_INPUT"] = "TEXT_INPUT";
112
+ StringComponentType["RADIO_GROUP"] = "RADIO_GROUP";
113
+ StringComponentType["DROPDOWN"] = "DROPDOWN";
114
+ StringComponentType["DATE_TIME"] = "DATE_TIME";
115
+ StringComponentType["PHONE_INPUT"] = "PHONE_INPUT";
116
+ StringComponentType["DATE_INPUT"] = "DATE_INPUT";
117
+ StringComponentType["TIME_INPUT"] = "TIME_INPUT";
118
+ StringComponentType["DATE_PICKER"] = "DATE_PICKER";
119
+ })(StringComponentType || (StringComponentType = {}));
120
+ export var NodeType;
121
+ (function (NodeType) {
122
+ NodeType["PARAGRAPH"] = "PARAGRAPH";
123
+ NodeType["TEXT"] = "TEXT";
124
+ NodeType["HEADING"] = "HEADING";
125
+ NodeType["BULLETED_LIST"] = "BULLETED_LIST";
126
+ NodeType["ORDERED_LIST"] = "ORDERED_LIST";
127
+ NodeType["LIST_ITEM"] = "LIST_ITEM";
128
+ NodeType["BLOCKQUOTE"] = "BLOCKQUOTE";
129
+ NodeType["CODE_BLOCK"] = "CODE_BLOCK";
130
+ NodeType["VIDEO"] = "VIDEO";
131
+ NodeType["DIVIDER"] = "DIVIDER";
132
+ NodeType["FILE"] = "FILE";
133
+ NodeType["GALLERY"] = "GALLERY";
134
+ NodeType["GIF"] = "GIF";
135
+ NodeType["HTML"] = "HTML";
136
+ NodeType["IMAGE"] = "IMAGE";
137
+ NodeType["LINK_PREVIEW"] = "LINK_PREVIEW";
138
+ /** @deprecated */
139
+ NodeType["MAP"] = "MAP";
140
+ NodeType["POLL"] = "POLL";
141
+ NodeType["APP_EMBED"] = "APP_EMBED";
142
+ NodeType["BUTTON"] = "BUTTON";
143
+ NodeType["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
144
+ NodeType["TABLE"] = "TABLE";
145
+ NodeType["EMBED"] = "EMBED";
146
+ NodeType["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
147
+ NodeType["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
148
+ NodeType["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
149
+ NodeType["TABLE_CELL"] = "TABLE_CELL";
150
+ NodeType["TABLE_ROW"] = "TABLE_ROW";
151
+ NodeType["EXTERNAL"] = "EXTERNAL";
152
+ NodeType["AUDIO"] = "AUDIO";
153
+ NodeType["CAPTION"] = "CAPTION";
154
+ NodeType["LAYOUT"] = "LAYOUT";
155
+ NodeType["LAYOUT_CELL"] = "LAYOUT_CELL";
156
+ })(NodeType || (NodeType = {}));
157
+ export var WidthType;
158
+ (function (WidthType) {
159
+ /** Width matches the content width */
160
+ WidthType["CONTENT"] = "CONTENT";
161
+ /** Small Width */
162
+ WidthType["SMALL"] = "SMALL";
163
+ /** Width will match the original asset width */
164
+ WidthType["ORIGINAL"] = "ORIGINAL";
165
+ /** coast-to-coast display */
166
+ WidthType["FULL_WIDTH"] = "FULL_WIDTH";
167
+ })(WidthType || (WidthType = {}));
168
+ export var PluginContainerDataAlignment;
169
+ (function (PluginContainerDataAlignment) {
170
+ /** Center Alignment */
171
+ PluginContainerDataAlignment["CENTER"] = "CENTER";
172
+ /** Left Alignment */
173
+ PluginContainerDataAlignment["LEFT"] = "LEFT";
174
+ /** Right Alignment */
175
+ PluginContainerDataAlignment["RIGHT"] = "RIGHT";
176
+ })(PluginContainerDataAlignment || (PluginContainerDataAlignment = {}));
177
+ export var ButtonDataType;
178
+ (function (ButtonDataType) {
179
+ /** Regular link button */
180
+ ButtonDataType["LINK"] = "LINK";
181
+ /** Triggers custom action that is defined in plugin configuration by the consumer */
182
+ ButtonDataType["ACTION"] = "ACTION";
183
+ })(ButtonDataType || (ButtonDataType = {}));
184
+ export var LinkTarget;
185
+ (function (LinkTarget) {
186
+ /** Opens the linked document in the same frame as it was clicked (this is default) */
187
+ LinkTarget["SELF"] = "SELF";
188
+ /** Opens the linked document in a new window or tab */
189
+ LinkTarget["BLANK"] = "BLANK";
190
+ /** Opens the linked document in the parent frame */
191
+ LinkTarget["PARENT"] = "PARENT";
192
+ /** Opens the linked document in the full body of the window */
193
+ LinkTarget["TOP"] = "TOP";
194
+ })(LinkTarget || (LinkTarget = {}));
195
+ export var TextAlignment;
196
+ (function (TextAlignment) {
197
+ /** browser default, eqivalent to `initial` */
198
+ TextAlignment["AUTO"] = "AUTO";
199
+ /** Left align */
200
+ TextAlignment["LEFT"] = "LEFT";
201
+ /** Right align */
202
+ TextAlignment["RIGHT"] = "RIGHT";
203
+ /** Center align */
204
+ TextAlignment["CENTER"] = "CENTER";
205
+ /** 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 */
206
+ TextAlignment["JUSTIFY"] = "JUSTIFY";
207
+ })(TextAlignment || (TextAlignment = {}));
208
+ export var LineStyle;
209
+ (function (LineStyle) {
210
+ /** Single Line */
211
+ LineStyle["SINGLE"] = "SINGLE";
212
+ /** Double Line */
213
+ LineStyle["DOUBLE"] = "DOUBLE";
214
+ /** Dashed Line */
215
+ LineStyle["DASHED"] = "DASHED";
216
+ /** Dotted Line */
217
+ LineStyle["DOTTED"] = "DOTTED";
218
+ })(LineStyle || (LineStyle = {}));
219
+ export var Width;
220
+ (function (Width) {
221
+ /** Large line */
222
+ Width["LARGE"] = "LARGE";
223
+ /** Medium line */
224
+ Width["MEDIUM"] = "MEDIUM";
225
+ /** Small line */
226
+ Width["SMALL"] = "SMALL";
227
+ })(Width || (Width = {}));
228
+ export var Alignment;
229
+ (function (Alignment) {
230
+ /** Center alignment */
231
+ Alignment["CENTER"] = "CENTER";
232
+ /** Left alignment */
233
+ Alignment["LEFT"] = "LEFT";
234
+ /** Right alignment */
235
+ Alignment["RIGHT"] = "RIGHT";
236
+ })(Alignment || (Alignment = {}));
237
+ export var ViewMode;
238
+ (function (ViewMode) {
239
+ /** No PDF view */
240
+ ViewMode["NONE"] = "NONE";
241
+ /** Full PDF view */
242
+ ViewMode["FULL"] = "FULL";
243
+ /** Mini PDF view */
244
+ ViewMode["MINI"] = "MINI";
245
+ })(ViewMode || (ViewMode = {}));
246
+ export var LayoutType;
247
+ (function (LayoutType) {
248
+ /** Collage type */
249
+ LayoutType["COLLAGE"] = "COLLAGE";
250
+ /** Masonry type */
251
+ LayoutType["MASONRY"] = "MASONRY";
252
+ /** Grid type */
253
+ LayoutType["GRID"] = "GRID";
254
+ /** Thumbnail type */
255
+ LayoutType["THUMBNAIL"] = "THUMBNAIL";
256
+ /** Slider type */
257
+ LayoutType["SLIDER"] = "SLIDER";
258
+ /** Slideshow type */
259
+ LayoutType["SLIDESHOW"] = "SLIDESHOW";
260
+ /** Panorama type */
261
+ LayoutType["PANORAMA"] = "PANORAMA";
262
+ /** Column type */
263
+ LayoutType["COLUMN"] = "COLUMN";
264
+ /** Magic type */
265
+ LayoutType["MAGIC"] = "MAGIC";
266
+ /** Fullsize images type */
267
+ LayoutType["FULLSIZE"] = "FULLSIZE";
268
+ })(LayoutType || (LayoutType = {}));
269
+ export var Orientation;
270
+ (function (Orientation) {
271
+ /** Rows Orientation */
272
+ Orientation["ROWS"] = "ROWS";
273
+ /** Columns Orientation */
274
+ Orientation["COLUMNS"] = "COLUMNS";
275
+ })(Orientation || (Orientation = {}));
276
+ export var Crop;
277
+ (function (Crop) {
278
+ /** Crop to fill */
279
+ Crop["FILL"] = "FILL";
280
+ /** Crop to fit */
281
+ Crop["FIT"] = "FIT";
282
+ })(Crop || (Crop = {}));
283
+ export var ThumbnailsAlignment;
284
+ (function (ThumbnailsAlignment) {
285
+ /** Top alignment */
286
+ ThumbnailsAlignment["TOP"] = "TOP";
287
+ /** Right alignment */
288
+ ThumbnailsAlignment["RIGHT"] = "RIGHT";
289
+ /** Bottom alignment */
290
+ ThumbnailsAlignment["BOTTOM"] = "BOTTOM";
291
+ /** Left alignment */
292
+ ThumbnailsAlignment["LEFT"] = "LEFT";
293
+ /** No thumbnail */
294
+ ThumbnailsAlignment["NONE"] = "NONE";
295
+ })(ThumbnailsAlignment || (ThumbnailsAlignment = {}));
296
+ export var Source;
297
+ (function (Source) {
298
+ Source["HTML"] = "HTML";
299
+ Source["ADSENSE"] = "ADSENSE";
300
+ })(Source || (Source = {}));
301
+ export var MapType;
302
+ (function (MapType) {
303
+ /** Roadmap map type */
304
+ MapType["ROADMAP"] = "ROADMAP";
305
+ /** Satellite map type */
306
+ MapType["SATELITE"] = "SATELITE";
307
+ /** Hybrid map type */
308
+ MapType["HYBRID"] = "HYBRID";
309
+ /** Terrain map type */
310
+ MapType["TERRAIN"] = "TERRAIN";
311
+ })(MapType || (MapType = {}));
312
+ export var ViewRole;
313
+ (function (ViewRole) {
314
+ /** Only Poll creator can view the results */
315
+ ViewRole["CREATOR"] = "CREATOR";
316
+ /** Anyone who voted can see the results */
317
+ ViewRole["VOTERS"] = "VOTERS";
318
+ /** Anyone can see the results, even if one didn't vote */
319
+ ViewRole["EVERYONE"] = "EVERYONE";
320
+ })(ViewRole || (ViewRole = {}));
321
+ export var VoteRole;
322
+ (function (VoteRole) {
323
+ /** Logged in member */
324
+ VoteRole["SITE_MEMBERS"] = "SITE_MEMBERS";
325
+ /** Anyone */
326
+ VoteRole["ALL"] = "ALL";
327
+ })(VoteRole || (VoteRole = {}));
328
+ export var PollLayoutType;
329
+ (function (PollLayoutType) {
330
+ /** List */
331
+ PollLayoutType["LIST"] = "LIST";
332
+ /** Grid */
333
+ PollLayoutType["GRID"] = "GRID";
334
+ })(PollLayoutType || (PollLayoutType = {}));
335
+ export var PollLayoutDirection;
336
+ (function (PollLayoutDirection) {
337
+ /** Left-to-right */
338
+ PollLayoutDirection["LTR"] = "LTR";
339
+ /** Right-to-left */
340
+ PollLayoutDirection["RTL"] = "RTL";
341
+ })(PollLayoutDirection || (PollLayoutDirection = {}));
342
+ export var BackgroundType;
343
+ (function (BackgroundType) {
344
+ /** Color background type */
345
+ BackgroundType["COLOR"] = "COLOR";
346
+ /** Image background type */
347
+ BackgroundType["IMAGE"] = "IMAGE";
348
+ /** Gradiant background type */
349
+ BackgroundType["GRADIENT"] = "GRADIENT";
350
+ })(BackgroundType || (BackgroundType = {}));
351
+ export var DecorationType;
352
+ (function (DecorationType) {
353
+ DecorationType["BOLD"] = "BOLD";
354
+ DecorationType["ITALIC"] = "ITALIC";
355
+ DecorationType["UNDERLINE"] = "UNDERLINE";
356
+ DecorationType["SPOILER"] = "SPOILER";
357
+ DecorationType["ANCHOR"] = "ANCHOR";
358
+ DecorationType["MENTION"] = "MENTION";
359
+ DecorationType["LINK"] = "LINK";
360
+ DecorationType["COLOR"] = "COLOR";
361
+ DecorationType["FONT_SIZE"] = "FONT_SIZE";
362
+ DecorationType["EXTERNAL"] = "EXTERNAL";
363
+ })(DecorationType || (DecorationType = {}));
364
+ export var FontType;
365
+ (function (FontType) {
366
+ FontType["PX"] = "PX";
367
+ FontType["EM"] = "EM";
368
+ })(FontType || (FontType = {}));
369
+ export var AppType;
370
+ (function (AppType) {
371
+ AppType["PRODUCT"] = "PRODUCT";
372
+ AppType["EVENT"] = "EVENT";
373
+ AppType["BOOKING"] = "BOOKING";
374
+ })(AppType || (AppType = {}));
375
+ export var InitialExpandedItems;
376
+ (function (InitialExpandedItems) {
377
+ /** First item will be expended initally */
378
+ InitialExpandedItems["FIRST"] = "FIRST";
379
+ /** All items will expended initally */
380
+ InitialExpandedItems["ALL"] = "ALL";
381
+ /** All items collapsed initally */
382
+ InitialExpandedItems["NONE"] = "NONE";
383
+ })(InitialExpandedItems || (InitialExpandedItems = {}));
384
+ export var Direction;
385
+ (function (Direction) {
386
+ /** Left-to-right */
387
+ Direction["LTR"] = "LTR";
388
+ /** Right-to-left */
389
+ Direction["RTL"] = "RTL";
390
+ })(Direction || (Direction = {}));
391
+ export var VerticalAlignment;
392
+ (function (VerticalAlignment) {
393
+ /** Top alignment */
394
+ VerticalAlignment["TOP"] = "TOP";
395
+ /** Middle alignment */
396
+ VerticalAlignment["MIDDLE"] = "MIDDLE";
397
+ /** Bottom alignment */
398
+ VerticalAlignment["BOTTOM"] = "BOTTOM";
399
+ })(VerticalAlignment || (VerticalAlignment = {}));
400
+ /**
401
+ * `NullValue` is a singleton enumeration to represent the null value for the
402
+ * `Value` type union.
403
+ *
404
+ * The JSON representation for `NullValue` is JSON `null`.
405
+ */
406
+ export var NullValue;
407
+ (function (NullValue) {
408
+ /** Null value. */
409
+ NullValue["NULL_VALUE"] = "NULL_VALUE";
410
+ })(NullValue || (NullValue = {}));
411
+ export var NumberOfColumns;
412
+ (function (NumberOfColumns) {
413
+ /** Undefined number of columns. */
414
+ NumberOfColumns["UNKNOWN"] = "UNKNOWN";
415
+ /** Zero columns. */
416
+ NumberOfColumns["ZERO"] = "ZERO";
417
+ /** One column. */
418
+ NumberOfColumns["ONE"] = "ONE";
419
+ /** Two columns. */
420
+ NumberOfColumns["TWO"] = "TWO";
421
+ /** Three columns. */
422
+ NumberOfColumns["THREE"] = "THREE";
423
+ })(NumberOfColumns || (NumberOfColumns = {}));
424
+ export var FirstDayOfWeek;
425
+ (function (FirstDayOfWeek) {
426
+ /** First day of the week is Monday. */
427
+ FirstDayOfWeek["MONDAY"] = "MONDAY";
428
+ /** First day of the week is Sunday. */
429
+ FirstDayOfWeek["SUNDAY"] = "SUNDAY";
430
+ })(FirstDayOfWeek || (FirstDayOfWeek = {}));
431
+ export var NumberComponentType;
432
+ (function (NumberComponentType) {
433
+ NumberComponentType["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
434
+ NumberComponentType["NUMBER_INPUT"] = "NUMBER_INPUT";
435
+ NumberComponentType["RATING_INPUT"] = "RATING_INPUT";
436
+ })(NumberComponentType || (NumberComponentType = {}));
437
+ export var BooleanComponentType;
438
+ (function (BooleanComponentType) {
439
+ BooleanComponentType["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
440
+ BooleanComponentType["CHECKBOX"] = "CHECKBOX";
441
+ })(BooleanComponentType || (BooleanComponentType = {}));
442
+ export var ItemType;
443
+ (function (ItemType) {
444
+ ItemType["UNKNOWN_ITEM_TYPE"] = "UNKNOWN_ITEM_TYPE";
445
+ ItemType["STRING"] = "STRING";
446
+ ItemType["NUMBER"] = "NUMBER";
447
+ ItemType["BOOLEAN"] = "BOOLEAN";
448
+ ItemType["INTEGER"] = "INTEGER";
449
+ ItemType["OBJECT"] = "OBJECT";
450
+ })(ItemType || (ItemType = {}));
451
+ export var PropertiesTypeEnum;
452
+ (function (PropertiesTypeEnum) {
453
+ PropertiesTypeEnum["UNKNOWN"] = "UNKNOWN";
454
+ PropertiesTypeEnum["STRING"] = "STRING";
455
+ PropertiesTypeEnum["NUMBER"] = "NUMBER";
456
+ PropertiesTypeEnum["BOOLEAN"] = "BOOLEAN";
457
+ PropertiesTypeEnum["INTEGER"] = "INTEGER";
458
+ PropertiesTypeEnum["ARRAY"] = "ARRAY";
459
+ })(PropertiesTypeEnum || (PropertiesTypeEnum = {}));
460
+ export var ComponentType;
461
+ (function (ComponentType) {
462
+ ComponentType["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
463
+ ComponentType["CHECKBOX_GROUP"] = "CHECKBOX_GROUP";
464
+ ComponentType["TAGS"] = "TAGS";
465
+ })(ComponentType || (ComponentType = {}));
466
+ export var WixFileComponentType;
467
+ (function (WixFileComponentType) {
468
+ WixFileComponentType["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
469
+ WixFileComponentType["FILE_UPLOAD"] = "FILE_UPLOAD";
470
+ WixFileComponentType["SIGNATURE"] = "SIGNATURE";
471
+ })(WixFileComponentType || (WixFileComponentType = {}));
472
+ export var UploadFileFormat;
473
+ (function (UploadFileFormat) {
474
+ /** Undefined upload file format. */
475
+ UploadFileFormat["UNDEFINED"] = "UNDEFINED";
476
+ /** Video files. */
477
+ UploadFileFormat["VIDEO"] = "VIDEO";
478
+ /** Image files. */
479
+ UploadFileFormat["IMAGE"] = "IMAGE";
480
+ /** Audio files. */
481
+ UploadFileFormat["AUDIO"] = "AUDIO";
482
+ /** Document files. */
483
+ UploadFileFormat["DOCUMENT"] = "DOCUMENT";
484
+ /** Archive files. */
485
+ UploadFileFormat["ARCHIVE"] = "ARCHIVE";
486
+ })(UploadFileFormat || (UploadFileFormat = {}));
487
+ export var PaymentComponentType;
488
+ (function (PaymentComponentType) {
489
+ PaymentComponentType["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
490
+ PaymentComponentType["CHECKBOX_GROUP"] = "CHECKBOX_GROUP";
491
+ PaymentComponentType["DONATION_INPUT"] = "DONATION_INPUT";
492
+ PaymentComponentType["PAYMENT_INPUT"] = "PAYMENT_INPUT";
493
+ PaymentComponentType["FIXED_PAYMENT"] = "FIXED_PAYMENT";
494
+ })(PaymentComponentType || (PaymentComponentType = {}));
495
+ export var ImageFit;
496
+ (function (ImageFit) {
497
+ ImageFit["UNKNOWN_IMAGE_FIT"] = "UNKNOWN_IMAGE_FIT";
498
+ /** Image is scaled to maintain its aspect ratio while filling the element's entire content box. Portions of the image may be clipped if the aspect ratios do not match. */
499
+ ImageFit["COVER"] = "COVER";
500
+ /** Image is resized to fill the element's content box. Aspect ratio may not be preserved. */
501
+ ImageFit["CONTAIN"] = "CONTAIN";
502
+ })(ImageFit || (ImageFit = {}));
503
+ export var SchedulingComponentType;
504
+ (function (SchedulingComponentType) {
505
+ SchedulingComponentType["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
506
+ SchedulingComponentType["APPOINTMENT"] = "APPOINTMENT";
507
+ })(SchedulingComponentType || (SchedulingComponentType = {}));
508
+ export var Format;
509
+ (function (Format) {
510
+ Format["UNKNOWN_FORMAT_TYPE"] = "UNKNOWN_FORMAT_TYPE";
511
+ Format["IN_PERSON"] = "IN_PERSON";
512
+ Format["VIDEO_CONFERENCE"] = "VIDEO_CONFERENCE";
513
+ Format["PHONE"] = "PHONE";
514
+ })(Format || (Format = {}));
515
+ export var MultilineAddressComponentType;
516
+ (function (MultilineAddressComponentType) {
517
+ MultilineAddressComponentType["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
518
+ MultilineAddressComponentType["MULTILINE_ADDRESS"] = "MULTILINE_ADDRESS";
519
+ })(MultilineAddressComponentType || (MultilineAddressComponentType = {}));
520
+ export var Type;
521
+ (function (Type) {
522
+ /** Unknown default country config type. */
523
+ Type["UNKNOWN_DEFAULT_COUNTRY"] = "UNKNOWN_DEFAULT_COUNTRY";
524
+ /** Country is determined by customer's IP address. */
525
+ Type["BY_IP"] = "BY_IP";
526
+ /** Pre-selected default country. */
527
+ Type["COUNTRY"] = "COUNTRY";
528
+ })(Type || (Type = {}));
529
+ export var InputType;
530
+ (function (InputType) {
531
+ InputType["UNKNOWN_INPUT_TYPE"] = "UNKNOWN_INPUT_TYPE";
532
+ InputType["STRING"] = "STRING";
533
+ InputType["NUMBER"] = "NUMBER";
534
+ InputType["BOOLEAN"] = "BOOLEAN";
535
+ InputType["ARRAY"] = "ARRAY";
536
+ InputType["OBJECT"] = "OBJECT";
537
+ InputType["WIX_FILE"] = "WIX_FILE";
538
+ InputType["PAYMENT"] = "PAYMENT";
539
+ InputType["MULTILINE_ADDRESS"] = "MULTILINE_ADDRESS";
540
+ InputType["SCHEDULING"] = "SCHEDULING";
541
+ })(InputType || (InputType = {}));
542
+ export var EmailInfoTag;
543
+ (function (EmailInfoTag) {
544
+ EmailInfoTag["UNTAGGED"] = "UNTAGGED";
545
+ EmailInfoTag["MAIN"] = "MAIN";
546
+ })(EmailInfoTag || (EmailInfoTag = {}));
547
+ export var PhoneInfoTag;
548
+ (function (PhoneInfoTag) {
549
+ PhoneInfoTag["UNTAGGED"] = "UNTAGGED";
550
+ PhoneInfoTag["MAIN"] = "MAIN";
551
+ })(PhoneInfoTag || (PhoneInfoTag = {}));
552
+ export var Tag;
553
+ (function (Tag) {
554
+ Tag["UNTAGGED"] = "UNTAGGED";
555
+ Tag["HOME"] = "HOME";
556
+ })(Tag || (Tag = {}));
557
+ export var SubscriptionInfoOptInLevel;
558
+ (function (SubscriptionInfoOptInLevel) {
559
+ SubscriptionInfoOptInLevel["UNKNOWN"] = "UNKNOWN";
560
+ SubscriptionInfoOptInLevel["SINGLE_CONFIRMATION"] = "SINGLE_CONFIRMATION";
561
+ SubscriptionInfoOptInLevel["DOUBLE_CONFIRMATION"] = "DOUBLE_CONFIRMATION";
562
+ })(SubscriptionInfoOptInLevel || (SubscriptionInfoOptInLevel = {}));
563
+ export var ContactField;
564
+ (function (ContactField) {
565
+ ContactField["UNDEFINED"] = "UNDEFINED";
566
+ ContactField["FIRST_NAME"] = "FIRST_NAME";
567
+ ContactField["LAST_NAME"] = "LAST_NAME";
568
+ ContactField["COMPANY"] = "COMPANY";
569
+ ContactField["POSITION"] = "POSITION";
570
+ ContactField["EMAIL"] = "EMAIL";
571
+ ContactField["PHONE"] = "PHONE";
572
+ ContactField["ADDRESS"] = "ADDRESS";
573
+ ContactField["BIRTHDATE"] = "BIRTHDATE";
574
+ ContactField["CUSTOM_FIELD"] = "CUSTOM_FIELD";
575
+ ContactField["SUBSCRIPTION"] = "SUBSCRIPTION";
576
+ ContactField["VAT_ID"] = "VAT_ID";
577
+ })(ContactField || (ContactField = {}));
578
+ export var FieldType;
579
+ (function (FieldType) {
580
+ FieldType["UNKNOWN"] = "UNKNOWN";
581
+ FieldType["INPUT"] = "INPUT";
582
+ FieldType["DISPLAY"] = "DISPLAY";
583
+ })(FieldType || (FieldType = {}));
584
+ export var DisplayFieldType;
585
+ (function (DisplayFieldType) {
586
+ DisplayFieldType["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
587
+ DisplayFieldType["RICH_CONTENT"] = "RICH_CONTENT";
588
+ DisplayFieldType["PAGE_NAVIGATION"] = "PAGE_NAVIGATION";
589
+ })(DisplayFieldType || (DisplayFieldType = {}));
590
+ export var OverrideEntityType;
591
+ (function (OverrideEntityType) {
592
+ OverrideEntityType["UNKNOWN"] = "UNKNOWN";
593
+ OverrideEntityType["FIELD"] = "FIELD";
594
+ })(OverrideEntityType || (OverrideEntityType = {}));
595
+ export var Kind;
596
+ (function (Kind) {
597
+ /** Return forms specific to tenant, excluding template based forms. */
598
+ Kind["REGULAR"] = "REGULAR";
599
+ /** Return forms based on common templates, with applied user overrides if they exist. */
600
+ Kind["EXTENSION"] = "EXTENSION";
601
+ })(Kind || (Kind = {}));
602
+ export var SpamFilterProtectionLevel;
603
+ (function (SpamFilterProtectionLevel) {
604
+ /** Unknown spam filter protection level. */
605
+ SpamFilterProtectionLevel["UNKNOWN"] = "UNKNOWN";
606
+ /** Spam filter is not used. Form is open for spam submissions. */
607
+ SpamFilterProtectionLevel["NONE"] = "NONE";
608
+ /** Spam filter operates in basic mode. Form is open to high risk of spam submissions. */
609
+ SpamFilterProtectionLevel["BASIC"] = "BASIC";
610
+ /** Spam filter operates in advanced mode. Form is open to low risk of spam submissions. */
611
+ SpamFilterProtectionLevel["ADVANCED"] = "ADVANCED";
612
+ })(SpamFilterProtectionLevel || (SpamFilterProtectionLevel = {}));
613
+ export var Target;
614
+ (function (Target) {
615
+ /** Unknown target. */
616
+ Target["UNKNOWN_TARGET"] = "UNKNOWN_TARGET";
617
+ /** Open in the same browser tab. */
618
+ Target["SELF"] = "SELF";
619
+ /** Open in a new browser tab. */
620
+ Target["BLANK"] = "BLANK";
621
+ })(Target || (Target = {}));
622
+ export var SubmitSuccessAction;
623
+ (function (SubmitSuccessAction) {
624
+ /** Unknown submit success action. */
625
+ SubmitSuccessAction["UNKNOWN_SUBMIT_SUCCESS_ACTION"] = "UNKNOWN_SUBMIT_SUCCESS_ACTION";
626
+ /** No action will be taken after submission. */
627
+ SubmitSuccessAction["NO_ACTION"] = "NO_ACTION";
628
+ /** A thank you message will be shown after submission. */
629
+ SubmitSuccessAction["THANK_YOU_MESSAGE"] = "THANK_YOU_MESSAGE";
630
+ /** The user will be redirected to a URL after submission. */
631
+ SubmitSuccessAction["REDIRECT"] = "REDIRECT";
632
+ })(SubmitSuccessAction || (SubmitSuccessAction = {}));
633
+ export var WebhookIdentityType;
634
+ (function (WebhookIdentityType) {
635
+ WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
636
+ WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
637
+ WebhookIdentityType["MEMBER"] = "MEMBER";
638
+ WebhookIdentityType["WIX_USER"] = "WIX_USER";
639
+ WebhookIdentityType["APP"] = "APP";
640
+ })(WebhookIdentityType || (WebhookIdentityType = {}));
641
+ export var ErrorType;
642
+ (function (ErrorType) {
643
+ /** Error is unknown or not suitable for any of options bellow */
644
+ ErrorType["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
645
+ /** Type of submitted value is incorrect */
646
+ ErrorType["TYPE_ERROR"] = "TYPE_ERROR";
647
+ /** Value is required to be provided */
648
+ ErrorType["REQUIRED_VALUE_ERROR"] = "REQUIRED_VALUE_ERROR";
649
+ /** Value contains additional properties not expected in schema */
650
+ ErrorType["UNKNOWN_VALUE_ERROR"] = "UNKNOWN_VALUE_ERROR";
651
+ /** Text value exceeds max length */
652
+ ErrorType["MAX_LENGTH_ERROR"] = "MAX_LENGTH_ERROR";
653
+ /** Text value not reaches min length */
654
+ ErrorType["MIN_LENGTH_ERROR"] = "MIN_LENGTH_ERROR";
655
+ /** Text value not applicable for expected pattern */
656
+ ErrorType["PATTERN_ERROR"] = "PATTERN_ERROR";
657
+ /** Text value not applicable for expected format */
658
+ ErrorType["FORMAT_ERROR"] = "FORMAT_ERROR";
659
+ /** Number value is too big */
660
+ ErrorType["MAX_VALUE_ERROR"] = "MAX_VALUE_ERROR";
661
+ /** Number value is too small */
662
+ ErrorType["MIN_VALUE_ERROR"] = "MIN_VALUE_ERROR";
663
+ /** Number value is not multiple of expected number */
664
+ ErrorType["MULTIPLE_OF_VALUE_ERROR"] = "MULTIPLE_OF_VALUE_ERROR";
665
+ /** Array value has too much items */
666
+ ErrorType["MIN_ITEMS_ERROR"] = "MIN_ITEMS_ERROR";
667
+ /** Array value has not enough items */
668
+ ErrorType["MAX_ITEMS_ERROR"] = "MAX_ITEMS_ERROR";
669
+ /** Value is not in list of allowed values */
670
+ ErrorType["NOT_ALLOWED_VALUE_ERROR"] = "NOT_ALLOWED_VALUE_ERROR";
671
+ /** Form fields are incompatible */
672
+ ErrorType["FIELDS_COMPATIBILITY_ERROR"] = "FIELDS_COMPATIBILITY_ERROR";
673
+ /** Submitted form is disabled */
674
+ ErrorType["DISABLED_FORM_ERROR"] = "DISABLED_FORM_ERROR";
675
+ /** Too much forms */
676
+ ErrorType["FORMS_COUNT_RESTRICTIONS_ERROR"] = "FORMS_COUNT_RESTRICTIONS_ERROR";
677
+ /** Too much fields on form */
678
+ ErrorType["FIELDS_COUNT_RESTRICTIONS_ERROR"] = "FIELDS_COUNT_RESTRICTIONS_ERROR";
679
+ /** Too much steps on forms */
680
+ ErrorType["STEPS_COUNT_RESTRICTIONS_ERROR"] = "STEPS_COUNT_RESTRICTIONS_ERROR";
681
+ /** Too much rules on forms */
682
+ ErrorType["RULES_COUNT_RESTRICTIONS_ERROR"] = "RULES_COUNT_RESTRICTIONS_ERROR";
683
+ /** File upload is not allowed */
684
+ ErrorType["FILE_UPLOAD_RESTRICTIONS_ERROR"] = "FILE_UPLOAD_RESTRICTIONS_ERROR";
685
+ /** Country code is not correct or missing from the phone number */
686
+ ErrorType["INVALID_PHONE_COUNTRY_CODE_ERROR"] = "INVALID_PHONE_COUNTRY_CODE_ERROR";
687
+ /** Invalid staff member ID on appointment */
688
+ ErrorType["INVALID_STAFF_ID_ERROR"] = "INVALID_STAFF_ID_ERROR";
689
+ /** Invalid business location ID on appointment */
690
+ ErrorType["INVALID_LOCATION_ID_ERROR"] = "INVALID_LOCATION_ID_ERROR";
691
+ })(ErrorType || (ErrorType = {}));
692
+ export var SortOrder;
693
+ (function (SortOrder) {
694
+ SortOrder["ASC"] = "ASC";
695
+ SortOrder["DESC"] = "DESC";
696
+ })(SortOrder || (SortOrder = {}));
697
+ export var Mode;
698
+ (function (Mode) {
699
+ /** Any of the search terms must be present */
700
+ Mode["OR"] = "OR";
701
+ /** All search terms must be present */
702
+ Mode["AND"] = "AND";
703
+ })(Mode || (Mode = {}));
704
+ export var Status;
705
+ (function (Status) {
706
+ Status["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
707
+ Status["READY"] = "READY";
708
+ Status["PENDING"] = "PENDING";
709
+ Status["FAILED"] = "FAILED";
710
+ })(Status || (Status = {}));
711
+ export var IdentityType;
712
+ (function (IdentityType) {
713
+ IdentityType["UNKNOWN"] = "UNKNOWN";
714
+ /** Existing or new contact */
715
+ IdentityType["CONTACT"] = "CONTACT";
716
+ /** Member is logged in, matching logic skipped */
717
+ IdentityType["MEMBER"] = "MEMBER";
718
+ /** Matching contact is a member, Merge logic won't be applied */
719
+ IdentityType["NOT_AUTHENTICATED_MEMBER"] = "NOT_AUTHENTICATED_MEMBER";
720
+ })(IdentityType || (IdentityType = {}));
721
+ /**
722
+ * Creates a submission.
723
+ *
724
+ *
725
+ * The `createSubmission()` function is an alternative way to the [`WixFormsV2`](https://www.wix.com/velo/reference/$w/wixformsv2/submit) element for submitting a form. In this case, clicking the submit button is unnecessary, the submission is automatically created when calling this function.
726
+ * @param submission - Submission to create.
727
+ * @public
728
+ * @documentationMaturity preview
729
+ * @requiredField submission
730
+ * @requiredField submission.formId
731
+ * @param options - Optional fields.
732
+ * @permissionId WIX_FORMS.SUBMISSION_CREATE
733
+ * @permissionScope Manage Submissions
734
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
735
+ * @applicableIdentity APP
736
+ * @applicableIdentity VISITOR
737
+ * @returns The created submission.
738
+ * @fqn wix.forms.v4.FormSubmissionService.CreateSubmission
739
+ */
740
+ export async function createSubmission(submission, options) {
741
+ // @ts-ignore
742
+ const { httpClient, sideEffects } = arguments[2];
743
+ const payload = renameKeysFromSDKRequestToRESTRequest({
744
+ submission: submission,
745
+ captchaToken: options?.captchaToken,
746
+ });
747
+ const reqOpts = ambassadorWixFormsV4Submission.createSubmission(payload);
748
+ sideEffects?.onSiteCall?.();
749
+ try {
750
+ const result = await httpClient.request(reqOpts);
751
+ sideEffects?.onSuccess?.(result);
752
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.submission;
753
+ }
754
+ catch (err) {
755
+ const transformedError = sdkTransformError(err, {
756
+ spreadPathsToArguments: {},
757
+ explicitPathsToArguments: {
758
+ submission: '$[0]',
759
+ captchaToken: '$[1].captchaToken',
760
+ },
761
+ singleArgumentUnchanged: false,
762
+ }, ['submission', 'options']);
763
+ sideEffects?.onError?.(err);
764
+ throw transformedError;
765
+ }
766
+ }
767
+ /**
768
+ * Creates multiple submissions with specified submitters.
769
+ * Internal, migration only.
770
+ * @param formId - Form id. Restricts submissions creation for a single form.
771
+ * @public
772
+ * @documentationMaturity preview
773
+ * @requiredField formId
774
+ * @requiredField options.submissions.submissions
775
+ * @requiredField options.submissions.submitter
776
+ * @permissionId WIX_FORMS.INTERNAL_SUBMISSION_CREATE
777
+ * @fqn wix.forms.v4.FormSubmissionService.BulkCreateSubmissionBySubmitter
778
+ */
779
+ export async function bulkCreateSubmissionBySubmitter(formId, options) {
780
+ // @ts-ignore
781
+ const { httpClient, sideEffects } = arguments[2];
782
+ const payload = renameKeysFromSDKRequestToRESTRequest({
783
+ formId: formId,
784
+ submissions: options?.submissions,
785
+ returnEntity: options?.returnEntity,
786
+ submissionsV2: options?.submissionsV2,
787
+ lenientValidation: options?.lenientValidation,
788
+ });
789
+ const reqOpts = ambassadorWixFormsV4Submission.bulkCreateSubmissionBySubmitter(payload);
790
+ sideEffects?.onSiteCall?.();
791
+ try {
792
+ const result = await httpClient.request(reqOpts);
793
+ sideEffects?.onSuccess?.(result);
794
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
795
+ }
796
+ catch (err) {
797
+ const transformedError = sdkTransformError(err, {
798
+ spreadPathsToArguments: {},
799
+ explicitPathsToArguments: {
800
+ formId: '$[0]',
801
+ submissions: '$[1].submissions',
802
+ returnEntity: '$[1].returnEntity',
803
+ submissionsV2: '$[1].submissionsV2',
804
+ lenientValidation: '$[1].lenientValidation',
805
+ },
806
+ singleArgumentUnchanged: false,
807
+ }, ['formId', 'options']);
808
+ sideEffects?.onError?.(err);
809
+ throw transformedError;
810
+ }
811
+ }
812
+ /**
813
+ * Retrieves a submission by ID.
814
+ * @param submissionId - ID of the submission to retrieve.
815
+ * @public
816
+ * @requiredField submissionId
817
+ * @permissionId WIX_FORMS.SUBMISSION_READ_ANY
818
+ * @permissionScope Manage Submissions
819
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
820
+ * @permissionScope Manage Orders
821
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
822
+ * @permissionScope Read Orders
823
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
824
+ * @permissionScope Read Submissions
825
+ * @permissionScopeId SCOPE.DC-FORMS.READ-SUBMISSIONS
826
+ * @applicableIdentity APP
827
+ * @returns The retrieved submission.
828
+ * @fqn wix.forms.v4.FormSubmissionService.GetSubmission
829
+ */
830
+ export async function getSubmission(submissionId) {
831
+ // @ts-ignore
832
+ const { httpClient, sideEffects } = arguments[1];
833
+ const payload = renameKeysFromSDKRequestToRESTRequest({
834
+ submissionId: submissionId,
835
+ });
836
+ const reqOpts = ambassadorWixFormsV4Submission.getSubmission(payload);
837
+ sideEffects?.onSiteCall?.();
838
+ try {
839
+ const result = await httpClient.request(reqOpts);
840
+ sideEffects?.onSuccess?.(result);
841
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.submission;
842
+ }
843
+ catch (err) {
844
+ const transformedError = sdkTransformError(err, {
845
+ spreadPathsToArguments: {},
846
+ explicitPathsToArguments: { submissionId: '$[0]' },
847
+ singleArgumentUnchanged: false,
848
+ }, ['submissionId']);
849
+ sideEffects?.onError?.(err);
850
+ throw transformedError;
851
+ }
852
+ }
853
+ /**
854
+ * Updates a submission.
855
+ *
856
+ *
857
+ * Each time the submission is updated, `revision` increments by 1. The existing `revision` must be included when updating the submission. This ensures you're working with the latest submission information, and prevents unintended overwrites.
858
+ * @param _id - Submission ID.
859
+ * @public
860
+ * @requiredField _id
861
+ * @requiredField submission
862
+ * @requiredField submission.formId
863
+ * @requiredField submission.revision
864
+ * @param submission - Submission to update.
865
+ * @permissionId WIX_FORMS.SUBMISSION_UPDATE_ANY
866
+ * @permissionScope Manage Submissions
867
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
868
+ * @applicableIdentity APP
869
+ * @returns The updated submission.
870
+ * @fqn wix.forms.v4.FormSubmissionService.UpdateSubmission
871
+ */
872
+ export async function updateSubmission(_id, submission) {
873
+ // @ts-ignore
874
+ const { httpClient, sideEffects } = arguments[2];
875
+ const payload = renameKeysFromSDKRequestToRESTRequest({
876
+ submission: { ...submission, id: _id },
877
+ });
878
+ const reqOpts = ambassadorWixFormsV4Submission.updateSubmission(payload);
879
+ sideEffects?.onSiteCall?.();
880
+ try {
881
+ const result = await httpClient.request(reqOpts);
882
+ sideEffects?.onSuccess?.(result);
883
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.submission;
884
+ }
885
+ catch (err) {
886
+ const transformedError = sdkTransformError(err, {
887
+ spreadPathsToArguments: { submission: '$[1]' },
888
+ explicitPathsToArguments: { 'submission.id': '$[0]' },
889
+ singleArgumentUnchanged: false,
890
+ }, ['_id', 'submission']);
891
+ sideEffects?.onError?.(err);
892
+ throw transformedError;
893
+ }
894
+ }
895
+ /**
896
+ * Confirms a submission.
897
+ *
898
+ *
899
+ * You can only confirm a submission that has a `PENDING` status.
900
+ * When using forms from the [Wix Pricing Plans](https://www.wix.com/app-market/paid-plans?referral=collection&appIndex=42&referralTag=made-by-wix&referralSectionName=made-by-wix) app, the default submission status is `PENDING`.
901
+ * When using forms from the [Wix Forms]() app, the default form submission status is `CONFIRMED`. You can change the default status for individual submissions using the `updateSubmission()` method.
902
+ * @param submissionId - Submission ID to confirm.
903
+ * @public
904
+ * @requiredField submissionId
905
+ * @permissionId WIX_FORMS.SUBMISSION_UPDATE_ANY
906
+ * @permissionScope Manage Submissions
907
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
908
+ * @applicableIdentity APP
909
+ * @fqn wix.forms.v4.FormSubmissionService.ConfirmSubmission
910
+ */
911
+ export async function confirmSubmission(submissionId) {
912
+ // @ts-ignore
913
+ const { httpClient, sideEffects } = arguments[1];
914
+ const payload = renameKeysFromSDKRequestToRESTRequest({
915
+ submissionId: submissionId,
916
+ });
917
+ const reqOpts = ambassadorWixFormsV4Submission.confirmSubmission(payload);
918
+ sideEffects?.onSiteCall?.();
919
+ try {
920
+ const result = await httpClient.request(reqOpts);
921
+ sideEffects?.onSuccess?.(result);
922
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
923
+ }
924
+ catch (err) {
925
+ const transformedError = sdkTransformError(err, {
926
+ spreadPathsToArguments: {},
927
+ explicitPathsToArguments: { submissionId: '$[0]' },
928
+ singleArgumentUnchanged: false,
929
+ }, ['submissionId']);
930
+ sideEffects?.onError?.(err);
931
+ throw transformedError;
932
+ }
933
+ }
934
+ /**
935
+ * Deletes a submission.
936
+ *
937
+ *
938
+ * This function moves the form submission into the trash bin. To delete the submission permanently, change the default `permanent` field value to `true.`
939
+ * @param submissionId - ID of the submission to delete.
940
+ * @public
941
+ * @requiredField submissionId
942
+ * @param options - Optional fields.
943
+ * @permissionId WIX_FORMS.SUBMISSION_DELETE
944
+ * @permissionScope Manage Submissions
945
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
946
+ * @applicableIdentity APP
947
+ * @fqn wix.forms.v4.FormSubmissionService.DeleteSubmission
948
+ */
949
+ export async function deleteSubmission(submissionId, options) {
950
+ // @ts-ignore
951
+ const { httpClient, sideEffects } = arguments[2];
952
+ const payload = renameKeysFromSDKRequestToRESTRequest({
953
+ submissionId: submissionId,
954
+ permanent: options?.permanent,
955
+ preserveFiles: options?.preserveFiles,
956
+ });
957
+ const reqOpts = ambassadorWixFormsV4Submission.deleteSubmission(payload);
958
+ sideEffects?.onSiteCall?.();
959
+ try {
960
+ const result = await httpClient.request(reqOpts);
961
+ sideEffects?.onSuccess?.(result);
962
+ }
963
+ catch (err) {
964
+ const transformedError = sdkTransformError(err, {
965
+ spreadPathsToArguments: {},
966
+ explicitPathsToArguments: {
967
+ submissionId: '$[0]',
968
+ permanent: '$[1].permanent',
969
+ preserveFiles: '$[1].preserveFiles',
970
+ },
971
+ singleArgumentUnchanged: false,
972
+ }, ['submissionId', 'options']);
973
+ sideEffects?.onError?.(err);
974
+ throw transformedError;
975
+ }
976
+ }
977
+ /**
978
+ * Deletes submissions by IDS for specific form.
979
+ * @param formId - Form ID.
980
+ * @public
981
+ * @documentationMaturity preview
982
+ * @requiredField formId
983
+ * @permissionId WIX_FORMS.SUBMISSION_DELETE
984
+ * @permissionScope Manage Submissions
985
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
986
+ * @applicableIdentity APP
987
+ * @fqn wix.forms.v4.FormSubmissionService.BulkDeleteSubmission
988
+ */
989
+ export async function bulkDeleteSubmission(formId, options) {
990
+ // @ts-ignore
991
+ const { httpClient, sideEffects } = arguments[2];
992
+ const payload = renameKeysFromSDKRequestToRESTRequest({
993
+ formId: formId,
994
+ submissionIds: options?.submissionIds,
995
+ permanent: options?.permanent,
996
+ preserveFiles: options?.preserveFiles,
997
+ });
998
+ const reqOpts = ambassadorWixFormsV4Submission.bulkDeleteSubmission(payload);
999
+ sideEffects?.onSiteCall?.();
1000
+ try {
1001
+ const result = await httpClient.request(reqOpts);
1002
+ sideEffects?.onSuccess?.(result);
1003
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1004
+ }
1005
+ catch (err) {
1006
+ const transformedError = sdkTransformError(err, {
1007
+ spreadPathsToArguments: {},
1008
+ explicitPathsToArguments: {
1009
+ formId: '$[0]',
1010
+ submissionIds: '$[1].submissionIds',
1011
+ permanent: '$[1].permanent',
1012
+ preserveFiles: '$[1].preserveFiles',
1013
+ },
1014
+ singleArgumentUnchanged: false,
1015
+ }, ['formId', 'options']);
1016
+ sideEffects?.onError?.(err);
1017
+ throw transformedError;
1018
+ }
1019
+ }
1020
+ /**
1021
+ * Restores deleted submission
1022
+ * @param submissionId - ID of the submission to restore.
1023
+ * @public
1024
+ * @documentationMaturity preview
1025
+ * @requiredField submissionId
1026
+ * @permissionId WIX_FORMS.SUBMISSION_UPDATE_ANY
1027
+ * @permissionScope Manage Submissions
1028
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1029
+ * @applicableIdentity APP
1030
+ * @fqn wix.forms.v4.FormSubmissionService.RestoreSubmissionFromTrashBin
1031
+ */
1032
+ export async function restoreSubmissionFromTrashBin(submissionId) {
1033
+ // @ts-ignore
1034
+ const { httpClient, sideEffects } = arguments[1];
1035
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1036
+ submissionId: submissionId,
1037
+ });
1038
+ const reqOpts = ambassadorWixFormsV4Submission.restoreSubmissionFromTrashBin(payload);
1039
+ sideEffects?.onSiteCall?.();
1040
+ try {
1041
+ const result = await httpClient.request(reqOpts);
1042
+ sideEffects?.onSuccess?.(result);
1043
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1044
+ }
1045
+ catch (err) {
1046
+ const transformedError = sdkTransformError(err, {
1047
+ spreadPathsToArguments: {},
1048
+ explicitPathsToArguments: { submissionId: '$[0]' },
1049
+ singleArgumentUnchanged: false,
1050
+ }, ['submissionId']);
1051
+ sideEffects?.onError?.(err);
1052
+ throw transformedError;
1053
+ }
1054
+ }
1055
+ /**
1056
+ * Remove deleted submission
1057
+ * @param submissionId - ID of the submission to restore.
1058
+ * @public
1059
+ * @documentationMaturity preview
1060
+ * @requiredField submissionId
1061
+ * @permissionId WIX_FORMS.SUBMISSION_DELETE
1062
+ * @permissionScope Manage Submissions
1063
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1064
+ * @applicableIdentity APP
1065
+ * @fqn wix.forms.v4.FormSubmissionService.RemoveSubmissionFromTrashBin
1066
+ */
1067
+ export async function removeSubmissionFromTrashBin(submissionId) {
1068
+ // @ts-ignore
1069
+ const { httpClient, sideEffects } = arguments[1];
1070
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1071
+ submissionId: submissionId,
1072
+ });
1073
+ const reqOpts = ambassadorWixFormsV4Submission.removeSubmissionFromTrashBin(payload);
1074
+ sideEffects?.onSiteCall?.();
1075
+ try {
1076
+ const result = await httpClient.request(reqOpts);
1077
+ sideEffects?.onSuccess?.(result);
1078
+ }
1079
+ catch (err) {
1080
+ const transformedError = sdkTransformError(err, {
1081
+ spreadPathsToArguments: {},
1082
+ explicitPathsToArguments: { submissionId: '$[0]' },
1083
+ singleArgumentUnchanged: false,
1084
+ }, ['submissionId']);
1085
+ sideEffects?.onError?.(err);
1086
+ throw transformedError;
1087
+ }
1088
+ }
1089
+ /**
1090
+ * Remove multiple deleted submissions
1091
+ * @param formId - Form ID.
1092
+ * @public
1093
+ * @documentationMaturity preview
1094
+ * @requiredField formId
1095
+ * @permissionId WIX_FORMS.SUBMISSION_DELETE
1096
+ * @permissionScope Manage Submissions
1097
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1098
+ * @applicableIdentity APP
1099
+ * @fqn wix.forms.v4.FormSubmissionService.BulkRemoveSubmissionFromTrashBin
1100
+ */
1101
+ export async function bulkRemoveSubmissionFromTrashBin(formId, options) {
1102
+ // @ts-ignore
1103
+ const { httpClient, sideEffects } = arguments[2];
1104
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1105
+ formId: formId,
1106
+ submissionIds: options?.submissionIds,
1107
+ });
1108
+ const reqOpts = ambassadorWixFormsV4Submission.bulkRemoveSubmissionFromTrashBin(payload);
1109
+ sideEffects?.onSiteCall?.();
1110
+ try {
1111
+ const result = await httpClient.request(reqOpts);
1112
+ sideEffects?.onSuccess?.(result);
1113
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1114
+ }
1115
+ catch (err) {
1116
+ const transformedError = sdkTransformError(err, {
1117
+ spreadPathsToArguments: {},
1118
+ explicitPathsToArguments: {
1119
+ formId: '$[0]',
1120
+ submissionIds: '$[1].submissionIds',
1121
+ },
1122
+ singleArgumentUnchanged: false,
1123
+ }, ['formId', 'options']);
1124
+ sideEffects?.onError?.(err);
1125
+ throw transformedError;
1126
+ }
1127
+ }
1128
+ /**
1129
+ * List deleted submissions
1130
+ * @param formId - Form ID.
1131
+ * @public
1132
+ * @documentationMaturity preview
1133
+ * @requiredField formId
1134
+ * @permissionId WIX_FORMS.SUBMISSION_READ_ANY
1135
+ * @permissionScope Manage Submissions
1136
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1137
+ * @permissionScope Manage Orders
1138
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1139
+ * @permissionScope Read Orders
1140
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1141
+ * @permissionScope Read Submissions
1142
+ * @permissionScopeId SCOPE.DC-FORMS.READ-SUBMISSIONS
1143
+ * @applicableIdentity APP
1144
+ * @fqn wix.forms.v4.FormSubmissionService.ListDeletedSubmissions
1145
+ */
1146
+ export async function listDeletedSubmissions(formId, options) {
1147
+ // @ts-ignore
1148
+ const { httpClient, sideEffects } = arguments[2];
1149
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1150
+ formId: formId,
1151
+ submissionIds: options?.submissionIds,
1152
+ paging: options?.paging,
1153
+ statuses: options?.statuses,
1154
+ });
1155
+ const reqOpts = ambassadorWixFormsV4Submission.listDeletedSubmissions(payload);
1156
+ sideEffects?.onSiteCall?.();
1157
+ try {
1158
+ const result = await httpClient.request(reqOpts);
1159
+ sideEffects?.onSuccess?.(result);
1160
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1161
+ }
1162
+ catch (err) {
1163
+ const transformedError = sdkTransformError(err, {
1164
+ spreadPathsToArguments: {},
1165
+ explicitPathsToArguments: {
1166
+ formId: '$[0]',
1167
+ submissionIds: '$[1].submissionIds',
1168
+ paging: '$[1].paging',
1169
+ statuses: '$[1].statuses',
1170
+ },
1171
+ singleArgumentUnchanged: false,
1172
+ }, ['formId', 'options']);
1173
+ sideEffects?.onError?.(err);
1174
+ throw transformedError;
1175
+ }
1176
+ }
1177
+ /**
1178
+ * Get deleted submission
1179
+ * @param submissionId - Submission id.
1180
+ * @public
1181
+ * @documentationMaturity preview
1182
+ * @requiredField submissionId
1183
+ * @permissionId WIX_FORMS.SUBMISSION_READ_ANY
1184
+ * @permissionScope Manage Submissions
1185
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1186
+ * @permissionScope Manage Orders
1187
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1188
+ * @permissionScope Read Orders
1189
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1190
+ * @permissionScope Read Submissions
1191
+ * @permissionScopeId SCOPE.DC-FORMS.READ-SUBMISSIONS
1192
+ * @applicableIdentity APP
1193
+ * @fqn wix.forms.v4.FormSubmissionService.GetDeletedSubmission
1194
+ */
1195
+ export async function getDeletedSubmission(submissionId) {
1196
+ // @ts-ignore
1197
+ const { httpClient, sideEffects } = arguments[1];
1198
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1199
+ submissionId: submissionId,
1200
+ });
1201
+ const reqOpts = ambassadorWixFormsV4Submission.getDeletedSubmission(payload);
1202
+ sideEffects?.onSiteCall?.();
1203
+ try {
1204
+ const result = await httpClient.request(reqOpts);
1205
+ sideEffects?.onSuccess?.(result);
1206
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1207
+ }
1208
+ catch (err) {
1209
+ const transformedError = sdkTransformError(err, {
1210
+ spreadPathsToArguments: {},
1211
+ explicitPathsToArguments: { submissionId: '$[0]' },
1212
+ singleArgumentUnchanged: false,
1213
+ }, ['submissionId']);
1214
+ sideEffects?.onError?.(err);
1215
+ throw transformedError;
1216
+ }
1217
+ }
1218
+ /**
1219
+ * Deprecated on '2023-08-08'. Use QuerySubmissionsByNamespace.
1220
+ * @param query - Query options.
1221
+ * @public
1222
+ * @documentationMaturity preview
1223
+ * @requiredField query
1224
+ * @permissionId WIX_FORMS.SUBMISSION_READ_ANY
1225
+ * @permissionScope Manage Submissions
1226
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1227
+ * @permissionScope Manage Orders
1228
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1229
+ * @permissionScope Read Orders
1230
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1231
+ * @permissionScope Read Submissions
1232
+ * @permissionScopeId SCOPE.DC-FORMS.READ-SUBMISSIONS
1233
+ * @applicableIdentity APP
1234
+ * @fqn wix.forms.v4.FormSubmissionService.QuerySubmission
1235
+ * @deprecated
1236
+ * @replacedBy com.wixpress.forms.v4.FormSubmissionService.QuerySubmissionsByNamespace
1237
+ * @targetRemovalDate 2025-04-01
1238
+ */
1239
+ export async function querySubmission(query, options) {
1240
+ // @ts-ignore
1241
+ const { httpClient, sideEffects } = arguments[2];
1242
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1243
+ query: query,
1244
+ onlyYourOwn: options?.onlyYourOwn,
1245
+ });
1246
+ const reqOpts = ambassadorWixFormsV4Submission.querySubmission(payload);
1247
+ sideEffects?.onSiteCall?.();
1248
+ try {
1249
+ const result = await httpClient.request(reqOpts);
1250
+ sideEffects?.onSuccess?.(result);
1251
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1252
+ }
1253
+ catch (err) {
1254
+ const transformedError = sdkTransformError(err, {
1255
+ spreadPathsToArguments: {},
1256
+ explicitPathsToArguments: {
1257
+ query: '$[0]',
1258
+ onlyYourOwn: '$[1].onlyYourOwn',
1259
+ },
1260
+ singleArgumentUnchanged: false,
1261
+ }, ['query', 'options']);
1262
+ sideEffects?.onError?.(err);
1263
+ throw transformedError;
1264
+ }
1265
+ }
1266
+ /**
1267
+ * > **Note:** The Form Submission API only works with the Wix Forms app. Call [GetAppInstance](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/get-app-instance) to confirm that the app named `wix_forms` is installed on the site.
1268
+ * <br>
1269
+ *
1270
+ * Returns a list of up to 100 submissions, given the provided paging, filtering, and sorting.
1271
+ *
1272
+ * You can only query submissions from a specified namespace. Use the query filter on the `namespace` field, otherwise you will receive an error.
1273
+ *
1274
+ * For field support for filters and sorting, see [Form Submissions: Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-forms/form-submissions/sort-and-filter).option
1275
+ *
1276
+ * To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
1277
+ * @param search - Query options.
1278
+ * @public
1279
+ * @documentationMaturity preview
1280
+ * @requiredField search
1281
+ * @permissionId WIX_FORMS.SUBMISSION_READ_ANY
1282
+ * @permissionScope Manage Submissions
1283
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1284
+ * @permissionScope Manage Orders
1285
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1286
+ * @permissionScope Read Orders
1287
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1288
+ * @permissionScope Read Submissions
1289
+ * @permissionScopeId SCOPE.DC-FORMS.READ-SUBMISSIONS
1290
+ * @applicableIdentity APP
1291
+ * @fqn wix.forms.v4.FormSubmissionService.SearchSubmissionsByNamespace
1292
+ */
1293
+ export async function searchSubmissionsByNamespace(search) {
1294
+ // @ts-ignore
1295
+ const { httpClient, sideEffects } = arguments[1];
1296
+ const payload = renameKeysFromSDKRequestToRESTRequest({ search: search });
1297
+ const reqOpts = ambassadorWixFormsV4Submission.searchSubmissionsByNamespace(payload);
1298
+ sideEffects?.onSiteCall?.();
1299
+ try {
1300
+ const result = await httpClient.request(reqOpts);
1301
+ sideEffects?.onSuccess?.(result);
1302
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1303
+ }
1304
+ catch (err) {
1305
+ const transformedError = sdkTransformError(err, {
1306
+ spreadPathsToArguments: {},
1307
+ explicitPathsToArguments: { search: '$[0]' },
1308
+ singleArgumentUnchanged: false,
1309
+ }, ['search']);
1310
+ sideEffects?.onError?.(err);
1311
+ throw transformedError;
1312
+ }
1313
+ }
1314
+ /**
1315
+ * Creates a query to retrieve a list of submissions.
1316
+ *
1317
+ *
1318
+ * The `querySubmissionsByNamespace()` method builds a query to retrieve a list of submissions from the specified namespace and returns a [`SubmissionsQueryBuilder`](#submissionsquerybuilder) object.
1319
+ * >**Note:** You can only query submissions from a specified namespace. Use the query filter on the `namespace` field, otherwise you will receive an error.
1320
+ *
1321
+ * The returned object contains the query definition, which is typically used to run the query using the [`find()`](#submissionsquerybuilder/find) method.
1322
+ *
1323
+ * You can refine the query by chaining `SubmissionsQueryBuilder` methods onto the query. `SubmissionsQueryBuilder` methods enable you to sort, filter, and control the results that `querySubmissionsByNamespace()` returns.
1324
+ *
1325
+ * The following `SubmissionsQueryBuilder` methods are supported for `querySubmissionsByNamespace()`. For a full description of the Submissions object, see the object returned for the [`items`](#submissionsqueryresult/items) property in [`SubmissionsQueryResult`](#submissionsqueryresult).
1326
+ * @public
1327
+ * @param options - Query options.
1328
+ * @permissionScope Manage Submissions
1329
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1330
+ * @permissionScope Manage Orders
1331
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1332
+ * @permissionScope Read Orders
1333
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1334
+ * @permissionScope Read Submissions
1335
+ * @permissionScopeId SCOPE.DC-FORMS.READ-SUBMISSIONS
1336
+ * @permissionId WIX_FORMS.SUBMISSION_READ_ANY
1337
+ * @applicableIdentity APP
1338
+ * @fqn wix.forms.v4.FormSubmissionService.QuerySubmissionsByNamespace
1339
+ */
1340
+ export function querySubmissionsByNamespace(options) {
1341
+ // @ts-ignore
1342
+ const { httpClient, sideEffects } = arguments[1];
1343
+ return queryBuilder({
1344
+ func: async (payload) => {
1345
+ const reqOpts = ambassadorWixFormsV4Submission.querySubmissionsByNamespace({
1346
+ ...payload,
1347
+ ...(options ?? {}),
1348
+ });
1349
+ sideEffects?.onSiteCall?.();
1350
+ try {
1351
+ const result = await httpClient.request(reqOpts);
1352
+ sideEffects?.onSuccess?.(result);
1353
+ return result;
1354
+ }
1355
+ catch (err) {
1356
+ sideEffects?.onError?.(err);
1357
+ throw err;
1358
+ }
1359
+ },
1360
+ requestTransformer: (query) => {
1361
+ const args = [query, options];
1362
+ return renameKeysFromSDKRequestToRESTRequest({
1363
+ ...args?.[1],
1364
+ query: args?.[0],
1365
+ });
1366
+ },
1367
+ responseTransformer: ({ data, }) => {
1368
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(data);
1369
+ return {
1370
+ items: transformedData?.submissions,
1371
+ pagingMetadata: transformedData?.metadata,
1372
+ };
1373
+ },
1374
+ errorTransformer: (err) => {
1375
+ const transformedError = sdkTransformError(err, {
1376
+ spreadPathsToArguments: {},
1377
+ explicitPathsToArguments: { query: '$[0]' },
1378
+ singleArgumentUnchanged: false,
1379
+ });
1380
+ throw transformedError;
1381
+ },
1382
+ pagingMethod: 'CURSOR',
1383
+ transformationPaths: {},
1384
+ });
1385
+ }
1386
+ /**
1387
+ * > **Note:** The Form Submission API only works with the Wix Forms app. Call [GetAppInstance](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/get-app-instance) to confirm that the app named `wix_forms` is installed on the site.
1388
+ * <br>
1389
+ * Counts the number of submissions belonging to forms that were filtered and contain a provided expression.
1390
+ * @param filter - A filter object. Must filter by namespace.
1391
+ * @public
1392
+ * @requiredField filter
1393
+ * @permissionId WIX_FORMS.SUBMISSION_READ_ANY
1394
+ * @permissionScope Manage Submissions
1395
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1396
+ * @permissionScope Manage Orders
1397
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1398
+ * @permissionScope Read Orders
1399
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1400
+ * @permissionScope Read Submissions
1401
+ * @permissionScopeId SCOPE.DC-FORMS.READ-SUBMISSIONS
1402
+ * @applicableIdentity APP
1403
+ * @fqn wix.forms.v4.FormSubmissionService.CountSubmissionsByFilter
1404
+ */
1405
+ export async function countSubmissionsByFilter(filter, options) {
1406
+ // @ts-ignore
1407
+ const { httpClient, sideEffects } = arguments[2];
1408
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1409
+ filter: filter,
1410
+ search: options?.search,
1411
+ });
1412
+ const reqOpts = ambassadorWixFormsV4Submission.countSubmissionsByFilter(payload);
1413
+ sideEffects?.onSiteCall?.();
1414
+ try {
1415
+ const result = await httpClient.request(reqOpts);
1416
+ sideEffects?.onSuccess?.(result);
1417
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1418
+ }
1419
+ catch (err) {
1420
+ const transformedError = sdkTransformError(err, {
1421
+ spreadPathsToArguments: {},
1422
+ explicitPathsToArguments: { filter: '$[0]', search: '$[1].search' },
1423
+ singleArgumentUnchanged: false,
1424
+ }, ['filter', 'options']);
1425
+ sideEffects?.onError?.(err);
1426
+ throw transformedError;
1427
+ }
1428
+ }
1429
+ /**
1430
+ * Counts the number of submissions belonging to the specified forms.
1431
+ *
1432
+ *
1433
+ * The `countSubmissions()` function is useful for analytics and tracking purposes. For example, if you have a contact form on your website, you can use this function to track how many submissions it receives daily, weekly, or monthly.
1434
+ * @public
1435
+ * @requiredField formIds
1436
+ * @requiredField namespace
1437
+ * @param namespace - The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `getSubmission()` to retrieve the namespace.
1438
+ * @param formIds - Form IDs which submissions should be counted.
1439
+ * @permissionId WIX_FORMS.SUBMISSION_READ_ANY
1440
+ * @permissionScope Manage Submissions
1441
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1442
+ * @permissionScope Manage Orders
1443
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1444
+ * @permissionScope Read Orders
1445
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1446
+ * @permissionScope Read Submissions
1447
+ * @permissionScopeId SCOPE.DC-FORMS.READ-SUBMISSIONS
1448
+ * @applicableIdentity APP
1449
+ * @fqn wix.forms.v4.FormSubmissionService.CountSubmissions
1450
+ */
1451
+ export async function countSubmissions(formIds, namespace, options) {
1452
+ // @ts-ignore
1453
+ const { httpClient, sideEffects } = arguments[3];
1454
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1455
+ formIds: formIds,
1456
+ namespace: namespace,
1457
+ statuses: options?.statuses,
1458
+ });
1459
+ const reqOpts = ambassadorWixFormsV4Submission.countSubmissions(payload);
1460
+ sideEffects?.onSiteCall?.();
1461
+ try {
1462
+ const result = await httpClient.request(reqOpts);
1463
+ sideEffects?.onSuccess?.(result);
1464
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1465
+ }
1466
+ catch (err) {
1467
+ const transformedError = sdkTransformError(err, {
1468
+ spreadPathsToArguments: {},
1469
+ explicitPathsToArguments: {
1470
+ formIds: '$[0]',
1471
+ namespace: '$[1]',
1472
+ statuses: '$[2].statuses',
1473
+ },
1474
+ singleArgumentUnchanged: false,
1475
+ }, ['formIds', 'namespace', 'options']);
1476
+ sideEffects?.onError?.(err);
1477
+ throw transformedError;
1478
+ }
1479
+ }
1480
+ /**
1481
+ * > **Note:**
1482
+ * > The Submissions API is only available in the Wix Studio editor.
1483
+ *
1484
+ * Counts the number of submissions belonging to the specified forms.
1485
+ * @param formIds - Form IDs.
1486
+ * @param namespace - Identifies the app which the form submissions belong to. For example, the namespace for the Wix Forms App is `"wix.form_app.form"`. The namespace of a submission can be retrieved using the Get Submission endpoint.
1487
+ * @public
1488
+ * @documentationMaturity preview
1489
+ * @requiredField formIds
1490
+ * @requiredField namespace
1491
+ * @permissionId WIX_FORMS.SUBMISSION_READ_ANY
1492
+ * @permissionScope Manage Submissions
1493
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1494
+ * @permissionScope Manage Orders
1495
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1496
+ * @permissionScope Read Orders
1497
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1498
+ * @permissionScope Read Submissions
1499
+ * @permissionScopeId SCOPE.DC-FORMS.READ-SUBMISSIONS
1500
+ * @applicableIdentity APP
1501
+ * @fqn wix.forms.v4.FormSubmissionService.CountDeletedSubmissions
1502
+ */
1503
+ export async function countDeletedSubmissions(formIds, namespace, options) {
1504
+ // @ts-ignore
1505
+ const { httpClient, sideEffects } = arguments[3];
1506
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1507
+ formIds: formIds,
1508
+ namespace: namespace,
1509
+ statuses: options?.statuses,
1510
+ });
1511
+ const reqOpts = ambassadorWixFormsV4Submission.countDeletedSubmissions(payload);
1512
+ sideEffects?.onSiteCall?.();
1513
+ try {
1514
+ const result = await httpClient.request(reqOpts);
1515
+ sideEffects?.onSuccess?.(result);
1516
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1517
+ }
1518
+ catch (err) {
1519
+ const transformedError = sdkTransformError(err, {
1520
+ spreadPathsToArguments: {},
1521
+ explicitPathsToArguments: {
1522
+ formIds: '$[0]',
1523
+ namespace: '$[1]',
1524
+ statuses: '$[2].statuses',
1525
+ },
1526
+ singleArgumentUnchanged: false,
1527
+ }, ['formIds', 'namespace', 'options']);
1528
+ sideEffects?.onError?.(err);
1529
+ throw transformedError;
1530
+ }
1531
+ }
1532
+ /**
1533
+ * Retrieves a URL generated by the [Media Manager](https://www.wix.com/velo/reference/wix-media-v2/files/generatefileuploadurl) to use when creating a submission that includes a field for uploading files.
1534
+ * > **Note:** You need at least a [Standard Premium](https://support.wix.com/en/article/choosing-a-premium-plan) plan for your site to upload files.
1535
+ *
1536
+ *
1537
+ * To learn how external clients can use the generated upload URL to upload a file to the Media Manager, see [Upload API](https://www.wix.com/velo/reference/wix-media-v2/files/upload-api).
1538
+ * @param formId - Form ID.
1539
+ * @param filename - Name of file to upload.
1540
+ * @param mimeType - [Mime type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#) of file to upload.
1541
+ *
1542
+ * For example, `'image/png'`
1543
+ * @public
1544
+ * @requiredField filename
1545
+ * @requiredField formId
1546
+ * @requiredField mimeType
1547
+ * @permissionId WIX_FORMS.SUBMISSION_CREATE
1548
+ * @permissionScope Manage Submissions
1549
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1550
+ * @applicableIdentity APP
1551
+ * @applicableIdentity VISITOR
1552
+ * @fqn wix.forms.v4.FormSubmissionService.GetMediaUploadURL
1553
+ */
1554
+ export async function getMediaUploadUrl(formId, filename, mimeType) {
1555
+ // @ts-ignore
1556
+ const { httpClient, sideEffects } = arguments[3];
1557
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1558
+ formId: formId,
1559
+ filename: filename,
1560
+ mimeType: mimeType,
1561
+ });
1562
+ const reqOpts = ambassadorWixFormsV4Submission.getMediaUploadUrl(payload);
1563
+ sideEffects?.onSiteCall?.();
1564
+ try {
1565
+ const result = await httpClient.request(reqOpts);
1566
+ sideEffects?.onSuccess?.(result);
1567
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1568
+ }
1569
+ catch (err) {
1570
+ const transformedError = sdkTransformError(err, {
1571
+ spreadPathsToArguments: {},
1572
+ explicitPathsToArguments: {
1573
+ formId: '$[0]',
1574
+ filename: '$[1]',
1575
+ mimeType: '$[2]',
1576
+ },
1577
+ singleArgumentUnchanged: false,
1578
+ }, ['formId', 'filename', 'mimeType']);
1579
+ sideEffects?.onError?.(err);
1580
+ throw transformedError;
1581
+ }
1582
+ }
1583
+ /**
1584
+ * Marks form submissions as "seen".
1585
+ *
1586
+ *
1587
+ * This function marks the submissions as if they were seen by the site owner. Only site collaborators with the **[Manage Submission](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions)** permissions can mark submissions.
1588
+ * @public
1589
+ * @requiredField formId
1590
+ * @requiredField ids
1591
+ * @param ids - IDs of submissions to mark as seen.
1592
+ * @param formId - ID of the form which the submissions belong to.
1593
+ * @permissionId WIX_FORMS.SUBMISSION_READ_ANY
1594
+ * @permissionScope Manage Submissions
1595
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1596
+ * @permissionScope Manage Orders
1597
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.MANAGE-ORDERS
1598
+ * @permissionScope Read Orders
1599
+ * @permissionScopeId SCOPE.DC-PAIDPLANS.READ-ORDERS
1600
+ * @permissionScope Read Submissions
1601
+ * @permissionScopeId SCOPE.DC-FORMS.READ-SUBMISSIONS
1602
+ * @applicableIdentity APP
1603
+ * @fqn wix.forms.v4.FormSubmissionService.BulkMarkSubmissionsAsSeen
1604
+ */
1605
+ export async function bulkMarkSubmissionsAsSeen(ids, formId) {
1606
+ // @ts-ignore
1607
+ const { httpClient, sideEffects } = arguments[2];
1608
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1609
+ ids: ids,
1610
+ formId: formId,
1611
+ });
1612
+ const reqOpts = ambassadorWixFormsV4Submission.bulkMarkSubmissionsAsSeen(payload);
1613
+ sideEffects?.onSiteCall?.();
1614
+ try {
1615
+ const result = await httpClient.request(reqOpts);
1616
+ sideEffects?.onSuccess?.(result);
1617
+ }
1618
+ catch (err) {
1619
+ const transformedError = sdkTransformError(err, {
1620
+ spreadPathsToArguments: {},
1621
+ explicitPathsToArguments: { ids: '$[0]', formId: '$[1]' },
1622
+ singleArgumentUnchanged: false,
1623
+ }, ['ids', 'formId']);
1624
+ sideEffects?.onError?.(err);
1625
+ throw transformedError;
1626
+ }
1627
+ }
1628
+ /**
1629
+ * Gets submission as document which may include the document download url if the document is ready.
1630
+ * @param submissionId - Submission ID.
1631
+ * @public
1632
+ * @documentationMaturity preview
1633
+ * @requiredField submissionId
1634
+ * @permissionId WIX_FORMS.SUBMISSION_UPDATE_ANY
1635
+ * @permissionScope Manage Submissions
1636
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1637
+ * @applicableIdentity APP
1638
+ * @fqn wix.forms.v4.FormSubmissionService.GetSubmissionDownloadUrl
1639
+ */
1640
+ export async function getSubmissionDownloadUrl(submissionId) {
1641
+ // @ts-ignore
1642
+ const { httpClient, sideEffects } = arguments[1];
1643
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1644
+ submissionId: submissionId,
1645
+ });
1646
+ const reqOpts = ambassadorWixFormsV4Submission.getSubmissionDownloadUrl(payload);
1647
+ sideEffects?.onSiteCall?.();
1648
+ try {
1649
+ const result = await httpClient.request(reqOpts);
1650
+ sideEffects?.onSuccess?.(result);
1651
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1652
+ }
1653
+ catch (err) {
1654
+ const transformedError = sdkTransformError(err, {
1655
+ spreadPathsToArguments: {},
1656
+ explicitPathsToArguments: { submissionId: '$[0]' },
1657
+ singleArgumentUnchanged: false,
1658
+ }, ['submissionId']);
1659
+ sideEffects?.onError?.(err);
1660
+ throw transformedError;
1661
+ }
1662
+ }
1663
+ /**
1664
+ * Update Extended Fields of the Form
1665
+ * @param _id - ID of the entity to update.
1666
+ * @param namespace - Identifier for the app whose extended fields are being updated.
1667
+ * @public
1668
+ * @documentationMaturity preview
1669
+ * @requiredField _id
1670
+ * @requiredField namespace
1671
+ * @requiredField options
1672
+ * @requiredField options.namespaceData
1673
+ * @permissionId WIX_FORMS.SUBMISSION_UPDATE_ANY
1674
+ * @permissionScope Manage Submissions
1675
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1676
+ * @applicableIdentity APP
1677
+ * @fqn wix.forms.v4.FormSubmissionService.UpdateExtendedFields
1678
+ */
1679
+ export async function updateExtendedFields(_id, namespace, options) {
1680
+ // @ts-ignore
1681
+ const { httpClient, sideEffects } = arguments[3];
1682
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1683
+ id: _id,
1684
+ namespace: namespace,
1685
+ namespaceData: options?.namespaceData,
1686
+ });
1687
+ const reqOpts = ambassadorWixFormsV4Submission.updateExtendedFields(payload);
1688
+ sideEffects?.onSiteCall?.();
1689
+ try {
1690
+ const result = await httpClient.request(reqOpts);
1691
+ sideEffects?.onSuccess?.(result);
1692
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1693
+ }
1694
+ catch (err) {
1695
+ const transformedError = sdkTransformError(err, {
1696
+ spreadPathsToArguments: {},
1697
+ explicitPathsToArguments: {
1698
+ id: '$[0]',
1699
+ namespace: '$[1]',
1700
+ namespaceData: '$[2].namespaceData',
1701
+ },
1702
+ singleArgumentUnchanged: false,
1703
+ }, ['_id', 'namespace', 'options']);
1704
+ sideEffects?.onError?.(err);
1705
+ throw transformedError;
1706
+ }
1707
+ }
1708
+ /**
1709
+ * Bulk update tags on form submissions.
1710
+ * @param submissionIds - Submission IDs to update tags for.
1711
+ * @internal
1712
+ * @documentationMaturity preview
1713
+ * @requiredField submissionIds
1714
+ * @permissionId WIX_FORMS.SUBMISSION_UPDATE_ANY
1715
+ * @permissionScope Manage Submissions
1716
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1717
+ * @applicableIdentity APP
1718
+ * @fqn wix.forms.v4.FormSubmissionService.BulkUpdateFormSubmissionTags
1719
+ */
1720
+ export async function bulkUpdateFormSubmissionTags(submissionIds, options) {
1721
+ // @ts-ignore
1722
+ const { httpClient, sideEffects } = arguments[2];
1723
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1724
+ submissionIds: submissionIds,
1725
+ assignTags: options?.assignTags,
1726
+ unassignTags: options?.unassignTags,
1727
+ });
1728
+ const reqOpts = ambassadorWixFormsV4Submission.bulkUpdateFormSubmissionTags(payload);
1729
+ sideEffects?.onSiteCall?.();
1730
+ try {
1731
+ const result = await httpClient.request(reqOpts);
1732
+ sideEffects?.onSuccess?.(result);
1733
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1734
+ }
1735
+ catch (err) {
1736
+ const transformedError = sdkTransformError(err, {
1737
+ spreadPathsToArguments: {},
1738
+ explicitPathsToArguments: {
1739
+ submissionIds: '$[0]',
1740
+ assignTags: '$[1].assignTags',
1741
+ unassignTags: '$[1].unassignTags',
1742
+ },
1743
+ singleArgumentUnchanged: false,
1744
+ }, ['submissionIds', 'options']);
1745
+ sideEffects?.onError?.(err);
1746
+ throw transformedError;
1747
+ }
1748
+ }
1749
+ /**
1750
+ * Bulk update tags on form submissions by filter.
1751
+ * @param filter - Filter to select the submission to update
1752
+ * @internal
1753
+ * @documentationMaturity preview
1754
+ * @requiredField filter
1755
+ * @permissionId WIX_FORMS.SUBMISSION_UPDATE_ANY
1756
+ * @permissionScope Manage Submissions
1757
+ * @permissionScopeId SCOPE.DC-FORMS.MANAGE-SUBMISSIONS
1758
+ * @applicableIdentity APP
1759
+ * @fqn wix.forms.v4.FormSubmissionService.BulkUpdateFormSubmissionTagsByFilter
1760
+ */
1761
+ export async function bulkUpdateFormSubmissionTagsByFilter(filter, options) {
1762
+ // @ts-ignore
1763
+ const { httpClient, sideEffects } = arguments[2];
1764
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1765
+ filter: filter,
1766
+ assignTags: options?.assignTags,
1767
+ unassignTags: options?.unassignTags,
1768
+ });
1769
+ const reqOpts = ambassadorWixFormsV4Submission.bulkUpdateFormSubmissionTagsByFilter(payload);
1770
+ sideEffects?.onSiteCall?.();
1771
+ try {
1772
+ const result = await httpClient.request(reqOpts);
1773
+ sideEffects?.onSuccess?.(result);
1774
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1775
+ }
1776
+ catch (err) {
1777
+ const transformedError = sdkTransformError(err, {
1778
+ spreadPathsToArguments: {},
1779
+ explicitPathsToArguments: {
1780
+ filter: '$[0]',
1781
+ assignTags: '$[1].assignTags',
1782
+ unassignTags: '$[1].unassignTags',
1783
+ },
1784
+ singleArgumentUnchanged: false,
1785
+ }, ['filter', 'options']);
1786
+ sideEffects?.onError?.(err);
1787
+ throw transformedError;
1788
+ }
1789
+ }
1790
+ /**
1791
+ * Upserts contact from submission.
1792
+ * @param submissionId - Submission from which contact needs to be upserted.
1793
+ * @public
1794
+ * @documentationMaturity preview
1795
+ * @requiredField submissionId
1796
+ * @permissionId WIX_FORMS.SUBMISSION_CONTACT_UPSERT
1797
+ * @fqn wix.forms.v4.FormSubmissionContactUpsertService.UpsertContactFromSubmission
1798
+ */
1799
+ export async function upsertContactFromSubmission(submissionId, options) {
1800
+ // @ts-ignore
1801
+ const { httpClient, sideEffects } = arguments[2];
1802
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1803
+ submissionId: submissionId,
1804
+ contactId: options?.contactId,
1805
+ emailVerified: options?.emailVerified,
1806
+ });
1807
+ const reqOpts = ambassadorWixFormsV4Submission.upsertContactFromSubmission(payload);
1808
+ sideEffects?.onSiteCall?.();
1809
+ try {
1810
+ const result = await httpClient.request(reqOpts);
1811
+ sideEffects?.onSuccess?.(result);
1812
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1813
+ }
1814
+ catch (err) {
1815
+ const transformedError = sdkTransformError(err, {
1816
+ spreadPathsToArguments: {},
1817
+ explicitPathsToArguments: {
1818
+ submissionId: '$[0]',
1819
+ contactId: '$[1].contactId',
1820
+ emailVerified: '$[1].emailVerified',
1821
+ },
1822
+ singleArgumentUnchanged: false,
1823
+ }, ['submissionId', 'options']);
1824
+ sideEffects?.onError?.(err);
1825
+ throw transformedError;
1826
+ }
1827
+ }
1828
+ //# sourceMappingURL=forms-v4-submission-submissions.universal.js.map