@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.
- 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 +4 -4
|
@@ -1048,77 +1048,6 @@ interface DiscountRuleUsageLimitReached {
|
|
|
1048
1048
|
/** Discount Rule */
|
|
1049
1049
|
rule?: DiscountRule;
|
|
1050
1050
|
}
|
|
1051
|
-
interface BulkUpdateDiscountRuleTagsRequest {
|
|
1052
|
-
/**
|
|
1053
|
-
* IDs of discount rules to update.
|
|
1054
|
-
* @minSize 1
|
|
1055
|
-
* @maxSize 100
|
|
1056
|
-
* @format GUID
|
|
1057
|
-
*/
|
|
1058
|
-
discountRuleIds: string[];
|
|
1059
|
-
/** Tags to assign to the discount rules. */
|
|
1060
|
-
assignTags?: Tags;
|
|
1061
|
-
/** Tags to unassign from the discount rules. */
|
|
1062
|
-
unassignTags?: Tags;
|
|
1063
|
-
}
|
|
1064
|
-
interface BulkUpdateDiscountRuleTagsResponse {
|
|
1065
|
-
/**
|
|
1066
|
-
* Results
|
|
1067
|
-
* @minSize 1
|
|
1068
|
-
* @maxSize 100
|
|
1069
|
-
*/
|
|
1070
|
-
results?: BulkUpdateDiscountRuleTagsResult[];
|
|
1071
|
-
/** Metadata regarding the bulk update operation */
|
|
1072
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1073
|
-
}
|
|
1074
|
-
interface ItemMetadata {
|
|
1075
|
-
/**
|
|
1076
|
-
* Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.
|
|
1077
|
-
* @format GUID
|
|
1078
|
-
*/
|
|
1079
|
-
_id?: string | null;
|
|
1080
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1081
|
-
originalIndex?: number;
|
|
1082
|
-
/** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */
|
|
1083
|
-
success?: boolean;
|
|
1084
|
-
/** Details about the error in case of failure. */
|
|
1085
|
-
error?: ApplicationError;
|
|
1086
|
-
}
|
|
1087
|
-
interface ApplicationError {
|
|
1088
|
-
/** Error code. */
|
|
1089
|
-
code?: string;
|
|
1090
|
-
/** Description of the error. */
|
|
1091
|
-
description?: string;
|
|
1092
|
-
/** Data related to the error. */
|
|
1093
|
-
data?: Record<string, any> | null;
|
|
1094
|
-
}
|
|
1095
|
-
interface BulkUpdateDiscountRuleTagsResult {
|
|
1096
|
-
/** Metadata regarding the specific single update operation */
|
|
1097
|
-
itemMetadata?: ItemMetadata;
|
|
1098
|
-
}
|
|
1099
|
-
interface BulkActionMetadata {
|
|
1100
|
-
/** Number of items that were successfully processed. */
|
|
1101
|
-
totalSuccesses?: number;
|
|
1102
|
-
/** Number of items that couldn't be processed. */
|
|
1103
|
-
totalFailures?: number;
|
|
1104
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1105
|
-
undetailedFailures?: number;
|
|
1106
|
-
}
|
|
1107
|
-
interface BulkUpdateDiscountRuleTagsByFilterRequest {
|
|
1108
|
-
/** Filter. */
|
|
1109
|
-
filter: Record<string, any> | null;
|
|
1110
|
-
/** Tags to assign to the discount rules. */
|
|
1111
|
-
assignTags?: Tags;
|
|
1112
|
-
/** Tags to unassign from the discount rules. */
|
|
1113
|
-
unassignTags?: Tags;
|
|
1114
|
-
}
|
|
1115
|
-
interface BulkUpdateDiscountRuleTagsByFilterResponse {
|
|
1116
|
-
/**
|
|
1117
|
-
* Job ID.
|
|
1118
|
-
* @format GUID
|
|
1119
|
-
*/
|
|
1120
|
-
jobId?: string;
|
|
1121
|
-
}
|
|
1122
1051
|
interface MessageEnvelope {
|
|
1123
1052
|
/**
|
|
1124
1053
|
* App instance ID.
|
|
@@ -1254,18 +1183,6 @@ type CreateDiscountRuleValidationErrors = {
|
|
|
1254
1183
|
} | {
|
|
1255
1184
|
ruleName?: 'INVALID_SCOPE';
|
|
1256
1185
|
};
|
|
1257
|
-
/** @docsIgnore */
|
|
1258
|
-
type BulkUpdateDiscountRuleTagsApplicationErrors = {
|
|
1259
|
-
code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
|
|
1260
|
-
description?: string;
|
|
1261
|
-
data?: Record<string, any>;
|
|
1262
|
-
};
|
|
1263
|
-
/** @docsIgnore */
|
|
1264
|
-
type BulkUpdateDiscountRuleTagsByFilterApplicationErrors = {
|
|
1265
|
-
code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
|
|
1266
|
-
description?: string;
|
|
1267
|
-
data?: Record<string, any>;
|
|
1268
|
-
};
|
|
1269
1186
|
interface BaseEventMetadata {
|
|
1270
1187
|
/**
|
|
1271
1188
|
* App instance ID.
|
|
@@ -1689,43 +1606,5 @@ declare const utils: {
|
|
|
1689
1606
|
Sort: _wix_sdk_types.SortFactory<DiscountRuleQuerySpec>;
|
|
1690
1607
|
};
|
|
1691
1608
|
};
|
|
1692
|
-
/**
|
|
1693
|
-
* Bulk update tags for discount rules by IDs.
|
|
1694
|
-
* @param discountRuleIds - IDs of discount rules to update.
|
|
1695
|
-
* @public
|
|
1696
|
-
* @requiredField discountRuleIds
|
|
1697
|
-
* @permissionId ECOM.DISCOUNT_RULES_UPDATE_TAGS
|
|
1698
|
-
* @applicableIdentity APP
|
|
1699
|
-
* @fqn com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTags
|
|
1700
|
-
*/
|
|
1701
|
-
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> & {
|
|
1702
|
-
__applicationErrorsType?: BulkUpdateDiscountRuleTagsApplicationErrors;
|
|
1703
|
-
}>;
|
|
1704
|
-
interface BulkUpdateDiscountRuleTagsOptions {
|
|
1705
|
-
/** Tags to assign to the discount rules. */
|
|
1706
|
-
assignTags?: Tags;
|
|
1707
|
-
/** Tags to unassign from the discount rules. */
|
|
1708
|
-
unassignTags?: Tags;
|
|
1709
|
-
}
|
|
1710
|
-
/**
|
|
1711
|
-
* Asynchronously update tags on multiple discount rules by filter.
|
|
1712
|
-
* An empty filter will update all discount rules.
|
|
1713
|
-
* A tag that appears both in the list of assign and unassign tags, will be assigned.
|
|
1714
|
-
* @param filter - Filter.
|
|
1715
|
-
* @public
|
|
1716
|
-
* @requiredField filter
|
|
1717
|
-
* @permissionId ECOM.DISCOUNT_RULES_UPDATE_TAGS
|
|
1718
|
-
* @applicableIdentity APP
|
|
1719
|
-
* @fqn com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTagsByFilter
|
|
1720
|
-
*/
|
|
1721
|
-
declare function bulkUpdateDiscountRuleTagsByFilter(filter: Record<string, any>, options?: BulkUpdateDiscountRuleTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateDiscountRuleTagsByFilterResponse, `jobId`, 2> & {
|
|
1722
|
-
__applicationErrorsType?: BulkUpdateDiscountRuleTagsByFilterApplicationErrors;
|
|
1723
|
-
}>;
|
|
1724
|
-
interface BulkUpdateDiscountRuleTagsByFilterOptions {
|
|
1725
|
-
/** Tags to assign to the discount rules. */
|
|
1726
|
-
assignTags?: Tags;
|
|
1727
|
-
/** Tags to unassign from the discount rules. */
|
|
1728
|
-
unassignTags?: Tags;
|
|
1729
|
-
}
|
|
1730
1609
|
|
|
1731
|
-
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ActiveTimeInfo, type Address, type And, type
|
|
1610
|
+
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,
|