@wix/auto_sdk_data-backend-public-sdk-poc_data 1.0.50 → 1.0.52

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.
@@ -1,1439 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // index.typings.ts
21
- var index_typings_exports = {};
22
- __export(index_typings_exports, {
23
- Order: () => Order,
24
- Segment: () => Segment,
25
- SortOrder: () => SortOrder,
26
- aggregate: () => aggregate2,
27
- bulkInsert: () => bulkInsert2,
28
- bulkInsertReferences: () => bulkInsertReferences2,
29
- bulkRemove: () => bulkRemove2,
30
- bulkRemoveReferences: () => bulkRemoveReferences2,
31
- bulkReplaceReferences: () => bulkReplaceReferences2,
32
- bulkSave: () => bulkSave2,
33
- bulkUpdate: () => bulkUpdate2,
34
- count: () => count2,
35
- distinct: () => distinct2,
36
- get: () => get2,
37
- insert: () => insert2,
38
- isReferenced: () => isReferenced2,
39
- query: () => query2,
40
- queryReferenced: () => queryReferenced2,
41
- remove: () => remove2,
42
- save: () => save2,
43
- truncate: () => truncate2,
44
- update: () => update2
45
- });
46
- module.exports = __toCommonJS(index_typings_exports);
47
-
48
- // src/data-v1-data-service-data.universal.ts
49
- var import_transform_error = require("@wix/sdk-runtime/transform-error");
50
- var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
51
-
52
- // src/data-v1-data-service-data.http.ts
53
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
54
- var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
55
- function resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl(opts) {
56
- const domainToMappings = {
57
- "api._api_base_domain_": [
58
- {
59
- srcPath: "/cloud-data",
60
- destPath: ""
61
- }
62
- ],
63
- "code._base_domain_": [
64
- {
65
- srcPath: "/_api/cloud-data/v1/data-settings",
66
- destPath: "/v1/data-settings"
67
- },
68
- {
69
- srcPath: "/_api/cloud-data/v1/schemas",
70
- destPath: "/v1/schemas"
71
- },
72
- {
73
- srcPath: "/_api/cloud-data/v1/connector",
74
- destPath: "/v1/connector"
75
- },
76
- {
77
- srcPath: "/_api/data/v1/data-settings",
78
- destPath: "/v1/data-settings"
79
- },
80
- {
81
- srcPath: "/_api/data/v1/schemas",
82
- destPath: "/v1/schemas"
83
- },
84
- {
85
- srcPath: "/_api/data/v1/connector",
86
- destPath: "/v1/connector"
87
- },
88
- {
89
- srcPath: "/_api/cloud-data/v1/wix-data",
90
- destPath: "/v1/wix-data"
91
- }
92
- ],
93
- "cloud-data.wix-code.com": [
94
- {
95
- srcPath: "",
96
- destPath: ""
97
- }
98
- ],
99
- _: [
100
- {
101
- srcPath: "/_api/cloud-data",
102
- destPath: ""
103
- }
104
- ],
105
- "www._base_domain_": [
106
- {
107
- srcPath: "/_api/cloud-data",
108
- destPath: ""
109
- },
110
- {
111
- srcPath: "/_api/data",
112
- destPath: ""
113
- },
114
- {
115
- srcPath: "/_api/cloud-data",
116
- destPath: ""
117
- }
118
- ],
119
- "dev._base_domain_": [
120
- {
121
- srcPath: "/_api/cloud-data",
122
- destPath: ""
123
- }
124
- ],
125
- "bo._base_domain_": [
126
- {
127
- srcPath: "/_api/cloud-data/v1",
128
- destPath: "/v1"
129
- },
130
- {
131
- srcPath: "/_api/cloud-data/v2",
132
- destPath: "/v2"
133
- }
134
- ],
135
- "wixbo.ai": [
136
- {
137
- srcPath: "/_api/cloud-data/v1",
138
- destPath: "/v1"
139
- },
140
- {
141
- srcPath: "/_api/cloud-data/v2",
142
- destPath: "/v2"
143
- }
144
- ],
145
- "wix-bo.com": [
146
- {
147
- srcPath: "/_api/cloud-data/v1",
148
- destPath: "/v1"
149
- },
150
- {
151
- srcPath: "/_api/cloud-data/v2",
152
- destPath: "/v2"
153
- }
154
- ],
155
- "manage._base_domain_": [
156
- {
157
- srcPath: "/_api/cloud-data",
158
- destPath: ""
159
- },
160
- {
161
- srcPath: "/_api/data",
162
- destPath: ""
163
- },
164
- {
165
- srcPath: "/_api/cloud-data",
166
- destPath: ""
167
- }
168
- ],
169
- "editor._base_domain_": [
170
- {
171
- srcPath: "/_api/cloud-data/v1/schemas",
172
- destPath: "/v1/schemas"
173
- },
174
- {
175
- srcPath: "/_api/cloud-data/dbs/tasks",
176
- destPath: "/dbs/tasks"
177
- },
178
- {
179
- srcPath: "/_api/data/v1/schemas",
180
- destPath: "/v1/schemas"
181
- },
182
- {
183
- srcPath: "/_api/data/dbs/tasks",
184
- destPath: "/dbs/tasks"
185
- },
186
- {
187
- srcPath: "/_api/cloud-data/v1/wix-data",
188
- destPath: "/v1/wix-data"
189
- },
190
- {
191
- srcPath: "/_api/cloud-data/v1/data-settings",
192
- destPath: "/v1/data-settings"
193
- },
194
- {
195
- srcPath: "/_api/data/v2/indexes",
196
- destPath: "/v2/indexes"
197
- },
198
- {
199
- srcPath: "/_api/cloud-data/v1/external-database-connections",
200
- destPath: "/v1/external-database-connections"
201
- },
202
- {
203
- srcPath: "/_api/data/v1/data-collection-sharing",
204
- destPath: "/v1/data-collection-sharing"
205
- },
206
- {
207
- srcPath: "/_api/cloud-data/v2/collections",
208
- destPath: "/v2/collections"
209
- },
210
- {
211
- srcPath: "/_api/cloud-data/v2/bulk",
212
- destPath: "/v2/bulk"
213
- },
214
- {
215
- srcPath: "/_api/cloud-data/v2/items",
216
- destPath: "/v2/items"
217
- },
218
- {
219
- srcPath: "/_api/cloud-data/v2/dbs/tasks",
220
- destPath: "/v2/dbs/tasks"
221
- }
222
- ],
223
- "blocks._base_domain_": [
224
- {
225
- srcPath: "/_api/cloud-data/v1/schemas",
226
- destPath: "/v1/schemas"
227
- },
228
- {
229
- srcPath: "/_api/cloud-data/dbs/tasks",
230
- destPath: "/dbs/tasks"
231
- },
232
- {
233
- srcPath: "/_api/data/v1/schemas",
234
- destPath: "/v1/schemas"
235
- },
236
- {
237
- srcPath: "/_api/data/dbs/tasks",
238
- destPath: "/dbs/tasks"
239
- },
240
- {
241
- srcPath: "/_api/cloud-data/v1/wix-data",
242
- destPath: "/v1/wix-data"
243
- },
244
- {
245
- srcPath: "/_api/cloud-data/v1/data-settings",
246
- destPath: "/v1/data-settings"
247
- },
248
- {
249
- srcPath: "/_api/data/v2/indexes",
250
- destPath: "/v2/indexes"
251
- },
252
- {
253
- srcPath: "/_api/cloud-data/v1/external-database-connections",
254
- destPath: "/v1/external-database-connections"
255
- },
256
- {
257
- srcPath: "/_api/data/v1/data-collection-sharing",
258
- destPath: "/v1/data-collection-sharing"
259
- },
260
- {
261
- srcPath: "/_api/cloud-data/v2/collections",
262
- destPath: "/v2/collections"
263
- },
264
- {
265
- srcPath: "/_api/cloud-data/v2/bulk",
266
- destPath: "/v2/bulk"
267
- },
268
- {
269
- srcPath: "/_api/cloud-data/v2/items",
270
- destPath: "/v2/items"
271
- },
272
- {
273
- srcPath: "/_api/cloud-data/v2/dbs/tasks",
274
- destPath: "/v2/dbs/tasks"
275
- }
276
- ],
277
- "create.editorx": [
278
- {
279
- srcPath: "/_api/cloud-data/v1/schemas",
280
- destPath: "/v1/schemas"
281
- },
282
- {
283
- srcPath: "/_api/cloud-data/dbs/tasks",
284
- destPath: "/dbs/tasks"
285
- },
286
- {
287
- srcPath: "/_api/data/v1/schemas",
288
- destPath: "/v1/schemas"
289
- },
290
- {
291
- srcPath: "/_api/data/dbs/tasks",
292
- destPath: "/dbs/tasks"
293
- },
294
- {
295
- srcPath: "/_api/cloud-data/v1/wix-data",
296
- destPath: "/v1/wix-data"
297
- },
298
- {
299
- srcPath: "/_api/cloud-data/v1/data-settings",
300
- destPath: "/v1/data-settings"
301
- },
302
- {
303
- srcPath: "/_api/data/v2/indexes",
304
- destPath: "/v2/indexes"
305
- },
306
- {
307
- srcPath: "/_api/cloud-data/v1/external-database-connections",
308
- destPath: "/v1/external-database-connections"
309
- },
310
- {
311
- srcPath: "/_api/data/v1/data-collection-sharing",
312
- destPath: "/v1/data-collection-sharing"
313
- },
314
- {
315
- srcPath: "/_api/cloud-data/v2/collections",
316
- destPath: "/v2/collections"
317
- },
318
- {
319
- srcPath: "/_api/cloud-data/v2/bulk",
320
- destPath: "/v2/bulk"
321
- },
322
- {
323
- srcPath: "/_api/cloud-data/v2/items",
324
- destPath: "/v2/items"
325
- },
326
- {
327
- srcPath: "/_api/cloud-data/v2/dbs/tasks",
328
- destPath: "/v2/dbs/tasks"
329
- }
330
- ],
331
- "www.wixapis.com": [
332
- {
333
- srcPath: "/wix-data/v1/collections",
334
- destPath: "/v1/wix-data/collections"
335
- },
336
- {
337
- srcPath: "/wix-data/v1/external-database-connections",
338
- destPath: "/v1/external-database-connections"
339
- },
340
- {
341
- srcPath: "/wix-data/v2/indexes",
342
- destPath: "/v2/indexes"
343
- },
344
- {
345
- srcPath: "/wix-data/v1/items",
346
- destPath: "/v1/items"
347
- },
348
- {
349
- srcPath: "/wix-data/v1/bulk",
350
- destPath: "/v1/bulk"
351
- },
352
- {
353
- srcPath: "/wix-data/v1/external-databases",
354
- destPath: "/v1/external-databases"
355
- },
356
- {
357
- srcPath: "/wix-data/v2",
358
- destPath: "/v2"
359
- },
360
- {
361
- srcPath: "/data/v2/collections",
362
- destPath: "/v2/collections"
363
- },
364
- {
365
- srcPath: "/data/v2/items",
366
- destPath: "/v2/items"
367
- },
368
- {
369
- srcPath: "/data/v2/bulk/items",
370
- destPath: "/v2/bulk/items"
371
- },
372
- {
373
- srcPath: "/data/v2/indexes",
374
- destPath: "/v2/indexes"
375
- },
376
- {
377
- srcPath: "/data/v1/external-database-connections",
378
- destPath: "/v1/external-database-connections"
379
- },
380
- {
381
- srcPath: "/data/v1/data-collection-sharing",
382
- destPath: "/v1/data-collection-sharing"
383
- }
384
- ],
385
- "www.wixgateway.com": [
386
- {
387
- srcPath: "/wix-data/v1/items",
388
- destPath: "/v1/items"
389
- },
390
- {
391
- srcPath: "/wix-data/v1/bulk",
392
- destPath: "/v1/bulk"
393
- }
394
- ],
395
- "*.dev.wix-code.com": [
396
- {
397
- srcPath: "/_api/cloud-data/v2",
398
- destPath: "/v2"
399
- },
400
- {
401
- srcPath: "/_api/cloud-data/v1/external-database-connections",
402
- destPath: "/v1/external-database-connections"
403
- },
404
- {
405
- srcPath: "/data/v1/data-collection-sharing",
406
- destPath: "/v1/data-collection-sharing"
407
- }
408
- ]
409
- };
410
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
411
- }
412
- var PACKAGE_NAME = "@wix/auto_sdk_data-backend-public-sdk-poc_data";
413
- function insert(payload) {
414
- function __insert({ host }) {
415
- const metadata = {
416
- entityFqdn: "wix.data.v1.data_service",
417
- method: "POST",
418
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Insert",
419
- packageName: PACKAGE_NAME,
420
- migrationOptions: {
421
- optInTransformResponse: true
422
- },
423
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
424
- protoPath: "/v1/items",
425
- data: payload,
426
- host
427
- }),
428
- data: payload
429
- };
430
- return metadata;
431
- }
432
- return __insert;
433
- }
434
- function update(payload) {
435
- function __update({ host }) {
436
- const metadata = {
437
- entityFqdn: "wix.data.v1.data_service",
438
- method: "PUT",
439
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Update",
440
- packageName: PACKAGE_NAME,
441
- migrationOptions: {
442
- optInTransformResponse: true
443
- },
444
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
445
- protoPath: "/v1/items/{itemId}",
446
- data: payload,
447
- host
448
- }),
449
- data: payload
450
- };
451
- return metadata;
452
- }
453
- return __update;
454
- }
455
- function save(payload) {
456
- function __save({ host }) {
457
- const metadata = {
458
- entityFqdn: "wix.data.v1.data_service",
459
- method: "POST",
460
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Save",
461
- packageName: PACKAGE_NAME,
462
- migrationOptions: {
463
- optInTransformResponse: true
464
- },
465
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
466
- protoPath: "/v1/items/save",
467
- data: payload,
468
- host
469
- }),
470
- data: payload
471
- };
472
- return metadata;
473
- }
474
- return __save;
475
- }
476
- function get(payload) {
477
- function __get({ host }) {
478
- const metadata = {
479
- entityFqdn: "wix.data.v1.data_service",
480
- method: "GET",
481
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Get",
482
- packageName: PACKAGE_NAME,
483
- migrationOptions: {
484
- optInTransformResponse: true
485
- },
486
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
487
- protoPath: "/v1/items/{itemId}",
488
- data: payload,
489
- host
490
- }),
491
- params: (0, import_rest_modules.toURLSearchParams)(payload, true)
492
- };
493
- return metadata;
494
- }
495
- return __get;
496
- }
497
- function remove(payload) {
498
- function __remove({ host }) {
499
- const metadata = {
500
- entityFqdn: "wix.data.v1.data_service",
501
- method: "DELETE",
502
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Remove",
503
- packageName: PACKAGE_NAME,
504
- migrationOptions: {
505
- optInTransformResponse: true
506
- },
507
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
508
- protoPath: "/v1/items/{itemId}",
509
- data: payload,
510
- host
511
- }),
512
- params: (0, import_rest_modules.toURLSearchParams)(payload)
513
- };
514
- return metadata;
515
- }
516
- return __remove;
517
- }
518
- function truncate(payload) {
519
- function __truncate({ host }) {
520
- const metadata = {
521
- entityFqdn: "wix.data.v1.data_service",
522
- method: "POST",
523
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Truncate",
524
- packageName: PACKAGE_NAME,
525
- migrationOptions: {
526
- optInTransformResponse: true
527
- },
528
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
529
- protoPath: "/v1/items/truncate",
530
- data: payload,
531
- host
532
- }),
533
- data: payload
534
- };
535
- return metadata;
536
- }
537
- return __truncate;
538
- }
539
- function query(payload) {
540
- function __query({ host }) {
541
- const metadata = {
542
- entityFqdn: "wix.data.v1.data_service",
543
- method: "GET",
544
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Query",
545
- packageName: PACKAGE_NAME,
546
- migrationOptions: {
547
- optInTransformResponse: true
548
- },
549
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
550
- protoPath: "/v1/items/query",
551
- data: payload,
552
- host
553
- }),
554
- params: (0, import_rest_modules.toURLSearchParams)(payload, true),
555
- fallback: [
556
- {
557
- method: "POST",
558
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
559
- protoPath: "/v1/items/query",
560
- data: payload,
561
- host
562
- }),
563
- data: payload
564
- }
565
- ]
566
- };
567
- return metadata;
568
- }
569
- return __query;
570
- }
571
- function aggregate(payload) {
572
- function __aggregate({ host }) {
573
- const metadata = {
574
- entityFqdn: "wix.data.v1.data_service",
575
- method: "POST",
576
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Aggregate",
577
- packageName: PACKAGE_NAME,
578
- migrationOptions: {
579
- optInTransformResponse: true
580
- },
581
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
582
- protoPath: "/v1/items/aggregate",
583
- data: payload,
584
- host
585
- }),
586
- data: payload
587
- };
588
- return metadata;
589
- }
590
- return __aggregate;
591
- }
592
- function count(payload) {
593
- function __count({ host }) {
594
- const metadata = {
595
- entityFqdn: "wix.data.v1.data_service",
596
- method: "POST",
597
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Count",
598
- packageName: PACKAGE_NAME,
599
- migrationOptions: {
600
- optInTransformResponse: true
601
- },
602
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
603
- protoPath: "/v1/items/count",
604
- data: payload,
605
- host
606
- }),
607
- data: payload
608
- };
609
- return metadata;
610
- }
611
- return __count;
612
- }
613
- function distinct(payload) {
614
- function __distinct({ host }) {
615
- const metadata = {
616
- entityFqdn: "wix.data.v1.data_service",
617
- method: "POST",
618
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Distinct",
619
- packageName: PACKAGE_NAME,
620
- migrationOptions: {
621
- optInTransformResponse: true
622
- },
623
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
624
- protoPath: "/v1/items/distinct",
625
- data: payload,
626
- host
627
- }),
628
- data: payload
629
- };
630
- return metadata;
631
- }
632
- return __distinct;
633
- }
634
- function bulkInsert(payload) {
635
- function __bulkInsert({ host }) {
636
- const metadata = {
637
- entityFqdn: "wix.data.v1.data_service",
638
- method: "POST",
639
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsert",
640
- packageName: PACKAGE_NAME,
641
- migrationOptions: {
642
- optInTransformResponse: true
643
- },
644
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
645
- protoPath: "/v1/bulk/items/insert",
646
- data: payload,
647
- host
648
- }),
649
- data: payload
650
- };
651
- return metadata;
652
- }
653
- return __bulkInsert;
654
- }
655
- function bulkSave(payload) {
656
- function __bulkSave({ host }) {
657
- const metadata = {
658
- entityFqdn: "wix.data.v1.data_service",
659
- method: "POST",
660
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkSave",
661
- packageName: PACKAGE_NAME,
662
- migrationOptions: {
663
- optInTransformResponse: true
664
- },
665
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
666
- protoPath: "/v1/bulk/items/save",
667
- data: payload,
668
- host
669
- }),
670
- data: payload
671
- };
672
- return metadata;
673
- }
674
- return __bulkSave;
675
- }
676
- function bulkUpdate(payload) {
677
- function __bulkUpdate({ host }) {
678
- const metadata = {
679
- entityFqdn: "wix.data.v1.data_service",
680
- method: "POST",
681
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkUpdate",
682
- packageName: PACKAGE_NAME,
683
- migrationOptions: {
684
- optInTransformResponse: true
685
- },
686
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
687
- protoPath: "/v1/bulk/items/update",
688
- data: payload,
689
- host
690
- }),
691
- data: payload
692
- };
693
- return metadata;
694
- }
695
- return __bulkUpdate;
696
- }
697
- function bulkRemove(payload) {
698
- function __bulkRemove({ host }) {
699
- const metadata = {
700
- entityFqdn: "wix.data.v1.data_service",
701
- method: "POST",
702
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemove",
703
- packageName: PACKAGE_NAME,
704
- migrationOptions: {
705
- optInTransformResponse: true
706
- },
707
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
708
- protoPath: "/v1/bulk/items/remove",
709
- data: payload,
710
- host
711
- }),
712
- data: payload
713
- };
714
- return metadata;
715
- }
716
- return __bulkRemove;
717
- }
718
- function queryReferenced(payload) {
719
- function __queryReferenced({ host }) {
720
- const metadata = {
721
- entityFqdn: "wix.data.v1.data_service",
722
- method: "POST",
723
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.QueryReferenced",
724
- packageName: PACKAGE_NAME,
725
- migrationOptions: {
726
- optInTransformResponse: true
727
- },
728
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
729
- protoPath: "/v1/items/query-referenced",
730
- data: payload,
731
- host
732
- }),
733
- data: payload
734
- };
735
- return metadata;
736
- }
737
- return __queryReferenced;
738
- }
739
- function bulkInsertReferences(payload) {
740
- function __bulkInsertReferences({ host }) {
741
- const metadata = {
742
- entityFqdn: "wix.data.v1.data_service",
743
- method: "POST",
744
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsertReferences",
745
- packageName: PACKAGE_NAME,
746
- migrationOptions: {
747
- optInTransformResponse: true
748
- },
749
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
750
- protoPath: "/v1/bulk/references/insert",
751
- data: payload,
752
- host
753
- }),
754
- data: payload
755
- };
756
- return metadata;
757
- }
758
- return __bulkInsertReferences;
759
- }
760
- function bulkReplaceReferences(payload) {
761
- function __bulkReplaceReferences({ host }) {
762
- const metadata = {
763
- entityFqdn: "wix.data.v1.data_service",
764
- method: "POST",
765
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkReplaceReferences",
766
- packageName: PACKAGE_NAME,
767
- migrationOptions: {
768
- optInTransformResponse: true
769
- },
770
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
771
- protoPath: "/v1/bulk/references/replace",
772
- data: payload,
773
- host
774
- }),
775
- data: payload
776
- };
777
- return metadata;
778
- }
779
- return __bulkReplaceReferences;
780
- }
781
- function bulkRemoveReferences(payload) {
782
- function __bulkRemoveReferences({ host }) {
783
- const metadata = {
784
- entityFqdn: "wix.data.v1.data_service",
785
- method: "POST",
786
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemoveReferences",
787
- packageName: PACKAGE_NAME,
788
- migrationOptions: {
789
- optInTransformResponse: true
790
- },
791
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
792
- protoPath: "/v1/bulk/references/remove",
793
- data: payload,
794
- host
795
- }),
796
- data: payload
797
- };
798
- return metadata;
799
- }
800
- return __bulkRemoveReferences;
801
- }
802
- function isReferenced(payload) {
803
- function __isReferenced({ host }) {
804
- const metadata = {
805
- entityFqdn: "wix.data.v1.data_service",
806
- method: "POST",
807
- methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.IsReferenced",
808
- packageName: PACKAGE_NAME,
809
- migrationOptions: {
810
- optInTransformResponse: true
811
- },
812
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
813
- protoPath: "/v1/items/is-referenced",
814
- data: payload,
815
- host
816
- }),
817
- data: payload
818
- };
819
- return metadata;
820
- }
821
- return __isReferenced;
822
- }
823
-
824
- // src/data-v1-data-service-data.universal.ts
825
- var Segment = /* @__PURE__ */ ((Segment2) => {
826
- Segment2["LIVE"] = "LIVE";
827
- Segment2["SANDBOX"] = "SANDBOX";
828
- Segment2["TRASH_LIVE"] = "TRASH_LIVE";
829
- return Segment2;
830
- })(Segment || {});
831
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
832
- SortOrder2["ASC"] = "ASC";
833
- SortOrder2["DESC"] = "DESC";
834
- return SortOrder2;
835
- })(SortOrder || {});
836
- var Order = /* @__PURE__ */ ((Order2) => {
837
- Order2["ASC"] = "ASC";
838
- Order2["DESC"] = "DESC";
839
- return Order2;
840
- })(Order || {});
841
- async function insert2(options) {
842
- const { httpClient, sideEffects } = arguments[1];
843
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
844
- item: options?.item,
845
- dataCollectionId: options?.dataCollectionId
846
- });
847
- const reqOpts = insert(payload);
848
- sideEffects?.onSiteCall?.();
849
- try {
850
- const result = await httpClient.request(reqOpts);
851
- sideEffects?.onSuccess?.(result);
852
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
853
- } catch (err) {
854
- const transformedError = (0, import_transform_error.transformError)(
855
- err,
856
- {
857
- spreadPathsToArguments: {},
858
- explicitPathsToArguments: {
859
- item: "$[0].item",
860
- dataCollectionId: "$[0].dataCollectionId"
861
- },
862
- singleArgumentUnchanged: false
863
- },
864
- ["options"]
865
- );
866
- sideEffects?.onError?.(err);
867
- throw transformedError;
868
- }
869
- }
870
- async function update2(options) {
871
- const { httpClient, sideEffects } = arguments[1];
872
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
873
- item: options?.item,
874
- dataCollectionId: options?.dataCollectionId
875
- });
876
- const reqOpts = update(payload);
877
- sideEffects?.onSiteCall?.();
878
- try {
879
- const result = await httpClient.request(reqOpts);
880
- sideEffects?.onSuccess?.(result);
881
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
882
- } catch (err) {
883
- const transformedError = (0, import_transform_error.transformError)(
884
- err,
885
- {
886
- spreadPathsToArguments: {},
887
- explicitPathsToArguments: {
888
- item: "$[0].item",
889
- dataCollectionId: "$[0].dataCollectionId"
890
- },
891
- singleArgumentUnchanged: false
892
- },
893
- ["options"]
894
- );
895
- sideEffects?.onError?.(err);
896
- throw transformedError;
897
- }
898
- }
899
- async function save2(options) {
900
- const { httpClient, sideEffects } = arguments[1];
901
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
902
- item: options?.item,
903
- dataCollectionId: options?.dataCollectionId
904
- });
905
- const reqOpts = save(payload);
906
- sideEffects?.onSiteCall?.();
907
- try {
908
- const result = await httpClient.request(reqOpts);
909
- sideEffects?.onSuccess?.(result);
910
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
911
- } catch (err) {
912
- const transformedError = (0, import_transform_error.transformError)(
913
- err,
914
- {
915
- spreadPathsToArguments: {},
916
- explicitPathsToArguments: {
917
- item: "$[0].item",
918
- dataCollectionId: "$[0].dataCollectionId"
919
- },
920
- singleArgumentUnchanged: false
921
- },
922
- ["options"]
923
- );
924
- sideEffects?.onError?.(err);
925
- throw transformedError;
926
- }
927
- }
928
- async function get2(itemId, options) {
929
- const { httpClient, sideEffects } = arguments[2];
930
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
931
- itemId,
932
- dataCollectionId: options?.dataCollectionId
933
- });
934
- const reqOpts = get(payload);
935
- sideEffects?.onSiteCall?.();
936
- try {
937
- const result = await httpClient.request(reqOpts);
938
- sideEffects?.onSuccess?.(result);
939
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
940
- } catch (err) {
941
- const transformedError = (0, import_transform_error.transformError)(
942
- err,
943
- {
944
- spreadPathsToArguments: {},
945
- explicitPathsToArguments: {
946
- itemId: "$[0]",
947
- dataCollectionId: "$[1].dataCollectionId"
948
- },
949
- singleArgumentUnchanged: false
950
- },
951
- ["itemId", "options"]
952
- );
953
- sideEffects?.onError?.(err);
954
- throw transformedError;
955
- }
956
- }
957
- async function remove2(itemId, options) {
958
- const { httpClient, sideEffects } = arguments[2];
959
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
960
- itemId,
961
- dataCollectionId: options?.dataCollectionId
962
- });
963
- const reqOpts = remove(payload);
964
- sideEffects?.onSiteCall?.();
965
- try {
966
- const result = await httpClient.request(reqOpts);
967
- sideEffects?.onSuccess?.(result);
968
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
969
- } catch (err) {
970
- const transformedError = (0, import_transform_error.transformError)(
971
- err,
972
- {
973
- spreadPathsToArguments: {},
974
- explicitPathsToArguments: {
975
- itemId: "$[0]",
976
- dataCollectionId: "$[1].dataCollectionId"
977
- },
978
- singleArgumentUnchanged: false
979
- },
980
- ["itemId", "options"]
981
- );
982
- sideEffects?.onError?.(err);
983
- throw transformedError;
984
- }
985
- }
986
- async function truncate2(options) {
987
- const { httpClient, sideEffects } = arguments[1];
988
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
989
- dataCollectionId: options?.dataCollectionId
990
- });
991
- const reqOpts = truncate(payload);
992
- sideEffects?.onSiteCall?.();
993
- try {
994
- const result = await httpClient.request(reqOpts);
995
- sideEffects?.onSuccess?.(result);
996
- } catch (err) {
997
- const transformedError = (0, import_transform_error.transformError)(
998
- err,
999
- {
1000
- spreadPathsToArguments: {},
1001
- explicitPathsToArguments: { dataCollectionId: "$[0].dataCollectionId" },
1002
- singleArgumentUnchanged: false
1003
- },
1004
- ["options"]
1005
- );
1006
- sideEffects?.onError?.(err);
1007
- throw transformedError;
1008
- }
1009
- }
1010
- async function query2(options) {
1011
- const { httpClient, sideEffects } = arguments[1];
1012
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1013
- dataQuery: options?.dataQuery,
1014
- omitTotalCount: options?.omitTotalCount,
1015
- includeReferencedItems: options?.includeReferencedItems,
1016
- dataCollectionId: options?.dataCollectionId
1017
- });
1018
- const reqOpts = query(payload);
1019
- sideEffects?.onSiteCall?.();
1020
- try {
1021
- const result = await httpClient.request(reqOpts);
1022
- sideEffects?.onSuccess?.(result);
1023
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1024
- } catch (err) {
1025
- const transformedError = (0, import_transform_error.transformError)(
1026
- err,
1027
- {
1028
- spreadPathsToArguments: {},
1029
- explicitPathsToArguments: {
1030
- dataQuery: "$[0].dataQuery",
1031
- omitTotalCount: "$[0].omitTotalCount",
1032
- includeReferencedItems: "$[0].includeReferencedItems",
1033
- dataCollectionId: "$[0].dataCollectionId"
1034
- },
1035
- singleArgumentUnchanged: false
1036
- },
1037
- ["options"]
1038
- );
1039
- sideEffects?.onError?.(err);
1040
- throw transformedError;
1041
- }
1042
- }
1043
- async function aggregate2(options) {
1044
- const { httpClient, sideEffects } = arguments[1];
1045
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1046
- paging: options?.paging,
1047
- initialFilter: options?.initialFilter,
1048
- aggregation: options?.aggregation,
1049
- finalFilter: options?.finalFilter,
1050
- sort: options?.sort,
1051
- dataCollectionId: options?.dataCollectionId
1052
- });
1053
- const reqOpts = aggregate(payload);
1054
- sideEffects?.onSiteCall?.();
1055
- try {
1056
- const result = await httpClient.request(reqOpts);
1057
- sideEffects?.onSuccess?.(result);
1058
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1059
- } catch (err) {
1060
- const transformedError = (0, import_transform_error.transformError)(
1061
- err,
1062
- {
1063
- spreadPathsToArguments: {},
1064
- explicitPathsToArguments: {
1065
- paging: "$[0].paging",
1066
- initialFilter: "$[0].initialFilter",
1067
- aggregation: "$[0].aggregation",
1068
- finalFilter: "$[0].finalFilter",
1069
- sort: "$[0].sort",
1070
- dataCollectionId: "$[0].dataCollectionId"
1071
- },
1072
- singleArgumentUnchanged: false
1073
- },
1074
- ["options"]
1075
- );
1076
- sideEffects?.onError?.(err);
1077
- throw transformedError;
1078
- }
1079
- }
1080
- async function count2(options) {
1081
- const { httpClient, sideEffects } = arguments[1];
1082
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1083
- filter: options?.filter,
1084
- dataCollectionId: options?.dataCollectionId
1085
- });
1086
- const reqOpts = count(payload);
1087
- sideEffects?.onSiteCall?.();
1088
- try {
1089
- const result = await httpClient.request(reqOpts);
1090
- sideEffects?.onSuccess?.(result);
1091
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1092
- } catch (err) {
1093
- const transformedError = (0, import_transform_error.transformError)(
1094
- err,
1095
- {
1096
- spreadPathsToArguments: {},
1097
- explicitPathsToArguments: {
1098
- filter: "$[0].filter",
1099
- dataCollectionId: "$[0].dataCollectionId"
1100
- },
1101
- singleArgumentUnchanged: false
1102
- },
1103
- ["options"]
1104
- );
1105
- sideEffects?.onError?.(err);
1106
- throw transformedError;
1107
- }
1108
- }
1109
- async function distinct2(options) {
1110
- const { httpClient, sideEffects } = arguments[1];
1111
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1112
- dataQuery: options?.dataQuery,
1113
- propertyName: options?.propertyName,
1114
- dataCollectionId: options?.dataCollectionId,
1115
- omitTotalCount: options?.omitTotalCount
1116
- });
1117
- const reqOpts = distinct(payload);
1118
- sideEffects?.onSiteCall?.();
1119
- try {
1120
- const result = await httpClient.request(reqOpts);
1121
- sideEffects?.onSuccess?.(result);
1122
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1123
- } catch (err) {
1124
- const transformedError = (0, import_transform_error.transformError)(
1125
- err,
1126
- {
1127
- spreadPathsToArguments: {},
1128
- explicitPathsToArguments: {
1129
- dataQuery: "$[0].dataQuery",
1130
- propertyName: "$[0].propertyName",
1131
- dataCollectionId: "$[0].dataCollectionId",
1132
- omitTotalCount: "$[0].omitTotalCount"
1133
- },
1134
- singleArgumentUnchanged: false
1135
- },
1136
- ["options"]
1137
- );
1138
- sideEffects?.onError?.(err);
1139
- throw transformedError;
1140
- }
1141
- }
1142
- async function bulkInsert2(options) {
1143
- const { httpClient, sideEffects } = arguments[1];
1144
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1145
- items: options?.items,
1146
- dataCollectionId: options?.dataCollectionId
1147
- });
1148
- const reqOpts = bulkInsert(payload);
1149
- sideEffects?.onSiteCall?.();
1150
- try {
1151
- const result = await httpClient.request(reqOpts);
1152
- sideEffects?.onSuccess?.(result);
1153
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1154
- } catch (err) {
1155
- const transformedError = (0, import_transform_error.transformError)(
1156
- err,
1157
- {
1158
- spreadPathsToArguments: {},
1159
- explicitPathsToArguments: {
1160
- items: "$[0].items",
1161
- dataCollectionId: "$[0].dataCollectionId"
1162
- },
1163
- singleArgumentUnchanged: false
1164
- },
1165
- ["options"]
1166
- );
1167
- sideEffects?.onError?.(err);
1168
- throw transformedError;
1169
- }
1170
- }
1171
- async function bulkSave2(options) {
1172
- const { httpClient, sideEffects } = arguments[1];
1173
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1174
- items: options?.items,
1175
- dataCollectionId: options?.dataCollectionId
1176
- });
1177
- const reqOpts = bulkSave(payload);
1178
- sideEffects?.onSiteCall?.();
1179
- try {
1180
- const result = await httpClient.request(reqOpts);
1181
- sideEffects?.onSuccess?.(result);
1182
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1183
- } catch (err) {
1184
- const transformedError = (0, import_transform_error.transformError)(
1185
- err,
1186
- {
1187
- spreadPathsToArguments: {},
1188
- explicitPathsToArguments: {
1189
- items: "$[0].items",
1190
- dataCollectionId: "$[0].dataCollectionId"
1191
- },
1192
- singleArgumentUnchanged: false
1193
- },
1194
- ["options"]
1195
- );
1196
- sideEffects?.onError?.(err);
1197
- throw transformedError;
1198
- }
1199
- }
1200
- async function bulkUpdate2(options) {
1201
- const { httpClient, sideEffects } = arguments[1];
1202
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1203
- items: options?.items,
1204
- dataCollectionId: options?.dataCollectionId
1205
- });
1206
- const reqOpts = bulkUpdate(payload);
1207
- sideEffects?.onSiteCall?.();
1208
- try {
1209
- const result = await httpClient.request(reqOpts);
1210
- sideEffects?.onSuccess?.(result);
1211
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1212
- } catch (err) {
1213
- const transformedError = (0, import_transform_error.transformError)(
1214
- err,
1215
- {
1216
- spreadPathsToArguments: {},
1217
- explicitPathsToArguments: {
1218
- items: "$[0].items",
1219
- dataCollectionId: "$[0].dataCollectionId"
1220
- },
1221
- singleArgumentUnchanged: false
1222
- },
1223
- ["options"]
1224
- );
1225
- sideEffects?.onError?.(err);
1226
- throw transformedError;
1227
- }
1228
- }
1229
- async function bulkRemove2(options) {
1230
- const { httpClient, sideEffects } = arguments[1];
1231
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1232
- entries: options?.entries,
1233
- dataCollectionId: options?.dataCollectionId
1234
- });
1235
- const reqOpts = bulkRemove(payload);
1236
- sideEffects?.onSiteCall?.();
1237
- try {
1238
- const result = await httpClient.request(reqOpts);
1239
- sideEffects?.onSuccess?.(result);
1240
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1241
- } catch (err) {
1242
- const transformedError = (0, import_transform_error.transformError)(
1243
- err,
1244
- {
1245
- spreadPathsToArguments: {},
1246
- explicitPathsToArguments: {
1247
- entries: "$[0].entries",
1248
- dataCollectionId: "$[0].dataCollectionId"
1249
- },
1250
- singleArgumentUnchanged: false
1251
- },
1252
- ["options"]
1253
- );
1254
- sideEffects?.onError?.(err);
1255
- throw transformedError;
1256
- }
1257
- }
1258
- async function queryReferenced2(options) {
1259
- const { httpClient, sideEffects } = arguments[1];
1260
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1261
- referringItemId: options?.referringItemId,
1262
- propertyName: options?.propertyName,
1263
- paging: options?.paging,
1264
- dataCollectionId: options?.dataCollectionId,
1265
- omitTotalCount: options?.omitTotalCount
1266
- });
1267
- const reqOpts = queryReferenced(payload);
1268
- sideEffects?.onSiteCall?.();
1269
- try {
1270
- const result = await httpClient.request(reqOpts);
1271
- sideEffects?.onSuccess?.(result);
1272
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1273
- } catch (err) {
1274
- const transformedError = (0, import_transform_error.transformError)(
1275
- err,
1276
- {
1277
- spreadPathsToArguments: {},
1278
- explicitPathsToArguments: {
1279
- referringItemId: "$[0].referringItemId",
1280
- propertyName: "$[0].propertyName",
1281
- paging: "$[0].paging",
1282
- dataCollectionId: "$[0].dataCollectionId",
1283
- omitTotalCount: "$[0].omitTotalCount"
1284
- },
1285
- singleArgumentUnchanged: false
1286
- },
1287
- ["options"]
1288
- );
1289
- sideEffects?.onError?.(err);
1290
- throw transformedError;
1291
- }
1292
- }
1293
- async function bulkInsertReferences2(options) {
1294
- const { httpClient, sideEffects } = arguments[1];
1295
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1296
- references: options?.references,
1297
- dataCollectionId: options?.dataCollectionId
1298
- });
1299
- const reqOpts = bulkInsertReferences(payload);
1300
- sideEffects?.onSiteCall?.();
1301
- try {
1302
- const result = await httpClient.request(reqOpts);
1303
- sideEffects?.onSuccess?.(result);
1304
- } catch (err) {
1305
- const transformedError = (0, import_transform_error.transformError)(
1306
- err,
1307
- {
1308
- spreadPathsToArguments: {},
1309
- explicitPathsToArguments: {
1310
- references: "$[0].references",
1311
- dataCollectionId: "$[0].dataCollectionId"
1312
- },
1313
- singleArgumentUnchanged: false
1314
- },
1315
- ["options"]
1316
- );
1317
- sideEffects?.onError?.(err);
1318
- throw transformedError;
1319
- }
1320
- }
1321
- async function bulkReplaceReferences2(options) {
1322
- const { httpClient, sideEffects } = arguments[1];
1323
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1324
- propertyName: options?.propertyName,
1325
- referringItemId: options?.referringItemId,
1326
- newReferencedItemIds: options?.newReferencedItemIds,
1327
- dataCollectionId: options?.dataCollectionId
1328
- });
1329
- const reqOpts = bulkReplaceReferences(payload);
1330
- sideEffects?.onSiteCall?.();
1331
- try {
1332
- const result = await httpClient.request(reqOpts);
1333
- sideEffects?.onSuccess?.(result);
1334
- } catch (err) {
1335
- const transformedError = (0, import_transform_error.transformError)(
1336
- err,
1337
- {
1338
- spreadPathsToArguments: {},
1339
- explicitPathsToArguments: {
1340
- propertyName: "$[0].propertyName",
1341
- referringItemId: "$[0].referringItemId",
1342
- newReferencedItemIds: "$[0].newReferencedItemIds",
1343
- dataCollectionId: "$[0].dataCollectionId"
1344
- },
1345
- singleArgumentUnchanged: false
1346
- },
1347
- ["options"]
1348
- );
1349
- sideEffects?.onError?.(err);
1350
- throw transformedError;
1351
- }
1352
- }
1353
- async function bulkRemoveReferences2(options) {
1354
- const { httpClient, sideEffects } = arguments[1];
1355
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1356
- references: options?.references,
1357
- dataCollectionId: options?.dataCollectionId
1358
- });
1359
- const reqOpts = bulkRemoveReferences(payload);
1360
- sideEffects?.onSiteCall?.();
1361
- try {
1362
- const result = await httpClient.request(reqOpts);
1363
- sideEffects?.onSuccess?.(result);
1364
- } catch (err) {
1365
- const transformedError = (0, import_transform_error.transformError)(
1366
- err,
1367
- {
1368
- spreadPathsToArguments: {},
1369
- explicitPathsToArguments: {
1370
- references: "$[0].references",
1371
- dataCollectionId: "$[0].dataCollectionId"
1372
- },
1373
- singleArgumentUnchanged: false
1374
- },
1375
- ["options"]
1376
- );
1377
- sideEffects?.onError?.(err);
1378
- throw transformedError;
1379
- }
1380
- }
1381
- async function isReferenced2(options) {
1382
- const { httpClient, sideEffects } = arguments[1];
1383
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1384
- propertyName: options?.propertyName,
1385
- referringItemId: options?.referringItemId,
1386
- referencedItemId: options?.referencedItemId,
1387
- dataCollectionId: options?.dataCollectionId
1388
- });
1389
- const reqOpts = isReferenced(payload);
1390
- sideEffects?.onSiteCall?.();
1391
- try {
1392
- const result = await httpClient.request(reqOpts);
1393
- sideEffects?.onSuccess?.(result);
1394
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1395
- } catch (err) {
1396
- const transformedError = (0, import_transform_error.transformError)(
1397
- err,
1398
- {
1399
- spreadPathsToArguments: {},
1400
- explicitPathsToArguments: {
1401
- propertyName: "$[0].propertyName",
1402
- referringItemId: "$[0].referringItemId",
1403
- referencedItemId: "$[0].referencedItemId",
1404
- dataCollectionId: "$[0].dataCollectionId"
1405
- },
1406
- singleArgumentUnchanged: false
1407
- },
1408
- ["options"]
1409
- );
1410
- sideEffects?.onError?.(err);
1411
- throw transformedError;
1412
- }
1413
- }
1414
- // Annotate the CommonJS export names for ESM import in node:
1415
- 0 && (module.exports = {
1416
- Order,
1417
- Segment,
1418
- SortOrder,
1419
- aggregate,
1420
- bulkInsert,
1421
- bulkInsertReferences,
1422
- bulkRemove,
1423
- bulkRemoveReferences,
1424
- bulkReplaceReferences,
1425
- bulkSave,
1426
- bulkUpdate,
1427
- count,
1428
- distinct,
1429
- get,
1430
- insert,
1431
- isReferenced,
1432
- query,
1433
- queryReferenced,
1434
- remove,
1435
- save,
1436
- truncate,
1437
- update
1438
- });
1439
- //# sourceMappingURL=index.typings.js.map