@wix/data 1.0.60 → 1.0.62
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 +14 -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 +1 -1
- package/build/cjs/src/data-v1-external-database-connection.types.js +4 -4
- package/build/cjs/src/data-v1-external-database-connection.types.js.map +1 -1
- package/build/cjs/src/data-v1-external-database-connection.universal.js +53 -149
- package/build/cjs/src/data-v1-external-database-connection.universal.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.http.js +10 -29
- 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 +1 -1
- package/build/cjs/src/data-v2-data-collection.types.js +13 -13
- package/build/cjs/src/data-v2-data-collection.types.js.map +1 -1
- package/build/cjs/src/data-v2-data-collection.universal.js +43 -48
- package/build/cjs/src/data-v2-data-collection.universal.js.map +1 -1
- package/build/cjs/src/data-v2-data-item.http.js +46 -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 +13 -13
- package/build/cjs/src/data-v2-data-item.public.js.map +1 -1
- 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.d.ts +15 -15
- package/build/cjs/src/data-v2-data-item.universal.js +354 -669
- package/build/cjs/src/data-v2-data-item.universal.js.map +1 -1
- package/build/cjs/src/data-v2-index.http.js +10 -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 +43 -93
- package/build/cjs/src/data-v2-index.universal.js.map +1 -1
- package/build/es/src/data-v1-external-database-connection.http.js +14 -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 +1 -1
- package/build/es/src/data-v1-external-database-connection.universal.js +44 -144
- package/build/es/src/data-v1-external-database-connection.universal.js.map +1 -1
- package/build/es/src/data-v2-data-collection.http.js +10 -29
- 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 +1 -1
- package/build/es/src/data-v2-data-collection.universal.js +25 -34
- package/build/es/src/data-v2-data-collection.universal.js.map +1 -1
- package/build/es/src/data-v2-data-item.http.js +46 -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 +13 -13
- package/build/es/src/data-v2-data-item.public.js.map +1 -1
- package/build/es/src/data-v2-data-item.universal.d.ts +15 -15
- package/build/es/src/data-v2-data-item.universal.js +346 -665
- package/build/es/src/data-v2-data-item.universal.js.map +1 -1
- package/build/es/src/data-v2-index.http.js +10 -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 +35 -89
- package/build/es/src/data-v2-index.universal.js.map +1 -1
- package/package.json +8 -8
|
@@ -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_': [
|
|
@@ -125,6 +82,10 @@ function resolveComWixpressCloudDataApiDataDataItemServiceUrl(opts) {
|
|
|
125
82
|
srcPath: '/[a-z0-9-_/]+/_api/cloud-data',
|
|
126
83
|
destPath: '',
|
|
127
84
|
},
|
|
85
|
+
{
|
|
86
|
+
srcPath: '/_api/cloud-data/v2',
|
|
87
|
+
destPath: '/v2',
|
|
88
|
+
},
|
|
128
89
|
],
|
|
129
90
|
'manage._base_domain_': [
|
|
130
91
|
{
|
|
@@ -335,25 +296,20 @@ function resolveComWixpressCloudDataApiDataDataItemServiceUrl(opts) {
|
|
|
335
296
|
* If `options.dataItem.data` is empty, a new item is created with no data fields.
|
|
336
297
|
*/
|
|
337
298
|
function insertDataItem(payload) {
|
|
338
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_insertDataItemRequest, {});
|
|
339
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_insertDataItemResponse, {});
|
|
340
299
|
function __insertDataItem({ host }) {
|
|
341
|
-
const serializedData = toReq(payload);
|
|
342
300
|
const metadata = {
|
|
343
301
|
entityFqdn: 'wix.data.v2.data_item',
|
|
344
302
|
method: 'POST',
|
|
345
303
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.InsertDataItem',
|
|
346
304
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
347
305
|
protoPath: '/v2/items',
|
|
348
|
-
data:
|
|
306
|
+
data: payload,
|
|
349
307
|
host,
|
|
350
308
|
}),
|
|
351
|
-
data:
|
|
352
|
-
transformResponse: fromRes,
|
|
309
|
+
data: payload,
|
|
353
310
|
};
|
|
354
311
|
return metadata;
|
|
355
312
|
}
|
|
356
|
-
__insertDataItem.fromReq = fromReq;
|
|
357
313
|
return __insertDataItem;
|
|
358
314
|
}
|
|
359
315
|
exports.insertDataItem = insertDataItem;
|
|
@@ -374,25 +330,20 @@ exports.insertDataItem = insertDataItem;
|
|
|
374
330
|
* > If the existing item has fields with values and those fields aren't included in the updated item, their values are lost.
|
|
375
331
|
*/
|
|
376
332
|
function updateDataItem(payload) {
|
|
377
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateDataItemRequest, {});
|
|
378
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_updateDataItemResponse, {});
|
|
379
333
|
function __updateDataItem({ host }) {
|
|
380
|
-
const serializedData = toReq(payload);
|
|
381
334
|
const metadata = {
|
|
382
335
|
entityFqdn: 'wix.data.v2.data_item',
|
|
383
336
|
method: 'PUT',
|
|
384
337
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.UpdateDataItem',
|
|
385
338
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
386
339
|
protoPath: '/v2/items/{dataItem.id}',
|
|
387
|
-
data:
|
|
340
|
+
data: payload,
|
|
388
341
|
host,
|
|
389
342
|
}),
|
|
390
|
-
data:
|
|
391
|
-
transformResponse: fromRes,
|
|
343
|
+
data: payload,
|
|
392
344
|
};
|
|
393
345
|
return metadata;
|
|
394
346
|
}
|
|
395
|
-
__updateDataItem.fromReq = fromReq;
|
|
396
347
|
return __updateDataItem;
|
|
397
348
|
}
|
|
398
349
|
exports.updateDataItem = updateDataItem;
|
|
@@ -412,25 +363,20 @@ exports.updateDataItem = updateDataItem;
|
|
|
412
363
|
* > This means that the item's previous fields and values are lost.
|
|
413
364
|
*/
|
|
414
365
|
function saveDataItem(payload) {
|
|
415
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_saveDataItemRequest, {});
|
|
416
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_saveDataItemResponse, {});
|
|
417
366
|
function __saveDataItem({ host }) {
|
|
418
|
-
const serializedData = toReq(payload);
|
|
419
367
|
const metadata = {
|
|
420
368
|
entityFqdn: 'wix.data.v2.data_item',
|
|
421
369
|
method: 'POST',
|
|
422
370
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.SaveDataItem',
|
|
423
371
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
424
372
|
protoPath: '/v2/items/save',
|
|
425
|
-
data:
|
|
373
|
+
data: payload,
|
|
426
374
|
host,
|
|
427
375
|
}),
|
|
428
|
-
data:
|
|
429
|
-
transformResponse: fromRes,
|
|
376
|
+
data: payload,
|
|
430
377
|
};
|
|
431
378
|
return metadata;
|
|
432
379
|
}
|
|
433
|
-
__saveDataItem.fromReq = fromReq;
|
|
434
380
|
return __saveDataItem;
|
|
435
381
|
}
|
|
436
382
|
exports.saveDataItem = saveDataItem;
|
|
@@ -441,25 +387,20 @@ exports.saveDataItem = saveDataItem;
|
|
|
441
387
|
* > **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`.
|
|
442
388
|
*/
|
|
443
389
|
function getDataItem(payload) {
|
|
444
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getDataItemRequest, {});
|
|
445
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getDataItemResponse, {});
|
|
446
390
|
function __getDataItem({ host }) {
|
|
447
|
-
const serializedData = toReq(payload);
|
|
448
391
|
const metadata = {
|
|
449
392
|
entityFqdn: 'wix.data.v2.data_item',
|
|
450
393
|
method: 'GET',
|
|
451
394
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.GetDataItem',
|
|
452
395
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
453
396
|
protoPath: '/v2/items/{dataItemId}',
|
|
454
|
-
data:
|
|
397
|
+
data: payload,
|
|
455
398
|
host,
|
|
456
399
|
}),
|
|
457
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
458
|
-
transformResponse: fromRes,
|
|
400
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
459
401
|
};
|
|
460
402
|
return metadata;
|
|
461
403
|
}
|
|
462
|
-
__getDataItem.fromReq = fromReq;
|
|
463
404
|
return __getDataItem;
|
|
464
405
|
}
|
|
465
406
|
exports.getDataItem = getDataItem;
|
|
@@ -473,25 +414,20 @@ exports.getDataItem = getDataItem;
|
|
|
473
414
|
* > Once an item has been removed from a collection, it can't be restored.
|
|
474
415
|
*/
|
|
475
416
|
function removeDataItem(payload) {
|
|
476
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_removeDataItemRequest, {});
|
|
477
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_removeDataItemResponse, {});
|
|
478
417
|
function __removeDataItem({ host }) {
|
|
479
|
-
const serializedData = toReq(payload);
|
|
480
418
|
const metadata = {
|
|
481
419
|
entityFqdn: 'wix.data.v2.data_item',
|
|
482
420
|
method: 'DELETE',
|
|
483
421
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.RemoveDataItem',
|
|
484
422
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
485
423
|
protoPath: '/v2/items/{dataItemId}',
|
|
486
|
-
data:
|
|
424
|
+
data: payload,
|
|
487
425
|
host,
|
|
488
426
|
}),
|
|
489
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
490
|
-
transformResponse: fromRes,
|
|
427
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
491
428
|
};
|
|
492
429
|
return metadata;
|
|
493
430
|
}
|
|
494
|
-
__removeDataItem.fromReq = fromReq;
|
|
495
431
|
return __removeDataItem;
|
|
496
432
|
}
|
|
497
433
|
exports.removeDataItem = removeDataItem;
|
|
@@ -505,25 +441,20 @@ exports.removeDataItem = removeDataItem;
|
|
|
505
441
|
* > Once items have been removed from a collection, they can't be restored.
|
|
506
442
|
*/
|
|
507
443
|
function truncateDataItems(payload) {
|
|
508
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_truncateDataItemsRequest, {});
|
|
509
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_truncateDataItemsResponse, {});
|
|
510
444
|
function __truncateDataItems({ host }) {
|
|
511
|
-
const serializedData = toReq(payload);
|
|
512
445
|
const metadata = {
|
|
513
446
|
entityFqdn: 'wix.data.v2.data_item',
|
|
514
447
|
method: 'POST',
|
|
515
448
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.TruncateDataItems',
|
|
516
449
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
517
450
|
protoPath: '/v2/items/truncate',
|
|
518
|
-
data:
|
|
451
|
+
data: payload,
|
|
519
452
|
host,
|
|
520
453
|
}),
|
|
521
|
-
data:
|
|
522
|
-
transformResponse: fromRes,
|
|
454
|
+
data: payload,
|
|
523
455
|
};
|
|
524
456
|
return metadata;
|
|
525
457
|
}
|
|
526
|
-
__truncateDataItems.fromReq = fromReq;
|
|
527
458
|
return __truncateDataItems;
|
|
528
459
|
}
|
|
529
460
|
exports.truncateDataItems = truncateDataItems;
|
|
@@ -551,25 +482,20 @@ exports.truncateDataItems = truncateDataItems;
|
|
|
551
482
|
*
|
|
552
483
|
*/
|
|
553
484
|
function queryDataItems(payload) {
|
|
554
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryDataItemsRequest, {});
|
|
555
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryDataItemsResponse, {});
|
|
556
485
|
function __queryDataItems({ host }) {
|
|
557
|
-
const serializedData = toReq(payload);
|
|
558
486
|
const metadata = {
|
|
559
487
|
entityFqdn: 'wix.data.v2.data_item',
|
|
560
488
|
method: 'POST',
|
|
561
489
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.QueryDataItems',
|
|
562
490
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
563
491
|
protoPath: '/v2/items/query',
|
|
564
|
-
data:
|
|
492
|
+
data: payload,
|
|
565
493
|
host,
|
|
566
494
|
}),
|
|
567
|
-
data:
|
|
568
|
-
transformResponse: fromRes,
|
|
495
|
+
data: payload,
|
|
569
496
|
};
|
|
570
497
|
return metadata;
|
|
571
498
|
}
|
|
572
|
-
__queryDataItems.fromReq = fromReq;
|
|
573
499
|
return __queryDataItems;
|
|
574
500
|
}
|
|
575
501
|
exports.queryDataItems = queryDataItems;
|
|
@@ -581,25 +507,20 @@ exports.queryDataItems = queryDataItems;
|
|
|
581
507
|
* You can also add paging, filtering, and sorting preferences to your aggregation to retrieve exactly what you need.
|
|
582
508
|
*/
|
|
583
509
|
function aggregateDataItems(payload) {
|
|
584
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_aggregateDataItemsRequest, {});
|
|
585
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_aggregateDataItemsResponse, {});
|
|
586
510
|
function __aggregateDataItems({ host }) {
|
|
587
|
-
const serializedData = toReq(payload);
|
|
588
511
|
const metadata = {
|
|
589
512
|
entityFqdn: 'wix.data.v2.data_item',
|
|
590
513
|
method: 'POST',
|
|
591
514
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.AggregateDataItems',
|
|
592
515
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
593
516
|
protoPath: '/v2/items/aggregate',
|
|
594
|
-
data:
|
|
517
|
+
data: payload,
|
|
595
518
|
host,
|
|
596
519
|
}),
|
|
597
|
-
data:
|
|
598
|
-
transformResponse: fromRes,
|
|
520
|
+
data: payload,
|
|
599
521
|
};
|
|
600
522
|
return metadata;
|
|
601
523
|
}
|
|
602
|
-
__aggregateDataItems.fromReq = fromReq;
|
|
603
524
|
return __aggregateDataItems;
|
|
604
525
|
}
|
|
605
526
|
exports.aggregateDataItems = aggregateDataItems;
|
|
@@ -609,25 +530,20 @@ exports.aggregateDataItems = aggregateDataItems;
|
|
|
609
530
|
* > **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`.
|
|
610
531
|
*/
|
|
611
532
|
function countDataItems(payload) {
|
|
612
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_countDataItemsRequest, {});
|
|
613
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_countDataItemsResponse, {});
|
|
614
533
|
function __countDataItems({ host }) {
|
|
615
|
-
const serializedData = toReq(payload);
|
|
616
534
|
const metadata = {
|
|
617
535
|
entityFqdn: 'wix.data.v2.data_item',
|
|
618
536
|
method: 'POST',
|
|
619
537
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.CountDataItems',
|
|
620
538
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
621
539
|
protoPath: '/v2/items/count',
|
|
622
|
-
data:
|
|
540
|
+
data: payload,
|
|
623
541
|
host,
|
|
624
542
|
}),
|
|
625
|
-
data:
|
|
626
|
-
transformResponse: fromRes,
|
|
543
|
+
data: payload,
|
|
627
544
|
};
|
|
628
545
|
return metadata;
|
|
629
546
|
}
|
|
630
|
-
__countDataItems.fromReq = fromReq;
|
|
631
547
|
return __countDataItems;
|
|
632
548
|
}
|
|
633
549
|
exports.countDataItems = countDataItems;
|
|
@@ -645,25 +561,20 @@ exports.countDataItems = countDataItems;
|
|
|
645
561
|
* > **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`.
|
|
646
562
|
*/
|
|
647
563
|
function queryDistinctValues(payload) {
|
|
648
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryDistinctValuesRequest, {});
|
|
649
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryDistinctValuesResponse, {});
|
|
650
564
|
function __queryDistinctValues({ host }) {
|
|
651
|
-
const serializedData = toReq(payload);
|
|
652
565
|
const metadata = {
|
|
653
566
|
entityFqdn: 'wix.data.v2.data_item',
|
|
654
567
|
method: 'POST',
|
|
655
568
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.QueryDistinctValues',
|
|
656
569
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
657
570
|
protoPath: '/v2/items/query-distinct-values',
|
|
658
|
-
data:
|
|
571
|
+
data: payload,
|
|
659
572
|
host,
|
|
660
573
|
}),
|
|
661
|
-
data:
|
|
662
|
-
transformResponse: fromRes,
|
|
574
|
+
data: payload,
|
|
663
575
|
};
|
|
664
576
|
return metadata;
|
|
665
577
|
}
|
|
666
|
-
__queryDistinctValues.fromReq = fromReq;
|
|
667
578
|
return __queryDistinctValues;
|
|
668
579
|
}
|
|
669
580
|
exports.queryDistinctValues = queryDistinctValues;
|
|
@@ -675,25 +586,20 @@ exports.queryDistinctValues = queryDistinctValues;
|
|
|
675
586
|
* 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.
|
|
676
587
|
*/
|
|
677
588
|
function bulkInsertDataItems(payload) {
|
|
678
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkInsertDataItemsRequest, {});
|
|
679
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkInsertDataItemsResponse, {});
|
|
680
589
|
function __bulkInsertDataItems({ host }) {
|
|
681
|
-
const serializedData = toReq(payload);
|
|
682
590
|
const metadata = {
|
|
683
591
|
entityFqdn: 'wix.data.v2.data_item',
|
|
684
592
|
method: 'POST',
|
|
685
593
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkInsertDataItems',
|
|
686
594
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
687
595
|
protoPath: '/v2/bulk/items/insert',
|
|
688
|
-
data:
|
|
596
|
+
data: payload,
|
|
689
597
|
host,
|
|
690
598
|
}),
|
|
691
|
-
data:
|
|
692
|
-
transformResponse: fromRes,
|
|
599
|
+
data: payload,
|
|
693
600
|
};
|
|
694
601
|
return metadata;
|
|
695
602
|
}
|
|
696
|
-
__bulkInsertDataItems.fromReq = fromReq;
|
|
697
603
|
return __bulkInsertDataItems;
|
|
698
604
|
}
|
|
699
605
|
exports.bulkInsertDataItems = bulkInsertDataItems;
|
|
@@ -713,25 +619,20 @@ exports.bulkInsertDataItems = bulkInsertDataItems;
|
|
|
713
619
|
* > aren't included in the updated item, their values are lost.
|
|
714
620
|
*/
|
|
715
621
|
function bulkUpdateDataItems(payload) {
|
|
716
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkUpdateDataItemsRequest, {});
|
|
717
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkUpdateDataItemsResponse, {});
|
|
718
622
|
function __bulkUpdateDataItems({ host }) {
|
|
719
|
-
const serializedData = toReq(payload);
|
|
720
623
|
const metadata = {
|
|
721
624
|
entityFqdn: 'wix.data.v2.data_item',
|
|
722
625
|
method: 'POST',
|
|
723
626
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkUpdateDataItems',
|
|
724
627
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
725
628
|
protoPath: '/v2/bulk/items/update',
|
|
726
|
-
data:
|
|
629
|
+
data: payload,
|
|
727
630
|
host,
|
|
728
631
|
}),
|
|
729
|
-
data:
|
|
730
|
-
transformResponse: fromRes,
|
|
632
|
+
data: payload,
|
|
731
633
|
};
|
|
732
634
|
return metadata;
|
|
733
635
|
}
|
|
734
|
-
__bulkUpdateDataItems.fromReq = fromReq;
|
|
735
636
|
return __bulkUpdateDataItems;
|
|
736
637
|
}
|
|
737
638
|
exports.bulkUpdateDataItems = bulkUpdateDataItems;
|
|
@@ -751,25 +652,20 @@ exports.bulkUpdateDataItems = bulkUpdateDataItems;
|
|
|
751
652
|
* > This means that all of the item's previous fields and values are lost.
|
|
752
653
|
*/
|
|
753
654
|
function bulkSaveDataItems(payload) {
|
|
754
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkSaveDataItemsRequest, {});
|
|
755
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkSaveDataItemsResponse, {});
|
|
756
655
|
function __bulkSaveDataItems({ host }) {
|
|
757
|
-
const serializedData = toReq(payload);
|
|
758
656
|
const metadata = {
|
|
759
657
|
entityFqdn: 'wix.data.v2.data_item',
|
|
760
658
|
method: 'POST',
|
|
761
659
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkSaveDataItems',
|
|
762
660
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
763
661
|
protoPath: '/v2/bulk/items/save',
|
|
764
|
-
data:
|
|
662
|
+
data: payload,
|
|
765
663
|
host,
|
|
766
664
|
}),
|
|
767
|
-
data:
|
|
768
|
-
transformResponse: fromRes,
|
|
665
|
+
data: payload,
|
|
769
666
|
};
|
|
770
667
|
return metadata;
|
|
771
668
|
}
|
|
772
|
-
__bulkSaveDataItems.fromReq = fromReq;
|
|
773
669
|
return __bulkSaveDataItems;
|
|
774
670
|
}
|
|
775
671
|
exports.bulkSaveDataItems = bulkSaveDataItems;
|
|
@@ -782,25 +678,20 @@ exports.bulkSaveDataItems = bulkSaveDataItems;
|
|
|
782
678
|
* > **Note:** Once an item has been removed from a collection, it can't be restored.
|
|
783
679
|
*/
|
|
784
680
|
function bulkRemoveDataItems(payload) {
|
|
785
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkRemoveDataItemsRequest, {});
|
|
786
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkRemoveDataItemsResponse, {});
|
|
787
681
|
function __bulkRemoveDataItems({ host }) {
|
|
788
|
-
const serializedData = toReq(payload);
|
|
789
682
|
const metadata = {
|
|
790
683
|
entityFqdn: 'wix.data.v2.data_item',
|
|
791
684
|
method: 'POST',
|
|
792
685
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkRemoveDataItems',
|
|
793
686
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
794
687
|
protoPath: '/v2/bulk/items/remove',
|
|
795
|
-
data:
|
|
688
|
+
data: payload,
|
|
796
689
|
host,
|
|
797
690
|
}),
|
|
798
|
-
data:
|
|
799
|
-
transformResponse: fromRes,
|
|
691
|
+
data: payload,
|
|
800
692
|
};
|
|
801
693
|
return metadata;
|
|
802
694
|
}
|
|
803
|
-
__bulkRemoveDataItems.fromReq = fromReq;
|
|
804
695
|
return __bulkRemoveDataItems;
|
|
805
696
|
}
|
|
806
697
|
exports.bulkRemoveDataItems = bulkRemoveDataItems;
|
|
@@ -818,25 +709,20 @@ exports.bulkRemoveDataItems = bulkRemoveDataItems;
|
|
|
818
709
|
* > **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`.
|
|
819
710
|
*/
|
|
820
711
|
function queryReferencedDataItems(payload) {
|
|
821
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryReferencedDataItemsRequest, {});
|
|
822
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryReferencedDataItemsResponse, {});
|
|
823
712
|
function __queryReferencedDataItems({ host }) {
|
|
824
|
-
const serializedData = toReq(payload);
|
|
825
713
|
const metadata = {
|
|
826
714
|
entityFqdn: 'wix.data.v2.data_item',
|
|
827
715
|
method: 'POST',
|
|
828
716
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.QueryReferencedDataItems',
|
|
829
717
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
830
718
|
protoPath: '/v2/items/query-referenced',
|
|
831
|
-
data:
|
|
719
|
+
data: payload,
|
|
832
720
|
host,
|
|
833
721
|
}),
|
|
834
|
-
data:
|
|
835
|
-
transformResponse: fromRes,
|
|
722
|
+
data: payload,
|
|
836
723
|
};
|
|
837
724
|
return metadata;
|
|
838
725
|
}
|
|
839
|
-
__queryReferencedDataItems.fromReq = fromReq;
|
|
840
726
|
return __queryReferencedDataItems;
|
|
841
727
|
}
|
|
842
728
|
exports.queryReferencedDataItems = queryReferencedDataItems;
|
|
@@ -846,25 +732,20 @@ exports.queryReferencedDataItems = queryReferencedDataItems;
|
|
|
846
732
|
* > **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`.
|
|
847
733
|
*/
|
|
848
734
|
function isReferencedDataItem(payload) {
|
|
849
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_isReferencedDataItemRequest, {});
|
|
850
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_isReferencedDataItemResponse, {});
|
|
851
735
|
function __isReferencedDataItem({ host }) {
|
|
852
|
-
const serializedData = toReq(payload);
|
|
853
736
|
const metadata = {
|
|
854
737
|
entityFqdn: 'wix.data.v2.data_item',
|
|
855
738
|
method: 'POST',
|
|
856
739
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.IsReferencedDataItem',
|
|
857
740
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
858
741
|
protoPath: '/v2/items/is-referenced',
|
|
859
|
-
data:
|
|
742
|
+
data: payload,
|
|
860
743
|
host,
|
|
861
744
|
}),
|
|
862
|
-
data:
|
|
863
|
-
transformResponse: fromRes,
|
|
745
|
+
data: payload,
|
|
864
746
|
};
|
|
865
747
|
return metadata;
|
|
866
748
|
}
|
|
867
|
-
__isReferencedDataItem.fromReq = fromReq;
|
|
868
749
|
return __isReferencedDataItem;
|
|
869
750
|
}
|
|
870
751
|
exports.isReferencedDataItem = isReferencedDataItem;
|
|
@@ -875,49 +756,39 @@ exports.isReferencedDataItem = isReferencedDataItem;
|
|
|
875
756
|
* 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.
|
|
876
757
|
*/
|
|
877
758
|
function insertDataItemReference(payload) {
|
|
878
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_insertDataItemReferenceRequest, {});
|
|
879
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_insertDataItemReferenceResponse, {});
|
|
880
759
|
function __insertDataItemReference({ host }) {
|
|
881
|
-
const serializedData = toReq(payload);
|
|
882
760
|
const metadata = {
|
|
883
761
|
entityFqdn: 'wix.data.v2.data_item',
|
|
884
762
|
method: 'POST',
|
|
885
763
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.InsertDataItemReference',
|
|
886
764
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
887
765
|
protoPath: '/v2/items/insert-reference',
|
|
888
|
-
data:
|
|
766
|
+
data: payload,
|
|
889
767
|
host,
|
|
890
768
|
}),
|
|
891
|
-
data:
|
|
892
|
-
transformResponse: fromRes,
|
|
769
|
+
data: payload,
|
|
893
770
|
};
|
|
894
771
|
return metadata;
|
|
895
772
|
}
|
|
896
|
-
__insertDataItemReference.fromReq = fromReq;
|
|
897
773
|
return __insertDataItemReference;
|
|
898
774
|
}
|
|
899
775
|
exports.insertDataItemReference = insertDataItemReference;
|
|
900
776
|
/** Removes the specified reference from the specified field. */
|
|
901
777
|
function removeDataItemReference(payload) {
|
|
902
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_removeDataItemReferenceRequest, {});
|
|
903
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_removeDataItemReferenceResponse, {});
|
|
904
778
|
function __removeDataItemReference({ host }) {
|
|
905
|
-
const serializedData = toReq(payload);
|
|
906
779
|
const metadata = {
|
|
907
780
|
entityFqdn: 'wix.data.v2.data_item',
|
|
908
781
|
method: 'POST',
|
|
909
782
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.RemoveDataItemReference',
|
|
910
783
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
911
784
|
protoPath: '/v2/items/remove-reference',
|
|
912
|
-
data:
|
|
785
|
+
data: payload,
|
|
913
786
|
host,
|
|
914
787
|
}),
|
|
915
|
-
data:
|
|
916
|
-
transformResponse: fromRes,
|
|
788
|
+
data: payload,
|
|
917
789
|
};
|
|
918
790
|
return metadata;
|
|
919
791
|
}
|
|
920
|
-
__removeDataItemReference.fromReq = fromReq;
|
|
921
792
|
return __removeDataItemReference;
|
|
922
793
|
}
|
|
923
794
|
exports.removeDataItemReference = removeDataItemReference;
|
|
@@ -929,49 +800,39 @@ exports.removeDataItemReference = removeDataItemReference;
|
|
|
929
800
|
* 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.
|
|
930
801
|
*/
|
|
931
802
|
function bulkInsertDataItemReferences(payload) {
|
|
932
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkInsertDataItemReferencesRequest, {});
|
|
933
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkInsertDataItemReferencesResponse, {});
|
|
934
803
|
function __bulkInsertDataItemReferences({ host }) {
|
|
935
|
-
const serializedData = toReq(payload);
|
|
936
804
|
const metadata = {
|
|
937
805
|
entityFqdn: 'wix.data.v2.data_item',
|
|
938
806
|
method: 'POST',
|
|
939
807
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkInsertDataItemReferences',
|
|
940
808
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
941
809
|
protoPath: '/v2/bulk/items/insert-references',
|
|
942
|
-
data:
|
|
810
|
+
data: payload,
|
|
943
811
|
host,
|
|
944
812
|
}),
|
|
945
|
-
data:
|
|
946
|
-
transformResponse: fromRes,
|
|
813
|
+
data: payload,
|
|
947
814
|
};
|
|
948
815
|
return metadata;
|
|
949
816
|
}
|
|
950
|
-
__bulkInsertDataItemReferences.fromReq = fromReq;
|
|
951
817
|
return __bulkInsertDataItemReferences;
|
|
952
818
|
}
|
|
953
819
|
exports.bulkInsertDataItemReferences = bulkInsertDataItemReferences;
|
|
954
820
|
/** Removes one or more references. */
|
|
955
821
|
function bulkRemoveDataItemReferences(payload) {
|
|
956
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkRemoveDataItemReferencesRequest, {});
|
|
957
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkRemoveDataItemReferencesResponse, {});
|
|
958
822
|
function __bulkRemoveDataItemReferences({ host }) {
|
|
959
|
-
const serializedData = toReq(payload);
|
|
960
823
|
const metadata = {
|
|
961
824
|
entityFqdn: 'wix.data.v2.data_item',
|
|
962
825
|
method: 'POST',
|
|
963
826
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.BulkRemoveDataItemReferences',
|
|
964
827
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
965
828
|
protoPath: '/v2/bulk/items/remove-references',
|
|
966
|
-
data:
|
|
829
|
+
data: payload,
|
|
967
830
|
host,
|
|
968
831
|
}),
|
|
969
|
-
data:
|
|
970
|
-
transformResponse: fromRes,
|
|
832
|
+
data: payload,
|
|
971
833
|
};
|
|
972
834
|
return metadata;
|
|
973
835
|
}
|
|
974
|
-
__bulkRemoveDataItemReferences.fromReq = fromReq;
|
|
975
836
|
return __bulkRemoveDataItemReferences;
|
|
976
837
|
}
|
|
977
838
|
exports.bulkRemoveDataItemReferences = bulkRemoveDataItemReferences;
|
|
@@ -985,25 +846,20 @@ exports.bulkRemoveDataItemReferences = bulkRemoveDataItemReferences;
|
|
|
985
846
|
* > **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed.
|
|
986
847
|
*/
|
|
987
848
|
function replaceDataItemReferences(payload) {
|
|
988
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_replaceDataItemReferencesRequest, {});
|
|
989
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_replaceDataItemReferencesResponse, {});
|
|
990
849
|
function __replaceDataItemReferences({ host }) {
|
|
991
|
-
const serializedData = toReq(payload);
|
|
992
850
|
const metadata = {
|
|
993
851
|
entityFqdn: 'wix.data.v2.data_item',
|
|
994
852
|
method: 'POST',
|
|
995
853
|
methodFqn: 'com.wixpress.cloud.data.api.data.DataItemService.ReplaceDataItemReferences',
|
|
996
854
|
url: resolveComWixpressCloudDataApiDataDataItemServiceUrl({
|
|
997
855
|
protoPath: '/v2/items/replace-references',
|
|
998
|
-
data:
|
|
856
|
+
data: payload,
|
|
999
857
|
host,
|
|
1000
858
|
}),
|
|
1001
|
-
data:
|
|
1002
|
-
transformResponse: fromRes,
|
|
859
|
+
data: payload,
|
|
1003
860
|
};
|
|
1004
861
|
return metadata;
|
|
1005
862
|
}
|
|
1006
|
-
__replaceDataItemReferences.fromReq = fromReq;
|
|
1007
863
|
return __replaceDataItemReferences;
|
|
1008
864
|
}
|
|
1009
865
|
exports.replaceDataItemReferences = replaceDataItemReferences;
|