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

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 (119) hide show
  1. package/build/cjs/{src/data-v1-data-service-data.universal.d.ts → data-v1-data-service-data.universal-DwJ77xKF.d.ts} +91 -104
  2. package/build/cjs/index.d.ts +18 -1
  3. package/build/cjs/index.js +1506 -15
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/meta.d.ts +504 -1
  6. package/build/cjs/meta.js +1090 -15
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/es/{src/data-v1-data-service-data.universal.d.ts → data-v1-data-service-data.universal-DwJ77xKF.d.mts} +91 -104
  9. package/build/es/index.d.mts +18 -0
  10. package/build/es/index.mjs +1464 -0
  11. package/build/es/index.mjs.map +1 -0
  12. package/build/{cjs/src/data-v1-data-service-data.types.d.ts → es/meta.d.mts} +94 -167
  13. package/build/es/meta.mjs +1048 -0
  14. package/build/es/meta.mjs.map +1 -0
  15. package/build/{es/src/data-v1-data-service-data.types.d.ts → internal/cjs/data-v1-data-service-data.universal-B0E_2MN6.d.ts} +284 -72
  16. package/build/internal/cjs/index.d.ts +308 -1
  17. package/build/internal/cjs/index.js +1506 -15
  18. package/build/internal/cjs/index.js.map +1 -1
  19. package/build/internal/cjs/meta.d.ts +504 -1
  20. package/build/internal/cjs/meta.js +1090 -15
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/internal/es/data-v1-data-service-data.universal-B0E_2MN6.d.mts +789 -0
  23. package/build/internal/es/{src/data-v1-data-service-data.public.d.ts → index.d.mts} +63 -25
  24. package/build/internal/es/index.mjs +1464 -0
  25. package/build/internal/es/index.mjs.map +1 -0
  26. package/build/internal/{cjs/src/data-v1-data-service-data.types.d.ts → es/meta.d.mts} +94 -167
  27. package/build/internal/es/meta.mjs +1048 -0
  28. package/build/internal/es/meta.mjs.map +1 -0
  29. package/package.json +9 -8
  30. package/build/cjs/index.typings.d.ts +0 -1
  31. package/build/cjs/index.typings.js +0 -18
  32. package/build/cjs/index.typings.js.map +0 -1
  33. package/build/cjs/src/data-v1-data-service-data.context.d.ts +0 -5
  34. package/build/cjs/src/data-v1-data-service-data.context.js +0 -47
  35. package/build/cjs/src/data-v1-data-service-data.context.js.map +0 -1
  36. package/build/cjs/src/data-v1-data-service-data.http.d.ts +0 -188
  37. package/build/cjs/src/data-v1-data-service-data.http.js +0 -872
  38. package/build/cjs/src/data-v1-data-service-data.http.js.map +0 -1
  39. package/build/cjs/src/data-v1-data-service-data.meta.d.ts +0 -37
  40. package/build/cjs/src/data-v1-data-service-data.meta.js +0 -389
  41. package/build/cjs/src/data-v1-data-service-data.meta.js.map +0 -1
  42. package/build/cjs/src/data-v1-data-service-data.public.d.ts +0 -16
  43. package/build/cjs/src/data-v1-data-service-data.public.js +0 -142
  44. package/build/cjs/src/data-v1-data-service-data.public.js.map +0 -1
  45. package/build/cjs/src/data-v1-data-service-data.types.js +0 -23
  46. package/build/cjs/src/data-v1-data-service-data.types.js.map +0 -1
  47. package/build/cjs/src/data-v1-data-service-data.universal.js +0 -930
  48. package/build/cjs/src/data-v1-data-service-data.universal.js.map +0 -1
  49. package/build/es/index.d.ts +0 -1
  50. package/build/es/index.js +0 -2
  51. package/build/es/index.js.map +0 -1
  52. package/build/es/index.typings.d.ts +0 -1
  53. package/build/es/index.typings.js +0 -2
  54. package/build/es/index.typings.js.map +0 -1
  55. package/build/es/meta.d.ts +0 -1
  56. package/build/es/meta.js +0 -2
  57. package/build/es/meta.js.map +0 -1
  58. package/build/es/src/data-v1-data-service-data.context.d.ts +0 -5
  59. package/build/es/src/data-v1-data-service-data.context.js +0 -41
  60. package/build/es/src/data-v1-data-service-data.context.js.map +0 -1
  61. package/build/es/src/data-v1-data-service-data.http.d.ts +0 -188
  62. package/build/es/src/data-v1-data-service-data.http.js +0 -850
  63. package/build/es/src/data-v1-data-service-data.http.js.map +0 -1
  64. package/build/es/src/data-v1-data-service-data.meta.d.ts +0 -37
  65. package/build/es/src/data-v1-data-service-data.meta.js +0 -344
  66. package/build/es/src/data-v1-data-service-data.meta.js.map +0 -1
  67. package/build/es/src/data-v1-data-service-data.public.d.ts +0 -16
  68. package/build/es/src/data-v1-data-service-data.public.js +0 -117
  69. package/build/es/src/data-v1-data-service-data.public.js.map +0 -1
  70. package/build/es/src/data-v1-data-service-data.types.js +0 -20
  71. package/build/es/src/data-v1-data-service-data.types.js.map +0 -1
  72. package/build/es/src/data-v1-data-service-data.universal.js +0 -885
  73. package/build/es/src/data-v1-data-service-data.universal.js.map +0 -1
  74. package/build/internal/cjs/index.typings.d.ts +0 -1
  75. package/build/internal/cjs/index.typings.js +0 -18
  76. package/build/internal/cjs/index.typings.js.map +0 -1
  77. package/build/internal/cjs/src/data-v1-data-service-data.context.d.ts +0 -41
  78. package/build/internal/cjs/src/data-v1-data-service-data.context.js +0 -47
  79. package/build/internal/cjs/src/data-v1-data-service-data.context.js.map +0 -1
  80. package/build/internal/cjs/src/data-v1-data-service-data.http.d.ts +0 -188
  81. package/build/internal/cjs/src/data-v1-data-service-data.http.js +0 -872
  82. package/build/internal/cjs/src/data-v1-data-service-data.http.js.map +0 -1
  83. package/build/internal/cjs/src/data-v1-data-service-data.meta.d.ts +0 -37
  84. package/build/internal/cjs/src/data-v1-data-service-data.meta.js +0 -389
  85. package/build/internal/cjs/src/data-v1-data-service-data.meta.js.map +0 -1
  86. package/build/internal/cjs/src/data-v1-data-service-data.public.d.ts +0 -270
  87. package/build/internal/cjs/src/data-v1-data-service-data.public.js +0 -142
  88. package/build/internal/cjs/src/data-v1-data-service-data.public.js.map +0 -1
  89. package/build/internal/cjs/src/data-v1-data-service-data.types.js +0 -23
  90. package/build/internal/cjs/src/data-v1-data-service-data.types.js.map +0 -1
  91. package/build/internal/cjs/src/data-v1-data-service-data.universal.d.ts +0 -1136
  92. package/build/internal/cjs/src/data-v1-data-service-data.universal.js +0 -930
  93. package/build/internal/cjs/src/data-v1-data-service-data.universal.js.map +0 -1
  94. package/build/internal/es/index.d.ts +0 -1
  95. package/build/internal/es/index.js +0 -2
  96. package/build/internal/es/index.js.map +0 -1
  97. package/build/internal/es/index.typings.d.ts +0 -1
  98. package/build/internal/es/index.typings.js +0 -2
  99. package/build/internal/es/index.typings.js.map +0 -1
  100. package/build/internal/es/meta.d.ts +0 -1
  101. package/build/internal/es/meta.js +0 -2
  102. package/build/internal/es/meta.js.map +0 -1
  103. package/build/internal/es/src/data-v1-data-service-data.context.d.ts +0 -41
  104. package/build/internal/es/src/data-v1-data-service-data.context.js +0 -41
  105. package/build/internal/es/src/data-v1-data-service-data.context.js.map +0 -1
  106. package/build/internal/es/src/data-v1-data-service-data.http.d.ts +0 -188
  107. package/build/internal/es/src/data-v1-data-service-data.http.js +0 -850
  108. package/build/internal/es/src/data-v1-data-service-data.http.js.map +0 -1
  109. package/build/internal/es/src/data-v1-data-service-data.meta.d.ts +0 -37
  110. package/build/internal/es/src/data-v1-data-service-data.meta.js +0 -344
  111. package/build/internal/es/src/data-v1-data-service-data.meta.js.map +0 -1
  112. package/build/internal/es/src/data-v1-data-service-data.public.js +0 -117
  113. package/build/internal/es/src/data-v1-data-service-data.public.js.map +0 -1
  114. package/build/internal/es/src/data-v1-data-service-data.types.d.ts +0 -577
  115. package/build/internal/es/src/data-v1-data-service-data.types.js +0 -20
  116. package/build/internal/es/src/data-v1-data-service-data.types.js.map +0 -1
  117. package/build/internal/es/src/data-v1-data-service-data.universal.d.ts +0 -1136
  118. package/build/internal/es/src/data-v1-data-service-data.universal.js +0 -885
  119. package/build/internal/es/src/data-v1-data-service-data.universal.js.map +0 -1
@@ -1,872 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isReferenced = exports.bulkRemoveReferences = exports.bulkReplaceReferences = exports.bulkInsertReferences = exports.queryReferenced = exports.bulkRemove = exports.bulkUpdate = exports.bulkSave = exports.bulkInsert = exports.distinct = exports.count = exports.aggregate = exports.query = exports.truncate = exports.remove = exports.get = exports.save = exports.update = exports.insert = void 0;
4
- const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
5
- const rest_modules_2 = require("@wix/sdk-runtime/rest-modules");
6
- function resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl(opts) {
7
- const domainToMappings = {
8
- 'api._api_base_domain_': [
9
- {
10
- srcPath: '/cloud-data',
11
- destPath: '',
12
- },
13
- ],
14
- 'code._base_domain_': [
15
- {
16
- srcPath: '/_api/cloud-data/v1/data-settings',
17
- destPath: '/v1/data-settings',
18
- },
19
- {
20
- srcPath: '/_api/cloud-data/v1/schemas',
21
- destPath: '/v1/schemas',
22
- },
23
- {
24
- srcPath: '/_api/cloud-data/v1/connector',
25
- destPath: '/v1/connector',
26
- },
27
- {
28
- srcPath: '/_api/data/v1/data-settings',
29
- destPath: '/v1/data-settings',
30
- },
31
- {
32
- srcPath: '/_api/data/v1/schemas',
33
- destPath: '/v1/schemas',
34
- },
35
- {
36
- srcPath: '/_api/data/v1/connector',
37
- destPath: '/v1/connector',
38
- },
39
- {
40
- srcPath: '/_api/cloud-data/v1/wix-data',
41
- destPath: '/v1/wix-data',
42
- },
43
- ],
44
- 'cloud-data.wix-code.com': [
45
- {
46
- srcPath: '',
47
- destPath: '',
48
- },
49
- ],
50
- _: [
51
- {
52
- srcPath: '/_api/cloud-data',
53
- destPath: '',
54
- },
55
- ],
56
- 'www._base_domain_': [
57
- {
58
- srcPath: '/_api/cloud-data',
59
- destPath: '',
60
- },
61
- {
62
- srcPath: '/_api/data',
63
- destPath: '',
64
- },
65
- {
66
- srcPath: '/_api/cloud-data',
67
- destPath: '',
68
- },
69
- ],
70
- 'dev._base_domain_': [
71
- {
72
- srcPath: '/_api/cloud-data',
73
- destPath: '',
74
- },
75
- ],
76
- 'bo._base_domain_': [
77
- {
78
- srcPath: '/_api/cloud-data/v1',
79
- destPath: '/v1',
80
- },
81
- {
82
- srcPath: '/_api/cloud-data/v2',
83
- destPath: '/v2',
84
- },
85
- ],
86
- 'wixbo.ai': [
87
- {
88
- srcPath: '/_api/cloud-data/v1',
89
- destPath: '/v1',
90
- },
91
- {
92
- srcPath: '/_api/cloud-data/v2',
93
- destPath: '/v2',
94
- },
95
- ],
96
- 'wix-bo.com': [
97
- {
98
- srcPath: '/_api/cloud-data/v1',
99
- destPath: '/v1',
100
- },
101
- {
102
- srcPath: '/_api/cloud-data/v2',
103
- destPath: '/v2',
104
- },
105
- ],
106
- 'manage._base_domain_': [
107
- {
108
- srcPath: '/_api/cloud-data',
109
- destPath: '',
110
- },
111
- {
112
- srcPath: '/_api/data',
113
- destPath: '',
114
- },
115
- {
116
- srcPath: '/_api/cloud-data',
117
- destPath: '',
118
- },
119
- ],
120
- 'editor._base_domain_': [
121
- {
122
- srcPath: '/_api/cloud-data/v1/schemas',
123
- destPath: '/v1/schemas',
124
- },
125
- {
126
- srcPath: '/_api/cloud-data/dbs/tasks',
127
- destPath: '/dbs/tasks',
128
- },
129
- {
130
- srcPath: '/_api/data/v1/schemas',
131
- destPath: '/v1/schemas',
132
- },
133
- {
134
- srcPath: '/_api/data/dbs/tasks',
135
- destPath: '/dbs/tasks',
136
- },
137
- {
138
- srcPath: '/_api/cloud-data/v1/wix-data',
139
- destPath: '/v1/wix-data',
140
- },
141
- {
142
- srcPath: '/_api/cloud-data/v1/data-settings',
143
- destPath: '/v1/data-settings',
144
- },
145
- {
146
- srcPath: '/_api/data/v2/indexes',
147
- destPath: '/v2/indexes',
148
- },
149
- {
150
- srcPath: '/_api/cloud-data/v1/external-database-connections',
151
- destPath: '/v1/external-database-connections',
152
- },
153
- {
154
- srcPath: '/_api/data/v1/data-collection-sharing',
155
- destPath: '/v1/data-collection-sharing',
156
- },
157
- {
158
- srcPath: '/_api/cloud-data/v2/collections',
159
- destPath: '/v2/collections',
160
- },
161
- {
162
- srcPath: '/_api/cloud-data/v2/bulk',
163
- destPath: '/v2/bulk',
164
- },
165
- {
166
- srcPath: '/_api/cloud-data/v2/items',
167
- destPath: '/v2/items',
168
- },
169
- {
170
- srcPath: '/_api/cloud-data/v2/dbs/tasks',
171
- destPath: '/v2/dbs/tasks',
172
- },
173
- ],
174
- 'blocks._base_domain_': [
175
- {
176
- srcPath: '/_api/cloud-data/v1/schemas',
177
- destPath: '/v1/schemas',
178
- },
179
- {
180
- srcPath: '/_api/cloud-data/dbs/tasks',
181
- destPath: '/dbs/tasks',
182
- },
183
- {
184
- srcPath: '/_api/data/v1/schemas',
185
- destPath: '/v1/schemas',
186
- },
187
- {
188
- srcPath: '/_api/data/dbs/tasks',
189
- destPath: '/dbs/tasks',
190
- },
191
- {
192
- srcPath: '/_api/cloud-data/v1/wix-data',
193
- destPath: '/v1/wix-data',
194
- },
195
- {
196
- srcPath: '/_api/cloud-data/v1/data-settings',
197
- destPath: '/v1/data-settings',
198
- },
199
- {
200
- srcPath: '/_api/data/v2/indexes',
201
- destPath: '/v2/indexes',
202
- },
203
- {
204
- srcPath: '/_api/cloud-data/v1/external-database-connections',
205
- destPath: '/v1/external-database-connections',
206
- },
207
- {
208
- srcPath: '/_api/data/v1/data-collection-sharing',
209
- destPath: '/v1/data-collection-sharing',
210
- },
211
- {
212
- srcPath: '/_api/cloud-data/v2/collections',
213
- destPath: '/v2/collections',
214
- },
215
- {
216
- srcPath: '/_api/cloud-data/v2/bulk',
217
- destPath: '/v2/bulk',
218
- },
219
- {
220
- srcPath: '/_api/cloud-data/v2/items',
221
- destPath: '/v2/items',
222
- },
223
- {
224
- srcPath: '/_api/cloud-data/v2/dbs/tasks',
225
- destPath: '/v2/dbs/tasks',
226
- },
227
- ],
228
- 'create.editorx': [
229
- {
230
- srcPath: '/_api/cloud-data/v1/schemas',
231
- destPath: '/v1/schemas',
232
- },
233
- {
234
- srcPath: '/_api/cloud-data/dbs/tasks',
235
- destPath: '/dbs/tasks',
236
- },
237
- {
238
- srcPath: '/_api/data/v1/schemas',
239
- destPath: '/v1/schemas',
240
- },
241
- {
242
- srcPath: '/_api/data/dbs/tasks',
243
- destPath: '/dbs/tasks',
244
- },
245
- {
246
- srcPath: '/_api/cloud-data/v1/wix-data',
247
- destPath: '/v1/wix-data',
248
- },
249
- {
250
- srcPath: '/_api/cloud-data/v1/data-settings',
251
- destPath: '/v1/data-settings',
252
- },
253
- {
254
- srcPath: '/_api/data/v2/indexes',
255
- destPath: '/v2/indexes',
256
- },
257
- {
258
- srcPath: '/_api/cloud-data/v1/external-database-connections',
259
- destPath: '/v1/external-database-connections',
260
- },
261
- {
262
- srcPath: '/_api/data/v1/data-collection-sharing',
263
- destPath: '/v1/data-collection-sharing',
264
- },
265
- {
266
- srcPath: '/_api/cloud-data/v2/collections',
267
- destPath: '/v2/collections',
268
- },
269
- {
270
- srcPath: '/_api/cloud-data/v2/bulk',
271
- destPath: '/v2/bulk',
272
- },
273
- {
274
- srcPath: '/_api/cloud-data/v2/items',
275
- destPath: '/v2/items',
276
- },
277
- {
278
- srcPath: '/_api/cloud-data/v2/dbs/tasks',
279
- destPath: '/v2/dbs/tasks',
280
- },
281
- ],
282
- 'www.wixapis.com': [
283
- {
284
- srcPath: '/wix-data/v1/collections',
285
- destPath: '/v1/wix-data/collections',
286
- },
287
- {
288
- srcPath: '/wix-data/v1/external-database-connections',
289
- destPath: '/v1/external-database-connections',
290
- },
291
- {
292
- srcPath: '/wix-data/v2/indexes',
293
- destPath: '/v2/indexes',
294
- },
295
- {
296
- srcPath: '/wix-data/v1/items',
297
- destPath: '/v1/items',
298
- },
299
- {
300
- srcPath: '/wix-data/v1/bulk',
301
- destPath: '/v1/bulk',
302
- },
303
- {
304
- srcPath: '/wix-data/v1/external-databases',
305
- destPath: '/v1/external-databases',
306
- },
307
- {
308
- srcPath: '/wix-data/v2',
309
- destPath: '/v2',
310
- },
311
- ],
312
- 'www.wixgateway.com': [
313
- {
314
- srcPath: '/wix-data/v1/items',
315
- destPath: '/v1/items',
316
- },
317
- {
318
- srcPath: '/wix-data/v1/bulk',
319
- destPath: '/v1/bulk',
320
- },
321
- ],
322
- '*.dev.wix-code.com': [
323
- {
324
- srcPath: '/_api/cloud-data/v2',
325
- destPath: '/v2',
326
- },
327
- ],
328
- };
329
- return (0, rest_modules_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
330
- }
331
- const PACKAGE_NAME = '@wix/auto_sdk_data-backend-public-sdk-poc_data';
332
- /**
333
- * Adds an item to a collection.
334
- *
335
- * When an item is inserted into a collection, the following properties and values are added to it:
336
- * * `_id`: A unique identifier for an item in a collection. You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.
337
- * * `_createdDate`: The date the item was added to the collection.
338
- * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
339
- * @deprecated Will be removed on 2025-06-01.
340
- */
341
- function insert(payload) {
342
- function __insert({ host }) {
343
- const metadata = {
344
- entityFqdn: 'wix.data.v1.data_service',
345
- method: 'POST',
346
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Insert',
347
- packageName: PACKAGE_NAME,
348
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
349
- protoPath: '/v1/items',
350
- data: payload,
351
- host,
352
- }),
353
- data: payload,
354
- };
355
- return metadata;
356
- }
357
- return __insert;
358
- }
359
- exports.insert = insert;
360
- /**
361
- * Updates an item in a collection.
362
- *
363
- * An item ID must be submitted as part of the request, either as a path parameter or within the `item` body parameter. If an item is found in the specified collection with
364
- * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the request fails.
365
- *
366
- * When an item is updated, its `_updatedDate` property is changed to the current date.
367
- *
368
- * **Note:**
369
- * After an item is updated, it only contains the properties included in the Update Data Item request. If the existing item has properties with values and those properties
370
- * aren't included in the updated item, their values are lost.
371
- * @deprecated Will be removed on 2025-06-01.
372
- */
373
- function update(payload) {
374
- function __update({ host }) {
375
- const metadata = {
376
- entityFqdn: 'wix.data.v1.data_service',
377
- method: 'PUT',
378
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Update',
379
- packageName: PACKAGE_NAME,
380
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
381
- protoPath: '/v1/items/{itemId}',
382
- data: payload,
383
- host,
384
- }),
385
- data: payload,
386
- };
387
- return metadata;
388
- }
389
- return __update;
390
- }
391
- exports.update = update;
392
- /**
393
- * Inserts or updates an item in a collection.
394
- *
395
- * The Save Data Item endpoint inserts or updates the specified item, depending on whether it already exists in the collection.
396
- *
397
- * * If you don't provide an ID, a new item is created.
398
- *
399
- * * If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
400
- *
401
- * * If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `_updatedDate` property is changed to the current date.
402
- *
403
- * ***Note:*** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID.
404
- * This means that all of the item's previous properties and values are lost.
405
- * @deprecated Will be removed on 2025-06-01.
406
- */
407
- function save(payload) {
408
- function __save({ host }) {
409
- const metadata = {
410
- entityFqdn: 'wix.data.v1.data_service',
411
- method: 'POST',
412
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Save',
413
- packageName: PACKAGE_NAME,
414
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
415
- protoPath: '/v1/items/save',
416
- data: payload,
417
- host,
418
- }),
419
- data: payload,
420
- };
421
- return metadata;
422
- }
423
- return __save;
424
- }
425
- exports.save = save;
426
- /**
427
- * Retrieves an item from a collection.
428
- * @deprecated Will be removed on 2025-06-01.
429
- */
430
- function get(payload) {
431
- function __get({ host }) {
432
- const metadata = {
433
- entityFqdn: 'wix.data.v1.data_service',
434
- method: 'GET',
435
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Get',
436
- packageName: PACKAGE_NAME,
437
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
438
- protoPath: '/v1/items/{itemId}',
439
- data: payload,
440
- host,
441
- }),
442
- params: (0, rest_modules_1.toURLSearchParams)(payload, true),
443
- };
444
- return metadata;
445
- }
446
- return __get;
447
- }
448
- exports.get = get;
449
- /**
450
- * Removes an item from a collection.
451
- *
452
- * If any items in other collections reference the removed item in a reference or multi-reference field, the field is cleared.
453
- *
454
- * **Note:**
455
- * Once an item has been removed from a collection, it can't be restored.
456
- * @deprecated Will be removed on 2025-06-01.
457
- */
458
- function remove(payload) {
459
- function __remove({ host }) {
460
- const metadata = {
461
- entityFqdn: 'wix.data.v1.data_service',
462
- method: 'DELETE',
463
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Remove',
464
- packageName: PACKAGE_NAME,
465
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
466
- protoPath: '/v1/items/{itemId}',
467
- data: payload,
468
- host,
469
- }),
470
- params: (0, rest_modules_1.toURLSearchParams)(payload),
471
- };
472
- return metadata;
473
- }
474
- return __remove;
475
- }
476
- exports.remove = remove;
477
- /**
478
- * Removes all items from a collection. Site owner (`ADMIN`) permissions are required in order to invoke this operation.
479
- *
480
- * If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
481
- *
482
- * **Note:**
483
- * Once items have been removed from a collection, they can't be restored.
484
- * @deprecated Will be removed on 2025-06-01.
485
- */
486
- function truncate(payload) {
487
- function __truncate({ host }) {
488
- const metadata = {
489
- entityFqdn: 'wix.data.v1.data_service',
490
- method: 'POST',
491
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Truncate',
492
- packageName: PACKAGE_NAME,
493
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
494
- protoPath: '/v1/items/truncate',
495
- data: payload,
496
- host,
497
- }),
498
- data: payload,
499
- };
500
- return metadata;
501
- }
502
- return __truncate;
503
- }
504
- exports.truncate = truncate;
505
- /**
506
- * Retrieves a list of items, on the basis of the filtering, sorting, and paging preferences you provide.
507
- *
508
- * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
509
- * @deprecated Will be removed on 2025-06-01.
510
- */
511
- function query(payload) {
512
- function __query({ host }) {
513
- const metadata = {
514
- entityFqdn: 'wix.data.v1.data_service',
515
- method: 'POST',
516
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Query',
517
- packageName: PACKAGE_NAME,
518
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
519
- protoPath: '/v1/items/query',
520
- data: payload,
521
- host,
522
- }),
523
- data: payload,
524
- fallback: [
525
- {
526
- method: 'POST',
527
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
528
- protoPath: '/v1/items/query',
529
- data: payload,
530
- host,
531
- }),
532
- data: payload,
533
- },
534
- ],
535
- };
536
- return metadata;
537
- }
538
- return __query;
539
- }
540
- exports.query = query;
541
- /** @deprecated Will be removed on 2025-06-01. */
542
- function aggregate(payload) {
543
- function __aggregate({ host }) {
544
- const metadata = {
545
- entityFqdn: 'wix.data.v1.data_service',
546
- method: 'POST',
547
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Aggregate',
548
- packageName: PACKAGE_NAME,
549
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
550
- protoPath: '/v1/items/aggregate',
551
- data: payload,
552
- host,
553
- }),
554
- data: payload,
555
- };
556
- return metadata;
557
- }
558
- return __aggregate;
559
- }
560
- exports.aggregate = aggregate;
561
- /**
562
- * Returns the number of items in a collection that match a query.
563
- * @deprecated Will be removed on 2025-06-01.
564
- */
565
- function count(payload) {
566
- function __count({ host }) {
567
- const metadata = {
568
- entityFqdn: 'wix.data.v1.data_service',
569
- method: 'POST',
570
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Count',
571
- packageName: PACKAGE_NAME,
572
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
573
- protoPath: '/v1/items/count',
574
- data: payload,
575
- host,
576
- }),
577
- data: payload,
578
- };
579
- return metadata;
580
- }
581
- return __count;
582
- }
583
- exports.count = count;
584
- /**
585
- * Retrieves a list of distinct values for a given property in all items that match a query, without duplicates.
586
- *
587
- * As with the [Query Data Items]() endpoint, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
588
- * However, the Query Distinct Values endpoint doesn't return all of the full items that match the query.
589
- * Rather, it returns all unique values of the property you specify in `propertyName` for items that match the query.
590
- * If more than one item has the same value for that property, that value appears only once.
591
- *
592
- * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
593
- * @deprecated Will be removed on 2025-06-01.
594
- */
595
- function distinct(payload) {
596
- function __distinct({ host }) {
597
- const metadata = {
598
- entityFqdn: 'wix.data.v1.data_service',
599
- method: 'POST',
600
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Distinct',
601
- packageName: PACKAGE_NAME,
602
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
603
- protoPath: '/v1/items/distinct',
604
- data: payload,
605
- host,
606
- }),
607
- data: payload,
608
- };
609
- return metadata;
610
- }
611
- return __distinct;
612
- }
613
- exports.distinct = distinct;
614
- /**
615
- * Adds multiple items to a collection.
616
- *
617
- * When each item is inserted into a collection, the following properties and values are added to it:
618
- * * `_id`: A unique identifier for an item in a collection. You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.
619
- * * `_createdDate`: The date the item was added to the collection.
620
- * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
621
- *
622
- * The endpoint returns a list of the IDs of items successfully inserted in `insertedItemIds`.
623
- * When any items can't be inserted, error details are provided for each failed item in `errors`.
624
- * @deprecated Will be removed on 2025-06-01.
625
- */
626
- function bulkInsert(payload) {
627
- function __bulkInsert({ host }) {
628
- const metadata = {
629
- entityFqdn: 'wix.data.v1.data_service',
630
- method: 'POST',
631
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsert',
632
- packageName: PACKAGE_NAME,
633
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
634
- protoPath: '/v1/bulk/items/insert',
635
- data: payload,
636
- host,
637
- }),
638
- data: payload,
639
- };
640
- return metadata;
641
- }
642
- return __bulkInsert;
643
- }
644
- exports.bulkInsert = bulkInsert;
645
- /**
646
- * Inserts or updates multiple items in a collection.
647
- *
648
- * The Bulk Save Data Items endpoint inserts or updates each item, depending on whether it already exists in the collection. For each item:
649
- *
650
- * * If you don't provide an ID, a new item is created.
651
- *
652
- * * If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
653
- *
654
- * * If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `_updatedDate` property is changed to the current date.
655
- *
656
- * The endpoint returns a list of the IDs of items successfully inserted in `insertedItemIds` and a list of the IDs of items successfully updated in `updatedItemIds`.
657
- * When any items can't be inserted or updated, error details are provided for each failed item in `errors`.
658
- *
659
- * ***Note:*** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID.
660
- * This means that all of the item's previous properties and values are lost.
661
- * @deprecated Will be removed on 2025-06-01.
662
- */
663
- function bulkSave(payload) {
664
- function __bulkSave({ host }) {
665
- const metadata = {
666
- entityFqdn: 'wix.data.v1.data_service',
667
- method: 'POST',
668
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkSave',
669
- packageName: PACKAGE_NAME,
670
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
671
- protoPath: '/v1/bulk/items/save',
672
- data: payload,
673
- host,
674
- }),
675
- data: payload,
676
- };
677
- return metadata;
678
- }
679
- return __bulkSave;
680
- }
681
- exports.bulkSave = bulkSave;
682
- /**
683
- * Updates multiple items in a collection.
684
- *
685
- * Each item in the request must include an ID. If an item is found in the specified collection with
686
- * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.
687
- *
688
- * When an item is updated, its `_updatedDate` property is changed to the current date.
689
- *
690
- * The endpoint returns a list of the IDs of items successfully updated in `updatedItemIds`.
691
- * When any items can't be inserted, error details are provided for each failed item in `errors`.
692
- *
693
- * **Note:**
694
- * After each item is updated, it only contains the properties included in the Update Data Item request. If the existing item has properties with values and those properties
695
- * aren't included in the updated item, their values are lost.
696
- * @deprecated Will be removed on 2025-06-01.
697
- */
698
- function bulkUpdate(payload) {
699
- function __bulkUpdate({ host }) {
700
- const metadata = {
701
- entityFqdn: 'wix.data.v1.data_service',
702
- method: 'POST',
703
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkUpdate',
704
- packageName: PACKAGE_NAME,
705
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
706
- protoPath: '/v1/bulk/items/update',
707
- data: payload,
708
- host,
709
- }),
710
- data: payload,
711
- };
712
- return metadata;
713
- }
714
- return __bulkUpdate;
715
- }
716
- exports.bulkUpdate = bulkUpdate;
717
- /**
718
- * Removes multiple items from a collection.
719
- *
720
- * If any items in other collections reference the removed items in reference or multi-reference fields, the fields are cleared.
721
- *
722
- * The endpoint returns a list of the IDs of items successfully removed in `removedItemIds`.
723
- * When any items can't be removed, error details are provided for each failed item in `errors`.
724
- *
725
- * **Note:** Once an item has been removed from a collection, it can't be restored.
726
- * @deprecated Will be removed on 2025-06-01.
727
- */
728
- function bulkRemove(payload) {
729
- function __bulkRemove({ host }) {
730
- const metadata = {
731
- entityFqdn: 'wix.data.v1.data_service',
732
- method: 'POST',
733
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemove',
734
- packageName: PACKAGE_NAME,
735
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
736
- protoPath: '/v1/bulk/items/remove',
737
- data: payload,
738
- host,
739
- }),
740
- data: payload,
741
- };
742
- return metadata;
743
- }
744
- return __bulkRemove;
745
- }
746
- exports.bulkRemove = bulkRemove;
747
- /**
748
- * Gets the full items referenced in the specified property of an item.
749
- *
750
- * For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.
751
- * Querying the **Movies** collection using the Query Referenced Data Items endpoint returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
752
- * This gives you information from the **People** collection about each of the actors in the specified movie.
753
- * @deprecated Will be removed on 2025-06-01.
754
- */
755
- function queryReferenced(payload) {
756
- function __queryReferenced({ host }) {
757
- const metadata = {
758
- entityFqdn: 'wix.data.v1.data_service',
759
- method: 'POST',
760
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.QueryReferenced',
761
- packageName: PACKAGE_NAME,
762
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
763
- protoPath: '/v1/items/query-referenced',
764
- data: payload,
765
- host,
766
- }),
767
- data: payload,
768
- };
769
- return metadata;
770
- }
771
- return __queryReferenced;
772
- }
773
- exports.queryReferenced = queryReferenced;
774
- /**
775
- * Inserts one or more references in the specified properties of items in a collection.
776
- *
777
- * The Bulk Insert References endpoint adds one or more references to a collection.
778
- * Each new reference in the `references` field specifies a referring item's ID, the property in which to insert the reference, and the ID of the referenced item.
779
- * @deprecated Will be removed on 2025-06-01.
780
- */
781
- function bulkInsertReferences(payload) {
782
- function __bulkInsertReferences({ host }) {
783
- const metadata = {
784
- entityFqdn: 'wix.data.v1.data_service',
785
- method: 'POST',
786
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsertReferences',
787
- packageName: PACKAGE_NAME,
788
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
789
- protoPath: '/v1/bulk/references/insert',
790
- data: payload,
791
- host,
792
- }),
793
- data: payload,
794
- };
795
- return metadata;
796
- }
797
- return __bulkInsertReferences;
798
- }
799
- exports.bulkInsertReferences = bulkInsertReferences;
800
- /**
801
- * Replaces references in a specified property of a specified data item.
802
- *
803
- * The Bulk Replace References endpoint replaces the existing reference or references contained in the property specified in `propertyName` within the data item specified in `referringItemId`.
804
- * The endpoint removes existing references and in their place it adds references to the items specified in `newReferencedItemIds`.
805
- * @deprecated Will be removed on 2025-06-01.
806
- */
807
- function bulkReplaceReferences(payload) {
808
- function __bulkReplaceReferences({ host }) {
809
- const metadata = {
810
- entityFqdn: 'wix.data.v1.data_service',
811
- method: 'POST',
812
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkReplaceReferences',
813
- packageName: PACKAGE_NAME,
814
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
815
- protoPath: '/v1/bulk/references/replace',
816
- data: payload,
817
- host,
818
- }),
819
- data: payload,
820
- };
821
- return metadata;
822
- }
823
- return __bulkReplaceReferences;
824
- }
825
- exports.bulkReplaceReferences = bulkReplaceReferences;
826
- /**
827
- * Removes one or more references.
828
- * @deprecated Will be removed on 2025-06-01.
829
- */
830
- function bulkRemoveReferences(payload) {
831
- function __bulkRemoveReferences({ host }) {
832
- const metadata = {
833
- entityFqdn: 'wix.data.v1.data_service',
834
- method: 'POST',
835
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemoveReferences',
836
- packageName: PACKAGE_NAME,
837
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
838
- protoPath: '/v1/bulk/references/remove',
839
- data: payload,
840
- host,
841
- }),
842
- data: payload,
843
- };
844
- return metadata;
845
- }
846
- return __bulkRemoveReferences;
847
- }
848
- exports.bulkRemoveReferences = bulkRemoveReferences;
849
- /**
850
- * Checks if a specific property of a referring item contains a reference to another specific item.
851
- * @deprecated Will be removed on 2025-06-01.
852
- */
853
- function isReferenced(payload) {
854
- function __isReferenced({ host }) {
855
- const metadata = {
856
- entityFqdn: 'wix.data.v1.data_service',
857
- method: 'POST',
858
- methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.IsReferenced',
859
- packageName: PACKAGE_NAME,
860
- url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({
861
- protoPath: '/v1/items/is-referenced',
862
- data: payload,
863
- host,
864
- }),
865
- data: payload,
866
- };
867
- return metadata;
868
- }
869
- return __isReferenced;
870
- }
871
- exports.isReferenced = isReferenced;
872
- //# sourceMappingURL=data-v1-data-service-data.http.js.map