@wix/auto_sdk_loyalty_earning-rules 1.0.10 → 1.0.12

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 +114 -0
  2. package/build/index.d.ts +114 -0
  3. package/build/index.js +798 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +756 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/internal/index.d.mts +114 -0
  8. package/build/internal/index.d.ts +114 -0
  9. package/build/internal/index.js +798 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +756 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/build/internal/{cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-B7haYXGy.d.mts} +121 -306
  14. package/build/internal/{es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-B7haYXGy.d.ts} +121 -306
  15. package/build/internal/meta.d.mts +326 -0
  16. package/build/internal/meta.d.ts +326 -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/{cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-C7uemg2R.d.mts} +121 -306
  22. package/build/{es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-C7uemg2R.d.ts} +121 -306
  23. package/build/meta.d.mts +326 -0
  24. package/build/meta.d.ts +326 -0
  25. package/build/meta.js +500 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +466 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
  40. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -39
  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 -97
  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.d.ts +0 -948
  52. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -151
  53. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  54. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -514
  55. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
  67. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -28
  68. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
  69. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
  70. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -342
  71. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
  72. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
  73. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -146
  74. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
  75. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
  76. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -78
  77. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
  78. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +0 -948
  79. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -148
  80. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  81. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -480
  82. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
  93. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -39
  94. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
  95. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
  96. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -353
  97. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
  98. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
  99. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -180
  100. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
  101. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
  102. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -97
  103. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
  104. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +0 -948
  105. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -151
  106. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  107. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -514
  108. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +0 -28
  119. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +0 -28
  120. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +0 -1
  121. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +0 -48
  122. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +0 -342
  123. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +0 -1
  124. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +0 -28
  125. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +0 -146
  126. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +0 -1
  127. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +0 -93
  128. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +0 -78
  129. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +0 -1
  130. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts +0 -948
  131. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +0 -148
  132. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  133. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +0 -480
  134. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +0 -1
@@ -1,9 +1,8 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
1
  /**
3
2
  * A loyalty earning rule defines how customers earn points in a loyalty program.
4
3
  * You can create rules for different activities, such as making purchases.
5
4
  */
6
- export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
5
+ interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
7
6
  /** Fixed amount of points awarded for each qualifying activity. */
8
7
  fixedAmount?: FixedAmount;
9
8
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
@@ -38,7 +37,7 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
38
37
  */
39
38
  title?: string;
40
39
  /** Current status of the earning rule. */
41
- status?: Status;
40
+ status?: StatusWithLiterals;
42
41
  /**
43
42
  * Revision number, incremented by 1 each time the earning rule is updated.
44
43
  * Pass the latest revision when updating to prevent conflicting changes.
@@ -61,21 +60,21 @@ export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
61
60
  metadata?: Metadata;
62
61
  }
63
62
  /** @oneof */
64
- export interface LoyaltyEarningRuleTypeOneOf {
63
+ interface LoyaltyEarningRuleTypeOneOf {
65
64
  /** Fixed amount of points awarded for each qualifying activity. */
66
65
  fixedAmount?: FixedAmount;
67
66
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
68
67
  conversionRate?: ConversionRate;
69
68
  }
70
69
  /** Fixed amount type of earning rule. */
71
- export interface FixedAmount {
70
+ interface FixedAmount {
72
71
  /**
73
72
  * Fixed amount configurations for each tier.
74
73
  * @maxSize 21
75
74
  */
76
75
  configs?: FixedAmountConfig[];
77
76
  }
78
- export interface FixedAmountConfig {
77
+ interface FixedAmountConfig {
79
78
  /**
80
79
  * Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction#terminology) is used.
81
80
  * @format GUID
@@ -90,7 +89,7 @@ export interface FixedAmountConfig {
90
89
  * Customers earn points based on the amount spent.
91
90
  * For example, for every $10 spent, a customer might earn 1 point.
92
91
  */
93
- export interface ConversionRate {
92
+ interface ConversionRate {
94
93
  /**
95
94
  * Conversion rate configurations for each tier.
96
95
  *
@@ -107,7 +106,7 @@ export interface ConversionRate {
107
106
  */
108
107
  field?: string | null;
109
108
  }
110
- export interface ConversionRateConfig {
109
+ interface ConversionRateConfig {
111
110
  /**
112
111
  * Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction) is used.
113
112
  * @format GUID
@@ -134,7 +133,7 @@ export interface ConversionRateConfig {
134
133
  */
135
134
  points?: number;
136
135
  }
137
- export declare enum Status {
136
+ declare enum Status {
138
137
  /** Status is unknown or not specified. */
139
138
  UNKNOWN = "UNKNOWN",
140
139
  /** Earning rule is active and can assign points. */
@@ -142,7 +141,9 @@ export declare enum Status {
142
141
  /** Earning rule is paused and can't assign points. */
143
142
  PAUSED = "PAUSED"
144
143
  }
145
- export interface Metadata {
144
+ /** @enumType */
145
+ type StatusWithLiterals = Status | 'UNKNOWN' | 'ACTIVE' | 'PAUSED';
146
+ interface Metadata {
146
147
  /** Whether the earning rule can be deleted. */
147
148
  canBeDeleted?: boolean;
148
149
  /**
@@ -151,29 +152,31 @@ export interface Metadata {
151
152
  */
152
153
  ruleTypeTag?: LoyaltyEarningRuleTypeTag;
153
154
  }
154
- export interface LoyaltyEarningRuleTypeTag {
155
+ interface LoyaltyEarningRuleTypeTag {
155
156
  /** Type of custom earning rule. */
156
- ruleType?: LoyaltyEarningRuleTypeTagType;
157
+ ruleType?: LoyaltyEarningRuleTypeTagTypeWithLiterals;
157
158
  }
158
- export declare enum LoyaltyEarningRuleTypeTagType {
159
+ declare enum LoyaltyEarningRuleTypeTagType {
159
160
  /** Type is unknown or not specified. */
160
161
  UNKNOWN_TYPE = "UNKNOWN_TYPE",
161
162
  /** Earning rule for a customer's birthday. */
162
163
  BIRTHDAY = "BIRTHDAY"
163
164
  }
164
- export interface CacheInvalidated {
165
+ /** @enumType */
166
+ type LoyaltyEarningRuleTypeTagTypeWithLiterals = LoyaltyEarningRuleTypeTagType | 'UNKNOWN_TYPE' | 'BIRTHDAY';
167
+ interface CacheInvalidated {
165
168
  }
166
- export interface EarningRuleDisabled {
169
+ interface EarningRuleDisabled {
167
170
  }
168
- export interface CreateLoyaltyEarningRuleRequest {
171
+ interface CreateLoyaltyEarningRuleRequest {
169
172
  /** Earning rule to create. */
170
173
  earningRule: LoyaltyEarningRule;
171
174
  }
172
- export interface CreateLoyaltyEarningRuleResponse {
175
+ interface CreateLoyaltyEarningRuleResponse {
173
176
  /** Created earning rule. */
174
177
  earningRule?: LoyaltyEarningRule;
175
178
  }
176
- export interface BulkCreateLoyaltyEarningRulesRequest {
179
+ interface BulkCreateLoyaltyEarningRulesRequest {
177
180
  /**
178
181
  * Earning rules to create.
179
182
  * @minSize 1
@@ -181,19 +184,19 @@ export interface BulkCreateLoyaltyEarningRulesRequest {
181
184
  */
182
185
  earningRules: LoyaltyEarningRule[];
183
186
  }
184
- export interface BulkCreateLoyaltyEarningRulesResponse {
187
+ interface BulkCreateLoyaltyEarningRulesResponse {
185
188
  /** Created earning rules. */
186
189
  results?: BulkLoyaltyEarningRuleResult[];
187
190
  /** Additional metadata for the created earning rules. */
188
191
  bulkActionMetadata?: BulkActionMetadata;
189
192
  }
190
- export interface BulkLoyaltyEarningRuleResult {
193
+ interface BulkLoyaltyEarningRuleResult {
191
194
  /** Additional metadata for the created earning rules. */
192
195
  itemMetadata?: ItemMetadata;
193
196
  /** Created earning rule. */
194
197
  item?: LoyaltyEarningRule;
195
198
  }
196
- export interface ItemMetadata {
199
+ interface ItemMetadata {
197
200
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
198
201
  _id?: string | null;
199
202
  /** Index of the item within the request array. Allows for correlation between request and response items. */
@@ -203,7 +206,7 @@ export interface ItemMetadata {
203
206
  /** Details about the error in case of failure. */
204
207
  error?: ApplicationError;
205
208
  }
206
- export interface ApplicationError {
209
+ interface ApplicationError {
207
210
  /** Error code. */
208
211
  code?: string;
209
212
  /** Description of the error. */
@@ -211,7 +214,7 @@ export interface ApplicationError {
211
214
  /** Data related to the error. */
212
215
  data?: Record<string, any> | null;
213
216
  }
214
- export interface BulkActionMetadata {
217
+ interface BulkActionMetadata {
215
218
  /** Number of items that were successfully processed. */
216
219
  totalSuccesses?: number;
217
220
  /** Number of items that couldn't be processed. */
@@ -219,13 +222,13 @@ export interface BulkActionMetadata {
219
222
  /** Number of failures without details because detailed failure threshold was exceeded. */
220
223
  undetailedFailures?: number;
221
224
  }
222
- export interface CreateCustomLoyaltyEarningRuleRequest {
225
+ interface CreateCustomLoyaltyEarningRuleRequest {
223
226
  /** Type of the custom earning rule. */
224
- type: Type;
227
+ type: TypeWithLiterals;
225
228
  /** Custom earning rule to create. */
226
229
  earningRule?: CustomLoyaltyEarningRule;
227
230
  }
228
- export declare enum Type {
231
+ declare enum Type {
229
232
  /** Unknown type. This value is not used. */
230
233
  UNKNOWN_TYPE = "UNKNOWN_TYPE",
231
234
  /** Earning rule for social media. */
@@ -233,8 +236,10 @@ export declare enum Type {
233
236
  /** Earning rule for birthdays. */
234
237
  BIRTHDAY = "BIRTHDAY"
235
238
  }
239
+ /** @enumType */
240
+ type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'SOCIAL_MEDIA' | 'BIRTHDAY';
236
241
  /** Used in CreateCustomLoyaltyEarningRuleRequest */
237
- export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
242
+ interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
238
243
  /** Fixed amount of points awarded for each qualifying activity. */
239
244
  fixedAmount?: FixedAmount;
240
245
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
@@ -247,36 +252,36 @@ export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOn
247
252
  title?: string;
248
253
  }
249
254
  /** @oneof */
250
- export interface CustomLoyaltyEarningRuleTypeOneOf {
255
+ interface CustomLoyaltyEarningRuleTypeOneOf {
251
256
  /** Fixed amount of points awarded for each qualifying activity. */
252
257
  fixedAmount?: FixedAmount;
253
258
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
254
259
  conversionRate?: ConversionRate;
255
260
  }
256
- export interface CreateCustomLoyaltyEarningRuleResponse {
261
+ interface CreateCustomLoyaltyEarningRuleResponse {
257
262
  /** Created earning rule. */
258
263
  earningRule?: LoyaltyEarningRule;
259
264
  }
260
- export interface GetLoyaltyEarningRuleRequest {
265
+ interface GetLoyaltyEarningRuleRequest {
261
266
  /**
262
267
  * ID of the earning rule to retrieve.
263
268
  * @format GUID
264
269
  */
265
270
  _id: string;
266
271
  }
267
- export interface GetLoyaltyEarningRuleResponse {
272
+ interface GetLoyaltyEarningRuleResponse {
268
273
  /** Retrieved earning rule. */
269
274
  earningRule?: LoyaltyEarningRule;
270
275
  }
271
- export interface UpdateLoyaltyEarningRuleRequest {
276
+ interface UpdateLoyaltyEarningRuleRequest {
272
277
  /** Earning rule to update. */
273
278
  earningRule: LoyaltyEarningRule;
274
279
  }
275
- export interface UpdateLoyaltyEarningRuleResponse {
280
+ interface UpdateLoyaltyEarningRuleResponse {
276
281
  /** The updated earning rule. */
277
282
  earningRule?: LoyaltyEarningRule;
278
283
  }
279
- export interface DeleteLoyaltyEarningRuleRequest {
284
+ interface DeleteLoyaltyEarningRuleRequest {
280
285
  /**
281
286
  * ID of the earning rule to delete.
282
287
  * @format GUID
@@ -288,28 +293,28 @@ export interface DeleteLoyaltyEarningRuleRequest {
288
293
  */
289
294
  revision?: string;
290
295
  }
291
- export interface DeleteLoyaltyEarningRuleResponse {
296
+ interface DeleteLoyaltyEarningRuleResponse {
292
297
  }
293
- export interface DeleteAutomationEarningRuleRequest {
298
+ interface DeleteAutomationEarningRuleRequest {
294
299
  /**
295
300
  * ID of the earning rule to delete.
296
301
  * @format GUID
297
302
  */
298
303
  _id: string;
299
304
  }
300
- export interface DeleteAutomationEarningRuleResponse {
305
+ interface DeleteAutomationEarningRuleResponse {
301
306
  }
302
- export interface ListEarningRulesRequest {
307
+ interface ListEarningRulesRequest {
303
308
  /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
304
309
  triggerAppId?: string | null;
305
310
  /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
306
311
  triggerActivityType?: string | null;
307
312
  }
308
- export interface ListEarningRulesResponse {
313
+ interface ListEarningRulesResponse {
309
314
  /** Retrieved earning rules. */
310
315
  earningRules?: LoyaltyEarningRule[];
311
316
  }
312
- export interface ListEarningRulesInTierRequest {
317
+ interface ListEarningRulesInTierRequest {
313
318
  /**
314
319
  * ID of the tier for which the earning rules will be returned.
315
320
  * @format GUID
@@ -318,7 +323,7 @@ export interface ListEarningRulesInTierRequest {
318
323
  /** Pagination options. */
319
324
  paging?: CursorPaging;
320
325
  }
321
- export interface CursorPaging {
326
+ interface CursorPaging {
322
327
  /**
323
328
  * Maximum number of items to return in the results.
324
329
  * @max 100
@@ -333,13 +338,13 @@ export interface CursorPaging {
333
338
  */
334
339
  cursor?: string | null;
335
340
  }
336
- export interface ListEarningRulesInTierResponse {
341
+ interface ListEarningRulesInTierResponse {
337
342
  /** Retrieved earning rules. */
338
343
  earningRules?: LoyaltyEarningRule[];
339
344
  /** Details on the paged set of results returned. */
340
345
  pagingMetadata?: PagingMetadataV2;
341
346
  }
342
- export interface PagingMetadataV2 {
347
+ interface PagingMetadataV2 {
343
348
  /** Number of items returned in the response. */
344
349
  count?: number | null;
345
350
  /** Offset that was requested. */
@@ -351,7 +356,7 @@ export interface PagingMetadataV2 {
351
356
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
352
357
  cursors?: Cursors;
353
358
  }
354
- export interface Cursors {
359
+ interface Cursors {
355
360
  /**
356
361
  * Cursor string pointing to the next page in the list of results.
357
362
  * @maxLength 16000
@@ -363,7 +368,7 @@ export interface Cursors {
363
368
  */
364
369
  prev?: string | null;
365
370
  }
366
- export interface DomainEvent extends DomainEventBodyOneOf {
371
+ interface DomainEvent extends DomainEventBodyOneOf {
367
372
  createdEvent?: EntityCreatedEvent;
368
373
  updatedEvent?: EntityUpdatedEvent;
369
374
  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,20 +423,20 @@ 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 InvalidateEarningRuleCacheRequest {
435
+ interface InvalidateEarningRuleCacheRequest {
431
436
  }
432
- export interface InvalidateEarningRuleCacheResponse {
437
+ interface InvalidateEarningRuleCacheResponse {
433
438
  }
434
- export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
439
+ interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
435
440
  /** Emitted on a meta site creation. */
436
441
  siteCreated?: SiteCreated;
437
442
  /** Emitted on a meta site transfer completion. */
@@ -497,7 +502,7 @@ export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
497
502
  assets?: Asset[];
498
503
  }
499
504
  /** @oneof */
500
- export interface MetaSiteSpecialEventPayloadOneOf {
505
+ interface MetaSiteSpecialEventPayloadOneOf {
501
506
  /** Emitted on a meta site creation. */
502
507
  siteCreated?: SiteCreated;
503
508
  /** Emitted on a meta site transfer completion. */
@@ -547,7 +552,7 @@ export interface MetaSiteSpecialEventPayloadOneOf {
547
552
  /** Emitted when Picasso is detached. */
548
553
  picassoUnassigned?: PicassoUnassigned;
549
554
  }
550
- export interface Asset {
555
+ interface Asset {
551
556
  /**
552
557
  * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).
553
558
  * @maxLength 36
@@ -559,16 +564,18 @@ export interface Asset {
559
564
  */
560
565
  instanceId?: string;
561
566
  /** An application state. */
562
- state?: State;
567
+ state?: StateWithLiterals;
563
568
  }
564
- export declare enum State {
569
+ declare enum State {
565
570
  UNKNOWN = "UNKNOWN",
566
571
  ENABLED = "ENABLED",
567
572
  DISABLED = "DISABLED",
568
573
  PENDING = "PENDING",
569
574
  DEMO = "DEMO"
570
575
  }
571
- export interface SiteCreated {
576
+ /** @enumType */
577
+ type StateWithLiterals = State | 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'PENDING' | 'DEMO';
578
+ interface SiteCreated {
572
579
  /**
573
580
  * A template identifier (empty if not created from a template).
574
581
  * @maxLength 36
@@ -580,7 +587,7 @@ export interface SiteCreated {
580
587
  */
581
588
  ownerId?: string;
582
589
  /** A context in which meta site was created. */
583
- context?: SiteCreatedContext;
590
+ context?: SiteCreatedContextWithLiterals;
584
591
  /**
585
592
  * A meta site id from which this site was created.
586
593
  *
@@ -595,9 +602,9 @@ export interface SiteCreated {
595
602
  */
596
603
  siteName?: string;
597
604
  /** A namespace. */
598
- namespace?: Namespace;
605
+ namespace?: NamespaceWithLiterals;
599
606
  }
600
- export declare enum SiteCreatedContext {
607
+ declare enum SiteCreatedContext {
601
608
  /** A valid option, we don't expose all reasons why site might be created. */
602
609
  OTHER = "OTHER",
603
610
  /** A meta site was created from template. */
@@ -611,7 +618,9 @@ export declare enum SiteCreatedContext {
611
618
  /** deprecated A meta site was created for Flash editor. */
612
619
  FLASH = "FLASH"
613
620
  }
614
- export declare enum Namespace {
621
+ /** @enumType */
622
+ type SiteCreatedContextWithLiterals = SiteCreatedContext | 'OTHER' | 'FROM_TEMPLATE' | 'DUPLICATE_BY_SITE_TRANSFER' | 'DUPLICATE' | 'OLD_SITE_TRANSFER' | 'FLASH';
623
+ declare enum Namespace {
615
624
  UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
616
625
  /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
617
626
  WIX = "WIX",
@@ -693,8 +702,10 @@ export declare enum Namespace {
693
702
  /** MIMIR - Siteless account for MIMIR Ai Job runner. */
694
703
  MIMIR = "MIMIR"
695
704
  }
705
+ /** @enumType */
706
+ type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR';
696
707
  /** Site transferred to another user. */
697
- export interface SiteTransferred {
708
+ interface SiteTransferred {
698
709
  /**
699
710
  * A previous owner id (user that transfers meta site).
700
711
  * @format GUID
@@ -707,15 +718,15 @@ export interface SiteTransferred {
707
718
  newOwnerId?: string;
708
719
  }
709
720
  /** Soft deletion of the meta site. Could be restored. */
710
- export interface SiteDeleted {
721
+ interface SiteDeleted {
711
722
  /** A deletion context. */
712
723
  deleteContext?: DeleteContext;
713
724
  }
714
- export interface DeleteContext {
725
+ interface DeleteContext {
715
726
  /** When the meta site was deleted. */
716
727
  dateDeleted?: Date | null;
717
728
  /** A status. */
718
- deleteStatus?: DeleteStatus;
729
+ deleteStatus?: DeleteStatusWithLiterals;
719
730
  /**
720
731
  * A reason (flow).
721
732
  * @maxLength 255
@@ -727,20 +738,22 @@ export interface DeleteContext {
727
738
  */
728
739
  initiatorId?: string | null;
729
740
  }
730
- export declare enum DeleteStatus {
741
+ declare enum DeleteStatus {
731
742
  UNKNOWN = "UNKNOWN",
732
743
  TRASH = "TRASH",
733
744
  DELETED = "DELETED",
734
745
  PENDING_PURGE = "PENDING_PURGE",
735
746
  PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
736
747
  }
748
+ /** @enumType */
749
+ type DeleteStatusWithLiterals = DeleteStatus | 'UNKNOWN' | 'TRASH' | 'DELETED' | 'PENDING_PURGE' | 'PURGED_EXTERNALLY';
737
750
  /** Restoration of the meta site. */
738
- export interface SiteUndeleted {
751
+ interface SiteUndeleted {
739
752
  }
740
753
  /** First publish of a meta site. Or subsequent publish after unpublish. */
741
- export interface SitePublished {
754
+ interface SitePublished {
742
755
  }
743
- export interface SiteUnpublished {
756
+ interface SiteUnpublished {
744
757
  /**
745
758
  * A list of URLs previously associated with the meta site.
746
759
  * @maxLength 4000
@@ -748,9 +761,9 @@ export interface SiteUnpublished {
748
761
  */
749
762
  urls?: string[];
750
763
  }
751
- export interface SiteMarkedAsTemplate {
764
+ interface SiteMarkedAsTemplate {
752
765
  }
753
- export interface SiteMarkedAsWixSite {
766
+ interface SiteMarkedAsWixSite {
754
767
  }
755
768
  /**
756
769
  * Represents a service provisioned a site.
@@ -767,7 +780,7 @@ export interface SiteMarkedAsWixSite {
767
780
  * changes made to the original template afterward.
768
781
  * To ensure this, the TPA on the template gets a new instance_id.
769
782
  */
770
- export interface ServiceProvisioned {
783
+ interface ServiceProvisioned {
771
784
  /**
772
785
  * Either UUID or EmbeddedServiceType.
773
786
  * @maxLength 36
@@ -794,7 +807,7 @@ export interface ServiceProvisioned {
794
807
  */
795
808
  originMetaSiteId?: string | null;
796
809
  }
797
- export interface ServiceRemoved {
810
+ interface ServiceRemoved {
798
811
  /**
799
812
  * Either UUID or EmbeddedServiceType.
800
813
  * @maxLength 36
@@ -812,7 +825,7 @@ export interface ServiceRemoved {
812
825
  version?: string | null;
813
826
  }
814
827
  /** Rename of the site. Meaning, free public url has been changed as well. */
815
- export interface SiteRenamed {
828
+ interface SiteRenamed {
816
829
  /**
817
830
  * A new meta site name (URL slug).
818
831
  * @maxLength 20
@@ -829,21 +842,21 @@ export interface SiteRenamed {
829
842
  *
830
843
  * Could not be restored. Therefore it's desirable to cleanup data.
831
844
  */
832
- export interface SiteHardDeleted {
845
+ interface SiteHardDeleted {
833
846
  /** A deletion context. */
834
847
  deleteContext?: DeleteContext;
835
848
  }
836
- export interface NamespaceChanged {
849
+ interface NamespaceChanged {
837
850
  /** A previous namespace. */
838
- oldNamespace?: Namespace;
851
+ oldNamespace?: NamespaceWithLiterals;
839
852
  /** A new namespace. */
840
- newNamespace?: Namespace;
853
+ newNamespace?: NamespaceWithLiterals;
841
854
  }
842
855
  /** Assigned Studio editor */
843
- export interface StudioAssigned {
856
+ interface StudioAssigned {
844
857
  }
845
858
  /** Unassigned Studio editor */
846
- export interface StudioUnassigned {
859
+ interface StudioUnassigned {
847
860
  }
848
861
  /**
849
862
  * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.
@@ -853,13 +866,13 @@ export interface StudioUnassigned {
853
866
  *
854
867
  * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service
855
868
  */
856
- export interface SiteUrlChanged {
869
+ interface SiteUrlChanged {
857
870
  }
858
871
  /**
859
872
  * Used at the end of the deletion flow for both draft sites and when a user deletes a site.
860
873
  * Consumed by other teams to remove relevant data.
861
874
  */
862
- export interface SitePurgedExternally {
875
+ interface SitePurgedExternally {
863
876
  /**
864
877
  * @maxLength 2048
865
878
  * @maxSize 100
@@ -869,18 +882,18 @@ export interface SitePurgedExternally {
869
882
  appDefId?: string[];
870
883
  }
871
884
  /** Assigned Odeditor */
872
- export interface OdeditorAssigned {
885
+ interface OdeditorAssigned {
873
886
  }
874
887
  /** Unassigned Odeditor */
875
- export interface OdeditorUnassigned {
888
+ interface OdeditorUnassigned {
876
889
  }
877
890
  /** Assigned Picasso editor */
878
- export interface PicassoAssigned {
891
+ interface PicassoAssigned {
879
892
  }
880
893
  /** Unassigned Picasso */
881
- export interface PicassoUnassigned {
894
+ interface PicassoUnassigned {
882
895
  }
883
- export interface MessageEnvelope {
896
+ interface MessageEnvelope {
884
897
  /**
885
898
  * App instance ID.
886
899
  * @format GUID
@@ -896,7 +909,7 @@ export interface MessageEnvelope {
896
909
  /** Stringify payload. */
897
910
  data?: string;
898
911
  }
899
- export interface IdentificationData extends IdentificationDataIdOneOf {
912
+ interface IdentificationData extends IdentificationDataIdOneOf {
900
913
  /**
901
914
  * ID of a site visitor that has not logged in to the site.
902
915
  * @format GUID
@@ -918,10 +931,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
918
931
  */
919
932
  appId?: string;
920
933
  /** @readonly */
921
- identityType?: WebhookIdentityType;
934
+ identityType?: WebhookIdentityTypeWithLiterals;
922
935
  }
923
936
  /** @oneof */
924
- export interface IdentificationDataIdOneOf {
937
+ interface IdentificationDataIdOneOf {
925
938
  /**
926
939
  * ID of a site visitor that has not logged in to the site.
927
940
  * @format GUID
@@ -943,14 +956,16 @@ export interface IdentificationDataIdOneOf {
943
956
  */
944
957
  appId?: string;
945
958
  }
946
- export declare enum WebhookIdentityType {
959
+ declare enum WebhookIdentityType {
947
960
  UNKNOWN = "UNKNOWN",
948
961
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
949
962
  MEMBER = "MEMBER",
950
963
  WIX_USER = "WIX_USER",
951
964
  APP = "APP"
952
965
  }
953
- export interface BaseEventMetadata {
966
+ /** @enumType */
967
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
968
+ interface BaseEventMetadata {
954
969
  /**
955
970
  * App instance ID.
956
971
  * @format GUID
@@ -964,7 +979,7 @@ export interface BaseEventMetadata {
964
979
  /** The identification type and identity data. */
965
980
  identity?: IdentificationData;
966
981
  }
967
- export interface EventMetadata extends BaseEventMetadata {
982
+ interface EventMetadata extends BaseEventMetadata {
968
983
  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
969
984
  _id?: string;
970
985
  /**
@@ -994,172 +1009,22 @@ export interface EventMetadata extends BaseEventMetadata {
994
1009
  */
995
1010
  entityEventSequence?: string | null;
996
1011
  }
997
- export interface LoyaltyEarningRuleCreatedEnvelope {
1012
+ interface LoyaltyEarningRuleCreatedEnvelope {
998
1013
  entity: LoyaltyEarningRule;
999
1014
  metadata: EventMetadata;
1000
1015
  }
1001
- /**
1002
- * Triggered when an earning rule is created.
1003
- * @permissionScope Read Loyalty
1004
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1005
- * @permissionScope Manage Loyalty
1006
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1007
- * @permissionScope Manage Restaurants - all permissions
1008
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1009
- * @permissionId LOYALTY.READ_EARNING_RULES
1010
- * @webhook
1011
- * @eventType wix.loyalty.v1.loyalty_earning_rule_created
1012
- * @slug created
1013
- */
1014
- export declare function onLoyaltyEarningRuleCreated(handler: (event: LoyaltyEarningRuleCreatedEnvelope) => void | Promise<void>): void;
1015
- export interface LoyaltyEarningRuleDeletedEnvelope {
1016
+ interface LoyaltyEarningRuleDeletedEnvelope {
1016
1017
  metadata: EventMetadata;
1017
1018
  }
1018
- /**
1019
- * Triggered when an earning rule is deleted.
1020
- * @permissionScope Read Loyalty
1021
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1022
- * @permissionScope Manage Loyalty
1023
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1024
- * @permissionScope Manage Restaurants - all permissions
1025
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1026
- * @permissionId LOYALTY.READ_EARNING_RULES
1027
- * @webhook
1028
- * @eventType wix.loyalty.v1.loyalty_earning_rule_deleted
1029
- * @slug deleted
1030
- */
1031
- export declare function onLoyaltyEarningRuleDeleted(handler: (event: LoyaltyEarningRuleDeletedEnvelope) => void | Promise<void>): void;
1032
- export interface LoyaltyEarningRuleUpdatedEnvelope {
1019
+ interface LoyaltyEarningRuleUpdatedEnvelope {
1033
1020
  entity: LoyaltyEarningRule;
1034
1021
  metadata: EventMetadata;
1035
1022
  }
1036
- /**
1037
- * Triggered when an earning rule is updated.
1038
- * @permissionScope Read Loyalty
1039
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1040
- * @permissionScope Manage Loyalty
1041
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1042
- * @permissionScope Manage Restaurants - all permissions
1043
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1044
- * @permissionId LOYALTY.READ_EARNING_RULES
1045
- * @webhook
1046
- * @eventType wix.loyalty.v1.loyalty_earning_rule_updated
1047
- * @slug updated
1048
- */
1049
- export declare function onLoyaltyEarningRuleUpdated(handler: (event: LoyaltyEarningRuleUpdatedEnvelope) => void | Promise<void>): void;
1050
- 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`;
1051
- /**
1052
- * Creates a non-automated earning rule.
1053
- *
1054
- * >**Note**: You can only create non-automated earning rules from a supported list.
1055
- * For the supported list of services, see the introduction.
1056
- * @param earningRule - Earning rule to create.
1057
- * @public
1058
- * @requiredField earningRule
1059
- * @requiredField earningRule.sourceAppId
1060
- * @requiredField earningRule.status
1061
- * @requiredField earningRule.title
1062
- * @requiredField earningRule.triggerActivityType
1063
- * @requiredField earningRule.triggerAppId
1064
- * @requiredField earningRule.type
1065
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1066
- * @permissionScope Manage Loyalty
1067
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1068
- * @permissionScope Manage Restaurants - all permissions
1069
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1070
- * @applicableIdentity APP
1071
- * @returns Created earning rule.
1072
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule
1073
- */
1074
- export declare function createLoyaltyEarningRule(earningRule: NonNullablePaths<LoyaltyEarningRule, `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`>): Promise<NonNullablePaths<LoyaltyEarningRule, LoyaltyEarningRuleNonNullablePaths>>;
1075
- /**
1076
- * Creates multiple non-automated earning rules.
1077
- *
1078
- * >**Note**: You can only create non-automated earning rules from a supported list.
1079
- * For the supported list of services, see the introduction.
1080
- * @param earningRules - Earning rules to create.
1081
- * @public
1082
- * @requiredField earningRules
1083
- * @requiredField earningRules.sourceAppId
1084
- * @requiredField earningRules.status
1085
- * @requiredField earningRules.title
1086
- * @requiredField earningRules.triggerActivityType
1087
- * @requiredField earningRules.triggerAppId
1088
- * @requiredField earningRules.type
1089
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1090
- * @permissionScope Manage Loyalty
1091
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1092
- * @permissionScope Manage Restaurants - all permissions
1093
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1094
- * @applicableIdentity APP
1095
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules
1096
- */
1097
- 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` | {
1098
- [P in LoyaltyEarningRuleNonNullablePaths]: `results.${number}.item.${P}`;
1099
- }[LoyaltyEarningRuleNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
1100
- /**
1101
- * Creates a custom automated earning rule.
1102
- *
1103
- * To learn more about the automated rules, read the introduction.
1104
- * @param type - Type of the custom earning rule.
1105
- * @public
1106
- * @requiredField type
1107
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1108
- * @permissionScope Manage Loyalty
1109
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1110
- * @permissionScope Manage Restaurants - all permissions
1111
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1112
- * @applicableIdentity APP
1113
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule
1114
- */
1115
- export declare function createCustomLoyaltyEarningRule(type: Type, options?: CreateCustomLoyaltyEarningRuleOptions): Promise<NonNullablePaths<CreateCustomLoyaltyEarningRuleResponse, {
1116
- [P in LoyaltyEarningRuleNonNullablePaths]: `earningRule.${P}`;
1117
- }[LoyaltyEarningRuleNonNullablePaths]>>;
1118
- export interface CreateCustomLoyaltyEarningRuleOptions {
1023
+ interface CreateCustomLoyaltyEarningRuleOptions {
1119
1024
  /** Custom earning rule to create. */
1120
1025
  earningRule?: CustomLoyaltyEarningRule;
1121
1026
  }
1122
- /**
1123
- * Retrieves a specified non-automated earning rule.
1124
- * @param _id - ID of the earning rule to retrieve.
1125
- * @public
1126
- * @requiredField _id
1127
- * @permissionId LOYALTY.READ_EARNING_RULES
1128
- * @permissionScope Read Loyalty
1129
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1130
- * @permissionScope Manage Loyalty
1131
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1132
- * @permissionScope Manage Restaurants - all permissions
1133
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1134
- * @applicableIdentity APP
1135
- * @applicableIdentity VISITOR
1136
- * @returns Retrieved earning rule.
1137
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule
1138
- */
1139
- export declare function getLoyaltyEarningRule(_id: string): Promise<NonNullablePaths<LoyaltyEarningRule, LoyaltyEarningRuleNonNullablePaths>>;
1140
- /**
1141
- * Updates an earning rule.
1142
- *
1143
- * Supports partial updates.
1144
- *
1145
- * Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,
1146
- * the current revision must be passed when updating the earning rule.
1147
- * @param _id - Loyalty earning rule ID.
1148
- * @public
1149
- * @requiredField _id
1150
- * @requiredField earningRule
1151
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1152
- * @permissionScope Manage Loyalty
1153
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1154
- * @permissionScope Manage Restaurants - all permissions
1155
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1156
- * @applicableIdentity APP
1157
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule
1158
- */
1159
- export declare function updateLoyaltyEarningRule(_id: string, earningRule: UpdateLoyaltyEarningRule): Promise<NonNullablePaths<UpdateLoyaltyEarningRuleResponse, {
1160
- [P in LoyaltyEarningRuleNonNullablePaths]: `earningRule.${P}`;
1161
- }[LoyaltyEarningRuleNonNullablePaths]>>;
1162
- export interface UpdateLoyaltyEarningRule {
1027
+ interface UpdateLoyaltyEarningRule {
1163
1028
  /** Fixed amount of points awarded for each qualifying activity. */
1164
1029
  fixedAmount?: FixedAmount;
1165
1030
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
@@ -1194,7 +1059,7 @@ export interface UpdateLoyaltyEarningRule {
1194
1059
  */
1195
1060
  title?: string;
1196
1061
  /** Current status of the earning rule. */
1197
- status?: Status;
1062
+ status?: StatusWithLiterals;
1198
1063
  /**
1199
1064
  * Revision number, incremented by 1 each time the earning rule is updated.
1200
1065
  * Pass the latest revision when updating to prevent conflicting changes.
@@ -1216,68 +1081,18 @@ export interface UpdateLoyaltyEarningRule {
1216
1081
  */
1217
1082
  metadata?: Metadata;
1218
1083
  }
1219
- /**
1220
- * Deletes a non-automated earning rule.
1221
- * @param _id - ID of the earning rule to delete.
1222
- * @public
1223
- * @requiredField _id
1224
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1225
- * @permissionScope Manage Loyalty
1226
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1227
- * @permissionScope Manage Restaurants - all permissions
1228
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1229
- * @applicableIdentity APP
1230
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule
1231
- */
1232
- export declare function deleteLoyaltyEarningRule(_id: string, options?: DeleteLoyaltyEarningRuleOptions): Promise<void>;
1233
- export interface DeleteLoyaltyEarningRuleOptions {
1084
+ interface DeleteLoyaltyEarningRuleOptions {
1234
1085
  /**
1235
1086
  * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
1236
1087
  * Pass the latest revision when updating to prevent conflicting changes.
1237
1088
  */
1238
1089
  revision?: string;
1239
1090
  }
1240
- /**
1241
- * Deletes a custom automated earning rule.
1242
- *
1243
- * > **Note:** Pre-installed automated rules can only be paused, not deleted.
1244
- * @param _id - ID of the earning rule to delete.
1245
- * @public
1246
- * @requiredField _id
1247
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1248
- * @permissionScope Manage Loyalty
1249
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1250
- * @permissionScope Manage Restaurants - all permissions
1251
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1252
- * @applicableIdentity APP
1253
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule
1254
- */
1255
- export declare function deleteAutomationEarningRule(_id: string): Promise<void>;
1256
- /**
1257
- * Retrieves a list of earning rules.
1258
- *
1259
- * Returns both automated and non-automated earning rules.
1260
- *
1261
- * You can filter the results by `triggerAppId` or `triggerActivityType`.
1262
- * @public
1263
- * @permissionId LOYALTY.READ_EARNING_RULES
1264
- * @permissionScope Read Loyalty
1265
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1266
- * @permissionScope Manage Loyalty
1267
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1268
- * @permissionScope Manage Restaurants - all permissions
1269
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1270
- * @applicableIdentity APP
1271
- * @applicableIdentity VISITOR
1272
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules
1273
- */
1274
- export declare function listEarningRules(options?: ListEarningRulesOptions): Promise<NonNullablePaths<ListEarningRulesResponse, {
1275
- [P in LoyaltyEarningRuleNonNullablePaths]: `earningRules.${number}.${P}`;
1276
- }[LoyaltyEarningRuleNonNullablePaths]>>;
1277
- export interface ListEarningRulesOptions {
1091
+ interface ListEarningRulesOptions {
1278
1092
  /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
1279
1093
  triggerAppId?: string | null;
1280
1094
  /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
1281
1095
  triggerActivityType?: string | null;
1282
1096
  }
1283
- export {};
1097
+
1098
+ export { type DomainEvent 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 GetLoyaltyEarningRuleResponse as H, type ItemMetadata as I, type UpdateLoyaltyEarningRuleRequest as J, type DeleteLoyaltyEarningRuleRequest as K, type LoyaltyEarningRule as L, type Metadata as M, Namespace as N, type DeleteLoyaltyEarningRuleResponse as O, type DeleteAutomationEarningRuleRequest as P, type DeleteAutomationEarningRuleResponse as Q, type ListEarningRulesRequest as R, Status as S, type TypeWithLiterals as T, type UpdateLoyaltyEarningRule as U, type ListEarningRulesInTierRequest as V, WebhookIdentityType as W, type CursorPaging as X, type ListEarningRulesInTierResponse as Y, type PagingMetadataV2 as Z, type Cursors as _, type CreateCustomLoyaltyEarningRuleResponse as a, type DomainEventBodyOneOf as a0, type EntityCreatedEvent as a1, type RestoreInfo as a2, type EntityUpdatedEvent as a3, type EntityDeletedEvent as a4, type ActionEvent as a5, type Empty as a6, type InvalidateEarningRuleCacheRequest as a7, type InvalidateEarningRuleCacheResponse as a8, type MetaSiteSpecialEvent as a9, type IdentificationDataIdOneOf as aA, type BaseEventMetadata as aB, type EventMetadata as aC, type MetaSiteSpecialEventPayloadOneOf as aa, type Asset as ab, type SiteCreated as ac, type SiteTransferred as ad, type SiteDeleted as ae, type DeleteContext as af, type SiteUndeleted as ag, type SitePublished as ah, type SiteUnpublished as ai, type SiteMarkedAsTemplate as aj, type SiteMarkedAsWixSite as ak, type ServiceProvisioned as al, type ServiceRemoved as am, type SiteRenamed as an, type SiteHardDeleted as ao, type NamespaceChanged as ap, type StudioAssigned as aq, type StudioUnassigned as ar, type SiteUrlChanged as as, type SitePurgedExternally as at, type OdeditorAssigned as au, type OdeditorUnassigned as av, type PicassoAssigned as aw, type PicassoUnassigned as ax, type MessageEnvelope as ay, type IdentificationData as az, type UpdateLoyaltyEarningRuleResponse as b, type ListEarningRulesOptions as c, type ListEarningRulesResponse as d, type LoyaltyEarningRuleCreatedEnvelope as e, type LoyaltyEarningRuleDeletedEnvelope as f, type LoyaltyEarningRuleUpdatedEnvelope as g, LoyaltyEarningRuleTypeTagType as h, Type as i, State as j, SiteCreatedContext as k, DeleteStatus as l, type LoyaltyEarningRuleTypeOneOf as m, type FixedAmountConfig as n, type ConversionRate as o, type ConversionRateConfig as p, type LoyaltyEarningRuleTypeTag as q, type CacheInvalidated as r, type CreateLoyaltyEarningRuleRequest as s, type CreateLoyaltyEarningRuleResponse as t, type BulkCreateLoyaltyEarningRulesRequest as u, type BulkLoyaltyEarningRuleResult as v, type BulkActionMetadata as w, type CreateCustomLoyaltyEarningRuleRequest as x, type CustomLoyaltyEarningRule as y, type CustomLoyaltyEarningRuleTypeOneOf as z };