@wix/auto_sdk_ecom_discount-rules 1.0.102 → 1.0.104

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 -130
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -122
  5. package/build/cjs/index.typings.js +0 -112
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +2 -87
  8. package/build/cjs/meta.js +0 -86
  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 -128
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -122
  14. package/build/es/index.typings.mjs +0 -110
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +2 -87
  17. package/build/es/meta.mjs +0 -84
  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 -130
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +1 -122
  23. package/build/internal/cjs/index.typings.js +0 -112
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +2 -87
  26. package/build/internal/cjs/meta.js +0 -86
  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 -128
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +1 -122
  32. package/build/internal/es/index.typings.mjs +0 -110
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +2 -87
  35. package/build/internal/es/meta.mjs +0 -84
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { DiscountRule, CreateDiscountRuleApplicationErrors, CreateDiscountRuleValidationErrors, UpdateDiscountRule, BulkUpdateDiscountRuleTagsOptions, BulkUpdateDiscountRuleTagsResponse, BulkUpdateDiscountRuleTagsApplicationErrors, BulkUpdateDiscountRuleTagsByFilterOptions, BulkUpdateDiscountRuleTagsByFilterResponse, BulkUpdateDiscountRuleTagsByFilterApplicationErrors, DiscountRuleCreatedEnvelope, DiscountRuleDeletedEnvelope, DiscountRuleUpdatedEnvelope, DiscountRulesQueryBuilder, DiscountRuleQuery, typedQueryDiscountRules } from './index.typings.js';
3
- export { AccountInfo, AccountInfoMetadata, ActionEvent, ActiveTimeInfo, Address, And, ApplicationError, AppliedDiscount, AppliedDiscountRule, AppliedSubjectType, AppliedSubjectTypeWithLiterals, BaseEventMetadata, BulkActionMetadata, BulkUpdateDiscountRuleTagsByFilterRequest, BulkUpdateDiscountRuleTagsRequest, BulkUpdateDiscountRuleTagsResult, BuyXGetYInfo, BuyerInfo, CatalogItemFilter, CatalogReference, CommonQueryWithEntityContext, ContactSegments, ContactTags, CreateDiscountRuleRequest, CreateDiscountRuleResponse, CursorPaging, Cursors, Custom, CustomFilter, CustomerBuy, CustomerBuyConditionOneOf, CustomerEligibility, CustomerEligibilityOptionsOneOf, CustomerGet, DayOfWeek, DayOfWeekWithLiterals, DeleteDiscountRuleRequest, DeleteDiscountRuleResponse, Discount, DiscountConfig, DiscountDiscountOneOf, DiscountRuleName, DiscountRuleQuerySpec, DiscountRuleUsageLimitReached, DiscountRulesQueryResult, DiscountSettings, DiscountTrigger, DiscountTriggerTriggerOneOf, DiscountType, DiscountTypeWithLiterals, Discounts, DomainEvent, DomainEventBodyOneOf, EligibilityType, EligibilityTypeWithLiterals, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetAppliedDiscountsRequest, GetAppliedDiscountsResponse, GetDiscountRuleRequest, GetDiscountRuleResponse, IdentificationData, IdentificationDataIdOneOf, IndividualMembers, ItemCombination, ItemCombinationLineItem, ItemMetadata, ItemQuantityRange, LineItem, MessageEnvelope, MultiCurrencyPrice, Or, PlatformPaging, PlatformPagingMetadata, PlatformQuery, PlatformQueryPagingMethodOneOf, QuantityBased, QueryDiscountRulesRequest, QueryDiscountRulesResponse, Recurrence, RestoreInfo, Scope, ScopeScopeItemsOneOf, ScopeType, ScopeTypeWithLiterals, ShippingInfo, SortOrder, SortOrderWithLiterals, Sorting, SpecificItemsInfo, Status, StatusWithLiterals, SubtotalRange, TagList, TagReference, Tags, TagsModified, TimeOfDay, TimeWindow, TriggerType, TriggerTypeWithLiterals, Type, TypeWithLiterals, UpdateDiscountRuleRequest, UpdateDiscountRuleResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeeklySchedule, utils } from './index.typings.js';
2
+ import { DiscountRule, CreateDiscountRuleApplicationErrors, CreateDiscountRuleValidationErrors, UpdateDiscountRule, DiscountRuleCreatedEnvelope, DiscountRuleDeletedEnvelope, DiscountRuleUpdatedEnvelope, DiscountRulesQueryBuilder, DiscountRuleQuery, typedQueryDiscountRules } from './index.typings.js';
3
+ export { AccountInfo, AccountInfoMetadata, ActionEvent, ActiveTimeInfo, Address, And, AppliedDiscount, AppliedDiscountRule, AppliedSubjectType, AppliedSubjectTypeWithLiterals, BaseEventMetadata, BuyXGetYInfo, BuyerInfo, CatalogItemFilter, CatalogReference, CommonQueryWithEntityContext, ContactSegments, ContactTags, CreateDiscountRuleRequest, CreateDiscountRuleResponse, CursorPaging, Cursors, Custom, CustomFilter, CustomerBuy, CustomerBuyConditionOneOf, CustomerEligibility, CustomerEligibilityOptionsOneOf, CustomerGet, DayOfWeek, DayOfWeekWithLiterals, DeleteDiscountRuleRequest, DeleteDiscountRuleResponse, Discount, DiscountConfig, DiscountDiscountOneOf, DiscountRuleName, DiscountRuleQuerySpec, DiscountRuleUsageLimitReached, DiscountRulesQueryResult, DiscountSettings, DiscountTrigger, DiscountTriggerTriggerOneOf, DiscountType, DiscountTypeWithLiterals, Discounts, DomainEvent, DomainEventBodyOneOf, EligibilityType, EligibilityTypeWithLiterals, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetAppliedDiscountsRequest, GetAppliedDiscountsResponse, GetDiscountRuleRequest, GetDiscountRuleResponse, IdentificationData, IdentificationDataIdOneOf, IndividualMembers, ItemCombination, ItemCombinationLineItem, ItemQuantityRange, LineItem, MessageEnvelope, MultiCurrencyPrice, Or, PlatformPaging, PlatformPagingMetadata, PlatformQuery, PlatformQueryPagingMethodOneOf, QuantityBased, QueryDiscountRulesRequest, QueryDiscountRulesResponse, Recurrence, RestoreInfo, Scope, ScopeScopeItemsOneOf, ScopeType, ScopeTypeWithLiterals, ShippingInfo, SortOrder, SortOrderWithLiterals, Sorting, SpecificItemsInfo, Status, StatusWithLiterals, SubtotalRange, TagList, TagReference, Tags, TagsModified, TimeOfDay, TimeWindow, TriggerType, TriggerTypeWithLiterals, Type, TypeWithLiterals, UpdateDiscountRuleRequest, UpdateDiscountRuleResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeeklySchedule, utils } from './index.typings.js';
4
4
 
5
5
  declare function createDiscountRule$1(httpClient: HttpClient): CreateDiscountRuleSignature;
6
6
  interface CreateDiscountRuleSignature {
@@ -56,28 +56,6 @@ interface DeleteDiscountRuleSignature {
56
56
  */
57
57
  (discountRuleId: string): Promise<void>;
58
58
  }
59
- declare function bulkUpdateDiscountRuleTags$1(httpClient: HttpClient): BulkUpdateDiscountRuleTagsSignature;
60
- interface BulkUpdateDiscountRuleTagsSignature {
61
- /**
62
- * Bulk update tags for discount rules by IDs.
63
- * @param - IDs of discount rules to update.
64
- */
65
- (discountRuleIds: string[], options?: BulkUpdateDiscountRuleTagsOptions): Promise<NonNullablePaths<BulkUpdateDiscountRuleTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
66
- __applicationErrorsType?: BulkUpdateDiscountRuleTagsApplicationErrors;
67
- }>;
68
- }
69
- declare function bulkUpdateDiscountRuleTagsByFilter$1(httpClient: HttpClient): BulkUpdateDiscountRuleTagsByFilterSignature;
70
- interface BulkUpdateDiscountRuleTagsByFilterSignature {
71
- /**
72
- * Asynchronously update tags on multiple discount rules by filter.
73
- * An empty filter will update all discount rules.
74
- * A tag that appears both in the list of assign and unassign tags, will be assigned.
75
- * @param - Filter.
76
- */
77
- (filter: Record<string, any>, options?: BulkUpdateDiscountRuleTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateDiscountRuleTagsByFilterResponse, `jobId`, 2> & {
78
- __applicationErrorsType?: BulkUpdateDiscountRuleTagsByFilterApplicationErrors;
79
- }>;
80
- }
81
59
  declare const onDiscountRuleCreated$1: EventDefinition<DiscountRuleCreatedEnvelope, "wix.ecom.discounts.v1.discount_rule_created">;
82
60
  declare const onDiscountRuleDeleted$1: EventDefinition<DiscountRuleDeletedEnvelope, "wix.ecom.discounts.v1.discount_rule_deleted">;
83
61
  declare const onDiscountRuleUpdated$1: EventDefinition<DiscountRuleUpdatedEnvelope, "wix.ecom.discounts.v1.discount_rule_updated">;
@@ -90,8 +68,6 @@ declare const createDiscountRule: MaybeContext<BuildRESTFunction<typeof createDi
90
68
  declare const getDiscountRule: MaybeContext<BuildRESTFunction<typeof getDiscountRule$1> & typeof getDiscountRule$1>;
91
69
  declare const updateDiscountRule: MaybeContext<BuildRESTFunction<typeof updateDiscountRule$1> & typeof updateDiscountRule$1>;
92
70
  declare const deleteDiscountRule: MaybeContext<BuildRESTFunction<typeof deleteDiscountRule$1> & typeof deleteDiscountRule$1>;
93
- declare const bulkUpdateDiscountRuleTags: MaybeContext<BuildRESTFunction<typeof bulkUpdateDiscountRuleTags$1> & typeof bulkUpdateDiscountRuleTags$1>;
94
- declare const bulkUpdateDiscountRuleTagsByFilter: MaybeContext<BuildRESTFunction<typeof bulkUpdateDiscountRuleTagsByFilter$1> & typeof bulkUpdateDiscountRuleTagsByFilter$1>;
95
71
  declare const queryDiscountRules: MaybeContext<BuildRESTFunction<typeof customQueryDiscountRules> & typeof customQueryDiscountRules>;
96
72
  /**
97
73
  * Triggered when a discount rule is created.
@@ -106,4 +82,4 @@ declare const onDiscountRuleDeleted: BuildEventDefinition<typeof onDiscountRuleD
106
82
  */
107
83
  declare const onDiscountRuleUpdated: BuildEventDefinition<typeof onDiscountRuleUpdated$1> & typeof onDiscountRuleUpdated$1;
108
84
 
109
- export { BulkUpdateDiscountRuleTagsApplicationErrors, BulkUpdateDiscountRuleTagsByFilterApplicationErrors, BulkUpdateDiscountRuleTagsByFilterOptions, BulkUpdateDiscountRuleTagsByFilterResponse, BulkUpdateDiscountRuleTagsOptions, BulkUpdateDiscountRuleTagsResponse, CreateDiscountRuleApplicationErrors, CreateDiscountRuleValidationErrors, DiscountRule, DiscountRuleCreatedEnvelope, DiscountRuleDeletedEnvelope, DiscountRuleQuery, DiscountRuleUpdatedEnvelope, DiscountRulesQueryBuilder, UpdateDiscountRule, bulkUpdateDiscountRuleTags, bulkUpdateDiscountRuleTagsByFilter, createDiscountRule, deleteDiscountRule, getDiscountRule, onDiscountRuleCreated, onDiscountRuleDeleted, onDiscountRuleUpdated, queryDiscountRules, updateDiscountRule };
85
+ export { CreateDiscountRuleApplicationErrors, CreateDiscountRuleValidationErrors, DiscountRule, DiscountRuleCreatedEnvelope, DiscountRuleDeletedEnvelope, DiscountRuleQuery, DiscountRuleUpdatedEnvelope, DiscountRulesQueryBuilder, UpdateDiscountRule, createDiscountRule, deleteDiscountRule, getDiscountRule, onDiscountRuleCreated, onDiscountRuleDeleted, onDiscountRuleUpdated, queryDiscountRules, updateDiscountRule };
@@ -30,8 +30,6 @@ __export(index_exports, {
30
30
  TriggerType: () => TriggerType,
31
31
  Type: () => Type,
32
32
  WebhookIdentityType: () => WebhookIdentityType,
33
- bulkUpdateDiscountRuleTags: () => bulkUpdateDiscountRuleTags4,
34
- bulkUpdateDiscountRuleTagsByFilter: () => bulkUpdateDiscountRuleTagsByFilter4,
35
33
  createDiscountRule: () => createDiscountRule4,
36
34
  deleteDiscountRule: () => deleteDiscountRule4,
37
35
  getDiscountRule: () => getDiscountRule4,
@@ -318,48 +316,6 @@ function queryDiscountRules(payload) {
318
316
  }
319
317
  return __queryDiscountRules;
320
318
  }
321
- function bulkUpdateDiscountRuleTags(payload) {
322
- function __bulkUpdateDiscountRuleTags({ host }) {
323
- const metadata = {
324
- entityFqdn: "wix.ecom.discounts.v1.discount_rule",
325
- method: "POST",
326
- methodFqn: "com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTags",
327
- packageName: PACKAGE_NAME,
328
- migrationOptions: {
329
- optInTransformResponse: true
330
- },
331
- url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({
332
- protoPath: "/v1/bulk/discount-rules/update-tags",
333
- data: payload,
334
- host
335
- }),
336
- data: payload
337
- };
338
- return metadata;
339
- }
340
- return __bulkUpdateDiscountRuleTags;
341
- }
342
- function bulkUpdateDiscountRuleTagsByFilter(payload) {
343
- function __bulkUpdateDiscountRuleTagsByFilter({ host }) {
344
- const metadata = {
345
- entityFqdn: "wix.ecom.discounts.v1.discount_rule",
346
- method: "POST",
347
- methodFqn: "com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTagsByFilter",
348
- packageName: PACKAGE_NAME,
349
- migrationOptions: {
350
- optInTransformResponse: true
351
- },
352
- url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({
353
- protoPath: "/v1/bulk/discount-rules/update-tags-by-filter",
354
- data: payload,
355
- host
356
- }),
357
- data: payload
358
- };
359
- return metadata;
360
- }
361
- return __bulkUpdateDiscountRuleTagsByFilter;
362
- }
363
319
 
364
320
  // src/ecom-discounts-v1-discount-rule-discount-rules.universal.ts
365
321
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
@@ -599,72 +555,6 @@ var utils = {
599
555
  ...(0, import_query_builder_utils.createQueryUtils)()
600
556
  }
601
557
  };
602
- async function bulkUpdateDiscountRuleTags2(discountRuleIds, options) {
603
- const { httpClient, sideEffects } = arguments[2];
604
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
605
- discountRuleIds,
606
- assignTags: options?.assignTags,
607
- unassignTags: options?.unassignTags
608
- });
609
- const reqOpts = bulkUpdateDiscountRuleTags(
610
- payload
611
- );
612
- sideEffects?.onSiteCall?.();
613
- try {
614
- const result = await httpClient.request(reqOpts);
615
- sideEffects?.onSuccess?.(result);
616
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
617
- } catch (err) {
618
- const transformedError = (0, import_transform_error.transformError)(
619
- err,
620
- {
621
- spreadPathsToArguments: {},
622
- explicitPathsToArguments: {
623
- discountRuleIds: "$[0]",
624
- assignTags: "$[1].assignTags",
625
- unassignTags: "$[1].unassignTags"
626
- },
627
- singleArgumentUnchanged: false
628
- },
629
- ["discountRuleIds", "options"]
630
- );
631
- sideEffects?.onError?.(err);
632
- throw transformedError;
633
- }
634
- }
635
- async function bulkUpdateDiscountRuleTagsByFilter2(filter, options) {
636
- const { httpClient, sideEffects } = arguments[2];
637
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
638
- filter,
639
- assignTags: options?.assignTags,
640
- unassignTags: options?.unassignTags
641
- });
642
- const reqOpts = bulkUpdateDiscountRuleTagsByFilter(
643
- payload
644
- );
645
- sideEffects?.onSiteCall?.();
646
- try {
647
- const result = await httpClient.request(reqOpts);
648
- sideEffects?.onSuccess?.(result);
649
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
650
- } catch (err) {
651
- const transformedError = (0, import_transform_error.transformError)(
652
- err,
653
- {
654
- spreadPathsToArguments: {},
655
- explicitPathsToArguments: {
656
- filter: "$[0]",
657
- assignTags: "$[1].assignTags",
658
- unassignTags: "$[1].unassignTags"
659
- },
660
- singleArgumentUnchanged: false
661
- },
662
- ["filter", "options"]
663
- );
664
- sideEffects?.onError?.(err);
665
- throw transformedError;
666
- }
667
- }
668
558
 
669
559
  // src/ecom-discounts-v1-discount-rule-discount-rules.public.ts
670
560
  function createDiscountRule3(httpClient) {
@@ -709,22 +599,6 @@ function typedQueryDiscountRules2(httpClient) {
709
599
  { httpClient }
710
600
  );
711
601
  }
712
- function bulkUpdateDiscountRuleTags3(httpClient) {
713
- return (discountRuleIds, options) => bulkUpdateDiscountRuleTags2(
714
- discountRuleIds,
715
- options,
716
- // @ts-ignore
717
- { httpClient }
718
- );
719
- }
720
- function bulkUpdateDiscountRuleTagsByFilter3(httpClient) {
721
- return (filter, options) => bulkUpdateDiscountRuleTagsByFilter2(
722
- filter,
723
- options,
724
- // @ts-ignore
725
- { httpClient }
726
- );
727
- }
728
602
  var onDiscountRuleCreated = (0, import_sdk_types.EventDefinition)(
729
603
  "wix.ecom.discounts.v1.discount_rule_created",
730
604
  true,
@@ -818,8 +692,6 @@ var createDiscountRule4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTMod
818
692
  var getDiscountRule4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDiscountRule3);
819
693
  var updateDiscountRule4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateDiscountRule3);
820
694
  var deleteDiscountRule4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteDiscountRule3);
821
- var bulkUpdateDiscountRuleTags4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateDiscountRuleTags3);
822
- var bulkUpdateDiscountRuleTagsByFilter4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateDiscountRuleTagsByFilter3);
823
695
  var queryDiscountRules4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryDiscountRules);
824
696
  var onDiscountRuleCreated2 = (0, import_event_definition_modules.createEventModule)(
825
697
  onDiscountRuleCreated
@@ -842,8 +714,6 @@ var onDiscountRuleUpdated2 = (0, import_event_definition_modules.createEventModu
842
714
  TriggerType,
843
715
  Type,
844
716
  WebhookIdentityType,
845
- bulkUpdateDiscountRuleTags,
846
- bulkUpdateDiscountRuleTagsByFilter,
847
717
  createDiscountRule,
848
718
  deleteDiscountRule,
849
719
  getDiscountRule,