@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.
Files changed (133) hide show
  1. package/build/index.d.mts +112 -0
  2. package/build/index.d.ts +112 -0
  3. package/build/index.js +732 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +694 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/internal/index.d.mts +112 -0
  8. package/build/internal/index.d.ts +112 -0
  9. package/build/internal/index.js +732 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +694 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. 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
  14. 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
  15. package/build/internal/meta.d.mts +322 -0
  16. package/build/internal/meta.d.ts +322 -0
  17. package/build/internal/meta.js +500 -0
  18. package/build/internal/meta.js.map +1 -0
  19. package/build/internal/meta.mjs +466 -0
  20. package/build/internal/meta.mjs.map +1 -0
  21. 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
  22. 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
  23. package/build/meta.d.mts +322 -0
  24. package/build/meta.d.ts +322 -0
  25. package/build/meta.js +500 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +466 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
  40. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -35
  41. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
  42. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
  43. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -353
  44. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
  45. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
  46. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -180
  47. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
  48. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
  49. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -93
  50. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
  51. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -37
  52. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  53. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -892
  54. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -400
  55. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
  66. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -28
  67. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
  68. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
  69. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -342
  70. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
  71. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
  72. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -146
  73. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
  74. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
  75. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -78
  76. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
  77. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -34
  78. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  79. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -892
  80. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -366
  81. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
  82. package/build/internal/cjs/index.d.ts +0 -1
  83. package/build/internal/cjs/index.js +0 -18
  84. package/build/internal/cjs/index.js.map +0 -1
  85. package/build/internal/cjs/index.typings.d.ts +0 -1
  86. package/build/internal/cjs/index.typings.js +0 -18
  87. package/build/internal/cjs/index.typings.js.map +0 -1
  88. package/build/internal/cjs/meta.d.ts +0 -1
  89. package/build/internal/cjs/meta.js +0 -18
  90. package/build/internal/cjs/meta.js.map +0 -1
  91. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
  92. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -35
  93. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
  94. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
  95. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -353
  96. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
  97. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
  98. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -180
  99. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
  100. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
  101. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -93
  102. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
  103. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -37
  104. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  105. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -902
  106. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -400
  107. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
  108. package/build/internal/es/index.d.ts +0 -1
  109. package/build/internal/es/index.js +0 -2
  110. package/build/internal/es/index.js.map +0 -1
  111. package/build/internal/es/index.typings.d.ts +0 -1
  112. package/build/internal/es/index.typings.js +0 -2
  113. package/build/internal/es/index.typings.js.map +0 -1
  114. package/build/internal/es/meta.d.ts +0 -1
  115. package/build/internal/es/meta.js +0 -2
  116. package/build/internal/es/meta.js.map +0 -1
  117. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
  118. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -28
  119. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
  120. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
  121. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -342
  122. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
  123. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
  124. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -146
  125. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
  126. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
  127. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -78
  128. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
  129. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -34
  130. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  131. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -902
  132. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -366
  133. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
@@ -1,902 +0,0 @@
1
- /**
2
- * A loyalty earning rule defines how customers earn points in a loyalty program.
3
- * You can create rules for different activities, such as making purchases.
4
- */
5
- export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
6
- /** Fixed amount of points awarded for each qualifying activity. */
7
- fixedAmount?: FixedAmount;
8
- /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
9
- conversionRate?: ConversionRate;
10
- /**
11
- * Loyalty earning rule ID.
12
- * @format GUID
13
- * @readonly
14
- */
15
- _id?: string | null;
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
- */
20
- sourceAppId?: string;
21
- /**
22
- * ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
23
- * @minLength 1
24
- * @maxLength 80
25
- */
26
- triggerAppId?: string;
27
- /**
28
- * Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
29
- * @minLength 1
30
- * @maxLength 80
31
- */
32
- triggerActivityType?: string;
33
- /**
34
- * Name of the earning rule.
35
- * @minLength 1
36
- * @maxLength 50
37
- */
38
- title?: string;
39
- /** Current status of the earning rule. */
40
- status?: Status;
41
- /**
42
- * Revision number, incremented by 1 each time the earning rule is updated.
43
- * Pass the latest revision when updating to prevent conflicting changes.
44
- */
45
- revision?: string | null;
46
- /**
47
- * Date and time the earning rule was created.
48
- * @readonly
49
- */
50
- _createdDate?: Date | null;
51
- /**
52
- * Date and time the earning rule was last updated.
53
- * @readonly
54
- */
55
- _updatedDate?: Date | null;
56
- /**
57
- * Additional metadata about the earning rule.
58
- * @readonly
59
- */
60
- metadata?: Metadata;
61
- }
62
- /** @oneof */
63
- export interface LoyaltyEarningRuleTypeOneOf {
64
- /** Fixed amount of points awarded for each qualifying activity. */
65
- fixedAmount?: FixedAmount;
66
- /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
67
- conversionRate?: ConversionRate;
68
- }
69
- /** Fixed amount type of earning rule. */
70
- export interface FixedAmount {
71
- /**
72
- * Fixed amount configurations for each tier.
73
- * @maxSize 21
74
- */
75
- configs?: FixedAmountConfig[];
76
- }
77
- export interface FixedAmountConfig {
78
- /**
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
81
- * @readonly
82
- */
83
- tierId?: string | null;
84
- /** Number of points to award. */
85
- points?: number;
86
- }
87
- /**
88
- * Conversion rate type of earning rule.
89
- * Customers earn points based on the amount spent.
90
- * For example, for every $10 spent, a customer might earn 1 point.
91
- */
92
- export interface ConversionRate {
93
- /**
94
- * Conversion rate configurations for each tier.
95
- *
96
- * Points are awarded proportionally to the amount spent.
97
- *
98
- * Formula: `(amount spent) / (money_amount * points)`.
99
- * @maxSize 21
100
- */
101
- configs?: ConversionRateConfig[];
102
- /**
103
- * Specifies which field in the Wix automations trigger payload [REST](https://dev.wix.com/docs/rest/business-management/automations/introduction#how-do-automations-work)|[SDK](https://dev.wix.com/docs/sdk/backend-modules/automations/triggered-events/reporting-and-canceling-events) to use for calculating points in conversion rate rules.
104
- * For example, if set to "priceSummary.totalAmount", the rule uses the total order amount to calculate loyalty points to be awarded.
105
- * This field is only applicable for automated earning rules.
106
- */
107
- field?: string | null;
108
- }
109
- export interface ConversionRateConfig {
110
- /**
111
- * Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction) is used.
112
- * @format GUID
113
- * @readonly
114
- */
115
- tierId?: string | null;
116
- /**
117
- * The amount of money used as a reference for point calculation.
118
- * Points are awarded proportionally to the amount spent.
119
- *
120
- * For example, if set to 10, 1 point is awarded for every 10 units of currency spent (assuming `points` is set to 1).
121
- *
122
- * Formula for points is: `(amount spent) / (money_amount * points)`.
123
- */
124
- moneyAmount?: number;
125
- /**
126
- * Points given for the specified `money_amount`.
127
- * Works in conjunction with `money_amount` to define the earning rule.
128
- *
129
- * For example: If `money_amount` is 20 and `points` is 10:
130
- * - Spending 10 units of currency earns 5 points
131
- * - Spending 20 units of currency earns 10 points
132
- * - Spending 30 units of currency earns 15 points
133
- */
134
- points?: number;
135
- }
136
- export declare enum Status {
137
- /** Status is unknown or not specified. */
138
- UNKNOWN = "UNKNOWN",
139
- /** Earning rule is active and can assign points. */
140
- ACTIVE = "ACTIVE",
141
- /** Earning rule is paused and can't assign points. */
142
- PAUSED = "PAUSED"
143
- }
144
- export interface Metadata {
145
- /** Whether the earning rule can be deleted. */
146
- canBeDeleted?: boolean;
147
- /**
148
- * Information about the type of custom earning rule.
149
- * @internal
150
- */
151
- ruleTypeTag?: LoyaltyEarningRuleTypeTag;
152
- }
153
- export interface LoyaltyEarningRuleTypeTag {
154
- /** Type of custom earning rule. */
155
- ruleType?: LoyaltyEarningRuleTypeTagType;
156
- }
157
- export declare enum LoyaltyEarningRuleTypeTagType {
158
- /** Type is unknown or not specified. */
159
- UNKNOWN_TYPE = "UNKNOWN_TYPE",
160
- /** Earning rule for a customer's birthday. */
161
- BIRTHDAY = "BIRTHDAY"
162
- }
163
- export interface EarningRuleDisabled {
164
- }
165
- export interface CreateLoyaltyEarningRuleRequest {
166
- /** Earning rule to create. */
167
- earningRule: LoyaltyEarningRule;
168
- }
169
- export interface CreateLoyaltyEarningRuleResponse {
170
- /** Created earning rule. */
171
- earningRule?: LoyaltyEarningRule;
172
- }
173
- export interface BulkCreateLoyaltyEarningRulesRequest {
174
- /**
175
- * Earning rules to create.
176
- * @minSize 1
177
- * @maxSize 100
178
- */
179
- earningRules: LoyaltyEarningRule[];
180
- }
181
- export interface BulkCreateLoyaltyEarningRulesResponse {
182
- /** Created earning rules. */
183
- results?: BulkLoyaltyEarningRuleResult[];
184
- /** Additional metadata for the created earning rules. */
185
- bulkActionMetadata?: BulkActionMetadata;
186
- }
187
- export interface BulkLoyaltyEarningRuleResult {
188
- /** Additional metadata for the created earning rules. */
189
- itemMetadata?: ItemMetadata;
190
- /** Created earning rule. */
191
- item?: LoyaltyEarningRule;
192
- }
193
- export interface ItemMetadata {
194
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
195
- _id?: string | null;
196
- /** Index of the item within the request array. Allows for correlation between request and response items. */
197
- originalIndex?: number;
198
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
199
- success?: boolean;
200
- /** Details about the error in case of failure. */
201
- error?: ApplicationError;
202
- }
203
- export interface ApplicationError {
204
- /** Error code. */
205
- code?: string;
206
- /** Description of the error. */
207
- description?: string;
208
- /** Data related to the error. */
209
- data?: Record<string, any> | null;
210
- }
211
- export interface BulkActionMetadata {
212
- /** Number of items that were successfully processed. */
213
- totalSuccesses?: number;
214
- /** Number of items that couldn't be processed. */
215
- totalFailures?: number;
216
- /** Number of failures without details because detailed failure threshold was exceeded. */
217
- undetailedFailures?: number;
218
- }
219
- export interface CreateCustomLoyaltyEarningRuleRequest {
220
- /** Type of the custom earning rule. */
221
- type: Type;
222
- /** Custom earning rule to create. */
223
- earningRule?: CustomLoyaltyEarningRule;
224
- }
225
- export declare enum Type {
226
- /** Unknown type. This value is not used. */
227
- UNKNOWN_TYPE = "UNKNOWN_TYPE",
228
- /** Earning rule for social media. */
229
- SOCIAL_MEDIA = "SOCIAL_MEDIA",
230
- /** Earning rule for birthdays. */
231
- BIRTHDAY = "BIRTHDAY"
232
- }
233
- /** Used in CreateCustomLoyaltyEarningRuleRequest */
234
- export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
235
- /** Fixed amount of points awarded for each qualifying activity. */
236
- fixedAmount?: FixedAmount;
237
- /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
238
- conversionRate?: ConversionRate;
239
- /**
240
- * Name of the earning rule.
241
- * @minLength 1
242
- * @maxLength 50
243
- */
244
- title?: string;
245
- }
246
- /** @oneof */
247
- export interface CustomLoyaltyEarningRuleTypeOneOf {
248
- /** Fixed amount of points awarded for each qualifying activity. */
249
- fixedAmount?: FixedAmount;
250
- /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
251
- conversionRate?: ConversionRate;
252
- }
253
- export interface CreateCustomLoyaltyEarningRuleResponse {
254
- /** Created earning rule. */
255
- earningRule?: LoyaltyEarningRule;
256
- }
257
- export interface GetLoyaltyEarningRuleRequest {
258
- /**
259
- * ID of the earning rule to retrieve.
260
- * @format GUID
261
- */
262
- _id: string;
263
- }
264
- export interface GetLoyaltyEarningRuleResponse {
265
- /** Retrieved earning rule. */
266
- earningRule?: LoyaltyEarningRule;
267
- }
268
- export interface UpdateLoyaltyEarningRuleRequest {
269
- /** Earning rule to update. */
270
- earningRule: LoyaltyEarningRule;
271
- }
272
- export interface UpdateLoyaltyEarningRuleResponse {
273
- /** The updated earning rule. */
274
- earningRule?: LoyaltyEarningRule;
275
- }
276
- export interface DeleteLoyaltyEarningRuleRequest {
277
- /**
278
- * ID of the earning rule to delete.
279
- * @format GUID
280
- */
281
- _id: string;
282
- /**
283
- * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
284
- * Pass the latest revision when updating to prevent conflicting changes.
285
- */
286
- revision?: string;
287
- }
288
- export interface DeleteLoyaltyEarningRuleResponse {
289
- }
290
- export interface DeleteAutomationEarningRuleRequest {
291
- /**
292
- * ID of the earning rule to delete.
293
- * @format GUID
294
- */
295
- _id: string;
296
- }
297
- export interface DeleteAutomationEarningRuleResponse {
298
- }
299
- export interface ListEarningRulesRequest {
300
- /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
301
- triggerAppId?: string | null;
302
- /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
303
- triggerActivityType?: string | null;
304
- }
305
- export interface ListEarningRulesResponse {
306
- /** Retrieved earning rules. */
307
- earningRules?: LoyaltyEarningRule[];
308
- }
309
- export interface ListEarningRulesInTierRequest {
310
- /**
311
- * ID of the tier for which the earning rules will be returned.
312
- * @format GUID
313
- */
314
- tierId?: string | null;
315
- /** Pagination options. */
316
- paging?: CursorPaging;
317
- }
318
- export interface CursorPaging {
319
- /**
320
- * Maximum number of items to return in the results.
321
- * @max 100
322
- */
323
- limit?: number | null;
324
- /**
325
- * Pointer to the next or previous page in the list of results.
326
- *
327
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
328
- * Not relevant for the first request.
329
- * @maxLength 16000
330
- */
331
- cursor?: string | null;
332
- }
333
- export interface ListEarningRulesInTierResponse {
334
- /** Retrieved earning rules. */
335
- earningRules?: LoyaltyEarningRule[];
336
- /** Details on the paged set of results returned. */
337
- pagingMetadata?: PagingMetadataV2;
338
- }
339
- export interface PagingMetadataV2 {
340
- /** Number of items returned in the response. */
341
- count?: number | null;
342
- /** Offset that was requested. */
343
- offset?: number | null;
344
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
345
- total?: number | null;
346
- /** Flag that indicates the server failed to calculate the `total` field. */
347
- tooManyToCount?: boolean | null;
348
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
349
- cursors?: Cursors;
350
- }
351
- export interface Cursors {
352
- /**
353
- * Cursor string pointing to the next page in the list of results.
354
- * @maxLength 16000
355
- */
356
- next?: string | null;
357
- /**
358
- * Cursor pointing to the previous page in the list of results.
359
- * @maxLength 16000
360
- */
361
- prev?: string | null;
362
- }
363
- export interface DomainEvent extends DomainEventBodyOneOf {
364
- createdEvent?: EntityCreatedEvent;
365
- updatedEvent?: EntityUpdatedEvent;
366
- deletedEvent?: EntityDeletedEvent;
367
- actionEvent?: ActionEvent;
368
- /**
369
- * Unique event ID.
370
- * Allows clients to ignore duplicate webhooks.
371
- */
372
- _id?: string;
373
- /**
374
- * Assumes actions are also always typed to an entity_type
375
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
376
- */
377
- entityFqdn?: string;
378
- /**
379
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
380
- * This is although the created/updated/deleted notion is duplication of the oneof types
381
- * Example: created/updated/deleted/started/completed/email_opened
382
- */
383
- slug?: string;
384
- /** ID of the entity associated with the event. */
385
- entityId?: string;
386
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
387
- eventTime?: Date | null;
388
- /**
389
- * Whether the event was triggered as a result of a privacy regulation application
390
- * (for example, GDPR).
391
- */
392
- triggeredByAnonymizeRequest?: boolean | null;
393
- /** If present, indicates the action that triggered the event. */
394
- originatedFrom?: string | null;
395
- /**
396
- * A sequence number defining the order of updates to the underlying entity.
397
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
398
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
399
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
400
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
401
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
402
- */
403
- entityEventSequence?: string | null;
404
- }
405
- /** @oneof */
406
- export interface DomainEventBodyOneOf {
407
- createdEvent?: EntityCreatedEvent;
408
- updatedEvent?: EntityUpdatedEvent;
409
- deletedEvent?: EntityDeletedEvent;
410
- actionEvent?: ActionEvent;
411
- }
412
- export interface EntityCreatedEvent {
413
- entity?: string;
414
- }
415
- export interface RestoreInfo {
416
- deletedDate?: Date | null;
417
- }
418
- export interface EntityUpdatedEvent {
419
- /**
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.
421
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
422
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
423
- */
424
- currentEntity?: string;
425
- }
426
- export interface EntityDeletedEvent {
427
- /** Entity that was deleted */
428
- deletedEntity?: string | null;
429
- }
430
- export interface ActionEvent {
431
- body?: string;
432
- }
433
- export interface Empty {
434
- }
435
- export interface MessageEnvelope {
436
- /**
437
- * App instance ID.
438
- * @format GUID
439
- */
440
- instanceId?: string | null;
441
- /**
442
- * Event type.
443
- * @maxLength 150
444
- */
445
- eventType?: string;
446
- /** The identification type and identity data. */
447
- identity?: IdentificationData;
448
- /** Stringify payload. */
449
- data?: string;
450
- }
451
- export interface IdentificationData extends IdentificationDataIdOneOf {
452
- /**
453
- * ID of a site visitor that has not logged in to the site.
454
- * @format GUID
455
- */
456
- anonymousVisitorId?: string;
457
- /**
458
- * ID of a site visitor that has logged in to the site.
459
- * @format GUID
460
- */
461
- memberId?: string;
462
- /**
463
- * ID of a Wix user (site owner, contributor, etc.).
464
- * @format GUID
465
- */
466
- wixUserId?: string;
467
- /**
468
- * ID of an app.
469
- * @format GUID
470
- */
471
- appId?: string;
472
- /** @readonly */
473
- identityType?: WebhookIdentityType;
474
- }
475
- /** @oneof */
476
- export interface IdentificationDataIdOneOf {
477
- /**
478
- * ID of a site visitor that has not logged in to the site.
479
- * @format GUID
480
- */
481
- anonymousVisitorId?: string;
482
- /**
483
- * ID of a site visitor that has logged in to the site.
484
- * @format GUID
485
- */
486
- memberId?: string;
487
- /**
488
- * ID of a Wix user (site owner, contributor, etc.).
489
- * @format GUID
490
- */
491
- wixUserId?: string;
492
- /**
493
- * ID of an app.
494
- * @format GUID
495
- */
496
- appId?: string;
497
- }
498
- export declare enum WebhookIdentityType {
499
- UNKNOWN = "UNKNOWN",
500
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
501
- MEMBER = "MEMBER",
502
- WIX_USER = "WIX_USER",
503
- APP = "APP"
504
- }
505
- interface FixedAmountConfigNonNullableFields {
506
- points: number;
507
- }
508
- interface FixedAmountNonNullableFields {
509
- configs: FixedAmountConfigNonNullableFields[];
510
- }
511
- interface ConversionRateConfigNonNullableFields {
512
- moneyAmount: number;
513
- points: number;
514
- }
515
- interface ConversionRateNonNullableFields {
516
- configs: ConversionRateConfigNonNullableFields[];
517
- }
518
- interface LoyaltyEarningRuleTypeTagNonNullableFields {
519
- ruleType: LoyaltyEarningRuleTypeTagType;
520
- }
521
- interface MetadataNonNullableFields {
522
- canBeDeleted: boolean;
523
- /** @internal */
524
- ruleTypeTag?: LoyaltyEarningRuleTypeTagNonNullableFields;
525
- }
526
- export interface LoyaltyEarningRuleNonNullableFields {
527
- fixedAmount?: FixedAmountNonNullableFields;
528
- conversionRate?: ConversionRateNonNullableFields;
529
- sourceAppId: string;
530
- triggerAppId: string;
531
- triggerActivityType: string;
532
- title: string;
533
- status: Status;
534
- metadata?: MetadataNonNullableFields;
535
- }
536
- export interface CreateLoyaltyEarningRuleResponseNonNullableFields {
537
- earningRule?: LoyaltyEarningRuleNonNullableFields;
538
- }
539
- interface ApplicationErrorNonNullableFields {
540
- code: string;
541
- description: string;
542
- }
543
- interface ItemMetadataNonNullableFields {
544
- originalIndex: number;
545
- success: boolean;
546
- error?: ApplicationErrorNonNullableFields;
547
- }
548
- interface BulkLoyaltyEarningRuleResultNonNullableFields {
549
- itemMetadata?: ItemMetadataNonNullableFields;
550
- item?: LoyaltyEarningRuleNonNullableFields;
551
- }
552
- interface BulkActionMetadataNonNullableFields {
553
- totalSuccesses: number;
554
- totalFailures: number;
555
- undetailedFailures: number;
556
- }
557
- export interface BulkCreateLoyaltyEarningRulesResponseNonNullableFields {
558
- results: BulkLoyaltyEarningRuleResultNonNullableFields[];
559
- bulkActionMetadata?: BulkActionMetadataNonNullableFields;
560
- }
561
- export interface CreateCustomLoyaltyEarningRuleResponseNonNullableFields {
562
- earningRule?: LoyaltyEarningRuleNonNullableFields;
563
- }
564
- export interface GetLoyaltyEarningRuleResponseNonNullableFields {
565
- earningRule?: LoyaltyEarningRuleNonNullableFields;
566
- }
567
- export interface UpdateLoyaltyEarningRuleResponseNonNullableFields {
568
- earningRule?: LoyaltyEarningRuleNonNullableFields;
569
- }
570
- export interface ListEarningRulesResponseNonNullableFields {
571
- earningRules: LoyaltyEarningRuleNonNullableFields[];
572
- }
573
- export interface BaseEventMetadata {
574
- /**
575
- * App instance ID.
576
- * @format GUID
577
- */
578
- instanceId?: string | null;
579
- /**
580
- * Event type.
581
- * @maxLength 150
582
- */
583
- eventType?: string;
584
- /** The identification type and identity data. */
585
- identity?: IdentificationData;
586
- }
587
- export interface EventMetadata extends BaseEventMetadata {
588
- /**
589
- * Unique event ID.
590
- * Allows clients to ignore duplicate webhooks.
591
- */
592
- _id?: string;
593
- /**
594
- * Assumes actions are also always typed to an entity_type
595
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
596
- */
597
- entityFqdn?: string;
598
- /**
599
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
600
- * This is although the created/updated/deleted notion is duplication of the oneof types
601
- * Example: created/updated/deleted/started/completed/email_opened
602
- */
603
- slug?: string;
604
- /** ID of the entity associated with the event. */
605
- entityId?: string;
606
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
607
- eventTime?: Date | null;
608
- /**
609
- * Whether the event was triggered as a result of a privacy regulation application
610
- * (for example, GDPR).
611
- */
612
- triggeredByAnonymizeRequest?: boolean | null;
613
- /** If present, indicates the action that triggered the event. */
614
- originatedFrom?: string | null;
615
- /**
616
- * A sequence number defining the order of updates to the underlying entity.
617
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
618
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
619
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
620
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
621
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
622
- */
623
- entityEventSequence?: string | null;
624
- }
625
- export interface LoyaltyEarningRuleCreatedEnvelope {
626
- entity: LoyaltyEarningRule;
627
- metadata: EventMetadata;
628
- }
629
- /**
630
- * Triggered when an earning rule is created.
631
- * @permissionScope Read Loyalty
632
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
633
- * @permissionScope Manage Loyalty
634
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
635
- * @permissionScope Manage Restaurants - all permissions
636
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
637
- * @permissionId LOYALTY.READ_EARNING_RULES
638
- * @webhook
639
- * @eventType wix.loyalty.v1.loyalty_earning_rule_created
640
- * @slug created
641
- */
642
- export declare function onLoyaltyEarningRuleCreated(handler: (event: LoyaltyEarningRuleCreatedEnvelope) => void | Promise<void>): void;
643
- export interface LoyaltyEarningRuleDeletedEnvelope {
644
- metadata: EventMetadata;
645
- }
646
- /**
647
- * Triggered when an earning rule is deleted.
648
- * @permissionScope Read Loyalty
649
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
650
- * @permissionScope Manage Loyalty
651
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
652
- * @permissionScope Manage Restaurants - all permissions
653
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
654
- * @permissionId LOYALTY.READ_EARNING_RULES
655
- * @webhook
656
- * @eventType wix.loyalty.v1.loyalty_earning_rule_deleted
657
- * @slug deleted
658
- */
659
- export declare function onLoyaltyEarningRuleDeleted(handler: (event: LoyaltyEarningRuleDeletedEnvelope) => void | Promise<void>): void;
660
- export interface LoyaltyEarningRuleUpdatedEnvelope {
661
- entity: LoyaltyEarningRule;
662
- metadata: EventMetadata;
663
- }
664
- /**
665
- * Triggered when an earning rule is updated.
666
- * @permissionScope Read Loyalty
667
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
668
- * @permissionScope Manage Loyalty
669
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
670
- * @permissionScope Manage Restaurants - all permissions
671
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
672
- * @permissionId LOYALTY.READ_EARNING_RULES
673
- * @webhook
674
- * @eventType wix.loyalty.v1.loyalty_earning_rule_updated
675
- * @slug updated
676
- */
677
- export declare function onLoyaltyEarningRuleUpdated(handler: (event: LoyaltyEarningRuleUpdatedEnvelope) => void | Promise<void>): void;
678
- /**
679
- * Creates a non-automated earning rule.
680
- *
681
- * >**Note**: You can only create non-automated earning rules from a supported list.
682
- * For the supported list of services, see the introduction.
683
- * @param earningRule - Earning rule to create.
684
- * @public
685
- * @requiredField earningRule
686
- * @requiredField earningRule.sourceAppId
687
- * @requiredField earningRule.status
688
- * @requiredField earningRule.title
689
- * @requiredField earningRule.triggerActivityType
690
- * @requiredField earningRule.triggerAppId
691
- * @requiredField earningRule.type
692
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
693
- * @permissionScope Manage Loyalty
694
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
695
- * @permissionScope Manage Restaurants - all permissions
696
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
697
- * @applicableIdentity APP
698
- * @returns Created earning rule.
699
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule
700
- */
701
- export declare function createLoyaltyEarningRule(earningRule: LoyaltyEarningRule): Promise<LoyaltyEarningRule & LoyaltyEarningRuleNonNullableFields>;
702
- /**
703
- * Creates multiple non-automated earning rules.
704
- *
705
- * >**Note**: You can only create non-automated earning rules from a supported list.
706
- * For the supported list of services, see the introduction.
707
- * @param earningRules - Earning rules to create.
708
- * @public
709
- * @requiredField earningRules
710
- * @requiredField earningRules.sourceAppId
711
- * @requiredField earningRules.status
712
- * @requiredField earningRules.title
713
- * @requiredField earningRules.triggerActivityType
714
- * @requiredField earningRules.triggerAppId
715
- * @requiredField earningRules.type
716
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
717
- * @permissionScope Manage Loyalty
718
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
719
- * @permissionScope Manage Restaurants - all permissions
720
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
721
- * @applicableIdentity APP
722
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules
723
- */
724
- export declare function bulkCreateLoyaltyEarningRules(earningRules: LoyaltyEarningRule[]): Promise<BulkCreateLoyaltyEarningRulesResponse & BulkCreateLoyaltyEarningRulesResponseNonNullableFields>;
725
- /**
726
- * Creates a custom automated earning rule.
727
- *
728
- * To learn more about the automated rules, read the introduction.
729
- * @param type - Type of the custom earning rule.
730
- * @public
731
- * @requiredField type
732
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
733
- * @permissionScope Manage Loyalty
734
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
735
- * @permissionScope Manage Restaurants - all permissions
736
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
737
- * @applicableIdentity APP
738
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule
739
- */
740
- export declare function createCustomLoyaltyEarningRule(type: Type, options?: CreateCustomLoyaltyEarningRuleOptions): Promise<CreateCustomLoyaltyEarningRuleResponse & CreateCustomLoyaltyEarningRuleResponseNonNullableFields>;
741
- export interface CreateCustomLoyaltyEarningRuleOptions {
742
- /** Custom earning rule to create. */
743
- earningRule?: CustomLoyaltyEarningRule;
744
- }
745
- /**
746
- * Retrieves a specified non-automated earning rule.
747
- * @param _id - ID of the earning rule to retrieve.
748
- * @public
749
- * @requiredField _id
750
- * @permissionId LOYALTY.READ_EARNING_RULES
751
- * @permissionScope Read Loyalty
752
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
753
- * @permissionScope Manage Loyalty
754
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
755
- * @permissionScope Manage Restaurants - all permissions
756
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
757
- * @applicableIdentity APP
758
- * @applicableIdentity VISITOR
759
- * @returns Retrieved earning rule.
760
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule
761
- */
762
- export declare function getLoyaltyEarningRule(_id: string): Promise<LoyaltyEarningRule & LoyaltyEarningRuleNonNullableFields>;
763
- /**
764
- * Updates an earning rule.
765
- *
766
- * Supports partial updates.
767
- *
768
- * Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,
769
- * the current revision must be passed when updating the earning rule.
770
- * @param _id - Loyalty earning rule ID.
771
- * @public
772
- * @requiredField _id
773
- * @requiredField earningRule
774
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
775
- * @permissionScope Manage Loyalty
776
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
777
- * @permissionScope Manage Restaurants - all permissions
778
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
779
- * @applicableIdentity APP
780
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule
781
- */
782
- export declare function updateLoyaltyEarningRule(_id: string | null, earningRule: UpdateLoyaltyEarningRule): Promise<UpdateLoyaltyEarningRuleResponse & UpdateLoyaltyEarningRuleResponseNonNullableFields>;
783
- export interface UpdateLoyaltyEarningRule {
784
- /** Fixed amount of points awarded for each qualifying activity. */
785
- fixedAmount?: FixedAmount;
786
- /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
787
- conversionRate?: ConversionRate;
788
- /**
789
- * Loyalty earning rule ID.
790
- * @format GUID
791
- * @readonly
792
- */
793
- _id?: string | null;
794
- /**
795
- * ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
796
- * @format GUID
797
- */
798
- sourceAppId?: string;
799
- /**
800
- * ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
801
- * @minLength 1
802
- * @maxLength 80
803
- */
804
- triggerAppId?: string;
805
- /**
806
- * Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
807
- * @minLength 1
808
- * @maxLength 80
809
- */
810
- triggerActivityType?: string;
811
- /**
812
- * Name of the earning rule.
813
- * @minLength 1
814
- * @maxLength 50
815
- */
816
- title?: string;
817
- /** Current status of the earning rule. */
818
- status?: Status;
819
- /**
820
- * Revision number, incremented by 1 each time the earning rule is updated.
821
- * Pass the latest revision when updating to prevent conflicting changes.
822
- */
823
- revision?: string | null;
824
- /**
825
- * Date and time the earning rule was created.
826
- * @readonly
827
- */
828
- _createdDate?: Date | null;
829
- /**
830
- * Date and time the earning rule was last updated.
831
- * @readonly
832
- */
833
- _updatedDate?: Date | null;
834
- /**
835
- * Additional metadata about the earning rule.
836
- * @readonly
837
- */
838
- metadata?: Metadata;
839
- }
840
- /**
841
- * Deletes a non-automated earning rule.
842
- * @param _id - ID of the earning rule to delete.
843
- * @public
844
- * @requiredField _id
845
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
846
- * @permissionScope Manage Loyalty
847
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
848
- * @permissionScope Manage Restaurants - all permissions
849
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
850
- * @applicableIdentity APP
851
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule
852
- */
853
- export declare function deleteLoyaltyEarningRule(_id: string, options?: DeleteLoyaltyEarningRuleOptions): Promise<void>;
854
- export interface DeleteLoyaltyEarningRuleOptions {
855
- /**
856
- * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
857
- * Pass the latest revision when updating to prevent conflicting changes.
858
- */
859
- revision?: string;
860
- }
861
- /**
862
- * Deletes a custom automated earning rule.
863
- *
864
- * > **Note:** Pre-installed automated rules can only be paused, not deleted.
865
- * @param _id - ID of the earning rule to delete.
866
- * @public
867
- * @requiredField _id
868
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
869
- * @permissionScope Manage Loyalty
870
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
871
- * @permissionScope Manage Restaurants - all permissions
872
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
873
- * @applicableIdentity APP
874
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule
875
- */
876
- export declare function deleteAutomationEarningRule(_id: string): Promise<void>;
877
- /**
878
- * Retrieves a list of earning rules.
879
- *
880
- * Returns both automated and non-automated earning rules.
881
- *
882
- * You can filter the results by `triggerAppId` or `triggerActivityType`.
883
- * @public
884
- * @permissionId LOYALTY.READ_EARNING_RULES
885
- * @permissionScope Read Loyalty
886
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
887
- * @permissionScope Manage Loyalty
888
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
889
- * @permissionScope Manage Restaurants - all permissions
890
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
891
- * @applicableIdentity APP
892
- * @applicableIdentity VISITOR
893
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules
894
- */
895
- export declare function listEarningRules(options?: ListEarningRulesOptions): Promise<ListEarningRulesResponse & ListEarningRulesResponseNonNullableFields>;
896
- export interface ListEarningRulesOptions {
897
- /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
898
- triggerAppId?: string | null;
899
- /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
900
- triggerActivityType?: string | null;
901
- }
902
- export {};