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