@wix/auto_sdk_loyalty_earning-rules 1.0.3 → 1.0.5

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/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/{cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts → internal/loyalty-v1-loyalty-earning-rule-earning-rules.universal-DOjaPKYu.d.mts} +67 -294
  14. package/build/{es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts → internal/loyalty-v1-loyalty-earning-rule-earning-rules.universal-DOjaPKYu.d.ts} +67 -294
  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 +14 -13
  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.js +0 -384
  54. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/package.json +0 -3
  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.js +0 -350
  80. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -1
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
  91. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -35
  92. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
  93. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
  94. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -353
  95. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
  96. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
  97. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -180
  98. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
  99. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
  100. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -93
  101. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
  102. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +0 -570
  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 -880
  106. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -384
  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.d.ts +0 -570
  130. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -34
  131. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  132. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -880
  133. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -350
  134. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  * A loyalty earning rule defines how customers earn points in a loyalty program.
3
3
  * You can create rules for different activities, such as making purchases.
4
4
  */
5
- export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
5
+ interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
6
6
  /** Fixed amount of points awarded for each qualifying activity. */
7
7
  fixedAmount?: FixedAmount;
8
8
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
@@ -60,21 +60,21 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
60
60
  metadata?: Metadata;
61
61
  }
62
62
  /** @oneof */
63
- export interface LoyaltyEarningRuleTypeOneOf {
63
+ interface LoyaltyEarningRuleTypeOneOf {
64
64
  /** Fixed amount of points awarded for each qualifying activity. */
65
65
  fixedAmount?: FixedAmount;
66
66
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
67
67
  conversionRate?: ConversionRate;
68
68
  }
69
69
  /** Fixed amount type of earning rule. */
70
- export interface FixedAmount {
70
+ interface FixedAmount {
71
71
  /**
72
72
  * Fixed amount configurations for each tier.
73
73
  * @maxSize 21
74
74
  */
75
75
  configs?: FixedAmountConfig[];
76
76
  }
77
- export interface FixedAmountConfig {
77
+ interface FixedAmountConfig {
78
78
  /**
79
79
  * Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction#terminology) is used.
80
80
  * @format GUID
@@ -89,7 +89,7 @@ export interface FixedAmountConfig {
89
89
  * Customers earn points based on the amount spent.
90
90
  * For example, for every $10 spent, a customer might earn 1 point.
91
91
  */
92
- export interface ConversionRate {
92
+ interface ConversionRate {
93
93
  /**
94
94
  * Conversion rate configurations for each tier.
95
95
  *
@@ -106,7 +106,7 @@ export interface ConversionRate {
106
106
  */
107
107
  field?: string | null;
108
108
  }
109
- export interface ConversionRateConfig {
109
+ interface ConversionRateConfig {
110
110
  /**
111
111
  * Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction) is used.
112
112
  * @format GUID
@@ -133,7 +133,7 @@ export interface ConversionRateConfig {
133
133
  */
134
134
  points?: number;
135
135
  }
136
- export declare enum Status {
136
+ declare enum Status {
137
137
  /** Status is unknown or not specified. */
138
138
  UNKNOWN = "UNKNOWN",
139
139
  /** Earning rule is active and can assign points. */
@@ -141,31 +141,36 @@ export declare enum Status {
141
141
  /** Earning rule is paused and can't assign points. */
142
142
  PAUSED = "PAUSED"
143
143
  }
144
- export interface Metadata {
144
+ interface Metadata {
145
145
  /** Whether the earning rule can be deleted. */
146
146
  canBeDeleted?: boolean;
147
+ /**
148
+ * Information about the type of custom earning rule.
149
+ * @internal
150
+ */
151
+ ruleTypeTag?: LoyaltyEarningRuleTypeTag;
147
152
  }
148
- export interface LoyaltyEarningRuleTypeTag {
153
+ interface LoyaltyEarningRuleTypeTag {
149
154
  /** Type of custom earning rule. */
150
155
  ruleType?: LoyaltyEarningRuleTypeTagType;
151
156
  }
152
- export declare enum LoyaltyEarningRuleTypeTagType {
157
+ declare enum LoyaltyEarningRuleTypeTagType {
153
158
  /** Type is unknown or not specified. */
154
159
  UNKNOWN_TYPE = "UNKNOWN_TYPE",
155
160
  /** Earning rule for a customer's birthday. */
156
161
  BIRTHDAY = "BIRTHDAY"
157
162
  }
158
- export interface EarningRuleDisabled {
163
+ interface EarningRuleDisabled {
159
164
  }
160
- export interface CreateLoyaltyEarningRuleRequest {
165
+ interface CreateLoyaltyEarningRuleRequest {
161
166
  /** Earning rule to create. */
162
167
  earningRule: LoyaltyEarningRule;
163
168
  }
164
- export interface CreateLoyaltyEarningRuleResponse {
169
+ interface CreateLoyaltyEarningRuleResponse {
165
170
  /** Created earning rule. */
166
171
  earningRule?: LoyaltyEarningRule;
167
172
  }
168
- export interface BulkCreateLoyaltyEarningRulesRequest {
173
+ interface BulkCreateLoyaltyEarningRulesRequest {
169
174
  /**
170
175
  * Earning rules to create.
171
176
  * @minSize 1
@@ -173,19 +178,19 @@ export interface BulkCreateLoyaltyEarningRulesRequest {
173
178
  */
174
179
  earningRules: LoyaltyEarningRule[];
175
180
  }
176
- export interface BulkCreateLoyaltyEarningRulesResponse {
181
+ interface BulkCreateLoyaltyEarningRulesResponse {
177
182
  /** Created earning rules. */
178
183
  results?: BulkLoyaltyEarningRuleResult[];
179
184
  /** Additional metadata for the created earning rules. */
180
185
  bulkActionMetadata?: BulkActionMetadata;
181
186
  }
182
- export interface BulkLoyaltyEarningRuleResult {
187
+ interface BulkLoyaltyEarningRuleResult {
183
188
  /** Additional metadata for the created earning rules. */
184
189
  itemMetadata?: ItemMetadata;
185
190
  /** Created earning rule. */
186
191
  item?: LoyaltyEarningRule;
187
192
  }
188
- export interface ItemMetadata {
193
+ interface ItemMetadata {
189
194
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
190
195
  _id?: string | null;
191
196
  /** Index of the item within the request array. Allows for correlation between request and response items. */
@@ -195,7 +200,7 @@ export interface ItemMetadata {
195
200
  /** Details about the error in case of failure. */
196
201
  error?: ApplicationError;
197
202
  }
198
- export interface ApplicationError {
203
+ interface ApplicationError {
199
204
  /** Error code. */
200
205
  code?: string;
201
206
  /** Description of the error. */
@@ -203,7 +208,7 @@ export interface ApplicationError {
203
208
  /** Data related to the error. */
204
209
  data?: Record<string, any> | null;
205
210
  }
206
- export interface BulkActionMetadata {
211
+ interface BulkActionMetadata {
207
212
  /** Number of items that were successfully processed. */
208
213
  totalSuccesses?: number;
209
214
  /** Number of items that couldn't be processed. */
@@ -211,13 +216,13 @@ export interface BulkActionMetadata {
211
216
  /** Number of failures without details because detailed failure threshold was exceeded. */
212
217
  undetailedFailures?: number;
213
218
  }
214
- export interface CreateCustomLoyaltyEarningRuleRequest {
219
+ interface CreateCustomLoyaltyEarningRuleRequest {
215
220
  /** Type of the custom earning rule. */
216
221
  type: Type;
217
222
  /** Custom earning rule to create. */
218
223
  earningRule?: CustomLoyaltyEarningRule;
219
224
  }
220
- export declare enum Type {
225
+ declare enum Type {
221
226
  /** Unknown type. This value is not used. */
222
227
  UNKNOWN_TYPE = "UNKNOWN_TYPE",
223
228
  /** Earning rule for social media. */
@@ -226,7 +231,7 @@ export declare enum Type {
226
231
  BIRTHDAY = "BIRTHDAY"
227
232
  }
228
233
  /** Used in CreateCustomLoyaltyEarningRuleRequest */
229
- export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
234
+ interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
230
235
  /** Fixed amount of points awarded for each qualifying activity. */
231
236
  fixedAmount?: FixedAmount;
232
237
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
@@ -239,36 +244,36 @@ export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOn
239
244
  title?: string;
240
245
  }
241
246
  /** @oneof */
242
- export interface CustomLoyaltyEarningRuleTypeOneOf {
247
+ interface CustomLoyaltyEarningRuleTypeOneOf {
243
248
  /** Fixed amount of points awarded for each qualifying activity. */
244
249
  fixedAmount?: FixedAmount;
245
250
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
246
251
  conversionRate?: ConversionRate;
247
252
  }
248
- export interface CreateCustomLoyaltyEarningRuleResponse {
253
+ interface CreateCustomLoyaltyEarningRuleResponse {
249
254
  /** Created earning rule. */
250
255
  earningRule?: LoyaltyEarningRule;
251
256
  }
252
- export interface GetLoyaltyEarningRuleRequest {
257
+ interface GetLoyaltyEarningRuleRequest {
253
258
  /**
254
259
  * ID of the earning rule to retrieve.
255
260
  * @format GUID
256
261
  */
257
262
  _id: string;
258
263
  }
259
- export interface GetLoyaltyEarningRuleResponse {
264
+ interface GetLoyaltyEarningRuleResponse {
260
265
  /** Retrieved earning rule. */
261
266
  earningRule?: LoyaltyEarningRule;
262
267
  }
263
- export interface UpdateLoyaltyEarningRuleRequest {
268
+ interface UpdateLoyaltyEarningRuleRequest {
264
269
  /** Earning rule to update. */
265
270
  earningRule: LoyaltyEarningRule;
266
271
  }
267
- export interface UpdateLoyaltyEarningRuleResponse {
272
+ interface UpdateLoyaltyEarningRuleResponse {
268
273
  /** The updated earning rule. */
269
274
  earningRule?: LoyaltyEarningRule;
270
275
  }
271
- export interface DeleteLoyaltyEarningRuleRequest {
276
+ interface DeleteLoyaltyEarningRuleRequest {
272
277
  /**
273
278
  * ID of the earning rule to delete.
274
279
  * @format GUID
@@ -280,28 +285,28 @@ export interface DeleteLoyaltyEarningRuleRequest {
280
285
  */
281
286
  revision?: string;
282
287
  }
283
- export interface DeleteLoyaltyEarningRuleResponse {
288
+ interface DeleteLoyaltyEarningRuleResponse {
284
289
  }
285
- export interface DeleteAutomationEarningRuleRequest {
290
+ interface DeleteAutomationEarningRuleRequest {
286
291
  /**
287
292
  * ID of the earning rule to delete.
288
293
  * @format GUID
289
294
  */
290
295
  _id: string;
291
296
  }
292
- export interface DeleteAutomationEarningRuleResponse {
297
+ interface DeleteAutomationEarningRuleResponse {
293
298
  }
294
- export interface ListEarningRulesRequest {
299
+ interface ListEarningRulesRequest {
295
300
  /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
296
301
  triggerAppId?: string | null;
297
302
  /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
298
303
  triggerActivityType?: string | null;
299
304
  }
300
- export interface ListEarningRulesResponse {
305
+ interface ListEarningRulesResponse {
301
306
  /** Retrieved earning rules. */
302
307
  earningRules?: LoyaltyEarningRule[];
303
308
  }
304
- export interface ListEarningRulesInTierRequest {
309
+ interface ListEarningRulesInTierRequest {
305
310
  /**
306
311
  * ID of the tier for which the earning rules will be returned.
307
312
  * @format GUID
@@ -310,7 +315,7 @@ export interface ListEarningRulesInTierRequest {
310
315
  /** Pagination options. */
311
316
  paging?: CursorPaging;
312
317
  }
313
- export interface CursorPaging {
318
+ interface CursorPaging {
314
319
  /**
315
320
  * Maximum number of items to return in the results.
316
321
  * @max 100
@@ -325,13 +330,13 @@ export interface CursorPaging {
325
330
  */
326
331
  cursor?: string | null;
327
332
  }
328
- export interface ListEarningRulesInTierResponse {
333
+ interface ListEarningRulesInTierResponse {
329
334
  /** Retrieved earning rules. */
330
335
  earningRules?: LoyaltyEarningRule[];
331
336
  /** Details on the paged set of results returned. */
332
337
  pagingMetadata?: PagingMetadataV2;
333
338
  }
334
- export interface PagingMetadataV2 {
339
+ interface PagingMetadataV2 {
335
340
  /** Number of items returned in the response. */
336
341
  count?: number | null;
337
342
  /** Offset that was requested. */
@@ -343,7 +348,7 @@ export interface PagingMetadataV2 {
343
348
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
344
349
  cursors?: Cursors;
345
350
  }
346
- export interface Cursors {
351
+ interface Cursors {
347
352
  /**
348
353
  * Cursor string pointing to the next page in the list of results.
349
354
  * @maxLength 16000
@@ -355,7 +360,7 @@ export interface Cursors {
355
360
  */
356
361
  prev?: string | null;
357
362
  }
358
- export interface DomainEvent extends DomainEventBodyOneOf {
363
+ interface DomainEvent extends DomainEventBodyOneOf {
359
364
  createdEvent?: EntityCreatedEvent;
360
365
  updatedEvent?: EntityUpdatedEvent;
361
366
  deletedEvent?: EntityDeletedEvent;
@@ -398,19 +403,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
398
403
  entityEventSequence?: string | null;
399
404
  }
400
405
  /** @oneof */
401
- export interface DomainEventBodyOneOf {
406
+ interface DomainEventBodyOneOf {
402
407
  createdEvent?: EntityCreatedEvent;
403
408
  updatedEvent?: EntityUpdatedEvent;
404
409
  deletedEvent?: EntityDeletedEvent;
405
410
  actionEvent?: ActionEvent;
406
411
  }
407
- export interface EntityCreatedEvent {
412
+ interface EntityCreatedEvent {
408
413
  entity?: string;
409
414
  }
410
- export interface RestoreInfo {
415
+ interface RestoreInfo {
411
416
  deletedDate?: Date | null;
412
417
  }
413
- export interface EntityUpdatedEvent {
418
+ interface EntityUpdatedEvent {
414
419
  /**
415
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.
416
421
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -418,16 +423,16 @@ export interface EntityUpdatedEvent {
418
423
  */
419
424
  currentEntity?: string;
420
425
  }
421
- export interface EntityDeletedEvent {
426
+ interface EntityDeletedEvent {
422
427
  /** Entity that was deleted */
423
428
  deletedEntity?: string | null;
424
429
  }
425
- export interface ActionEvent {
430
+ interface ActionEvent {
426
431
  body?: string;
427
432
  }
428
- export interface Empty {
433
+ interface Empty {
429
434
  }
430
- export interface MessageEnvelope {
435
+ interface MessageEnvelope {
431
436
  /**
432
437
  * App instance ID.
433
438
  * @format GUID
@@ -443,7 +448,7 @@ export interface MessageEnvelope {
443
448
  /** Stringify payload. */
444
449
  data?: string;
445
450
  }
446
- export interface IdentificationData extends IdentificationDataIdOneOf {
451
+ interface IdentificationData extends IdentificationDataIdOneOf {
447
452
  /**
448
453
  * ID of a site visitor that has not logged in to the site.
449
454
  * @format GUID
@@ -468,7 +473,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
468
473
  identityType?: WebhookIdentityType;
469
474
  }
470
475
  /** @oneof */
471
- export interface IdentificationDataIdOneOf {
476
+ interface IdentificationDataIdOneOf {
472
477
  /**
473
478
  * ID of a site visitor that has not logged in to the site.
474
479
  * @format GUID
@@ -490,77 +495,14 @@ export interface IdentificationDataIdOneOf {
490
495
  */
491
496
  appId?: string;
492
497
  }
493
- export declare enum WebhookIdentityType {
498
+ declare enum WebhookIdentityType {
494
499
  UNKNOWN = "UNKNOWN",
495
500
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
496
501
  MEMBER = "MEMBER",
497
502
  WIX_USER = "WIX_USER",
498
503
  APP = "APP"
499
504
  }
500
- interface FixedAmountConfigNonNullableFields {
501
- points: number;
502
- }
503
- interface FixedAmountNonNullableFields {
504
- configs: FixedAmountConfigNonNullableFields[];
505
- }
506
- interface ConversionRateConfigNonNullableFields {
507
- moneyAmount: number;
508
- points: number;
509
- }
510
- interface ConversionRateNonNullableFields {
511
- configs: ConversionRateConfigNonNullableFields[];
512
- }
513
- interface MetadataNonNullableFields {
514
- canBeDeleted: boolean;
515
- }
516
- export interface LoyaltyEarningRuleNonNullableFields {
517
- fixedAmount?: FixedAmountNonNullableFields;
518
- conversionRate?: ConversionRateNonNullableFields;
519
- sourceAppId: string;
520
- triggerAppId: string;
521
- triggerActivityType: string;
522
- title: string;
523
- status: Status;
524
- metadata?: MetadataNonNullableFields;
525
- }
526
- export interface CreateLoyaltyEarningRuleResponseNonNullableFields {
527
- earningRule?: LoyaltyEarningRuleNonNullableFields;
528
- }
529
- interface ApplicationErrorNonNullableFields {
530
- code: string;
531
- description: string;
532
- }
533
- interface ItemMetadataNonNullableFields {
534
- originalIndex: number;
535
- success: boolean;
536
- error?: ApplicationErrorNonNullableFields;
537
- }
538
- interface BulkLoyaltyEarningRuleResultNonNullableFields {
539
- itemMetadata?: ItemMetadataNonNullableFields;
540
- item?: LoyaltyEarningRuleNonNullableFields;
541
- }
542
- interface BulkActionMetadataNonNullableFields {
543
- totalSuccesses: number;
544
- totalFailures: number;
545
- undetailedFailures: number;
546
- }
547
- export interface BulkCreateLoyaltyEarningRulesResponseNonNullableFields {
548
- results: BulkLoyaltyEarningRuleResultNonNullableFields[];
549
- bulkActionMetadata?: BulkActionMetadataNonNullableFields;
550
- }
551
- export interface CreateCustomLoyaltyEarningRuleResponseNonNullableFields {
552
- earningRule?: LoyaltyEarningRuleNonNullableFields;
553
- }
554
- export interface GetLoyaltyEarningRuleResponseNonNullableFields {
555
- earningRule?: LoyaltyEarningRuleNonNullableFields;
556
- }
557
- export interface UpdateLoyaltyEarningRuleResponseNonNullableFields {
558
- earningRule?: LoyaltyEarningRuleNonNullableFields;
559
- }
560
- export interface ListEarningRulesResponseNonNullableFields {
561
- earningRules: LoyaltyEarningRuleNonNullableFields[];
562
- }
563
- export interface BaseEventMetadata {
505
+ interface BaseEventMetadata {
564
506
  /**
565
507
  * App instance ID.
566
508
  * @format GUID
@@ -574,7 +516,7 @@ export interface BaseEventMetadata {
574
516
  /** The identification type and identity data. */
575
517
  identity?: IdentificationData;
576
518
  }
577
- export interface EventMetadata extends BaseEventMetadata {
519
+ interface EventMetadata extends BaseEventMetadata {
578
520
  /**
579
521
  * Unique event ID.
580
522
  * Allows clients to ignore duplicate webhooks.
@@ -612,149 +554,22 @@ export interface EventMetadata extends BaseEventMetadata {
612
554
  */
613
555
  entityEventSequence?: string | null;
614
556
  }
615
- export interface LoyaltyEarningRuleCreatedEnvelope {
557
+ interface LoyaltyEarningRuleCreatedEnvelope {
616
558
  entity: LoyaltyEarningRule;
617
559
  metadata: EventMetadata;
618
560
  }
619
- /**
620
- * Triggered when an earning rule is created.
621
- * @permissionScope Read Loyalty
622
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
623
- * @permissionScope Manage Loyalty
624
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
625
- * @permissionId LOYALTY.READ_EARNING_RULES
626
- * @webhook
627
- * @eventType wix.loyalty.v1.loyalty_earning_rule_created
628
- * @slug created
629
- */
630
- export declare function onLoyaltyEarningRuleCreated(handler: (event: LoyaltyEarningRuleCreatedEnvelope) => void | Promise<void>): void;
631
- export interface LoyaltyEarningRuleDeletedEnvelope {
561
+ interface LoyaltyEarningRuleDeletedEnvelope {
632
562
  metadata: EventMetadata;
633
563
  }
634
- /**
635
- * Triggered when an earning rule is deleted.
636
- * @permissionScope Read Loyalty
637
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
638
- * @permissionScope Manage Loyalty
639
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
640
- * @permissionId LOYALTY.READ_EARNING_RULES
641
- * @webhook
642
- * @eventType wix.loyalty.v1.loyalty_earning_rule_deleted
643
- * @slug deleted
644
- */
645
- export declare function onLoyaltyEarningRuleDeleted(handler: (event: LoyaltyEarningRuleDeletedEnvelope) => void | Promise<void>): void;
646
- export interface LoyaltyEarningRuleUpdatedEnvelope {
564
+ interface LoyaltyEarningRuleUpdatedEnvelope {
647
565
  entity: LoyaltyEarningRule;
648
566
  metadata: EventMetadata;
649
567
  }
650
- /**
651
- * Triggered when an earning rule is updated.
652
- * @permissionScope Read Loyalty
653
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
654
- * @permissionScope Manage Loyalty
655
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
656
- * @permissionId LOYALTY.READ_EARNING_RULES
657
- * @webhook
658
- * @eventType wix.loyalty.v1.loyalty_earning_rule_updated
659
- * @slug updated
660
- */
661
- export declare function onLoyaltyEarningRuleUpdated(handler: (event: LoyaltyEarningRuleUpdatedEnvelope) => void | Promise<void>): void;
662
- /**
663
- * Creates a non-automated earning rule.
664
- *
665
- * >**Note**: You can only create non-automated earning rules from a supported list.
666
- * For the supported list of services, see the introduction.
667
- * @param earningRule - Earning rule to create.
668
- * @public
669
- * @requiredField earningRule
670
- * @requiredField earningRule.sourceAppId
671
- * @requiredField earningRule.status
672
- * @requiredField earningRule.title
673
- * @requiredField earningRule.triggerActivityType
674
- * @requiredField earningRule.triggerAppId
675
- * @requiredField earningRule.type
676
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
677
- * @permissionScope Manage Loyalty
678
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
679
- * @applicableIdentity APP
680
- * @returns Created earning rule.
681
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule
682
- */
683
- export declare function createLoyaltyEarningRule(earningRule: LoyaltyEarningRule): Promise<LoyaltyEarningRule & LoyaltyEarningRuleNonNullableFields>;
684
- /**
685
- * Creates multiple non-automated earning rules.
686
- *
687
- * >**Note**: You can only create non-automated earning rules from a supported list.
688
- * For the supported list of services, see the introduction.
689
- * @param earningRules - Earning rules to create.
690
- * @public
691
- * @requiredField earningRules
692
- * @requiredField earningRules.sourceAppId
693
- * @requiredField earningRules.status
694
- * @requiredField earningRules.title
695
- * @requiredField earningRules.triggerActivityType
696
- * @requiredField earningRules.triggerAppId
697
- * @requiredField earningRules.type
698
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
699
- * @permissionScope Manage Loyalty
700
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
701
- * @applicableIdentity APP
702
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules
703
- */
704
- export declare function bulkCreateLoyaltyEarningRules(earningRules: LoyaltyEarningRule[]): Promise<BulkCreateLoyaltyEarningRulesResponse & BulkCreateLoyaltyEarningRulesResponseNonNullableFields>;
705
- /**
706
- * Creates a custom automated earning rule.
707
- *
708
- * To learn more about the automated rules, read the introduction.
709
- * @param type - Type of the custom earning rule.
710
- * @public
711
- * @requiredField type
712
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
713
- * @permissionScope Manage Loyalty
714
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
715
- * @applicableIdentity APP
716
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule
717
- */
718
- export declare function createCustomLoyaltyEarningRule(type: Type, options?: CreateCustomLoyaltyEarningRuleOptions): Promise<CreateCustomLoyaltyEarningRuleResponse & CreateCustomLoyaltyEarningRuleResponseNonNullableFields>;
719
- export interface CreateCustomLoyaltyEarningRuleOptions {
568
+ interface CreateCustomLoyaltyEarningRuleOptions {
720
569
  /** Custom earning rule to create. */
721
570
  earningRule?: CustomLoyaltyEarningRule;
722
571
  }
723
- /**
724
- * Retrieves a specified non-automated earning rule.
725
- * @param _id - ID of the earning rule to retrieve.
726
- * @public
727
- * @requiredField _id
728
- * @permissionId LOYALTY.READ_EARNING_RULES
729
- * @permissionScope Read Loyalty
730
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
731
- * @permissionScope Manage Loyalty
732
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
733
- * @applicableIdentity APP
734
- * @applicableIdentity VISITOR
735
- * @returns Retrieved earning rule.
736
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule
737
- */
738
- export declare function getLoyaltyEarningRule(_id: string): Promise<LoyaltyEarningRule & LoyaltyEarningRuleNonNullableFields>;
739
- /**
740
- * Updates an earning rule.
741
- *
742
- * Supports partial updates.
743
- *
744
- * Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,
745
- * the current revision must be passed when updating the earning rule.
746
- * @param _id - Loyalty earning rule ID.
747
- * @public
748
- * @requiredField _id
749
- * @requiredField earningRule
750
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
751
- * @permissionScope Manage Loyalty
752
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
753
- * @applicableIdentity APP
754
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule
755
- */
756
- export declare function updateLoyaltyEarningRule(_id: string | null, earningRule: UpdateLoyaltyEarningRule): Promise<UpdateLoyaltyEarningRuleResponse & UpdateLoyaltyEarningRuleResponseNonNullableFields>;
757
- export interface UpdateLoyaltyEarningRule {
572
+ interface UpdateLoyaltyEarningRule {
758
573
  /** Fixed amount of points awarded for each qualifying activity. */
759
574
  fixedAmount?: FixedAmount;
760
575
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
@@ -811,60 +626,18 @@ export interface UpdateLoyaltyEarningRule {
811
626
  */
812
627
  metadata?: Metadata;
813
628
  }
814
- /**
815
- * Deletes a non-automated earning rule.
816
- * @param _id - ID of the earning rule to delete.
817
- * @public
818
- * @requiredField _id
819
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
820
- * @permissionScope Manage Loyalty
821
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
822
- * @applicableIdentity APP
823
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule
824
- */
825
- export declare function deleteLoyaltyEarningRule(_id: string, options?: DeleteLoyaltyEarningRuleOptions): Promise<void>;
826
- export interface DeleteLoyaltyEarningRuleOptions {
629
+ interface DeleteLoyaltyEarningRuleOptions {
827
630
  /**
828
631
  * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
829
632
  * Pass the latest revision when updating to prevent conflicting changes.
830
633
  */
831
634
  revision?: string;
832
635
  }
833
- /**
834
- * Deletes a custom automated earning rule.
835
- *
836
- * > **Note:** Pre-installed automated rules can only be paused, not deleted.
837
- * @param _id - ID of the earning rule to delete.
838
- * @public
839
- * @requiredField _id
840
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
841
- * @permissionScope Manage Loyalty
842
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
843
- * @applicableIdentity APP
844
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule
845
- */
846
- export declare function deleteAutomationEarningRule(_id: string): Promise<void>;
847
- /**
848
- * Retrieves a list of earning rules.
849
- *
850
- * Returns both automated and non-automated earning rules.
851
- *
852
- * You can filter the results by `triggerAppId` or `triggerActivityType`.
853
- * @public
854
- * @permissionId LOYALTY.READ_EARNING_RULES
855
- * @permissionScope Read Loyalty
856
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
857
- * @permissionScope Manage Loyalty
858
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
859
- * @applicableIdentity APP
860
- * @applicableIdentity VISITOR
861
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules
862
- */
863
- export declare function listEarningRules(options?: ListEarningRulesOptions): Promise<ListEarningRulesResponse & ListEarningRulesResponseNonNullableFields>;
864
- export interface ListEarningRulesOptions {
636
+ interface ListEarningRulesOptions {
865
637
  /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
866
638
  triggerAppId?: string | null;
867
639
  /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
868
640
  triggerActivityType?: string | null;
869
641
  }
870
- export {};
642
+
643
+ export { type IdentificationData as $, type ApplicationError as A, type BulkCreateLoyaltyEarningRulesResponse as B, type CreateCustomLoyaltyEarningRuleOptions as C, type DeleteLoyaltyEarningRuleOptions as D, type EarningRuleDisabled as E, type FixedAmount as F, type GetLoyaltyEarningRuleRequest as G, type CursorPaging as H, type ItemMetadata as I, type ListEarningRulesInTierResponse as J, type Cursors as K, type LoyaltyEarningRule as L, type Metadata as M, type DomainEvent as N, type DomainEventBodyOneOf as O, type PagingMetadataV2 as P, type EntityCreatedEvent as Q, type RestoreInfo as R, Status as S, Type as T, type UpdateLoyaltyEarningRule as U, type EntityUpdatedEvent as V, WebhookIdentityType as W, type EntityDeletedEvent as X, type ActionEvent as Y, type Empty as Z, type MessageEnvelope as _, type CreateCustomLoyaltyEarningRuleResponse as a, type IdentificationDataIdOneOf as a0, type BaseEventMetadata as a1, type EventMetadata as a2, type LoyaltyEarningRuleCreatedEnvelope as a3, type LoyaltyEarningRuleDeletedEnvelope as a4, type LoyaltyEarningRuleUpdatedEnvelope as a5, type UpdateLoyaltyEarningRuleResponse as b, type ListEarningRulesOptions as c, type ListEarningRulesResponse as d, LoyaltyEarningRuleTypeTagType as e, type LoyaltyEarningRuleTypeOneOf as f, type FixedAmountConfig as g, type ConversionRate as h, type ConversionRateConfig as i, type LoyaltyEarningRuleTypeTag as j, type CreateLoyaltyEarningRuleRequest as k, type CreateLoyaltyEarningRuleResponse as l, type BulkCreateLoyaltyEarningRulesRequest as m, type BulkLoyaltyEarningRuleResult as n, type BulkActionMetadata as o, type CreateCustomLoyaltyEarningRuleRequest as p, type CustomLoyaltyEarningRule as q, type CustomLoyaltyEarningRuleTypeOneOf as r, type GetLoyaltyEarningRuleResponse as s, type UpdateLoyaltyEarningRuleRequest as t, type DeleteLoyaltyEarningRuleRequest as u, type DeleteLoyaltyEarningRuleResponse as v, type DeleteAutomationEarningRuleRequest as w, type DeleteAutomationEarningRuleResponse as x, type ListEarningRulesRequest as y, type ListEarningRulesInTierRequest as z };