@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 };
|
|
@@ -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,
|