@wix/auto_sdk_loyalty_earning-rules 1.0.7 → 1.0.8

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