@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,33 +141,37 @@ 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
  }
149
- export interface LoyaltyEarningRuleTypeTag {
150
+ interface LoyaltyEarningRuleTypeTag {
150
151
  /** Type of custom earning rule. */
151
- ruleType?: LoyaltyEarningRuleTypeTagType;
152
+ ruleType?: LoyaltyEarningRuleTypeTagTypeWithLiterals;
152
153
  }
153
- export declare enum LoyaltyEarningRuleTypeTagType {
154
+ declare enum LoyaltyEarningRuleTypeTagType {
154
155
  /** Type is unknown or not specified. */
155
156
  UNKNOWN_TYPE = "UNKNOWN_TYPE",
156
157
  /** Earning rule for a customer's birthday. */
157
158
  BIRTHDAY = "BIRTHDAY"
158
159
  }
159
- export interface CacheInvalidated {
160
+ /** @enumType */
161
+ type LoyaltyEarningRuleTypeTagTypeWithLiterals = LoyaltyEarningRuleTypeTagType | 'UNKNOWN_TYPE' | 'BIRTHDAY';
162
+ interface CacheInvalidated {
160
163
  }
161
- export interface EarningRuleDisabled {
164
+ interface EarningRuleDisabled {
162
165
  }
163
- export interface CreateLoyaltyEarningRuleRequest {
166
+ interface CreateLoyaltyEarningRuleRequest {
164
167
  /** Earning rule to create. */
165
168
  earningRule: LoyaltyEarningRule;
166
169
  }
167
- export interface CreateLoyaltyEarningRuleResponse {
170
+ interface CreateLoyaltyEarningRuleResponse {
168
171
  /** Created earning rule. */
169
172
  earningRule?: LoyaltyEarningRule;
170
173
  }
171
- export interface BulkCreateLoyaltyEarningRulesRequest {
174
+ interface BulkCreateLoyaltyEarningRulesRequest {
172
175
  /**
173
176
  * Earning rules to create.
174
177
  * @minSize 1
@@ -176,19 +179,19 @@ export interface BulkCreateLoyaltyEarningRulesRequest {
176
179
  */
177
180
  earningRules: LoyaltyEarningRule[];
178
181
  }
179
- export interface BulkCreateLoyaltyEarningRulesResponse {
182
+ interface BulkCreateLoyaltyEarningRulesResponse {
180
183
  /** Created earning rules. */
181
184
  results?: BulkLoyaltyEarningRuleResult[];
182
185
  /** Additional metadata for the created earning rules. */
183
186
  bulkActionMetadata?: BulkActionMetadata;
184
187
  }
185
- export interface BulkLoyaltyEarningRuleResult {
188
+ interface BulkLoyaltyEarningRuleResult {
186
189
  /** Additional metadata for the created earning rules. */
187
190
  itemMetadata?: ItemMetadata;
188
191
  /** Created earning rule. */
189
192
  item?: LoyaltyEarningRule;
190
193
  }
191
- export interface ItemMetadata {
194
+ interface ItemMetadata {
192
195
  /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
193
196
  _id?: string | null;
194
197
  /** Index of the item within the request array. Allows for correlation between request and response items. */
@@ -198,7 +201,7 @@ export interface ItemMetadata {
198
201
  /** Details about the error in case of failure. */
199
202
  error?: ApplicationError;
200
203
  }
201
- export interface ApplicationError {
204
+ interface ApplicationError {
202
205
  /** Error code. */
203
206
  code?: string;
204
207
  /** Description of the error. */
@@ -206,7 +209,7 @@ export interface ApplicationError {
206
209
  /** Data related to the error. */
207
210
  data?: Record<string, any> | null;
208
211
  }
209
- export interface BulkActionMetadata {
212
+ interface BulkActionMetadata {
210
213
  /** Number of items that were successfully processed. */
211
214
  totalSuccesses?: number;
212
215
  /** Number of items that couldn't be processed. */
@@ -214,13 +217,13 @@ export interface BulkActionMetadata {
214
217
  /** Number of failures without details because detailed failure threshold was exceeded. */
215
218
  undetailedFailures?: number;
216
219
  }
217
- export interface CreateCustomLoyaltyEarningRuleRequest {
220
+ interface CreateCustomLoyaltyEarningRuleRequest {
218
221
  /** Type of the custom earning rule. */
219
- type: Type;
222
+ type: TypeWithLiterals;
220
223
  /** Custom earning rule to create. */
221
224
  earningRule?: CustomLoyaltyEarningRule;
222
225
  }
223
- export declare enum Type {
226
+ declare enum Type {
224
227
  /** Unknown type. This value is not used. */
225
228
  UNKNOWN_TYPE = "UNKNOWN_TYPE",
226
229
  /** Earning rule for social media. */
@@ -228,8 +231,10 @@ export declare enum Type {
228
231
  /** Earning rule for birthdays. */
229
232
  BIRTHDAY = "BIRTHDAY"
230
233
  }
234
+ /** @enumType */
235
+ type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'SOCIAL_MEDIA' | 'BIRTHDAY';
231
236
  /** Used in CreateCustomLoyaltyEarningRuleRequest */
232
- export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
237
+ interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
233
238
  /** Fixed amount of points awarded for each qualifying activity. */
234
239
  fixedAmount?: FixedAmount;
235
240
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
@@ -242,36 +247,36 @@ export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOn
242
247
  title?: string;
243
248
  }
244
249
  /** @oneof */
245
- export interface CustomLoyaltyEarningRuleTypeOneOf {
250
+ interface CustomLoyaltyEarningRuleTypeOneOf {
246
251
  /** Fixed amount of points awarded for each qualifying activity. */
247
252
  fixedAmount?: FixedAmount;
248
253
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
249
254
  conversionRate?: ConversionRate;
250
255
  }
251
- export interface CreateCustomLoyaltyEarningRuleResponse {
256
+ interface CreateCustomLoyaltyEarningRuleResponse {
252
257
  /** Created earning rule. */
253
258
  earningRule?: LoyaltyEarningRule;
254
259
  }
255
- export interface GetLoyaltyEarningRuleRequest {
260
+ interface GetLoyaltyEarningRuleRequest {
256
261
  /**
257
262
  * ID of the earning rule to retrieve.
258
263
  * @format GUID
259
264
  */
260
265
  _id: string;
261
266
  }
262
- export interface GetLoyaltyEarningRuleResponse {
267
+ interface GetLoyaltyEarningRuleResponse {
263
268
  /** Retrieved earning rule. */
264
269
  earningRule?: LoyaltyEarningRule;
265
270
  }
266
- export interface UpdateLoyaltyEarningRuleRequest {
271
+ interface UpdateLoyaltyEarningRuleRequest {
267
272
  /** Earning rule to update. */
268
273
  earningRule: LoyaltyEarningRule;
269
274
  }
270
- export interface UpdateLoyaltyEarningRuleResponse {
275
+ interface UpdateLoyaltyEarningRuleResponse {
271
276
  /** The updated earning rule. */
272
277
  earningRule?: LoyaltyEarningRule;
273
278
  }
274
- export interface DeleteLoyaltyEarningRuleRequest {
279
+ interface DeleteLoyaltyEarningRuleRequest {
275
280
  /**
276
281
  * ID of the earning rule to delete.
277
282
  * @format GUID
@@ -283,28 +288,28 @@ export interface DeleteLoyaltyEarningRuleRequest {
283
288
  */
284
289
  revision?: string;
285
290
  }
286
- export interface DeleteLoyaltyEarningRuleResponse {
291
+ interface DeleteLoyaltyEarningRuleResponse {
287
292
  }
288
- export interface DeleteAutomationEarningRuleRequest {
293
+ interface DeleteAutomationEarningRuleRequest {
289
294
  /**
290
295
  * ID of the earning rule to delete.
291
296
  * @format GUID
292
297
  */
293
298
  _id: string;
294
299
  }
295
- export interface DeleteAutomationEarningRuleResponse {
300
+ interface DeleteAutomationEarningRuleResponse {
296
301
  }
297
- export interface ListEarningRulesRequest {
302
+ interface ListEarningRulesRequest {
298
303
  /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
299
304
  triggerAppId?: string | null;
300
305
  /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
301
306
  triggerActivityType?: string | null;
302
307
  }
303
- export interface ListEarningRulesResponse {
308
+ interface ListEarningRulesResponse {
304
309
  /** Retrieved earning rules. */
305
310
  earningRules?: LoyaltyEarningRule[];
306
311
  }
307
- export interface ListEarningRulesInTierRequest {
312
+ interface ListEarningRulesInTierRequest {
308
313
  /**
309
314
  * ID of the tier for which the earning rules will be returned.
310
315
  * @format GUID
@@ -313,7 +318,7 @@ export interface ListEarningRulesInTierRequest {
313
318
  /** Pagination options. */
314
319
  paging?: CursorPaging;
315
320
  }
316
- export interface CursorPaging {
321
+ interface CursorPaging {
317
322
  /**
318
323
  * Maximum number of items to return in the results.
319
324
  * @max 100
@@ -328,13 +333,13 @@ export interface CursorPaging {
328
333
  */
329
334
  cursor?: string | null;
330
335
  }
331
- export interface ListEarningRulesInTierResponse {
336
+ interface ListEarningRulesInTierResponse {
332
337
  /** Retrieved earning rules. */
333
338
  earningRules?: LoyaltyEarningRule[];
334
339
  /** Details on the paged set of results returned. */
335
340
  pagingMetadata?: PagingMetadataV2;
336
341
  }
337
- export interface PagingMetadataV2 {
342
+ interface PagingMetadataV2 {
338
343
  /** Number of items returned in the response. */
339
344
  count?: number | null;
340
345
  /** Offset that was requested. */
@@ -346,7 +351,7 @@ export interface PagingMetadataV2 {
346
351
  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
347
352
  cursors?: Cursors;
348
353
  }
349
- export interface Cursors {
354
+ interface Cursors {
350
355
  /**
351
356
  * Cursor string pointing to the next page in the list of results.
352
357
  * @maxLength 16000
@@ -358,7 +363,7 @@ export interface Cursors {
358
363
  */
359
364
  prev?: string | null;
360
365
  }
361
- export interface DomainEvent extends DomainEventBodyOneOf {
366
+ interface DomainEvent extends DomainEventBodyOneOf {
362
367
  createdEvent?: EntityCreatedEvent;
363
368
  updatedEvent?: EntityUpdatedEvent;
364
369
  deletedEvent?: EntityDeletedEvent;
@@ -393,19 +398,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
393
398
  entityEventSequence?: string | null;
394
399
  }
395
400
  /** @oneof */
396
- export interface DomainEventBodyOneOf {
401
+ interface DomainEventBodyOneOf {
397
402
  createdEvent?: EntityCreatedEvent;
398
403
  updatedEvent?: EntityUpdatedEvent;
399
404
  deletedEvent?: EntityDeletedEvent;
400
405
  actionEvent?: ActionEvent;
401
406
  }
402
- export interface EntityCreatedEvent {
407
+ interface EntityCreatedEvent {
403
408
  entity?: string;
404
409
  }
405
- export interface RestoreInfo {
410
+ interface RestoreInfo {
406
411
  deletedDate?: Date | null;
407
412
  }
408
- export interface EntityUpdatedEvent {
413
+ interface EntityUpdatedEvent {
409
414
  /**
410
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.
411
416
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -413,20 +418,20 @@ export interface EntityUpdatedEvent {
413
418
  */
414
419
  currentEntity?: string;
415
420
  }
416
- export interface EntityDeletedEvent {
421
+ interface EntityDeletedEvent {
417
422
  /** Entity that was deleted. */
418
423
  deletedEntity?: string | null;
419
424
  }
420
- export interface ActionEvent {
425
+ interface ActionEvent {
421
426
  body?: string;
422
427
  }
423
- export interface Empty {
428
+ interface Empty {
424
429
  }
425
- export interface InvalidateEarningRuleCacheRequest {
430
+ interface InvalidateEarningRuleCacheRequest {
426
431
  }
427
- export interface InvalidateEarningRuleCacheResponse {
432
+ interface InvalidateEarningRuleCacheResponse {
428
433
  }
429
- export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
434
+ interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
430
435
  /** Emitted on a meta site creation. */
431
436
  siteCreated?: SiteCreated;
432
437
  /** Emitted on a meta site transfer completion. */
@@ -492,7 +497,7 @@ export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
492
497
  assets?: Asset[];
493
498
  }
494
499
  /** @oneof */
495
- export interface MetaSiteSpecialEventPayloadOneOf {
500
+ interface MetaSiteSpecialEventPayloadOneOf {
496
501
  /** Emitted on a meta site creation. */
497
502
  siteCreated?: SiteCreated;
498
503
  /** Emitted on a meta site transfer completion. */
@@ -542,7 +547,7 @@ export interface MetaSiteSpecialEventPayloadOneOf {
542
547
  /** Emitted when Picasso is detached. */
543
548
  picassoUnassigned?: PicassoUnassigned;
544
549
  }
545
- export interface Asset {
550
+ interface Asset {
546
551
  /**
547
552
  * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).
548
553
  * @maxLength 36
@@ -554,16 +559,18 @@ export interface Asset {
554
559
  */
555
560
  instanceId?: string;
556
561
  /** An application state. */
557
- state?: State;
562
+ state?: StateWithLiterals;
558
563
  }
559
- export declare enum State {
564
+ declare enum State {
560
565
  UNKNOWN = "UNKNOWN",
561
566
  ENABLED = "ENABLED",
562
567
  DISABLED = "DISABLED",
563
568
  PENDING = "PENDING",
564
569
  DEMO = "DEMO"
565
570
  }
566
- export interface SiteCreated {
571
+ /** @enumType */
572
+ type StateWithLiterals = State | 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'PENDING' | 'DEMO';
573
+ interface SiteCreated {
567
574
  /**
568
575
  * A template identifier (empty if not created from a template).
569
576
  * @maxLength 36
@@ -575,7 +582,7 @@ export interface SiteCreated {
575
582
  */
576
583
  ownerId?: string;
577
584
  /** A context in which meta site was created. */
578
- context?: SiteCreatedContext;
585
+ context?: SiteCreatedContextWithLiterals;
579
586
  /**
580
587
  * A meta site id from which this site was created.
581
588
  *
@@ -590,9 +597,9 @@ export interface SiteCreated {
590
597
  */
591
598
  siteName?: string;
592
599
  /** A namespace. */
593
- namespace?: Namespace;
600
+ namespace?: NamespaceWithLiterals;
594
601
  }
595
- export declare enum SiteCreatedContext {
602
+ declare enum SiteCreatedContext {
596
603
  /** A valid option, we don't expose all reasons why site might be created. */
597
604
  OTHER = "OTHER",
598
605
  /** A meta site was created from template. */
@@ -606,7 +613,9 @@ export declare enum SiteCreatedContext {
606
613
  /** deprecated A meta site was created for Flash editor. */
607
614
  FLASH = "FLASH"
608
615
  }
609
- export declare enum Namespace {
616
+ /** @enumType */
617
+ type SiteCreatedContextWithLiterals = SiteCreatedContext | 'OTHER' | 'FROM_TEMPLATE' | 'DUPLICATE_BY_SITE_TRANSFER' | 'DUPLICATE' | 'OLD_SITE_TRANSFER' | 'FLASH';
618
+ declare enum Namespace {
610
619
  UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
611
620
  /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
612
621
  WIX = "WIX",
@@ -688,8 +697,10 @@ export declare enum Namespace {
688
697
  /** MIMIR - Siteless account for MIMIR Ai Job runner. */
689
698
  MIMIR = "MIMIR"
690
699
  }
700
+ /** @enumType */
701
+ 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';
691
702
  /** Site transferred to another user. */
692
- export interface SiteTransferred {
703
+ interface SiteTransferred {
693
704
  /**
694
705
  * A previous owner id (user that transfers meta site).
695
706
  * @format GUID
@@ -702,15 +713,15 @@ export interface SiteTransferred {
702
713
  newOwnerId?: string;
703
714
  }
704
715
  /** Soft deletion of the meta site. Could be restored. */
705
- export interface SiteDeleted {
716
+ interface SiteDeleted {
706
717
  /** A deletion context. */
707
718
  deleteContext?: DeleteContext;
708
719
  }
709
- export interface DeleteContext {
720
+ interface DeleteContext {
710
721
  /** When the meta site was deleted. */
711
722
  dateDeleted?: Date | null;
712
723
  /** A status. */
713
- deleteStatus?: DeleteStatus;
724
+ deleteStatus?: DeleteStatusWithLiterals;
714
725
  /**
715
726
  * A reason (flow).
716
727
  * @maxLength 255
@@ -722,20 +733,22 @@ export interface DeleteContext {
722
733
  */
723
734
  initiatorId?: string | null;
724
735
  }
725
- export declare enum DeleteStatus {
736
+ declare enum DeleteStatus {
726
737
  UNKNOWN = "UNKNOWN",
727
738
  TRASH = "TRASH",
728
739
  DELETED = "DELETED",
729
740
  PENDING_PURGE = "PENDING_PURGE",
730
741
  PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
731
742
  }
743
+ /** @enumType */
744
+ type DeleteStatusWithLiterals = DeleteStatus | 'UNKNOWN' | 'TRASH' | 'DELETED' | 'PENDING_PURGE' | 'PURGED_EXTERNALLY';
732
745
  /** Restoration of the meta site. */
733
- export interface SiteUndeleted {
746
+ interface SiteUndeleted {
734
747
  }
735
748
  /** First publish of a meta site. Or subsequent publish after unpublish. */
736
- export interface SitePublished {
749
+ interface SitePublished {
737
750
  }
738
- export interface SiteUnpublished {
751
+ interface SiteUnpublished {
739
752
  /**
740
753
  * A list of URLs previously associated with the meta site.
741
754
  * @maxLength 4000
@@ -743,9 +756,9 @@ export interface SiteUnpublished {
743
756
  */
744
757
  urls?: string[];
745
758
  }
746
- export interface SiteMarkedAsTemplate {
759
+ interface SiteMarkedAsTemplate {
747
760
  }
748
- export interface SiteMarkedAsWixSite {
761
+ interface SiteMarkedAsWixSite {
749
762
  }
750
763
  /**
751
764
  * Represents a service provisioned a site.
@@ -762,7 +775,7 @@ export interface SiteMarkedAsWixSite {
762
775
  * changes made to the original template afterward.
763
776
  * To ensure this, the TPA on the template gets a new instance_id.
764
777
  */
765
- export interface ServiceProvisioned {
778
+ interface ServiceProvisioned {
766
779
  /**
767
780
  * Either UUID or EmbeddedServiceType.
768
781
  * @maxLength 36
@@ -789,7 +802,7 @@ export interface ServiceProvisioned {
789
802
  */
790
803
  originMetaSiteId?: string | null;
791
804
  }
792
- export interface ServiceRemoved {
805
+ interface ServiceRemoved {
793
806
  /**
794
807
  * Either UUID or EmbeddedServiceType.
795
808
  * @maxLength 36
@@ -807,7 +820,7 @@ export interface ServiceRemoved {
807
820
  version?: string | null;
808
821
  }
809
822
  /** Rename of the site. Meaning, free public url has been changed as well. */
810
- export interface SiteRenamed {
823
+ interface SiteRenamed {
811
824
  /**
812
825
  * A new meta site name (URL slug).
813
826
  * @maxLength 20
@@ -824,21 +837,21 @@ export interface SiteRenamed {
824
837
  *
825
838
  * Could not be restored. Therefore it's desirable to cleanup data.
826
839
  */
827
- export interface SiteHardDeleted {
840
+ interface SiteHardDeleted {
828
841
  /** A deletion context. */
829
842
  deleteContext?: DeleteContext;
830
843
  }
831
- export interface NamespaceChanged {
844
+ interface NamespaceChanged {
832
845
  /** A previous namespace. */
833
- oldNamespace?: Namespace;
846
+ oldNamespace?: NamespaceWithLiterals;
834
847
  /** A new namespace. */
835
- newNamespace?: Namespace;
848
+ newNamespace?: NamespaceWithLiterals;
836
849
  }
837
850
  /** Assigned Studio editor */
838
- export interface StudioAssigned {
851
+ interface StudioAssigned {
839
852
  }
840
853
  /** Unassigned Studio editor */
841
- export interface StudioUnassigned {
854
+ interface StudioUnassigned {
842
855
  }
843
856
  /**
844
857
  * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.
@@ -848,13 +861,13 @@ export interface StudioUnassigned {
848
861
  *
849
862
  * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service
850
863
  */
851
- export interface SiteUrlChanged {
864
+ interface SiteUrlChanged {
852
865
  }
853
866
  /**
854
867
  * Used at the end of the deletion flow for both draft sites and when a user deletes a site.
855
868
  * Consumed by other teams to remove relevant data.
856
869
  */
857
- export interface SitePurgedExternally {
870
+ interface SitePurgedExternally {
858
871
  /**
859
872
  * @maxLength 2048
860
873
  * @maxSize 100
@@ -864,18 +877,18 @@ export interface SitePurgedExternally {
864
877
  appDefId?: string[];
865
878
  }
866
879
  /** Assigned Odeditor */
867
- export interface OdeditorAssigned {
880
+ interface OdeditorAssigned {
868
881
  }
869
882
  /** Unassigned Odeditor */
870
- export interface OdeditorUnassigned {
883
+ interface OdeditorUnassigned {
871
884
  }
872
885
  /** Assigned Picasso editor */
873
- export interface PicassoAssigned {
886
+ interface PicassoAssigned {
874
887
  }
875
888
  /** Unassigned Picasso */
876
- export interface PicassoUnassigned {
889
+ interface PicassoUnassigned {
877
890
  }
878
- export interface MessageEnvelope {
891
+ interface MessageEnvelope {
879
892
  /**
880
893
  * App instance ID.
881
894
  * @format GUID
@@ -891,7 +904,7 @@ export interface MessageEnvelope {
891
904
  /** Stringify payload. */
892
905
  data?: string;
893
906
  }
894
- export interface IdentificationData extends IdentificationDataIdOneOf {
907
+ interface IdentificationData extends IdentificationDataIdOneOf {
895
908
  /**
896
909
  * ID of a site visitor that has not logged in to the site.
897
910
  * @format GUID
@@ -913,10 +926,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
913
926
  */
914
927
  appId?: string;
915
928
  /** @readonly */
916
- identityType?: WebhookIdentityType;
929
+ identityType?: WebhookIdentityTypeWithLiterals;
917
930
  }
918
931
  /** @oneof */
919
- export interface IdentificationDataIdOneOf {
932
+ interface IdentificationDataIdOneOf {
920
933
  /**
921
934
  * ID of a site visitor that has not logged in to the site.
922
935
  * @format GUID
@@ -938,14 +951,16 @@ export interface IdentificationDataIdOneOf {
938
951
  */
939
952
  appId?: string;
940
953
  }
941
- export declare enum WebhookIdentityType {
954
+ declare enum WebhookIdentityType {
942
955
  UNKNOWN = "UNKNOWN",
943
956
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
944
957
  MEMBER = "MEMBER",
945
958
  WIX_USER = "WIX_USER",
946
959
  APP = "APP"
947
960
  }
948
- export interface BaseEventMetadata {
961
+ /** @enumType */
962
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
963
+ interface BaseEventMetadata {
949
964
  /**
950
965
  * App instance ID.
951
966
  * @format GUID
@@ -959,7 +974,7 @@ export interface BaseEventMetadata {
959
974
  /** The identification type and identity data. */
960
975
  identity?: IdentificationData;
961
976
  }
962
- export interface EventMetadata extends BaseEventMetadata {
977
+ interface EventMetadata extends BaseEventMetadata {
963
978
  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
964
979
  _id?: string;
965
980
  /**
@@ -989,172 +1004,22 @@ export interface EventMetadata extends BaseEventMetadata {
989
1004
  */
990
1005
  entityEventSequence?: string | null;
991
1006
  }
992
- export interface LoyaltyEarningRuleCreatedEnvelope {
1007
+ interface LoyaltyEarningRuleCreatedEnvelope {
993
1008
  entity: LoyaltyEarningRule;
994
1009
  metadata: EventMetadata;
995
1010
  }
996
- /**
997
- * Triggered when an earning rule is created.
998
- * @permissionScope Read Loyalty
999
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1000
- * @permissionScope Manage Loyalty
1001
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1002
- * @permissionScope Manage Restaurants - all permissions
1003
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1004
- * @permissionId LOYALTY.READ_EARNING_RULES
1005
- * @webhook
1006
- * @eventType wix.loyalty.v1.loyalty_earning_rule_created
1007
- * @slug created
1008
- */
1009
- export declare function onLoyaltyEarningRuleCreated(handler: (event: LoyaltyEarningRuleCreatedEnvelope) => void | Promise<void>): void;
1010
- export interface LoyaltyEarningRuleDeletedEnvelope {
1011
+ interface LoyaltyEarningRuleDeletedEnvelope {
1011
1012
  metadata: EventMetadata;
1012
1013
  }
1013
- /**
1014
- * Triggered when an earning rule is deleted.
1015
- * @permissionScope Read Loyalty
1016
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1017
- * @permissionScope Manage Loyalty
1018
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1019
- * @permissionScope Manage Restaurants - all permissions
1020
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1021
- * @permissionId LOYALTY.READ_EARNING_RULES
1022
- * @webhook
1023
- * @eventType wix.loyalty.v1.loyalty_earning_rule_deleted
1024
- * @slug deleted
1025
- */
1026
- export declare function onLoyaltyEarningRuleDeleted(handler: (event: LoyaltyEarningRuleDeletedEnvelope) => void | Promise<void>): void;
1027
- export interface LoyaltyEarningRuleUpdatedEnvelope {
1014
+ interface LoyaltyEarningRuleUpdatedEnvelope {
1028
1015
  entity: LoyaltyEarningRule;
1029
1016
  metadata: EventMetadata;
1030
1017
  }
1031
- /**
1032
- * Triggered when an earning rule is updated.
1033
- * @permissionScope Read Loyalty
1034
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1035
- * @permissionScope Manage Loyalty
1036
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1037
- * @permissionScope Manage Restaurants - all permissions
1038
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1039
- * @permissionId LOYALTY.READ_EARNING_RULES
1040
- * @webhook
1041
- * @eventType wix.loyalty.v1.loyalty_earning_rule_updated
1042
- * @slug updated
1043
- */
1044
- export declare function onLoyaltyEarningRuleUpdated(handler: (event: LoyaltyEarningRuleUpdatedEnvelope) => void | Promise<void>): void;
1045
- 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`;
1046
- /**
1047
- * Creates a non-automated earning rule.
1048
- *
1049
- * >**Note**: You can only create non-automated earning rules from a supported list.
1050
- * For the supported list of services, see the introduction.
1051
- * @param earningRule - Earning rule to create.
1052
- * @public
1053
- * @requiredField earningRule
1054
- * @requiredField earningRule.sourceAppId
1055
- * @requiredField earningRule.status
1056
- * @requiredField earningRule.title
1057
- * @requiredField earningRule.triggerActivityType
1058
- * @requiredField earningRule.triggerAppId
1059
- * @requiredField earningRule.type
1060
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1061
- * @permissionScope Manage Loyalty
1062
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1063
- * @permissionScope Manage Restaurants - all permissions
1064
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1065
- * @applicableIdentity APP
1066
- * @returns Created earning rule.
1067
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule
1068
- */
1069
- export declare function createLoyaltyEarningRule(earningRule: NonNullablePaths<LoyaltyEarningRule, `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`>): Promise<NonNullablePaths<LoyaltyEarningRule, LoyaltyEarningRuleNonNullablePaths>>;
1070
- /**
1071
- * Creates multiple non-automated earning rules.
1072
- *
1073
- * >**Note**: You can only create non-automated earning rules from a supported list.
1074
- * For the supported list of services, see the introduction.
1075
- * @param earningRules - Earning rules to create.
1076
- * @public
1077
- * @requiredField earningRules
1078
- * @requiredField earningRules.sourceAppId
1079
- * @requiredField earningRules.status
1080
- * @requiredField earningRules.title
1081
- * @requiredField earningRules.triggerActivityType
1082
- * @requiredField earningRules.triggerAppId
1083
- * @requiredField earningRules.type
1084
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1085
- * @permissionScope Manage Loyalty
1086
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1087
- * @permissionScope Manage Restaurants - all permissions
1088
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1089
- * @applicableIdentity APP
1090
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules
1091
- */
1092
- 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` | {
1093
- [P in LoyaltyEarningRuleNonNullablePaths]: `results.${number}.item.${P}`;
1094
- }[LoyaltyEarningRuleNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
1095
- /**
1096
- * Creates a custom automated earning rule.
1097
- *
1098
- * To learn more about the automated rules, read the introduction.
1099
- * @param type - Type of the custom earning rule.
1100
- * @public
1101
- * @requiredField type
1102
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1103
- * @permissionScope Manage Loyalty
1104
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1105
- * @permissionScope Manage Restaurants - all permissions
1106
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1107
- * @applicableIdentity APP
1108
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule
1109
- */
1110
- export declare function createCustomLoyaltyEarningRule(type: Type, options?: CreateCustomLoyaltyEarningRuleOptions): Promise<NonNullablePaths<CreateCustomLoyaltyEarningRuleResponse, {
1111
- [P in LoyaltyEarningRuleNonNullablePaths]: `earningRule.${P}`;
1112
- }[LoyaltyEarningRuleNonNullablePaths]>>;
1113
- export interface CreateCustomLoyaltyEarningRuleOptions {
1018
+ interface CreateCustomLoyaltyEarningRuleOptions {
1114
1019
  /** Custom earning rule to create. */
1115
1020
  earningRule?: CustomLoyaltyEarningRule;
1116
1021
  }
1117
- /**
1118
- * Retrieves a specified non-automated earning rule.
1119
- * @param _id - ID of the earning rule to retrieve.
1120
- * @public
1121
- * @requiredField _id
1122
- * @permissionId LOYALTY.READ_EARNING_RULES
1123
- * @permissionScope Read Loyalty
1124
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1125
- * @permissionScope Manage Loyalty
1126
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1127
- * @permissionScope Manage Restaurants - all permissions
1128
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1129
- * @applicableIdentity APP
1130
- * @applicableIdentity VISITOR
1131
- * @returns Retrieved earning rule.
1132
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule
1133
- */
1134
- export declare function getLoyaltyEarningRule(_id: string): Promise<NonNullablePaths<LoyaltyEarningRule, LoyaltyEarningRuleNonNullablePaths>>;
1135
- /**
1136
- * Updates an earning rule.
1137
- *
1138
- * Supports partial updates.
1139
- *
1140
- * Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,
1141
- * the current revision must be passed when updating the earning rule.
1142
- * @param _id - Loyalty earning rule ID.
1143
- * @public
1144
- * @requiredField _id
1145
- * @requiredField earningRule
1146
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1147
- * @permissionScope Manage Loyalty
1148
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1149
- * @permissionScope Manage Restaurants - all permissions
1150
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1151
- * @applicableIdentity APP
1152
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule
1153
- */
1154
- export declare function updateLoyaltyEarningRule(_id: string, earningRule: UpdateLoyaltyEarningRule): Promise<NonNullablePaths<UpdateLoyaltyEarningRuleResponse, {
1155
- [P in LoyaltyEarningRuleNonNullablePaths]: `earningRule.${P}`;
1156
- }[LoyaltyEarningRuleNonNullablePaths]>>;
1157
- export interface UpdateLoyaltyEarningRule {
1022
+ interface UpdateLoyaltyEarningRule {
1158
1023
  /** Fixed amount of points awarded for each qualifying activity. */
1159
1024
  fixedAmount?: FixedAmount;
1160
1025
  /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
@@ -1189,7 +1054,7 @@ export interface UpdateLoyaltyEarningRule {
1189
1054
  */
1190
1055
  title?: string;
1191
1056
  /** Current status of the earning rule. */
1192
- status?: Status;
1057
+ status?: StatusWithLiterals;
1193
1058
  /**
1194
1059
  * Revision number, incremented by 1 each time the earning rule is updated.
1195
1060
  * Pass the latest revision when updating to prevent conflicting changes.
@@ -1211,68 +1076,18 @@ export interface UpdateLoyaltyEarningRule {
1211
1076
  */
1212
1077
  metadata?: Metadata;
1213
1078
  }
1214
- /**
1215
- * Deletes a non-automated earning rule.
1216
- * @param _id - ID of the earning rule to delete.
1217
- * @public
1218
- * @requiredField _id
1219
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1220
- * @permissionScope Manage Loyalty
1221
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1222
- * @permissionScope Manage Restaurants - all permissions
1223
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1224
- * @applicableIdentity APP
1225
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule
1226
- */
1227
- export declare function deleteLoyaltyEarningRule(_id: string, options?: DeleteLoyaltyEarningRuleOptions): Promise<void>;
1228
- export interface DeleteLoyaltyEarningRuleOptions {
1079
+ interface DeleteLoyaltyEarningRuleOptions {
1229
1080
  /**
1230
1081
  * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
1231
1082
  * Pass the latest revision when updating to prevent conflicting changes.
1232
1083
  */
1233
1084
  revision?: string;
1234
1085
  }
1235
- /**
1236
- * Deletes a custom automated earning rule.
1237
- *
1238
- * > **Note:** Pre-installed automated rules can only be paused, not deleted.
1239
- * @param _id - ID of the earning rule to delete.
1240
- * @public
1241
- * @requiredField _id
1242
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1243
- * @permissionScope Manage Loyalty
1244
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1245
- * @permissionScope Manage Restaurants - all permissions
1246
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1247
- * @applicableIdentity APP
1248
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule
1249
- */
1250
- export declare function deleteAutomationEarningRule(_id: string): Promise<void>;
1251
- /**
1252
- * Retrieves a list of earning rules.
1253
- *
1254
- * Returns both automated and non-automated earning rules.
1255
- *
1256
- * You can filter the results by `triggerAppId` or `triggerActivityType`.
1257
- * @public
1258
- * @permissionId LOYALTY.READ_EARNING_RULES
1259
- * @permissionScope Read Loyalty
1260
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1261
- * @permissionScope Manage Loyalty
1262
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1263
- * @permissionScope Manage Restaurants - all permissions
1264
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1265
- * @applicableIdentity APP
1266
- * @applicableIdentity VISITOR
1267
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules
1268
- */
1269
- export declare function listEarningRules(options?: ListEarningRulesOptions): Promise<NonNullablePaths<ListEarningRulesResponse, {
1270
- [P in LoyaltyEarningRuleNonNullablePaths]: `earningRules.${number}.${P}`;
1271
- }[LoyaltyEarningRuleNonNullablePaths]>>;
1272
- export interface ListEarningRulesOptions {
1086
+ interface ListEarningRulesOptions {
1273
1087
  /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
1274
1088
  triggerAppId?: string | null;
1275
1089
  /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
1276
1090
  triggerActivityType?: string | null;
1277
1091
  }
1278
- export {};
1092
+
1093
+ 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 };