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