@wix/data 1.0.72 → 1.0.74
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.js +5 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +5 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +5 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.http.js +10 -54
- package/build/cjs/src/data-v1-external-database-connection.http.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.meta.d.ts +1 -1
- package/build/cjs/src/data-v1-external-database-connection.meta.js +5 -1
- package/build/cjs/src/data-v1-external-database-connection.meta.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.public.d.ts +2 -5
- package/build/cjs/src/data-v1-external-database-connection.public.js +2 -1
- package/build/cjs/src/data-v1-external-database-connection.public.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.types.d.ts +16 -13
- package/build/cjs/src/data-v1-external-database-connection.types.js +21 -5
- package/build/cjs/src/data-v1-external-database-connection.types.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.universal.d.ts +16 -37
- package/build/cjs/src/data-v1-external-database-connection.universal.js +52 -22
- package/build/cjs/src/data-v1-external-database-connection.universal.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.http.js +111 -115
- package/build/cjs/src/data-v2-data-collection.http.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.meta.d.ts +1 -1
- package/build/cjs/src/data-v2-data-collection.meta.js +5 -1
- package/build/cjs/src/data-v2-data-collection.meta.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.public.d.ts +4 -4
- package/build/cjs/src/data-v2-data-collection.public.js +3 -1
- package/build/cjs/src/data-v2-data-collection.public.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.types.d.ts +92 -0
- package/build/cjs/src/data-v2-data-collection.types.js +40 -14
- package/build/cjs/src/data-v2-data-collection.types.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.universal.d.ts +92 -0
- package/build/cjs/src/data-v2-data-collection.universal.js +78 -31
- package/build/cjs/src/data-v2-data-collection.universal.js.map +1 -1
- package/build/cjs/src/data-v2-data-item.http.js +42 -190
- package/build/cjs/src/data-v2-data-item.http.js.map +1 -1
- package/build/cjs/src/data-v2-data-item.meta.d.ts +1 -1
- package/build/cjs/src/data-v2-data-item.meta.js +5 -1
- package/build/cjs/src/data-v2-data-item.meta.js.map +1 -1
- package/build/cjs/src/data-v2-data-item.public.d.ts +12 -12
- package/build/cjs/src/data-v2-data-item.types.js +4 -4
- package/build/cjs/src/data-v2-data-item.types.js.map +1 -1
- package/build/cjs/src/data-v2-data-item.universal.js +202 -68
- package/build/cjs/src/data-v2-data-item.universal.js.map +1 -1
- package/build/cjs/src/data-v2-index.http.js +6 -28
- package/build/cjs/src/data-v2-index.http.js.map +1 -1
- package/build/cjs/src/data-v2-index.meta.d.ts +1 -1
- package/build/cjs/src/data-v2-index.meta.js +5 -1
- package/build/cjs/src/data-v2-index.meta.js.map +1 -1
- package/build/cjs/src/data-v2-index.public.d.ts +1 -1
- package/build/cjs/src/data-v2-index.types.js +3 -3
- package/build/cjs/src/data-v2-index.types.js.map +1 -1
- package/build/cjs/src/data-v2-index.universal.js +30 -16
- package/build/cjs/src/data-v2-index.universal.js.map +1 -1
- package/build/es/src/data-v1-external-database-connection.http.js +10 -54
- package/build/es/src/data-v1-external-database-connection.http.js.map +1 -1
- package/build/es/src/data-v1-external-database-connection.meta.d.ts +1 -1
- package/build/es/src/data-v1-external-database-connection.public.d.ts +2 -5
- package/build/es/src/data-v1-external-database-connection.public.js +1 -1
- package/build/es/src/data-v1-external-database-connection.public.js.map +1 -1
- package/build/es/src/data-v1-external-database-connection.types.d.ts +16 -13
- package/build/es/src/data-v1-external-database-connection.types.js +16 -0
- package/build/es/src/data-v1-external-database-connection.types.js.map +1 -1
- package/build/es/src/data-v1-external-database-connection.universal.d.ts +16 -37
- package/build/es/src/data-v1-external-database-connection.universal.js +43 -17
- package/build/es/src/data-v1-external-database-connection.universal.js.map +1 -1
- package/build/es/src/data-v2-data-collection.http.js +111 -115
- package/build/es/src/data-v2-data-collection.http.js.map +1 -1
- package/build/es/src/data-v2-data-collection.meta.d.ts +1 -1
- package/build/es/src/data-v2-data-collection.public.d.ts +4 -4
- package/build/es/src/data-v2-data-collection.public.js +1 -1
- package/build/es/src/data-v2-data-collection.public.js.map +1 -1
- package/build/es/src/data-v2-data-collection.types.d.ts +92 -0
- package/build/es/src/data-v2-data-collection.types.js +26 -0
- package/build/es/src/data-v2-data-collection.types.js.map +1 -1
- package/build/es/src/data-v2-data-collection.universal.d.ts +92 -0
- package/build/es/src/data-v2-data-collection.universal.js +60 -17
- package/build/es/src/data-v2-data-collection.universal.js.map +1 -1
- package/build/es/src/data-v2-data-item.http.js +42 -190
- package/build/es/src/data-v2-data-item.http.js.map +1 -1
- package/build/es/src/data-v2-data-item.meta.d.ts +1 -1
- package/build/es/src/data-v2-data-item.public.d.ts +12 -12
- package/build/es/src/data-v2-data-item.universal.js +193 -63
- package/build/es/src/data-v2-data-item.universal.js.map +1 -1
- package/build/es/src/data-v2-index.http.js +6 -28
- package/build/es/src/data-v2-index.http.js.map +1 -1
- package/build/es/src/data-v2-index.meta.d.ts +1 -1
- package/build/es/src/data-v2-index.public.d.ts +1 -1
- package/build/es/src/data-v2-index.universal.js +23 -13
- package/build/es/src/data-v2-index.universal.js.map +1 -1
- package/package.json +7 -3
|
@@ -2,50 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.replaceDataItemReferences = exports.bulkRemoveDataItemReferences = exports.bulkInsertDataItemReferences = exports.removeDataItemReference = exports.insertDataItemReference = exports.isReferencedDataItem = exports.queryReferencedDataItems = exports.bulkRemoveDataItems = exports.bulkSaveDataItems = exports.bulkUpdateDataItems = exports.bulkInsertDataItems = exports.queryDistinctValues = exports.countDataItems = exports.aggregateDataItems = exports.queryDataItems = exports.truncateDataItems = exports.removeDataItem = exports.getDataItem = exports.saveDataItem = exports.updateDataItem = exports.insertDataItem = void 0;
|
|
4
4
|
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
5
|
-
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
|
6
5
|
const metro_runtime_2 = require("@wix/metro-runtime");
|
|
7
|
-
const _aggregateDataItemsRequest = {};
|
|
8
|
-
const _aggregateDataItemsResponse = {};
|
|
9
|
-
const _bulkInsertDataItemReferencesRequest = {};
|
|
10
|
-
const _bulkInsertDataItemReferencesResponse = {};
|
|
11
|
-
const _bulkInsertDataItemsRequest = {};
|
|
12
|
-
const _bulkInsertDataItemsResponse = {};
|
|
13
|
-
const _bulkRemoveDataItemReferencesRequest = {};
|
|
14
|
-
const _bulkRemoveDataItemReferencesResponse = {};
|
|
15
|
-
const _bulkRemoveDataItemsRequest = {};
|
|
16
|
-
const _bulkRemoveDataItemsResponse = {};
|
|
17
|
-
const _bulkSaveDataItemsRequest = {};
|
|
18
|
-
const _bulkSaveDataItemsResponse = {};
|
|
19
|
-
const _bulkUpdateDataItemsRequest = {};
|
|
20
|
-
const _bulkUpdateDataItemsResponse = {};
|
|
21
|
-
const _countDataItemsRequest = {};
|
|
22
|
-
const _countDataItemsResponse = {};
|
|
23
|
-
const _getDataItemRequest = {};
|
|
24
|
-
const _getDataItemResponse = {};
|
|
25
|
-
const _insertDataItemReferenceRequest = {};
|
|
26
|
-
const _insertDataItemReferenceResponse = {};
|
|
27
|
-
const _insertDataItemRequest = {};
|
|
28
|
-
const _insertDataItemResponse = {};
|
|
29
|
-
const _isReferencedDataItemRequest = {};
|
|
30
|
-
const _isReferencedDataItemResponse = {};
|
|
31
|
-
const _queryDataItemsRequest = {};
|
|
32
|
-
const _queryDataItemsResponse = {};
|
|
33
|
-
const _queryDistinctValuesRequest = {};
|
|
34
|
-
const _queryDistinctValuesResponse = {};
|
|
35
|
-
const _queryReferencedDataItemsRequest = {};
|
|
36
|
-
const _queryReferencedDataItemsResponse = {};
|
|
37
|
-
const _removeDataItemReferenceRequest = {};
|
|
38
|
-
const _removeDataItemReferenceResponse = {};
|
|
39
|
-
const _removeDataItemRequest = {};
|
|
40
|
-
const _removeDataItemResponse = {};
|
|
41
|
-
const _replaceDataItemReferencesRequest = {};
|
|
42
|
-
const _replaceDataItemReferencesResponse = {};
|
|
43
|
-
const _saveDataItemRequest = {};
|
|
44
|
-
const _saveDataItemResponse = {};
|
|
45
|
-
const _truncateDataItemsRequest = {};
|
|
46
|
-
const _truncateDataItemsResponse = {};
|
|
47
|
-
const _updateDataItemRequest = {};
|
|
48
|
-
const _updateDataItemResponse = {};
|
|
49
6
|
function resolveComWixpressCloudDataApiDataDataItemServiceUrl(opts) {
|
|
50
7
|
const domainToMappings = {
|
|
51
8
|
'api._api_base_domain_': [
|
|
@@ -327,25 +284,20 @@ function resolveComWixpressCloudDataApiDataDataItemServiceUrl(opts) {
|
|
|
327
284
|
* If `options.dataItem.data` is empty, a new item is created with no data fields.
|
|
328
285
|
*/
|
|
329
286
|
function insertDataItem(payload) {
|
|
330
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_insertDataItemRequest, {});
|
|
331
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_insertDataItemResponse, {});
|
|
332
287
|
function __insertDataItem({ host }) {
|
|
333
|
-
const serializedData = toReq(payload);
|
|
334
288
|
const metadata = {
|
|
335
289
|
entityFqdn: 'wix.data.v2.data_item',
|
|
336
290
|
method: 'POST',
|
|
337
291
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.InsertDataItem',
|
|
338
292
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
339
293
|
protoPath: '/v2/items',
|
|
340
|
-
data:
|
|
294
|
+
data: payload,
|
|
341
295
|
host,
|
|
342
296
|
}),
|
|
343
|
-
data:
|
|
344
|
-
transformResponse: fromRes,
|
|
297
|
+
data: payload,
|
|
345
298
|
};
|
|
346
299
|
return metadata;
|
|
347
300
|
}
|
|
348
|
-
__insertDataItem.fromReq = fromReq;
|
|
349
301
|
return __insertDataItem;
|
|
350
302
|
}
|
|
351
303
|
exports.insertDataItem = insertDataItem;
|
|
@@ -366,25 +318,20 @@ exports.insertDataItem = insertDataItem;
|
|
|
366
318
|
* > If the existing item has fields with values and those fields aren't included in the updated item, their values are lost.
|
|
367
319
|
*/
|
|
368
320
|
function updateDataItem(payload) {
|
|
369
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateDataItemRequest, {});
|
|
370
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_updateDataItemResponse, {});
|
|
371
321
|
function __updateDataItem({ host }) {
|
|
372
|
-
const serializedData = toReq(payload);
|
|
373
322
|
const metadata = {
|
|
374
323
|
entityFqdn: 'wix.data.v2.data_item',
|
|
375
324
|
method: 'PUT',
|
|
376
325
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.UpdateDataItem',
|
|
377
326
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
378
327
|
protoPath: '/v2/items/{dataItem.id}',
|
|
379
|
-
data:
|
|
328
|
+
data: payload,
|
|
380
329
|
host,
|
|
381
330
|
}),
|
|
382
|
-
data:
|
|
383
|
-
transformResponse: fromRes,
|
|
331
|
+
data: payload,
|
|
384
332
|
};
|
|
385
333
|
return metadata;
|
|
386
334
|
}
|
|
387
|
-
__updateDataItem.fromReq = fromReq;
|
|
388
335
|
return __updateDataItem;
|
|
389
336
|
}
|
|
390
337
|
exports.updateDataItem = updateDataItem;
|
|
@@ -404,25 +351,20 @@ exports.updateDataItem = updateDataItem;
|
|
|
404
351
|
* > This means that the item's previous fields and values are lost.
|
|
405
352
|
*/
|
|
406
353
|
function saveDataItem(payload) {
|
|
407
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_saveDataItemRequest, {});
|
|
408
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_saveDataItemResponse, {});
|
|
409
354
|
function __saveDataItem({ host }) {
|
|
410
|
-
const serializedData = toReq(payload);
|
|
411
355
|
const metadata = {
|
|
412
356
|
entityFqdn: 'wix.data.v2.data_item',
|
|
413
357
|
method: 'POST',
|
|
414
358
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.SaveDataItem',
|
|
415
359
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
416
360
|
protoPath: '/v2/items/save',
|
|
417
|
-
data:
|
|
361
|
+
data: payload,
|
|
418
362
|
host,
|
|
419
363
|
}),
|
|
420
|
-
data:
|
|
421
|
-
transformResponse: fromRes,
|
|
364
|
+
data: payload,
|
|
422
365
|
};
|
|
423
366
|
return metadata;
|
|
424
367
|
}
|
|
425
|
-
__saveDataItem.fromReq = fromReq;
|
|
426
368
|
return __saveDataItem;
|
|
427
369
|
}
|
|
428
370
|
exports.saveDataItem = saveDataItem;
|
|
@@ -433,25 +375,20 @@ exports.saveDataItem = saveDataItem;
|
|
|
433
375
|
* > **Note**: When calling `getDataItem()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
434
376
|
*/
|
|
435
377
|
function getDataItem(payload) {
|
|
436
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getDataItemRequest, {});
|
|
437
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getDataItemResponse, {});
|
|
438
378
|
function __getDataItem({ host }) {
|
|
439
|
-
const serializedData = toReq(payload);
|
|
440
379
|
const metadata = {
|
|
441
380
|
entityFqdn: 'wix.data.v2.data_item',
|
|
442
381
|
method: 'GET',
|
|
443
382
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.GetDataItem',
|
|
444
383
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
445
384
|
protoPath: '/v2/items/{dataItemId}',
|
|
446
|
-
data:
|
|
385
|
+
data: payload,
|
|
447
386
|
host,
|
|
448
387
|
}),
|
|
449
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
450
|
-
transformResponse: fromRes,
|
|
388
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
451
389
|
};
|
|
452
390
|
return metadata;
|
|
453
391
|
}
|
|
454
|
-
__getDataItem.fromReq = fromReq;
|
|
455
392
|
return __getDataItem;
|
|
456
393
|
}
|
|
457
394
|
exports.getDataItem = getDataItem;
|
|
@@ -465,25 +402,20 @@ exports.getDataItem = getDataItem;
|
|
|
465
402
|
* > Once an item has been removed from a collection, it can't be restored.
|
|
466
403
|
*/
|
|
467
404
|
function removeDataItem(payload) {
|
|
468
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_removeDataItemRequest, {});
|
|
469
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_removeDataItemResponse, {});
|
|
470
405
|
function __removeDataItem({ host }) {
|
|
471
|
-
const serializedData = toReq(payload);
|
|
472
406
|
const metadata = {
|
|
473
407
|
entityFqdn: 'wix.data.v2.data_item',
|
|
474
408
|
method: 'DELETE',
|
|
475
409
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.RemoveDataItem',
|
|
476
410
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
477
411
|
protoPath: '/v2/items/{dataItemId}',
|
|
478
|
-
data:
|
|
412
|
+
data: payload,
|
|
479
413
|
host,
|
|
480
414
|
}),
|
|
481
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
482
|
-
transformResponse: fromRes,
|
|
415
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
483
416
|
};
|
|
484
417
|
return metadata;
|
|
485
418
|
}
|
|
486
|
-
__removeDataItem.fromReq = fromReq;
|
|
487
419
|
return __removeDataItem;
|
|
488
420
|
}
|
|
489
421
|
exports.removeDataItem = removeDataItem;
|
|
@@ -497,25 +429,20 @@ exports.removeDataItem = removeDataItem;
|
|
|
497
429
|
* > Once items have been removed from a collection, they can't be restored.
|
|
498
430
|
*/
|
|
499
431
|
function truncateDataItems(payload) {
|
|
500
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_truncateDataItemsRequest, {});
|
|
501
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_truncateDataItemsResponse, {});
|
|
502
432
|
function __truncateDataItems({ host }) {
|
|
503
|
-
const serializedData = toReq(payload);
|
|
504
433
|
const metadata = {
|
|
505
434
|
entityFqdn: 'wix.data.v2.data_item',
|
|
506
435
|
method: 'POST',
|
|
507
436
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.TruncateDataItems',
|
|
508
437
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
509
438
|
protoPath: '/v2/items/truncate',
|
|
510
|
-
data:
|
|
439
|
+
data: payload,
|
|
511
440
|
host,
|
|
512
441
|
}),
|
|
513
|
-
data:
|
|
514
|
-
transformResponse: fromRes,
|
|
442
|
+
data: payload,
|
|
515
443
|
};
|
|
516
444
|
return metadata;
|
|
517
445
|
}
|
|
518
|
-
__truncateDataItems.fromReq = fromReq;
|
|
519
446
|
return __truncateDataItems;
|
|
520
447
|
}
|
|
521
448
|
exports.truncateDataItems = truncateDataItems;
|
|
@@ -543,25 +470,20 @@ exports.truncateDataItems = truncateDataItems;
|
|
|
543
470
|
*
|
|
544
471
|
*/
|
|
545
472
|
function queryDataItems(payload) {
|
|
546
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryDataItemsRequest, {});
|
|
547
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryDataItemsResponse, {});
|
|
548
473
|
function __queryDataItems({ host }) {
|
|
549
|
-
const serializedData = toReq(payload);
|
|
550
474
|
const metadata = {
|
|
551
475
|
entityFqdn: 'wix.data.v2.data_item',
|
|
552
476
|
method: 'POST',
|
|
553
477
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.QueryDataItems',
|
|
554
478
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
555
479
|
protoPath: '/v2/items/query',
|
|
556
|
-
data:
|
|
480
|
+
data: payload,
|
|
557
481
|
host,
|
|
558
482
|
}),
|
|
559
|
-
data:
|
|
560
|
-
transformResponse: fromRes,
|
|
483
|
+
data: payload,
|
|
561
484
|
};
|
|
562
485
|
return metadata;
|
|
563
486
|
}
|
|
564
|
-
__queryDataItems.fromReq = fromReq;
|
|
565
487
|
return __queryDataItems;
|
|
566
488
|
}
|
|
567
489
|
exports.queryDataItems = queryDataItems;
|
|
@@ -573,25 +495,20 @@ exports.queryDataItems = queryDataItems;
|
|
|
573
495
|
* You can also add paging, filtering, and sorting preferences to your aggregation to retrieve exactly what you need.
|
|
574
496
|
*/
|
|
575
497
|
function aggregateDataItems(payload) {
|
|
576
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_aggregateDataItemsRequest, {});
|
|
577
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_aggregateDataItemsResponse, {});
|
|
578
498
|
function __aggregateDataItems({ host }) {
|
|
579
|
-
const serializedData = toReq(payload);
|
|
580
499
|
const metadata = {
|
|
581
500
|
entityFqdn: 'wix.data.v2.data_item',
|
|
582
501
|
method: 'POST',
|
|
583
502
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.AggregateDataItems',
|
|
584
503
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
585
504
|
protoPath: '/v2/items/aggregate',
|
|
586
|
-
data:
|
|
505
|
+
data: payload,
|
|
587
506
|
host,
|
|
588
507
|
}),
|
|
589
|
-
data:
|
|
590
|
-
transformResponse: fromRes,
|
|
508
|
+
data: payload,
|
|
591
509
|
};
|
|
592
510
|
return metadata;
|
|
593
511
|
}
|
|
594
|
-
__aggregateDataItems.fromReq = fromReq;
|
|
595
512
|
return __aggregateDataItems;
|
|
596
513
|
}
|
|
597
514
|
exports.aggregateDataItems = aggregateDataItems;
|
|
@@ -601,25 +518,20 @@ exports.aggregateDataItems = aggregateDataItems;
|
|
|
601
518
|
* > **Note**: When calling `countDataItems()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
602
519
|
*/
|
|
603
520
|
function countDataItems(payload) {
|
|
604
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_countDataItemsRequest, {});
|
|
605
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_countDataItemsResponse, {});
|
|
606
521
|
function __countDataItems({ host }) {
|
|
607
|
-
const serializedData = toReq(payload);
|
|
608
522
|
const metadata = {
|
|
609
523
|
entityFqdn: 'wix.data.v2.data_item',
|
|
610
524
|
method: 'POST',
|
|
611
525
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.CountDataItems',
|
|
612
526
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
613
527
|
protoPath: '/v2/items/count',
|
|
614
|
-
data:
|
|
528
|
+
data: payload,
|
|
615
529
|
host,
|
|
616
530
|
}),
|
|
617
|
-
data:
|
|
618
|
-
transformResponse: fromRes,
|
|
531
|
+
data: payload,
|
|
619
532
|
};
|
|
620
533
|
return metadata;
|
|
621
534
|
}
|
|
622
|
-
__countDataItems.fromReq = fromReq;
|
|
623
535
|
return __countDataItems;
|
|
624
536
|
}
|
|
625
537
|
exports.countDataItems = countDataItems;
|
|
@@ -637,25 +549,20 @@ exports.countDataItems = countDataItems;
|
|
|
637
549
|
* > **Note**: When calling `queryDistinctValues()` following an update to your collection, the data retrieved may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
638
550
|
*/
|
|
639
551
|
function queryDistinctValues(payload) {
|
|
640
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryDistinctValuesRequest, {});
|
|
641
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryDistinctValuesResponse, {});
|
|
642
552
|
function __queryDistinctValues({ host }) {
|
|
643
|
-
const serializedData = toReq(payload);
|
|
644
553
|
const metadata = {
|
|
645
554
|
entityFqdn: 'wix.data.v2.data_item',
|
|
646
555
|
method: 'POST',
|
|
647
556
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.QueryDistinctValues',
|
|
648
557
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
649
558
|
protoPath: '/v2/items/query-distinct-values',
|
|
650
|
-
data:
|
|
559
|
+
data: payload,
|
|
651
560
|
host,
|
|
652
561
|
}),
|
|
653
|
-
data:
|
|
654
|
-
transformResponse: fromRes,
|
|
562
|
+
data: payload,
|
|
655
563
|
};
|
|
656
564
|
return metadata;
|
|
657
565
|
}
|
|
658
|
-
__queryDistinctValues.fromReq = fromReq;
|
|
659
566
|
return __queryDistinctValues;
|
|
660
567
|
}
|
|
661
568
|
exports.queryDistinctValues = queryDistinctValues;
|
|
@@ -667,25 +574,20 @@ exports.queryDistinctValues = queryDistinctValues;
|
|
|
667
574
|
* You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.
|
|
668
575
|
*/
|
|
669
576
|
function bulkInsertDataItems(payload) {
|
|
670
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkInsertDataItemsRequest, {});
|
|
671
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkInsertDataItemsResponse, {});
|
|
672
577
|
function __bulkInsertDataItems({ host }) {
|
|
673
|
-
const serializedData = toReq(payload);
|
|
674
578
|
const metadata = {
|
|
675
579
|
entityFqdn: 'wix.data.v2.data_item',
|
|
676
580
|
method: 'POST',
|
|
677
581
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkInsertDataItems',
|
|
678
582
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
679
583
|
protoPath: '/v2/bulk/items/insert',
|
|
680
|
-
data:
|
|
584
|
+
data: payload,
|
|
681
585
|
host,
|
|
682
586
|
}),
|
|
683
|
-
data:
|
|
684
|
-
transformResponse: fromRes,
|
|
587
|
+
data: payload,
|
|
685
588
|
};
|
|
686
589
|
return metadata;
|
|
687
590
|
}
|
|
688
|
-
__bulkInsertDataItems.fromReq = fromReq;
|
|
689
591
|
return __bulkInsertDataItems;
|
|
690
592
|
}
|
|
691
593
|
exports.bulkInsertDataItems = bulkInsertDataItems;
|
|
@@ -705,25 +607,20 @@ exports.bulkInsertDataItems = bulkInsertDataItems;
|
|
|
705
607
|
* > aren't included in the updated item, their values are lost.
|
|
706
608
|
*/
|
|
707
609
|
function bulkUpdateDataItems(payload) {
|
|
708
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkUpdateDataItemsRequest, {});
|
|
709
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkUpdateDataItemsResponse, {});
|
|
710
610
|
function __bulkUpdateDataItems({ host }) {
|
|
711
|
-
const serializedData = toReq(payload);
|
|
712
611
|
const metadata = {
|
|
713
612
|
entityFqdn: 'wix.data.v2.data_item',
|
|
714
613
|
method: 'POST',
|
|
715
614
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkUpdateDataItems',
|
|
716
615
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
717
616
|
protoPath: '/v2/bulk/items/update',
|
|
718
|
-
data:
|
|
617
|
+
data: payload,
|
|
719
618
|
host,
|
|
720
619
|
}),
|
|
721
|
-
data:
|
|
722
|
-
transformResponse: fromRes,
|
|
620
|
+
data: payload,
|
|
723
621
|
};
|
|
724
622
|
return metadata;
|
|
725
623
|
}
|
|
726
|
-
__bulkUpdateDataItems.fromReq = fromReq;
|
|
727
624
|
return __bulkUpdateDataItems;
|
|
728
625
|
}
|
|
729
626
|
exports.bulkUpdateDataItems = bulkUpdateDataItems;
|
|
@@ -743,25 +640,20 @@ exports.bulkUpdateDataItems = bulkUpdateDataItems;
|
|
|
743
640
|
* > This means that all of the item's previous fields and values are lost.
|
|
744
641
|
*/
|
|
745
642
|
function bulkSaveDataItems(payload) {
|
|
746
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkSaveDataItemsRequest, {});
|
|
747
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkSaveDataItemsResponse, {});
|
|
748
643
|
function __bulkSaveDataItems({ host }) {
|
|
749
|
-
const serializedData = toReq(payload);
|
|
750
644
|
const metadata = {
|
|
751
645
|
entityFqdn: 'wix.data.v2.data_item',
|
|
752
646
|
method: 'POST',
|
|
753
647
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkSaveDataItems',
|
|
754
648
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
755
649
|
protoPath: '/v2/bulk/items/save',
|
|
756
|
-
data:
|
|
650
|
+
data: payload,
|
|
757
651
|
host,
|
|
758
652
|
}),
|
|
759
|
-
data:
|
|
760
|
-
transformResponse: fromRes,
|
|
653
|
+
data: payload,
|
|
761
654
|
};
|
|
762
655
|
return metadata;
|
|
763
656
|
}
|
|
764
|
-
__bulkSaveDataItems.fromReq = fromReq;
|
|
765
657
|
return __bulkSaveDataItems;
|
|
766
658
|
}
|
|
767
659
|
exports.bulkSaveDataItems = bulkSaveDataItems;
|
|
@@ -774,25 +666,20 @@ exports.bulkSaveDataItems = bulkSaveDataItems;
|
|
|
774
666
|
* > **Note:** Once an item has been removed from a collection, it can't be restored.
|
|
775
667
|
*/
|
|
776
668
|
function bulkRemoveDataItems(payload) {
|
|
777
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkRemoveDataItemsRequest, {});
|
|
778
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkRemoveDataItemsResponse, {});
|
|
779
669
|
function __bulkRemoveDataItems({ host }) {
|
|
780
|
-
const serializedData = toReq(payload);
|
|
781
670
|
const metadata = {
|
|
782
671
|
entityFqdn: 'wix.data.v2.data_item',
|
|
783
672
|
method: 'POST',
|
|
784
673
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkRemoveDataItems',
|
|
785
674
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
786
675
|
protoPath: '/v2/bulk/items/remove',
|
|
787
|
-
data:
|
|
676
|
+
data: payload,
|
|
788
677
|
host,
|
|
789
678
|
}),
|
|
790
|
-
data:
|
|
791
|
-
transformResponse: fromRes,
|
|
679
|
+
data: payload,
|
|
792
680
|
};
|
|
793
681
|
return metadata;
|
|
794
682
|
}
|
|
795
|
-
__bulkRemoveDataItems.fromReq = fromReq;
|
|
796
683
|
return __bulkRemoveDataItems;
|
|
797
684
|
}
|
|
798
685
|
exports.bulkRemoveDataItems = bulkRemoveDataItems;
|
|
@@ -810,25 +697,20 @@ exports.bulkRemoveDataItems = bulkRemoveDataItems;
|
|
|
810
697
|
* > **Note**: When calling `queryReferencedDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
811
698
|
*/
|
|
812
699
|
function queryReferencedDataItems(payload) {
|
|
813
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryReferencedDataItemsRequest, {});
|
|
814
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryReferencedDataItemsResponse, {});
|
|
815
700
|
function __queryReferencedDataItems({ host }) {
|
|
816
|
-
const serializedData = toReq(payload);
|
|
817
701
|
const metadata = {
|
|
818
702
|
entityFqdn: 'wix.data.v2.data_item',
|
|
819
703
|
method: 'POST',
|
|
820
704
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.QueryReferencedDataItems',
|
|
821
705
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
822
706
|
protoPath: '/v2/items/query-referenced',
|
|
823
|
-
data:
|
|
707
|
+
data: payload,
|
|
824
708
|
host,
|
|
825
709
|
}),
|
|
826
|
-
data:
|
|
827
|
-
transformResponse: fromRes,
|
|
710
|
+
data: payload,
|
|
828
711
|
};
|
|
829
712
|
return metadata;
|
|
830
713
|
}
|
|
831
|
-
__queryReferencedDataItems.fromReq = fromReq;
|
|
832
714
|
return __queryReferencedDataItems;
|
|
833
715
|
}
|
|
834
716
|
exports.queryReferencedDataItems = queryReferencedDataItems;
|
|
@@ -838,25 +720,20 @@ exports.queryReferencedDataItems = queryReferencedDataItems;
|
|
|
838
720
|
* > **Note**: When calling `isReferencedDataItem()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
839
721
|
*/
|
|
840
722
|
function isReferencedDataItem(payload) {
|
|
841
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_isReferencedDataItemRequest, {});
|
|
842
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_isReferencedDataItemResponse, {});
|
|
843
723
|
function __isReferencedDataItem({ host }) {
|
|
844
|
-
const serializedData = toReq(payload);
|
|
845
724
|
const metadata = {
|
|
846
725
|
entityFqdn: 'wix.data.v2.data_item',
|
|
847
726
|
method: 'POST',
|
|
848
727
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.IsReferencedDataItem',
|
|
849
728
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
850
729
|
protoPath: '/v2/items/is-referenced',
|
|
851
|
-
data:
|
|
730
|
+
data: payload,
|
|
852
731
|
host,
|
|
853
732
|
}),
|
|
854
|
-
data:
|
|
855
|
-
transformResponse: fromRes,
|
|
733
|
+
data: payload,
|
|
856
734
|
};
|
|
857
735
|
return metadata;
|
|
858
736
|
}
|
|
859
|
-
__isReferencedDataItem.fromReq = fromReq;
|
|
860
737
|
return __isReferencedDataItem;
|
|
861
738
|
}
|
|
862
739
|
exports.isReferencedDataItem = isReferencedDataItem;
|
|
@@ -867,49 +744,39 @@ exports.isReferencedDataItem = isReferencedDataItem;
|
|
|
867
744
|
* A reference in `options.dataItemReference` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
|
|
868
745
|
*/
|
|
869
746
|
function insertDataItemReference(payload) {
|
|
870
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_insertDataItemReferenceRequest, {});
|
|
871
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_insertDataItemReferenceResponse, {});
|
|
872
747
|
function __insertDataItemReference({ host }) {
|
|
873
|
-
const serializedData = toReq(payload);
|
|
874
748
|
const metadata = {
|
|
875
749
|
entityFqdn: 'wix.data.v2.data_item',
|
|
876
750
|
method: 'POST',
|
|
877
751
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.InsertDataItemReference',
|
|
878
752
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
879
753
|
protoPath: '/v2/items/insert-reference',
|
|
880
|
-
data:
|
|
754
|
+
data: payload,
|
|
881
755
|
host,
|
|
882
756
|
}),
|
|
883
|
-
data:
|
|
884
|
-
transformResponse: fromRes,
|
|
757
|
+
data: payload,
|
|
885
758
|
};
|
|
886
759
|
return metadata;
|
|
887
760
|
}
|
|
888
|
-
__insertDataItemReference.fromReq = fromReq;
|
|
889
761
|
return __insertDataItemReference;
|
|
890
762
|
}
|
|
891
763
|
exports.insertDataItemReference = insertDataItemReference;
|
|
892
764
|
/** Removes the specified reference from the specified field. */
|
|
893
765
|
function removeDataItemReference(payload) {
|
|
894
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_removeDataItemReferenceRequest, {});
|
|
895
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_removeDataItemReferenceResponse, {});
|
|
896
766
|
function __removeDataItemReference({ host }) {
|
|
897
|
-
const serializedData = toReq(payload);
|
|
898
767
|
const metadata = {
|
|
899
768
|
entityFqdn: 'wix.data.v2.data_item',
|
|
900
769
|
method: 'POST',
|
|
901
770
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.RemoveDataItemReference',
|
|
902
771
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
903
772
|
protoPath: '/v2/items/remove-reference',
|
|
904
|
-
data:
|
|
773
|
+
data: payload,
|
|
905
774
|
host,
|
|
906
775
|
}),
|
|
907
|
-
data:
|
|
908
|
-
transformResponse: fromRes,
|
|
776
|
+
data: payload,
|
|
909
777
|
};
|
|
910
778
|
return metadata;
|
|
911
779
|
}
|
|
912
|
-
__removeDataItemReference.fromReq = fromReq;
|
|
913
780
|
return __removeDataItemReference;
|
|
914
781
|
}
|
|
915
782
|
exports.removeDataItemReference = removeDataItemReference;
|
|
@@ -921,49 +788,39 @@ exports.removeDataItemReference = removeDataItemReference;
|
|
|
921
788
|
* Each new reference in `options.dataItemReferences` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
|
|
922
789
|
*/
|
|
923
790
|
function bulkInsertDataItemReferences(payload) {
|
|
924
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkInsertDataItemReferencesRequest, {});
|
|
925
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkInsertDataItemReferencesResponse, {});
|
|
926
791
|
function __bulkInsertDataItemReferences({ host }) {
|
|
927
|
-
const serializedData = toReq(payload);
|
|
928
792
|
const metadata = {
|
|
929
793
|
entityFqdn: 'wix.data.v2.data_item',
|
|
930
794
|
method: 'POST',
|
|
931
795
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkInsertDataItemReferences',
|
|
932
796
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
933
797
|
protoPath: '/v2/bulk/items/insert-references',
|
|
934
|
-
data:
|
|
798
|
+
data: payload,
|
|
935
799
|
host,
|
|
936
800
|
}),
|
|
937
|
-
data:
|
|
938
|
-
transformResponse: fromRes,
|
|
801
|
+
data: payload,
|
|
939
802
|
};
|
|
940
803
|
return metadata;
|
|
941
804
|
}
|
|
942
|
-
__bulkInsertDataItemReferences.fromReq = fromReq;
|
|
943
805
|
return __bulkInsertDataItemReferences;
|
|
944
806
|
}
|
|
945
807
|
exports.bulkInsertDataItemReferences = bulkInsertDataItemReferences;
|
|
946
808
|
/** Removes one or more references. */
|
|
947
809
|
function bulkRemoveDataItemReferences(payload) {
|
|
948
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkRemoveDataItemReferencesRequest, {});
|
|
949
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkRemoveDataItemReferencesResponse, {});
|
|
950
810
|
function __bulkRemoveDataItemReferences({ host }) {
|
|
951
|
-
const serializedData = toReq(payload);
|
|
952
811
|
const metadata = {
|
|
953
812
|
entityFqdn: 'wix.data.v2.data_item',
|
|
954
813
|
method: 'POST',
|
|
955
814
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkRemoveDataItemReferences',
|
|
956
815
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
957
816
|
protoPath: '/v2/bulk/items/remove-references',
|
|
958
|
-
data:
|
|
817
|
+
data: payload,
|
|
959
818
|
host,
|
|
960
819
|
}),
|
|
961
|
-
data:
|
|
962
|
-
transformResponse: fromRes,
|
|
820
|
+
data: payload,
|
|
963
821
|
};
|
|
964
822
|
return metadata;
|
|
965
823
|
}
|
|
966
|
-
__bulkRemoveDataItemReferences.fromReq = fromReq;
|
|
967
824
|
return __bulkRemoveDataItemReferences;
|
|
968
825
|
}
|
|
969
826
|
exports.bulkRemoveDataItemReferences = bulkRemoveDataItemReferences;
|
|
@@ -977,25 +834,20 @@ exports.bulkRemoveDataItemReferences = bulkRemoveDataItemReferences;
|
|
|
977
834
|
* > **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed.
|
|
978
835
|
*/
|
|
979
836
|
function replaceDataItemReferences(payload) {
|
|
980
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_replaceDataItemReferencesRequest, {});
|
|
981
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_replaceDataItemReferencesResponse, {});
|
|
982
837
|
function __replaceDataItemReferences({ host }) {
|
|
983
|
-
const serializedData = toReq(payload);
|
|
984
838
|
const metadata = {
|
|
985
839
|
entityFqdn: 'wix.data.v2.data_item',
|
|
986
840
|
method: 'POST',
|
|
987
841
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.ReplaceDataItemReferences',
|
|
988
842
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
989
843
|
protoPath: '/v2/items/replace-references',
|
|
990
|
-
data:
|
|
844
|
+
data: payload,
|
|
991
845
|
host,
|
|
992
846
|
}),
|
|
993
|
-
data:
|
|
994
|
-
transformResponse: fromRes,
|
|
847
|
+
data: payload,
|
|
995
848
|
};
|
|
996
849
|
return metadata;
|
|
997
850
|
}
|
|
998
|
-
__replaceDataItemReferences.fromReq = fromReq;
|
|
999
851
|
return __replaceDataItemReferences;
|
|
1000
852
|
}
|
|
1001
853
|
exports.replaceDataItemReferences = replaceDataItemReferences;
|