@wix/wix-data-items-common 1.0.307 → 1.0.308
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/dist/cjs/api/WixDataApi.js +21 -26
- package/dist/cjs/api/WixDataApi.js.map +1 -1
- package/dist/cjs/api/WixDataAsyncPatchByFilterOptionsBuilder.js +43 -0
- package/dist/cjs/api/WixDataAsyncPatchByFilterOptionsBuilder.js.map +1 -0
- package/dist/cjs/api/index.js +7 -2
- package/dist/cjs/api/index.js.map +1 -1
- package/dist/cjs/api/types.js.map +1 -1
- package/dist/esm/api/WixDataApi.js +20 -21
- package/dist/esm/api/WixDataApi.js.map +1 -1
- package/dist/esm/api/WixDataAsyncPatchByFilterOptionsBuilder.js +28 -0
- package/dist/esm/api/WixDataAsyncPatchByFilterOptionsBuilder.js.map +1 -0
- package/dist/esm/api/index.js +1 -0
- package/dist/esm/api/index.js.map +1 -1
- package/dist/types/api/WixDataApi.d.ts +4 -4
- package/dist/types/api/WixDataApi.d.ts.map +1 -1
- package/dist/types/api/WixDataAsyncPatchByFilterOptionsBuilder.d.ts +16 -0
- package/dist/types/api/WixDataAsyncPatchByFilterOptionsBuilder.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +3 -1
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +10 -0
- package/dist/types/api/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -213,32 +213,27 @@ class WixDataApi {
|
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
|
-
(0, _defineProperty2.default)(this, "asyncPatchByFilter", (collectionName, filter) => {
|
|
216
|
+
(0, _defineProperty2.default)(this, "asyncPatchByFilter", withArgs(async (args, collectionName, filter, fieldModifications, options) => {
|
|
217
|
+
await apiValidator().arity('asyncPatchByFilter', args, 3, 4).collectionName(collectionName).options(options).validateAndReject();
|
|
217
218
|
const apiFilter = createExplicitFilter(filter);
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
});
|
|
235
|
-
return {
|
|
236
|
-
jobId: jobId
|
|
237
|
-
};
|
|
238
|
-
});
|
|
239
|
-
}
|
|
219
|
+
const apiFieldModifications = fieldModifications.map(this.toFieldModificationApi);
|
|
220
|
+
return this.trace('asyncPatchByFilter', {
|
|
221
|
+
collectionName
|
|
222
|
+
})(async env => {
|
|
223
|
+
const {
|
|
224
|
+
jobId
|
|
225
|
+
} = await this.client.asyncPatchDataItemsByFilter({
|
|
226
|
+
...env,
|
|
227
|
+
dataCollectionId: collectionName,
|
|
228
|
+
filter: apiFilter,
|
|
229
|
+
fieldModifications: apiFieldModifications,
|
|
230
|
+
...toAsyncPatchByFilterOptions(options)
|
|
231
|
+
});
|
|
232
|
+
return {
|
|
233
|
+
jobId: jobId
|
|
234
|
+
};
|
|
240
235
|
});
|
|
241
|
-
});
|
|
236
|
+
}));
|
|
242
237
|
(0, _defineProperty2.default)(this, "asyncRemoveByFilter", withArgs(async (args, collectionName, filter, options) => {
|
|
243
238
|
await apiValidator().arity('asyncRemoveByFilter', args, 2, 3).collectionName(collectionName).options(options).validateAndReject();
|
|
244
239
|
const apiFilter = createExplicitFilter(filter);
|
|
@@ -1129,10 +1124,10 @@ function toBulkPatchOptions(options) {
|
|
|
1129
1124
|
...conditionOptions(options == null ? void 0 : options.condition)
|
|
1130
1125
|
};
|
|
1131
1126
|
}
|
|
1132
|
-
function
|
|
1127
|
+
function toAsyncRemoveByFilterOptions(options) {
|
|
1133
1128
|
return toAsyncOptions(options);
|
|
1134
1129
|
}
|
|
1135
|
-
function
|
|
1130
|
+
function toAsyncPatchByFilterOptions(options) {
|
|
1136
1131
|
return toAsyncOptions(options);
|
|
1137
1132
|
}
|
|
1138
1133
|
function toAsyncOptions(options) {
|