@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.mjs';
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.mjs';
2
+ import { DiscountRule, CreateDiscountRuleApplicationErrors, CreateDiscountRuleValidationErrors, UpdateDiscountRule, DiscountRuleCreatedEnvelope, DiscountRuleDeletedEnvelope, DiscountRuleUpdatedEnvelope, DiscountRulesQueryBuilder, DiscountRuleQuery, typedQueryDiscountRules } from './index.typings.mjs';
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.mjs';
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 };
@@ -275,48 +275,6 @@ 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";
@@ -556,72 +514,6 @@ var utils = {
556
514
  ...createQueryUtils()
557
515
  }
558
516
  };
559
- async function bulkUpdateDiscountRuleTags2(discountRuleIds, options) {
560
- const { httpClient, sideEffects } = arguments[2];
561
- const payload = renameKeysFromSDKRequestToRESTRequest({
562
- discountRuleIds,
563
- assignTags: options?.assignTags,
564
- unassignTags: options?.unassignTags
565
- });
566
- const reqOpts = bulkUpdateDiscountRuleTags(
567
- payload
568
- );
569
- sideEffects?.onSiteCall?.();
570
- try {
571
- const result = await httpClient.request(reqOpts);
572
- sideEffects?.onSuccess?.(result);
573
- return renameKeysFromRESTResponseToSDKResponse(result.data);
574
- } catch (err) {
575
- const transformedError = sdkTransformError(
576
- err,
577
- {
578
- spreadPathsToArguments: {},
579
- explicitPathsToArguments: {
580
- discountRuleIds: "$[0]",
581
- assignTags: "$[1].assignTags",
582
- unassignTags: "$[1].unassignTags"
583
- },
584
- singleArgumentUnchanged: false
585
- },
586
- ["discountRuleIds", "options"]
587
- );
588
- sideEffects?.onError?.(err);
589
- throw transformedError;
590
- }
591
- }
592
- async function bulkUpdateDiscountRuleTagsByFilter2(filter, options) {
593
- const { httpClient, sideEffects } = arguments[2];
594
- const payload = renameKeysFromSDKRequestToRESTRequest({
595
- filter,
596
- assignTags: options?.assignTags,
597
- unassignTags: options?.unassignTags
598
- });
599
- const reqOpts = bulkUpdateDiscountRuleTagsByFilter(
600
- payload
601
- );
602
- sideEffects?.onSiteCall?.();
603
- try {
604
- const result = await httpClient.request(reqOpts);
605
- sideEffects?.onSuccess?.(result);
606
- return renameKeysFromRESTResponseToSDKResponse(result.data);
607
- } catch (err) {
608
- const transformedError = sdkTransformError(
609
- err,
610
- {
611
- spreadPathsToArguments: {},
612
- explicitPathsToArguments: {
613
- filter: "$[0]",
614
- assignTags: "$[1].assignTags",
615
- unassignTags: "$[1].unassignTags"
616
- },
617
- singleArgumentUnchanged: false
618
- },
619
- ["filter", "options"]
620
- );
621
- sideEffects?.onError?.(err);
622
- throw transformedError;
623
- }
624
- }
625
517
 
626
518
  // src/ecom-discounts-v1-discount-rule-discount-rules.public.ts
627
519
  function createDiscountRule3(httpClient) {
@@ -666,22 +558,6 @@ function typedQueryDiscountRules2(httpClient) {
666
558
  { httpClient }
667
559
  );
668
560
  }
669
- function bulkUpdateDiscountRuleTags3(httpClient) {
670
- return (discountRuleIds, options) => bulkUpdateDiscountRuleTags2(
671
- discountRuleIds,
672
- options,
673
- // @ts-ignore
674
- { httpClient }
675
- );
676
- }
677
- function bulkUpdateDiscountRuleTagsByFilter3(httpClient) {
678
- return (filter, options) => bulkUpdateDiscountRuleTagsByFilter2(
679
- filter,
680
- options,
681
- // @ts-ignore
682
- { httpClient }
683
- );
684
- }
685
561
  var onDiscountRuleCreated = EventDefinition(
686
562
  "wix.ecom.discounts.v1.discount_rule_created",
687
563
  true,
@@ -775,8 +651,6 @@ var createDiscountRule4 = /* @__PURE__ */ createRESTModule(createDiscountRule3);
775
651
  var getDiscountRule4 = /* @__PURE__ */ createRESTModule(getDiscountRule3);
776
652
  var updateDiscountRule4 = /* @__PURE__ */ createRESTModule(updateDiscountRule3);
777
653
  var deleteDiscountRule4 = /* @__PURE__ */ createRESTModule(deleteDiscountRule3);
778
- var bulkUpdateDiscountRuleTags4 = /* @__PURE__ */ createRESTModule(bulkUpdateDiscountRuleTags3);
779
- var bulkUpdateDiscountRuleTagsByFilter4 = /* @__PURE__ */ createRESTModule(bulkUpdateDiscountRuleTagsByFilter3);
780
654
  var queryDiscountRules4 = /* @__PURE__ */ createRESTModule(customQueryDiscountRules);
781
655
  var onDiscountRuleCreated2 = createEventModule(
782
656
  onDiscountRuleCreated
@@ -798,8 +672,6 @@ export {
798
672
  TriggerType,
799
673
  Type,
800
674
  WebhookIdentityType,
801
- bulkUpdateDiscountRuleTags4 as bulkUpdateDiscountRuleTags,
802
- bulkUpdateDiscountRuleTagsByFilter4 as bulkUpdateDiscountRuleTagsByFilter,
803
675
  createDiscountRule4 as createDiscountRule,
804
676
  deleteDiscountRule4 as deleteDiscountRule,
805
677
  getDiscountRule4 as getDiscountRule,