@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,1063 @@
1
+ // src/suppliershub-marketplace-product-v1-product-products.http.ts
2
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
3
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
4
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
5
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
6
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
7
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
8
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
9
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
10
+ function resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl(opts) {
11
+ const domainToMappings = {
12
+ "manage._base_domain_": [
13
+ {
14
+ srcPath: "/_api/marketplace-product",
15
+ destPath: ""
16
+ }
17
+ ],
18
+ "api._api_base_domain_": [
19
+ {
20
+ srcPath: "/marketplace-product",
21
+ destPath: ""
22
+ }
23
+ ],
24
+ "www.wixapis.com": [
25
+ {
26
+ srcPath: "/suppliers-hub/v1/products",
27
+ destPath: "/v1/products"
28
+ },
29
+ {
30
+ srcPath: "/suppliers-hub/v1/bulk/products",
31
+ destPath: "/v1/bulk/products"
32
+ },
33
+ {
34
+ srcPath: "/suppliers-hub/v1/categories",
35
+ destPath: "/v1/categories"
36
+ },
37
+ {
38
+ srcPath: "/suppliershub/marketplace-product/v1/products",
39
+ destPath: "/v1/products"
40
+ }
41
+ ],
42
+ "*.dev.wix-code.com": [
43
+ {
44
+ srcPath: "/suppliershub/marketplace-product/v1/products",
45
+ destPath: "/v1/products"
46
+ },
47
+ {
48
+ srcPath: "/suppliershub/marketplace-product/v1/bulk/products",
49
+ destPath: "/v1/bulk/products"
50
+ },
51
+ {
52
+ srcPath: "/suppliershub/marketplace-product/v1/categories/query",
53
+ destPath: "/v1/categories/query"
54
+ }
55
+ ],
56
+ _: [
57
+ {
58
+ srcPath: "/suppliershub/marketplace-product/v1/products",
59
+ destPath: "/v1/products"
60
+ },
61
+ {
62
+ srcPath: "/suppliershub/marketplace-product/v1/bulk/products",
63
+ destPath: "/v1/bulk/products"
64
+ },
65
+ {
66
+ srcPath: "/suppliershub/marketplace-product/v1/categories/query",
67
+ destPath: "/v1/categories/query"
68
+ }
69
+ ]
70
+ };
71
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
72
+ }
73
+ var PACKAGE_NAME = "@wix/auto_sdk_suppliers-hub_products";
74
+ function createProduct(payload) {
75
+ function __createProduct({ host }) {
76
+ const serializedData = transformPaths(payload, [
77
+ {
78
+ transformFn: transformSDKTimestampToRESTTimestamp,
79
+ paths: [
80
+ { path: "product.createdDate" },
81
+ { path: "product.updatedDate" },
82
+ { path: "product.providerInfo.productCreatedDate" },
83
+ { path: "product.media.main.urlExpirationDate" },
84
+ { path: "product.media.items.urlExpirationDate" },
85
+ {
86
+ path: "product.printOnDemandOptions.mockupImage.urlExpirationDate"
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ transformFn: transformSDKFloatToRESTFloat,
92
+ paths: [
93
+ { path: "product.media.main.focalPoint.x" },
94
+ { path: "product.media.main.focalPoint.y" },
95
+ { path: "product.media.items.focalPoint.x" },
96
+ { path: "product.media.items.focalPoint.y" },
97
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.x" },
98
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.y" }
99
+ ]
100
+ }
101
+ ]);
102
+ const metadata = {
103
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
104
+ method: "POST",
105
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.CreateProduct",
106
+ packageName: PACKAGE_NAME,
107
+ migrationOptions: {
108
+ optInTransformResponse: true
109
+ },
110
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
111
+ protoPath: "/v1/products",
112
+ data: serializedData,
113
+ host
114
+ }),
115
+ data: serializedData,
116
+ transformResponse: (payload2) => transformPaths(payload2, [
117
+ {
118
+ transformFn: transformRESTTimestampToSDKTimestamp,
119
+ paths: [
120
+ { path: "product.createdDate" },
121
+ { path: "product.updatedDate" },
122
+ { path: "product.providerInfo.productCreatedDate" },
123
+ { path: "product.media.main.urlExpirationDate" },
124
+ { path: "product.media.items.urlExpirationDate" },
125
+ {
126
+ path: "product.printOnDemandOptions.mockupImage.urlExpirationDate"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ transformFn: transformRESTFloatToSDKFloat,
132
+ paths: [
133
+ { path: "product.media.main.focalPoint.x" },
134
+ { path: "product.media.main.focalPoint.y" },
135
+ { path: "product.media.items.focalPoint.x" },
136
+ { path: "product.media.items.focalPoint.y" },
137
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.x" },
138
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.y" }
139
+ ]
140
+ }
141
+ ])
142
+ };
143
+ return metadata;
144
+ }
145
+ return __createProduct;
146
+ }
147
+ function getProduct(payload) {
148
+ function __getProduct({ host }) {
149
+ const metadata = {
150
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
151
+ method: "GET",
152
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.GetProduct",
153
+ packageName: PACKAGE_NAME,
154
+ migrationOptions: {
155
+ optInTransformResponse: true
156
+ },
157
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
158
+ protoPath: "/v1/products/{productId}",
159
+ data: payload,
160
+ host
161
+ }),
162
+ params: toURLSearchParams(payload),
163
+ transformResponse: (payload2) => transformPaths(payload2, [
164
+ {
165
+ transformFn: transformRESTTimestampToSDKTimestamp,
166
+ paths: [
167
+ { path: "product.createdDate" },
168
+ { path: "product.updatedDate" },
169
+ { path: "product.providerInfo.productCreatedDate" },
170
+ { path: "product.media.main.urlExpirationDate" },
171
+ { path: "product.media.items.urlExpirationDate" },
172
+ {
173
+ path: "product.printOnDemandOptions.mockupImage.urlExpirationDate"
174
+ }
175
+ ]
176
+ },
177
+ {
178
+ transformFn: transformRESTFloatToSDKFloat,
179
+ paths: [
180
+ { path: "product.media.main.focalPoint.x" },
181
+ { path: "product.media.main.focalPoint.y" },
182
+ { path: "product.media.items.focalPoint.x" },
183
+ { path: "product.media.items.focalPoint.y" },
184
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.x" },
185
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.y" }
186
+ ]
187
+ }
188
+ ])
189
+ };
190
+ return metadata;
191
+ }
192
+ return __getProduct;
193
+ }
194
+ function updateProduct(payload) {
195
+ function __updateProduct({ host }) {
196
+ const serializedData = transformPaths(payload, [
197
+ {
198
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
199
+ paths: [{ path: "fieldMask" }]
200
+ },
201
+ {
202
+ transformFn: transformSDKTimestampToRESTTimestamp,
203
+ paths: [
204
+ { path: "product.createdDate" },
205
+ { path: "product.updatedDate" },
206
+ { path: "product.providerInfo.productCreatedDate" },
207
+ { path: "product.media.main.urlExpirationDate" },
208
+ { path: "product.media.items.urlExpirationDate" },
209
+ {
210
+ path: "product.printOnDemandOptions.mockupImage.urlExpirationDate"
211
+ }
212
+ ]
213
+ },
214
+ {
215
+ transformFn: transformSDKFloatToRESTFloat,
216
+ paths: [
217
+ { path: "product.media.main.focalPoint.x" },
218
+ { path: "product.media.main.focalPoint.y" },
219
+ { path: "product.media.items.focalPoint.x" },
220
+ { path: "product.media.items.focalPoint.y" },
221
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.x" },
222
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.y" }
223
+ ]
224
+ }
225
+ ]);
226
+ const metadata = {
227
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
228
+ method: "PATCH",
229
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.UpdateProduct",
230
+ packageName: PACKAGE_NAME,
231
+ migrationOptions: {
232
+ optInTransformResponse: true
233
+ },
234
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
235
+ protoPath: "/v1/products/{product.id}",
236
+ data: serializedData,
237
+ host
238
+ }),
239
+ data: serializedData,
240
+ transformResponse: (payload2) => transformPaths(payload2, [
241
+ {
242
+ transformFn: transformRESTTimestampToSDKTimestamp,
243
+ paths: [
244
+ { path: "product.createdDate" },
245
+ { path: "product.updatedDate" },
246
+ { path: "product.providerInfo.productCreatedDate" },
247
+ { path: "product.media.main.urlExpirationDate" },
248
+ { path: "product.media.items.urlExpirationDate" },
249
+ {
250
+ path: "product.printOnDemandOptions.mockupImage.urlExpirationDate"
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ transformFn: transformRESTFloatToSDKFloat,
256
+ paths: [
257
+ { path: "product.media.main.focalPoint.x" },
258
+ { path: "product.media.main.focalPoint.y" },
259
+ { path: "product.media.items.focalPoint.x" },
260
+ { path: "product.media.items.focalPoint.y" },
261
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.x" },
262
+ { path: "product.printOnDemandOptions.mockupImage.focalPoint.y" }
263
+ ]
264
+ }
265
+ ])
266
+ };
267
+ return metadata;
268
+ }
269
+ return __updateProduct;
270
+ }
271
+ function deleteProduct(payload) {
272
+ function __deleteProduct({ host }) {
273
+ const metadata = {
274
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
275
+ method: "DELETE",
276
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.DeleteProduct",
277
+ packageName: PACKAGE_NAME,
278
+ migrationOptions: {
279
+ optInTransformResponse: true
280
+ },
281
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
282
+ protoPath: "/v1/products/{productId}",
283
+ data: payload,
284
+ host
285
+ }),
286
+ params: toURLSearchParams(payload)
287
+ };
288
+ return metadata;
289
+ }
290
+ return __deleteProduct;
291
+ }
292
+ function bulkCreateProducts(payload) {
293
+ function __bulkCreateProducts({ host }) {
294
+ const serializedData = transformPaths(payload, [
295
+ {
296
+ transformFn: transformSDKTimestampToRESTTimestamp,
297
+ paths: [
298
+ { path: "products.createdDate" },
299
+ { path: "products.updatedDate" },
300
+ { path: "products.providerInfo.productCreatedDate" },
301
+ { path: "products.media.main.urlExpirationDate" },
302
+ { path: "products.media.items.urlExpirationDate" },
303
+ {
304
+ path: "products.printOnDemandOptions.mockupImage.urlExpirationDate"
305
+ }
306
+ ]
307
+ },
308
+ {
309
+ transformFn: transformSDKFloatToRESTFloat,
310
+ paths: [
311
+ { path: "products.media.main.focalPoint.x" },
312
+ { path: "products.media.main.focalPoint.y" },
313
+ { path: "products.media.items.focalPoint.x" },
314
+ { path: "products.media.items.focalPoint.y" },
315
+ { path: "products.printOnDemandOptions.mockupImage.focalPoint.x" },
316
+ { path: "products.printOnDemandOptions.mockupImage.focalPoint.y" }
317
+ ]
318
+ }
319
+ ]);
320
+ const metadata = {
321
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
322
+ method: "POST",
323
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.BulkCreateProducts",
324
+ packageName: PACKAGE_NAME,
325
+ migrationOptions: {
326
+ optInTransformResponse: true
327
+ },
328
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
329
+ protoPath: "/v1/bulk/products/create",
330
+ data: serializedData,
331
+ host
332
+ }),
333
+ data: serializedData,
334
+ transformResponse: (payload2) => transformPaths(payload2, [
335
+ {
336
+ transformFn: transformRESTTimestampToSDKTimestamp,
337
+ paths: [
338
+ { path: "results.item.createdDate" },
339
+ { path: "results.item.updatedDate" },
340
+ { path: "results.item.providerInfo.productCreatedDate" },
341
+ { path: "results.item.media.main.urlExpirationDate" },
342
+ { path: "results.item.media.items.urlExpirationDate" },
343
+ {
344
+ path: "results.item.printOnDemandOptions.mockupImage.urlExpirationDate"
345
+ }
346
+ ]
347
+ },
348
+ {
349
+ transformFn: transformRESTFloatToSDKFloat,
350
+ paths: [
351
+ { path: "results.item.media.main.focalPoint.x" },
352
+ { path: "results.item.media.main.focalPoint.y" },
353
+ { path: "results.item.media.items.focalPoint.x" },
354
+ { path: "results.item.media.items.focalPoint.y" },
355
+ {
356
+ path: "results.item.printOnDemandOptions.mockupImage.focalPoint.x"
357
+ },
358
+ {
359
+ path: "results.item.printOnDemandOptions.mockupImage.focalPoint.y"
360
+ }
361
+ ]
362
+ }
363
+ ])
364
+ };
365
+ return metadata;
366
+ }
367
+ return __bulkCreateProducts;
368
+ }
369
+ function bulkUpdateProducts(payload) {
370
+ function __bulkUpdateProducts({ host }) {
371
+ const serializedData = transformPaths(payload, [
372
+ {
373
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
374
+ paths: [{ path: "products.fieldMask" }]
375
+ },
376
+ {
377
+ transformFn: transformSDKTimestampToRESTTimestamp,
378
+ paths: [
379
+ { path: "products.product.createdDate" },
380
+ { path: "products.product.updatedDate" },
381
+ { path: "products.product.providerInfo.productCreatedDate" },
382
+ { path: "products.product.media.main.urlExpirationDate" },
383
+ { path: "products.product.media.items.urlExpirationDate" },
384
+ {
385
+ path: "products.product.printOnDemandOptions.mockupImage.urlExpirationDate"
386
+ }
387
+ ]
388
+ },
389
+ {
390
+ transformFn: transformSDKFloatToRESTFloat,
391
+ paths: [
392
+ { path: "products.product.media.main.focalPoint.x" },
393
+ { path: "products.product.media.main.focalPoint.y" },
394
+ { path: "products.product.media.items.focalPoint.x" },
395
+ { path: "products.product.media.items.focalPoint.y" },
396
+ {
397
+ path: "products.product.printOnDemandOptions.mockupImage.focalPoint.x"
398
+ },
399
+ {
400
+ path: "products.product.printOnDemandOptions.mockupImage.focalPoint.y"
401
+ }
402
+ ]
403
+ }
404
+ ]);
405
+ const metadata = {
406
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
407
+ method: "PATCH",
408
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.BulkUpdateProducts",
409
+ packageName: PACKAGE_NAME,
410
+ migrationOptions: {
411
+ optInTransformResponse: true
412
+ },
413
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
414
+ protoPath: "/v1/bulk/products/update",
415
+ data: serializedData,
416
+ host
417
+ }),
418
+ data: serializedData,
419
+ transformResponse: (payload2) => transformPaths(payload2, [
420
+ {
421
+ transformFn: transformRESTTimestampToSDKTimestamp,
422
+ paths: [
423
+ { path: "results.item.createdDate" },
424
+ { path: "results.item.updatedDate" },
425
+ { path: "results.item.providerInfo.productCreatedDate" },
426
+ { path: "results.item.media.main.urlExpirationDate" },
427
+ { path: "results.item.media.items.urlExpirationDate" },
428
+ {
429
+ path: "results.item.printOnDemandOptions.mockupImage.urlExpirationDate"
430
+ }
431
+ ]
432
+ },
433
+ {
434
+ transformFn: transformRESTFloatToSDKFloat,
435
+ paths: [
436
+ { path: "results.item.media.main.focalPoint.x" },
437
+ { path: "results.item.media.main.focalPoint.y" },
438
+ { path: "results.item.media.items.focalPoint.x" },
439
+ { path: "results.item.media.items.focalPoint.y" },
440
+ {
441
+ path: "results.item.printOnDemandOptions.mockupImage.focalPoint.x"
442
+ },
443
+ {
444
+ path: "results.item.printOnDemandOptions.mockupImage.focalPoint.y"
445
+ }
446
+ ]
447
+ }
448
+ ])
449
+ };
450
+ return metadata;
451
+ }
452
+ return __bulkUpdateProducts;
453
+ }
454
+ function bulkDeleteProducts(payload) {
455
+ function __bulkDeleteProducts({ host }) {
456
+ const metadata = {
457
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
458
+ method: "POST",
459
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.BulkDeleteProducts",
460
+ packageName: PACKAGE_NAME,
461
+ migrationOptions: {
462
+ optInTransformResponse: true
463
+ },
464
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
465
+ protoPath: "/v1/bulk/products/delete",
466
+ data: payload,
467
+ host
468
+ }),
469
+ data: payload
470
+ };
471
+ return metadata;
472
+ }
473
+ return __bulkDeleteProducts;
474
+ }
475
+ function queryProducts(payload) {
476
+ function __queryProducts({ host }) {
477
+ const metadata = {
478
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
479
+ method: "POST",
480
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.QueryProducts",
481
+ packageName: PACKAGE_NAME,
482
+ migrationOptions: {
483
+ optInTransformResponse: true
484
+ },
485
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
486
+ protoPath: "/v1/products/query",
487
+ data: payload,
488
+ host
489
+ }),
490
+ data: payload,
491
+ transformResponse: (payload2) => transformPaths(payload2, [
492
+ {
493
+ transformFn: transformRESTTimestampToSDKTimestamp,
494
+ paths: [
495
+ { path: "products.createdDate" },
496
+ { path: "products.updatedDate" },
497
+ { path: "products.providerInfo.productCreatedDate" },
498
+ { path: "products.media.main.urlExpirationDate" },
499
+ { path: "products.media.items.urlExpirationDate" },
500
+ {
501
+ path: "products.printOnDemandOptions.mockupImage.urlExpirationDate"
502
+ }
503
+ ]
504
+ },
505
+ {
506
+ transformFn: transformRESTFloatToSDKFloat,
507
+ paths: [
508
+ { path: "products.media.main.focalPoint.x" },
509
+ { path: "products.media.main.focalPoint.y" },
510
+ { path: "products.media.items.focalPoint.x" },
511
+ { path: "products.media.items.focalPoint.y" },
512
+ {
513
+ path: "products.printOnDemandOptions.mockupImage.focalPoint.x"
514
+ },
515
+ {
516
+ path: "products.printOnDemandOptions.mockupImage.focalPoint.y"
517
+ }
518
+ ]
519
+ }
520
+ ])
521
+ };
522
+ return metadata;
523
+ }
524
+ return __queryProducts;
525
+ }
526
+ function searchProducts(payload) {
527
+ function __searchProducts({ host }) {
528
+ const serializedData = transformPaths(payload, [
529
+ {
530
+ transformFn: transformSDKFloatToRESTFloat,
531
+ paths: [
532
+ { path: "search.aggregations.range.buckets.from" },
533
+ { path: "search.aggregations.range.buckets.to" },
534
+ {
535
+ path: "search.aggregations.nested.nestedAggregations.range.buckets.from"
536
+ },
537
+ {
538
+ path: "search.aggregations.nested.nestedAggregations.range.buckets.to"
539
+ }
540
+ ]
541
+ }
542
+ ]);
543
+ const metadata = {
544
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
545
+ method: "POST",
546
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.SearchProducts",
547
+ packageName: PACKAGE_NAME,
548
+ migrationOptions: {
549
+ optInTransformResponse: true
550
+ },
551
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
552
+ protoPath: "/v1/products/search",
553
+ data: serializedData,
554
+ host
555
+ }),
556
+ data: serializedData,
557
+ transformResponse: (payload2) => transformPaths(payload2, [
558
+ {
559
+ transformFn: transformRESTTimestampToSDKTimestamp,
560
+ paths: [
561
+ { path: "products.createdDate" },
562
+ { path: "products.updatedDate" },
563
+ { path: "products.providerInfo.productCreatedDate" },
564
+ { path: "products.media.main.urlExpirationDate" },
565
+ { path: "products.media.items.urlExpirationDate" },
566
+ {
567
+ path: "products.printOnDemandOptions.mockupImage.urlExpirationDate"
568
+ }
569
+ ]
570
+ },
571
+ {
572
+ transformFn: transformRESTFloatToSDKFloat,
573
+ paths: [
574
+ { path: "products.media.main.focalPoint.x" },
575
+ { path: "products.media.main.focalPoint.y" },
576
+ { path: "products.media.items.focalPoint.x" },
577
+ { path: "products.media.items.focalPoint.y" },
578
+ {
579
+ path: "products.printOnDemandOptions.mockupImage.focalPoint.x"
580
+ },
581
+ {
582
+ path: "products.printOnDemandOptions.mockupImage.focalPoint.y"
583
+ },
584
+ { path: "aggregationData.results.scalar.value" },
585
+ {
586
+ path: "aggregationData.results.groupedByValue.results.nestedResults.scalar.value"
587
+ },
588
+ {
589
+ path: "aggregationData.results.nested.results.results.*.scalar.value"
590
+ },
591
+ { path: "aggregationData.results.ranges.results.from" },
592
+ { path: "aggregationData.results.ranges.results.to" },
593
+ {
594
+ path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from"
595
+ },
596
+ {
597
+ path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to"
598
+ },
599
+ {
600
+ path: "aggregationData.results.nested.results.results.*.range.from"
601
+ },
602
+ {
603
+ path: "aggregationData.results.nested.results.results.*.range.to"
604
+ }
605
+ ]
606
+ }
607
+ ])
608
+ };
609
+ return metadata;
610
+ }
611
+ return __searchProducts;
612
+ }
613
+ function bulkUpdateProductTags(payload) {
614
+ function __bulkUpdateProductTags({ host }) {
615
+ const metadata = {
616
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
617
+ method: "POST",
618
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.BulkUpdateProductTags",
619
+ packageName: PACKAGE_NAME,
620
+ migrationOptions: {
621
+ optInTransformResponse: true
622
+ },
623
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
624
+ protoPath: "/v1/bulk/products/update-tags",
625
+ data: payload,
626
+ host
627
+ }),
628
+ data: payload
629
+ };
630
+ return metadata;
631
+ }
632
+ return __bulkUpdateProductTags;
633
+ }
634
+ function bulkUpdateProductTagsByFilter(payload) {
635
+ function __bulkUpdateProductTagsByFilter({ host }) {
636
+ const metadata = {
637
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
638
+ method: "POST",
639
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.BulkUpdateProductTagsByFilter",
640
+ packageName: PACKAGE_NAME,
641
+ migrationOptions: {
642
+ optInTransformResponse: true
643
+ },
644
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
645
+ protoPath: "/v1/bulk/products/update-tags-by-filter",
646
+ data: payload,
647
+ host
648
+ }),
649
+ data: payload
650
+ };
651
+ return metadata;
652
+ }
653
+ return __bulkUpdateProductTagsByFilter;
654
+ }
655
+ function queryCategories(payload) {
656
+ function __queryCategories({ host }) {
657
+ const metadata = {
658
+ entityFqdn: "wix.suppliershub.marketplace_product.v1.product",
659
+ method: "POST",
660
+ methodFqn: "wix.suppliershub.marketplace.product.v1.MarketplaceProduct.QueryCategories",
661
+ packageName: PACKAGE_NAME,
662
+ migrationOptions: {
663
+ optInTransformResponse: true
664
+ },
665
+ url: resolveWixSuppliershubMarketplaceProductV1MarketplaceProductUrl({
666
+ protoPath: "/v1/categories/query",
667
+ data: payload,
668
+ host
669
+ }),
670
+ data: payload
671
+ };
672
+ return metadata;
673
+ }
674
+ return __queryCategories;
675
+ }
676
+
677
+ // src/suppliershub-marketplace-product-v1-product-products.types.ts
678
+ var ProductType = /* @__PURE__ */ ((ProductType2) => {
679
+ ProductType2["DROPSHIPPING"] = "DROPSHIPPING";
680
+ ProductType2["WHOLESALE"] = "WHOLESALE";
681
+ ProductType2["PRINT_ON_DEMAND"] = "PRINT_ON_DEMAND";
682
+ return ProductType2;
683
+ })(ProductType || {});
684
+ var TimeUnit = /* @__PURE__ */ ((TimeUnit2) => {
685
+ TimeUnit2["DAY"] = "DAY";
686
+ TimeUnit2["WEEK"] = "WEEK";
687
+ TimeUnit2["MONTH"] = "MONTH";
688
+ return TimeUnit2;
689
+ })(TimeUnit || {});
690
+ var CountrySelections = /* @__PURE__ */ ((CountrySelections2) => {
691
+ CountrySelections2["REST_OF_THE_WORLD"] = "REST_OF_THE_WORLD";
692
+ CountrySelections2["SPECIFIC_COUNTRY"] = "SPECIFIC_COUNTRY";
693
+ return CountrySelections2;
694
+ })(CountrySelections || {});
695
+ var InventoryTier = /* @__PURE__ */ ((InventoryTier2) => {
696
+ InventoryTier2["EMPTY"] = "EMPTY";
697
+ InventoryTier2["LOW"] = "LOW";
698
+ InventoryTier2["MEDIUM"] = "MEDIUM";
699
+ InventoryTier2["HIGH"] = "HIGH";
700
+ return InventoryTier2;
701
+ })(InventoryTier || {});
702
+ var CategoryNamespace = /* @__PURE__ */ ((CategoryNamespace2) => {
703
+ CategoryNamespace2["DROPSHIPPING_NAMESPACE"] = "DROPSHIPPING_NAMESPACE";
704
+ CategoryNamespace2["WHOLESALE_NAMESPACE"] = "WHOLESALE_NAMESPACE";
705
+ CategoryNamespace2["PRINT_ON_DEMAND_NAMESPACE"] = "PRINT_ON_DEMAND_NAMESPACE";
706
+ return CategoryNamespace2;
707
+ })(CategoryNamespace || {});
708
+ var PrintTechnology = /* @__PURE__ */ ((PrintTechnology2) => {
709
+ PrintTechnology2["DIRECT_TO_FILM"] = "DIRECT_TO_FILM";
710
+ PrintTechnology2["DIRECT_TO_GARMENT"] = "DIRECT_TO_GARMENT";
711
+ PrintTechnology2["CUT_SEW_SUBLIMATION"] = "CUT_SEW_SUBLIMATION";
712
+ PrintTechnology2["DIGITAL_PRINTING"] = "DIGITAL_PRINTING";
713
+ PrintTechnology2["EMBROIDERY"] = "EMBROIDERY";
714
+ PrintTechnology2["SUBLIMATION"] = "SUBLIMATION";
715
+ PrintTechnology2["UV_PRINTING"] = "UV_PRINTING";
716
+ PrintTechnology2["KNITWEAR"] = "KNITWEAR";
717
+ PrintTechnology2["DIRECT_TO_FABRIC"] = "DIRECT_TO_FABRIC";
718
+ return PrintTechnology2;
719
+ })(PrintTechnology || {});
720
+ var MeasurementUnit = /* @__PURE__ */ ((MeasurementUnit2) => {
721
+ MeasurementUnit2["CM"] = "CM";
722
+ MeasurementUnit2["INCHES"] = "INCHES";
723
+ return MeasurementUnit2;
724
+ })(MeasurementUnit || {});
725
+ var RequestedField = /* @__PURE__ */ ((RequestedField2) => {
726
+ RequestedField2["INVENTORY_QUANTITY"] = "INVENTORY_QUANTITY";
727
+ return RequestedField2;
728
+ })(RequestedField || {});
729
+ var CommonSortOrder = /* @__PURE__ */ ((CommonSortOrder2) => {
730
+ CommonSortOrder2["ASC"] = "ASC";
731
+ CommonSortOrder2["DESC"] = "DESC";
732
+ return CommonSortOrder2;
733
+ })(CommonSortOrder || {});
734
+ var SortType = /* @__PURE__ */ ((SortType2) => {
735
+ SortType2["COUNT"] = "COUNT";
736
+ SortType2["VALUE"] = "VALUE";
737
+ return SortType2;
738
+ })(SortType || {});
739
+ var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
740
+ SortDirection2["DESC"] = "DESC";
741
+ SortDirection2["ASC"] = "ASC";
742
+ return SortDirection2;
743
+ })(SortDirection || {});
744
+ var MissingValues = /* @__PURE__ */ ((MissingValues2) => {
745
+ MissingValues2["EXCLUDE"] = "EXCLUDE";
746
+ MissingValues2["INCLUDE"] = "INCLUDE";
747
+ return MissingValues2;
748
+ })(MissingValues || {});
749
+ var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
750
+ ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
751
+ ScalarType2["MIN"] = "MIN";
752
+ ScalarType2["MAX"] = "MAX";
753
+ return ScalarType2;
754
+ })(ScalarType || {});
755
+ var NestedAggregationType = /* @__PURE__ */ ((NestedAggregationType2) => {
756
+ NestedAggregationType2["VALUE"] = "VALUE";
757
+ NestedAggregationType2["RANGE"] = "RANGE";
758
+ NestedAggregationType2["SCALAR"] = "SCALAR";
759
+ NestedAggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
760
+ return NestedAggregationType2;
761
+ })(NestedAggregationType || {});
762
+ var Interval = /* @__PURE__ */ ((Interval2) => {
763
+ Interval2["YEAR"] = "YEAR";
764
+ Interval2["MONTH"] = "MONTH";
765
+ Interval2["WEEK"] = "WEEK";
766
+ Interval2["DAY"] = "DAY";
767
+ Interval2["HOUR"] = "HOUR";
768
+ Interval2["MINUTE"] = "MINUTE";
769
+ Interval2["SECOND"] = "SECOND";
770
+ return Interval2;
771
+ })(Interval || {});
772
+ var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
773
+ AggregationType2["VALUE"] = "VALUE";
774
+ AggregationType2["RANGE"] = "RANGE";
775
+ AggregationType2["SCALAR"] = "SCALAR";
776
+ AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
777
+ AggregationType2["NESTED"] = "NESTED";
778
+ return AggregationType2;
779
+ })(AggregationType || {});
780
+ var Mode = /* @__PURE__ */ ((Mode2) => {
781
+ Mode2["OR"] = "OR";
782
+ Mode2["AND"] = "AND";
783
+ return Mode2;
784
+ })(Mode || {});
785
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
786
+ SortOrder2["ASC"] = "ASC";
787
+ SortOrder2["DESC"] = "DESC";
788
+ return SortOrder2;
789
+ })(SortOrder || {});
790
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
791
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
792
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
793
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
794
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
795
+ WebhookIdentityType2["APP"] = "APP";
796
+ return WebhookIdentityType2;
797
+ })(WebhookIdentityType || {});
798
+
799
+ // src/suppliershub-marketplace-product-v1-product-products.meta.ts
800
+ function createProduct2() {
801
+ const payload = {};
802
+ const getRequestOptions = createProduct(payload);
803
+ const getUrl = (context) => {
804
+ const { url } = getRequestOptions(context);
805
+ return url;
806
+ };
807
+ return {
808
+ getUrl,
809
+ httpMethod: "POST",
810
+ path: "/v1/products",
811
+ pathParams: {},
812
+ __requestType: null,
813
+ __originalRequestType: null,
814
+ __responseType: null,
815
+ __originalResponseType: null
816
+ };
817
+ }
818
+ function getProduct2() {
819
+ const payload = { productId: ":productId" };
820
+ const getRequestOptions = getProduct(payload);
821
+ const getUrl = (context) => {
822
+ const { url } = getRequestOptions(context);
823
+ return url;
824
+ };
825
+ return {
826
+ getUrl,
827
+ httpMethod: "GET",
828
+ path: "/v1/products/{productId}",
829
+ pathParams: { productId: "productId" },
830
+ __requestType: null,
831
+ __originalRequestType: null,
832
+ __responseType: null,
833
+ __originalResponseType: null
834
+ };
835
+ }
836
+ function updateProduct2() {
837
+ const payload = { product: { id: ":productId" } };
838
+ const getRequestOptions = updateProduct(payload);
839
+ const getUrl = (context) => {
840
+ const { url } = getRequestOptions(context);
841
+ return url;
842
+ };
843
+ return {
844
+ getUrl,
845
+ httpMethod: "PATCH",
846
+ path: "/v1/products/{product.id}",
847
+ pathParams: { productId: "productId" },
848
+ __requestType: null,
849
+ __originalRequestType: null,
850
+ __responseType: null,
851
+ __originalResponseType: null
852
+ };
853
+ }
854
+ function deleteProduct2() {
855
+ const payload = { productId: ":productId" };
856
+ const getRequestOptions = deleteProduct(payload);
857
+ const getUrl = (context) => {
858
+ const { url } = getRequestOptions(context);
859
+ return url;
860
+ };
861
+ return {
862
+ getUrl,
863
+ httpMethod: "DELETE",
864
+ path: "/v1/products/{productId}",
865
+ pathParams: { productId: "productId" },
866
+ __requestType: null,
867
+ __originalRequestType: null,
868
+ __responseType: null,
869
+ __originalResponseType: null
870
+ };
871
+ }
872
+ function bulkCreateProducts2() {
873
+ const payload = {};
874
+ const getRequestOptions = bulkCreateProducts(
875
+ payload
876
+ );
877
+ const getUrl = (context) => {
878
+ const { url } = getRequestOptions(context);
879
+ return url;
880
+ };
881
+ return {
882
+ getUrl,
883
+ httpMethod: "POST",
884
+ path: "/v1/bulk/products/create",
885
+ pathParams: {},
886
+ __requestType: null,
887
+ __originalRequestType: null,
888
+ __responseType: null,
889
+ __originalResponseType: null
890
+ };
891
+ }
892
+ function bulkUpdateProducts2() {
893
+ const payload = {};
894
+ const getRequestOptions = bulkUpdateProducts(
895
+ payload
896
+ );
897
+ const getUrl = (context) => {
898
+ const { url } = getRequestOptions(context);
899
+ return url;
900
+ };
901
+ return {
902
+ getUrl,
903
+ httpMethod: "PATCH",
904
+ path: "/v1/bulk/products/update",
905
+ pathParams: {},
906
+ __requestType: null,
907
+ __originalRequestType: null,
908
+ __responseType: null,
909
+ __originalResponseType: null
910
+ };
911
+ }
912
+ function bulkDeleteProducts2() {
913
+ const payload = {};
914
+ const getRequestOptions = bulkDeleteProducts(
915
+ payload
916
+ );
917
+ const getUrl = (context) => {
918
+ const { url } = getRequestOptions(context);
919
+ return url;
920
+ };
921
+ return {
922
+ getUrl,
923
+ httpMethod: "POST",
924
+ path: "/v1/bulk/products/delete",
925
+ pathParams: {},
926
+ __requestType: null,
927
+ __originalRequestType: null,
928
+ __responseType: null,
929
+ __originalResponseType: null
930
+ };
931
+ }
932
+ function queryProducts2() {
933
+ const payload = {};
934
+ const getRequestOptions = queryProducts(payload);
935
+ const getUrl = (context) => {
936
+ const { url } = getRequestOptions(context);
937
+ return url;
938
+ };
939
+ return {
940
+ getUrl,
941
+ httpMethod: "POST",
942
+ path: "/v1/products/query",
943
+ pathParams: {},
944
+ __requestType: null,
945
+ __originalRequestType: null,
946
+ __responseType: null,
947
+ __originalResponseType: null
948
+ };
949
+ }
950
+ function searchProducts2() {
951
+ const payload = {};
952
+ const getRequestOptions = searchProducts(
953
+ payload
954
+ );
955
+ const getUrl = (context) => {
956
+ const { url } = getRequestOptions(context);
957
+ return url;
958
+ };
959
+ return {
960
+ getUrl,
961
+ httpMethod: "POST",
962
+ path: "/v1/products/search",
963
+ pathParams: {},
964
+ __requestType: null,
965
+ __originalRequestType: null,
966
+ __responseType: null,
967
+ __originalResponseType: null
968
+ };
969
+ }
970
+ function bulkUpdateProductTags2() {
971
+ const payload = {};
972
+ const getRequestOptions = bulkUpdateProductTags(
973
+ payload
974
+ );
975
+ const getUrl = (context) => {
976
+ const { url } = getRequestOptions(context);
977
+ return url;
978
+ };
979
+ return {
980
+ getUrl,
981
+ httpMethod: "POST",
982
+ path: "/v1/bulk/products/update-tags",
983
+ pathParams: {},
984
+ __requestType: null,
985
+ __originalRequestType: null,
986
+ __responseType: null,
987
+ __originalResponseType: null
988
+ };
989
+ }
990
+ function bulkUpdateProductTagsByFilter2() {
991
+ const payload = {};
992
+ const getRequestOptions = bulkUpdateProductTagsByFilter(
993
+ payload
994
+ );
995
+ const getUrl = (context) => {
996
+ const { url } = getRequestOptions(context);
997
+ return url;
998
+ };
999
+ return {
1000
+ getUrl,
1001
+ httpMethod: "POST",
1002
+ path: "/v1/bulk/products/update-tags-by-filter",
1003
+ pathParams: {},
1004
+ __requestType: null,
1005
+ __originalRequestType: null,
1006
+ __responseType: null,
1007
+ __originalResponseType: null
1008
+ };
1009
+ }
1010
+ function queryCategories2() {
1011
+ const payload = {};
1012
+ const getRequestOptions = queryCategories(
1013
+ payload
1014
+ );
1015
+ const getUrl = (context) => {
1016
+ const { url } = getRequestOptions(context);
1017
+ return url;
1018
+ };
1019
+ return {
1020
+ getUrl,
1021
+ httpMethod: "POST",
1022
+ path: "/v1/categories/query",
1023
+ pathParams: {},
1024
+ __requestType: null,
1025
+ __originalRequestType: null,
1026
+ __responseType: null,
1027
+ __originalResponseType: null
1028
+ };
1029
+ }
1030
+ export {
1031
+ AggregationType as AggregationTypeOriginal,
1032
+ CategoryNamespace as CategoryNamespaceOriginal,
1033
+ CommonSortOrder as CommonSortOrderOriginal,
1034
+ CountrySelections as CountrySelectionsOriginal,
1035
+ Interval as IntervalOriginal,
1036
+ InventoryTier as InventoryTierOriginal,
1037
+ MeasurementUnit as MeasurementUnitOriginal,
1038
+ MissingValues as MissingValuesOriginal,
1039
+ Mode as ModeOriginal,
1040
+ NestedAggregationType as NestedAggregationTypeOriginal,
1041
+ PrintTechnology as PrintTechnologyOriginal,
1042
+ ProductType as ProductTypeOriginal,
1043
+ RequestedField as RequestedFieldOriginal,
1044
+ ScalarType as ScalarTypeOriginal,
1045
+ SortDirection as SortDirectionOriginal,
1046
+ SortOrder as SortOrderOriginal,
1047
+ SortType as SortTypeOriginal,
1048
+ TimeUnit as TimeUnitOriginal,
1049
+ WebhookIdentityType as WebhookIdentityTypeOriginal,
1050
+ bulkCreateProducts2 as bulkCreateProducts,
1051
+ bulkDeleteProducts2 as bulkDeleteProducts,
1052
+ bulkUpdateProductTags2 as bulkUpdateProductTags,
1053
+ bulkUpdateProductTagsByFilter2 as bulkUpdateProductTagsByFilter,
1054
+ bulkUpdateProducts2 as bulkUpdateProducts,
1055
+ createProduct2 as createProduct,
1056
+ deleteProduct2 as deleteProduct,
1057
+ getProduct2 as getProduct,
1058
+ queryCategories2 as queryCategories,
1059
+ queryProducts2 as queryProducts,
1060
+ searchProducts2 as searchProducts,
1061
+ updateProduct2 as updateProduct
1062
+ };
1063
+ //# sourceMappingURL=meta.mjs.map