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

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