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