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