@wix/auto_sdk_data_collections 1.0.24 → 1.0.26

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.
@@ -40,14 +40,18 @@ interface UpdateDataCollectionSignature {
40
40
  * Updates a data collection.
41
41
  *
42
42
  * A collection ID, revision number, permissions, and at least 1 field must be provided within the `collection` body parameter.
43
- * If a collection with that ID exists, and if its current `revision` number matches the one provided, it is updated.
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
46
  * When a collection is updated, its `updatedDate` property is changed to the current date and its `revision` property is incremented.
47
47
  *
48
- * > **Note:**
49
- * > After a collection is updated, it only contains the properties included in the Update Data Collection request. If the existing collection has properties with values and those properties
50
- * > aren't included in the updated collection details, their values are lost.
48
+ * <blockquote class="important">
49
+ * <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
+ *
53
+ * To update a single field, use the Update Data Collection Field method.
54
+ * </blockquote>
51
55
  * @param - Updated collection details. The existing collection is replaced with this version.
52
56
  * @param - Options for updating a data collection.
53
57
  * @returns Updated collection details.
@@ -59,8 +63,13 @@ interface DeleteDataCollectionSignature {
59
63
  /**
60
64
  * Deletes a data collection.
61
65
  *
66
+ * Before deleting a collection:
67
+ * - Make sure the collection isn't connected to any site pages or elements.
68
+ * - You can create a manual backup of a collections with the Backups API, in case you need to restore them later.
69
+ * - 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.
70
+ *
62
71
  * > **Note:**
63
- * > Once a collection is deleted, it can only be restored for limited amount of time.
72
+ * > Once a collection is deleted, it can only be restored for a limited amount of time.
64
73
  * @param - ID of the collection to delete.
65
74
  */
66
75
  (dataCollectionId: string): Promise<void>;
@@ -68,24 +77,27 @@ interface DeleteDataCollectionSignature {
68
77
  declare function createDataCollectionField$1(httpClient: HttpClient): CreateDataCollectionFieldSignature;
69
78
  interface CreateDataCollectionFieldSignature {
70
79
  /**
71
- * Adds new field to data collection schema
72
- * @param - ID of data collection to update
80
+ * Adds a new field to the structure of a data collection.
81
+ * @param - ID of the data collection to update.
73
82
  */
74
83
  (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>>;
75
84
  }
76
85
  declare function updateDataCollectionField$1(httpClient: HttpClient): UpdateDataCollectionFieldSignature;
77
86
  interface UpdateDataCollectionFieldSignature {
78
87
  /**
79
- * Updates data collection field
80
- * @param - ID of data collection to update
88
+ * Updates a field in the structure of a data collection.
89
+ * @param - ID of the data collection to update.
81
90
  */
82
91
  (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>>;
83
92
  }
84
93
  declare function deleteDataCollectionField$1(httpClient: HttpClient): DeleteDataCollectionFieldSignature;
85
94
  interface DeleteDataCollectionFieldSignature {
86
95
  /**
87
- * Deletes data collection field
88
- * @param - ID of data collection to update
96
+ * Deletes a field from the structure of a data collection.
97
+ *
98
+ * When a field is deleted, all values associated with that field are also deleted
99
+ * from all items in the collection.
100
+ * @param - ID of the data collection to update.
89
101
  */
90
102
  (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>>;
91
103
  }
@@ -947,6 +947,7 @@ async function getDataCollection2(dataCollectionId, options) {
947
947
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
948
948
  dataCollectionId,
949
949
  consistentRead: options?.consistentRead,
950
+ includeAllowedDataPermissions: options?.includeAllowedDataPermissions,
950
951
  fields: options?.fields
951
952
  });
952
953
  const reqOpts = getDataCollection(payload);
@@ -963,6 +964,7 @@ async function getDataCollection2(dataCollectionId, options) {
963
964
  explicitPathsToArguments: {
964
965
  dataCollectionId: "$[0]",
965
966
  consistentRead: "$[1].consistentRead",
967
+ includeAllowedDataPermissions: "$[1].includeAllowedDataPermissions",
966
968
  fields: "$[1].fields"
967
969
  },
968
970
  singleArgumentUnchanged: false
@@ -979,6 +981,7 @@ async function listDataCollections2(options) {
979
981
  sort: options?.sort,
980
982
  paging: options?.paging,
981
983
  consistentRead: options?.consistentRead,
984
+ includeAllowedDataPermissions: options?.includeAllowedDataPermissions,
982
985
  fields: options?.fields
983
986
  });
984
987
  const reqOpts = listDataCollections(payload);
@@ -996,6 +999,7 @@ async function listDataCollections2(options) {
996
999
  sort: "$[0].sort",
997
1000
  paging: "$[0].paging",
998
1001
  consistentRead: "$[0].consistentRead",
1002
+ includeAllowedDataPermissions: "$[0].includeAllowedDataPermissions",
999
1003
  fields: "$[0].fields"
1000
1004
  },
1001
1005
  singleArgumentUnchanged: false