@wix/auto_sdk_data_collections 1.0.11 → 1.0.13

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 (121) hide show
  1. package/build/{es/src/data-v2-data-collection-collections.types.d.ts → cjs/data-v2-data-collection-collections.universal-DFG8hhGA.d.ts} +199 -144
  2. package/build/cjs/index.d.ts +75 -1
  3. package/build/cjs/index.js +1275 -15
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/meta.d.ts +882 -1
  6. package/build/cjs/meta.js +880 -15
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/{cjs/src/data-v2-data-collection-collections.types.d.ts → es/data-v2-data-collection-collections.universal-DFG8hhGA.d.mts} +199 -144
  9. package/build/es/index.d.mts +75 -0
  10. package/build/es/index.mjs +1227 -0
  11. package/build/es/index.mjs.map +1 -0
  12. package/build/es/meta.d.mts +882 -0
  13. package/build/es/meta.mjs +848 -0
  14. package/build/es/meta.mjs.map +1 -0
  15. package/build/internal/cjs/{src/data-v2-data-collection-collections.types.d.ts → data-v2-data-collection-collections.universal-DZ3_N2Cv.d.ts} +230 -144
  16. package/build/internal/cjs/index.d.ts +121 -1
  17. package/build/internal/cjs/index.js +1275 -15
  18. package/build/internal/cjs/index.js.map +1 -1
  19. package/build/internal/cjs/meta.d.ts +882 -1
  20. package/build/internal/cjs/meta.js +880 -15
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/internal/es/{src/data-v2-data-collection-collections.types.d.ts → data-v2-data-collection-collections.universal-DZ3_N2Cv.d.mts} +230 -144
  23. package/build/internal/es/index.d.mts +121 -0
  24. package/build/internal/es/index.mjs +1227 -0
  25. package/build/internal/es/index.mjs.map +1 -0
  26. package/build/internal/es/meta.d.mts +882 -0
  27. package/build/internal/es/meta.mjs +848 -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-v2-data-collection-collections.context.d.ts +0 -9
  34. package/build/cjs/src/data-v2-data-collection-collections.context.js +0 -39
  35. package/build/cjs/src/data-v2-data-collection-collections.context.js.map +0 -1
  36. package/build/cjs/src/data-v2-data-collection-collections.http.d.ts +0 -48
  37. package/build/cjs/src/data-v2-data-collection-collections.http.js +0 -704
  38. package/build/cjs/src/data-v2-data-collection-collections.http.js.map +0 -1
  39. package/build/cjs/src/data-v2-data-collection-collections.meta.d.ts +0 -27
  40. package/build/cjs/src/data-v2-data-collection-collections.meta.js +0 -199
  41. package/build/cjs/src/data-v2-data-collection-collections.meta.js.map +0 -1
  42. package/build/cjs/src/data-v2-data-collection-collections.public.d.ts +0 -69
  43. package/build/cjs/src/data-v2-data-collection-collections.public.js +0 -84
  44. package/build/cjs/src/data-v2-data-collection-collections.public.js.map +0 -1
  45. package/build/cjs/src/data-v2-data-collection-collections.types.js +0 -270
  46. package/build/cjs/src/data-v2-data-collection-collections.types.js.map +0 -1
  47. package/build/cjs/src/data-v2-data-collection-collections.universal.d.ts +0 -1572
  48. package/build/cjs/src/data-v2-data-collection-collections.universal.js +0 -704
  49. package/build/cjs/src/data-v2-data-collection-collections.universal.js.map +0 -1
  50. package/build/es/index.d.ts +0 -1
  51. package/build/es/index.js +0 -2
  52. package/build/es/index.js.map +0 -1
  53. package/build/es/index.typings.d.ts +0 -1
  54. package/build/es/index.typings.js +0 -2
  55. package/build/es/index.typings.js.map +0 -1
  56. package/build/es/meta.d.ts +0 -1
  57. package/build/es/meta.js +0 -2
  58. package/build/es/meta.js.map +0 -1
  59. package/build/es/src/data-v2-data-collection-collections.context.d.ts +0 -9
  60. package/build/es/src/data-v2-data-collection-collections.context.js +0 -17
  61. package/build/es/src/data-v2-data-collection-collections.context.js.map +0 -1
  62. package/build/es/src/data-v2-data-collection-collections.http.d.ts +0 -48
  63. package/build/es/src/data-v2-data-collection-collections.http.js +0 -692
  64. package/build/es/src/data-v2-data-collection-collections.http.js.map +0 -1
  65. package/build/es/src/data-v2-data-collection-collections.meta.d.ts +0 -27
  66. package/build/es/src/data-v2-data-collection-collections.meta.js +0 -164
  67. package/build/es/src/data-v2-data-collection-collections.meta.js.map +0 -1
  68. package/build/es/src/data-v2-data-collection-collections.public.d.ts +0 -69
  69. package/build/es/src/data-v2-data-collection-collections.public.js +0 -53
  70. package/build/es/src/data-v2-data-collection-collections.public.js.map +0 -1
  71. package/build/es/src/data-v2-data-collection-collections.types.js +0 -267
  72. package/build/es/src/data-v2-data-collection-collections.types.js.map +0 -1
  73. package/build/es/src/data-v2-data-collection-collections.universal.d.ts +0 -1572
  74. package/build/es/src/data-v2-data-collection-collections.universal.js +0 -669
  75. package/build/es/src/data-v2-data-collection-collections.universal.js.map +0 -1
  76. package/build/internal/cjs/index.typings.d.ts +0 -1
  77. package/build/internal/cjs/index.typings.js +0 -18
  78. package/build/internal/cjs/index.typings.js.map +0 -1
  79. package/build/internal/cjs/src/data-v2-data-collection-collections.context.d.ts +0 -17
  80. package/build/internal/cjs/src/data-v2-data-collection-collections.context.js +0 -39
  81. package/build/internal/cjs/src/data-v2-data-collection-collections.context.js.map +0 -1
  82. package/build/internal/cjs/src/data-v2-data-collection-collections.http.d.ts +0 -48
  83. package/build/internal/cjs/src/data-v2-data-collection-collections.http.js +0 -704
  84. package/build/internal/cjs/src/data-v2-data-collection-collections.http.js.map +0 -1
  85. package/build/internal/cjs/src/data-v2-data-collection-collections.meta.d.ts +0 -27
  86. package/build/internal/cjs/src/data-v2-data-collection-collections.meta.js +0 -199
  87. package/build/internal/cjs/src/data-v2-data-collection-collections.meta.js.map +0 -1
  88. package/build/internal/cjs/src/data-v2-data-collection-collections.public.d.ts +0 -107
  89. package/build/internal/cjs/src/data-v2-data-collection-collections.public.js +0 -84
  90. package/build/internal/cjs/src/data-v2-data-collection-collections.public.js.map +0 -1
  91. package/build/internal/cjs/src/data-v2-data-collection-collections.types.js +0 -270
  92. package/build/internal/cjs/src/data-v2-data-collection-collections.types.js.map +0 -1
  93. package/build/internal/cjs/src/data-v2-data-collection-collections.universal.d.ts +0 -1679
  94. package/build/internal/cjs/src/data-v2-data-collection-collections.universal.js +0 -704
  95. package/build/internal/cjs/src/data-v2-data-collection-collections.universal.js.map +0 -1
  96. package/build/internal/es/index.d.ts +0 -1
  97. package/build/internal/es/index.js +0 -2
  98. package/build/internal/es/index.js.map +0 -1
  99. package/build/internal/es/index.typings.d.ts +0 -1
  100. package/build/internal/es/index.typings.js +0 -2
  101. package/build/internal/es/index.typings.js.map +0 -1
  102. package/build/internal/es/meta.d.ts +0 -1
  103. package/build/internal/es/meta.js +0 -2
  104. package/build/internal/es/meta.js.map +0 -1
  105. package/build/internal/es/src/data-v2-data-collection-collections.context.d.ts +0 -17
  106. package/build/internal/es/src/data-v2-data-collection-collections.context.js +0 -17
  107. package/build/internal/es/src/data-v2-data-collection-collections.context.js.map +0 -1
  108. package/build/internal/es/src/data-v2-data-collection-collections.http.d.ts +0 -48
  109. package/build/internal/es/src/data-v2-data-collection-collections.http.js +0 -692
  110. package/build/internal/es/src/data-v2-data-collection-collections.http.js.map +0 -1
  111. package/build/internal/es/src/data-v2-data-collection-collections.meta.d.ts +0 -27
  112. package/build/internal/es/src/data-v2-data-collection-collections.meta.js +0 -164
  113. package/build/internal/es/src/data-v2-data-collection-collections.meta.js.map +0 -1
  114. package/build/internal/es/src/data-v2-data-collection-collections.public.d.ts +0 -107
  115. package/build/internal/es/src/data-v2-data-collection-collections.public.js +0 -53
  116. package/build/internal/es/src/data-v2-data-collection-collections.public.js.map +0 -1
  117. package/build/internal/es/src/data-v2-data-collection-collections.types.js +0 -267
  118. package/build/internal/es/src/data-v2-data-collection-collections.types.js.map +0 -1
  119. package/build/internal/es/src/data-v2-data-collection-collections.universal.d.ts +0 -1679
  120. package/build/internal/es/src/data-v2-data-collection-collections.universal.js +0 -669
  121. package/build/internal/es/src/data-v2-data-collection-collections.universal.js.map +0 -1
@@ -1,18 +1,1278 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
15
9
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/data-v2-data-collection-collections.context.js"), exports);
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ AccessLevel: () => AccessLevel,
24
+ CollectionOperation: () => CollectionOperation,
25
+ CollectionType: () => CollectionType,
26
+ DataOperation: () => DataOperation,
27
+ Direction: () => Direction,
28
+ FieldPluginType: () => FieldPluginType,
29
+ Format: () => Format,
30
+ IndexSource: () => IndexSource,
31
+ IndexStatus: () => IndexStatus,
32
+ Order: () => Order,
33
+ PagingMode: () => PagingMode,
34
+ PluginType: () => PluginType,
35
+ QueryOperator: () => QueryOperator,
36
+ Role: () => Role,
37
+ Segment: () => Segment,
38
+ SortOrder: () => SortOrder,
39
+ Status: () => Status,
40
+ Type: () => Type,
41
+ WebhookIdentityType: () => WebhookIdentityType,
42
+ createDataCollection: () => createDataCollection4,
43
+ createDataCollectionField: () => createDataCollectionField4,
44
+ deleteDataCollection: () => deleteDataCollection4,
45
+ deleteDataCollectionField: () => deleteDataCollectionField4,
46
+ getDataCollection: () => getDataCollection4,
47
+ listDataCollections: () => listDataCollections4,
48
+ restoreDataCollection: () => restoreDataCollection4,
49
+ updateDataCollection: () => updateDataCollection4,
50
+ updateDataCollectionField: () => updateDataCollectionField4
51
+ });
52
+ module.exports = __toCommonJS(index_exports);
53
+
54
+ // src/data-v2-data-collection-collections.universal.ts
55
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
56
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
57
+
58
+ // src/data-v2-data-collection-collections.http.ts
59
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
60
+ var import_float = require("@wix/sdk-runtime/transformations/float");
61
+ var import_float2 = require("@wix/sdk-runtime/transformations/float");
62
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
63
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
64
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
65
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
66
+ function resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(opts) {
67
+ const domainToMappings = {
68
+ "api._api_base_domain_": [
69
+ {
70
+ srcPath: "/cloud-data",
71
+ destPath: ""
72
+ }
73
+ ],
74
+ "code._base_domain_": [
75
+ {
76
+ srcPath: "/_api/cloud-data/v1/data-settings",
77
+ destPath: "/v1/data-settings"
78
+ },
79
+ {
80
+ srcPath: "/_api/cloud-data/v1/schemas",
81
+ destPath: "/v1/schemas"
82
+ },
83
+ {
84
+ srcPath: "/_api/cloud-data/v1/connector",
85
+ destPath: "/v1/connector"
86
+ },
87
+ {
88
+ srcPath: "/_api/data/v1/data-settings",
89
+ destPath: "/v1/data-settings"
90
+ },
91
+ {
92
+ srcPath: "/_api/data/v1/schemas",
93
+ destPath: "/v1/schemas"
94
+ },
95
+ {
96
+ srcPath: "/_api/data/v1/connector",
97
+ destPath: "/v1/connector"
98
+ },
99
+ {
100
+ srcPath: "/_api/cloud-data/v1/wix-data",
101
+ destPath: "/v1/wix-data"
102
+ }
103
+ ],
104
+ "cloud-data.wix-code.com": [
105
+ {
106
+ srcPath: "",
107
+ destPath: ""
108
+ }
109
+ ],
110
+ _: [
111
+ {
112
+ srcPath: "/_api/cloud-data",
113
+ destPath: ""
114
+ }
115
+ ],
116
+ "www._base_domain_": [
117
+ {
118
+ srcPath: "/_api/cloud-data",
119
+ destPath: ""
120
+ },
121
+ {
122
+ srcPath: "/_api/data",
123
+ destPath: ""
124
+ },
125
+ {
126
+ srcPath: "/_api/cloud-data",
127
+ destPath: ""
128
+ }
129
+ ],
130
+ "dev._base_domain_": [
131
+ {
132
+ srcPath: "/_api/cloud-data",
133
+ destPath: ""
134
+ }
135
+ ],
136
+ "bo._base_domain_": [
137
+ {
138
+ srcPath: "/_api/cloud-data/v1",
139
+ destPath: "/v1"
140
+ },
141
+ {
142
+ srcPath: "/_api/cloud-data/v2",
143
+ destPath: "/v2"
144
+ }
145
+ ],
146
+ "wixbo.ai": [
147
+ {
148
+ srcPath: "/_api/cloud-data/v1",
149
+ destPath: "/v1"
150
+ },
151
+ {
152
+ srcPath: "/_api/cloud-data/v2",
153
+ destPath: "/v2"
154
+ }
155
+ ],
156
+ "wix-bo.com": [
157
+ {
158
+ srcPath: "/_api/cloud-data/v1",
159
+ destPath: "/v1"
160
+ },
161
+ {
162
+ srcPath: "/_api/cloud-data/v2",
163
+ destPath: "/v2"
164
+ }
165
+ ],
166
+ "manage._base_domain_": [
167
+ {
168
+ srcPath: "/_api/cloud-data",
169
+ destPath: ""
170
+ },
171
+ {
172
+ srcPath: "/_api/data",
173
+ destPath: ""
174
+ },
175
+ {
176
+ srcPath: "/_api/cloud-data",
177
+ destPath: ""
178
+ }
179
+ ],
180
+ "editor._base_domain_": [
181
+ {
182
+ srcPath: "/_api/cloud-data/v1/schemas",
183
+ destPath: "/v1/schemas"
184
+ },
185
+ {
186
+ srcPath: "/_api/cloud-data/dbs/tasks",
187
+ destPath: "/dbs/tasks"
188
+ },
189
+ {
190
+ srcPath: "/_api/data/v1/schemas",
191
+ destPath: "/v1/schemas"
192
+ },
193
+ {
194
+ srcPath: "/_api/data/dbs/tasks",
195
+ destPath: "/dbs/tasks"
196
+ },
197
+ {
198
+ srcPath: "/_api/cloud-data/v1/wix-data",
199
+ destPath: "/v1/wix-data"
200
+ },
201
+ {
202
+ srcPath: "/_api/cloud-data/v1/data-settings",
203
+ destPath: "/v1/data-settings"
204
+ },
205
+ {
206
+ srcPath: "/_api/data/v2/indexes",
207
+ destPath: "/v2/indexes"
208
+ },
209
+ {
210
+ srcPath: "/_api/cloud-data/v1/external-database-connections",
211
+ destPath: "/v1/external-database-connections"
212
+ },
213
+ {
214
+ srcPath: "/_api/data/v1/data-collection-sharing",
215
+ destPath: "/v1/data-collection-sharing"
216
+ },
217
+ {
218
+ srcPath: "/_api/cloud-data/v2/collections",
219
+ destPath: "/v2/collections"
220
+ },
221
+ {
222
+ srcPath: "/_api/cloud-data/v2/bulk",
223
+ destPath: "/v2/bulk"
224
+ },
225
+ {
226
+ srcPath: "/_api/cloud-data/v2/items",
227
+ destPath: "/v2/items"
228
+ },
229
+ {
230
+ srcPath: "/_api/cloud-data/v2/dbs/tasks",
231
+ destPath: "/v2/dbs/tasks"
232
+ }
233
+ ],
234
+ "blocks._base_domain_": [
235
+ {
236
+ srcPath: "/_api/cloud-data/v1/schemas",
237
+ destPath: "/v1/schemas"
238
+ },
239
+ {
240
+ srcPath: "/_api/cloud-data/dbs/tasks",
241
+ destPath: "/dbs/tasks"
242
+ },
243
+ {
244
+ srcPath: "/_api/data/v1/schemas",
245
+ destPath: "/v1/schemas"
246
+ },
247
+ {
248
+ srcPath: "/_api/data/dbs/tasks",
249
+ destPath: "/dbs/tasks"
250
+ },
251
+ {
252
+ srcPath: "/_api/cloud-data/v1/wix-data",
253
+ destPath: "/v1/wix-data"
254
+ },
255
+ {
256
+ srcPath: "/_api/cloud-data/v1/data-settings",
257
+ destPath: "/v1/data-settings"
258
+ },
259
+ {
260
+ srcPath: "/_api/data/v2/indexes",
261
+ destPath: "/v2/indexes"
262
+ },
263
+ {
264
+ srcPath: "/_api/cloud-data/v1/external-database-connections",
265
+ destPath: "/v1/external-database-connections"
266
+ },
267
+ {
268
+ srcPath: "/_api/data/v1/data-collection-sharing",
269
+ destPath: "/v1/data-collection-sharing"
270
+ },
271
+ {
272
+ srcPath: "/_api/cloud-data/v2/collections",
273
+ destPath: "/v2/collections"
274
+ },
275
+ {
276
+ srcPath: "/_api/cloud-data/v2/bulk",
277
+ destPath: "/v2/bulk"
278
+ },
279
+ {
280
+ srcPath: "/_api/cloud-data/v2/items",
281
+ destPath: "/v2/items"
282
+ },
283
+ {
284
+ srcPath: "/_api/cloud-data/v2/dbs/tasks",
285
+ destPath: "/v2/dbs/tasks"
286
+ }
287
+ ],
288
+ "create.editorx": [
289
+ {
290
+ srcPath: "/_api/cloud-data/v1/schemas",
291
+ destPath: "/v1/schemas"
292
+ },
293
+ {
294
+ srcPath: "/_api/cloud-data/dbs/tasks",
295
+ destPath: "/dbs/tasks"
296
+ },
297
+ {
298
+ srcPath: "/_api/data/v1/schemas",
299
+ destPath: "/v1/schemas"
300
+ },
301
+ {
302
+ srcPath: "/_api/data/dbs/tasks",
303
+ destPath: "/dbs/tasks"
304
+ },
305
+ {
306
+ srcPath: "/_api/cloud-data/v1/wix-data",
307
+ destPath: "/v1/wix-data"
308
+ },
309
+ {
310
+ srcPath: "/_api/cloud-data/v1/data-settings",
311
+ destPath: "/v1/data-settings"
312
+ },
313
+ {
314
+ srcPath: "/_api/data/v2/indexes",
315
+ destPath: "/v2/indexes"
316
+ },
317
+ {
318
+ srcPath: "/_api/cloud-data/v1/external-database-connections",
319
+ destPath: "/v1/external-database-connections"
320
+ },
321
+ {
322
+ srcPath: "/_api/data/v1/data-collection-sharing",
323
+ destPath: "/v1/data-collection-sharing"
324
+ },
325
+ {
326
+ srcPath: "/_api/cloud-data/v2/collections",
327
+ destPath: "/v2/collections"
328
+ },
329
+ {
330
+ srcPath: "/_api/cloud-data/v2/bulk",
331
+ destPath: "/v2/bulk"
332
+ },
333
+ {
334
+ srcPath: "/_api/cloud-data/v2/items",
335
+ destPath: "/v2/items"
336
+ },
337
+ {
338
+ srcPath: "/_api/cloud-data/v2/dbs/tasks",
339
+ destPath: "/v2/dbs/tasks"
340
+ }
341
+ ],
342
+ "www.wixapis.com": [
343
+ {
344
+ srcPath: "/wix-data/v1/collections",
345
+ destPath: "/v1/wix-data/collections"
346
+ },
347
+ {
348
+ srcPath: "/wix-data/v1/external-database-connections",
349
+ destPath: "/v1/external-database-connections"
350
+ },
351
+ {
352
+ srcPath: "/wix-data/v2/indexes",
353
+ destPath: "/v2/indexes"
354
+ },
355
+ {
356
+ srcPath: "/wix-data/v1/items",
357
+ destPath: "/v1/items"
358
+ },
359
+ {
360
+ srcPath: "/wix-data/v1/bulk",
361
+ destPath: "/v1/bulk"
362
+ },
363
+ {
364
+ srcPath: "/wix-data/v1/external-databases",
365
+ destPath: "/v1/external-databases"
366
+ },
367
+ {
368
+ srcPath: "/wix-data/v2",
369
+ destPath: "/v2"
370
+ }
371
+ ],
372
+ "www.wixgateway.com": [
373
+ {
374
+ srcPath: "/wix-data/v1/items",
375
+ destPath: "/v1/items"
376
+ },
377
+ {
378
+ srcPath: "/wix-data/v1/bulk",
379
+ destPath: "/v1/bulk"
380
+ }
381
+ ],
382
+ "*.dev.wix-code.com": [
383
+ {
384
+ srcPath: "/_api/cloud-data/v2",
385
+ destPath: "/v2"
386
+ }
387
+ ]
388
+ };
389
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
390
+ }
391
+ var PACKAGE_NAME = "@wix/auto_sdk_data_collections";
392
+ function createDataCollection(payload) {
393
+ function __createDataCollection({ host }) {
394
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
395
+ {
396
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
397
+ paths: [
398
+ { path: "collection.createdDate" },
399
+ { path: "collection.updatedDate" }
400
+ ]
401
+ },
402
+ {
403
+ transformFn: import_float.transformSDKFloatToRESTFloat,
404
+ paths: [
405
+ { path: "collection.fields.numberRange.min" },
406
+ { path: "collection.fields.numberRange.max" }
407
+ ]
408
+ }
409
+ ]);
410
+ const metadata = {
411
+ entityFqdn: "wix.data.v2.data_collection",
412
+ method: "POST",
413
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.CreateDataCollection",
414
+ packageName: PACKAGE_NAME,
415
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
416
+ { protoPath: "/v2/collections", data: serializedData, host }
417
+ ),
418
+ data: serializedData,
419
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
420
+ {
421
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
422
+ paths: [
423
+ { path: "collection.createdDate" },
424
+ { path: "collection.updatedDate" }
425
+ ]
426
+ },
427
+ {
428
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
429
+ paths: [
430
+ { path: "collection.fields.numberRange.min" },
431
+ { path: "collection.fields.numberRange.max" }
432
+ ]
433
+ }
434
+ ])
435
+ };
436
+ return metadata;
437
+ }
438
+ return __createDataCollection;
439
+ }
440
+ function getDataCollection(payload) {
441
+ function __getDataCollection({ host }) {
442
+ const metadata = {
443
+ entityFqdn: "wix.data.v2.data_collection",
444
+ method: "GET",
445
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.GetDataCollection",
446
+ packageName: PACKAGE_NAME,
447
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
448
+ { protoPath: "/v2/collections/{dataCollectionId}", data: payload, host }
449
+ ),
450
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
451
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
452
+ {
453
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
454
+ paths: [
455
+ { path: "collection.createdDate" },
456
+ { path: "collection.updatedDate" },
457
+ { path: "referencedCollections.createdDate" },
458
+ { path: "referencedCollections.updatedDate" }
459
+ ]
460
+ },
461
+ {
462
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
463
+ paths: [
464
+ { path: "collection.fields.numberRange.min" },
465
+ { path: "collection.fields.numberRange.max" },
466
+ { path: "referencedCollections.fields.numberRange.min" },
467
+ { path: "referencedCollections.fields.numberRange.max" }
468
+ ]
469
+ }
470
+ ])
471
+ };
472
+ return metadata;
473
+ }
474
+ return __getDataCollection;
475
+ }
476
+ function listDataCollections(payload) {
477
+ function __listDataCollections({ host }) {
478
+ const metadata = {
479
+ entityFqdn: "wix.data.v2.data_collection",
480
+ method: "GET",
481
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.ListDataCollections",
482
+ packageName: PACKAGE_NAME,
483
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
484
+ { protoPath: "/v2/collections", data: payload, host }
485
+ ),
486
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
487
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
488
+ {
489
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
490
+ paths: [
491
+ { path: "collections.createdDate" },
492
+ { path: "collections.updatedDate" }
493
+ ]
494
+ },
495
+ {
496
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
497
+ paths: [
498
+ { path: "collections.fields.numberRange.min" },
499
+ { path: "collections.fields.numberRange.max" }
500
+ ]
501
+ }
502
+ ])
503
+ };
504
+ return metadata;
505
+ }
506
+ return __listDataCollections;
507
+ }
508
+ function updateDataCollection(payload) {
509
+ function __updateDataCollection({ host }) {
510
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
511
+ {
512
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
513
+ paths: [
514
+ { path: "collection.createdDate" },
515
+ { path: "collection.updatedDate" }
516
+ ]
517
+ },
518
+ {
519
+ transformFn: import_float.transformSDKFloatToRESTFloat,
520
+ paths: [
521
+ { path: "collection.fields.numberRange.min" },
522
+ { path: "collection.fields.numberRange.max" }
523
+ ]
524
+ }
525
+ ]);
526
+ const metadata = {
527
+ entityFqdn: "wix.data.v2.data_collection",
528
+ method: "PUT",
529
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.UpdateDataCollection",
530
+ packageName: PACKAGE_NAME,
531
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
532
+ { protoPath: "/v2/collections", data: serializedData, host }
533
+ ),
534
+ data: serializedData,
535
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
536
+ {
537
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
538
+ paths: [
539
+ { path: "collection.createdDate" },
540
+ { path: "collection.updatedDate" }
541
+ ]
542
+ },
543
+ {
544
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
545
+ paths: [
546
+ { path: "collection.fields.numberRange.min" },
547
+ { path: "collection.fields.numberRange.max" }
548
+ ]
549
+ }
550
+ ])
551
+ };
552
+ return metadata;
553
+ }
554
+ return __updateDataCollection;
555
+ }
556
+ function deleteDataCollection(payload) {
557
+ function __deleteDataCollection({ host }) {
558
+ const metadata = {
559
+ entityFqdn: "wix.data.v2.data_collection",
560
+ method: "DELETE",
561
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollection",
562
+ packageName: PACKAGE_NAME,
563
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
564
+ { protoPath: "/v2/collections/{dataCollectionId}", data: payload, host }
565
+ ),
566
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
567
+ };
568
+ return metadata;
569
+ }
570
+ return __deleteDataCollection;
571
+ }
572
+ function restoreDataCollection(payload) {
573
+ function __restoreDataCollection({ host }) {
574
+ const metadata = {
575
+ entityFqdn: "wix.data.v2.data_collection",
576
+ method: "POST",
577
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.RestoreDataCollection",
578
+ packageName: PACKAGE_NAME,
579
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
580
+ {
581
+ protoPath: "/v2/collections/restore/{dataCollectionId}",
582
+ data: payload,
583
+ host
584
+ }
585
+ ),
586
+ data: payload,
587
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
588
+ {
589
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
590
+ paths: [
591
+ { path: "dataCollection.createdDate" },
592
+ { path: "dataCollection.updatedDate" }
593
+ ]
594
+ },
595
+ {
596
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
597
+ paths: [
598
+ { path: "dataCollection.fields.numberRange.min" },
599
+ { path: "dataCollection.fields.numberRange.max" }
600
+ ]
601
+ }
602
+ ])
603
+ };
604
+ return metadata;
605
+ }
606
+ return __restoreDataCollection;
607
+ }
608
+ function createDataCollectionField(payload) {
609
+ function __createDataCollectionField({ host }) {
610
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
611
+ {
612
+ transformFn: import_float.transformSDKFloatToRESTFloat,
613
+ paths: [
614
+ { path: "field.numberRange.min" },
615
+ { path: "field.numberRange.max" }
616
+ ]
617
+ }
618
+ ]);
619
+ const metadata = {
620
+ entityFqdn: "wix.data.v2.data_collection",
621
+ method: "POST",
622
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.CreateDataCollectionField",
623
+ packageName: PACKAGE_NAME,
624
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
625
+ {
626
+ protoPath: "/v2/collections/create-field",
627
+ data: serializedData,
628
+ host
629
+ }
630
+ ),
631
+ data: serializedData,
632
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
633
+ {
634
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
635
+ paths: [
636
+ { path: "dataCollection.createdDate" },
637
+ { path: "dataCollection.updatedDate" }
638
+ ]
639
+ },
640
+ {
641
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
642
+ paths: [
643
+ { path: "dataCollection.fields.numberRange.min" },
644
+ { path: "dataCollection.fields.numberRange.max" }
645
+ ]
646
+ }
647
+ ])
648
+ };
649
+ return metadata;
650
+ }
651
+ return __createDataCollectionField;
652
+ }
653
+ function updateDataCollectionField(payload) {
654
+ function __updateDataCollectionField({ host }) {
655
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
656
+ {
657
+ transformFn: import_float.transformSDKFloatToRESTFloat,
658
+ paths: [
659
+ { path: "field.numberRange.min" },
660
+ { path: "field.numberRange.max" }
661
+ ]
662
+ }
663
+ ]);
664
+ const metadata = {
665
+ entityFqdn: "wix.data.v2.data_collection",
666
+ method: "POST",
667
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.UpdateDataCollectionField",
668
+ packageName: PACKAGE_NAME,
669
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
670
+ {
671
+ protoPath: "/v2/collections/update-field",
672
+ data: serializedData,
673
+ host
674
+ }
675
+ ),
676
+ data: serializedData,
677
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
678
+ {
679
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
680
+ paths: [
681
+ { path: "dataCollection.createdDate" },
682
+ { path: "dataCollection.updatedDate" }
683
+ ]
684
+ },
685
+ {
686
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
687
+ paths: [
688
+ { path: "dataCollection.fields.numberRange.min" },
689
+ { path: "dataCollection.fields.numberRange.max" }
690
+ ]
691
+ }
692
+ ])
693
+ };
694
+ return metadata;
695
+ }
696
+ return __updateDataCollectionField;
697
+ }
698
+ function deleteDataCollectionField(payload) {
699
+ function __deleteDataCollectionField({ host }) {
700
+ const metadata = {
701
+ entityFqdn: "wix.data.v2.data_collection",
702
+ method: "POST",
703
+ methodFqn: "com.wixpress.cloud.data.api.collectionservice.DataCollectionService.DeleteDataCollectionField",
704
+ packageName: PACKAGE_NAME,
705
+ url: resolveComWixpressCloudDataApiCollectionserviceDataCollectionServiceUrl(
706
+ { protoPath: "/v2/collections/delete-field", data: payload, host }
707
+ ),
708
+ data: payload,
709
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
710
+ {
711
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
712
+ paths: [
713
+ { path: "dataCollection.createdDate" },
714
+ { path: "dataCollection.updatedDate" }
715
+ ]
716
+ },
717
+ {
718
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
719
+ paths: [
720
+ { path: "dataCollection.fields.numberRange.min" },
721
+ { path: "dataCollection.fields.numberRange.max" }
722
+ ]
723
+ }
724
+ ])
725
+ };
726
+ return metadata;
727
+ }
728
+ return __deleteDataCollectionField;
729
+ }
730
+
731
+ // src/data-v2-data-collection-collections.universal.ts
732
+ var CollectionType = /* @__PURE__ */ ((CollectionType2) => {
733
+ CollectionType2["NATIVE"] = "NATIVE";
734
+ CollectionType2["WIX_APP"] = "WIX_APP";
735
+ CollectionType2["BLOCKS_APP"] = "BLOCKS_APP";
736
+ CollectionType2["EXTERNAL"] = "EXTERNAL";
737
+ return CollectionType2;
738
+ })(CollectionType || {});
739
+ var Direction = /* @__PURE__ */ ((Direction2) => {
740
+ Direction2["ASC"] = "ASC";
741
+ Direction2["DESC"] = "DESC";
742
+ return Direction2;
743
+ })(Direction || {});
744
+ var DataOperation = /* @__PURE__ */ ((DataOperation2) => {
745
+ DataOperation2["AGGREGATE"] = "AGGREGATE";
746
+ DataOperation2["BULK_INSERT"] = "BULK_INSERT";
747
+ DataOperation2["BULK_REMOVE"] = "BULK_REMOVE";
748
+ DataOperation2["BULK_SAVE"] = "BULK_SAVE";
749
+ DataOperation2["BULK_UPDATE"] = "BULK_UPDATE";
750
+ DataOperation2["COUNT"] = "COUNT";
751
+ DataOperation2["DISTINCT"] = "DISTINCT";
752
+ DataOperation2["FIND"] = "FIND";
753
+ DataOperation2["GET"] = "GET";
754
+ DataOperation2["INSERT"] = "INSERT";
755
+ DataOperation2["INSERT_REFERENCE"] = "INSERT_REFERENCE";
756
+ DataOperation2["IS_REFERENCED"] = "IS_REFERENCED";
757
+ DataOperation2["QUERY_REFERENCED"] = "QUERY_REFERENCED";
758
+ DataOperation2["REMOVE"] = "REMOVE";
759
+ DataOperation2["REMOVE_REFERENCE"] = "REMOVE_REFERENCE";
760
+ DataOperation2["REPLACE_REFERENCES"] = "REPLACE_REFERENCES";
761
+ DataOperation2["SAVE"] = "SAVE";
762
+ DataOperation2["TRUNCATE"] = "TRUNCATE";
763
+ DataOperation2["UPDATE"] = "UPDATE";
764
+ DataOperation2["PATCH"] = "PATCH";
765
+ DataOperation2["BULK_PATCH"] = "BULK_PATCH";
766
+ return DataOperation2;
767
+ })(DataOperation || {});
768
+ var CollectionOperation = /* @__PURE__ */ ((CollectionOperation2) => {
769
+ CollectionOperation2["UPDATE"] = "UPDATE";
770
+ CollectionOperation2["REMOVE"] = "REMOVE";
771
+ return CollectionOperation2;
772
+ })(CollectionOperation || {});
773
+ var Type = /* @__PURE__ */ ((Type2) => {
774
+ Type2["UNKNOWN_FIELD_TYPE"] = "UNKNOWN_FIELD_TYPE";
775
+ Type2["TEXT"] = "TEXT";
776
+ Type2["NUMBER"] = "NUMBER";
777
+ Type2["DATE"] = "DATE";
778
+ Type2["DATETIME"] = "DATETIME";
779
+ Type2["IMAGE"] = "IMAGE";
780
+ Type2["BOOLEAN"] = "BOOLEAN";
781
+ Type2["DOCUMENT"] = "DOCUMENT";
782
+ Type2["URL"] = "URL";
783
+ Type2["RICH_TEXT"] = "RICH_TEXT";
784
+ Type2["VIDEO"] = "VIDEO";
785
+ Type2["ANY"] = "ANY";
786
+ Type2["ARRAY_STRING"] = "ARRAY_STRING";
787
+ Type2["ARRAY_DOCUMENT"] = "ARRAY_DOCUMENT";
788
+ Type2["AUDIO"] = "AUDIO";
789
+ Type2["TIME"] = "TIME";
790
+ Type2["LANGUAGE"] = "LANGUAGE";
791
+ Type2["RICH_CONTENT"] = "RICH_CONTENT";
792
+ Type2["MEDIA_GALLERY"] = "MEDIA_GALLERY";
793
+ Type2["ADDRESS"] = "ADDRESS";
794
+ Type2["PAGE_LINK"] = "PAGE_LINK";
795
+ Type2["REFERENCE"] = "REFERENCE";
796
+ Type2["MULTI_REFERENCE"] = "MULTI_REFERENCE";
797
+ Type2["OBJECT"] = "OBJECT";
798
+ Type2["ARRAY"] = "ARRAY";
799
+ Type2["LEGACY_TIME"] = "LEGACY_TIME";
800
+ Type2["LEGACY_BOOK"] = "LEGACY_BOOK";
801
+ Type2["LEGACY_EXTERNAL_URL"] = "LEGACY_EXTERNAL_URL";
802
+ Type2["LEGACY_BROKEN_REFERENCE"] = "LEGACY_BROKEN_REFERENCE";
803
+ Type2["LEGACY_IMAGE"] = "LEGACY_IMAGE";
804
+ Type2["LEGACY_COLOR"] = "LEGACY_COLOR";
805
+ Type2["LEGACY_EXTERNAL_VIDEO"] = "LEGACY_EXTERNAL_VIDEO";
806
+ return Type2;
807
+ })(Type || {});
808
+ var QueryOperator = /* @__PURE__ */ ((QueryOperator2) => {
809
+ QueryOperator2["EQ"] = "EQ";
810
+ QueryOperator2["LT"] = "LT";
811
+ QueryOperator2["GT"] = "GT";
812
+ QueryOperator2["NE"] = "NE";
813
+ QueryOperator2["LTE"] = "LTE";
814
+ QueryOperator2["GTE"] = "GTE";
815
+ QueryOperator2["STARTS_WITH"] = "STARTS_WITH";
816
+ QueryOperator2["ENDS_WITH"] = "ENDS_WITH";
817
+ QueryOperator2["CONTAINS"] = "CONTAINS";
818
+ QueryOperator2["HAS_SOME"] = "HAS_SOME";
819
+ QueryOperator2["HAS_ALL"] = "HAS_ALL";
820
+ QueryOperator2["EXISTS"] = "EXISTS";
821
+ QueryOperator2["URLIZED"] = "URLIZED";
822
+ return QueryOperator2;
823
+ })(QueryOperator || {});
824
+ var FieldPluginType = /* @__PURE__ */ ((FieldPluginType2) => {
825
+ FieldPluginType2["UNKNOWN"] = "UNKNOWN";
826
+ FieldPluginType2["CMS"] = "CMS";
827
+ return FieldPluginType2;
828
+ })(FieldPluginType || {});
829
+ var Role = /* @__PURE__ */ ((Role2) => {
830
+ Role2["UNKNOWN_ROLE"] = "UNKNOWN_ROLE";
831
+ Role2["ADMIN"] = "ADMIN";
832
+ Role2["SITE_MEMBER_AUTHOR"] = "SITE_MEMBER_AUTHOR";
833
+ Role2["SITE_MEMBER"] = "SITE_MEMBER";
834
+ Role2["ANYONE"] = "ANYONE";
835
+ return Role2;
836
+ })(Role || {});
837
+ var Status = /* @__PURE__ */ ((Status2) => {
838
+ Status2["UNKNOWN_PUBLISH_PLUGIN_STATUS"] = "UNKNOWN_PUBLISH_PLUGIN_STATUS";
839
+ Status2["PUBLISHED"] = "PUBLISHED";
840
+ Status2["DRAFT"] = "DRAFT";
841
+ return Status2;
842
+ })(Status || {});
843
+ var Format = /* @__PURE__ */ ((Format2) => {
844
+ Format2["UNKNOWN_URLIZED_PLUGIN_FORMAT"] = "UNKNOWN_URLIZED_PLUGIN_FORMAT";
845
+ Format2["ORIGINAL"] = "ORIGINAL";
846
+ Format2["PLAIN"] = "PLAIN";
847
+ return Format2;
848
+ })(Format || {});
849
+ var PluginType = /* @__PURE__ */ ((PluginType2) => {
850
+ PluginType2["UNKNOWN_PLUGIN_TYPE"] = "UNKNOWN_PLUGIN_TYPE";
851
+ PluginType2["PUBLISH"] = "PUBLISH";
852
+ PluginType2["SINGLE_ITEM"] = "SINGLE_ITEM";
853
+ PluginType2["URLIZED"] = "URLIZED";
854
+ PluginType2["GRIDAPPLESS"] = "GRIDAPPLESS";
855
+ PluginType2["MULTILINGUAL"] = "MULTILINGUAL";
856
+ PluginType2["SHARED"] = "SHARED";
857
+ PluginType2["EDITABLE_PAGE_LINK"] = "EDITABLE_PAGE_LINK";
858
+ PluginType2["CMS"] = "CMS";
859
+ return PluginType2;
860
+ })(PluginType || {});
861
+ var PagingMode = /* @__PURE__ */ ((PagingMode2) => {
862
+ PagingMode2["OFFSET"] = "OFFSET";
863
+ PagingMode2["CURSOR"] = "CURSOR";
864
+ return PagingMode2;
865
+ })(PagingMode || {});
866
+ var AccessLevel = /* @__PURE__ */ ((AccessLevel2) => {
867
+ AccessLevel2["UNDEFINED"] = "UNDEFINED";
868
+ AccessLevel2["ANYONE"] = "ANYONE";
869
+ AccessLevel2["SITE_MEMBER"] = "SITE_MEMBER";
870
+ AccessLevel2["SITE_MEMBER_AUTHOR"] = "SITE_MEMBER_AUTHOR";
871
+ AccessLevel2["CMS_EDITOR"] = "CMS_EDITOR";
872
+ AccessLevel2["PRIVILEGED"] = "PRIVILEGED";
873
+ return AccessLevel2;
874
+ })(AccessLevel || {});
875
+ var Segment = /* @__PURE__ */ ((Segment2) => {
876
+ Segment2["UNKNOWN_SEGMENT"] = "UNKNOWN_SEGMENT";
877
+ Segment2["PUBLIC"] = "PUBLIC";
878
+ Segment2["DEV"] = "DEV";
879
+ return Segment2;
880
+ })(Segment || {});
881
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
882
+ SortOrder2["ASC"] = "ASC";
883
+ SortOrder2["DESC"] = "DESC";
884
+ return SortOrder2;
885
+ })(SortOrder || {});
886
+ var Order = /* @__PURE__ */ ((Order2) => {
887
+ Order2["ASC"] = "ASC";
888
+ Order2["DESC"] = "DESC";
889
+ return Order2;
890
+ })(Order || {});
891
+ var IndexStatus = /* @__PURE__ */ ((IndexStatus2) => {
892
+ IndexStatus2["UNKNOWN"] = "UNKNOWN";
893
+ IndexStatus2["BUILDING"] = "BUILDING";
894
+ IndexStatus2["ACTIVE"] = "ACTIVE";
895
+ IndexStatus2["DROPPING"] = "DROPPING";
896
+ IndexStatus2["DROPPED"] = "DROPPED";
897
+ IndexStatus2["FAILED"] = "FAILED";
898
+ IndexStatus2["INVALID"] = "INVALID";
899
+ return IndexStatus2;
900
+ })(IndexStatus || {});
901
+ var IndexSource = /* @__PURE__ */ ((IndexSource2) => {
902
+ IndexSource2["UNKNOWN_INDEX_SOURCE"] = "UNKNOWN_INDEX_SOURCE";
903
+ IndexSource2["SYSTEM"] = "SYSTEM";
904
+ IndexSource2["USER"] = "USER";
905
+ IndexSource2["AUTO"] = "AUTO";
906
+ return IndexSource2;
907
+ })(IndexSource || {});
908
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
909
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
910
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
911
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
912
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
913
+ WebhookIdentityType2["APP"] = "APP";
914
+ return WebhookIdentityType2;
915
+ })(WebhookIdentityType || {});
916
+ async function createDataCollection2(collection) {
917
+ const { httpClient, sideEffects } = arguments[1];
918
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
919
+ collection
920
+ });
921
+ const reqOpts = createDataCollection(payload);
922
+ sideEffects?.onSiteCall?.();
923
+ try {
924
+ const result = await httpClient.request(reqOpts);
925
+ sideEffects?.onSuccess?.(result);
926
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.collection;
927
+ } catch (err) {
928
+ const transformedError = (0, import_transform_error.transformError)(
929
+ err,
930
+ {
931
+ spreadPathsToArguments: {},
932
+ explicitPathsToArguments: { collection: "$[0]" },
933
+ singleArgumentUnchanged: false
934
+ },
935
+ ["collection"]
936
+ );
937
+ sideEffects?.onError?.(err);
938
+ throw transformedError;
939
+ }
940
+ }
941
+ async function getDataCollection2(dataCollectionId, options) {
942
+ const { httpClient, sideEffects } = arguments[2];
943
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
944
+ dataCollectionId,
945
+ consistentRead: options?.consistentRead,
946
+ fields: options?.fields
947
+ });
948
+ const reqOpts = getDataCollection(payload);
949
+ sideEffects?.onSiteCall?.();
950
+ try {
951
+ const result = await httpClient.request(reqOpts);
952
+ sideEffects?.onSuccess?.(result);
953
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.collection;
954
+ } catch (err) {
955
+ const transformedError = (0, import_transform_error.transformError)(
956
+ err,
957
+ {
958
+ spreadPathsToArguments: {},
959
+ explicitPathsToArguments: {
960
+ dataCollectionId: "$[0]",
961
+ consistentRead: "$[1].consistentRead",
962
+ fields: "$[1].fields"
963
+ },
964
+ singleArgumentUnchanged: false
965
+ },
966
+ ["dataCollectionId", "options"]
967
+ );
968
+ sideEffects?.onError?.(err);
969
+ throw transformedError;
970
+ }
971
+ }
972
+ async function listDataCollections2(options) {
973
+ const { httpClient, sideEffects } = arguments[1];
974
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
975
+ sort: options?.sort,
976
+ paging: options?.paging,
977
+ consistentRead: options?.consistentRead,
978
+ fields: options?.fields
979
+ });
980
+ const reqOpts = listDataCollections(payload);
981
+ sideEffects?.onSiteCall?.();
982
+ try {
983
+ const result = await httpClient.request(reqOpts);
984
+ sideEffects?.onSuccess?.(result);
985
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
986
+ } catch (err) {
987
+ const transformedError = (0, import_transform_error.transformError)(
988
+ err,
989
+ {
990
+ spreadPathsToArguments: {},
991
+ explicitPathsToArguments: {
992
+ sort: "$[0].sort",
993
+ paging: "$[0].paging",
994
+ consistentRead: "$[0].consistentRead",
995
+ fields: "$[0].fields"
996
+ },
997
+ singleArgumentUnchanged: false
998
+ },
999
+ ["options"]
1000
+ );
1001
+ sideEffects?.onError?.(err);
1002
+ throw transformedError;
1003
+ }
1004
+ }
1005
+ async function updateDataCollection2(collection) {
1006
+ const { httpClient, sideEffects } = arguments[1];
1007
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1008
+ collection
1009
+ });
1010
+ const reqOpts = updateDataCollection(payload);
1011
+ sideEffects?.onSiteCall?.();
1012
+ try {
1013
+ const result = await httpClient.request(reqOpts);
1014
+ sideEffects?.onSuccess?.(result);
1015
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.collection;
1016
+ } catch (err) {
1017
+ const transformedError = (0, import_transform_error.transformError)(
1018
+ err,
1019
+ {
1020
+ spreadPathsToArguments: {},
1021
+ explicitPathsToArguments: { collection: "$[0]" },
1022
+ singleArgumentUnchanged: false
1023
+ },
1024
+ ["collection"]
1025
+ );
1026
+ sideEffects?.onError?.(err);
1027
+ throw transformedError;
1028
+ }
1029
+ }
1030
+ async function deleteDataCollection2(dataCollectionId) {
1031
+ const { httpClient, sideEffects } = arguments[1];
1032
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1033
+ dataCollectionId
1034
+ });
1035
+ const reqOpts = deleteDataCollection(payload);
1036
+ sideEffects?.onSiteCall?.();
1037
+ try {
1038
+ const result = await httpClient.request(reqOpts);
1039
+ sideEffects?.onSuccess?.(result);
1040
+ } catch (err) {
1041
+ const transformedError = (0, import_transform_error.transformError)(
1042
+ err,
1043
+ {
1044
+ spreadPathsToArguments: {},
1045
+ explicitPathsToArguments: { dataCollectionId: "$[0]" },
1046
+ singleArgumentUnchanged: false
1047
+ },
1048
+ ["dataCollectionId"]
1049
+ );
1050
+ sideEffects?.onError?.(err);
1051
+ throw transformedError;
1052
+ }
1053
+ }
1054
+ async function restoreDataCollection2(dataCollectionId) {
1055
+ const { httpClient, sideEffects } = arguments[1];
1056
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1057
+ dataCollectionId
1058
+ });
1059
+ const reqOpts = restoreDataCollection(payload);
1060
+ sideEffects?.onSiteCall?.();
1061
+ try {
1062
+ const result = await httpClient.request(reqOpts);
1063
+ sideEffects?.onSuccess?.(result);
1064
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1065
+ } catch (err) {
1066
+ const transformedError = (0, import_transform_error.transformError)(
1067
+ err,
1068
+ {
1069
+ spreadPathsToArguments: {},
1070
+ explicitPathsToArguments: { dataCollectionId: "$[0]" },
1071
+ singleArgumentUnchanged: false
1072
+ },
1073
+ ["dataCollectionId"]
1074
+ );
1075
+ sideEffects?.onError?.(err);
1076
+ throw transformedError;
1077
+ }
1078
+ }
1079
+ async function createDataCollectionField2(dataCollectionId, options) {
1080
+ const { httpClient, sideEffects } = arguments[2];
1081
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1082
+ dataCollectionId,
1083
+ field: options?.field
1084
+ });
1085
+ const reqOpts = createDataCollectionField(payload);
1086
+ sideEffects?.onSiteCall?.();
1087
+ try {
1088
+ const result = await httpClient.request(reqOpts);
1089
+ sideEffects?.onSuccess?.(result);
1090
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1091
+ } catch (err) {
1092
+ const transformedError = (0, import_transform_error.transformError)(
1093
+ err,
1094
+ {
1095
+ spreadPathsToArguments: {},
1096
+ explicitPathsToArguments: {
1097
+ dataCollectionId: "$[0]",
1098
+ field: "$[1].field"
1099
+ },
1100
+ singleArgumentUnchanged: false
1101
+ },
1102
+ ["dataCollectionId", "options"]
1103
+ );
1104
+ sideEffects?.onError?.(err);
1105
+ throw transformedError;
1106
+ }
1107
+ }
1108
+ async function updateDataCollectionField2(dataCollectionId, options) {
1109
+ const { httpClient, sideEffects } = arguments[2];
1110
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1111
+ dataCollectionId,
1112
+ field: options?.field
1113
+ });
1114
+ const reqOpts = updateDataCollectionField(payload);
1115
+ sideEffects?.onSiteCall?.();
1116
+ try {
1117
+ const result = await httpClient.request(reqOpts);
1118
+ sideEffects?.onSuccess?.(result);
1119
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1120
+ } catch (err) {
1121
+ const transformedError = (0, import_transform_error.transformError)(
1122
+ err,
1123
+ {
1124
+ spreadPathsToArguments: {},
1125
+ explicitPathsToArguments: {
1126
+ dataCollectionId: "$[0]",
1127
+ field: "$[1].field"
1128
+ },
1129
+ singleArgumentUnchanged: false
1130
+ },
1131
+ ["dataCollectionId", "options"]
1132
+ );
1133
+ sideEffects?.onError?.(err);
1134
+ throw transformedError;
1135
+ }
1136
+ }
1137
+ async function deleteDataCollectionField2(dataCollectionId, options) {
1138
+ const { httpClient, sideEffects } = arguments[2];
1139
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1140
+ dataCollectionId,
1141
+ fieldKey: options?.fieldKey
1142
+ });
1143
+ const reqOpts = deleteDataCollectionField(payload);
1144
+ sideEffects?.onSiteCall?.();
1145
+ try {
1146
+ const result = await httpClient.request(reqOpts);
1147
+ sideEffects?.onSuccess?.(result);
1148
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1149
+ } catch (err) {
1150
+ const transformedError = (0, import_transform_error.transformError)(
1151
+ err,
1152
+ {
1153
+ spreadPathsToArguments: {},
1154
+ explicitPathsToArguments: {
1155
+ dataCollectionId: "$[0]",
1156
+ fieldKey: "$[1].fieldKey"
1157
+ },
1158
+ singleArgumentUnchanged: false
1159
+ },
1160
+ ["dataCollectionId", "options"]
1161
+ );
1162
+ sideEffects?.onError?.(err);
1163
+ throw transformedError;
1164
+ }
1165
+ }
1166
+
1167
+ // src/data-v2-data-collection-collections.public.ts
1168
+ function createDataCollection3(httpClient) {
1169
+ return (collection) => createDataCollection2(
1170
+ collection,
1171
+ // @ts-ignore
1172
+ { httpClient }
1173
+ );
1174
+ }
1175
+ function getDataCollection3(httpClient) {
1176
+ return (dataCollectionId, options) => getDataCollection2(
1177
+ dataCollectionId,
1178
+ options,
1179
+ // @ts-ignore
1180
+ { httpClient }
1181
+ );
1182
+ }
1183
+ function listDataCollections3(httpClient) {
1184
+ return (options) => listDataCollections2(
1185
+ options,
1186
+ // @ts-ignore
1187
+ { httpClient }
1188
+ );
1189
+ }
1190
+ function updateDataCollection3(httpClient) {
1191
+ return (collection) => updateDataCollection2(
1192
+ collection,
1193
+ // @ts-ignore
1194
+ { httpClient }
1195
+ );
1196
+ }
1197
+ function deleteDataCollection3(httpClient) {
1198
+ return (dataCollectionId) => deleteDataCollection2(
1199
+ dataCollectionId,
1200
+ // @ts-ignore
1201
+ { httpClient }
1202
+ );
1203
+ }
1204
+ function restoreDataCollection3(httpClient) {
1205
+ return (dataCollectionId) => restoreDataCollection2(
1206
+ dataCollectionId,
1207
+ // @ts-ignore
1208
+ { httpClient }
1209
+ );
1210
+ }
1211
+ function createDataCollectionField3(httpClient) {
1212
+ return (dataCollectionId, options) => createDataCollectionField2(
1213
+ dataCollectionId,
1214
+ options,
1215
+ // @ts-ignore
1216
+ { httpClient }
1217
+ );
1218
+ }
1219
+ function updateDataCollectionField3(httpClient) {
1220
+ return (dataCollectionId, options) => updateDataCollectionField2(
1221
+ dataCollectionId,
1222
+ options,
1223
+ // @ts-ignore
1224
+ { httpClient }
1225
+ );
1226
+ }
1227
+ function deleteDataCollectionField3(httpClient) {
1228
+ return (dataCollectionId, options) => deleteDataCollectionField2(
1229
+ dataCollectionId,
1230
+ options,
1231
+ // @ts-ignore
1232
+ { httpClient }
1233
+ );
1234
+ }
1235
+
1236
+ // src/data-v2-data-collection-collections.context.ts
1237
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1238
+ var createDataCollection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDataCollection3);
1239
+ var getDataCollection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDataCollection3);
1240
+ var listDataCollections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listDataCollections3);
1241
+ var updateDataCollection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateDataCollection3);
1242
+ var deleteDataCollection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteDataCollection3);
1243
+ var restoreDataCollection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(restoreDataCollection3);
1244
+ var createDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDataCollectionField3);
1245
+ var updateDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateDataCollectionField3);
1246
+ var deleteDataCollectionField4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteDataCollectionField3);
1247
+ // Annotate the CommonJS export names for ESM import in node:
1248
+ 0 && (module.exports = {
1249
+ AccessLevel,
1250
+ CollectionOperation,
1251
+ CollectionType,
1252
+ DataOperation,
1253
+ Direction,
1254
+ FieldPluginType,
1255
+ Format,
1256
+ IndexSource,
1257
+ IndexStatus,
1258
+ Order,
1259
+ PagingMode,
1260
+ PluginType,
1261
+ QueryOperator,
1262
+ Role,
1263
+ Segment,
1264
+ SortOrder,
1265
+ Status,
1266
+ Type,
1267
+ WebhookIdentityType,
1268
+ createDataCollection,
1269
+ createDataCollectionField,
1270
+ deleteDataCollection,
1271
+ deleteDataCollectionField,
1272
+ getDataCollection,
1273
+ listDataCollections,
1274
+ restoreDataCollection,
1275
+ updateDataCollection,
1276
+ updateDataCollectionField
1277
+ });
18
1278
  //# sourceMappingURL=index.js.map