@wix/forms 1.0.94 → 1.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1624 @@
1
+ /** Form submission that was created or retrieved. */
2
+ interface FormSubmission$3 {
3
+ /**
4
+ * Submission ID.
5
+ * @readonly
6
+ */
7
+ id?: string | null;
8
+ /** ID of the form which the submission belongs to. */
9
+ formId?: string;
10
+ /**
11
+ * The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace.
12
+ * @readonly
13
+ */
14
+ namespace?: string;
15
+ /**
16
+ * Status of the submission.
17
+ * - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
18
+ * - `PAYMENT_WAITING`: A form submission requiring payment is created.
19
+ * - `PAYMENT_CANCELED`: An order of a form submission is canceled.
20
+ * - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
21
+ */
22
+ status?: SubmissionStatus$3;
23
+ /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
24
+ submissions?: Record<string, any>;
25
+ /**
26
+ * Date and time the form submission was created.
27
+ * @readonly
28
+ */
29
+ createdDate?: Date;
30
+ /**
31
+ * Date and time the form submission was updated.
32
+ * @readonly
33
+ */
34
+ updatedDate?: Date;
35
+ /**
36
+ * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
37
+ * @readonly
38
+ */
39
+ revision?: string | null;
40
+ /**
41
+ * ID of the visitor that submitted the form.
42
+ * @readonly
43
+ */
44
+ submitter?: Submitter$3;
45
+ /** Whether a site owner marked a submission as "seen". */
46
+ seen?: boolean;
47
+ /** Data extension object that holds users' and apps' fields. */
48
+ extendedFields?: ExtendedFields$3;
49
+ /**
50
+ * Order details. <br>
51
+ * <b>Note</b>: This object is only applicable when submittng a form in the Wix Payments app.
52
+ */
53
+ orderDetails?: OrderDetails$3;
54
+ }
55
+ declare enum SubmissionStatus$3 {
56
+ UNDEFINED = "UNDEFINED",
57
+ PENDING = "PENDING",
58
+ CONFIRMED = "CONFIRMED",
59
+ PAYMENT_WAITING = "PAYMENT_WAITING",
60
+ PAYMENT_CANCELED = "PAYMENT_CANCELED"
61
+ }
62
+ interface Submitter$3 extends SubmitterSubmitterOneOf$3 {
63
+ /** Member ID. */
64
+ memberId?: string | null;
65
+ /** Visitor ID. */
66
+ visitorId?: string | null;
67
+ /** Application ID. */
68
+ applicationId?: string | null;
69
+ /** User ID. */
70
+ userId?: string | null;
71
+ }
72
+ /** @oneof */
73
+ interface SubmitterSubmitterOneOf$3 {
74
+ /** Member ID. */
75
+ memberId?: string | null;
76
+ /** Visitor ID. */
77
+ visitorId?: string | null;
78
+ /** Application ID. */
79
+ applicationId?: string | null;
80
+ /** User ID. */
81
+ userId?: string | null;
82
+ }
83
+ interface ExtendedFields$3 {
84
+ /**
85
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
86
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
87
+ *
88
+ * You can only access fields for which you have the appropriate permissions.
89
+ *
90
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
91
+ */
92
+ namespaces?: Record<string, Record<string, any>>;
93
+ }
94
+ interface OrderDetails$3 {
95
+ /**
96
+ * ID of the order related to submission (only applicable if a form has payments).
97
+ * @readonly
98
+ */
99
+ orderId?: string | null;
100
+ /**
101
+ * Order number.
102
+ * @readonly
103
+ */
104
+ number?: string | null;
105
+ /**
106
+ * Currency.
107
+ * @readonly
108
+ */
109
+ currency?: string | null;
110
+ /**
111
+ * Item subtotal.
112
+ * @readonly
113
+ */
114
+ itemSubtotal?: string;
115
+ /**
116
+ * ID of the checkout related to submission (only applicable if a form has payments).
117
+ * @readonly
118
+ */
119
+ checkoutId?: string;
120
+ }
121
+ interface CreateSubmissionRequest$1 {
122
+ /** Submission to create. */
123
+ submission: FormSubmission$3;
124
+ /** Captcha token. */
125
+ captchaToken?: string | null;
126
+ }
127
+ interface CreateSubmissionResponse$1 {
128
+ /** The created submission. */
129
+ submission?: FormSubmission$3;
130
+ }
131
+ interface ItemMetadata$1 {
132
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
133
+ id?: string | null;
134
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
135
+ originalIndex?: number;
136
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
137
+ success?: boolean;
138
+ /** Details about the error in case of failure. */
139
+ error?: ApplicationError$1;
140
+ }
141
+ interface ApplicationError$1 {
142
+ /** Error code. */
143
+ code?: string;
144
+ /** Description of the error. */
145
+ description?: string;
146
+ /** Data related to the error. */
147
+ data?: Record<string, any> | null;
148
+ }
149
+ interface BulkActionMetadata$1 {
150
+ /** Number of items that were successfully processed. */
151
+ totalSuccesses?: number;
152
+ /** Number of items that couldn't be processed. */
153
+ totalFailures?: number;
154
+ /** Number of failures without details because detailed failure threshold was exceeded. */
155
+ undetailedFailures?: number;
156
+ }
157
+ interface GetSubmissionRequest$1 {
158
+ /** ID of the submission to retrieve. */
159
+ submissionId: string;
160
+ }
161
+ interface GetSubmissionResponse$1 {
162
+ /** The retrieved submission. */
163
+ submission?: FormSubmission$3;
164
+ }
165
+ interface UpdateSubmissionRequest$1 {
166
+ /** Submission to update. */
167
+ submission: FormSubmission$3;
168
+ }
169
+ interface UpdateSubmissionResponse$1 {
170
+ /** The updated submission. */
171
+ submission?: FormSubmission$3;
172
+ }
173
+ interface ConfirmSubmissionRequest$1 {
174
+ /** Submission ID to confirm. */
175
+ submissionId: string;
176
+ }
177
+ interface ConfirmSubmissionResponse$1 {
178
+ /** The confirmed submission. */
179
+ submission?: FormSubmission$3;
180
+ }
181
+ interface DeleteSubmissionRequest$1 {
182
+ /** ID of the submission to delete. */
183
+ submissionId: string;
184
+ /**
185
+ * Delete submission bypassing trash-bin
186
+ * Default: false
187
+ */
188
+ permanent?: boolean;
189
+ /** Preserve files. */
190
+ preserveFiles?: boolean;
191
+ }
192
+ interface DeleteSubmissionResponse$1 {
193
+ }
194
+ interface BulkDeleteSubmissionRequest$1 {
195
+ /** Form ID. */
196
+ formId: string;
197
+ /** Submission ids. */
198
+ submissionIds?: string[];
199
+ /**
200
+ * Delete submission bypassing trash-bin
201
+ * Default: false
202
+ */
203
+ permanent?: boolean;
204
+ /** Preserve files. */
205
+ preserveFiles?: boolean;
206
+ }
207
+ interface BulkDeleteSubmissionResponse$1 {
208
+ /** Results of bulk submission delete */
209
+ results?: BulkDeleteSubmissionResult$1[];
210
+ /** Metadata of request */
211
+ bulkActionMetadata?: BulkActionMetadata$1;
212
+ }
213
+ interface BulkDeleteSubmissionResult$1 {
214
+ /** Deleted item metadata */
215
+ itemMetadata?: ItemMetadata$1;
216
+ }
217
+ interface RestoreSubmissionFromTrashBinRequest$1 {
218
+ /** ID of the submission to restore. */
219
+ submissionId: string;
220
+ }
221
+ interface RestoreSubmissionFromTrashBinResponse$1 {
222
+ /** The restored submission. */
223
+ submission?: FormSubmission$3;
224
+ }
225
+ interface RemoveSubmissionFromTrashBinRequest$1 {
226
+ /** ID of the submission to restore. */
227
+ submissionId: string;
228
+ }
229
+ interface RemoveSubmissionFromTrashBinResponse$1 {
230
+ }
231
+ interface BulkRemoveSubmissionFromTrashBinRequest$1 {
232
+ /** Form ID. */
233
+ formId: string;
234
+ /** Submission ids. */
235
+ submissionIds?: string[];
236
+ }
237
+ interface BulkRemoveSubmissionFromTrashBinResponse$1 {
238
+ /** Results of bulk submission removal from trash */
239
+ results?: BulkRemoveSubmissionFromTrashBinResult$1[];
240
+ /** Metadata of request */
241
+ bulkActionMetadata?: BulkActionMetadata$1;
242
+ }
243
+ interface BulkRemoveSubmissionFromTrashBinResult$1 {
244
+ /** Deleted item metadata */
245
+ itemMetadata?: ItemMetadata$1;
246
+ }
247
+ interface ListDeletedSubmissionsRequest$1 {
248
+ /** Form ID. */
249
+ formId: string;
250
+ /** Submission ids. */
251
+ submissionIds?: string[];
252
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not filter or `order`. */
253
+ paging?: CursorPaging$1;
254
+ /**
255
+ * List of statuses of submissions which should be returned
256
+ * Default: CONFIRMED
257
+ */
258
+ statuses?: SubmissionStatus$3[];
259
+ }
260
+ interface CursorPaging$1 {
261
+ /** Number of items to load. */
262
+ limit?: number | null;
263
+ /**
264
+ * Pointer to the next or previous page in the list of results.
265
+ *
266
+ * You can get the relevant cursor token
267
+ * from the `pagingMetadata` object in the previous call's response.
268
+ * Not relevant for the first request.
269
+ */
270
+ cursor?: string | null;
271
+ }
272
+ interface ListDeletedSubmissionsResponse$1 {
273
+ /** The retrieved Submissions. */
274
+ submissions?: FormSubmission$3[];
275
+ /** Paging metadata. */
276
+ pagingMetadata?: CursorPagingMetadata$1;
277
+ }
278
+ interface CursorPagingMetadata$1 {
279
+ /** Number of items returned in the response. */
280
+ count?: number | null;
281
+ /** Offset that was requested. */
282
+ cursors?: Cursors$1;
283
+ /**
284
+ * Indicates if there are more results after the current page.
285
+ * If `true`, another page of results can be retrieved.
286
+ * If `false`, this is the last page.
287
+ */
288
+ hasNext?: boolean | null;
289
+ }
290
+ interface Cursors$1 {
291
+ /** Cursor pointing to next page in the list of results. */
292
+ next?: string | null;
293
+ /** Cursor pointing to previous page in the list of results. */
294
+ prev?: string | null;
295
+ }
296
+ interface GetDeletedSubmissionRequest$1 {
297
+ /** Submission id. */
298
+ submissionId: string;
299
+ }
300
+ interface GetDeletedSubmissionResponse$1 {
301
+ /** The retrieved Submission. */
302
+ submission?: FormSubmission$3;
303
+ }
304
+ interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
305
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
306
+ cursorPaging?: CursorPaging$1;
307
+ /**
308
+ * Filter object in the following format:
309
+ * `"filter" : {
310
+ * "fieldName1": "value1",
311
+ * "fieldName2":{"$operator":"value2"}
312
+ * }`
313
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
314
+ */
315
+ filter?: Record<string, any> | null;
316
+ /**
317
+ * Sort object in the following format:
318
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
319
+ */
320
+ sort?: Sorting$1[];
321
+ }
322
+ /** @oneof */
323
+ interface CursorQueryPagingMethodOneOf$1 {
324
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
325
+ cursorPaging?: CursorPaging$1;
326
+ }
327
+ interface Sorting$1 {
328
+ /** Name of the field to sort by. */
329
+ fieldName?: string;
330
+ /** Sort order. */
331
+ order?: SortOrder$1;
332
+ }
333
+ declare enum SortOrder$1 {
334
+ ASC = "ASC",
335
+ DESC = "DESC"
336
+ }
337
+ interface QuerySubmissionsByNamespaceRequest$1 {
338
+ /** Query options. */
339
+ query: CursorQuery$1;
340
+ /** Whether to return only your own submissions. If `false`, returns all submissions based on query filters. */
341
+ onlyYourOwn?: boolean;
342
+ }
343
+ interface QuerySubmissionsByNamespaceResponse$1 {
344
+ /** The retrieved Submissions. */
345
+ submissions?: FormSubmission$3[];
346
+ /** Paging metadata. */
347
+ metadata?: CursorPagingMetadata$1;
348
+ }
349
+ interface FormSubmissionsCount$1 {
350
+ /** Form ID. */
351
+ formId?: string;
352
+ /** Total number of submissions. */
353
+ totalCount?: number;
354
+ /** Number of submissions that haven't yet been seen by site Extensions with manage submission permissions. */
355
+ unseenCount?: number;
356
+ }
357
+ interface CountSubmissionsRequest$1 {
358
+ /** Form IDs. */
359
+ formIds: string[];
360
+ /** 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. */
361
+ namespace: string;
362
+ /**
363
+ * List of statuses of submissions which should be taken into count
364
+ * Default: CONFIRMED, PAYMENT_WAITING, PAYMENT_CANCELED
365
+ */
366
+ statuses?: SubmissionStatus$3[];
367
+ }
368
+ interface CountSubmissionsResponse$1 {
369
+ /** Forms submission count. */
370
+ formsSubmissionsCount?: FormSubmissionsCount$1[];
371
+ }
372
+ interface CountDeletedSubmissionsRequest$1 {
373
+ /** Form IDs. */
374
+ formIds: string[];
375
+ /** 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. */
376
+ namespace: string;
377
+ /**
378
+ * List of statuses of submissions which should be taken into count
379
+ * Default: CONFIRMED, PAYMENT_WAITING, PAYMENT_CANCELED
380
+ */
381
+ statuses?: SubmissionStatus$3[];
382
+ }
383
+ interface CountDeletedSubmissionsResponse$1 {
384
+ /** Forms submission count. */
385
+ formsDeletedSubmissionsCount?: FormDeletedSubmissionsCount$1[];
386
+ }
387
+ interface FormDeletedSubmissionsCount$1 {
388
+ /** Form ID. */
389
+ formId?: string;
390
+ /** Total number of submissions. */
391
+ totalCount?: number;
392
+ }
393
+ interface GetMediaUploadURLRequest$1 {
394
+ /** Form ID. */
395
+ formId: string;
396
+ /** Name of file to upload. */
397
+ filename: string;
398
+ /**
399
+ * [Mime type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#) of file to upload.
400
+ *
401
+ * For example, `'image/png'`
402
+ */
403
+ mimeType: string;
404
+ }
405
+ interface GetMediaUploadURLResponse$1 {
406
+ /** Url to upload file. */
407
+ uploadUrl?: string;
408
+ }
409
+ interface BulkMarkSubmissionsAsSeenRequest$1 {
410
+ /** Submission IDs to mark as seen. */
411
+ ids: string[];
412
+ /** ID of the form which the submissions belongs to. */
413
+ formId: string;
414
+ }
415
+ interface BulkMarkSubmissionsAsSeenResponse$1 {
416
+ }
417
+ interface CreateSubmissionResponseNonNullableFields$1 {
418
+ submission?: {
419
+ formId: string;
420
+ namespace: string;
421
+ status: SubmissionStatus$3;
422
+ seen: boolean;
423
+ orderDetails?: {
424
+ itemSubtotal: string;
425
+ checkoutId: string;
426
+ };
427
+ };
428
+ }
429
+ interface GetSubmissionResponseNonNullableFields$1 {
430
+ submission?: {
431
+ formId: string;
432
+ namespace: string;
433
+ status: SubmissionStatus$3;
434
+ seen: boolean;
435
+ orderDetails?: {
436
+ itemSubtotal: string;
437
+ checkoutId: string;
438
+ };
439
+ };
440
+ }
441
+ interface UpdateSubmissionResponseNonNullableFields$1 {
442
+ submission?: {
443
+ formId: string;
444
+ namespace: string;
445
+ status: SubmissionStatus$3;
446
+ seen: boolean;
447
+ orderDetails?: {
448
+ itemSubtotal: string;
449
+ checkoutId: string;
450
+ };
451
+ };
452
+ }
453
+ interface ConfirmSubmissionResponseNonNullableFields$1 {
454
+ submission?: {
455
+ formId: string;
456
+ namespace: string;
457
+ status: SubmissionStatus$3;
458
+ seen: boolean;
459
+ orderDetails?: {
460
+ itemSubtotal: string;
461
+ checkoutId: string;
462
+ };
463
+ };
464
+ }
465
+ interface BulkDeleteSubmissionResponseNonNullableFields$1 {
466
+ results: {
467
+ itemMetadata?: {
468
+ originalIndex: number;
469
+ success: boolean;
470
+ error?: {
471
+ code: string;
472
+ description: string;
473
+ };
474
+ };
475
+ }[];
476
+ bulkActionMetadata?: {
477
+ totalSuccesses: number;
478
+ totalFailures: number;
479
+ undetailedFailures: number;
480
+ };
481
+ }
482
+ interface RestoreSubmissionFromTrashBinResponseNonNullableFields$1 {
483
+ submission?: {
484
+ formId: string;
485
+ namespace: string;
486
+ status: SubmissionStatus$3;
487
+ seen: boolean;
488
+ orderDetails?: {
489
+ itemSubtotal: string;
490
+ checkoutId: string;
491
+ };
492
+ };
493
+ }
494
+ interface BulkRemoveSubmissionFromTrashBinResponseNonNullableFields$1 {
495
+ results: {
496
+ itemMetadata?: {
497
+ originalIndex: number;
498
+ success: boolean;
499
+ error?: {
500
+ code: string;
501
+ description: string;
502
+ };
503
+ };
504
+ }[];
505
+ bulkActionMetadata?: {
506
+ totalSuccesses: number;
507
+ totalFailures: number;
508
+ undetailedFailures: number;
509
+ };
510
+ }
511
+ interface ListDeletedSubmissionsResponseNonNullableFields$1 {
512
+ submissions: {
513
+ formId: string;
514
+ namespace: string;
515
+ status: SubmissionStatus$3;
516
+ seen: boolean;
517
+ orderDetails?: {
518
+ itemSubtotal: string;
519
+ checkoutId: string;
520
+ };
521
+ }[];
522
+ }
523
+ interface GetDeletedSubmissionResponseNonNullableFields$1 {
524
+ submission?: {
525
+ formId: string;
526
+ namespace: string;
527
+ status: SubmissionStatus$3;
528
+ seen: boolean;
529
+ orderDetails?: {
530
+ itemSubtotal: string;
531
+ checkoutId: string;
532
+ };
533
+ };
534
+ }
535
+ interface QuerySubmissionsByNamespaceResponseNonNullableFields$1 {
536
+ submissions: {
537
+ formId: string;
538
+ namespace: string;
539
+ status: SubmissionStatus$3;
540
+ seen: boolean;
541
+ orderDetails?: {
542
+ itemSubtotal: string;
543
+ checkoutId: string;
544
+ };
545
+ }[];
546
+ }
547
+ interface CountSubmissionsResponseNonNullableFields$1 {
548
+ formsSubmissionsCount: {
549
+ formId: string;
550
+ totalCount: number;
551
+ unseenCount: number;
552
+ }[];
553
+ }
554
+ interface CountDeletedSubmissionsResponseNonNullableFields$1 {
555
+ formsDeletedSubmissionsCount: {
556
+ formId: string;
557
+ totalCount: number;
558
+ }[];
559
+ }
560
+ interface GetMediaUploadURLResponseNonNullableFields$1 {
561
+ uploadUrl: string;
562
+ generatedByMediaPlatform: boolean;
563
+ }
564
+
565
+ /** Form submission that was created or retrieved. */
566
+ interface FormSubmission$2 {
567
+ /**
568
+ * Submission ID.
569
+ * @readonly
570
+ */
571
+ _id?: string | null;
572
+ /** ID of the form which the submission belongs to. */
573
+ formId?: string;
574
+ /**
575
+ * The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace.
576
+ * @readonly
577
+ */
578
+ namespace?: string;
579
+ /**
580
+ * Status of the submission.
581
+ * - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
582
+ * - `PAYMENT_WAITING`: A form submission requiring payment is created.
583
+ * - `PAYMENT_CANCELED`: An order of a form submission is canceled.
584
+ * - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
585
+ */
586
+ status?: SubmissionStatus$2;
587
+ /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
588
+ submissions?: Record<string, any>;
589
+ /**
590
+ * Date and time the form submission was created.
591
+ * @readonly
592
+ */
593
+ _createdDate?: Date;
594
+ /**
595
+ * Date and time the form submission was updated.
596
+ * @readonly
597
+ */
598
+ _updatedDate?: Date;
599
+ /**
600
+ * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
601
+ * @readonly
602
+ */
603
+ revision?: string | null;
604
+ /**
605
+ * ID of the visitor that submitted the form.
606
+ * @readonly
607
+ */
608
+ submitter?: Submitter$2;
609
+ /** Whether a site owner marked a submission as "seen". */
610
+ seen?: boolean;
611
+ /** Data extension object that holds users' and apps' fields. */
612
+ extendedFields?: ExtendedFields$2;
613
+ /**
614
+ * Order details. <br>
615
+ * <b>Note</b>: This object is only applicable when submittng a form in the Wix Payments app.
616
+ */
617
+ orderDetails?: OrderDetails$2;
618
+ }
619
+ declare enum SubmissionStatus$2 {
620
+ UNDEFINED = "UNDEFINED",
621
+ PENDING = "PENDING",
622
+ CONFIRMED = "CONFIRMED",
623
+ PAYMENT_WAITING = "PAYMENT_WAITING",
624
+ PAYMENT_CANCELED = "PAYMENT_CANCELED"
625
+ }
626
+ interface Submitter$2 extends SubmitterSubmitterOneOf$2 {
627
+ /** Member ID. */
628
+ memberId?: string | null;
629
+ /** Visitor ID. */
630
+ visitorId?: string | null;
631
+ /** Application ID. */
632
+ applicationId?: string | null;
633
+ /** User ID. */
634
+ userId?: string | null;
635
+ }
636
+ /** @oneof */
637
+ interface SubmitterSubmitterOneOf$2 {
638
+ /** Member ID. */
639
+ memberId?: string | null;
640
+ /** Visitor ID. */
641
+ visitorId?: string | null;
642
+ /** Application ID. */
643
+ applicationId?: string | null;
644
+ /** User ID. */
645
+ userId?: string | null;
646
+ }
647
+ interface ExtendedFields$2 {
648
+ /**
649
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
650
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
651
+ *
652
+ * You can only access fields for which you have the appropriate permissions.
653
+ *
654
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
655
+ */
656
+ namespaces?: Record<string, Record<string, any>>;
657
+ }
658
+ interface OrderDetails$2 {
659
+ /**
660
+ * ID of the order related to submission (only applicable if a form has payments).
661
+ * @readonly
662
+ */
663
+ orderId?: string | null;
664
+ /**
665
+ * Order number.
666
+ * @readonly
667
+ */
668
+ number?: string | null;
669
+ /**
670
+ * Currency.
671
+ * @readonly
672
+ */
673
+ currency?: string | null;
674
+ /**
675
+ * Item subtotal.
676
+ * @readonly
677
+ */
678
+ itemSubtotal?: string;
679
+ /**
680
+ * ID of the checkout related to submission (only applicable if a form has payments).
681
+ * @readonly
682
+ */
683
+ checkoutId?: string;
684
+ }
685
+ interface CreateSubmissionRequest {
686
+ /** Submission to create. */
687
+ submission: FormSubmission$2;
688
+ /** Captcha token. */
689
+ captchaToken?: string | null;
690
+ }
691
+ interface CreateSubmissionResponse {
692
+ /** The created submission. */
693
+ submission?: FormSubmission$2;
694
+ }
695
+ interface ItemMetadata {
696
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
697
+ _id?: string | null;
698
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
699
+ originalIndex?: number;
700
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
701
+ success?: boolean;
702
+ /** Details about the error in case of failure. */
703
+ error?: ApplicationError;
704
+ }
705
+ interface ApplicationError {
706
+ /** Error code. */
707
+ code?: string;
708
+ /** Description of the error. */
709
+ description?: string;
710
+ /** Data related to the error. */
711
+ data?: Record<string, any> | null;
712
+ }
713
+ interface BulkActionMetadata {
714
+ /** Number of items that were successfully processed. */
715
+ totalSuccesses?: number;
716
+ /** Number of items that couldn't be processed. */
717
+ totalFailures?: number;
718
+ /** Number of failures without details because detailed failure threshold was exceeded. */
719
+ undetailedFailures?: number;
720
+ }
721
+ interface GetSubmissionRequest {
722
+ /** ID of the submission to retrieve. */
723
+ submissionId: string;
724
+ }
725
+ interface GetSubmissionResponse {
726
+ /** The retrieved submission. */
727
+ submission?: FormSubmission$2;
728
+ }
729
+ interface UpdateSubmissionRequest {
730
+ /** Submission to update. */
731
+ submission: FormSubmission$2;
732
+ }
733
+ interface UpdateSubmissionResponse {
734
+ /** The updated submission. */
735
+ submission?: FormSubmission$2;
736
+ }
737
+ interface ConfirmSubmissionRequest {
738
+ /** Submission ID to confirm. */
739
+ submissionId: string;
740
+ }
741
+ interface ConfirmSubmissionResponse {
742
+ /** The confirmed submission. */
743
+ submission?: FormSubmission$2;
744
+ }
745
+ interface DeleteSubmissionRequest {
746
+ /** ID of the submission to delete. */
747
+ submissionId: string;
748
+ /**
749
+ * Delete the submission, bypassing the trash bin. This means that the submission is permanently deleted and cannot be restored.
750
+ *
751
+ *
752
+ * Default: `false`
753
+ */
754
+ permanent?: boolean;
755
+ /** Preserve files. */
756
+ preserveFiles?: boolean;
757
+ }
758
+ interface DeleteSubmissionResponse {
759
+ }
760
+ interface BulkDeleteSubmissionRequest {
761
+ /** Form ID. */
762
+ formId: string;
763
+ /** Submission ids. */
764
+ submissionIds?: string[];
765
+ /**
766
+ * Delete submission bypassing trash-bin
767
+ * Default: false
768
+ */
769
+ permanent?: boolean;
770
+ /** Preserve files. */
771
+ preserveFiles?: boolean;
772
+ }
773
+ interface BulkDeleteSubmissionResponse {
774
+ /** Results of bulk submission delete */
775
+ results?: BulkDeleteSubmissionResult[];
776
+ /** Metadata of request */
777
+ bulkActionMetadata?: BulkActionMetadata;
778
+ }
779
+ interface BulkDeleteSubmissionResult {
780
+ /** Deleted item metadata */
781
+ itemMetadata?: ItemMetadata;
782
+ }
783
+ interface RestoreSubmissionFromTrashBinRequest {
784
+ /** ID of the submission to restore. */
785
+ submissionId: string;
786
+ }
787
+ interface RestoreSubmissionFromTrashBinResponse {
788
+ /** The restored submission. */
789
+ submission?: FormSubmission$2;
790
+ }
791
+ interface RemoveSubmissionFromTrashBinRequest {
792
+ /** ID of the submission to restore. */
793
+ submissionId: string;
794
+ }
795
+ interface RemoveSubmissionFromTrashBinResponse {
796
+ }
797
+ interface BulkRemoveSubmissionFromTrashBinRequest {
798
+ /** Form ID. */
799
+ formId: string;
800
+ /** Submission ids. */
801
+ submissionIds?: string[];
802
+ }
803
+ interface BulkRemoveSubmissionFromTrashBinResponse {
804
+ /** Results of bulk submission removal from trash */
805
+ results?: BulkRemoveSubmissionFromTrashBinResult[];
806
+ /** Metadata of request */
807
+ bulkActionMetadata?: BulkActionMetadata;
808
+ }
809
+ interface BulkRemoveSubmissionFromTrashBinResult {
810
+ /** Deleted item metadata */
811
+ itemMetadata?: ItemMetadata;
812
+ }
813
+ interface ListDeletedSubmissionsRequest {
814
+ /** Form ID. */
815
+ formId: string;
816
+ /** Submission ids. */
817
+ submissionIds?: string[];
818
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not filter or `order`. */
819
+ paging?: CursorPaging;
820
+ /**
821
+ * List of statuses of submissions which should be returned
822
+ * Default: CONFIRMED
823
+ */
824
+ statuses?: SubmissionStatus$2[];
825
+ }
826
+ interface CursorPaging {
827
+ /** Number of items to load. */
828
+ limit?: number | null;
829
+ /**
830
+ * Pointer to the next or previous page in the list of results.
831
+ *
832
+ * You can get the relevant cursor token
833
+ * from the `pagingMetadata` object in the previous call's response.
834
+ * Not relevant for the first request.
835
+ */
836
+ cursor?: string | null;
837
+ }
838
+ interface ListDeletedSubmissionsResponse {
839
+ /** The retrieved Submissions. */
840
+ submissions?: FormSubmission$2[];
841
+ /** Paging metadata. */
842
+ pagingMetadata?: CursorPagingMetadata;
843
+ }
844
+ interface CursorPagingMetadata {
845
+ /** Number of items returned in the response. */
846
+ count?: number | null;
847
+ /** Offset that was requested. */
848
+ cursors?: Cursors;
849
+ /**
850
+ * Indicates if there are more results after the current page.
851
+ * If `true`, another page of results can be retrieved.
852
+ * If `false`, this is the last page.
853
+ */
854
+ hasNext?: boolean | null;
855
+ }
856
+ interface Cursors {
857
+ /** Cursor pointing to next page in the list of results. */
858
+ next?: string | null;
859
+ /** Cursor pointing to previous page in the list of results. */
860
+ prev?: string | null;
861
+ }
862
+ interface GetDeletedSubmissionRequest {
863
+ /** Submission id. */
864
+ submissionId: string;
865
+ }
866
+ interface GetDeletedSubmissionResponse {
867
+ /** The retrieved Submission. */
868
+ submission?: FormSubmission$2;
869
+ }
870
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
871
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
872
+ cursorPaging?: CursorPaging;
873
+ /**
874
+ * Filter object in the following format:
875
+ * `"filter" : {
876
+ * "fieldName1": "value1",
877
+ * "fieldName2":{"$operator":"value2"}
878
+ * }`
879
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
880
+ */
881
+ filter?: Record<string, any> | null;
882
+ /**
883
+ * Sort object in the following format:
884
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
885
+ */
886
+ sort?: Sorting[];
887
+ }
888
+ /** @oneof */
889
+ interface CursorQueryPagingMethodOneOf {
890
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
891
+ cursorPaging?: CursorPaging;
892
+ }
893
+ interface Sorting {
894
+ /** Name of the field to sort by. */
895
+ fieldName?: string;
896
+ /** Sort order. */
897
+ order?: SortOrder;
898
+ }
899
+ declare enum SortOrder {
900
+ ASC = "ASC",
901
+ DESC = "DESC"
902
+ }
903
+ interface QuerySubmissionsByNamespaceRequest {
904
+ /** Query options. */
905
+ query: CursorQuery;
906
+ /** Whether to return only your own submissions. If `false`, returns all submissions based on query filters. */
907
+ onlyYourOwn?: boolean;
908
+ }
909
+ interface QuerySubmissionsByNamespaceResponse {
910
+ /** The retrieved Submissions. */
911
+ submissions?: FormSubmission$2[];
912
+ /** Paging metadata. */
913
+ metadata?: CursorPagingMetadata;
914
+ }
915
+ interface FormSubmissionsCount {
916
+ /** Form ID. */
917
+ formId?: string;
918
+ /** Total number of submissions. */
919
+ totalCount?: number;
920
+ /** Number of submissions that the site owner hasn't seen yet. */
921
+ unseenCount?: number;
922
+ }
923
+ interface CountSubmissionsRequest {
924
+ /** Form IDs which submissions should be counted. */
925
+ formIds: string[];
926
+ /** 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. */
927
+ namespace: string;
928
+ /**
929
+ * Status of the submission.
930
+ * - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
931
+ * - `PAYMENT_WAITING`: A form submission requiring payment is created.
932
+ * - `PAYMENT_CANCELED`: An order of a form submission is canceled.
933
+ * - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
934
+ */
935
+ statuses?: SubmissionStatus$2[];
936
+ }
937
+ interface CountSubmissionsResponse {
938
+ /** Forms submission count. */
939
+ formsSubmissionsCount?: FormSubmissionsCount[];
940
+ }
941
+ interface CountDeletedSubmissionsRequest {
942
+ /** Form IDs. */
943
+ formIds: string[];
944
+ /** 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. */
945
+ namespace: string;
946
+ /**
947
+ * List of statuses of submissions which should be taken into count
948
+ * Default: CONFIRMED, PAYMENT_WAITING, PAYMENT_CANCELED
949
+ */
950
+ statuses?: SubmissionStatus$2[];
951
+ }
952
+ interface CountDeletedSubmissionsResponse {
953
+ /** Forms submission count. */
954
+ formsDeletedSubmissionsCount?: FormDeletedSubmissionsCount[];
955
+ }
956
+ interface FormDeletedSubmissionsCount {
957
+ /** Form ID. */
958
+ formId?: string;
959
+ /** Total number of submissions. */
960
+ totalCount?: number;
961
+ }
962
+ interface GetMediaUploadURLRequest {
963
+ /** Form ID. */
964
+ formId: string;
965
+ /** Name of file to upload. */
966
+ filename: string;
967
+ /**
968
+ * [Mime type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#) of file to upload.
969
+ *
970
+ * For example, `'image/png'`
971
+ */
972
+ mimeType: string;
973
+ }
974
+ interface GetMediaUploadURLResponse {
975
+ /** Url to upload file. */
976
+ uploadUrl?: string;
977
+ }
978
+ interface BulkMarkSubmissionsAsSeenRequest {
979
+ /** Submission IDs to mark as seen. */
980
+ ids: string[];
981
+ /** ID of the form which the submissions belong to. */
982
+ formId: string;
983
+ }
984
+ interface BulkMarkSubmissionsAsSeenResponse {
985
+ }
986
+ interface CreateSubmissionResponseNonNullableFields {
987
+ submission?: {
988
+ formId: string;
989
+ namespace: string;
990
+ status: SubmissionStatus$2;
991
+ seen: boolean;
992
+ orderDetails?: {
993
+ itemSubtotal: string;
994
+ checkoutId: string;
995
+ };
996
+ };
997
+ }
998
+ interface GetSubmissionResponseNonNullableFields {
999
+ submission?: {
1000
+ formId: string;
1001
+ namespace: string;
1002
+ status: SubmissionStatus$2;
1003
+ seen: boolean;
1004
+ orderDetails?: {
1005
+ itemSubtotal: string;
1006
+ checkoutId: string;
1007
+ };
1008
+ };
1009
+ }
1010
+ interface UpdateSubmissionResponseNonNullableFields {
1011
+ submission?: {
1012
+ formId: string;
1013
+ namespace: string;
1014
+ status: SubmissionStatus$2;
1015
+ seen: boolean;
1016
+ orderDetails?: {
1017
+ itemSubtotal: string;
1018
+ checkoutId: string;
1019
+ };
1020
+ };
1021
+ }
1022
+ interface ConfirmSubmissionResponseNonNullableFields {
1023
+ submission?: {
1024
+ formId: string;
1025
+ namespace: string;
1026
+ status: SubmissionStatus$2;
1027
+ seen: boolean;
1028
+ orderDetails?: {
1029
+ itemSubtotal: string;
1030
+ checkoutId: string;
1031
+ };
1032
+ };
1033
+ }
1034
+ interface BulkDeleteSubmissionResponseNonNullableFields {
1035
+ results: {
1036
+ itemMetadata?: {
1037
+ originalIndex: number;
1038
+ success: boolean;
1039
+ error?: {
1040
+ code: string;
1041
+ description: string;
1042
+ };
1043
+ };
1044
+ }[];
1045
+ bulkActionMetadata?: {
1046
+ totalSuccesses: number;
1047
+ totalFailures: number;
1048
+ undetailedFailures: number;
1049
+ };
1050
+ }
1051
+ interface RestoreSubmissionFromTrashBinResponseNonNullableFields {
1052
+ submission?: {
1053
+ formId: string;
1054
+ namespace: string;
1055
+ status: SubmissionStatus$2;
1056
+ seen: boolean;
1057
+ orderDetails?: {
1058
+ itemSubtotal: string;
1059
+ checkoutId: string;
1060
+ };
1061
+ };
1062
+ }
1063
+ interface BulkRemoveSubmissionFromTrashBinResponseNonNullableFields {
1064
+ results: {
1065
+ itemMetadata?: {
1066
+ originalIndex: number;
1067
+ success: boolean;
1068
+ error?: {
1069
+ code: string;
1070
+ description: string;
1071
+ };
1072
+ };
1073
+ }[];
1074
+ bulkActionMetadata?: {
1075
+ totalSuccesses: number;
1076
+ totalFailures: number;
1077
+ undetailedFailures: number;
1078
+ };
1079
+ }
1080
+ interface ListDeletedSubmissionsResponseNonNullableFields {
1081
+ submissions: {
1082
+ formId: string;
1083
+ namespace: string;
1084
+ status: SubmissionStatus$2;
1085
+ seen: boolean;
1086
+ orderDetails?: {
1087
+ itemSubtotal: string;
1088
+ checkoutId: string;
1089
+ };
1090
+ }[];
1091
+ }
1092
+ interface GetDeletedSubmissionResponseNonNullableFields {
1093
+ submission?: {
1094
+ formId: string;
1095
+ namespace: string;
1096
+ status: SubmissionStatus$2;
1097
+ seen: boolean;
1098
+ orderDetails?: {
1099
+ itemSubtotal: string;
1100
+ checkoutId: string;
1101
+ };
1102
+ };
1103
+ }
1104
+ interface QuerySubmissionsByNamespaceResponseNonNullableFields {
1105
+ submissions: {
1106
+ formId: string;
1107
+ namespace: string;
1108
+ status: SubmissionStatus$2;
1109
+ seen: boolean;
1110
+ orderDetails?: {
1111
+ itemSubtotal: string;
1112
+ checkoutId: string;
1113
+ };
1114
+ }[];
1115
+ }
1116
+ interface CountSubmissionsResponseNonNullableFields {
1117
+ formsSubmissionsCount: {
1118
+ formId: string;
1119
+ totalCount: number;
1120
+ unseenCount: number;
1121
+ }[];
1122
+ }
1123
+ interface CountDeletedSubmissionsResponseNonNullableFields {
1124
+ formsDeletedSubmissionsCount: {
1125
+ formId: string;
1126
+ totalCount: number;
1127
+ }[];
1128
+ }
1129
+ interface GetMediaUploadURLResponseNonNullableFields {
1130
+ uploadUrl: string;
1131
+ }
1132
+
1133
+ type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1134
+ getUrl: (context: any) => string;
1135
+ httpMethod: K;
1136
+ path: string;
1137
+ pathParams: M;
1138
+ __requestType: T;
1139
+ __originalRequestType: S;
1140
+ __responseType: Q;
1141
+ __originalResponseType: R;
1142
+ };
1143
+ declare function createSubmission(): __PublicMethodMetaInfo$1<'POST', {}, CreateSubmissionRequest, CreateSubmissionRequest$1, CreateSubmissionResponse & CreateSubmissionResponseNonNullableFields, CreateSubmissionResponse$1 & CreateSubmissionResponseNonNullableFields$1>;
1144
+ declare function getSubmission(): __PublicMethodMetaInfo$1<'GET', {
1145
+ submissionId: string;
1146
+ }, GetSubmissionRequest, GetSubmissionRequest$1, GetSubmissionResponse & GetSubmissionResponseNonNullableFields, GetSubmissionResponse$1 & GetSubmissionResponseNonNullableFields$1>;
1147
+ declare function updateSubmission(): __PublicMethodMetaInfo$1<'PATCH', {
1148
+ submissionId: string;
1149
+ }, UpdateSubmissionRequest, UpdateSubmissionRequest$1, UpdateSubmissionResponse & UpdateSubmissionResponseNonNullableFields, UpdateSubmissionResponse$1 & UpdateSubmissionResponseNonNullableFields$1>;
1150
+ declare function confirmSubmission(): __PublicMethodMetaInfo$1<'POST', {
1151
+ submissionId: string;
1152
+ }, ConfirmSubmissionRequest, ConfirmSubmissionRequest$1, ConfirmSubmissionResponse & ConfirmSubmissionResponseNonNullableFields, ConfirmSubmissionResponse$1 & ConfirmSubmissionResponseNonNullableFields$1>;
1153
+ declare function deleteSubmission(): __PublicMethodMetaInfo$1<'DELETE', {
1154
+ submissionId: string;
1155
+ }, DeleteSubmissionRequest, DeleteSubmissionRequest$1, DeleteSubmissionResponse, DeleteSubmissionResponse$1>;
1156
+ declare function bulkDeleteSubmission(): __PublicMethodMetaInfo$1<'POST', {}, BulkDeleteSubmissionRequest, BulkDeleteSubmissionRequest$1, BulkDeleteSubmissionResponse & BulkDeleteSubmissionResponseNonNullableFields, BulkDeleteSubmissionResponse$1 & BulkDeleteSubmissionResponseNonNullableFields$1>;
1157
+ declare function restoreSubmissionFromTrashBin(): __PublicMethodMetaInfo$1<'POST', {
1158
+ submissionId: string;
1159
+ }, RestoreSubmissionFromTrashBinRequest, RestoreSubmissionFromTrashBinRequest$1, RestoreSubmissionFromTrashBinResponse & RestoreSubmissionFromTrashBinResponseNonNullableFields, RestoreSubmissionFromTrashBinResponse$1 & RestoreSubmissionFromTrashBinResponseNonNullableFields$1>;
1160
+ declare function removeSubmissionFromTrashBin(): __PublicMethodMetaInfo$1<'DELETE', {
1161
+ submissionId: string;
1162
+ }, RemoveSubmissionFromTrashBinRequest, RemoveSubmissionFromTrashBinRequest$1, RemoveSubmissionFromTrashBinResponse, RemoveSubmissionFromTrashBinResponse$1>;
1163
+ declare function bulkRemoveSubmissionFromTrashBin(): __PublicMethodMetaInfo$1<'POST', {}, BulkRemoveSubmissionFromTrashBinRequest, BulkRemoveSubmissionFromTrashBinRequest$1, BulkRemoveSubmissionFromTrashBinResponse & BulkRemoveSubmissionFromTrashBinResponseNonNullableFields, BulkRemoveSubmissionFromTrashBinResponse$1 & BulkRemoveSubmissionFromTrashBinResponseNonNullableFields$1>;
1164
+ declare function listDeletedSubmissions(): __PublicMethodMetaInfo$1<'GET', {}, ListDeletedSubmissionsRequest, ListDeletedSubmissionsRequest$1, ListDeletedSubmissionsResponse & ListDeletedSubmissionsResponseNonNullableFields, ListDeletedSubmissionsResponse$1 & ListDeletedSubmissionsResponseNonNullableFields$1>;
1165
+ declare function getDeletedSubmission(): __PublicMethodMetaInfo$1<'GET', {
1166
+ submissionId: string;
1167
+ }, GetDeletedSubmissionRequest, GetDeletedSubmissionRequest$1, GetDeletedSubmissionResponse & GetDeletedSubmissionResponseNonNullableFields, GetDeletedSubmissionResponse$1 & GetDeletedSubmissionResponseNonNullableFields$1>;
1168
+ declare function querySubmissionsByNamespace(): __PublicMethodMetaInfo$1<'POST', {}, QuerySubmissionsByNamespaceRequest, QuerySubmissionsByNamespaceRequest$1, QuerySubmissionsByNamespaceResponse & QuerySubmissionsByNamespaceResponseNonNullableFields, QuerySubmissionsByNamespaceResponse$1 & QuerySubmissionsByNamespaceResponseNonNullableFields$1>;
1169
+ declare function countSubmissions(): __PublicMethodMetaInfo$1<'POST', {}, CountSubmissionsRequest, CountSubmissionsRequest$1, CountSubmissionsResponse & CountSubmissionsResponseNonNullableFields, CountSubmissionsResponse$1 & CountSubmissionsResponseNonNullableFields$1>;
1170
+ declare function countDeletedSubmissions(): __PublicMethodMetaInfo$1<'POST', {}, CountDeletedSubmissionsRequest, CountDeletedSubmissionsRequest$1, CountDeletedSubmissionsResponse & CountDeletedSubmissionsResponseNonNullableFields, CountDeletedSubmissionsResponse$1 & CountDeletedSubmissionsResponseNonNullableFields$1>;
1171
+ declare function getMediaUploadUrl(): __PublicMethodMetaInfo$1<'POST', {}, GetMediaUploadURLRequest, GetMediaUploadURLRequest$1, GetMediaUploadURLResponse & GetMediaUploadURLResponseNonNullableFields, GetMediaUploadURLResponse$1 & GetMediaUploadURLResponseNonNullableFields$1>;
1172
+ declare function bulkMarkSubmissionsAsSeen(): __PublicMethodMetaInfo$1<'POST', {}, BulkMarkSubmissionsAsSeenRequest, BulkMarkSubmissionsAsSeenRequest$1, BulkMarkSubmissionsAsSeenResponse, BulkMarkSubmissionsAsSeenResponse$1>;
1173
+
1174
+ declare const meta$1_bulkDeleteSubmission: typeof bulkDeleteSubmission;
1175
+ declare const meta$1_bulkMarkSubmissionsAsSeen: typeof bulkMarkSubmissionsAsSeen;
1176
+ declare const meta$1_bulkRemoveSubmissionFromTrashBin: typeof bulkRemoveSubmissionFromTrashBin;
1177
+ declare const meta$1_confirmSubmission: typeof confirmSubmission;
1178
+ declare const meta$1_countDeletedSubmissions: typeof countDeletedSubmissions;
1179
+ declare const meta$1_countSubmissions: typeof countSubmissions;
1180
+ declare const meta$1_createSubmission: typeof createSubmission;
1181
+ declare const meta$1_deleteSubmission: typeof deleteSubmission;
1182
+ declare const meta$1_getDeletedSubmission: typeof getDeletedSubmission;
1183
+ declare const meta$1_getMediaUploadUrl: typeof getMediaUploadUrl;
1184
+ declare const meta$1_getSubmission: typeof getSubmission;
1185
+ declare const meta$1_listDeletedSubmissions: typeof listDeletedSubmissions;
1186
+ declare const meta$1_querySubmissionsByNamespace: typeof querySubmissionsByNamespace;
1187
+ declare const meta$1_removeSubmissionFromTrashBin: typeof removeSubmissionFromTrashBin;
1188
+ declare const meta$1_restoreSubmissionFromTrashBin: typeof restoreSubmissionFromTrashBin;
1189
+ declare const meta$1_updateSubmission: typeof updateSubmission;
1190
+ declare namespace meta$1 {
1191
+ export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_bulkDeleteSubmission as bulkDeleteSubmission, meta$1_bulkMarkSubmissionsAsSeen as bulkMarkSubmissionsAsSeen, meta$1_bulkRemoveSubmissionFromTrashBin as bulkRemoveSubmissionFromTrashBin, meta$1_confirmSubmission as confirmSubmission, meta$1_countDeletedSubmissions as countDeletedSubmissions, meta$1_countSubmissions as countSubmissions, meta$1_createSubmission as createSubmission, meta$1_deleteSubmission as deleteSubmission, meta$1_getDeletedSubmission as getDeletedSubmission, meta$1_getMediaUploadUrl as getMediaUploadUrl, meta$1_getSubmission as getSubmission, meta$1_listDeletedSubmissions as listDeletedSubmissions, meta$1_querySubmissionsByNamespace as querySubmissionsByNamespace, meta$1_removeSubmissionFromTrashBin as removeSubmissionFromTrashBin, meta$1_restoreSubmissionFromTrashBin as restoreSubmissionFromTrashBin, meta$1_updateSubmission as updateSubmission };
1192
+ }
1193
+
1194
+ interface ValidateSubmissionRequest$1 extends ValidateSubmissionRequestActionsOneOf$1 {
1195
+ /** Data for updating an existing submission. */
1196
+ updateOptions?: UpdateOptions$1;
1197
+ /** Submission to validate. */
1198
+ submission: FormSubmission$1;
1199
+ /** Whether to create or update the submission. */
1200
+ actionType: ActionType$1;
1201
+ }
1202
+ /** @oneof */
1203
+ interface ValidateSubmissionRequestActionsOneOf$1 {
1204
+ /** Data for updating an existing submission. */
1205
+ updateOptions?: UpdateOptions$1;
1206
+ }
1207
+ /** Form submission that was created or retrieved. */
1208
+ interface FormSubmission$1 {
1209
+ /**
1210
+ * Submission ID.
1211
+ * @readonly
1212
+ */
1213
+ id?: string | null;
1214
+ /** ID of the form which the submission belongs to. */
1215
+ formId?: string;
1216
+ /**
1217
+ * The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace.
1218
+ * @readonly
1219
+ */
1220
+ namespace?: string;
1221
+ /**
1222
+ * Status of the submission.
1223
+ * - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
1224
+ * - `PAYMENT_WAITING`: A form submission requiring payment is created.
1225
+ * - `PAYMENT_CANCELED`: An order of a form submission is canceled.
1226
+ * - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
1227
+ */
1228
+ status?: SubmissionStatus$1;
1229
+ /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
1230
+ submissions?: Record<string, any>;
1231
+ /**
1232
+ * Date and time the form submission was created.
1233
+ * @readonly
1234
+ */
1235
+ createdDate?: Date;
1236
+ /**
1237
+ * Date and time the form submission was updated.
1238
+ * @readonly
1239
+ */
1240
+ updatedDate?: Date;
1241
+ /**
1242
+ * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
1243
+ * @readonly
1244
+ */
1245
+ revision?: string | null;
1246
+ /**
1247
+ * ID of the visitor that submitted the form.
1248
+ * @readonly
1249
+ */
1250
+ submitter?: Submitter$1;
1251
+ /** Whether a site owner marked a submission as "seen". */
1252
+ seen?: boolean;
1253
+ /** Data extension object that holds users' and apps' fields. */
1254
+ extendedFields?: ExtendedFields$1;
1255
+ /**
1256
+ * Order details. <br>
1257
+ * <b>Note</b>: This object is only applicable when submittng a form in the Wix Payments app.
1258
+ */
1259
+ orderDetails?: OrderDetails$1;
1260
+ }
1261
+ declare enum SubmissionStatus$1 {
1262
+ UNDEFINED = "UNDEFINED",
1263
+ PENDING = "PENDING",
1264
+ CONFIRMED = "CONFIRMED",
1265
+ PAYMENT_WAITING = "PAYMENT_WAITING",
1266
+ PAYMENT_CANCELED = "PAYMENT_CANCELED"
1267
+ }
1268
+ interface Submitter$1 extends SubmitterSubmitterOneOf$1 {
1269
+ /** Member ID. */
1270
+ memberId?: string | null;
1271
+ /** Visitor ID. */
1272
+ visitorId?: string | null;
1273
+ /** Application ID. */
1274
+ applicationId?: string | null;
1275
+ /** User ID. */
1276
+ userId?: string | null;
1277
+ }
1278
+ /** @oneof */
1279
+ interface SubmitterSubmitterOneOf$1 {
1280
+ /** Member ID. */
1281
+ memberId?: string | null;
1282
+ /** Visitor ID. */
1283
+ visitorId?: string | null;
1284
+ /** Application ID. */
1285
+ applicationId?: string | null;
1286
+ /** User ID. */
1287
+ userId?: string | null;
1288
+ }
1289
+ interface ExtendedFields$1 {
1290
+ /**
1291
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
1292
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
1293
+ *
1294
+ * You can only access fields for which you have the appropriate permissions.
1295
+ *
1296
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
1297
+ */
1298
+ namespaces?: Record<string, Record<string, any>>;
1299
+ }
1300
+ interface OrderDetails$1 {
1301
+ /**
1302
+ * ID of the order related to submission (only applicable if a form has payments).
1303
+ * @readonly
1304
+ */
1305
+ orderId?: string | null;
1306
+ /**
1307
+ * Order number.
1308
+ * @readonly
1309
+ */
1310
+ number?: string | null;
1311
+ /**
1312
+ * Currency.
1313
+ * @readonly
1314
+ */
1315
+ currency?: string | null;
1316
+ /**
1317
+ * Item subtotal.
1318
+ * @readonly
1319
+ */
1320
+ itemSubtotal?: string;
1321
+ /**
1322
+ * ID of the checkout related to submission (only applicable if a form has payments).
1323
+ * @readonly
1324
+ */
1325
+ checkoutId?: string;
1326
+ }
1327
+ declare enum ActionType$1 {
1328
+ UNKNOWN_ACTION = "UNKNOWN_ACTION",
1329
+ UPDATE = "UPDATE",
1330
+ CREATE = "CREATE"
1331
+ }
1332
+ interface UpdateOptions$1 {
1333
+ /** Submission to update. */
1334
+ currentSubmission?: FormSubmission$1;
1335
+ }
1336
+ interface ValidateSubmissionResponse$1 {
1337
+ /**
1338
+ * List of validation errors. <br>
1339
+ * If there are no validation errors, returns an empty array.
1340
+ */
1341
+ errors?: SubmissionValidationError$1[];
1342
+ }
1343
+ interface SubmissionValidationError$1 extends SubmissionValidationErrorErrorMessageOneOf$1 {
1344
+ /** Predefined error type. */
1345
+ errorType?: SubmissionErrorType$1;
1346
+ /** Custom error message. The message is displayed instead of an error type. */
1347
+ customErrorMessage?: string;
1348
+ /** Path indicating the source of the error, such as `form.fields.target`. */
1349
+ errorPath?: string;
1350
+ /** Additional error parameters. */
1351
+ params?: Record<string, any> | null;
1352
+ }
1353
+ /** @oneof */
1354
+ interface SubmissionValidationErrorErrorMessageOneOf$1 {
1355
+ /** Predefined error type. */
1356
+ errorType?: SubmissionErrorType$1;
1357
+ /** Custom error message. The message is displayed instead of an error type. */
1358
+ customErrorMessage?: string;
1359
+ }
1360
+ declare enum SubmissionErrorType$1 {
1361
+ /** Error is unknown or not suitable for any of options bellow */
1362
+ UNKNOWN_ERROR = "UNKNOWN_ERROR",
1363
+ /** Type of submitted value is incorrect */
1364
+ TYPE_ERROR = "TYPE_ERROR",
1365
+ /** Value is required to be provided */
1366
+ REQUIRED_VALUE_ERROR = "REQUIRED_VALUE_ERROR",
1367
+ /** Value contains additional properties not expected in schema */
1368
+ UNKNOWN_VALUE_ERROR = "UNKNOWN_VALUE_ERROR",
1369
+ /** Text value exceeds max length */
1370
+ MAX_LENGTH_ERROR = "MAX_LENGTH_ERROR",
1371
+ /** Text value not reaches min length */
1372
+ MIN_LENGTH_ERROR = "MIN_LENGTH_ERROR",
1373
+ /** Text value not applicable for expected pattern */
1374
+ PATTERN_ERROR = "PATTERN_ERROR",
1375
+ /** Text value not applicable for expected format */
1376
+ FORMAT_ERROR = "FORMAT_ERROR",
1377
+ /** Number value is too big */
1378
+ MAX_VALUE_ERROR = "MAX_VALUE_ERROR",
1379
+ /** Number value is too small */
1380
+ MIN_VALUE_ERROR = "MIN_VALUE_ERROR",
1381
+ /** Number value is not multiple of expected number */
1382
+ MULTIPLE_OF_VALUE_ERROR = "MULTIPLE_OF_VALUE_ERROR",
1383
+ /** Array value has too much items */
1384
+ MIN_ITEMS_ERROR = "MIN_ITEMS_ERROR",
1385
+ /** Array value has not enough items */
1386
+ MAX_ITEMS_ERROR = "MAX_ITEMS_ERROR",
1387
+ /** Value is not in list of allowed values */
1388
+ NOT_ALLOWED_VALUE_ERROR = "NOT_ALLOWED_VALUE_ERROR",
1389
+ /** Submitted form is disabled */
1390
+ DISABLED_FORM_ERROR = "DISABLED_FORM_ERROR"
1391
+ }
1392
+ interface ValidateSubmissionResponseNonNullableFields$1 {
1393
+ errors: {
1394
+ errorType: SubmissionErrorType$1;
1395
+ customErrorMessage: string;
1396
+ errorPath: string;
1397
+ }[];
1398
+ }
1399
+
1400
+ interface ValidateSubmissionRequest extends ValidateSubmissionRequestActionsOneOf {
1401
+ /** Data for updating an existing submission. */
1402
+ updateOptions?: UpdateOptions;
1403
+ /** Submission to validate. */
1404
+ submission: FormSubmission;
1405
+ /** Whether to create or update the submission. */
1406
+ actionType: ActionType;
1407
+ }
1408
+ /** @oneof */
1409
+ interface ValidateSubmissionRequestActionsOneOf {
1410
+ /** Data for updating an existing submission. */
1411
+ updateOptions?: UpdateOptions;
1412
+ }
1413
+ /** Form submission that was created or retrieved. */
1414
+ interface FormSubmission {
1415
+ /**
1416
+ * Submission ID.
1417
+ * @readonly
1418
+ */
1419
+ _id?: string | null;
1420
+ /** ID of the form which the submission belongs to. */
1421
+ formId?: string;
1422
+ /**
1423
+ * The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace.
1424
+ * @readonly
1425
+ */
1426
+ namespace?: string;
1427
+ /**
1428
+ * Status of the submission.
1429
+ * - `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.
1430
+ * - `PAYMENT_WAITING`: A form submission requiring payment is created.
1431
+ * - `PAYMENT_CANCELED`: An order of a form submission is canceled.
1432
+ * - `CONFIRMED`: A submission is recorded in the Wix Forms collection.
1433
+ */
1434
+ status?: SubmissionStatus;
1435
+ /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
1436
+ submissions?: Record<string, any>;
1437
+ /**
1438
+ * Date and time the form submission was created.
1439
+ * @readonly
1440
+ */
1441
+ _createdDate?: Date;
1442
+ /**
1443
+ * Date and time the form submission was updated.
1444
+ * @readonly
1445
+ */
1446
+ _updatedDate?: Date;
1447
+ /**
1448
+ * Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.
1449
+ * @readonly
1450
+ */
1451
+ revision?: string | null;
1452
+ /**
1453
+ * ID of the visitor that submitted the form.
1454
+ * @readonly
1455
+ */
1456
+ submitter?: Submitter;
1457
+ /** Whether a site owner marked a submission as "seen". */
1458
+ seen?: boolean;
1459
+ /** Data extension object that holds users' and apps' fields. */
1460
+ extendedFields?: ExtendedFields;
1461
+ /**
1462
+ * Order details. <br>
1463
+ * <b>Note</b>: This object is only applicable when submittng a form in the Wix Payments app.
1464
+ */
1465
+ orderDetails?: OrderDetails;
1466
+ }
1467
+ declare enum SubmissionStatus {
1468
+ UNDEFINED = "UNDEFINED",
1469
+ PENDING = "PENDING",
1470
+ CONFIRMED = "CONFIRMED",
1471
+ PAYMENT_WAITING = "PAYMENT_WAITING",
1472
+ PAYMENT_CANCELED = "PAYMENT_CANCELED"
1473
+ }
1474
+ interface Submitter extends SubmitterSubmitterOneOf {
1475
+ /** Member ID. */
1476
+ memberId?: string | null;
1477
+ /** Visitor ID. */
1478
+ visitorId?: string | null;
1479
+ /** Application ID. */
1480
+ applicationId?: string | null;
1481
+ /** User ID. */
1482
+ userId?: string | null;
1483
+ }
1484
+ /** @oneof */
1485
+ interface SubmitterSubmitterOneOf {
1486
+ /** Member ID. */
1487
+ memberId?: string | null;
1488
+ /** Visitor ID. */
1489
+ visitorId?: string | null;
1490
+ /** Application ID. */
1491
+ applicationId?: string | null;
1492
+ /** User ID. */
1493
+ userId?: string | null;
1494
+ }
1495
+ interface ExtendedFields {
1496
+ /**
1497
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
1498
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
1499
+ *
1500
+ * You can only access fields for which you have the appropriate permissions.
1501
+ *
1502
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
1503
+ */
1504
+ namespaces?: Record<string, Record<string, any>>;
1505
+ }
1506
+ interface OrderDetails {
1507
+ /**
1508
+ * ID of the order related to submission (only applicable if a form has payments).
1509
+ * @readonly
1510
+ */
1511
+ orderId?: string | null;
1512
+ /**
1513
+ * Order number.
1514
+ * @readonly
1515
+ */
1516
+ number?: string | null;
1517
+ /**
1518
+ * Currency.
1519
+ * @readonly
1520
+ */
1521
+ currency?: string | null;
1522
+ /**
1523
+ * Item subtotal.
1524
+ * @readonly
1525
+ */
1526
+ itemSubtotal?: string;
1527
+ /**
1528
+ * ID of the checkout related to submission (only applicable if a form has payments).
1529
+ * @readonly
1530
+ */
1531
+ checkoutId?: string;
1532
+ }
1533
+ declare enum ActionType {
1534
+ UNKNOWN_ACTION = "UNKNOWN_ACTION",
1535
+ UPDATE = "UPDATE",
1536
+ CREATE = "CREATE"
1537
+ }
1538
+ interface UpdateOptions {
1539
+ /** Submission to update. */
1540
+ currentSubmission?: FormSubmission;
1541
+ }
1542
+ interface ValidateSubmissionResponse {
1543
+ /**
1544
+ * List of validation errors. <br>
1545
+ * If there are no validation errors, returns an empty array.
1546
+ */
1547
+ errors?: SubmissionValidationError[];
1548
+ }
1549
+ interface SubmissionValidationError extends SubmissionValidationErrorErrorMessageOneOf {
1550
+ /** Predefined error type. */
1551
+ errorType?: SubmissionErrorType;
1552
+ /** Custom error message. The message is displayed instead of an error type. */
1553
+ customErrorMessage?: string;
1554
+ /** Path indicating the source of the error, such as `form.fields.target`. */
1555
+ errorPath?: string;
1556
+ /** Additional error parameters. */
1557
+ params?: Record<string, any> | null;
1558
+ }
1559
+ /** @oneof */
1560
+ interface SubmissionValidationErrorErrorMessageOneOf {
1561
+ /** Predefined error type. */
1562
+ errorType?: SubmissionErrorType;
1563
+ /** Custom error message. The message is displayed instead of an error type. */
1564
+ customErrorMessage?: string;
1565
+ }
1566
+ declare enum SubmissionErrorType {
1567
+ /** Error is unknown or not suitable for any of options bellow */
1568
+ UNKNOWN_ERROR = "UNKNOWN_ERROR",
1569
+ /** Type of submitted value is incorrect */
1570
+ TYPE_ERROR = "TYPE_ERROR",
1571
+ /** Value is required to be provided */
1572
+ REQUIRED_VALUE_ERROR = "REQUIRED_VALUE_ERROR",
1573
+ /** Value contains additional properties not expected in schema */
1574
+ UNKNOWN_VALUE_ERROR = "UNKNOWN_VALUE_ERROR",
1575
+ /** Text value exceeds max length */
1576
+ MAX_LENGTH_ERROR = "MAX_LENGTH_ERROR",
1577
+ /** Text value not reaches min length */
1578
+ MIN_LENGTH_ERROR = "MIN_LENGTH_ERROR",
1579
+ /** Text value not applicable for expected pattern */
1580
+ PATTERN_ERROR = "PATTERN_ERROR",
1581
+ /** Text value not applicable for expected format */
1582
+ FORMAT_ERROR = "FORMAT_ERROR",
1583
+ /** Number value is too big */
1584
+ MAX_VALUE_ERROR = "MAX_VALUE_ERROR",
1585
+ /** Number value is too small */
1586
+ MIN_VALUE_ERROR = "MIN_VALUE_ERROR",
1587
+ /** Number value is not multiple of expected number */
1588
+ MULTIPLE_OF_VALUE_ERROR = "MULTIPLE_OF_VALUE_ERROR",
1589
+ /** Array value has too much items */
1590
+ MIN_ITEMS_ERROR = "MIN_ITEMS_ERROR",
1591
+ /** Array value has not enough items */
1592
+ MAX_ITEMS_ERROR = "MAX_ITEMS_ERROR",
1593
+ /** Value is not in list of allowed values */
1594
+ NOT_ALLOWED_VALUE_ERROR = "NOT_ALLOWED_VALUE_ERROR",
1595
+ /** Submitted form is disabled */
1596
+ DISABLED_FORM_ERROR = "DISABLED_FORM_ERROR"
1597
+ }
1598
+ interface ValidateSubmissionResponseNonNullableFields {
1599
+ errors: {
1600
+ errorType: SubmissionErrorType;
1601
+ customErrorMessage: string;
1602
+ errorPath: string;
1603
+ }[];
1604
+ }
1605
+
1606
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1607
+ getUrl: (context: any) => string;
1608
+ httpMethod: K;
1609
+ path: string;
1610
+ pathParams: M;
1611
+ __requestType: T;
1612
+ __originalRequestType: S;
1613
+ __responseType: Q;
1614
+ __originalResponseType: R;
1615
+ };
1616
+ declare function validateSubmission(): __PublicMethodMetaInfo<'POST', {}, ValidateSubmissionRequest, ValidateSubmissionRequest$1, ValidateSubmissionResponse & ValidateSubmissionResponseNonNullableFields, ValidateSubmissionResponse$1 & ValidateSubmissionResponseNonNullableFields$1>;
1617
+
1618
+ type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
1619
+ declare const meta_validateSubmission: typeof validateSubmission;
1620
+ declare namespace meta {
1621
+ export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_validateSubmission as validateSubmission };
1622
+ }
1623
+
1624
+ export { meta$1 as submissions, meta as submissionsExtensionSpi };