@wix/auto_sdk_data_collections 1.0.45 → 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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +51 -13
  2. package/build/cjs/index.js +1 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +57 -16
  5. package/build/cjs/index.typings.js +1 -1
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +5 -5
  8. package/build/cjs/meta.js +2 -2
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +51 -13
  11. package/build/es/index.mjs +1 -1
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +57 -16
  14. package/build/es/index.typings.mjs +1 -1
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +5 -5
  17. package/build/es/meta.mjs +2 -2
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +41 -14
  20. package/build/internal/cjs/index.js +1 -1
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +47 -19
  23. package/build/internal/cjs/index.typings.js +1 -1
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +5 -5
  26. package/build/internal/cjs/meta.js +2 -2
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +41 -14
  29. package/build/internal/es/index.mjs +1 -1
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +47 -19
  32. package/build/internal/es/index.typings.mjs +1 -1
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +5 -5
  35. package/build/internal/es/meta.mjs +2 -2
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. 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 patch. Only fields specified in the field_mask are updated. */
1080
+ /** Data collection to update. */
1081
1081
  dataCollection: DataCollection;
1082
1082
  }
1083
1083
  interface PatchDataCollectionResponse {
1084
- /** The updated data collection. */
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 will fail.
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 patch. */
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 within the `collection` body parameter.
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
- * To update a single field, use the Update Data Collection Field method.
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,18 +1794,23 @@ 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
- * Patches (partial update) a data collection.
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
- * @internal
1805
+ * @public
1795
1806
  * @documentationMaturity preview
1796
1807
  * @requiredField _id
1797
1808
  * @requiredField dataCollection
1798
- * @requiredField dataCollection.revision
1799
1809
  * @permissionId WIX_DATA.UPDATE_COLLECTION
1800
1810
  * @applicableIdentity APP
1801
1811
  * @fqn com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollection
1802
1812
  */
1803
- declare function patchDataCollection(_id: string, dataCollection: NonNullablePaths<PatchDataCollection, `revision`, 2>): Promise<NonNullablePaths<PatchDataCollectionResponse, `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>>;
1813
+ declare function patchDataCollection(_id: string, dataCollection: PatchDataCollection): Promise<NonNullablePaths<PatchDataCollectionResponse, `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>>;
1804
1814
  interface PatchDataCollection {
1805
1815
  /**
1806
1816
  * Collection ID. For example, `my-first-collection`. May include a namespace.
@@ -1918,7 +1928,16 @@ interface CreateDataCollectionFieldOptions {
1918
1928
  field: Field;
1919
1929
  }
1920
1930
  /**
1921
- * Updates a field in the structure of a data collection.
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>
1922
1941
  * @param dataCollectionId - ID of the data collection to update.
1923
1942
  * @public
1924
1943
  * @documentationMaturity preview
@@ -1961,6 +1980,8 @@ interface DeleteDataCollectionFieldOptions {
1961
1980
  }
1962
1981
  /**
1963
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.
1964
1985
  * @param dataCollectionId - ID of the data collection to update.
1965
1986
  * @public
1966
1987
  * @documentationMaturity preview
@@ -1976,12 +1997,14 @@ declare function addDataCollectionPlugin(dataCollectionId: string, options: NonN
1976
1997
  interface AddDataCollectionPluginOptions {
1977
1998
  /**
1978
1999
  * Plugin to add to the collection. Must include the plugin type and any type-specific configuration.
1979
- * If a plugin of the same type already exists, this operation will fail.
2000
+ * If a plugin of the same type already exists in the collection, this operation fails.
1980
2001
  */
1981
2002
  plugin: Plugin;
1982
2003
  }
1983
2004
  /**
1984
- * Deletes a plugin from a data collection.
2005
+ * Removes a plugin from a data collection.
2006
+ *
2007
+ * Removing a plugin disables its functionality for the collection.
1985
2008
  * @param dataCollectionId - ID of the data collection to update.
1986
2009
  * @public
1987
2010
  * @documentationMaturity preview
@@ -1998,9 +2021,14 @@ interface DeleteDataCollectionPluginOptions {
1998
2021
  pluginType: PluginTypeWithLiterals;
1999
2022
  }
2000
2023
  /**
2001
- * Patches (partial update) a field in the structure of a data collection.
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).
2002
2030
  * @param dataCollectionId - ID of the data collection to update.
2003
- * @param field - Field to patch.
2031
+ * @param field - Field to update.
2004
2032
  * @public
2005
2033
  * @documentationMaturity preview
2006
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: "POST",
886
+ method: "PATCH",
887
887
  methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
888
888
  packageName: PACKAGE_NAME,
889
889
  migrationOptions: {