@wix/forms 1.0.52 → 1.0.53
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.
- package/build/cjs/src/forms-v4-submission.http.d.ts +54 -8
- package/build/cjs/src/forms-v4-submission.http.js +54 -8
- package/build/cjs/src/forms-v4-submission.http.js.map +1 -1
- package/build/cjs/src/forms-v4-submission.public.d.ts +12 -2
- package/build/cjs/src/forms-v4-submission.public.js +4 -4
- package/build/cjs/src/forms-v4-submission.public.js.map +1 -1
- package/build/cjs/src/forms-v4-submission.types.d.ts +211 -86
- package/build/cjs/src/forms-v4-submission.types.js +21 -19
- package/build/cjs/src/forms-v4-submission.types.js.map +1 -1
- package/build/cjs/src/forms-v4-submission.universal.d.ts +254 -98
- package/build/cjs/src/forms-v4-submission.universal.js +61 -28
- package/build/cjs/src/forms-v4-submission.universal.js.map +1 -1
- package/build/es/src/forms-v4-submission.http.d.ts +54 -8
- package/build/es/src/forms-v4-submission.http.js +54 -8
- package/build/es/src/forms-v4-submission.http.js.map +1 -1
- package/build/es/src/forms-v4-submission.public.d.ts +12 -2
- package/build/es/src/forms-v4-submission.public.js +1 -1
- package/build/es/src/forms-v4-submission.public.js.map +1 -1
- package/build/es/src/forms-v4-submission.types.d.ts +211 -86
- package/build/es/src/forms-v4-submission.types.js +19 -17
- package/build/es/src/forms-v4-submission.types.js.map +1 -1
- package/build/es/src/forms-v4-submission.universal.d.ts +254 -98
- package/build/es/src/forms-v4-submission.universal.js +59 -26
- package/build/es/src/forms-v4-submission.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -48,15 +48,12 @@ export interface FormSubmission {
|
|
|
48
48
|
* @readonly
|
|
49
49
|
*/
|
|
50
50
|
submitter?: Submitter;
|
|
51
|
-
/** Whether the submission was read by a site
|
|
51
|
+
/** Whether the submission was read by a site Extension with permissions to manage submissions. */
|
|
52
52
|
seen?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* ID of the order related to submission (applicable if form has payments added).
|
|
55
|
-
* @readonly
|
|
56
|
-
*/
|
|
57
|
-
orderId?: string | null;
|
|
58
53
|
/** Data extensions ExtendedFields. */
|
|
59
54
|
extendedFields?: ExtendedFields;
|
|
55
|
+
/** Order details. */
|
|
56
|
+
orderDetails?: OrderDetails;
|
|
60
57
|
}
|
|
61
58
|
export declare enum SubmissionStatus {
|
|
62
59
|
UNDEFINED = "UNDEFINED",
|
|
@@ -113,9 +110,33 @@ export interface ExtendedFields {
|
|
|
113
110
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
114
111
|
*
|
|
115
112
|
* You can only access fields for which you have the appropriate permissions.
|
|
113
|
+
*
|
|
114
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
116
115
|
*/
|
|
117
116
|
namespaces?: Record<string, Record<string, any>>;
|
|
118
117
|
}
|
|
118
|
+
export interface OrderDetails {
|
|
119
|
+
/**
|
|
120
|
+
* ID of the order related to submission (applicable if form has payments added).
|
|
121
|
+
* @readonly
|
|
122
|
+
*/
|
|
123
|
+
_id?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Order number.
|
|
126
|
+
* @readonly
|
|
127
|
+
*/
|
|
128
|
+
number?: string | null;
|
|
129
|
+
/**
|
|
130
|
+
* Currency.
|
|
131
|
+
* @readonly
|
|
132
|
+
*/
|
|
133
|
+
currency?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Item subtotal.
|
|
136
|
+
* @readonly
|
|
137
|
+
*/
|
|
138
|
+
itemSubtotal?: string;
|
|
139
|
+
}
|
|
119
140
|
export interface CreateCheckoutFromSubmissionRequest extends CreateCheckoutFromSubmissionRequestFormSchemaIdentifierOneOf {
|
|
120
141
|
/** Submission's form. */
|
|
121
142
|
form?: Form;
|
|
@@ -205,8 +226,18 @@ export interface FormField {
|
|
|
205
226
|
hidden?: boolean;
|
|
206
227
|
/** Field view properties. */
|
|
207
228
|
view?: Record<string, any> | null;
|
|
208
|
-
|
|
209
|
-
|
|
229
|
+
/** Details identifying field, which is extension of other entity */
|
|
230
|
+
dataExtensionsDetails?: DataExtensionsDetails;
|
|
231
|
+
}
|
|
232
|
+
export interface StringType extends StringTypeFormatOptionsOneOf {
|
|
233
|
+
/** DATE format options */
|
|
234
|
+
dateOptions?: DateTimeConstraints;
|
|
235
|
+
/** DATE_TIME format options */
|
|
236
|
+
dateTimeOptions?: DateTimeConstraints;
|
|
237
|
+
/** TIME format options */
|
|
238
|
+
timeOptions?: DateTimeConstraints;
|
|
239
|
+
/** DATE_OPTIONAL_TIME format options */
|
|
240
|
+
dateOptionalTimeOptions?: DateTimeConstraints;
|
|
210
241
|
/** Minimum length. */
|
|
211
242
|
minLength?: number | null;
|
|
212
243
|
/** Maximum length. */
|
|
@@ -220,6 +251,17 @@ export interface StringType {
|
|
|
220
251
|
/** List of allowed values. */
|
|
221
252
|
enum?: string[] | null;
|
|
222
253
|
}
|
|
254
|
+
/** @oneof */
|
|
255
|
+
export interface StringTypeFormatOptionsOneOf {
|
|
256
|
+
/** DATE format options */
|
|
257
|
+
dateOptions?: DateTimeConstraints;
|
|
258
|
+
/** DATE_TIME format options */
|
|
259
|
+
dateTimeOptions?: DateTimeConstraints;
|
|
260
|
+
/** TIME format options */
|
|
261
|
+
timeOptions?: DateTimeConstraints;
|
|
262
|
+
/** DATE_OPTIONAL_TIME format options */
|
|
263
|
+
dateOptionalTimeOptions?: DateTimeConstraints;
|
|
264
|
+
}
|
|
223
265
|
export declare enum Format {
|
|
224
266
|
UNDEFINED = "UNDEFINED",
|
|
225
267
|
DATE = "DATE",
|
|
@@ -233,12 +275,29 @@ export declare enum Format {
|
|
|
233
275
|
HOSTNAME = "HOSTNAME",
|
|
234
276
|
COLOR_HEX = "COLOR_HEX",
|
|
235
277
|
CURRENCY = "CURRENCY",
|
|
236
|
-
LANGUAGE = "LANGUAGE"
|
|
278
|
+
LANGUAGE = "LANGUAGE",
|
|
279
|
+
DATE_OPTIONAL_TIME = "DATE_OPTIONAL_TIME"
|
|
237
280
|
}
|
|
238
281
|
export interface StringErrorMessages {
|
|
239
282
|
/** Default error message on invalid validation. */
|
|
240
283
|
default?: string | null;
|
|
241
284
|
}
|
|
285
|
+
export interface DateTimeConstraints {
|
|
286
|
+
/**
|
|
287
|
+
* Support static constrains defined as ISO date/time format, as well as
|
|
288
|
+
* dynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.
|
|
289
|
+
* The dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.
|
|
290
|
+
* The regex pattern for dynamic calculations is: \$now([+-]\d{1,2})([yMdmh])
|
|
291
|
+
*/
|
|
292
|
+
minimum?: string | null;
|
|
293
|
+
/**
|
|
294
|
+
* Support static constrains defined as ISO date/time format, as well as
|
|
295
|
+
* dynamic calculations can be performed using special keywords such as "$now" to represent the current date and time.
|
|
296
|
+
* The dynamic calculation supports expressions like "$now+2d" (2 days in the future), "$now-1h" (1 hour in the past), etc.
|
|
297
|
+
* The regex pattern for dynamic calculations is: \$now([+-]\d{1,2})([yMdmh])
|
|
298
|
+
*/
|
|
299
|
+
maximum?: string | null;
|
|
300
|
+
}
|
|
242
301
|
export interface NumberType {
|
|
243
302
|
/** Inclusive maximum value. */
|
|
244
303
|
maximum?: number | null;
|
|
@@ -353,17 +412,86 @@ export interface ArrayErrorMessages {
|
|
|
353
412
|
/** Default error message on invalid validation. */
|
|
354
413
|
default?: string | null;
|
|
355
414
|
}
|
|
356
|
-
export interface PredefinedValidation {
|
|
415
|
+
export interface PredefinedValidation extends PredefinedValidationFormatOptionsOneOf {
|
|
416
|
+
/** Payment input field. */
|
|
417
|
+
paymentOptions?: PaymentType;
|
|
357
418
|
/** Format of predefined validation. */
|
|
358
419
|
format?: ValidationFormat;
|
|
359
420
|
}
|
|
421
|
+
/** @oneof */
|
|
422
|
+
export interface PredefinedValidationFormatOptionsOneOf {
|
|
423
|
+
/** Payment input field. */
|
|
424
|
+
paymentOptions?: PaymentType;
|
|
425
|
+
}
|
|
360
426
|
export declare enum ValidationFormat {
|
|
361
427
|
UNDEFINED = "UNDEFINED",
|
|
362
428
|
/** File upload validation. */
|
|
363
429
|
WIX_FILE = "WIX_FILE",
|
|
364
|
-
/** Payment validation
|
|
430
|
+
/** Payment validation. */
|
|
365
431
|
PAYMENT = "PAYMENT"
|
|
366
432
|
}
|
|
433
|
+
export interface PaymentType {
|
|
434
|
+
/** Field mapped to products. */
|
|
435
|
+
products?: Product[];
|
|
436
|
+
/** Minimum amount of different products. */
|
|
437
|
+
minItems?: number | null;
|
|
438
|
+
/** Maximum amount of different products. */
|
|
439
|
+
maxItems?: number | null;
|
|
440
|
+
}
|
|
441
|
+
export declare enum ProductType {
|
|
442
|
+
UNKNOWN = "UNKNOWN",
|
|
443
|
+
/** Shippable (physical). */
|
|
444
|
+
SHIPPABLE = "SHIPPABLE",
|
|
445
|
+
/** Digital. */
|
|
446
|
+
DIGITAL = "DIGITAL"
|
|
447
|
+
}
|
|
448
|
+
export declare enum PriceType {
|
|
449
|
+
UNKNOWN = "UNKNOWN",
|
|
450
|
+
/** Fixed price. */
|
|
451
|
+
FIXED_PRICE = "FIXED_PRICE",
|
|
452
|
+
/** Dynamic price from price range. */
|
|
453
|
+
DYNAMIC_PRICE = "DYNAMIC_PRICE"
|
|
454
|
+
}
|
|
455
|
+
export interface QuantityLimit {
|
|
456
|
+
/** Minimum quantity. */
|
|
457
|
+
minimum?: number | null;
|
|
458
|
+
/** Maximum quantity. */
|
|
459
|
+
maximum?: number | null;
|
|
460
|
+
}
|
|
461
|
+
export interface FixedPriceOptions {
|
|
462
|
+
/** Fixed price monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). */
|
|
463
|
+
price?: string;
|
|
464
|
+
}
|
|
465
|
+
export interface DynamicPriceOptions {
|
|
466
|
+
/** Minimal price monetary amount. */
|
|
467
|
+
minPrice?: string;
|
|
468
|
+
/** Maximal price monetary amount. */
|
|
469
|
+
maxPrice?: string | null;
|
|
470
|
+
}
|
|
471
|
+
export interface Product extends ProductPriceOptionsOneOf {
|
|
472
|
+
/** Fixed price options. */
|
|
473
|
+
fixedPriceOptions?: FixedPriceOptions;
|
|
474
|
+
/** Dynamic price options. */
|
|
475
|
+
dynamicPriceOptions?: DynamicPriceOptions;
|
|
476
|
+
/**
|
|
477
|
+
* Product ID.
|
|
478
|
+
* @readonly
|
|
479
|
+
*/
|
|
480
|
+
_id?: string;
|
|
481
|
+
/** Product type. */
|
|
482
|
+
productType?: ProductType;
|
|
483
|
+
/** Price type. */
|
|
484
|
+
priceType?: PriceType;
|
|
485
|
+
/** Quantity limit. */
|
|
486
|
+
quantityLimit?: QuantityLimit;
|
|
487
|
+
}
|
|
488
|
+
/** @oneof */
|
|
489
|
+
export interface ProductPriceOptionsOneOf {
|
|
490
|
+
/** Fixed price options. */
|
|
491
|
+
fixedPriceOptions?: FixedPriceOptions;
|
|
492
|
+
/** Dynamic price options. */
|
|
493
|
+
dynamicPriceOptions?: DynamicPriceOptions;
|
|
494
|
+
}
|
|
367
495
|
export interface NestedFormFieldOverrides {
|
|
368
496
|
/** Whether the field is required. Leave blank for no override. */
|
|
369
497
|
required?: boolean | null;
|
|
@@ -405,6 +533,10 @@ export interface ValidationValidationOneOf {
|
|
|
405
533
|
/** Predefined validation of specific format */
|
|
406
534
|
predefined?: PredefinedValidation;
|
|
407
535
|
}
|
|
536
|
+
export interface DataExtensionsDetails {
|
|
537
|
+
/** FQDNS which can be extended with this field */
|
|
538
|
+
fqdns?: string[];
|
|
539
|
+
}
|
|
408
540
|
export interface NestedFormOverrides {
|
|
409
541
|
/** Field overrides by field ID */
|
|
410
542
|
fieldOverrides?: Record<string, NestedFormFieldOverrides>;
|
|
@@ -1687,7 +1819,8 @@ export declare enum FormatEnumFormat {
|
|
|
1687
1819
|
HOSTNAME = "HOSTNAME",
|
|
1688
1820
|
COLOR_HEX = "COLOR_HEX",
|
|
1689
1821
|
CURRENCY = "CURRENCY",
|
|
1690
|
-
LANGUAGE = "LANGUAGE"
|
|
1822
|
+
LANGUAGE = "LANGUAGE",
|
|
1823
|
+
DATE_OPTIONAL_TIME = "DATE_OPTIONAL_TIME"
|
|
1691
1824
|
}
|
|
1692
1825
|
export interface InputFieldStringErrorMessages {
|
|
1693
1826
|
/** Default error message on invalid validation. */
|
|
@@ -1995,7 +2128,7 @@ export interface FileUpload {
|
|
|
1995
2128
|
export interface CheckboxGroupOption {
|
|
1996
2129
|
/** Selectable option label. */
|
|
1997
2130
|
label?: string | null;
|
|
1998
|
-
/** Selectable option value, which is saved to DB. Corresponds to product id, found in
|
|
2131
|
+
/** Selectable option value, which is saved to DB. Corresponds to product id, found in field's products list. */
|
|
1999
2132
|
value?: any;
|
|
2000
2133
|
/** Option id. Used as binding for translations. */
|
|
2001
2134
|
_id?: string;
|
|
@@ -2127,6 +2260,8 @@ export interface Payment extends PaymentComponentTypeOptionsOneOf {
|
|
|
2127
2260
|
* @readonly
|
|
2128
2261
|
*/
|
|
2129
2262
|
componentType?: PaymentComponentType;
|
|
2263
|
+
/** Validation of payment type. */
|
|
2264
|
+
validation?: PaymentType;
|
|
2130
2265
|
}
|
|
2131
2266
|
/** @oneof */
|
|
2132
2267
|
export interface PaymentComponentTypeOptionsOneOf {
|
|
@@ -2280,6 +2415,8 @@ export interface BreakPoint {
|
|
|
2280
2415
|
margin?: Margin;
|
|
2281
2416
|
/** Description of elements paddings. */
|
|
2282
2417
|
padding?: Margin;
|
|
2418
|
+
/** Sections of the layout, which allow manage fields */
|
|
2419
|
+
sections?: Section[];
|
|
2283
2420
|
}
|
|
2284
2421
|
export interface ItemLayout {
|
|
2285
2422
|
/** Form field reference id. */
|
|
@@ -2299,6 +2436,20 @@ export interface Margin {
|
|
|
2299
2436
|
/** Vertical value. */
|
|
2300
2437
|
vertical?: number | null;
|
|
2301
2438
|
}
|
|
2439
|
+
export interface Section {
|
|
2440
|
+
/** Id of the section */
|
|
2441
|
+
_id?: string;
|
|
2442
|
+
/** Horizontal coordinate in the grid. */
|
|
2443
|
+
row?: number | null;
|
|
2444
|
+
/**
|
|
2445
|
+
* A list of field identifiers that are permitted to be placed within a section.
|
|
2446
|
+
* The section will only accept fields with IDs specified in this list.
|
|
2447
|
+
* If the section encounters the $new key within the list,
|
|
2448
|
+
* it allows the inclusion of fields not explicitly listed,
|
|
2449
|
+
* enabling dynamic addition of new fields.
|
|
2450
|
+
*/
|
|
2451
|
+
allowedFieldIds?: string[];
|
|
2452
|
+
}
|
|
2302
2453
|
export interface FormRule {
|
|
2303
2454
|
/** Id of the rule */
|
|
2304
2455
|
_id?: string;
|
|
@@ -2339,8 +2490,6 @@ export declare enum Kind {
|
|
|
2339
2490
|
export interface PostSubmissionTriggers {
|
|
2340
2491
|
/** Upserts a contact from the submission data. */
|
|
2341
2492
|
upsertContact?: UpsertContact;
|
|
2342
|
-
/** Payment trigger. */
|
|
2343
|
-
paymentTrigger?: PaymentTrigger;
|
|
2344
2493
|
}
|
|
2345
2494
|
export interface UpsertContact {
|
|
2346
2495
|
/** Fields mapping (target field mapped to corresponding contact field). */
|
|
@@ -2417,72 +2566,6 @@ export interface CustomFieldInfo {
|
|
|
2417
2566
|
/** Custom field key. */
|
|
2418
2567
|
key?: string;
|
|
2419
2568
|
}
|
|
2420
|
-
export interface PaymentTrigger {
|
|
2421
|
-
/** Fields mapping (target field mapped to corresponding payment field). */
|
|
2422
|
-
fieldsMapping?: Record<string, FormFieldPaymentInfo>;
|
|
2423
|
-
}
|
|
2424
|
-
export interface FormFieldPaymentInfo {
|
|
2425
|
-
/** Field mapped to products. */
|
|
2426
|
-
products?: Product[];
|
|
2427
|
-
/** Minimum amount of different products. */
|
|
2428
|
-
minItems?: number | null;
|
|
2429
|
-
/** Maximum amount of different products. */
|
|
2430
|
-
maxItems?: number | null;
|
|
2431
|
-
}
|
|
2432
|
-
export declare enum ProductType {
|
|
2433
|
-
UNKNOWN = "UNKNOWN",
|
|
2434
|
-
/** Shippable (physical). */
|
|
2435
|
-
SHIPPABLE = "SHIPPABLE",
|
|
2436
|
-
/** Digital. */
|
|
2437
|
-
DIGITAL = "DIGITAL"
|
|
2438
|
-
}
|
|
2439
|
-
export declare enum PriceType {
|
|
2440
|
-
UNKNOWN = "UNKNOWN",
|
|
2441
|
-
/** Fixed price. */
|
|
2442
|
-
FIXED_PRICE = "FIXED_PRICE",
|
|
2443
|
-
/** Dynamic price from price range. */
|
|
2444
|
-
DYNAMIC_PRICE = "DYNAMIC_PRICE"
|
|
2445
|
-
}
|
|
2446
|
-
export interface QuantityLimit {
|
|
2447
|
-
/** Minimum quantity. */
|
|
2448
|
-
minimum?: number | null;
|
|
2449
|
-
/** Maximum quantity. */
|
|
2450
|
-
maximum?: number | null;
|
|
2451
|
-
}
|
|
2452
|
-
export interface FixedPriceOptions {
|
|
2453
|
-
/** Fixed price monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). */
|
|
2454
|
-
price?: string;
|
|
2455
|
-
}
|
|
2456
|
-
export interface DynamicPriceOptions {
|
|
2457
|
-
/** Minimal price monetary amount. */
|
|
2458
|
-
minPrice?: string;
|
|
2459
|
-
/** Maximal price monetary amount. */
|
|
2460
|
-
maxPrice?: string | null;
|
|
2461
|
-
}
|
|
2462
|
-
export interface Product extends ProductPriceOptionsOneOf {
|
|
2463
|
-
/** Fixed price options. */
|
|
2464
|
-
fixedPriceOptions?: FixedPriceOptions;
|
|
2465
|
-
/** Dynamic price options. */
|
|
2466
|
-
dynamicPriceOptions?: DynamicPriceOptions;
|
|
2467
|
-
/**
|
|
2468
|
-
* Product ID.
|
|
2469
|
-
* @readonly
|
|
2470
|
-
*/
|
|
2471
|
-
_id?: string;
|
|
2472
|
-
/** Product type. */
|
|
2473
|
-
productType?: ProductType;
|
|
2474
|
-
/** Price type. */
|
|
2475
|
-
priceType?: PriceType;
|
|
2476
|
-
/** Quantity limit. */
|
|
2477
|
-
quantityLimit?: QuantityLimit;
|
|
2478
|
-
}
|
|
2479
|
-
/** @oneof */
|
|
2480
|
-
export interface ProductPriceOptionsOneOf {
|
|
2481
|
-
/** Fixed price options. */
|
|
2482
|
-
fixedPriceOptions?: FixedPriceOptions;
|
|
2483
|
-
/** Dynamic price options. */
|
|
2484
|
-
dynamicPriceOptions?: DynamicPriceOptions;
|
|
2485
|
-
}
|
|
2486
2569
|
export interface NestedForm {
|
|
2487
2570
|
/** Targets which have this form. */
|
|
2488
2571
|
targets?: string[];
|
|
@@ -2493,6 +2576,10 @@ export interface CreateCheckoutFromSubmissionResponse {
|
|
|
2493
2576
|
/** Checkout ID (applicable for form involving payments). */
|
|
2494
2577
|
checkoutId?: string | null;
|
|
2495
2578
|
}
|
|
2579
|
+
export interface IsFormSubmittableRequest {
|
|
2580
|
+
}
|
|
2581
|
+
export interface IsFormSubmittableResponse {
|
|
2582
|
+
}
|
|
2496
2583
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
2497
2584
|
createdEvent?: EntityCreatedEvent;
|
|
2498
2585
|
updatedEvent?: EntityUpdatedEvent;
|
|
@@ -2554,6 +2641,8 @@ export interface EntityUpdatedEvent {
|
|
|
2554
2641
|
currentEntityAsJson?: string;
|
|
2555
2642
|
}
|
|
2556
2643
|
export interface EntityDeletedEvent {
|
|
2644
|
+
/** Entity that was deleted */
|
|
2645
|
+
deletedEntityAsJson?: string | null;
|
|
2557
2646
|
}
|
|
2558
2647
|
export interface ActionEvent {
|
|
2559
2648
|
bodyAsJson?: string;
|
|
@@ -2635,8 +2724,6 @@ export interface CreateSubmissionResponse {
|
|
|
2635
2724
|
export interface CreateSubmissionBySubmitterRequest {
|
|
2636
2725
|
/** Submission to create. */
|
|
2637
2726
|
submission?: FormSubmission;
|
|
2638
|
-
/** When set, and when spam validation is enabled by the namespace provider, will validate a submission for spam. */
|
|
2639
|
-
validateSpam?: boolean;
|
|
2640
2727
|
}
|
|
2641
2728
|
export interface CreateSubmissionBySubmitterResponse {
|
|
2642
2729
|
/** The created submission. */
|
|
@@ -2651,8 +2738,6 @@ export interface BulkCreateSubmissionBySubmitterRequest {
|
|
|
2651
2738
|
submissions?: FormSubmission[];
|
|
2652
2739
|
/** When set, items will be returned on successful create. */
|
|
2653
2740
|
returnEntity?: boolean;
|
|
2654
|
-
/** When set, and when spam validation is enabled by the namespace provider, will validate a submission for spam. */
|
|
2655
|
-
validateSpam?: boolean;
|
|
2656
2741
|
}
|
|
2657
2742
|
export interface BulkCreateSubmissionBySubmitterResponse {
|
|
2658
2743
|
/** Created submissions with metadata */
|
|
@@ -2918,7 +3003,7 @@ export interface FormSubmissionsCount {
|
|
|
2918
3003
|
formId?: string;
|
|
2919
3004
|
/** Total number of submissions. */
|
|
2920
3005
|
totalCount?: number;
|
|
2921
|
-
/** Number of submissions that haven't yet been seen by site
|
|
3006
|
+
/** Number of submissions that haven't yet been seen by site Extensions with manage submission permissions. */
|
|
2922
3007
|
unseenCount?: number;
|
|
2923
3008
|
}
|
|
2924
3009
|
export interface CountDeletedSubmissionsRequest {
|
|
@@ -3001,6 +3086,11 @@ export interface CreateSubmissionResponseNonNullableFields {
|
|
|
3001
3086
|
namespace: string;
|
|
3002
3087
|
status: SubmissionStatus;
|
|
3003
3088
|
seen: boolean;
|
|
3089
|
+
orderDetails?: {
|
|
3090
|
+
_id: string;
|
|
3091
|
+
currency: string;
|
|
3092
|
+
itemSubtotal: string;
|
|
3093
|
+
};
|
|
3004
3094
|
};
|
|
3005
3095
|
}
|
|
3006
3096
|
export interface GetSubmissionResponseNonNullableFields {
|
|
@@ -3009,6 +3099,11 @@ export interface GetSubmissionResponseNonNullableFields {
|
|
|
3009
3099
|
namespace: string;
|
|
3010
3100
|
status: SubmissionStatus;
|
|
3011
3101
|
seen: boolean;
|
|
3102
|
+
orderDetails?: {
|
|
3103
|
+
_id: string;
|
|
3104
|
+
currency: string;
|
|
3105
|
+
itemSubtotal: string;
|
|
3106
|
+
};
|
|
3012
3107
|
};
|
|
3013
3108
|
}
|
|
3014
3109
|
export interface UpdateSubmissionResponseNonNullableFields {
|
|
@@ -3017,6 +3112,11 @@ export interface UpdateSubmissionResponseNonNullableFields {
|
|
|
3017
3112
|
namespace: string;
|
|
3018
3113
|
status: SubmissionStatus;
|
|
3019
3114
|
seen: boolean;
|
|
3115
|
+
orderDetails?: {
|
|
3116
|
+
_id: string;
|
|
3117
|
+
currency: string;
|
|
3118
|
+
itemSubtotal: string;
|
|
3119
|
+
};
|
|
3020
3120
|
};
|
|
3021
3121
|
}
|
|
3022
3122
|
export interface ConfirmSubmissionResponseNonNullableFields {
|
|
@@ -3025,6 +3125,11 @@ export interface ConfirmSubmissionResponseNonNullableFields {
|
|
|
3025
3125
|
namespace: string;
|
|
3026
3126
|
status: SubmissionStatus;
|
|
3027
3127
|
seen: boolean;
|
|
3128
|
+
orderDetails?: {
|
|
3129
|
+
_id: string;
|
|
3130
|
+
currency: string;
|
|
3131
|
+
itemSubtotal: string;
|
|
3132
|
+
};
|
|
3028
3133
|
};
|
|
3029
3134
|
}
|
|
3030
3135
|
export interface BulkDeleteSubmissionResponseNonNullableFields {
|
|
@@ -3050,6 +3155,11 @@ export interface RestoreSubmissionFromTrashBinResponseNonNullableFields {
|
|
|
3050
3155
|
namespace: string;
|
|
3051
3156
|
status: SubmissionStatus;
|
|
3052
3157
|
seen: boolean;
|
|
3158
|
+
orderDetails?: {
|
|
3159
|
+
_id: string;
|
|
3160
|
+
currency: string;
|
|
3161
|
+
itemSubtotal: string;
|
|
3162
|
+
};
|
|
3053
3163
|
};
|
|
3054
3164
|
}
|
|
3055
3165
|
export interface BulkRemoveSubmissionFromTrashBinResponseNonNullableFields {
|
|
@@ -3075,6 +3185,11 @@ export interface ListDeletedSubmissionsResponseNonNullableFields {
|
|
|
3075
3185
|
namespace: string;
|
|
3076
3186
|
status: SubmissionStatus;
|
|
3077
3187
|
seen: boolean;
|
|
3188
|
+
orderDetails?: {
|
|
3189
|
+
_id: string;
|
|
3190
|
+
currency: string;
|
|
3191
|
+
itemSubtotal: string;
|
|
3192
|
+
};
|
|
3078
3193
|
}[];
|
|
3079
3194
|
}
|
|
3080
3195
|
export interface GetDeletedSubmissionResponseNonNullableFields {
|
|
@@ -3083,6 +3198,11 @@ export interface GetDeletedSubmissionResponseNonNullableFields {
|
|
|
3083
3198
|
namespace: string;
|
|
3084
3199
|
status: SubmissionStatus;
|
|
3085
3200
|
seen: boolean;
|
|
3201
|
+
orderDetails?: {
|
|
3202
|
+
_id: string;
|
|
3203
|
+
currency: string;
|
|
3204
|
+
itemSubtotal: string;
|
|
3205
|
+
};
|
|
3086
3206
|
};
|
|
3087
3207
|
}
|
|
3088
3208
|
export interface QuerySubmissionsByNamespaceResponseNonNullableFields {
|
|
@@ -3091,6 +3211,11 @@ export interface QuerySubmissionsByNamespaceResponseNonNullableFields {
|
|
|
3091
3211
|
namespace: string;
|
|
3092
3212
|
status: SubmissionStatus;
|
|
3093
3213
|
seen: boolean;
|
|
3214
|
+
orderDetails?: {
|
|
3215
|
+
_id: string;
|
|
3216
|
+
currency: string;
|
|
3217
|
+
itemSubtotal: string;
|
|
3218
|
+
};
|
|
3094
3219
|
}[];
|
|
3095
3220
|
}
|
|
3096
3221
|
export interface CountSubmissionsResponseNonNullableFields {
|
|
@@ -3110,7 +3235,10 @@ export interface GetMediaUploadURLResponseNonNullableFields {
|
|
|
3110
3235
|
uploadUrl: string;
|
|
3111
3236
|
}
|
|
3112
3237
|
/**
|
|
3113
|
-
*
|
|
3238
|
+
* > **Note**:
|
|
3239
|
+
* > The Submissions API is only available in the Wix Studio editor.
|
|
3240
|
+
*
|
|
3241
|
+
* Creates a submission.
|
|
3114
3242
|
* @param submission - Submission to create.
|
|
3115
3243
|
* @public
|
|
3116
3244
|
* @documentationMaturity preview
|
|
@@ -3127,6 +3255,9 @@ export interface CreateSubmissionOptions {
|
|
|
3127
3255
|
captchaToken?: string | null;
|
|
3128
3256
|
}
|
|
3129
3257
|
/**
|
|
3258
|
+
* > **Note:**
|
|
3259
|
+
* > The Submissions API is only available in the Wix Studio editor.
|
|
3260
|
+
*
|
|
3130
3261
|
* Retrieves a submission by ID.
|
|
3131
3262
|
* @param submissionId - ID of the submission to retrieve.
|
|
3132
3263
|
* @public
|
|
@@ -3141,8 +3272,12 @@ export interface CreateSubmissionOptions {
|
|
|
3141
3272
|
*/
|
|
3142
3273
|
export declare function getSubmission(submissionId: string): Promise<FormSubmission & NonNullable<GetSubmissionResponseNonNullableFields>['submission']>;
|
|
3143
3274
|
/**
|
|
3275
|
+
* > **Note**:
|
|
3276
|
+
* > The Submissions API is only available in the Wix Studio editor.
|
|
3277
|
+
*
|
|
3144
3278
|
* Updates a submission.
|
|
3145
3279
|
*
|
|
3280
|
+
*
|
|
3146
3281
|
* 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.
|
|
3147
3282
|
* @param _id - Submission ID.
|
|
3148
3283
|
* @public
|
|
@@ -3200,21 +3335,23 @@ export interface UpdateSubmission {
|
|
|
3200
3335
|
* @readonly
|
|
3201
3336
|
*/
|
|
3202
3337
|
submitter?: Submitter;
|
|
3203
|
-
/** Whether the submission was read by a site
|
|
3338
|
+
/** Whether the submission was read by a site Extension with permissions to manage submissions. */
|
|
3204
3339
|
seen?: boolean;
|
|
3205
|
-
/**
|
|
3206
|
-
* ID of the order related to submission (applicable if form has payments added).
|
|
3207
|
-
* @readonly
|
|
3208
|
-
*/
|
|
3209
|
-
orderId?: string | null;
|
|
3210
3340
|
/** Data extensions ExtendedFields. */
|
|
3211
3341
|
extendedFields?: ExtendedFields;
|
|
3342
|
+
/** Order details. */
|
|
3343
|
+
orderDetails?: OrderDetails;
|
|
3212
3344
|
}
|
|
3213
3345
|
/**
|
|
3346
|
+
* > **Note**:
|
|
3347
|
+
* > The Submissions API is only available in the Wix Studio editor.
|
|
3348
|
+
*
|
|
3214
3349
|
* Confirms a submission.
|
|
3215
3350
|
*
|
|
3216
3351
|
*
|
|
3217
|
-
* You can only confirm a submission that has a `PENDING` status.
|
|
3352
|
+
* You can only confirm a submission that has a `PENDING` status.
|
|
3353
|
+
* 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`.
|
|
3354
|
+
* 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.
|
|
3218
3355
|
* @param submissionId - Submission ID to confirm.
|
|
3219
3356
|
* @public
|
|
3220
3357
|
* @documentationMaturity preview
|
|
@@ -3224,7 +3361,10 @@ export interface UpdateSubmission {
|
|
|
3224
3361
|
*/
|
|
3225
3362
|
export declare function confirmSubmission(submissionId: string): Promise<ConfirmSubmissionResponse & ConfirmSubmissionResponseNonNullableFields>;
|
|
3226
3363
|
/**
|
|
3227
|
-
*
|
|
3364
|
+
* > **Note:**
|
|
3365
|
+
* > The Submissions API is only available in the Wix Studio editor.
|
|
3366
|
+
*
|
|
3367
|
+
* Deletes a submission.
|
|
3228
3368
|
* @param submissionId - ID of the submission to delete.
|
|
3229
3369
|
* @public
|
|
3230
3370
|
* @documentationMaturity preview
|
|
@@ -3331,6 +3471,9 @@ export interface ListDeletedSubmissionsOptions {
|
|
|
3331
3471
|
*/
|
|
3332
3472
|
export declare function getDeletedSubmission(submissionId: string): Promise<GetDeletedSubmissionResponse & GetDeletedSubmissionResponseNonNullableFields>;
|
|
3333
3473
|
/**
|
|
3474
|
+
* > **Note:**
|
|
3475
|
+
* > The Submissions API is only available in the Wix Studio editor.
|
|
3476
|
+
*
|
|
3334
3477
|
* Creates a query to retrieve a list of submissions.
|
|
3335
3478
|
*
|
|
3336
3479
|
* The `querySubmissionsByNamespace()` method builds a query to retrieve a list of submissions from the specified namespace and returns a [`SubmissionsQueryBuilder`](#submissionsquerybuilder) object.
|
|
@@ -3421,6 +3564,9 @@ export interface SubmissionsQueryBuilder {
|
|
|
3421
3564
|
find: () => Promise<SubmissionsQueryResult>;
|
|
3422
3565
|
}
|
|
3423
3566
|
/**
|
|
3567
|
+
* > **Note**:
|
|
3568
|
+
* > The Submissions API is only available in the Wix Studio editor.
|
|
3569
|
+
*
|
|
3424
3570
|
* Counts the number of submissions belonging to the specified forms.
|
|
3425
3571
|
* @param formIds - Form IDs.
|
|
3426
3572
|
* @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.
|
|
@@ -3443,7 +3589,10 @@ export interface CountSubmissionsOptions {
|
|
|
3443
3589
|
statuses?: SubmissionStatus[];
|
|
3444
3590
|
}
|
|
3445
3591
|
/**
|
|
3446
|
-
*
|
|
3592
|
+
* > **Note:**
|
|
3593
|
+
* > The Submissions API is only available in the Wix Studio editor.
|
|
3594
|
+
*
|
|
3595
|
+
* Counts the number of submissions belonging to the specified forms.
|
|
3447
3596
|
* @param formIds - Form IDs.
|
|
3448
3597
|
* @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.
|
|
3449
3598
|
* @public
|
|
@@ -3465,7 +3614,10 @@ export interface CountDeletedSubmissionsOptions {
|
|
|
3465
3614
|
statuses?: SubmissionStatus[];
|
|
3466
3615
|
}
|
|
3467
3616
|
/**
|
|
3468
|
-
*
|
|
3617
|
+
* > **Note:**
|
|
3618
|
+
* > The Submissions API is only available in the Wix Studio editor.
|
|
3619
|
+
*
|
|
3620
|
+
* Retrieves a URL generated by Media Manager to use when creating a submission that includes a field for uploading files.
|
|
3469
3621
|
*
|
|
3470
3622
|
* @param formId - Form ID.
|
|
3471
3623
|
* @param filename - Name of file to upload.
|
|
@@ -3484,7 +3636,11 @@ export interface CountDeletedSubmissionsOptions {
|
|
|
3484
3636
|
*/
|
|
3485
3637
|
export declare function getMediaUploadUrl(formId: string, filename: string, mimeType: string): Promise<GetMediaUploadURLResponse & GetMediaUploadURLResponseNonNullableFields>;
|
|
3486
3638
|
/**
|
|
3487
|
-
*
|
|
3639
|
+
* > **Note**:
|
|
3640
|
+
* > The Submissions API is only available in the Wix Studio editor.
|
|
3641
|
+
*
|
|
3642
|
+
* Marks form submissions as **seen**.
|
|
3643
|
+
* Only site collaborators with **Manage Submission** permissions can mark submissions.
|
|
3488
3644
|
* @param ids - Submission IDs to mark as seen.
|
|
3489
3645
|
* @param formId - ID of the form which the submissions belongs to.
|
|
3490
3646
|
* @public
|