@wix/auto_sdk_ecom_discount-rules 1.0.101 → 1.0.103

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 (37) hide show
  1. package/build/cjs/index.d.ts +3 -27
  2. package/build/cjs/index.js +0 -138
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +9 -141
  5. package/build/cjs/index.typings.js +0 -120
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +10 -106
  8. package/build/cjs/meta.js +0 -94
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +3 -27
  11. package/build/es/index.mjs +0 -136
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +9 -141
  14. package/build/es/index.typings.mjs +0 -118
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +10 -106
  17. package/build/es/meta.mjs +0 -92
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +3 -27
  20. package/build/internal/cjs/index.js +0 -138
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +9 -141
  23. package/build/internal/cjs/index.typings.js +0 -120
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +10 -106
  26. package/build/internal/cjs/meta.js +0 -94
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +3 -27
  29. package/build/internal/es/index.mjs +0 -136
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +9 -141
  32. package/build/internal/es/index.typings.mjs +0 -118
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +10 -106
  35. package/build/internal/es/meta.mjs +0 -92
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -275,65 +275,20 @@ function queryDiscountRules(payload) {
275
275
  }
276
276
  return __queryDiscountRules;
277
277
  }
278
- function bulkUpdateDiscountRuleTags(payload) {
279
- function __bulkUpdateDiscountRuleTags({ host }) {
280
- const metadata = {
281
- entityFqdn: "wix.ecom.discounts.v1.discount_rule",
282
- method: "POST",
283
- methodFqn: "com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTags",
284
- packageName: PACKAGE_NAME,
285
- migrationOptions: {
286
- optInTransformResponse: true
287
- },
288
- url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({
289
- protoPath: "/v1/bulk/discount-rules/update-tags",
290
- data: payload,
291
- host
292
- }),
293
- data: payload
294
- };
295
- return metadata;
296
- }
297
- return __bulkUpdateDiscountRuleTags;
298
- }
299
- function bulkUpdateDiscountRuleTagsByFilter(payload) {
300
- function __bulkUpdateDiscountRuleTagsByFilter({ host }) {
301
- const metadata = {
302
- entityFqdn: "wix.ecom.discounts.v1.discount_rule",
303
- method: "POST",
304
- methodFqn: "com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTagsByFilter",
305
- packageName: PACKAGE_NAME,
306
- migrationOptions: {
307
- optInTransformResponse: true
308
- },
309
- url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({
310
- protoPath: "/v1/bulk/discount-rules/update-tags-by-filter",
311
- data: payload,
312
- host
313
- }),
314
- data: payload
315
- };
316
- return metadata;
317
- }
318
- return __bulkUpdateDiscountRuleTagsByFilter;
319
- }
320
278
 
321
279
  // src/ecom-discounts-v1-discount-rule-discount-rules.universal.ts
322
280
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
323
281
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
324
282
  var ScopeType = /* @__PURE__ */ ((ScopeType2) => {
325
- ScopeType2["UNDEFINED_SCOPE"] = "UNDEFINED_SCOPE";
326
283
  ScopeType2["CATALOG_ITEM"] = "CATALOG_ITEM";
327
284
  ScopeType2["CUSTOM_FILTER"] = "CUSTOM_FILTER";
328
285
  return ScopeType2;
329
286
  })(ScopeType || {});
330
287
  var EligibilityType = /* @__PURE__ */ ((EligibilityType2) => {
331
- EligibilityType2["UNKNOWN_ELIGIBILITY_TYPE"] = "UNKNOWN_ELIGIBILITY_TYPE";
332
288
  EligibilityType2["INDIVIDUAL_MEMBERS"] = "INDIVIDUAL_MEMBERS";
333
289
  return EligibilityType2;
334
290
  })(EligibilityType || {});
335
291
  var TriggerType = /* @__PURE__ */ ((TriggerType2) => {
336
- TriggerType2["UNDEFINED"] = "UNDEFINED";
337
292
  TriggerType2["AND"] = "AND";
338
293
  TriggerType2["SUBTOTAL_RANGE"] = "SUBTOTAL_RANGE";
339
294
  TriggerType2["ITEM_QUANTITY_RANGE"] = "ITEM_QUANTITY_RANGE";
@@ -343,7 +298,6 @@ var TriggerType = /* @__PURE__ */ ((TriggerType2) => {
343
298
  return TriggerType2;
344
299
  })(TriggerType || {});
345
300
  var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
346
- DayOfWeek2["UNKOWN_DAY_OF_WEEK"] = "UNKOWN_DAY_OF_WEEK";
347
301
  DayOfWeek2["MON"] = "MON";
348
302
  DayOfWeek2["TUE"] = "TUE";
349
303
  DayOfWeek2["WED"] = "WED";
@@ -354,12 +308,10 @@ var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
354
308
  return DayOfWeek2;
355
309
  })(DayOfWeek || {});
356
310
  var Type = /* @__PURE__ */ ((Type2) => {
357
- Type2["UNDEFINED"] = "UNDEFINED";
358
311
  Type2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
359
312
  return Type2;
360
313
  })(Type || {});
361
314
  var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
362
- DiscountType2["UNDEFINED"] = "UNDEFINED";
363
315
  DiscountType2["PERCENTAGE"] = "PERCENTAGE";
364
316
  DiscountType2["FIXED_AMOUNT"] = "FIXED_AMOUNT";
365
317
  DiscountType2["FIXED_PRICE"] = "FIXED_PRICE";
@@ -367,14 +319,12 @@ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
367
319
  return DiscountType2;
368
320
  })(DiscountType || {});
369
321
  var Status = /* @__PURE__ */ ((Status2) => {
370
- Status2["UNDEFINED"] = "UNDEFINED";
371
322
  Status2["LIVE"] = "LIVE";
372
323
  Status2["EXPIRED"] = "EXPIRED";
373
324
  Status2["PENDING"] = "PENDING";
374
325
  return Status2;
375
326
  })(Status || {});
376
327
  var AppliedSubjectType = /* @__PURE__ */ ((AppliedSubjectType2) => {
377
- AppliedSubjectType2["UNDEFINED"] = "UNDEFINED";
378
328
  AppliedSubjectType2["ALL_ITEMS"] = "ALL_ITEMS";
379
329
  AppliedSubjectType2["LOWEST_PRICED_ITEM"] = "LOWEST_PRICED_ITEM";
380
330
  return AppliedSubjectType2;
@@ -564,72 +514,6 @@ var utils = {
564
514
  ...createQueryUtils()
565
515
  }
566
516
  };
567
- async function bulkUpdateDiscountRuleTags2(discountRuleIds, options) {
568
- const { httpClient, sideEffects } = arguments[2];
569
- const payload = renameKeysFromSDKRequestToRESTRequest({
570
- discountRuleIds,
571
- assignTags: options?.assignTags,
572
- unassignTags: options?.unassignTags
573
- });
574
- const reqOpts = bulkUpdateDiscountRuleTags(
575
- payload
576
- );
577
- sideEffects?.onSiteCall?.();
578
- try {
579
- const result = await httpClient.request(reqOpts);
580
- sideEffects?.onSuccess?.(result);
581
- return renameKeysFromRESTResponseToSDKResponse(result.data);
582
- } catch (err) {
583
- const transformedError = sdkTransformError(
584
- err,
585
- {
586
- spreadPathsToArguments: {},
587
- explicitPathsToArguments: {
588
- discountRuleIds: "$[0]",
589
- assignTags: "$[1].assignTags",
590
- unassignTags: "$[1].unassignTags"
591
- },
592
- singleArgumentUnchanged: false
593
- },
594
- ["discountRuleIds", "options"]
595
- );
596
- sideEffects?.onError?.(err);
597
- throw transformedError;
598
- }
599
- }
600
- async function bulkUpdateDiscountRuleTagsByFilter2(filter, options) {
601
- const { httpClient, sideEffects } = arguments[2];
602
- const payload = renameKeysFromSDKRequestToRESTRequest({
603
- filter,
604
- assignTags: options?.assignTags,
605
- unassignTags: options?.unassignTags
606
- });
607
- const reqOpts = bulkUpdateDiscountRuleTagsByFilter(
608
- payload
609
- );
610
- sideEffects?.onSiteCall?.();
611
- try {
612
- const result = await httpClient.request(reqOpts);
613
- sideEffects?.onSuccess?.(result);
614
- return renameKeysFromRESTResponseToSDKResponse(result.data);
615
- } catch (err) {
616
- const transformedError = sdkTransformError(
617
- err,
618
- {
619
- spreadPathsToArguments: {},
620
- explicitPathsToArguments: {
621
- filter: "$[0]",
622
- assignTags: "$[1].assignTags",
623
- unassignTags: "$[1].unassignTags"
624
- },
625
- singleArgumentUnchanged: false
626
- },
627
- ["filter", "options"]
628
- );
629
- sideEffects?.onError?.(err);
630
- throw transformedError;
631
- }
632
- }
633
517
 
634
518
  // src/ecom-discounts-v1-discount-rule-discount-rules.public.ts
635
519
  function createDiscountRule3(httpClient) {
@@ -674,22 +558,6 @@ function typedQueryDiscountRules2(httpClient) {
674
558
  { httpClient }
675
559
  );
676
560
  }
677
- function bulkUpdateDiscountRuleTags3(httpClient) {
678
- return (discountRuleIds, options) => bulkUpdateDiscountRuleTags2(
679
- discountRuleIds,
680
- options,
681
- // @ts-ignore
682
- { httpClient }
683
- );
684
- }
685
- function bulkUpdateDiscountRuleTagsByFilter3(httpClient) {
686
- return (filter, options) => bulkUpdateDiscountRuleTagsByFilter2(
687
- filter,
688
- options,
689
- // @ts-ignore
690
- { httpClient }
691
- );
692
- }
693
561
  var onDiscountRuleCreated = EventDefinition(
694
562
  "wix.ecom.discounts.v1.discount_rule_created",
695
563
  true,
@@ -783,8 +651,6 @@ var createDiscountRule4 = /* @__PURE__ */ createRESTModule(createDiscountRule3);
783
651
  var getDiscountRule4 = /* @__PURE__ */ createRESTModule(getDiscountRule3);
784
652
  var updateDiscountRule4 = /* @__PURE__ */ createRESTModule(updateDiscountRule3);
785
653
  var deleteDiscountRule4 = /* @__PURE__ */ createRESTModule(deleteDiscountRule3);
786
- var bulkUpdateDiscountRuleTags4 = /* @__PURE__ */ createRESTModule(bulkUpdateDiscountRuleTags3);
787
- var bulkUpdateDiscountRuleTagsByFilter4 = /* @__PURE__ */ createRESTModule(bulkUpdateDiscountRuleTagsByFilter3);
788
654
  var queryDiscountRules4 = /* @__PURE__ */ createRESTModule(customQueryDiscountRules);
789
655
  var onDiscountRuleCreated2 = createEventModule(
790
656
  onDiscountRuleCreated
@@ -806,8 +672,6 @@ export {
806
672
  TriggerType,
807
673
  Type,
808
674
  WebhookIdentityType,
809
- bulkUpdateDiscountRuleTags4 as bulkUpdateDiscountRuleTags,
810
- bulkUpdateDiscountRuleTagsByFilter4 as bulkUpdateDiscountRuleTagsByFilter,
811
675
  createDiscountRule4 as createDiscountRule,
812
676
  deleteDiscountRule4 as deleteDiscountRule,
813
677
  getDiscountRule4 as getDiscountRule,