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