@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.
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 +40 -13
  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 +46 -17
  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 +40 -13
  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 +46 -17
  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
@@ -39,19 +39,24 @@ interface UpdateDataCollectionSignature {
39
39
  /**
40
40
  * Updates a data collection.
41
41
  *
42
- * A collection ID, revision number, permissions, and at least 1 field must be provided within the `collection` body parameter.
42
+ * A collection ID, revision number, permissions, and at least 1 field must be provided in the `collection` body parameter.
43
43
  * If a collection with that ID exists, and if its current `revision` number matches the one provided, it's updated.
44
44
  * Otherwise, the request fails.
45
45
  *
46
- * When a collection is updated, its `updatedDate` property is changed to the current date and its `revision` property is incremented.
47
- *
48
46
  * <blockquote class="important">
49
47
  * <strong>Important:</strong>
50
- * After a collection is updated, it only contains the properties included in the Update Data Collection request. If the existing collection
51
- * has properties with values and those properties aren't included in the updated collection details, their values are lost.<br/><br/>
52
48
  *
53
- * To update a single field, use the Update Data Collection Field method.
49
+ * After a collection is updated, it only contains the properties included in the Update Data Collection request.
50
+ * If the existing collection has properties with values and those properties aren't included in the updated collection details,
51
+ * their values are lost.<br/><br/>
52
+ *
53
+ * 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).
54
54
  * </blockquote>
55
+ *
56
+ * When a collection is updated, its `updatedDate` changes to the current date and its `revision` increments by 1.
57
+ *
58
+ * 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).
59
+ * 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).
55
60
  * @param - Updated collection details. The existing collection is replaced with this version.
56
61
  * @param - Options for updating a data collection.
57
62
  * @returns Updated collection details.
@@ -85,11 +90,16 @@ interface RestoreDataCollectionSignature {
85
90
  */
86
91
  (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>>;
87
92
  }
88
- /** @internal */
89
93
  declare function patchDataCollection$1(httpClient: HttpClient): PatchDataCollectionSignature;
90
94
  interface PatchDataCollectionSignature {
91
95
  /**
92
- * Patches (partial update) a data collection.
96
+ * Updates specified properties of a data collection.
97
+ *
98
+ * Only updates the properties specified in the request, all other properties remain unchanged.
99
+ * The following properties can be updated with this method: `displayName`, `displayField`, `permissions`, `dataPermissions`. If attempting to update other, unsupported properties, this operation fails.
100
+ *
101
+ * 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).
102
+ * 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).
93
103
  * @param - Collection ID. For example, `my-first-collection`. May include a namespace.
94
104
  */
95
105
  (_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>>;
@@ -105,7 +115,16 @@ interface CreateDataCollectionFieldSignature {
105
115
  declare function updateDataCollectionField$1(httpClient: HttpClient): UpdateDataCollectionFieldSignature;
106
116
  interface UpdateDataCollectionFieldSignature {
107
117
  /**
108
- * Updates a field in the structure of a data collection.
118
+ * 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.
119
+ *
120
+ * <blockquote class="important">
121
+ * <strong>Important:</strong>
122
+ *
123
+ * After `fields` is updated, it only contains the properties included in the Update Data Collection Field request.
124
+ * 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/>
125
+ *
126
+ * 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).
127
+ * </blockquote>
109
128
  * @param - ID of the data collection to update.
110
129
  */
111
130
  (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>>;
@@ -125,6 +144,8 @@ declare function addDataCollectionPlugin$1(httpClient: HttpClient): AddDataColle
125
144
  interface AddDataCollectionPluginSignature {
126
145
  /**
127
146
  * Adds a plugin to a data collection.
147
+ *
148
+ * If a plugin of the same type already exists in the collection, this operation fails.
128
149
  * @param - ID of the data collection to update.
129
150
  */
130
151
  (dataCollectionId: string, options: NonNullablePaths<AddDataCollectionPluginOptions, `plugin` | `plugin.type`, 3>): Promise<NonNullablePaths<AddDataCollectionPluginResponse, `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>>;
@@ -132,7 +153,9 @@ interface AddDataCollectionPluginSignature {
132
153
  declare function deleteDataCollectionPlugin$1(httpClient: HttpClient): DeleteDataCollectionPluginSignature;
133
154
  interface DeleteDataCollectionPluginSignature {
134
155
  /**
135
- * Deletes a plugin from a data collection.
156
+ * Removes a plugin from a data collection.
157
+ *
158
+ * Removing a plugin disables its functionality for the collection.
136
159
  * @param - ID of the data collection to update.
137
160
  */
138
161
  (dataCollectionId: string, options: NonNullablePaths<DeleteDataCollectionPluginOptions, `pluginType`, 2>): Promise<NonNullablePaths<DeleteDataCollectionPluginResponse, `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>>;
@@ -140,9 +163,14 @@ interface DeleteDataCollectionPluginSignature {
140
163
  declare function patchDataCollectionField$1(httpClient: HttpClient): PatchDataCollectionFieldSignature;
141
164
  interface PatchDataCollectionFieldSignature {
142
165
  /**
143
- * Patches (partial update) a field in the structure of a data collection.
166
+ * 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.
167
+ *
168
+ * Only updates the properties specified in the request, all other properties remain unchanged.
169
+ * 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.
170
+ *
171
+ * 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).
144
172
  * @param - ID of the data collection to update.
145
- * @param - Field to patch.
173
+ * @param - Field to update.
146
174
  */
147
175
  (dataCollectionId: string, field: Field): Promise<NonNullablePaths<PatchDataCollectionFieldResponse, `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>>;
148
176
  }
@@ -154,7 +182,6 @@ declare const updateDataCollection: MaybeContext<BuildRESTFunction<typeof update
154
182
  declare const deleteDataCollection: MaybeContext<BuildRESTFunction<typeof deleteDataCollection$1> & typeof deleteDataCollection$1>;
155
183
  /** @internal */
156
184
  declare const restoreDataCollection: MaybeContext<BuildRESTFunction<typeof restoreDataCollection$1> & typeof restoreDataCollection$1>;
157
- /** @internal */
158
185
  declare const patchDataCollection: MaybeContext<BuildRESTFunction<typeof patchDataCollection$1> & typeof patchDataCollection$1>;
159
186
  declare const createDataCollectionField: MaybeContext<BuildRESTFunction<typeof createDataCollectionField$1> & typeof createDataCollectionField$1>;
160
187
  declare const updateDataCollectionField: MaybeContext<BuildRESTFunction<typeof updateDataCollectionField$1> & typeof updateDataCollectionField$1>;
@@ -938,7 +938,7 @@ function patchDataCollectionField(payload) {
938
938
  ]);
939
939
  const metadata = {
940
940
  entityFqdn: "wix.data.v2.data_collection",
941
- method: "POST",
941
+ method: "PATCH",
942
942
  methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.PatchDataCollectionField",
943
943
  packageName: PACKAGE_NAME,
944
944
  migrationOptions: {