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