@wix/auto_sdk_stores_product-groups-v-3 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/build/cjs/index.d.ts +11 -0
  2. package/build/cjs/index.js +1279 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +7 -0
  5. package/build/cjs/index.typings.js +1141 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1393 -0
  8. package/build/cjs/meta.js +939 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/stores-catalog-v3-product-group-product-groups-v-3.universal-BSxpFEZE.d.ts +1824 -0
  11. package/build/es/index.d.mts +11 -0
  12. package/build/es/index.mjs +1226 -0
  13. package/build/es/index.mjs.map +1 -0
  14. package/build/es/index.typings.d.mts +7 -0
  15. package/build/es/index.typings.mjs +1087 -0
  16. package/build/es/index.typings.mjs.map +1 -0
  17. package/build/es/meta.d.mts +1393 -0
  18. package/build/es/meta.mjs +884 -0
  19. package/build/es/meta.mjs.map +1 -0
  20. package/build/es/package.json +3 -0
  21. package/build/es/stores-catalog-v3-product-group-product-groups-v-3.universal-BSxpFEZE.d.mts +1824 -0
  22. package/build/internal/cjs/index.d.ts +162 -0
  23. package/build/internal/cjs/index.js +1279 -0
  24. package/build/internal/cjs/index.js.map +1 -0
  25. package/build/internal/cjs/index.typings.d.ts +21 -0
  26. package/build/internal/cjs/index.typings.js +1141 -0
  27. package/build/internal/cjs/index.typings.js.map +1 -0
  28. package/build/internal/cjs/meta.d.ts +1393 -0
  29. package/build/internal/cjs/meta.js +939 -0
  30. package/build/internal/cjs/meta.js.map +1 -0
  31. package/build/internal/cjs/stores-catalog-v3-product-group-product-groups-v-3.universal-4XnTTWRs.d.ts +1986 -0
  32. package/build/internal/es/index.d.mts +162 -0
  33. package/build/internal/es/index.mjs +1226 -0
  34. package/build/internal/es/index.mjs.map +1 -0
  35. package/build/internal/es/index.typings.d.mts +21 -0
  36. package/build/internal/es/index.typings.mjs +1087 -0
  37. package/build/internal/es/index.typings.mjs.map +1 -0
  38. package/build/internal/es/meta.d.mts +1393 -0
  39. package/build/internal/es/meta.mjs +884 -0
  40. package/build/internal/es/meta.mjs.map +1 -0
  41. package/build/internal/es/stores-catalog-v3-product-group-product-groups-v-3.universal-4XnTTWRs.d.mts +1986 -0
  42. package/meta/package.json +3 -0
  43. package/package.json +55 -0
@@ -0,0 +1,1279 @@
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
+ AvailabilityStatus: () => AvailabilityStatus,
25
+ ChoiceType: () => ChoiceType,
26
+ CustomizationRenderType: () => CustomizationRenderType,
27
+ CustomizationType: () => CustomizationType,
28
+ Interval: () => Interval,
29
+ MembershipStatus: () => MembershipStatus,
30
+ MissingValues: () => MissingValues,
31
+ Mode: () => Mode,
32
+ NestedAggregationType: () => NestedAggregationType,
33
+ ProductGroupRequestedFields: () => ProductGroupRequestedFields,
34
+ ScalarType: () => ScalarType,
35
+ SortDirection: () => SortDirection,
36
+ SortOrder: () => SortOrder,
37
+ SortType: () => SortType,
38
+ WebhookIdentityType: () => WebhookIdentityType,
39
+ assignProductsToProductGroup: () => assignProductsToProductGroup4,
40
+ bulkCreateProductGroups: () => bulkCreateProductGroups4,
41
+ bulkDeleteProductGroups: () => bulkDeleteProductGroups4,
42
+ bulkUpdateProductGroupTags: () => bulkUpdateProductGroupTags4,
43
+ bulkUpdateProductGroupTagsByFilter: () => bulkUpdateProductGroupTagsByFilter4,
44
+ bulkUpdateProductGroups: () => bulkUpdateProductGroups4,
45
+ createProductGroup: () => createProductGroup4,
46
+ deleteProductGroup: () => deleteProductGroup4,
47
+ getProductGroup: () => getProductGroup4,
48
+ queryProductGroups: () => queryProductGroups4,
49
+ searchProductGroups: () => searchProductGroups4,
50
+ unassignProductsFromProductGroup: () => unassignProductsFromProductGroup4,
51
+ updateProductGroup: () => updateProductGroup4,
52
+ utils: () => utils
53
+ });
54
+ module.exports = __toCommonJS(index_exports);
55
+
56
+ // src/stores-catalog-v3-product-group-product-groups-v-3.universal.ts
57
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
58
+ var import_query_builder = require("@wix/sdk-runtime/query-builder");
59
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
60
+
61
+ // src/stores-catalog-v3-product-group-product-groups-v-3.http.ts
62
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
63
+ var import_float = require("@wix/sdk-runtime/transformations/float");
64
+ var import_float2 = require("@wix/sdk-runtime/transformations/float");
65
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
66
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
67
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
68
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
69
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
70
+ function resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl(opts) {
71
+ const domainToMappings = {
72
+ "api._api_base_domain_": [
73
+ {
74
+ srcPath: "/product-group",
75
+ destPath: ""
76
+ }
77
+ ],
78
+ "editor._base_domain_": [
79
+ {
80
+ srcPath: "/_api/product-group",
81
+ destPath: ""
82
+ }
83
+ ],
84
+ "blocks._base_domain_": [
85
+ {
86
+ srcPath: "/_api/product-group",
87
+ destPath: ""
88
+ }
89
+ ],
90
+ "create.editorx": [
91
+ {
92
+ srcPath: "/_api/product-group",
93
+ destPath: ""
94
+ }
95
+ ],
96
+ _: [
97
+ {
98
+ srcPath: "/_api/product-group",
99
+ destPath: ""
100
+ }
101
+ ],
102
+ "manage._base_domain_": [
103
+ {
104
+ srcPath: "/_api/product-group",
105
+ destPath: ""
106
+ }
107
+ ],
108
+ "www.wixapis.com": [
109
+ {
110
+ srcPath: "/stores/v3/product-groups",
111
+ destPath: "/v3/product-groups"
112
+ },
113
+ {
114
+ srcPath: "/stores/v3/bulk/product-groups",
115
+ destPath: "/v3/bulk/product-groups"
116
+ }
117
+ ],
118
+ "*.dev.wix-code.com": [
119
+ {
120
+ srcPath: "/_api/product-group",
121
+ destPath: ""
122
+ }
123
+ ]
124
+ };
125
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
126
+ }
127
+ var PACKAGE_NAME = "@wix/auto_sdk_stores_product-groups-v-3";
128
+ function createProductGroup(payload) {
129
+ function __createProductGroup({ host }) {
130
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
131
+ {
132
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
133
+ paths: [
134
+ { path: "productGroup.createdDate" },
135
+ { path: "productGroup.updatedDate" }
136
+ ]
137
+ }
138
+ ]);
139
+ const metadata = {
140
+ entityFqdn: "wix.stores.catalog.v3.product_group",
141
+ method: "POST",
142
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.CreateProductGroup",
143
+ packageName: PACKAGE_NAME,
144
+ migrationOptions: {
145
+ optInTransformResponse: true
146
+ },
147
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
148
+ protoPath: "/v3/product-groups",
149
+ data: serializedData,
150
+ host
151
+ }),
152
+ data: serializedData,
153
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
154
+ {
155
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
156
+ paths: [
157
+ { path: "productGroup.createdDate" },
158
+ { path: "productGroup.updatedDate" }
159
+ ]
160
+ }
161
+ ])
162
+ };
163
+ return metadata;
164
+ }
165
+ return __createProductGroup;
166
+ }
167
+ function updateProductGroup(payload) {
168
+ function __updateProductGroup({ host }) {
169
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
170
+ {
171
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
172
+ paths: [{ path: "fieldMask" }]
173
+ },
174
+ {
175
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
176
+ paths: [
177
+ { path: "productGroup.createdDate" },
178
+ { path: "productGroup.updatedDate" }
179
+ ]
180
+ }
181
+ ]);
182
+ const metadata = {
183
+ entityFqdn: "wix.stores.catalog.v3.product_group",
184
+ method: "PATCH",
185
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.UpdateProductGroup",
186
+ packageName: PACKAGE_NAME,
187
+ migrationOptions: {
188
+ optInTransformResponse: true
189
+ },
190
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
191
+ protoPath: "/v3/product-groups/{productGroup.id}",
192
+ data: serializedData,
193
+ host
194
+ }),
195
+ data: serializedData,
196
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
197
+ {
198
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
199
+ paths: [
200
+ { path: "productGroup.createdDate" },
201
+ { path: "productGroup.updatedDate" }
202
+ ]
203
+ }
204
+ ])
205
+ };
206
+ return metadata;
207
+ }
208
+ return __updateProductGroup;
209
+ }
210
+ function deleteProductGroup(payload) {
211
+ function __deleteProductGroup({ host }) {
212
+ const metadata = {
213
+ entityFqdn: "wix.stores.catalog.v3.product_group",
214
+ method: "DELETE",
215
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.DeleteProductGroup",
216
+ packageName: PACKAGE_NAME,
217
+ migrationOptions: {
218
+ optInTransformResponse: true
219
+ },
220
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
221
+ protoPath: "/v3/product-groups/{productGroupId}",
222
+ data: payload,
223
+ host
224
+ }),
225
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
226
+ };
227
+ return metadata;
228
+ }
229
+ return __deleteProductGroup;
230
+ }
231
+ function getProductGroup(payload) {
232
+ function __getProductGroup({ host }) {
233
+ const metadata = {
234
+ entityFqdn: "wix.stores.catalog.v3.product_group",
235
+ method: "GET",
236
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.GetProductGroup",
237
+ packageName: PACKAGE_NAME,
238
+ migrationOptions: {
239
+ optInTransformResponse: true
240
+ },
241
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
242
+ protoPath: "/v3/product-groups/{productGroupId}",
243
+ data: payload,
244
+ host
245
+ }),
246
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
247
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
248
+ {
249
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
250
+ paths: [
251
+ { path: "productGroup.createdDate" },
252
+ { path: "productGroup.updatedDate" }
253
+ ]
254
+ }
255
+ ])
256
+ };
257
+ return metadata;
258
+ }
259
+ return __getProductGroup;
260
+ }
261
+ function queryProductGroups(payload) {
262
+ function __queryProductGroups({ host }) {
263
+ const metadata = {
264
+ entityFqdn: "wix.stores.catalog.v3.product_group",
265
+ method: "GET",
266
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.QueryProductGroups",
267
+ packageName: PACKAGE_NAME,
268
+ migrationOptions: {
269
+ optInTransformResponse: true
270
+ },
271
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
272
+ protoPath: "/v3/product-groups/query",
273
+ data: payload,
274
+ host
275
+ }),
276
+ params: (0, import_rest_modules.toURLSearchParams)(payload, true),
277
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
278
+ {
279
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
280
+ paths: [
281
+ { path: "productGroups.createdDate" },
282
+ { path: "productGroups.updatedDate" }
283
+ ]
284
+ }
285
+ ]),
286
+ fallback: [
287
+ {
288
+ method: "POST",
289
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
290
+ protoPath: "/v3/product-groups/query",
291
+ data: payload,
292
+ host
293
+ }),
294
+ data: payload
295
+ }
296
+ ]
297
+ };
298
+ return metadata;
299
+ }
300
+ return __queryProductGroups;
301
+ }
302
+ function searchProductGroups(payload) {
303
+ function __searchProductGroups({ host }) {
304
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
305
+ {
306
+ transformFn: import_float.transformSDKFloatToRESTFloat,
307
+ paths: [
308
+ { path: "search.aggregations.range.buckets.from" },
309
+ { path: "search.aggregations.range.buckets.to" },
310
+ {
311
+ path: "search.aggregations.nested.nestedAggregations.range.buckets.from"
312
+ },
313
+ {
314
+ path: "search.aggregations.nested.nestedAggregations.range.buckets.to"
315
+ }
316
+ ]
317
+ }
318
+ ]);
319
+ const metadata = {
320
+ entityFqdn: "wix.stores.catalog.v3.product_group",
321
+ method: "GET",
322
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.SearchProductGroups",
323
+ packageName: PACKAGE_NAME,
324
+ migrationOptions: {
325
+ optInTransformResponse: true
326
+ },
327
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
328
+ protoPath: "/v3/product-groups/search",
329
+ data: serializedData,
330
+ host
331
+ }),
332
+ params: (0, import_rest_modules.toURLSearchParams)(serializedData, true),
333
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
334
+ {
335
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
336
+ paths: [
337
+ { path: "productGroups.createdDate" },
338
+ { path: "productGroups.updatedDate" }
339
+ ]
340
+ },
341
+ {
342
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
343
+ paths: [
344
+ { path: "aggregationData.results.ranges.results.from" },
345
+ { path: "aggregationData.results.ranges.results.to" },
346
+ {
347
+ path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from"
348
+ },
349
+ {
350
+ path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to"
351
+ },
352
+ {
353
+ path: "aggregationData.results.nested.results.results.*.range.from"
354
+ },
355
+ {
356
+ path: "aggregationData.results.nested.results.results.*.range.to"
357
+ },
358
+ { path: "aggregationData.results.scalar.value" },
359
+ {
360
+ path: "aggregationData.results.groupedByValue.results.nestedResults.scalar.value"
361
+ },
362
+ {
363
+ path: "aggregationData.results.nested.results.results.*.scalar.value"
364
+ }
365
+ ]
366
+ }
367
+ ]),
368
+ fallback: [
369
+ {
370
+ method: "POST",
371
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
372
+ protoPath: "/v3/product-groups/search",
373
+ data: serializedData,
374
+ host
375
+ }),
376
+ data: serializedData
377
+ }
378
+ ]
379
+ };
380
+ return metadata;
381
+ }
382
+ return __searchProductGroups;
383
+ }
384
+ function bulkCreateProductGroups(payload) {
385
+ function __bulkCreateProductGroups({ host }) {
386
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
387
+ {
388
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
389
+ paths: [
390
+ { path: "productGroups.createdDate" },
391
+ { path: "productGroups.updatedDate" }
392
+ ]
393
+ }
394
+ ]);
395
+ const metadata = {
396
+ entityFqdn: "wix.stores.catalog.v3.product_group",
397
+ method: "POST",
398
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.BulkCreateProductGroups",
399
+ packageName: PACKAGE_NAME,
400
+ migrationOptions: {
401
+ optInTransformResponse: true
402
+ },
403
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
404
+ protoPath: "/v3/bulk/product-groups/create",
405
+ data: serializedData,
406
+ host
407
+ }),
408
+ data: serializedData,
409
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
410
+ {
411
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
412
+ paths: [
413
+ { path: "results.item.createdDate" },
414
+ { path: "results.item.updatedDate" }
415
+ ]
416
+ }
417
+ ])
418
+ };
419
+ return metadata;
420
+ }
421
+ return __bulkCreateProductGroups;
422
+ }
423
+ function bulkUpdateProductGroups(payload) {
424
+ function __bulkUpdateProductGroups({ host }) {
425
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
426
+ {
427
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
428
+ paths: [{ path: "productGroups.fieldMask" }]
429
+ },
430
+ {
431
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
432
+ paths: [
433
+ { path: "productGroups.productGroup.createdDate" },
434
+ { path: "productGroups.productGroup.updatedDate" }
435
+ ]
436
+ }
437
+ ]);
438
+ const metadata = {
439
+ entityFqdn: "wix.stores.catalog.v3.product_group",
440
+ method: "POST",
441
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.BulkUpdateProductGroups",
442
+ packageName: PACKAGE_NAME,
443
+ migrationOptions: {
444
+ optInTransformResponse: true
445
+ },
446
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
447
+ protoPath: "/v3/bulk/product-groups/update",
448
+ data: serializedData,
449
+ host
450
+ }),
451
+ data: serializedData,
452
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
453
+ {
454
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
455
+ paths: [
456
+ { path: "results.item.createdDate" },
457
+ { path: "results.item.updatedDate" }
458
+ ]
459
+ }
460
+ ])
461
+ };
462
+ return metadata;
463
+ }
464
+ return __bulkUpdateProductGroups;
465
+ }
466
+ function assignProductsToProductGroup(payload) {
467
+ function __assignProductsToProductGroup({ host }) {
468
+ const metadata = {
469
+ entityFqdn: "wix.stores.catalog.v3.product_group",
470
+ method: "POST",
471
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.AssignProductsToProductGroup",
472
+ packageName: PACKAGE_NAME,
473
+ migrationOptions: {
474
+ optInTransformResponse: true
475
+ },
476
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
477
+ protoPath: "/v3/product-groups/assign-products",
478
+ data: payload,
479
+ host
480
+ }),
481
+ data: payload
482
+ };
483
+ return metadata;
484
+ }
485
+ return __assignProductsToProductGroup;
486
+ }
487
+ function unassignProductsFromProductGroup(payload) {
488
+ function __unassignProductsFromProductGroup({ host }) {
489
+ const metadata = {
490
+ entityFqdn: "wix.stores.catalog.v3.product_group",
491
+ method: "POST",
492
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.UnassignProductsFromProductGroup",
493
+ packageName: PACKAGE_NAME,
494
+ migrationOptions: {
495
+ optInTransformResponse: true
496
+ },
497
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
498
+ protoPath: "/v3/product-groups/unassign-products",
499
+ data: payload,
500
+ host
501
+ }),
502
+ data: payload
503
+ };
504
+ return metadata;
505
+ }
506
+ return __unassignProductsFromProductGroup;
507
+ }
508
+ function bulkDeleteProductGroups(payload) {
509
+ function __bulkDeleteProductGroups({ host }) {
510
+ const metadata = {
511
+ entityFqdn: "wix.stores.catalog.v3.product_group",
512
+ method: "POST",
513
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.BulkDeleteProductGroups",
514
+ packageName: PACKAGE_NAME,
515
+ migrationOptions: {
516
+ optInTransformResponse: true
517
+ },
518
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
519
+ protoPath: "/v3/bulk/product-groups/delete",
520
+ data: payload,
521
+ host
522
+ }),
523
+ data: payload
524
+ };
525
+ return metadata;
526
+ }
527
+ return __bulkDeleteProductGroups;
528
+ }
529
+ function bulkUpdateProductGroupTags(payload) {
530
+ function __bulkUpdateProductGroupTags({ host }) {
531
+ const metadata = {
532
+ entityFqdn: "wix.stores.catalog.v3.product_group",
533
+ method: "POST",
534
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.BulkUpdateProductGroupTags",
535
+ packageName: PACKAGE_NAME,
536
+ migrationOptions: {
537
+ optInTransformResponse: true
538
+ },
539
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
540
+ protoPath: "/v3/bulk/product-groups/update-tags",
541
+ data: payload,
542
+ host
543
+ }),
544
+ data: payload
545
+ };
546
+ return metadata;
547
+ }
548
+ return __bulkUpdateProductGroupTags;
549
+ }
550
+ function bulkUpdateProductGroupTagsByFilter(payload) {
551
+ function __bulkUpdateProductGroupTagsByFilter({ host }) {
552
+ const metadata = {
553
+ entityFqdn: "wix.stores.catalog.v3.product_group",
554
+ method: "POST",
555
+ methodFqn: "wix.stores.catalog.product_group.v3.ProductGroupService.BulkUpdateProductGroupTagsByFilter",
556
+ packageName: PACKAGE_NAME,
557
+ migrationOptions: {
558
+ optInTransformResponse: true
559
+ },
560
+ url: resolveWixStoresCatalogProductGroupV3ProductGroupServiceUrl({
561
+ protoPath: "/v3/bulk/product-groups/update-tags-by-filter",
562
+ data: payload,
563
+ host
564
+ }),
565
+ data: payload
566
+ };
567
+ return metadata;
568
+ }
569
+ return __bulkUpdateProductGroupTagsByFilter;
570
+ }
571
+
572
+ // src/stores-catalog-v3-product-group-product-groups-v-3.universal.ts
573
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
574
+ var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
575
+ var import_search_builder_utils = require("@wix/sdk-runtime/search-builder-utils");
576
+ var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
577
+ ChoiceType2["CHOICE_TEXT"] = "CHOICE_TEXT";
578
+ ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
579
+ return ChoiceType2;
580
+ })(ChoiceType || {});
581
+ var AvailabilityStatus = /* @__PURE__ */ ((AvailabilityStatus2) => {
582
+ AvailabilityStatus2["IN_STOCK"] = "IN_STOCK";
583
+ AvailabilityStatus2["OUT_OF_STOCK"] = "OUT_OF_STOCK";
584
+ AvailabilityStatus2["PARTIALLY_OUT_OF_STOCK"] = "PARTIALLY_OUT_OF_STOCK";
585
+ return AvailabilityStatus2;
586
+ })(AvailabilityStatus || {});
587
+ var MembershipStatus = /* @__PURE__ */ ((MembershipStatus2) => {
588
+ MembershipStatus2["ACTIVE"] = "ACTIVE";
589
+ MembershipStatus2["HIDDEN"] = "HIDDEN";
590
+ MembershipStatus2["OUT_OF_SYNC"] = "OUT_OF_SYNC";
591
+ return MembershipStatus2;
592
+ })(MembershipStatus || {});
593
+ var CustomizationType = /* @__PURE__ */ ((CustomizationType2) => {
594
+ CustomizationType2["PRODUCT_OPTION"] = "PRODUCT_OPTION";
595
+ CustomizationType2["MODIFIER"] = "MODIFIER";
596
+ return CustomizationType2;
597
+ })(CustomizationType || {});
598
+ var CustomizationRenderType = /* @__PURE__ */ ((CustomizationRenderType2) => {
599
+ CustomizationRenderType2["FREE_TEXT"] = "FREE_TEXT";
600
+ CustomizationRenderType2["TEXT_CHOICES"] = "TEXT_CHOICES";
601
+ CustomizationRenderType2["SWATCH_CHOICES"] = "SWATCH_CHOICES";
602
+ return CustomizationRenderType2;
603
+ })(CustomizationRenderType || {});
604
+ var ProductGroupRequestedFields = /* @__PURE__ */ ((ProductGroupRequestedFields2) => {
605
+ ProductGroupRequestedFields2["GROUPING_CUSTOMIZATION"] = "GROUPING_CUSTOMIZATION";
606
+ return ProductGroupRequestedFields2;
607
+ })(ProductGroupRequestedFields || {});
608
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
609
+ SortOrder2["ASC"] = "ASC";
610
+ SortOrder2["DESC"] = "DESC";
611
+ return SortOrder2;
612
+ })(SortOrder || {});
613
+ var SortType = /* @__PURE__ */ ((SortType2) => {
614
+ SortType2["COUNT"] = "COUNT";
615
+ SortType2["VALUE"] = "VALUE";
616
+ return SortType2;
617
+ })(SortType || {});
618
+ var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
619
+ SortDirection2["DESC"] = "DESC";
620
+ SortDirection2["ASC"] = "ASC";
621
+ return SortDirection2;
622
+ })(SortDirection || {});
623
+ var MissingValues = /* @__PURE__ */ ((MissingValues2) => {
624
+ MissingValues2["EXCLUDE"] = "EXCLUDE";
625
+ MissingValues2["INCLUDE"] = "INCLUDE";
626
+ return MissingValues2;
627
+ })(MissingValues || {});
628
+ var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
629
+ ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
630
+ ScalarType2["MIN"] = "MIN";
631
+ ScalarType2["MAX"] = "MAX";
632
+ return ScalarType2;
633
+ })(ScalarType || {});
634
+ var NestedAggregationType = /* @__PURE__ */ ((NestedAggregationType2) => {
635
+ NestedAggregationType2["VALUE"] = "VALUE";
636
+ NestedAggregationType2["RANGE"] = "RANGE";
637
+ NestedAggregationType2["SCALAR"] = "SCALAR";
638
+ NestedAggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
639
+ return NestedAggregationType2;
640
+ })(NestedAggregationType || {});
641
+ var Interval = /* @__PURE__ */ ((Interval2) => {
642
+ Interval2["YEAR"] = "YEAR";
643
+ Interval2["MONTH"] = "MONTH";
644
+ Interval2["WEEK"] = "WEEK";
645
+ Interval2["DAY"] = "DAY";
646
+ Interval2["HOUR"] = "HOUR";
647
+ Interval2["MINUTE"] = "MINUTE";
648
+ Interval2["SECOND"] = "SECOND";
649
+ return Interval2;
650
+ })(Interval || {});
651
+ var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
652
+ AggregationType2["VALUE"] = "VALUE";
653
+ AggregationType2["RANGE"] = "RANGE";
654
+ AggregationType2["SCALAR"] = "SCALAR";
655
+ AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
656
+ AggregationType2["NESTED"] = "NESTED";
657
+ return AggregationType2;
658
+ })(AggregationType || {});
659
+ var Mode = /* @__PURE__ */ ((Mode2) => {
660
+ Mode2["OR"] = "OR";
661
+ Mode2["AND"] = "AND";
662
+ return Mode2;
663
+ })(Mode || {});
664
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
665
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
666
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
667
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
668
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
669
+ WebhookIdentityType2["APP"] = "APP";
670
+ return WebhookIdentityType2;
671
+ })(WebhookIdentityType || {});
672
+ async function createProductGroup2(productGroup, options) {
673
+ const { httpClient, sideEffects } = arguments[2];
674
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
675
+ productGroup,
676
+ fields: options?.fields
677
+ });
678
+ const reqOpts = createProductGroup(payload);
679
+ sideEffects?.onSiteCall?.();
680
+ try {
681
+ const result = await httpClient.request(reqOpts);
682
+ sideEffects?.onSuccess?.(result);
683
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.productGroup;
684
+ } catch (err) {
685
+ const transformedError = (0, import_transform_error.transformError)(
686
+ err,
687
+ {
688
+ spreadPathsToArguments: {},
689
+ explicitPathsToArguments: {
690
+ productGroup: "$[0]",
691
+ fields: "$[1].fields"
692
+ },
693
+ singleArgumentUnchanged: false
694
+ },
695
+ ["productGroup", "options"]
696
+ );
697
+ sideEffects?.onError?.(err);
698
+ throw transformedError;
699
+ }
700
+ }
701
+ async function updateProductGroup2(_id, productGroup, options) {
702
+ const { httpClient, sideEffects } = arguments[3];
703
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
704
+ productGroup: { ...productGroup, id: _id },
705
+ fields: options?.fields
706
+ });
707
+ const reqOpts = updateProductGroup(payload);
708
+ sideEffects?.onSiteCall?.();
709
+ try {
710
+ const result = await httpClient.request(reqOpts);
711
+ sideEffects?.onSuccess?.(result);
712
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.productGroup;
713
+ } catch (err) {
714
+ const transformedError = (0, import_transform_error.transformError)(
715
+ err,
716
+ {
717
+ spreadPathsToArguments: { productGroup: "$[1]" },
718
+ explicitPathsToArguments: {
719
+ "productGroup.id": "$[0]",
720
+ fields: "$[2].fields"
721
+ },
722
+ singleArgumentUnchanged: false
723
+ },
724
+ ["_id", "productGroup", "options"]
725
+ );
726
+ sideEffects?.onError?.(err);
727
+ throw transformedError;
728
+ }
729
+ }
730
+ async function deleteProductGroup2(productGroupId) {
731
+ const { httpClient, sideEffects } = arguments[1];
732
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
733
+ productGroupId
734
+ });
735
+ const reqOpts = deleteProductGroup(payload);
736
+ sideEffects?.onSiteCall?.();
737
+ try {
738
+ const result = await httpClient.request(reqOpts);
739
+ sideEffects?.onSuccess?.(result);
740
+ } catch (err) {
741
+ const transformedError = (0, import_transform_error.transformError)(
742
+ err,
743
+ {
744
+ spreadPathsToArguments: {},
745
+ explicitPathsToArguments: { productGroupId: "$[0]" },
746
+ singleArgumentUnchanged: false
747
+ },
748
+ ["productGroupId"]
749
+ );
750
+ sideEffects?.onError?.(err);
751
+ throw transformedError;
752
+ }
753
+ }
754
+ async function getProductGroup2(productGroupId, options) {
755
+ const { httpClient, sideEffects } = arguments[2];
756
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
757
+ productGroupId,
758
+ fields: options?.fields
759
+ });
760
+ const reqOpts = getProductGroup(payload);
761
+ sideEffects?.onSiteCall?.();
762
+ try {
763
+ const result = await httpClient.request(reqOpts);
764
+ sideEffects?.onSuccess?.(result);
765
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.productGroup;
766
+ } catch (err) {
767
+ const transformedError = (0, import_transform_error.transformError)(
768
+ err,
769
+ {
770
+ spreadPathsToArguments: {},
771
+ explicitPathsToArguments: {
772
+ productGroupId: "$[0]",
773
+ fields: "$[1].fields"
774
+ },
775
+ singleArgumentUnchanged: false
776
+ },
777
+ ["productGroupId", "options"]
778
+ );
779
+ sideEffects?.onError?.(err);
780
+ throw transformedError;
781
+ }
782
+ }
783
+ function queryProductGroups2(options) {
784
+ const { httpClient, sideEffects } = arguments[1];
785
+ return (0, import_query_builder.queryBuilder)({
786
+ func: async (payload) => {
787
+ const reqOpts = queryProductGroups({
788
+ ...payload,
789
+ ...options ?? {}
790
+ });
791
+ sideEffects?.onSiteCall?.();
792
+ try {
793
+ const result = await httpClient.request(reqOpts);
794
+ sideEffects?.onSuccess?.(result);
795
+ return result;
796
+ } catch (err) {
797
+ sideEffects?.onError?.(err);
798
+ throw err;
799
+ }
800
+ },
801
+ requestTransformer: (query) => {
802
+ const args = [query, options];
803
+ return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
804
+ ...args?.[1],
805
+ query: args?.[0]
806
+ });
807
+ },
808
+ responseTransformer: ({
809
+ data
810
+ }) => {
811
+ const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
812
+ (0, import_transform_paths2.transformPaths)(data, [])
813
+ );
814
+ return {
815
+ items: transformedData?.productGroups,
816
+ pagingMetadata: transformedData?.pagingMetadata
817
+ };
818
+ },
819
+ errorTransformer: (err) => {
820
+ const transformedError = (0, import_transform_error.transformError)(err, {
821
+ spreadPathsToArguments: {},
822
+ explicitPathsToArguments: { query: "$[0]" },
823
+ singleArgumentUnchanged: false
824
+ });
825
+ throw transformedError;
826
+ },
827
+ pagingMethod: "CURSOR",
828
+ transformationPaths: {}
829
+ });
830
+ }
831
+ async function typedQueryProductGroups(query, options) {
832
+ const { httpClient, sideEffects } = arguments[2];
833
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
834
+ query,
835
+ ...options
836
+ });
837
+ const reqOpts = queryProductGroups(payload);
838
+ sideEffects?.onSiteCall?.();
839
+ try {
840
+ const result = await httpClient.request(reqOpts);
841
+ sideEffects?.onSuccess?.(result);
842
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
843
+ } catch (err) {
844
+ const transformedError = (0, import_transform_error.transformError)(
845
+ err,
846
+ {
847
+ spreadPathsToArguments: {},
848
+ explicitPathsToArguments: { query: "$[0]" },
849
+ singleArgumentUnchanged: false
850
+ },
851
+ ["query", "options"]
852
+ );
853
+ sideEffects?.onError?.(err);
854
+ throw transformedError;
855
+ }
856
+ }
857
+ var utils = {
858
+ query: {
859
+ ...(0, import_query_builder_utils.createQueryUtils)()
860
+ },
861
+ search: {
862
+ ...(0, import_search_builder_utils.createSearchUtils)()
863
+ }
864
+ };
865
+ async function searchProductGroups2(search, options) {
866
+ const { httpClient, sideEffects } = arguments[2];
867
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
868
+ search,
869
+ fields: options?.fields
870
+ });
871
+ const reqOpts = searchProductGroups(payload);
872
+ sideEffects?.onSiteCall?.();
873
+ try {
874
+ const result = await httpClient.request(reqOpts);
875
+ sideEffects?.onSuccess?.(result);
876
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
877
+ } catch (err) {
878
+ const transformedError = (0, import_transform_error.transformError)(
879
+ err,
880
+ {
881
+ spreadPathsToArguments: {},
882
+ explicitPathsToArguments: { search: "$[0]", fields: "$[1].fields" },
883
+ singleArgumentUnchanged: false
884
+ },
885
+ ["search", "options"]
886
+ );
887
+ sideEffects?.onError?.(err);
888
+ throw transformedError;
889
+ }
890
+ }
891
+ async function bulkCreateProductGroups2(productGroups, options) {
892
+ const { httpClient, sideEffects } = arguments[2];
893
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
894
+ productGroups,
895
+ returnEntity: options?.returnEntity,
896
+ fields: options?.fields
897
+ });
898
+ const reqOpts = bulkCreateProductGroups(payload);
899
+ sideEffects?.onSiteCall?.();
900
+ try {
901
+ const result = await httpClient.request(reqOpts);
902
+ sideEffects?.onSuccess?.(result);
903
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
904
+ } catch (err) {
905
+ const transformedError = (0, import_transform_error.transformError)(
906
+ err,
907
+ {
908
+ spreadPathsToArguments: {},
909
+ explicitPathsToArguments: {
910
+ productGroups: "$[0]",
911
+ returnEntity: "$[1].returnEntity",
912
+ fields: "$[1].fields"
913
+ },
914
+ singleArgumentUnchanged: false
915
+ },
916
+ ["productGroups", "options"]
917
+ );
918
+ sideEffects?.onError?.(err);
919
+ throw transformedError;
920
+ }
921
+ }
922
+ async function bulkUpdateProductGroups2(productGroups, options) {
923
+ const { httpClient, sideEffects } = arguments[2];
924
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
925
+ productGroups,
926
+ returnEntity: options?.returnEntity,
927
+ fields: options?.fields
928
+ });
929
+ const reqOpts = bulkUpdateProductGroups(payload);
930
+ sideEffects?.onSiteCall?.();
931
+ try {
932
+ const result = await httpClient.request(reqOpts);
933
+ sideEffects?.onSuccess?.(result);
934
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
935
+ } catch (err) {
936
+ const transformedError = (0, import_transform_error.transformError)(
937
+ err,
938
+ {
939
+ spreadPathsToArguments: {},
940
+ explicitPathsToArguments: {
941
+ productGroups: "$[0]",
942
+ returnEntity: "$[1].returnEntity",
943
+ fields: "$[1].fields"
944
+ },
945
+ singleArgumentUnchanged: false
946
+ },
947
+ ["productGroups", "options"]
948
+ );
949
+ sideEffects?.onError?.(err);
950
+ throw transformedError;
951
+ }
952
+ }
953
+ async function assignProductsToProductGroup2(productGroupId, options) {
954
+ const { httpClient, sideEffects } = arguments[2];
955
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
956
+ productGroupId,
957
+ productIds: options?.productIds
958
+ });
959
+ const reqOpts = assignProductsToProductGroup(
960
+ payload
961
+ );
962
+ sideEffects?.onSiteCall?.();
963
+ try {
964
+ const result = await httpClient.request(reqOpts);
965
+ sideEffects?.onSuccess?.(result);
966
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
967
+ } catch (err) {
968
+ const transformedError = (0, import_transform_error.transformError)(
969
+ err,
970
+ {
971
+ spreadPathsToArguments: {},
972
+ explicitPathsToArguments: {
973
+ productGroupId: "$[0]",
974
+ productIds: "$[1].productIds"
975
+ },
976
+ singleArgumentUnchanged: false
977
+ },
978
+ ["productGroupId", "options"]
979
+ );
980
+ sideEffects?.onError?.(err);
981
+ throw transformedError;
982
+ }
983
+ }
984
+ async function unassignProductsFromProductGroup2(productGroupId, options) {
985
+ const { httpClient, sideEffects } = arguments[2];
986
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
987
+ productGroupId,
988
+ productIds: options?.productIds
989
+ });
990
+ const reqOpts = unassignProductsFromProductGroup(
991
+ payload
992
+ );
993
+ sideEffects?.onSiteCall?.();
994
+ try {
995
+ const result = await httpClient.request(reqOpts);
996
+ sideEffects?.onSuccess?.(result);
997
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
998
+ } catch (err) {
999
+ const transformedError = (0, import_transform_error.transformError)(
1000
+ err,
1001
+ {
1002
+ spreadPathsToArguments: {},
1003
+ explicitPathsToArguments: {
1004
+ productGroupId: "$[0]",
1005
+ productIds: "$[1].productIds"
1006
+ },
1007
+ singleArgumentUnchanged: false
1008
+ },
1009
+ ["productGroupId", "options"]
1010
+ );
1011
+ sideEffects?.onError?.(err);
1012
+ throw transformedError;
1013
+ }
1014
+ }
1015
+ async function bulkDeleteProductGroups2(productGroupIds) {
1016
+ const { httpClient, sideEffects } = arguments[1];
1017
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1018
+ productGroupIds
1019
+ });
1020
+ const reqOpts = bulkDeleteProductGroups(payload);
1021
+ sideEffects?.onSiteCall?.();
1022
+ try {
1023
+ const result = await httpClient.request(reqOpts);
1024
+ sideEffects?.onSuccess?.(result);
1025
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1026
+ } catch (err) {
1027
+ const transformedError = (0, import_transform_error.transformError)(
1028
+ err,
1029
+ {
1030
+ spreadPathsToArguments: {},
1031
+ explicitPathsToArguments: { productGroupIds: "$[0]" },
1032
+ singleArgumentUnchanged: false
1033
+ },
1034
+ ["productGroupIds"]
1035
+ );
1036
+ sideEffects?.onError?.(err);
1037
+ throw transformedError;
1038
+ }
1039
+ }
1040
+ async function bulkUpdateProductGroupTags2(productGroupIds, options) {
1041
+ const { httpClient, sideEffects } = arguments[2];
1042
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1043
+ productGroupIds,
1044
+ assignTags: options?.assignTags,
1045
+ unassignTags: options?.unassignTags
1046
+ });
1047
+ const reqOpts = bulkUpdateProductGroupTags(
1048
+ payload
1049
+ );
1050
+ sideEffects?.onSiteCall?.();
1051
+ try {
1052
+ const result = await httpClient.request(reqOpts);
1053
+ sideEffects?.onSuccess?.(result);
1054
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1055
+ } catch (err) {
1056
+ const transformedError = (0, import_transform_error.transformError)(
1057
+ err,
1058
+ {
1059
+ spreadPathsToArguments: {},
1060
+ explicitPathsToArguments: {
1061
+ productGroupIds: "$[0]",
1062
+ assignTags: "$[1].assignTags",
1063
+ unassignTags: "$[1].unassignTags"
1064
+ },
1065
+ singleArgumentUnchanged: false
1066
+ },
1067
+ ["productGroupIds", "options"]
1068
+ );
1069
+ sideEffects?.onError?.(err);
1070
+ throw transformedError;
1071
+ }
1072
+ }
1073
+ async function bulkUpdateProductGroupTagsByFilter2(filter, options) {
1074
+ const { httpClient, sideEffects } = arguments[2];
1075
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1076
+ filter,
1077
+ assignTags: options?.assignTags,
1078
+ unassignTags: options?.unassignTags
1079
+ });
1080
+ const reqOpts = bulkUpdateProductGroupTagsByFilter(
1081
+ payload
1082
+ );
1083
+ sideEffects?.onSiteCall?.();
1084
+ try {
1085
+ const result = await httpClient.request(reqOpts);
1086
+ sideEffects?.onSuccess?.(result);
1087
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1088
+ } catch (err) {
1089
+ const transformedError = (0, import_transform_error.transformError)(
1090
+ err,
1091
+ {
1092
+ spreadPathsToArguments: {},
1093
+ explicitPathsToArguments: {
1094
+ filter: "$[0]",
1095
+ assignTags: "$[1].assignTags",
1096
+ unassignTags: "$[1].unassignTags"
1097
+ },
1098
+ singleArgumentUnchanged: false
1099
+ },
1100
+ ["filter", "options"]
1101
+ );
1102
+ sideEffects?.onError?.(err);
1103
+ throw transformedError;
1104
+ }
1105
+ }
1106
+
1107
+ // src/stores-catalog-v3-product-group-product-groups-v-3.public.ts
1108
+ function createProductGroup3(httpClient) {
1109
+ return (productGroup, options) => createProductGroup2(
1110
+ productGroup,
1111
+ options,
1112
+ // @ts-ignore
1113
+ { httpClient }
1114
+ );
1115
+ }
1116
+ function updateProductGroup3(httpClient) {
1117
+ return (_id, productGroup, options) => updateProductGroup2(
1118
+ _id,
1119
+ productGroup,
1120
+ options,
1121
+ // @ts-ignore
1122
+ { httpClient }
1123
+ );
1124
+ }
1125
+ function deleteProductGroup3(httpClient) {
1126
+ return (productGroupId) => deleteProductGroup2(
1127
+ productGroupId,
1128
+ // @ts-ignore
1129
+ { httpClient }
1130
+ );
1131
+ }
1132
+ function getProductGroup3(httpClient) {
1133
+ return (productGroupId, options) => getProductGroup2(
1134
+ productGroupId,
1135
+ options,
1136
+ // @ts-ignore
1137
+ { httpClient }
1138
+ );
1139
+ }
1140
+ function queryProductGroups3(httpClient) {
1141
+ return (options) => queryProductGroups2(
1142
+ options,
1143
+ // @ts-ignore
1144
+ { httpClient }
1145
+ );
1146
+ }
1147
+ function typedQueryProductGroups2(httpClient) {
1148
+ return (query, options) => typedQueryProductGroups(
1149
+ query,
1150
+ options,
1151
+ // @ts-ignore
1152
+ { httpClient }
1153
+ );
1154
+ }
1155
+ function searchProductGroups3(httpClient) {
1156
+ return (search, options) => searchProductGroups2(
1157
+ search,
1158
+ options,
1159
+ // @ts-ignore
1160
+ { httpClient }
1161
+ );
1162
+ }
1163
+ function bulkCreateProductGroups3(httpClient) {
1164
+ return (productGroups, options) => bulkCreateProductGroups2(
1165
+ productGroups,
1166
+ options,
1167
+ // @ts-ignore
1168
+ { httpClient }
1169
+ );
1170
+ }
1171
+ function bulkUpdateProductGroups3(httpClient) {
1172
+ return (productGroups, options) => bulkUpdateProductGroups2(
1173
+ productGroups,
1174
+ options,
1175
+ // @ts-ignore
1176
+ { httpClient }
1177
+ );
1178
+ }
1179
+ function assignProductsToProductGroup3(httpClient) {
1180
+ return (productGroupId, options) => assignProductsToProductGroup2(
1181
+ productGroupId,
1182
+ options,
1183
+ // @ts-ignore
1184
+ { httpClient }
1185
+ );
1186
+ }
1187
+ function unassignProductsFromProductGroup3(httpClient) {
1188
+ return (productGroupId, options) => unassignProductsFromProductGroup2(
1189
+ productGroupId,
1190
+ options,
1191
+ // @ts-ignore
1192
+ { httpClient }
1193
+ );
1194
+ }
1195
+ function bulkDeleteProductGroups3(httpClient) {
1196
+ return (productGroupIds) => bulkDeleteProductGroups2(
1197
+ productGroupIds,
1198
+ // @ts-ignore
1199
+ { httpClient }
1200
+ );
1201
+ }
1202
+ function bulkUpdateProductGroupTags3(httpClient) {
1203
+ return (productGroupIds, options) => bulkUpdateProductGroupTags2(
1204
+ productGroupIds,
1205
+ options,
1206
+ // @ts-ignore
1207
+ { httpClient }
1208
+ );
1209
+ }
1210
+ function bulkUpdateProductGroupTagsByFilter3(httpClient) {
1211
+ return (filter, options) => bulkUpdateProductGroupTagsByFilter2(
1212
+ filter,
1213
+ options,
1214
+ // @ts-ignore
1215
+ { httpClient }
1216
+ );
1217
+ }
1218
+
1219
+ // src/stores-catalog-v3-product-group-product-groups-v-3.context.ts
1220
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1221
+ var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
1222
+ function customQueryProductGroups(httpClient) {
1223
+ const router = (0, import_query_method_router.createQueryOverloadRouter)({
1224
+ builderQueryFunction: (options) => queryProductGroups3(httpClient)(options),
1225
+ typedQueryFunction: (query, options) => typedQueryProductGroups2(httpClient)(query, options),
1226
+ hasOptionsParameter: true
1227
+ });
1228
+ function overloadedQuery(queryOrOptions, options) {
1229
+ return router(...arguments);
1230
+ }
1231
+ return overloadedQuery;
1232
+ }
1233
+ var createProductGroup4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createProductGroup3);
1234
+ var updateProductGroup4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateProductGroup3);
1235
+ var deleteProductGroup4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteProductGroup3);
1236
+ var getProductGroup4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getProductGroup3);
1237
+ var searchProductGroups4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(searchProductGroups3);
1238
+ var bulkCreateProductGroups4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateProductGroups3);
1239
+ var bulkUpdateProductGroups4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateProductGroups3);
1240
+ var assignProductsToProductGroup4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(assignProductsToProductGroup3);
1241
+ var unassignProductsFromProductGroup4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(unassignProductsFromProductGroup3);
1242
+ var bulkDeleteProductGroups4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteProductGroups3);
1243
+ var bulkUpdateProductGroupTags4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateProductGroupTags3);
1244
+ var bulkUpdateProductGroupTagsByFilter4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateProductGroupTagsByFilter3);
1245
+ var queryProductGroups4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryProductGroups);
1246
+ // Annotate the CommonJS export names for ESM import in node:
1247
+ 0 && (module.exports = {
1248
+ AggregationType,
1249
+ AvailabilityStatus,
1250
+ ChoiceType,
1251
+ CustomizationRenderType,
1252
+ CustomizationType,
1253
+ Interval,
1254
+ MembershipStatus,
1255
+ MissingValues,
1256
+ Mode,
1257
+ NestedAggregationType,
1258
+ ProductGroupRequestedFields,
1259
+ ScalarType,
1260
+ SortDirection,
1261
+ SortOrder,
1262
+ SortType,
1263
+ WebhookIdentityType,
1264
+ assignProductsToProductGroup,
1265
+ bulkCreateProductGroups,
1266
+ bulkDeleteProductGroups,
1267
+ bulkUpdateProductGroupTags,
1268
+ bulkUpdateProductGroupTagsByFilter,
1269
+ bulkUpdateProductGroups,
1270
+ createProductGroup,
1271
+ deleteProductGroup,
1272
+ getProductGroup,
1273
+ queryProductGroups,
1274
+ searchProductGroups,
1275
+ unassignProductsFromProductGroup,
1276
+ updateProductGroup,
1277
+ utils
1278
+ });
1279
+ //# sourceMappingURL=index.js.map