@wix/auto_sdk_data_collections 1.0.10 → 1.0.12

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 (134) hide show
  1. package/build/{es/src/data-v2-data-collection-collections.types.d.ts → data-v2-data-collection-collections.universal-DFG8hhGA.d.mts} +199 -144
  2. package/build/{cjs/src/data-v2-data-collection-collections.types.d.ts → data-v2-data-collection-collections.universal-DFG8hhGA.d.ts} +199 -144
  3. package/build/index.d.mts +75 -0
  4. package/build/index.d.ts +75 -0
  5. package/build/index.js +1278 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +1227 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{cjs/src/data-v2-data-collection-collections.types.d.ts → data-v2-data-collection-collections.universal-DZ3_N2Cv.d.mts} +230 -144
  10. package/build/internal/{es/src/data-v2-data-collection-collections.types.d.ts → data-v2-data-collection-collections.universal-DZ3_N2Cv.d.ts} +230 -144
  11. package/build/internal/index.d.mts +121 -0
  12. package/build/internal/index.d.ts +121 -0
  13. package/build/internal/index.js +1278 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +1227 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +882 -0
  18. package/build/internal/meta.d.ts +882 -0
  19. package/build/internal/meta.js +883 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +848 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +882 -0
  24. package/build/meta.d.ts +882 -0
  25. package/build/meta.js +883 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +848 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/data-v2-data-collection-collections.context.d.ts +0 -9
  40. package/build/cjs/src/data-v2-data-collection-collections.context.js +0 -39
  41. package/build/cjs/src/data-v2-data-collection-collections.context.js.map +0 -1
  42. package/build/cjs/src/data-v2-data-collection-collections.http.d.ts +0 -48
  43. package/build/cjs/src/data-v2-data-collection-collections.http.js +0 -704
  44. package/build/cjs/src/data-v2-data-collection-collections.http.js.map +0 -1
  45. package/build/cjs/src/data-v2-data-collection-collections.meta.d.ts +0 -27
  46. package/build/cjs/src/data-v2-data-collection-collections.meta.js +0 -199
  47. package/build/cjs/src/data-v2-data-collection-collections.meta.js.map +0 -1
  48. package/build/cjs/src/data-v2-data-collection-collections.public.d.ts +0 -69
  49. package/build/cjs/src/data-v2-data-collection-collections.public.js +0 -84
  50. package/build/cjs/src/data-v2-data-collection-collections.public.js.map +0 -1
  51. package/build/cjs/src/data-v2-data-collection-collections.types.js +0 -270
  52. package/build/cjs/src/data-v2-data-collection-collections.types.js.map +0 -1
  53. package/build/cjs/src/data-v2-data-collection-collections.universal.d.ts +0 -1572
  54. package/build/cjs/src/data-v2-data-collection-collections.universal.js +0 -704
  55. package/build/cjs/src/data-v2-data-collection-collections.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/data-v2-data-collection-collections.context.d.ts +0 -9
  67. package/build/es/src/data-v2-data-collection-collections.context.js +0 -17
  68. package/build/es/src/data-v2-data-collection-collections.context.js.map +0 -1
  69. package/build/es/src/data-v2-data-collection-collections.http.d.ts +0 -48
  70. package/build/es/src/data-v2-data-collection-collections.http.js +0 -692
  71. package/build/es/src/data-v2-data-collection-collections.http.js.map +0 -1
  72. package/build/es/src/data-v2-data-collection-collections.meta.d.ts +0 -27
  73. package/build/es/src/data-v2-data-collection-collections.meta.js +0 -164
  74. package/build/es/src/data-v2-data-collection-collections.meta.js.map +0 -1
  75. package/build/es/src/data-v2-data-collection-collections.public.d.ts +0 -69
  76. package/build/es/src/data-v2-data-collection-collections.public.js +0 -53
  77. package/build/es/src/data-v2-data-collection-collections.public.js.map +0 -1
  78. package/build/es/src/data-v2-data-collection-collections.types.js +0 -267
  79. package/build/es/src/data-v2-data-collection-collections.types.js.map +0 -1
  80. package/build/es/src/data-v2-data-collection-collections.universal.d.ts +0 -1572
  81. package/build/es/src/data-v2-data-collection-collections.universal.js +0 -669
  82. package/build/es/src/data-v2-data-collection-collections.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/data-v2-data-collection-collections.context.d.ts +0 -17
  93. package/build/internal/cjs/src/data-v2-data-collection-collections.context.js +0 -39
  94. package/build/internal/cjs/src/data-v2-data-collection-collections.context.js.map +0 -1
  95. package/build/internal/cjs/src/data-v2-data-collection-collections.http.d.ts +0 -48
  96. package/build/internal/cjs/src/data-v2-data-collection-collections.http.js +0 -704
  97. package/build/internal/cjs/src/data-v2-data-collection-collections.http.js.map +0 -1
  98. package/build/internal/cjs/src/data-v2-data-collection-collections.meta.d.ts +0 -27
  99. package/build/internal/cjs/src/data-v2-data-collection-collections.meta.js +0 -199
  100. package/build/internal/cjs/src/data-v2-data-collection-collections.meta.js.map +0 -1
  101. package/build/internal/cjs/src/data-v2-data-collection-collections.public.d.ts +0 -107
  102. package/build/internal/cjs/src/data-v2-data-collection-collections.public.js +0 -84
  103. package/build/internal/cjs/src/data-v2-data-collection-collections.public.js.map +0 -1
  104. package/build/internal/cjs/src/data-v2-data-collection-collections.types.js +0 -270
  105. package/build/internal/cjs/src/data-v2-data-collection-collections.types.js.map +0 -1
  106. package/build/internal/cjs/src/data-v2-data-collection-collections.universal.d.ts +0 -1679
  107. package/build/internal/cjs/src/data-v2-data-collection-collections.universal.js +0 -704
  108. package/build/internal/cjs/src/data-v2-data-collection-collections.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/data-v2-data-collection-collections.context.d.ts +0 -17
  119. package/build/internal/es/src/data-v2-data-collection-collections.context.js +0 -17
  120. package/build/internal/es/src/data-v2-data-collection-collections.context.js.map +0 -1
  121. package/build/internal/es/src/data-v2-data-collection-collections.http.d.ts +0 -48
  122. package/build/internal/es/src/data-v2-data-collection-collections.http.js +0 -692
  123. package/build/internal/es/src/data-v2-data-collection-collections.http.js.map +0 -1
  124. package/build/internal/es/src/data-v2-data-collection-collections.meta.d.ts +0 -27
  125. package/build/internal/es/src/data-v2-data-collection-collections.meta.js +0 -164
  126. package/build/internal/es/src/data-v2-data-collection-collections.meta.js.map +0 -1
  127. package/build/internal/es/src/data-v2-data-collection-collections.public.d.ts +0 -107
  128. package/build/internal/es/src/data-v2-data-collection-collections.public.js +0 -53
  129. package/build/internal/es/src/data-v2-data-collection-collections.public.js.map +0 -1
  130. package/build/internal/es/src/data-v2-data-collection-collections.types.js +0 -267
  131. package/build/internal/es/src/data-v2-data-collection-collections.types.js.map +0 -1
  132. package/build/internal/es/src/data-v2-data-collection-collections.universal.d.ts +0 -1679
  133. package/build/internal/es/src/data-v2-data-collection-collections.universal.js +0 -669
  134. package/build/internal/es/src/data-v2-data-collection-collections.universal.js.map +0 -1
@@ -0,0 +1,848 @@
1
+ // src/data-v2-data-collection-collections.http.ts
2
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
3
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
4
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
5
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
6
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
7
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
8
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
9
+ function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(opts) {
10
+ const domainToMappings = {
11
+ "api._api_base_domain_": [
12
+ {
13
+ srcPath: "/cloud-data",
14
+ destPath: ""
15
+ }
16
+ ],
17
+ "code._base_domain_": [
18
+ {
19
+ srcPath: "/_api/cloud-data/v1/data-settings",
20
+ destPath: "/v1/data-settings"
21
+ },
22
+ {
23
+ srcPath: "/_api/cloud-data/v1/schemas",
24
+ destPath: "/v1/schemas"
25
+ },
26
+ {
27
+ srcPath: "/_api/cloud-data/v1/connector",
28
+ destPath: "/v1/connector"
29
+ },
30
+ {
31
+ srcPath: "/_api/data/v1/data-settings",
32
+ destPath: "/v1/data-settings"
33
+ },
34
+ {
35
+ srcPath: "/_api/data/v1/schemas",
36
+ destPath: "/v1/schemas"
37
+ },
38
+ {
39
+ srcPath: "/_api/data/v1/connector",
40
+ destPath: "/v1/connector"
41
+ },
42
+ {
43
+ srcPath: "/_api/cloud-data/v1/wix-data",
44
+ destPath: "/v1/wix-data"
45
+ }
46
+ ],
47
+ "cloud-data.wix-code.com": [
48
+ {
49
+ srcPath: "",
50
+ destPath: ""
51
+ }
52
+ ],
53
+ _: [
54
+ {
55
+ srcPath: "/_api/cloud-data",
56
+ destPath: ""
57
+ }
58
+ ],
59
+ "www._base_domain_": [
60
+ {
61
+ srcPath: "/_api/cloud-data",
62
+ destPath: ""
63
+ },
64
+ {
65
+ srcPath: "/_api/data",
66
+ destPath: ""
67
+ },
68
+ {
69
+ srcPath: "/_api/cloud-data",
70
+ destPath: ""
71
+ }
72
+ ],
73
+ "dev._base_domain_": [
74
+ {
75
+ srcPath: "/_api/cloud-data",
76
+ destPath: ""
77
+ }
78
+ ],
79
+ "bo._base_domain_": [
80
+ {
81
+ srcPath: "/_api/cloud-data/v1",
82
+ destPath: "/v1"
83
+ },
84
+ {
85
+ srcPath: "/_api/cloud-data/v2",
86
+ destPath: "/v2"
87
+ }
88
+ ],
89
+ "wixbo.ai": [
90
+ {
91
+ srcPath: "/_api/cloud-data/v1",
92
+ destPath: "/v1"
93
+ },
94
+ {
95
+ srcPath: "/_api/cloud-data/v2",
96
+ destPath: "/v2"
97
+ }
98
+ ],
99
+ "wix-bo.com": [
100
+ {
101
+ srcPath: "/_api/cloud-data/v1",
102
+ destPath: "/v1"
103
+ },
104
+ {
105
+ srcPath: "/_api/cloud-data/v2",
106
+ destPath: "/v2"
107
+ }
108
+ ],
109
+ "manage._base_domain_": [
110
+ {
111
+ srcPath: "/_api/cloud-data",
112
+ destPath: ""
113
+ },
114
+ {
115
+ srcPath: "/_api/data",
116
+ destPath: ""
117
+ },
118
+ {
119
+ srcPath: "/_api/cloud-data",
120
+ destPath: ""
121
+ }
122
+ ],
123
+ "editor._base_domain_": [
124
+ {
125
+ srcPath: "/_api/cloud-data/v1/schemas",
126
+ destPath: "/v1/schemas"
127
+ },
128
+ {
129
+ srcPath: "/_api/cloud-data/dbs/tasks",
130
+ destPath: "/dbs/tasks"
131
+ },
132
+ {
133
+ srcPath: "/_api/data/v1/schemas",
134
+ destPath: "/v1/schemas"
135
+ },
136
+ {
137
+ srcPath: "/_api/data/dbs/tasks",
138
+ destPath: "/dbs/tasks"
139
+ },
140
+ {
141
+ srcPath: "/_api/cloud-data/v1/wix-data",
142
+ destPath: "/v1/wix-data"
143
+ },
144
+ {
145
+ srcPath: "/_api/cloud-data/v1/data-settings",
146
+ destPath: "/v1/data-settings"
147
+ },
148
+ {
149
+ srcPath: "/_api/data/v2/indexes",
150
+ destPath: "/v2/indexes"
151
+ },
152
+ {
153
+ srcPath: "/_api/cloud-data/v1/external-database-connections",
154
+ destPath: "/v1/external-database-connections"
155
+ },
156
+ {
157
+ srcPath: "/_api/data/v1/data-collection-sharing",
158
+ destPath: "/v1/data-collection-sharing"
159
+ },
160
+ {
161
+ srcPath: "/_api/cloud-data/v2/collections",
162
+ destPath: "/v2/collections"
163
+ },
164
+ {
165
+ srcPath: "/_api/cloud-data/v2/bulk",
166
+ destPath: "/v2/bulk"
167
+ },
168
+ {
169
+ srcPath: "/_api/cloud-data/v2/items",
170
+ destPath: "/v2/items"
171
+ },
172
+ {
173
+ srcPath: "/_api/cloud-data/v2/dbs/tasks",
174
+ destPath: "/v2/dbs/tasks"
175
+ }
176
+ ],
177
+ "blocks._base_domain_": [
178
+ {
179
+ srcPath: "/_api/cloud-data/v1/schemas",
180
+ destPath: "/v1/schemas"
181
+ },
182
+ {
183
+ srcPath: "/_api/cloud-data/dbs/tasks",
184
+ destPath: "/dbs/tasks"
185
+ },
186
+ {
187
+ srcPath: "/_api/data/v1/schemas",
188
+ destPath: "/v1/schemas"
189
+ },
190
+ {
191
+ srcPath: "/_api/data/dbs/tasks",
192
+ destPath: "/dbs/tasks"
193
+ },
194
+ {
195
+ srcPath: "/_api/cloud-data/v1/wix-data",
196
+ destPath: "/v1/wix-data"
197
+ },
198
+ {
199
+ srcPath: "/_api/cloud-data/v1/data-settings",
200
+ destPath: "/v1/data-settings"
201
+ },
202
+ {
203
+ srcPath: "/_api/data/v2/indexes",
204
+ destPath: "/v2/indexes"
205
+ },
206
+ {
207
+ srcPath: "/_api/cloud-data/v1/external-database-connections",
208
+ destPath: "/v1/external-database-connections"
209
+ },
210
+ {
211
+ srcPath: "/_api/data/v1/data-collection-sharing",
212
+ destPath: "/v1/data-collection-sharing"
213
+ },
214
+ {
215
+ srcPath: "/_api/cloud-data/v2/collections",
216
+ destPath: "/v2/collections"
217
+ },
218
+ {
219
+ srcPath: "/_api/cloud-data/v2/bulk",
220
+ destPath: "/v2/bulk"
221
+ },
222
+ {
223
+ srcPath: "/_api/cloud-data/v2/items",
224
+ destPath: "/v2/items"
225
+ },
226
+ {
227
+ srcPath: "/_api/cloud-data/v2/dbs/tasks",
228
+ destPath: "/v2/dbs/tasks"
229
+ }
230
+ ],
231
+ "create.editorx": [
232
+ {
233
+ srcPath: "/_api/cloud-data/v1/schemas",
234
+ destPath: "/v1/schemas"
235
+ },
236
+ {
237
+ srcPath: "/_api/cloud-data/dbs/tasks",
238
+ destPath: "/dbs/tasks"
239
+ },
240
+ {
241
+ srcPath: "/_api/data/v1/schemas",
242
+ destPath: "/v1/schemas"
243
+ },
244
+ {
245
+ srcPath: "/_api/data/dbs/tasks",
246
+ destPath: "/dbs/tasks"
247
+ },
248
+ {
249
+ srcPath: "/_api/cloud-data/v1/wix-data",
250
+ destPath: "/v1/wix-data"
251
+ },
252
+ {
253
+ srcPath: "/_api/cloud-data/v1/data-settings",
254
+ destPath: "/v1/data-settings"
255
+ },
256
+ {
257
+ srcPath: "/_api/data/v2/indexes",
258
+ destPath: "/v2/indexes"
259
+ },
260
+ {
261
+ srcPath: "/_api/cloud-data/v1/external-database-connections",
262
+ destPath: "/v1/external-database-connections"
263
+ },
264
+ {
265
+ srcPath: "/_api/data/v1/data-collection-sharing",
266
+ destPath: "/v1/data-collection-sharing"
267
+ },
268
+ {
269
+ srcPath: "/_api/cloud-data/v2/collections",
270
+ destPath: "/v2/collections"
271
+ },
272
+ {
273
+ srcPath: "/_api/cloud-data/v2/bulk",
274
+ destPath: "/v2/bulk"
275
+ },
276
+ {
277
+ srcPath: "/_api/cloud-data/v2/items",
278
+ destPath: "/v2/items"
279
+ },
280
+ {
281
+ srcPath: "/_api/cloud-data/v2/dbs/tasks",
282
+ destPath: "/v2/dbs/tasks"
283
+ }
284
+ ],
285
+ "www.wixapis.com": [
286
+ {
287
+ srcPath: "/wix-data/v1/collections",
288
+ destPath: "/v1/wix-data/collections"
289
+ },
290
+ {
291
+ srcPath: "/wix-data/v1/external-database-connections",
292
+ destPath: "/v1/external-database-connections"
293
+ },
294
+ {
295
+ srcPath: "/wix-data/v2/indexes",
296
+ destPath: "/v2/indexes"
297
+ },
298
+ {
299
+ srcPath: "/wix-data/v1/items",
300
+ destPath: "/v1/items"
301
+ },
302
+ {
303
+ srcPath: "/wix-data/v1/bulk",
304
+ destPath: "/v1/bulk"
305
+ },
306
+ {
307
+ srcPath: "/wix-data/v1/external-databases",
308
+ destPath: "/v1/external-databases"
309
+ },
310
+ {
311
+ srcPath: "/wix-data/v2",
312
+ destPath: "/v2"
313
+ }
314
+ ],
315
+ "www.wixgateway.com": [
316
+ {
317
+ srcPath: "/wix-data/v1/items",
318
+ destPath: "/v1/items"
319
+ },
320
+ {
321
+ srcPath: "/wix-data/v1/bulk",
322
+ destPath: "/v1/bulk"
323
+ }
324
+ ],
325
+ "*.dev.wix-code.com": [
326
+ {
327
+ srcPath: "/_api/cloud-data/v2",
328
+ destPath: "/v2"
329
+ }
330
+ ]
331
+ };
332
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
333
+ }
334
+ var PACKAGE_NAME = "@wix/auto_sdk_data_collections";
335
+ function createDataCollection(payload) {
336
+ function __createDataCollection({ host }) {
337
+ const serializedData = transformPaths(payload, [
338
+ {
339
+ transformFn: transformSDKTimestampToRESTTimestamp,
340
+ paths: [
341
+ { path: "collection.createdDate" },
342
+ { path: "collection.updatedDate" }
343
+ ]
344
+ },
345
+ {
346
+ transformFn: transformSDKFloatToRESTFloat,
347
+ paths: [
348
+ { path: "collection.fields.numberRange.min" },
349
+ { path: "collection.fields.numberRange.max" }
350
+ ]
351
+ }
352
+ ]);
353
+ const metadata = {
354
+ entityFqdn: "wix.data.v2.data_collection",
355
+ method: "POST",
356
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.CreateDataCollection",
357
+ packageName: PACKAGE_NAME,
358
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
359
+ { protoPath: "/v2/collections", data: serializedData, host }
360
+ ),
361
+ data: serializedData,
362
+ transformResponse: (payload2) => transformPaths(payload2, [
363
+ {
364
+ transformFn: transformRESTTimestampToSDKTimestamp,
365
+ paths: [
366
+ { path: "collection.createdDate" },
367
+ { path: "collection.updatedDate" }
368
+ ]
369
+ },
370
+ {
371
+ transformFn: transformRESTFloatToSDKFloat,
372
+ paths: [
373
+ { path: "collection.fields.numberRange.min" },
374
+ { path: "collection.fields.numberRange.max" }
375
+ ]
376
+ }
377
+ ])
378
+ };
379
+ return metadata;
380
+ }
381
+ return __createDataCollection;
382
+ }
383
+ function getDataCollection(payload) {
384
+ function __getDataCollection({ host }) {
385
+ const metadata = {
386
+ entityFqdn: "wix.data.v2.data_collection",
387
+ method: "GET",
388
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.GetDataCollection",
389
+ packageName: PACKAGE_NAME,
390
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
391
+ { protoPath: "/v2/collections/{dataCollectionId}", data: payload, host }
392
+ ),
393
+ params: toURLSearchParams(payload),
394
+ transformResponse: (payload2) => transformPaths(payload2, [
395
+ {
396
+ transformFn: transformRESTTimestampToSDKTimestamp,
397
+ paths: [
398
+ { path: "collection.createdDate" },
399
+ { path: "collection.updatedDate" },
400
+ { path: "referencedCollections.createdDate" },
401
+ { path: "referencedCollections.updatedDate" }
402
+ ]
403
+ },
404
+ {
405
+ transformFn: transformRESTFloatToSDKFloat,
406
+ paths: [
407
+ { path: "collection.fields.numberRange.min" },
408
+ { path: "collection.fields.numberRange.max" },
409
+ { path: "referencedCollections.fields.numberRange.min" },
410
+ { path: "referencedCollections.fields.numberRange.max" }
411
+ ]
412
+ }
413
+ ])
414
+ };
415
+ return metadata;
416
+ }
417
+ return __getDataCollection;
418
+ }
419
+ function listDataCollections(payload) {
420
+ function __listDataCollections({ host }) {
421
+ const metadata = {
422
+ entityFqdn: "wix.data.v2.data_collection",
423
+ method: "GET",
424
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.ListDataCollections",
425
+ packageName: PACKAGE_NAME,
426
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
427
+ { protoPath: "/v2/collections", data: payload, host }
428
+ ),
429
+ params: toURLSearchParams(payload),
430
+ transformResponse: (payload2) => transformPaths(payload2, [
431
+ {
432
+ transformFn: transformRESTTimestampToSDKTimestamp,
433
+ paths: [
434
+ { path: "collections.createdDate" },
435
+ { path: "collections.updatedDate" }
436
+ ]
437
+ },
438
+ {
439
+ transformFn: transformRESTFloatToSDKFloat,
440
+ paths: [
441
+ { path: "collections.fields.numberRange.min" },
442
+ { path: "collections.fields.numberRange.max" }
443
+ ]
444
+ }
445
+ ])
446
+ };
447
+ return metadata;
448
+ }
449
+ return __listDataCollections;
450
+ }
451
+ function updateDataCollection(payload) {
452
+ function __updateDataCollection({ host }) {
453
+ const serializedData = transformPaths(payload, [
454
+ {
455
+ transformFn: transformSDKTimestampToRESTTimestamp,
456
+ paths: [
457
+ { path: "collection.createdDate" },
458
+ { path: "collection.updatedDate" }
459
+ ]
460
+ },
461
+ {
462
+ transformFn: transformSDKFloatToRESTFloat,
463
+ paths: [
464
+ { path: "collection.fields.numberRange.min" },
465
+ { path: "collection.fields.numberRange.max" }
466
+ ]
467
+ }
468
+ ]);
469
+ const metadata = {
470
+ entityFqdn: "wix.data.v2.data_collection",
471
+ method: "PUT",
472
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.UpdateDataCollection",
473
+ packageName: PACKAGE_NAME,
474
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
475
+ { protoPath: "/v2/collections", data: serializedData, host }
476
+ ),
477
+ data: serializedData,
478
+ transformResponse: (payload2) => transformPaths(payload2, [
479
+ {
480
+ transformFn: transformRESTTimestampToSDKTimestamp,
481
+ paths: [
482
+ { path: "collection.createdDate" },
483
+ { path: "collection.updatedDate" }
484
+ ]
485
+ },
486
+ {
487
+ transformFn: transformRESTFloatToSDKFloat,
488
+ paths: [
489
+ { path: "collection.fields.numberRange.min" },
490
+ { path: "collection.fields.numberRange.max" }
491
+ ]
492
+ }
493
+ ])
494
+ };
495
+ return metadata;
496
+ }
497
+ return __updateDataCollection;
498
+ }
499
+ function deleteDataCollection(payload) {
500
+ function __deleteDataCollection({ host }) {
501
+ const metadata = {
502
+ entityFqdn: "wix.data.v2.data_collection",
503
+ method: "DELETE",
504
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollection",
505
+ packageName: PACKAGE_NAME,
506
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
507
+ { protoPath: "/v2/collections/{dataCollectionId}", data: payload, host }
508
+ ),
509
+ params: toURLSearchParams(payload)
510
+ };
511
+ return metadata;
512
+ }
513
+ return __deleteDataCollection;
514
+ }
515
+ function restoreDataCollection(payload) {
516
+ function __restoreDataCollection({ host }) {
517
+ const metadata = {
518
+ entityFqdn: "wix.data.v2.data_collection",
519
+ method: "POST",
520
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.RestoreDataCollection",
521
+ packageName: PACKAGE_NAME,
522
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
523
+ {
524
+ protoPath: "/v2/collections/restore/{dataCollectionId}",
525
+ data: payload,
526
+ host
527
+ }
528
+ ),
529
+ data: payload,
530
+ transformResponse: (payload2) => transformPaths(payload2, [
531
+ {
532
+ transformFn: transformRESTTimestampToSDKTimestamp,
533
+ paths: [
534
+ { path: "dataCollection.createdDate" },
535
+ { path: "dataCollection.updatedDate" }
536
+ ]
537
+ },
538
+ {
539
+ transformFn: transformRESTFloatToSDKFloat,
540
+ paths: [
541
+ { path: "dataCollection.fields.numberRange.min" },
542
+ { path: "dataCollection.fields.numberRange.max" }
543
+ ]
544
+ }
545
+ ])
546
+ };
547
+ return metadata;
548
+ }
549
+ return __restoreDataCollection;
550
+ }
551
+ function createDataCollectionField(payload) {
552
+ function __createDataCollectionField({ host }) {
553
+ const serializedData = transformPaths(payload, [
554
+ {
555
+ transformFn: transformSDKFloatToRESTFloat,
556
+ paths: [
557
+ { path: "field.numberRange.min" },
558
+ { path: "field.numberRange.max" }
559
+ ]
560
+ }
561
+ ]);
562
+ const metadata = {
563
+ entityFqdn: "wix.data.v2.data_collection",
564
+ method: "POST",
565
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.CreateDataCollectionField",
566
+ packageName: PACKAGE_NAME,
567
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
568
+ {
569
+ protoPath: "/v2/collections/create-field",
570
+ data: serializedData,
571
+ host
572
+ }
573
+ ),
574
+ data: serializedData,
575
+ transformResponse: (payload2) => transformPaths(payload2, [
576
+ {
577
+ transformFn: transformRESTTimestampToSDKTimestamp,
578
+ paths: [
579
+ { path: "dataCollection.createdDate" },
580
+ { path: "dataCollection.updatedDate" }
581
+ ]
582
+ },
583
+ {
584
+ transformFn: transformRESTFloatToSDKFloat,
585
+ paths: [
586
+ { path: "dataCollection.fields.numberRange.min" },
587
+ { path: "dataCollection.fields.numberRange.max" }
588
+ ]
589
+ }
590
+ ])
591
+ };
592
+ return metadata;
593
+ }
594
+ return __createDataCollectionField;
595
+ }
596
+ function updateDataCollectionField(payload) {
597
+ function __updateDataCollectionField({ host }) {
598
+ const serializedData = transformPaths(payload, [
599
+ {
600
+ transformFn: transformSDKFloatToRESTFloat,
601
+ paths: [
602
+ { path: "field.numberRange.min" },
603
+ { path: "field.numberRange.max" }
604
+ ]
605
+ }
606
+ ]);
607
+ const metadata = {
608
+ entityFqdn: "wix.data.v2.data_collection",
609
+ method: "POST",
610
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.UpdateDataCollectionField",
611
+ packageName: PACKAGE_NAME,
612
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
613
+ {
614
+ protoPath: "/v2/collections/update-field",
615
+ data: serializedData,
616
+ host
617
+ }
618
+ ),
619
+ data: serializedData,
620
+ transformResponse: (payload2) => transformPaths(payload2, [
621
+ {
622
+ transformFn: transformRESTTimestampToSDKTimestamp,
623
+ paths: [
624
+ { path: "dataCollection.createdDate" },
625
+ { path: "dataCollection.updatedDate" }
626
+ ]
627
+ },
628
+ {
629
+ transformFn: transformRESTFloatToSDKFloat,
630
+ paths: [
631
+ { path: "dataCollection.fields.numberRange.min" },
632
+ { path: "dataCollection.fields.numberRange.max" }
633
+ ]
634
+ }
635
+ ])
636
+ };
637
+ return metadata;
638
+ }
639
+ return __updateDataCollectionField;
640
+ }
641
+ function deleteDataCollectionField(payload) {
642
+ function __deleteDataCollectionField({ host }) {
643
+ const metadata = {
644
+ entityFqdn: "wix.data.v2.data_collection",
645
+ method: "POST",
646
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionField",
647
+ packageName: PACKAGE_NAME,
648
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
649
+ { protoPath: "/v2/collections/delete-field", data: payload, host }
650
+ ),
651
+ data: payload,
652
+ transformResponse: (payload2) => transformPaths(payload2, [
653
+ {
654
+ transformFn: transformRESTTimestampToSDKTimestamp,
655
+ paths: [
656
+ { path: "dataCollection.createdDate" },
657
+ { path: "dataCollection.updatedDate" }
658
+ ]
659
+ },
660
+ {
661
+ transformFn: transformRESTFloatToSDKFloat,
662
+ paths: [
663
+ { path: "dataCollection.fields.numberRange.min" },
664
+ { path: "dataCollection.fields.numberRange.max" }
665
+ ]
666
+ }
667
+ ])
668
+ };
669
+ return metadata;
670
+ }
671
+ return __deleteDataCollectionField;
672
+ }
673
+
674
+ // src/data-v2-data-collection-collections.meta.ts
675
+ function createDataCollection2() {
676
+ const payload = {};
677
+ const getRequestOptions = createDataCollection(payload);
678
+ const getUrl = (context) => {
679
+ const { url } = getRequestOptions(context);
680
+ return url;
681
+ };
682
+ return {
683
+ getUrl,
684
+ httpMethod: "POST",
685
+ path: "/v2/collections",
686
+ pathParams: {},
687
+ __requestType: null,
688
+ __originalRequestType: null,
689
+ __responseType: null,
690
+ __originalResponseType: null
691
+ };
692
+ }
693
+ function getDataCollection2() {
694
+ const payload = { dataCollectionId: ":dataCollectionId" };
695
+ const getRequestOptions = getDataCollection(payload);
696
+ const getUrl = (context) => {
697
+ const { url } = getRequestOptions(context);
698
+ return url;
699
+ };
700
+ return {
701
+ getUrl,
702
+ httpMethod: "GET",
703
+ path: "/v2/collections/{dataCollectionId}",
704
+ pathParams: { dataCollectionId: "dataCollectionId" },
705
+ __requestType: null,
706
+ __originalRequestType: null,
707
+ __responseType: null,
708
+ __originalResponseType: null
709
+ };
710
+ }
711
+ function listDataCollections2() {
712
+ const payload = {};
713
+ const getRequestOptions = listDataCollections(payload);
714
+ const getUrl = (context) => {
715
+ const { url } = getRequestOptions(context);
716
+ return url;
717
+ };
718
+ return {
719
+ getUrl,
720
+ httpMethod: "GET",
721
+ path: "/v2/collections",
722
+ pathParams: {},
723
+ __requestType: null,
724
+ __originalRequestType: null,
725
+ __responseType: null,
726
+ __originalResponseType: null
727
+ };
728
+ }
729
+ function updateDataCollection2() {
730
+ const payload = {};
731
+ const getRequestOptions = updateDataCollection(payload);
732
+ const getUrl = (context) => {
733
+ const { url } = getRequestOptions(context);
734
+ return url;
735
+ };
736
+ return {
737
+ getUrl,
738
+ httpMethod: "PUT",
739
+ path: "/v2/collections",
740
+ pathParams: {},
741
+ __requestType: null,
742
+ __originalRequestType: null,
743
+ __responseType: null,
744
+ __originalResponseType: null
745
+ };
746
+ }
747
+ function deleteDataCollection2() {
748
+ const payload = { dataCollectionId: ":dataCollectionId" };
749
+ const getRequestOptions = deleteDataCollection(payload);
750
+ const getUrl = (context) => {
751
+ const { url } = getRequestOptions(context);
752
+ return url;
753
+ };
754
+ return {
755
+ getUrl,
756
+ httpMethod: "DELETE",
757
+ path: "/v2/collections/{dataCollectionId}",
758
+ pathParams: { dataCollectionId: "dataCollectionId" },
759
+ __requestType: null,
760
+ __originalRequestType: null,
761
+ __responseType: null,
762
+ __originalResponseType: null
763
+ };
764
+ }
765
+ function restoreDataCollection2() {
766
+ const payload = { dataCollectionId: ":dataCollectionId" };
767
+ const getRequestOptions = restoreDataCollection(payload);
768
+ const getUrl = (context) => {
769
+ const { url } = getRequestOptions(context);
770
+ return url;
771
+ };
772
+ return {
773
+ getUrl,
774
+ httpMethod: "POST",
775
+ path: "/v2/collections/restore/{dataCollectionId}",
776
+ pathParams: { dataCollectionId: "dataCollectionId" },
777
+ __requestType: null,
778
+ __originalRequestType: null,
779
+ __responseType: null,
780
+ __originalResponseType: null
781
+ };
782
+ }
783
+ function createDataCollectionField2() {
784
+ const payload = {};
785
+ const getRequestOptions = createDataCollectionField(payload);
786
+ const getUrl = (context) => {
787
+ const { url } = getRequestOptions(context);
788
+ return url;
789
+ };
790
+ return {
791
+ getUrl,
792
+ httpMethod: "POST",
793
+ path: "/v2/collections/create-field",
794
+ pathParams: {},
795
+ __requestType: null,
796
+ __originalRequestType: null,
797
+ __responseType: null,
798
+ __originalResponseType: null
799
+ };
800
+ }
801
+ function updateDataCollectionField2() {
802
+ const payload = {};
803
+ const getRequestOptions = updateDataCollectionField(payload);
804
+ const getUrl = (context) => {
805
+ const { url } = getRequestOptions(context);
806
+ return url;
807
+ };
808
+ return {
809
+ getUrl,
810
+ httpMethod: "POST",
811
+ path: "/v2/collections/update-field",
812
+ pathParams: {},
813
+ __requestType: null,
814
+ __originalRequestType: null,
815
+ __responseType: null,
816
+ __originalResponseType: null
817
+ };
818
+ }
819
+ function deleteDataCollectionField2() {
820
+ const payload = {};
821
+ const getRequestOptions = deleteDataCollectionField(payload);
822
+ const getUrl = (context) => {
823
+ const { url } = getRequestOptions(context);
824
+ return url;
825
+ };
826
+ return {
827
+ getUrl,
828
+ httpMethod: "POST",
829
+ path: "/v2/collections/delete-field",
830
+ pathParams: {},
831
+ __requestType: null,
832
+ __originalRequestType: null,
833
+ __responseType: null,
834
+ __originalResponseType: null
835
+ };
836
+ }
837
+ export {
838
+ createDataCollection2 as createDataCollection,
839
+ createDataCollectionField2 as createDataCollectionField,
840
+ deleteDataCollection2 as deleteDataCollection,
841
+ deleteDataCollectionField2 as deleteDataCollectionField,
842
+ getDataCollection2 as getDataCollection,
843
+ listDataCollections2 as listDataCollections,
844
+ restoreDataCollection2 as restoreDataCollection,
845
+ updateDataCollection2 as updateDataCollection,
846
+ updateDataCollectionField2 as updateDataCollectionField
847
+ };
848
+ //# sourceMappingURL=meta.mjs.map