@wix/auto_sdk_ecom_discount-rules 1.0.6 → 1.0.8
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 +823 -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/{ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.mts → cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts} +258 -78
- 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 +823 -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/{ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.ts → es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts} +258 -78
- 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 +823 -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/{ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.ts → cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts} +258 -78
- 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 +823 -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/{ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.d.mts → es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts} +258 -78
- 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/package.json +11 -12
- package/build/index.d.mts +0 -96
- package/build/index.d.ts +0 -96
- package/build/index.js +0 -606
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -567
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -96
- package/build/internal/index.d.ts +0 -96
- package/build/internal/index.js +0 -606
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -567
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -472
- package/build/internal/meta.d.ts +0 -472
- package/build/internal/meta.js +0 -352
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -321
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -472
- package/build/meta.d.ts +0 -472
- package/build/meta.js +0 -352
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -321
- package/build/meta.mjs.map +0 -1
package/build/meta.d.ts
DELETED
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
import { w as CreateDiscountRuleRequest$1, x as CreateDiscountRuleResponse$1, G as GetDiscountRuleRequest$1, y as GetDiscountRuleResponse$1, z as UpdateDiscountRuleRequest$1, F as UpdateDiscountRuleResponse$1, H as DeleteDiscountRuleRequest$1, J as DeleteDiscountRuleResponse$1, Q as QueryDiscountRulesRequest$1, R as QueryDiscountRulesResponse$1 } from './ecom-discounts-v1-discount-rule-discount-rules.universal--1DNaPHt.js';
|
|
2
|
-
|
|
3
|
-
interface DiscountRule {
|
|
4
|
-
/**
|
|
5
|
-
* Discount rule ID.
|
|
6
|
-
* @format GUID
|
|
7
|
-
* @readonly
|
|
8
|
-
*/
|
|
9
|
-
id?: string | null;
|
|
10
|
-
/**
|
|
11
|
-
* Revision number, which increments by 1 each time the discount rule is updated.
|
|
12
|
-
* To prevent conflicting changes, the current `revision` must be passed when updating the discount rule.
|
|
13
|
-
* @readonly
|
|
14
|
-
*/
|
|
15
|
-
revision?: string | null;
|
|
16
|
-
/**
|
|
17
|
-
* Date and time the discount rule was created.
|
|
18
|
-
* @readonly
|
|
19
|
-
*/
|
|
20
|
-
createdDate?: Date | null;
|
|
21
|
-
/**
|
|
22
|
-
* Date and time the discount rule was last updated.
|
|
23
|
-
* @readonly
|
|
24
|
-
*/
|
|
25
|
-
updatedDate?: Date | null;
|
|
26
|
-
/**
|
|
27
|
-
* Whether the discount rule is active.
|
|
28
|
-
*
|
|
29
|
-
* Default: `true`
|
|
30
|
-
*/
|
|
31
|
-
active?: boolean | null;
|
|
32
|
-
/**
|
|
33
|
-
* Discount rule name.
|
|
34
|
-
* @minLength 1
|
|
35
|
-
* @maxLength 50
|
|
36
|
-
*/
|
|
37
|
-
name?: string | null;
|
|
38
|
-
/**
|
|
39
|
-
* Discount rule trigger.
|
|
40
|
-
* A set of conditions that must be met for the `discounts` to be applied.
|
|
41
|
-
* Not passing a trigger will cause the discount to always apply.
|
|
42
|
-
*/
|
|
43
|
-
trigger?: DiscountTrigger;
|
|
44
|
-
/** Time frame in which the discount rule is active. */
|
|
45
|
-
activeTimeInfo?: ActiveTimeInfo;
|
|
46
|
-
/**
|
|
47
|
-
* List of discounts that are applied when one or more triggers are met.
|
|
48
|
-
*
|
|
49
|
-
* > **Notes:**
|
|
50
|
-
* >
|
|
51
|
-
* > + Currently, only 1 discount can be defined per discount rule.
|
|
52
|
-
* > + A discount rule can be applied on multiple items per cart.
|
|
53
|
-
* > + A discount rule can only be applied once per item.
|
|
54
|
-
*/
|
|
55
|
-
discounts?: Discounts;
|
|
56
|
-
/**
|
|
57
|
-
* Discount rule status.
|
|
58
|
-
* Default: `UNDEFINED`
|
|
59
|
-
* @readonly
|
|
60
|
-
*/
|
|
61
|
-
status?: Status;
|
|
62
|
-
/**
|
|
63
|
-
* Number of times the discount rule was used.
|
|
64
|
-
* @readonly
|
|
65
|
-
*/
|
|
66
|
-
usageCount?: number;
|
|
67
|
-
}
|
|
68
|
-
/** DiscountTrigger - description of a set of conditions, that if met, will trigger the associated rule actions */
|
|
69
|
-
interface DiscountTrigger extends DiscountTriggerTriggerOneOf {
|
|
70
|
-
/** Chain multiple triggers with the `and` operator. */
|
|
71
|
-
and?: And;
|
|
72
|
-
/** Chain multiple triggers with the `or` operator. */
|
|
73
|
-
or?: Or;
|
|
74
|
-
/** Custom trigger. */
|
|
75
|
-
customTrigger?: Custom;
|
|
76
|
-
/** Subtotal trigger range. */
|
|
77
|
-
subtotalRange?: SubtotalRange;
|
|
78
|
-
/** Item quantity trigger range. */
|
|
79
|
-
itemQuantityRange?: ItemQuantityRange;
|
|
80
|
-
/** Trigger type. */
|
|
81
|
-
triggerType?: TriggerType;
|
|
82
|
-
}
|
|
83
|
-
/** @oneof */
|
|
84
|
-
interface DiscountTriggerTriggerOneOf {
|
|
85
|
-
/** Chain multiple triggers with the `and` operator. */
|
|
86
|
-
and?: And;
|
|
87
|
-
/** Chain multiple triggers with the `or` operator. */
|
|
88
|
-
or?: Or;
|
|
89
|
-
/** Custom trigger. */
|
|
90
|
-
customTrigger?: Custom;
|
|
91
|
-
/** Subtotal trigger range. */
|
|
92
|
-
subtotalRange?: SubtotalRange;
|
|
93
|
-
/** Item quantity trigger range. */
|
|
94
|
-
itemQuantityRange?: ItemQuantityRange;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* This object represents a scope of catalog items. Examples:
|
|
98
|
-
* 1. All catalog items of a specific app - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id`
|
|
99
|
-
* 2. Specific catalog item - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id` + `catalog_item_ids`
|
|
100
|
-
* 3. External catalog filter - type = CUSTOM_FILTER, CustomFilter with 'app_id' + 'params'
|
|
101
|
-
*/
|
|
102
|
-
interface Scope extends ScopeScopeItemsOneOf {
|
|
103
|
-
/** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
104
|
-
catalogItemFilter?: CatalogItemFilter;
|
|
105
|
-
/** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
106
|
-
customFilter?: CustomFilter;
|
|
107
|
-
/**
|
|
108
|
-
* Scope ID.
|
|
109
|
-
* @minLength 1
|
|
110
|
-
* @maxLength 100
|
|
111
|
-
*/
|
|
112
|
-
id?: string;
|
|
113
|
-
/** Scope type. */
|
|
114
|
-
type?: ScopeType;
|
|
115
|
-
}
|
|
116
|
-
/** @oneof */
|
|
117
|
-
interface ScopeScopeItemsOneOf {
|
|
118
|
-
/** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
119
|
-
catalogItemFilter?: CatalogItemFilter;
|
|
120
|
-
/** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
121
|
-
customFilter?: CustomFilter;
|
|
122
|
-
}
|
|
123
|
-
declare enum ScopeType {
|
|
124
|
-
UNDEFINED_SCOPE = "UNDEFINED_SCOPE",
|
|
125
|
-
/** Specific catalog items */
|
|
126
|
-
CATALOG_ITEM = "CATALOG_ITEM",
|
|
127
|
-
/** Specific items by custom filters */
|
|
128
|
-
CUSTOM_FILTER = "CUSTOM_FILTER"
|
|
129
|
-
}
|
|
130
|
-
interface CatalogItemFilter {
|
|
131
|
-
/**
|
|
132
|
-
* Catalog App ID. For example, the Wix Stores, Wix Bookings, or 3rd-party `appId`.
|
|
133
|
-
* @format GUID
|
|
134
|
-
*/
|
|
135
|
-
catalogAppId?: string;
|
|
136
|
-
/**
|
|
137
|
-
* ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores.
|
|
138
|
-
* @minLength 1
|
|
139
|
-
* @maxLength 36
|
|
140
|
-
* @maxSize 50
|
|
141
|
-
*/
|
|
142
|
-
catalogItemIds?: string[];
|
|
143
|
-
}
|
|
144
|
-
interface CustomFilter {
|
|
145
|
-
/**
|
|
146
|
-
* Custom filter app ID, when relevant.
|
|
147
|
-
* @format GUID
|
|
148
|
-
*/
|
|
149
|
-
appId?: string;
|
|
150
|
-
/**
|
|
151
|
-
* Custom filter in `{ "key": "value" }` form.
|
|
152
|
-
* For example, an array of `collectionIDs`:
|
|
153
|
-
* `{ ["collectionId": "12345"], ["collectionId": "67890"] }`.
|
|
154
|
-
*/
|
|
155
|
-
params?: Record<string, any> | null;
|
|
156
|
-
}
|
|
157
|
-
interface And {
|
|
158
|
-
/**
|
|
159
|
-
* List of triggers to have an "AND" operator between their results.
|
|
160
|
-
* @minSize 2
|
|
161
|
-
* @maxSize 5
|
|
162
|
-
*/
|
|
163
|
-
triggers?: DiscountTrigger[];
|
|
164
|
-
}
|
|
165
|
-
interface Or {
|
|
166
|
-
/**
|
|
167
|
-
* List of triggers to have an "OR" operator between their results.
|
|
168
|
-
* @minSize 2
|
|
169
|
-
* @maxSize 5
|
|
170
|
-
*/
|
|
171
|
-
triggers?: DiscountTrigger[];
|
|
172
|
-
}
|
|
173
|
-
interface Custom {
|
|
174
|
-
/**
|
|
175
|
-
* Trigger ID.
|
|
176
|
-
* @minLength 1
|
|
177
|
-
* @maxLength 100
|
|
178
|
-
*/
|
|
179
|
-
id?: string;
|
|
180
|
-
/**
|
|
181
|
-
* ID of the app that created the trigger.
|
|
182
|
-
* @format GUID
|
|
183
|
-
*/
|
|
184
|
-
appId?: string;
|
|
185
|
-
}
|
|
186
|
-
interface SubtotalRange {
|
|
187
|
-
/**
|
|
188
|
-
* Relevant scopes for `SPECIFIC_ITEMS` target type.
|
|
189
|
-
* @maxSize 50
|
|
190
|
-
*/
|
|
191
|
-
scopes?: Scope[];
|
|
192
|
-
/**
|
|
193
|
-
* Minimum subtotal price (inclusive).
|
|
194
|
-
* @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
|
|
195
|
-
*/
|
|
196
|
-
from?: string | null;
|
|
197
|
-
/**
|
|
198
|
-
* Maximum subtotal price (inclusive).
|
|
199
|
-
* @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
|
|
200
|
-
*/
|
|
201
|
-
to?: string | null;
|
|
202
|
-
}
|
|
203
|
-
interface ItemQuantityRange {
|
|
204
|
-
/**
|
|
205
|
-
* Relevant scopes for `SPECIFIC_ITEMS` target type.
|
|
206
|
-
* @maxSize 50
|
|
207
|
-
*/
|
|
208
|
-
scopes?: Scope[];
|
|
209
|
-
/**
|
|
210
|
-
* Minimum item quantity (inclusive).
|
|
211
|
-
* @min 1
|
|
212
|
-
*/
|
|
213
|
-
from?: number | null;
|
|
214
|
-
/**
|
|
215
|
-
* Maximum item quantity (inclusive).
|
|
216
|
-
* @min 1
|
|
217
|
-
*/
|
|
218
|
-
to?: number | null;
|
|
219
|
-
}
|
|
220
|
-
declare enum TriggerType {
|
|
221
|
-
UNDEFINED = "UNDEFINED",
|
|
222
|
-
/** Operator used for chaining multiple triggers. Currently 1 `AND` chain operator is supported. */
|
|
223
|
-
AND = "AND",
|
|
224
|
-
/** Subtotal must be within the specified `subtotalRange` values. */
|
|
225
|
-
SUBTOTAL_RANGE = "SUBTOTAL_RANGE",
|
|
226
|
-
/** Quantity of items in scope must be within specified `itemQuantityRange` values. */
|
|
227
|
-
ITEM_QUANTITY_RANGE = "ITEM_QUANTITY_RANGE",
|
|
228
|
-
/** Custom trigger type defined in `customTrigger` object. */
|
|
229
|
-
CUSTOM = "CUSTOM",
|
|
230
|
-
/** Chain multiple triggers with OR operator */
|
|
231
|
-
OR = "OR"
|
|
232
|
-
}
|
|
233
|
-
interface ActiveTimeInfo {
|
|
234
|
-
/** 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. */
|
|
235
|
-
start?: Date | null;
|
|
236
|
-
/** 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. */
|
|
237
|
-
end?: Date | null;
|
|
238
|
-
}
|
|
239
|
-
interface Discounts {
|
|
240
|
-
/**
|
|
241
|
-
* Discounts.
|
|
242
|
-
* @minSize 1
|
|
243
|
-
* @maxSize 1
|
|
244
|
-
*/
|
|
245
|
-
values?: Discount[];
|
|
246
|
-
}
|
|
247
|
-
interface Discount extends DiscountDiscountOneOf {
|
|
248
|
-
/**
|
|
249
|
-
* Percentage to discount from original price.
|
|
250
|
-
* @min 0.1
|
|
251
|
-
* @max 100
|
|
252
|
-
*/
|
|
253
|
-
percentage?: number;
|
|
254
|
-
/**
|
|
255
|
-
* Amount to discount from original price.
|
|
256
|
-
* @decimalValue options { gt:0, lte:1000000000000000, maxScale:4 }
|
|
257
|
-
*/
|
|
258
|
-
fixedAmount?: string;
|
|
259
|
-
/**
|
|
260
|
-
* Fixed price. Line item will be fixed to this price.
|
|
261
|
-
* @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
|
|
262
|
-
*/
|
|
263
|
-
fixedPrice?: string;
|
|
264
|
-
/**
|
|
265
|
-
* Discount target.
|
|
266
|
-
*
|
|
267
|
-
* + `SPECIFIC_ITEMS`: Discount applies to a specific set of items.
|
|
268
|
-
*/
|
|
269
|
-
targetType?: Type;
|
|
270
|
-
/** Data related to `SPECIFIC_ITEMS` target type. */
|
|
271
|
-
specificItemsInfo?: SpecificItemsInfo;
|
|
272
|
-
/** Discount type. */
|
|
273
|
-
discountType?: DiscountType;
|
|
274
|
-
}
|
|
275
|
-
/** @oneof */
|
|
276
|
-
interface DiscountDiscountOneOf {
|
|
277
|
-
/**
|
|
278
|
-
* Percentage to discount from original price.
|
|
279
|
-
* @min 0.1
|
|
280
|
-
* @max 100
|
|
281
|
-
*/
|
|
282
|
-
percentage?: number;
|
|
283
|
-
/**
|
|
284
|
-
* Amount to discount from original price.
|
|
285
|
-
* @decimalValue options { gt:0, lte:1000000000000000, maxScale:4 }
|
|
286
|
-
*/
|
|
287
|
-
fixedAmount?: string;
|
|
288
|
-
/**
|
|
289
|
-
* Fixed price. Line item will be fixed to this price.
|
|
290
|
-
* @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
|
|
291
|
-
*/
|
|
292
|
-
fixedPrice?: string;
|
|
293
|
-
}
|
|
294
|
-
declare enum Type {
|
|
295
|
-
/** Target type is not defined */
|
|
296
|
-
UNDEFINED = "UNDEFINED",
|
|
297
|
-
/** Target type is a set of specific items */
|
|
298
|
-
SPECIFIC_ITEMS = "SPECIFIC_ITEMS"
|
|
299
|
-
}
|
|
300
|
-
interface SpecificItemsInfo {
|
|
301
|
-
/**
|
|
302
|
-
* All associated scopes for `SPECIFIC_ITEMS` target type.
|
|
303
|
-
* @minSize 1
|
|
304
|
-
* @maxSize 50
|
|
305
|
-
*/
|
|
306
|
-
scopes?: Scope[];
|
|
307
|
-
}
|
|
308
|
-
declare enum DiscountType {
|
|
309
|
-
UNDEFINED = "UNDEFINED",
|
|
310
|
-
/** Price is reduced by percentage value. */
|
|
311
|
-
PERCENTAGE = "PERCENTAGE",
|
|
312
|
-
/** Price is reduced by fixed amount. */
|
|
313
|
-
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
314
|
-
/** Price will be set to fixed amount. */
|
|
315
|
-
FIXED_PRICE = "FIXED_PRICE"
|
|
316
|
-
}
|
|
317
|
-
declare enum Status {
|
|
318
|
-
/** Rule status is not defined. */
|
|
319
|
-
UNDEFINED = "UNDEFINED",
|
|
320
|
-
/** Rule status is live. */
|
|
321
|
-
LIVE = "LIVE",
|
|
322
|
-
/** Rule status is expired, it might have been live in the past. */
|
|
323
|
-
EXPIRED = "EXPIRED",
|
|
324
|
-
/** Rule status is pending, it might be live in the future. */
|
|
325
|
-
PENDING = "PENDING"
|
|
326
|
-
}
|
|
327
|
-
interface CreateDiscountRuleRequest {
|
|
328
|
-
/** Discount rule info. */
|
|
329
|
-
discountRule: DiscountRule;
|
|
330
|
-
}
|
|
331
|
-
interface CreateDiscountRuleResponse {
|
|
332
|
-
/** Discount rule. */
|
|
333
|
-
discountRule?: DiscountRule;
|
|
334
|
-
}
|
|
335
|
-
interface GetDiscountRuleRequest {
|
|
336
|
-
/**
|
|
337
|
-
* ID of the discount rule to retrieve.
|
|
338
|
-
* @format GUID
|
|
339
|
-
*/
|
|
340
|
-
discountRuleId: string;
|
|
341
|
-
}
|
|
342
|
-
interface GetDiscountRuleResponse {
|
|
343
|
-
/** The requested discount rule. */
|
|
344
|
-
discountRule?: DiscountRule;
|
|
345
|
-
}
|
|
346
|
-
interface UpdateDiscountRuleRequest {
|
|
347
|
-
/** Discount rule info. */
|
|
348
|
-
discountRule: DiscountRule;
|
|
349
|
-
}
|
|
350
|
-
interface UpdateDiscountRuleResponse {
|
|
351
|
-
/** Updated discount rule. */
|
|
352
|
-
discountRule?: DiscountRule;
|
|
353
|
-
}
|
|
354
|
-
interface DeleteDiscountRuleRequest {
|
|
355
|
-
/**
|
|
356
|
-
* ID of the discount rule to delete.
|
|
357
|
-
* @format GUID
|
|
358
|
-
*/
|
|
359
|
-
discountRuleId: string;
|
|
360
|
-
}
|
|
361
|
-
interface DeleteDiscountRuleResponse {
|
|
362
|
-
}
|
|
363
|
-
interface QueryDiscountRulesRequest {
|
|
364
|
-
/** Query options. */
|
|
365
|
-
query?: PlatformQuery;
|
|
366
|
-
}
|
|
367
|
-
interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
368
|
-
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
369
|
-
paging?: PlatformPaging;
|
|
370
|
-
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
371
|
-
cursorPaging?: CursorPaging;
|
|
372
|
-
/** Filter object. */
|
|
373
|
-
filter?: Record<string, any> | null;
|
|
374
|
-
/** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
|
|
375
|
-
sort?: Sorting[];
|
|
376
|
-
}
|
|
377
|
-
/** @oneof */
|
|
378
|
-
interface PlatformQueryPagingMethodOneOf {
|
|
379
|
-
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
380
|
-
paging?: PlatformPaging;
|
|
381
|
-
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
382
|
-
cursorPaging?: CursorPaging;
|
|
383
|
-
}
|
|
384
|
-
interface Sorting {
|
|
385
|
-
/**
|
|
386
|
-
* Name of the field to sort by.
|
|
387
|
-
* @maxLength 512
|
|
388
|
-
*/
|
|
389
|
-
fieldName?: string;
|
|
390
|
-
/** Sort order. */
|
|
391
|
-
order?: SortOrder;
|
|
392
|
-
}
|
|
393
|
-
declare enum SortOrder {
|
|
394
|
-
ASC = "ASC",
|
|
395
|
-
DESC = "DESC"
|
|
396
|
-
}
|
|
397
|
-
interface PlatformPaging {
|
|
398
|
-
/**
|
|
399
|
-
* Number of items to load.
|
|
400
|
-
* @max 100
|
|
401
|
-
*/
|
|
402
|
-
limit?: number | null;
|
|
403
|
-
/** Number of items to skip in the current sort order. */
|
|
404
|
-
offset?: number | null;
|
|
405
|
-
}
|
|
406
|
-
interface CursorPaging {
|
|
407
|
-
/**
|
|
408
|
-
* Maximum number of items to return in the results.
|
|
409
|
-
* @max 100
|
|
410
|
-
*/
|
|
411
|
-
limit?: number | null;
|
|
412
|
-
/**
|
|
413
|
-
* Pointer to the next or previous page in the list of results.
|
|
414
|
-
*
|
|
415
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
416
|
-
* Not relevant for the first request.
|
|
417
|
-
* @maxLength 16000
|
|
418
|
-
*/
|
|
419
|
-
cursor?: string | null;
|
|
420
|
-
}
|
|
421
|
-
interface QueryDiscountRulesResponse {
|
|
422
|
-
/** List of discount rules. */
|
|
423
|
-
discountRules?: DiscountRule[];
|
|
424
|
-
/** Details on the paged set of results returned. */
|
|
425
|
-
pagingMetadata?: PlatformPagingMetadata;
|
|
426
|
-
}
|
|
427
|
-
interface PlatformPagingMetadata {
|
|
428
|
-
/** The number of items returned in this response. */
|
|
429
|
-
count?: number | null;
|
|
430
|
-
/** The offset which was requested. Returned if offset paging was used. */
|
|
431
|
-
offset?: number | null;
|
|
432
|
-
/** The total number of items that match the query. Returned if offset paging was used. */
|
|
433
|
-
total?: number | null;
|
|
434
|
-
/** Cursors to navigate through result pages. Returned if cursor paging was used. */
|
|
435
|
-
cursors?: Cursors;
|
|
436
|
-
}
|
|
437
|
-
interface Cursors {
|
|
438
|
-
/**
|
|
439
|
-
* Cursor string pointing to the next page in the list of results.
|
|
440
|
-
* @maxLength 16000
|
|
441
|
-
*/
|
|
442
|
-
next?: string | null;
|
|
443
|
-
/**
|
|
444
|
-
* Cursor pointing to the previous page in the list of results.
|
|
445
|
-
* @maxLength 16000
|
|
446
|
-
*/
|
|
447
|
-
prev?: string | null;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
451
|
-
getUrl: (context: any) => string;
|
|
452
|
-
httpMethod: K;
|
|
453
|
-
path: string;
|
|
454
|
-
pathParams: M;
|
|
455
|
-
__requestType: T;
|
|
456
|
-
__originalRequestType: S;
|
|
457
|
-
__responseType: Q;
|
|
458
|
-
__originalResponseType: R;
|
|
459
|
-
};
|
|
460
|
-
declare function createDiscountRule(): __PublicMethodMetaInfo<'POST', {}, CreateDiscountRuleRequest$1, CreateDiscountRuleRequest, CreateDiscountRuleResponse$1, CreateDiscountRuleResponse>;
|
|
461
|
-
declare function getDiscountRule(): __PublicMethodMetaInfo<'GET', {
|
|
462
|
-
discountRuleId: string;
|
|
463
|
-
}, GetDiscountRuleRequest$1, GetDiscountRuleRequest, GetDiscountRuleResponse$1, GetDiscountRuleResponse>;
|
|
464
|
-
declare function updateDiscountRule(): __PublicMethodMetaInfo<'PATCH', {
|
|
465
|
-
discountRuleId: string;
|
|
466
|
-
}, UpdateDiscountRuleRequest$1, UpdateDiscountRuleRequest, UpdateDiscountRuleResponse$1, UpdateDiscountRuleResponse>;
|
|
467
|
-
declare function deleteDiscountRule(): __PublicMethodMetaInfo<'DELETE', {
|
|
468
|
-
discountRuleId: string;
|
|
469
|
-
}, DeleteDiscountRuleRequest$1, DeleteDiscountRuleRequest, DeleteDiscountRuleResponse$1, DeleteDiscountRuleResponse>;
|
|
470
|
-
declare function queryDiscountRules(): __PublicMethodMetaInfo<'POST', {}, QueryDiscountRulesRequest$1, QueryDiscountRulesRequest, QueryDiscountRulesResponse$1, QueryDiscountRulesResponse>;
|
|
471
|
-
|
|
472
|
-
export { type __PublicMethodMetaInfo, createDiscountRule, deleteDiscountRule, getDiscountRule, queryDiscountRules, updateDiscountRule };
|