@wix/auto_sdk_data_collections 1.0.24 → 1.0.25
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/index.d.ts +23 -11
- package/build/cjs/index.js +4 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +35 -23
- package/build/cjs/index.typings.js +4 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +9 -9
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +23 -11
- package/build/es/index.mjs +4 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +35 -23
- package/build/es/index.typings.mjs +4 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +9 -9
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +23 -11
- package/build/internal/cjs/index.js +4 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +45 -23
- package/build/internal/cjs/index.typings.js +4 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +9 -9
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +23 -11
- package/build/internal/es/index.mjs +4 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +45 -23
- package/build/internal/es/index.typings.mjs +4 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +9 -9
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1035,44 +1035,44 @@ interface RestoreDataCollectionResponse {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
interface CreateDataCollectionFieldRequest {
|
|
1037
1037
|
/**
|
|
1038
|
-
* ID of data collection to update
|
|
1038
|
+
* ID of the data collection to update.
|
|
1039
1039
|
* @maxLength 256
|
|
1040
1040
|
*/
|
|
1041
1041
|
dataCollectionId: string;
|
|
1042
|
-
/** field to
|
|
1042
|
+
/** New field to add. */
|
|
1043
1043
|
field: Field;
|
|
1044
1044
|
}
|
|
1045
1045
|
interface CreateDataCollectionFieldResponse {
|
|
1046
|
-
/**
|
|
1046
|
+
/** Updated data collection. */
|
|
1047
1047
|
dataCollection?: DataCollection;
|
|
1048
1048
|
}
|
|
1049
1049
|
interface UpdateDataCollectionFieldRequest {
|
|
1050
1050
|
/**
|
|
1051
|
-
* ID of data collection to update
|
|
1051
|
+
* ID of the data collection to update.
|
|
1052
1052
|
* @maxLength 256
|
|
1053
1053
|
*/
|
|
1054
1054
|
dataCollectionId: string;
|
|
1055
|
-
/** Field to update */
|
|
1055
|
+
/** Field to update. */
|
|
1056
1056
|
field: Field;
|
|
1057
1057
|
}
|
|
1058
1058
|
interface UpdateDataCollectionFieldResponse {
|
|
1059
|
-
/**
|
|
1059
|
+
/** Updated data collection. */
|
|
1060
1060
|
dataCollection?: DataCollection;
|
|
1061
1061
|
}
|
|
1062
1062
|
interface DeleteDataCollectionFieldRequest {
|
|
1063
1063
|
/**
|
|
1064
|
-
* ID of data collection to update
|
|
1064
|
+
* ID of the data collection to update.
|
|
1065
1065
|
* @maxLength 256
|
|
1066
1066
|
*/
|
|
1067
1067
|
dataCollectionId: string;
|
|
1068
1068
|
/**
|
|
1069
|
-
*
|
|
1069
|
+
* ID of the field to delete.
|
|
1070
1070
|
* @maxLength 1000
|
|
1071
1071
|
*/
|
|
1072
1072
|
fieldKey: string;
|
|
1073
1073
|
}
|
|
1074
1074
|
interface DeleteDataCollectionFieldResponse {
|
|
1075
|
-
/**
|
|
1075
|
+
/** Updated data collection. */
|
|
1076
1076
|
dataCollection?: DataCollection;
|
|
1077
1077
|
}
|
|
1078
1078
|
interface UpdateDataPermissionsRequest {
|
|
@@ -1543,14 +1543,18 @@ interface ListDataCollectionsOptions {
|
|
|
1543
1543
|
* Updates a data collection.
|
|
1544
1544
|
*
|
|
1545
1545
|
* A collection ID, revision number, permissions, and at least 1 field must be provided within the `collection` body parameter.
|
|
1546
|
-
* If a collection with that ID exists, and if its current `revision` number matches the one provided, it
|
|
1546
|
+
* If a collection with that ID exists, and if its current `revision` number matches the one provided, it's updated.
|
|
1547
1547
|
* Otherwise, the request fails.
|
|
1548
1548
|
*
|
|
1549
1549
|
* When a collection is updated, its `updatedDate` property is changed to the current date and its `revision` property is incremented.
|
|
1550
1550
|
*
|
|
1551
|
-
* >
|
|
1552
|
-
* >
|
|
1553
|
-
*
|
|
1551
|
+
* <blockquote class="important">
|
|
1552
|
+
* <strong>Important:</strong>
|
|
1553
|
+
* After a collection is updated, it only contains the properties included in the Update Data Collection request. If the existing collection
|
|
1554
|
+
* has properties with values and those properties aren't included in the updated collection details, their values are lost.<br/><br/>
|
|
1555
|
+
*
|
|
1556
|
+
* To update a single field, use the Update Data Collection Field method.
|
|
1557
|
+
* </blockquote>
|
|
1554
1558
|
* @param collection - Updated collection details. The existing collection is replaced with this version.
|
|
1555
1559
|
* @public
|
|
1556
1560
|
* @requiredField collection
|
|
@@ -1572,8 +1576,13 @@ declare function updateDataCollection(collection: NonNullablePaths<DataCollectio
|
|
|
1572
1576
|
/**
|
|
1573
1577
|
* Deletes a data collection.
|
|
1574
1578
|
*
|
|
1579
|
+
* Before deleting a collection:
|
|
1580
|
+
* - Make sure the collection isn't connected to any site pages or elements.
|
|
1581
|
+
* - You can create a manual backup of a collections with the Backups API, in case you need to restore them later.
|
|
1582
|
+
* - You can also export a collection to a CSV file with the Data Movement Jobs API, if you want to save the data outside of Wix.
|
|
1583
|
+
*
|
|
1575
1584
|
* > **Note:**
|
|
1576
|
-
* > Once a collection is deleted, it can only be restored for limited amount of time.
|
|
1585
|
+
* > Once a collection is deleted, it can only be restored for a limited amount of time.
|
|
1577
1586
|
* @param dataCollectionId - ID of the collection to delete.
|
|
1578
1587
|
* @public
|
|
1579
1588
|
* @requiredField dataCollectionId
|
|
@@ -1583,8 +1592,8 @@ declare function updateDataCollection(collection: NonNullablePaths<DataCollectio
|
|
|
1583
1592
|
*/
|
|
1584
1593
|
declare function deleteDataCollection(dataCollectionId: string): Promise<void>;
|
|
1585
1594
|
/**
|
|
1586
|
-
* Adds new field to data collection
|
|
1587
|
-
* @param dataCollectionId - ID of data collection to update
|
|
1595
|
+
* Adds a new field to the structure of a data collection.
|
|
1596
|
+
* @param dataCollectionId - ID of the data collection to update.
|
|
1588
1597
|
* @public
|
|
1589
1598
|
* @documentationMaturity preview
|
|
1590
1599
|
* @requiredField dataCollectionId
|
|
@@ -1598,12 +1607,12 @@ declare function deleteDataCollection(dataCollectionId: string): Promise<void>;
|
|
|
1598
1607
|
*/
|
|
1599
1608
|
declare function createDataCollectionField(dataCollectionId: string, options: NonNullablePaths<CreateDataCollectionFieldOptions, `field` | `field.key` | `field.type`, 3>): Promise<NonNullablePaths<CreateDataCollectionFieldResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes`, 7>>;
|
|
1600
1609
|
interface CreateDataCollectionFieldOptions {
|
|
1601
|
-
/** field to
|
|
1610
|
+
/** New field to add. */
|
|
1602
1611
|
field: Field;
|
|
1603
1612
|
}
|
|
1604
1613
|
/**
|
|
1605
|
-
* Updates data collection
|
|
1606
|
-
* @param dataCollectionId - ID of data collection to update
|
|
1614
|
+
* Updates a field in the structure of a data collection.
|
|
1615
|
+
* @param dataCollectionId - ID of the data collection to update.
|
|
1607
1616
|
* @public
|
|
1608
1617
|
* @documentationMaturity preview
|
|
1609
1618
|
* @requiredField dataCollectionId
|
|
@@ -1617,12 +1626,15 @@ interface CreateDataCollectionFieldOptions {
|
|
|
1617
1626
|
*/
|
|
1618
1627
|
declare function updateDataCollectionField(dataCollectionId: string, options: NonNullablePaths<UpdateDataCollectionFieldOptions, `field` | `field.key` | `field.type`, 3>): Promise<NonNullablePaths<UpdateDataCollectionFieldResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes`, 7>>;
|
|
1619
1628
|
interface UpdateDataCollectionFieldOptions {
|
|
1620
|
-
/** Field to update */
|
|
1629
|
+
/** Field to update. */
|
|
1621
1630
|
field: Field;
|
|
1622
1631
|
}
|
|
1623
1632
|
/**
|
|
1624
|
-
* Deletes data collection
|
|
1625
|
-
*
|
|
1633
|
+
* Deletes a field from the structure of a data collection.
|
|
1634
|
+
*
|
|
1635
|
+
* When a field is deleted, all values associated with that field are also deleted
|
|
1636
|
+
* from all items in the collection.
|
|
1637
|
+
* @param dataCollectionId - ID of the data collection to update.
|
|
1626
1638
|
* @public
|
|
1627
1639
|
* @documentationMaturity preview
|
|
1628
1640
|
* @requiredField dataCollectionId
|
|
@@ -1635,7 +1647,7 @@ interface UpdateDataCollectionFieldOptions {
|
|
|
1635
1647
|
declare function deleteDataCollectionField(dataCollectionId: string, options: NonNullablePaths<DeleteDataCollectionFieldOptions, `fieldKey`, 2>): Promise<NonNullablePaths<DeleteDataCollectionFieldResponse, `dataCollection._id` | `dataCollection.collectionType` | `dataCollection.defaultDisplayOrder.fieldKey` | `dataCollection.defaultDisplayOrder.direction` | `dataCollection.capabilities.dataOperations` | `dataCollection.capabilities.collectionOperations` | `dataCollection.capabilities.indexLimits.regular` | `dataCollection.capabilities.indexLimits.unique` | `dataCollection.capabilities.indexLimits.total` | `dataCollection.fields` | `dataCollection.fields.${number}.key` | `dataCollection.fields.${number}.type` | `dataCollection.fields.${number}.typeMetadata.reference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencedCollectionId` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingFieldKey` | `dataCollection.fields.${number}.typeMetadata.multiReference.referencingDisplayName` | `dataCollection.fields.${number}.typeMetadata.array.elementType` | `dataCollection.fields.${number}.systemField` | `dataCollection.fields.${number}.capabilities.sortable` | `dataCollection.fields.${number}.encrypted` | `dataCollection.permissions.insert` | `dataCollection.permissions.update` | `dataCollection.permissions.remove` | `dataCollection.permissions.read` | `dataCollection.plugins` | `dataCollection.plugins.${number}.publishOptions.defaultStatus` | `dataCollection.plugins.${number}.singleItemOptions.singleItemId` | `dataCollection.plugins.${number}.urlizedOptions.format` | `dataCollection.plugins.${number}.editablePageLinkOptions.isPersisted` | `dataCollection.plugins.${number}.editablePageLinkOptions.isMutable` | `dataCollection.plugins.${number}.type` | `dataCollection.pagingModes`, 7>>;
|
|
1636
1648
|
interface DeleteDataCollectionFieldOptions {
|
|
1637
1649
|
/**
|
|
1638
|
-
*
|
|
1650
|
+
* ID of the field to delete.
|
|
1639
1651
|
* @maxLength 1000
|
|
1640
1652
|
*/
|
|
1641
1653
|
fieldKey: string;
|
|
@@ -897,6 +897,7 @@ async function getDataCollection2(dataCollectionId, options) {
|
|
|
897
897
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
898
898
|
dataCollectionId,
|
|
899
899
|
consistentRead: options?.consistentRead,
|
|
900
|
+
includeAllowedDataPermissions: options?.includeAllowedDataPermissions,
|
|
900
901
|
fields: options?.fields
|
|
901
902
|
});
|
|
902
903
|
const reqOpts = getDataCollection(payload);
|
|
@@ -913,6 +914,7 @@ async function getDataCollection2(dataCollectionId, options) {
|
|
|
913
914
|
explicitPathsToArguments: {
|
|
914
915
|
dataCollectionId: "$[0]",
|
|
915
916
|
consistentRead: "$[1].consistentRead",
|
|
917
|
+
includeAllowedDataPermissions: "$[1].includeAllowedDataPermissions",
|
|
916
918
|
fields: "$[1].fields"
|
|
917
919
|
},
|
|
918
920
|
singleArgumentUnchanged: false
|
|
@@ -929,6 +931,7 @@ async function listDataCollections2(options) {
|
|
|
929
931
|
sort: options?.sort,
|
|
930
932
|
paging: options?.paging,
|
|
931
933
|
consistentRead: options?.consistentRead,
|
|
934
|
+
includeAllowedDataPermissions: options?.includeAllowedDataPermissions,
|
|
932
935
|
fields: options?.fields
|
|
933
936
|
});
|
|
934
937
|
const reqOpts = listDataCollections(payload);
|
|
@@ -946,6 +949,7 @@ async function listDataCollections2(options) {
|
|
|
946
949
|
sort: "$[0].sort",
|
|
947
950
|
paging: "$[0].paging",
|
|
948
951
|
consistentRead: "$[0].consistentRead",
|
|
952
|
+
includeAllowedDataPermissions: "$[0].includeAllowedDataPermissions",
|
|
949
953
|
fields: "$[0].fields"
|
|
950
954
|
},
|
|
951
955
|
singleArgumentUnchanged: false
|