@wix/auto_sdk_data-backend-public-sdk-poc_data 1.0.32 → 1.0.33

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.
@@ -0,0 +1,1350 @@
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
+ "www.wixgateway.com": [
362
+ {
363
+ srcPath: "/wix-data/v1/items",
364
+ destPath: "/v1/items"
365
+ },
366
+ {
367
+ srcPath: "/wix-data/v1/bulk",
368
+ destPath: "/v1/bulk"
369
+ }
370
+ ],
371
+ "*.dev.wix-code.com": [
372
+ {
373
+ srcPath: "/_api/cloud-data/v2",
374
+ destPath: "/v2"
375
+ }
376
+ ]
377
+ };
378
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
379
+ }
380
+ var PACKAGE_NAME = "@wix/auto_sdk_data-backend-public-sdk-poc_data";
381
+ function insert(payload) {
382
+ function __insert({ host }) {
383
+ const metadata = {
384
+ entityFqdn: "wix.data.v1.data_service",
385
+ method: "POST",
386
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Insert",
387
+ packageName: PACKAGE_NAME,
388
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
389
+ protoPath: "/v1/items",
390
+ data: payload,
391
+ host
392
+ }),
393
+ data: payload
394
+ };
395
+ return metadata;
396
+ }
397
+ return __insert;
398
+ }
399
+ function update(payload) {
400
+ function __update({ host }) {
401
+ const metadata = {
402
+ entityFqdn: "wix.data.v1.data_service",
403
+ method: "PUT",
404
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Update",
405
+ packageName: PACKAGE_NAME,
406
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
407
+ protoPath: "/v1/items/{itemId}",
408
+ data: payload,
409
+ host
410
+ }),
411
+ data: payload
412
+ };
413
+ return metadata;
414
+ }
415
+ return __update;
416
+ }
417
+ function save(payload) {
418
+ function __save({ host }) {
419
+ const metadata = {
420
+ entityFqdn: "wix.data.v1.data_service",
421
+ method: "POST",
422
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Save",
423
+ packageName: PACKAGE_NAME,
424
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
425
+ protoPath: "/v1/items/save",
426
+ data: payload,
427
+ host
428
+ }),
429
+ data: payload
430
+ };
431
+ return metadata;
432
+ }
433
+ return __save;
434
+ }
435
+ function get(payload) {
436
+ function __get({ host }) {
437
+ const metadata = {
438
+ entityFqdn: "wix.data.v1.data_service",
439
+ method: "GET",
440
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Get",
441
+ packageName: PACKAGE_NAME,
442
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
443
+ protoPath: "/v1/items/{itemId}",
444
+ data: payload,
445
+ host
446
+ }),
447
+ params: (0, import_rest_modules.toURLSearchParams)(payload, true)
448
+ };
449
+ return metadata;
450
+ }
451
+ return __get;
452
+ }
453
+ function remove(payload) {
454
+ function __remove({ host }) {
455
+ const metadata = {
456
+ entityFqdn: "wix.data.v1.data_service",
457
+ method: "DELETE",
458
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Remove",
459
+ packageName: PACKAGE_NAME,
460
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
461
+ protoPath: "/v1/items/{itemId}",
462
+ data: payload,
463
+ host
464
+ }),
465
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
466
+ };
467
+ return metadata;
468
+ }
469
+ return __remove;
470
+ }
471
+ function truncate(payload) {
472
+ function __truncate({ host }) {
473
+ const metadata = {
474
+ entityFqdn: "wix.data.v1.data_service",
475
+ method: "POST",
476
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Truncate",
477
+ packageName: PACKAGE_NAME,
478
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
479
+ protoPath: "/v1/items/truncate",
480
+ data: payload,
481
+ host
482
+ }),
483
+ data: payload
484
+ };
485
+ return metadata;
486
+ }
487
+ return __truncate;
488
+ }
489
+ function query(payload) {
490
+ function __query({ host }) {
491
+ const metadata = {
492
+ entityFqdn: "wix.data.v1.data_service",
493
+ method: "POST",
494
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Query",
495
+ packageName: PACKAGE_NAME,
496
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
497
+ protoPath: "/v1/items/query",
498
+ data: payload,
499
+ host
500
+ }),
501
+ data: payload,
502
+ fallback: [
503
+ {
504
+ method: "POST",
505
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
506
+ protoPath: "/v1/items/query",
507
+ data: payload,
508
+ host
509
+ }),
510
+ data: payload
511
+ }
512
+ ]
513
+ };
514
+ return metadata;
515
+ }
516
+ return __query;
517
+ }
518
+ function aggregate(payload) {
519
+ function __aggregate({ host }) {
520
+ const metadata = {
521
+ entityFqdn: "wix.data.v1.data_service",
522
+ method: "POST",
523
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Aggregate",
524
+ packageName: PACKAGE_NAME,
525
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
526
+ protoPath: "/v1/items/aggregate",
527
+ data: payload,
528
+ host
529
+ }),
530
+ data: payload
531
+ };
532
+ return metadata;
533
+ }
534
+ return __aggregate;
535
+ }
536
+ function count(payload) {
537
+ function __count({ host }) {
538
+ const metadata = {
539
+ entityFqdn: "wix.data.v1.data_service",
540
+ method: "POST",
541
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Count",
542
+ packageName: PACKAGE_NAME,
543
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
544
+ protoPath: "/v1/items/count",
545
+ data: payload,
546
+ host
547
+ }),
548
+ data: payload
549
+ };
550
+ return metadata;
551
+ }
552
+ return __count;
553
+ }
554
+ function distinct(payload) {
555
+ function __distinct({ host }) {
556
+ const metadata = {
557
+ entityFqdn: "wix.data.v1.data_service",
558
+ method: "POST",
559
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.Distinct",
560
+ packageName: PACKAGE_NAME,
561
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
562
+ protoPath: "/v1/items/distinct",
563
+ data: payload,
564
+ host
565
+ }),
566
+ data: payload
567
+ };
568
+ return metadata;
569
+ }
570
+ return __distinct;
571
+ }
572
+ function bulkInsert(payload) {
573
+ function __bulkInsert({ host }) {
574
+ const metadata = {
575
+ entityFqdn: "wix.data.v1.data_service",
576
+ method: "POST",
577
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsert",
578
+ packageName: PACKAGE_NAME,
579
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
580
+ protoPath: "/v1/bulk/items/insert",
581
+ data: payload,
582
+ host
583
+ }),
584
+ data: payload
585
+ };
586
+ return metadata;
587
+ }
588
+ return __bulkInsert;
589
+ }
590
+ function bulkSave(payload) {
591
+ function __bulkSave({ host }) {
592
+ const metadata = {
593
+ entityFqdn: "wix.data.v1.data_service",
594
+ method: "POST",
595
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkSave",
596
+ packageName: PACKAGE_NAME,
597
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
598
+ protoPath: "/v1/bulk/items/save",
599
+ data: payload,
600
+ host
601
+ }),
602
+ data: payload
603
+ };
604
+ return metadata;
605
+ }
606
+ return __bulkSave;
607
+ }
608
+ function bulkUpdate(payload) {
609
+ function __bulkUpdate({ host }) {
610
+ const metadata = {
611
+ entityFqdn: "wix.data.v1.data_service",
612
+ method: "POST",
613
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkUpdate",
614
+ packageName: PACKAGE_NAME,
615
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
616
+ protoPath: "/v1/bulk/items/update",
617
+ data: payload,
618
+ host
619
+ }),
620
+ data: payload
621
+ };
622
+ return metadata;
623
+ }
624
+ return __bulkUpdate;
625
+ }
626
+ function bulkRemove(payload) {
627
+ function __bulkRemove({ host }) {
628
+ const metadata = {
629
+ entityFqdn: "wix.data.v1.data_service",
630
+ method: "POST",
631
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemove",
632
+ packageName: PACKAGE_NAME,
633
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
634
+ protoPath: "/v1/bulk/items/remove",
635
+ data: payload,
636
+ host
637
+ }),
638
+ data: payload
639
+ };
640
+ return metadata;
641
+ }
642
+ return __bulkRemove;
643
+ }
644
+ function queryReferenced(payload) {
645
+ function __queryReferenced({ host }) {
646
+ const metadata = {
647
+ entityFqdn: "wix.data.v1.data_service",
648
+ method: "POST",
649
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.QueryReferenced",
650
+ packageName: PACKAGE_NAME,
651
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
652
+ protoPath: "/v1/items/query-referenced",
653
+ data: payload,
654
+ host
655
+ }),
656
+ data: payload
657
+ };
658
+ return metadata;
659
+ }
660
+ return __queryReferenced;
661
+ }
662
+ function bulkInsertReferences(payload) {
663
+ function __bulkInsertReferences({ host }) {
664
+ const metadata = {
665
+ entityFqdn: "wix.data.v1.data_service",
666
+ method: "POST",
667
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsertReferences",
668
+ packageName: PACKAGE_NAME,
669
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
670
+ protoPath: "/v1/bulk/references/insert",
671
+ data: payload,
672
+ host
673
+ }),
674
+ data: payload
675
+ };
676
+ return metadata;
677
+ }
678
+ return __bulkInsertReferences;
679
+ }
680
+ function bulkReplaceReferences(payload) {
681
+ function __bulkReplaceReferences({ host }) {
682
+ const metadata = {
683
+ entityFqdn: "wix.data.v1.data_service",
684
+ method: "POST",
685
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkReplaceReferences",
686
+ packageName: PACKAGE_NAME,
687
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
688
+ protoPath: "/v1/bulk/references/replace",
689
+ data: payload,
690
+ host
691
+ }),
692
+ data: payload
693
+ };
694
+ return metadata;
695
+ }
696
+ return __bulkReplaceReferences;
697
+ }
698
+ function bulkRemoveReferences(payload) {
699
+ function __bulkRemoveReferences({ host }) {
700
+ const metadata = {
701
+ entityFqdn: "wix.data.v1.data_service",
702
+ method: "POST",
703
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemoveReferences",
704
+ packageName: PACKAGE_NAME,
705
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
706
+ protoPath: "/v1/bulk/references/remove",
707
+ data: payload,
708
+ host
709
+ }),
710
+ data: payload
711
+ };
712
+ return metadata;
713
+ }
714
+ return __bulkRemoveReferences;
715
+ }
716
+ function isReferenced(payload) {
717
+ function __isReferenced({ host }) {
718
+ const metadata = {
719
+ entityFqdn: "wix.data.v1.data_service",
720
+ method: "POST",
721
+ methodFqn: "com.wixpress.cloud.data.api.dataservice.WixDataService.IsReferenced",
722
+ packageName: PACKAGE_NAME,
723
+ url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
724
+ protoPath: "/v1/items/is-referenced",
725
+ data: payload,
726
+ host
727
+ }),
728
+ data: payload
729
+ };
730
+ return metadata;
731
+ }
732
+ return __isReferenced;
733
+ }
734
+
735
+ // src/data-v1-data-service-data.universal.ts
736
+ var Segment = /* @__PURE__ */ ((Segment2) => {
737
+ Segment2["LIVE"] = "LIVE";
738
+ Segment2["SANDBOX"] = "SANDBOX";
739
+ Segment2["TRASH_LIVE"] = "TRASH_LIVE";
740
+ return Segment2;
741
+ })(Segment || {});
742
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
743
+ SortOrder2["ASC"] = "ASC";
744
+ SortOrder2["DESC"] = "DESC";
745
+ return SortOrder2;
746
+ })(SortOrder || {});
747
+ var Order = /* @__PURE__ */ ((Order2) => {
748
+ Order2["ASC"] = "ASC";
749
+ Order2["DESC"] = "DESC";
750
+ return Order2;
751
+ })(Order || {});
752
+ async function insert2(options) {
753
+ const { httpClient, sideEffects } = arguments[1];
754
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
755
+ item: options?.item,
756
+ dataCollectionId: options?.dataCollectionId
757
+ });
758
+ const reqOpts = insert(payload);
759
+ sideEffects?.onSiteCall?.();
760
+ try {
761
+ const result = await httpClient.request(reqOpts);
762
+ sideEffects?.onSuccess?.(result);
763
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
764
+ } catch (err) {
765
+ const transformedError = (0, import_transform_error.transformError)(
766
+ err,
767
+ {
768
+ spreadPathsToArguments: {},
769
+ explicitPathsToArguments: {
770
+ item: "$[0].item",
771
+ dataCollectionId: "$[0].dataCollectionId"
772
+ },
773
+ singleArgumentUnchanged: false
774
+ },
775
+ ["options"]
776
+ );
777
+ sideEffects?.onError?.(err);
778
+ throw transformedError;
779
+ }
780
+ }
781
+ async function update2(options) {
782
+ const { httpClient, sideEffects } = arguments[1];
783
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
784
+ item: options?.item,
785
+ dataCollectionId: options?.dataCollectionId
786
+ });
787
+ const reqOpts = update(payload);
788
+ sideEffects?.onSiteCall?.();
789
+ try {
790
+ const result = await httpClient.request(reqOpts);
791
+ sideEffects?.onSuccess?.(result);
792
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
793
+ } catch (err) {
794
+ const transformedError = (0, import_transform_error.transformError)(
795
+ err,
796
+ {
797
+ spreadPathsToArguments: {},
798
+ explicitPathsToArguments: {
799
+ item: "$[0].item",
800
+ dataCollectionId: "$[0].dataCollectionId"
801
+ },
802
+ singleArgumentUnchanged: false
803
+ },
804
+ ["options"]
805
+ );
806
+ sideEffects?.onError?.(err);
807
+ throw transformedError;
808
+ }
809
+ }
810
+ async function save2(options) {
811
+ const { httpClient, sideEffects } = arguments[1];
812
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
813
+ item: options?.item,
814
+ dataCollectionId: options?.dataCollectionId
815
+ });
816
+ const reqOpts = save(payload);
817
+ sideEffects?.onSiteCall?.();
818
+ try {
819
+ const result = await httpClient.request(reqOpts);
820
+ sideEffects?.onSuccess?.(result);
821
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
822
+ } catch (err) {
823
+ const transformedError = (0, import_transform_error.transformError)(
824
+ err,
825
+ {
826
+ spreadPathsToArguments: {},
827
+ explicitPathsToArguments: {
828
+ item: "$[0].item",
829
+ dataCollectionId: "$[0].dataCollectionId"
830
+ },
831
+ singleArgumentUnchanged: false
832
+ },
833
+ ["options"]
834
+ );
835
+ sideEffects?.onError?.(err);
836
+ throw transformedError;
837
+ }
838
+ }
839
+ async function get2(itemId, options) {
840
+ const { httpClient, sideEffects } = arguments[2];
841
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
842
+ itemId,
843
+ dataCollectionId: options?.dataCollectionId
844
+ });
845
+ const reqOpts = get(payload);
846
+ sideEffects?.onSiteCall?.();
847
+ try {
848
+ const result = await httpClient.request(reqOpts);
849
+ sideEffects?.onSuccess?.(result);
850
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
851
+ } catch (err) {
852
+ const transformedError = (0, import_transform_error.transformError)(
853
+ err,
854
+ {
855
+ spreadPathsToArguments: {},
856
+ explicitPathsToArguments: {
857
+ itemId: "$[0]",
858
+ dataCollectionId: "$[1].dataCollectionId"
859
+ },
860
+ singleArgumentUnchanged: false
861
+ },
862
+ ["itemId", "options"]
863
+ );
864
+ sideEffects?.onError?.(err);
865
+ throw transformedError;
866
+ }
867
+ }
868
+ async function remove2(itemId, options) {
869
+ const { httpClient, sideEffects } = arguments[2];
870
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
871
+ itemId,
872
+ dataCollectionId: options?.dataCollectionId
873
+ });
874
+ const reqOpts = remove(payload);
875
+ sideEffects?.onSiteCall?.();
876
+ try {
877
+ const result = await httpClient.request(reqOpts);
878
+ sideEffects?.onSuccess?.(result);
879
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
880
+ } catch (err) {
881
+ const transformedError = (0, import_transform_error.transformError)(
882
+ err,
883
+ {
884
+ spreadPathsToArguments: {},
885
+ explicitPathsToArguments: {
886
+ itemId: "$[0]",
887
+ dataCollectionId: "$[1].dataCollectionId"
888
+ },
889
+ singleArgumentUnchanged: false
890
+ },
891
+ ["itemId", "options"]
892
+ );
893
+ sideEffects?.onError?.(err);
894
+ throw transformedError;
895
+ }
896
+ }
897
+ async function truncate2(options) {
898
+ const { httpClient, sideEffects } = arguments[1];
899
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
900
+ dataCollectionId: options?.dataCollectionId
901
+ });
902
+ const reqOpts = truncate(payload);
903
+ sideEffects?.onSiteCall?.();
904
+ try {
905
+ const result = await httpClient.request(reqOpts);
906
+ sideEffects?.onSuccess?.(result);
907
+ } catch (err) {
908
+ const transformedError = (0, import_transform_error.transformError)(
909
+ err,
910
+ {
911
+ spreadPathsToArguments: {},
912
+ explicitPathsToArguments: { dataCollectionId: "$[0].dataCollectionId" },
913
+ singleArgumentUnchanged: false
914
+ },
915
+ ["options"]
916
+ );
917
+ sideEffects?.onError?.(err);
918
+ throw transformedError;
919
+ }
920
+ }
921
+ async function query2(options) {
922
+ const { httpClient, sideEffects } = arguments[1];
923
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
924
+ dataQuery: options?.dataQuery,
925
+ omitTotalCount: options?.omitTotalCount,
926
+ includeReferencedItems: options?.includeReferencedItems,
927
+ dataCollectionId: options?.dataCollectionId
928
+ });
929
+ const reqOpts = query(payload);
930
+ sideEffects?.onSiteCall?.();
931
+ try {
932
+ const result = await httpClient.request(reqOpts);
933
+ sideEffects?.onSuccess?.(result);
934
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
935
+ } catch (err) {
936
+ const transformedError = (0, import_transform_error.transformError)(
937
+ err,
938
+ {
939
+ spreadPathsToArguments: {},
940
+ explicitPathsToArguments: {
941
+ dataQuery: "$[0].dataQuery",
942
+ omitTotalCount: "$[0].omitTotalCount",
943
+ includeReferencedItems: "$[0].includeReferencedItems",
944
+ dataCollectionId: "$[0].dataCollectionId"
945
+ },
946
+ singleArgumentUnchanged: false
947
+ },
948
+ ["options"]
949
+ );
950
+ sideEffects?.onError?.(err);
951
+ throw transformedError;
952
+ }
953
+ }
954
+ async function aggregate2(options) {
955
+ const { httpClient, sideEffects } = arguments[1];
956
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
957
+ paging: options?.paging,
958
+ initialFilter: options?.initialFilter,
959
+ aggregation: options?.aggregation,
960
+ finalFilter: options?.finalFilter,
961
+ sort: options?.sort,
962
+ dataCollectionId: options?.dataCollectionId
963
+ });
964
+ const reqOpts = aggregate(payload);
965
+ sideEffects?.onSiteCall?.();
966
+ try {
967
+ const result = await httpClient.request(reqOpts);
968
+ sideEffects?.onSuccess?.(result);
969
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
970
+ } catch (err) {
971
+ const transformedError = (0, import_transform_error.transformError)(
972
+ err,
973
+ {
974
+ spreadPathsToArguments: {},
975
+ explicitPathsToArguments: {
976
+ paging: "$[0].paging",
977
+ initialFilter: "$[0].initialFilter",
978
+ aggregation: "$[0].aggregation",
979
+ finalFilter: "$[0].finalFilter",
980
+ sort: "$[0].sort",
981
+ dataCollectionId: "$[0].dataCollectionId"
982
+ },
983
+ singleArgumentUnchanged: false
984
+ },
985
+ ["options"]
986
+ );
987
+ sideEffects?.onError?.(err);
988
+ throw transformedError;
989
+ }
990
+ }
991
+ async function count2(options) {
992
+ const { httpClient, sideEffects } = arguments[1];
993
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
994
+ filter: options?.filter,
995
+ dataCollectionId: options?.dataCollectionId
996
+ });
997
+ const reqOpts = count(payload);
998
+ sideEffects?.onSiteCall?.();
999
+ try {
1000
+ const result = await httpClient.request(reqOpts);
1001
+ sideEffects?.onSuccess?.(result);
1002
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1003
+ } catch (err) {
1004
+ const transformedError = (0, import_transform_error.transformError)(
1005
+ err,
1006
+ {
1007
+ spreadPathsToArguments: {},
1008
+ explicitPathsToArguments: {
1009
+ filter: "$[0].filter",
1010
+ dataCollectionId: "$[0].dataCollectionId"
1011
+ },
1012
+ singleArgumentUnchanged: false
1013
+ },
1014
+ ["options"]
1015
+ );
1016
+ sideEffects?.onError?.(err);
1017
+ throw transformedError;
1018
+ }
1019
+ }
1020
+ async function distinct2(options) {
1021
+ const { httpClient, sideEffects } = arguments[1];
1022
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1023
+ dataQuery: options?.dataQuery,
1024
+ propertyName: options?.propertyName,
1025
+ dataCollectionId: options?.dataCollectionId,
1026
+ omitTotalCount: options?.omitTotalCount
1027
+ });
1028
+ const reqOpts = distinct(payload);
1029
+ sideEffects?.onSiteCall?.();
1030
+ try {
1031
+ const result = await httpClient.request(reqOpts);
1032
+ sideEffects?.onSuccess?.(result);
1033
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1034
+ } catch (err) {
1035
+ const transformedError = (0, import_transform_error.transformError)(
1036
+ err,
1037
+ {
1038
+ spreadPathsToArguments: {},
1039
+ explicitPathsToArguments: {
1040
+ dataQuery: "$[0].dataQuery",
1041
+ propertyName: "$[0].propertyName",
1042
+ dataCollectionId: "$[0].dataCollectionId",
1043
+ omitTotalCount: "$[0].omitTotalCount"
1044
+ },
1045
+ singleArgumentUnchanged: false
1046
+ },
1047
+ ["options"]
1048
+ );
1049
+ sideEffects?.onError?.(err);
1050
+ throw transformedError;
1051
+ }
1052
+ }
1053
+ async function bulkInsert2(options) {
1054
+ const { httpClient, sideEffects } = arguments[1];
1055
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1056
+ items: options?.items,
1057
+ dataCollectionId: options?.dataCollectionId
1058
+ });
1059
+ const reqOpts = bulkInsert(payload);
1060
+ sideEffects?.onSiteCall?.();
1061
+ try {
1062
+ const result = await httpClient.request(reqOpts);
1063
+ sideEffects?.onSuccess?.(result);
1064
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1065
+ } catch (err) {
1066
+ const transformedError = (0, import_transform_error.transformError)(
1067
+ err,
1068
+ {
1069
+ spreadPathsToArguments: {},
1070
+ explicitPathsToArguments: {
1071
+ items: "$[0].items",
1072
+ dataCollectionId: "$[0].dataCollectionId"
1073
+ },
1074
+ singleArgumentUnchanged: false
1075
+ },
1076
+ ["options"]
1077
+ );
1078
+ sideEffects?.onError?.(err);
1079
+ throw transformedError;
1080
+ }
1081
+ }
1082
+ async function bulkSave2(options) {
1083
+ const { httpClient, sideEffects } = arguments[1];
1084
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1085
+ items: options?.items,
1086
+ dataCollectionId: options?.dataCollectionId
1087
+ });
1088
+ const reqOpts = bulkSave(payload);
1089
+ sideEffects?.onSiteCall?.();
1090
+ try {
1091
+ const result = await httpClient.request(reqOpts);
1092
+ sideEffects?.onSuccess?.(result);
1093
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1094
+ } catch (err) {
1095
+ const transformedError = (0, import_transform_error.transformError)(
1096
+ err,
1097
+ {
1098
+ spreadPathsToArguments: {},
1099
+ explicitPathsToArguments: {
1100
+ items: "$[0].items",
1101
+ dataCollectionId: "$[0].dataCollectionId"
1102
+ },
1103
+ singleArgumentUnchanged: false
1104
+ },
1105
+ ["options"]
1106
+ );
1107
+ sideEffects?.onError?.(err);
1108
+ throw transformedError;
1109
+ }
1110
+ }
1111
+ async function bulkUpdate2(options) {
1112
+ const { httpClient, sideEffects } = arguments[1];
1113
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1114
+ items: options?.items,
1115
+ dataCollectionId: options?.dataCollectionId
1116
+ });
1117
+ const reqOpts = bulkUpdate(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
+ items: "$[0].items",
1130
+ dataCollectionId: "$[0].dataCollectionId"
1131
+ },
1132
+ singleArgumentUnchanged: false
1133
+ },
1134
+ ["options"]
1135
+ );
1136
+ sideEffects?.onError?.(err);
1137
+ throw transformedError;
1138
+ }
1139
+ }
1140
+ async function bulkRemove2(options) {
1141
+ const { httpClient, sideEffects } = arguments[1];
1142
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1143
+ entries: options?.entries,
1144
+ dataCollectionId: options?.dataCollectionId
1145
+ });
1146
+ const reqOpts = bulkRemove(payload);
1147
+ sideEffects?.onSiteCall?.();
1148
+ try {
1149
+ const result = await httpClient.request(reqOpts);
1150
+ sideEffects?.onSuccess?.(result);
1151
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1152
+ } catch (err) {
1153
+ const transformedError = (0, import_transform_error.transformError)(
1154
+ err,
1155
+ {
1156
+ spreadPathsToArguments: {},
1157
+ explicitPathsToArguments: {
1158
+ entries: "$[0].entries",
1159
+ dataCollectionId: "$[0].dataCollectionId"
1160
+ },
1161
+ singleArgumentUnchanged: false
1162
+ },
1163
+ ["options"]
1164
+ );
1165
+ sideEffects?.onError?.(err);
1166
+ throw transformedError;
1167
+ }
1168
+ }
1169
+ async function queryReferenced2(options) {
1170
+ const { httpClient, sideEffects } = arguments[1];
1171
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1172
+ referringItemId: options?.referringItemId,
1173
+ propertyName: options?.propertyName,
1174
+ paging: options?.paging,
1175
+ dataCollectionId: options?.dataCollectionId,
1176
+ omitTotalCount: options?.omitTotalCount
1177
+ });
1178
+ const reqOpts = queryReferenced(payload);
1179
+ sideEffects?.onSiteCall?.();
1180
+ try {
1181
+ const result = await httpClient.request(reqOpts);
1182
+ sideEffects?.onSuccess?.(result);
1183
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1184
+ } catch (err) {
1185
+ const transformedError = (0, import_transform_error.transformError)(
1186
+ err,
1187
+ {
1188
+ spreadPathsToArguments: {},
1189
+ explicitPathsToArguments: {
1190
+ referringItemId: "$[0].referringItemId",
1191
+ propertyName: "$[0].propertyName",
1192
+ paging: "$[0].paging",
1193
+ dataCollectionId: "$[0].dataCollectionId",
1194
+ omitTotalCount: "$[0].omitTotalCount"
1195
+ },
1196
+ singleArgumentUnchanged: false
1197
+ },
1198
+ ["options"]
1199
+ );
1200
+ sideEffects?.onError?.(err);
1201
+ throw transformedError;
1202
+ }
1203
+ }
1204
+ async function bulkInsertReferences2(options) {
1205
+ const { httpClient, sideEffects } = arguments[1];
1206
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1207
+ references: options?.references,
1208
+ dataCollectionId: options?.dataCollectionId
1209
+ });
1210
+ const reqOpts = bulkInsertReferences(payload);
1211
+ sideEffects?.onSiteCall?.();
1212
+ try {
1213
+ const result = await httpClient.request(reqOpts);
1214
+ sideEffects?.onSuccess?.(result);
1215
+ } catch (err) {
1216
+ const transformedError = (0, import_transform_error.transformError)(
1217
+ err,
1218
+ {
1219
+ spreadPathsToArguments: {},
1220
+ explicitPathsToArguments: {
1221
+ references: "$[0].references",
1222
+ dataCollectionId: "$[0].dataCollectionId"
1223
+ },
1224
+ singleArgumentUnchanged: false
1225
+ },
1226
+ ["options"]
1227
+ );
1228
+ sideEffects?.onError?.(err);
1229
+ throw transformedError;
1230
+ }
1231
+ }
1232
+ async function bulkReplaceReferences2(options) {
1233
+ const { httpClient, sideEffects } = arguments[1];
1234
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1235
+ propertyName: options?.propertyName,
1236
+ referringItemId: options?.referringItemId,
1237
+ newReferencedItemIds: options?.newReferencedItemIds,
1238
+ dataCollectionId: options?.dataCollectionId
1239
+ });
1240
+ const reqOpts = bulkReplaceReferences(payload);
1241
+ sideEffects?.onSiteCall?.();
1242
+ try {
1243
+ const result = await httpClient.request(reqOpts);
1244
+ sideEffects?.onSuccess?.(result);
1245
+ } catch (err) {
1246
+ const transformedError = (0, import_transform_error.transformError)(
1247
+ err,
1248
+ {
1249
+ spreadPathsToArguments: {},
1250
+ explicitPathsToArguments: {
1251
+ propertyName: "$[0].propertyName",
1252
+ referringItemId: "$[0].referringItemId",
1253
+ newReferencedItemIds: "$[0].newReferencedItemIds",
1254
+ dataCollectionId: "$[0].dataCollectionId"
1255
+ },
1256
+ singleArgumentUnchanged: false
1257
+ },
1258
+ ["options"]
1259
+ );
1260
+ sideEffects?.onError?.(err);
1261
+ throw transformedError;
1262
+ }
1263
+ }
1264
+ async function bulkRemoveReferences2(options) {
1265
+ const { httpClient, sideEffects } = arguments[1];
1266
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1267
+ references: options?.references,
1268
+ dataCollectionId: options?.dataCollectionId
1269
+ });
1270
+ const reqOpts = bulkRemoveReferences(payload);
1271
+ sideEffects?.onSiteCall?.();
1272
+ try {
1273
+ const result = await httpClient.request(reqOpts);
1274
+ sideEffects?.onSuccess?.(result);
1275
+ } catch (err) {
1276
+ const transformedError = (0, import_transform_error.transformError)(
1277
+ err,
1278
+ {
1279
+ spreadPathsToArguments: {},
1280
+ explicitPathsToArguments: {
1281
+ references: "$[0].references",
1282
+ dataCollectionId: "$[0].dataCollectionId"
1283
+ },
1284
+ singleArgumentUnchanged: false
1285
+ },
1286
+ ["options"]
1287
+ );
1288
+ sideEffects?.onError?.(err);
1289
+ throw transformedError;
1290
+ }
1291
+ }
1292
+ async function isReferenced2(options) {
1293
+ const { httpClient, sideEffects } = arguments[1];
1294
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1295
+ propertyName: options?.propertyName,
1296
+ referringItemId: options?.referringItemId,
1297
+ referencedItemId: options?.referencedItemId,
1298
+ dataCollectionId: options?.dataCollectionId
1299
+ });
1300
+ const reqOpts = isReferenced(payload);
1301
+ sideEffects?.onSiteCall?.();
1302
+ try {
1303
+ const result = await httpClient.request(reqOpts);
1304
+ sideEffects?.onSuccess?.(result);
1305
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1306
+ } catch (err) {
1307
+ const transformedError = (0, import_transform_error.transformError)(
1308
+ err,
1309
+ {
1310
+ spreadPathsToArguments: {},
1311
+ explicitPathsToArguments: {
1312
+ propertyName: "$[0].propertyName",
1313
+ referringItemId: "$[0].referringItemId",
1314
+ referencedItemId: "$[0].referencedItemId",
1315
+ dataCollectionId: "$[0].dataCollectionId"
1316
+ },
1317
+ singleArgumentUnchanged: false
1318
+ },
1319
+ ["options"]
1320
+ );
1321
+ sideEffects?.onError?.(err);
1322
+ throw transformedError;
1323
+ }
1324
+ }
1325
+ // Annotate the CommonJS export names for ESM import in node:
1326
+ 0 && (module.exports = {
1327
+ Order,
1328
+ Segment,
1329
+ SortOrder,
1330
+ aggregate,
1331
+ bulkInsert,
1332
+ bulkInsertReferences,
1333
+ bulkRemove,
1334
+ bulkRemoveReferences,
1335
+ bulkReplaceReferences,
1336
+ bulkSave,
1337
+ bulkUpdate,
1338
+ count,
1339
+ distinct,
1340
+ get,
1341
+ insert,
1342
+ isReferenced,
1343
+ query,
1344
+ queryReferenced,
1345
+ remove,
1346
+ save,
1347
+ truncate,
1348
+ update
1349
+ });
1350
+ //# sourceMappingURL=index.typings.js.map