@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)`. */
@@ -12,7 +12,7 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
12
12
  * @format GUID
13
13
  * @readonly
14
14
  */
15
- id?: string | null;
15
+ _id?: string | null;
16
16
  /**
17
17
  * ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
18
18
  * @format GUID
@@ -47,12 +47,12 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
47
47
  * Date and time the earning rule was created.
48
48
  * @readonly
49
49
  */
50
- createdDate?: Date | null;
50
+ _createdDate?: Date | null;
51
51
  /**
52
52
  * Date and time the earning rule was last updated.
53
53
  * @readonly
54
54
  */
55
- updatedDate?: Date | null;
55
+ _updatedDate?: Date | null;
56
56
  /**
57
57
  * Additional metadata about the earning rule.
58
58
  * @readonly
@@ -60,21 +60,21 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
60
60
  metadata?: Metadata;
61
61
  }
62
62
  /** @oneof */
63
- 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,31 @@ 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
147
  }
148
- export interface LoyaltyEarningRuleTypeTag {
148
+ interface LoyaltyEarningRuleTypeTag {
149
149
  /** Type of custom earning rule. */
150
150
  ruleType?: LoyaltyEarningRuleTypeTagType;
151
151
  }
152
- export declare enum LoyaltyEarningRuleTypeTagType {
152
+ declare enum LoyaltyEarningRuleTypeTagType {
153
153
  /** Type is unknown or not specified. */
154
154
  UNKNOWN_TYPE = "UNKNOWN_TYPE",
155
155
  /** Earning rule for a customer's birthday. */
156
156
  BIRTHDAY = "BIRTHDAY"
157
157
  }
158
- export interface EarningRuleDisabled {
158
+ interface EarningRuleDisabled {
159
159
  }
160
- export interface CreateLoyaltyEarningRuleRequest {
160
+ interface CreateLoyaltyEarningRuleRequest {
161
161
  /** Earning rule to create. */
162
162
  earningRule: LoyaltyEarningRule;
163
163
  }
164
- export interface CreateLoyaltyEarningRuleResponse {
164
+ interface CreateLoyaltyEarningRuleResponse {
165
165
  /** Created earning rule. */
166
166
  earningRule?: LoyaltyEarningRule;
167
167
  }
168
- export interface BulkCreateLoyaltyEarningRulesRequest {
168
+ interface BulkCreateLoyaltyEarningRulesRequest {
169
169
  /**
170
170
  * Earning rules to create.
171
171
  * @minSize 1
@@ -173,21 +173,21 @@ export interface BulkCreateLoyaltyEarningRulesRequest {
173
173
  */
174
174
  earningRules: LoyaltyEarningRule[];
175
175
  }
176
- export interface BulkCreateLoyaltyEarningRulesResponse {
176
+ interface BulkCreateLoyaltyEarningRulesResponse {
177
177
  /** Created earning rules. */
178
178
  results?: BulkLoyaltyEarningRuleResult[];
179
179
  /** Additional metadata for the created earning rules. */
180
180
  bulkActionMetadata?: BulkActionMetadata;
181
181
  }
182
- export interface BulkLoyaltyEarningRuleResult {
182
+ interface BulkLoyaltyEarningRuleResult {
183
183
  /** Additional metadata for the created earning rules. */
184
184
  itemMetadata?: ItemMetadata;
185
185
  /** Created earning rule. */
186
186
  item?: LoyaltyEarningRule;
187
187
  }
188
- export interface ItemMetadata {
188
+ interface ItemMetadata {
189
189
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
190
- id?: string | null;
190
+ _id?: string | null;
191
191
  /** Index of the item within the request array. Allows for correlation between request and response items. */
192
192
  originalIndex?: number;
193
193
  /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
@@ -195,7 +195,7 @@ export interface ItemMetadata {
195
195
  /** Details about the error in case of failure. */
196
196
  error?: ApplicationError;
197
197
  }
198
- export interface ApplicationError {
198
+ interface ApplicationError {
199
199
  /** Error code. */
200
200
  code?: string;
201
201
  /** Description of the error. */
@@ -203,7 +203,7 @@ export interface ApplicationError {
203
203
  /** Data related to the error. */
204
204
  data?: Record<string, any> | null;
205
205
  }
206
- export interface BulkActionMetadata {
206
+ interface BulkActionMetadata {
207
207
  /** Number of items that were successfully processed. */
208
208
  totalSuccesses?: number;
209
209
  /** Number of items that couldn't be processed. */
@@ -211,13 +211,13 @@ export interface BulkActionMetadata {
211
211
  /** Number of failures without details because detailed failure threshold was exceeded. */
212
212
  undetailedFailures?: number;
213
213
  }
214
- export interface CreateCustomLoyaltyEarningRuleRequest {
214
+ interface CreateCustomLoyaltyEarningRuleRequest {
215
215
  /** Type of the custom earning rule. */
216
216
  type: Type;
217
217
  /** Custom earning rule to create. */
218
218
  earningRule?: CustomLoyaltyEarningRule;
219
219
  }
220
- export declare enum Type {
220
+ declare enum Type {
221
221
  /** Unknown type. This value is not used. */
222
222
  UNKNOWN_TYPE = "UNKNOWN_TYPE",
223
223
  /** Earning rule for social media. */
@@ -226,7 +226,7 @@ export declare enum Type {
226
226
  BIRTHDAY = "BIRTHDAY"
227
227
  }
228
228
  /** Used in CreateCustomLoyaltyEarningRuleRequest */
229
- export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
229
+ interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
230
230
  /** Fixed amount of points awarded for each qualifying activity. */
231
231
  fixedAmount?: FixedAmount;
232
232
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
@@ -239,69 +239,69 @@ export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOn
239
239
  title?: string;
240
240
  }
241
241
  /** @oneof */
242
- export interface CustomLoyaltyEarningRuleTypeOneOf {
242
+ interface CustomLoyaltyEarningRuleTypeOneOf {
243
243
  /** Fixed amount of points awarded for each qualifying activity. */
244
244
  fixedAmount?: FixedAmount;
245
245
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
246
246
  conversionRate?: ConversionRate;
247
247
  }
248
- export interface CreateCustomLoyaltyEarningRuleResponse {
248
+ interface CreateCustomLoyaltyEarningRuleResponse {
249
249
  /** Created earning rule. */
250
250
  earningRule?: LoyaltyEarningRule;
251
251
  }
252
- export interface GetLoyaltyEarningRuleRequest {
252
+ interface GetLoyaltyEarningRuleRequest {
253
253
  /**
254
254
  * ID of the earning rule to retrieve.
255
255
  * @format GUID
256
256
  */
257
- id: string;
257
+ _id: string;
258
258
  }
259
- export interface GetLoyaltyEarningRuleResponse {
259
+ interface GetLoyaltyEarningRuleResponse {
260
260
  /** Retrieved earning rule. */
261
261
  earningRule?: LoyaltyEarningRule;
262
262
  }
263
- export interface UpdateLoyaltyEarningRuleRequest {
263
+ interface UpdateLoyaltyEarningRuleRequest {
264
264
  /** Earning rule to update. */
265
265
  earningRule: LoyaltyEarningRule;
266
266
  }
267
- export interface UpdateLoyaltyEarningRuleResponse {
267
+ interface UpdateLoyaltyEarningRuleResponse {
268
268
  /** The updated earning rule. */
269
269
  earningRule?: LoyaltyEarningRule;
270
270
  }
271
- export interface DeleteLoyaltyEarningRuleRequest {
271
+ interface DeleteLoyaltyEarningRuleRequest {
272
272
  /**
273
273
  * ID of the earning rule to delete.
274
274
  * @format GUID
275
275
  */
276
- id: string;
276
+ _id: string;
277
277
  /**
278
278
  * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
279
279
  * Pass the latest revision when updating to prevent conflicting changes.
280
280
  */
281
281
  revision?: string;
282
282
  }
283
- export interface DeleteLoyaltyEarningRuleResponse {
283
+ interface DeleteLoyaltyEarningRuleResponse {
284
284
  }
285
- export interface DeleteAutomationEarningRuleRequest {
285
+ interface DeleteAutomationEarningRuleRequest {
286
286
  /**
287
287
  * ID of the earning rule to delete.
288
288
  * @format GUID
289
289
  */
290
- id: string;
290
+ _id: string;
291
291
  }
292
- export interface DeleteAutomationEarningRuleResponse {
292
+ interface DeleteAutomationEarningRuleResponse {
293
293
  }
294
- export interface ListEarningRulesRequest {
294
+ interface ListEarningRulesRequest {
295
295
  /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
296
296
  triggerAppId?: string | null;
297
297
  /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
298
298
  triggerActivityType?: string | null;
299
299
  }
300
- export interface ListEarningRulesResponse {
300
+ interface ListEarningRulesResponse {
301
301
  /** Retrieved earning rules. */
302
302
  earningRules?: LoyaltyEarningRule[];
303
303
  }
304
- export interface ListEarningRulesInTierRequest {
304
+ interface ListEarningRulesInTierRequest {
305
305
  /**
306
306
  * ID of the tier for which the earning rules will be returned.
307
307
  * @format GUID
@@ -310,7 +310,7 @@ export interface ListEarningRulesInTierRequest {
310
310
  /** Pagination options. */
311
311
  paging?: CursorPaging;
312
312
  }
313
- export interface CursorPaging {
313
+ interface CursorPaging {
314
314
  /**
315
315
  * Maximum number of items to return in the results.
316
316
  * @max 100
@@ -325,13 +325,13 @@ export interface CursorPaging {
325
325
  */
326
326
  cursor?: string | null;
327
327
  }
328
- export interface ListEarningRulesInTierResponse {
328
+ interface ListEarningRulesInTierResponse {
329
329
  /** Retrieved earning rules. */
330
330
  earningRules?: LoyaltyEarningRule[];
331
331
  /** Details on the paged set of results returned. */
332
332
  pagingMetadata?: PagingMetadataV2;
333
333
  }
334
- export interface PagingMetadataV2 {
334
+ interface PagingMetadataV2 {
335
335
  /** Number of items returned in the response. */
336
336
  count?: number | null;
337
337
  /** Offset that was requested. */
@@ -343,7 +343,7 @@ export interface PagingMetadataV2 {
343
343
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
344
344
  cursors?: Cursors;
345
345
  }
346
- export interface Cursors {
346
+ interface Cursors {
347
347
  /**
348
348
  * Cursor string pointing to the next page in the list of results.
349
349
  * @maxLength 16000
@@ -355,7 +355,7 @@ export interface Cursors {
355
355
  */
356
356
  prev?: string | null;
357
357
  }
358
- export interface DomainEvent extends DomainEventBodyOneOf {
358
+ interface DomainEvent extends DomainEventBodyOneOf {
359
359
  createdEvent?: EntityCreatedEvent;
360
360
  updatedEvent?: EntityUpdatedEvent;
361
361
  deletedEvent?: EntityDeletedEvent;
@@ -364,7 +364,7 @@ export interface DomainEvent extends DomainEventBodyOneOf {
364
364
  * Unique event ID.
365
365
  * Allows clients to ignore duplicate webhooks.
366
366
  */
367
- id?: string;
367
+ _id?: string;
368
368
  /**
369
369
  * Assumes actions are also always typed to an entity_type
370
370
  * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
@@ -398,38 +398,36 @@ export interface DomainEvent extends DomainEventBodyOneOf {
398
398
  entityEventSequence?: string | null;
399
399
  }
400
400
  /** @oneof */
401
- export interface DomainEventBodyOneOf {
401
+ interface DomainEventBodyOneOf {
402
402
  createdEvent?: EntityCreatedEvent;
403
403
  updatedEvent?: EntityUpdatedEvent;
404
404
  deletedEvent?: EntityDeletedEvent;
405
405
  actionEvent?: ActionEvent;
406
406
  }
407
- export interface EntityCreatedEvent {
408
- entityAsJson?: string;
409
- /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
410
- restoreInfo?: RestoreInfo;
407
+ interface EntityCreatedEvent {
408
+ entity?: string;
411
409
  }
412
- export interface RestoreInfo {
410
+ interface RestoreInfo {
413
411
  deletedDate?: Date | null;
414
412
  }
415
- export interface EntityUpdatedEvent {
413
+ interface EntityUpdatedEvent {
416
414
  /**
417
415
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
418
416
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
419
417
  * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
420
418
  */
421
- currentEntityAsJson?: string;
419
+ currentEntity?: string;
422
420
  }
423
- export interface EntityDeletedEvent {
421
+ interface EntityDeletedEvent {
424
422
  /** Entity that was deleted */
425
- deletedEntityAsJson?: string | null;
423
+ deletedEntity?: string | null;
426
424
  }
427
- export interface ActionEvent {
428
- bodyAsJson?: string;
425
+ interface ActionEvent {
426
+ body?: string;
429
427
  }
430
- export interface Empty {
428
+ interface Empty {
431
429
  }
432
- export interface MessageEnvelope {
430
+ interface MessageEnvelope {
433
431
  /**
434
432
  * App instance ID.
435
433
  * @format GUID
@@ -445,7 +443,7 @@ export interface MessageEnvelope {
445
443
  /** Stringify payload. */
446
444
  data?: string;
447
445
  }
448
- export interface IdentificationData extends IdentificationDataIdOneOf {
446
+ interface IdentificationData extends IdentificationDataIdOneOf {
449
447
  /**
450
448
  * ID of a site visitor that has not logged in to the site.
451
449
  * @format GUID
@@ -470,7 +468,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
470
468
  identityType?: WebhookIdentityType;
471
469
  }
472
470
  /** @oneof */
473
- export interface IdentificationDataIdOneOf {
471
+ interface IdentificationDataIdOneOf {
474
472
  /**
475
473
  * ID of a site visitor that has not logged in to the site.
476
474
  * @format GUID
@@ -492,74 +490,149 @@ export interface IdentificationDataIdOneOf {
492
490
  */
493
491
  appId?: string;
494
492
  }
495
- export declare enum WebhookIdentityType {
493
+ declare enum WebhookIdentityType {
496
494
  UNKNOWN = "UNKNOWN",
497
495
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
498
496
  MEMBER = "MEMBER",
499
497
  WIX_USER = "WIX_USER",
500
498
  APP = "APP"
501
499
  }
502
- interface FixedAmountConfigNonNullableFields {
503
- points: number;
504
- }
505
- interface FixedAmountNonNullableFields {
506
- configs: FixedAmountConfigNonNullableFields[];
507
- }
508
- interface ConversionRateConfigNonNullableFields {
509
- moneyAmount: number;
510
- points: number;
511
- }
512
- interface ConversionRateNonNullableFields {
513
- configs: ConversionRateConfigNonNullableFields[];
514
- }
515
- interface MetadataNonNullableFields {
516
- canBeDeleted: boolean;
517
- }
518
- interface LoyaltyEarningRuleNonNullableFields {
519
- fixedAmount?: FixedAmountNonNullableFields;
520
- conversionRate?: ConversionRateNonNullableFields;
521
- sourceAppId: string;
522
- triggerAppId: string;
523
- triggerActivityType: string;
524
- title: string;
525
- status: Status;
526
- metadata?: MetadataNonNullableFields;
527
- }
528
- export interface CreateLoyaltyEarningRuleResponseNonNullableFields {
529
- earningRule?: LoyaltyEarningRuleNonNullableFields;
530
- }
531
- interface ApplicationErrorNonNullableFields {
532
- code: string;
533
- description: string;
500
+ interface BaseEventMetadata {
501
+ /**
502
+ * App instance ID.
503
+ * @format GUID
504
+ */
505
+ instanceId?: string | null;
506
+ /**
507
+ * Event type.
508
+ * @maxLength 150
509
+ */
510
+ eventType?: string;
511
+ /** The identification type and identity data. */
512
+ identity?: IdentificationData;
534
513
  }
535
- interface ItemMetadataNonNullableFields {
536
- originalIndex: number;
537
- success: boolean;
538
- error?: ApplicationErrorNonNullableFields;
514
+ interface EventMetadata extends BaseEventMetadata {
515
+ /**
516
+ * Unique event ID.
517
+ * Allows clients to ignore duplicate webhooks.
518
+ */
519
+ _id?: string;
520
+ /**
521
+ * Assumes actions are also always typed to an entity_type
522
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
523
+ */
524
+ entityFqdn?: string;
525
+ /**
526
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
527
+ * This is although the created/updated/deleted notion is duplication of the oneof types
528
+ * Example: created/updated/deleted/started/completed/email_opened
529
+ */
530
+ slug?: string;
531
+ /** ID of the entity associated with the event. */
532
+ entityId?: string;
533
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
534
+ eventTime?: Date | null;
535
+ /**
536
+ * Whether the event was triggered as a result of a privacy regulation application
537
+ * (for example, GDPR).
538
+ */
539
+ triggeredByAnonymizeRequest?: boolean | null;
540
+ /** If present, indicates the action that triggered the event. */
541
+ originatedFrom?: string | null;
542
+ /**
543
+ * A sequence number defining the order of updates to the underlying entity.
544
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
545
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
546
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
547
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
548
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
549
+ */
550
+ entityEventSequence?: string | null;
539
551
  }
540
- interface BulkLoyaltyEarningRuleResultNonNullableFields {
541
- itemMetadata?: ItemMetadataNonNullableFields;
542
- item?: LoyaltyEarningRuleNonNullableFields;
552
+ interface LoyaltyEarningRuleCreatedEnvelope {
553
+ entity: LoyaltyEarningRule;
554
+ metadata: EventMetadata;
543
555
  }
544
- interface BulkActionMetadataNonNullableFields {
545
- totalSuccesses: number;
546
- totalFailures: number;
547
- undetailedFailures: number;
556
+ interface LoyaltyEarningRuleDeletedEnvelope {
557
+ metadata: EventMetadata;
548
558
  }
549
- export interface BulkCreateLoyaltyEarningRulesResponseNonNullableFields {
550
- results: BulkLoyaltyEarningRuleResultNonNullableFields[];
551
- bulkActionMetadata?: BulkActionMetadataNonNullableFields;
559
+ interface LoyaltyEarningRuleUpdatedEnvelope {
560
+ entity: LoyaltyEarningRule;
561
+ metadata: EventMetadata;
552
562
  }
553
- export interface CreateCustomLoyaltyEarningRuleResponseNonNullableFields {
554
- earningRule?: LoyaltyEarningRuleNonNullableFields;
563
+ interface CreateCustomLoyaltyEarningRuleOptions {
564
+ /** Custom earning rule to create. */
565
+ earningRule?: CustomLoyaltyEarningRule;
555
566
  }
556
- export interface GetLoyaltyEarningRuleResponseNonNullableFields {
557
- earningRule?: LoyaltyEarningRuleNonNullableFields;
567
+ interface UpdateLoyaltyEarningRule {
568
+ /** Fixed amount of points awarded for each qualifying activity. */
569
+ fixedAmount?: FixedAmount;
570
+ /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
571
+ conversionRate?: ConversionRate;
572
+ /**
573
+ * Loyalty earning rule ID.
574
+ * @format GUID
575
+ * @readonly
576
+ */
577
+ _id?: string | null;
578
+ /**
579
+ * ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
580
+ * @format GUID
581
+ */
582
+ sourceAppId?: string;
583
+ /**
584
+ * ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
585
+ * @minLength 1
586
+ * @maxLength 80
587
+ */
588
+ triggerAppId?: string;
589
+ /**
590
+ * Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
591
+ * @minLength 1
592
+ * @maxLength 80
593
+ */
594
+ triggerActivityType?: string;
595
+ /**
596
+ * Name of the earning rule.
597
+ * @minLength 1
598
+ * @maxLength 50
599
+ */
600
+ title?: string;
601
+ /** Current status of the earning rule. */
602
+ status?: Status;
603
+ /**
604
+ * Revision number, incremented by 1 each time the earning rule is updated.
605
+ * Pass the latest revision when updating to prevent conflicting changes.
606
+ */
607
+ revision?: string | null;
608
+ /**
609
+ * Date and time the earning rule was created.
610
+ * @readonly
611
+ */
612
+ _createdDate?: Date | null;
613
+ /**
614
+ * Date and time the earning rule was last updated.
615
+ * @readonly
616
+ */
617
+ _updatedDate?: Date | null;
618
+ /**
619
+ * Additional metadata about the earning rule.
620
+ * @readonly
621
+ */
622
+ metadata?: Metadata;
558
623
  }
559
- export interface UpdateLoyaltyEarningRuleResponseNonNullableFields {
560
- earningRule?: LoyaltyEarningRuleNonNullableFields;
624
+ interface DeleteLoyaltyEarningRuleOptions {
625
+ /**
626
+ * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
627
+ * Pass the latest revision when updating to prevent conflicting changes.
628
+ */
629
+ revision?: string;
561
630
  }
562
- export interface ListEarningRulesResponseNonNullableFields {
563
- earningRules: LoyaltyEarningRuleNonNullableFields[];
631
+ interface ListEarningRulesOptions {
632
+ /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
633
+ triggerAppId?: string | null;
634
+ /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
635
+ triggerActivityType?: string | null;
564
636
  }
565
- export {};
637
+
638
+ 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 };