@wix/auto_sdk_ecom_discount-rules 1.0.0
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 +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +25 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +36 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +1 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +48 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +271 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +1 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +23 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +123 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +1 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +80 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +98 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +1 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +694 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +76 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +1 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts +1053 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +359 -0
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +25 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +25 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +1 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +48 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +263 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +1 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +23 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +92 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +1 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +80 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +82 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +1 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +694 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +73 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +1 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts +1053 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +328 -0
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +25 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +36 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +1 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +48 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +271 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +1 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +23 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +123 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +80 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +98 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +1 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +713 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +76 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +1 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts +1072 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +359 -0
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +25 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +25 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +1 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +48 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +263 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +1 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +23 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +92 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +1 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +80 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +82 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +1 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +713 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +73 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +1 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts +1072 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +328 -0
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
export interface DiscountRule {
|
|
2
|
+
/**
|
|
3
|
+
* Discount rule ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
id?: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Revision number, which increments by 1 each time the discount rule is updated.
|
|
9
|
+
* To prevent conflicting changes, the current `revision` must be passed when updating the discount rule.
|
|
10
|
+
* @readonly
|
|
11
|
+
*/
|
|
12
|
+
revision?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Date and time the discount rule was created.
|
|
15
|
+
* @readonly
|
|
16
|
+
*/
|
|
17
|
+
createdDate?: Date | null;
|
|
18
|
+
/**
|
|
19
|
+
* Date and time the discount rule was last updated.
|
|
20
|
+
* @readonly
|
|
21
|
+
*/
|
|
22
|
+
updatedDate?: Date | null;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the discount rule is active.
|
|
25
|
+
*
|
|
26
|
+
* Default: `true`
|
|
27
|
+
*/
|
|
28
|
+
active?: boolean | null;
|
|
29
|
+
/** Discount rule name. */
|
|
30
|
+
name?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Discount rule trigger.
|
|
33
|
+
* A set of conditions that must be met for the `discounts` to be applied.
|
|
34
|
+
* Not passing a trigger will cause the discount to always apply.
|
|
35
|
+
*/
|
|
36
|
+
trigger?: DiscountTrigger;
|
|
37
|
+
/** Time frame in which the discount rule is active. */
|
|
38
|
+
activeTimeInfo?: ActiveTimeInfo;
|
|
39
|
+
/**
|
|
40
|
+
* List of discounts that are applied when one or more triggers are met.
|
|
41
|
+
*
|
|
42
|
+
* > **Notes:**
|
|
43
|
+
* >
|
|
44
|
+
* > + Currently, only 1 discount can be defined per discount rule.
|
|
45
|
+
* > + A discount rule can be applied on multiple items per cart.
|
|
46
|
+
* > + A discount rule can only be applied once per item.
|
|
47
|
+
*/
|
|
48
|
+
discounts?: Discounts;
|
|
49
|
+
/**
|
|
50
|
+
* Discount rule status.
|
|
51
|
+
* Default: `UNDEFINED`
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
54
|
+
status?: Status;
|
|
55
|
+
/**
|
|
56
|
+
* Number of times the discount rule was used.
|
|
57
|
+
* @readonly
|
|
58
|
+
*/
|
|
59
|
+
usageCount?: number;
|
|
60
|
+
}
|
|
61
|
+
/** DiscountTrigger - description of a set of conditions, that if met, will trigger the associated rule actions */
|
|
62
|
+
export interface DiscountTrigger extends DiscountTriggerTriggerOneOf {
|
|
63
|
+
/** Chain multiple triggers with the `and` operator. */
|
|
64
|
+
and?: And;
|
|
65
|
+
/** Chain multiple triggers with the `or` operator. */
|
|
66
|
+
or?: Or;
|
|
67
|
+
/** Custom trigger. */
|
|
68
|
+
customTrigger?: Custom;
|
|
69
|
+
/** Subtotal trigger range. */
|
|
70
|
+
subtotalRange?: SubtotalRange;
|
|
71
|
+
/** Item quantity trigger range. */
|
|
72
|
+
itemQuantityRange?: ItemQuantityRange;
|
|
73
|
+
/** Trigger type. */
|
|
74
|
+
triggerType?: TriggerType;
|
|
75
|
+
}
|
|
76
|
+
/** @oneof */
|
|
77
|
+
export interface DiscountTriggerTriggerOneOf {
|
|
78
|
+
/** Chain multiple triggers with the `and` operator. */
|
|
79
|
+
and?: And;
|
|
80
|
+
/** Chain multiple triggers with the `or` operator. */
|
|
81
|
+
or?: Or;
|
|
82
|
+
/** Custom trigger. */
|
|
83
|
+
customTrigger?: Custom;
|
|
84
|
+
/** Subtotal trigger range. */
|
|
85
|
+
subtotalRange?: SubtotalRange;
|
|
86
|
+
/** Item quantity trigger range. */
|
|
87
|
+
itemQuantityRange?: ItemQuantityRange;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* This object represents a scope of catalog items. Examples:
|
|
91
|
+
* 1. All catalog items of a specific app - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id`
|
|
92
|
+
* 2. Specific catalog item - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id` + `catalog_item_ids`
|
|
93
|
+
* 3. External catalog filter - type = CUSTOM_FILTER, CustomFilter with 'app_id' + 'params'
|
|
94
|
+
*/
|
|
95
|
+
export interface Scope extends ScopeScopeItemsOneOf {
|
|
96
|
+
/** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
97
|
+
catalogItemFilter?: CatalogItemFilter;
|
|
98
|
+
/** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
99
|
+
customFilter?: CustomFilter;
|
|
100
|
+
/** Scope ID. */
|
|
101
|
+
id?: string;
|
|
102
|
+
/** Scope type. */
|
|
103
|
+
type?: ScopeType;
|
|
104
|
+
}
|
|
105
|
+
/** @oneof */
|
|
106
|
+
export interface ScopeScopeItemsOneOf {
|
|
107
|
+
/** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
108
|
+
catalogItemFilter?: CatalogItemFilter;
|
|
109
|
+
/** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
110
|
+
customFilter?: CustomFilter;
|
|
111
|
+
}
|
|
112
|
+
export declare enum ScopeType {
|
|
113
|
+
UNDEFINED_SCOPE = "UNDEFINED_SCOPE",
|
|
114
|
+
/** Specific catalog items */
|
|
115
|
+
CATALOG_ITEM = "CATALOG_ITEM",
|
|
116
|
+
/** Specific items by custom filters */
|
|
117
|
+
CUSTOM_FILTER = "CUSTOM_FILTER"
|
|
118
|
+
}
|
|
119
|
+
export interface CatalogItemFilter {
|
|
120
|
+
/** Catalog App ID. For example, the Wix Stores, Wix Bookings, or 3rd-party `appId`. */
|
|
121
|
+
catalogAppId?: string;
|
|
122
|
+
/** ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores. */
|
|
123
|
+
catalogItemIds?: string[];
|
|
124
|
+
}
|
|
125
|
+
export interface CustomFilter {
|
|
126
|
+
/** Custom filter app ID, when relevant. */
|
|
127
|
+
appId?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Custom filter in `{ "key": "value" }` form.
|
|
130
|
+
* For example, an array of `collectionIDs`:
|
|
131
|
+
* `{ ["collectionId": "12345"], ["collectionId": "67890"] }`.
|
|
132
|
+
*/
|
|
133
|
+
params?: Record<string, any> | null;
|
|
134
|
+
}
|
|
135
|
+
export interface And {
|
|
136
|
+
/** List of triggers to have an "AND" operator between their results. */
|
|
137
|
+
triggers?: DiscountTrigger[];
|
|
138
|
+
}
|
|
139
|
+
export interface Or {
|
|
140
|
+
/** List of triggers to have an "OR" operator between their results. */
|
|
141
|
+
triggers?: DiscountTrigger[];
|
|
142
|
+
}
|
|
143
|
+
export interface Custom {
|
|
144
|
+
/** Trigger ID. */
|
|
145
|
+
id?: string;
|
|
146
|
+
/** ID of the app that created the trigger. */
|
|
147
|
+
appId?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface SubtotalRange {
|
|
150
|
+
/** Relevant scopes for `SPECIFIC_ITEMS` target type. */
|
|
151
|
+
scopes?: Scope[];
|
|
152
|
+
/** Minimum subtotal price (inclusive). */
|
|
153
|
+
from?: string | null;
|
|
154
|
+
/** Maximum subtotal price (inclusive). */
|
|
155
|
+
to?: string | null;
|
|
156
|
+
}
|
|
157
|
+
export interface ItemQuantityRange {
|
|
158
|
+
/** Relevant scopes for `SPECIFIC_ITEMS` target type. */
|
|
159
|
+
scopes?: Scope[];
|
|
160
|
+
/** Minimum item quantity (inclusive). */
|
|
161
|
+
from?: number | null;
|
|
162
|
+
/** Maximum item quantity (inclusive). */
|
|
163
|
+
to?: number | null;
|
|
164
|
+
}
|
|
165
|
+
export declare enum TriggerType {
|
|
166
|
+
UNDEFINED = "UNDEFINED",
|
|
167
|
+
/** Operator used for chaining multiple triggers. Currently 1 `AND` chain operator is supported. */
|
|
168
|
+
AND = "AND",
|
|
169
|
+
/** Subtotal must be within the specified `subtotalRange` values. */
|
|
170
|
+
SUBTOTAL_RANGE = "SUBTOTAL_RANGE",
|
|
171
|
+
/** Quantity of items in scope must be within specified `itemQuantityRange` values. */
|
|
172
|
+
ITEM_QUANTITY_RANGE = "ITEM_QUANTITY_RANGE",
|
|
173
|
+
/** Custom trigger type defined in `customTrigger` object. */
|
|
174
|
+
CUSTOM = "CUSTOM",
|
|
175
|
+
/** Chain multiple triggers with OR operator */
|
|
176
|
+
OR = "OR"
|
|
177
|
+
}
|
|
178
|
+
export interface ActiveTimeInfo {
|
|
179
|
+
/** 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. */
|
|
180
|
+
start?: Date | null;
|
|
181
|
+
/** Date and time the discount rule is active **till**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */
|
|
182
|
+
end?: Date | null;
|
|
183
|
+
}
|
|
184
|
+
export interface Discounts {
|
|
185
|
+
/** Discounts. */
|
|
186
|
+
values?: Discount[];
|
|
187
|
+
}
|
|
188
|
+
export interface Discount extends DiscountDiscountOneOf {
|
|
189
|
+
/** Percentage to discount from original price. */
|
|
190
|
+
percentage?: number;
|
|
191
|
+
/** Amount to discount from original price. */
|
|
192
|
+
fixedAmount?: string;
|
|
193
|
+
/** Fixed price. Line item will be fixed to this price. */
|
|
194
|
+
fixedPrice?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Discount target.
|
|
197
|
+
*
|
|
198
|
+
* + `SPECIFIC_ITEMS`: Discount applies to a specific set of items.
|
|
199
|
+
*/
|
|
200
|
+
targetType?: Type;
|
|
201
|
+
/** Data related to `SPECIFIC_ITEMS` target type. */
|
|
202
|
+
specificItemsInfo?: SpecificItemsInfo;
|
|
203
|
+
/** Discount type. */
|
|
204
|
+
discountType?: DiscountType;
|
|
205
|
+
}
|
|
206
|
+
/** @oneof */
|
|
207
|
+
export interface DiscountDiscountOneOf {
|
|
208
|
+
/** Percentage to discount from original price. */
|
|
209
|
+
percentage?: number;
|
|
210
|
+
/** Amount to discount from original price. */
|
|
211
|
+
fixedAmount?: string;
|
|
212
|
+
/** Fixed price. Line item will be fixed to this price. */
|
|
213
|
+
fixedPrice?: string;
|
|
214
|
+
}
|
|
215
|
+
export declare enum Type {
|
|
216
|
+
/** Target type is not defined */
|
|
217
|
+
UNDEFINED = "UNDEFINED",
|
|
218
|
+
/** Target type is a set of specific items */
|
|
219
|
+
SPECIFIC_ITEMS = "SPECIFIC_ITEMS"
|
|
220
|
+
}
|
|
221
|
+
export interface SpecificItemsInfo {
|
|
222
|
+
/** All associated scopes for `SPECIFIC_ITEMS` target type. */
|
|
223
|
+
scopes?: Scope[];
|
|
224
|
+
}
|
|
225
|
+
export declare enum DiscountType {
|
|
226
|
+
UNDEFINED = "UNDEFINED",
|
|
227
|
+
/** Price is reduced by percentage value. */
|
|
228
|
+
PERCENTAGE = "PERCENTAGE",
|
|
229
|
+
/** Price is reduced by fixed amount. */
|
|
230
|
+
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
231
|
+
/** Price will be set to fixed amount. */
|
|
232
|
+
FIXED_PRICE = "FIXED_PRICE"
|
|
233
|
+
}
|
|
234
|
+
export interface BuyXGetYInfo {
|
|
235
|
+
/** Information about which items must be in the cart (buy X) for the discount to apply (get Y). */
|
|
236
|
+
customerBuys?: CustomerBuy;
|
|
237
|
+
/** Information about which items will be discounted (get Y). */
|
|
238
|
+
customerGets?: CustomerGet;
|
|
239
|
+
/**
|
|
240
|
+
* The maximum number of times the 'buy X get Y' discount can be applied.
|
|
241
|
+
* For example, when the value of `limit` is `2`, with a "2+1" sale on all items, the following logic applies:
|
|
242
|
+
* + Buy 2 get 1, buy 3 get 1.
|
|
243
|
+
* + Buy 4 get 2, buy 6 get 2, buy 9 get 2, and so on.
|
|
244
|
+
*/
|
|
245
|
+
limit?: number | null;
|
|
246
|
+
}
|
|
247
|
+
export interface CustomerBuy extends CustomerBuyConditionOneOf {
|
|
248
|
+
/** Minimum number of items the customer must add to the cart to be eligible for a discount. */
|
|
249
|
+
minimumQuantity?: number;
|
|
250
|
+
/** Minimum price the customer must add to the cart to be eligible for a discount. */
|
|
251
|
+
minimumSpend?: string | null;
|
|
252
|
+
/** Scopes of the items that must be added to the cart to enable the discount. */
|
|
253
|
+
scopes?: Scope[];
|
|
254
|
+
}
|
|
255
|
+
/** @oneof */
|
|
256
|
+
export interface CustomerBuyConditionOneOf {
|
|
257
|
+
/** Minimum number of items the customer must add to the cart to be eligible for a discount. */
|
|
258
|
+
minimumQuantity?: number;
|
|
259
|
+
/** Minimum price the customer must add to the cart to be eligible for a discount. */
|
|
260
|
+
minimumSpend?: string | null;
|
|
261
|
+
}
|
|
262
|
+
export interface CustomerGet {
|
|
263
|
+
/**
|
|
264
|
+
* Exact number of items in the cart that will be discounted.
|
|
265
|
+
* If the cart contains fewer items than the value of quantity, the discount will not apply.
|
|
266
|
+
*/
|
|
267
|
+
quantity?: number;
|
|
268
|
+
/** Scopes of the items that will be discounted. */
|
|
269
|
+
scopes?: Scope[];
|
|
270
|
+
}
|
|
271
|
+
export declare enum Status {
|
|
272
|
+
/** Rule status is not defined. */
|
|
273
|
+
UNDEFINED = "UNDEFINED",
|
|
274
|
+
/** Rule status is live. */
|
|
275
|
+
LIVE = "LIVE",
|
|
276
|
+
/** Rule status is expired, it might have been live in the past. */
|
|
277
|
+
EXPIRED = "EXPIRED",
|
|
278
|
+
/** Rule status is pending, it might be live in the future. */
|
|
279
|
+
PENDING = "PENDING"
|
|
280
|
+
}
|
|
281
|
+
/** The discount settings */
|
|
282
|
+
export interface DiscountSettings {
|
|
283
|
+
/** Discount applies to either `ALL_ITEMS`, or to the `LOWEST_PRICED_ITEM`. */
|
|
284
|
+
appliesTo?: AppliedSubjectType;
|
|
285
|
+
/**
|
|
286
|
+
* Whether the discount will apply to subscriptions.
|
|
287
|
+
*
|
|
288
|
+
* Default: `false`
|
|
289
|
+
*/
|
|
290
|
+
includeSubscription?: boolean | null;
|
|
291
|
+
/** Maximum total number of uses allowed for the discount rule. */
|
|
292
|
+
usageLimit?: number | null;
|
|
293
|
+
/**
|
|
294
|
+
* The usage limit per user per discount.
|
|
295
|
+
* When not provided, this setting will not apply.
|
|
296
|
+
*/
|
|
297
|
+
usageLimitPerUser?: number | null;
|
|
298
|
+
}
|
|
299
|
+
/** TODO: check if can be removed */
|
|
300
|
+
export declare enum AppliedSubjectType {
|
|
301
|
+
UNDEFINED = "UNDEFINED",
|
|
302
|
+
/** Discount applies to all items at checkout. */
|
|
303
|
+
ALL_ITEMS = "ALL_ITEMS",
|
|
304
|
+
/** Discount applies to the lowest priced item at checkout. */
|
|
305
|
+
LOWEST_PRICED_ITEM = "LOWEST_PRICED_ITEM"
|
|
306
|
+
}
|
|
307
|
+
export interface ExtendedFields {
|
|
308
|
+
/**
|
|
309
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
310
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
311
|
+
*
|
|
312
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
313
|
+
*
|
|
314
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
315
|
+
*/
|
|
316
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
317
|
+
}
|
|
318
|
+
export interface CreateDiscountRuleRequest {
|
|
319
|
+
/** Discount rule info. */
|
|
320
|
+
discountRule: DiscountRule;
|
|
321
|
+
}
|
|
322
|
+
export interface CreateDiscountRuleResponse {
|
|
323
|
+
/** Discount rule. */
|
|
324
|
+
discountRule?: DiscountRule;
|
|
325
|
+
}
|
|
326
|
+
export interface GetDiscountRuleRequest {
|
|
327
|
+
/** ID of the discount rule to retrieve. */
|
|
328
|
+
discountRuleId: string;
|
|
329
|
+
}
|
|
330
|
+
export interface GetDiscountRuleResponse {
|
|
331
|
+
/** The requested discount rule. */
|
|
332
|
+
discountRule?: DiscountRule;
|
|
333
|
+
}
|
|
334
|
+
export interface UpdateDiscountRuleRequest {
|
|
335
|
+
/** Discount rule info. */
|
|
336
|
+
discountRule: DiscountRule;
|
|
337
|
+
}
|
|
338
|
+
export interface UpdateDiscountRuleResponse {
|
|
339
|
+
/** Updated discount rule. */
|
|
340
|
+
discountRule?: DiscountRule;
|
|
341
|
+
}
|
|
342
|
+
export interface DeleteDiscountRuleRequest {
|
|
343
|
+
/** ID of the discount rule to delete. */
|
|
344
|
+
discountRuleId: string;
|
|
345
|
+
}
|
|
346
|
+
export interface DeleteDiscountRuleResponse {
|
|
347
|
+
}
|
|
348
|
+
export interface QueryDiscountRulesRequest {
|
|
349
|
+
/** Query options. */
|
|
350
|
+
query?: PlatformQuery;
|
|
351
|
+
}
|
|
352
|
+
export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
353
|
+
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
354
|
+
paging?: PlatformPaging;
|
|
355
|
+
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
356
|
+
cursorPaging?: CursorPaging;
|
|
357
|
+
/** Filter object. */
|
|
358
|
+
filter?: Record<string, any> | null;
|
|
359
|
+
/** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
|
|
360
|
+
sort?: Sorting[];
|
|
361
|
+
}
|
|
362
|
+
/** @oneof */
|
|
363
|
+
export interface PlatformQueryPagingMethodOneOf {
|
|
364
|
+
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
365
|
+
paging?: PlatformPaging;
|
|
366
|
+
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
367
|
+
cursorPaging?: CursorPaging;
|
|
368
|
+
}
|
|
369
|
+
export interface Sorting {
|
|
370
|
+
/** Name of the field to sort by. */
|
|
371
|
+
fieldName?: string;
|
|
372
|
+
/** Sort order. */
|
|
373
|
+
order?: SortOrder;
|
|
374
|
+
}
|
|
375
|
+
export declare enum SortOrder {
|
|
376
|
+
ASC = "ASC",
|
|
377
|
+
DESC = "DESC"
|
|
378
|
+
}
|
|
379
|
+
export interface PlatformPaging {
|
|
380
|
+
/** Number of items to load. */
|
|
381
|
+
limit?: number | null;
|
|
382
|
+
/** Number of items to skip in the current sort order. */
|
|
383
|
+
offset?: number | null;
|
|
384
|
+
}
|
|
385
|
+
export interface CursorPaging {
|
|
386
|
+
/** Maximum number of items to return in the results. */
|
|
387
|
+
limit?: number | null;
|
|
388
|
+
/**
|
|
389
|
+
* Pointer to the next or previous page in the list of results.
|
|
390
|
+
*
|
|
391
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
392
|
+
* Not relevant for the first request.
|
|
393
|
+
*/
|
|
394
|
+
cursor?: string | null;
|
|
395
|
+
}
|
|
396
|
+
export interface QueryDiscountRulesResponse {
|
|
397
|
+
/** List of discount rules. */
|
|
398
|
+
discountRules?: DiscountRule[];
|
|
399
|
+
/** Details on the paged set of results returned. */
|
|
400
|
+
pagingMetadata?: PlatformPagingMetadata;
|
|
401
|
+
}
|
|
402
|
+
export interface PlatformPagingMetadata {
|
|
403
|
+
/** The number of items returned in this response. */
|
|
404
|
+
count?: number | null;
|
|
405
|
+
/** The offset which was requested. Returned if offset paging was used. */
|
|
406
|
+
offset?: number | null;
|
|
407
|
+
/** The total number of items that match the query. Returned if offset paging was used. */
|
|
408
|
+
total?: number | null;
|
|
409
|
+
/** Cursors to navigate through result pages. Returned if cursor paging was used. */
|
|
410
|
+
cursors?: Cursors;
|
|
411
|
+
}
|
|
412
|
+
export interface Cursors {
|
|
413
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
414
|
+
next?: string | null;
|
|
415
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
416
|
+
prev?: string | null;
|
|
417
|
+
}
|
|
418
|
+
export interface GetAppliedDiscountsRequest {
|
|
419
|
+
/** Line items for which to check for discount rules. */
|
|
420
|
+
lineItems?: LineItem[];
|
|
421
|
+
/** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */
|
|
422
|
+
purchaseFlowId?: string | null;
|
|
423
|
+
}
|
|
424
|
+
export interface LineItem {
|
|
425
|
+
/** Line item ID. */
|
|
426
|
+
id?: string;
|
|
427
|
+
/** Line item quantity. */
|
|
428
|
+
quantity?: number | null;
|
|
429
|
+
/** Catalog and item reference info. Learn more about [integrating Wix Stores products with Wix eCommerce](https://dev.wix.com/api/rest/wix-stores/catalog/ecommerce-integration). */
|
|
430
|
+
catalogReference?: CatalogReference;
|
|
431
|
+
/** Line item price. */
|
|
432
|
+
price?: string;
|
|
433
|
+
}
|
|
434
|
+
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
435
|
+
export interface CatalogReference {
|
|
436
|
+
/** ID of the item within the catalog it belongs to. */
|
|
437
|
+
catalogItemId?: string;
|
|
438
|
+
/**
|
|
439
|
+
* ID of the app providing the catalog.
|
|
440
|
+
*
|
|
441
|
+
* You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
|
|
442
|
+
*
|
|
443
|
+
* For items from Wix catalogs, the following values always apply:
|
|
444
|
+
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
445
|
+
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
446
|
+
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
447
|
+
*/
|
|
448
|
+
appId?: string;
|
|
449
|
+
/**
|
|
450
|
+
* Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
|
|
451
|
+
*
|
|
452
|
+
* For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).
|
|
453
|
+
*/
|
|
454
|
+
options?: Record<string, any> | null;
|
|
455
|
+
}
|
|
456
|
+
export interface GetAppliedDiscountsResponse {
|
|
457
|
+
/** All eligible discounts. */
|
|
458
|
+
appliedDiscounts?: AppliedDiscount[];
|
|
459
|
+
}
|
|
460
|
+
export interface AppliedDiscount {
|
|
461
|
+
/** Discount type. */
|
|
462
|
+
discountType?: Type;
|
|
463
|
+
/** IDs of line items the discount applies to, in GUID format. */
|
|
464
|
+
lineItemIds?: string[];
|
|
465
|
+
/** Applied discount rule. */
|
|
466
|
+
appliedDiscountRule?: AppliedDiscountRule;
|
|
467
|
+
}
|
|
468
|
+
export interface AppliedDiscountRule {
|
|
469
|
+
/** Applied discount rule ID. */
|
|
470
|
+
id?: string;
|
|
471
|
+
/** Discount rule name. */
|
|
472
|
+
name?: DiscountRuleName;
|
|
473
|
+
/** Total amount reduced from all discounted line items. */
|
|
474
|
+
amount?: MultiCurrencyPrice;
|
|
475
|
+
/** Discount rule type. */
|
|
476
|
+
discountRuleType?: DiscountType;
|
|
477
|
+
}
|
|
478
|
+
export interface DiscountRuleName {
|
|
479
|
+
/** Original discount rule name (in site's default language). */
|
|
480
|
+
original?: string;
|
|
481
|
+
/**
|
|
482
|
+
* Translated discount rule name according to buyer language.
|
|
483
|
+
*
|
|
484
|
+
* Default: `original`
|
|
485
|
+
*/
|
|
486
|
+
translated?: string | null;
|
|
487
|
+
}
|
|
488
|
+
export interface MultiCurrencyPrice {
|
|
489
|
+
/** Amount. */
|
|
490
|
+
amount?: string;
|
|
491
|
+
/**
|
|
492
|
+
* Converted amount.
|
|
493
|
+
* @readonly
|
|
494
|
+
*/
|
|
495
|
+
convertedAmount?: string;
|
|
496
|
+
/**
|
|
497
|
+
* Amount formatted with currency symbol.
|
|
498
|
+
* @readonly
|
|
499
|
+
*/
|
|
500
|
+
formattedAmount?: string;
|
|
501
|
+
/**
|
|
502
|
+
* Converted amount formatted with currency symbol.
|
|
503
|
+
* @readonly
|
|
504
|
+
*/
|
|
505
|
+
formattedConvertedAmount?: string;
|
|
506
|
+
}
|
|
507
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
508
|
+
createdEvent?: EntityCreatedEvent;
|
|
509
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
510
|
+
deletedEvent?: EntityDeletedEvent;
|
|
511
|
+
actionEvent?: ActionEvent;
|
|
512
|
+
/**
|
|
513
|
+
* Unique event ID.
|
|
514
|
+
* Allows clients to ignore duplicate webhooks.
|
|
515
|
+
*/
|
|
516
|
+
id?: string;
|
|
517
|
+
/**
|
|
518
|
+
* Assumes actions are also always typed to an entity_type
|
|
519
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
520
|
+
*/
|
|
521
|
+
entityFqdn?: string;
|
|
522
|
+
/**
|
|
523
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
524
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
525
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
526
|
+
*/
|
|
527
|
+
slug?: string;
|
|
528
|
+
/** ID of the entity associated with the event. */
|
|
529
|
+
entityId?: string;
|
|
530
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
531
|
+
eventTime?: Date | null;
|
|
532
|
+
/**
|
|
533
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
534
|
+
* (for example, GDPR).
|
|
535
|
+
*/
|
|
536
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
537
|
+
/** If present, indicates the action that triggered the event. */
|
|
538
|
+
originatedFrom?: string | null;
|
|
539
|
+
/**
|
|
540
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
541
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
542
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
543
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
544
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
545
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
546
|
+
*/
|
|
547
|
+
entityEventSequence?: string | null;
|
|
548
|
+
}
|
|
549
|
+
/** @oneof */
|
|
550
|
+
export interface DomainEventBodyOneOf {
|
|
551
|
+
createdEvent?: EntityCreatedEvent;
|
|
552
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
553
|
+
deletedEvent?: EntityDeletedEvent;
|
|
554
|
+
actionEvent?: ActionEvent;
|
|
555
|
+
}
|
|
556
|
+
export interface EntityCreatedEvent {
|
|
557
|
+
entityAsJson?: string;
|
|
558
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
559
|
+
restoreInfo?: RestoreInfo;
|
|
560
|
+
}
|
|
561
|
+
export interface RestoreInfo {
|
|
562
|
+
deletedDate?: Date | null;
|
|
563
|
+
}
|
|
564
|
+
export interface EntityUpdatedEvent {
|
|
565
|
+
/**
|
|
566
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
567
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
568
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
569
|
+
*/
|
|
570
|
+
currentEntityAsJson?: string;
|
|
571
|
+
}
|
|
572
|
+
export interface EntityDeletedEvent {
|
|
573
|
+
/** Entity that was deleted */
|
|
574
|
+
deletedEntityAsJson?: string | null;
|
|
575
|
+
}
|
|
576
|
+
export interface ActionEvent {
|
|
577
|
+
bodyAsJson?: string;
|
|
578
|
+
}
|
|
579
|
+
export interface Empty {
|
|
580
|
+
}
|
|
581
|
+
export interface DiscountRuleUsageLimitReached {
|
|
582
|
+
/** Discount Rule */
|
|
583
|
+
rule?: DiscountRule;
|
|
584
|
+
}
|
|
585
|
+
export interface MessageEnvelope {
|
|
586
|
+
/** App instance ID. */
|
|
587
|
+
instanceId?: string | null;
|
|
588
|
+
/** Event type. */
|
|
589
|
+
eventType?: string;
|
|
590
|
+
/** The identification type and identity data. */
|
|
591
|
+
identity?: IdentificationData;
|
|
592
|
+
/** Stringify payload. */
|
|
593
|
+
data?: string;
|
|
594
|
+
}
|
|
595
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
596
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
597
|
+
anonymousVisitorId?: string;
|
|
598
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
599
|
+
memberId?: string;
|
|
600
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
601
|
+
wixUserId?: string;
|
|
602
|
+
/** ID of an app. */
|
|
603
|
+
appId?: string;
|
|
604
|
+
/** @readonly */
|
|
605
|
+
identityType?: WebhookIdentityType;
|
|
606
|
+
}
|
|
607
|
+
/** @oneof */
|
|
608
|
+
export interface IdentificationDataIdOneOf {
|
|
609
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
610
|
+
anonymousVisitorId?: string;
|
|
611
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
612
|
+
memberId?: string;
|
|
613
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
614
|
+
wixUserId?: string;
|
|
615
|
+
/** ID of an app. */
|
|
616
|
+
appId?: string;
|
|
617
|
+
}
|
|
618
|
+
export declare enum WebhookIdentityType {
|
|
619
|
+
UNKNOWN = "UNKNOWN",
|
|
620
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
621
|
+
MEMBER = "MEMBER",
|
|
622
|
+
WIX_USER = "WIX_USER",
|
|
623
|
+
APP = "APP"
|
|
624
|
+
}
|
|
625
|
+
interface AndNonNullableFields {
|
|
626
|
+
triggers: DiscountTriggerNonNullableFields[];
|
|
627
|
+
}
|
|
628
|
+
interface OrNonNullableFields {
|
|
629
|
+
triggers: DiscountTriggerNonNullableFields[];
|
|
630
|
+
}
|
|
631
|
+
interface CustomNonNullableFields {
|
|
632
|
+
id: string;
|
|
633
|
+
appId: string;
|
|
634
|
+
}
|
|
635
|
+
interface CatalogItemFilterNonNullableFields {
|
|
636
|
+
catalogAppId: string;
|
|
637
|
+
catalogItemIds: string[];
|
|
638
|
+
}
|
|
639
|
+
interface CustomFilterNonNullableFields {
|
|
640
|
+
appId: string;
|
|
641
|
+
}
|
|
642
|
+
interface ScopeNonNullableFields {
|
|
643
|
+
catalogItemFilter?: CatalogItemFilterNonNullableFields;
|
|
644
|
+
customFilter?: CustomFilterNonNullableFields;
|
|
645
|
+
id: string;
|
|
646
|
+
type: ScopeType;
|
|
647
|
+
}
|
|
648
|
+
interface SubtotalRangeNonNullableFields {
|
|
649
|
+
scopes: ScopeNonNullableFields[];
|
|
650
|
+
}
|
|
651
|
+
interface ItemQuantityRangeNonNullableFields {
|
|
652
|
+
scopes: ScopeNonNullableFields[];
|
|
653
|
+
}
|
|
654
|
+
interface DiscountTriggerNonNullableFields {
|
|
655
|
+
and?: AndNonNullableFields;
|
|
656
|
+
or?: OrNonNullableFields;
|
|
657
|
+
customTrigger?: CustomNonNullableFields;
|
|
658
|
+
subtotalRange?: SubtotalRangeNonNullableFields;
|
|
659
|
+
itemQuantityRange?: ItemQuantityRangeNonNullableFields;
|
|
660
|
+
triggerType: TriggerType;
|
|
661
|
+
}
|
|
662
|
+
interface SpecificItemsInfoNonNullableFields {
|
|
663
|
+
scopes: ScopeNonNullableFields[];
|
|
664
|
+
}
|
|
665
|
+
interface CustomerBuyNonNullableFields {
|
|
666
|
+
minimumQuantity: number;
|
|
667
|
+
scopes: ScopeNonNullableFields[];
|
|
668
|
+
}
|
|
669
|
+
interface CustomerGetNonNullableFields {
|
|
670
|
+
quantity: number;
|
|
671
|
+
scopes: ScopeNonNullableFields[];
|
|
672
|
+
}
|
|
673
|
+
interface BuyXGetYInfoNonNullableFields {
|
|
674
|
+
customerBuys?: CustomerBuyNonNullableFields;
|
|
675
|
+
customerGets?: CustomerGetNonNullableFields;
|
|
676
|
+
}
|
|
677
|
+
interface DiscountNonNullableFields {
|
|
678
|
+
percentage: number;
|
|
679
|
+
fixedAmount: string;
|
|
680
|
+
fixedPrice: string;
|
|
681
|
+
targetType: Type;
|
|
682
|
+
specificItemsInfo?: SpecificItemsInfoNonNullableFields;
|
|
683
|
+
discountType: DiscountType;
|
|
684
|
+
/** @internal */
|
|
685
|
+
buyXGetYInfo?: BuyXGetYInfoNonNullableFields;
|
|
686
|
+
}
|
|
687
|
+
interface DiscountsNonNullableFields {
|
|
688
|
+
values: DiscountNonNullableFields[];
|
|
689
|
+
}
|
|
690
|
+
interface DiscountSettingsNonNullableFields {
|
|
691
|
+
appliesTo: AppliedSubjectType;
|
|
692
|
+
}
|
|
693
|
+
interface DiscountRuleNonNullableFields {
|
|
694
|
+
trigger?: DiscountTriggerNonNullableFields;
|
|
695
|
+
discounts?: DiscountsNonNullableFields;
|
|
696
|
+
status: Status;
|
|
697
|
+
usageCount: number;
|
|
698
|
+
/** @internal */
|
|
699
|
+
settings?: DiscountSettingsNonNullableFields;
|
|
700
|
+
}
|
|
701
|
+
export interface CreateDiscountRuleResponseNonNullableFields {
|
|
702
|
+
discountRule?: DiscountRuleNonNullableFields;
|
|
703
|
+
}
|
|
704
|
+
export interface GetDiscountRuleResponseNonNullableFields {
|
|
705
|
+
discountRule?: DiscountRuleNonNullableFields;
|
|
706
|
+
}
|
|
707
|
+
export interface UpdateDiscountRuleResponseNonNullableFields {
|
|
708
|
+
discountRule?: DiscountRuleNonNullableFields;
|
|
709
|
+
}
|
|
710
|
+
export interface QueryDiscountRulesResponseNonNullableFields {
|
|
711
|
+
discountRules: DiscountRuleNonNullableFields[];
|
|
712
|
+
}
|
|
713
|
+
export {};
|