@wix/auto_sdk_forms_submissions 1.0.148 → 1.0.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/build/cjs/{forms-v4-submission-submissions.universal-DpxoO7nJ.d.ts → forms-v4-submission-submissions.universal-Bfo2P_8S.d.ts} +137 -21
  2. package/build/cjs/index.d.ts +2 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +2 -2
  5. package/build/cjs/index.typings.js.map +1 -1
  6. package/build/cjs/meta.d.ts +118 -20
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/cjs/schemas.js +43 -23
  9. package/build/cjs/schemas.js.map +1 -1
  10. package/build/es/{forms-v4-submission-submissions.universal-DpxoO7nJ.d.mts → forms-v4-submission-submissions.universal-Bfo2P_8S.d.mts} +137 -21
  11. package/build/es/index.d.mts +2 -2
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +2 -2
  14. package/build/es/index.typings.mjs.map +1 -1
  15. package/build/es/meta.d.mts +118 -20
  16. package/build/es/meta.mjs.map +1 -1
  17. package/build/es/schemas.mjs +43 -23
  18. package/build/es/schemas.mjs.map +1 -1
  19. package/build/internal/cjs/{forms-v4-submission-submissions.universal-DpHNZLTq.d.ts → forms-v4-submission-submissions.universal-VEnQJRaC.d.ts} +137 -21
  20. package/build/internal/cjs/index.d.ts +2 -2
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +2 -2
  23. package/build/internal/cjs/index.typings.js.map +1 -1
  24. package/build/internal/cjs/meta.d.ts +118 -20
  25. package/build/internal/cjs/meta.js.map +1 -1
  26. package/build/internal/cjs/schemas.js +43 -23
  27. package/build/internal/cjs/schemas.js.map +1 -1
  28. package/build/internal/es/{forms-v4-submission-submissions.universal-DpHNZLTq.d.mts → forms-v4-submission-submissions.universal-VEnQJRaC.d.mts} +137 -21
  29. package/build/internal/es/index.d.mts +2 -2
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +2 -2
  32. package/build/internal/es/index.typings.mjs.map +1 -1
  33. package/build/internal/es/meta.d.mts +118 -20
  34. package/build/internal/es/meta.mjs.map +1 -1
  35. package/build/internal/es/schemas.mjs +43 -23
  36. package/build/internal/es/schemas.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { hG as UpsertContactFromSubmissionRequest$1, a as UpsertContactFromSubmissionResponse$1, hI as CreateSubmissionRequest$1, hJ as CreateSubmissionResponse$1, hV as GetSubmissionRequest$1, hW as GetSubmissionResponse$1, hZ as UpdateSubmissionRequest$1, h_ as UpdateSubmissionResponse$1, h$ as ConfirmSubmissionRequest$1, f as ConfirmSubmissionResponse$1, i0 as DeleteSubmissionRequest$1, i1 as DeleteSubmissionResponse$1, i2 as BulkDeleteSubmissionRequest$1, g as BulkDeleteSubmissionResponse$1, i4 as RestoreSubmissionFromTrashBinRequest$1, R as RestoreSubmissionFromTrashBinResponse$1, i5 as RemoveSubmissionFromTrashBinRequest$1, i6 as RemoveSubmissionFromTrashBinResponse$1, i7 as BulkRemoveSubmissionFromTrashBinRequest$1, i as BulkRemoveSubmissionFromTrashBinResponse$1, i9 as ListDeletedSubmissionsRequest$1, j as ListDeletedSubmissionsResponse$1, ia as GetDeletedSubmissionRequest$1, G as GetDeletedSubmissionResponse$1, ib as QuerySubmissionRequest$1, l as QuerySubmissionResponse$1, ic as SearchSubmissionsByNamespaceRequest$1, S as SearchSubmissionsByNamespaceResponse$1, ig as QuerySubmissionsByNamespaceRequest$1, ih as QuerySubmissionsByNamespaceResponse$1, ik as CountSubmissionsByFilterRequest$1, o as CountSubmissionsByFilterResponse$1, im as CountSubmissionsRequest$1, q as CountSubmissionsResponse$1, io as CountDeletedSubmissionsRequest$1, s as CountDeletedSubmissionsResponse$1, iq as GetMediaUploadURLRequest$1, t as GetMediaUploadURLResponse$1, ir as BulkMarkSubmissionsAsSeenRequest$1, u as BulkMarkSubmissionsAsSeenResponse$1, is as GetSubmissionDownloadUrlRequest$1, v as GetSubmissionDownloadUrlResponse$1, iw as DownloadSubmissionRequest$1, w as RawHttpResponse$1, iy as GetFormattedSubmissionRequest$1, x as GetFormattedSubmissionResponse$1, iD as UpdateExtendedFieldsRequest$1, z as UpdateExtendedFieldsResponse$1, iE as BulkUpdateFormSubmissionTagsRequest$1, E as BulkUpdateFormSubmissionTagsResponse$1, iG as BulkUpdateFormSubmissionTagsByFilterRequest$1, I as BulkUpdateFormSubmissionTagsByFilterResponse$1, iH as ValidateFormSubmissionRequest$1, J as ValidateFormSubmissionResponse$1 } from './forms-v4-submission-submissions.universal-DpHNZLTq.mjs';
1
+ import { hG as UpsertContactFromSubmissionRequest$1, a as UpsertContactFromSubmissionResponse$1, hI as CreateSubmissionRequest$1, hJ as CreateSubmissionResponse$1, hV as GetSubmissionRequest$1, hW as GetSubmissionResponse$1, hZ as UpdateSubmissionRequest$1, h_ as UpdateSubmissionResponse$1, h$ as ConfirmSubmissionRequest$1, f as ConfirmSubmissionResponse$1, i0 as DeleteSubmissionRequest$1, i1 as DeleteSubmissionResponse$1, i2 as BulkDeleteSubmissionRequest$1, g as BulkDeleteSubmissionResponse$1, i4 as RestoreSubmissionFromTrashBinRequest$1, R as RestoreSubmissionFromTrashBinResponse$1, i5 as RemoveSubmissionFromTrashBinRequest$1, i6 as RemoveSubmissionFromTrashBinResponse$1, i7 as BulkRemoveSubmissionFromTrashBinRequest$1, i as BulkRemoveSubmissionFromTrashBinResponse$1, i9 as ListDeletedSubmissionsRequest$1, j as ListDeletedSubmissionsResponse$1, ia as GetDeletedSubmissionRequest$1, G as GetDeletedSubmissionResponse$1, ib as QuerySubmissionRequest$1, l as QuerySubmissionResponse$1, ic as SearchSubmissionsByNamespaceRequest$1, S as SearchSubmissionsByNamespaceResponse$1, ig as QuerySubmissionsByNamespaceRequest$1, ih as QuerySubmissionsByNamespaceResponse$1, ik as CountSubmissionsByFilterRequest$1, o as CountSubmissionsByFilterResponse$1, im as CountSubmissionsRequest$1, q as CountSubmissionsResponse$1, io as CountDeletedSubmissionsRequest$1, s as CountDeletedSubmissionsResponse$1, iq as GetMediaUploadURLRequest$1, t as GetMediaUploadURLResponse$1, ir as BulkMarkSubmissionsAsSeenRequest$1, u as BulkMarkSubmissionsAsSeenResponse$1, is as GetSubmissionDownloadUrlRequest$1, v as GetSubmissionDownloadUrlResponse$1, iw as DownloadSubmissionRequest$1, w as RawHttpResponse$1, iy as GetFormattedSubmissionRequest$1, x as GetFormattedSubmissionResponse$1, iD as UpdateExtendedFieldsRequest$1, z as UpdateExtendedFieldsResponse$1, iE as BulkUpdateFormSubmissionTagsRequest$1, E as BulkUpdateFormSubmissionTagsResponse$1, iG as BulkUpdateFormSubmissionTagsByFilterRequest$1, I as BulkUpdateFormSubmissionTagsByFilterResponse$1, iH as ValidateFormSubmissionRequest$1, J as ValidateFormSubmissionResponse$1 } from './forms-v4-submission-submissions.universal-VEnQJRaC.mjs';
2
2
  import '@wix/sdk-types';
3
3
 
4
4
  /** Form submission that was created or retrieved. */
@@ -22,9 +22,27 @@ interface FormSubmission {
22
22
  * @readonly
23
23
  */
24
24
  namespace?: string;
25
- /** Status of the submission. */
25
+ /**
26
+ * Status of the submission.
27
+ *
28
+ * The status a submission is created with depends on the form's namespace and on whether the form collects payment, so read it from the response rather than assuming.
29
+ *
30
+ * A submission for a form that collects payment starts as `PAYMENT_WAITING`. Otherwise, most namespaces record the submission immediately as `CONFIRMED`. Namespaces that need to complete another step first, such as taking payment for a pricing plan, create the submission as `PENDING` and confirm it later with Confirm Submission.
31
+ *
32
+ * A `PENDING` submission isn't recorded yet, and is deleted automatically if it isn't confirmed in time.
33
+ */
26
34
  status?: SubmissionStatusWithLiterals;
27
- /** Submission values where `key` is the form field and `value` is the data submitted for the given field. */
35
+ /**
36
+ * Values the visitor submitted.
37
+ *
38
+ * Each key is the `target` of a field in the form schema, which is the field's stable storage key rather than its ID or label. Only keys matching a field target are accepted.
39
+ *
40
+ * Each value's shape follows that field's `inputType`: `STRING` fields submit a string, `NUMBER` a number, `BOOLEAN` a boolean, and `ARRAY` an array of the selected option values. Date and time fields are strings.
41
+ *
42
+ * 3 input types submit structured values: `ADDRESS` submits an address object, `PAYMENT` an array holding 1 product object per item bought, and `SCHEDULING` an appointment object.
43
+ *
44
+ * For the full mapping, see [Submission values](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/introduction#submission-values).
45
+ */
28
46
  submissions?: Record<string, any>;
29
47
  /**
30
48
  * Date and time the form submission was created.
@@ -698,12 +716,20 @@ interface Form {
698
716
  fields?: FormField[];
699
717
  /**
700
718
  * Form fields that define the input elements and their validation rules.
719
+ *
720
+ * The order of this array isn't the order the fields are displayed in. Display order comes from `steps`, where each layout item positions a field by `row` and `column`. Don't render fields in array order.
721
+ *
722
+ * For a detailed explanation of how to compose each kind of field, including which `identifier`, `inputType`, and `componentType` values to combine, see [About Form Fields](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/about-form-fields).
701
723
  * @maxSize 500
702
724
  */
703
725
  formFields?: Field[];
704
726
  /**
705
727
  * Layout configuration that defines how form fields are organized across multiple steps.
706
728
  * Each step represents a page of the form.
729
+ *
730
+ * Every field in `form_fields`, including the submit button, must be placed by a layout item whose `field_id` matches the field's `id`. A field that isn't placed still stores submitted values, but the Wix dashboard renders it, and the submissions made against it, as empty.
731
+ *
732
+ * Use a single step unless the form is split across pages.
707
733
  * @maxSize 100
708
734
  */
709
735
  steps?: Step[];
@@ -830,6 +856,8 @@ interface Form {
830
856
  enabled?: boolean | null;
831
857
  /**
832
858
  * Display name of the form schema.
859
+ *
860
+ * Names are unique in a namespace. If the name you pass is already taken, the request still succeeds, and the form schema is stored under a numbered variation of that name instead of returning an error. Read `name` from the response to learn the name the schema was actually saved under.
833
861
  * @maxLength 200
834
862
  */
835
863
  name?: string | null;
@@ -1463,6 +1491,8 @@ interface Field extends FieldFieldTypeOptionsOneOf {
1463
1491
  displayOptions?: DisplayField;
1464
1492
  /**
1465
1493
  * Field ID.
1494
+ *
1495
+ * The ID is stored in lowercase. Because the form's layout references each field by this ID, pass a lowercase GUID so that `id` and the layout's `field_id` still match after the form schema is stored. IDs must be unique in the form.
1466
1496
  * @format GUID
1467
1497
  * @immutable
1468
1498
  */
@@ -1474,11 +1504,24 @@ interface Field extends FieldFieldTypeOptionsOneOf {
1474
1504
  */
1475
1505
  hidden?: boolean;
1476
1506
  /**
1477
- * Custom identification for the field. This is intended as a way for you to identify certain fields that you want to apply special behavior to in your own logic.
1507
+ * Identification for the field, describing its purpose. For example, `TEXT_INPUT` or `CONTACTS_EMAIL`.
1508
+ *
1509
+ * Set this to the known value for the kind of field you're creating.
1510
+ * An unrecognized value, such as a custom string or a GUID, is dropped rather than rejected: the request still succeeds, but the field doesn't appear in the response's `form_fields`, and neither the field nor its submitted values appear in the Wix dashboard.
1511
+ *
1512
+ * Several fields share a general-purpose `componentType`, so `identifier` is often the only value that distinguishes them.
1513
+ * For example, both a short answer field and a long answer field use the `TEXT_INPUT` component, and are told apart by their `TEXT_INPUT` and `TEXT_AREA` identifiers.
1514
+ *
1515
+ * For the full list of known values, see [About Form Fields](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/about-form-fields).
1478
1516
  * @maxLength 50
1479
1517
  */
1480
1518
  identifier?: string | null;
1481
- /** Field type. */
1519
+ /**
1520
+ * Field type.
1521
+ *
1522
+ * `INPUT` fields collect data from submitters and are configured in `input_options`.
1523
+ * `DISPLAY` fields show information without collecting data and are configured in `display_options`.
1524
+ */
1482
1525
  fieldType?: FieldTypeWithLiterals;
1483
1526
  }
1484
1527
  /** @oneof */
@@ -1509,11 +1552,23 @@ interface InputField extends InputFieldInputTypeOptionsOneOf {
1509
1552
  arrayOptions?: _Array;
1510
1553
  /** Object input field settings. */
1511
1554
  objectOptions?: _Object;
1512
- /** File input field settings. Files are uploaded to the [Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager). */
1555
+ /**
1556
+ * File input field settings. Files are uploaded to the [Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager).
1557
+ *
1558
+ * > **Note:** File upload and signature fields are premium features. The site must have a Core premium plan or higher. Creating a form schema with one of these fields on a site without a qualifying plan fails.
1559
+ */
1513
1560
  wixFileOptions?: WixFile;
1514
- /** Payment input field settings. */
1561
+ /**
1562
+ * Payment input field settings.
1563
+ *
1564
+ * > **Note:** Payment fields are premium features that also depend on another app. The site must have a Core premium plan or higher, and the Wix eCommerce app must be installed. Creating a form schema with a payment field on a site that doesn't meet both requirements fails.
1565
+ */
1515
1566
  paymentOptions?: Payment;
1516
- /** Scheduling input field settings. */
1567
+ /**
1568
+ * Scheduling input field settings.
1569
+ *
1570
+ * > **Note:** Scheduling fields require the Wix Meetings app to be installed on the site. Creating a form schema with a scheduling field on a site without the app fails.
1571
+ */
1517
1572
  schedulingOptions?: Scheduling;
1518
1573
  /** Address input field settings. */
1519
1574
  addressOptions?: Address;
@@ -1559,7 +1614,14 @@ interface InputField extends InputFieldInputTypeOptionsOneOf {
1559
1614
  * Default: `false`
1560
1615
  */
1561
1616
  required?: boolean;
1562
- /** Type of the input field that determines what kind of data it collects. */
1617
+ /**
1618
+ * Type of the input field that determines what kind of data it collects.
1619
+ *
1620
+ * `input_type` selects which options object applies. For example, `STRING` is configured in `string_options`, and `PAYMENT` in `payment_options`.
1621
+ * That options object then sets a `component_type`, which selects the UI component and its own nested settings object.
1622
+ *
1623
+ * For which combinations produce which field, see [About Form Fields](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/about-form-fields).
1624
+ */
1563
1625
  inputType?: InputTypeWithLiterals;
1564
1626
  /**
1565
1627
  * Mapping configuration for automatically saving field values to contact properties.
@@ -1586,11 +1648,23 @@ interface InputFieldInputTypeOptionsOneOf {
1586
1648
  arrayOptions?: _Array;
1587
1649
  /** Object input field settings. */
1588
1650
  objectOptions?: _Object;
1589
- /** File input field settings. Files are uploaded to the [Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager). */
1651
+ /**
1652
+ * File input field settings. Files are uploaded to the [Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager).
1653
+ *
1654
+ * > **Note:** File upload and signature fields are premium features. The site must have a Core premium plan or higher. Creating a form schema with one of these fields on a site without a qualifying plan fails.
1655
+ */
1590
1656
  wixFileOptions?: WixFile;
1591
- /** Payment input field settings. */
1657
+ /**
1658
+ * Payment input field settings.
1659
+ *
1660
+ * > **Note:** Payment fields are premium features that also depend on another app. The site must have a Core premium plan or higher, and the Wix eCommerce app must be installed. Creating a form schema with a payment field on a site that doesn't meet both requirements fails.
1661
+ */
1592
1662
  paymentOptions?: Payment;
1593
- /** Scheduling input field settings. */
1663
+ /**
1664
+ * Scheduling input field settings.
1665
+ *
1666
+ * > **Note:** Scheduling fields require the Wix Meetings app to be installed on the site. Creating a form schema with a scheduling field on a site without the app fails.
1667
+ */
1594
1668
  schedulingOptions?: Scheduling;
1595
1669
  /** Address input field settings. */
1596
1670
  addressOptions?: Address;
@@ -1665,7 +1739,7 @@ interface StringTypeFormatOptionsOneOf {
1665
1739
  phoneOptions?: PhoneConstraints;
1666
1740
  }
1667
1741
  declare enum FormatEnumFormat {
1668
- /** Unknown format. */
1742
+ /** No format constraint. This is the default, and the value a field reads back with when it doesn't restrict its format. */
1669
1743
  UNKNOWN_FORMAT = "UNKNOWN_FORMAT",
1670
1744
  /** Date format. */
1671
1745
  DATE = "DATE",
@@ -6191,7 +6265,11 @@ interface _String extends _StringComponentTypeOptionsOneOf {
6191
6265
  timeInputOptions?: TimeInput;
6192
6266
  /** Date picker component settings. */
6193
6267
  datePickerOptions?: DatePicker;
6194
- /** Services dropdown component settings. */
6268
+ /**
6269
+ * Services dropdown component settings. Each option's `value` is a Wix Services service ID.
6270
+ *
6271
+ * > **Note:** Service fields require the Wix Services app to be installed on the site. Creating a form schema with a service field on a site without the app fails.
6272
+ */
6195
6273
  servicesDropdownOptions?: ServicesDropdown;
6196
6274
  /** Password component settings. */
6197
6275
  passwordOptions?: Password;
@@ -6223,7 +6301,11 @@ interface _StringComponentTypeOptionsOneOf {
6223
6301
  timeInputOptions?: TimeInput;
6224
6302
  /** Date picker component settings. */
6225
6303
  datePickerOptions?: DatePicker;
6226
- /** Services dropdown component settings. */
6304
+ /**
6305
+ * Services dropdown component settings. Each option's `value` is a Wix Services service ID.
6306
+ *
6307
+ * > **Note:** Service fields require the Wix Services app to be installed on the site. Creating a form schema with a service field on a site without the app fails.
6308
+ */
6227
6309
  servicesDropdownOptions?: ServicesDropdown;
6228
6310
  /** Password component settings. */
6229
6311
  passwordOptions?: Password;
@@ -6268,7 +6350,11 @@ interface _Array extends _ArrayComponentTypeOptionsOneOf {
6268
6350
  checkboxGroupOptions?: CheckboxGroup;
6269
6351
  /** Tags component settings. */
6270
6352
  tagsOptions?: ComponentsTags;
6271
- /** Services checkbox group input field */
6353
+ /**
6354
+ * Services checkbox group component settings. Each option's `value` is a Wix Services service ID.
6355
+ *
6356
+ * > **Note:** Service fields require the Wix Services app to be installed on the site. Creating a form schema with a service field on a site without the app fails.
6357
+ */
6272
6358
  servicesCheckboxGroupOptions?: ServicesCheckboxGroup;
6273
6359
  /** Validation configuration for the array input. */
6274
6360
  validation?: ArrayType;
@@ -6286,7 +6372,11 @@ interface _ArrayComponentTypeOptionsOneOf {
6286
6372
  checkboxGroupOptions?: CheckboxGroup;
6287
6373
  /** Tags component settings. */
6288
6374
  tagsOptions?: ComponentsTags;
6289
- /** Services checkbox group input field */
6375
+ /**
6376
+ * Services checkbox group component settings. Each option's `value` is a Wix Services service ID.
6377
+ *
6378
+ * > **Note:** Service fields require the Wix Services app to be installed on the site. Creating a form schema with a service field on a site without the app fails.
6379
+ */
6290
6380
  servicesCheckboxGroupOptions?: ServicesCheckboxGroup;
6291
6381
  }
6292
6382
  interface _Object {
@@ -7229,14 +7319,22 @@ interface SubmissionValidationErrorsDetails {
7229
7319
  }
7230
7320
  interface ValidationError {
7231
7321
  /**
7232
- * Path indicating the source of the error, such as `submission.submissions.email`
7322
+ * Path to the value that failed validation, relative to the submission's values.
7323
+ *
7324
+ * For a top-level field this is the field's `target`, such as `email`. For a value nested inside a field, the path continues with `/`, such as `address/postal_code` for an address subfield, or `attachments/0/fileId` for an element of an array field.
7233
7325
  * @maxLength 1000
7234
7326
  */
7235
7327
  errorPath?: string;
7236
- /** Error type. */
7328
+ /**
7329
+ * Error type.
7330
+ *
7331
+ * Switch on this rather than parsing `error_message`, which carries the underlying validator's wording and isn't a stable contract.
7332
+ */
7237
7333
  errorType?: ErrorTypeWithLiterals;
7238
7334
  /**
7239
- * Error message.
7335
+ * Human readable description of the error, in English.
7336
+ *
7337
+ * This comes from the schema validator and is meant for debugging. It isn't localized and its wording can change, so don't parse it or show it to submitters. Use `error_type` to decide what to display.
7240
7338
  * @maxLength 1000
7241
7339
  */
7242
7340
  errorMessage?: string;