@wix/data 1.0.8 → 1.0.10
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/data-v1-external-database-connection.http.d.ts +1 -1
- package/build/cjs/src/data-v1-external-database-connection.http.js +1 -1
- package/build/cjs/src/data-v1-external-database-connection.universal.d.ts +6 -1
- package/build/cjs/src/data-v1-external-database-connection.universal.js +6 -1
- package/build/cjs/src/data-v1-external-database-connection.universal.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.universal.d.ts +50 -9
- package/build/cjs/src/data-v2-data-collection.universal.js +5 -0
- package/build/cjs/src/data-v2-data-collection.universal.js.map +1 -1
- package/build/cjs/src/data-v2-data-item.http.d.ts +15 -15
- package/build/cjs/src/data-v2-data-item.http.js +15 -15
- package/build/cjs/src/data-v2-data-item.universal.d.ts +63 -34
- package/build/cjs/src/data-v2-data-item.universal.js +36 -15
- package/build/cjs/src/data-v2-data-item.universal.js.map +1 -1
- package/build/cjs/src/data-v2-index.http.d.ts +3 -3
- package/build/cjs/src/data-v2-index.http.js +3 -3
- package/build/cjs/src/data-v2-index.universal.d.ts +14 -9
- package/build/cjs/src/data-v2-index.universal.js +6 -3
- package/build/cjs/src/data-v2-index.universal.js.map +1 -1
- package/build/es/src/data-v1-external-database-connection.http.d.ts +1 -1
- package/build/es/src/data-v1-external-database-connection.http.js +1 -1
- package/build/es/src/data-v1-external-database-connection.universal.d.ts +6 -1
- package/build/es/src/data-v1-external-database-connection.universal.js +6 -1
- package/build/es/src/data-v1-external-database-connection.universal.js.map +1 -1
- package/build/es/src/data-v2-data-collection.universal.d.ts +50 -9
- package/build/es/src/data-v2-data-collection.universal.js +5 -0
- package/build/es/src/data-v2-data-collection.universal.js.map +1 -1
- package/build/es/src/data-v2-data-item.http.d.ts +15 -15
- package/build/es/src/data-v2-data-item.http.js +15 -15
- package/build/es/src/data-v2-data-item.universal.d.ts +63 -34
- package/build/es/src/data-v2-data-item.universal.js +36 -15
- package/build/es/src/data-v2-data-item.universal.js.map +1 -1
- package/build/es/src/data-v2-index.http.d.ts +3 -3
- package/build/es/src/data-v2-index.http.js +3 -3
- package/build/es/src/data-v2-index.universal.d.ts +14 -9
- package/build/es/src/data-v2-index.universal.js +6 -3
- package/build/es/src/data-v2-index.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -78,7 +78,6 @@ 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/sdk/data/eventual-consistency).
|
|
82
81
|
*
|
|
83
82
|
* Default: `false`
|
|
84
83
|
*/
|
|
@@ -124,7 +123,6 @@ export interface QueryDataItemsRequest {
|
|
|
124
123
|
/**
|
|
125
124
|
* Whether to retrieve data from the primary database instance.
|
|
126
125
|
* 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/sdk/data/eventual-consistency).
|
|
128
126
|
*
|
|
129
127
|
* Default: `false`
|
|
130
128
|
*/
|
|
@@ -164,7 +162,11 @@ export interface QueryV2PagingMethodOneOf {
|
|
|
164
162
|
export interface Sorting {
|
|
165
163
|
/** Name of the field to sort by. */
|
|
166
164
|
fieldName?: string;
|
|
167
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* Sort order.
|
|
167
|
+
*
|
|
168
|
+
* Supported values: `"ASC"`, `"DESC"`.
|
|
169
|
+
*/
|
|
168
170
|
order?: SortOrder;
|
|
169
171
|
}
|
|
170
172
|
export declare enum SortOrder {
|
|
@@ -241,7 +243,6 @@ export interface AggregateDataItemsRequest extends AggregateDataItemsRequestPagi
|
|
|
241
243
|
/**
|
|
242
244
|
* Whether to retrieve data from the primary database instance.
|
|
243
245
|
* 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/sdk/data/eventual-consistency).
|
|
245
246
|
*
|
|
246
247
|
* Default: `false`
|
|
247
248
|
*/
|
|
@@ -328,7 +329,6 @@ export interface CountDataItemsRequest {
|
|
|
328
329
|
/**
|
|
329
330
|
* Whether to retrieve data from the primary database instance.
|
|
330
331
|
* 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/sdk/data/eventual-consistency).
|
|
332
332
|
*
|
|
333
333
|
* Default: `false`
|
|
334
334
|
*/
|
|
@@ -358,7 +358,11 @@ export interface QueryDistinctValuesRequest extends QueryDistinctValuesRequestPa
|
|
|
358
358
|
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
359
359
|
*/
|
|
360
360
|
filter?: Record<string, any> | null;
|
|
361
|
-
/**
|
|
361
|
+
/**
|
|
362
|
+
* Sort order.
|
|
363
|
+
*
|
|
364
|
+
* Supported values: `"ASC"`, `"DESC"`.
|
|
365
|
+
*/
|
|
362
366
|
order?: SortOrder;
|
|
363
367
|
/**
|
|
364
368
|
* Whether to return the total count in the response for a query with offset paging.
|
|
@@ -370,7 +374,6 @@ export interface QueryDistinctValuesRequest extends QueryDistinctValuesRequestPa
|
|
|
370
374
|
/**
|
|
371
375
|
* Whether to retrieve data from the primary database instance.
|
|
372
376
|
* 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/sdk/data/eventual-consistency).
|
|
374
377
|
*
|
|
375
378
|
* Default: `false`
|
|
376
379
|
*/
|
|
@@ -409,7 +412,11 @@ export interface BulkInsertDataItemsResponse {
|
|
|
409
412
|
bulkActionMetadata?: BulkActionMetadata;
|
|
410
413
|
}
|
|
411
414
|
export interface BulkDataItemResult {
|
|
412
|
-
/**
|
|
415
|
+
/**
|
|
416
|
+
* The action attempted for the data item.
|
|
417
|
+
*
|
|
418
|
+
* Supported values: `"UNKNOWN_ACTION_TYPE"`, `"INSERT"`, `"UPDATE"`, `"DELETE"`.
|
|
419
|
+
*/
|
|
413
420
|
action?: BulkActionType;
|
|
414
421
|
/** Metadata related to the data item for which the action was attempted. */
|
|
415
422
|
itemMetadata?: ItemMetadata;
|
|
@@ -519,7 +526,6 @@ export interface QueryReferencedDataItemsRequest extends QueryReferencedDataItem
|
|
|
519
526
|
/**
|
|
520
527
|
* Whether to retrieve data from the primary database instance.
|
|
521
528
|
* 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/sdk/data/eventual-consistency).
|
|
523
529
|
*
|
|
524
530
|
* Default: `false`
|
|
525
531
|
*/
|
|
@@ -569,7 +575,6 @@ export interface IsReferencedDataItemRequest {
|
|
|
569
575
|
/**
|
|
570
576
|
* Whether to retrieve data from the primary database instance.
|
|
571
577
|
* 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/sdk/data/eventual-consistency).
|
|
573
578
|
*
|
|
574
579
|
* Default: `false`
|
|
575
580
|
*/
|
|
@@ -627,7 +632,11 @@ export interface BulkInsertDataItemReferencesResponse {
|
|
|
627
632
|
bulkActionMetadata?: BulkActionMetadata;
|
|
628
633
|
}
|
|
629
634
|
export interface BulkDataItemReferenceResult {
|
|
630
|
-
/**
|
|
635
|
+
/**
|
|
636
|
+
* The action attempted for the reference.
|
|
637
|
+
*
|
|
638
|
+
* Supported values: `"UNKNOWN_ACTION_TYPE"`, `"INSERT"`, `"UPDATE"`, `"DELETE"`.
|
|
639
|
+
*/
|
|
631
640
|
action?: BulkActionType;
|
|
632
641
|
/** Metadata related to the reference for which the action was attempted. */
|
|
633
642
|
referenceMetadata?: ItemMetadata;
|
|
@@ -665,7 +674,7 @@ export interface ReplaceDataItemReferencesResponse {
|
|
|
665
674
|
*
|
|
666
675
|
*
|
|
667
676
|
* An item can only be inserted into an existing connection.
|
|
668
|
-
* You can create a new collection using the
|
|
677
|
+
* You can create a new collection using the Data Collections API.
|
|
669
678
|
*
|
|
670
679
|
* When an item is inserted into a collection, the item's ID is automatically assigned a random value.
|
|
671
680
|
* You can optionally provide a custom ID in `dataItem.id` when inserting the item.
|
|
@@ -678,6 +687,7 @@ export interface ReplaceDataItemReferencesResponse {
|
|
|
678
687
|
* @requiredField options.dataCollectionId
|
|
679
688
|
* @requiredField options.dataItem
|
|
680
689
|
* @param options - Options for adding an item to a collection.
|
|
690
|
+
* @permissionScope Write Data
|
|
681
691
|
*/
|
|
682
692
|
export declare function insertDataItem(options: InsertDataItemOptions): Promise<InsertDataItemResponse>;
|
|
683
693
|
export interface InsertDataItemOptions {
|
|
@@ -709,6 +719,7 @@ export interface InsertDataItemOptions {
|
|
|
709
719
|
* @requiredField options.dataCollectionId
|
|
710
720
|
* @requiredField options.dataItem
|
|
711
721
|
* @param options - Options for updating an item in a collection.
|
|
722
|
+
* @permissionScope Write Data
|
|
712
723
|
*/
|
|
713
724
|
export declare function updateDataItem(_id: string, options: UpdateDataItemOptions): Promise<UpdateDataItemResponse>;
|
|
714
725
|
export interface UpdateDataItemOptions {
|
|
@@ -751,6 +762,7 @@ export interface UpdateDataItemOptions {
|
|
|
751
762
|
* @requiredField options.dataCollectionId
|
|
752
763
|
* @requiredField options.dataItem
|
|
753
764
|
* @param options - Options for saving an item in a collection.
|
|
765
|
+
* @permissionScope Write Data
|
|
754
766
|
*/
|
|
755
767
|
export declare function saveDataItem(options: SaveDataItemOptions): Promise<SaveDataItemResponse>;
|
|
756
768
|
export interface SaveDataItemOptions {
|
|
@@ -763,7 +775,7 @@ export interface SaveDataItemOptions {
|
|
|
763
775
|
* Retrieves an item from a collection.
|
|
764
776
|
*
|
|
765
777
|
*
|
|
766
|
-
* > **Note**: When calling `getDataItem()` following an update to your collection, the data retrieved may not contain the most recent changes.
|
|
778
|
+
* > **Note**: When calling `getDataItem()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
767
779
|
* @param dataItemId - ID of the data item to retrieve.
|
|
768
780
|
* @public
|
|
769
781
|
* @documentationMaturity preview
|
|
@@ -771,6 +783,7 @@ export interface SaveDataItemOptions {
|
|
|
771
783
|
* @requiredField options
|
|
772
784
|
* @requiredField options.dataCollectionId
|
|
773
785
|
* @param options - Options for retrieving an item from a collection.
|
|
786
|
+
* @permissionScope Read Data
|
|
774
787
|
* @returns Retrieved item.
|
|
775
788
|
*/
|
|
776
789
|
export declare function getDataItem(dataItemId: string, options: GetDataItemOptions): Promise<DataItem>;
|
|
@@ -780,7 +793,6 @@ export interface GetDataItemOptions {
|
|
|
780
793
|
/**
|
|
781
794
|
* Whether to retrieve data from the primary database instance.
|
|
782
795
|
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
783
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
|
|
784
796
|
*
|
|
785
797
|
* Default: `false`
|
|
786
798
|
*/
|
|
@@ -801,6 +813,7 @@ export interface GetDataItemOptions {
|
|
|
801
813
|
* @requiredField options
|
|
802
814
|
* @requiredField options.dataCollectionId
|
|
803
815
|
* @param options - Options for removing an item from a collection.
|
|
816
|
+
* @permissionScope Write Data
|
|
804
817
|
*/
|
|
805
818
|
export declare function removeDataItem(dataItemId: string, options: RemoveDataItemOptions): Promise<RemoveDataItemResponse>;
|
|
806
819
|
export interface RemoveDataItemOptions {
|
|
@@ -820,6 +833,7 @@ export interface RemoveDataItemOptions {
|
|
|
820
833
|
* @requiredField options
|
|
821
834
|
* @requiredField options.dataCollectionId
|
|
822
835
|
* @param options - Options for truncating data items from a collection.
|
|
836
|
+
* @permissionScope Write Data
|
|
823
837
|
*/
|
|
824
838
|
export declare function truncateDataItems(options: TruncateDataItemsOptions): Promise<void>;
|
|
825
839
|
export interface TruncateDataItemsOptions {
|
|
@@ -829,23 +843,23 @@ export interface TruncateDataItemsOptions {
|
|
|
829
843
|
/**
|
|
830
844
|
* Creates a query to retrieve items from a database collection.
|
|
831
845
|
*
|
|
832
|
-
* The `queryDataItems()` function builds a query to retrieve data items from a collection and returns a
|
|
846
|
+
* The `queryDataItems()` function builds a query to retrieve data items from a collection and returns a `DataItemsQueryBuilder` object.
|
|
833
847
|
*
|
|
834
|
-
* The returned object contains the query definition which is typically used to run the query using the
|
|
848
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
835
849
|
*
|
|
836
|
-
* You can refine the query by chaining
|
|
850
|
+
* You can refine the query by chaining `DataItemsQueryBuilder` functions onto the query. `DataItemsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDataItems()` returns.
|
|
837
851
|
*
|
|
838
|
-
* The `queryDataItems()` function runs with the following
|
|
852
|
+
* The `queryDataItems()` function runs with the following `DataItemsQueryBuilder` defaults that you can override:
|
|
839
853
|
*
|
|
840
|
-
* +
|
|
841
|
-
* +
|
|
842
|
-
* +
|
|
854
|
+
* + `skip`: 0
|
|
855
|
+
* + `limit`: 50
|
|
856
|
+
* + `descending`: by `_createdDate`
|
|
843
857
|
*
|
|
844
858
|
* 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
859
|
*
|
|
846
860
|
* 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
861
|
*
|
|
848
|
-
* > **Note**: When calling `queryDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes.
|
|
862
|
+
* > **Note**: When calling `queryDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
849
863
|
*
|
|
850
864
|
*
|
|
851
865
|
* @public
|
|
@@ -853,6 +867,7 @@ export interface TruncateDataItemsOptions {
|
|
|
853
867
|
* @requiredField options.options
|
|
854
868
|
* @requiredField options.options.dataCollectionId
|
|
855
869
|
* @param options - Options for querying data items.
|
|
870
|
+
* @permissionScope Read Data
|
|
856
871
|
*/
|
|
857
872
|
export declare function queryDataItems(options: QueryDataItemsOptions): DataItemsQueryBuilder;
|
|
858
873
|
export interface QueryDataItemsOptions {
|
|
@@ -873,7 +888,6 @@ export interface QueryDataItemsOptions {
|
|
|
873
888
|
/**
|
|
874
889
|
* Whether to retrieve data from the primary database instance.
|
|
875
890
|
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
876
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
|
|
877
891
|
*
|
|
878
892
|
* Default: `false`
|
|
879
893
|
*/
|
|
@@ -949,6 +963,7 @@ export interface DataItemsQueryBuilder {
|
|
|
949
963
|
* @requiredField options
|
|
950
964
|
* @requiredField options.dataCollectionId
|
|
951
965
|
* @param options - Options for running an aggregation.
|
|
966
|
+
* @permissionScope Read Data
|
|
952
967
|
*/
|
|
953
968
|
export declare function aggregateDataItems(options: AggregateDataItemsOptions): Promise<AggregateDataItemsResponse>;
|
|
954
969
|
export interface AggregateDataItemsOptions extends AggregateDataItemsRequestPagingMethodOneOf {
|
|
@@ -979,7 +994,6 @@ export interface AggregateDataItemsOptions extends AggregateDataItemsRequestPagi
|
|
|
979
994
|
/**
|
|
980
995
|
* Whether to retrieve data from the primary database instance.
|
|
981
996
|
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
982
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
|
|
983
997
|
*
|
|
984
998
|
* Default: `false`
|
|
985
999
|
*/
|
|
@@ -988,12 +1002,13 @@ export interface AggregateDataItemsOptions extends AggregateDataItemsRequestPagi
|
|
|
988
1002
|
/**
|
|
989
1003
|
* Counts the number of items in a data collection that match the provided filtering preferences.
|
|
990
1004
|
*
|
|
991
|
-
* > **Note**: When calling `countDataItems()` following an update to your collection, the result returned may not reflect the most recent changes.
|
|
1005
|
+
* > **Note**: When calling `countDataItems()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
992
1006
|
* @public
|
|
993
1007
|
* @documentationMaturity preview
|
|
994
1008
|
* @requiredField options
|
|
995
1009
|
* @requiredField options.dataCollectionId
|
|
996
1010
|
* @param options - Options for counting the number of items in a data collection.
|
|
1011
|
+
* @permissionScope Read Data
|
|
997
1012
|
*/
|
|
998
1013
|
export declare function countDataItems(options: CountDataItemsOptions): Promise<CountDataItemsResponse>;
|
|
999
1014
|
export interface CountDataItemsOptions {
|
|
@@ -1013,7 +1028,6 @@ export interface CountDataItemsOptions {
|
|
|
1013
1028
|
/**
|
|
1014
1029
|
* Whether to retrieve data from the primary database instance.
|
|
1015
1030
|
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1016
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
|
|
1017
1031
|
*
|
|
1018
1032
|
* Default: `false`
|
|
1019
1033
|
*/
|
|
@@ -1023,19 +1037,20 @@ export interface CountDataItemsOptions {
|
|
|
1023
1037
|
* Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.
|
|
1024
1038
|
*
|
|
1025
1039
|
*
|
|
1026
|
-
* As with
|
|
1040
|
+
* As with `queryDataItems()`, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
|
|
1027
1041
|
* However, `queryDistinctValues()` doesn't return all of the full items that match the query.
|
|
1028
1042
|
* Rather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query.
|
|
1029
1043
|
* If more than one item has the same value for that field, that value appears only once.
|
|
1030
1044
|
*
|
|
1031
1045
|
* For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
1032
1046
|
*
|
|
1033
|
-
* > **Note**: When calling `queryDistinctValues()` following an update to your collection, the data retrieved may not reflect the most recent changes.
|
|
1047
|
+
* > **Note**: When calling `queryDistinctValues()` following an update to your collection, the data retrieved may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
1034
1048
|
* @public
|
|
1035
1049
|
* @documentationMaturity preview
|
|
1036
1050
|
* @requiredField options
|
|
1037
1051
|
* @requiredField options.dataCollectionId
|
|
1038
1052
|
* @param options - Options for querying distinct values.
|
|
1053
|
+
* @permissionScope Read Data
|
|
1039
1054
|
*/
|
|
1040
1055
|
export declare function queryDistinctValues(options: QueryDistinctValuesOptions): Promise<QueryDistinctValuesResponse>;
|
|
1041
1056
|
export interface QueryDistinctValuesOptions extends QueryDistinctValuesRequestPagingMethodOneOf {
|
|
@@ -1054,7 +1069,11 @@ export interface QueryDistinctValuesOptions extends QueryDistinctValuesRequestPa
|
|
|
1054
1069
|
* Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.
|
|
1055
1070
|
*/
|
|
1056
1071
|
filter?: Record<string, any> | null;
|
|
1057
|
-
/**
|
|
1072
|
+
/**
|
|
1073
|
+
* Sort order.
|
|
1074
|
+
*
|
|
1075
|
+
* Supported values: `"ASC"`, `"DESC"`.
|
|
1076
|
+
*/
|
|
1058
1077
|
order?: SortOrder;
|
|
1059
1078
|
/** Paging options to limit and skip the number of items. */
|
|
1060
1079
|
paging?: Paging;
|
|
@@ -1070,7 +1089,8 @@ export interface QueryDistinctValuesOptions extends QueryDistinctValuesRequestPa
|
|
|
1070
1089
|
/**
|
|
1071
1090
|
* Whether to retrieve data from the primary database instance.
|
|
1072
1091
|
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1073
|
-
*
|
|
1092
|
+
*
|
|
1093
|
+
* Default: `false`
|
|
1074
1094
|
*/
|
|
1075
1095
|
consistentRead?: boolean;
|
|
1076
1096
|
}
|
|
@@ -1086,6 +1106,7 @@ export interface QueryDistinctValuesOptions extends QueryDistinctValuesRequestPa
|
|
|
1086
1106
|
* @requiredField options.dataCollectionId
|
|
1087
1107
|
* @requiredField options.dataItems
|
|
1088
1108
|
* @param options - Options for adding multiple items to a collection.
|
|
1109
|
+
* @permissionScope Write Data
|
|
1089
1110
|
*/
|
|
1090
1111
|
export declare function bulkInsertDataItems(options: BulkInsertDataItemsOptions): Promise<BulkInsertDataItemsResponse>;
|
|
1091
1112
|
export interface BulkInsertDataItemsOptions {
|
|
@@ -1121,6 +1142,7 @@ export interface BulkInsertDataItemsOptions {
|
|
|
1121
1142
|
* @requiredField options.dataCollectionId
|
|
1122
1143
|
* @requiredField options.dataItems
|
|
1123
1144
|
* @param options - Options for updating multiple items in a collection.
|
|
1145
|
+
* @permissionScope Write Data
|
|
1124
1146
|
*/
|
|
1125
1147
|
export declare function bulkUpdateDataItems(options: BulkUpdateDataItemsOptions): Promise<BulkUpdateDataItemsResponse>;
|
|
1126
1148
|
export interface BulkUpdateDataItemsOptions {
|
|
@@ -1156,6 +1178,7 @@ export interface BulkUpdateDataItemsOptions {
|
|
|
1156
1178
|
* @requiredField options.dataCollectionId
|
|
1157
1179
|
* @requiredField options.dataItems
|
|
1158
1180
|
* @param options - Options for saving multiple items in a collection.
|
|
1181
|
+
* @permissionScope Write Data
|
|
1159
1182
|
*/
|
|
1160
1183
|
export declare function bulkSaveDataItems(options: BulkSaveDataItemsOptions): Promise<BulkSaveDataItemsResponse>;
|
|
1161
1184
|
export interface BulkSaveDataItemsOptions {
|
|
@@ -1184,6 +1207,7 @@ export interface BulkSaveDataItemsOptions {
|
|
|
1184
1207
|
* @requiredField options.dataCollectionId
|
|
1185
1208
|
* @requiredField options.dataItemIds
|
|
1186
1209
|
* @param options - Options for removing multiple items from a collection.
|
|
1210
|
+
* @permissionScope Write Data
|
|
1187
1211
|
*/
|
|
1188
1212
|
export declare function bulkRemoveDataItems(options: BulkRemoveDataItemsOptions): Promise<BulkRemoveDataItemsResponse>;
|
|
1189
1213
|
export interface BulkRemoveDataItemsOptions {
|
|
@@ -1203,12 +1227,13 @@ export interface BulkRemoveDataItemsOptions {
|
|
|
1203
1227
|
* Querying the **Movies** collection using `queryReferencedDataItems()` returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
|
|
1204
1228
|
* This gives you information from the **People** collection about each of the actors in the specified movie.
|
|
1205
1229
|
*
|
|
1206
|
-
* > **Note**: When calling `queryReferencedDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes.
|
|
1230
|
+
* > **Note**: When calling `queryReferencedDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
1207
1231
|
* @public
|
|
1208
1232
|
* @documentationMaturity preview
|
|
1209
1233
|
* @requiredField options
|
|
1210
1234
|
* @requiredField options.dataCollectionId
|
|
1211
1235
|
* @param options - Options for querying referenced data items.
|
|
1236
|
+
* @permissionScope Read Data
|
|
1212
1237
|
*/
|
|
1213
1238
|
export declare function queryReferencedDataItems(options: QueryReferencedDataItemsOptions): Promise<QueryReferencedDataItemsResponse>;
|
|
1214
1239
|
export interface QueryReferencedDataItemsOptions extends QueryReferencedDataItemsRequestPagingMethodOneOf {
|
|
@@ -1234,7 +1259,6 @@ export interface QueryReferencedDataItemsOptions extends QueryReferencedDataItem
|
|
|
1234
1259
|
/**
|
|
1235
1260
|
* Whether to retrieve data from the primary database instance.
|
|
1236
1261
|
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1237
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
|
|
1238
1262
|
*
|
|
1239
1263
|
* Default: `false`
|
|
1240
1264
|
*/
|
|
@@ -1243,7 +1267,7 @@ export interface QueryReferencedDataItemsOptions extends QueryReferencedDataItem
|
|
|
1243
1267
|
/**
|
|
1244
1268
|
* Checks whether a field in a referring item contains a reference to a specified item.
|
|
1245
1269
|
*
|
|
1246
|
-
* > **Note**: When calling `isReferencedDataItem()` following an update to your collection, the result returned may not reflect the most recent changes.
|
|
1270
|
+
* > **Note**: When calling `isReferencedDataItem()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
1247
1271
|
* @public
|
|
1248
1272
|
* @documentationMaturity preview
|
|
1249
1273
|
* @requiredField options
|
|
@@ -1252,6 +1276,7 @@ export interface QueryReferencedDataItemsOptions extends QueryReferencedDataItem
|
|
|
1252
1276
|
* @requiredField options.referringItemFieldName
|
|
1253
1277
|
* @requiredField options.referringItemId
|
|
1254
1278
|
* @param options - Options for checking whether a field contains a reference to an item.
|
|
1279
|
+
* @permissionScope Read Data
|
|
1255
1280
|
*/
|
|
1256
1281
|
export declare function isReferencedDataItem(options: IsReferencedDataItemOptions): Promise<IsReferencedDataItemResponse>;
|
|
1257
1282
|
export interface IsReferencedDataItemOptions {
|
|
@@ -1266,7 +1291,6 @@ export interface IsReferencedDataItemOptions {
|
|
|
1266
1291
|
/**
|
|
1267
1292
|
* Whether to retrieve data from the primary database instance.
|
|
1268
1293
|
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
1269
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/sdk/data/eventual-consistency).
|
|
1270
1294
|
*
|
|
1271
1295
|
* Default: `false`
|
|
1272
1296
|
*/
|
|
@@ -1285,6 +1309,7 @@ export interface IsReferencedDataItemOptions {
|
|
|
1285
1309
|
* @requiredField options.dataItemReference.referringItemFieldName
|
|
1286
1310
|
* @requiredField options.dataItemReference.referringItemId
|
|
1287
1311
|
* @param options - Options for inserting a reference.
|
|
1312
|
+
* @permissionScope Write Data
|
|
1288
1313
|
*/
|
|
1289
1314
|
export declare function insertDataItemReference(options: InsertDataItemReferenceOptions): Promise<InsertDataItemReferenceResponse>;
|
|
1290
1315
|
export interface InsertDataItemReferenceOptions {
|
|
@@ -1304,6 +1329,7 @@ export interface InsertDataItemReferenceOptions {
|
|
|
1304
1329
|
* @requiredField options.dataItemReference.referringItemFieldName
|
|
1305
1330
|
* @requiredField options.dataItemReference.referringItemId
|
|
1306
1331
|
* @param options - Options for removing a reference.
|
|
1332
|
+
* @permissionScope Write Data
|
|
1307
1333
|
*/
|
|
1308
1334
|
export declare function removeDataItemReference(options: RemoveDataItemReferenceOptions): Promise<RemoveDataItemReferenceResponse>;
|
|
1309
1335
|
export interface RemoveDataItemReferenceOptions {
|
|
@@ -1327,6 +1353,7 @@ export interface RemoveDataItemReferenceOptions {
|
|
|
1327
1353
|
* @requiredField options.dataItemReferences.referringItemFieldName
|
|
1328
1354
|
* @requiredField options.dataItemReferences.referringItemId
|
|
1329
1355
|
* @param options - Options for inserting one or more references.
|
|
1356
|
+
* @permissionScope Write Data
|
|
1330
1357
|
*/
|
|
1331
1358
|
export declare function bulkInsertDataItemReferences(options: BulkInsertDataItemReferencesOptions): Promise<BulkInsertDataItemReferencesResponse>;
|
|
1332
1359
|
export interface BulkInsertDataItemReferencesOptions {
|
|
@@ -1353,6 +1380,7 @@ export interface BulkInsertDataItemReferencesOptions {
|
|
|
1353
1380
|
* @requiredField options.dataItemReferences.referringItemFieldName
|
|
1354
1381
|
* @requiredField options.dataItemReferences.referringItemId
|
|
1355
1382
|
* @param options - Options for removing one or more references.
|
|
1383
|
+
* @permissionScope Write Data
|
|
1356
1384
|
*/
|
|
1357
1385
|
export declare function bulkRemoveDataItemReferences(options: BulkRemoveDataItemReferencesOptions): Promise<BulkRemoveDataItemReferencesResponse>;
|
|
1358
1386
|
export interface BulkRemoveDataItemReferencesOptions {
|
|
@@ -1376,6 +1404,7 @@ export interface BulkRemoveDataItemReferencesOptions {
|
|
|
1376
1404
|
* @requiredField options.referringItemFieldName
|
|
1377
1405
|
* @requiredField options.referringItemId
|
|
1378
1406
|
* @param options - Options for replacing references.
|
|
1407
|
+
* @permissionScope Write Data
|
|
1379
1408
|
*/
|
|
1380
1409
|
export declare function replaceDataItemReferences(options: ReplaceDataItemReferencesOptions): Promise<ReplaceDataItemReferencesResponse>;
|
|
1381
1410
|
export interface ReplaceDataItemReferencesOptions {
|