@wix/auto_sdk_ecom_discount-rules 1.0.101 → 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 -138
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +9 -141
- package/build/cjs/index.typings.js +0 -120
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +10 -106
- package/build/cjs/meta.js +0 -94
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +3 -27
- package/build/es/index.mjs +0 -136
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +9 -141
- package/build/es/index.typings.mjs +0 -118
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +10 -106
- package/build/es/meta.mjs +0 -92
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -27
- package/build/internal/cjs/index.js +0 -138
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +9 -141
- package/build/internal/cjs/index.typings.js +0 -120
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +10 -106
- package/build/internal/cjs/meta.js +0 -94
- 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 -136
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +9 -141
- package/build/internal/es/index.typings.mjs +0 -118
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +10 -106
- package/build/internal/es/meta.mjs +0 -92
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -135,14 +135,13 @@ interface ScopeScopeItemsOneOf {
|
|
|
135
135
|
customFilter?: CustomFilter;
|
|
136
136
|
}
|
|
137
137
|
declare enum ScopeType {
|
|
138
|
-
UNDEFINED_SCOPE = "UNDEFINED_SCOPE",
|
|
139
138
|
/** Specific catalog items */
|
|
140
139
|
CATALOG_ITEM = "CATALOG_ITEM",
|
|
141
140
|
/** Specific items by custom filters */
|
|
142
141
|
CUSTOM_FILTER = "CUSTOM_FILTER"
|
|
143
142
|
}
|
|
144
143
|
/** @enumType */
|
|
145
|
-
type ScopeTypeWithLiterals = ScopeType | '
|
|
144
|
+
type ScopeTypeWithLiterals = ScopeType | 'CATALOG_ITEM' | 'CUSTOM_FILTER';
|
|
146
145
|
interface CatalogItemFilter {
|
|
147
146
|
/**
|
|
148
147
|
* Catalog App ID. For example, the Wix Stores, Wix Bookings, or 3rd-party [`appId`](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).
|
|
@@ -245,13 +244,11 @@ interface CustomerEligibilityOptionsOneOf {
|
|
|
245
244
|
individualMembersInfo?: IndividualMembers;
|
|
246
245
|
}
|
|
247
246
|
declare enum EligibilityType {
|
|
248
|
-
/** Eligibility type is not defined. */
|
|
249
|
-
UNKNOWN_ELIGIBILITY_TYPE = "UNKNOWN_ELIGIBILITY_TYPE",
|
|
250
247
|
/** Only specific customers based on member id. */
|
|
251
248
|
INDIVIDUAL_MEMBERS = "INDIVIDUAL_MEMBERS"
|
|
252
249
|
}
|
|
253
250
|
/** @enumType */
|
|
254
|
-
type EligibilityTypeWithLiterals = EligibilityType | '
|
|
251
|
+
type EligibilityTypeWithLiterals = EligibilityType | 'INDIVIDUAL_MEMBERS';
|
|
255
252
|
interface ContactSegments {
|
|
256
253
|
/**
|
|
257
254
|
* Eligible segment ids.
|
|
@@ -291,7 +288,6 @@ interface IndividualMembers {
|
|
|
291
288
|
memberIds?: string[];
|
|
292
289
|
}
|
|
293
290
|
declare enum TriggerType {
|
|
294
|
-
UNDEFINED = "UNDEFINED",
|
|
295
291
|
/** Operator used for chaining multiple triggers. Currently 1 `AND` chain operator is supported. */
|
|
296
292
|
AND = "AND",
|
|
297
293
|
/** Subtotal must be within the specified `subtotalRange` values. */
|
|
@@ -309,7 +305,7 @@ declare enum TriggerType {
|
|
|
309
305
|
CUSTOMER_ELIGIBILITY = "CUSTOMER_ELIGIBILITY"
|
|
310
306
|
}
|
|
311
307
|
/** @enumType */
|
|
312
|
-
type TriggerTypeWithLiterals = TriggerType | '
|
|
308
|
+
type TriggerTypeWithLiterals = TriggerType | 'AND' | 'SUBTOTAL_RANGE' | 'ITEM_QUANTITY_RANGE' | 'CUSTOM' | 'OR' | 'CUSTOMER_ELIGIBILITY';
|
|
313
309
|
interface ActiveTimeInfo {
|
|
314
310
|
/** Date and time the discount rule is active **from**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
|
|
315
311
|
start?: Date | null;
|
|
@@ -321,7 +317,6 @@ interface Recurrence {
|
|
|
321
317
|
weeklySchedule?: WeeklySchedule;
|
|
322
318
|
}
|
|
323
319
|
declare enum DayOfWeek {
|
|
324
|
-
UNKOWN_DAY_OF_WEEK = "UNKOWN_DAY_OF_WEEK",
|
|
325
320
|
/** Monday. */
|
|
326
321
|
MON = "MON",
|
|
327
322
|
/** Tuesday. */
|
|
@@ -338,7 +333,7 @@ declare enum DayOfWeek {
|
|
|
338
333
|
SUN = "SUN"
|
|
339
334
|
}
|
|
340
335
|
/** @enumType */
|
|
341
|
-
type DayOfWeekWithLiterals = DayOfWeek | '
|
|
336
|
+
type DayOfWeekWithLiterals = DayOfWeek | 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';
|
|
342
337
|
interface TimeOfDay {
|
|
343
338
|
/**
|
|
344
339
|
* Hours. Min: `0`. Max: `23`.
|
|
@@ -433,13 +428,11 @@ interface DiscountDiscountOneOf {
|
|
|
433
428
|
quantityBased?: QuantityBased;
|
|
434
429
|
}
|
|
435
430
|
declare enum Type {
|
|
436
|
-
/** Target type is not defined */
|
|
437
|
-
UNDEFINED = "UNDEFINED",
|
|
438
431
|
/** Target type is a set of specific items */
|
|
439
432
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS"
|
|
440
433
|
}
|
|
441
434
|
/** @enumType */
|
|
442
|
-
type TypeWithLiterals = Type | '
|
|
435
|
+
type TypeWithLiterals = Type | 'SPECIFIC_ITEMS';
|
|
443
436
|
interface SpecificItemsInfo {
|
|
444
437
|
/**
|
|
445
438
|
* All associated scopes for `"SPECIFIC_ITEMS"` target type.
|
|
@@ -476,7 +469,6 @@ interface DiscountConfig {
|
|
|
476
469
|
price?: string;
|
|
477
470
|
}
|
|
478
471
|
declare enum DiscountType {
|
|
479
|
-
UNDEFINED = "UNDEFINED",
|
|
480
472
|
/** Price is reduced by percentage value. */
|
|
481
473
|
PERCENTAGE = "PERCENTAGE",
|
|
482
474
|
/** Price is reduced by fixed amount. */
|
|
@@ -490,7 +482,7 @@ declare enum DiscountType {
|
|
|
490
482
|
QUANTITY_BASED = "QUANTITY_BASED"
|
|
491
483
|
}
|
|
492
484
|
/** @enumType */
|
|
493
|
-
type DiscountTypeWithLiterals = DiscountType | '
|
|
485
|
+
type DiscountTypeWithLiterals = DiscountType | 'PERCENTAGE' | 'FIXED_AMOUNT' | 'FIXED_PRICE' | 'QUANTITY_BASED';
|
|
494
486
|
interface BuyXGetYInfo {
|
|
495
487
|
/** Information about which items must be in the cart (buy X) for the discount to apply (get Y). */
|
|
496
488
|
customerBuys?: CustomerBuy;
|
|
@@ -551,8 +543,6 @@ interface CustomerGet {
|
|
|
551
543
|
scopes?: Scope[];
|
|
552
544
|
}
|
|
553
545
|
declare enum Status {
|
|
554
|
-
/** Rule status is not defined. */
|
|
555
|
-
UNDEFINED = "UNDEFINED",
|
|
556
546
|
/** Rule status is live. */
|
|
557
547
|
LIVE = "LIVE",
|
|
558
548
|
/** Rule status is expired, it might have been live in the past. */
|
|
@@ -561,7 +551,7 @@ declare enum Status {
|
|
|
561
551
|
PENDING = "PENDING"
|
|
562
552
|
}
|
|
563
553
|
/** @enumType */
|
|
564
|
-
type StatusWithLiterals = Status | '
|
|
554
|
+
type StatusWithLiterals = Status | 'LIVE' | 'EXPIRED' | 'PENDING';
|
|
565
555
|
/** The discount settings */
|
|
566
556
|
interface DiscountSettings {
|
|
567
557
|
/** Discount applies to either `ALL_ITEMS`, or to the `LOWEST_PRICED_ITEM`. */
|
|
@@ -588,14 +578,13 @@ interface DiscountSettings {
|
|
|
588
578
|
}
|
|
589
579
|
/** TODO: check if can be removed */
|
|
590
580
|
declare enum AppliedSubjectType {
|
|
591
|
-
UNDEFINED = "UNDEFINED",
|
|
592
581
|
/** Discount applies to all items at checkout. */
|
|
593
582
|
ALL_ITEMS = "ALL_ITEMS",
|
|
594
583
|
/** Discount applies to the lowest priced item at checkout. */
|
|
595
584
|
LOWEST_PRICED_ITEM = "LOWEST_PRICED_ITEM"
|
|
596
585
|
}
|
|
597
586
|
/** @enumType */
|
|
598
|
-
type AppliedSubjectTypeWithLiterals = AppliedSubjectType | '
|
|
587
|
+
type AppliedSubjectTypeWithLiterals = AppliedSubjectType | 'ALL_ITEMS' | 'LOWEST_PRICED_ITEM';
|
|
599
588
|
interface ExtendedFields {
|
|
600
589
|
/**
|
|
601
590
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
@@ -1059,77 +1048,6 @@ interface DiscountRuleUsageLimitReached {
|
|
|
1059
1048
|
/** Discount Rule */
|
|
1060
1049
|
rule?: DiscountRule;
|
|
1061
1050
|
}
|
|
1062
|
-
interface BulkUpdateDiscountRuleTagsRequest {
|
|
1063
|
-
/**
|
|
1064
|
-
* IDs of discount rules to update.
|
|
1065
|
-
* @minSize 1
|
|
1066
|
-
* @maxSize 100
|
|
1067
|
-
* @format GUID
|
|
1068
|
-
*/
|
|
1069
|
-
discountRuleIds: string[];
|
|
1070
|
-
/** Tags to assign to the discount rules. */
|
|
1071
|
-
assignTags?: Tags;
|
|
1072
|
-
/** Tags to unassign from the discount rules. */
|
|
1073
|
-
unassignTags?: Tags;
|
|
1074
|
-
}
|
|
1075
|
-
interface BulkUpdateDiscountRuleTagsResponse {
|
|
1076
|
-
/**
|
|
1077
|
-
* Results
|
|
1078
|
-
* @minSize 1
|
|
1079
|
-
* @maxSize 100
|
|
1080
|
-
*/
|
|
1081
|
-
results?: BulkUpdateDiscountRuleTagsResult[];
|
|
1082
|
-
/** Metadata regarding the bulk update operation */
|
|
1083
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1084
|
-
}
|
|
1085
|
-
interface ItemMetadata {
|
|
1086
|
-
/**
|
|
1087
|
-
* Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.
|
|
1088
|
-
* @format GUID
|
|
1089
|
-
*/
|
|
1090
|
-
_id?: string | null;
|
|
1091
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1092
|
-
originalIndex?: number;
|
|
1093
|
-
/** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */
|
|
1094
|
-
success?: boolean;
|
|
1095
|
-
/** Details about the error in case of failure. */
|
|
1096
|
-
error?: ApplicationError;
|
|
1097
|
-
}
|
|
1098
|
-
interface ApplicationError {
|
|
1099
|
-
/** Error code. */
|
|
1100
|
-
code?: string;
|
|
1101
|
-
/** Description of the error. */
|
|
1102
|
-
description?: string;
|
|
1103
|
-
/** Data related to the error. */
|
|
1104
|
-
data?: Record<string, any> | null;
|
|
1105
|
-
}
|
|
1106
|
-
interface BulkUpdateDiscountRuleTagsResult {
|
|
1107
|
-
/** Metadata regarding the specific single update operation */
|
|
1108
|
-
itemMetadata?: ItemMetadata;
|
|
1109
|
-
}
|
|
1110
|
-
interface BulkActionMetadata {
|
|
1111
|
-
/** Number of items that were successfully processed. */
|
|
1112
|
-
totalSuccesses?: number;
|
|
1113
|
-
/** Number of items that couldn't be processed. */
|
|
1114
|
-
totalFailures?: number;
|
|
1115
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1116
|
-
undetailedFailures?: number;
|
|
1117
|
-
}
|
|
1118
|
-
interface BulkUpdateDiscountRuleTagsByFilterRequest {
|
|
1119
|
-
/** Filter. */
|
|
1120
|
-
filter: Record<string, any> | null;
|
|
1121
|
-
/** Tags to assign to the discount rules. */
|
|
1122
|
-
assignTags?: Tags;
|
|
1123
|
-
/** Tags to unassign from the discount rules. */
|
|
1124
|
-
unassignTags?: Tags;
|
|
1125
|
-
}
|
|
1126
|
-
interface BulkUpdateDiscountRuleTagsByFilterResponse {
|
|
1127
|
-
/**
|
|
1128
|
-
* Job ID.
|
|
1129
|
-
* @format GUID
|
|
1130
|
-
*/
|
|
1131
|
-
jobId?: string;
|
|
1132
|
-
}
|
|
1133
1051
|
interface MessageEnvelope {
|
|
1134
1052
|
/**
|
|
1135
1053
|
* App instance ID.
|
|
@@ -1265,18 +1183,6 @@ type CreateDiscountRuleValidationErrors = {
|
|
|
1265
1183
|
} | {
|
|
1266
1184
|
ruleName?: 'INVALID_SCOPE';
|
|
1267
1185
|
};
|
|
1268
|
-
/** @docsIgnore */
|
|
1269
|
-
type BulkUpdateDiscountRuleTagsApplicationErrors = {
|
|
1270
|
-
code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
|
|
1271
|
-
description?: string;
|
|
1272
|
-
data?: Record<string, any>;
|
|
1273
|
-
};
|
|
1274
|
-
/** @docsIgnore */
|
|
1275
|
-
type BulkUpdateDiscountRuleTagsByFilterApplicationErrors = {
|
|
1276
|
-
code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
|
|
1277
|
-
description?: string;
|
|
1278
|
-
data?: Record<string, any>;
|
|
1279
|
-
};
|
|
1280
1186
|
interface BaseEventMetadata {
|
|
1281
1187
|
/**
|
|
1282
1188
|
* App instance ID.
|
|
@@ -1700,43 +1606,5 @@ declare const utils: {
|
|
|
1700
1606
|
Sort: _wix_sdk_types.SortFactory<DiscountRuleQuerySpec>;
|
|
1701
1607
|
};
|
|
1702
1608
|
};
|
|
1703
|
-
/**
|
|
1704
|
-
* Bulk update tags for discount rules by IDs.
|
|
1705
|
-
* @param discountRuleIds - IDs of discount rules to update.
|
|
1706
|
-
* @public
|
|
1707
|
-
* @requiredField discountRuleIds
|
|
1708
|
-
* @permissionId ECOM.DISCOUNT_RULES_UPDATE_TAGS
|
|
1709
|
-
* @applicableIdentity APP
|
|
1710
|
-
* @fqn com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTags
|
|
1711
|
-
*/
|
|
1712
|
-
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> & {
|
|
1713
|
-
__applicationErrorsType?: BulkUpdateDiscountRuleTagsApplicationErrors;
|
|
1714
|
-
}>;
|
|
1715
|
-
interface BulkUpdateDiscountRuleTagsOptions {
|
|
1716
|
-
/** Tags to assign to the discount rules. */
|
|
1717
|
-
assignTags?: Tags;
|
|
1718
|
-
/** Tags to unassign from the discount rules. */
|
|
1719
|
-
unassignTags?: Tags;
|
|
1720
|
-
}
|
|
1721
|
-
/**
|
|
1722
|
-
* Asynchronously update tags on multiple discount rules by filter.
|
|
1723
|
-
* An empty filter will update all discount rules.
|
|
1724
|
-
* A tag that appears both in the list of assign and unassign tags, will be assigned.
|
|
1725
|
-
* @param filter - Filter.
|
|
1726
|
-
* @public
|
|
1727
|
-
* @requiredField filter
|
|
1728
|
-
* @permissionId ECOM.DISCOUNT_RULES_UPDATE_TAGS
|
|
1729
|
-
* @applicableIdentity APP
|
|
1730
|
-
* @fqn com.wix.ecom.discounts.DiscountRuleService.BulkUpdateDiscountRuleTagsByFilter
|
|
1731
|
-
*/
|
|
1732
|
-
declare function bulkUpdateDiscountRuleTagsByFilter(filter: Record<string, any>, options?: BulkUpdateDiscountRuleTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateDiscountRuleTagsByFilterResponse, `jobId`, 2> & {
|
|
1733
|
-
__applicationErrorsType?: BulkUpdateDiscountRuleTagsByFilterApplicationErrors;
|
|
1734
|
-
}>;
|
|
1735
|
-
interface BulkUpdateDiscountRuleTagsByFilterOptions {
|
|
1736
|
-
/** Tags to assign to the discount rules. */
|
|
1737
|
-
assignTags?: Tags;
|
|
1738
|
-
/** Tags to unassign from the discount rules. */
|
|
1739
|
-
unassignTags?: Tags;
|
|
1740
|
-
}
|
|
1741
1609
|
|
|
1742
|
-
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,65 +268,20 @@ 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";
|
|
316
274
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
317
275
|
var ScopeType = /* @__PURE__ */ ((ScopeType2) => {
|
|
318
|
-
ScopeType2["UNDEFINED_SCOPE"] = "UNDEFINED_SCOPE";
|
|
319
276
|
ScopeType2["CATALOG_ITEM"] = "CATALOG_ITEM";
|
|
320
277
|
ScopeType2["CUSTOM_FILTER"] = "CUSTOM_FILTER";
|
|
321
278
|
return ScopeType2;
|
|
322
279
|
})(ScopeType || {});
|
|
323
280
|
var EligibilityType = /* @__PURE__ */ ((EligibilityType2) => {
|
|
324
|
-
EligibilityType2["UNKNOWN_ELIGIBILITY_TYPE"] = "UNKNOWN_ELIGIBILITY_TYPE";
|
|
325
281
|
EligibilityType2["INDIVIDUAL_MEMBERS"] = "INDIVIDUAL_MEMBERS";
|
|
326
282
|
return EligibilityType2;
|
|
327
283
|
})(EligibilityType || {});
|
|
328
284
|
var TriggerType = /* @__PURE__ */ ((TriggerType2) => {
|
|
329
|
-
TriggerType2["UNDEFINED"] = "UNDEFINED";
|
|
330
285
|
TriggerType2["AND"] = "AND";
|
|
331
286
|
TriggerType2["SUBTOTAL_RANGE"] = "SUBTOTAL_RANGE";
|
|
332
287
|
TriggerType2["ITEM_QUANTITY_RANGE"] = "ITEM_QUANTITY_RANGE";
|
|
@@ -336,7 +291,6 @@ var TriggerType = /* @__PURE__ */ ((TriggerType2) => {
|
|
|
336
291
|
return TriggerType2;
|
|
337
292
|
})(TriggerType || {});
|
|
338
293
|
var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
|
|
339
|
-
DayOfWeek2["UNKOWN_DAY_OF_WEEK"] = "UNKOWN_DAY_OF_WEEK";
|
|
340
294
|
DayOfWeek2["MON"] = "MON";
|
|
341
295
|
DayOfWeek2["TUE"] = "TUE";
|
|
342
296
|
DayOfWeek2["WED"] = "WED";
|
|
@@ -347,12 +301,10 @@ var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
|
|
|
347
301
|
return DayOfWeek2;
|
|
348
302
|
})(DayOfWeek || {});
|
|
349
303
|
var Type = /* @__PURE__ */ ((Type2) => {
|
|
350
|
-
Type2["UNDEFINED"] = "UNDEFINED";
|
|
351
304
|
Type2["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
|
|
352
305
|
return Type2;
|
|
353
306
|
})(Type || {});
|
|
354
307
|
var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
|
|
355
|
-
DiscountType2["UNDEFINED"] = "UNDEFINED";
|
|
356
308
|
DiscountType2["PERCENTAGE"] = "PERCENTAGE";
|
|
357
309
|
DiscountType2["FIXED_AMOUNT"] = "FIXED_AMOUNT";
|
|
358
310
|
DiscountType2["FIXED_PRICE"] = "FIXED_PRICE";
|
|
@@ -360,14 +312,12 @@ var DiscountType = /* @__PURE__ */ ((DiscountType2) => {
|
|
|
360
312
|
return DiscountType2;
|
|
361
313
|
})(DiscountType || {});
|
|
362
314
|
var Status = /* @__PURE__ */ ((Status2) => {
|
|
363
|
-
Status2["UNDEFINED"] = "UNDEFINED";
|
|
364
315
|
Status2["LIVE"] = "LIVE";
|
|
365
316
|
Status2["EXPIRED"] = "EXPIRED";
|
|
366
317
|
Status2["PENDING"] = "PENDING";
|
|
367
318
|
return Status2;
|
|
368
319
|
})(Status || {});
|
|
369
320
|
var AppliedSubjectType = /* @__PURE__ */ ((AppliedSubjectType2) => {
|
|
370
|
-
AppliedSubjectType2["UNDEFINED"] = "UNDEFINED";
|
|
371
321
|
AppliedSubjectType2["ALL_ITEMS"] = "ALL_ITEMS";
|
|
372
322
|
AppliedSubjectType2["LOWEST_PRICED_ITEM"] = "LOWEST_PRICED_ITEM";
|
|
373
323
|
return AppliedSubjectType2;
|
|
@@ -557,72 +507,6 @@ var utils = {
|
|
|
557
507
|
...createQueryUtils()
|
|
558
508
|
}
|
|
559
509
|
};
|
|
560
|
-
async function bulkUpdateDiscountRuleTags2(discountRuleIds, options) {
|
|
561
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
562
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
563
|
-
discountRuleIds,
|
|
564
|
-
assignTags: options?.assignTags,
|
|
565
|
-
unassignTags: options?.unassignTags
|
|
566
|
-
});
|
|
567
|
-
const reqOpts = bulkUpdateDiscountRuleTags(
|
|
568
|
-
payload
|
|
569
|
-
);
|
|
570
|
-
sideEffects?.onSiteCall?.();
|
|
571
|
-
try {
|
|
572
|
-
const result = await httpClient.request(reqOpts);
|
|
573
|
-
sideEffects?.onSuccess?.(result);
|
|
574
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
575
|
-
} catch (err) {
|
|
576
|
-
const transformedError = sdkTransformError(
|
|
577
|
-
err,
|
|
578
|
-
{
|
|
579
|
-
spreadPathsToArguments: {},
|
|
580
|
-
explicitPathsToArguments: {
|
|
581
|
-
discountRuleIds: "$[0]",
|
|
582
|
-
assignTags: "$[1].assignTags",
|
|
583
|
-
unassignTags: "$[1].unassignTags"
|
|
584
|
-
},
|
|
585
|
-
singleArgumentUnchanged: false
|
|
586
|
-
},
|
|
587
|
-
["discountRuleIds", "options"]
|
|
588
|
-
);
|
|
589
|
-
sideEffects?.onError?.(err);
|
|
590
|
-
throw transformedError;
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
async function bulkUpdateDiscountRuleTagsByFilter2(filter, options) {
|
|
594
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
595
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
596
|
-
filter,
|
|
597
|
-
assignTags: options?.assignTags,
|
|
598
|
-
unassignTags: options?.unassignTags
|
|
599
|
-
});
|
|
600
|
-
const reqOpts = bulkUpdateDiscountRuleTagsByFilter(
|
|
601
|
-
payload
|
|
602
|
-
);
|
|
603
|
-
sideEffects?.onSiteCall?.();
|
|
604
|
-
try {
|
|
605
|
-
const result = await httpClient.request(reqOpts);
|
|
606
|
-
sideEffects?.onSuccess?.(result);
|
|
607
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
608
|
-
} catch (err) {
|
|
609
|
-
const transformedError = sdkTransformError(
|
|
610
|
-
err,
|
|
611
|
-
{
|
|
612
|
-
spreadPathsToArguments: {},
|
|
613
|
-
explicitPathsToArguments: {
|
|
614
|
-
filter: "$[0]",
|
|
615
|
-
assignTags: "$[1].assignTags",
|
|
616
|
-
unassignTags: "$[1].unassignTags"
|
|
617
|
-
},
|
|
618
|
-
singleArgumentUnchanged: false
|
|
619
|
-
},
|
|
620
|
-
["filter", "options"]
|
|
621
|
-
);
|
|
622
|
-
sideEffects?.onError?.(err);
|
|
623
|
-
throw transformedError;
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
510
|
export {
|
|
627
511
|
AppliedSubjectType,
|
|
628
512
|
DayOfWeek,
|
|
@@ -634,8 +518,6 @@ export {
|
|
|
634
518
|
TriggerType,
|
|
635
519
|
Type,
|
|
636
520
|
WebhookIdentityType,
|
|
637
|
-
bulkUpdateDiscountRuleTags2 as bulkUpdateDiscountRuleTags,
|
|
638
|
-
bulkUpdateDiscountRuleTagsByFilter2 as bulkUpdateDiscountRuleTagsByFilter,
|
|
639
521
|
createDiscountRule2 as createDiscountRule,
|
|
640
522
|
deleteDiscountRule2 as deleteDiscountRule,
|
|
641
523
|
getDiscountRule2 as getDiscountRule,
|