@wix/auto_sdk_ecom_discount-rules 1.0.15 → 1.0.16
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/{internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → ecom-discounts-v1-discount-rule-discount-rules.universal-CAqXQEc1.d.mts} +86 -282
- package/build/{cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → ecom-discounts-v1-discount-rule-discount-rules.universal-CAqXQEc1.d.ts} +86 -282
- package/build/index.d.mts +98 -0
- package/build/index.d.ts +98 -0
- package/build/index.js +609 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +570 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → ecom-discounts-v1-discount-rule-discount-rules.universal-CAqXQEc1.d.mts} +86 -282
- package/build/{es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.d.ts → internal/ecom-discounts-v1-discount-rule-discount-rules.universal-CAqXQEc1.d.ts} +86 -282
- package/build/internal/index.d.mts +98 -0
- package/build/internal/index.d.ts +98 -0
- package/build/internal/index.js +609 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +570 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +484 -0
- package/build/internal/meta.d.ts +484 -0
- package/build/internal/meta.js +352 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +321 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +484 -0
- package/build/meta.d.ts +484 -0
- package/build/meta.js +352 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +321 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +0 -25
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +0 -36
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +0 -1
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +0 -48
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +0 -271
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +0 -1
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +0 -23
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +0 -123
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +0 -1
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +0 -80
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +0 -98
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +0 -1
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +0 -831
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +0 -76
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +0 -1
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +0 -371
- package/build/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +0 -25
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +0 -25
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +0 -1
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +0 -48
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +0 -263
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +0 -1
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +0 -23
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +0 -92
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +0 -1
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +0 -80
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +0 -82
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +0 -1
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +0 -831
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +0 -73
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +0 -1
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +0 -340
- package/build/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +0 -25
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +0 -36
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +0 -1
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +0 -48
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +0 -271
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +0 -1
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +0 -23
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +0 -123
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +0 -80
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +0 -98
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +0 -1
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +0 -831
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +0 -76
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +0 -1
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +0 -371
- package/build/internal/cjs/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.d.ts +0 -25
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js +0 -25
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.context.js.map +0 -1
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.d.ts +0 -48
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js +0 -263
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.http.js.map +0 -1
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.d.ts +0 -23
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js +0 -92
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.meta.js.map +0 -1
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.d.ts +0 -80
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js +0 -82
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.public.js.map +0 -1
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.d.ts +0 -831
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js +0 -73
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.types.js.map +0 -1
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js +0 -340
- package/build/internal/es/src/ecom-discounts-v1-discount-rule-discount-rules.universal.js.map +0 -1
|
@@ -1,831 +0,0 @@
|
|
|
1
|
-
export interface DiscountRule {
|
|
2
|
-
/**
|
|
3
|
-
* Discount rule ID.
|
|
4
|
-
* @format GUID
|
|
5
|
-
* @readonly
|
|
6
|
-
*/
|
|
7
|
-
id?: string | null;
|
|
8
|
-
/**
|
|
9
|
-
* Revision number, which increments by 1 each time the discount rule is updated.
|
|
10
|
-
* To prevent conflicting changes, the current `revision` must be passed when updating the discount rule.
|
|
11
|
-
* @readonly
|
|
12
|
-
*/
|
|
13
|
-
revision?: string | null;
|
|
14
|
-
/**
|
|
15
|
-
* Date and time the discount rule was created.
|
|
16
|
-
* @readonly
|
|
17
|
-
*/
|
|
18
|
-
createdDate?: Date | null;
|
|
19
|
-
/**
|
|
20
|
-
* Date and time the discount rule was last updated.
|
|
21
|
-
* @readonly
|
|
22
|
-
*/
|
|
23
|
-
updatedDate?: Date | null;
|
|
24
|
-
/**
|
|
25
|
-
* Whether the discount rule is active.
|
|
26
|
-
*
|
|
27
|
-
* Default: `true`
|
|
28
|
-
*/
|
|
29
|
-
active?: boolean | null;
|
|
30
|
-
/**
|
|
31
|
-
* Discount rule name.
|
|
32
|
-
* @minLength 1
|
|
33
|
-
* @maxLength 50
|
|
34
|
-
*/
|
|
35
|
-
name?: string | null;
|
|
36
|
-
/**
|
|
37
|
-
* Discount rule trigger.
|
|
38
|
-
* A set of conditions that must be met for the `discounts` to be applied.
|
|
39
|
-
* Not passing a trigger will cause the discount to always apply.
|
|
40
|
-
*/
|
|
41
|
-
trigger?: DiscountTrigger;
|
|
42
|
-
/** Time frame in which the discount rule is active. */
|
|
43
|
-
activeTimeInfo?: ActiveTimeInfo;
|
|
44
|
-
/**
|
|
45
|
-
* List of discounts that are applied when one or more triggers are met.
|
|
46
|
-
*
|
|
47
|
-
* > **Notes:**
|
|
48
|
-
* >
|
|
49
|
-
* > + Currently, only 1 discount can be defined per discount rule.
|
|
50
|
-
* > + A discount rule can be applied on multiple items per cart.
|
|
51
|
-
* > + A discount rule can only be applied once per item.
|
|
52
|
-
*/
|
|
53
|
-
discounts?: Discounts;
|
|
54
|
-
/**
|
|
55
|
-
* Discount rule status.
|
|
56
|
-
* Default: `UNDEFINED`
|
|
57
|
-
* @readonly
|
|
58
|
-
*/
|
|
59
|
-
status?: StatusWithLiterals;
|
|
60
|
-
/**
|
|
61
|
-
* Number of times the discount rule was used.
|
|
62
|
-
* @readonly
|
|
63
|
-
*/
|
|
64
|
-
usageCount?: number;
|
|
65
|
-
}
|
|
66
|
-
/** DiscountTrigger - description of a set of conditions, that if met, will trigger the associated rule actions */
|
|
67
|
-
export interface DiscountTrigger extends DiscountTriggerTriggerOneOf {
|
|
68
|
-
/** Chain multiple triggers with the `and` operator. */
|
|
69
|
-
and?: And;
|
|
70
|
-
/** Chain multiple triggers with the `or` operator. */
|
|
71
|
-
or?: Or;
|
|
72
|
-
/** Custom trigger. */
|
|
73
|
-
customTrigger?: Custom;
|
|
74
|
-
/** Subtotal trigger range. */
|
|
75
|
-
subtotalRange?: SubtotalRange;
|
|
76
|
-
/** Item quantity trigger range. */
|
|
77
|
-
itemQuantityRange?: ItemQuantityRange;
|
|
78
|
-
/** Trigger type. */
|
|
79
|
-
triggerType?: TriggerTypeWithLiterals;
|
|
80
|
-
}
|
|
81
|
-
/** @oneof */
|
|
82
|
-
export interface DiscountTriggerTriggerOneOf {
|
|
83
|
-
/** Chain multiple triggers with the `and` operator. */
|
|
84
|
-
and?: And;
|
|
85
|
-
/** Chain multiple triggers with the `or` operator. */
|
|
86
|
-
or?: Or;
|
|
87
|
-
/** Custom trigger. */
|
|
88
|
-
customTrigger?: Custom;
|
|
89
|
-
/** Subtotal trigger range. */
|
|
90
|
-
subtotalRange?: SubtotalRange;
|
|
91
|
-
/** Item quantity trigger range. */
|
|
92
|
-
itemQuantityRange?: ItemQuantityRange;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* This object represents a scope of catalog items. Examples:
|
|
96
|
-
* 1. All catalog items of a specific app - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id`
|
|
97
|
-
* 2. Specific catalog item - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id` + `catalog_item_ids`
|
|
98
|
-
* 3. External catalog filter - type = CUSTOM_FILTER, CustomFilter with 'app_id' + 'params'
|
|
99
|
-
*/
|
|
100
|
-
export interface Scope extends ScopeScopeItemsOneOf {
|
|
101
|
-
/** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
102
|
-
catalogItemFilter?: CatalogItemFilter;
|
|
103
|
-
/** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
104
|
-
customFilter?: CustomFilter;
|
|
105
|
-
/**
|
|
106
|
-
* Scope ID.
|
|
107
|
-
* @minLength 1
|
|
108
|
-
* @maxLength 100
|
|
109
|
-
*/
|
|
110
|
-
id?: string;
|
|
111
|
-
/** Scope type. */
|
|
112
|
-
type?: ScopeTypeWithLiterals;
|
|
113
|
-
}
|
|
114
|
-
/** @oneof */
|
|
115
|
-
export interface ScopeScopeItemsOneOf {
|
|
116
|
-
/** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
117
|
-
catalogItemFilter?: CatalogItemFilter;
|
|
118
|
-
/** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */
|
|
119
|
-
customFilter?: CustomFilter;
|
|
120
|
-
}
|
|
121
|
-
export declare enum ScopeType {
|
|
122
|
-
UNDEFINED_SCOPE = "UNDEFINED_SCOPE",
|
|
123
|
-
/** Specific catalog items */
|
|
124
|
-
CATALOG_ITEM = "CATALOG_ITEM",
|
|
125
|
-
/** Specific items by custom filters */
|
|
126
|
-
CUSTOM_FILTER = "CUSTOM_FILTER"
|
|
127
|
-
}
|
|
128
|
-
/** @enumType */
|
|
129
|
-
export type ScopeTypeWithLiterals = ScopeType | 'UNDEFINED_SCOPE' | 'CATALOG_ITEM' | 'CUSTOM_FILTER';
|
|
130
|
-
export 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
|
-
export 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
|
-
export 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
|
-
export 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
|
-
export 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
|
-
export 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
|
-
export 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
|
-
export 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
|
-
/** @enumType */
|
|
234
|
-
export type TriggerTypeWithLiterals = TriggerType | 'UNDEFINED' | 'AND' | 'SUBTOTAL_RANGE' | 'ITEM_QUANTITY_RANGE' | 'CUSTOM' | 'OR';
|
|
235
|
-
export interface ActiveTimeInfo {
|
|
236
|
-
/** 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. */
|
|
237
|
-
start?: Date | null;
|
|
238
|
-
/** 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. */
|
|
239
|
-
end?: Date | null;
|
|
240
|
-
}
|
|
241
|
-
export interface Discounts {
|
|
242
|
-
/**
|
|
243
|
-
* Discounts.
|
|
244
|
-
* @minSize 1
|
|
245
|
-
* @maxSize 1
|
|
246
|
-
*/
|
|
247
|
-
values?: Discount[];
|
|
248
|
-
}
|
|
249
|
-
export interface Discount extends DiscountDiscountOneOf {
|
|
250
|
-
/**
|
|
251
|
-
* Percentage to discount from original price.
|
|
252
|
-
* @min 0.1
|
|
253
|
-
* @max 100
|
|
254
|
-
*/
|
|
255
|
-
percentage?: number;
|
|
256
|
-
/**
|
|
257
|
-
* Amount to discount from original price.
|
|
258
|
-
* @decimalValue options { gt:0, lte:1000000000000000, maxScale:4 }
|
|
259
|
-
*/
|
|
260
|
-
fixedAmount?: string;
|
|
261
|
-
/**
|
|
262
|
-
* Fixed price. Line item will be fixed to this price.
|
|
263
|
-
* @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
|
|
264
|
-
*/
|
|
265
|
-
fixedPrice?: string;
|
|
266
|
-
/**
|
|
267
|
-
* Discount target.
|
|
268
|
-
*
|
|
269
|
-
* + `SPECIFIC_ITEMS`: Discount applies to a specific set of items.
|
|
270
|
-
*/
|
|
271
|
-
targetType?: TypeWithLiterals;
|
|
272
|
-
/** Data related to `SPECIFIC_ITEMS` target type. */
|
|
273
|
-
specificItemsInfo?: SpecificItemsInfo;
|
|
274
|
-
/** Discount type. */
|
|
275
|
-
discountType?: DiscountTypeWithLiterals;
|
|
276
|
-
}
|
|
277
|
-
/** @oneof */
|
|
278
|
-
export interface DiscountDiscountOneOf {
|
|
279
|
-
/**
|
|
280
|
-
* Percentage to discount from original price.
|
|
281
|
-
* @min 0.1
|
|
282
|
-
* @max 100
|
|
283
|
-
*/
|
|
284
|
-
percentage?: number;
|
|
285
|
-
/**
|
|
286
|
-
* Amount to discount from original price.
|
|
287
|
-
* @decimalValue options { gt:0, lte:1000000000000000, maxScale:4 }
|
|
288
|
-
*/
|
|
289
|
-
fixedAmount?: string;
|
|
290
|
-
/**
|
|
291
|
-
* Fixed price. Line item will be fixed to this price.
|
|
292
|
-
* @decimalValue options { gte:0, lte:1000000000000000, maxScale:4 }
|
|
293
|
-
*/
|
|
294
|
-
fixedPrice?: string;
|
|
295
|
-
}
|
|
296
|
-
export declare enum Type {
|
|
297
|
-
/** Target type is not defined */
|
|
298
|
-
UNDEFINED = "UNDEFINED",
|
|
299
|
-
/** Target type is a set of specific items */
|
|
300
|
-
SPECIFIC_ITEMS = "SPECIFIC_ITEMS"
|
|
301
|
-
}
|
|
302
|
-
/** @enumType */
|
|
303
|
-
export type TypeWithLiterals = Type | 'UNDEFINED' | 'SPECIFIC_ITEMS';
|
|
304
|
-
export interface SpecificItemsInfo {
|
|
305
|
-
/**
|
|
306
|
-
* All associated scopes for `SPECIFIC_ITEMS` target type.
|
|
307
|
-
* @minSize 1
|
|
308
|
-
* @maxSize 50
|
|
309
|
-
*/
|
|
310
|
-
scopes?: Scope[];
|
|
311
|
-
}
|
|
312
|
-
export declare enum DiscountType {
|
|
313
|
-
UNDEFINED = "UNDEFINED",
|
|
314
|
-
/** Price is reduced by percentage value. */
|
|
315
|
-
PERCENTAGE = "PERCENTAGE",
|
|
316
|
-
/** Price is reduced by fixed amount. */
|
|
317
|
-
FIXED_AMOUNT = "FIXED_AMOUNT",
|
|
318
|
-
/** Price will be set to fixed amount. */
|
|
319
|
-
FIXED_PRICE = "FIXED_PRICE"
|
|
320
|
-
}
|
|
321
|
-
/** @enumType */
|
|
322
|
-
export type DiscountTypeWithLiterals = DiscountType | 'UNDEFINED' | 'PERCENTAGE' | 'FIXED_AMOUNT' | 'FIXED_PRICE';
|
|
323
|
-
export interface BuyXGetYInfo {
|
|
324
|
-
/** Information about which items must be in the cart (buy X) for the discount to apply (get Y). */
|
|
325
|
-
customerBuys?: CustomerBuy;
|
|
326
|
-
/** Information about which items will be discounted (get Y). */
|
|
327
|
-
customerGets?: CustomerGet;
|
|
328
|
-
/**
|
|
329
|
-
* The maximum number of times the 'buy X get Y' discount can be applied.
|
|
330
|
-
* For example, when the value of `limit` is `2`, with a "2+1" sale on all items, the following logic applies:
|
|
331
|
-
* + Buy 2 get 1, buy 3 get 1.
|
|
332
|
-
* + Buy 4 get 2, buy 6 get 2, buy 9 get 2, and so on.
|
|
333
|
-
* @min 1
|
|
334
|
-
*/
|
|
335
|
-
limit?: number | null;
|
|
336
|
-
}
|
|
337
|
-
export interface CustomerBuy extends CustomerBuyConditionOneOf {
|
|
338
|
-
/**
|
|
339
|
-
* Minimum number of items the customer must add to the cart to be eligible for a discount.
|
|
340
|
-
* @min 1
|
|
341
|
-
*/
|
|
342
|
-
minimumQuantity?: number;
|
|
343
|
-
/**
|
|
344
|
-
* Minimum price the customer must add to the cart to be eligible for a discount.
|
|
345
|
-
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
346
|
-
*/
|
|
347
|
-
minimumSpend?: string | null;
|
|
348
|
-
/**
|
|
349
|
-
* Scopes of the items that must be added to the cart to enable the discount.
|
|
350
|
-
* @minSize 1
|
|
351
|
-
* @maxSize 50
|
|
352
|
-
*/
|
|
353
|
-
scopes?: Scope[];
|
|
354
|
-
}
|
|
355
|
-
/** @oneof */
|
|
356
|
-
export interface CustomerBuyConditionOneOf {
|
|
357
|
-
/**
|
|
358
|
-
* Minimum number of items the customer must add to the cart to be eligible for a discount.
|
|
359
|
-
* @min 1
|
|
360
|
-
*/
|
|
361
|
-
minimumQuantity?: number;
|
|
362
|
-
/**
|
|
363
|
-
* Minimum price the customer must add to the cart to be eligible for a discount.
|
|
364
|
-
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
365
|
-
*/
|
|
366
|
-
minimumSpend?: string | null;
|
|
367
|
-
}
|
|
368
|
-
export interface CustomerGet {
|
|
369
|
-
/**
|
|
370
|
-
* Exact number of items in the cart that will be discounted.
|
|
371
|
-
* If the cart contains fewer items than the value of quantity, the discount will not apply.
|
|
372
|
-
* @min 1
|
|
373
|
-
*/
|
|
374
|
-
quantity?: number;
|
|
375
|
-
/**
|
|
376
|
-
* Scopes of the items that will be discounted.
|
|
377
|
-
* @minSize 1
|
|
378
|
-
* @maxSize 50
|
|
379
|
-
*/
|
|
380
|
-
scopes?: Scope[];
|
|
381
|
-
}
|
|
382
|
-
export declare enum Status {
|
|
383
|
-
/** Rule status is not defined. */
|
|
384
|
-
UNDEFINED = "UNDEFINED",
|
|
385
|
-
/** Rule status is live. */
|
|
386
|
-
LIVE = "LIVE",
|
|
387
|
-
/** Rule status is expired, it might have been live in the past. */
|
|
388
|
-
EXPIRED = "EXPIRED",
|
|
389
|
-
/** Rule status is pending, it might be live in the future. */
|
|
390
|
-
PENDING = "PENDING"
|
|
391
|
-
}
|
|
392
|
-
/** @enumType */
|
|
393
|
-
export type StatusWithLiterals = Status | 'UNDEFINED' | 'LIVE' | 'EXPIRED' | 'PENDING';
|
|
394
|
-
/** The discount settings */
|
|
395
|
-
export interface DiscountSettings {
|
|
396
|
-
/** Discount applies to either `ALL_ITEMS`, or to the `LOWEST_PRICED_ITEM`. */
|
|
397
|
-
appliesTo?: AppliedSubjectTypeWithLiterals;
|
|
398
|
-
/**
|
|
399
|
-
* Whether the discount will apply to subscriptions.
|
|
400
|
-
*
|
|
401
|
-
* Default: `false`
|
|
402
|
-
*/
|
|
403
|
-
includeSubscription?: boolean | null;
|
|
404
|
-
/**
|
|
405
|
-
* Maximum total number of uses allowed for the discount rule.
|
|
406
|
-
* @min 1
|
|
407
|
-
* @max 2147483646
|
|
408
|
-
*/
|
|
409
|
-
usageLimit?: number | null;
|
|
410
|
-
/**
|
|
411
|
-
* The usage limit per user per discount.
|
|
412
|
-
* When not provided, this setting will not apply.
|
|
413
|
-
* @min 1
|
|
414
|
-
* @max 2147483646
|
|
415
|
-
*/
|
|
416
|
-
usageLimitPerUser?: number | null;
|
|
417
|
-
}
|
|
418
|
-
/** TODO: check if can be removed */
|
|
419
|
-
export declare enum AppliedSubjectType {
|
|
420
|
-
UNDEFINED = "UNDEFINED",
|
|
421
|
-
/** Discount applies to all items at checkout. */
|
|
422
|
-
ALL_ITEMS = "ALL_ITEMS",
|
|
423
|
-
/** Discount applies to the lowest priced item at checkout. */
|
|
424
|
-
LOWEST_PRICED_ITEM = "LOWEST_PRICED_ITEM"
|
|
425
|
-
}
|
|
426
|
-
/** @enumType */
|
|
427
|
-
export type AppliedSubjectTypeWithLiterals = AppliedSubjectType | 'UNDEFINED' | 'ALL_ITEMS' | 'LOWEST_PRICED_ITEM';
|
|
428
|
-
export interface ExtendedFields {
|
|
429
|
-
/**
|
|
430
|
-
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
431
|
-
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
432
|
-
*
|
|
433
|
-
* You can only access fields for which you have the appropriate permissions.
|
|
434
|
-
*
|
|
435
|
-
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
436
|
-
*/
|
|
437
|
-
namespaces?: Record<string, Record<string, any>>;
|
|
438
|
-
}
|
|
439
|
-
export interface CreateDiscountRuleRequest {
|
|
440
|
-
/** Discount rule info. */
|
|
441
|
-
discountRule: DiscountRule;
|
|
442
|
-
}
|
|
443
|
-
export interface CreateDiscountRuleResponse {
|
|
444
|
-
/** Discount rule. */
|
|
445
|
-
discountRule?: DiscountRule;
|
|
446
|
-
}
|
|
447
|
-
export interface GetDiscountRuleRequest {
|
|
448
|
-
/**
|
|
449
|
-
* ID of the discount rule to retrieve.
|
|
450
|
-
* @format GUID
|
|
451
|
-
*/
|
|
452
|
-
discountRuleId: string;
|
|
453
|
-
}
|
|
454
|
-
export interface GetDiscountRuleResponse {
|
|
455
|
-
/** The requested discount rule. */
|
|
456
|
-
discountRule?: DiscountRule;
|
|
457
|
-
}
|
|
458
|
-
export interface UpdateDiscountRuleRequest {
|
|
459
|
-
/** Discount rule info. */
|
|
460
|
-
discountRule: DiscountRule;
|
|
461
|
-
}
|
|
462
|
-
export interface UpdateDiscountRuleResponse {
|
|
463
|
-
/** Updated discount rule. */
|
|
464
|
-
discountRule?: DiscountRule;
|
|
465
|
-
}
|
|
466
|
-
export interface DeleteDiscountRuleRequest {
|
|
467
|
-
/**
|
|
468
|
-
* ID of the discount rule to delete.
|
|
469
|
-
* @format GUID
|
|
470
|
-
*/
|
|
471
|
-
discountRuleId: string;
|
|
472
|
-
}
|
|
473
|
-
export interface DeleteDiscountRuleResponse {
|
|
474
|
-
}
|
|
475
|
-
export interface QueryDiscountRulesRequest {
|
|
476
|
-
/** Query options. */
|
|
477
|
-
query?: PlatformQuery;
|
|
478
|
-
}
|
|
479
|
-
export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
480
|
-
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
481
|
-
paging?: PlatformPaging;
|
|
482
|
-
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
483
|
-
cursorPaging?: CursorPaging;
|
|
484
|
-
/** Filter object. */
|
|
485
|
-
filter?: Record<string, any> | null;
|
|
486
|
-
/** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
|
|
487
|
-
sort?: Sorting[];
|
|
488
|
-
}
|
|
489
|
-
/** @oneof */
|
|
490
|
-
export interface PlatformQueryPagingMethodOneOf {
|
|
491
|
-
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
492
|
-
paging?: PlatformPaging;
|
|
493
|
-
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
494
|
-
cursorPaging?: CursorPaging;
|
|
495
|
-
}
|
|
496
|
-
export interface Sorting {
|
|
497
|
-
/**
|
|
498
|
-
* Name of the field to sort by.
|
|
499
|
-
* @maxLength 512
|
|
500
|
-
*/
|
|
501
|
-
fieldName?: string;
|
|
502
|
-
/** Sort order. */
|
|
503
|
-
order?: SortOrderWithLiterals;
|
|
504
|
-
}
|
|
505
|
-
export declare enum SortOrder {
|
|
506
|
-
ASC = "ASC",
|
|
507
|
-
DESC = "DESC"
|
|
508
|
-
}
|
|
509
|
-
/** @enumType */
|
|
510
|
-
export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
511
|
-
export interface PlatformPaging {
|
|
512
|
-
/**
|
|
513
|
-
* Number of items to load.
|
|
514
|
-
* @max 100
|
|
515
|
-
*/
|
|
516
|
-
limit?: number | null;
|
|
517
|
-
/** Number of items to skip in the current sort order. */
|
|
518
|
-
offset?: number | null;
|
|
519
|
-
}
|
|
520
|
-
export interface CursorPaging {
|
|
521
|
-
/**
|
|
522
|
-
* Maximum number of items to return in the results.
|
|
523
|
-
* @max 100
|
|
524
|
-
*/
|
|
525
|
-
limit?: number | null;
|
|
526
|
-
/**
|
|
527
|
-
* Pointer to the next or previous page in the list of results.
|
|
528
|
-
*
|
|
529
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
530
|
-
* Not relevant for the first request.
|
|
531
|
-
* @maxLength 16000
|
|
532
|
-
*/
|
|
533
|
-
cursor?: string | null;
|
|
534
|
-
}
|
|
535
|
-
export interface QueryDiscountRulesResponse {
|
|
536
|
-
/** List of discount rules. */
|
|
537
|
-
discountRules?: DiscountRule[];
|
|
538
|
-
/** Details on the paged set of results returned. */
|
|
539
|
-
pagingMetadata?: PlatformPagingMetadata;
|
|
540
|
-
}
|
|
541
|
-
export interface PlatformPagingMetadata {
|
|
542
|
-
/** The number of items returned in this response. */
|
|
543
|
-
count?: number | null;
|
|
544
|
-
/** The offset which was requested. Returned if offset paging was used. */
|
|
545
|
-
offset?: number | null;
|
|
546
|
-
/** The total number of items that match the query. Returned if offset paging was used. */
|
|
547
|
-
total?: number | null;
|
|
548
|
-
/** Cursors to navigate through result pages. Returned if cursor paging was used. */
|
|
549
|
-
cursors?: Cursors;
|
|
550
|
-
}
|
|
551
|
-
export interface Cursors {
|
|
552
|
-
/**
|
|
553
|
-
* Cursor string pointing to the next page in the list of results.
|
|
554
|
-
* @maxLength 16000
|
|
555
|
-
*/
|
|
556
|
-
next?: string | null;
|
|
557
|
-
/**
|
|
558
|
-
* Cursor pointing to the previous page in the list of results.
|
|
559
|
-
* @maxLength 16000
|
|
560
|
-
*/
|
|
561
|
-
prev?: string | null;
|
|
562
|
-
}
|
|
563
|
-
export interface GetAppliedDiscountsRequest {
|
|
564
|
-
/**
|
|
565
|
-
* Line items for which to check for discount rules.
|
|
566
|
-
* @maxSize 1000
|
|
567
|
-
*/
|
|
568
|
-
lineItems?: LineItem[];
|
|
569
|
-
/**
|
|
570
|
-
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
571
|
-
* @format GUID
|
|
572
|
-
*/
|
|
573
|
-
purchaseFlowId?: string | null;
|
|
574
|
-
}
|
|
575
|
-
export interface LineItem {
|
|
576
|
-
/**
|
|
577
|
-
* Line item ID.
|
|
578
|
-
* @minLength 1
|
|
579
|
-
* @maxLength 100
|
|
580
|
-
*/
|
|
581
|
-
id?: string;
|
|
582
|
-
/**
|
|
583
|
-
* Line item quantity.
|
|
584
|
-
* @max 100000
|
|
585
|
-
*/
|
|
586
|
-
quantity?: number | null;
|
|
587
|
-
/** 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). */
|
|
588
|
-
catalogReference?: CatalogReference;
|
|
589
|
-
/**
|
|
590
|
-
* Line item price.
|
|
591
|
-
* @decimalValue options { gte:0 }
|
|
592
|
-
*/
|
|
593
|
-
price?: string;
|
|
594
|
-
}
|
|
595
|
-
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
596
|
-
export interface CatalogReference {
|
|
597
|
-
/**
|
|
598
|
-
* ID of the item within the catalog it belongs to.
|
|
599
|
-
* @minLength 1
|
|
600
|
-
* @maxLength 36
|
|
601
|
-
*/
|
|
602
|
-
catalogItemId?: string;
|
|
603
|
-
/**
|
|
604
|
-
* ID of the app providing the catalog.
|
|
605
|
-
*
|
|
606
|
-
* You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
|
|
607
|
-
*
|
|
608
|
-
* For items from Wix catalogs, the following values always apply:
|
|
609
|
-
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
610
|
-
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
611
|
-
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
612
|
-
* @minLength 1
|
|
613
|
-
*/
|
|
614
|
-
appId?: string;
|
|
615
|
-
/**
|
|
616
|
-
* 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.
|
|
617
|
-
*
|
|
618
|
-
* For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
|
|
619
|
-
*/
|
|
620
|
-
options?: Record<string, any> | null;
|
|
621
|
-
}
|
|
622
|
-
export interface GetAppliedDiscountsResponse {
|
|
623
|
-
/** All eligible discounts. */
|
|
624
|
-
appliedDiscounts?: AppliedDiscount[];
|
|
625
|
-
}
|
|
626
|
-
export interface AppliedDiscount {
|
|
627
|
-
/** Discount type. */
|
|
628
|
-
discountType?: TypeWithLiterals;
|
|
629
|
-
/**
|
|
630
|
-
* IDs of line items the discount applies to, in GUID format.
|
|
631
|
-
* @format GUID
|
|
632
|
-
* @maxSize 1000
|
|
633
|
-
*/
|
|
634
|
-
lineItemIds?: string[];
|
|
635
|
-
/** Applied discount rule. */
|
|
636
|
-
appliedDiscountRule?: AppliedDiscountRule;
|
|
637
|
-
}
|
|
638
|
-
export interface AppliedDiscountRule {
|
|
639
|
-
/**
|
|
640
|
-
* Applied discount rule ID.
|
|
641
|
-
* @format GUID
|
|
642
|
-
*/
|
|
643
|
-
id?: string;
|
|
644
|
-
/** Discount rule name. */
|
|
645
|
-
name?: DiscountRuleName;
|
|
646
|
-
/** Total amount reduced from all discounted line items. */
|
|
647
|
-
amount?: MultiCurrencyPrice;
|
|
648
|
-
/** Discount rule type. */
|
|
649
|
-
discountRuleType?: DiscountTypeWithLiterals;
|
|
650
|
-
}
|
|
651
|
-
export interface DiscountRuleName {
|
|
652
|
-
/**
|
|
653
|
-
* Original discount rule name (in site's default language).
|
|
654
|
-
* @minLength 1
|
|
655
|
-
* @maxLength 256
|
|
656
|
-
*/
|
|
657
|
-
original?: string;
|
|
658
|
-
/**
|
|
659
|
-
* Translated discount rule name according to buyer language.
|
|
660
|
-
*
|
|
661
|
-
* Default: `original`
|
|
662
|
-
* @minLength 1
|
|
663
|
-
* @maxLength 500
|
|
664
|
-
*/
|
|
665
|
-
translated?: string | null;
|
|
666
|
-
}
|
|
667
|
-
export interface MultiCurrencyPrice {
|
|
668
|
-
/**
|
|
669
|
-
* Amount.
|
|
670
|
-
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
671
|
-
*/
|
|
672
|
-
amount?: string;
|
|
673
|
-
/**
|
|
674
|
-
* Converted amount.
|
|
675
|
-
* @readonly
|
|
676
|
-
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
677
|
-
*/
|
|
678
|
-
convertedAmount?: string;
|
|
679
|
-
/**
|
|
680
|
-
* Amount formatted with currency symbol.
|
|
681
|
-
* @readonly
|
|
682
|
-
*/
|
|
683
|
-
formattedAmount?: string;
|
|
684
|
-
/**
|
|
685
|
-
* Converted amount formatted with currency symbol.
|
|
686
|
-
* @readonly
|
|
687
|
-
*/
|
|
688
|
-
formattedConvertedAmount?: string;
|
|
689
|
-
}
|
|
690
|
-
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
691
|
-
createdEvent?: EntityCreatedEvent;
|
|
692
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
693
|
-
deletedEvent?: EntityDeletedEvent;
|
|
694
|
-
actionEvent?: ActionEvent;
|
|
695
|
-
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
696
|
-
id?: string;
|
|
697
|
-
/**
|
|
698
|
-
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
699
|
-
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
700
|
-
*/
|
|
701
|
-
entityFqdn?: string;
|
|
702
|
-
/**
|
|
703
|
-
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
704
|
-
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
705
|
-
*/
|
|
706
|
-
slug?: string;
|
|
707
|
-
/** ID of the entity associated with the event. */
|
|
708
|
-
entityId?: string;
|
|
709
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
710
|
-
eventTime?: Date | null;
|
|
711
|
-
/**
|
|
712
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
713
|
-
* (for example, GDPR).
|
|
714
|
-
*/
|
|
715
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
716
|
-
/** If present, indicates the action that triggered the event. */
|
|
717
|
-
originatedFrom?: string | null;
|
|
718
|
-
/**
|
|
719
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
720
|
-
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
721
|
-
*/
|
|
722
|
-
entityEventSequence?: string | null;
|
|
723
|
-
}
|
|
724
|
-
/** @oneof */
|
|
725
|
-
export interface DomainEventBodyOneOf {
|
|
726
|
-
createdEvent?: EntityCreatedEvent;
|
|
727
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
728
|
-
deletedEvent?: EntityDeletedEvent;
|
|
729
|
-
actionEvent?: ActionEvent;
|
|
730
|
-
}
|
|
731
|
-
export interface EntityCreatedEvent {
|
|
732
|
-
entityAsJson?: string;
|
|
733
|
-
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
734
|
-
restoreInfo?: RestoreInfo;
|
|
735
|
-
}
|
|
736
|
-
export interface RestoreInfo {
|
|
737
|
-
deletedDate?: Date | null;
|
|
738
|
-
}
|
|
739
|
-
export interface EntityUpdatedEvent {
|
|
740
|
-
/**
|
|
741
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
742
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
743
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
744
|
-
*/
|
|
745
|
-
currentEntityAsJson?: string;
|
|
746
|
-
}
|
|
747
|
-
export interface EntityDeletedEvent {
|
|
748
|
-
/** Entity that was deleted. */
|
|
749
|
-
deletedEntityAsJson?: string | null;
|
|
750
|
-
}
|
|
751
|
-
export interface ActionEvent {
|
|
752
|
-
bodyAsJson?: string;
|
|
753
|
-
}
|
|
754
|
-
export interface Empty {
|
|
755
|
-
}
|
|
756
|
-
export interface DiscountRuleUsageLimitReached {
|
|
757
|
-
/** Discount Rule */
|
|
758
|
-
rule?: DiscountRule;
|
|
759
|
-
}
|
|
760
|
-
export interface MessageEnvelope {
|
|
761
|
-
/**
|
|
762
|
-
* App instance ID.
|
|
763
|
-
* @format GUID
|
|
764
|
-
*/
|
|
765
|
-
instanceId?: string | null;
|
|
766
|
-
/**
|
|
767
|
-
* Event type.
|
|
768
|
-
* @maxLength 150
|
|
769
|
-
*/
|
|
770
|
-
eventType?: string;
|
|
771
|
-
/** The identification type and identity data. */
|
|
772
|
-
identity?: IdentificationData;
|
|
773
|
-
/** Stringify payload. */
|
|
774
|
-
data?: string;
|
|
775
|
-
}
|
|
776
|
-
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
777
|
-
/**
|
|
778
|
-
* ID of a site visitor that has not logged in to the site.
|
|
779
|
-
* @format GUID
|
|
780
|
-
*/
|
|
781
|
-
anonymousVisitorId?: string;
|
|
782
|
-
/**
|
|
783
|
-
* ID of a site visitor that has logged in to the site.
|
|
784
|
-
* @format GUID
|
|
785
|
-
*/
|
|
786
|
-
memberId?: string;
|
|
787
|
-
/**
|
|
788
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
789
|
-
* @format GUID
|
|
790
|
-
*/
|
|
791
|
-
wixUserId?: string;
|
|
792
|
-
/**
|
|
793
|
-
* ID of an app.
|
|
794
|
-
* @format GUID
|
|
795
|
-
*/
|
|
796
|
-
appId?: string;
|
|
797
|
-
/** @readonly */
|
|
798
|
-
identityType?: WebhookIdentityTypeWithLiterals;
|
|
799
|
-
}
|
|
800
|
-
/** @oneof */
|
|
801
|
-
export interface IdentificationDataIdOneOf {
|
|
802
|
-
/**
|
|
803
|
-
* ID of a site visitor that has not logged in to the site.
|
|
804
|
-
* @format GUID
|
|
805
|
-
*/
|
|
806
|
-
anonymousVisitorId?: string;
|
|
807
|
-
/**
|
|
808
|
-
* ID of a site visitor that has logged in to the site.
|
|
809
|
-
* @format GUID
|
|
810
|
-
*/
|
|
811
|
-
memberId?: string;
|
|
812
|
-
/**
|
|
813
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
814
|
-
* @format GUID
|
|
815
|
-
*/
|
|
816
|
-
wixUserId?: string;
|
|
817
|
-
/**
|
|
818
|
-
* ID of an app.
|
|
819
|
-
* @format GUID
|
|
820
|
-
*/
|
|
821
|
-
appId?: string;
|
|
822
|
-
}
|
|
823
|
-
export declare enum WebhookIdentityType {
|
|
824
|
-
UNKNOWN = "UNKNOWN",
|
|
825
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
826
|
-
MEMBER = "MEMBER",
|
|
827
|
-
WIX_USER = "WIX_USER",
|
|
828
|
-
APP = "APP"
|
|
829
|
-
}
|
|
830
|
-
/** @enumType */
|
|
831
|
-
export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|