@wix/auto_sdk_stores_catalog-imports-v-3 1.0.0

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 (39) hide show
  1. package/build/cjs/index.d.ts +3168 -0
  2. package/build/cjs/index.js +913 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +883 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +3057 -0
  8. package/build/cjs/meta.js +371 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +3168 -0
  11. package/build/es/index.mjs +839 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +1 -0
  14. package/build/es/index.typings.mjs +809 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +3057 -0
  17. package/build/es/meta.mjs +342 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +55 -0
  21. package/build/internal/cjs/index.js +913 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +3233 -0
  24. package/build/internal/cjs/index.typings.js +883 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +3058 -0
  27. package/build/internal/cjs/meta.js +371 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +55 -0
  30. package/build/internal/es/index.mjs +839 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +3233 -0
  33. package/build/internal/es/index.typings.mjs +809 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +3058 -0
  36. package/build/internal/es/meta.mjs +342 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,913 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ Alignment: () => Alignment,
24
+ AppType: () => AppType,
25
+ AspectRatio: () => AspectRatio,
26
+ BackgroundType: () => BackgroundType,
27
+ ButtonDataType: () => ButtonDataType,
28
+ ChoiceType: () => ChoiceType,
29
+ Crop: () => Crop,
30
+ DecorationType: () => DecorationType,
31
+ Direction: () => Direction,
32
+ DiscountType: () => DiscountType,
33
+ DividerDataAlignment: () => DividerDataAlignment,
34
+ FileType: () => FileType,
35
+ FontType: () => FontType,
36
+ GIFType: () => GIFType,
37
+ InitialExpandedItems: () => InitialExpandedItems,
38
+ Layout: () => Layout,
39
+ LayoutType: () => LayoutType,
40
+ LineStyle: () => LineStyle,
41
+ MapType: () => MapType,
42
+ MeasurementUnit: () => MeasurementUnit,
43
+ MediaType: () => MediaType,
44
+ ModifierRenderType: () => ModifierRenderType,
45
+ NodeType: () => NodeType,
46
+ NullValue: () => NullValue,
47
+ Orientation: () => Orientation,
48
+ Placement: () => Placement,
49
+ PluginContainerDataAlignment: () => PluginContainerDataAlignment,
50
+ PollLayoutDirection: () => PollLayoutDirection,
51
+ PollLayoutType: () => PollLayoutType,
52
+ Position: () => Position,
53
+ ProductOptionRenderType: () => ProductOptionRenderType,
54
+ ProductType: () => ProductType,
55
+ Resizing: () => Resizing,
56
+ Source: () => Source,
57
+ StylesPosition: () => StylesPosition,
58
+ SubscriptionFrequency: () => SubscriptionFrequency,
59
+ Target: () => Target,
60
+ TextAlignment: () => TextAlignment,
61
+ ThumbnailsAlignment: () => ThumbnailsAlignment,
62
+ Type: () => Type,
63
+ VerticalAlignment: () => VerticalAlignment,
64
+ ViewMode: () => ViewMode,
65
+ ViewRole: () => ViewRole,
66
+ VoteRole: () => VoteRole,
67
+ WebhookIdentityType: () => WebhookIdentityType,
68
+ WeightUnit: () => WeightUnit,
69
+ Width: () => Width,
70
+ WidthType: () => WidthType,
71
+ addProductsToImport: () => addProductsToImport4,
72
+ createCatalogImport: () => createCatalogImport4,
73
+ submitCatalogImport: () => submitCatalogImport4
74
+ });
75
+ module.exports = __toCommonJS(index_exports);
76
+
77
+ // src/stores-catalog-v3-catalog-import-catalog-imports-v-3.universal.ts
78
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
79
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
80
+
81
+ // src/stores-catalog-v3-catalog-import-catalog-imports-v-3.http.ts
82
+ var import_float = require("@wix/sdk-runtime/transformations/float");
83
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
84
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
85
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
86
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
87
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
88
+ function resolveWixStoresCatalogCatalogImportV3CatalogImportsUrl(opts) {
89
+ const domainToMappings = {
90
+ "www.wixapis.com": [
91
+ {
92
+ srcPath: "/stores/v3/catalog-imports",
93
+ destPath: "/v3/catalog-imports"
94
+ }
95
+ ]
96
+ };
97
+ return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
98
+ }
99
+ var PACKAGE_NAME = "@wix/auto_sdk_stores_catalog-imports-v-3";
100
+ function createCatalogImport(payload) {
101
+ function __createCatalogImport({ host }) {
102
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
103
+ {
104
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
105
+ paths: [{ path: "catalogImport.createdDate" }]
106
+ }
107
+ ]);
108
+ const metadata = {
109
+ entityFqdn: "wix.stores.catalog.v3.catalog_import",
110
+ method: "POST",
111
+ methodFqn: "wix.stores.catalog.catalog_import.v3.CatalogImports.CreateCatalogImport",
112
+ packageName: PACKAGE_NAME,
113
+ url: resolveWixStoresCatalogCatalogImportV3CatalogImportsUrl({
114
+ protoPath: "/v3/catalog-imports",
115
+ data: serializedData,
116
+ host
117
+ }),
118
+ data: serializedData,
119
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
120
+ {
121
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
122
+ paths: [{ path: "catalogImport.createdDate" }]
123
+ }
124
+ ])
125
+ };
126
+ return metadata;
127
+ }
128
+ return __createCatalogImport;
129
+ }
130
+ function addProductsToImport(payload) {
131
+ function __addProductsToImport({ host }) {
132
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
133
+ {
134
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
135
+ paths: [{ path: "products.fieldMask" }]
136
+ },
137
+ {
138
+ transformFn: import_float.transformSDKFloatToRESTFloat,
139
+ paths: [
140
+ { path: "products.product.physicalProperties.pricePerUnit.quantity" },
141
+ {
142
+ path: "products.product.physicalProperties.shippingWeightRange.minValue"
143
+ },
144
+ {
145
+ path: "products.product.physicalProperties.shippingWeightRange.maxValue"
146
+ },
147
+ {
148
+ path: "products.product.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity"
149
+ },
150
+ {
151
+ path: "products.product.variantsInfo.variants.revenueDetails.profitMargin"
152
+ },
153
+ {
154
+ path: "products.product.subscriptionDetails.subscriptions.discount.percentOff"
155
+ },
156
+ {
157
+ path: "products.product.description.nodes.galleryData.items.image.media.duration"
158
+ },
159
+ {
160
+ path: "products.product.description.nodes.galleryData.items.video.media.duration"
161
+ },
162
+ {
163
+ path: "products.product.description.nodes.galleryData.items.video.thumbnail.duration"
164
+ },
165
+ {
166
+ path: "products.product.description.nodes.galleryData.options.item.ratio"
167
+ },
168
+ {
169
+ path: "products.product.description.nodes.imageData.image.duration"
170
+ },
171
+ {
172
+ path: "products.product.description.nodes.mapData.mapSettings.lat"
173
+ },
174
+ {
175
+ path: "products.product.description.nodes.mapData.mapSettings.lng"
176
+ },
177
+ {
178
+ path: "products.product.description.nodes.pollData.poll.image.duration"
179
+ },
180
+ {
181
+ path: "products.product.description.nodes.pollData.poll.options.image.duration"
182
+ },
183
+ {
184
+ path: "products.product.description.nodes.pollData.design.poll.background.image.duration"
185
+ },
186
+ {
187
+ path: "products.product.description.nodes.appEmbedData.image.duration"
188
+ },
189
+ {
190
+ path: "products.product.description.nodes.videoData.video.duration"
191
+ },
192
+ {
193
+ path: "products.product.description.nodes.videoData.thumbnail.duration"
194
+ },
195
+ {
196
+ path: "products.product.description.nodes.audioData.audio.duration"
197
+ },
198
+ {
199
+ path: "products.product.description.nodes.audioData.coverImage.duration"
200
+ },
201
+ {
202
+ path: "products.product.infoSections.description.nodes.galleryData.items.image.media.duration"
203
+ },
204
+ {
205
+ path: "products.product.infoSections.description.nodes.galleryData.items.video.media.duration"
206
+ },
207
+ {
208
+ path: "products.product.infoSections.description.nodes.galleryData.items.video.thumbnail.duration"
209
+ },
210
+ {
211
+ path: "products.product.infoSections.description.nodes.galleryData.options.item.ratio"
212
+ },
213
+ {
214
+ path: "products.product.infoSections.description.nodes.imageData.image.duration"
215
+ },
216
+ {
217
+ path: "products.product.infoSections.description.nodes.mapData.mapSettings.lat"
218
+ },
219
+ {
220
+ path: "products.product.infoSections.description.nodes.mapData.mapSettings.lng"
221
+ },
222
+ {
223
+ path: "products.product.infoSections.description.nodes.pollData.poll.image.duration"
224
+ },
225
+ {
226
+ path: "products.product.infoSections.description.nodes.pollData.poll.options.image.duration"
227
+ },
228
+ {
229
+ path: "products.product.infoSections.description.nodes.pollData.design.poll.background.image.duration"
230
+ },
231
+ {
232
+ path: "products.product.infoSections.description.nodes.appEmbedData.image.duration"
233
+ },
234
+ {
235
+ path: "products.product.infoSections.description.nodes.videoData.video.duration"
236
+ },
237
+ {
238
+ path: "products.product.infoSections.description.nodes.videoData.thumbnail.duration"
239
+ },
240
+ {
241
+ path: "products.product.infoSections.description.nodes.audioData.audio.duration"
242
+ },
243
+ {
244
+ path: "products.product.infoSections.description.nodes.audioData.coverImage.duration"
245
+ },
246
+ {
247
+ path: "products.product.variantsInfo.variants.physicalProperties.weight"
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
253
+ paths: [
254
+ { path: "products.product.description.metadata.createdTimestamp" },
255
+ { path: "products.product.description.metadata.updatedTimestamp" },
256
+ { path: "products.product.media.main.image.urlExpirationDate" },
257
+ { path: "products.product.media.main.video.urlExpirationDate" },
258
+ {
259
+ path: "products.product.media.main.video.resolutions.urlExpirationDate"
260
+ },
261
+ {
262
+ path: "products.product.media.main.video.resolutions.poster.urlExpirationDate"
263
+ },
264
+ {
265
+ path: "products.product.media.main.video.posters.urlExpirationDate"
266
+ },
267
+ {
268
+ path: "products.product.media.itemsInfo.items.image.urlExpirationDate"
269
+ },
270
+ {
271
+ path: "products.product.media.itemsInfo.items.video.urlExpirationDate"
272
+ },
273
+ {
274
+ path: "products.product.media.itemsInfo.items.video.resolutions.urlExpirationDate"
275
+ },
276
+ {
277
+ path: "products.product.media.itemsInfo.items.video.resolutions.poster.urlExpirationDate"
278
+ },
279
+ {
280
+ path: "products.product.media.itemsInfo.items.video.posters.urlExpirationDate"
281
+ },
282
+ {
283
+ path: "products.product.options.choicesSettings.choices.image.urlExpirationDate"
284
+ },
285
+ {
286
+ path: "products.product.options.choicesSettings.choices.linkedMedia.image.urlExpirationDate"
287
+ },
288
+ {
289
+ path: "products.product.options.choicesSettings.choices.linkedMedia.video.urlExpirationDate"
290
+ },
291
+ {
292
+ path: "products.product.options.choicesSettings.choices.linkedMedia.video.resolutions.urlExpirationDate"
293
+ },
294
+ {
295
+ path: "products.product.options.choicesSettings.choices.linkedMedia.video.resolutions.poster.urlExpirationDate"
296
+ },
297
+ {
298
+ path: "products.product.options.choicesSettings.choices.linkedMedia.video.posters.urlExpirationDate"
299
+ },
300
+ {
301
+ path: "products.product.modifiers.choicesSettings.choices.image.urlExpirationDate"
302
+ },
303
+ {
304
+ path: "products.product.modifiers.choicesSettings.choices.linkedMedia.image.urlExpirationDate"
305
+ },
306
+ {
307
+ path: "products.product.modifiers.choicesSettings.choices.linkedMedia.video.urlExpirationDate"
308
+ },
309
+ {
310
+ path: "products.product.modifiers.choicesSettings.choices.linkedMedia.video.resolutions.urlExpirationDate"
311
+ },
312
+ {
313
+ path: "products.product.modifiers.choicesSettings.choices.linkedMedia.video.resolutions.poster.urlExpirationDate"
314
+ },
315
+ {
316
+ path: "products.product.modifiers.choicesSettings.choices.linkedMedia.video.posters.urlExpirationDate"
317
+ },
318
+ {
319
+ path: "products.product.infoSections.description.metadata.createdTimestamp"
320
+ },
321
+ {
322
+ path: "products.product.infoSections.description.metadata.updatedTimestamp"
323
+ }
324
+ ]
325
+ }
326
+ ]);
327
+ const metadata = {
328
+ entityFqdn: "wix.stores.catalog.v3.catalog_import",
329
+ method: "POST",
330
+ methodFqn: "wix.stores.catalog.catalog_import.v3.CatalogImports.AddProductsToImport",
331
+ packageName: PACKAGE_NAME,
332
+ url: resolveWixStoresCatalogCatalogImportV3CatalogImportsUrl({
333
+ protoPath: "/v3/catalog-imports/{catalogImportId}/add-products",
334
+ data: serializedData,
335
+ host
336
+ }),
337
+ data: serializedData
338
+ };
339
+ return metadata;
340
+ }
341
+ return __addProductsToImport;
342
+ }
343
+ function submitCatalogImport(payload) {
344
+ function __submitCatalogImport({ host }) {
345
+ const metadata = {
346
+ entityFqdn: "wix.stores.catalog.v3.catalog_import",
347
+ method: "POST",
348
+ methodFqn: "wix.stores.catalog.catalog_import.v3.CatalogImports.SubmitCatalogImport",
349
+ packageName: PACKAGE_NAME,
350
+ url: resolveWixStoresCatalogCatalogImportV3CatalogImportsUrl({
351
+ protoPath: "/v3/catalog-imports/{catalogImportId}/submit",
352
+ data: payload,
353
+ host
354
+ }),
355
+ data: payload
356
+ };
357
+ return metadata;
358
+ }
359
+ return __submitCatalogImport;
360
+ }
361
+
362
+ // src/stores-catalog-v3-catalog-import-catalog-imports-v-3.universal.ts
363
+ var import_image = require("@wix/sdk-runtime/transformations/image");
364
+ var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
365
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
366
+ var NodeType = /* @__PURE__ */ ((NodeType2) => {
367
+ NodeType2["PARAGRAPH"] = "PARAGRAPH";
368
+ NodeType2["TEXT"] = "TEXT";
369
+ NodeType2["HEADING"] = "HEADING";
370
+ NodeType2["BULLETED_LIST"] = "BULLETED_LIST";
371
+ NodeType2["ORDERED_LIST"] = "ORDERED_LIST";
372
+ NodeType2["LIST_ITEM"] = "LIST_ITEM";
373
+ NodeType2["BLOCKQUOTE"] = "BLOCKQUOTE";
374
+ NodeType2["CODE_BLOCK"] = "CODE_BLOCK";
375
+ NodeType2["VIDEO"] = "VIDEO";
376
+ NodeType2["DIVIDER"] = "DIVIDER";
377
+ NodeType2["FILE"] = "FILE";
378
+ NodeType2["GALLERY"] = "GALLERY";
379
+ NodeType2["GIF"] = "GIF";
380
+ NodeType2["HTML"] = "HTML";
381
+ NodeType2["IMAGE"] = "IMAGE";
382
+ NodeType2["LINK_PREVIEW"] = "LINK_PREVIEW";
383
+ NodeType2["MAP"] = "MAP";
384
+ NodeType2["POLL"] = "POLL";
385
+ NodeType2["APP_EMBED"] = "APP_EMBED";
386
+ NodeType2["BUTTON"] = "BUTTON";
387
+ NodeType2["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
388
+ NodeType2["TABLE"] = "TABLE";
389
+ NodeType2["EMBED"] = "EMBED";
390
+ NodeType2["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
391
+ NodeType2["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
392
+ NodeType2["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
393
+ NodeType2["TABLE_CELL"] = "TABLE_CELL";
394
+ NodeType2["TABLE_ROW"] = "TABLE_ROW";
395
+ NodeType2["EXTERNAL"] = "EXTERNAL";
396
+ NodeType2["AUDIO"] = "AUDIO";
397
+ NodeType2["CAPTION"] = "CAPTION";
398
+ NodeType2["LAYOUT"] = "LAYOUT";
399
+ NodeType2["LAYOUT_CELL"] = "LAYOUT_CELL";
400
+ return NodeType2;
401
+ })(NodeType || {});
402
+ var WidthType = /* @__PURE__ */ ((WidthType2) => {
403
+ WidthType2["CONTENT"] = "CONTENT";
404
+ WidthType2["SMALL"] = "SMALL";
405
+ WidthType2["ORIGINAL"] = "ORIGINAL";
406
+ WidthType2["FULL_WIDTH"] = "FULL_WIDTH";
407
+ return WidthType2;
408
+ })(WidthType || {});
409
+ var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignment2) => {
410
+ PluginContainerDataAlignment2["CENTER"] = "CENTER";
411
+ PluginContainerDataAlignment2["LEFT"] = "LEFT";
412
+ PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
413
+ return PluginContainerDataAlignment2;
414
+ })(PluginContainerDataAlignment || {});
415
+ var ButtonDataType = /* @__PURE__ */ ((ButtonDataType2) => {
416
+ ButtonDataType2["LINK"] = "LINK";
417
+ ButtonDataType2["ACTION"] = "ACTION";
418
+ return ButtonDataType2;
419
+ })(ButtonDataType || {});
420
+ var Target = /* @__PURE__ */ ((Target2) => {
421
+ Target2["SELF"] = "SELF";
422
+ Target2["BLANK"] = "BLANK";
423
+ Target2["PARENT"] = "PARENT";
424
+ Target2["TOP"] = "TOP";
425
+ return Target2;
426
+ })(Target || {});
427
+ var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
428
+ TextAlignment2["AUTO"] = "AUTO";
429
+ TextAlignment2["LEFT"] = "LEFT";
430
+ TextAlignment2["RIGHT"] = "RIGHT";
431
+ TextAlignment2["CENTER"] = "CENTER";
432
+ TextAlignment2["JUSTIFY"] = "JUSTIFY";
433
+ return TextAlignment2;
434
+ })(TextAlignment || {});
435
+ var LineStyle = /* @__PURE__ */ ((LineStyle2) => {
436
+ LineStyle2["SINGLE"] = "SINGLE";
437
+ LineStyle2["DOUBLE"] = "DOUBLE";
438
+ LineStyle2["DASHED"] = "DASHED";
439
+ LineStyle2["DOTTED"] = "DOTTED";
440
+ return LineStyle2;
441
+ })(LineStyle || {});
442
+ var Width = /* @__PURE__ */ ((Width2) => {
443
+ Width2["LARGE"] = "LARGE";
444
+ Width2["MEDIUM"] = "MEDIUM";
445
+ Width2["SMALL"] = "SMALL";
446
+ return Width2;
447
+ })(Width || {});
448
+ var DividerDataAlignment = /* @__PURE__ */ ((DividerDataAlignment2) => {
449
+ DividerDataAlignment2["CENTER"] = "CENTER";
450
+ DividerDataAlignment2["LEFT"] = "LEFT";
451
+ DividerDataAlignment2["RIGHT"] = "RIGHT";
452
+ return DividerDataAlignment2;
453
+ })(DividerDataAlignment || {});
454
+ var ViewMode = /* @__PURE__ */ ((ViewMode2) => {
455
+ ViewMode2["NONE"] = "NONE";
456
+ ViewMode2["FULL"] = "FULL";
457
+ ViewMode2["MINI"] = "MINI";
458
+ return ViewMode2;
459
+ })(ViewMode || {});
460
+ var LayoutType = /* @__PURE__ */ ((LayoutType2) => {
461
+ LayoutType2["COLLAGE"] = "COLLAGE";
462
+ LayoutType2["MASONRY"] = "MASONRY";
463
+ LayoutType2["GRID"] = "GRID";
464
+ LayoutType2["THUMBNAIL"] = "THUMBNAIL";
465
+ LayoutType2["SLIDER"] = "SLIDER";
466
+ LayoutType2["SLIDESHOW"] = "SLIDESHOW";
467
+ LayoutType2["PANORAMA"] = "PANORAMA";
468
+ LayoutType2["COLUMN"] = "COLUMN";
469
+ LayoutType2["MAGIC"] = "MAGIC";
470
+ LayoutType2["FULLSIZE"] = "FULLSIZE";
471
+ return LayoutType2;
472
+ })(LayoutType || {});
473
+ var Orientation = /* @__PURE__ */ ((Orientation2) => {
474
+ Orientation2["ROWS"] = "ROWS";
475
+ Orientation2["COLUMNS"] = "COLUMNS";
476
+ return Orientation2;
477
+ })(Orientation || {});
478
+ var Crop = /* @__PURE__ */ ((Crop2) => {
479
+ Crop2["FILL"] = "FILL";
480
+ Crop2["FIT"] = "FIT";
481
+ return Crop2;
482
+ })(Crop || {});
483
+ var ThumbnailsAlignment = /* @__PURE__ */ ((ThumbnailsAlignment2) => {
484
+ ThumbnailsAlignment2["TOP"] = "TOP";
485
+ ThumbnailsAlignment2["RIGHT"] = "RIGHT";
486
+ ThumbnailsAlignment2["BOTTOM"] = "BOTTOM";
487
+ ThumbnailsAlignment2["LEFT"] = "LEFT";
488
+ ThumbnailsAlignment2["NONE"] = "NONE";
489
+ return ThumbnailsAlignment2;
490
+ })(ThumbnailsAlignment || {});
491
+ var GIFType = /* @__PURE__ */ ((GIFType2) => {
492
+ GIFType2["NORMAL"] = "NORMAL";
493
+ GIFType2["STICKER"] = "STICKER";
494
+ return GIFType2;
495
+ })(GIFType || {});
496
+ var Source = /* @__PURE__ */ ((Source2) => {
497
+ Source2["HTML"] = "HTML";
498
+ Source2["ADSENSE"] = "ADSENSE";
499
+ return Source2;
500
+ })(Source || {});
501
+ var StylesPosition = /* @__PURE__ */ ((StylesPosition2) => {
502
+ StylesPosition2["START"] = "START";
503
+ StylesPosition2["END"] = "END";
504
+ StylesPosition2["TOP"] = "TOP";
505
+ StylesPosition2["HIDDEN"] = "HIDDEN";
506
+ return StylesPosition2;
507
+ })(StylesPosition || {});
508
+ var MapType = /* @__PURE__ */ ((MapType2) => {
509
+ MapType2["ROADMAP"] = "ROADMAP";
510
+ MapType2["SATELITE"] = "SATELITE";
511
+ MapType2["HYBRID"] = "HYBRID";
512
+ MapType2["TERRAIN"] = "TERRAIN";
513
+ return MapType2;
514
+ })(MapType || {});
515
+ var ViewRole = /* @__PURE__ */ ((ViewRole2) => {
516
+ ViewRole2["CREATOR"] = "CREATOR";
517
+ ViewRole2["VOTERS"] = "VOTERS";
518
+ ViewRole2["EVERYONE"] = "EVERYONE";
519
+ return ViewRole2;
520
+ })(ViewRole || {});
521
+ var VoteRole = /* @__PURE__ */ ((VoteRole2) => {
522
+ VoteRole2["SITE_MEMBERS"] = "SITE_MEMBERS";
523
+ VoteRole2["ALL"] = "ALL";
524
+ return VoteRole2;
525
+ })(VoteRole || {});
526
+ var PollLayoutType = /* @__PURE__ */ ((PollLayoutType2) => {
527
+ PollLayoutType2["LIST"] = "LIST";
528
+ PollLayoutType2["GRID"] = "GRID";
529
+ return PollLayoutType2;
530
+ })(PollLayoutType || {});
531
+ var PollLayoutDirection = /* @__PURE__ */ ((PollLayoutDirection2) => {
532
+ PollLayoutDirection2["LTR"] = "LTR";
533
+ PollLayoutDirection2["RTL"] = "RTL";
534
+ return PollLayoutDirection2;
535
+ })(PollLayoutDirection || {});
536
+ var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
537
+ BackgroundType2["COLOR"] = "COLOR";
538
+ BackgroundType2["IMAGE"] = "IMAGE";
539
+ BackgroundType2["GRADIENT"] = "GRADIENT";
540
+ return BackgroundType2;
541
+ })(BackgroundType || {});
542
+ var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
543
+ DecorationType2["BOLD"] = "BOLD";
544
+ DecorationType2["ITALIC"] = "ITALIC";
545
+ DecorationType2["UNDERLINE"] = "UNDERLINE";
546
+ DecorationType2["SPOILER"] = "SPOILER";
547
+ DecorationType2["ANCHOR"] = "ANCHOR";
548
+ DecorationType2["MENTION"] = "MENTION";
549
+ DecorationType2["LINK"] = "LINK";
550
+ DecorationType2["COLOR"] = "COLOR";
551
+ DecorationType2["FONT_SIZE"] = "FONT_SIZE";
552
+ DecorationType2["EXTERNAL"] = "EXTERNAL";
553
+ DecorationType2["STRIKETHROUGH"] = "STRIKETHROUGH";
554
+ DecorationType2["SUPERSCRIPT"] = "SUPERSCRIPT";
555
+ DecorationType2["SUBSCRIPT"] = "SUBSCRIPT";
556
+ return DecorationType2;
557
+ })(DecorationType || {});
558
+ var FontType = /* @__PURE__ */ ((FontType2) => {
559
+ FontType2["PX"] = "PX";
560
+ FontType2["EM"] = "EM";
561
+ return FontType2;
562
+ })(FontType || {});
563
+ var Position = /* @__PURE__ */ ((Position2) => {
564
+ Position2["START"] = "START";
565
+ Position2["END"] = "END";
566
+ Position2["TOP"] = "TOP";
567
+ return Position2;
568
+ })(Position || {});
569
+ var AspectRatio = /* @__PURE__ */ ((AspectRatio2) => {
570
+ AspectRatio2["SQUARE"] = "SQUARE";
571
+ AspectRatio2["RECTANGLE"] = "RECTANGLE";
572
+ return AspectRatio2;
573
+ })(AspectRatio || {});
574
+ var Resizing = /* @__PURE__ */ ((Resizing2) => {
575
+ Resizing2["FILL"] = "FILL";
576
+ Resizing2["FIT"] = "FIT";
577
+ return Resizing2;
578
+ })(Resizing || {});
579
+ var Placement = /* @__PURE__ */ ((Placement2) => {
580
+ Placement2["IMAGE"] = "IMAGE";
581
+ Placement2["PRODUCT_INFO"] = "PRODUCT_INFO";
582
+ return Placement2;
583
+ })(Placement || {});
584
+ var Type = /* @__PURE__ */ ((Type2) => {
585
+ Type2["CONTAINED"] = "CONTAINED";
586
+ Type2["FRAMELESS"] = "FRAMELESS";
587
+ return Type2;
588
+ })(Type || {});
589
+ var Alignment = /* @__PURE__ */ ((Alignment2) => {
590
+ Alignment2["START"] = "START";
591
+ Alignment2["CENTER"] = "CENTER";
592
+ Alignment2["END"] = "END";
593
+ return Alignment2;
594
+ })(Alignment || {});
595
+ var Layout = /* @__PURE__ */ ((Layout2) => {
596
+ Layout2["STACKED"] = "STACKED";
597
+ Layout2["SIDE_BY_SIDE"] = "SIDE_BY_SIDE";
598
+ return Layout2;
599
+ })(Layout || {});
600
+ var AppType = /* @__PURE__ */ ((AppType2) => {
601
+ AppType2["PRODUCT"] = "PRODUCT";
602
+ AppType2["EVENT"] = "EVENT";
603
+ AppType2["BOOKING"] = "BOOKING";
604
+ return AppType2;
605
+ })(AppType || {});
606
+ var InitialExpandedItems = /* @__PURE__ */ ((InitialExpandedItems2) => {
607
+ InitialExpandedItems2["FIRST"] = "FIRST";
608
+ InitialExpandedItems2["ALL"] = "ALL";
609
+ InitialExpandedItems2["NONE"] = "NONE";
610
+ return InitialExpandedItems2;
611
+ })(InitialExpandedItems || {});
612
+ var Direction = /* @__PURE__ */ ((Direction2) => {
613
+ Direction2["LTR"] = "LTR";
614
+ Direction2["RTL"] = "RTL";
615
+ return Direction2;
616
+ })(Direction || {});
617
+ var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
618
+ VerticalAlignment2["TOP"] = "TOP";
619
+ VerticalAlignment2["MIDDLE"] = "MIDDLE";
620
+ VerticalAlignment2["BOTTOM"] = "BOTTOM";
621
+ return VerticalAlignment2;
622
+ })(VerticalAlignment || {});
623
+ var NullValue = /* @__PURE__ */ ((NullValue2) => {
624
+ NullValue2["NULL_VALUE"] = "NULL_VALUE";
625
+ return NullValue2;
626
+ })(NullValue || {});
627
+ var MediaType = /* @__PURE__ */ ((MediaType2) => {
628
+ MediaType2["UNKNOWN_MEDIA_TYPE"] = "UNKNOWN_MEDIA_TYPE";
629
+ MediaType2["IMAGE"] = "IMAGE";
630
+ MediaType2["VIDEO"] = "VIDEO";
631
+ return MediaType2;
632
+ })(MediaType || {});
633
+ var ProductOptionRenderType = /* @__PURE__ */ ((ProductOptionRenderType2) => {
634
+ ProductOptionRenderType2["UNKNOWN_OPTION_RENDER_TYPE"] = "UNKNOWN_OPTION_RENDER_TYPE";
635
+ ProductOptionRenderType2["TEXT_CHOICES"] = "TEXT_CHOICES";
636
+ ProductOptionRenderType2["SWATCH_CHOICES"] = "SWATCH_CHOICES";
637
+ return ProductOptionRenderType2;
638
+ })(ProductOptionRenderType || {});
639
+ var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
640
+ ChoiceType2["UNKNOWN_CHOICE_TYPE"] = "UNKNOWN_CHOICE_TYPE";
641
+ ChoiceType2["CHOICE_TEXT"] = "CHOICE_TEXT";
642
+ ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
643
+ ChoiceType2["MULTIPLE_COLORS"] = "MULTIPLE_COLORS";
644
+ ChoiceType2["IMAGE"] = "IMAGE";
645
+ return ChoiceType2;
646
+ })(ChoiceType || {});
647
+ var ModifierRenderType = /* @__PURE__ */ ((ModifierRenderType2) => {
648
+ ModifierRenderType2["UNKNOWN_MODIFIER_RENDER_TYPE"] = "UNKNOWN_MODIFIER_RENDER_TYPE";
649
+ ModifierRenderType2["FREE_TEXT"] = "FREE_TEXT";
650
+ ModifierRenderType2["TEXT_CHOICES"] = "TEXT_CHOICES";
651
+ ModifierRenderType2["SWATCH_CHOICES"] = "SWATCH_CHOICES";
652
+ return ModifierRenderType2;
653
+ })(ModifierRenderType || {});
654
+ var ProductType = /* @__PURE__ */ ((ProductType2) => {
655
+ ProductType2["UNKNOWN_PRODUCT_TYPE"] = "UNKNOWN_PRODUCT_TYPE";
656
+ ProductType2["PHYSICAL"] = "PHYSICAL";
657
+ ProductType2["DIGITAL"] = "DIGITAL";
658
+ return ProductType2;
659
+ })(ProductType || {});
660
+ var MeasurementUnit = /* @__PURE__ */ ((MeasurementUnit2) => {
661
+ MeasurementUnit2["UNSPECIFIED"] = "UNSPECIFIED";
662
+ MeasurementUnit2["ML"] = "ML";
663
+ MeasurementUnit2["CL"] = "CL";
664
+ MeasurementUnit2["L"] = "L";
665
+ MeasurementUnit2["CBM"] = "CBM";
666
+ MeasurementUnit2["MG"] = "MG";
667
+ MeasurementUnit2["G"] = "G";
668
+ MeasurementUnit2["KG"] = "KG";
669
+ MeasurementUnit2["MM"] = "MM";
670
+ MeasurementUnit2["CM"] = "CM";
671
+ MeasurementUnit2["M"] = "M";
672
+ MeasurementUnit2["SQM"] = "SQM";
673
+ MeasurementUnit2["OZ"] = "OZ";
674
+ MeasurementUnit2["LB"] = "LB";
675
+ MeasurementUnit2["FLOZ"] = "FLOZ";
676
+ MeasurementUnit2["PT"] = "PT";
677
+ MeasurementUnit2["QT"] = "QT";
678
+ MeasurementUnit2["GAL"] = "GAL";
679
+ MeasurementUnit2["IN"] = "IN";
680
+ MeasurementUnit2["FT"] = "FT";
681
+ MeasurementUnit2["YD"] = "YD";
682
+ MeasurementUnit2["SQFT"] = "SQFT";
683
+ return MeasurementUnit2;
684
+ })(MeasurementUnit || {});
685
+ var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
686
+ WeightUnit2["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
687
+ WeightUnit2["KG"] = "KG";
688
+ WeightUnit2["LB"] = "LB";
689
+ return WeightUnit2;
690
+ })(WeightUnit || {});
691
+ var FileType = /* @__PURE__ */ ((FileType2) => {
692
+ FileType2["UNSPECIFIED"] = "UNSPECIFIED";
693
+ FileType2["SECURE_PICTURE"] = "SECURE_PICTURE";
694
+ FileType2["SECURE_VIDEO"] = "SECURE_VIDEO";
695
+ FileType2["SECURE_DOCUMENT"] = "SECURE_DOCUMENT";
696
+ FileType2["SECURE_MUSIC"] = "SECURE_MUSIC";
697
+ FileType2["SECURE_ARCHIVE"] = "SECURE_ARCHIVE";
698
+ return FileType2;
699
+ })(FileType || {});
700
+ var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
701
+ SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
702
+ SubscriptionFrequency2["DAY"] = "DAY";
703
+ SubscriptionFrequency2["WEEK"] = "WEEK";
704
+ SubscriptionFrequency2["MONTH"] = "MONTH";
705
+ SubscriptionFrequency2["YEAR"] = "YEAR";
706
+ return SubscriptionFrequency2;
707
+ })(SubscriptionFrequency || {});
708
+ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
709
+ DiscountType2["UNKNOWN_DISCOUNT"] = "UNKNOWN_DISCOUNT";
710
+ DiscountType2["AMOUNT"] = "AMOUNT";
711
+ DiscountType2["PERCENT"] = "PERCENT";
712
+ return DiscountType2;
713
+ })(DiscountType || {});
714
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
715
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
716
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
717
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
718
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
719
+ WebhookIdentityType2["APP"] = "APP";
720
+ return WebhookIdentityType2;
721
+ })(WebhookIdentityType || {});
722
+ async function createCatalogImport2(catalogImport) {
723
+ const { httpClient, sideEffects } = arguments[1];
724
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
725
+ catalogImport
726
+ });
727
+ const reqOpts = createCatalogImport(payload);
728
+ sideEffects?.onSiteCall?.();
729
+ try {
730
+ const result = await httpClient.request(reqOpts);
731
+ sideEffects?.onSuccess?.(result);
732
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.catalogImport;
733
+ } catch (err) {
734
+ const transformedError = (0, import_transform_error.transformError)(
735
+ err,
736
+ {
737
+ spreadPathsToArguments: {},
738
+ explicitPathsToArguments: { catalogImport: "$[0]" },
739
+ singleArgumentUnchanged: false
740
+ },
741
+ ["catalogImport"]
742
+ );
743
+ sideEffects?.onError?.(err);
744
+ throw transformedError;
745
+ }
746
+ }
747
+ async function addProductsToImport2(catalogImportId, products) {
748
+ const { httpClient, sideEffects } = arguments[2];
749
+ const payload = (0, import_transform_paths2.transformPaths)(
750
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
751
+ catalogImportId,
752
+ products
753
+ }),
754
+ [
755
+ {
756
+ transformFn: import_image.transformSDKImageToRESTImage,
757
+ paths: [
758
+ { path: "products.product.media.main.image" },
759
+ { path: "products.product.media.itemsInfo.items.image" },
760
+ { path: "products.product.options.choicesSettings.choices.image" },
761
+ {
762
+ path: "products.product.options.choicesSettings.choices.linkedMedia.image"
763
+ },
764
+ { path: "products.product.modifiers.choicesSettings.choices.image" },
765
+ {
766
+ path: "products.product.modifiers.choicesSettings.choices.linkedMedia.image"
767
+ }
768
+ ]
769
+ },
770
+ {
771
+ transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
772
+ paths: [
773
+ { path: "products.product.media.main.video" },
774
+ { path: "products.product.media.itemsInfo.items.video" },
775
+ {
776
+ path: "products.product.options.choicesSettings.choices.linkedMedia.video"
777
+ },
778
+ {
779
+ path: "products.product.modifiers.choicesSettings.choices.linkedMedia.video"
780
+ }
781
+ ]
782
+ }
783
+ ]
784
+ );
785
+ const reqOpts = addProductsToImport(payload);
786
+ sideEffects?.onSiteCall?.();
787
+ try {
788
+ const result = await httpClient.request(reqOpts);
789
+ sideEffects?.onSuccess?.(result);
790
+ } catch (err) {
791
+ const transformedError = (0, import_transform_error.transformError)(
792
+ err,
793
+ {
794
+ spreadPathsToArguments: {},
795
+ explicitPathsToArguments: { catalogImportId: "$[0]", products: "$[1]" },
796
+ singleArgumentUnchanged: false
797
+ },
798
+ ["catalogImportId", "products"]
799
+ );
800
+ sideEffects?.onError?.(err);
801
+ throw transformedError;
802
+ }
803
+ }
804
+ async function submitCatalogImport2(catalogImportId) {
805
+ const { httpClient, sideEffects } = arguments[1];
806
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
807
+ catalogImportId
808
+ });
809
+ const reqOpts = submitCatalogImport(payload);
810
+ sideEffects?.onSiteCall?.();
811
+ try {
812
+ const result = await httpClient.request(reqOpts);
813
+ sideEffects?.onSuccess?.(result);
814
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
815
+ } catch (err) {
816
+ const transformedError = (0, import_transform_error.transformError)(
817
+ err,
818
+ {
819
+ spreadPathsToArguments: {},
820
+ explicitPathsToArguments: { catalogImportId: "$[0]" },
821
+ singleArgumentUnchanged: false
822
+ },
823
+ ["catalogImportId"]
824
+ );
825
+ sideEffects?.onError?.(err);
826
+ throw transformedError;
827
+ }
828
+ }
829
+
830
+ // src/stores-catalog-v3-catalog-import-catalog-imports-v-3.public.ts
831
+ function createCatalogImport3(httpClient) {
832
+ return (catalogImport) => createCatalogImport2(
833
+ catalogImport,
834
+ // @ts-ignore
835
+ { httpClient }
836
+ );
837
+ }
838
+ function addProductsToImport3(httpClient) {
839
+ return (catalogImportId, products) => addProductsToImport2(
840
+ catalogImportId,
841
+ products,
842
+ // @ts-ignore
843
+ { httpClient }
844
+ );
845
+ }
846
+ function submitCatalogImport3(httpClient) {
847
+ return (catalogImportId) => submitCatalogImport2(
848
+ catalogImportId,
849
+ // @ts-ignore
850
+ { httpClient }
851
+ );
852
+ }
853
+
854
+ // src/stores-catalog-v3-catalog-import-catalog-imports-v-3.context.ts
855
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
856
+ var createCatalogImport4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(createCatalogImport3);
857
+ var addProductsToImport4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(addProductsToImport3);
858
+ var submitCatalogImport4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(submitCatalogImport3);
859
+ // Annotate the CommonJS export names for ESM import in node:
860
+ 0 && (module.exports = {
861
+ Alignment,
862
+ AppType,
863
+ AspectRatio,
864
+ BackgroundType,
865
+ ButtonDataType,
866
+ ChoiceType,
867
+ Crop,
868
+ DecorationType,
869
+ Direction,
870
+ DiscountType,
871
+ DividerDataAlignment,
872
+ FileType,
873
+ FontType,
874
+ GIFType,
875
+ InitialExpandedItems,
876
+ Layout,
877
+ LayoutType,
878
+ LineStyle,
879
+ MapType,
880
+ MeasurementUnit,
881
+ MediaType,
882
+ ModifierRenderType,
883
+ NodeType,
884
+ NullValue,
885
+ Orientation,
886
+ Placement,
887
+ PluginContainerDataAlignment,
888
+ PollLayoutDirection,
889
+ PollLayoutType,
890
+ Position,
891
+ ProductOptionRenderType,
892
+ ProductType,
893
+ Resizing,
894
+ Source,
895
+ StylesPosition,
896
+ SubscriptionFrequency,
897
+ Target,
898
+ TextAlignment,
899
+ ThumbnailsAlignment,
900
+ Type,
901
+ VerticalAlignment,
902
+ ViewMode,
903
+ ViewRole,
904
+ VoteRole,
905
+ WebhookIdentityType,
906
+ WeightUnit,
907
+ Width,
908
+ WidthType,
909
+ addProductsToImport,
910
+ createCatalogImport,
911
+ submitCatalogImport
912
+ });
913
+ //# sourceMappingURL=index.js.map