@wix/auto_sdk_data_collections 1.0.46 → 1.0.47
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 +51 -13
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +57 -16
- package/build/cjs/index.typings.js +1 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +5 -5
- package/build/cjs/meta.js +2 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +51 -13
- package/build/es/index.mjs +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +57 -16
- package/build/es/index.typings.mjs +1 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +5 -5
- package/build/es/meta.mjs +2 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +40 -13
- package/build/internal/cjs/index.js +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +46 -17
- package/build/internal/cjs/index.typings.js +1 -1
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +5 -5
- package/build/internal/cjs/meta.js +2 -2
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +40 -13
- package/build/internal/es/index.mjs +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +46 -17
- package/build/internal/es/index.typings.mjs +1 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +5 -5
- package/build/internal/es/meta.mjs +2 -2
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1077,11 +1077,11 @@ interface RestoreDataCollectionResponse {
|
|
|
1077
1077
|
dataCollection?: DataCollection;
|
|
1078
1078
|
}
|
|
1079
1079
|
interface PatchDataCollectionRequest {
|
|
1080
|
-
/** Data collection to
|
|
1080
|
+
/** Data collection to update. */
|
|
1081
1081
|
dataCollection: DataCollection;
|
|
1082
1082
|
}
|
|
1083
1083
|
interface PatchDataCollectionResponse {
|
|
1084
|
-
/**
|
|
1084
|
+
/** Updated data collection. */
|
|
1085
1085
|
dataCollection?: DataCollection;
|
|
1086
1086
|
}
|
|
1087
1087
|
interface CreateDataCollectionFieldRequest {
|
|
@@ -1134,7 +1134,7 @@ interface AddDataCollectionPluginRequest {
|
|
|
1134
1134
|
dataCollectionId: string;
|
|
1135
1135
|
/**
|
|
1136
1136
|
* Plugin to add to the collection. Must include the plugin type and any type-specific configuration.
|
|
1137
|
-
* If a plugin of the same type already exists, this operation
|
|
1137
|
+
* If a plugin of the same type already exists in the collection, this operation fails.
|
|
1138
1138
|
*/
|
|
1139
1139
|
plugin: Plugin;
|
|
1140
1140
|
}
|
|
@@ -1161,7 +1161,7 @@ interface PatchDataCollectionFieldRequest {
|
|
|
1161
1161
|
* @maxLength 256
|
|
1162
1162
|
*/
|
|
1163
1163
|
dataCollectionId: string;
|
|
1164
|
-
/** Field to
|
|
1164
|
+
/** Field to update. */
|
|
1165
1165
|
field: Field;
|
|
1166
1166
|
}
|
|
1167
1167
|
interface PatchDataCollectionFieldResponse {
|
|
@@ -1726,19 +1726,24 @@ interface ListDataCollectionsOptions {
|
|
|
1726
1726
|
/**
|
|
1727
1727
|
* Updates a data collection.
|
|
1728
1728
|
*
|
|
1729
|
-
* A collection ID, revision number, permissions, and at least 1 field must be provided
|
|
1729
|
+
* A collection ID, revision number, permissions, and at least 1 field must be provided in the `collection` body parameter.
|
|
1730
1730
|
* If a collection with that ID exists, and if its current `revision` number matches the one provided, it's updated.
|
|
1731
1731
|
* Otherwise, the request fails.
|
|
1732
1732
|
*
|
|
1733
|
-
* When a collection is updated, its `updatedDate` property is changed to the current date and its `revision` property is incremented.
|
|
1734
|
-
*
|
|
1735
1733
|
* <blockquote class="important">
|
|
1736
1734
|
* <strong>Important:</strong>
|
|
1737
|
-
* After a collection is updated, it only contains the properties included in the Update Data Collection request. If the existing collection
|
|
1738
|
-
* has properties with values and those properties aren't included in the updated collection details, their values are lost.<br/><br/>
|
|
1739
1735
|
*
|
|
1740
|
-
*
|
|
1736
|
+
* After a collection is updated, it only contains the properties included in the Update Data Collection request.
|
|
1737
|
+
* If the existing collection has properties with values and those properties aren't included in the updated collection details,
|
|
1738
|
+
* their values are lost.<br/><br/>
|
|
1739
|
+
*
|
|
1740
|
+
* To update only specific properties without affecting others, use [Patch Data Collection](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/patch-data-collection).
|
|
1741
1741
|
* </blockquote>
|
|
1742
|
+
*
|
|
1743
|
+
* When a collection is updated, its `updatedDate` changes to the current date and its `revision` increments by 1.
|
|
1744
|
+
*
|
|
1745
|
+
* To update only properties in a collection's `fields` array, use [Update Data Collection Field](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/update-data-collection-field).
|
|
1746
|
+
* To only add or remove `plugins`, use [Add Data Collection Plugin](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/add-data-collection-plugin) or [Delete Data Collection Plugin](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/delete-data-collection-plugin).
|
|
1742
1747
|
* @param collection - Updated collection details. The existing collection is replaced with this version.
|
|
1743
1748
|
* @public
|
|
1744
1749
|
* @requiredField collection
|
|
@@ -1789,9 +1794,15 @@ declare function deleteDataCollection(dataCollectionId: string): Promise<void>;
|
|
|
1789
1794
|
*/
|
|
1790
1795
|
declare function restoreDataCollection(dataCollectionId: string): Promise<NonNullablePaths<RestoreDataCollectionResponse, `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>>;
|
|
1791
1796
|
/**
|
|
1792
|
-
*
|
|
1797
|
+
* Updates specified properties of a data collection.
|
|
1798
|
+
*
|
|
1799
|
+
* Only updates the properties specified in the request, all other properties remain unchanged.
|
|
1800
|
+
* The following properties can be updated with this method: `displayName`, `displayField`, `permissions`, `dataPermissions`. If attempting to update other, unsupported properties, this operation fails.
|
|
1801
|
+
*
|
|
1802
|
+
* To update properties in a collection's `fields`array, use [Patch Data Collection Field](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/patch-data-collection-field).
|
|
1803
|
+
* To add or remove `plugins`, use [Add Data Collection Plugin](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/add-data-collection-plugin) or [Delete Data Collection Plugin](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/delete-data-collection-plugin).
|
|
1793
1804
|
* @param _id - Collection ID. For example, `my-first-collection`. May include a namespace.
|
|
1794
|
-
* @
|
|
1805
|
+
* @public
|
|
1795
1806
|
* @documentationMaturity preview
|
|
1796
1807
|
* @requiredField _id
|
|
1797
1808
|
* @requiredField dataCollection
|
|
@@ -1917,7 +1928,16 @@ interface CreateDataCollectionFieldOptions {
|
|
|
1917
1928
|
field: Field;
|
|
1918
1929
|
}
|
|
1919
1930
|
/**
|
|
1920
|
-
* Updates
|
|
1931
|
+
* Updates properties in a [data collection's](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/create-data-collection) `fields` array.
|
|
1932
|
+
*
|
|
1933
|
+
* <blockquote class="important">
|
|
1934
|
+
* <strong>Important:</strong>
|
|
1935
|
+
*
|
|
1936
|
+
* After `fields` is updated, it only contains the properties included in the Update Data Collection Field request.
|
|
1937
|
+
* If the existing `fields` array has properties with values and those properties aren't included in the updated details, their values are lost.<br/><br/>
|
|
1938
|
+
*
|
|
1939
|
+
* To update only specific properties in the array without affecting others, use [Patch Data Collection Field](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/patch-data-collection-field).
|
|
1940
|
+
* </blockquote>
|
|
1921
1941
|
* @param dataCollectionId - ID of the data collection to update.
|
|
1922
1942
|
* @public
|
|
1923
1943
|
* @documentationMaturity preview
|
|
@@ -1960,6 +1980,8 @@ interface DeleteDataCollectionFieldOptions {
|
|
|
1960
1980
|
}
|
|
1961
1981
|
/**
|
|
1962
1982
|
* Adds a plugin to a data collection.
|
|
1983
|
+
*
|
|
1984
|
+
* If a plugin of the same type already exists in the collection, this operation fails.
|
|
1963
1985
|
* @param dataCollectionId - ID of the data collection to update.
|
|
1964
1986
|
* @public
|
|
1965
1987
|
* @documentationMaturity preview
|
|
@@ -1975,12 +1997,14 @@ declare function addDataCollectionPlugin(dataCollectionId: string, options: NonN
|
|
|
1975
1997
|
interface AddDataCollectionPluginOptions {
|
|
1976
1998
|
/**
|
|
1977
1999
|
* Plugin to add to the collection. Must include the plugin type and any type-specific configuration.
|
|
1978
|
-
* If a plugin of the same type already exists, this operation
|
|
2000
|
+
* If a plugin of the same type already exists in the collection, this operation fails.
|
|
1979
2001
|
*/
|
|
1980
2002
|
plugin: Plugin;
|
|
1981
2003
|
}
|
|
1982
2004
|
/**
|
|
1983
|
-
*
|
|
2005
|
+
* Removes a plugin from a data collection.
|
|
2006
|
+
*
|
|
2007
|
+
* Removing a plugin disables its functionality for the collection.
|
|
1984
2008
|
* @param dataCollectionId - ID of the data collection to update.
|
|
1985
2009
|
* @public
|
|
1986
2010
|
* @documentationMaturity preview
|
|
@@ -1997,9 +2021,14 @@ interface DeleteDataCollectionPluginOptions {
|
|
|
1997
2021
|
pluginType: PluginTypeWithLiterals;
|
|
1998
2022
|
}
|
|
1999
2023
|
/**
|
|
2000
|
-
*
|
|
2024
|
+
* Updates specified properties in a [data collection's](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/create-data-collection) `fields` array.
|
|
2025
|
+
*
|
|
2026
|
+
* Only updates the properties specified in the request, all other properties remain unchanged.
|
|
2027
|
+
* The following properties can be updated with this method: `displayName`, `type`, `typeMetadata`, `encrypted`, `description`. If attempting to update `key` or other unsupported properties, this operation fails.
|
|
2028
|
+
*
|
|
2029
|
+
* To update properties in a data collection other than `fields`, use [Patch Data Collection](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/patch-data-collection).
|
|
2001
2030
|
* @param dataCollectionId - ID of the data collection to update.
|
|
2002
|
-
* @param field - Field to
|
|
2031
|
+
* @param field - Field to update.
|
|
2003
2032
|
* @public
|
|
2004
2033
|
* @documentationMaturity preview
|
|
2005
2034
|
* @requiredField dataCollectionId
|
|
@@ -883,7 +883,7 @@ function patchDataCollectionField(payload) {
|
|
|
883
883
|
]);
|
|
884
884
|
const metadata = {
|
|
885
885
|
entityFqdn: "wix.data.v2.data_collection",
|
|
886
|
-
method: "
|
|
886
|
+
method: "PATCH",
|
|
887
887
|
methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
|
|
888
888
|
packageName: PACKAGE_NAME,
|
|
889
889
|
migrationOptions: {
|