@wix/auto_sdk_ecom_discount-rules 1.0.102 → 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 -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 +2 -2
@@ -1060,77 +1060,6 @@ interface DiscountRuleUsageLimitReached {
1060
1060
  /** Discount Rule */
1061
1061
  rule?: DiscountRule;
1062
1062
  }
1063
- interface BulkUpdateDiscountRuleTagsRequest {
1064
- /**
1065
- * IDs of discount rules to update.
1066
- * @minSize 1
1067
- * @maxSize 100
1068
- * @format GUID
1069
- */
1070
- discountRuleIds: string[];
1071
- /** Tags to assign to the discount rules. */
1072
- assignTags?: Tags;
1073
- /** Tags to unassign from the discount rules. */
1074
- unassignTags?: Tags;
1075
- }
1076
- interface BulkUpdateDiscountRuleTagsResponse {
1077
- /**
1078
- * Results
1079
- * @minSize 1
1080
- * @maxSize 100
1081
- */
1082
- results?: BulkUpdateDiscountRuleTagsResult[];
1083
- /** Metadata regarding the bulk update operation */
1084
- bulkActionMetadata?: BulkActionMetadata;
1085
- }
1086
- interface ItemMetadata {
1087
- /**
1088
- * Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.
1089
- * @format GUID
1090
- */
1091
- _id?: string | null;
1092
- /** Index of the item within the request array. Allows for correlation between request and response items. */
1093
- originalIndex?: number;
1094
- /** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */
1095
- success?: boolean;
1096
- /** Details about the error in case of failure. */
1097
- error?: ApplicationError;
1098
- }
1099
- interface ApplicationError {
1100
- /** Error code. */
1101
- code?: string;
1102
- /** Description of the error. */
1103
- description?: string;
1104
- /** Data related to the error. */
1105
- data?: Record<string, any> | null;
1106
- }
1107
- interface BulkUpdateDiscountRuleTagsResult {
1108
- /** Metadata regarding the specific single update operation */
1109
- itemMetadata?: ItemMetadata;
1110
- }
1111
- interface BulkActionMetadata {
1112
- /** Number of items that were successfully processed. */
1113
- totalSuccesses?: number;
1114
- /** Number of items that couldn't be processed. */
1115
- totalFailures?: number;
1116
- /** Number of failures without details because detailed failure threshold was exceeded. */
1117
- undetailedFailures?: number;
1118
- }
1119
- interface BulkUpdateDiscountRuleTagsByFilterRequest {
1120
- /** Filter. */
1121
- filter: Record<string, any> | null;
1122
- /** Tags to assign to the discount rules. */
1123
- assignTags?: Tags;
1124
- /** Tags to unassign from the discount rules. */
1125
- unassignTags?: Tags;
1126
- }
1127
- interface BulkUpdateDiscountRuleTagsByFilterResponse {
1128
- /**
1129
- * Job ID.
1130
- * @format GUID
1131
- */
1132
- jobId?: string;
1133
- }
1134
1063
  interface MessageEnvelope {
1135
1064
  /**
1136
1065
  * App instance ID.
@@ -1266,18 +1195,6 @@ type CreateDiscountRuleValidationErrors = {
1266
1195
  } | {
1267
1196
  ruleName?: 'INVALID_SCOPE';
1268
1197
  };
1269
- /** @docsIgnore */
1270
- type BulkUpdateDiscountRuleTagsApplicationErrors = {
1271
- code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
1272
- description?: string;
1273
- data?: Record<string, any>;
1274
- };
1275
- /** @docsIgnore */
1276
- type BulkUpdateDiscountRuleTagsByFilterApplicationErrors = {
1277
- code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
1278
- description?: string;
1279
- data?: Record<string, any>;
1280
- };
1281
1198
  interface BaseEventMetadata {
1282
1199
  /**
1283
1200
  * App instance ID.
@@ -1701,43 +1618,5 @@ declare const utils: {
1701
1618
  Sort: _wix_sdk_types.SortFactory<DiscountRuleQuerySpec>;
1702
1619
  };
1703
1620
  };
1704
- /**
1705
- * Bulk update tags for discount rules by IDs.
1706
- * @param discountRuleIds - IDs of discount rules to update.
1707
- * @public
1708
- * @requiredField discountRuleIds
1709
- * @permissionId ECOM.DISCOUNT_RULES_UPDATE_TAGS
1710
- * @applicableIdentity APP
1711
- * @fqn com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTags
1712
- */
1713
- declare function bulkUpdateDiscountRuleTags(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> & {
1714
- __applicationErrorsType?: BulkUpdateDiscountRuleTagsApplicationErrors;
1715
- }>;
1716
- interface BulkUpdateDiscountRuleTagsOptions {
1717
- /** Tags to assign to the discount rules. */
1718
- assignTags?: Tags;
1719
- /** Tags to unassign from the discount rules. */
1720
- unassignTags?: Tags;
1721
- }
1722
- /**
1723
- * Asynchronously update tags on multiple discount rules by filter.
1724
- * An empty filter will update all discount rules.
1725
- * A tag that appears both in the list of assign and unassign tags, will be assigned.
1726
- * @param filter - Filter.
1727
- * @public
1728
- * @requiredField filter
1729
- * @permissionId ECOM.DISCOUNT_RULES_UPDATE_TAGS
1730
- * @applicableIdentity APP
1731
- * @fqn com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTagsByFilter
1732
- */
1733
- declare function bulkUpdateDiscountRuleTagsByFilter(filter: Record<string, any>, options?: BulkUpdateDiscountRuleTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateDiscountRuleTagsByFilterResponse, `jobId`, 2> & {
1734
- __applicationErrorsType?: BulkUpdateDiscountRuleTagsByFilterApplicationErrors;
1735
- }>;
1736
- interface BulkUpdateDiscountRuleTagsByFilterOptions {
1737
- /** Tags to assign to the discount rules. */
1738
- assignTags?: Tags;
1739
- /** Tags to unassign from the discount rules. */
1740
- unassignTags?: Tags;
1741
- }
1742
1621
 
1743
- export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ActiveTimeInfo, type Address, type And, type ApplicationError, type AppliedDiscount, type AppliedDiscountRule, AppliedSubjectType, type AppliedSubjectTypeWithLiterals, type BaseEventMetadata, type BulkActionMetadata, type BulkUpdateDiscountRuleTagsApplicationErrors, type BulkUpdateDiscountRuleTagsByFilterApplicationErrors, type BulkUpdateDiscountRuleTagsByFilterOptions, type BulkUpdateDiscountRuleTagsByFilterRequest, type BulkUpdateDiscountRuleTagsByFilterResponse, type BulkUpdateDiscountRuleTagsOptions, type BulkUpdateDiscountRuleTagsRequest, type BulkUpdateDiscountRuleTagsResponse, type BulkUpdateDiscountRuleTagsResult, type BuyXGetYInfo, type BuyerInfo, type CatalogItemFilter, type CatalogReference, type CommonQueryWithEntityContext, type ContactSegments, type ContactTags, type CreateDiscountRuleApplicationErrors, type CreateDiscountRuleRequest, type CreateDiscountRuleResponse, type CreateDiscountRuleValidationErrors, type CursorPaging, type Cursors, type Custom, type CustomFilter, type CustomerBuy, type CustomerBuyConditionOneOf, type CustomerEligibility, type CustomerEligibilityOptionsOneOf, type CustomerGet, DayOfWeek, type DayOfWeekWithLiterals, type DeleteDiscountRuleRequest, type DeleteDiscountRuleResponse, type Discount, type DiscountConfig, type DiscountDiscountOneOf, type DiscountRule, type DiscountRuleCreatedEnvelope, type DiscountRuleDeletedEnvelope, type DiscountRuleName, type DiscountRuleQuery, type DiscountRuleQuerySpec, type DiscountRuleUpdatedEnvelope, type DiscountRuleUsageLimitReached, type DiscountRulesQueryBuilder, type DiscountRulesQueryResult, type DiscountSettings, type DiscountTrigger, type DiscountTriggerTriggerOneOf, DiscountType, type DiscountTypeWithLiterals, type Discounts, type DomainEvent, type DomainEventBodyOneOf, EligibilityType, type EligibilityTypeWithLiterals, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetAppliedDiscountsRequest, type GetAppliedDiscountsResponse, type GetDiscountRuleRequest, type GetDiscountRuleResponse, type IdentificationData, type IdentificationDataIdOneOf, type IndividualMembers, type ItemCombination, type ItemCombinationLineItem, type ItemMetadata, type ItemQuantityRange, type LineItem, type MessageEnvelope, type MultiCurrencyPrice, type Or, type PlatformPaging, type PlatformPagingMetadata, type PlatformQuery, type PlatformQueryPagingMethodOneOf, type QuantityBased, type QueryDiscountRulesRequest, type QueryDiscountRulesResponse, type Recurrence, type RestoreInfo, type Scope, type ScopeScopeItemsOneOf, ScopeType, type ScopeTypeWithLiterals, type ShippingInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type SpecificItemsInfo, Status, type StatusWithLiterals, type SubtotalRange, type TagList, type TagReference, type Tags, type TagsModified, type TimeOfDay, type TimeWindow, TriggerType, type TriggerTypeWithLiterals, Type, type TypeWithLiterals, type UpdateDiscountRule, type UpdateDiscountRuleRequest, type UpdateDiscountRuleResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WeeklySchedule, bulkUpdateDiscountRuleTags, bulkUpdateDiscountRuleTagsByFilter, createDiscountRule, deleteDiscountRule, getDiscountRule, onDiscountRuleCreated, onDiscountRuleDeleted, onDiscountRuleUpdated, queryDiscountRules, typedQueryDiscountRules, updateDiscountRule, utils };
1622
+ export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ActiveTimeInfo, type Address, type And, type AppliedDiscount, type AppliedDiscountRule, AppliedSubjectType, type AppliedSubjectTypeWithLiterals, type BaseEventMetadata, type BuyXGetYInfo, type BuyerInfo, type CatalogItemFilter, type CatalogReference, type CommonQueryWithEntityContext, type ContactSegments, type ContactTags, type CreateDiscountRuleApplicationErrors, type CreateDiscountRuleRequest, type CreateDiscountRuleResponse, type CreateDiscountRuleValidationErrors, type CursorPaging, type Cursors, type Custom, type CustomFilter, type CustomerBuy, type CustomerBuyConditionOneOf, type CustomerEligibility, type CustomerEligibilityOptionsOneOf, type CustomerGet, DayOfWeek, type DayOfWeekWithLiterals, type DeleteDiscountRuleRequest, type DeleteDiscountRuleResponse, type Discount, type DiscountConfig, type DiscountDiscountOneOf, type DiscountRule, type DiscountRuleCreatedEnvelope, type DiscountRuleDeletedEnvelope, type DiscountRuleName, type DiscountRuleQuery, type DiscountRuleQuerySpec, type DiscountRuleUpdatedEnvelope, type DiscountRuleUsageLimitReached, type DiscountRulesQueryBuilder, type DiscountRulesQueryResult, type DiscountSettings, type DiscountTrigger, type DiscountTriggerTriggerOneOf, DiscountType, type DiscountTypeWithLiterals, type Discounts, type DomainEvent, type DomainEventBodyOneOf, EligibilityType, type EligibilityTypeWithLiterals, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetAppliedDiscountsRequest, type GetAppliedDiscountsResponse, type GetDiscountRuleRequest, type GetDiscountRuleResponse, type IdentificationData, type IdentificationDataIdOneOf, type IndividualMembers, type ItemCombination, type ItemCombinationLineItem, type ItemQuantityRange, type LineItem, type MessageEnvelope, type MultiCurrencyPrice, type Or, type PlatformPaging, type PlatformPagingMetadata, type PlatformQuery, type PlatformQueryPagingMethodOneOf, type QuantityBased, type QueryDiscountRulesRequest, type QueryDiscountRulesResponse, type Recurrence, type RestoreInfo, type Scope, type ScopeScopeItemsOneOf, ScopeType, type ScopeTypeWithLiterals, type ShippingInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type SpecificItemsInfo, Status, type StatusWithLiterals, type SubtotalRange, type TagList, type TagReference, type Tags, type TagsModified, type TimeOfDay, type TimeWindow, TriggerType, type TriggerTypeWithLiterals, Type, type TypeWithLiterals, type UpdateDiscountRule, type UpdateDiscountRuleRequest, type UpdateDiscountRuleResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WeeklySchedule, createDiscountRule, deleteDiscountRule, getDiscountRule, onDiscountRuleCreated, onDiscountRuleDeleted, onDiscountRuleUpdated, queryDiscountRules, typedQueryDiscountRules, updateDiscountRule, utils };
@@ -268,48 +268,6 @@ function queryDiscountRules(payload) {
268
268
  }
269
269
  return __queryDiscountRules;
270
270
  }
271
- function bulkUpdateDiscountRuleTags(payload) {
272
- function __bulkUpdateDiscountRuleTags({ host }) {
273
- const metadata = {
274
- entityFqdn: "wix.ecom.discounts.v1.discount_rule",
275
- method: "POST",
276
- methodFqn: "com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTags",
277
- packageName: PACKAGE_NAME,
278
- migrationOptions: {
279
- optInTransformResponse: true
280
- },
281
- url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({
282
- protoPath: "/v1/bulk/discount-rules/update-tags",
283
- data: payload,
284
- host
285
- }),
286
- data: payload
287
- };
288
- return metadata;
289
- }
290
- return __bulkUpdateDiscountRuleTags;
291
- }
292
- function bulkUpdateDiscountRuleTagsByFilter(payload) {
293
- function __bulkUpdateDiscountRuleTagsByFilter({ host }) {
294
- const metadata = {
295
- entityFqdn: "wix.ecom.discounts.v1.discount_rule",
296
- method: "POST",
297
- methodFqn: "com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTagsByFilter",
298
- packageName: PACKAGE_NAME,
299
- migrationOptions: {
300
- optInTransformResponse: true
301
- },
302
- url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({
303
- protoPath: "/v1/bulk/discount-rules/update-tags-by-filter",
304
- data: payload,
305
- host
306
- }),
307
- data: payload
308
- };
309
- return metadata;
310
- }
311
- return __bulkUpdateDiscountRuleTagsByFilter;
312
- }
313
271
 
314
272
  // src/ecom-discounts-v1-discount-rule-discount-rules.universal.ts
315
273
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
@@ -549,72 +507,6 @@ var utils = {
549
507
  ...createQueryUtils()
550
508
  }
551
509
  };
552
- async function bulkUpdateDiscountRuleTags2(discountRuleIds, options) {
553
- const { httpClient, sideEffects } = arguments[2];
554
- const payload = renameKeysFromSDKRequestToRESTRequest({
555
- discountRuleIds,
556
- assignTags: options?.assignTags,
557
- unassignTags: options?.unassignTags
558
- });
559
- const reqOpts = bulkUpdateDiscountRuleTags(
560
- payload
561
- );
562
- sideEffects?.onSiteCall?.();
563
- try {
564
- const result = await httpClient.request(reqOpts);
565
- sideEffects?.onSuccess?.(result);
566
- return renameKeysFromRESTResponseToSDKResponse(result.data);
567
- } catch (err) {
568
- const transformedError = sdkTransformError(
569
- err,
570
- {
571
- spreadPathsToArguments: {},
572
- explicitPathsToArguments: {
573
- discountRuleIds: "$[0]",
574
- assignTags: "$[1].assignTags",
575
- unassignTags: "$[1].unassignTags"
576
- },
577
- singleArgumentUnchanged: false
578
- },
579
- ["discountRuleIds", "options"]
580
- );
581
- sideEffects?.onError?.(err);
582
- throw transformedError;
583
- }
584
- }
585
- async function bulkUpdateDiscountRuleTagsByFilter2(filter, options) {
586
- const { httpClient, sideEffects } = arguments[2];
587
- const payload = renameKeysFromSDKRequestToRESTRequest({
588
- filter,
589
- assignTags: options?.assignTags,
590
- unassignTags: options?.unassignTags
591
- });
592
- const reqOpts = bulkUpdateDiscountRuleTagsByFilter(
593
- payload
594
- );
595
- sideEffects?.onSiteCall?.();
596
- try {
597
- const result = await httpClient.request(reqOpts);
598
- sideEffects?.onSuccess?.(result);
599
- return renameKeysFromRESTResponseToSDKResponse(result.data);
600
- } catch (err) {
601
- const transformedError = sdkTransformError(
602
- err,
603
- {
604
- spreadPathsToArguments: {},
605
- explicitPathsToArguments: {
606
- filter: "$[0]",
607
- assignTags: "$[1].assignTags",
608
- unassignTags: "$[1].unassignTags"
609
- },
610
- singleArgumentUnchanged: false
611
- },
612
- ["filter", "options"]
613
- );
614
- sideEffects?.onError?.(err);
615
- throw transformedError;
616
- }
617
- }
618
510
  export {
619
511
  AppliedSubjectType,
620
512
  DayOfWeek,
@@ -626,8 +518,6 @@ export {
626
518
  TriggerType,
627
519
  Type,
628
520
  WebhookIdentityType,
629
- bulkUpdateDiscountRuleTags2 as bulkUpdateDiscountRuleTags,
630
- bulkUpdateDiscountRuleTagsByFilter2 as bulkUpdateDiscountRuleTagsByFilter,
631
521
  createDiscountRule2 as createDiscountRule,
632
522
  deleteDiscountRule2 as deleteDiscountRule,
633
523
  getDiscountRule2 as getDiscountRule,