@wix/auto_sdk_suppliers-hub_products 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 (43) hide show
  1. package/build/cjs/index.d.ts +175 -0
  2. package/build/cjs/index.js +1670 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +25 -0
  5. package/build/cjs/index.typings.js +1420 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1915 -0
  8. package/build/cjs/meta.js +1120 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/suppliershub-marketplace-product-v1-product-products.universal-DInaBID7.d.ts +2721 -0
  11. package/build/es/index.d.mts +175 -0
  12. package/build/es/index.mjs +1611 -0
  13. package/build/es/index.mjs.map +1 -0
  14. package/build/es/index.typings.d.mts +25 -0
  15. package/build/es/index.typings.mjs +1364 -0
  16. package/build/es/index.typings.mjs.map +1 -0
  17. package/build/es/meta.d.mts +1915 -0
  18. package/build/es/meta.mjs +1063 -0
  19. package/build/es/meta.mjs.map +1 -0
  20. package/build/es/package.json +3 -0
  21. package/build/es/suppliershub-marketplace-product-v1-product-products.universal-DInaBID7.d.mts +2721 -0
  22. package/build/internal/cjs/index.d.ts +175 -0
  23. package/build/internal/cjs/index.js +1670 -0
  24. package/build/internal/cjs/index.js.map +1 -0
  25. package/build/internal/cjs/index.typings.d.ts +25 -0
  26. package/build/internal/cjs/index.typings.js +1420 -0
  27. package/build/internal/cjs/index.typings.js.map +1 -0
  28. package/build/internal/cjs/meta.d.ts +1915 -0
  29. package/build/internal/cjs/meta.js +1120 -0
  30. package/build/internal/cjs/meta.js.map +1 -0
  31. package/build/internal/cjs/suppliershub-marketplace-product-v1-product-products.universal-DInaBID7.d.ts +2721 -0
  32. package/build/internal/es/index.d.mts +175 -0
  33. package/build/internal/es/index.mjs +1611 -0
  34. package/build/internal/es/index.mjs.map +1 -0
  35. package/build/internal/es/index.typings.d.mts +25 -0
  36. package/build/internal/es/index.typings.mjs +1364 -0
  37. package/build/internal/es/index.typings.mjs.map +1 -0
  38. package/build/internal/es/meta.d.mts +1915 -0
  39. package/build/internal/es/meta.mjs +1063 -0
  40. package/build/internal/es/meta.mjs.map +1 -0
  41. package/build/internal/es/suppliershub-marketplace-product-v1-product-products.universal-DInaBID7.d.mts +2721 -0
  42. package/meta/package.json +3 -0
  43. package/package.json +54 -0
@@ -0,0 +1,1670 @@
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
+ AggregationType: () => AggregationType,
24
+ CategoryNamespace: () => CategoryNamespace,
25
+ CommonSortOrder: () => CommonSortOrder,
26
+ CountrySelections: () => CountrySelections,
27
+ Interval: () => Interval,
28
+ InventoryTier: () => InventoryTier,
29
+ MeasurementUnit: () => MeasurementUnit,
30
+ MissingValues: () => MissingValues,
31
+ Mode: () => Mode,
32
+ NestedAggregationType: () => NestedAggregationType,
33
+ PrintTechnology: () => PrintTechnology,
34
+ ProductType: () => ProductType,
35
+ RequestedField: () => RequestedField,
36
+ ScalarType: () => ScalarType,
37
+ SortDirection: () => SortDirection,
38
+ SortOrder: () => SortOrder,
39
+ SortType: () => SortType,
40
+ TimeUnit: () => TimeUnit,
41
+ WebhookIdentityType: () => WebhookIdentityType,
42
+ bulkCreateProducts: () => bulkCreateProducts4,
43
+ bulkDeleteProducts: () => bulkDeleteProducts4,
44
+ bulkUpdateProductTags: () => bulkUpdateProductTags4,
45
+ bulkUpdateProductTagsByFilter: () => bulkUpdateProductTagsByFilter4,
46
+ bulkUpdateProducts: () => bulkUpdateProducts4,
47
+ createProduct: () => createProduct4,
48
+ deleteProduct: () => deleteProduct4,
49
+ getProduct: () => getProduct4,
50
+ onProductCreated: () => onProductCreated2,
51
+ onProductDeleted: () => onProductDeleted2,
52
+ onProductTagsModified: () => onProductTagsModified2,
53
+ onProductUpdated: () => onProductUpdated2,
54
+ queryCategories: () => queryCategories4,
55
+ queryProducts: () => queryProducts4,
56
+ searchProducts: () => searchProducts4,
57
+ updateProduct: () => updateProduct4,
58
+ utils: () => utils
59
+ });
60
+ module.exports = __toCommonJS(index_exports);
61
+
62
+ // src/suppliershub-marketplace-product-v1-product-products.public.ts
63
+ var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
64
+ var import_image3 = require("@wix/sdk-runtime/transformations/image");
65
+ var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
66
+ var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
67
+ var import_sdk_types = require("@wix/sdk-types");
68
+
69
+ // src/suppliershub-marketplace-product-v1-product-products.universal.ts
70
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
71
+ var import_query_builder = require("@wix/sdk-runtime/query-builder");
72
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
73
+
74
+ // src/suppliershub-marketplace-product-v1-product-products.http.ts
75
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
76
+ var import_float = require("@wix/sdk-runtime/transformations/float");
77
+ var import_float2 = require("@wix/sdk-runtime/transformations/float");
78
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
79
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
80
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
81
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
82
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
83
+ function resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl(opts) {
84
+ const domainToMappings = {
85
+ "manage._base_domain_": [
86
+ {
87
+ srcPath: "/_api/marketplace-product",
88
+ destPath: ""
89
+ }
90
+ ],
91
+ "api._api_base_domain_": [
92
+ {
93
+ srcPath: "/marketplace-product",
94
+ destPath: ""
95
+ }
96
+ ],
97
+ "www.wixapis.com": [
98
+ {
99
+ srcPath: "/suppliers-hub/v1/products",
100
+ destPath: "/v1/products"
101
+ },
102
+ {
103
+ srcPath: "/suppliers-hub/v1/bulk/products",
104
+ destPath: "/v1/bulk/products"
105
+ },
106
+ {
107
+ srcPath: "/suppliers-hub/v1/categories",
108
+ destPath: "/v1/categories"
109
+ },
110
+ {
111
+ srcPath: "/suppliershub/marketplace-product/v1/products",
112
+ destPath: "/v1/products"
113
+ }
114
+ ],
115
+ "*.dev.wix-code.com": [
116
+ {
117
+ srcPath: "/suppliershub/marketplace-product/v1/products",
118
+ destPath: "/v1/products"
119
+ },
120
+ {
121
+ srcPath: "/suppliershub/marketplace-product/v1/bulk/products",
122
+ destPath: "/v1/bulk/products"
123
+ },
124
+ {
125
+ srcPath: "/suppliershub/marketplace-product/v1/categories/query",
126
+ destPath: "/v1/categories/query"
127
+ }
128
+ ],
129
+ _: [
130
+ {
131
+ srcPath: "/suppliershub/marketplace-product/v1/products",
132
+ destPath: "/v1/products"
133
+ },
134
+ {
135
+ srcPath: "/suppliershub/marketplace-product/v1/bulk/products",
136
+ destPath: "/v1/bulk/products"
137
+ },
138
+ {
139
+ srcPath: "/suppliershub/marketplace-product/v1/categories/query",
140
+ destPath: "/v1/categories/query"
141
+ }
142
+ ]
143
+ };
144
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
145
+ }
146
+ var PACKAGE_NAME = "@wix/auto_sdk_suppliers-hub_products";
147
+ function createProduct(payload) {
148
+ function __createProduct({ host }) {
149
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
150
+ {
151
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
152
+ paths: [
153
+ { path: "product.createdDate" },
154
+ { path: "product.updatedDate" },
155
+ { path: "product.providerInfo.productCreatedDate" },
156
+ { path: "product.media.main.urlExpirationDate" },
157
+ { path: "product.media.items.urlExpirationDate" },
158
+ {
159
+ path: "product.printOnDemandOptions.mockupImage.urlExpirationDate"
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ transformFn: import_float.transformSDKFloatToRESTFloat,
165
+ paths: [
166
+ { path: "product.media.main.focalPoint.x" },
167
+ { path: "product.media.main.focalPoint.y" },
168
+ { path: "product.media.items.focalPoint.x" },
169
+ { path: "product.media.items.focalPoint.y" },
170
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.x" },
171
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.y" }
172
+ ]
173
+ }
174
+ ]);
175
+ const metadata = {
176
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
177
+ method: "POST",
178
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.CreateProduct",
179
+ packageName: PACKAGE_NAME,
180
+ migrationOptions: {
181
+ optInTransformResponse: true
182
+ },
183
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
184
+ protoPath: "/v1/products",
185
+ data: serializedData,
186
+ host
187
+ }),
188
+ data: serializedData,
189
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
190
+ {
191
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
192
+ paths: [
193
+ { path: "product.createdDate" },
194
+ { path: "product.updatedDate" },
195
+ { path: "product.providerInfo.productCreatedDate" },
196
+ { path: "product.media.main.urlExpirationDate" },
197
+ { path: "product.media.items.urlExpirationDate" },
198
+ {
199
+ path: "product.printOnDemandOptions.mockupImage.urlExpirationDate"
200
+ }
201
+ ]
202
+ },
203
+ {
204
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
205
+ paths: [
206
+ { path: "product.media.main.focalPoint.x" },
207
+ { path: "product.media.main.focalPoint.y" },
208
+ { path: "product.media.items.focalPoint.x" },
209
+ { path: "product.media.items.focalPoint.y" },
210
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.x" },
211
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.y" }
212
+ ]
213
+ }
214
+ ])
215
+ };
216
+ return metadata;
217
+ }
218
+ return __createProduct;
219
+ }
220
+ function getProduct(payload) {
221
+ function __getProduct({ host }) {
222
+ const metadata = {
223
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
224
+ method: "GET",
225
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.GetProduct",
226
+ packageName: PACKAGE_NAME,
227
+ migrationOptions: {
228
+ optInTransformResponse: true
229
+ },
230
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
231
+ protoPath: "/v1/products/{productId}",
232
+ data: payload,
233
+ host
234
+ }),
235
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
236
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
237
+ {
238
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
239
+ paths: [
240
+ { path: "product.createdDate" },
241
+ { path: "product.updatedDate" },
242
+ { path: "product.providerInfo.productCreatedDate" },
243
+ { path: "product.media.main.urlExpirationDate" },
244
+ { path: "product.media.items.urlExpirationDate" },
245
+ {
246
+ path: "product.printOnDemandOptions.mockupImage.urlExpirationDate"
247
+ }
248
+ ]
249
+ },
250
+ {
251
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
252
+ paths: [
253
+ { path: "product.media.main.focalPoint.x" },
254
+ { path: "product.media.main.focalPoint.y" },
255
+ { path: "product.media.items.focalPoint.x" },
256
+ { path: "product.media.items.focalPoint.y" },
257
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.x" },
258
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.y" }
259
+ ]
260
+ }
261
+ ])
262
+ };
263
+ return metadata;
264
+ }
265
+ return __getProduct;
266
+ }
267
+ function updateProduct(payload) {
268
+ function __updateProduct({ host }) {
269
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
270
+ {
271
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
272
+ paths: [{ path: "fieldMask" }]
273
+ },
274
+ {
275
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
276
+ paths: [
277
+ { path: "product.createdDate" },
278
+ { path: "product.updatedDate" },
279
+ { path: "product.providerInfo.productCreatedDate" },
280
+ { path: "product.media.main.urlExpirationDate" },
281
+ { path: "product.media.items.urlExpirationDate" },
282
+ {
283
+ path: "product.printOnDemandOptions.mockupImage.urlExpirationDate"
284
+ }
285
+ ]
286
+ },
287
+ {
288
+ transformFn: import_float.transformSDKFloatToRESTFloat,
289
+ paths: [
290
+ { path: "product.media.main.focalPoint.x" },
291
+ { path: "product.media.main.focalPoint.y" },
292
+ { path: "product.media.items.focalPoint.x" },
293
+ { path: "product.media.items.focalPoint.y" },
294
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.x" },
295
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.y" }
296
+ ]
297
+ }
298
+ ]);
299
+ const metadata = {
300
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
301
+ method: "PATCH",
302
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.UpdateProduct",
303
+ packageName: PACKAGE_NAME,
304
+ migrationOptions: {
305
+ optInTransformResponse: true
306
+ },
307
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
308
+ protoPath: "/v1/products/{product.id}",
309
+ data: serializedData,
310
+ host
311
+ }),
312
+ data: serializedData,
313
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
314
+ {
315
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
316
+ paths: [
317
+ { path: "product.createdDate" },
318
+ { path: "product.updatedDate" },
319
+ { path: "product.providerInfo.productCreatedDate" },
320
+ { path: "product.media.main.urlExpirationDate" },
321
+ { path: "product.media.items.urlExpirationDate" },
322
+ {
323
+ path: "product.printOnDemandOptions.mockupImage.urlExpirationDate"
324
+ }
325
+ ]
326
+ },
327
+ {
328
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
329
+ paths: [
330
+ { path: "product.media.main.focalPoint.x" },
331
+ { path: "product.media.main.focalPoint.y" },
332
+ { path: "product.media.items.focalPoint.x" },
333
+ { path: "product.media.items.focalPoint.y" },
334
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.x" },
335
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.y" }
336
+ ]
337
+ }
338
+ ])
339
+ };
340
+ return metadata;
341
+ }
342
+ return __updateProduct;
343
+ }
344
+ function deleteProduct(payload) {
345
+ function __deleteProduct({ host }) {
346
+ const metadata = {
347
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
348
+ method: "DELETE",
349
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.DeleteProduct",
350
+ packageName: PACKAGE_NAME,
351
+ migrationOptions: {
352
+ optInTransformResponse: true
353
+ },
354
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
355
+ protoPath: "/v1/products/{productId}",
356
+ data: payload,
357
+ host
358
+ }),
359
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
360
+ };
361
+ return metadata;
362
+ }
363
+ return __deleteProduct;
364
+ }
365
+ function bulkCreateProducts(payload) {
366
+ function __bulkCreateProducts({ host }) {
367
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
368
+ {
369
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
370
+ paths: [
371
+ { path: "products.createdDate" },
372
+ { path: "products.updatedDate" },
373
+ { path: "products.providerInfo.productCreatedDate" },
374
+ { path: "products.media.main.urlExpirationDate" },
375
+ { path: "products.media.items.urlExpirationDate" },
376
+ {
377
+ path: "products.printOnDemandOptions.mockupImage.urlExpirationDate"
378
+ }
379
+ ]
380
+ },
381
+ {
382
+ transformFn: import_float.transformSDKFloatToRESTFloat,
383
+ paths: [
384
+ { path: "products.media.main.focalPoint.x" },
385
+ { path: "products.media.main.focalPoint.y" },
386
+ { path: "products.media.items.focalPoint.x" },
387
+ { path: "products.media.items.focalPoint.y" },
388
+ { path: "products.printOnDemandOptions.mockupImage.focalPoint.x" },
389
+ { path: "products.printOnDemandOptions.mockupImage.focalPoint.y" }
390
+ ]
391
+ }
392
+ ]);
393
+ const metadata = {
394
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
395
+ method: "POST",
396
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.BulkCreateProducts",
397
+ packageName: PACKAGE_NAME,
398
+ migrationOptions: {
399
+ optInTransformResponse: true
400
+ },
401
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
402
+ protoPath: "/v1/bulk/products/create",
403
+ data: serializedData,
404
+ host
405
+ }),
406
+ data: serializedData,
407
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
408
+ {
409
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
410
+ paths: [
411
+ { path: "results.item.createdDate" },
412
+ { path: "results.item.updatedDate" },
413
+ { path: "results.item.providerInfo.productCreatedDate" },
414
+ { path: "results.item.media.main.urlExpirationDate" },
415
+ { path: "results.item.media.items.urlExpirationDate" },
416
+ {
417
+ path: "results.item.printOnDemandOptions.mockupImage.urlExpirationDate"
418
+ }
419
+ ]
420
+ },
421
+ {
422
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
423
+ paths: [
424
+ { path: "results.item.media.main.focalPoint.x" },
425
+ { path: "results.item.media.main.focalPoint.y" },
426
+ { path: "results.item.media.items.focalPoint.x" },
427
+ { path: "results.item.media.items.focalPoint.y" },
428
+ {
429
+ path: "results.item.printOnDemandOptions.mockupImage.focalPoint.x"
430
+ },
431
+ {
432
+ path: "results.item.printOnDemandOptions.mockupImage.focalPoint.y"
433
+ }
434
+ ]
435
+ }
436
+ ])
437
+ };
438
+ return metadata;
439
+ }
440
+ return __bulkCreateProducts;
441
+ }
442
+ function bulkUpdateProducts(payload) {
443
+ function __bulkUpdateProducts({ host }) {
444
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
445
+ {
446
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
447
+ paths: [{ path: "products.fieldMask" }]
448
+ },
449
+ {
450
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
451
+ paths: [
452
+ { path: "products.product.createdDate" },
453
+ { path: "products.product.updatedDate" },
454
+ { path: "products.product.providerInfo.productCreatedDate" },
455
+ { path: "products.product.media.main.urlExpirationDate" },
456
+ { path: "products.product.media.items.urlExpirationDate" },
457
+ {
458
+ path: "products.product.printOnDemandOptions.mockupImage.urlExpirationDate"
459
+ }
460
+ ]
461
+ },
462
+ {
463
+ transformFn: import_float.transformSDKFloatToRESTFloat,
464
+ paths: [
465
+ { path: "products.product.media.main.focalPoint.x" },
466
+ { path: "products.product.media.main.focalPoint.y" },
467
+ { path: "products.product.media.items.focalPoint.x" },
468
+ { path: "products.product.media.items.focalPoint.y" },
469
+ {
470
+ path: "products.product.printOnDemandOptions.mockupImage.focalPoint.x"
471
+ },
472
+ {
473
+ path: "products.product.printOnDemandOptions.mockupImage.focalPoint.y"
474
+ }
475
+ ]
476
+ }
477
+ ]);
478
+ const metadata = {
479
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
480
+ method: "PATCH",
481
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.BulkUpdateProducts",
482
+ packageName: PACKAGE_NAME,
483
+ migrationOptions: {
484
+ optInTransformResponse: true
485
+ },
486
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
487
+ protoPath: "/v1/bulk/products/update",
488
+ data: serializedData,
489
+ host
490
+ }),
491
+ data: serializedData,
492
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
493
+ {
494
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
495
+ paths: [
496
+ { path: "results.item.createdDate" },
497
+ { path: "results.item.updatedDate" },
498
+ { path: "results.item.providerInfo.productCreatedDate" },
499
+ { path: "results.item.media.main.urlExpirationDate" },
500
+ { path: "results.item.media.items.urlExpirationDate" },
501
+ {
502
+ path: "results.item.printOnDemandOptions.mockupImage.urlExpirationDate"
503
+ }
504
+ ]
505
+ },
506
+ {
507
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
508
+ paths: [
509
+ { path: "results.item.media.main.focalPoint.x" },
510
+ { path: "results.item.media.main.focalPoint.y" },
511
+ { path: "results.item.media.items.focalPoint.x" },
512
+ { path: "results.item.media.items.focalPoint.y" },
513
+ {
514
+ path: "results.item.printOnDemandOptions.mockupImage.focalPoint.x"
515
+ },
516
+ {
517
+ path: "results.item.printOnDemandOptions.mockupImage.focalPoint.y"
518
+ }
519
+ ]
520
+ }
521
+ ])
522
+ };
523
+ return metadata;
524
+ }
525
+ return __bulkUpdateProducts;
526
+ }
527
+ function bulkDeleteProducts(payload) {
528
+ function __bulkDeleteProducts({ host }) {
529
+ const metadata = {
530
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
531
+ method: "POST",
532
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.BulkDeleteProducts",
533
+ packageName: PACKAGE_NAME,
534
+ migrationOptions: {
535
+ optInTransformResponse: true
536
+ },
537
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
538
+ protoPath: "/v1/bulk/products/delete",
539
+ data: payload,
540
+ host
541
+ }),
542
+ data: payload
543
+ };
544
+ return metadata;
545
+ }
546
+ return __bulkDeleteProducts;
547
+ }
548
+ function queryProducts(payload) {
549
+ function __queryProducts({ host }) {
550
+ const metadata = {
551
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
552
+ method: "POST",
553
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.QueryProducts",
554
+ packageName: PACKAGE_NAME,
555
+ migrationOptions: {
556
+ optInTransformResponse: true
557
+ },
558
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
559
+ protoPath: "/v1/products/query",
560
+ data: payload,
561
+ host
562
+ }),
563
+ data: payload,
564
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
565
+ {
566
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
567
+ paths: [
568
+ { path: "products.createdDate" },
569
+ { path: "products.updatedDate" },
570
+ { path: "products.providerInfo.productCreatedDate" },
571
+ { path: "products.media.main.urlExpirationDate" },
572
+ { path: "products.media.items.urlExpirationDate" },
573
+ {
574
+ path: "products.printOnDemandOptions.mockupImage.urlExpirationDate"
575
+ }
576
+ ]
577
+ },
578
+ {
579
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
580
+ paths: [
581
+ { path: "products.media.main.focalPoint.x" },
582
+ { path: "products.media.main.focalPoint.y" },
583
+ { path: "products.media.items.focalPoint.x" },
584
+ { path: "products.media.items.focalPoint.y" },
585
+ {
586
+ path: "products.printOnDemandOptions.mockupImage.focalPoint.x"
587
+ },
588
+ {
589
+ path: "products.printOnDemandOptions.mockupImage.focalPoint.y"
590
+ }
591
+ ]
592
+ }
593
+ ])
594
+ };
595
+ return metadata;
596
+ }
597
+ return __queryProducts;
598
+ }
599
+ function searchProducts(payload) {
600
+ function __searchProducts({ host }) {
601
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
602
+ {
603
+ transformFn: import_float.transformSDKFloatToRESTFloat,
604
+ paths: [
605
+ { path: "search.aggregations.range.buckets.from" },
606
+ { path: "search.aggregations.range.buckets.to" },
607
+ {
608
+ path: "search.aggregations.nested.nestedAggregations.range.buckets.from"
609
+ },
610
+ {
611
+ path: "search.aggregations.nested.nestedAggregations.range.buckets.to"
612
+ }
613
+ ]
614
+ }
615
+ ]);
616
+ const metadata = {
617
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
618
+ method: "POST",
619
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.SearchProducts",
620
+ packageName: PACKAGE_NAME,
621
+ migrationOptions: {
622
+ optInTransformResponse: true
623
+ },
624
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
625
+ protoPath: "/v1/products/search",
626
+ data: serializedData,
627
+ host
628
+ }),
629
+ data: serializedData,
630
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
631
+ {
632
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
633
+ paths: [
634
+ { path: "products.createdDate" },
635
+ { path: "products.updatedDate" },
636
+ { path: "products.providerInfo.productCreatedDate" },
637
+ { path: "products.media.main.urlExpirationDate" },
638
+ { path: "products.media.items.urlExpirationDate" },
639
+ {
640
+ path: "products.printOnDemandOptions.mockupImage.urlExpirationDate"
641
+ }
642
+ ]
643
+ },
644
+ {
645
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
646
+ paths: [
647
+ { path: "products.media.main.focalPoint.x" },
648
+ { path: "products.media.main.focalPoint.y" },
649
+ { path: "products.media.items.focalPoint.x" },
650
+ { path: "products.media.items.focalPoint.y" },
651
+ {
652
+ path: "products.printOnDemandOptions.mockupImage.focalPoint.x"
653
+ },
654
+ {
655
+ path: "products.printOnDemandOptions.mockupImage.focalPoint.y"
656
+ },
657
+ { path: "aggregationData.results.scalar.value" },
658
+ {
659
+ path: "aggregationData.results.groupedByValue.results.nestedResults.scalar.value"
660
+ },
661
+ {
662
+ path: "aggregationData.results.nested.results.results.*.scalar.value"
663
+ },
664
+ { path: "aggregationData.results.ranges.results.from" },
665
+ { path: "aggregationData.results.ranges.results.to" },
666
+ {
667
+ path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from"
668
+ },
669
+ {
670
+ path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to"
671
+ },
672
+ {
673
+ path: "aggregationData.results.nested.results.results.*.range.from"
674
+ },
675
+ {
676
+ path: "aggregationData.results.nested.results.results.*.range.to"
677
+ }
678
+ ]
679
+ }
680
+ ])
681
+ };
682
+ return metadata;
683
+ }
684
+ return __searchProducts;
685
+ }
686
+ function bulkUpdateProductTags(payload) {
687
+ function __bulkUpdateProductTags({ host }) {
688
+ const metadata = {
689
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
690
+ method: "POST",
691
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.BulkUpdateProductTags",
692
+ packageName: PACKAGE_NAME,
693
+ migrationOptions: {
694
+ optInTransformResponse: true
695
+ },
696
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
697
+ protoPath: "/v1/bulk/products/update-tags",
698
+ data: payload,
699
+ host
700
+ }),
701
+ data: payload
702
+ };
703
+ return metadata;
704
+ }
705
+ return __bulkUpdateProductTags;
706
+ }
707
+ function bulkUpdateProductTagsByFilter(payload) {
708
+ function __bulkUpdateProductTagsByFilter({ host }) {
709
+ const metadata = {
710
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
711
+ method: "POST",
712
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.BulkUpdateProductTagsByFilter",
713
+ packageName: PACKAGE_NAME,
714
+ migrationOptions: {
715
+ optInTransformResponse: true
716
+ },
717
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
718
+ protoPath: "/v1/bulk/products/update-tags-by-filter",
719
+ data: payload,
720
+ host
721
+ }),
722
+ data: payload
723
+ };
724
+ return metadata;
725
+ }
726
+ return __bulkUpdateProductTagsByFilter;
727
+ }
728
+ function queryCategories(payload) {
729
+ function __queryCategories({ host }) {
730
+ const metadata = {
731
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
732
+ method: "POST",
733
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.QueryCategories",
734
+ packageName: PACKAGE_NAME,
735
+ migrationOptions: {
736
+ optInTransformResponse: true
737
+ },
738
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
739
+ protoPath: "/v1/categories/query",
740
+ data: payload,
741
+ host
742
+ }),
743
+ data: payload
744
+ };
745
+ return metadata;
746
+ }
747
+ return __queryCategories;
748
+ }
749
+
750
+ // src/suppliershub-marketplace-product-v1-product-products.universal.ts
751
+ var import_image = require("@wix/sdk-runtime/transformations/image");
752
+ var import_image2 = require("@wix/sdk-runtime/transformations/image");
753
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
754
+ var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
755
+ var import_search_builder_utils = require("@wix/sdk-runtime/search-builder-utils");
756
+ var ProductType = /* @__PURE__ */ ((ProductType2) => {
757
+ ProductType2["DROPSHIPPING"] = "DROPSHIPPING";
758
+ ProductType2["WHOLESALE"] = "WHOLESALE";
759
+ ProductType2["PRINT_ON_DEMAND"] = "PRINT_ON_DEMAND";
760
+ return ProductType2;
761
+ })(ProductType || {});
762
+ var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
763
+ TimeUnit2["DAY"] = "DAY";
764
+ TimeUnit2["WEEK"] = "WEEK";
765
+ TimeUnit2["MONTH"] = "MONTH";
766
+ return TimeUnit2;
767
+ })(TimeUnit || {});
768
+ var CountrySelections = /* @__PURE__ */ ((CountrySelections2) => {
769
+ CountrySelections2["REST_OF_THE_WORLD"] = "REST_OF_THE_WORLD";
770
+ CountrySelections2["SPECIFIC_COUNTRY"] = "SPECIFIC_COUNTRY";
771
+ return CountrySelections2;
772
+ })(CountrySelections || {});
773
+ var InventoryTier = /* @__PURE__ */ ((InventoryTier2) => {
774
+ InventoryTier2["EMPTY"] = "EMPTY";
775
+ InventoryTier2["LOW"] = "LOW";
776
+ InventoryTier2["MEDIUM"] = "MEDIUM";
777
+ InventoryTier2["HIGH"] = "HIGH";
778
+ return InventoryTier2;
779
+ })(InventoryTier || {});
780
+ var CategoryNamespace = /* @__PURE__ */ ((CategoryNamespace2) => {
781
+ CategoryNamespace2["DROPSHIPPING_NAMESPACE"] = "DROPSHIPPING_NAMESPACE";
782
+ CategoryNamespace2["WHOLESALE_NAMESPACE"] = "WHOLESALE_NAMESPACE";
783
+ CategoryNamespace2["PRINT_ON_DEMAND_NAMESPACE"] = "PRINT_ON_DEMAND_NAMESPACE";
784
+ return CategoryNamespace2;
785
+ })(CategoryNamespace || {});
786
+ var PrintTechnology = /* @__PURE__ */ ((PrintTechnology2) => {
787
+ PrintTechnology2["DIRECT_TO_FILM"] = "DIRECT_TO_FILM";
788
+ PrintTechnology2["DIRECT_TO_GARMENT"] = "DIRECT_TO_GARMENT";
789
+ PrintTechnology2["CUT_SEW_SUBLIMATION"] = "CUT_SEW_SUBLIMATION";
790
+ PrintTechnology2["DIGITAL_PRINTING"] = "DIGITAL_PRINTING";
791
+ PrintTechnology2["EMBROIDERY"] = "EMBROIDERY";
792
+ PrintTechnology2["SUBLIMATION"] = "SUBLIMATION";
793
+ PrintTechnology2["UV_PRINTING"] = "UV_PRINTING";
794
+ PrintTechnology2["KNITWEAR"] = "KNITWEAR";
795
+ PrintTechnology2["DIRECT_TO_FABRIC"] = "DIRECT_TO_FABRIC";
796
+ return PrintTechnology2;
797
+ })(PrintTechnology || {});
798
+ var MeasurementUnit = /* @__PURE__ */ ((MeasurementUnit2) => {
799
+ MeasurementUnit2["CM"] = "CM";
800
+ MeasurementUnit2["INCHES"] = "INCHES";
801
+ return MeasurementUnit2;
802
+ })(MeasurementUnit || {});
803
+ var RequestedField = /* @__PURE__ */ ((RequestedField2) => {
804
+ RequestedField2["INVENTORY_QUANTITY"] = "INVENTORY_QUANTITY";
805
+ return RequestedField2;
806
+ })(RequestedField || {});
807
+ var CommonSortOrder = /* @__PURE__ */ ((CommonSortOrder2) => {
808
+ CommonSortOrder2["ASC"] = "ASC";
809
+ CommonSortOrder2["DESC"] = "DESC";
810
+ return CommonSortOrder2;
811
+ })(CommonSortOrder || {});
812
+ var SortType = /* @__PURE__ */ ((SortType2) => {
813
+ SortType2["COUNT"] = "COUNT";
814
+ SortType2["VALUE"] = "VALUE";
815
+ return SortType2;
816
+ })(SortType || {});
817
+ var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
818
+ SortDirection2["DESC"] = "DESC";
819
+ SortDirection2["ASC"] = "ASC";
820
+ return SortDirection2;
821
+ })(SortDirection || {});
822
+ var MissingValues = /* @__PURE__ */ ((MissingValues2) => {
823
+ MissingValues2["EXCLUDE"] = "EXCLUDE";
824
+ MissingValues2["INCLUDE"] = "INCLUDE";
825
+ return MissingValues2;
826
+ })(MissingValues || {});
827
+ var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
828
+ ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
829
+ ScalarType2["MIN"] = "MIN";
830
+ ScalarType2["MAX"] = "MAX";
831
+ return ScalarType2;
832
+ })(ScalarType || {});
833
+ var NestedAggregationType = /* @__PURE__ */ ((NestedAggregationType2) => {
834
+ NestedAggregationType2["VALUE"] = "VALUE";
835
+ NestedAggregationType2["RANGE"] = "RANGE";
836
+ NestedAggregationType2["SCALAR"] = "SCALAR";
837
+ NestedAggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
838
+ return NestedAggregationType2;
839
+ })(NestedAggregationType || {});
840
+ var Interval = /* @__PURE__ */ ((Interval2) => {
841
+ Interval2["YEAR"] = "YEAR";
842
+ Interval2["MONTH"] = "MONTH";
843
+ Interval2["WEEK"] = "WEEK";
844
+ Interval2["DAY"] = "DAY";
845
+ Interval2["HOUR"] = "HOUR";
846
+ Interval2["MINUTE"] = "MINUTE";
847
+ Interval2["SECOND"] = "SECOND";
848
+ return Interval2;
849
+ })(Interval || {});
850
+ var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
851
+ AggregationType2["VALUE"] = "VALUE";
852
+ AggregationType2["RANGE"] = "RANGE";
853
+ AggregationType2["SCALAR"] = "SCALAR";
854
+ AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
855
+ AggregationType2["NESTED"] = "NESTED";
856
+ return AggregationType2;
857
+ })(AggregationType || {});
858
+ var Mode = /* @__PURE__ */ ((Mode2) => {
859
+ Mode2["OR"] = "OR";
860
+ Mode2["AND"] = "AND";
861
+ return Mode2;
862
+ })(Mode || {});
863
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
864
+ SortOrder2["ASC"] = "ASC";
865
+ SortOrder2["DESC"] = "DESC";
866
+ return SortOrder2;
867
+ })(SortOrder || {});
868
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
869
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
870
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
871
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
872
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
873
+ WebhookIdentityType2["APP"] = "APP";
874
+ return WebhookIdentityType2;
875
+ })(WebhookIdentityType || {});
876
+ async function createProduct2(product) {
877
+ const { httpClient, sideEffects } = arguments[1];
878
+ const payload = (0, import_transform_paths2.transformPaths)(
879
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ product }),
880
+ [
881
+ {
882
+ transformFn: import_image.transformSDKImageToRESTImage,
883
+ paths: [
884
+ { path: "product.media.main" },
885
+ { path: "product.media.items", isRepeated: true },
886
+ { path: "product.printOnDemandOptions.mockupImage" }
887
+ ]
888
+ }
889
+ ]
890
+ );
891
+ const reqOpts = createProduct(payload);
892
+ sideEffects?.onSiteCall?.();
893
+ try {
894
+ const result = await httpClient.request(reqOpts);
895
+ sideEffects?.onSuccess?.(result);
896
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
897
+ (0, import_transform_paths2.transformPaths)(result.data, [
898
+ {
899
+ transformFn: import_image2.transformRESTImageToSDKImage,
900
+ paths: [
901
+ { path: "product.media.main" },
902
+ { path: "product.media.items", isRepeated: true },
903
+ { path: "product.printOnDemandOptions.mockupImage" }
904
+ ]
905
+ }
906
+ ])
907
+ )?.product;
908
+ } catch (err) {
909
+ const transformedError = (0, import_transform_error.transformError)(
910
+ err,
911
+ {
912
+ spreadPathsToArguments: {},
913
+ explicitPathsToArguments: { product: "$[0]" },
914
+ singleArgumentUnchanged: false
915
+ },
916
+ ["product"]
917
+ );
918
+ sideEffects?.onError?.(err);
919
+ throw transformedError;
920
+ }
921
+ }
922
+ async function getProduct2(productId) {
923
+ const { httpClient, sideEffects } = arguments[1];
924
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
925
+ productId
926
+ });
927
+ const reqOpts = getProduct(payload);
928
+ sideEffects?.onSiteCall?.();
929
+ try {
930
+ const result = await httpClient.request(reqOpts);
931
+ sideEffects?.onSuccess?.(result);
932
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
933
+ (0, import_transform_paths2.transformPaths)(result.data, [
934
+ {
935
+ transformFn: import_image2.transformRESTImageToSDKImage,
936
+ paths: [
937
+ { path: "product.media.main" },
938
+ { path: "product.media.items", isRepeated: true },
939
+ { path: "product.printOnDemandOptions.mockupImage" }
940
+ ]
941
+ }
942
+ ])
943
+ )?.product;
944
+ } catch (err) {
945
+ const transformedError = (0, import_transform_error.transformError)(
946
+ err,
947
+ {
948
+ spreadPathsToArguments: {},
949
+ explicitPathsToArguments: { productId: "$[0]" },
950
+ singleArgumentUnchanged: false
951
+ },
952
+ ["productId"]
953
+ );
954
+ sideEffects?.onError?.(err);
955
+ throw transformedError;
956
+ }
957
+ }
958
+ async function updateProduct2(_id, product) {
959
+ const { httpClient, sideEffects } = arguments[2];
960
+ const payload = (0, import_transform_paths2.transformPaths)(
961
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ product: { ...product, id: _id } }),
962
+ [
963
+ {
964
+ transformFn: import_image.transformSDKImageToRESTImage,
965
+ paths: [
966
+ { path: "product.media.main" },
967
+ { path: "product.media.items", isRepeated: true },
968
+ { path: "product.printOnDemandOptions.mockupImage" }
969
+ ]
970
+ }
971
+ ]
972
+ );
973
+ const reqOpts = updateProduct(payload);
974
+ sideEffects?.onSiteCall?.();
975
+ try {
976
+ const result = await httpClient.request(reqOpts);
977
+ sideEffects?.onSuccess?.(result);
978
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
979
+ (0, import_transform_paths2.transformPaths)(result.data, [
980
+ {
981
+ transformFn: import_image2.transformRESTImageToSDKImage,
982
+ paths: [
983
+ { path: "product.media.main" },
984
+ { path: "product.media.items", isRepeated: true },
985
+ { path: "product.printOnDemandOptions.mockupImage" }
986
+ ]
987
+ }
988
+ ])
989
+ )?.product;
990
+ } catch (err) {
991
+ const transformedError = (0, import_transform_error.transformError)(
992
+ err,
993
+ {
994
+ spreadPathsToArguments: { product: "$[1]" },
995
+ explicitPathsToArguments: { "product.id": "$[0]" },
996
+ singleArgumentUnchanged: false
997
+ },
998
+ ["_id", "product"]
999
+ );
1000
+ sideEffects?.onError?.(err);
1001
+ throw transformedError;
1002
+ }
1003
+ }
1004
+ async function deleteProduct2(productId) {
1005
+ const { httpClient, sideEffects } = arguments[1];
1006
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1007
+ productId
1008
+ });
1009
+ const reqOpts = deleteProduct(payload);
1010
+ sideEffects?.onSiteCall?.();
1011
+ try {
1012
+ const result = await httpClient.request(reqOpts);
1013
+ sideEffects?.onSuccess?.(result);
1014
+ } catch (err) {
1015
+ const transformedError = (0, import_transform_error.transformError)(
1016
+ err,
1017
+ {
1018
+ spreadPathsToArguments: {},
1019
+ explicitPathsToArguments: { productId: "$[0]" },
1020
+ singleArgumentUnchanged: false
1021
+ },
1022
+ ["productId"]
1023
+ );
1024
+ sideEffects?.onError?.(err);
1025
+ throw transformedError;
1026
+ }
1027
+ }
1028
+ async function bulkCreateProducts2(products, options) {
1029
+ const { httpClient, sideEffects } = arguments[2];
1030
+ const payload = (0, import_transform_paths2.transformPaths)(
1031
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1032
+ products,
1033
+ returnEntity: options?.returnEntity
1034
+ }),
1035
+ [
1036
+ {
1037
+ transformFn: import_image.transformSDKImageToRESTImage,
1038
+ paths: [
1039
+ { path: "products.media.main" },
1040
+ { path: "products.media.items", isRepeated: true },
1041
+ { path: "products.printOnDemandOptions.mockupImage" }
1042
+ ]
1043
+ }
1044
+ ]
1045
+ );
1046
+ const reqOpts = bulkCreateProducts(
1047
+ payload
1048
+ );
1049
+ sideEffects?.onSiteCall?.();
1050
+ try {
1051
+ const result = await httpClient.request(reqOpts);
1052
+ sideEffects?.onSuccess?.(result);
1053
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1054
+ (0, import_transform_paths2.transformPaths)(result.data, [
1055
+ {
1056
+ transformFn: import_image2.transformRESTImageToSDKImage,
1057
+ paths: [
1058
+ { path: "results.item.media.main" },
1059
+ { path: "results.item.media.items", isRepeated: true },
1060
+ { path: "results.item.printOnDemandOptions.mockupImage" }
1061
+ ]
1062
+ }
1063
+ ])
1064
+ );
1065
+ } catch (err) {
1066
+ const transformedError = (0, import_transform_error.transformError)(
1067
+ err,
1068
+ {
1069
+ spreadPathsToArguments: {},
1070
+ explicitPathsToArguments: {
1071
+ products: "$[0]",
1072
+ returnEntity: "$[1].returnEntity"
1073
+ },
1074
+ singleArgumentUnchanged: false
1075
+ },
1076
+ ["products", "options"]
1077
+ );
1078
+ sideEffects?.onError?.(err);
1079
+ throw transformedError;
1080
+ }
1081
+ }
1082
+ async function bulkUpdateProducts2(products, options) {
1083
+ const { httpClient, sideEffects } = arguments[2];
1084
+ const payload = (0, import_transform_paths2.transformPaths)(
1085
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1086
+ products,
1087
+ returnEntity: options?.returnEntity
1088
+ }),
1089
+ [
1090
+ {
1091
+ transformFn: import_image.transformSDKImageToRESTImage,
1092
+ paths: [
1093
+ { path: "products.product.media.main" },
1094
+ { path: "products.product.media.items", isRepeated: true },
1095
+ { path: "products.product.printOnDemandOptions.mockupImage" }
1096
+ ]
1097
+ }
1098
+ ]
1099
+ );
1100
+ const reqOpts = bulkUpdateProducts(
1101
+ payload
1102
+ );
1103
+ sideEffects?.onSiteCall?.();
1104
+ try {
1105
+ const result = await httpClient.request(reqOpts);
1106
+ sideEffects?.onSuccess?.(result);
1107
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1108
+ (0, import_transform_paths2.transformPaths)(result.data, [
1109
+ {
1110
+ transformFn: import_image2.transformRESTImageToSDKImage,
1111
+ paths: [
1112
+ { path: "results.item.media.main" },
1113
+ { path: "results.item.media.items", isRepeated: true },
1114
+ { path: "results.item.printOnDemandOptions.mockupImage" }
1115
+ ]
1116
+ }
1117
+ ])
1118
+ );
1119
+ } catch (err) {
1120
+ const transformedError = (0, import_transform_error.transformError)(
1121
+ err,
1122
+ {
1123
+ spreadPathsToArguments: {},
1124
+ explicitPathsToArguments: {
1125
+ products: "$[0]",
1126
+ returnEntity: "$[1].returnEntity"
1127
+ },
1128
+ singleArgumentUnchanged: false
1129
+ },
1130
+ ["products", "options"]
1131
+ );
1132
+ sideEffects?.onError?.(err);
1133
+ throw transformedError;
1134
+ }
1135
+ }
1136
+ async function bulkDeleteProducts2(productIds) {
1137
+ const { httpClient, sideEffects } = arguments[1];
1138
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1139
+ productIds
1140
+ });
1141
+ const reqOpts = bulkDeleteProducts(
1142
+ payload
1143
+ );
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: { productIds: "$[0]" },
1155
+ singleArgumentUnchanged: false
1156
+ },
1157
+ ["productIds"]
1158
+ );
1159
+ sideEffects?.onError?.(err);
1160
+ throw transformedError;
1161
+ }
1162
+ }
1163
+ function queryProducts2() {
1164
+ const { httpClient, sideEffects } = arguments[0];
1165
+ return (0, import_query_builder.queryBuilder)({
1166
+ func: async (payload) => {
1167
+ const reqOpts = queryProducts(
1168
+ payload
1169
+ );
1170
+ sideEffects?.onSiteCall?.();
1171
+ try {
1172
+ const result = await httpClient.request(reqOpts);
1173
+ sideEffects?.onSuccess?.(result);
1174
+ return result;
1175
+ } catch (err) {
1176
+ sideEffects?.onError?.(err);
1177
+ throw err;
1178
+ }
1179
+ },
1180
+ requestTransformer: (query) => {
1181
+ const args = [query, {}];
1182
+ return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1183
+ ...args?.[1],
1184
+ query: args?.[0]
1185
+ });
1186
+ },
1187
+ responseTransformer: ({ data }) => {
1188
+ const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1189
+ (0, import_transform_paths2.transformPaths)(data, [
1190
+ {
1191
+ transformFn: import_image2.transformRESTImageToSDKImage,
1192
+ paths: [
1193
+ { path: "products.media.main" },
1194
+ { path: "products.media.items", isRepeated: true },
1195
+ { path: "products.printOnDemandOptions.mockupImage" }
1196
+ ]
1197
+ }
1198
+ ])
1199
+ );
1200
+ return {
1201
+ items: transformedData?.products,
1202
+ pagingMetadata: transformedData?.pagingMetadata
1203
+ };
1204
+ },
1205
+ errorTransformer: (err) => {
1206
+ const transformedError = (0, import_transform_error.transformError)(err, {
1207
+ spreadPathsToArguments: {},
1208
+ explicitPathsToArguments: { query: "$[0]" },
1209
+ singleArgumentUnchanged: false
1210
+ });
1211
+ throw transformedError;
1212
+ },
1213
+ pagingMethod: "CURSOR",
1214
+ transformationPaths: {}
1215
+ });
1216
+ }
1217
+ async function typedQueryProducts(query) {
1218
+ const { httpClient, sideEffects } = arguments[1];
1219
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
1220
+ const reqOpts = queryProducts(payload);
1221
+ sideEffects?.onSiteCall?.();
1222
+ try {
1223
+ const result = await httpClient.request(reqOpts);
1224
+ sideEffects?.onSuccess?.(result);
1225
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1226
+ (0, import_transform_paths2.transformPaths)(result.data, [
1227
+ {
1228
+ transformFn: import_image2.transformRESTImageToSDKImage,
1229
+ paths: [
1230
+ { path: "products.media.main" },
1231
+ { path: "products.media.items", isRepeated: true },
1232
+ { path: "products.printOnDemandOptions.mockupImage" }
1233
+ ]
1234
+ }
1235
+ ])
1236
+ );
1237
+ } catch (err) {
1238
+ const transformedError = (0, import_transform_error.transformError)(
1239
+ err,
1240
+ {
1241
+ spreadPathsToArguments: {},
1242
+ explicitPathsToArguments: { query: "$[0]" },
1243
+ singleArgumentUnchanged: false
1244
+ },
1245
+ ["query"]
1246
+ );
1247
+ sideEffects?.onError?.(err);
1248
+ throw transformedError;
1249
+ }
1250
+ }
1251
+ var utils = {
1252
+ query: {
1253
+ ...(0, import_query_builder_utils.createQueryUtils)()
1254
+ },
1255
+ search: {
1256
+ ...(0, import_search_builder_utils.createSearchUtils)()
1257
+ }
1258
+ };
1259
+ async function searchProducts2(search) {
1260
+ const { httpClient, sideEffects } = arguments[1];
1261
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ search });
1262
+ const reqOpts = searchProducts(
1263
+ payload
1264
+ );
1265
+ sideEffects?.onSiteCall?.();
1266
+ try {
1267
+ const result = await httpClient.request(reqOpts);
1268
+ sideEffects?.onSuccess?.(result);
1269
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1270
+ (0, import_transform_paths2.transformPaths)(result.data, [
1271
+ {
1272
+ transformFn: import_image2.transformRESTImageToSDKImage,
1273
+ paths: [
1274
+ { path: "products.media.main" },
1275
+ { path: "products.media.items", isRepeated: true },
1276
+ { path: "products.printOnDemandOptions.mockupImage" }
1277
+ ]
1278
+ }
1279
+ ])
1280
+ );
1281
+ } catch (err) {
1282
+ const transformedError = (0, import_transform_error.transformError)(
1283
+ err,
1284
+ {
1285
+ spreadPathsToArguments: {},
1286
+ explicitPathsToArguments: { search: "$[0]" },
1287
+ singleArgumentUnchanged: false
1288
+ },
1289
+ ["search"]
1290
+ );
1291
+ sideEffects?.onError?.(err);
1292
+ throw transformedError;
1293
+ }
1294
+ }
1295
+ async function bulkUpdateProductTags2(productIds, options) {
1296
+ const { httpClient, sideEffects } = arguments[2];
1297
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1298
+ productIds,
1299
+ assignTags: options?.assignTags,
1300
+ unassignTags: options?.unassignTags
1301
+ });
1302
+ const reqOpts = bulkUpdateProductTags(
1303
+ payload
1304
+ );
1305
+ sideEffects?.onSiteCall?.();
1306
+ try {
1307
+ const result = await httpClient.request(reqOpts);
1308
+ sideEffects?.onSuccess?.(result);
1309
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1310
+ } catch (err) {
1311
+ const transformedError = (0, import_transform_error.transformError)(
1312
+ err,
1313
+ {
1314
+ spreadPathsToArguments: {},
1315
+ explicitPathsToArguments: {
1316
+ productIds: "$[0]",
1317
+ assignTags: "$[1].assignTags",
1318
+ unassignTags: "$[1].unassignTags"
1319
+ },
1320
+ singleArgumentUnchanged: false
1321
+ },
1322
+ ["productIds", "options"]
1323
+ );
1324
+ sideEffects?.onError?.(err);
1325
+ throw transformedError;
1326
+ }
1327
+ }
1328
+ async function bulkUpdateProductTagsByFilter2(filter, options) {
1329
+ const { httpClient, sideEffects } = arguments[2];
1330
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1331
+ filter,
1332
+ assignTags: options?.assignTags,
1333
+ unassignTags: options?.unassignTags
1334
+ });
1335
+ const reqOpts = bulkUpdateProductTagsByFilter(
1336
+ payload
1337
+ );
1338
+ sideEffects?.onSiteCall?.();
1339
+ try {
1340
+ const result = await httpClient.request(reqOpts);
1341
+ sideEffects?.onSuccess?.(result);
1342
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1343
+ } catch (err) {
1344
+ const transformedError = (0, import_transform_error.transformError)(
1345
+ err,
1346
+ {
1347
+ spreadPathsToArguments: {},
1348
+ explicitPathsToArguments: {
1349
+ filter: "$[0]",
1350
+ assignTags: "$[1].assignTags",
1351
+ unassignTags: "$[1].unassignTags"
1352
+ },
1353
+ singleArgumentUnchanged: false
1354
+ },
1355
+ ["filter", "options"]
1356
+ );
1357
+ sideEffects?.onError?.(err);
1358
+ throw transformedError;
1359
+ }
1360
+ }
1361
+ async function queryCategories2(options) {
1362
+ const { httpClient, sideEffects } = arguments[1];
1363
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1364
+ query: options?.query,
1365
+ namespace: options?.namespace,
1366
+ returnNonVisibleCategories: options?.returnNonVisibleCategories
1367
+ });
1368
+ const reqOpts = queryCategories(
1369
+ payload
1370
+ );
1371
+ sideEffects?.onSiteCall?.();
1372
+ try {
1373
+ const result = await httpClient.request(reqOpts);
1374
+ sideEffects?.onSuccess?.(result);
1375
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1376
+ } catch (err) {
1377
+ const transformedError = (0, import_transform_error.transformError)(
1378
+ err,
1379
+ {
1380
+ spreadPathsToArguments: {},
1381
+ explicitPathsToArguments: {
1382
+ query: "$[0].query",
1383
+ namespace: "$[0].namespace",
1384
+ returnNonVisibleCategories: "$[0].returnNonVisibleCategories"
1385
+ },
1386
+ singleArgumentUnchanged: false
1387
+ },
1388
+ ["options"]
1389
+ );
1390
+ sideEffects?.onError?.(err);
1391
+ throw transformedError;
1392
+ }
1393
+ }
1394
+
1395
+ // src/suppliershub-marketplace-product-v1-product-products.public.ts
1396
+ function createProduct3(httpClient) {
1397
+ return (product) => createProduct2(
1398
+ product,
1399
+ // @ts-ignore
1400
+ { httpClient }
1401
+ );
1402
+ }
1403
+ function getProduct3(httpClient) {
1404
+ return (productId) => getProduct2(
1405
+ productId,
1406
+ // @ts-ignore
1407
+ { httpClient }
1408
+ );
1409
+ }
1410
+ function updateProduct3(httpClient) {
1411
+ return (_id, product) => updateProduct2(
1412
+ _id,
1413
+ product,
1414
+ // @ts-ignore
1415
+ { httpClient }
1416
+ );
1417
+ }
1418
+ function deleteProduct3(httpClient) {
1419
+ return (productId) => deleteProduct2(
1420
+ productId,
1421
+ // @ts-ignore
1422
+ { httpClient }
1423
+ );
1424
+ }
1425
+ function bulkCreateProducts3(httpClient) {
1426
+ return (products, options) => bulkCreateProducts2(
1427
+ products,
1428
+ options,
1429
+ // @ts-ignore
1430
+ { httpClient }
1431
+ );
1432
+ }
1433
+ function bulkUpdateProducts3(httpClient) {
1434
+ return (products, options) => bulkUpdateProducts2(
1435
+ products,
1436
+ options,
1437
+ // @ts-ignore
1438
+ { httpClient }
1439
+ );
1440
+ }
1441
+ function bulkDeleteProducts3(httpClient) {
1442
+ return (productIds) => bulkDeleteProducts2(
1443
+ productIds,
1444
+ // @ts-ignore
1445
+ { httpClient }
1446
+ );
1447
+ }
1448
+ function queryProducts3(httpClient) {
1449
+ return () => queryProducts2(
1450
+ // @ts-ignore
1451
+ { httpClient }
1452
+ );
1453
+ }
1454
+ function typedQueryProducts2(httpClient) {
1455
+ return (query) => typedQueryProducts(
1456
+ query,
1457
+ // @ts-ignore
1458
+ { httpClient }
1459
+ );
1460
+ }
1461
+ function searchProducts3(httpClient) {
1462
+ return (search) => searchProducts2(
1463
+ search,
1464
+ // @ts-ignore
1465
+ { httpClient }
1466
+ );
1467
+ }
1468
+ function bulkUpdateProductTags3(httpClient) {
1469
+ return (productIds, options) => bulkUpdateProductTags2(
1470
+ productIds,
1471
+ options,
1472
+ // @ts-ignore
1473
+ { httpClient }
1474
+ );
1475
+ }
1476
+ function bulkUpdateProductTagsByFilter3(httpClient) {
1477
+ return (filter, options) => bulkUpdateProductTagsByFilter2(
1478
+ filter,
1479
+ options,
1480
+ // @ts-ignore
1481
+ { httpClient }
1482
+ );
1483
+ }
1484
+ function queryCategories3(httpClient) {
1485
+ return (options) => queryCategories2(
1486
+ options,
1487
+ // @ts-ignore
1488
+ { httpClient }
1489
+ );
1490
+ }
1491
+ var onProductCreated = (0, import_sdk_types.EventDefinition)(
1492
+ "wix.suppliershub.marketplace_product.v1.product_created",
1493
+ true,
1494
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1495
+ (0, import_transform_paths3.transformPaths)(event, [
1496
+ {
1497
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1498
+ paths: [
1499
+ { path: "entity.createdDate" },
1500
+ { path: "entity.updatedDate" },
1501
+ { path: "entity.providerInfo.productCreatedDate" },
1502
+ { path: "metadata.eventTime" }
1503
+ ]
1504
+ },
1505
+ {
1506
+ transformFn: import_image3.transformRESTImageToSDKImage,
1507
+ paths: [
1508
+ { path: "entity.media.main" },
1509
+ { path: "entity.media.items", isRepeated: true },
1510
+ { path: "entity.printOnDemandOptions.mockupImage" }
1511
+ ]
1512
+ }
1513
+ ])
1514
+ )
1515
+ )();
1516
+ var onProductDeleted = (0, import_sdk_types.EventDefinition)(
1517
+ "wix.suppliershub.marketplace_product.v1.product_deleted",
1518
+ true,
1519
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1520
+ (0, import_transform_paths3.transformPaths)(event, [
1521
+ {
1522
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1523
+ paths: [
1524
+ { path: "entity.createdDate" },
1525
+ { path: "entity.updatedDate" },
1526
+ { path: "entity.providerInfo.productCreatedDate" },
1527
+ { path: "metadata.eventTime" }
1528
+ ]
1529
+ },
1530
+ {
1531
+ transformFn: import_image3.transformRESTImageToSDKImage,
1532
+ paths: [
1533
+ { path: "entity.media.main" },
1534
+ { path: "entity.media.items", isRepeated: true },
1535
+ { path: "entity.printOnDemandOptions.mockupImage" }
1536
+ ]
1537
+ }
1538
+ ])
1539
+ )
1540
+ )();
1541
+ var onProductTagsModified = (0, import_sdk_types.EventDefinition)(
1542
+ "wix.suppliershub.marketplace_product.v1.product_tags_modified",
1543
+ true,
1544
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1545
+ (0, import_transform_paths3.transformPaths)(event, [
1546
+ {
1547
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1548
+ paths: [
1549
+ { path: "data.product.createdDate" },
1550
+ { path: "data.product.updatedDate" },
1551
+ { path: "data.product.providerInfo.productCreatedDate" },
1552
+ { path: "metadata.eventTime" }
1553
+ ]
1554
+ },
1555
+ {
1556
+ transformFn: import_image3.transformRESTImageToSDKImage,
1557
+ paths: [
1558
+ { path: "data.product.media.main" },
1559
+ { path: "data.product.media.items", isRepeated: true },
1560
+ { path: "data.product.printOnDemandOptions.mockupImage" }
1561
+ ]
1562
+ }
1563
+ ])
1564
+ )
1565
+ )();
1566
+ var onProductUpdated = (0, import_sdk_types.EventDefinition)(
1567
+ "wix.suppliershub.marketplace_product.v1.product_updated",
1568
+ true,
1569
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1570
+ (0, import_transform_paths3.transformPaths)(event, [
1571
+ {
1572
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1573
+ paths: [
1574
+ { path: "entity.createdDate" },
1575
+ { path: "entity.updatedDate" },
1576
+ { path: "entity.providerInfo.productCreatedDate" },
1577
+ { path: "metadata.eventTime" },
1578
+ { path: "modifiedFields.createdDate" },
1579
+ { path: "modifiedFields.updatedDate" },
1580
+ { path: "modifiedFields.providerInfo.productCreatedDate" }
1581
+ ]
1582
+ },
1583
+ {
1584
+ transformFn: import_image3.transformRESTImageToSDKImage,
1585
+ paths: [
1586
+ { path: "entity.media.main" },
1587
+ { path: "entity.media.items", isRepeated: true },
1588
+ { path: "entity.printOnDemandOptions.mockupImage" },
1589
+ { path: "modifiedFields.media.main" },
1590
+ { path: "modifiedFields.media.items", isRepeated: true },
1591
+ { path: "modifiedFields.printOnDemandOptions.mockupImage" }
1592
+ ]
1593
+ }
1594
+ ])
1595
+ )
1596
+ )();
1597
+
1598
+ // src/suppliershub-marketplace-product-v1-product-products.context.ts
1599
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1600
+ var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
1601
+ var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
1602
+ function customQueryProducts(httpClient) {
1603
+ const router = (0, import_query_method_router.createQueryOverloadRouter)({
1604
+ builderQueryFunction: () => queryProducts3(httpClient)(),
1605
+ typedQueryFunction: (query) => typedQueryProducts2(httpClient)(query),
1606
+ hasOptionsParameter: false
1607
+ });
1608
+ function overloadedQuery(query) {
1609
+ return router(...arguments);
1610
+ }
1611
+ return overloadedQuery;
1612
+ }
1613
+ var createProduct4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createProduct3);
1614
+ var getProduct4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getProduct3);
1615
+ var updateProduct4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateProduct3);
1616
+ var deleteProduct4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteProduct3);
1617
+ var bulkCreateProducts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateProducts3);
1618
+ var bulkUpdateProducts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateProducts3);
1619
+ var bulkDeleteProducts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteProducts3);
1620
+ var searchProducts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(searchProducts3);
1621
+ var bulkUpdateProductTags4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateProductTags3);
1622
+ var bulkUpdateProductTagsByFilter4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateProductTagsByFilter3);
1623
+ var queryCategories4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryCategories3);
1624
+ var queryProducts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryProducts);
1625
+ var onProductCreated2 = (0, import_event_definition_modules.createEventModule)(onProductCreated);
1626
+ var onProductDeleted2 = (0, import_event_definition_modules.createEventModule)(onProductDeleted);
1627
+ var onProductTagsModified2 = (0, import_event_definition_modules.createEventModule)(
1628
+ onProductTagsModified
1629
+ );
1630
+ var onProductUpdated2 = (0, import_event_definition_modules.createEventModule)(onProductUpdated);
1631
+ // Annotate the CommonJS export names for ESM import in node:
1632
+ 0 && (module.exports = {
1633
+ AggregationType,
1634
+ CategoryNamespace,
1635
+ CommonSortOrder,
1636
+ CountrySelections,
1637
+ Interval,
1638
+ InventoryTier,
1639
+ MeasurementUnit,
1640
+ MissingValues,
1641
+ Mode,
1642
+ NestedAggregationType,
1643
+ PrintTechnology,
1644
+ ProductType,
1645
+ RequestedField,
1646
+ ScalarType,
1647
+ SortDirection,
1648
+ SortOrder,
1649
+ SortType,
1650
+ TimeUnit,
1651
+ WebhookIdentityType,
1652
+ bulkCreateProducts,
1653
+ bulkDeleteProducts,
1654
+ bulkUpdateProductTags,
1655
+ bulkUpdateProductTagsByFilter,
1656
+ bulkUpdateProducts,
1657
+ createProduct,
1658
+ deleteProduct,
1659
+ getProduct,
1660
+ onProductCreated,
1661
+ onProductDeleted,
1662
+ onProductTagsModified,
1663
+ onProductUpdated,
1664
+ queryCategories,
1665
+ queryProducts,
1666
+ searchProducts,
1667
+ updateProduct,
1668
+ utils
1669
+ });
1670
+ //# sourceMappingURL=index.js.map