@wix/auto_sdk_loyalty_earning-rules 1.0.4 → 1.0.6
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/index.d.mts +112 -0
- package/build/index.d.ts +112 -0
- package/build/index.js +732 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +694 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +112 -0
- package/build/internal/index.d.ts +112 -0
- package/build/internal/index.js +732 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +694 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/{cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-DOjaPKYu.d.mts} +198 -125
- package/build/internal/{es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-DOjaPKYu.d.ts} +198 -125
- package/build/internal/meta.d.mts +322 -0
- package/build/internal/meta.d.ts +322 -0
- package/build/internal/meta.js +500 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +466 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-ByA9SEhi.d.mts} +193 -120
- package/build/{cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-ByA9SEhi.d.ts} +193 -120
- package/build/meta.d.mts +322 -0
- package/build/meta.d.ts +322 -0
- package/build/meta.js +500 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +466 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- 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/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -35
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -353
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -180
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -93
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -37
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -892
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -400
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-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/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -28
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -342
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -146
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -78
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -34
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -892
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -366
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-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/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -35
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -353
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -180
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -93
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -37
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -902
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -400
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-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/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -28
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -342
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -146
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -78
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -34
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -902
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -366
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* A loyalty earning rule defines how customers earn points in a loyalty program.
|
|
3
3
|
* You can create rules for different activities, such as making purchases.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
6
6
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
7
7
|
fixedAmount?: FixedAmount;
|
|
8
8
|
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
@@ -12,7 +12,7 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
|
12
12
|
* @format GUID
|
|
13
13
|
* @readonly
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
_id?: string | null;
|
|
16
16
|
/**
|
|
17
17
|
* ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
|
|
18
18
|
* @format GUID
|
|
@@ -47,12 +47,12 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
|
47
47
|
* Date and time the earning rule was created.
|
|
48
48
|
* @readonly
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
_createdDate?: Date | null;
|
|
51
51
|
/**
|
|
52
52
|
* Date and time the earning rule was last updated.
|
|
53
53
|
* @readonly
|
|
54
54
|
*/
|
|
55
|
-
|
|
55
|
+
_updatedDate?: Date | null;
|
|
56
56
|
/**
|
|
57
57
|
* Additional metadata about the earning rule.
|
|
58
58
|
* @readonly
|
|
@@ -60,21 +60,21 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
|
60
60
|
metadata?: Metadata;
|
|
61
61
|
}
|
|
62
62
|
/** @oneof */
|
|
63
|
-
|
|
63
|
+
interface LoyaltyEarningRuleTypeOneOf {
|
|
64
64
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
65
65
|
fixedAmount?: FixedAmount;
|
|
66
66
|
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
67
67
|
conversionRate?: ConversionRate;
|
|
68
68
|
}
|
|
69
69
|
/** Fixed amount type of earning rule. */
|
|
70
|
-
|
|
70
|
+
interface FixedAmount {
|
|
71
71
|
/**
|
|
72
72
|
* Fixed amount configurations for each tier.
|
|
73
73
|
* @maxSize 21
|
|
74
74
|
*/
|
|
75
75
|
configs?: FixedAmountConfig[];
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
interface FixedAmountConfig {
|
|
78
78
|
/**
|
|
79
79
|
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction#terminology) is used.
|
|
80
80
|
* @format GUID
|
|
@@ -89,7 +89,7 @@ export interface FixedAmountConfig {
|
|
|
89
89
|
* Customers earn points based on the amount spent.
|
|
90
90
|
* For example, for every $10 spent, a customer might earn 1 point.
|
|
91
91
|
*/
|
|
92
|
-
|
|
92
|
+
interface ConversionRate {
|
|
93
93
|
/**
|
|
94
94
|
* Conversion rate configurations for each tier.
|
|
95
95
|
*
|
|
@@ -106,7 +106,7 @@ export interface ConversionRate {
|
|
|
106
106
|
*/
|
|
107
107
|
field?: string | null;
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
interface ConversionRateConfig {
|
|
110
110
|
/**
|
|
111
111
|
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction) is used.
|
|
112
112
|
* @format GUID
|
|
@@ -133,7 +133,7 @@ export interface ConversionRateConfig {
|
|
|
133
133
|
*/
|
|
134
134
|
points?: number;
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
declare enum Status {
|
|
137
137
|
/** Status is unknown or not specified. */
|
|
138
138
|
UNKNOWN = "UNKNOWN",
|
|
139
139
|
/** Earning rule is active and can assign points. */
|
|
@@ -141,31 +141,36 @@ export declare enum Status {
|
|
|
141
141
|
/** Earning rule is paused and can't assign points. */
|
|
142
142
|
PAUSED = "PAUSED"
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
interface Metadata {
|
|
145
145
|
/** Whether the earning rule can be deleted. */
|
|
146
146
|
canBeDeleted?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Information about the type of custom earning rule.
|
|
149
|
+
* @internal
|
|
150
|
+
*/
|
|
151
|
+
ruleTypeTag?: LoyaltyEarningRuleTypeTag;
|
|
147
152
|
}
|
|
148
|
-
|
|
153
|
+
interface LoyaltyEarningRuleTypeTag {
|
|
149
154
|
/** Type of custom earning rule. */
|
|
150
155
|
ruleType?: LoyaltyEarningRuleTypeTagType;
|
|
151
156
|
}
|
|
152
|
-
|
|
157
|
+
declare enum LoyaltyEarningRuleTypeTagType {
|
|
153
158
|
/** Type is unknown or not specified. */
|
|
154
159
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
155
160
|
/** Earning rule for a customer's birthday. */
|
|
156
161
|
BIRTHDAY = "BIRTHDAY"
|
|
157
162
|
}
|
|
158
|
-
|
|
163
|
+
interface EarningRuleDisabled {
|
|
159
164
|
}
|
|
160
|
-
|
|
165
|
+
interface CreateLoyaltyEarningRuleRequest {
|
|
161
166
|
/** Earning rule to create. */
|
|
162
167
|
earningRule: LoyaltyEarningRule;
|
|
163
168
|
}
|
|
164
|
-
|
|
169
|
+
interface CreateLoyaltyEarningRuleResponse {
|
|
165
170
|
/** Created earning rule. */
|
|
166
171
|
earningRule?: LoyaltyEarningRule;
|
|
167
172
|
}
|
|
168
|
-
|
|
173
|
+
interface BulkCreateLoyaltyEarningRulesRequest {
|
|
169
174
|
/**
|
|
170
175
|
* Earning rules to create.
|
|
171
176
|
* @minSize 1
|
|
@@ -173,21 +178,21 @@ export interface BulkCreateLoyaltyEarningRulesRequest {
|
|
|
173
178
|
*/
|
|
174
179
|
earningRules: LoyaltyEarningRule[];
|
|
175
180
|
}
|
|
176
|
-
|
|
181
|
+
interface BulkCreateLoyaltyEarningRulesResponse {
|
|
177
182
|
/** Created earning rules. */
|
|
178
183
|
results?: BulkLoyaltyEarningRuleResult[];
|
|
179
184
|
/** Additional metadata for the created earning rules. */
|
|
180
185
|
bulkActionMetadata?: BulkActionMetadata;
|
|
181
186
|
}
|
|
182
|
-
|
|
187
|
+
interface BulkLoyaltyEarningRuleResult {
|
|
183
188
|
/** Additional metadata for the created earning rules. */
|
|
184
189
|
itemMetadata?: ItemMetadata;
|
|
185
190
|
/** Created earning rule. */
|
|
186
191
|
item?: LoyaltyEarningRule;
|
|
187
192
|
}
|
|
188
|
-
|
|
193
|
+
interface ItemMetadata {
|
|
189
194
|
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
190
|
-
|
|
195
|
+
_id?: string | null;
|
|
191
196
|
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
192
197
|
originalIndex?: number;
|
|
193
198
|
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
@@ -195,7 +200,7 @@ export interface ItemMetadata {
|
|
|
195
200
|
/** Details about the error in case of failure. */
|
|
196
201
|
error?: ApplicationError;
|
|
197
202
|
}
|
|
198
|
-
|
|
203
|
+
interface ApplicationError {
|
|
199
204
|
/** Error code. */
|
|
200
205
|
code?: string;
|
|
201
206
|
/** Description of the error. */
|
|
@@ -203,7 +208,7 @@ export interface ApplicationError {
|
|
|
203
208
|
/** Data related to the error. */
|
|
204
209
|
data?: Record<string, any> | null;
|
|
205
210
|
}
|
|
206
|
-
|
|
211
|
+
interface BulkActionMetadata {
|
|
207
212
|
/** Number of items that were successfully processed. */
|
|
208
213
|
totalSuccesses?: number;
|
|
209
214
|
/** Number of items that couldn't be processed. */
|
|
@@ -211,13 +216,13 @@ export interface BulkActionMetadata {
|
|
|
211
216
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
212
217
|
undetailedFailures?: number;
|
|
213
218
|
}
|
|
214
|
-
|
|
219
|
+
interface CreateCustomLoyaltyEarningRuleRequest {
|
|
215
220
|
/** Type of the custom earning rule. */
|
|
216
221
|
type: Type;
|
|
217
222
|
/** Custom earning rule to create. */
|
|
218
223
|
earningRule?: CustomLoyaltyEarningRule;
|
|
219
224
|
}
|
|
220
|
-
|
|
225
|
+
declare enum Type {
|
|
221
226
|
/** Unknown type. This value is not used. */
|
|
222
227
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
223
228
|
/** Earning rule for social media. */
|
|
@@ -226,7 +231,7 @@ export declare enum Type {
|
|
|
226
231
|
BIRTHDAY = "BIRTHDAY"
|
|
227
232
|
}
|
|
228
233
|
/** Used in CreateCustomLoyaltyEarningRuleRequest */
|
|
229
|
-
|
|
234
|
+
interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
|
|
230
235
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
231
236
|
fixedAmount?: FixedAmount;
|
|
232
237
|
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
@@ -239,69 +244,69 @@ export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOn
|
|
|
239
244
|
title?: string;
|
|
240
245
|
}
|
|
241
246
|
/** @oneof */
|
|
242
|
-
|
|
247
|
+
interface CustomLoyaltyEarningRuleTypeOneOf {
|
|
243
248
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
244
249
|
fixedAmount?: FixedAmount;
|
|
245
250
|
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
246
251
|
conversionRate?: ConversionRate;
|
|
247
252
|
}
|
|
248
|
-
|
|
253
|
+
interface CreateCustomLoyaltyEarningRuleResponse {
|
|
249
254
|
/** Created earning rule. */
|
|
250
255
|
earningRule?: LoyaltyEarningRule;
|
|
251
256
|
}
|
|
252
|
-
|
|
257
|
+
interface GetLoyaltyEarningRuleRequest {
|
|
253
258
|
/**
|
|
254
259
|
* ID of the earning rule to retrieve.
|
|
255
260
|
* @format GUID
|
|
256
261
|
*/
|
|
257
|
-
|
|
262
|
+
_id: string;
|
|
258
263
|
}
|
|
259
|
-
|
|
264
|
+
interface GetLoyaltyEarningRuleResponse {
|
|
260
265
|
/** Retrieved earning rule. */
|
|
261
266
|
earningRule?: LoyaltyEarningRule;
|
|
262
267
|
}
|
|
263
|
-
|
|
268
|
+
interface UpdateLoyaltyEarningRuleRequest {
|
|
264
269
|
/** Earning rule to update. */
|
|
265
270
|
earningRule: LoyaltyEarningRule;
|
|
266
271
|
}
|
|
267
|
-
|
|
272
|
+
interface UpdateLoyaltyEarningRuleResponse {
|
|
268
273
|
/** The updated earning rule. */
|
|
269
274
|
earningRule?: LoyaltyEarningRule;
|
|
270
275
|
}
|
|
271
|
-
|
|
276
|
+
interface DeleteLoyaltyEarningRuleRequest {
|
|
272
277
|
/**
|
|
273
278
|
* ID of the earning rule to delete.
|
|
274
279
|
* @format GUID
|
|
275
280
|
*/
|
|
276
|
-
|
|
281
|
+
_id: string;
|
|
277
282
|
/**
|
|
278
283
|
* Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
|
|
279
284
|
* Pass the latest revision when updating to prevent conflicting changes.
|
|
280
285
|
*/
|
|
281
286
|
revision?: string;
|
|
282
287
|
}
|
|
283
|
-
|
|
288
|
+
interface DeleteLoyaltyEarningRuleResponse {
|
|
284
289
|
}
|
|
285
|
-
|
|
290
|
+
interface DeleteAutomationEarningRuleRequest {
|
|
286
291
|
/**
|
|
287
292
|
* ID of the earning rule to delete.
|
|
288
293
|
* @format GUID
|
|
289
294
|
*/
|
|
290
|
-
|
|
295
|
+
_id: string;
|
|
291
296
|
}
|
|
292
|
-
|
|
297
|
+
interface DeleteAutomationEarningRuleResponse {
|
|
293
298
|
}
|
|
294
|
-
|
|
299
|
+
interface ListEarningRulesRequest {
|
|
295
300
|
/** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
|
|
296
301
|
triggerAppId?: string | null;
|
|
297
302
|
/** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
|
|
298
303
|
triggerActivityType?: string | null;
|
|
299
304
|
}
|
|
300
|
-
|
|
305
|
+
interface ListEarningRulesResponse {
|
|
301
306
|
/** Retrieved earning rules. */
|
|
302
307
|
earningRules?: LoyaltyEarningRule[];
|
|
303
308
|
}
|
|
304
|
-
|
|
309
|
+
interface ListEarningRulesInTierRequest {
|
|
305
310
|
/**
|
|
306
311
|
* ID of the tier for which the earning rules will be returned.
|
|
307
312
|
* @format GUID
|
|
@@ -310,7 +315,7 @@ export interface ListEarningRulesInTierRequest {
|
|
|
310
315
|
/** Pagination options. */
|
|
311
316
|
paging?: CursorPaging;
|
|
312
317
|
}
|
|
313
|
-
|
|
318
|
+
interface CursorPaging {
|
|
314
319
|
/**
|
|
315
320
|
* Maximum number of items to return in the results.
|
|
316
321
|
* @max 100
|
|
@@ -325,13 +330,13 @@ export interface CursorPaging {
|
|
|
325
330
|
*/
|
|
326
331
|
cursor?: string | null;
|
|
327
332
|
}
|
|
328
|
-
|
|
333
|
+
interface ListEarningRulesInTierResponse {
|
|
329
334
|
/** Retrieved earning rules. */
|
|
330
335
|
earningRules?: LoyaltyEarningRule[];
|
|
331
336
|
/** Details on the paged set of results returned. */
|
|
332
337
|
pagingMetadata?: PagingMetadataV2;
|
|
333
338
|
}
|
|
334
|
-
|
|
339
|
+
interface PagingMetadataV2 {
|
|
335
340
|
/** Number of items returned in the response. */
|
|
336
341
|
count?: number | null;
|
|
337
342
|
/** Offset that was requested. */
|
|
@@ -343,7 +348,7 @@ export interface PagingMetadataV2 {
|
|
|
343
348
|
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
344
349
|
cursors?: Cursors;
|
|
345
350
|
}
|
|
346
|
-
|
|
351
|
+
interface Cursors {
|
|
347
352
|
/**
|
|
348
353
|
* Cursor string pointing to the next page in the list of results.
|
|
349
354
|
* @maxLength 16000
|
|
@@ -355,7 +360,7 @@ export interface Cursors {
|
|
|
355
360
|
*/
|
|
356
361
|
prev?: string | null;
|
|
357
362
|
}
|
|
358
|
-
|
|
363
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
359
364
|
createdEvent?: EntityCreatedEvent;
|
|
360
365
|
updatedEvent?: EntityUpdatedEvent;
|
|
361
366
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -364,7 +369,7 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
364
369
|
* Unique event ID.
|
|
365
370
|
* Allows clients to ignore duplicate webhooks.
|
|
366
371
|
*/
|
|
367
|
-
|
|
372
|
+
_id?: string;
|
|
368
373
|
/**
|
|
369
374
|
* Assumes actions are also always typed to an entity_type
|
|
370
375
|
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
@@ -398,38 +403,36 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
398
403
|
entityEventSequence?: string | null;
|
|
399
404
|
}
|
|
400
405
|
/** @oneof */
|
|
401
|
-
|
|
406
|
+
interface DomainEventBodyOneOf {
|
|
402
407
|
createdEvent?: EntityCreatedEvent;
|
|
403
408
|
updatedEvent?: EntityUpdatedEvent;
|
|
404
409
|
deletedEvent?: EntityDeletedEvent;
|
|
405
410
|
actionEvent?: ActionEvent;
|
|
406
411
|
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
410
|
-
restoreInfo?: RestoreInfo;
|
|
412
|
+
interface EntityCreatedEvent {
|
|
413
|
+
entity?: string;
|
|
411
414
|
}
|
|
412
|
-
|
|
415
|
+
interface RestoreInfo {
|
|
413
416
|
deletedDate?: Date | null;
|
|
414
417
|
}
|
|
415
|
-
|
|
418
|
+
interface EntityUpdatedEvent {
|
|
416
419
|
/**
|
|
417
420
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
418
421
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
419
422
|
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
420
423
|
*/
|
|
421
|
-
|
|
424
|
+
currentEntity?: string;
|
|
422
425
|
}
|
|
423
|
-
|
|
426
|
+
interface EntityDeletedEvent {
|
|
424
427
|
/** Entity that was deleted */
|
|
425
|
-
|
|
428
|
+
deletedEntity?: string | null;
|
|
426
429
|
}
|
|
427
|
-
|
|
428
|
-
|
|
430
|
+
interface ActionEvent {
|
|
431
|
+
body?: string;
|
|
429
432
|
}
|
|
430
|
-
|
|
433
|
+
interface Empty {
|
|
431
434
|
}
|
|
432
|
-
|
|
435
|
+
interface MessageEnvelope {
|
|
433
436
|
/**
|
|
434
437
|
* App instance ID.
|
|
435
438
|
* @format GUID
|
|
@@ -445,7 +448,7 @@ export interface MessageEnvelope {
|
|
|
445
448
|
/** Stringify payload. */
|
|
446
449
|
data?: string;
|
|
447
450
|
}
|
|
448
|
-
|
|
451
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
449
452
|
/**
|
|
450
453
|
* ID of a site visitor that has not logged in to the site.
|
|
451
454
|
* @format GUID
|
|
@@ -470,7 +473,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
470
473
|
identityType?: WebhookIdentityType;
|
|
471
474
|
}
|
|
472
475
|
/** @oneof */
|
|
473
|
-
|
|
476
|
+
interface IdentificationDataIdOneOf {
|
|
474
477
|
/**
|
|
475
478
|
* ID of a site visitor that has not logged in to the site.
|
|
476
479
|
* @format GUID
|
|
@@ -492,79 +495,149 @@ export interface IdentificationDataIdOneOf {
|
|
|
492
495
|
*/
|
|
493
496
|
appId?: string;
|
|
494
497
|
}
|
|
495
|
-
|
|
498
|
+
declare enum WebhookIdentityType {
|
|
496
499
|
UNKNOWN = "UNKNOWN",
|
|
497
500
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
498
501
|
MEMBER = "MEMBER",
|
|
499
502
|
WIX_USER = "WIX_USER",
|
|
500
503
|
APP = "APP"
|
|
501
504
|
}
|
|
502
|
-
interface
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
interface LoyaltyEarningRuleTypeTagNonNullableFields {
|
|
516
|
-
ruleType: LoyaltyEarningRuleTypeTagType;
|
|
517
|
-
}
|
|
518
|
-
interface MetadataNonNullableFields {
|
|
519
|
-
canBeDeleted: boolean;
|
|
520
|
-
/** @internal */
|
|
521
|
-
ruleTypeTag?: LoyaltyEarningRuleTypeTagNonNullableFields;
|
|
522
|
-
}
|
|
523
|
-
interface LoyaltyEarningRuleNonNullableFields {
|
|
524
|
-
fixedAmount?: FixedAmountNonNullableFields;
|
|
525
|
-
conversionRate?: ConversionRateNonNullableFields;
|
|
526
|
-
sourceAppId: string;
|
|
527
|
-
triggerAppId: string;
|
|
528
|
-
triggerActivityType: string;
|
|
529
|
-
title: string;
|
|
530
|
-
status: Status;
|
|
531
|
-
metadata?: MetadataNonNullableFields;
|
|
532
|
-
}
|
|
533
|
-
export interface CreateLoyaltyEarningRuleResponseNonNullableFields {
|
|
534
|
-
earningRule?: LoyaltyEarningRuleNonNullableFields;
|
|
535
|
-
}
|
|
536
|
-
interface ApplicationErrorNonNullableFields {
|
|
537
|
-
code: string;
|
|
538
|
-
description: string;
|
|
505
|
+
interface BaseEventMetadata {
|
|
506
|
+
/**
|
|
507
|
+
* App instance ID.
|
|
508
|
+
* @format GUID
|
|
509
|
+
*/
|
|
510
|
+
instanceId?: string | null;
|
|
511
|
+
/**
|
|
512
|
+
* Event type.
|
|
513
|
+
* @maxLength 150
|
|
514
|
+
*/
|
|
515
|
+
eventType?: string;
|
|
516
|
+
/** The identification type and identity data. */
|
|
517
|
+
identity?: IdentificationData;
|
|
539
518
|
}
|
|
540
|
-
interface
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
519
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
520
|
+
/**
|
|
521
|
+
* Unique event ID.
|
|
522
|
+
* Allows clients to ignore duplicate webhooks.
|
|
523
|
+
*/
|
|
524
|
+
_id?: string;
|
|
525
|
+
/**
|
|
526
|
+
* Assumes actions are also always typed to an entity_type
|
|
527
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
528
|
+
*/
|
|
529
|
+
entityFqdn?: string;
|
|
530
|
+
/**
|
|
531
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
532
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
533
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
534
|
+
*/
|
|
535
|
+
slug?: string;
|
|
536
|
+
/** ID of the entity associated with the event. */
|
|
537
|
+
entityId?: string;
|
|
538
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
539
|
+
eventTime?: Date | null;
|
|
540
|
+
/**
|
|
541
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
542
|
+
* (for example, GDPR).
|
|
543
|
+
*/
|
|
544
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
545
|
+
/** If present, indicates the action that triggered the event. */
|
|
546
|
+
originatedFrom?: string | null;
|
|
547
|
+
/**
|
|
548
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
549
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
550
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
551
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
552
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
553
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
554
|
+
*/
|
|
555
|
+
entityEventSequence?: string | null;
|
|
544
556
|
}
|
|
545
|
-
interface
|
|
546
|
-
|
|
547
|
-
|
|
557
|
+
interface LoyaltyEarningRuleCreatedEnvelope {
|
|
558
|
+
entity: LoyaltyEarningRule;
|
|
559
|
+
metadata: EventMetadata;
|
|
548
560
|
}
|
|
549
|
-
interface
|
|
550
|
-
|
|
551
|
-
totalFailures: number;
|
|
552
|
-
undetailedFailures: number;
|
|
561
|
+
interface LoyaltyEarningRuleDeletedEnvelope {
|
|
562
|
+
metadata: EventMetadata;
|
|
553
563
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
564
|
+
interface LoyaltyEarningRuleUpdatedEnvelope {
|
|
565
|
+
entity: LoyaltyEarningRule;
|
|
566
|
+
metadata: EventMetadata;
|
|
557
567
|
}
|
|
558
|
-
|
|
559
|
-
|
|
568
|
+
interface CreateCustomLoyaltyEarningRuleOptions {
|
|
569
|
+
/** Custom earning rule to create. */
|
|
570
|
+
earningRule?: CustomLoyaltyEarningRule;
|
|
560
571
|
}
|
|
561
|
-
|
|
562
|
-
|
|
572
|
+
interface UpdateLoyaltyEarningRule {
|
|
573
|
+
/** Fixed amount of points awarded for each qualifying activity. */
|
|
574
|
+
fixedAmount?: FixedAmount;
|
|
575
|
+
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
576
|
+
conversionRate?: ConversionRate;
|
|
577
|
+
/**
|
|
578
|
+
* Loyalty earning rule ID.
|
|
579
|
+
* @format GUID
|
|
580
|
+
* @readonly
|
|
581
|
+
*/
|
|
582
|
+
_id?: string | null;
|
|
583
|
+
/**
|
|
584
|
+
* ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
|
|
585
|
+
* @format GUID
|
|
586
|
+
*/
|
|
587
|
+
sourceAppId?: string;
|
|
588
|
+
/**
|
|
589
|
+
* ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
|
|
590
|
+
* @minLength 1
|
|
591
|
+
* @maxLength 80
|
|
592
|
+
*/
|
|
593
|
+
triggerAppId?: string;
|
|
594
|
+
/**
|
|
595
|
+
* Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
|
|
596
|
+
* @minLength 1
|
|
597
|
+
* @maxLength 80
|
|
598
|
+
*/
|
|
599
|
+
triggerActivityType?: string;
|
|
600
|
+
/**
|
|
601
|
+
* Name of the earning rule.
|
|
602
|
+
* @minLength 1
|
|
603
|
+
* @maxLength 50
|
|
604
|
+
*/
|
|
605
|
+
title?: string;
|
|
606
|
+
/** Current status of the earning rule. */
|
|
607
|
+
status?: Status;
|
|
608
|
+
/**
|
|
609
|
+
* Revision number, incremented by 1 each time the earning rule is updated.
|
|
610
|
+
* Pass the latest revision when updating to prevent conflicting changes.
|
|
611
|
+
*/
|
|
612
|
+
revision?: string | null;
|
|
613
|
+
/**
|
|
614
|
+
* Date and time the earning rule was created.
|
|
615
|
+
* @readonly
|
|
616
|
+
*/
|
|
617
|
+
_createdDate?: Date | null;
|
|
618
|
+
/**
|
|
619
|
+
* Date and time the earning rule was last updated.
|
|
620
|
+
* @readonly
|
|
621
|
+
*/
|
|
622
|
+
_updatedDate?: Date | null;
|
|
623
|
+
/**
|
|
624
|
+
* Additional metadata about the earning rule.
|
|
625
|
+
* @readonly
|
|
626
|
+
*/
|
|
627
|
+
metadata?: Metadata;
|
|
563
628
|
}
|
|
564
|
-
|
|
565
|
-
|
|
629
|
+
interface DeleteLoyaltyEarningRuleOptions {
|
|
630
|
+
/**
|
|
631
|
+
* Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
|
|
632
|
+
* Pass the latest revision when updating to prevent conflicting changes.
|
|
633
|
+
*/
|
|
634
|
+
revision?: string;
|
|
566
635
|
}
|
|
567
|
-
|
|
568
|
-
|
|
636
|
+
interface ListEarningRulesOptions {
|
|
637
|
+
/** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
|
|
638
|
+
triggerAppId?: string | null;
|
|
639
|
+
/** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
|
|
640
|
+
triggerActivityType?: string | null;
|
|
569
641
|
}
|
|
570
|
-
|
|
642
|
+
|
|
643
|
+
export { type IdentificationData as $, type ApplicationError as A, type BulkCreateLoyaltyEarningRulesResponse as B, type CreateCustomLoyaltyEarningRuleOptions as C, type DeleteLoyaltyEarningRuleOptions as D, type EarningRuleDisabled as E, type FixedAmount as F, type GetLoyaltyEarningRuleRequest as G, type CursorPaging as H, type ItemMetadata as I, type ListEarningRulesInTierResponse as J, type Cursors as K, type LoyaltyEarningRule as L, type Metadata as M, type DomainEvent as N, type DomainEventBodyOneOf as O, type PagingMetadataV2 as P, type EntityCreatedEvent as Q, type RestoreInfo as R, Status as S, Type as T, type UpdateLoyaltyEarningRule as U, type EntityUpdatedEvent as V, WebhookIdentityType as W, type EntityDeletedEvent as X, type ActionEvent as Y, type Empty as Z, type MessageEnvelope as _, type CreateCustomLoyaltyEarningRuleResponse as a, type IdentificationDataIdOneOf as a0, type BaseEventMetadata as a1, type EventMetadata as a2, type LoyaltyEarningRuleCreatedEnvelope as a3, type LoyaltyEarningRuleDeletedEnvelope as a4, type LoyaltyEarningRuleUpdatedEnvelope as a5, type UpdateLoyaltyEarningRuleResponse as b, type ListEarningRulesOptions as c, type ListEarningRulesResponse as d, LoyaltyEarningRuleTypeTagType as e, type LoyaltyEarningRuleTypeOneOf as f, type FixedAmountConfig as g, type ConversionRate as h, type ConversionRateConfig as i, type LoyaltyEarningRuleTypeTag as j, type CreateLoyaltyEarningRuleRequest as k, type CreateLoyaltyEarningRuleResponse as l, type BulkCreateLoyaltyEarningRulesRequest as m, type BulkLoyaltyEarningRuleResult as n, type BulkActionMetadata as o, type CreateCustomLoyaltyEarningRuleRequest as p, type CustomLoyaltyEarningRule as q, type CustomLoyaltyEarningRuleTypeOneOf as r, type GetLoyaltyEarningRuleResponse as s, type UpdateLoyaltyEarningRuleRequest as t, type DeleteLoyaltyEarningRuleRequest as u, type DeleteLoyaltyEarningRuleResponse as v, type DeleteAutomationEarningRuleRequest as w, type DeleteAutomationEarningRuleResponse as x, type ListEarningRulesRequest as y, type ListEarningRulesInTierRequest as z };
|