@wix/auto_sdk_loyalty_earning-rules 1.0.2 → 1.0.4
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/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +106 -24
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -1
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +158 -30
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +18 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -1
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +106 -24
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -1
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +158 -30
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +18 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -1
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +106 -24
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -1
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +158 -30
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +18 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -1
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +106 -24
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -1
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +158 -30
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +18 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -1
- package/package.json +4 -4
|
@@ -9,16 +9,32 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
|
9
9
|
conversionRate?: ConversionRate;
|
|
10
10
|
/**
|
|
11
11
|
* Loyalty earning rule ID.
|
|
12
|
+
* @format GUID
|
|
12
13
|
* @readonly
|
|
13
14
|
*/
|
|
14
15
|
id?: string | null;
|
|
15
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
|
|
18
|
+
* @format GUID
|
|
19
|
+
*/
|
|
16
20
|
sourceAppId?: string;
|
|
17
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
|
|
23
|
+
* @minLength 1
|
|
24
|
+
* @maxLength 80
|
|
25
|
+
*/
|
|
18
26
|
triggerAppId?: string;
|
|
19
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
|
|
29
|
+
* @minLength 1
|
|
30
|
+
* @maxLength 80
|
|
31
|
+
*/
|
|
20
32
|
triggerActivityType?: string;
|
|
21
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Name of the earning rule.
|
|
35
|
+
* @minLength 1
|
|
36
|
+
* @maxLength 50
|
|
37
|
+
*/
|
|
22
38
|
title?: string;
|
|
23
39
|
/** Current status of the earning rule. */
|
|
24
40
|
status?: Status;
|
|
@@ -52,12 +68,16 @@ export interface LoyaltyEarningRuleTypeOneOf {
|
|
|
52
68
|
}
|
|
53
69
|
/** Fixed amount type of earning rule. */
|
|
54
70
|
export interface FixedAmount {
|
|
55
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Fixed amount configurations for each tier.
|
|
73
|
+
* @maxSize 21
|
|
74
|
+
*/
|
|
56
75
|
configs?: FixedAmountConfig[];
|
|
57
76
|
}
|
|
58
77
|
export interface FixedAmountConfig {
|
|
59
78
|
/**
|
|
60
79
|
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction#terminology) is used.
|
|
80
|
+
* @format GUID
|
|
61
81
|
* @readonly
|
|
62
82
|
*/
|
|
63
83
|
tierId?: string | null;
|
|
@@ -76,6 +96,7 @@ export interface ConversionRate {
|
|
|
76
96
|
* Points are awarded proportionally to the amount spent.
|
|
77
97
|
*
|
|
78
98
|
* Formula: `(amount spent) / (money_amount * points)`.
|
|
99
|
+
* @maxSize 21
|
|
79
100
|
*/
|
|
80
101
|
configs?: ConversionRateConfig[];
|
|
81
102
|
/**
|
|
@@ -88,6 +109,7 @@ export interface ConversionRate {
|
|
|
88
109
|
export interface ConversionRateConfig {
|
|
89
110
|
/**
|
|
90
111
|
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction) is used.
|
|
112
|
+
* @format GUID
|
|
91
113
|
* @readonly
|
|
92
114
|
*/
|
|
93
115
|
tierId?: string | null;
|
|
@@ -144,7 +166,11 @@ export interface CreateLoyaltyEarningRuleResponse {
|
|
|
144
166
|
earningRule?: LoyaltyEarningRule;
|
|
145
167
|
}
|
|
146
168
|
export interface BulkCreateLoyaltyEarningRulesRequest {
|
|
147
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Earning rules to create.
|
|
171
|
+
* @minSize 1
|
|
172
|
+
* @maxSize 100
|
|
173
|
+
*/
|
|
148
174
|
earningRules: LoyaltyEarningRule[];
|
|
149
175
|
}
|
|
150
176
|
export interface BulkCreateLoyaltyEarningRulesResponse {
|
|
@@ -205,7 +231,11 @@ export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOn
|
|
|
205
231
|
fixedAmount?: FixedAmount;
|
|
206
232
|
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
207
233
|
conversionRate?: ConversionRate;
|
|
208
|
-
/**
|
|
234
|
+
/**
|
|
235
|
+
* Name of the earning rule.
|
|
236
|
+
* @minLength 1
|
|
237
|
+
* @maxLength 50
|
|
238
|
+
*/
|
|
209
239
|
title?: string;
|
|
210
240
|
}
|
|
211
241
|
/** @oneof */
|
|
@@ -220,7 +250,10 @@ export interface CreateCustomLoyaltyEarningRuleResponse {
|
|
|
220
250
|
earningRule?: LoyaltyEarningRule;
|
|
221
251
|
}
|
|
222
252
|
export interface GetLoyaltyEarningRuleRequest {
|
|
223
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* ID of the earning rule to retrieve.
|
|
255
|
+
* @format GUID
|
|
256
|
+
*/
|
|
224
257
|
id: string;
|
|
225
258
|
}
|
|
226
259
|
export interface GetLoyaltyEarningRuleResponse {
|
|
@@ -236,7 +269,10 @@ export interface UpdateLoyaltyEarningRuleResponse {
|
|
|
236
269
|
earningRule?: LoyaltyEarningRule;
|
|
237
270
|
}
|
|
238
271
|
export interface DeleteLoyaltyEarningRuleRequest {
|
|
239
|
-
/**
|
|
272
|
+
/**
|
|
273
|
+
* ID of the earning rule to delete.
|
|
274
|
+
* @format GUID
|
|
275
|
+
*/
|
|
240
276
|
id: string;
|
|
241
277
|
/**
|
|
242
278
|
* Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
|
|
@@ -247,7 +283,10 @@ export interface DeleteLoyaltyEarningRuleRequest {
|
|
|
247
283
|
export interface DeleteLoyaltyEarningRuleResponse {
|
|
248
284
|
}
|
|
249
285
|
export interface DeleteAutomationEarningRuleRequest {
|
|
250
|
-
/**
|
|
286
|
+
/**
|
|
287
|
+
* ID of the earning rule to delete.
|
|
288
|
+
* @format GUID
|
|
289
|
+
*/
|
|
251
290
|
id: string;
|
|
252
291
|
}
|
|
253
292
|
export interface DeleteAutomationEarningRuleResponse {
|
|
@@ -263,19 +302,26 @@ export interface ListEarningRulesResponse {
|
|
|
263
302
|
earningRules?: LoyaltyEarningRule[];
|
|
264
303
|
}
|
|
265
304
|
export interface ListEarningRulesInTierRequest {
|
|
266
|
-
/**
|
|
305
|
+
/**
|
|
306
|
+
* ID of the tier for which the earning rules will be returned.
|
|
307
|
+
* @format GUID
|
|
308
|
+
*/
|
|
267
309
|
tierId?: string | null;
|
|
268
310
|
/** Pagination options. */
|
|
269
311
|
paging?: CursorPaging;
|
|
270
312
|
}
|
|
271
313
|
export interface CursorPaging {
|
|
272
|
-
/**
|
|
314
|
+
/**
|
|
315
|
+
* Maximum number of items to return in the results.
|
|
316
|
+
* @max 100
|
|
317
|
+
*/
|
|
273
318
|
limit?: number | null;
|
|
274
319
|
/**
|
|
275
320
|
* Pointer to the next or previous page in the list of results.
|
|
276
321
|
*
|
|
277
322
|
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
278
323
|
* Not relevant for the first request.
|
|
324
|
+
* @maxLength 16000
|
|
279
325
|
*/
|
|
280
326
|
cursor?: string | null;
|
|
281
327
|
}
|
|
@@ -298,9 +344,15 @@ export interface PagingMetadataV2 {
|
|
|
298
344
|
cursors?: Cursors;
|
|
299
345
|
}
|
|
300
346
|
export interface Cursors {
|
|
301
|
-
/**
|
|
347
|
+
/**
|
|
348
|
+
* Cursor string pointing to the next page in the list of results.
|
|
349
|
+
* @maxLength 16000
|
|
350
|
+
*/
|
|
302
351
|
next?: string | null;
|
|
303
|
-
/**
|
|
352
|
+
/**
|
|
353
|
+
* Cursor pointing to the previous page in the list of results.
|
|
354
|
+
* @maxLength 16000
|
|
355
|
+
*/
|
|
304
356
|
prev?: string | null;
|
|
305
357
|
}
|
|
306
358
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -378,9 +430,15 @@ export interface ActionEvent {
|
|
|
378
430
|
export interface Empty {
|
|
379
431
|
}
|
|
380
432
|
export interface MessageEnvelope {
|
|
381
|
-
/**
|
|
433
|
+
/**
|
|
434
|
+
* App instance ID.
|
|
435
|
+
* @format GUID
|
|
436
|
+
*/
|
|
382
437
|
instanceId?: string | null;
|
|
383
|
-
/**
|
|
438
|
+
/**
|
|
439
|
+
* Event type.
|
|
440
|
+
* @maxLength 150
|
|
441
|
+
*/
|
|
384
442
|
eventType?: string;
|
|
385
443
|
/** The identification type and identity data. */
|
|
386
444
|
identity?: IdentificationData;
|
|
@@ -388,26 +446,50 @@ export interface MessageEnvelope {
|
|
|
388
446
|
data?: string;
|
|
389
447
|
}
|
|
390
448
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
391
|
-
/**
|
|
449
|
+
/**
|
|
450
|
+
* ID of a site visitor that has not logged in to the site.
|
|
451
|
+
* @format GUID
|
|
452
|
+
*/
|
|
392
453
|
anonymousVisitorId?: string;
|
|
393
|
-
/**
|
|
454
|
+
/**
|
|
455
|
+
* ID of a site visitor that has logged in to the site.
|
|
456
|
+
* @format GUID
|
|
457
|
+
*/
|
|
394
458
|
memberId?: string;
|
|
395
|
-
/**
|
|
459
|
+
/**
|
|
460
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
461
|
+
* @format GUID
|
|
462
|
+
*/
|
|
396
463
|
wixUserId?: string;
|
|
397
|
-
/**
|
|
464
|
+
/**
|
|
465
|
+
* ID of an app.
|
|
466
|
+
* @format GUID
|
|
467
|
+
*/
|
|
398
468
|
appId?: string;
|
|
399
469
|
/** @readonly */
|
|
400
470
|
identityType?: WebhookIdentityType;
|
|
401
471
|
}
|
|
402
472
|
/** @oneof */
|
|
403
473
|
export interface IdentificationDataIdOneOf {
|
|
404
|
-
/**
|
|
474
|
+
/**
|
|
475
|
+
* ID of a site visitor that has not logged in to the site.
|
|
476
|
+
* @format GUID
|
|
477
|
+
*/
|
|
405
478
|
anonymousVisitorId?: string;
|
|
406
|
-
/**
|
|
479
|
+
/**
|
|
480
|
+
* ID of a site visitor that has logged in to the site.
|
|
481
|
+
* @format GUID
|
|
482
|
+
*/
|
|
407
483
|
memberId?: string;
|
|
408
|
-
/**
|
|
484
|
+
/**
|
|
485
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
486
|
+
* @format GUID
|
|
487
|
+
*/
|
|
409
488
|
wixUserId?: string;
|
|
410
|
-
/**
|
|
489
|
+
/**
|
|
490
|
+
* ID of an app.
|
|
491
|
+
* @format GUID
|
|
492
|
+
*/
|
|
411
493
|
appId?: string;
|
|
412
494
|
}
|
|
413
495
|
export declare enum WebhookIdentityType {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loyalty-v1-loyalty-earning-rule-earning-rules.types.js","sourceRoot":"","sources":["../../../src/loyalty-v1-loyalty-earning-rule-earning-rules.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"loyalty-v1-loyalty-earning-rule-earning-rules.types.js","sourceRoot":"","sources":["../../../src/loyalty-v1-loyalty-earning-rule-earning-rules.types.ts"],"names":[],"mappings":";;;AA6IA,IAAY,MAOX;AAPD,WAAY,MAAM;IAChB,0CAA0C;IAC1C,6BAAmB,CAAA;IACnB,oDAAoD;IACpD,2BAAiB,CAAA;IACjB,sDAAsD;IACtD,2BAAiB,CAAA;AACnB,CAAC,EAPW,MAAM,sBAAN,MAAM,QAOjB;AAYD,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACvC,wCAAwC;IACxC,8DAA6B,CAAA;IAC7B,8CAA8C;IAC9C,sDAAqB,CAAA;AACvB,CAAC,EALW,6BAA6B,6CAA7B,6BAA6B,QAKxC;AAyED,IAAY,IAOX;AAPD,WAAY,IAAI;IACd,4CAA4C;IAC5C,qCAA6B,CAAA;IAC7B,qCAAqC;IACrC,qCAA6B,CAAA;IAC7B,kCAAkC;IAClC,6BAAqB,CAAA;AACvB,CAAC,EAPW,IAAI,oBAAJ,IAAI,QAOf;AAwSD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}
|
|
@@ -9,16 +9,32 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
|
9
9
|
conversionRate?: ConversionRate;
|
|
10
10
|
/**
|
|
11
11
|
* Loyalty earning rule ID.
|
|
12
|
+
* @format GUID
|
|
12
13
|
* @readonly
|
|
13
14
|
*/
|
|
14
15
|
_id?: string | null;
|
|
15
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
|
|
18
|
+
* @format GUID
|
|
19
|
+
*/
|
|
16
20
|
sourceAppId?: string;
|
|
17
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
|
|
23
|
+
* @minLength 1
|
|
24
|
+
* @maxLength 80
|
|
25
|
+
*/
|
|
18
26
|
triggerAppId?: string;
|
|
19
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
|
|
29
|
+
* @minLength 1
|
|
30
|
+
* @maxLength 80
|
|
31
|
+
*/
|
|
20
32
|
triggerActivityType?: string;
|
|
21
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Name of the earning rule.
|
|
35
|
+
* @minLength 1
|
|
36
|
+
* @maxLength 50
|
|
37
|
+
*/
|
|
22
38
|
title?: string;
|
|
23
39
|
/** Current status of the earning rule. */
|
|
24
40
|
status?: Status;
|
|
@@ -52,12 +68,16 @@ export interface LoyaltyEarningRuleTypeOneOf {
|
|
|
52
68
|
}
|
|
53
69
|
/** Fixed amount type of earning rule. */
|
|
54
70
|
export interface FixedAmount {
|
|
55
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Fixed amount configurations for each tier.
|
|
73
|
+
* @maxSize 21
|
|
74
|
+
*/
|
|
56
75
|
configs?: FixedAmountConfig[];
|
|
57
76
|
}
|
|
58
77
|
export interface FixedAmountConfig {
|
|
59
78
|
/**
|
|
60
79
|
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction#terminology) is used.
|
|
80
|
+
* @format GUID
|
|
61
81
|
* @readonly
|
|
62
82
|
*/
|
|
63
83
|
tierId?: string | null;
|
|
@@ -76,6 +96,7 @@ export interface ConversionRate {
|
|
|
76
96
|
* Points are awarded proportionally to the amount spent.
|
|
77
97
|
*
|
|
78
98
|
* Formula: `(amount spent) / (money_amount * points)`.
|
|
99
|
+
* @maxSize 21
|
|
79
100
|
*/
|
|
80
101
|
configs?: ConversionRateConfig[];
|
|
81
102
|
/**
|
|
@@ -88,6 +109,7 @@ export interface ConversionRate {
|
|
|
88
109
|
export interface ConversionRateConfig {
|
|
89
110
|
/**
|
|
90
111
|
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction) is used.
|
|
112
|
+
* @format GUID
|
|
91
113
|
* @readonly
|
|
92
114
|
*/
|
|
93
115
|
tierId?: string | null;
|
|
@@ -144,7 +166,11 @@ export interface CreateLoyaltyEarningRuleResponse {
|
|
|
144
166
|
earningRule?: LoyaltyEarningRule;
|
|
145
167
|
}
|
|
146
168
|
export interface BulkCreateLoyaltyEarningRulesRequest {
|
|
147
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Earning rules to create.
|
|
171
|
+
* @minSize 1
|
|
172
|
+
* @maxSize 100
|
|
173
|
+
*/
|
|
148
174
|
earningRules: LoyaltyEarningRule[];
|
|
149
175
|
}
|
|
150
176
|
export interface BulkCreateLoyaltyEarningRulesResponse {
|
|
@@ -205,7 +231,11 @@ export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOn
|
|
|
205
231
|
fixedAmount?: FixedAmount;
|
|
206
232
|
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
207
233
|
conversionRate?: ConversionRate;
|
|
208
|
-
/**
|
|
234
|
+
/**
|
|
235
|
+
* Name of the earning rule.
|
|
236
|
+
* @minLength 1
|
|
237
|
+
* @maxLength 50
|
|
238
|
+
*/
|
|
209
239
|
title?: string;
|
|
210
240
|
}
|
|
211
241
|
/** @oneof */
|
|
@@ -220,7 +250,10 @@ export interface CreateCustomLoyaltyEarningRuleResponse {
|
|
|
220
250
|
earningRule?: LoyaltyEarningRule;
|
|
221
251
|
}
|
|
222
252
|
export interface GetLoyaltyEarningRuleRequest {
|
|
223
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* ID of the earning rule to retrieve.
|
|
255
|
+
* @format GUID
|
|
256
|
+
*/
|
|
224
257
|
_id: string;
|
|
225
258
|
}
|
|
226
259
|
export interface GetLoyaltyEarningRuleResponse {
|
|
@@ -236,7 +269,10 @@ export interface UpdateLoyaltyEarningRuleResponse {
|
|
|
236
269
|
earningRule?: LoyaltyEarningRule;
|
|
237
270
|
}
|
|
238
271
|
export interface DeleteLoyaltyEarningRuleRequest {
|
|
239
|
-
/**
|
|
272
|
+
/**
|
|
273
|
+
* ID of the earning rule to delete.
|
|
274
|
+
* @format GUID
|
|
275
|
+
*/
|
|
240
276
|
_id: string;
|
|
241
277
|
/**
|
|
242
278
|
* Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
|
|
@@ -247,7 +283,10 @@ export interface DeleteLoyaltyEarningRuleRequest {
|
|
|
247
283
|
export interface DeleteLoyaltyEarningRuleResponse {
|
|
248
284
|
}
|
|
249
285
|
export interface DeleteAutomationEarningRuleRequest {
|
|
250
|
-
/**
|
|
286
|
+
/**
|
|
287
|
+
* ID of the earning rule to delete.
|
|
288
|
+
* @format GUID
|
|
289
|
+
*/
|
|
251
290
|
_id: string;
|
|
252
291
|
}
|
|
253
292
|
export interface DeleteAutomationEarningRuleResponse {
|
|
@@ -263,19 +302,26 @@ export interface ListEarningRulesResponse {
|
|
|
263
302
|
earningRules?: LoyaltyEarningRule[];
|
|
264
303
|
}
|
|
265
304
|
export interface ListEarningRulesInTierRequest {
|
|
266
|
-
/**
|
|
305
|
+
/**
|
|
306
|
+
* ID of the tier for which the earning rules will be returned.
|
|
307
|
+
* @format GUID
|
|
308
|
+
*/
|
|
267
309
|
tierId?: string | null;
|
|
268
310
|
/** Pagination options. */
|
|
269
311
|
paging?: CursorPaging;
|
|
270
312
|
}
|
|
271
313
|
export interface CursorPaging {
|
|
272
|
-
/**
|
|
314
|
+
/**
|
|
315
|
+
* Maximum number of items to return in the results.
|
|
316
|
+
* @max 100
|
|
317
|
+
*/
|
|
273
318
|
limit?: number | null;
|
|
274
319
|
/**
|
|
275
320
|
* Pointer to the next or previous page in the list of results.
|
|
276
321
|
*
|
|
277
322
|
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
278
323
|
* Not relevant for the first request.
|
|
324
|
+
* @maxLength 16000
|
|
279
325
|
*/
|
|
280
326
|
cursor?: string | null;
|
|
281
327
|
}
|
|
@@ -298,9 +344,15 @@ export interface PagingMetadataV2 {
|
|
|
298
344
|
cursors?: Cursors;
|
|
299
345
|
}
|
|
300
346
|
export interface Cursors {
|
|
301
|
-
/**
|
|
347
|
+
/**
|
|
348
|
+
* Cursor string pointing to the next page in the list of results.
|
|
349
|
+
* @maxLength 16000
|
|
350
|
+
*/
|
|
302
351
|
next?: string | null;
|
|
303
|
-
/**
|
|
352
|
+
/**
|
|
353
|
+
* Cursor pointing to the previous page in the list of results.
|
|
354
|
+
* @maxLength 16000
|
|
355
|
+
*/
|
|
304
356
|
prev?: string | null;
|
|
305
357
|
}
|
|
306
358
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -376,9 +428,15 @@ export interface ActionEvent {
|
|
|
376
428
|
export interface Empty {
|
|
377
429
|
}
|
|
378
430
|
export interface MessageEnvelope {
|
|
379
|
-
/**
|
|
431
|
+
/**
|
|
432
|
+
* App instance ID.
|
|
433
|
+
* @format GUID
|
|
434
|
+
*/
|
|
380
435
|
instanceId?: string | null;
|
|
381
|
-
/**
|
|
436
|
+
/**
|
|
437
|
+
* Event type.
|
|
438
|
+
* @maxLength 150
|
|
439
|
+
*/
|
|
382
440
|
eventType?: string;
|
|
383
441
|
/** The identification type and identity data. */
|
|
384
442
|
identity?: IdentificationData;
|
|
@@ -386,26 +444,50 @@ export interface MessageEnvelope {
|
|
|
386
444
|
data?: string;
|
|
387
445
|
}
|
|
388
446
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
389
|
-
/**
|
|
447
|
+
/**
|
|
448
|
+
* ID of a site visitor that has not logged in to the site.
|
|
449
|
+
* @format GUID
|
|
450
|
+
*/
|
|
390
451
|
anonymousVisitorId?: string;
|
|
391
|
-
/**
|
|
452
|
+
/**
|
|
453
|
+
* ID of a site visitor that has logged in to the site.
|
|
454
|
+
* @format GUID
|
|
455
|
+
*/
|
|
392
456
|
memberId?: string;
|
|
393
|
-
/**
|
|
457
|
+
/**
|
|
458
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
459
|
+
* @format GUID
|
|
460
|
+
*/
|
|
394
461
|
wixUserId?: string;
|
|
395
|
-
/**
|
|
462
|
+
/**
|
|
463
|
+
* ID of an app.
|
|
464
|
+
* @format GUID
|
|
465
|
+
*/
|
|
396
466
|
appId?: string;
|
|
397
467
|
/** @readonly */
|
|
398
468
|
identityType?: WebhookIdentityType;
|
|
399
469
|
}
|
|
400
470
|
/** @oneof */
|
|
401
471
|
export interface IdentificationDataIdOneOf {
|
|
402
|
-
/**
|
|
472
|
+
/**
|
|
473
|
+
* ID of a site visitor that has not logged in to the site.
|
|
474
|
+
* @format GUID
|
|
475
|
+
*/
|
|
403
476
|
anonymousVisitorId?: string;
|
|
404
|
-
/**
|
|
477
|
+
/**
|
|
478
|
+
* ID of a site visitor that has logged in to the site.
|
|
479
|
+
* @format GUID
|
|
480
|
+
*/
|
|
405
481
|
memberId?: string;
|
|
406
|
-
/**
|
|
482
|
+
/**
|
|
483
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
484
|
+
* @format GUID
|
|
485
|
+
*/
|
|
407
486
|
wixUserId?: string;
|
|
408
|
-
/**
|
|
487
|
+
/**
|
|
488
|
+
* ID of an app.
|
|
489
|
+
* @format GUID
|
|
490
|
+
*/
|
|
409
491
|
appId?: string;
|
|
410
492
|
}
|
|
411
493
|
export declare enum WebhookIdentityType {
|
|
@@ -479,9 +561,15 @@ export interface ListEarningRulesResponseNonNullableFields {
|
|
|
479
561
|
earningRules: LoyaltyEarningRuleNonNullableFields[];
|
|
480
562
|
}
|
|
481
563
|
export interface BaseEventMetadata {
|
|
482
|
-
/**
|
|
564
|
+
/**
|
|
565
|
+
* App instance ID.
|
|
566
|
+
* @format GUID
|
|
567
|
+
*/
|
|
483
568
|
instanceId?: string | null;
|
|
484
|
-
/**
|
|
569
|
+
/**
|
|
570
|
+
* Event type.
|
|
571
|
+
* @maxLength 150
|
|
572
|
+
*/
|
|
485
573
|
eventType?: string;
|
|
486
574
|
/** The identification type and identity data. */
|
|
487
575
|
identity?: IdentificationData;
|
|
@@ -534,6 +622,8 @@ export interface LoyaltyEarningRuleCreatedEnvelope {
|
|
|
534
622
|
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
535
623
|
* @permissionScope Manage Loyalty
|
|
536
624
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
625
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
626
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
537
627
|
* @permissionId LOYALTY.READ_EARNING_RULES
|
|
538
628
|
* @webhook
|
|
539
629
|
* @eventType wix.loyalty.v1.loyalty_earning_rule_created
|
|
@@ -549,6 +639,8 @@ export interface LoyaltyEarningRuleDeletedEnvelope {
|
|
|
549
639
|
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
550
640
|
* @permissionScope Manage Loyalty
|
|
551
641
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
642
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
643
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
552
644
|
* @permissionId LOYALTY.READ_EARNING_RULES
|
|
553
645
|
* @webhook
|
|
554
646
|
* @eventType wix.loyalty.v1.loyalty_earning_rule_deleted
|
|
@@ -565,6 +657,8 @@ export interface LoyaltyEarningRuleUpdatedEnvelope {
|
|
|
565
657
|
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
566
658
|
* @permissionScope Manage Loyalty
|
|
567
659
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
660
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
661
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
568
662
|
* @permissionId LOYALTY.READ_EARNING_RULES
|
|
569
663
|
* @webhook
|
|
570
664
|
* @eventType wix.loyalty.v1.loyalty_earning_rule_updated
|
|
@@ -584,9 +678,12 @@ export declare function onLoyaltyEarningRuleUpdated(handler: (event: LoyaltyEarn
|
|
|
584
678
|
* @requiredField earningRule.title
|
|
585
679
|
* @requiredField earningRule.triggerActivityType
|
|
586
680
|
* @requiredField earningRule.triggerAppId
|
|
681
|
+
* @requiredField earningRule.type
|
|
587
682
|
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
588
683
|
* @permissionScope Manage Loyalty
|
|
589
684
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
685
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
686
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
590
687
|
* @applicableIdentity APP
|
|
591
688
|
* @returns Created earning rule.
|
|
592
689
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule
|
|
@@ -605,9 +702,12 @@ export declare function createLoyaltyEarningRule(earningRule: LoyaltyEarningRule
|
|
|
605
702
|
* @requiredField earningRules.title
|
|
606
703
|
* @requiredField earningRules.triggerActivityType
|
|
607
704
|
* @requiredField earningRules.triggerAppId
|
|
705
|
+
* @requiredField earningRules.type
|
|
608
706
|
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
609
707
|
* @permissionScope Manage Loyalty
|
|
610
708
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
709
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
710
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
611
711
|
* @applicableIdentity APP
|
|
612
712
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules
|
|
613
713
|
*/
|
|
@@ -622,6 +722,8 @@ export declare function bulkCreateLoyaltyEarningRules(earningRules: LoyaltyEarni
|
|
|
622
722
|
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
623
723
|
* @permissionScope Manage Loyalty
|
|
624
724
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
725
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
726
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
625
727
|
* @applicableIdentity APP
|
|
626
728
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule
|
|
627
729
|
*/
|
|
@@ -640,6 +742,8 @@ export interface CreateCustomLoyaltyEarningRuleOptions {
|
|
|
640
742
|
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
641
743
|
* @permissionScope Manage Loyalty
|
|
642
744
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
745
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
746
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
643
747
|
* @applicableIdentity APP
|
|
644
748
|
* @applicableIdentity VISITOR
|
|
645
749
|
* @returns Retrieved earning rule.
|
|
@@ -660,6 +764,8 @@ export declare function getLoyaltyEarningRule(_id: string): Promise<LoyaltyEarni
|
|
|
660
764
|
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
661
765
|
* @permissionScope Manage Loyalty
|
|
662
766
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
767
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
768
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
663
769
|
* @applicableIdentity APP
|
|
664
770
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule
|
|
665
771
|
*/
|
|
@@ -671,16 +777,32 @@ export interface UpdateLoyaltyEarningRule {
|
|
|
671
777
|
conversionRate?: ConversionRate;
|
|
672
778
|
/**
|
|
673
779
|
* Loyalty earning rule ID.
|
|
780
|
+
* @format GUID
|
|
674
781
|
* @readonly
|
|
675
782
|
*/
|
|
676
783
|
_id?: string | null;
|
|
677
|
-
/**
|
|
784
|
+
/**
|
|
785
|
+
* ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
|
|
786
|
+
* @format GUID
|
|
787
|
+
*/
|
|
678
788
|
sourceAppId?: string;
|
|
679
|
-
/**
|
|
789
|
+
/**
|
|
790
|
+
* ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
|
|
791
|
+
* @minLength 1
|
|
792
|
+
* @maxLength 80
|
|
793
|
+
*/
|
|
680
794
|
triggerAppId?: string;
|
|
681
|
-
/**
|
|
795
|
+
/**
|
|
796
|
+
* Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
|
|
797
|
+
* @minLength 1
|
|
798
|
+
* @maxLength 80
|
|
799
|
+
*/
|
|
682
800
|
triggerActivityType?: string;
|
|
683
|
-
/**
|
|
801
|
+
/**
|
|
802
|
+
* Name of the earning rule.
|
|
803
|
+
* @minLength 1
|
|
804
|
+
* @maxLength 50
|
|
805
|
+
*/
|
|
684
806
|
title?: string;
|
|
685
807
|
/** Current status of the earning rule. */
|
|
686
808
|
status?: Status;
|
|
@@ -713,6 +835,8 @@ export interface UpdateLoyaltyEarningRule {
|
|
|
713
835
|
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
714
836
|
* @permissionScope Manage Loyalty
|
|
715
837
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
838
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
839
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
716
840
|
* @applicableIdentity APP
|
|
717
841
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule
|
|
718
842
|
*/
|
|
@@ -734,6 +858,8 @@ export interface DeleteLoyaltyEarningRuleOptions {
|
|
|
734
858
|
* @permissionId LOYALTY.MANAGE_EARNING_RULES
|
|
735
859
|
* @permissionScope Manage Loyalty
|
|
736
860
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
861
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
862
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
737
863
|
* @applicableIdentity APP
|
|
738
864
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule
|
|
739
865
|
*/
|
|
@@ -750,6 +876,8 @@ export declare function deleteAutomationEarningRule(_id: string): Promise<void>;
|
|
|
750
876
|
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
751
877
|
* @permissionScope Manage Loyalty
|
|
752
878
|
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
879
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
880
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
753
881
|
* @applicableIdentity APP
|
|
754
882
|
* @applicableIdentity VISITOR
|
|
755
883
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules
|