@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 { hC as UpsertContactFromSubmissionRequest$1, a as UpsertContactFromSubmissionResponse$1, hE as CreateSubmissionRequest$1, hF as CreateSubmissionResponse$1, hR as GetSubmissionRequest$1, hS as GetSubmissionResponse$1, hV as UpdateSubmissionRequest$1, hW as UpdateSubmissionResponse$1, hX as ConfirmSubmissionRequest$1, f as ConfirmSubmissionResponse$1, hY as DeleteSubmissionRequest$1, hZ as DeleteSubmissionResponse$1, h_ as BulkDeleteSubmissionRequest$1, g as BulkDeleteSubmissionResponse$1, i0 as RestoreSubmissionFromTrashBinRequest$1, R as RestoreSubmissionFromTrashBinResponse$1, i1 as RemoveSubmissionFromTrashBinRequest$1, i2 as RemoveSubmissionFromTrashBinResponse$1, i3 as BulkRemoveSubmissionFromTrashBinRequest$1, i as BulkRemoveSubmissionFromTrashBinResponse$1, i5 as ListDeletedSubmissionsRequest$1, j as ListDeletedSubmissionsResponse$1, i6 as GetDeletedSubmissionRequest$1, G as GetDeletedSubmissionResponse$1, i7 as QuerySubmissionRequest$1, l as QuerySubmissionResponse$1, i8 as SearchSubmissionsByNamespaceRequest$1, S as SearchSubmissionsByNamespaceResponse$1, ib as QuerySubmissionsByNamespaceRequest$1, ic as QuerySubmissionsByNamespaceResponse$1, ig as CountSubmissionsByFilterRequest$1, o as CountSubmissionsByFilterResponse$1, ii as CountSubmissionsRequest$1, q as CountSubmissionsResponse$1, ij as CountDeletedSubmissionsRequest$1, s as CountDeletedSubmissionsResponse$1, il as GetMediaUploadURLRequest$1, t as GetMediaUploadURLResponse$1, im as BulkMarkSubmissionsAsSeenRequest$1, u as BulkMarkSubmissionsAsSeenResponse$1, io as GetSubmissionDownloadUrlRequest$1, v as GetSubmissionDownloadUrlResponse$1, is as DownloadSubmissionRequest$1, w as RawHttpResponse$1, iu as GetFormattedSubmissionRequest$1, x as GetFormattedSubmissionResponse$1, iz as UpdateExtendedFieldsRequest$1, z as UpdateExtendedFieldsResponse$1, iA as BulkUpdateFormSubmissionTagsRequest$1, iB as BulkUpdateFormSubmissionTagsResponse$1, iD as BulkUpdateFormSubmissionTagsByFilterRequest$1, iE as BulkUpdateFormSubmissionTagsByFilterResponse$1, iF as ValidateFormSubmissionRequest$1, A as ValidateFormSubmissionResponse$1 } from './forms-v4-submission-submissions.universal-DpxoO7nJ.js';
1
+ import { hC as UpsertContactFromSubmissionRequest$1, a as UpsertContactFromSubmissionResponse$1, hE as CreateSubmissionRequest$1, hF as CreateSubmissionResponse$1, hR as GetSubmissionRequest$1, hS as GetSubmissionResponse$1, hV as UpdateSubmissionRequest$1, hW as UpdateSubmissionResponse$1, hX as ConfirmSubmissionRequest$1, f as ConfirmSubmissionResponse$1, hY as DeleteSubmissionRequest$1, hZ as DeleteSubmissionResponse$1, h_ as BulkDeleteSubmissionRequest$1, g as BulkDeleteSubmissionResponse$1, i0 as RestoreSubmissionFromTrashBinRequest$1, R as RestoreSubmissionFromTrashBinResponse$1, i1 as RemoveSubmissionFromTrashBinRequest$1, i2 as RemoveSubmissionFromTrashBinResponse$1, i3 as BulkRemoveSubmissionFromTrashBinRequest$1, i as BulkRemoveSubmissionFromTrashBinResponse$1, i5 as ListDeletedSubmissionsRequest$1, j as ListDeletedSubmissionsResponse$1, i6 as GetDeletedSubmissionRequest$1, G as GetDeletedSubmissionResponse$1, i7 as QuerySubmissionRequest$1, l as QuerySubmissionResponse$1, i8 as SearchSubmissionsByNamespaceRequest$1, S as SearchSubmissionsByNamespaceResponse$1, ib as QuerySubmissionsByNamespaceRequest$1, ic as QuerySubmissionsByNamespaceResponse$1, ig as CountSubmissionsByFilterRequest$1, o as CountSubmissionsByFilterResponse$1, ii as CountSubmissionsRequest$1, q as CountSubmissionsResponse$1, ij as CountDeletedSubmissionsRequest$1, s as CountDeletedSubmissionsResponse$1, il as GetMediaUploadURLRequest$1, t as GetMediaUploadURLResponse$1, im as BulkMarkSubmissionsAsSeenRequest$1, u as BulkMarkSubmissionsAsSeenResponse$1, io as GetSubmissionDownloadUrlRequest$1, v as GetSubmissionDownloadUrlResponse$1, is as DownloadSubmissionRequest$1, w as RawHttpResponse$1, iu as GetFormattedSubmissionRequest$1, x as GetFormattedSubmissionResponse$1, iz as UpdateExtendedFieldsRequest$1, z as UpdateExtendedFieldsResponse$1, iA as BulkUpdateFormSubmissionTagsRequest$1, iB as BulkUpdateFormSubmissionTagsResponse$1, iD as BulkUpdateFormSubmissionTagsByFilterRequest$1, iE as BulkUpdateFormSubmissionTagsByFilterResponse$1, iF as ValidateFormSubmissionRequest$1, A as ValidateFormSubmissionResponse$1 } from './forms-v4-submission-submissions.universal-Bfo2P_8S.js';
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.
@@ -645,12 +663,20 @@ interface Form {
645
663
  id?: string | null;
646
664
  /**
647
665
  * Form fields that define the input elements and their validation rules.
666
+ *
667
+ * 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.
668
+ *
669
+ * 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).
648
670
  * @maxSize 500
649
671
  */
650
672
  formFields?: Field[];
651
673
  /**
652
674
  * Layout configuration that defines how form fields are organized across multiple steps.
653
675
  * Each step represents a page of the form.
676
+ *
677
+ * 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.
678
+ *
679
+ * Use a single step unless the form is split across pages.
654
680
  * @maxSize 100
655
681
  */
656
682
  steps?: Step[];
@@ -739,6 +765,8 @@ interface Form {
739
765
  enabled?: boolean | null;
740
766
  /**
741
767
  * Display name of the form schema.
768
+ *
769
+ * 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.
742
770
  * @maxLength 200
743
771
  */
744
772
  name?: string | null;
@@ -1345,6 +1373,8 @@ interface Field extends FieldFieldTypeOptionsOneOf {
1345
1373
  displayOptions?: DisplayField;
1346
1374
  /**
1347
1375
  * Field ID.
1376
+ *
1377
+ * 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.
1348
1378
  * @format GUID
1349
1379
  * @immutable
1350
1380
  */
@@ -1356,11 +1386,24 @@ interface Field extends FieldFieldTypeOptionsOneOf {
1356
1386
  */
1357
1387
  hidden?: boolean;
1358
1388
  /**
1359
- * 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.
1389
+ * Identification for the field, describing its purpose. For example, `TEXT_INPUT` or `CONTACTS_EMAIL`.
1390
+ *
1391
+ * Set this to the known value for the kind of field you're creating.
1392
+ * 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.
1393
+ *
1394
+ * Several fields share a general-purpose `componentType`, so `identifier` is often the only value that distinguishes them.
1395
+ * 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.
1396
+ *
1397
+ * 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).
1360
1398
  * @maxLength 50
1361
1399
  */
1362
1400
  identifier?: string | null;
1363
- /** Field type. */
1401
+ /**
1402
+ * Field type.
1403
+ *
1404
+ * `INPUT` fields collect data from submitters and are configured in `input_options`.
1405
+ * `DISPLAY` fields show information without collecting data and are configured in `display_options`.
1406
+ */
1364
1407
  fieldType?: FieldTypeWithLiterals;
1365
1408
  }
1366
1409
  /** @oneof */
@@ -1391,11 +1434,23 @@ interface InputField extends InputFieldInputTypeOptionsOneOf {
1391
1434
  arrayOptions?: _Array;
1392
1435
  /** Object input field settings. */
1393
1436
  objectOptions?: _Object;
1394
- /** File input field settings. Files are uploaded to the [Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager). */
1437
+ /**
1438
+ * File input field settings. Files are uploaded to the [Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager).
1439
+ *
1440
+ * > **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.
1441
+ */
1395
1442
  wixFileOptions?: WixFile;
1396
- /** Payment input field settings. */
1443
+ /**
1444
+ * Payment input field settings.
1445
+ *
1446
+ * > **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.
1447
+ */
1397
1448
  paymentOptions?: Payment;
1398
- /** Scheduling input field settings. */
1449
+ /**
1450
+ * Scheduling input field settings.
1451
+ *
1452
+ * > **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.
1453
+ */
1399
1454
  schedulingOptions?: Scheduling;
1400
1455
  /** Address input field settings. */
1401
1456
  addressOptions?: Address;
@@ -1431,7 +1486,14 @@ interface InputField extends InputFieldInputTypeOptionsOneOf {
1431
1486
  * Default: `false`
1432
1487
  */
1433
1488
  required?: boolean;
1434
- /** Type of the input field that determines what kind of data it collects. */
1489
+ /**
1490
+ * Type of the input field that determines what kind of data it collects.
1491
+ *
1492
+ * `input_type` selects which options object applies. For example, `STRING` is configured in `string_options`, and `PAYMENT` in `payment_options`.
1493
+ * That options object then sets a `component_type`, which selects the UI component and its own nested settings object.
1494
+ *
1495
+ * For which combinations produce which field, see [About Form Fields](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/about-form-fields).
1496
+ */
1435
1497
  inputType?: InputTypeWithLiterals;
1436
1498
  /**
1437
1499
  * Mapping configuration for automatically saving field values to contact properties.
@@ -1458,11 +1520,23 @@ interface InputFieldInputTypeOptionsOneOf {
1458
1520
  arrayOptions?: _Array;
1459
1521
  /** Object input field settings. */
1460
1522
  objectOptions?: _Object;
1461
- /** File input field settings. Files are uploaded to the [Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager). */
1523
+ /**
1524
+ * File input field settings. Files are uploaded to the [Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager).
1525
+ *
1526
+ * > **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.
1527
+ */
1462
1528
  wixFileOptions?: WixFile;
1463
- /** Payment input field settings. */
1529
+ /**
1530
+ * Payment input field settings.
1531
+ *
1532
+ * > **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.
1533
+ */
1464
1534
  paymentOptions?: Payment;
1465
- /** Scheduling input field settings. */
1535
+ /**
1536
+ * Scheduling input field settings.
1537
+ *
1538
+ * > **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.
1539
+ */
1466
1540
  schedulingOptions?: Scheduling;
1467
1541
  /** Address input field settings. */
1468
1542
  addressOptions?: Address;
@@ -1527,7 +1601,7 @@ interface StringTypeFormatOptionsOneOf {
1527
1601
  phoneOptions?: PhoneConstraints;
1528
1602
  }
1529
1603
  declare enum FormatEnumFormat {
1530
- /** Unknown format. */
1604
+ /** No format constraint. This is the default, and the value a field reads back with when it doesn't restrict its format. */
1531
1605
  UNKNOWN_FORMAT = "UNKNOWN_FORMAT",
1532
1606
  /** Date format. */
1533
1607
  DATE = "DATE",
@@ -5969,7 +6043,11 @@ interface _String extends _StringComponentTypeOptionsOneOf {
5969
6043
  timeInputOptions?: TimeInput;
5970
6044
  /** Date picker component settings. */
5971
6045
  datePickerOptions?: DatePicker;
5972
- /** Services dropdown component settings. */
6046
+ /**
6047
+ * Services dropdown component settings. Each option's `value` is a Wix Services service ID.
6048
+ *
6049
+ * > **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.
6050
+ */
5973
6051
  servicesDropdownOptions?: ServicesDropdown;
5974
6052
  /** Password component settings. */
5975
6053
  passwordOptions?: Password;
@@ -5996,7 +6074,11 @@ interface _StringComponentTypeOptionsOneOf {
5996
6074
  timeInputOptions?: TimeInput;
5997
6075
  /** Date picker component settings. */
5998
6076
  datePickerOptions?: DatePicker;
5999
- /** Services dropdown component settings. */
6077
+ /**
6078
+ * Services dropdown component settings. Each option's `value` is a Wix Services service ID.
6079
+ *
6080
+ * > **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.
6081
+ */
6000
6082
  servicesDropdownOptions?: ServicesDropdown;
6001
6083
  /** Password component settings. */
6002
6084
  passwordOptions?: Password;
@@ -6036,7 +6118,11 @@ interface _Array extends _ArrayComponentTypeOptionsOneOf {
6036
6118
  checkboxGroupOptions?: CheckboxGroup;
6037
6119
  /** Tags component settings. */
6038
6120
  tagsOptions?: ComponentsTags;
6039
- /** Services checkbox group input field */
6121
+ /**
6122
+ * Services checkbox group component settings. Each option's `value` is a Wix Services service ID.
6123
+ *
6124
+ * > **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.
6125
+ */
6040
6126
  servicesCheckboxGroupOptions?: ServicesCheckboxGroup;
6041
6127
  /** Validation configuration for the array input. */
6042
6128
  validation?: ArrayType;
@@ -6049,7 +6135,11 @@ interface _ArrayComponentTypeOptionsOneOf {
6049
6135
  checkboxGroupOptions?: CheckboxGroup;
6050
6136
  /** Tags component settings. */
6051
6137
  tagsOptions?: ComponentsTags;
6052
- /** Services checkbox group input field */
6138
+ /**
6139
+ * Services checkbox group component settings. Each option's `value` is a Wix Services service ID.
6140
+ *
6141
+ * > **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.
6142
+ */
6053
6143
  servicesCheckboxGroupOptions?: ServicesCheckboxGroup;
6054
6144
  }
6055
6145
  interface _Object {
@@ -6982,14 +7072,22 @@ interface SubmissionValidationErrorsDetails {
6982
7072
  }
6983
7073
  interface ValidationError {
6984
7074
  /**
6985
- * Path indicating the source of the error, such as `submission.submissions.email`
7075
+ * Path to the value that failed validation, relative to the submission's values.
7076
+ *
7077
+ * 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.
6986
7078
  * @maxLength 1000
6987
7079
  */
6988
7080
  errorPath?: string;
6989
- /** Error type. */
7081
+ /**
7082
+ * Error type.
7083
+ *
7084
+ * Switch on this rather than parsing `error_message`, which carries the underlying validator's wording and isn't a stable contract.
7085
+ */
6990
7086
  errorType?: ErrorTypeWithLiterals;
6991
7087
  /**
6992
- * Error message.
7088
+ * Human readable description of the error, in English.
7089
+ *
7090
+ * 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.
6993
7091
  * @maxLength 1000
6994
7092
  */
6995
7093
  errorMessage?: string;