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