@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.
- package/build/cjs/index.d.ts +3 -27
- package/build/cjs/index.js +0 -130
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -122
- package/build/cjs/index.typings.js +0 -112
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -87
- package/build/cjs/meta.js +0 -86
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +3 -27
- package/build/es/index.mjs +0 -128
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -122
- package/build/es/index.typings.mjs +0 -110
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -87
- package/build/es/meta.mjs +0 -84
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -27
- package/build/internal/cjs/index.js +0 -130
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1 -122
- package/build/internal/cjs/index.typings.js +0 -112
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2 -87
- package/build/internal/cjs/meta.js +0 -86
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -27
- package/build/internal/es/index.mjs +0 -128
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +1 -122
- package/build/internal/es/index.typings.mjs +0 -110
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +2 -87
- package/build/internal/es/meta.mjs +0 -84
- package/build/internal/es/meta.mjs.map +1 -1
- 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
|
|
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 };
|
|
@@ -30,8 +30,6 @@ __export(index_typings_exports, {
|
|
|
30
30
|
TriggerType: () => TriggerType,
|
|
31
31
|
Type: () => Type,
|
|
32
32
|
WebhookIdentityType: () => WebhookIdentityType,
|
|
33
|
-
bulkUpdateDiscountRuleTags: () => bulkUpdateDiscountRuleTags2,
|
|
34
|
-
bulkUpdateDiscountRuleTagsByFilter: () => bulkUpdateDiscountRuleTagsByFilter2,
|
|
35
33
|
createDiscountRule: () => createDiscountRule2,
|
|
36
34
|
deleteDiscountRule: () => deleteDiscountRule2,
|
|
37
35
|
getDiscountRule: () => getDiscountRule2,
|
|
@@ -309,48 +307,6 @@ function queryDiscountRules(payload) {
|
|
|
309
307
|
}
|
|
310
308
|
return __queryDiscountRules;
|
|
311
309
|
}
|
|
312
|
-
function bulkUpdateDiscountRuleTags(payload) {
|
|
313
|
-
function __bulkUpdateDiscountRuleTags({ host }) {
|
|
314
|
-
const metadata = {
|
|
315
|
-
entityFqdn: "wix.ecom.discounts.v1.discount_rule",
|
|
316
|
-
method: "POST",
|
|
317
|
-
methodFqn: "com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTags",
|
|
318
|
-
packageName: PACKAGE_NAME,
|
|
319
|
-
migrationOptions: {
|
|
320
|
-
optInTransformResponse: true
|
|
321
|
-
},
|
|
322
|
-
url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({
|
|
323
|
-
protoPath: "/v1/bulk/discount-rules/update-tags",
|
|
324
|
-
data: payload,
|
|
325
|
-
host
|
|
326
|
-
}),
|
|
327
|
-
data: payload
|
|
328
|
-
};
|
|
329
|
-
return metadata;
|
|
330
|
-
}
|
|
331
|
-
return __bulkUpdateDiscountRuleTags;
|
|
332
|
-
}
|
|
333
|
-
function bulkUpdateDiscountRuleTagsByFilter(payload) {
|
|
334
|
-
function __bulkUpdateDiscountRuleTagsByFilter({ host }) {
|
|
335
|
-
const metadata = {
|
|
336
|
-
entityFqdn: "wix.ecom.discounts.v1.discount_rule",
|
|
337
|
-
method: "POST",
|
|
338
|
-
methodFqn: "com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTagsByFilter",
|
|
339
|
-
packageName: PACKAGE_NAME,
|
|
340
|
-
migrationOptions: {
|
|
341
|
-
optInTransformResponse: true
|
|
342
|
-
},
|
|
343
|
-
url: resolveComWixEcomDiscountsDiscountRuleServiceUrl({
|
|
344
|
-
protoPath: "/v1/bulk/discount-rules/update-tags-by-filter",
|
|
345
|
-
data: payload,
|
|
346
|
-
host
|
|
347
|
-
}),
|
|
348
|
-
data: payload
|
|
349
|
-
};
|
|
350
|
-
return metadata;
|
|
351
|
-
}
|
|
352
|
-
return __bulkUpdateDiscountRuleTagsByFilter;
|
|
353
|
-
}
|
|
354
310
|
|
|
355
311
|
// src/ecom-discounts-v1-discount-rule-discount-rules.universal.ts
|
|
356
312
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
@@ -590,72 +546,6 @@ var utils = {
|
|
|
590
546
|
...(0, import_query_builder_utils.createQueryUtils)()
|
|
591
547
|
}
|
|
592
548
|
};
|
|
593
|
-
async function bulkUpdateDiscountRuleTags2(discountRuleIds, options) {
|
|
594
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
595
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
596
|
-
discountRuleIds,
|
|
597
|
-
assignTags: options?.assignTags,
|
|
598
|
-
unassignTags: options?.unassignTags
|
|
599
|
-
});
|
|
600
|
-
const reqOpts = bulkUpdateDiscountRuleTags(
|
|
601
|
-
payload
|
|
602
|
-
);
|
|
603
|
-
sideEffects?.onSiteCall?.();
|
|
604
|
-
try {
|
|
605
|
-
const result = await httpClient.request(reqOpts);
|
|
606
|
-
sideEffects?.onSuccess?.(result);
|
|
607
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
608
|
-
} catch (err) {
|
|
609
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
610
|
-
err,
|
|
611
|
-
{
|
|
612
|
-
spreadPathsToArguments: {},
|
|
613
|
-
explicitPathsToArguments: {
|
|
614
|
-
discountRuleIds: "$[0]",
|
|
615
|
-
assignTags: "$[1].assignTags",
|
|
616
|
-
unassignTags: "$[1].unassignTags"
|
|
617
|
-
},
|
|
618
|
-
singleArgumentUnchanged: false
|
|
619
|
-
},
|
|
620
|
-
["discountRuleIds", "options"]
|
|
621
|
-
);
|
|
622
|
-
sideEffects?.onError?.(err);
|
|
623
|
-
throw transformedError;
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
async function bulkUpdateDiscountRuleTagsByFilter2(filter, options) {
|
|
627
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
628
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
629
|
-
filter,
|
|
630
|
-
assignTags: options?.assignTags,
|
|
631
|
-
unassignTags: options?.unassignTags
|
|
632
|
-
});
|
|
633
|
-
const reqOpts = bulkUpdateDiscountRuleTagsByFilter(
|
|
634
|
-
payload
|
|
635
|
-
);
|
|
636
|
-
sideEffects?.onSiteCall?.();
|
|
637
|
-
try {
|
|
638
|
-
const result = await httpClient.request(reqOpts);
|
|
639
|
-
sideEffects?.onSuccess?.(result);
|
|
640
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
641
|
-
} catch (err) {
|
|
642
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
643
|
-
err,
|
|
644
|
-
{
|
|
645
|
-
spreadPathsToArguments: {},
|
|
646
|
-
explicitPathsToArguments: {
|
|
647
|
-
filter: "$[0]",
|
|
648
|
-
assignTags: "$[1].assignTags",
|
|
649
|
-
unassignTags: "$[1].unassignTags"
|
|
650
|
-
},
|
|
651
|
-
singleArgumentUnchanged: false
|
|
652
|
-
},
|
|
653
|
-
["filter", "options"]
|
|
654
|
-
);
|
|
655
|
-
sideEffects?.onError?.(err);
|
|
656
|
-
throw transformedError;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
549
|
// Annotate the CommonJS export names for ESM import in node:
|
|
660
550
|
0 && (module.exports = {
|
|
661
551
|
AppliedSubjectType,
|
|
@@ -668,8 +558,6 @@ async function bulkUpdateDiscountRuleTagsByFilter2(filter, options) {
|
|
|
668
558
|
TriggerType,
|
|
669
559
|
Type,
|
|
670
560
|
WebhookIdentityType,
|
|
671
|
-
bulkUpdateDiscountRuleTags,
|
|
672
|
-
bulkUpdateDiscountRuleTagsByFilter,
|
|
673
561
|
createDiscountRule,
|
|
674
562
|
deleteDiscountRule,
|
|
675
563
|
getDiscountRule,
|