@wix/data 1.0.3 → 1.0.4

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 (49) hide show
  1. package/build/cjs/src/data-v1-external-database-connection.http.d.ts +4 -4
  2. package/build/cjs/src/data-v1-external-database-connection.http.js +4 -4
  3. package/build/cjs/src/data-v1-external-database-connection.http.js.map +1 -1
  4. package/build/cjs/src/data-v1-external-database-connection.types.d.ts +2 -2
  5. package/build/cjs/src/data-v1-external-database-connection.universal.d.ts +9 -6
  6. package/build/cjs/src/data-v1-external-database-connection.universal.js +6 -4
  7. package/build/cjs/src/data-v1-external-database-connection.universal.js.map +1 -1
  8. package/build/cjs/src/data-v2-data-collection.http.d.ts +4 -4
  9. package/build/cjs/src/data-v2-data-collection.http.js +4 -4
  10. package/build/cjs/src/data-v2-data-collection.types.d.ts +1 -1
  11. package/build/cjs/src/data-v2-data-collection.universal.d.ts +9 -5
  12. package/build/cjs/src/data-v2-data-collection.universal.js +8 -4
  13. package/build/cjs/src/data-v2-data-collection.universal.js.map +1 -1
  14. package/build/cjs/src/data-v2-data-item.http.d.ts +44 -22
  15. package/build/cjs/src/data-v2-data-item.http.js +44 -22
  16. package/build/cjs/src/data-v2-data-item.http.js.map +1 -1
  17. package/build/cjs/src/data-v2-data-item.universal.d.ts +77 -37
  18. package/build/cjs/src/data-v2-data-item.universal.js +62 -21
  19. package/build/cjs/src/data-v2-data-item.universal.js.map +1 -1
  20. package/build/cjs/src/data-v2-index.http.d.ts +3 -3
  21. package/build/cjs/src/data-v2-index.http.js +3 -3
  22. package/build/cjs/src/data-v2-index.universal.d.ts +15 -9
  23. package/build/cjs/src/data-v2-index.universal.js +6 -3
  24. package/build/cjs/src/data-v2-index.universal.js.map +1 -1
  25. package/build/es/src/data-v1-external-database-connection.http.d.ts +4 -4
  26. package/build/es/src/data-v1-external-database-connection.http.js +4 -4
  27. package/build/es/src/data-v1-external-database-connection.http.js.map +1 -1
  28. package/build/es/src/data-v1-external-database-connection.types.d.ts +2 -2
  29. package/build/es/src/data-v1-external-database-connection.universal.d.ts +9 -6
  30. package/build/es/src/data-v1-external-database-connection.universal.js +6 -4
  31. package/build/es/src/data-v1-external-database-connection.universal.js.map +1 -1
  32. package/build/es/src/data-v2-data-collection.http.d.ts +4 -4
  33. package/build/es/src/data-v2-data-collection.http.js +4 -4
  34. package/build/es/src/data-v2-data-collection.types.d.ts +1 -1
  35. package/build/es/src/data-v2-data-collection.universal.d.ts +9 -5
  36. package/build/es/src/data-v2-data-collection.universal.js +8 -4
  37. package/build/es/src/data-v2-data-collection.universal.js.map +1 -1
  38. package/build/es/src/data-v2-data-item.http.d.ts +44 -22
  39. package/build/es/src/data-v2-data-item.http.js +44 -22
  40. package/build/es/src/data-v2-data-item.http.js.map +1 -1
  41. package/build/es/src/data-v2-data-item.universal.d.ts +77 -37
  42. package/build/es/src/data-v2-data-item.universal.js +62 -21
  43. package/build/es/src/data-v2-data-item.universal.js.map +1 -1
  44. package/build/es/src/data-v2-index.http.d.ts +3 -3
  45. package/build/es/src/data-v2-index.http.js +3 -3
  46. package/build/es/src/data-v2-index.universal.d.ts +15 -9
  47. package/build/es/src/data-v2-index.universal.js +6 -3
  48. package/build/es/src/data-v2-index.universal.js.map +1 -1
  49. package/package.json +2 -2
@@ -78,7 +78,7 @@ export interface GetDataItemRequest {
78
78
  /**
79
79
  * Whether to retrieve data from the primary database instance.
80
80
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
81
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
81
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
82
82
  *
83
83
  * Default: `false`
84
84
  */
@@ -124,7 +124,7 @@ export interface QueryDataItemsRequest {
124
124
  /**
125
125
  * Whether to retrieve data from the primary database instance.
126
126
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
127
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
127
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
128
128
  *
129
129
  * Default: `false`
130
130
  */
@@ -241,7 +241,7 @@ export interface AggregateDataItemsRequest extends AggregateDataItemsRequestPagi
241
241
  /**
242
242
  * Whether to retrieve data from the primary database instance.
243
243
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
244
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
244
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
245
245
  *
246
246
  * Default: `false`
247
247
  */
@@ -328,7 +328,7 @@ export interface CountDataItemsRequest {
328
328
  /**
329
329
  * Whether to retrieve data from the primary database instance.
330
330
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
331
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
331
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
332
332
  *
333
333
  * Default: `false`
334
334
  */
@@ -370,7 +370,7 @@ export interface QueryDistinctValuesRequest extends QueryDistinctValuesRequestPa
370
370
  /**
371
371
  * Whether to retrieve data from the primary database instance.
372
372
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
373
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
373
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
374
374
  *
375
375
  * Default: `false`
376
376
  */
@@ -519,7 +519,7 @@ export interface QueryReferencedDataItemsRequest extends QueryReferencedDataItem
519
519
  /**
520
520
  * Whether to retrieve data from the primary database instance.
521
521
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
522
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
522
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
523
523
  *
524
524
  * Default: `false`
525
525
  */
@@ -569,7 +569,7 @@ export interface IsReferencedDataItemRequest {
569
569
  /**
570
570
  * Whether to retrieve data from the primary database instance.
571
571
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
572
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
572
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
573
573
  *
574
574
  * Default: `false`
575
575
  */
@@ -665,18 +665,19 @@ export interface ReplaceDataItemReferencesResponse {
665
665
  *
666
666
  *
667
667
  * An item can only be inserted into an existing connection.
668
- * You can create a new collection using the [Data Collections API](https://dev.wix.com/api/rest/wix-data/wix-data/data-collections).
668
+ * You can create a new collection using the [Data Collections API](https://dev.wix.com/api/sdk/data/collections).
669
669
  *
670
670
  * When an item is inserted into a collection, the item's ID is automatically assigned a random value.
671
671
  * You can optionally provide a custom ID in `dataItem.id` when inserting the item.
672
672
  * If you specify an ID that already exists in the collection, the insertion will fail.
673
673
  *
674
- * If `dataItem.data` is empty, a new item is created with no data fields.
674
+ * If `options.dataItem.data` is empty, a new item is created with no data fields.
675
675
  * @public
676
676
  * @documentationMaturity preview
677
677
  * @requiredField options
678
678
  * @requiredField options.dataCollectionId
679
679
  * @requiredField options.dataItem
680
+ * @param options - Options for adding an item to a collection.
680
681
  */
681
682
  export declare function insertDataItem(options: InsertDataItemOptions): Promise<InsertDataItemResponse>;
682
683
  export interface InsertDataItemOptions {
@@ -689,7 +690,7 @@ export interface InsertDataItemOptions {
689
690
  * Updates an item in a collection.
690
691
  *
691
692
  *
692
- * This endpoint replaces the data item's existing data with the payload provided in `dataItem.data` in the request.
693
+ * This function replaces the data item's existing data with the payload provided in `options.dataItem.data` in the request.
693
694
  *
694
695
  * To update an item, you need to specify an item ID and a collection ID.
695
696
  * If an item is found in the specified collection with the specified ID, that item is updated.
@@ -698,7 +699,7 @@ export interface InsertDataItemOptions {
698
699
  * When an item is updated, its `data._updatedDate` field is changed to the current date and time.
699
700
  *
700
701
  * > **Note:**
701
- * > After an item is updated, it only contains the fields included in the `dataItem.data` payload in Update Data Item request.
702
+ * > After an item is updated, it only contains the fields included in the `options.dataItem.data` payload in the `updateDataItem()` call.
702
703
  * > If the existing item has fields with values and those fields aren't included in the updated item, their values are lost.
703
704
  * @param _id - Data item ID.
704
705
  * @public
@@ -707,9 +708,11 @@ export interface InsertDataItemOptions {
707
708
  * @requiredField options
708
709
  * @requiredField options.dataCollectionId
709
710
  * @requiredField options.dataItem
711
+ * @param options - Options for updating an item in a collection.
710
712
  */
711
713
  export declare function updateDataItem(_id: string, options: UpdateDataItemOptions): Promise<UpdateDataItemResponse>;
712
714
  export interface UpdateDataItemOptions {
715
+ /** Updated data item content. The existing data item's content is replaced entirely. */
713
716
  dataItem: {
714
717
  /** Data item ID. */
715
718
  _id?: string;
@@ -732,7 +735,7 @@ export interface UpdateDataItemOptions {
732
735
  * Inserts or updates an item in a collection.
733
736
  *
734
737
  *
735
- * The Save Data Item endpoint inserts or updates the specified item, depending on whether it already exists in the collection.
738
+ * The `saveDataItem()` function inserts or updates the specified item, depending on whether it already exists in the collection.
736
739
  *
737
740
  * + If you don't provide an ID, a new item is created.
738
741
  *
@@ -740,13 +743,14 @@ export interface UpdateDataItemOptions {
740
743
  *
741
744
  * + If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.
742
745
  *
743
- * > **Note:** When you provide an item with an ID that already exists in the collection, the payload you provide in `dataItem.data` replaces the existing item with that ID.
746
+ * > **Note:** When you provide an item with an ID that already exists in the collection, the payload you provide in `options.dataItem.data` replaces the existing item with that ID.
744
747
  * > This means that the item's previous fields and values are lost.
745
748
  * @public
746
749
  * @documentationMaturity preview
747
750
  * @requiredField options
748
751
  * @requiredField options.dataCollectionId
749
752
  * @requiredField options.dataItem
753
+ * @param options - Options for saving an item in a collection.
750
754
  */
751
755
  export declare function saveDataItem(options: SaveDataItemOptions): Promise<SaveDataItemResponse>;
752
756
  export interface SaveDataItemOptions {
@@ -757,12 +761,16 @@ export interface SaveDataItemOptions {
757
761
  }
758
762
  /**
759
763
  * Retrieves an item from a collection.
764
+ *
765
+ *
766
+ * > **Note**: When calling `getDataItem()` following an update to your collection, the data retrieved may not contain the most recent changes. See [Wix Data and Eventual Consistency](https://dev.wix.com/api/sdk/data/eventual-consistency) for more details. If you need the most up-to-date data, set `options.consistentRead` to `true`.
760
767
  * @param dataItemId - ID of the data item to retrieve.
761
768
  * @public
762
769
  * @documentationMaturity preview
763
770
  * @requiredField dataItemId
764
771
  * @requiredField options
765
772
  * @requiredField options.dataCollectionId
773
+ * @param options - Options for retrieving an item from a collection.
766
774
  * @returns Retrieved item.
767
775
  */
768
776
  export declare function getDataItem(dataItemId: string, options: GetDataItemOptions): Promise<DataItem>;
@@ -772,7 +780,7 @@ export interface GetDataItemOptions {
772
780
  /**
773
781
  * Whether to retrieve data from the primary database instance.
774
782
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
775
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
783
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
776
784
  *
777
785
  * Default: `false`
778
786
  */
@@ -792,6 +800,7 @@ export interface GetDataItemOptions {
792
800
  * @requiredField dataItemId
793
801
  * @requiredField options
794
802
  * @requiredField options.dataCollectionId
803
+ * @param options - Options for removing an item from a collection.
795
804
  */
796
805
  export declare function removeDataItem(dataItemId: string, options: RemoveDataItemOptions): Promise<RemoveDataItemResponse>;
797
806
  export interface RemoveDataItemOptions {
@@ -810,6 +819,7 @@ export interface RemoveDataItemOptions {
810
819
  * @documentationMaturity preview
811
820
  * @requiredField options
812
821
  * @requiredField options.dataCollectionId
822
+ * @param options - Options for truncating data items from a collection.
813
823
  */
814
824
  export declare function truncateDataItems(options: TruncateDataItemsOptions): Promise<void>;
815
825
  export interface TruncateDataItemsOptions {
@@ -817,14 +827,32 @@ export interface TruncateDataItemsOptions {
817
827
  dataCollectionId: string;
818
828
  }
819
829
  /**
820
- * Retrieves a list of items, on the basis of the filtering, sorting, and paging preferences you provide.
830
+ * Creates a query to retrieve items from a database collection.
831
+ *
832
+ * The `queryDataItems()` function builds a query to retrieve data items from a collection and returns a [`DataItemsQueryBuilder`](https://dev.wix.com/api/sdk/data/items/dataitemsquerybuilder) object.
833
+ *
834
+ * The returned object contains the query definition which is typically used to run the query using the [`find()`](https://dev.wix.com/api/sdk/data/items/dataitemsquerybuilder/find) function.
835
+ *
836
+ * You can refine the query by chaining [`DataItemsQueryBuilder](https://dev.wix.com/api/sdk/data/items/dataitemsquerybuilder) functions onto the query. [`DataItemsQueryBuilder](https://dev.wix.com/api/sdk/data/items/dataitemsquerybuilder) functions enable you to sort, filter, and control the results that `queryDataItems()` returns.
837
+ *
838
+ * The `queryDataItems()` function runs with the following [`DataItemsQueryBuilder](https://dev.wix.com/api/sdk/data/items/dataitemsquerybuilder) defaults that you can override:
839
+ *
840
+ * + [`skip`](https://dev.wix.com/api/sdk/data/items/dataitemsquerybuilder/skip): 0
841
+ * + [`limit`](https://dev.wix.com/api/sdk/data/items/dataitemsquerybuilder/limit): 50
842
+ * + [`descending`](https://dev.wix.com/api/sdk/data/items/dataitemsquerybuilder/descending): by `_createdDate`
843
+ *
844
+ * The functions that are chained to `queryDataItems()` are applied in the order they are called. For example, if you sort on an `age` field in ascending order and then on a `name` field in descending order, the results are sorted first by the age of the items and then, if there are multiple results with the same age, the items are sorted by name in descending order, per age value.
845
+ *
846
+ * If the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To get the data from referenced items, specify them in the `options.includeReferencedItems` parameter.
847
+ *
848
+ * > **Note**: When calling `queryDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. See [Wix Data and Eventual Consistency](https://dev.wix.com/api/sdk/data/items/getdataitem) for more details. If you need the most up-to-date data, set `options.consistentRead` to `true`.
821
849
  *
822
850
  *
823
- * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
824
851
  * @public
825
852
  * @documentationMaturity preview
826
853
  * @requiredField options.options
827
854
  * @requiredField options.options.dataCollectionId
855
+ * @param options - Options for querying data items.
828
856
  */
829
857
  export declare function queryDataItems(options: QueryDataItemsOptions): DataItemsQueryBuilder;
830
858
  export interface QueryDataItemsOptions {
@@ -845,7 +873,7 @@ export interface QueryDataItemsOptions {
845
873
  /**
846
874
  * Whether to retrieve data from the primary database instance.
847
875
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
848
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
876
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
849
877
  *
850
878
  * Default: `false`
851
879
  */
@@ -920,6 +948,7 @@ export interface DataItemsQueryBuilder {
920
948
  * @documentationMaturity preview
921
949
  * @requiredField options
922
950
  * @requiredField options.dataCollectionId
951
+ * @param options - Options for running an aggregation.
923
952
  */
924
953
  export declare function aggregateDataItems(options: AggregateDataItemsOptions): Promise<AggregateDataItemsResponse>;
925
954
  export interface AggregateDataItemsOptions extends AggregateDataItemsRequestPagingMethodOneOf {
@@ -950,7 +979,7 @@ export interface AggregateDataItemsOptions extends AggregateDataItemsRequestPagi
950
979
  /**
951
980
  * Whether to retrieve data from the primary database instance.
952
981
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
953
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
982
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
954
983
  *
955
984
  * Default: `false`
956
985
  */
@@ -962,6 +991,7 @@ export interface AggregateDataItemsOptions extends AggregateDataItemsRequestPagi
962
991
  * @documentationMaturity preview
963
992
  * @requiredField options
964
993
  * @requiredField options.dataCollectionId
994
+ * @param options - Options for counting the number of items in a data collection.
965
995
  */
966
996
  export declare function countDataItems(options: CountDataItemsOptions): Promise<CountDataItemsResponse>;
967
997
  export interface CountDataItemsOptions {
@@ -981,7 +1011,7 @@ export interface CountDataItemsOptions {
981
1011
  /**
982
1012
  * Whether to retrieve data from the primary database instance.
983
1013
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
984
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
1014
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
985
1015
  *
986
1016
  * Default: `false`
987
1017
  */
@@ -991,9 +1021,9 @@ export interface CountDataItemsOptions {
991
1021
  * Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.
992
1022
  *
993
1023
  *
994
- * As with the [Query Data Items](https://dev.wix.com/api/rest/wix-data/wix-data/data-items/query-data-items) endpoint, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
995
- * However, the Query Distinct Values endpoint doesn't return all of the full items that match the query.
996
- * Rather, it returns all unique values of the field you specify in `fieldName` for items that match the query.
1024
+ * As with [`queryDataItems()`](https://dev.wix.com/api/sdk/data/items/querydataitems), this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
1025
+ * However, `queryDistinctValues()` doesn't return all of the full items that match the query.
1026
+ * Rather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query.
997
1027
  * If more than one item has the same value for that field, that value appears only once.
998
1028
  *
999
1029
  * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
@@ -1001,6 +1031,7 @@ export interface CountDataItemsOptions {
1001
1031
  * @documentationMaturity preview
1002
1032
  * @requiredField options
1003
1033
  * @requiredField options.dataCollectionId
1034
+ * @param options - Options for querying distinct values.
1004
1035
  */
1005
1036
  export declare function queryDistinctValues(options: QueryDistinctValuesOptions): Promise<QueryDistinctValuesResponse>;
1006
1037
  export interface QueryDistinctValuesOptions extends QueryDistinctValuesRequestPagingMethodOneOf {
@@ -1035,9 +1066,7 @@ export interface QueryDistinctValuesOptions extends QueryDistinctValuesRequestPa
1035
1066
  /**
1036
1067
  * Whether to retrieve data from the primary database instance.
1037
1068
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
1038
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
1039
- *
1040
- * Default: `false`
1069
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
1041
1070
  */
1042
1071
  consistentRead?: boolean;
1043
1072
  }
@@ -1045,13 +1074,14 @@ export interface QueryDistinctValuesOptions extends QueryDistinctValuesRequestPa
1045
1074
  * Adds multiple items to a collection.
1046
1075
  *
1047
1076
  *
1048
- * When each item is inserted into a collection, its ID is automatically assigned to random value.
1077
+ * When each item is inserted into a collection, its ID is automatically assigned a random value.
1049
1078
  * You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.
1050
1079
  * @public
1051
1080
  * @documentationMaturity preview
1052
1081
  * @requiredField options
1053
1082
  * @requiredField options.dataCollectionId
1054
1083
  * @requiredField options.dataItems
1084
+ * @param options - Options for adding multiple items to a collection.
1055
1085
  */
1056
1086
  export declare function bulkInsertDataItems(options: BulkInsertDataItemsOptions): Promise<BulkInsertDataItemsResponse>;
1057
1087
  export interface BulkInsertDataItemsOptions {
@@ -1071,7 +1101,7 @@ export interface BulkInsertDataItemsOptions {
1071
1101
  * Updates multiple items in a collection.
1072
1102
  *
1073
1103
  *
1074
- * This endpoint replaces each specified data item's existing data with the payload provided in the request.
1104
+ * This function replaces each specified data item's existing data with the payload provided in the request.
1075
1105
  *
1076
1106
  * Each item in the request must include an ID. If an item is found in the specified collection with
1077
1107
  * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.
@@ -1086,6 +1116,7 @@ export interface BulkInsertDataItemsOptions {
1086
1116
  * @requiredField options
1087
1117
  * @requiredField options.dataCollectionId
1088
1118
  * @requiredField options.dataItems
1119
+ * @param options - Options for updating multiple items in a collection.
1089
1120
  */
1090
1121
  export declare function bulkUpdateDataItems(options: BulkUpdateDataItemsOptions): Promise<BulkUpdateDataItemsResponse>;
1091
1122
  export interface BulkUpdateDataItemsOptions {
@@ -1105,7 +1136,7 @@ export interface BulkUpdateDataItemsOptions {
1105
1136
  * Inserts or updates multiple items in a collection.
1106
1137
  *
1107
1138
  *
1108
- * The Bulk Save Data Items endpoint inserts or updates each item provided, depending on whether it already exists in the collection. For each item:
1139
+ * This function inserts or updates each item provided, depending on whether it already exists in the collection. For each item:
1109
1140
  *
1110
1141
  * + If you don't provide an ID, a new item is created.
1111
1142
  *
@@ -1120,6 +1151,7 @@ export interface BulkUpdateDataItemsOptions {
1120
1151
  * @requiredField options
1121
1152
  * @requiredField options.dataCollectionId
1122
1153
  * @requiredField options.dataItems
1154
+ * @param options - Options for saving multiple items in a collection.
1123
1155
  */
1124
1156
  export declare function bulkSaveDataItems(options: BulkSaveDataItemsOptions): Promise<BulkSaveDataItemsResponse>;
1125
1157
  export interface BulkSaveDataItemsOptions {
@@ -1147,6 +1179,7 @@ export interface BulkSaveDataItemsOptions {
1147
1179
  * @requiredField options
1148
1180
  * @requiredField options.dataCollectionId
1149
1181
  * @requiredField options.dataItemIds
1182
+ * @param options - Options for removing multiple items from a collection.
1150
1183
  */
1151
1184
  export declare function bulkRemoveDataItems(options: BulkRemoveDataItemsOptions): Promise<BulkRemoveDataItemsResponse>;
1152
1185
  export interface BulkRemoveDataItemsOptions {
@@ -1160,15 +1193,16 @@ export interface BulkRemoveDataItemsOptions {
1160
1193
  *
1161
1194
  *
1162
1195
  * Reference and multi-reference fields refer to items in different collections.
1163
- * Use this endpoint to retrieve the full details of the referenced items themselves.
1196
+ * Use this function to retrieve the full details of the referenced items themselves.
1164
1197
  *
1165
1198
  * For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.
1166
- * Querying the **Movies** collection using the Query Referenced Data Items endpoint returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
1199
+ * Querying the **Movies** collection using `queryReferencedDataItems()` returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
1167
1200
  * This gives you information from the **People** collection about each of the actors in the specified movie.
1168
1201
  * @public
1169
1202
  * @documentationMaturity preview
1170
1203
  * @requiredField options
1171
1204
  * @requiredField options.dataCollectionId
1205
+ * @param options - Options for querying referenced data items.
1172
1206
  */
1173
1207
  export declare function queryReferencedDataItems(options: QueryReferencedDataItemsOptions): Promise<QueryReferencedDataItemsResponse>;
1174
1208
  export interface QueryReferencedDataItemsOptions extends QueryReferencedDataItemsRequestPagingMethodOneOf {
@@ -1194,7 +1228,7 @@ export interface QueryReferencedDataItemsOptions extends QueryReferencedDataItem
1194
1228
  /**
1195
1229
  * Whether to retrieve data from the primary database instance.
1196
1230
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
1197
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
1231
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
1198
1232
  *
1199
1233
  * Default: `false`
1200
1234
  */
@@ -1209,6 +1243,7 @@ export interface QueryReferencedDataItemsOptions extends QueryReferencedDataItem
1209
1243
  * @requiredField options.referencedItemId
1210
1244
  * @requiredField options.referringItemFieldName
1211
1245
  * @requiredField options.referringItemId
1246
+ * @param options - Options for checking whether a field contains a reference to an item.
1212
1247
  */
1213
1248
  export declare function isReferencedDataItem(options: IsReferencedDataItemOptions): Promise<IsReferencedDataItemResponse>;
1214
1249
  export interface IsReferencedDataItemOptions {
@@ -1223,7 +1258,7 @@ export interface IsReferencedDataItemOptions {
1223
1258
  /**
1224
1259
  * Whether to retrieve data from the primary database instance.
1225
1260
  * This decreases performance but ensures data retrieved is up to date even immediately after an update.
1226
- * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
1261
+ * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
1227
1262
  *
1228
1263
  * Default: `false`
1229
1264
  */
@@ -1233,7 +1268,7 @@ export interface IsReferencedDataItemOptions {
1233
1268
  * Inserts a reference in the specified field in an item in a collection.
1234
1269
  *
1235
1270
  *
1236
- * A reference in the `dataItemReference` field specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
1271
+ * A reference in `options.dataItemReference` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
1237
1272
  * @public
1238
1273
  * @documentationMaturity preview
1239
1274
  * @requiredField options
@@ -1241,6 +1276,7 @@ export interface IsReferencedDataItemOptions {
1241
1276
  * @requiredField options.dataItemReference.referencedItemId
1242
1277
  * @requiredField options.dataItemReference.referringItemFieldName
1243
1278
  * @requiredField options.dataItemReference.referringItemId
1279
+ * @param options - Options for inserting a reference.
1244
1280
  */
1245
1281
  export declare function insertDataItemReference(options: InsertDataItemReferenceOptions): Promise<InsertDataItemReferenceResponse>;
1246
1282
  export interface InsertDataItemReferenceOptions {
@@ -1259,6 +1295,7 @@ export interface InsertDataItemReferenceOptions {
1259
1295
  * @requiredField options.dataItemReference.referencedItemId
1260
1296
  * @requiredField options.dataItemReference.referringItemFieldName
1261
1297
  * @requiredField options.dataItemReference.referringItemId
1298
+ * @param options - Options for removing a reference.
1262
1299
  */
1263
1300
  export declare function removeDataItemReference(options: RemoveDataItemReferenceOptions): Promise<RemoveDataItemReferenceResponse>;
1264
1301
  export interface RemoveDataItemReferenceOptions {
@@ -1272,7 +1309,7 @@ export interface RemoveDataItemReferenceOptions {
1272
1309
  *
1273
1310
  *
1274
1311
  * This endpoint adds one or more references to a collection.
1275
- * Each new reference in the `dataItemReferences` field specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
1312
+ * Each new reference in `options.dataItemReferences` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
1276
1313
  * @public
1277
1314
  * @documentationMaturity preview
1278
1315
  * @requiredField options
@@ -1281,6 +1318,7 @@ export interface RemoveDataItemReferenceOptions {
1281
1318
  * @requiredField options.dataItemReferences.referencedItemId
1282
1319
  * @requiredField options.dataItemReferences.referringItemFieldName
1283
1320
  * @requiredField options.dataItemReferences.referringItemId
1321
+ * @param options - Options for inserting one or more references.
1284
1322
  */
1285
1323
  export declare function bulkInsertDataItemReferences(options: BulkInsertDataItemReferencesOptions): Promise<BulkInsertDataItemReferencesResponse>;
1286
1324
  export interface BulkInsertDataItemReferencesOptions {
@@ -1306,6 +1344,7 @@ export interface BulkInsertDataItemReferencesOptions {
1306
1344
  * @requiredField options.dataItemReferences.referencedItemId
1307
1345
  * @requiredField options.dataItemReferences.referringItemFieldName
1308
1346
  * @requiredField options.dataItemReferences.referringItemId
1347
+ * @param options - Options for removing one or more references.
1309
1348
  */
1310
1349
  export declare function bulkRemoveDataItemReferences(options: BulkRemoveDataItemReferencesOptions): Promise<BulkRemoveDataItemReferencesResponse>;
1311
1350
  export interface BulkRemoveDataItemReferencesOptions {
@@ -1318,16 +1357,17 @@ export interface BulkRemoveDataItemReferencesOptions {
1318
1357
  * Replaces references in a specified field of a specified data item.
1319
1358
  *
1320
1359
  *
1321
- * This endpoint replaces the existing reference or references contained in the field specified in `referringItemFieldName` within the data item specified in `referringItemId`.
1322
- * The endpoint removes existing references and in their place it adds references to the items specified in `newReferencedItemIds`.
1360
+ * This function replaces the existing reference or references contained in the field specified in `options.referringItemFieldName` within the data item specified in `options.referringItemId`.
1361
+ * The function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.
1323
1362
  *
1324
- * > **Note:** If you pass an empty array in `newReferencedItemIds`, all existing references are removed.
1363
+ * > **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed.
1325
1364
  * @public
1326
1365
  * @documentationMaturity preview
1327
1366
  * @requiredField options
1328
1367
  * @requiredField options.dataCollectionId
1329
1368
  * @requiredField options.referringItemFieldName
1330
1369
  * @requiredField options.referringItemId
1370
+ * @param options - Options for replacing references.
1331
1371
  */
1332
1372
  export declare function replaceDataItemReferences(options: ReplaceDataItemReferencesOptions): Promise<ReplaceDataItemReferencesResponse>;
1333
1373
  export interface ReplaceDataItemReferencesOptions {